/* Self-hosted font binaries; source and SIL OFL 1.1 licenses: README.md. */
/* Served from /assets/app.css, so each font URL is /assets/fonts/<file>. The bytes are the files in this folder. */
/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-400-900-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-400-900-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-400-900-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/courier-prime-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/sora-400-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/sora-400-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/syne-400-700-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/syne-400-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/syne-400-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  /* Spacing: base unit 4px. --sp-0 is the half step, used only for insets inside a control and for list gaps. */
  --sp-0: 2px; --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* Type: CODA's three voices; nothing under 12px except a short label in capitals (--fs-label). The program speaks in Sora (--font-ui: labels, explanations, buttons, menus, tabs, toolbars);
     Syne (--font-display) is for the wordmark and a page title only; IBM Plex Mono (--font-mono) is for money, codes and the small capital labels. This file names the families: each product ships the font files and weights it uses, and a weight it does not ship
     is shown at the nearest one it does (no fake bold: the program's own text sets font-synthesis to none, and the script page keeps its own so a bold italic line stays bold italic). What the writer or the assistant writes keeps the
     readable face (--font-text, Archivo, own): note text, typed fields, script and scene names. The script page is --font-script and never changes. --font-mono keeps its Chinese fallbacks (own: CODA's chain has none). */
  --font-display: 'Syne', 'Noto Sans SC', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', monospace;
  --font-ui: 'Sora', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: 'Archivo', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', system-ui, sans-serif;
  /* --font-script is look A's chain with ", 'Songti SC', STSong, 'Noto Serif CJK SC', SimSun" added before the final generic family, so Chinese script text keeps its fallback. */
  --font-script: 'Courier Prime', 'Courier New', 'Songti SC', STSong, 'Noto Serif CJK SC', SimSun, monospace;
  --fs-label: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-text: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px;
  /* --fs-display is look B's one size ("the film moment", Eric 2026-11-12): one line per page set well above the page title. It may be used for the moment title,
     the empty-state title and the mail moment (the code, the welcome headline), and for nothing else. 56px is the largest size at which a 342px phone column holds every title in two or three lines. */
  --fs-display: 56px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-body: 1.5;
  --stretch-body: 100%; --stretch-wordmark: 125%;
  --ls-wordmark: -0.045em; --ls-caps: 0.14em; --ls-caps-wide: 0.16em; --ls-caps-tight: 0.04em; --ls-codes: 0.2em;

  /* Shape: CODA's one radius, 2px, for what you press or type into (--r-ctl) and for anything that holds other things (--r-block: sections, menus, dialogs, toasts, panels). They stay two names so a product never has to know they are equal.
     --r-page for the script page, a pill for round things. --bw is the one hairline; --bw-strong is CODA's heavier rule for a sheet's own data lines, never a frame around a control. */
  --r-ctl: 2px; --r-block: 2px; --r-page: 4px; --r-pill: 999px;
  --bw: 1px; --bw-strong: 2px; --ring-w: 2px; --ring-gap: 2px;

  /* Control size classes: md for buttons, fields and rows; sm for dense bars; lg for the one main action of a page. Bars hold sm controls. A touch screen gets 44px for all three (see below). */
  --h-md: 36px; --h-sm: 32px; --h-lg: 40px; --h-bar: 48px; --h-bar-sm: 40px;
  --sz-icon: 16px; --sz-dot: 8px; --sz-check: 16px; --sz-doc-w: 34px; --sz-doc-h: 44px;

  /* Layout: columns and measures. */
  --w-rail: 216px; --w-scenes: 200px; --w-notes: 248px; --w-dock: 320px; --w-notes-min: 208px; --w-notes-max: 480px; --w-dock-min: 264px; --w-dock-max: 640px; --w-desk-min: 480px;
  --w-lib: 1040px; --w-acct: 720px; --w-sheet: 920px; --w-field: 340px; --w-copy: 360px; --w-sheet-copy: 640px; --w-skel-set: 420px;
  --w-menu: 200px; --w-menu-wide: 280px; --w-menu-max: 320px; --w-select-max: 200px;
  --w-retry: 112px; --w-dialog: 512px; --w-dialog-wide: 640px; --h-dialog-wide: 640px; --w-toast: 440px; --w-toast-demo: 380px; --w-sheet-col: 320px; --w-sheet-trig: 200px;
  --bp-narrow: 860px; /* CSS cannot read a custom property inside @media, so a stylesheet repeats this number in its narrow-screen @media rule (and 960px, this plus 100px, in the failed-save top bar rule); a script that must tell a phone-width window reads this token */
  --msg-max: 90%;
  --w-pct: 48px;
  /* Focus writing (round 5): how much of the ink colour the lines you are not on keep (62% is the least that keeps script text at 4.5:1 on the page in day and in Night; 55% measured 3.8:1 and 3.7:1), and how long the faint controls stay after the pointer stops. --dur-hold is how long a note's line stays lit after a jump. Both are waits, not motion, so reduced motion leaves them alone. */
  --dim-ink: 62%; --dur-wake: 2600ms; --dur-hold: 1600ms; --dur-undo: 6000ms; --blur-glass: 12px;
  --z-raise: 1; --z-panel: 5; --z-pop: 70; --z-dialog: 80; --z-toast: 90;
  --op-disabled: 0.5; --op-dim: 0.4;

  /* Skeleton shapes: widths and heights by name, so loading blocks are on the same scale as everything else. */
  --sk-w-1: 32px; --sk-w-2: 72px; --sk-w-3: 40%; --sk-w-4: 60%; --sk-w-5: 80%; --sk-w-full: 100%;
  --sk-h-line: 12px; --sk-h-block: 64px;

  /* Motion (addendum 1): presses, menus and toasts 120 to 220 ms, dialogs and panels up to about 300 ms, no bounce.
     Numbers borrowed from Laper (laper.ai public stylesheet, read 2026-10-23): 150ms default with the standard curve, an expo-out for arrivals, the drawer curve for panels,
     the settle curve for empty states, menu pop 8px and scale .95, empty-state rise 6px, submenu slide 10px, a shimmer band 1.5s on loading blocks. Laper's 420ms empty-state rise is cut to 300 to stay inside the bound.
     From CODA: --dur-dialog is CODA's dialog (dialog.tsx:60), --ease-inout is Tailwind's default curve (button.tsx:8), exits are timers, never a wait for animationend (a Radix exit that waited for it left CODA's whole page dead to the mouse). Names and everything else are ours. */
  --dur-press: 120ms; --dur-color: 150ms; --dur-pop: 150ms; --dur-toast: 200ms; --dur-dialog: 200ms; --dur-state: 200ms; --dur-panel: 260ms; --dur-rise: 300ms;
  /* One rule for the whole set: a thing that leaves is faster than the same thing arriving (menu 150 in, 100 out; dialog and toast 200 in, 140 out; panel 260 in, 180 out). */
  --dur-pop-out: 100ms; --dur-exit: 140ms; --dur-panel-out: 180ms;
  --dur-stagger: 45ms; --dur-shimmer: 1500ms; --dur-loop: 1600ms; --dur-spin: 800ms;
  --dur-instant: 0s; /* the visibility switch of a fading thing: it flips at once on the way in and after the fade on the way out */
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); --ease-settle: cubic-bezier(0.22, 0.8, 0.36, 1);
  /* Scale: things arriving start at .95; every pressable thing shrinks to .98 on press; a Button grows to 1.02 on hover (pointer devices only). */
  --scale-pop: 0.95; --scale-press: 0.98; --scale-hover: 1.02; --dist-lift: 8px; --dist-rise: 6px; --dist-slide: 10px;
  --ring-inset: -2px;
}

/* Colour roles, CODA's values. Light is the default; night is a toggle. Names: surface, raised (bars, sections, menus), sunken (the desk), field, text, text-2 (a second line under the main one), muted, faint, rule, accent, teal, focus, success, danger, caution, primary.
   Structure is three tone steps (sunken, surface, raised) and one hairline per container (--c-rule), never a box in a box. A field's fill is the sunken tone and it reads by its edge, --bw of --c-rule-strong.
   --c-rule-strong (own values, lane V2) is the edge of a field or control: 3:1 or more against every tone a control sits on (surface, raised, sunken, field) in both themes. --c-rule is the decorative hairline and is not held to that.
   --c-faint is for marks and text of 18px or more only (under 3:1 on the light surface). --c-teal is CODA's second brand colour under its own name, so a control can read it without reading the focus role.
   Status colours come in two kinds. --c-success, --c-caution and --c-danger are fills and marks: a bar, a dot, an edge, a badge icon; never words. --c-success-text, --c-caution-text and --c-danger-text (own) are the words: 4.5:1 or more on the surface, the raised tone and their own wash (the fill at 10% over either), in both themes. Night's caution is already that bright, so its text colour is the same value.
   --c-primary and --c-on-primary are the filled main button: ink on paper by day, paper on ink by night. Night is CODA's blue-black; its text stays the warm paper ink. */
:root, html[data-theme="light"] {
  color-scheme: light;
  --c-surface: #F5EFE3; --c-raised: #FBF6EC; --c-sunken: #ECE4D5; --c-field: #ECE4D5;
  /* --c-muted (own value by day, lane V4) reads 4.5:1 or more on surface, raised and sunken and on the hover, tint and press washes over each (CODA's #6B6258 was 4.38 on the 9% tint over the surface). */
  --c-text: #26211C; --c-text-2: #4A443C; --c-muted: #615950; --c-faint: #948A7C;
  --c-rule: #D9CDBA; --c-rule-strong: #887D6D;
  /* --c-accent-ink (own) is the accent as a small icon or text on a panel: the plain pink reaches only about 3:1 on the light surface, so day uses a deeper pink (5.4:1 on the surface); night uses the plain pink, which already clears it. Checked by shell/test/node/look-a-tokens.test.ts. */
  --c-accent: #F43F8E; --c-on-accent: #151B22; --c-accent-ink: #B4236A;
  --c-teal: #0E7C86; --c-focus: #0E7C86; --c-success: #0E7C86; --c-success-text: #13686F;
  --c-danger: #E5484D; --c-danger-text: #B42327; --c-caution: #B36B00; --c-caution-text: #865309;
  --c-primary: #26211C; --c-on-primary: #FBF6EC;
  --c-page: #FFFDF8; --c-page-ink: #1B1B1F;
  --c-scrim: rgba(0, 0, 0, 0.5); --glass-mix: 86%;
  --c-row-hover: rgba(244, 63, 142, 0.05);
  /* Shadows: a menu or toast carries Tailwind's shadow-md and a dialog its shadow-lg, as CODA's kit does, tinted with the ink by day. */
  --sh-pop: 0 4px 6px -1px rgba(38, 33, 28, 0.1), 0 2px 4px -2px rgba(38, 33, 28, 0.1);
  --sh-dialog: 0 10px 15px -3px rgba(38, 33, 28, 0.1), 0 4px 6px -4px rgba(38, 33, 28, 0.1);
  --sh-lift: 0 1px 2px rgba(38, 33, 28, 0.14);
  --sh-page: 0 1px 2px rgba(38, 33, 28, 0.18), 0 8px 24px -12px rgba(38, 33, 28, 0.3);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --c-surface: #151B22; --c-raised: #1C242D; --c-sunken: #10151B; --c-field: #10151B;
  --c-text: #EFE9DC; --c-text-2: #C9C3B4; --c-muted: #9AA3AD; --c-faint: #6E7883;
  --c-rule: #2A333D; --c-rule-strong: #68727C;
  --c-accent: #FF5B9E; --c-on-accent: #151B22; --c-accent-ink: #FF5B9E;
  --c-teal: #2AA5AE; --c-focus: #2AA5AE; --c-success: #2AA5AE; --c-success-text: #44AEB4;
  --c-danger: #E5484D; --c-danger-text: #FF7A7E; --c-caution: #E8A33D; --c-caution-text: #E8A33D;
  --c-primary: #EFE9DC; --c-on-primary: #1C242D;
  --c-page: #F6F2EA; --c-page-ink: #1B1B1F;
  --c-scrim: rgba(0, 0, 0, 0.6); --glass-mix: 100%;
  --c-row-hover: rgba(255, 91, 158, 0.07);
  --sh-pop: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --sh-dialog: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --sh-lift: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-page: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}
/* Component states are colour mixes of the roles above, so they follow the theme. hover: a faint wash (CODA's 4%); press: a stronger one (own: CODA has no press state); the sunken variant is opaque because the element already has a fill. */
html {
  --c-hover: color-mix(in srgb, var(--c-text) 4%, transparent);
  --c-tint: color-mix(in srgb, var(--c-text) 9%, transparent);
  --c-press: color-mix(in srgb, var(--c-text) 10%, transparent);
  --c-primary-hover: color-mix(in srgb, var(--c-text) 90%, var(--c-surface));
  --c-danger-hover: color-mix(in srgb, var(--c-danger-text) 86%, var(--c-text));
  --c-track: color-mix(in srgb, var(--c-muted) 75%, var(--c-raised));
  --c-danger-wash: color-mix(in srgb, var(--c-danger) 10%, transparent);
  --c-danger-halo: color-mix(in srgb, var(--c-danger) 18%, transparent);
  --c-danger-field: color-mix(in srgb, var(--c-danger) 10%, var(--c-field));
  --c-placeholder: color-mix(in srgb, var(--c-text) 76%, var(--c-field));
  --c-accent-wash: color-mix(in srgb, var(--c-accent) 14%, transparent);
  --c-halo: color-mix(in srgb, var(--c-focus) 30%, transparent);
  --c-veil: color-mix(in srgb, var(--c-surface) 90%, transparent);
  /* Round 5: the frosted fill of the page indicator and the focus controls (text under them stays out of the way), and the script text of the lines you are not on in focus writing. --glass-mix (set per theme above) is how much of the raised tone the fill keeps: 86% in day, where the script shows faintly through; 100% (solid) in Night, because the pills float over the light page and any see-through dark fill lets it lighten the labels to 3:1 (round 5b). */
  --c-glass: color-mix(in srgb, var(--c-raised) var(--glass-mix), transparent);
  --c-page-dim: color-mix(in srgb, var(--c-page-ink) var(--dim-ink), var(--c-page));
  /* Field focus (round 2): the same 2px ring as every other focusable thing, drawn as a shadow so it follows the field, plus a soft glow (the glow is the Laper pattern). The field's edge does not change colour. */
  --sh-focus: 0 0 0 var(--ring-w) var(--c-focus), 0 0 var(--sp-3) var(--c-halo);
  --sh-focus-bad: 0 0 0 var(--ring-w) var(--c-danger), 0 0 var(--sp-3) var(--c-danger-halo);
  /* Loading blocks carry a light band that sweeps across. */
  --shimmer-band: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-text) 8%, transparent), transparent);
}

/* Touch screens, and any window narrow enough to be used like a phone: every control reaches 44px (the floor is 40). The width mirrors --bp-narrow, which CSS cannot read inside a media query. */
@media (pointer: coarse), (max-width: 860px) {
  :root { --h-md: 44px; --h-sm: 44px; --h-lg: 44px; --h-bar: 56px; --h-bar-sm: 48px; }
}

/* Reduced motion, as a CSS rule (round 2) so a system change in the middle of a session counts. The operating system's setting is the only switch: the product has no toggle, and motion is on by default (Eric 2026-10-24, the motion version).
   Presses, colours, panels and state changes become instant; menus, dialogs and toasts keep a plain fade with no movement or scaling.
   CODA's own rule makes every duration 0.01ms (theme.css:256-264); a short fade is kept here so a popup is not a flash. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-press: 0.01ms; --dur-color: 0.01ms; --dur-panel: 0.01ms; --dur-state: 0.01ms; --dur-stagger: 0.01ms;
    --dur-pop: 100ms; --dur-toast: 100ms; --dur-dialog: 100ms; --dur-exit: 100ms; --dur-pop-out: 100ms; --dur-rise: 100ms; --dur-panel-out: 0.01ms;
    --scale-pop: 1; --scale-press: 1; --scale-hover: 1; --dist-lift: 0px; --dist-rise: 0px; --dist-slide: 0px;
  }
}
