/* THE PARTS ALL PAGES SHARE (21.11.2026, night): the paper button, the Contact sheet, the label of the platform marks.
   One file for the home page (site.css) and the menu pages (pages.css); it is linked BEFORE them, so a page's own file may
   still set what is its own (the width of a button in a row, a night value). The colours are the page's tokens, so the
   sheet and the label wear the look of the page they stand on. mail.js builds the sheet and the labels.
   Nothing here asks for a motion preference. No em dashes. */

/* ---------- THE TOKENS ALL PAGES SHARE (22.11.2026; the table with every use: DESIGN-SYSTEM.txt beside this file).
   This file is linked first on every page, so these stand ONCE: the scale of space, the corners, the fixed heights, the
   rails of a card, the gaps of the top band, the type roles that are fixed in px. The colours, the faces and the fluid
   scale of the one-screen home page stay in the page's own file (site.css, pages.css), because they differ by look.
   A look may set a token again (the playful look sets --r-card). A value that is not here is in the list of outliers
   of DESIGN-SYSTEM.txt, with its reason ---------- */
:root {
  /* space: one scale. 2 px steps for dense controls, 4 px steps for layout */
  --sp-2: 2px; --sp-4: 4px; --sp-6: 6px; --sp-8: 8px; --sp-10: 10px; --sp-12: 12px; --sp-16: 16px; --sp-20: 20px; --sp-24: 24px;
  --sp-28: 28px; --sp-32: 32px; --sp-40: 40px; --sp-44: 44px; --sp-48: 48px; --sp-56: 56px; --sp-64: 64px; --sp-72: 72px;
  /* corners, by what wears them */
  --r-xs: 3px;        /* a chip, a mark, the focus box of a word */
  --r-ctl: 4px;       /* a small control: a link of the menu, a key cap, a tile of a log row */
  --r-obj: 6px;       /* the object inside a card (board, plate, small page, clip) and the living area around it */
  --r-btn: 7px;       /* the paper button in every size, the label of the marks */
  --r-icon: 8px;      /* a button that is only an icon (the cross, Watch it again) */
  --r-card: 8px;      /* a card, the sheet of the letter */
  --r-tile: 9px;      /* a product tile (the icon's own corner) */
  --r-sheet: 12px;    /* a sheet over the page */
  --r-sheet-top: 14px; /* the upper corners of a sheet that comes from below on the phone */
  /* fixed heights */
  --h-key: 28px;      /* the two answers inside a card */
  --h-btn: 44px;      /* the paper button of the pages */
  --touch: 44px;      /* the least target of a finger */
  --rail-a: 32px;     /* the upper rail of a living area: its state */
  --rail-c: 56px;     /* the lower rail of a living area: the line of its AI agent */
  --stage-in: 10px;   /* from the edge of a living area to the object in it */
  /* the top band (its height is --band, set by the width of the window in site.css and pages.css) */
  --menu-gap: 28px; --acts-gap: calc(var(--menu-gap) * 2); --tile-gap: calc(var(--menu-gap) / 2);   /* one step: between the two words, and on each side of the divider; half of it between the two tiles */
  /* type roles that are fixed in px (the editorial roles --t-body, --t-small, --t-key, --t-h2 are in pages.css) */
  --t-menu: 18px;     /* the menu (25.11.2026, the owner's word: 18 px at weight 500, one size on every window) */
  --t-line: 13px;     /* the line of an AI agent, the label of the marks */
  --t-strip: 11px;    /* the state rail, in the mono face */
  --t-copy: max(13px, .78rem);   /* the copyright line */
  --t-legal: 16px;    /* the two links of the last row (25.11.2026, the owner's word: 16 px at weight 500) */
  /* waiting: the amber and its ink on paper (22.11, night: here from plain.css, so every page has them once; the home
     page's night look sets the ink again in site.css, which is linked after this file) */
  --wait: #E09A35; --wait-ink: #7A4A12;
}


@media (min-width: 1900px) { :root { --menu-gap: 32px; } }
@media (min-width: 2400px) { :root { --menu-gap: 36px; } }

/* ---------- THE LAST ROW, ONE ON THE WHOLE SITE (22.11.2026, night; 24.11.2026, the owner's word: the links and the
   copyright had run together and were too small). The copyright stands at the left edge of the column, the two links at
   the right edge, larger and in a stronger ink, in the row that is already there, so the home page gains no height. The row's own box (display, height, the air above) stays in site.css
   and pages.css. (.14s: the time pages.css gives the menu; 4 px, 1 px: the underline of the links in the letter) ---------- */
html .foot { column-gap: var(--sp-24); }
.foot .legal { display: flex; align-items: center; gap: var(--sp-24); margin-left: auto; font-size: var(--t-legal); line-height: 1; font-weight: 500; }
html .foot .legal + .copy { order: -1; margin: 0 auto 0 0; }
.foot .legal a { position: relative; color: var(--fg-2); text-decoration: none; white-space: nowrap; border-radius: var(--r-xs); cursor: pointer; transition: color .14s ease; }
.foot .legal a:hover { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.foot .legal a[aria-current="page"] { color: var(--fg); }
@media (max-width: 700px) {
  /* one line down to 320 px of window; narrower, the row wraps, nothing is cut */
  html .foot { flex-wrap: wrap; height: auto; min-height: 1.5rem; column-gap: var(--sp-20); row-gap: var(--sp-12); }
  .foot .legal { gap: var(--sp-20); }
  /* a target of 44 px for a finger around each small link */
  .foot .legal a { display: inline-block; }
  .foot .legal a::after { content: ""; position: absolute; left: calc(var(--sp-8) * -1); right: calc(var(--sp-8) * -1); top: 50%; height: var(--touch); margin-top: calc(var(--touch) / -2); }
}

/* ---------- the paper button: white paper raised above the page (the same values pages.css gave it) ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: .55rem; height: var(--h-btn); padding: 0 18px; margin: 0; cursor: pointer; white-space: nowrap; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--pc, #8C8371) 56%, #C9BEA9); border-radius: var(--r-btn); background-color: #FFFFFF; color: var(--pi, var(--fg));
  font-family: var(--text); font-size: 17px; font-weight: 650; letter-spacing: .003em; line-height: 1;
  box-shadow: 0 1px 2px rgba(40, 30, 15, .16), 0 4px 10px -4px rgba(40, 30, 15, .4);
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .16s ease, border-color .16s ease, background-color .16s ease; }
.btn:hover { transform: translateY(-1px); border-color: var(--line-3); box-shadow: 0 2px 3px rgba(40, 30, 15, .13), 0 10px 18px -7px rgba(40, 30, 15, .46); }
.btn:active { transform: scale(.98); background-color: #FBF7EF; box-shadow: inset 0 1px 2px rgba(40, 30, 15, .16); transition-duration: .06s; }
/* 34 (fix list 2): ONE OPTICAL WEIGHT FOR THE MARKS OF A ROW. Every mark is a filled shape in a box of 16 px; the envelope
   was a hairline outline beside the solid X and the solid GitHub mark, and is a filled envelope now (in the pages) */
.btn svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.btn .lbl { display: inline-grid; }
.btn .lbl > * { grid-area: 1 / 1; text-align: left; }
.btn .lbl > *, .capbox { display: block; text-box: trim-both cap alphabetic; }
.btn .lbl > *, .btn .capbox { translate: 0 calc((1ex - 1cap) / 4); }
.btn .done { visibility: hidden; }
.btn.copied .rest { visibility: hidden; }
.btn.copied .done { visibility: visible; }
.btn.copied { border-color: #3C8A5E; color: #24593C; }
html[data-design="night"] .btn { background-color: #26262A; border-color: #56565D; color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255, 238, 214, .07), 0 1px 2px rgba(0, 0, 0, .6), 0 4px 10px -4px rgba(0, 0, 0, .75); }
html[data-design="night"] .btn:hover { border-color: #92908C; }
html[data-design="night"] .btn:active { background-color: #1C1C20; }
html[data-design="night"] .btn.copied { border-color: #5DB585; color: #9AD8B4; }

/* ---------- O2 THE CONTACT SHEET (Contact is not a scroll to the end of the letter). The word Contact in
   the top band opens this small sheet over the page the visitor is on: the heading, the three ways to write, the line
   about the form. It closes by the cross, by Escape and by a press outside; the keyboard goes in and comes back to the
   word Contact; the page behind does not scroll. On the phone it is a sheet from below. Without the script the word leads
   to contact.html, a small page with the same block ---------- */
.cdlg { width: min(656px, calc(100vw - 32px)); /* (656: the three ways stand in one row, as at the end of the letter; at 560 the third fell to a row of its own) */ max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0; overflow: auto;
  border: 1px solid var(--card-edge, rgba(40, 30, 15, .09)); border-radius: var(--r-sheet); background: var(--card, #FFFDF8); color: var(--fg, #16130E);
  box-shadow: 0 2px 6px rgba(40, 30, 15, .1), 0 28px 60px -18px rgba(40, 30, 15, .38); }
.cdlg::backdrop { background: rgba(22, 19, 14, .38); }
html[data-design="night"] .cdlg { box-shadow: 0 2px 8px rgba(0, 0, 0, .6), 0 28px 70px -18px rgba(0, 0, 0, .9); }
html[data-design="night"] .cdlg::backdrop { background: rgba(0, 0, 0, .6); }
.cdlg[open] { animation: cd-in .22s cubic-bezier(.2, .8, .2, 1); }
.cdlg[open]::backdrop { animation: cd-veil .22s ease; }
@keyframes cd-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes cd-veil { from { opacity: 0; } }
.cd-in { position: relative; padding: 40px 40px 36px; }
.cdlg h2 { margin: 0; padding-right: 44px; font-family: var(--display); font-size: 32px; line-height: 1.1; font-weight: 650; letter-spacing: -.028em; color: var(--fg); text-box: trim-both cap alphabetic; }
.cdlg .ways { display: flex; flex-wrap: wrap; gap: var(--sp-10); margin-top: var(--sp-32); }
.cdlg .ways .btn { flex: none; width: auto; padding: 0 var(--sp-16); font-size: 17px; }
.cdlg .mailstat { margin-top: var(--sp-16); font-family: var(--text); font-size: 17px; line-height: 24px; color: var(--fg-2); }
.cdlg .mailstat .addr { color: var(--fg); font-weight: 600; user-select: all; }
.cdlg p.small { margin: var(--sp-28) 0 0; font-family: var(--text); font-size: 15px; line-height: 22px; letter-spacing: 0; color: var(--fg-2); text-wrap: pretty; }
.cdlg [hidden] { display: none !important; }
.cd-x { position: absolute; top: var(--sp-12); right: var(--sp-12); display: grid; place-items: center; width: var(--touch); height: var(--touch); padding: 0; border: 0; border-radius: var(--r-icon); background: none; color: var(--fg-3); cursor: pointer;
  transition: color .14s ease, background-color .14s ease; }
.cd-x:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.cd-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
html:has(.cdlg[open]) { overflow: hidden; }
@media (max-width: 700px) {
  .cdlg { width: 100%; max-height: calc(100vh - 48px); margin: auto 0 0; border-width: 1px 0 0; border-radius: var(--r-sheet-top) var(--r-sheet-top) 0 0; }
  .cdlg[open] { animation: cd-up .28s cubic-bezier(.2, .8, .2, 1); }
  .cd-in { padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
  .cdlg h2 { font-size: 28px; }
  .cdlg .ways { margin-top: var(--sp-24); }
  .cdlg .ways .btn { width: 100%; justify-content: flex-start; font-size: 15px; }
  .cdlg .mailstat { font-size: 15px; line-height: 22px; }
}
@keyframes cd-up { from { transform: translateY(100%); } }

/* ---------- O3 THE LABEL OF THE PLATFORM MARKS ("grey and black, it is not clear what they mean"). The
   three marks of a tool are one group. Under the pointer, with the keyboard on it, or after a tap, a small label says the
   three in words, each line led by its own mark; the mark that is lit wears the product's colour there too. mail.js builds
   the label from the names the marks already carry for a screen reader ---------- */
.st { position: relative; border-radius: var(--r-xs); cursor: help; }
.st .tip { display: none; position: absolute; z-index: 30; top: calc(100% + 9px); right: -8px; grid-template-columns: 14px auto; align-items: center; gap: 9px 9px;
  padding: 11px 13px 11px 12px; border-radius: var(--r-btn); border: 1px solid var(--line-2, #D3CAB8); background: var(--card-top, #FFFEFA); white-space: nowrap; cursor: default; pointer-events: none;
  font-family: var(--text); font-size: var(--t-line); line-height: 1; font-weight: 500; letter-spacing: 0; color: var(--fg-2, #3F3A31);
  box-shadow: 0 1px 2px rgba(40, 30, 15, .1), 0 10px 24px -8px rgba(40, 30, 15, .3); }
.st:hover .tip, .st:focus .tip { display: grid; animation: tip-in .16s ease; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-3px); } }
span.st span.tip svg { display: block; width: 14px; height: 14px; fill: var(--fg-3, #6A6356); }
.st .tip .on { color: var(--fg, #16130E); }
span.st span.tip svg.on { fill: var(--pi, var(--fg)); }
.st .tip .v { margin-left: 8px; font-family: "Plex Mono", Consolas, ui-monospace, monospace; font-size: 12px; font-weight: 400; color: var(--fg-2, #3F3A31); }   /* the build of today */
html[data-design="night"] .st .tip { box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -8px rgba(0, 0, 0, .8); }
html[data-design="night"] span.st span.tip svg.on { fill: var(--pl, var(--fg)); }

/* ---------- THE PAGE KEEPS ITS OWN LOOK (the owner's word of 23.11, 23:03: a phone browser painted the light page dark by
   force, and the dark wordmark stood on a dark ground). The page says it is a light page and only that, so a browser that
   darkens pages by itself leaves it alone; the Dark look of the page is its own, chosen by the visitor, and says dark ---------- */
:root { color-scheme: only light; }
html[data-design="night"] { color-scheme: dark; }

/* ---------- THE MENU OF THE PHONE (the owner's word of 23.11, 23:03: About and Contact stood in a row under the top band;
   on a phone they belong in a menu behind one button). mail.js puts the button into the top band and sets "hm" on the
   page; a press opens the panel under the band ("hm-on"): the two words as two lines, under them the tiles of X and
   GitHub. A press outside, on a line of it, or Escape closes it. Without scripts the row under the band stays, as before.
   The selectors carry "html.hm" so that they stand over the phone rules of site.css and pages.css ---------- */
.hmb { display: none; }
@media (max-width: 700px) {
  html.hm .top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 30; height: 2.75rem; }
  html.hm .hmb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -6px 0 0; padding: 0; cursor: pointer;
    border: 0; border-radius: 12px; background: none; color: var(--fg, #16130E); -webkit-tap-highlight-color: transparent; }
  html.hm .hmb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; overflow: visible; }
  html.hm .hmb path { transform-box: fill-box; transform-origin: center; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .16s ease; }
  html.hm.hm-on .hmb .a { transform: translateY(3.5px) rotate(45deg); }
  html.hm.hm-on .hmb .b { opacity: 0; }
  html.hm.hm-on .hmb .c { transform: translateY(-3.5px) rotate(-45deg); }
  html.hm .top .acts { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 4px 18px 16px; border: 1px solid var(--line-2, rgba(40, 30, 15, .16)); border-radius: 18px; background: var(--card, var(--bg, #FFFDF8));
    box-shadow: 0 2px 6px rgba(40, 30, 15, .1), 0 18px 40px -14px rgba(40, 30, 15, .4); }
  html.hm.hm-on .top .acts { display: flex; animation: hm-in .2s cubic-bezier(.2, .8, .2, 1); }
  html.hm .top .acts .menu { order: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; border: 0; }
  html.hm .top .acts .menu a { display: flex; align-items: center; height: 54px; padding: 0; font-family: var(--text); font-size: 18px; line-height: 1; font-weight: 550;
    color: var(--fg, #16130E); text-decoration: none; border-bottom: 1px solid var(--line, rgba(40, 30, 15, .1)); }
  html.hm .top .acts .tiles { order: 2; position: static; display: flex; align-items: center; gap: 12px; height: auto; margin: 16px 0 0; --tile: 44px; }
  html.hm .top .acts .tiles::before { display: none; }
  html.hm .top .acts .replay { display: none; }
  html[data-design="night"].hm .top .acts { box-shadow: 0 2px 8px rgba(0, 0, 0, .6), 0 18px 44px -14px rgba(0, 0, 0, .9); }
}
@keyframes hm-in { from { opacity: 0; transform: translateY(-6px); } }
