/* ---- tokens.css ---- */
/*
 * ETTARO landing v2 "LA NOTTE" — design tokens (docs/LANDING-V2-SPEC.md §1). GENERATED by apps/web/scripts/gen-era-tokens.py
 * from the spec tables; edit the tables there and re-run, so the two dark blocks stay identical.
 *
 * Rules: sections use tokens only (no literal colours). Every <section> carries data-hour="03|04|05|06|07|21" and
 * gets the full token set for that hour, so it is legible at rest with no JS. Night bands (03 04 05 21) stay night in
 * both themes; 06 and 07 follow the theme. Dark theme = @media (prefers-color-scheme: dark) on :root:not([data-theme="light"])
 * AND :root[data-theme="dark"]. No gradients anywhere. Red = "made the sheet", hectare numerals, CTA. Amber = warnings.
 * Sodium = agent traces, rail flashes, Rilievo matches only (never text < 18px on light bands).
 */

/* ------------------------------------------------------------------ base (07 GIORNO, light) */
:root{
  --bg:#E9EAE5;
  --panel:#F6F6F3;
  --panel-2:#DFE1DB;
  --ink:#111311;
  --ink-2:#4A4E49;
  --ink-3:#5E635C;
  --rule:#C9CCC5;
  --rule-strong:#8E928C;
  --red:#D7301C;
  --red-ink:#B3230F;
  --red-cta:#C52916;
  --red-cta-ink:#F6F6F3;
  --green:#1F9D5A;
  --green-ink:#136E3D;
  --amber:#C7850A;
  --amber-ink:#8A5A00;
  --blue:#2457D6;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.06;
  --horizon:#FF7A68;
  --hl:#DFE1DB;
  --t-ui:160ms; --t-draw:600ms; --t-snap:240ms;
  --ease:cubic-bezier(.2,0,0,1);
  --radius-card:2px;
  --gutter:max(16px, env(safe-area-inset-left, 0px));
  --gutter-r:max(16px, env(safe-area-inset-right, 0px));
  --col-gap:24px;
  --max:1280px;
  --bar-h:48px;
  --sec-pad:clamp(64px, calc(42.1px + 5.62vw), 112px);

  /* chrome sky (§1.4): JS writes these on <html> style; defaults = 03 NOTTE so the bar is legible without JS */
  --sky-bg:#0A0D0C; --sky-ink:#E4E8E2; --sky-ink-3:#8A9389; --sky-rule:#232A26; --sky-accent:#F2A33A; --sky-focus:#8FA8FF;

  /* type (§1.5) */
  --f-display:"Archivo","Arial Narrow","Helvetica Neue",Arial,sans-serif;
  --f-body:"Hanken Grotesk",Helvetica,Arial,sans-serif;
  --f-mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  /* fluid sizes: phone (390px) -> desktop (1280px) */
  --fs-time:clamp(64px, calc(39.46px + 6.292vw), 120px);
  --fs-h1:clamp(44px, calc(22.97px + 4.494vw), 80px);
  --fs-h2:clamp(32px, calc(21.48px + 2.697vw), 56px);
  --fs-fact:clamp(40px, calc(32.99px + 1.798vw), 56px);
  --fs-counter:clamp(22px, calc(17.62px + 1.124vw), 32px);
  --fs-close:clamp(24px, calc(20.49px + .899vw), 32px);
  --fs-ask:clamp(22px, calc(19.37px + .674vw), 28px);
  --fs-lede:clamp(17px, calc(14.81px + .562vw), 22px);
  --fs-body:clamp(16px, calc(15.56px + .112vw), 17px);
  --fs-quote:15px;
  --fs-mono:14px;
  --fs-label:13px;
  color-scheme:light;
}
@media (min-width:721px){ :root{ --gutter:max(24px, env(safe-area-inset-left, 0px)); --gutter-r:max(24px, env(safe-area-inset-right, 0px)); } }
@media (min-width:1100px){ :root{ --gutter:max(32px, env(safe-area-inset-left, 0px)); --gutter-r:max(32px, env(safe-area-inset-right, 0px)); } }

/* ------------------------------------------------------------------ base dark (block D, defined twice) */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0E100E;
    --panel:#171A17;
    --panel-2:#1F231F;
    --ink:#ECEDE8;
    --ink-2:#A3A9A0;
    --ink-3:#8A9088;
    --rule:#2B2F2B;
    --rule-strong:#4A504A;
    --red:#FF5A45;
    --red-ink:#FF7A68;
    --red-cta:#FF5A45;
    --red-cta-ink:#0E100E;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#6A8DFF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#FF7A68;
    --hl:#1F231F;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0E100E;
  --panel:#171A17;
  --panel-2:#1F231F;
  --ink:#ECEDE8;
  --ink-2:#A3A9A0;
  --ink-3:#8A9088;
  --rule:#2B2F2B;
  --rule-strong:#4A504A;
  --red:#FF5A45;
  --red-ink:#FF7A68;
  --red-cta:#FF5A45;
  --red-cta-ink:#0E100E;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#6A8DFF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#FF7A68;
  --hl:#1F231F;
  color-scheme:dark;
}

/* ------------------------------------------------------------------ hour bands, light theme (§1.3) */
/* 03 NOTTE */
[data-hour="03"]{
  --bg:#0A0D0C;
  --panel:#111513;
  --panel-2:#181D1A;
  --ink:#E4E8E2;
  --ink-2:#A3ABA1;
  --ink-3:#8A9389;
  --rule:#232A26;
  --rule-strong:#3E4741;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#2A2416;
  --hl:#181D1A;
  --land:#18201C;
  --coast:#5B6861;
  color-scheme:dark;
}
/* 04 SWEEP */
[data-hour="04"]{
  --bg:#0D1110;
  --panel:#141917;
  --panel-2:#1A201D;
  --ink:#E4E8E2;
  --ink-2:#A3ABA1;
  --ink-3:#8A9389;
  --rule:#26302B;
  --rule-strong:#414B45;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#3A2C14;
  --hl:#1A201D;
  color-scheme:dark;
}
/* 05 ORA BLU */
[data-hour="05"]{
  --bg:#131A1D;
  --panel:#1A2226;
  --panel-2:#212B30;
  --ink:#E1E6E3;
  --ink-2:#A6B1AF;
  --ink-3:#8E9A98;
  --rule:#2C373B;
  --rule-strong:#46525A;
  --red:#FF6A56;
  --red-ink:#FF6A56;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#4A3517;
  --hl:#212B30;
  color-scheme:dark;
}
/* 06 PRIMA LUCE */
[data-hour="06"]{
  --bg:#AAB9C2;
  --panel:#B9C6CD;
  --panel-2:#9DADB7;
  --ink:#111311;
  --ink-2:#253036;
  --ink-3:#35424A;
  --rule:#8FA0AA;
  --rule-strong:#55646D;
  --red:#8E1B0B;
  --red-ink:#8E1B0B;
  --red-cta:#8E1B0B;
  --red-cta-ink:#F6F6F3;
  --green:#094A29;
  --green-ink:#094A29;
  --amber:#5E4004;
  --amber-ink:#5E4004;
  --blue:#173B96;
  --sodium:#663C06;
  --pin-idle:#35424A;
  --contour-opacity:.07;
  --horizon:#8C4A30;
  --hl:#9DADB7;
  color-scheme:light;
}
/* 07 GIORNO */
[data-hour="07"]{
  --bg:#E9EAE5;
  --panel:#F6F6F3;
  --panel-2:#DFE1DB;
  --ink:#111311;
  --ink-2:#4A4E49;
  --ink-3:#5E635C;
  --rule:#C9CCC5;
  --rule-strong:#8E928C;
  --red:#D7301C;
  --red-ink:#B3230F;
  --red-cta:#C52916;
  --red-cta-ink:#F6F6F3;
  --green:#1F9D5A;
  --green-ink:#136E3D;
  --amber:#C7850A;
  --amber-ink:#8A5A00;
  --blue:#2457D6;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.06;
  --horizon:#FF7A68;
  --hl:#DFE1DB;
  --dawn-1:#B4C0C6; --dawn-2:#C2C9CA; --dawn-3:#D2D3CD; --dawn-4:#E2D8CB; --dawn-5:#F0D7C4; --dawn-6:#F5DCCB;
  color-scheme:light;
}
/* 21 SERA */
[data-hour="21"]{
  --bg:#161A18;
  --panel:#1D2220;
  --panel-2:#242A27;
  --ink:#E4E8E2;
  --ink-2:#A3A9A0;
  --ink-3:#8C9389;
  --rule:#2B312D;
  --rule-strong:#454C47;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#3A2C14;
  --hl:#242A27;
  --land:#252C28;
  --coast:#5E6A63;
  color-scheme:dark;
}

/* ------------------------------------------------------------------ hour bands, dark theme (defined twice) */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) [data-hour="03"]{
    --bg:#07090A;
    --panel:#0E1112;
    --panel-2:#151918;
    --ink:#E4E8E2;
    --ink-2:#A3ABA1;
    --ink-3:#8A9389;
    --rule:#232A26;
    --rule-strong:#3E4741;
    --red:#FF5A45;
    --red-ink:#FF5A45;
    --red-cta:#FF5A45;
    --red-cta-ink:#0A0D0C;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#8FA8FF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#2A2416;
    --hl:#151918;
    --land:#121816;
  --coast:#52605A;
  color-scheme:dark;
  }
  :root:not([data-theme="light"]) [data-hour="04"]{
    --bg:#090C0C;
    --panel:#101414;
    --panel-2:#171C1B;
    --ink:#E4E8E2;
    --ink-2:#A3ABA1;
    --ink-3:#8A9389;
    --rule:#26302B;
    --rule-strong:#414B45;
    --red:#FF5A45;
    --red-ink:#FF5A45;
    --red-cta:#FF5A45;
    --red-cta-ink:#0A0D0C;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#8FA8FF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#3A2C14;
    --hl:#171C1B;
    color-scheme:dark;
  }
  :root:not([data-theme="light"]) [data-hour="05"]{
    --bg:#0C1113;
    --panel:#131A1D;
    --panel-2:#1A2226;
    --ink:#E1E6E3;
    --ink-2:#A6B1AF;
    --ink-3:#8E9A98;
    --rule:#2C373B;
    --rule-strong:#46525A;
    --red:#FF6A56;
    --red-ink:#FF6A56;
    --red-cta:#FF5A45;
    --red-cta-ink:#0A0D0C;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#8FA8FF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#4A3517;
    --hl:#1A2226;
    color-scheme:dark;
  }
  :root:not([data-theme="light"]) [data-hour="06"]{
    --bg:#0F171B;
    --panel:#152025;
    --panel-2:#1B282E;
    --ink:#ECEDE8;
    --ink-2:#A3A9A0;
    --ink-3:#8A9088;
    --rule:#263339;
    --rule-strong:#435259;
    --red:#FF5A45;
    --red-ink:#FF7A68;
    --red-cta:#FF5A45;
    --red-cta-ink:#0E100E;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#6A8DFF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#5A3A2A;
    --hl:#1B282E;
    color-scheme:dark;
  }
  :root:not([data-theme="light"]) [data-hour="07"]{
    --bg:#15120E;
    --panel:#1E1A15;
    --panel-2:#26211B;
    --ink:#ECEDE8;
    --ink-2:#A9A59C;
    --ink-3:#908B82;
    --rule:#2E2922;
    --rule-strong:#4E4840;
    --red:#FF5A45;
    --red-ink:#FF7A68;
    --red-cta:#FF5A45;
    --red-cta-ink:#0E100E;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#6A8DFF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#FF5A45;
    --hl:#26211B;
    --dawn-1:#11191C; --dawn-2:#161A1A; --dawn-3:#1D1A17; --dawn-4:#271B14; --dawn-5:#351D13; --dawn-6:#3F1F13;
  color-scheme:dark;
  }
  :root:not([data-theme="light"]) [data-hour="21"]{
    --bg:#0B0E0D;
    --panel:#121614;
    --panel-2:#191E1B;
    --ink:#E4E8E2;
    --ink-2:#A3A9A0;
    --ink-3:#8C9389;
    --rule:#2B312D;
    --rule-strong:#454C47;
    --red:#FF5A45;
    --red-ink:#FF5A45;
    --red-cta:#FF5A45;
    --red-cta-ink:#0A0D0C;
    --green:#3ED48A;
    --green-ink:#3ED48A;
    --amber:#F0B429;
    --amber-ink:#F0B429;
    --blue:#8FA8FF;
    --sodium:#F2A33A;
    --pin-idle:#5C6660;
    --contour-opacity:.08;
    --horizon:#3A2C14;
    --hl:#191E1B;
    --land:#181E1B;
  --coast:#55615A;
  color-scheme:dark;
  }
}
:root[data-theme="dark"] [data-hour="03"]{
  --bg:#07090A;
  --panel:#0E1112;
  --panel-2:#151918;
  --ink:#E4E8E2;
  --ink-2:#A3ABA1;
  --ink-3:#8A9389;
  --rule:#232A26;
  --rule-strong:#3E4741;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#2A2416;
  --hl:#151918;
  --land:#121816;
  --coast:#52605A;
  color-scheme:dark;
}
:root[data-theme="dark"] [data-hour="04"]{
  --bg:#090C0C;
  --panel:#101414;
  --panel-2:#171C1B;
  --ink:#E4E8E2;
  --ink-2:#A3ABA1;
  --ink-3:#8A9389;
  --rule:#26302B;
  --rule-strong:#414B45;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#3A2C14;
  --hl:#171C1B;
  color-scheme:dark;
}
:root[data-theme="dark"] [data-hour="05"]{
  --bg:#0C1113;
  --panel:#131A1D;
  --panel-2:#1A2226;
  --ink:#E1E6E3;
  --ink-2:#A6B1AF;
  --ink-3:#8E9A98;
  --rule:#2C373B;
  --rule-strong:#46525A;
  --red:#FF6A56;
  --red-ink:#FF6A56;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#4A3517;
  --hl:#1A2226;
  color-scheme:dark;
}
:root[data-theme="dark"] [data-hour="06"]{
  --bg:#0F171B;
  --panel:#152025;
  --panel-2:#1B282E;
  --ink:#ECEDE8;
  --ink-2:#A3A9A0;
  --ink-3:#8A9088;
  --rule:#263339;
  --rule-strong:#435259;
  --red:#FF5A45;
  --red-ink:#FF7A68;
  --red-cta:#FF5A45;
  --red-cta-ink:#0E100E;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#6A8DFF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#5A3A2A;
  --hl:#1B282E;
  color-scheme:dark;
}
:root[data-theme="dark"] [data-hour="07"]{
  --bg:#15120E;
  --panel:#1E1A15;
  --panel-2:#26211B;
  --ink:#ECEDE8;
  --ink-2:#A9A59C;
  --ink-3:#908B82;
  --rule:#2E2922;
  --rule-strong:#4E4840;
  --red:#FF5A45;
  --red-ink:#FF7A68;
  --red-cta:#FF5A45;
  --red-cta-ink:#0E100E;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#6A8DFF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#FF5A45;
  --hl:#26211B;
  --dawn-1:#11191C; --dawn-2:#161A1A; --dawn-3:#1D1A17; --dawn-4:#271B14; --dawn-5:#351D13; --dawn-6:#3F1F13;
  color-scheme:dark;
}
:root[data-theme="dark"] [data-hour="21"]{
  --bg:#0B0E0D;
  --panel:#121614;
  --panel-2:#191E1B;
  --ink:#E4E8E2;
  --ink-2:#A3A9A0;
  --ink-3:#8C9389;
  --rule:#2B312D;
  --rule-strong:#454C47;
  --red:#FF5A45;
  --red-ink:#FF5A45;
  --red-cta:#FF5A45;
  --red-cta-ink:#0A0D0C;
  --green:#3ED48A;
  --green-ink:#3ED48A;
  --amber:#F0B429;
  --amber-ink:#F0B429;
  --blue:#8FA8FF;
  --sodium:#F2A33A;
  --pin-idle:#5C6660;
  --contour-opacity:.08;
  --horizon:#3A2C14;
  --hl:#191E1B;
  --land:#181E1B;
  --coast:#55615A;
  color-scheme:dark;
}

/* ------------------------------------------------------------------ every hour band paints itself (no JS needed) */
[data-hour]{ background:var(--bg); color:var(--ink); }


/* ---- base.css ---- */
/*
 * ETTARO landing v2 — frame CSS: reset, layout grid, type scale, buttons, fields, chips, utilities, focus, motion, print.
 * Frame classes are prefixed `era-`. Section classes are prefixed with the section id (`notte-…`, `sweep-…`).
 * Tokens only: no literal colours below this line (tokens.css owns every hex).
 * No gradients, no shadows, no blur, no pills, no emoji, no centred layouts. Radius: 2px on cards, 0 elsewhere.
 */

/* ------------------------------------------------------------------ metric-matched fallbacks (CLS < 0.05) */
@font-face { font-family: "Archivo Fallback"; src: local("Arial Narrow"), local("ArialNarrow"), local("Arial"); size-adjust: 96%; ascent-override: 92%; descent-override: 22%; }
@font-face { font-family: "Hanken Fallback"; src: local("Helvetica Neue"), local("Helvetica"), local("Arial"); size-adjust: 98%; ascent-override: 98%; descent-override: 26%; }
@font-face { font-family: "Geist Mono Fallback"; src: local("SF Mono"), local("Menlo"), local("Consolas"), local("Courier New"); size-adjust: 100%; }
:root {
  --f-display: "Archivo", "Archivo Fallback", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Hanken Grotesk", "Hanken Fallback", Helvetica, Arial, sans-serif;
  --f-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: 56px;
  background: var(--sky-bg);          /* overscroll colour follows the night (runtime writes --sky-bg) */
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
/* The reset carries ZERO specificity (:where), so any single class (.era-btn--cta, .bar-clock, .price-dag…) wins over it. */
:where(.era) :where(img, svg, canvas, video) { display: block; max-width: 100%; }
:where(.era) :where(p, h1, h2, h3, h4, dl, dd, ol, ul, figure, blockquote) { margin: 0; }
:where(.era) :where(ol, ul) { padding: 0; list-style: none; }
:where(.era) :where(strong, b) { font-weight: 500; }
:where(.era) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.era) :where(button) { cursor: pointer; }
:where(.era) :where(a) { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(.era) :where(a:hover) { text-decoration-thickness: 2px; }
:where(.era) :where(table) { border-collapse: collapse; }
.era [hidden] { display: none !important; }
.era ::selection { background: var(--ink); color: var(--bg); }
.era :focus { outline: none; }
.era :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ------------------------------------------------------------------ page frame */
.era { position: relative; min-height: 100vh; min-height: 100svh; background: var(--bg); color: var(--ink); }
.era-main { display: block; }

/* every hour band: a full-bleed plate with a 1px horizon rule on top (dawn in dark theme) */
.era-sec {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid var(--horizon);
  padding-block: var(--sec-pad);
  scroll-margin-top: 56px;
}
.era-sec[data-hour="07"] + .era-sec[data-hour="07"],
.era-sec[data-hour="07"] + .era-foot[data-hour="07"] { --horizon: var(--rule); }
.era-sec--flush { padding-block: 0; }

.era-wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) + var(--gutter-r));
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* 12-column grid (1280 max, 24px gutters); one column at <= 720px */
.era-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 32px; align-items: start; }
.era-grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 721px) {
  .era-span-1-4 { grid-column: 1 / 5; }   .era-span-5-12 { grid-column: 5 / 13; }
  .era-span-1-5 { grid-column: 1 / 6; }   .era-span-6-12 { grid-column: 6 / 13; }
  .era-span-1-6 { grid-column: 1 / 7; }   .era-span-7-12 { grid-column: 7 / 13; }
  .era-span-1-7 { grid-column: 1 / 8; }   .era-span-8-12 { grid-column: 8 / 13; }
  .era-span-5-11 { grid-column: 5 / 12; }
  .era-span-full { grid-column: 1 / -1; }
}
/* stack under 1024 too (hero, foglio): copy above, instrument full width */
@media (min-width: 721px) and (max-width: 1023px) {
  .era-grid--stack-md > * { grid-column: 1 / -1; }
}

.era-stack > * + * { margin-top: var(--stack, 24px); }
.era-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

/* ------------------------------------------------------------------ type (§1.5) */
.era-time {
  font-family: var(--f-display); font-stretch: 62%; font-weight: 600; font-size: var(--fs-time);
  letter-spacing: -0.04em; line-height: .9; font-variant-numeric: tabular-nums;
}
.era-h1 {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-h1);
  letter-spacing: -0.025em; line-height: .95; text-wrap: balance;
}
.era-h1 > span { display: block; }
.era-h2 {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-h2);
  letter-spacing: -0.025em; line-height: 1; text-wrap: balance; max-width: 22ch;
}
.era-fact {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-fact);
  letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.era-close {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-close);
  letter-spacing: -0.02em; line-height: 1.05;
}
.era-counter { font-family: var(--f-mono); font-weight: 500; font-size: var(--fs-counter); line-height: 1; font-variant-numeric: tabular-nums slashed-zero; }
.era-label {
  font-family: var(--f-display); font-stretch: 75%; font-weight: 600; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; color: var(--ink-2);
}
.era-verb {
  font-family: var(--f-display); font-stretch: 62%; font-weight: 600; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: .06em; line-height: 1.2;
}
.era-lede { font-family: var(--f-body); font-size: var(--fs-lede); line-height: 1.45; max-width: 52ch; color: var(--ink); text-wrap: pretty; }
.era-body { font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.5; max-width: 64ch; text-wrap: pretty; }
.era-quote { font-family: var(--f-body); font-size: var(--fs-quote); line-height: 1.45; color: var(--ink-2); }
.era-quote::before { content: "⌜"; color: var(--red); margin-right: 2px; }
.era-quote::after { content: "⌟"; color: var(--red); margin-left: 2px; }
.era-mono { font-family: var(--f-mono); font-size: var(--fs-mono); line-height: 1.5; font-variant-numeric: tabular-nums slashed-zero; }
.era-mono-sm { font-family: var(--f-mono); font-size: var(--fs-label); line-height: 1.45; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: .01em; }
.era-caps { text-transform: uppercase; letter-spacing: .06em; }
/* the ONE metadata label: mono 13px caps +.06em (section labels stay condensed Archivo, .era-label) */
.era-meta { font: 500 var(--fs-label)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; font-variant-numeric: tabular-nums slashed-zero; }
/* captions and micro-copy: body face, 14px, never caps */
.era-meta-lc { font: 400 14px/1.5 var(--f-body); letter-spacing: 0; text-wrap: pretty; }
.era-num { font-variant-numeric: tabular-nums slashed-zero; }
.era-nw { white-space: nowrap; }

.era-ink-2 { color: var(--ink-2); }
.era-ink-3 { color: var(--ink-3); }
.era-red { color: var(--red-ink); }          /* red text < 22px */
.era-red-big { color: var(--red); }          /* red numerals >= 22px */
.era-ok { color: var(--green-ink); }
.era-warn { color: var(--amber-ink); }

/* section head: label, H2, lede */
.era-head { display: grid; gap: 20px; margin-bottom: 48px; }
.era-head .era-lede { color: var(--ink-2); }

/* ------------------------------------------------------------------ controls */
.era-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px;
  min-height: 48px; padding: 12px 18px;
  font: 500 16px/1.2 var(--f-body);
  border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease);
}
.era-btn:hover { text-decoration: none; }
.era-btn[disabled] { cursor: default; opacity: .55; }
.era-btn--cta { background: var(--red-cta); color: var(--red-cta-ink); border-color: var(--red-cta); }
.era-btn--cta:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.era-btn--line { border-color: var(--ink-3); color: var(--ink); }
.era-btn--line:hover { border-color: var(--ink); }
.era-btn--text { min-height: 44px; padding: 10px 0; border: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.era-btn--text:hover { text-decoration-thickness: 2px; }
.era-btn--sm { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.era-btn--mono { font: 500 var(--fs-label)/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }

.era-field {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 16px/1.2 var(--f-body);
  color: var(--ink); background: var(--panel); border: 1px solid var(--ink-3); border-radius: 0;
}
.era-field::placeholder { color: var(--ink-3); opacity: 1; }
.era-field:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-color: var(--ink); }

/* segmented switch (aria-pressed buttons): square, 1px outline, the pressed one inverts */
.era-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink-3); }
.era-seg > button {
  min-height: 36px; padding: 7px 12px; border: 0; background: transparent; color: var(--ink-2);
  font: 500 var(--fs-label)/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
}
.era-seg > button + button { border-left: 1px solid var(--ink-3); }
.era-seg > button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* status chip: square, 1px, mono, the word always printed (colour never alone) */
.era-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px;
  font: 500 var(--fs-label)/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border: 1px solid currentColor; color: var(--ink-2);
}
.era-chip--ok { color: var(--green-ink); }
.era-chip--warn { color: var(--amber-ink); }
.era-chip--fail { color: var(--ink-3); border-style: dashed; }
.era-chip--print { color: var(--red-ink); }

/* wells and rules */
.era-well { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-card); }
.era-well--2 { background: var(--panel-2); }
.era-rule { height: 0; border: 0; border-top: 1px solid var(--rule); margin: 0; }
.era-rule--strong { border-top-color: var(--rule-strong); }

/* shared tooltip (ctx.tip): mono 13, panel, 1px rule-strong, follows the section's hour tokens */
.era-tip {
  position: fixed; z-index: 60; left: 0; top: 0; max-width: min(340px, calc(100% - 32px));
  padding: 8px 10px; pointer-events: none;
  font: 400 var(--fs-label)/1.45 var(--f-mono); font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--panel); border: 1px solid var(--rule-strong); border-radius: var(--radius-card);
}
.era-tip[data-interactive] { pointer-events: auto; }

/* ------------------------------------------------------------------ utilities */
.sr-only, .era-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.era-skip {
  position: absolute; left: var(--gutter); top: 8px; z-index: 100; padding: 10px 14px;
  background: var(--ink); color: var(--bg); font: 500 14px/1 var(--f-mono); transform: translateY(-200%);
}
.era-skip:focus-visible { transform: none; }
.era-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.era-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* placeholder for sections still being built in parallel */
.era-placeholder { border: 1px dashed var(--rule-strong); padding: 24px; color: var(--ink-3); }

/* ------------------------------------------------------------------ shared email capture (EraCapture) */
.era-capture { display: grid; gap: 12px; max-width: 560px; }
.era-capture-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.era-capture-result { font: 400 var(--fs-label)/1.45 var(--f-mono); color: var(--ink-2); }
.era-capture-result[data-tone="error"] { color: var(--amber-ink); }
.era-capture-alt { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
@media (max-width: 560px) {
  .era-capture-row { grid-template-columns: 1fr; }
  .era-capture-row .era-btn { width: 100%; }
  /* Italian and Spanish labels run 15–30% longer: on a phone a button may take a second line instead of overflowing */
  .era-btn { white-space: normal; max-width: 100%; }
}

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  .era *, .era *::before, .era *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
html.era-rm .era *, html.era-rm .era *::before, html.era-rm .era *::after { animation: none !important; transition: none !important; }

/* ------------------------------------------------------------------ print: everything, unclipped */
@media print {
  html, body, .era, .era-sec, [data-hour] { background: #fff !important; color: #000 !important; }
  .era-bar { position: static !important; }
  .era [data-print-show], .era [data-print-show][hidden] { display: revert !important; }
  .era [style*="clip-path"] { clip-path: none !important; }
  .era canvas { display: none !important; }
  .era [data-canvas-fallback][hidden] { display: block !important; }
}

/* ---- sections/bar.css ---- */
/* bar — sticky 48px night clock. Colours: chrome sky tokens only (--sky-*), CTA from the 07 tokens via --red-cta. */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  background: var(--sky-bg); color: var(--sky-ink); border-bottom: 1px solid var(--sky-rule);
  --blue: var(--sky-focus);
}
.bar-in {
  position: relative; height: 100%; display: flex; align-items: center; gap: 16px;
  max-width: calc(var(--max) + var(--gutter) + var(--gutter-r)); margin-inline: auto;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
.bar-mark {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none;
  font: 500 17px/1 var(--f-display); font-stretch: 125%; letter-spacing: .02em; color: var(--sky-ink);
}
.bar-glyph { color: var(--sky-ink); }
.bar-nav { display: none; gap: 16px; font: 400 var(--fs-label)/1 var(--f-mono); letter-spacing: .02em; }
.bar-nav a, .bar-menu nav a { text-decoration: none; color: var(--sky-ink); white-space: nowrap; }
.bar-nav a:hover, .bar-menu nav a:hover { text-decoration: underline; }
.bar-n { color: var(--sky-ink-3); }
.bar .bar-clock {
  margin: 0 0 0 auto; min-width: 9ch; flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 400 var(--fs-label)/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; color: var(--sky-ink);
}
.bar-time { color: var(--sky-ink); }
.bar-cet, .bar-coords { color: var(--sky-ink-3); }
.bar-coords { display: none; }
.bar-theme {
  display: none; align-items: center; gap: 4px; min-height: 32px; padding: 4px 8px;
  border: 1px solid var(--sky-rule); background: transparent; color: var(--sky-ink-3);
  font: 500 var(--fs-label)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .04em;
}
.bar-theme[data-state="night"] .bar-theme-n, .bar-theme[data-state="day"] .bar-theme-d { color: var(--sky-ink); text-decoration: underline; text-underline-offset: 3px; }
.bar-link { display: none; padding: 12px 2px; margin: -12px 0; font: 400 var(--fs-label)/1 var(--f-mono); color: var(--sky-ink); text-decoration: none; white-space: nowrap; }
.bar-link:hover { text-decoration: underline; }
.bar-sub { flex: none; background: var(--red-cta); color: var(--red-cta-ink); border-color: var(--red-cta); }
.bar-sub:hover { background: var(--sky-ink); border-color: var(--sky-ink); color: var(--sky-bg); }

.bar-menu { position: static; flex: none; }
.bar-menu-btn {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 4px;
  font: 500 var(--fs-label)/1 var(--f-mono); letter-spacing: .06em; color: var(--sky-ink);
}
.bar-menu-btn::-webkit-details-marker { display: none; }
.bar-menu[open] .bar-menu-btn { text-decoration: underline; text-underline-offset: 3px; }
.bar-menu-panel {
  position: absolute; left: 0; right: 0; top: calc(var(--bar-h) - 1px);
  padding: 8px var(--gutter-r) 16px var(--gutter);
  background: var(--sky-bg); border-bottom: 1px solid var(--sky-rule); border-top: 1px solid var(--sky-rule);
}
.bar-menu-panel nav { display: grid; }
.bar-menu-panel nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--sky-rule); font: 400 14px/1.2 var(--f-mono); }
.bar-menu-foot { display: flex; gap: 16px; align-items: center; padding-top: 12px; }
.bar-menu-foot .bar-theme, .bar-menu-foot .bar-link { display: inline-flex; }

/* IT · ES · EN: inline from 900px; in the MENU panel below (no layout change at 390px) */
.bar-lang { display: none; align-items: center; flex: none; font: 400 var(--fs-label)/1 var(--f-mono); letter-spacing: .04em; }
.bar-lang-i { display: inline-flex; align-items: center; }
.bar-lang a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 3px; color: var(--sky-ink-3); text-decoration: none; }
.bar-lang a:hover { color: var(--sky-ink); text-decoration: underline; }
.bar-lang a[aria-current] { color: var(--sky-ink); text-decoration: underline; text-underline-offset: 3px; }
.bar-lang-sep { color: var(--sky-ink-3); }
.bar-menu-foot .bar-lang--menu { display: inline-flex; margin-left: auto; }
.bar-menu-foot .bar-lang--menu a { min-height: 40px; padding: 0 6px; }

.bar-progress {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--sky-accent);
  transform: scaleX(0); transform-origin: 0 50%;
}

@media (min-width: 560px) { .bar-link:not(.bar-link--menu) { display: inline; } }
@media (min-width: 900px) {
  .bar-coords { display: inline; }
  /* the signature readout gets a fixed measure: "07:00 ITALY · ≈ 46.06 N · 11.24 E · PERGINE VALSUGANA" */
  .bar-clock { flex: 0 1 54ch; width: 54ch; min-width: 34ch; max-width: none; }
  .bar-theme:not(.bar-theme--menu) { display: inline-flex; }
  .bar-menu-foot .bar-theme, .bar-menu-foot .bar-link { display: none; }
  .bar-lang--bar { display: inline-flex; }
  .bar-menu-foot .bar-lang--menu { display: none; }
}
/* 1180–1519: the nav prints its numbers only; the label opens under the number on hover and focus */
@media (min-width: 1180px) {
  .bar-nav { display: flex; gap: 2px; flex: none; }
  .bar-menu { display: none; }
  .bar-nav a { position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; }
  .bar-nav .bar-n { color: var(--sky-ink); }
  .bar-nav .bar-l {
    position: absolute; left: 0; top: calc(100% + 8px); padding: 6px 8px; white-space: nowrap;
    background: var(--sky-bg); color: var(--sky-ink); border: 1px solid var(--sky-rule);
    clip-path: inset(0 0 100% 0);
  }
  .bar-nav a:hover .bar-l, .bar-nav a:focus-visible .bar-l { clip-path: none; }
}
@media (min-width: 1520px) {
  .bar-nav { gap: 14px; }
  .bar-nav a { padding: 0; }
  .bar-nav .bar-n { color: var(--sky-ink-3); }
  .bar-nav .bar-l { position: static; padding: 0; border: 0; background: none; clip-path: none; margin-left: .5ch; }
}
@media (max-width: 400px) { .bar-in { gap: 10px; } .bar-mark { font-size: 15px; } }
@media (max-width: 359px) {
  .bar-in { gap: 8px; }
  .bar-mark { font-size: 14px; gap: 6px; }
}
@media (max-width: 339px) {
  .bar .bar-mark { font-size: 0; gap: 0; }   /* the glyph alone; the link keeps its aria-label */
  .bar-cet { display: none; }
  .bar-sub { padding-inline: 10px; }
  .bar-clock { min-width: 5ch; }
}

/* ---- sections/notte.css ---- */
/*
 * 01 notte — hero + the night instrument (spec §3 01, §4). Tokens only; every class prefixed `notte-`.
 * At rest (no JS) the stage shows the server SVG of t = 240 (Italy at 07:00); the client adds a canvas on top and sets
 * [data-notte-live] on the stage, which retires the SVG. The stage is Italy alone: copy left, map right at viewport height.
 */

.notte { --notte-inset: 6px; overflow: clip; }
.era-sec.notte { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 6vw, 88px); }
.notte-wrap { position: relative; }

/* ------------------------------------------------------------------ grid: copy | instrument */
.notte-grid { row-gap: 40px; }
.notte-copy, .notte-inst { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .notte-copy { grid-column: 1 / 7; padding-top: 12px; }
  .notte-inst { grid-column: 7 / 13; }
  .notte-scrub { margin-left: auto; }
}

/* ------------------------------------------------------------------ copy */
.notte-eyebrow { color: var(--ink-3); }
.notte .notte-h1 { margin-top: 24px; }
.notte-nw { white-space: nowrap; }
.notte-h1 > span + span { color: var(--ink); }
.notte .notte-lede { margin-top: 28px; }
.notte-capture { margin-top: 32px; }
.notte-alt { gap: 8px 20px; }
.notte .notte-trial { color: var(--ink); }
.notte-read { color: var(--ink); }
.notte .notte-micro { margin-top: 14px; color: var(--ink-2); max-width: 60ch; }
.notte .notte-describe { margin-top: 14px; font: 500 var(--fs-body)/1.4 var(--f-body); }
.notte-describe a { color: var(--ink); text-decoration-color: var(--sodium); text-decoration-thickness: 2px; text-underline-offset: 5px; display: inline-block; padding: 8px 0; }
.notte .notte-disc { margin-top: 10px; color: var(--ink-3); max-width: 60ch; }

@media (min-width: 1024px) and (max-width: 1279px) {
  .notte-capture .era-capture-row { grid-template-columns: minmax(0, 1fr); }
  .notte-capture .era-capture-row .era-btn { width: 100%; }
}

/* ------------------------------------------------------------------ instrument head: readout + counters on one line */
.notte-inst { position: relative; min-width: 0; }
.notte-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 28px;
  padding-bottom: 14px;
}
.notte-readout { display: flex; align-items: flex-start; gap: 6px; }
.notte-time { color: var(--ink); white-space: nowrap; }
@media (min-width: 1024px) { .notte-head { justify-content: space-between; } }
.notte-cet { color: var(--ink-3); padding-top: .4em; }
.notte-ctrs { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-bottom: 6px; }
.notte-ctr { min-width: 0; }
.notte .notte-ctr-l { font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); margin-bottom: 6px; white-space: nowrap; }
.notte .notte-ctr-v { color: var(--ink); white-space: nowrap; margin: 0; }
.notte-ctr--printed .notte-ctr-v { color: var(--red); }
.notte-ctr--swept .notte-ctr-v { color: var(--ink-2); }
.notte .notte-dag {
  display: inline-flex; align-items: flex-start; justify-content: center; min-width: 24px; min-height: 24px; margin: -4px -6px 0 0;
  color: var(--ink-3); text-decoration: none; font-size: var(--fs-label); vertical-align: top;
}
.notte-dag:hover { color: var(--ink); }

/* ------------------------------------------------------------------ the map: horizon rule, stage at viewport height */
.notte-map { border-top: 1px solid var(--red); padding-top: 10px; }
.notte-scrub {
  position: relative; --p: 1;
  width: min(100%, max(380px, calc((100svh - 220px) * var(--arw, 889) / var(--arh, 1056))));
}
@media (max-width: 1023px) { .notte-scrub { width: 100%; } }
.notte-stage {
  position: relative; width: 100%;
  aspect-ratio: var(--arw) / var(--arh);
  overflow: hidden;
  container: notte-stage / inline-size;
  touch-action: manipulation;
}
.notte-stage[data-notte-hot] { cursor: pointer; }
.notte-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.notte .notte-svg--narrow { display: none; }
.notte .notte-stage[data-notte-live] .notte-svg { display: none; }
.notte-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* server SVG marks (t = 240) — the canvas draws the same geometry with the same tokens */
.notte-s-nb { fill: none; stroke: var(--rule); }
.notte-s-coast { fill: var(--land, var(--panel)); stroke: var(--coast, var(--rule-strong)); fill-rule: evenodd; }
.notte-s-halo { fill: var(--sodium); fill-opacity: .18; }
.notte-s-ring { fill: none; stroke-width: 1px; }
.notte-s-ring--ok { stroke: var(--green); }
.notte-s-ring--warn { stroke: var(--amber); }
.notte-s-ring--gone { stroke: var(--rule-strong); stroke-dasharray: 2 2; }
.notte-s-bar { fill: none; stroke-width: 1.5px; }
.notte-s-bar--lo { stroke: var(--ink-3); stroke-opacity: .7; }
.notte-s-bar--hi { stroke: var(--ink-2); }
.notte-s-pin { fill: var(--ink); }
.notte-s-five-bar { fill: none; stroke: var(--red); stroke-width: 2px; }
.notte-s-five-ring { fill: none; stroke: var(--red); stroke-width: 1.5px; }
.notte-s-five-pin { fill: var(--red); }

/* seas: decorative captions on the water */
.notte-seas { position: absolute; inset: 0; pointer-events: none; }
.notte-sea {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font: 400 var(--fs-label)/1 var(--f-mono); letter-spacing: .24em; color: var(--ink-3);
}
@container notte-stage (max-width: 520px) { .notte-sea { letter-spacing: .12em; } }

/* DOM overlay: numerals of the five, GONE, the flag, the focus square */
.notte-num, .notte-gone {
  position: absolute; left: var(--x); top: var(--y);
  font: 500 var(--fs-label)/1 var(--f-mono); font-variant-numeric: tabular-nums;
}
.notte-num { transform: translate(10px, -50%); color: var(--red-ink); padding: 2px 4px; background: var(--bg); }
.notte-gone { transform: translate(-50%, 9px); color: var(--ink-3); letter-spacing: .04em; pointer-events: none; }

/* the plate: top-right of the stage (over Slovenia and the northern Adriatic, where Italy has no land) */
.notte-plate, .notte-run {
  position: absolute; right: 0; top: 0; margin: 0;
  display: grid; gap: 4px; justify-items: end; text-align: right;
  font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .06em; font-variant-numeric: tabular-nums slashed-zero;
  pointer-events: none;
}
.notte-plate { padding: 10px 12px; border: 1px solid var(--red); background: var(--bg); color: var(--ink-2); }
.notte-plate-k { color: var(--ink); }
.notte-plate-s { color: var(--red-ink); }
.notte-plate:not([data-done]) { border-color: var(--rule-strong); }
.notte-plate:not([data-done]) .notte-plate-s { color: var(--ink-3); }
.notte-run { top: 0; padding: 10px 12px; color: var(--sodium); border: 1px solid var(--rule-strong); background: var(--bg); }
.notte-run[hidden] { display: none; }

.notte-flag {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  width: max-content; max-width: min(34ch, 62%);
  padding: 8px 10px 9px; background: var(--panel); border: 1px solid var(--rule-strong); border-left: 2px solid var(--sodium);
  border-radius: var(--radius-card);
}
.notte-flag[data-tone="warn"], .notte-flag[data-tone="gone"] { border-left-color: var(--amber); }
.notte-flag-h { font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; text-transform: uppercase; }
.notte-flag-h b { font-weight: 500; color: var(--ink); }
.notte-flag-h i { font-style: normal; color: var(--green-ink); }
.notte-flag[data-tone="warn"] .notte-flag-h i { color: var(--amber-ink); }
.notte-flag[data-tone="gone"] .notte-flag-h i { color: var(--ink-3); }
.notte-flag .era-quote { display: block; font-size: var(--fs-quote); color: var(--ink); }

.notte-focus { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid var(--blue); pointer-events: none; z-index: 3; }

/* ------------------------------------------------------------------ the tape (role=slider) and the handle */
.notte-tape {
  position: relative; height: 58px; margin-top: 10px;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  color: var(--ink-3);
}
.notte-tape:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.notte-ticks { position: absolute; left: var(--notte-inset); right: var(--notte-inset); top: 0; width: auto; height: 14px; overflow: visible; }
.notte-ticks path { fill: none; stroke: var(--ink-3); stroke-width: 1px; }
.notte-ticks .notte-ticks-line { stroke: var(--rule-strong); }
.notte-hour, .notte-phase { position: absolute; left: calc(var(--notte-inset) + (100% - 2 * var(--notte-inset)) * var(--a)); }
.notte-hour { top: 16px; transform: translateX(var(--tx, -50%)); color: var(--ink-2); font: 400 var(--fs-label)/1 var(--f-mono); }
.notte-phase {
  top: 34px; width: calc((100% - 2 * var(--notte-inset)) * (var(--b) - var(--a)));
  padding-top: 7px; color: var(--ink-3); white-space: nowrap;
  font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em;
}
.notte-phase::before { content: ""; position: absolute; left: 1px; right: 1px; top: 0; height: 4px; border: 1px solid currentColor; border-bottom: 0; }
.notte-phase-n { display: block; }
.notte-phase[data-notte-ph="write"] > span { display: flex; justify-content: flex-end; }
.notte-phase[data-on] { color: var(--ink); }
.notte-cap {
  position: absolute; top: -4px; left: calc(var(--notte-inset) + (100% - 2 * var(--notte-inset)) * var(--p));
  width: 9px; height: 9px; margin-left: -4px; background: var(--ink);
}
.notte-tape:focus-visible .notte-cap { background: var(--blue); }
.notte-handle {
  position: absolute; bottom: 0; height: 58px; width: 1px; pointer-events: none;
  left: calc(var(--notte-inset) + (100% - 2 * var(--notte-inset)) * var(--p));
  background: var(--ink); opacity: .5;
}
.notte-scrub[data-notte-drag] .notte-handle, .notte-scrub[data-notte-drag] .notte-cap { background: var(--sodium); opacity: 1; }

/* ------------------------------------------------------------------ controls, the five, legend, caption */
.notte-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 4px; }
.notte-play { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; }
.notte-play[aria-pressed="true"] { border-color: var(--sodium); }
.notte-help { color: var(--ink-3); }
html:not(.era-js) .notte-ctl, html:not(.era-js) .notte-pins { display: none; }

.notte-five { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); font: 400 var(--fs-label)/1.3 var(--f-mono); }
.notte-five a { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 0; text-decoration: none; color: var(--ink-2); }
.notte-five a:hover .notte-five-c { text-decoration: underline; }
.notte-five-n { color: var(--red-ink); font-weight: 500; }
.notte-five-c { color: var(--ink); }
.notte-five-m { color: var(--ink-3); }

.notte-legend { margin-top: 12px; display: grid; gap: 8px; color: var(--ink-2); }
.notte-key { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.notte-key > span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.notte-k { display: inline-block; flex: none; width: 12px; height: 12px; position: relative; }
.notte-k--trace { height: 0; border-top: 2px solid var(--sodium); }
.notte-k--halo { border-radius: 50%; background: var(--sodium); opacity: .55; }
.notte-k--ok { border: 1px solid var(--green); border-radius: 50%; }
.notte-k--warn { border: 1px solid var(--amber); border-radius: 50%; }
.notte-k--gone { border: 1px dashed var(--ink-3); border-radius: 50%; }
.notte-k--bar { width: 2px; background: var(--ink-2); margin-inline: 5px; }
.notte-k--five { width: 7px; height: 7px; margin-inline: 3px; background: var(--red); border-radius: 50%; }
.notte-cap-t { color: var(--ink-3); max-width: 88ch; }

/* Italian and Spanish counter labels are longer (RICONTROLLATI, APROBADOS 6+): on a phone the four stay on one row */
@media (max-width: 440px) {
  html:lang(it) .notte-ctrs, html:lang(es) .notte-ctrs { column-gap: 12px; }
  html:lang(it) .notte .notte-ctr-l, html:lang(es) .notte .notte-ctr-l { letter-spacing: 0; }
}

/* ------------------------------------------------------------------ narrow layout (≤ 720px): same stage, bigger marks */
@media (max-width: 720px) {
  .notte-grid { row-gap: 40px; }
  .notte-head { gap: 10px 18px; }
  .notte-ctrs { gap: 8px 18px; }
  .notte .notte-svg--wide { display: none; }
  .notte .notte-svg--narrow { display: block; }
  .notte .notte-stage[data-notte-live] .notte-svg { display: none; }
  .notte-num, .notte-gone { left: var(--nx); top: var(--ny); }
  .notte-sea { display: none; }
  .notte-plate, .notte-run { padding: 6px 8px; gap: 2px; }
  .notte-plate-d { display: none; }
  .notte-tape { height: 54px; }
  .notte-handle { height: 54px; }
  .notte-phase[data-notte-ph="write"] .notte-phase-n { visibility: hidden; }
}

/* ------------------------------------------------------------------ print: the server SVG, unclipped */
@media print {
  .notte .notte-stage .notte-svg--wide { display: block !important; }
  .notte-stage .notte-svg--narrow, .notte-flag, .notte-focus, .notte-handle, .notte-cap, .notte-run { display: none !important; }
}

/* ---- sections/sweep.css ---- */
/*
 * sweep — 02, the switchboard. Hour band 04 (night in both themes). Tokens only; classes prefixed `sweep-`.
 * Layout: ≥ 1200px copy (cols 1–5) beside the ledger (cols 6–12); 721–1199px stacked (the 8-column ledger needs ~640px); ≤ 720px the ledger becomes a
 * list per source with a 6-cell mini grid. The log is full width below. Everything is final at rest; the client only
 * adds state classes (is-hot, is-head, is-pending, is-playing) during a replay or under the pointer.
 */

.sweep { --sweep-line: 22px; --sweep-rows: 12; }

/* ------------------------------------------------------------------ grid */
.sweep-grid { row-gap: 56px; }
@media (min-width: 721px) and (max-width: 1199px) {
  .sweep .sweep-copy, .sweep .sweep-ledger-wrap { grid-column: 1 / -1; }
  .sweep-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--col-gap); align-items: start; }
  .sweep-copy > .sweep-head { grid-column: 1 / -1; }
}
.sweep-head { margin-bottom: 40px; }
.sweep-h2 { max-width: 16ch; }

/* ------------------------------------------------------------------ readout */
.sweep-readout { border-top: 1px solid var(--rule-strong); padding-top: 14px; margin-bottom: 32px; max-width: 30rem; }
.sweep-counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sweep-counters > div { display: grid; gap: 8px; padding-right: 12px; }
.sweep-counters > div + div { border-left: 1px solid var(--rule); padding-left: 14px; }
.sweep-counters dt { color: var(--ink-3); overflow-wrap: anywhere; hyphens: auto; }
.sweep-counters dd { color: var(--ink); min-width: 3ch; }
.sweep .sweep-status { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink-2); min-height: 19px; }
.sweep-dot { flex: none; width: 7px; height: 7px; border: 1px solid var(--ink-3); }
.sweep[data-sweep-state="playing"] .sweep-dot { background: var(--sodium); border-color: var(--sodium); }
.sweep[data-sweep-state="paused"] .sweep-dot { border-color: var(--sodium); }

/* ------------------------------------------------------------------ footnote + verbatim refusals */
.sweep-foot { display: grid; gap: 18px; max-width: 34rem; }
.sweep-fn { color: var(--ink-2); }
.sweep-clauses { display: grid; gap: 12px; }
.sweep-clause { display: grid; grid-template-columns: 1.4ch minmax(0, 1fr); column-gap: 8px; }
.sweep-clause .era-quote { grid-column: 2; }
.sweep-clause-src { grid-column: 2; margin-top: 2px; }
.sweep-mark { color: var(--amber-ink); font-family: var(--f-mono); font-size: var(--fs-label); line-height: 1.45; overflow-wrap: anywhere; min-width: 0; }
.sweep-more { border-top: 1px solid var(--rule); padding-top: 12px; }
.sweep-more > summary {
  cursor: pointer; list-style: none; display: inline-flex; gap: 8px; align-items: baseline; min-height: 32px; padding: 6px 0;
  color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.sweep-more > summary::-webkit-details-marker { display: none; }
.sweep-more > summary::before { content: "+"; font-family: var(--f-mono); color: var(--ink-3); text-decoration: none; display: inline-block; width: 1ch; }
.sweep-more[open] > summary::before { content: "−"; }
.sweep-more > summary:hover { text-decoration-thickness: 2px; }
.sweep .sweep-record { display: grid; gap: 14px; margin-top: 12px; }
.sweep-record > li { display: grid; grid-template-columns: 4ch minmax(0, 1fr); column-gap: 10px; row-gap: 2px; }
.sweep-record-r { color: var(--ink-2); padding-top: 1px; }
.sweep-record > li > .era-quote, .sweep-record-h { grid-column: 2; }

/* ------------------------------------------------------------------ ledger (≥ 721px: a table) */
.sweep-ledger-wrap { margin: 0; min-width: 0; }
.sweep-ledger-cap { margin-bottom: 14px; color: var(--ink-2); }
.sweep-ledger {
  width: 100%; border-collapse: collapse; table-layout: auto;
  font-family: var(--f-mono); font-size: var(--fs-label); font-variant-numeric: tabular-nums slashed-zero;
}
.sweep-th {
  text-align: left; font-weight: 500; color: var(--ink-3); letter-spacing: .04em;
  padding: 0 8px 10px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; vertical-align: bottom;
}
.sweep-th abbr { text-decoration: none; cursor: help; }
.sweep-th-reg { min-width: 56px; }
.sweep-th-total { padding-right: 0; }
.sweep-ledger td, .sweep-ledger tbody th, .sweep-ledger tfoot th {
  text-align: left; padding: 0 8px 0 0; height: 32px; vertical-align: middle; border-bottom: 1px solid var(--rule); font-weight: 400;
}
.sweep-code { width: 4.5ch; color: var(--ink-3); }
.sweep-host { color: var(--ink); white-space: nowrap; padding-right: 16px !important; font-size: 14px; }
.sweep-total { color: var(--ink); white-space: nowrap; padding-right: 0 !important; font-size: 14px; }
.sweep-cell { position: relative; min-width: 56px; }
.sweep-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sweep-zero { color: var(--rule-strong); }

/* tally marks: 1px ink, red = on the sheet, dashed = gone at re-open; hit areas are wider than the marks */
.sweep-tally { display: block; overflow: visible; }
.sweep-tv { stroke: var(--ink); stroke-width: 1; stroke-linecap: square; fill: none; }
.sweep-tick--five .sweep-tv { stroke: var(--red); stroke-width: 1.5; }
.sweep-tick--gone .sweep-tv { stroke: var(--ink-3); stroke-dasharray: 2 2; stroke-linecap: butt; }
.sweep-hit { fill: transparent; cursor: pointer; }
.sweep-tick.is-hot .sweep-tv { stroke: var(--sodium); stroke-width: 2.5; stroke-dasharray: none; }
.sweep-tick--cross.is-hot .sweep-tv { stroke-width: 2; }
.sweep-ledger.is-playing .sweep-tick.is-pending .sweep-tv { stroke: var(--rule-strong); }
.sweep-ledger.is-playing .sweep-tick--five.is-pending .sweep-tv { stroke: var(--rule-strong); }

/* group header + refused rows */
.sweep-ledger .sweep-group-h {
  height: auto; padding: 22px 0 8px !important; color: var(--ink-3); letter-spacing: .04em; font-weight: 500;
  border-bottom: 1px solid var(--rule-strong); border-top: 1px solid var(--rule-strong);
}
.sweep-row--ref .sweep-host { color: var(--ink-2); }
.sweep-strike { text-decoration: line-through; text-decoration-color: var(--ink-3); text-decoration-thickness: 1px; }
.sweep-door { display: inline-block; vertical-align: middle; width: 24px; height: 0; border-top: 1px dashed var(--rule-strong); }
.sweep-door--lg { width: 18px; margin-right: 4px; }
.sweep-total--ref { color: var(--ink-2); font-size: var(--fs-label); letter-spacing: .02em; }
.sweep-ref-c { color: var(--amber-ink); }
.sweep-total--ref .sweep-mark { margin-left: 2px; }

/* column totals */
.sweep-sum th, .sweep-sum td { border-bottom: 0 !important; border-top: 1px solid var(--rule-strong); color: var(--ink); height: 36px !important; }
.sweep-sum .sweep-host { color: var(--ink-3); font-size: var(--fs-label); letter-spacing: .04em; }

/* switchboard cross: the hot row and the hot column light up, the crossing cell gets a sodium frame */
.sweep-row:hover, .sweep-row.is-hot { background: var(--hl); }
.sweep-row.is-hot .sweep-host { color: var(--ink); }
.sweep-row.is-hot .sweep-code { color: var(--sodium); }
.sweep-ledger[data-sweep-col="0"] [data-c="0"], .sweep-ledger[data-sweep-col="1"] [data-c="1"],
.sweep-ledger[data-sweep-col="2"] [data-c="2"], .sweep-ledger[data-sweep-col="3"] [data-c="3"],
.sweep-ledger[data-sweep-col="4"] [data-c="4"], .sweep-ledger[data-sweep-col="5"] [data-c="5"],
.sweep-ledger[data-sweep-col="6"] [data-c="6"], .sweep-ledger[data-sweep-col="7"] [data-c="7"] { background: var(--hl); }
.sweep-ledger[data-sweep-col="0"] th[data-c="0"], .sweep-ledger[data-sweep-col="1"] th[data-c="1"],
.sweep-ledger[data-sweep-col="2"] th[data-c="2"], .sweep-ledger[data-sweep-col="3"] th[data-c="3"],
.sweep-ledger[data-sweep-col="4"] th[data-c="4"], .sweep-ledger[data-sweep-col="5"] th[data-c="5"],
.sweep-ledger[data-sweep-col="6"] th[data-c="6"], .sweep-ledger[data-sweep-col="7"] th[data-c="7"] { color: var(--sodium); border-bottom-color: var(--sodium); }
.sweep-cell.is-hot { outline: 1px solid var(--sodium); outline-offset: -1px; }

/* legend */
.sweep .sweep-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: var(--ink-2); }
.sweep-legend > li { display: inline-flex; align-items: center; gap: 6px; }
.sweep-lg { flex: none; }
.sweep-lg-ink { stroke: var(--ink); stroke-width: 1; }
.sweep-lg-red { stroke: var(--red); stroke-width: 1.5; }
.sweep-lg-gone { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 2; }

/* ------------------------------------------------------------------ ledger at ≤ 720px: one card per source */
@media (max-width: 720px) {
  .sweep-ledger, .sweep-ledger thead, .sweep-ledger tbody, .sweep-ledger tfoot { display: block; width: 100%; }
  .sweep-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sweep-ledger tr {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 4px; row-gap: 6px;
    padding: 12px 0; border-bottom: 1px solid var(--rule);
  }
  .sweep-ledger td, .sweep-ledger tbody th, .sweep-ledger tfoot th { display: block; height: auto; border: 0; padding: 0; }
  .sweep-ledger .sweep-code { display: none; }
  .sweep-ledger .sweep-host { grid-row: 1; grid-column: 1 / 5; padding-right: 8px !important; overflow: hidden; text-overflow: ellipsis; }
  .sweep-ledger .sweep-total { grid-row: 1; grid-column: 5 / 7; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .sweep-ledger .sweep-total--ref { font-size: var(--fs-label); }
  .sweep-ledger .sweep-cell { grid-row: 2; min-width: 0; display: grid; align-content: start; gap: 2px; padding-top: 2px !important; }
  .sweep-ledger .sweep-cell::before { content: attr(data-code); color: var(--ink-3); font-size: var(--fs-label); letter-spacing: .02em; }
  .sweep-n { position: static; width: auto; height: auto; overflow: visible; clip-path: none; color: var(--ink); font-size: 14px; }
  .sweep-n-five { color: var(--red); margin-left: 3px; letter-spacing: 1px; }
  .sweep-ledger .sweep-tally, .sweep-ledger .sweep-cell > .sweep-zero { display: none; }
  .sweep-ledger .sweep-door { width: 20px; margin-top: 10px; }
  .sweep-group { padding: 0 !important; border: 0 !important; }
  .sweep-ledger .sweep-group-h { grid-column: 1 / -1; padding: 24px 0 10px !important; border-top: 0; }
  .sweep-sum { border-bottom: 0 !important; border-top: 1px solid var(--rule-strong); }
  .sweep-sum th, .sweep-sum td { border-top: 0 !important; }
  .sweep-ledger .sweep-cell--sum { font-size: 14px; }
  .sweep-row--ref .sweep-cell::before { color: var(--ink-3); }
}

/* ------------------------------------------------------------------ night log */
.sweep-log { margin-top: 8px; border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.sweep-log-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 36px; margin-bottom: 14px; }
.sweep-log-title { color: var(--ink-2); letter-spacing: .02em; }
.sweep-log-hint { flex: 1 1 22ch; }
.sweep .sweep-toggle { margin-left: auto; min-width: 15ch; gap: 8px; font: 500 var(--fs-label)/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }
.sweep-toggle-g { display: inline-block; min-width: 2.4ch; color: var(--sodium); letter-spacing: 0; }

/* strip: the 80 events on 03:00–04:30, region spans above, a playhead, scrubbable once the client runs */
.sweep-strip { position: relative; margin-bottom: 12px; padding-top: 18px; touch-action: pan-y; }
.sweep-strip-labs { position: absolute; left: 0; right: 0; top: 0; height: 16px; }
.sweep-strip-lab { position: absolute; top: 0; overflow: hidden; white-space: nowrap; font: 500 var(--fs-label)/16px var(--f-mono); color: var(--ink-3); letter-spacing: .02em; }
.sweep-strip-lab.is-hot { color: var(--sodium); }
.sweep-strip-svg { display: block; width: 100%; height: 28px; overflow: visible; }
.sweep-strip-band { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sweep-strip-base { stroke: var(--rule-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sweep-strip-ev { stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sweep-strip-ev--five { stroke: var(--red); stroke-width: 2; }
.sweep-strip-ev.is-pending { stroke: var(--rule-strong); }
.sweep-strip-head { display: none; position: absolute; left: 0; top: 14px; width: 100%; height: 36px; pointer-events: none; will-change: transform; }
.sweep-strip-head > span { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--sodium); }
.sweep-strip-head > span::before { content: ""; position: absolute; left: -3px; top: 0; width: 8px; height: 4px; background: var(--sodium); }
.sweep[data-sweep-state] .sweep-strip-head { display: block; }
.sweep-strip-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.sweep-strip[role="slider"] { cursor: ew-resize; }
.sweep-strip[role="slider"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* the well: 12 lines × 22px, inner scroll, every line in the DOM */
.sweep-scroll {
  position: relative; height: calc(var(--sweep-line) * var(--sweep-rows) + 2px); overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-card);
  container-type: inline-size;
}
.sweep-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sweep-lines { position: relative; }
.sweep .sweep-line {
  display: grid; grid-template-columns: 6ch 7ch minmax(0, 1fr) 5ch 17ch; align-items: baseline;
  width: 100%; min-height: var(--sweep-line); padding: 0 12px 0 14px; margin: 0;
  border: 0; border-left: 2px solid transparent; background: transparent; color: var(--ink-2); text-align: left;
  font: 400 var(--fs-mono)/var(--sweep-line) var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; white-space: nowrap;
}
.sweep-line:hover, .sweep-line.is-hot { background: var(--hl); color: var(--ink); }
.sweep-line:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.sweep-l-at { color: var(--ink-3); }
.sweep-l-verb { color: var(--sodium); font-weight: 500; letter-spacing: .02em; }
.sweep-l-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sweep-l-host { color: var(--ink); }
.sweep-l-reg { color: var(--ink-3); }
.sweep-l-mark { overflow: hidden; white-space: nowrap; }
.sweep-l-five { color: var(--red-ink); }
.sweep-l-gone { color: var(--ink-3); }

/* replay states */
.sweep-line.is-pending { color: var(--ink-3); }
.sweep-line.is-pending .sweep-l-host, .sweep-line.is-pending .sweep-l-verb { color: var(--ink-3); }
.sweep-line.is-head { border-left-color: var(--sodium); background: var(--hl); color: var(--ink); }
.sweep-line.is-head .sweep-l-at { color: var(--sodium); }

/* narrow wells: two rows per line (time · verb · region / text), nothing truncated */
@container (max-width: 860px) {
  .sweep .sweep-line { grid-template-columns: 6ch 7ch auto minmax(0, 1fr); white-space: normal; padding-top: 3px; padding-bottom: 3px; line-height: 20px; }
  .sweep-l-at, .sweep-l-verb, .sweep-l-reg { white-space: nowrap; }
  .sweep-l-text { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow: visible; }
  .sweep-l-reg { grid-column: 3; grid-row: 1; }
  .sweep-l-mark { grid-column: 4; grid-row: 1; }
}
.sweep .sweep-log-note { margin-top: 20px; max-width: 80ch; }

@media (max-width: 720px) {
  .sweep-log-hint { flex-basis: 100%; order: 3; }
  .sweep .sweep-toggle { margin-left: 0; }
}

/* ------------------------------------------------------------------ motion + print */
@media (prefers-reduced-motion: reduce) { .sweep-strip-head { will-change: auto; } }
@media print {
  .sweep-scroll { height: auto; overflow: visible; }
  .sweep-toggle, .sweep-strip-head { display: none !important; }
  .sweep-line.is-pending, .sweep-line.is-pending .sweep-l-host { color: inherit; }
}

.sweep-cover { margin-top: 16px; color: var(--ink-2); max-width: 52ch; }

/* ---- sections/reopen.css ---- */
/*
 * reopen — 03 · 04:30–06:00 · the receipt (hour 05, ORA BLU: night in both themes).
 * Tokens only. Classes prefixed `reopen-`. No gradients, shadows, blur, pills; mono >= 13px; red = sheet / spans,
 * amber = not confirmed, sodium = the agent's read head only.
 */

/* ------------------------------------------------------------------ layout */
.reopen-grid { align-items: stretch; }
.reopen-left { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.reopen-left .era-head { margin-bottom: 0; }
.reopen-right { display: grid; gap: 20px; align-content: start; min-width: 0; }

.reopen-night { color: var(--ink-2); }
.reopen-night-k { color: var(--ink-3); margin-right: 10px; }

.reopen-panel { display: grid; gap: 28px; align-content: start; }
@media (min-width: 1024px) and (min-height: 760px) {
  .reopen-panel { position: sticky; top: calc(var(--bar-h) + 24px); }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .reopen-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--col-gap); }
  .reopen-bc, .reopen-order { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ barcode */
.reopen-bc { container-type: inline-size; container-name: reopen-bc; min-width: 0; }
.reopen .reopen-bc-cap { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); margin-bottom: 18px; }
.reopen-bc-hint { color: var(--ink-3); }

.reopen-code {
  display: grid; grid-template-columns: repeat(var(--reopen-n, 80), minmax(0, 1fr)); column-gap: 2px; row-gap: var(--reopen-rg);
  padding-top: 6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.reopen-col { position: relative; height: var(--reopen-h); cursor: crosshair; outline-offset: 3px; }
.reopen-bar { position: absolute; inset: 0; display: block; background: var(--green); }
.reopen-col[data-reopen-st="warn"] .reopen-bar { background: var(--amber); }
.reopen-col[data-reopen-st="gone"] .reopen-bar { background: transparent; border: 1px solid var(--rule-strong); }
/* the five: a 2px red cap above the column */
.reopen-col[data-reopen-five]::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 2px; background: var(--red); }
/* selection: registration ticks above and below, like a reader's carriage */
.reopen-col::after { content: ""; position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); height: 3px; background: transparent; }
.reopen-col:hover::after { background: var(--ink-3); }
.reopen-col[aria-selected="true"]::after { background: var(--ink); }
.reopen-col[aria-selected="true"] .reopen-bar { outline: 1px solid var(--ink); outline-offset: 1px; }
.reopen-col[data-reopen-dim] .reopen-bar { opacity: .2; }
.reopen-col:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* the region each run of columns belongs to (decorative; the option labels carry the comune) */
.reopen-regions {
  display: grid; grid-template-columns: repeat(var(--reopen-per, 80), minmax(0, 1fr)); column-gap: 2px; row-gap: 26px;
  margin-top: 12px; color: var(--ink-3); font: 400 var(--fs-label)/1 var(--f-mono); letter-spacing: .04em;
}
.reopen-reg { position: relative; padding-top: 6px; white-space: nowrap; overflow: hidden; border-top: 1px solid var(--rule-strong); margin-right: 3px; min-height: 20px; }
.reopen-codewrap { position: relative; --reopen-h: 72px; --reopen-rg: 18px; }
.reopen-rail2 { display: none; }

/* phone: two rows of 40 */
@container reopen-bc (max-width: 379px) {
  .reopen-codewrap { --reopen-h: 44px; --reopen-rg: 36px; padding-bottom: 30px; }
  .reopen-code { grid-template-columns: repeat(40, minmax(0, 1fr)); }
  .reopen-rail1 { display: none; }
  /* labels ride in the gap under each barcode row */
  .reopen-rail2 {
    display: grid; position: absolute; left: 0; right: 0; margin: 0;
    top: calc(6px + var(--reopen-h) + 8px); grid-auto-rows: 20px; row-gap: calc(var(--reopen-h) + var(--reopen-rg) - 20px);
  }
  .reopen-bc-hint { display: none; }
}

.reopen .reopen-status { margin-top: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 4px; min-height: 4.4em; color: var(--ink-2); }
.reopen-st-n { color: var(--ink-3); }
.reopen-st-c { color: var(--ink); font-weight: 500; }
.reopen-st-w { grid-column: 1 / -1; color: var(--ink-2); }

/* ------------------------------------------------------------------ filter ledger (aria-pressed) */
.reopen-filter { display: grid; border-top: 1px solid var(--rule-strong); align-content: start; }
.reopen-filter-k { color: var(--ink-3); padding: 10px 0 6px; }
.reopen-fbtn {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  min-height: 44px; padding: 8px 10px 8px 8px; margin: 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--ink-2); text-align: left;
  font: 500 var(--fs-label)/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease);
}
.reopen-fbtn:hover { background: var(--panel); color: var(--ink); }
.reopen-fbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.reopen-fcount { font-variant-numeric: tabular-nums slashed-zero; }
.reopen-fsw { width: 4px; height: 16px; justify-self: center; background: var(--ink-3); }
.reopen-fsw[data-reopen-sw="all"] { background: var(--green); }
.reopen-fsw[data-reopen-sw="corrected"] { width: 10px; height: 0; border-top: 2px solid var(--amber); }
.reopen-fsw[data-reopen-sw="land"], .reopen-fsw[data-reopen-sw="price"] { background: var(--amber); }
.reopen-fsw[data-reopen-sw="gone"] { background: transparent; border: 1px solid var(--rule-strong); }
.reopen-fbtn[aria-pressed="true"] .reopen-fsw[data-reopen-sw="gone"] { border-color: var(--bg); }

.reopen-legend { display: grid; gap: 8px; color: var(--ink-2); align-content: start; }
.reopen-legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.reopen-legend b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.reopen-key { width: 4px; height: 14px; justify-self: center; background: var(--green); }
.reopen-key[data-reopen-st="warn"] { background: var(--amber); }
.reopen-key[data-reopen-st="gone"] { background: transparent; border: 1px solid var(--rule-strong); }
.reopen-key--cap { width: 6px; height: 2px; background: var(--red); }
.reopen-order { color: var(--ink-3); max-width: 52ch; }

/* ------------------------------------------------------------------ receipt */
.reopen-receipt { position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-card); min-width: 0; }
.reopen-receipt:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.reopen-rh { padding: 18px 24px 0; }
.reopen-rhead { color: var(--ink-3); padding-bottom: 14px; border-bottom: 1px dashed var(--rule-strong); }
.reopen-id { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; padding: 22px 0 20px; align-items: start; }
.reopen-id-main { display: grid; gap: 10px; min-width: 0; }
.reopen-comune {
  margin: 0; font-family: var(--f-display); font-stretch: 125%; font-weight: 500;
  font-size: clamp(30px, calc(22px + 1.6vw), 44px); letter-spacing: -0.025em; line-height: 1; overflow-wrap: anywhere;
}
.reopen-sub { color: var(--ink-2); }
.reopen-src { color: var(--ink); white-space: nowrap; }
.reopen-title { font: 400 var(--fs-quote)/1.45 var(--f-body); color: var(--ink-3); max-width: 70ch; text-wrap: pretty; }
.reopen-title::before { content: attr(data-label) "  "; font: 400 var(--fs-label)/1 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); white-space: pre; }
.reopen-verdict { display: grid; justify-items: end; gap: 10px; }
.reopen-vscore { font: 500 56px/.85 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.04em; color: var(--ink); white-space: nowrap; }
.reopen-vscore.is-five { color: var(--red); }
.reopen-vden { font-size: 15px; letter-spacing: 0; color: var(--ink-3); margin-left: 2px; }

.reopen-tally { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0 14px; border-top: 1px dashed var(--rule-strong); color: var(--ink-3); }
.reopen-ticks { display: inline-flex; gap: 2px; }
.reopen-ticks i { display: block; width: 8px; height: 8px; background: var(--ink-3); }
.reopen-ticks i[data-tone="ok"] { background: var(--green); }
.reopen-ticks i[data-tone="warn"] { background: var(--amber); }
.reopen-ticks i[data-tone="fail"] { background: transparent; border: 1px dashed var(--rule-strong); }
.reopen-ticks i[data-tone="print"] { background: var(--red); }

.reopen-body { display: grid; border-top: 1px solid var(--rule); }

/* column header pair, aligned with the value cells */
.reopen-evwrap { position: relative; padding: 14px 24px 18px; min-width: 0; }
.reopen-cols { display: grid; grid-template-columns: minmax(0, 1fr) 2ch minmax(0, 1fr); column-gap: 10px; padding: 0 0 10px 40px; color: var(--ink-3); border-bottom: 1px solid var(--rule-strong); }
.reopen-cols i { font-style: normal; color: var(--ink-3); }
.reopen-cols-r { grid-column: 3; color: var(--ink-2); }

.reopen-events { counter-reset: none; }
.reopen-ev { position: relative; padding: 0 0 14px; border-bottom: 1px solid var(--rule); transition: background-color var(--t-ui) var(--ease); }
.reopen-ev.is-hl { background: var(--panel-2); outline: 1px solid var(--rule-strong); outline-offset: -1px; }
.reopen-line {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "n verb chips" ". vals vals";
  column-gap: 12px; row-gap: 8px; align-items: baseline; width: 100%;
  margin: 0; padding: 14px 0 0; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; font: inherit;
}
button.reopen-line { cursor: pointer; }
button.reopen-line:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.reopen-n { grid-area: n; font: 400 var(--fs-label)/1.2 var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color var(--t-ui) var(--ease); }
.reopen-ev[data-reopen-read] .reopen-n { color: var(--sodium); transition: none; }
.reopen-verb { grid-area: verb; color: var(--ink); }
.reopen-chips { grid-area: chips; display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.reopen-vals {
  grid-area: vals; display: grid; grid-template-columns: minmax(0, 1fr) 2ch minmax(0, 1fr); column-gap: 10px; align-items: baseline;
  font: 400 var(--fs-mono)/1.45 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
}
.reopen-claimed { grid-column: 1; color: var(--ink-3); overflow-wrap: anywhere; }
.reopen-glyph { grid-column: 2; text-align: center; color: var(--ink-3); }
.reopen-read { grid-column: 3; color: var(--ink); overflow-wrap: anywhere; }
.reopen-vals > .reopen-read:first-child { grid-column: 1 / -1; }
.reopen-ev[data-tone="warn"] .reopen-glyph, .reopen-ev[data-tone="fail"] .reopen-glyph { color: var(--amber-ink); }
.reopen-ev[data-tone="ok"] .reopen-glyph { color: var(--green-ink); }
.reopen-diff { text-decoration-line: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; color: var(--ink-2); }
.reopen-read--score .reopen-val { font: 500 40px/1 var(--f-mono); letter-spacing: -0.03em; }
.reopen-read--score.is-five .reopen-val { color: var(--red); }
.reopen-lab { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the verbatim evidence under each row: red corner marks (era-quote), two lines until opened */
.reopen-quote {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  margin: 10px 0 0 40px; max-width: 64ch; quotes: none; text-wrap: pretty;
}
.reopen-quote--flag { -webkit-line-clamp: 4; line-clamp: 4; color: var(--ink); }
.reopen-ev[data-open] .reopen-quote { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; }
.reopen-fields { display: inline-block; margin: 10px 0 0 40px; padding: 1px 6px; color: var(--ink-3); border: 1px dashed var(--rule-strong); }

/* the read head: the verifier going down the page once, at constant speed (enhancement; absent at rest) */
.reopen-head { display: none; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--sodium); pointer-events: none; will-change: transform; }
.reopen-head::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; background: var(--sodium); }
.reopen-evwrap[data-reopen-reading] .reopen-head { display: block; }

/* ------------------------------------------------------------------ verbatim drawer */
.reopen-drawer { padding: 16px 24px 20px; min-width: 0; }
.reopen-dh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.reopen-dl { margin: 0; color: var(--ink-3); font-weight: 400; }
.reopen-more {
  min-height: 36px; padding: 6px 0; border: 0; background: transparent; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; letter-spacing: .04em;
}
.reopen-more:hover { color: var(--ink); text-decoration-thickness: 2px; }
.reopen-notes {
  position: relative; max-height: 360px; overflow: auto; overscroll-behavior: contain;
  padding: 16px 18px 18px 52px; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-card);
  scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent;
}
.reopen-notes[data-open] { max-height: none; }
.reopen-text { position: relative; font: 400 var(--fs-quote)/1.65 var(--f-body); color: var(--ink-2); max-width: 66ch; overflow-wrap: break-word; }
.reopen-mk {
  background: transparent; color: inherit; border-radius: 0; padding: 0;
  text-decoration-line: underline; text-decoration-color: var(--rule-strong); text-decoration-thickness: 1px;
  text-underline-offset: 5px; text-decoration-skip-ink: none;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease);
}
.reopen-mk:hover, .reopen-mk.is-hl, .reopen-mk:focus-visible { background: var(--panel-2); color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.reopen-mk:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
/* margin rail: the receipt row number beside each marked line (client-drawn, decorative) */
.reopen-mrail { position: absolute; left: 0; top: 0; width: 44px; height: 100%; border-right: 1px solid var(--rule); pointer-events: none; }
.reopen-mrail span {
  position: absolute; right: 8px; font: 400 var(--fs-label)/1 var(--f-mono); color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap; transition: color var(--t-ui) var(--ease);
}
.reopen-mrail span.is-hl { color: var(--red-ink); }
.reopen .reopen-dfoot { margin-top: 12px; color: var(--ink-3); max-width: 60ch; }

.reopen-foot { color: var(--ink-3); max-width: 72ch; }

/* wide: rows and the verbatim drawer side by side, the drawer stays in view while the rows scroll */
@media (min-width: 1180px) {
  .reopen-body { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); }
  .reopen-drawer { border-left: 1px solid var(--rule); position: sticky; top: calc(var(--bar-h) + 16px); align-self: start; }
  .reopen-notes { max-height: min(600px, calc(100vh - var(--bar-h) - 170px)); }
}

/* ------------------------------------------------------------------ phone */
@media (max-width: 560px) {
  .reopen-rh { padding: 16px 16px 0; }
  .reopen-evwrap { padding: 10px 16px 16px; }
  .reopen-drawer { padding: 14px 16px 18px; }
  .reopen-id { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .reopen-verdict { grid-auto-flow: column; justify-content: start; align-items: end; justify-items: start; gap: 14px; }
  .reopen-vscore { font-size: 44px; }
  .reopen-cols { display: none; }
  .reopen-line { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 10px; }
  .reopen-vals { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .reopen-claimed, .reopen-read, .reopen-vals > .reopen-read:first-child { grid-column: 1; }
  .reopen-glyph { display: none; }
  .reopen-lab { position: static !important; width: auto; height: auto; margin: 0 8px 0 0; overflow: visible; clip-path: none; color: var(--ink-3); font-size: var(--fs-label); letter-spacing: .04em; }
  .reopen-quote, .reopen-fields { margin-left: 34px; }
  .reopen-notes { max-height: 15.5em; padding-left: 44px; }
  .reopen-mrail { width: 36px; }
  .reopen-mrail span { right: 6px; }
  .reopen-chips .era-chip { white-space: normal; text-align: right; }
}

/* ------------------------------------------------------------------ v2 polish: the verifier's words are the page */
/* barcode: a confirmed page is quiet (ink-3); the corrections, the doubts and the failures carry the colour */
.reopen-bar { background: var(--ink-3); opacity: .55; }
.reopen-col[data-reopen-st="warn"] .reopen-bar { opacity: 1; }
.reopen-col[data-reopen-st="gone"] .reopen-bar { opacity: 1; }
.reopen-col[data-reopen-five] .reopen-bar { background: var(--red); opacity: 1; }
.reopen-col[data-reopen-hover] .reopen-bar { opacity: 1; outline: 1px solid var(--ink-2); outline-offset: 1px; }
.reopen-fsw[data-reopen-sw="all"] { background: var(--ink-3); }
/* the pressed filter: a 2px sodium bar, not an inverted block */
.reopen-fbtn[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: inset 3px 0 0 var(--sodium); }
.reopen-fbtn[aria-pressed="true"] .reopen-fsw[data-reopen-sw="gone"] { border-color: var(--ink-3); }

/* the notes: the main reading column, Hanken at reading size, every evidence span between red corner marks */
.reopen-text { font: 400 clamp(17px, calc(15.2px + .45vw), 20px)/1.62 var(--f-body); color: var(--ink); max-width: 62ch; }
.reopen-mk { text-decoration: none; color: var(--ink); }
.reopen-mk::before { content: "⌜"; color: var(--red); margin-right: 1px; }
.reopen-mk::after { content: "⌟"; color: var(--red); margin-left: 1px; }
.reopen-mk:hover, .reopen-mk.is-hl, .reopen-mk:focus-visible { background: var(--hl); text-decoration: none; }
.reopen-notes { background: transparent; border: 0; padding: 4px 0 0 48px; }
.reopen-dl { color: var(--ink-2); }

/* the receipt rows: margin notes — a number, a plain mono verb, claimed = / ≠ read */
.reopen-verb { font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.reopen-chips .era-chip { border: 0; padding: 0; font-weight: 400; }
.reopen-chips .era-chip--ok { color: var(--ink-3); }
.reopen-glyph { font-weight: 500; }
.reopen-ev[data-tone="ok"] .reopen-glyph { color: var(--ink-2); }

@media (min-width: 1180px) {
  .reopen-body { grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); }
  .reopen-drawer { grid-column: 1; grid-row: 1; position: static; border-left: 0; border-right: 1px solid var(--rule); padding: 20px 28px 24px 24px; }
  .reopen .reopen-dfoot { padding-left: 48px; }
  .reopen-evwrap { grid-column: 2; grid-row: 1; padding: 20px 0 18px 24px; }
  .reopen-notes { max-height: none; overflow: visible; }
  .reopen-more { display: none; }
  /* the evidence is in the main column; the margin keeps the row, hover links the two */
  .reopen-quote, .reopen-fields { display: none; }
  .reopen-cols { padding-left: 40px; }
  .reopen-vals { grid-template-columns: minmax(0, 1fr) 2ch minmax(0, 1fr); font-size: var(--fs-label); }
}

/* ------------------------------------------------------------------ print: everything open */
@media print {
  .reopen-panel, .reopen-drawer { position: static !important; }
  .reopen-notes { max-height: none !important; overflow: visible !important; }
  .reopen-quote { display: block !important; -webkit-line-clamp: none !important; overflow: visible !important; }
  .reopen-more, .reopen-head, .reopen-mrail, .reopen-bc-hint { display: none !important; }
}

/* ---- sections/measure.css ---- */
/*
 * measure — 04 · 06:00 · Tavola al vero (hour band 06: the only mid band; follows the theme).
 * Tokens only. Every class is `measure-*`. Nothing is hidden at rest: the server SVGs, the ruler and the sentence are the
 * final state; the client only swaps in one live SVG packed to the real width and lays the hit buttons over it.
 */

/* ------------------------------------------------------------------ top: copy + two facts */
.measure-top { row-gap: 40px; }
.measure-top .era-head { margin-bottom: 0; }
.measure-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 32px; padding-top: 6px; }
.measure-fact { display: grid; gap: 14px; align-content: start; padding-top: 14px; border-top: 1px solid var(--ink); }
.measure-fact-n { color: var(--ink); white-space: nowrap; }
.measure-fact-u { font-size: .5em; letter-spacing: 0; color: var(--ink-2); }
.measure-fact-c { font: 400 var(--fs-quote)/1.45 var(--f-body); color: var(--ink-2); max-width: 36ch; text-wrap: pretty; }
.measure-fact-c [data-era-listing] { color: var(--ink); text-decoration: underline dotted 1px; text-underline-offset: 3px; cursor: default; }
.measure-fact-note { grid-column: 1 / -1; color: var(--ink-2); }
.measure-pitches, .measure-ratio { display: block; max-width: 100%; height: auto; }
.measure-pitch-g { fill: var(--ink); }
.measure-ratio-big { fill: none; stroke: var(--ink); stroke-width: 1; }
.measure-ratio-small { fill: var(--ink); }
.measure-ratio-lead { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.measure-ratio-t { font: 400 13px/1 var(--f-mono); fill: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero; }
.measure-ratio-t--n { fill: var(--ink); }
.measure-ratio-t--in { fill: var(--ink); font-weight: 500; }
@media (min-width: 560px) {
  .measure-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .measure-top > .era-span-1-6, .measure-top > .era-span-7-12 { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ the floor: score ruler + PASS line */
.measure-score { margin-top: clamp(56px, 7vw, 88px); }
.measure-score-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 18px; }
.measure-score-key { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.measure-key-five { display: inline-block; width: 10px; height: 10px; background: var(--red); }

.measure-ruler {
  --tag: 26px; --axis: 28px;
  position: relative; height: 120px; margin-inline: 2px;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.measure-plot { position: absolute; left: 0; right: 0; top: var(--tag); bottom: var(--axis); border-bottom: 1px solid var(--ink); }
.measure-col {
  position: absolute; bottom: 0; top: 0; left: calc(var(--x) * 100%);
  width: clamp(8px, 3.1%, 34px); transform: translateX(-50%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 3px;
}
.measure-col-n { font: 500 13px/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; text-align: center; color: var(--ink-2); white-space: nowrap; }
.measure-col.is-pass .measure-col-n { color: var(--ink); }
.measure-col--zero .measure-col-n { color: var(--ink-3); padding-bottom: 3px; }
.measure-col-bar { position: relative; display: block; height: calc(var(--h) * (100% - 16px)); min-height: 1px; background: var(--rule-strong); }
.measure-col.is-pass .measure-col-bar { background: var(--ink); }
.measure-col-five { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--f) * 100%); background: var(--red); }
.measure-col.is-hot .measure-col-bar { outline: 2px solid var(--ink); outline-offset: 1px; }

.measure-axis { position: absolute; left: 0; right: 0; bottom: 0; height: var(--axis); }
.measure-tick { position: absolute; top: 0; left: calc(var(--x) * 100%); width: 1px; height: 4px; background: var(--rule-strong); }
.measure-tick.is-int { height: 7px; background: var(--ink); }
.measure-tick-l { position: absolute; top: 10px; left: 0; transform: translateX(-50%); font: 400 13px/1 var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }

.measure-pass {
  position: absolute; top: 0; bottom: calc(var(--axis) - 6px); left: calc(var(--p) * 100%);
  width: 36px; margin-left: -18px; cursor: ew-resize; touch-action: none; z-index: 2;
}
.measure-pass-line { position: absolute; left: 17px; top: 4px; bottom: 0; width: 2px; background: var(--red); }
.measure-pass-line::before { content: ""; position: absolute; left: -3px; top: -4px; width: 8px; height: 8px; background: var(--red); }
.measure-pass-tag {
  position: absolute; left: 27px; top: -3px; padding: 0 4px;
  font: 500 13px/1.3 var(--f-mono); letter-spacing: .04em; color: var(--red-ink); background: var(--bg); white-space: nowrap;
}
.measure-pass.is-flip .measure-pass-tag { left: auto; right: 27px; }
.measure-pass:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.measure-ruler.is-drag, .measure-ruler.is-drag * { cursor: ew-resize; }

.measure-sentence {
  padding-top: 32px; max-width: 30ch;
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-close);
  letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; color: var(--ink);
}
.measure-n { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .measure-ruler { height: 96px; --tag: 24px; --axis: 24px; }
  .measure-tick-l { top: 8px; }
  .measure-col { width: clamp(7px, 3.6%, 18px); }
}

/* ------------------------------------------------------------------ Tavola al vero */
.measure-tav { container: measure-tav / inline-size; margin-top: clamp(64px, 8vw, 104px); }
.measure-tavhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 14px; border-top: 1px solid var(--ink); }
.measure-tav-title { color: var(--ink); }
.measure-sort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.measure-sort .era-seg > button { color: var(--ink-2); }
.measure-sort .era-seg > button:hover { color: var(--ink); }
.measure-sort .era-seg > button[aria-pressed="true"] { color: var(--bg); }

.measure-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; color: var(--ink-2); }
.measure-legend li { display: inline-flex; align-items: center; gap: 8px; }
.measure-legend svg { flex: none; }
.measure-k-land { fill: none; stroke: var(--ink); stroke-width: 1; }
.measure-k-house { fill: var(--ink); }
.measure-k-dash { stroke-dasharray: 3 2; }
.measure-k-below { stroke: var(--rule-strong); }
.measure-k-five { stroke: var(--red); stroke-width: 1.5; }
.measure-k-mark { fill: var(--red); }
.measure-legend-five { color: var(--red-ink); }

.measure-only-wide { display: none; }
@container measure-tav (min-width: 960px) {
  .measure-only-wide { display: revert; }
  .measure-only-narrow { display: none; }
}

.measure-tavwrap { position: relative; margin-top: 28px; }
.measure-stage { position: relative; }
.measure-svg { display: block; max-width: 100%; height: auto; overflow: visible; }

.measure-land { fill: transparent; stroke: var(--ink); stroke-width: 1; }
.measure-sq.is-below .measure-land { stroke: var(--rule-strong); }
.measure-sq.is-five .measure-land { stroke: var(--red); stroke-width: 2; }
.measure-sq.is-dashed .measure-land, .measure-sq.is-unknown .measure-land { stroke-dasharray: 3 2; }
.measure-sq.is-gone .measure-land { stroke-dasharray: 1 2.5; }
.measure-house { fill: var(--ink); }
.measure-sq.is-below .measure-house { fill: var(--rule-strong); }
.measure-sq.is-five .measure-house { fill: var(--red); }
.measure-mark { fill: var(--red); }
.measure-num { font: 500 13px/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; fill: var(--ink); }
.measure-sq.is-five .measure-num { fill: var(--red-ink); }
.measure-sq.is-below:not(.is-five) .measure-num { display: none; }
.measure-note { font: 400 13px/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; fill: var(--ink-2); }
.measure-leader { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.measure-sq.is-hot .measure-land { fill: var(--hl); stroke: var(--ink); stroke-width: 2; }
.measure-sq.is-hot.is-five .measure-land { stroke: var(--red); }
.measure-sq.is-hot .measure-num { display: inline; }

.measure-base { fill: none; stroke: var(--rule); stroke-width: 1; }
.measure-head { font: 500 13px/1 var(--f-mono); letter-spacing: .04em; fill: var(--ink); }
.measure-head-rule { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.measure-ref-s { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 1 2.5; stroke-linecap: round; }
.measure-ref-t { font: 400 13px/1 var(--f-mono); fill: var(--ink-2); }
.measure-scale-bar { fill: none; stroke: var(--ink); stroke-width: 1; }
.measure-scale-t { font: 400 13px/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; fill: var(--ink-2); }

/* the hit / focus layer: the <ol> mirror laid over the squares by the client (sr-only at rest and without JS) */
.measure-list--live { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.measure-list--live > li { position: static; }
.measure-hit {
  position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; margin: 0;
  border: 0; background: transparent; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.measure-list--live .measure-hit:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }

.measure-caption { display: grid; gap: 6px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--rule-strong); }
.measure-caption p { max-width: 110ch; }

/* tooltip internals (ctx.tip lives inside this section, so it wears the 06 tokens) */
.measure-tip { display: grid; gap: 6px; }
.measure-tip-h { color: var(--ink); font-weight: 500; letter-spacing: .02em; }
.measure-tip-b { color: var(--ink-2); }
.measure-tip-five { color: var(--red-ink); font-weight: 500; }
.measure-tip-warn { color: var(--amber-ink); }
.measure-tip-hint { color: var(--ink-3); }
.measure-tip-open {
  justify-self: start; min-height: 32px; padding: 4px 0; border: 0; background: transparent;
  font: 500 13px/1.3 var(--f-mono); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.measure-tip-open:hover { text-decoration-thickness: 2px; }

@media print {
  .measure-ruler { cursor: auto; }
  .measure-pass-tag { background: transparent; }
}

/* ---- sections/foglio.css ---- */
/* foglio — 05, 07:00, the sheet is printed. Every class is prefixed `foglio-`; tokens only. */

/* the 07:00 seam: six flat stepped bands (first light → day), then a red horizon. Both themes: --dawn-1…6 on band 07. */
.era-sec.foglio { border-top: 0; padding-top: 0; }
.foglio-dawn { display: grid; grid-template-rows: repeat(6, clamp(10px, 1.4vw, 16px)) 2px; margin-bottom: var(--sec-pad); }
.foglio-dawn > i:nth-child(1) { background: var(--dawn-1, var(--bg)); }
.foglio-dawn > i:nth-child(2) { background: var(--dawn-2, var(--bg)); }
.foglio-dawn > i:nth-child(3) { background: var(--dawn-3, var(--bg)); }
.foglio-dawn > i:nth-child(4) { background: var(--dawn-4, var(--bg)); }
.foglio-dawn > i:nth-child(5) { background: var(--dawn-5, var(--bg)); }
.foglio-dawn > i:nth-child(6) { background: var(--dawn-6, var(--bg)); }
.foglio-dawn-h { position: relative; display: block; background: var(--red); }
.foglio-dawn-w { display: block; position: relative; }
.foglio-dawn-t { position: absolute; left: var(--gutter); right: var(--gutter-r); top: 12px; font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; color: var(--red-ink); }


@media (min-width: 721px) { .foglio-wrap .era-h2 { max-width: none; } .foglio-h-a, .foglio-h-b { display: block; } }

.foglio-grid { row-gap: 48px; }

/* ------------------------------------------------------------------ the sheet: a physical object on a desk well, at 1:1 */
.foglio-sheet { min-width: 0; }
.foglio-well {
  position: relative;
  padding: 40px 32px 40px 40px;
  background: var(--panel-2);
  border-top: 3px solid var(--red);                     /* the printer slot */
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.foglio-box {
  position: relative; width: 100%; max-width: 600px;
  outline: 1px solid var(--rule-strong);                /* the paper edge */
  box-shadow: 6px 6px 0 -1px var(--panel-2), 6px 6px 0 0 var(--rule), 12px 12px 0 -1px var(--panel-2), 12px 12px 0 0 var(--rule); /* the two sheets under it: hard offset edges, no blur */
}
.foglio-frame {
  display: block; position: relative;
  width: 100%; max-width: 600px;
  height: min(1280px, 160vh); height: min(1280px, 160svh);   /* no JS: the sheet scrolls inside this window */
  border: 0; margin: 0; padding: 0;
  background: var(--panel);
  color-scheme: light dark;
}
:root[data-theme="light"] .foglio-frame { color-scheme: light; }
:root[data-theme="dark"] .foglio-frame { color-scheme: dark; }
/* client layout: 600 CSS px, scaled down only when the column is narrower */
.foglio-box[data-foglio-js] .foglio-frame { max-width: none; transform-origin: 0 0; }
.foglio-box[data-foglio-js] { overflow: clip; }
.foglio-box[data-foglio-folded] { border-bottom: 1px dashed var(--ink-3); }

.foglio-none { color: var(--ink-2); }

.foglio-fold { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 24px; }
.foglio-fold > .foglio-fold-b { white-space: normal; text-align: left; max-width: 100%; }

/* one-time print head: a red tick that travels down the LEFT MARGIN of the well, never over the sheet's text */
.foglio-head {
  position: absolute; left: 14px; top: 0; width: 16px; height: 2px;
  background: var(--red); pointer-events: none; will-change: transform;
}

/* ------------------------------------------------------------------ the one fact: a €/m² axis */
.foglio-aside { display: grid; gap: 28px; align-content: start; }
.foglio-fact { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--rule-strong); }
.foglio-fact-k { color: var(--ink-2); }
.foglio-fact-v { overflow-wrap: anywhere; }
.foglio-v-unit { font-size: .5em; letter-spacing: 0; color: var(--ink-2); }
.foglio-fact-c { font: 400 var(--fs-body)/1.5 var(--f-body); color: var(--ink); max-width: 46ch; text-wrap: pretty; }
.foglio-fact-src { color: var(--ink-3); max-width: 52ch; text-transform: none; letter-spacing: .02em; }
.foglio-fact-go { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; justify-self: start; padding: 10px 0; }
.foglio-quote { display: grid; gap: 6px; padding-left: 14px; border-left: 2px solid var(--rule-strong); }
.foglio-quote .era-meta { color: var(--ink-3); }
.foglio-quote .era-quote { font-size: var(--fs-body); color: var(--ink); }

/* the axis: one hairline, ticks every 250/500 €, pin-and-tick marks with labels stacked above */
.foglio-axis { position: relative; height: 104px; margin: 8px 6px 0; }
.foglio-axis-line { position: absolute; left: 0; right: 0; top: 76px; border-top: 1px solid var(--ink-3); }
.foglio-axis-t { position: absolute; top: 76px; height: 6px; border-left: 1px solid var(--ink-3); }
.foglio-axis-t > span {
  position: absolute; top: 10px; transform: translateX(-50%);
  font: 400 var(--fs-label)/1 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; color: var(--ink-3); white-space: nowrap;
}
.foglio-axis-l {
  position: absolute; bottom: calc(100% + 4px); left: 0; transform: translateX(-50%);
  font: 500 var(--fs-label)/1 var(--f-mono); letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums slashed-zero;
}
.foglio-axis-a, .foglio-axis-b { position: absolute; top: 52px; height: 24px; }
.foglio-axis-a { border-left: 2px solid var(--red); margin-left: -1px; }
.foglio-axis-a::after { content: ""; position: absolute; left: -6px; bottom: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.foglio-axis-a .foglio-axis-l { color: var(--red-ink); }
.foglio-axis-b { top: 28px; height: 48px; border-left: 1px solid var(--ink); }
.foglio-axis-b .foglio-axis-l { color: var(--ink); }
.foglio-axis-va { position: absolute; top: 62px; height: 14px; border: 1px solid var(--ink-2); border-bottom: 0; }
.foglio-axis-va .foglio-axis-l { left: 50%; bottom: auto; top: -22px; color: var(--ink-2); }
/* keep labels apart: the asking label sits to the LEFT of its pin (asking is the low end of a deal) */
.foglio-axis-a .foglio-axis-l { bottom: auto; top: 0; transform: translateX(calc(-100% - 8px)); }

/* notes + capture */
.foglio-asis { color: var(--ink-2); max-width: 60ch; }
.foglio-capture { max-width: none; }

/* ------------------------------------------------------------------ layout by width */
@media (max-width: 1023px) { .foglio-aside { order: -1; } }
@media (min-width: 1024px) { .foglio-aside { padding-left: 8px; } }
@media (min-width: 1024px) and (min-height: 880px) { .foglio-aside { position: sticky; top: 72px; } }
@media (max-width: 720px) {
  .foglio-axis { height: 124px; }
  .foglio-axis-a .foglio-axis-l { top: auto; bottom: -50px; transform: translateX(-30%); }
  .foglio-well { padding: 24px 12px 24px 24px; }
  .foglio-head { left: 4px; width: 12px; }
  .foglio-box { box-shadow: 4px 4px 0 -1px var(--panel-2), 4px 4px 0 0 var(--rule); }
}

/* ------------------------------------------------------------------ print: the whole sheet, no head */
@media print {
  .foglio-head, .foglio-fold { display: none !important; }
  .foglio-aside { position: static !important; }
}

/* ---- sections/rilievo.css ---- */
/* rilievo — 06, 21:00 (spec §3 06). Prefix `rilievo-`; tokens only (hour band 21 sets every token, night in both themes).
   Sodium = Rilievo matches and agent traces only. Red = hectare numerals, CTA, the sheet. Amber = the one failing criterion. */

/* ------------------------------------------------------------------ layout */
.rilievo-grid { row-gap: 56px; }
.rilievo-main, .rilievo-side, .rilievo-vocab, .rilievo-buy { grid-column: 1 / -1; min-width: 0; }
@media (max-width: 720px) {
  .rilievo-main { order: 1; }
  .rilievo-side { order: 2; }
  .rilievo-buy { order: 3; }
  .rilievo-vocab { order: 4; }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .rilievo-main { grid-column: 1 / -1; grid-row: 1; }
  .rilievo-side { grid-column: 1 / 7; grid-row: 2; }
  .rilievo-buy { grid-column: 7 / 13; grid-row: 2; align-self: start; }
  .rilievo-vocab { grid-column: 1 / -1; grid-row: 3; }
}
@media (min-width: 1024px) {
  .rilievo-main { grid-column: 1 / 8; grid-row: 1; }
  .rilievo-side { grid-column: 8 / 13; grid-row: 1; align-self: stretch; }
  .rilievo-vocab { grid-column: 1 / 8; grid-row: 2; }
  .rilievo-buy { grid-column: 8 / 13; grid-row: 2; align-self: start; }
}
.rilievo-main .era-head { margin-bottom: 32px; }

/* ------------------------------------------------------------------ the job's night: 21:00 → phases → 07:00 */
.rilievo-shift { display: flex; flex-wrap: wrap; margin-bottom: 40px; border-top: 1px solid var(--rule); }
.rilievo-shift > li {
  display: grid; gap: 2px; padding: 10px 18px 0 10px; margin-top: -1px;
  border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule);
}
.rilievo-shift > li:first-child { padding-left: 0; border-left: 0; }
.rilievo-shift-t {
  font-family: var(--f-display); font-stretch: 62%; font-weight: 600; font-size: 22px; line-height: 1;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.rilievo-shift-l { font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); }
.rilievo-shift-end .rilievo-shift-l { color: var(--ink-2); }

/* ------------------------------------------------------------------ job faceplates */
.rilievo-jobs { display: grid; gap: 0; }
.rilievo-job { display: grid; gap: 14px; padding: 20px 0 24px; border-top: 1px solid var(--rule-strong); }
.rilievo-job-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.rilievo-job-n { color: var(--ink); }
.rilievo-job-when { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums slashed-zero; }
.rilievo-job-when:empty { display: none; }
.rilievo-tag {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--ink-3);
  font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.rilievo-tag--print { border-color: var(--red-ink); color: var(--red-ink); }
.rilievo-tag--warn { border-color: var(--amber-ink); color: var(--amber-ink); }

.rilievo-job-last { font: 400 13px/1.55 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; color: var(--ink-2); }
.rilievo-job-count { color: var(--ink); font-weight: 500; letter-spacing: .04em; margin-right: 10px; white-space: nowrap; }
.rilievo-ref a { color: var(--ink); }
.rilievo-ref-ha { color: var(--red-ink); }
.rilievo-job-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.rilievo-job-note { font: 400 13px/1.4 var(--f-mono); color: var(--ink-3); }
.rilievo-load {
  min-height: 40px; padding: 8px 0; border: 0; background: transparent; color: var(--ink);
  font: 500 13px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px;
  transition: text-decoration-color var(--t-ui) var(--ease);
}
.rilievo-load:hover { text-decoration-color: var(--ink); }

/* chips: square, 1px, mono; the word always printed */
.rilievo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rilievo-chips:empty { display: none; }
.rilievo-chip {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; max-width: 100%;
  padding: 3px 8px; border: 1px solid var(--rule-strong); color: var(--ink);
  font: 500 13px/1.35 var(--f-mono); letter-spacing: .04em; font-variant-numeric: tabular-nums slashed-zero;
}
.rilievo-chip-t { white-space: nowrap; }
.rilievo-chip-note { font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.rilievo-chip--later { border-style: dashed; color: var(--ink-2); }
.rilievo-chip--hand { border-color: var(--ink); }
.rilievo-chip.is-new { animation: rilievo-stamp var(--t-snap) steps(3) both; }
@keyframes rilievo-stamp { 0% { background: var(--ink); color: var(--bg); } 100% { background: transparent; } }

/* night strip: one tick per re-opened listing at its replay minute */
.rilievo-strip { display: grid; gap: 6px; }
.rilievo-strip-svg { width: 100%; height: 28px; overflow: visible; shape-rendering: crispEdges; }
.rilievo-tick { fill: var(--rule-strong); }
.rilievo-tick--n { fill: var(--ink-3); }
.rilievo-tick--m { fill: var(--sodium); }
.rilievo-tick--m.is-run { animation: rilievo-lit 1ms steps(1) both; animation-delay: calc(var(--f, 0) * 360ms); }
@keyframes rilievo-lit { from { fill: var(--rule-strong); } to { fill: var(--sodium); } }
.rilievo-scan { fill: var(--sodium); animation: rilievo-scan 360ms linear forwards; }
@keyframes rilievo-scan { from { transform: translateX(0); } 99% { transform: translateX(996px); visibility: visible; } to { transform: translateX(996px); visibility: hidden; } }
.rilievo-strip-axis {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px;
  font: 400 13px/1.3 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; color: var(--ink-3);
}
@media (max-width: 560px) {
  .rilievo-strip-mid { order: 3; flex-basis: 100%; }
}

/* ------------------------------------------------------------------ JOB 03: the Ask */
.rilievo-job--ask {
  gap: 20px; margin-top: 8px; padding: 22px 24px 28px;
  background: var(--panel); border: 1px solid var(--rule); border-top: 2px solid var(--ink); border-radius: var(--radius-card);
}
@media (max-width: 560px) { .rilievo-job--ask { padding: 18px 16px 24px; margin-inline: 0; } }
.rilievo-form { display: grid; gap: 16px; }
.rilievo-ask-label {
  font-family: var(--f-display); font-stretch: 75%; font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; color: var(--ink-2);
}
.rilievo-ask { position: relative; border-bottom: 2px solid var(--ink); }
.rilievo-ask-input, .rilievo-ask-mirror {
  display: block; margin: 0; padding: 4px 0 12px; border: 0; border-radius: 0;
  font: 400 var(--fs-ask)/1.3 var(--f-body); letter-spacing: 0; word-spacing: 0; font-kerning: normal;
  text-align: left; text-transform: none; text-indent: 0; tab-size: 4;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
}
/* the mirror is in flow (it gives the field its height) and sits on top; the textarea takes the caret and the clicks */
.rilievo-ask-mirror { position: relative; z-index: 1; pointer-events: none; color: transparent; min-height: calc(1.3em + 16px); }
.rilievo-ask-input {
  position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: auto;
  background: transparent; color: var(--ink); caret-color: var(--red);
  -webkit-appearance: none; appearance: none;
}
.rilievo-ask-input::placeholder { color: var(--ink-3); opacity: 1; }
.rilievo-ask-input:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.rilievo[data-era-ready] .rilievo-ask-input { color: transparent; overflow: hidden; }
.rilievo[data-era-ready] .rilievo-ask-input::selection { background: var(--rule-strong); color: transparent; }
.rilievo[data-era-ready] .rilievo-ask-mirror { color: var(--ink); }
.rilievo-hl--crit { text-decoration-line: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.rilievo-hl--later { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.rilievo[data-era-ready] .rilievo-hl--unknown { color: var(--ink-3); }

.rilievo-ask-help { font: 400 13px/1.5 var(--f-mono); color: var(--ink-3); }
.rilievo-key--crit { color: var(--ink-2); text-decoration: underline 1px var(--red); text-underline-offset: 3px; }
.rilievo-key--later { color: var(--ink-2); text-decoration: underline dotted 1px var(--ink-2); text-underline-offset: 3px; }
.rilievo-key--unknown { color: var(--ink-3); }

.rilievo-try { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: baseline; }
.rilievo-try-h { font: 500 13px/1.2 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); padding-top: 11px; }
.rilievo-try-list { display: flex; flex-wrap: wrap; gap: 0 18px; }
.rilievo-try-b {
  min-height: 40px; padding: 8px 0; border: 0; background: transparent; color: var(--ink-2); text-align: left;
  font: 400 13px/1.5 var(--f-mono); letter-spacing: 0;
  text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px;
  transition: color var(--t-ui) var(--ease), text-decoration-color var(--t-ui) var(--ease);
}
.rilievo-try-b:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* Adjust criteria */
.rilievo-adjust { border-top: 1px solid var(--rule); }
.rilievo-adjust-s {
  display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none;
  font: 500 13px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.rilievo-adjust-s::-webkit-details-marker { display: none; }
.rilievo-adjust-s::before { content: "+"; display: inline-block; width: 1ch; color: var(--ink-3); }
.rilievo-adjust[open] > .rilievo-adjust-s::before { content: "−"; }
.rilievo-adjust-note { margin: 2px 0 16px; font: 400 13px/1.5 var(--f-mono); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.rilievo-reset {
  min-height: 36px; padding: 6px 0; border: 0; background: transparent; color: var(--ink);
  font: 500 13px/1.2 var(--f-mono); text-decoration: underline; text-underline-offset: 4px;
}
.rilievo-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; padding-bottom: 8px; }
.rilievo-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.rilievo-fs--wide { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .rilievo-fields { grid-template-columns: minmax(0, 1fr); }
}
.rilievo-legend { display: block; margin-bottom: 6px; padding: 0; font: 500 13px/1.3 var(--f-mono); letter-spacing: .04em; color: var(--ink-2); }
.rilievo-num { display: block; min-width: 0; }
.rilievo-input {
  display: block; width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 0;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule-strong);
  font: 400 15px/1.2 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
}
.rilievo-input::placeholder { color: var(--ink-3); opacity: 1; }
.rilievo-input:focus-visible { border-color: var(--ink); }
.rilievo-checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.rilievo-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font: 400 15px/1.3 var(--f-body); color: var(--ink); cursor: pointer; }
.rilievo-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.rilievo-check-n { font: 400 13px/1 var(--f-mono); color: var(--ink-3); }

/* result */
.rilievo-run { display: grid; gap: 18px; }
.rilievo-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.rilievo-n {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-fact);
  letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--sodium);
}
.rilievo-n--zero { color: var(--ink-2); }
.rilievo-n--none { color: var(--ink-3); }
.rilievo-result-t { font: 400 var(--fs-body)/1.4 var(--f-body); color: var(--ink); max-width: 40ch; }

/* match rows */
.rilievo-list:empty { display: none; }
.rilievo-rows { border-top: 1px solid var(--rule-strong); }
.rilievo-row {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto auto auto;
  grid-template-areas: "stamp place eur ha score" "stamp why why tags tags";
  column-gap: 16px; row-gap: 4px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule);
  transition: background-color var(--t-ui) var(--ease);
}
.rilievo-row.is-hot { background: var(--hl); }
.rilievo-row-stamp { grid-area: stamp; align-self: start; width: 50px; height: 50px; border: 1px solid var(--rule); background: var(--bg); }
.rilievo-row-place { grid-area: place; display: grid; min-width: 0; }
.rilievo-row-name { font: 500 17px/1.25 var(--f-body); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.rilievo-row-name:hover, .rilievo-row.is-hot .rilievo-row-name { text-decoration: underline; }
.rilievo-row-where { font: 400 13px/1.4 var(--f-mono); color: var(--ink-3); overflow-wrap: anywhere; }
.rilievo-row-eur, .rilievo-row-ha, .rilievo-row-score { font: 400 14px/1.3 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero; white-space: nowrap; text-align: right; }
.rilievo-row-eur { grid-area: eur; color: var(--ink); }
.rilievo-row-ha { grid-area: ha; color: var(--red-ink); font-weight: 500; }
.rilievo-row-score { grid-area: score; color: var(--ink); }
.rilievo-row-k { font: 500 13px/1 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }
.rilievo-row-why { grid-area: why; font: 400 13px/1.45 var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero; min-width: 0; }
.rilievo-row-tags { grid-area: tags; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 10px; }
.rilievo-row-miss { font: 500 13px/1.3 var(--f-mono); letter-spacing: .04em; color: var(--amber-ink); }
.rilievo-row--miss .rilievo-row-name { color: var(--ink-2); }
.rilievo-receipt {
  display: inline-block; padding: 8px 0; white-space: nowrap;
  font: 500 13px/1 var(--f-mono); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px;
}
.rilievo-receipt:hover { color: var(--ink); text-decoration-color: var(--ink); }
.rilievo-rows-h { margin-top: 10px; font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); }
.rilievo-rows--miss { margin-top: 8px; border-top-color: var(--rule); }
.rilievo-more { margin-top: 8px; font: 400 13px/1.5 var(--f-mono); color: var(--ink-3); }
@media (max-width: 640px) {
  .rilievo-row {
    grid-template-columns: 50px auto auto minmax(0, 1fr);
    grid-template-areas: "stamp place place place" "stamp eur ha score" "why why why why" "tags tags tags tags";
    column-gap: 12px;
  }
  .rilievo-row-eur, .rilievo-row-ha, .rilievo-row-score { text-align: left; }
  .rilievo-row-score { justify-self: end; }
  .rilievo-row-why { padding-top: 4px; }
  .rilievo-row-tags { justify-self: start; justify-content: flex-start; }
}

/* the parcel stamp (parcelStampSvg markup): tokens; its ha numeral is printed in the row instead */
.rilievo .stamp-svg { display: block; width: 48px; height: 48px; }
.rilievo .stamp-svg .st-contour { stroke: var(--rule); }
.rilievo .stamp-svg .st-ref { stroke: var(--ink-3); }
.rilievo .stamp-svg .st-tree { fill: var(--ink-3); }
.rilievo .stamp-svg .st-base, .rilievo .stamp-svg .st-plot, .rilievo .stamp-svg .st-scale { stroke: var(--ink); }
.rilievo .stamp-svg .st-house { fill: var(--ink); }
.rilievo .stamp-svg .st-ha, .rilievo .stamp-svg .st-label { display: none; }
.rilievo .stamp-svg .st-unknown { stroke: var(--ink-3); }

.rilievo-honesty { font: 400 13px/1.55 var(--f-mono); color: var(--ink-3); max-width: 72ch; padding-top: 14px; border-top: 1px solid var(--rule); }

/* ------------------------------------------------------------------ mini Italy */
.rilievo-map { display: grid; gap: 12px; margin: 0; }
@media (min-width: 1024px) and (min-height: 700px) {
  .rilievo-map { position: sticky; top: calc(var(--bar-h) + 24px); }
}
.rilievo-map-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
  font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero;
}
.rilievo-map-count { color: var(--sodium); }
.rilievo-italy { width: 100%; height: auto; aspect-ratio: 889 / 1056; }
@media (max-width: 720px) { .rilievo-italy { aspect-ratio: 1 / 1.15; } }
@media (min-width: 1024px) { .rilievo-italy { max-height: calc(100svh - 200px); } }
.rilievo-italy .era-italy-nb { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rilievo-italy .era-italy-coast { fill: var(--panel); stroke: var(--rule-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rilievo-pin { fill: var(--pin-idle); }
.rilievo-pin.is-hot { fill: var(--ink); stroke: var(--ink); stroke-width: 4; }
.rilievo-trace { stroke: var(--sodium); stroke-width: 1.6; fill: none; }
.rilievo-trace.is-run { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rilievo-draw calc(var(--d, 1) * 300ms) linear forwards; }
@keyframes rilievo-draw { to { stroke-dashoffset: 0; } }
.rilievo-pin-near { fill: none; stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rilievo-pin-near.is-hot { stroke: var(--ink); stroke-width: 2; }
.rilievo-pin-match { fill: var(--sodium); }
.rilievo-pin-ring { fill: none; stroke: var(--sodium); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rilievo-hit.is-hot .rilievo-pin-ring { stroke: var(--ink); stroke-width: 2; }
.rilievo-legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 13px/1.4 var(--f-mono); color: var(--ink-2); }
.rilievo-lg { display: inline-flex; align-items: center; gap: 6px; }
.rilievo-lg svg { flex: none; }
.rilievo-lg-note { color: var(--ink-3); flex-basis: 100%; }

/* ------------------------------------------------------------------ vocabulary */
.rilievo-vocab { display: grid; gap: 14px; align-content: start; }
.rilievo-vocab-dl { border-top: 1px solid var(--rule); }
.rilievo-vocab-dl > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.rilievo-vocab-dl dt { font: 500 13px/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.rilievo-vocab-dl dd { margin: 0; font: 400 15px/1.5 var(--f-body); color: var(--ink-2); }
@media (max-width: 560px) { .rilievo-vocab-dl > div { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ price block + CTA */
.rilievo-buy {
  display: grid; gap: 16px; padding: 22px 24px 24px;
  background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--red); border-radius: var(--radius-card);
}
@media (max-width: 560px) { .rilievo-buy { padding: 18px 16px 20px; } }
.rilievo-buy-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font: 500 13px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); }
.rilievo-buy-copy { font: 400 var(--fs-body)/1.5 var(--f-body); color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.rilievo-buy-copy strong { color: var(--ink); font-weight: 500; }
.rilievo-buy-big {
  display: block; margin-bottom: 10px;
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: var(--fs-fact); letter-spacing: -0.02em; line-height: 1;
}
.rilievo-buy-bill { font: 400 13px/1.4 var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums slashed-zero; }
.rilievo-buy-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.rilievo-buy-micro { font: 400 13px/1.45 var(--f-mono); color: var(--ink-3); }
.rilievo-mine { color: var(--ink); background: transparent; }
@media (max-width: 400px) { .rilievo-buy-cta .era-btn--cta { width: 100%; } }

/* ------------------------------------------------------------------ print: everything readable, no field chrome */
@media print {
  .rilievo-ask-input { display: none !important; }
  .rilievo-ask-mirror { color: inherit !important; }
  .rilievo-map { position: static !important; }
  .rilievo-try, .rilievo-load, .rilievo-receipt { display: none !important; }
}

/* ------------------------------------------------------------------ v2 polish */
/* the Ask is the opener: a visible field (rule, panel, sodium caret) at the ask size */
.rilievo-job--ask { margin-top: 0; border-top: 2px solid var(--sodium); }
.rilievo-ask { background: var(--bg); border: 1px solid var(--ink-3); border-bottom: 2px solid var(--ink); padding: 10px 14px 0; }
.rilievo-ask-input { caret-color: var(--sodium); padding: 10px 14px 12px; }
.rilievo-ask-mirror { padding: 0 0 12px; }
.rilievo-ask:focus-within { border-color: var(--ink); }
.rilievo-ask-input, .rilievo-ask-mirror { font-size: clamp(22px, calc(19.37px + .674vw), 28px); }
.rilievo-ask-label { font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; font-stretch: normal; }
/* the map speaks the hero's language: land a tone off the sea, a firm coast, matches lit in sodium */
.rilievo-italy .era-italy-coast { fill: var(--land, var(--panel)); stroke: var(--coast, var(--rule-strong)); stroke-width: 1.5; }
.rilievo-pin { fill: var(--ink-3); }
.rilievo-pin-match { fill: var(--sodium); }
/* the vocabulary is a disclosure */
.rilievo-vocab > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; min-height: 44px; }
.rilievo-vocab > summary::-webkit-details-marker { display: none; }
.rilievo-vocab[open] > summary span { transform: rotate(45deg); }
.rilievo-buy-eg { color: var(--ink-2); }
.rilievo-buy-founder { display: block; margin-top: 8px; color: var(--ink); }
@media print { .rilievo-vocab > * { display: block !important; } }

/* ---- sections/price.css ---- */
/* price — 07. One table on a shared 24-hour axis. Every class prefixed `price-`; tokens only. */

.price-receipt { color: var(--ink-2); max-width: 80ch; }

/* ------------------------------------------------------------------ the bar: interval switch + the founding offer, beside the prices */
.price-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 24px; }
.price-switch { display: inline-grid; grid-template-columns: repeat(2, minmax(0, auto)); }
.price-switch > button { white-space: normal; text-align: left; }
.price-offer { max-width: 62ch; font: 400 var(--fs-body)/1.45 var(--f-body); color: var(--ink); padding-left: 14px; border-left: 3px solid var(--red); }
.price-offer b { font-weight: 500; color: var(--red-ink); }
.price-offer-k { color: var(--red-ink); }
.price-offer-n { color: var(--ink-2); }

/* ------------------------------------------------------------------ the table */
.price-table { border-top: 1px solid var(--ink-3); }
.price-axis { display: none; }
.price-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
  padding: 26px 0 28px; border-bottom: 1px solid var(--rule);
}
.price-row--hi { border-top: 3px solid var(--red); margin-top: -1px; background: var(--panel); padding-inline: 16px; }

.price-h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.price-name { font: 500 var(--fs-close)/1 var(--f-display); font-stretch: 125%; letter-spacing: -.02em; }
.price-gloss { font: 400 var(--fs-body)/1.3 var(--f-body); color: var(--ink-2); }
.price-feats { display: grid; gap: 4px; margin-top: 12px; font: 400 15px/1.45 var(--f-body); color: var(--ink-2); }
.price-feats > li { position: relative; padding-left: 14px; }
.price-feats > li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; border-top: 1px solid var(--ink-3); }
.price-more { margin-top: 6px; }
.price-more > summary { cursor: pointer; display: inline-flex; gap: 8px; align-items: center; min-height: 32px; font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.price-more > summary:hover { color: var(--ink); }
.price-more .price-feats { margin-top: 4px; }

/* the day: one shared 24-hour axis, the tier's work drawn on it */
.price-day { min-width: 0; align-self: center; }
.price-day-svg { width: 100%; height: 30px; overflow: visible; }
.price-day-base { stroke: var(--ink-3); stroke-width: 1; }
.price-day-tick { stroke: var(--ink-3); stroke-width: 1; }
.price-day-shift { fill: var(--ink-2); }
.price-day-job { stroke: var(--sodium); stroke-width: 2; }
.price-day-out { stroke: var(--red); stroke-width: 3; }
.price-day-out--sun { stroke: var(--ink); stroke-dasharray: 3 2; }
.price-day-cap { margin-top: 8px; color: var(--ink-3); }

/* the price: big right-aligned numerals */
.price-what { display: grid; gap: 10px; align-content: start; }
.price-stack { display: grid; }
.price-stack > .price-side { grid-area: 1 / 1; }
.price-side[data-price-off] { visibility: hidden; }
.price-amt { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-num { font: 500 var(--fs-fact)/1 var(--f-display); font-stretch: 112%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-row--hi .price-num { color: var(--red); }
.price-unit { font: 400 var(--fs-body)/1 var(--f-body); color: var(--ink-2); }
.price-note { color: var(--ink-2); margin-top: 4px; }
.price-or { color: var(--ink-3); }
.price-founder-p { font: 400 15px/1.45 var(--f-body); color: var(--ink); }
.price-founder-k { color: var(--red-ink); }
.price-founder-v { font-weight: 500; color: var(--red-ink); }
.price-founder-y { color: var(--ink-2); }
.price-founder-n { color: var(--ink-2); display: block; }
.price-cta { display: grid; gap: 6px; justify-items: start; margin-top: 4px; }
.price-link { min-height: 44px; }
.price-cta-note { color: var(--ink-3); }

.price-terms { margin-top: 24px; color: var(--ink-3); max-width: 96ch; }

/* ------------------------------------------------------------------ wide: who | the day | the price */
@media (min-width: 1024px) {
  .price-axis {
    display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); column-gap: 32px;
    padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-3);
  }
  .price-axis-k { grid-column: 1; }
  .price-axis-h { grid-column: 2; position: relative; font: 400 var(--fs-label)/1 var(--f-mono); }
  .price-axis-h > span { position: absolute; top: 2px; transform: translateX(-50%); }
  .price-axis-h > span:first-child { transform: none; }
  .price-axis-h > span:last-child { transform: translateX(-100%); }
  .price-row { grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); column-gap: 32px; align-items: start; }
  .price-what { justify-items: end; text-align: right; }
  .price-amt { justify-content: flex-end; }
  .price-cta { justify-items: end; }
  .price-day { padding-top: 6px; }
}

@media (max-width: 400px) {
  .price-switch { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .price-switch > button + button { border-left: 0; border-top: 1px solid var(--ink-3); }
}

@media print { .price-side[data-price-off] { display: none; } .price-more > * { display: block !important; } }

/* ---- sections/register.css ---- */
/* register — 08, last night's full ledger. Every class is prefixed `register-`; tokens only.
 * Desktop (≥ 861px): a dense mono table; 861–1339px it scrolls inside its own container (never the body).
 * Phone (≤ 860px, screen): two-line rows — line 1 `N. COMUNE · SCORE`, line 2 `ha · € · status · source`. */

.register-head { margin-bottom: 32px; }
.register-head .era-h2 { max-width: 24ch; }

/* ------------------------------------------------------------------ the receipt line above the table */
.register .register-receipt {
  display: flex; flex-wrap: wrap; gap: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  font: 400 var(--fs-label)/1.3 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
}
.register .register-receipt > div {
  display: grid; gap: 4px; align-content: start;
  padding: 12px 20px 12px 0; margin-right: 20px;
  border-right: 1px solid var(--rule);
}
.register .register-receipt > div:last-child { border-right: 0; margin-right: 0; }
.register .register-receipt dt { color: var(--ink-3); letter-spacing: .04em; }
.register .register-receipt dd { color: var(--ink); font-size: var(--fs-counter); font-weight: 500; line-height: 1; letter-spacing: -.01em; }
.register .register-receipt > div:last-child dd { font-size: var(--fs-mono); line-height: 22px; letter-spacing: 0; }
.register .register-receipt [data-register-k="print"] dd { color: var(--red-ink); }
.register .register-receipt [data-register-k="ok"] dt { color: var(--green-ink); }
.register .register-receipt [data-register-k="warn"] dt { color: var(--amber-ink); }
.register .register-receipt [data-register-k="fail"] dt { color: var(--ink-3); text-decoration: underline dashed 1px; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ filters + legend */
.register-tools { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.register-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.register .register-tools-k, .register .register-sortk {
  font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); margin-right: 6px;
}
.register .register-sortk { display: none; }
.register .register-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--rule-strong); border-radius: 0; background: transparent; color: var(--ink-2);
  font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .02em; white-space: nowrap;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease);
}
.register-chip:hover { border-color: var(--ink); color: var(--ink); }
.register-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.register-chip-n { font-variant-numeric: tabular-nums slashed-zero; color: var(--ink-3); }
.register-chip[aria-pressed="true"] .register-chip-n { color: inherit; opacity: .72; }
.register-chip-code { display: none; }
.register .register-legend { font: 400 var(--fs-label)/1.4 var(--f-mono); color: var(--ink-3); }
.register-five { color: var(--red); }

/* ------------------------------------------------------------------ the table */
.register-scroll { position: relative; }
.register-table {
  width: 100%;
  font: 400 var(--fs-label)/1.35 var(--f-mono);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--ink);
}
.register-num { text-align: right; }
.register-h {
  position: sticky; top: var(--bar-h); z-index: 2;
  padding: 0; background: var(--bg);
  border-bottom: 1px solid var(--rule-strong);
  font-weight: 500; text-align: left; vertical-align: bottom; white-space: nowrap;
}
.register-h.register-num { text-align: right; }
.register .register-sort {
  display: inline-flex; align-items: baseline; gap: 5px;
  min-height: 40px; min-width: 24px; padding: 12px 8px 9px; width: 100%;
  justify-content: inherit;
  border: 0; background: transparent; color: var(--ink-3);
  font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .05em; text-transform: none; white-space: nowrap;
  transition: color var(--t-ui) var(--ease);
}
.register .register-h.register-num .register-sort { justify-content: flex-end; }
.register .register-sort:hover { color: var(--ink); }
.register-h[aria-sort] .register-sort { color: var(--ink); }
.register-sort-ind { display: inline-block; width: 1ch; color: var(--ink-3); opacity: .55; }
.register-h[aria-sort] .register-sort-ind { color: var(--red-ink); opacity: 1; }
.register .register-h--n .register-sort { padding-left: 0; }

.register-c {
  padding: 7px 8px; vertical-align: baseline;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  font-weight: 400; text-align: left;
}
.register-c.register-num { text-align: right; }
.register-c--n { padding-left: 0; color: var(--ink-3); width: 1%; }
.register-c--comune { white-space: normal; min-width: 18ch; max-width: 30ch; font-weight: 500; }
.register-comune { text-decoration: none; color: var(--ink); background-image: none; }
.register-comune:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.register-prov { color: var(--ink-3); font-weight: 400; }
.register-c--region abbr { text-decoration: none; color: var(--ink-2); }
.register-unit { color: var(--ink-3); }
.register-c--delta { color: var(--ink-3); }
.register-c--delta[data-register-under] { color: var(--ink); }
.register-c--source { color: var(--ink-2); }
.register-c--acts { padding-right: 0; text-align: right; width: 1%; }

/* row states: hover / focus-within / lit from another section / open */
.register-row { transition: background-color var(--t-ui) var(--ease); }
.register-row:hover, .register-row:focus-within, .register-row[data-register-hot] { background: var(--hl); }
.register-row[data-register-hot] .register-c--n { color: var(--ink); }
.register-row[data-register-open] .register-c { border-bottom-color: transparent; }
.register-row[data-register-tone="fail"] .register-c { color: var(--ink-3); }
.register-row[data-register-tone="fail"] .register-comune { color: var(--ink-2); }
/* the five: their register number in red ink (the ▪ sits before the score) */
.register-row[data-register-five] .register-c--n { color: var(--red-ink); }

/* score: ▪ (the five) + numeral + a 10-cell bar with the pass tick */
.register-score { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.register-score-n { min-width: 3ch; text-align: right; font-weight: 500; }
.register-meter {
  position: relative; display: inline-block; width: 44px; height: 7px;
  border: 1px solid var(--rule-strong);
}
.register-meter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(var(--register-s, 0) * 100%);
  background: var(--ink-3);
}
.register-meter[data-register-cleared]::before { background: var(--ink); }
.register-row[data-register-five] .register-meter::before { background: var(--red); }
.register-meter::after {
  content: ""; position: absolute; top: -3px; bottom: -3px; width: 1px;
  left: calc(var(--register-pass, .6) * 100% - .5px);
  background: var(--ink-2);
}

/* status words: the word is always printed; colour only repeats it */
.register-status { letter-spacing: .02em; }
.register-status[data-register-status="ok"] { color: var(--green-ink); }
.register-status[data-register-status="warn"] { color: var(--amber-ink); }
.register-status[data-register-status="fail"] { color: var(--ink-3); padding: 0 4px; border: 1px dashed var(--ink-3); }

/* actions: Why (square fills when open) · Receipt → */
.register .register-act {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 2px 6px; margin-left: 4px;
  border: 0; background: transparent; color: var(--ink-2);
  font: 500 var(--fs-label)/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: color var(--t-ui) var(--ease);
}
.register .register-act:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.register-act-box { display: inline-block; width: 9px; height: 9px; border: 1px solid currentColor; }
.register-act--why[aria-expanded="true"] { color: var(--ink); }
.register-act--why[aria-expanded="true"] .register-act-box { background: currentColor; }

/* the why row: the decisive verifier sentence, verbatim */
.register-why-c { padding: 0 0 18px; border-bottom: 1px solid var(--rule); background: var(--hl); white-space: normal; }
.register-why-in {
  display: grid; gap: 10px;
  margin-left: 3ch; padding: 14px 16px 0 calc(8px + 2ch);
  border-left: 1px solid var(--rule-strong);
  max-width: 96ch;
}
.register-row[data-register-five] + .register-why .register-why-in { border-left-color: var(--red); }
.register-why-k { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .04em; color: var(--ink-2); }
.register-why-v { color: var(--ink); }
.register-why-at { color: var(--ink-3); }
.register-why-q { max-width: 72ch; font-family: var(--f-body); font-size: var(--fs-quote); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.register-why-q--none { font: 500 var(--fs-label)/1.3 var(--f-mono); color: var(--ink-3); }
.register-why-mark { background: transparent; color: var(--ink); text-decoration: underline 1px var(--rule-strong); text-underline-offset: 4px; }
.register-why-q--whole { color: var(--ink); }
.register-why-links { display: flex; flex-wrap: wrap; gap: 6px 24px; font: 400 var(--fs-label)/1.4 var(--f-mono); }
.register-why-links a { color: var(--ink); min-height: 28px; display: inline-flex; align-items: center; }
.register-why-src { color: var(--ink-3); min-height: 28px; display: inline-flex; align-items: center; }

/* row motion (FLIP) is set inline by the client: 240ms steps(8); nothing here animates layout */

/* ------------------------------------------------------------------ under the table */
.register-more { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 20px; }
.register .register-more-btn { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .04em; }
.register-count { font: 400 var(--fs-label)/1.4 var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.register .register-foot { margin-top: 28px; max-width: 96ch; font: 400 var(--fs-label)/1.6 var(--f-mono); color: var(--ink-3); }
.register .register-foot a { color: var(--ink-2); }

/* ------------------------------------------------------------------ 861–1339px: the table (min-content ~1250px) scrolls inside itself */
@media screen and (min-width: 861px) and (max-width: 1339px) {
  .register-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
  .register-h { position: static; }
  /* fit without a sideways scroll: house m² and source step out (both are in the receipt and the Why row) */
  .register-h--house, .register-c--house, .register-h--source, .register-c--source { display: none; }
}
.register-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* the disclosure: the stat row is the section; the 80 rows open on demand */
.register-all { margin-top: 28px; }
.register-all > summary { white-space: normal; text-align: left; height: auto; list-style: none; cursor: pointer; font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; }
.register-all > summary::-webkit-details-marker { display: none; }
.register-all[open] > summary { margin-bottom: 28px; border-color: var(--ink); }
.register-all[open] > summary span { display: inline-block; transform: rotate(180deg); }
@media print { .register-all > * { display: block !important; } }

/* ------------------------------------------------------------------ ≤ 860px: two-line rows, nothing scrolls sideways */
@media screen and (max-width: 860px) {
  .register .register-receipt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .register .register-receipt > div, .register .register-receipt > div:last-child { padding: 10px 8px 10px 0; margin: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .register .register-receipt > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .register .register-receipt dd { font-size: 18px; }
  .register-chip-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .register-chip-code { display: inline; }
  .register .register-sortk { display: block; margin: 20px 0 6px; }

  .register-table, .register-table > thead, .register-table > tbody, .register-table tr, .register-table th, .register-table td { display: block; }
  .register-table > tbody[hidden] { display: none; }
  .register-table tr[hidden] { display: none; }

  /* header = a wrapped strip of sort buttons for the printed columns */
  .register-table > thead > tr { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-strong); }
  .register-h { position: static; border: 0; background: transparent; }
  .register-h:not([data-register-phone]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .register .register-h .register-sort, .register .register-h.register-num .register-sort { justify-content: flex-start; min-height: 36px; padding: 6px 9px; border: 1px solid var(--rule-strong); }
  .register-h[aria-sort] .register-sort { border-color: var(--ink); }
  .register .register-h--n .register-sort { padding-left: 9px; }

  .register-table > tbody > tr.register-row {
    position: relative;
    display: flex; flex-wrap: wrap; align-items: baseline;
    padding: 12px 0 10px 4ch;
    border-bottom: 1px solid var(--rule);
    column-gap: 1.4ch;
  }
  .register-row::before { content: ""; order: 4; flex: 0 0 100%; height: 6px; }
  .register-c { padding: 0; border: 0; white-space: normal; }
  .register-c--n { order: 1; flex: 0 0 4ch; margin-left: -4ch; margin-right: -1.4ch; font-size: var(--fs-label); }
  .register-c--comune { order: 2; flex: 1 1 0; min-width: 0; max-width: none; font-size: var(--fs-mono); }
  .register-c--score { order: 3; flex: 0 0 auto; padding-left: 10px; }
  .register-c--ha { order: 5; }
  .register-c--eur { order: 6; }
  .register-c--status { order: 7; }
  .register-c--source { order: 8; }
  .register-c--acts { order: 9; flex: 0 0 100%; margin-top: 2px; width: auto; text-align: left; display: flex; gap: 4px; }
  .register-c--region, .register-c--house, .register-c--eurm2, .register-c--delta {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .register-row[data-register-tone="fail"] .register-c { color: var(--ink-3); }
  .register .register-act { margin-left: 0; min-height: 36px; padding: 6px 10px 6px 0; margin-right: 12px; }
  .register-meter { width: 32px; }

  .register-why-c { padding: 0 0 16px; }
  .register-why-in { margin-left: 0; padding: 12px 0 0 calc(4ch - 1px); border-left: 0; }
  .register-row[data-register-five] + .register-why .register-why-in { border-left: 0; }
}

/* ------------------------------------------------------------------ print: every row, every reason, no controls */
@media print {
  .register-table { font-size: 8pt; }
  .register-h { position: static; }
  .register-sort-ind, .register-c--acts, .register-h--acts, .register-tools, .register-more-btn, .register .register-sortk { display: none !important; }
  .register-why-c { background: transparent; }
  .register-row { break-inside: avoid; }
}

/* ---- sections/faq.css ---- */
/* faq — 09, Questions. Every class is prefixed `faq-`; tokens only.
 * ≥ 1024px: question in cols 1–4, answer in cols 5–11 (the summary floats; details is its own formatting context,
 * because <details> content cannot be a reliable grid item in every engine). Below: question above answer. */

.faq-head { margin-bottom: 40px; }

.faq-list {
  /* one column of the 12-col grid, computed against the list's own width */
  --faq-c: calc((100% - 11 * var(--col-gap)) / 12);
  border-bottom: 1px solid var(--rule);
}

.faq-item {
  display: flow-root;
  border-top: 1px solid var(--rule);
  padding: 0;
}
.faq-item:first-child { border-top-color: var(--rule-strong); }

.faq-q {
  list-style: none;
  display: grid; grid-template-columns: 4ch minmax(0, 1fr) auto; column-gap: 8px; row-gap: 8px; align-items: baseline;
  min-height: 48px; padding: 20px 0 18px;
  cursor: pointer;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }
.faq-n { font: 400 var(--fs-label)/1.2 var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums slashed-zero; }
.faq-qt {
  font-family: var(--f-display); font-stretch: 75%; font-weight: 600; font-size: 15px;
  line-height: 1.3; letter-spacing: .05em; text-transform: uppercase;
  text-wrap: balance;
}
.faq-unit { text-transform: none; }
.faq-q:hover .faq-qt { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.faq-tag {
  grid-column: 2; grid-row: 2; justify-self: start;
  padding: 2px 6px; border: 1px solid var(--rule-strong);
  font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .04em; color: var(--ink-2);
}
/* open/closed: a square that fills, like the register's Why */
.faq-box {
  grid-column: 3; grid-row: 1; align-self: center;
  width: 11px; height: 11px; border: 1px solid var(--ink-2);
  transition: background-color var(--t-ui) var(--ease);
}
.faq-item[open] > .faq-q .faq-box { background: var(--ink-2); }
.faq-q:hover .faq-box { border-color: var(--ink); }

.faq-a { padding: 0 0 26px calc(4ch + 8px); }
.faq .faq-at {
  font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.5; color: var(--ink);
  max-width: 64ch; text-wrap: pretty;
}
.faq .faq-see { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; font: 400 var(--fs-label)/1.4 var(--f-mono); }
.faq .faq-see a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); }
.faq .faq-see a:hover { color: var(--ink); }

.faq-item[data-faq-added] .faq-n { color: var(--ink-2); }

.faq .faq-foot { margin-top: 20px; font: 400 var(--fs-label)/1.5 var(--f-mono); color: var(--ink-3); max-width: 96ch; }

@media (min-width: 1024px) {
  .faq-q {
    float: left;
    width: calc(4 * var(--faq-c) + 3 * var(--col-gap));
    padding: 26px 0 28px;
    grid-template-columns: 4ch minmax(0, 1fr) auto;
    column-gap: 8px;
    cursor: pointer;
  }
  .faq-box { grid-column: 3; justify-self: end; }
  .faq-a {
    margin-left: calc(4 * var(--faq-c) + 4 * var(--col-gap));
    max-width: calc(7 * var(--faq-c) + 6 * var(--col-gap));
    padding: 24px 0 30px;
  }
  .faq-item:not([open]) > .faq-q { float: none; }
}

@media print {
  .faq-box { display: none; }
  .faq-item { break-inside: avoid; }
}

/* desktop: two columns of open answers, so the section stays short */
@media (min-width: 1024px) {
  .faq-list { columns: 2; column-gap: 56px; border-bottom: 0; }
  .faq-item { break-inside: avoid; display: block; }
  .faq-item:first-child { border-top-color: var(--rule); }
  .faq-q { float: none; width: auto; padding: 22px 0 12px; }
  .faq-a { margin-left: 0; max-width: none; padding: 0 0 26px calc(4ch + 8px); }
}

/* ---- sections/footer.css ---- */
/* footer — 07:00 + day, on a --panel plate. Every class is prefixed `footer-`; tokens only. No motion. */

.era-foot.footer { background: var(--panel); color: var(--ink); }

.footer .footer-k {
  margin: 0 0 12px;
  font: 500 var(--fs-label)/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink-3);
}

/* ------------------------------------------------------------------ 1–2: colophon + closing line */
.footer-top {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px;
  padding-bottom: 48px; margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1024px) {
  .footer-top { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .footer-colophon { grid-column: 1 / 6; }
  .footer-close { grid-column: 6 / 13; }
}

.footer-colophon { display: flex; gap: 20px; align-items: flex-start; margin: 0; min-width: 0; }

/* Italy: a 1px hairline coast, no fill. The coast is a <use>, which does not pass vector-effect into its shadow
 * tree, so its stroke is set in viewBox units for the drawn height (1056 units → 160px = 6.6, → 120px = 8.8). */
.footer-map { flex: 0 0 auto; height: 160px; width: auto; aspect-ratio: 1180 / 1056; overflow: visible; }
.footer-map .era-italy-coast { fill: var(--panel-2); stroke: var(--ink-3); stroke-width: 3; stroke-linejoin: round; }
.footer-leads path { fill: none; stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.footer-pins rect { fill: var(--red); }
.footer-nums text { fill: var(--red); font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

.footer-five { min-width: 0; }
.footer-five-list { display: grid; gap: 2px; counter-reset: none; }
.footer-five-list a {
  display: grid; grid-template-columns: 2ch minmax(0, 1fr); column-gap: 8px;
  padding: 4px 0; min-height: 28px;
  text-decoration: none; color: var(--ink);
  font: 400 var(--fs-label)/1.35 var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
}
.footer-five-list a:hover .footer-five-c { text-decoration: underline; text-underline-offset: 3px; }
.footer-five-n { color: var(--red-ink); font-weight: 500; }
.footer-five-c { font-weight: 500; }
.footer-five-m { grid-column: 2; color: var(--ink-3); }
.footer .footer-cap { margin-top: 10px; font: 400 var(--fs-label)/1.4 var(--f-mono); color: var(--ink-3); max-width: 34ch; }

.footer-close { display: grid; gap: 18px; align-content: start; min-width: 0; }
.footer .footer-close-line { max-width: 20ch; text-wrap: balance; }
.footer .footer-next { font: 400 var(--fs-label)/1.5 var(--f-mono); color: var(--ink-2); max-width: 64ch; font-variant-numeric: tabular-nums slashed-zero; }
.footer-capture { margin-top: 6px; }

/* ------------------------------------------------------------------ 3: four mono columns */
.footer-cols {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px var(--col-gap);
  font: 400 var(--fs-label)/1.55 var(--f-mono);
}
@media (min-width: 600px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer .footer-col { min-width: 0; }
.footer .footer-col ul { display: grid; gap: 4px; }
.footer .footer-col li { color: var(--ink-2); overflow-wrap: anywhere; }
.footer .footer-col a { color: var(--ink); display: inline-flex; align-items: center; min-height: 24px; }
.footer .footer-col li[data-footer-refused] { color: var(--ink-3); }
.footer-x { color: var(--amber-ink); }
.footer .footer-refused {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule-strong);
  color: var(--ink-3); max-width: 44ch;
}

/* Night/Day: the runtime sets aria-pressed + data-state; the active word is underlined, as in the bar */
.footer .footer-theme {
  display: inline-flex; gap: 6px; align-items: center;
  min-height: 40px; padding: 8px 12px; margin-top: 4px;
  border: 1px solid var(--rule-strong); border-radius: 0; background: transparent; color: var(--ink-3);
  font: 500 var(--fs-label)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  transition: border-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease);
}
.footer-theme:hover { border-color: var(--ink); color: var(--ink-2); }
.footer-theme[data-state="night"] .footer-theme-n,
.footer-theme[data-state="day"] .footer-theme-d { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ 4: statement, tagline, legal line */
.footer .footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); display: grid; gap: 16px; }
.footer .footer-statement { font: 400 var(--fs-label)/1.6 var(--f-mono); color: var(--ink-3); max-width: 96ch; }
.footer .footer-line {
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  font: 400 var(--fs-label)/1.5 var(--f-mono); color: var(--ink-2);
}
.footer-mark { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 500; letter-spacing: .02em; }
.footer-glyph { flex: 0 0 auto; color: var(--red); }
.footer-legal { color: var(--ink-3); overflow-wrap: anywhere; }
.footer-top-link { margin-left: auto; color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; }

@media (max-width: 720px) {
  .footer-map { height: 120px; }
  .footer-map .era-italy-coast { stroke-width: 4; }
  .footer-colophon { gap: 14px; }
  .footer-top-link { margin-left: 0; }
}

@media print {
  .era-foot.footer { background: transparent !important; }
  .footer-theme, .footer-capture, .footer-top-link { display: none !important; }
}
