/* Fonts (C.3b, design-system.md §5): the Source family, variable files, latin subset (covers Italian), SIL Open Font
   License 1.1. Local: dist/fonts/ in the site, base64 in the single file (build.js); no request leaves the page (§3).
   vendor/fonts/ is filled by unpack-src.js from the Fontsource packages on npm (5.3.0). */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2-variations"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Source Code Pro"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-code-pro-latin-wght-normal.woff2") format("woff2-variations"); }

/* Rowtrail SQL — design tokens (spec §15.2).
   Only source file where a colour or a px may be written; build/check-css.js fails the build on any colour elsewhere
   and on any px outside build/px-allowlist.json. Components reference tokens only, never a value.

   Two layers, two moments (§11):
   - C.3a (this file, 2026-09-27): structure — names and roles, type and space scales, measure, borders, radii, shadows,
     layout widths, fixed heights in lines × leading, focus, opacity; neutral values (grey scale, system fonts).
   - C.3b (2026-10-01, anticipated after D.2): values — Source families in local files, paper/ink/petrol palette, radii,
     shadows only for what floats, motion, light theme as default. The values are those of design-system.md (a Project
     file, copied into design/ at session start); test/design.js fails if this file and its tables differ.

   Names say the role, never the value (§15.2): --color-accent, not --grey-6. Sizes are rem/em (they follow the user's
   font size); px appear only where the browser has no scalable alternative (hairlines) and in the shadow offsets.
   Themes: the light and dark blocks below have the same set of variables; a component never knows which theme is on.
   Default theme: light (C.3b). With no choice in Profile the dark block follows the system; a choice in Profile wins. */

:root {
  /* ---- Font families. --font-reading is separate so that C.3b may give lessons a different face from the UI. ---- */
  --font-ui: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-reading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- Type scale: five bodies, one leading each (§15.2). Base = the user's browser size (1rem). ----
     xs  labels in caps, marks on theory blocks, keycaps, table captions
     sm  UI text: top bar, buttons, tags, notes, hints, data tables, theory blocks, schema browser, module subtitles
     md  body: lesson paragraphs, exercise prompt, choice options, verdict sentence
     lg  paragraph titles in the lesson, resume title, end-of-concept title, theory card block title when opened
     xl  page and lesson title, verify start title */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem; /* D.3: the frontespizio sentence only (design-system.md §5, §10.1) */
  --text-display: 2.625rem; /* F.8: the landing's opening sentence only (design-system.md §5, §10.15) */
  --leading-display: 1.12;
  --leading-xs: 1.4;
  --leading-sm: 1.45;
  --leading-md: 1.5;
  --leading-lg: 1.3;
  --leading-xl: 1.2;
  --leading-2xl: 1.2;
  /* Lesson body (reading state of Learn, theory card blocks when opened): the same md body with a wider leading. */
  --leading-reading: 1.65;
  /* Monospace inside prose and tables sits visually larger than text at the same size: scale it down. */
  --text-mono-ratio: 0.94em;
  --tracking-label: 0.06em;

  --weight-regular: 400;
  --weight-semibold: 600;

  /* ---- Measure: 60–75 characters for reading (§15.2). ----
     reading  the lesson column and every summary
     narrow   centred screens: verify start, verify end, end of concept */
  --measure-reading: 68ch;
  --measure-narrow: 56ch;

  /* ---- Space scale 4/8/12/16/24/32/48 (§15.2), in rem. Density per view: reading uses 5–7, exercises 2–4. ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* ---- Borders. Hairlines have no scalable alternative: px here, referenced everywhere as tokens. ----
     1  hairline: boxes, table cells, separators, editor, options
     2  emphasis: active nav underline, focus ring, selected option
     3  marks: example left bar in the lesson, verdict left bar, theory block of `teaches` */
  --border-1: 1px;
  --border-2: 2px;
  --border-3: 3px;

  /* ---- Radii. sm tags and keycaps; md buttons, boxes, blocks, options, editor; lg resume box, frames, panels. ---- */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;

  /* ---- Shadows only for what floats (C.3b): sm is none (boxes in the page are flat); md floating panels, menus, the
     autocomplete list. ---- */
  --shadow-sm: none;
  --shadow-md: 0 4px 12px var(--color-shadow);

  /* ---- Layout (§16, wireframes C.4). The three-column exercise layout: theory | exercise | schema. ----
     Side columns are fixed in rem so the centre column, and with it the exercise box, scales with the font.
     Breakpoint at which the columns stack: 900px, written in build/px-allowlist.json (a media query cannot read a var). */
  --layout-max: 78rem;
  --layout-col-theory: 17rem;
  --layout-col-schema: 17rem;   /* v1.18: was 14.5rem; column names and types must fit without wrapping */
  --layout-gap: var(--space-5);
  --layout-bar-height: 2.75rem;

  /* ---- Fixed-height containers (principle 9, §15.3.1): heights in lines × leading, never in px. ----
     exbox-body  prompt + open hints, between the fixed head and the anchored command row of the exercise box.
                 Calibrated on the longest prompt of the pack with two hints open: 193 + 167 characters (IT) at ~65ch
                 per line → 6 lines of text + labels and gaps → 8 lines. Recheck when a pack grows (E.5).
     editor      lines visible in the editor before it scrolls; a reference query is 1–4 lines.
     schema      rows visible in an open schema table (columns list) before it scrolls.
     theory      lines of one theory block when collapsed to its rule; the card scrolls as a whole. */
  --exbox-body-lines: 8;
  --exbox-body-height: calc(var(--exbox-body-lines) * var(--leading-md) * var(--text-md));
  --editor-lines: 6;
  --editor-height: calc(var(--editor-lines) * var(--leading-md) * var(--text-md));
  /* Autocomplete list of the editor (D.2 second part): width, and rows visible before it scrolls. */
  --editor-ac-width: 16rem;
  --editor-ac-rows: 8;
  --schema-table-lines: 8;
  --schema-table-height: calc(var(--schema-table-lines) * var(--leading-sm) * var(--text-sm));
  /* D.3 Home (design-system.md §10): module ticks in the course box and the hub icons (Tabler, 20 px at 16 px root). */
  --tick-height: 0.4rem;
  --icon-size: 1.25rem;
  --mark-size: 1.125rem;
  --mark-size-large: 3rem;   /* session 56 (design-system.md §9 v1.11): the large mark, on the public pages */
  /* D.3 Learn: the course path (design-system.md §10.3) and the lesson dots. */
  --node-size: 0.95rem;
  --node-size-current: 1.25rem;
  --path-max: 44rem;
  --dot-size: 0.6rem;
  --dot-ring-in: 0.1rem;
  --dot-ring-out: 0.16rem;
  --theory-block-lines: 2;
  /* Session 30 (design-system.md §10.9, §13): the closed row with its state visible. strip-col-min is the narrowest column
     of a grid inside an open row (theory blocks of Learn, the three groups of the Sandbox data); rows-col-min is the
     narrowest a table opened from the schema gets inside a pair (a wide one scrolls in its box). */
  --strip-col-min: 16rem;
  --rows-col-min: 22rem;
  /* Session 31 (design-system.md §10.10, §13): the index of the paragraphs in the left margin of the reading. */
  --reading-index-width: 14rem;

  /* ---- Controls. Buttons and keycaps share one height; the tap target is the accessibility minimum. ---- */
  --control-height: 2.25rem;
  --tap-min: 2.75rem;
  --dot-size: 0.75em;
  --keycap-min-width: 1.4em;

  /* ---- Focus ring, same for every focusable element. ---- */
  --focus-ring: var(--border-2) solid var(--color-focus);
  --focus-offset: var(--border-2);

  /* ---- Opacity for reduced states (disabled command, attenuated choice option). ---- */
  --opacity-disabled: 0.4;
  --opacity-dim: 0.55;

  /* ---- Motion (C.3b): only in answer to a gesture (verdict, opening, autocomplete); off with prefers-reduced-motion. ---- */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  /* ---- Stacking. ---- */
  --z-bar: 10;
  --z-panel: 20;
  --z-overlay: 30;
}

/* ============================================================================================================
   Colour roles. Same variables in both themes. C.3a set every value to a grey (the shell had to be usable without
   colour, §15.2); C.3b (2026-10-01) gave the values of design-system.md §3: paper, ink, petrol as the one accent,
   muted semantic colours. test/design.js checks these blocks against that table.
   Roles:
     bg              page background
     surface         raised containers: boxes, exercise box, editor, options, table body
     surface-alt     subdued areas inside a surface: top bar, box heads, command row, table header, selected option
     surface-mark    marked rows in a result table (rows in excess)
     surface-side    the side columns (theory card, schema): the margin of the book (C.3b)
     accent-soft     the one accent tint: course box, paragraph tag, dot in progress (C.3b)
     text            primary text
     text-2          secondary text: theory blocks, tags, example notes, links
     text-muted      tertiary: labels, counts, captions, module subtitles, disabled-looking hints
     text-faint      non-text signs only: chevrons, underline of links, rules (below 4.5:1 on purpose; C.3b)
     text-on-accent  text on an accent background (primary button)
     border          default hairline of boxes and the exercise box
     border-soft     inner separators, table cells, module rows, theory blocks
     border-strong   the resume box, buttons, the verdict box
     accent          the one accent: primary button, active nav, filled dot, `teaches` block, selected option, ok verdict
     accent-hover    primary button on hover/active
     focus           focus ring
     success/error/warning + -bg   semantic states of the verdict, the choice option, the dot with errors (C.3b colours)
     neutral/neutral-bg            blocked state: dot with missing prerequisites
     link, link-underline          text links (read-link in verify end, "vedi" to another lesson)
     syntax-*        the editor highlighting (D.2 second part): keyword, function, string, number, name (tables and
                     columns), unknown (a name the schema does not have), comment. Grey here like every role; each is
                     also told apart without colour in layout.css (weight, style, underline), C.3b colours them.
     shadow          shadow colour with alpha
   ============================================================================================================ */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --color-bg: #F6F3EC;
  --color-surface: #FDFBF7;
  --color-surface-alt: #F1EDE4;
  --color-surface-side: #EFEBE2;
  --color-surface-mark: #E9E3D6;
  --color-surface-current: #FDFBF7;
  --color-accent-soft: #E5EEEE;
  --color-text: #22201C;
  --color-text-2: #55504A;
  --color-text-muted: #6E695F;
  --color-text-faint: #9A948A;
  --color-text-on-accent: #FFFFFF;
  --color-border: #DED8CB;
  --color-border-soft: #E9E4DA;
  --color-border-strong: #C9C1B2;
  --color-accent: #1F5F6B;
  --color-accent-hover: #174B55;
  --color-focus: #1F5F6B;
  --color-success: #3A7346;
  --color-success-bg: #E7F0E5;
  --color-error: #A3412D;
  --color-error-bg: #F5E4DE;
  --color-warning: #86600F;
  --color-warning-bg: #F4EBD6;
  --color-neutral: #C9C1B2;
  --color-neutral-bg: #EFEBE2;
  --color-link: #1F5F6B;
  --color-link-underline: #A8C3C7;
  --color-syntax-keyword: #1F5F6B;
  --color-syntax-function: #5B4A86;
  --color-syntax-string: #86581C;
  --color-syntax-number: #86581C;
  --color-syntax-name: #22201C;
  --color-syntax-unknown: #A3412D;
  --color-syntax-comment: #6E695F;
  --color-shadow: rgba(60, 45, 20, 0.10);
  --color-brand-google-blue: #4285F4;
  --color-brand-google-green: #34A853;
  --color-brand-google-yellow: #FBBC05;
  --color-brand-google-red: #EA4335;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #15191A;
    --color-surface: #1D2224;
    --color-surface-alt: #191D1F;
    --color-surface-side: #171B1C;
    --color-surface-mark: #283033;
    --color-surface-current: #283033;
    --color-accent-soft: #1B2E31;
    --color-text: #E9E5DD;
    --color-text-2: #B8B2A7;
    --color-text-muted: #9C968C;
    --color-text-faint: #6E6A63;
    --color-text-on-accent: #0F1C1E;
    --color-border: #2E3538;
    --color-border-soft: #262C2E;
    --color-border-strong: #3C4447;
    --color-accent: #62B2BE;
    --color-accent-hover: #7CC3CE;
    --color-focus: #62B2BE;
    --color-success: #7FBC88;
    --color-success-bg: #1E2E22;
    --color-error: #E38B74;
    --color-error-bg: #3A2520;
    --color-warning: #D9AE5C;
    --color-warning-bg: #33291A;
    --color-neutral: #3C4447;
    --color-neutral-bg: #191D1F;
    --color-link: #62B2BE;
    --color-link-underline: #2F5A60;
    --color-syntax-keyword: #62B2BE;
    --color-syntax-function: #B3A3E0;
    --color-syntax-string: #D9AE6C;
    --color-syntax-number: #D9AE6C;
    --color-syntax-name: #E9E5DD;
    --color-syntax-unknown: #E38B74;
    --color-syntax-comment: #9C968C;
    --color-shadow: rgba(0, 0, 0, 0.40);
    --color-brand-google-blue: #4285F4;
    --color-brand-google-green: #34A853;
    --color-brand-google-yellow: #FBBC05;
    --color-brand-google-red: #EA4335;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #15191A;
  --color-surface: #1D2224;
  --color-surface-alt: #191D1F;
  --color-surface-side: #171B1C;
  --color-surface-mark: #283033;
  --color-surface-current: #283033;
  --color-accent-soft: #1B2E31;
  --color-text: #E9E5DD;
  --color-text-2: #B8B2A7;
  --color-text-muted: #9C968C;
  --color-text-faint: #6E6A63;
  --color-text-on-accent: #0F1C1E;
  --color-border: #2E3538;
  --color-border-soft: #262C2E;
  --color-border-strong: #3C4447;
  --color-accent: #62B2BE;
  --color-accent-hover: #7CC3CE;
  --color-focus: #62B2BE;
  --color-success: #7FBC88;
  --color-success-bg: #1E2E22;
  --color-error: #E38B74;
  --color-error-bg: #3A2520;
  --color-warning: #D9AE5C;
  --color-warning-bg: #33291A;
  --color-neutral: #3C4447;
  --color-neutral-bg: #191D1F;
  --color-link: #62B2BE;
  --color-link-underline: #2F5A60;
  --color-syntax-keyword: #62B2BE;
  --color-syntax-function: #B3A3E0;
  --color-syntax-string: #D9AE6C;
  --color-syntax-number: #D9AE6C;
  --color-syntax-name: #E9E5DD;
  --color-syntax-unknown: #E38B74;
  --color-syntax-comment: #9C968C;
  --color-shadow: rgba(0, 0, 0, 0.40);
  --color-brand-google-blue: #4285F4;
  --color-brand-google-green: #34A853;
  --color-brand-google-yellow: #FBBC05;
  --color-brand-google-red: #EA4335;
}

/* Rowtrail SQL — base (D.2): the document, type, and the generic components of §15.2 (button, tag, keycap, label, box,
   link, input, data table). Tokens only (build/check-css.js). Raw: D.3 draws the components, C.3b gives them values. */
html { font-size: 100%; height: 100%; }
body { margin: 0; min-height: 100%; background: var(--color-bg); color: var(--color-text); font-family: var(--font-ui); font-size: var(--text-md); line-height: var(--leading-md); }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, ol, ul { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: var(--text-mono-ratio); }
code { background: var(--color-surface-alt); border-radius: var(--radius-sm); padding: 0 var(--space-1); }
.muted { color: var(--color-text-muted); }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
/* F.9 block 3 (session 63): read by screen readers, never seen — the live region of announce() (util.js). */
.sr-only { position: absolute; inline-size: 1rem; block-size: 1rem; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The view takes the keyboard when a new view opens and it has no title to give it to (app.js): no ring around the page. */
.view:focus { outline: none; }

/* Button: primary (one per screen), secondary, tertiary; disabled (§15.2). */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); padding: 0 var(--space-3); border: var(--border-1) solid transparent; border-radius: var(--radius-md); font: inherit; font-family: var(--font-ui); font-size: var(--text-sm); line-height: var(--leading-sm); text-decoration: none; cursor: pointer; background: transparent; color: var(--color-text); }
.btn-primary { background: var(--color-accent); color: var(--color-text-on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-secondary { background: var(--color-surface); border-color: var(--color-border-strong); }
/* Session 43 (Andrea, way A): the tertiary is a thin outline with no fill and text in the normal colour; its rule is
   --color-border, lighter than the secondary's --color-border-strong, so the two grades read apart in grey too. */
.btn-tertiary { border-color: var(--color-border); color: var(--color-text); }
.btn:disabled { opacity: var(--opacity-disabled); cursor: default; }
.btn[aria-pressed="true"] { border-color: var(--color-accent); }

.tag { display: inline-block; font-size: var(--text-xs); line-height: var(--leading-xs); padding: 0 var(--space-2); border: var(--border-1) solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-alt); color: var(--color-text-2); }
.keycap { display: inline-block; min-width: var(--keycap-min-width); text-align: center; font-size: var(--text-xs); border: var(--border-1) solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-alt); color: var(--color-text-muted); }
.label { font-family: var(--font-ui); font-size: var(--text-sm); line-height: var(--leading-sm); font-variant: small-caps; letter-spacing: var(--tracking-label); font-weight: var(--weight-regular); color: var(--color-text-muted); }
.box { border: var(--border-1) solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); background: var(--color-surface); }
.box-dim { background: var(--color-surface-alt); }
.link, a { color: var(--color-link); text-decoration-color: var(--color-link-underline); }
.input { font: inherit; font-size: var(--text-sm); min-height: var(--control-height); padding: 0 var(--space-2); border: var(--border-1) solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); }
.input-num { width: 8em; }

/* Data table (§15.2 "Tabella dei risultati"): rows in excess barred, missing rows muted in italics, marks of a preview. */
.table-wrap { overflow-x: auto; }
.res { border-collapse: collapse; font-family: var(--font-mono); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.res th, .res td { border: var(--border-1) solid var(--color-border-soft); padding: var(--space-1) var(--space-2); text-align: left; vertical-align: top; }
.res th { background: var(--color-surface-alt); font-weight: var(--weight-semibold); }
.res .num { text-align: right; }
.res .cell-null { color: var(--color-text-muted); font-style: italic; }
.res .row-extra td { background: var(--color-surface-mark); color: var(--color-text-muted); text-decoration: line-through; }
.res .row-missing td { color: var(--color-text-muted); font-style: italic; }
.res .is-marked td, .res th.is-marked, .res td[data-mark] { background: var(--color-surface-mark); font-weight: var(--weight-semibold); }
.table-cap { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
/* C.3b: motion only in answer to a gesture, and none at all when the system asks for less. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
/* The «G» of Google (icons.js GOOGLE_G, design-system.md §10.12): its four colours by class, not by a style attribute, so
   the strict security policy of the site and of /app/ (style-src 'self') keeps them (F.8, session 61). */
.ico-google .g-red { fill: var(--color-brand-google-red); }
.ico-google .g-blue { fill: var(--color-brand-google-blue); }
.ico-google .g-yellow { fill: var(--color-brand-google-yellow); }
.ico-google .g-green { fill: var(--color-brand-google-green); }

/* Rowtrail SQL — the public pages outside the tool (F.4 point 5, session 56; design-system.md §10.14): the root of
   rowtrail.com until the landing (F.8), the verification page of a certificate, the 404. tokens.css, fonts.css and
   base.css are the tool's; this file only lays the pages out. Tokens only (build/check-css.js). */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--layout-bar-height); padding: 0 var(--space-4); border-bottom: var(--border-1) solid var(--color-border); background: var(--color-surface-alt); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-reading); font-weight: var(--weight-semibold); color: var(--color-text); text-decoration: none; }
.brand .mark { width: var(--mark-size); height: var(--mark-size); color: var(--color-accent); flex: none; }
.brand-sql { font-family: var(--font-ui); font-weight: var(--weight-regular); color: var(--color-text-muted); }
.site-lang { display: flex; gap: var(--space-1); }
.site-lang button { font: inherit; font-size: var(--text-sm); background: none; border: var(--border-1) solid transparent; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); color: var(--color-text-muted); cursor: pointer; min-height: var(--tap-min); }
.site-lang button[aria-pressed="true"] { color: var(--color-text); border-color: var(--color-border-strong); }
.site-main { flex: 1; width: 100%; max-width: calc(var(--measure-narrow) + 2 * var(--space-4)); margin: 0 auto; padding: var(--space-7) var(--space-4); display: grid; gap: var(--space-5); align-content: start; }
.site-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); line-height: var(--leading-xl); }
.site-lead { font-family: var(--font-reading); font-size: var(--text-lg); line-height: var(--leading-reading); color: var(--color-text-muted); }
.site-foot { padding: var(--space-4); border-top: var(--border-1) solid var(--color-border-soft); font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }

/* The root: the large mark with the name, a sentence, «coming soon». */
.site-hero { display: grid; gap: var(--space-5); }
.site-hero .brand { font-size: var(--text-2xl); gap: var(--space-3); }
.site-hero .brand .mark { width: var(--mark-size-large); height: var(--mark-size-large); }
.site-soon { font-size: var(--text-sm); }

/* The verification: one outcome box (like the verdict, §10.13), the code, what the exam measures; the form to look up. */
.verify-box { border: var(--border-1) solid var(--color-border-strong); border-left-width: var(--border-3); border-radius: var(--radius-md); padding: var(--space-4); display: grid; gap: var(--space-2); background: var(--color-surface); }
.verify-box[data-state="valid"] { border-color: var(--color-success); background: var(--color-success-bg); }
.verify-box[data-state="revoked"] { border-color: var(--color-error); background: var(--color-error-bg); }
.verify-box-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); line-height: var(--leading-xl); }
.verify-name { font-family: var(--font-reading); font-weight: var(--weight-semibold); unicode-bidi: isolate; }
.verify-code { font-family: var(--font-mono); letter-spacing: var(--tracking-label); }
.verify-measure { font-family: var(--font-reading); line-height: var(--leading-reading); color: var(--color-text-muted); }
.verify-form { display: grid; gap: var(--space-2); }
.verify-form-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.verify-form .input { flex: 1 1 14rem; font-family: var(--font-mono); text-transform: uppercase; }

/* The legal pages (F.7, session 60; spec §18.11): /privacy and /terms. Reading matter: the reading face, the reading
   measure, air between the sections. Both languages are in the page; the script marks <html> with .js and the one of
   <html lang> shows. Without the script both show, the Italian text (the one that prevails) first. */
.site-legal { max-width: calc(var(--measure-reading) + 2 * var(--space-4)); }
html.js[lang="en"] .legal[lang="it"], html.js[lang="it"] .legal[lang="en"] { display: none; }
.legal { display: grid; gap: var(--space-4); font-family: var(--font-reading); line-height: var(--leading-reading); }
.legal h1 { font-weight: var(--weight-semibold); font-size: var(--text-xl); line-height: var(--leading-xl); }
.legal h2 { font-weight: var(--weight-semibold); font-size: var(--text-lg); line-height: var(--leading-lg); margin-top: var(--space-5); }
.legal h3 { font-weight: var(--weight-semibold); font-size: var(--text-md); line-height: var(--leading-md); margin-top: var(--space-2); }
.legal ul { display: grid; gap: var(--space-2); padding-left: var(--space-5); }
.legal strong { font-weight: var(--weight-semibold); }
.legal-version { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.site-foot a { color: inherit; }

/* The landing of rowtrail.com (F.8, session 61, second version). Andrea: «la miglior landing possibile», keeping only the
   visual identity: petrol as the one accent, warm paper, the Source family, the mark. The rules of the tool's own screens
   (one primary per view, no large accent surface, no motion that answers no gesture) do not bind this page.
   Colours only from tokens.css; sizes in rem, em, vw and %, no px (build/check-css.js). */

/* ---- frame ---- */
.site-landing { background: var(--color-bg); overflow-x: clip; }
.site-landing .site-foot { font-size: var(--text-md); }
.lp { --wrap: 72rem; --gutter: clamp(1rem, 4vw, 2rem); display: block; }
.lp > section { padding-inline: var(--gutter); }
.lp .reveal { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js-anim .lp .reveal:not(.is-in) { opacity: 0; transform: translateY(1.25rem); }

/* ---- navigation ---- */
.lnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-5); padding: var(--space-3) var(--gutter, clamp(1rem, 4vw, 2rem));
  background: color-mix(in srgb, var(--color-bg) 82%, transparent); backdrop-filter: blur(0.75rem); -webkit-backdrop-filter: blur(0.75rem);
  border-bottom: var(--border-1) solid transparent; transition: border-color var(--dur-base) var(--ease-out); }
.lnav.is-scrolled { border-bottom-color: var(--color-border-soft); }
.lnav .brand { flex: none; }
.lnav-links { display: flex; gap: var(--space-5); margin-inline: auto; }
.lnav-links a { color: var(--color-text-2); text-decoration: none; font-size: var(--text-sm); }
.lnav-links a:hover { color: var(--color-text); }
.lnav-end { display: flex; align-items: center; gap: var(--space-3); flex: none; }
.nav-signin { color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
.nav-start { font-size: var(--text-sm); }

/* ---- hero ---- */
.hero { position: relative; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: var(--space-7); text-align: center; isolation: isolate; }
.hero-bg { position: absolute; inset: 0 0 30% 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 35%, var(--color-text) 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 50% 35%, var(--color-text) 30%, transparent 75%); }
.hero-rows { position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.5rem - 0.0625rem), var(--color-border) calc(2.5rem - 0.0625rem), var(--color-border) 2.5rem),
  repeating-linear-gradient(to right, transparent 0, transparent calc(9rem - 0.0625rem), var(--color-border-soft) calc(9rem - 0.0625rem), var(--color-border-soft) 9rem); }
.hero-trail { position: absolute; left: 0; top: 10rem; height: 2.5rem; width: 100%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-accent) 16%, transparent) 40%, color-mix(in srgb, var(--color-accent) 28%, transparent) 50%, transparent 62%);
  background-size: 200% 100%; animation: trail 7s var(--ease-out) infinite; }
@keyframes trail { from { background-position: 120% 0; } to { background-position: -80% 0; } }
.hero-copy { max-width: 52rem; margin: 0 auto; display: grid; justify-items: center; gap: var(--space-4); }
.pill { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: var(--border-1) solid var(--color-border-strong); border-radius: 999rem;
  background: var(--color-surface); font-size: var(--text-sm); color: var(--color-text-2); }
.pill-dot, .soon-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--color-accent) 18%, transparent); flex: none; }
.hero-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: clamp(2.75rem, 7.2vw, 5.75rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
.hero-title em { display: block; font-style: italic; font-weight: var(--weight-regular); color: var(--color-accent); }
.hero-sub { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); line-height: 1.55; color: var(--color-text-2); max-width: 40rem; margin: 0; }
.cta { display: grid; justify-items: center; gap: var(--space-3); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.btn-big { min-height: 3.25rem; padding-inline: var(--space-5); font-size: var(--text-md); font-weight: var(--weight-semibold); border-radius: var(--radius-lg); }
.btn-provider { display: inline-flex; align-items: center; gap: var(--space-2); }
.btn-provider .ico-google { width: var(--icon-size); height: var(--icon-size); }
.cta-have { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }
.soon { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; color: var(--color-text-2); text-align: center; }
.soon strong { color: var(--color-text); }
.hero-stage { position: relative; max-width: 64rem; margin: clamp(2rem, 4vw, 3rem) auto 0; }
.hero-stage::before { content: ""; position: absolute; inset: 8% 6% -6% 6%; z-index: -1; border-radius: 50%; filter: blur(3rem);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-accent) 22%, transparent), transparent); }
.hero-note { margin: var(--space-4) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- the scene's frame (a window of the tool) ---- */
.frame { position: relative; text-align: left; border: var(--border-1) solid var(--color-border-strong); border-radius: 0.875rem; background: var(--color-surface); overflow: hidden;
  box-shadow: 0 0.125rem 0.25rem var(--color-shadow), 0 1.5rem 3rem -0.75rem var(--color-shadow), 0 3rem 6rem -2rem color-mix(in srgb, var(--color-accent) 22%, transparent); }
.frame-bar { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-2) var(--space-4); background: var(--color-surface-alt); border-bottom: var(--border-1) solid var(--color-border); font-size: var(--text-sm); }
.frame-mark .mark { width: 1.375rem; height: 1.375rem; display: block; }
.frame-tabs { display: flex; gap: var(--space-4); color: var(--color-text-muted); }
.frame-tabs .is-on { color: var(--color-text); font-weight: var(--weight-semibold); box-shadow: inset 0 -0.125rem 0 var(--color-accent); padding-bottom: var(--space-1); }
.frame-body { display: grid; grid-template-columns: 12rem minmax(0, 1fr); min-height: 28rem; }
.frame-schema { background: var(--color-surface-side); border-right: var(--border-1) solid var(--color-border-strong); padding: var(--space-4); display: grid; align-content: start; gap: var(--space-2); }
.sch { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); font-family: var(--font-mono); font-size: var(--text-sm); }
.sch-table { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-md); }
.sch-table.is-open { background: var(--color-surface); box-shadow: inset 0 0 0 var(--border-1) var(--color-border); }
.sch-name { color: var(--color-text); }
.sch-table.is-ref .sch-name { color: var(--color-accent); font-weight: var(--weight-semibold); }
.sch-rows { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.sch-cols { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 var(--space-1) var(--space-3); color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.7; }
.frame-main { padding: var(--space-5); display: grid; align-content: start; gap: var(--space-4); }
.ex { border: var(--border-1) solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.ex-head { display: flex; justify-content: space-between; align-items: baseline; padding: var(--space-3) var(--space-4) 0; }
.ex-task { margin: var(--space-1) 0 0; padding: 0 var(--space-4) var(--space-3); font-family: var(--font-reading); font-size: var(--text-lg); line-height: 1.4; }
.ed { position: relative; margin: 0 var(--space-4) var(--space-4); border: var(--border-1) solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface);
  font-family: var(--font-mono); font-size: var(--text-md); line-height: 1.6; min-height: calc(4 * 1.6em + 2 * var(--space-3)); }
.ed-mirror { margin: 0; padding: var(--space-3) var(--space-4); font: inherit; line-height: inherit; white-space: pre; overflow: hidden; tab-size: 2; color: var(--color-text); }
.ed .caret { display: inline-block; width: 0; height: 1.2em; vertical-align: text-bottom; border-left: 0.125rem solid var(--color-text); margin-right: -0.125rem; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ex-cmds { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: var(--color-surface-alt); border-top: var(--border-1) solid var(--color-border-soft); }
.ex-cmds .btn.is-pressed { transform: translateY(0.0625rem); filter: brightness(0.92); }
.out { display: grid; gap: var(--space-3); min-height: 12rem; align-content: start; }
.out-err { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-left: 0.1875rem solid var(--color-error); background: var(--color-error-bg); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.out-err .label { display: none; }
.out-err.is-past { background: transparent; border-left-color: var(--color-border-strong); color: var(--color-text-muted); }
.out-err.is-past .label { display: block; }
.out-raw { margin: 0; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-error); }
.out-err.is-past .out-raw { color: var(--color-text-muted); }
.out-line { margin: 0; font-size: var(--text-md); }
.out-ok { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: var(--border-1) solid color-mix(in srgb, var(--color-success) 45%, transparent); border-left: 0.1875rem solid var(--color-success); background: var(--color-success-bg); border-radius: var(--radius-md); }
.out-verdict { margin: 0; font-weight: var(--weight-semibold); color: var(--color-success); display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.res { border-collapse: collapse; font-family: var(--font-mono); font-size: var(--text-sm); background: var(--color-surface); width: 100%; }
.res th, .res td { text-align: left; padding: var(--space-1) var(--space-3); border: var(--border-1) solid var(--color-border-soft); }
.res th { background: var(--color-surface-alt); font-weight: var(--weight-semibold); }
.res td.num { text-align: right; font-variant-numeric: tabular-nums; }
.frame .is-waiting { visibility: hidden; }
.tok-keyword { color: var(--color-syntax-keyword); font-weight: var(--weight-semibold); }
.tok-function { color: var(--color-syntax-function); }
.tok-string { color: var(--color-syntax-string); font-style: italic; }
.tok-number { color: var(--color-syntax-number); }
.tok-table, .tok-column { color: var(--color-syntax-name); }
.tok-unknown { color: var(--color-syntax-unknown); text-decoration: underline wavy var(--color-syntax-unknown); }
.tok-comment { color: var(--color-syntax-comment); font-style: italic; }

/* ---- numbers ---- */
.stats { max-width: var(--wrap); margin: var(--space-6) auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5);
  padding-block: var(--space-6); border-block: var(--border-1) solid var(--color-border); }
.stat { display: grid; gap: var(--space-1); justify-items: center; text-align: center; }
.stat-n { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: clamp(2.25rem, 4.5vw, 3.25rem); line-height: 1; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.stat-l { color: var(--color-text-2); font-size: var(--text-sm); max-width: 14rem; }

/* ---- sections ---- */
.sec { position: relative; padding-block: clamp(4rem, 10vw, 7.5rem); }
.sec > * { max-width: var(--wrap); margin-inline: auto; }
.sec-tint::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--color-surface-side); border-block: var(--border-1) solid var(--color-border-soft); }
.lp { position: relative; z-index: 0; }
.eyebrow { font-variant: small-caps; letter-spacing: var(--tracking-label); color: var(--color-accent); font-weight: var(--weight-semibold); font-size: var(--text-md); margin-bottom: var(--space-3); }
.sec-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0 auto var(--space-6) 0; max-width: 24ch; }
.sec > .sec-title, .sec > .eyebrow { margin-left: max(0rem, calc((100% - var(--wrap)) / 2)); }
.sec-lead { font-size: var(--text-lg); line-height: var(--leading-reading); color: var(--color-text-2); max-width: 36rem; }

/* method */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.step { display: grid; align-content: start; gap: var(--space-2); }
.step-vis { height: 12rem; border: var(--border-1) solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); padding: var(--space-4); margin-bottom: var(--space-4); overflow: hidden;
  display: grid; align-content: center; gap: var(--space-2); box-shadow: 0 1rem 2rem -1.5rem var(--color-shadow); }
.step-n { font-family: var(--font-mono); color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }
.step-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); margin: 0; }
.step-text { color: var(--color-text-2); font-size: var(--text-lg); line-height: 1.55; margin: 0; }
.vl-head { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); font-variant: small-caps; letter-spacing: var(--tracking-label); }
.vl-para { margin: 0; font-family: var(--font-reading); font-size: var(--text-md); line-height: 1.5; }
.vl-code { margin: 0; padding: var(--space-2) var(--space-3); background: var(--color-surface-alt); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: var(--text-sm); }
.vt-verdict { margin: 0; display: flex; align-items: center; gap: var(--space-2); color: var(--color-success); font-weight: var(--weight-semibold); }
.vt-check .ico { width: 1.125rem; height: 1.125rem; color: var(--color-success); }
.ve-time { margin: 0; display: grid; justify-items: center; }
.ve-clock { font-family: var(--font-mono); font-size: 2.25rem; font-variant-numeric: tabular-nums; color: var(--color-text); }
.ve-l { font-size: var(--text-sm); color: var(--color-text-muted); }
.ve-dots { margin: var(--space-2) 0 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.375rem; }
.ve-dots i { aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--color-surface-alt); box-shadow: inset 0 0 0 var(--border-1) var(--color-border-strong); }
.ve-dots i.ok { background: var(--color-success-bg); box-shadow: inset 0 0 0 var(--border-1) var(--color-success); }
.ve-dots i.bad { background: var(--color-error-bg); box-shadow: inset 0 0 0 var(--border-1) var(--color-error); }
.ve-dots i.cur { box-shadow: inset 0 0 0 0.125rem var(--color-accent); }

/* shuffled data */
.shuf { position: relative; }
.shuf-seed { position: absolute; right: 0; top: -1.6rem; margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); }
.shuf-table td { transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.shuf.is-swapping .shuf-table td { opacity: 0; transform: translateY(-0.25rem); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.card { background: var(--color-surface); border: var(--border-1) solid var(--color-border); border-radius: 0.875rem; padding: var(--space-5); display: grid; align-content: start; gap: var(--space-2);
  box-shadow: 0 1rem 2rem -1.75rem var(--color-shadow); grid-column: span 2; }
.card-err { grid-column: span 4; grid-row: span 2; }
.card-data, .card-review { grid-column: span 2; }
.card-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); margin: 0; }
.card-text { margin: 0; color: var(--color-text-2); font-size: var(--text-md); line-height: 1.55; }
.card-ico .ico { width: 1.75rem; height: 1.75rem; color: var(--color-accent); }
.errx-stage { position: relative; margin-top: var(--space-4); min-height: 15rem; }
.errx { position: absolute; inset: 0; display: grid; align-content: start; gap: var(--space-3); opacity: 0; transform: translateY(0.5rem); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.errx.is-on { opacity: 1; transform: none; }
.errx-q { margin: 0; padding: var(--space-3) var(--space-4); background: var(--color-surface-alt); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: var(--text-md); line-height: 1.6; }
.errx-raw { margin: 0; display: flex; gap: var(--space-3); align-items: baseline; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-text-muted); }
.errx-ours { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-left: 0.1875rem solid var(--color-accent); background: var(--color-accent-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.errx-ours p { margin: 0; font-size: var(--text-md); }
.errx-ours .errx-tag { margin-bottom: var(--space-1); }
.errx-tag { display: inline-block; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted);
  border: var(--border-1) solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 0 var(--space-1); justify-self: start; }
.errx-tag-ours { color: var(--color-accent); border-color: var(--color-accent); }
.card-data .shuf { margin-top: var(--space-6); }
.rev { margin: var(--space-4) 0 0; display: flex; align-items: baseline; gap: var(--space-2); }
.rev-n { font-family: var(--font-reading); font-size: 3rem; line-height: 1; color: var(--color-accent); font-weight: var(--weight-semibold); }
.rev-l { color: var(--color-text-muted); }

/* path */
#percorso { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-7); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; }
#percorso > * { max-width: none; margin-inline: 0; }
.path-head { position: sticky; top: 6rem; align-self: start; }
.path-head .sec-title { margin-left: 0; }
.path-wrap { display: grid; gap: var(--space-4); }
.path-intro { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-4); align-items: start; padding-bottom: var(--space-4); }
.path { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.path-line { position: absolute; left: 1.5rem; top: 1.5rem; bottom: 1.5rem; width: 0.125rem; background: var(--color-border); transform: translateX(-50%); }
.path-line span { position: absolute; inset: 0; background: var(--color-accent); transform-origin: top; transform: scaleY(var(--progress, 1)); }
.stop { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.stop-n { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); border: 0.125rem solid var(--color-accent);
  font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-lg); color: var(--color-accent); position: relative; z-index: 1; transition: background 400ms var(--ease-out), color 400ms var(--ease-out); }
.stop.is-in .stop-n { background: var(--color-accent); color: var(--color-text-on-accent); }
.stop-n-intro { border-style: dashed; color: var(--color-text-muted); border-color: var(--color-border-strong); }
.stop-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); margin: 0.375rem 0 0; }
.stop-sub { margin: var(--space-1) 0 0; color: var(--color-text-2); font-size: var(--text-md); }
.stop-sql { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.stop-sql code { font-family: var(--font-mono); font-size: var(--text-xs); padding: 0.125rem var(--space-2); border-radius: var(--radius-sm); background: var(--color-accent-soft); color: var(--color-accent); }

/* exam and certificate */
.exam { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-7); align-items: center; }
.exam-copy .sec-title, .exam-copy .eyebrow { margin-left: 0; }
.rules { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.rules li { padding: var(--space-3) var(--space-4); border: var(--border-1) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); font-weight: var(--weight-semibold); }
.exam-text { color: var(--color-text-2); font-size: var(--text-lg); line-height: 1.6; margin: 0 0 var(--space-3); }
.link-arrow { font-weight: var(--weight-semibold); }
.cert-wrap { position: relative; margin: 0; padding-bottom: 4.5rem; }
.cert { aspect-ratio: 1.414; background: var(--color-surface); border-radius: var(--radius-md); padding: 6% 7%; position: relative; display: grid; grid-template-rows: auto 1fr auto auto auto; gap: 2%;
  box-shadow: 0 0 0 var(--border-1) var(--color-border), 0 2rem 4rem -1.5rem var(--color-shadow), 0 0.25rem 0.5rem var(--color-shadow); transform: rotate(-2deg); container-type: inline-size; }
.cert::before { content: ""; position: absolute; inset: 3.5%; border: var(--border-1) solid var(--color-border); border-radius: var(--radius-sm); pointer-events: none; }
.cert-top { display: flex; align-items: center; gap: var(--space-2); }
.cert-mark .mark { width: 5cqi; height: 5cqi; display: block; }
.cert-brand { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: 3.4cqi; }
.cert-brand span { font-family: var(--font-ui); font-weight: var(--weight-regular); color: var(--color-text-muted); }
.cert-kind { margin: 0; align-self: end; font-weight: var(--weight-semibold); color: var(--color-accent); font-size: 2.6cqi; }
.cert-name { margin: 0; font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: 7.5cqi; line-height: 1.1; }
.cert-line { margin: 0; font-family: var(--font-reading); color: var(--color-text-muted); font-size: 2.6cqi; }
.cert-foot { display: flex; justify-content: space-between; align-items: end; border-top: var(--border-1) solid var(--color-border); padding-top: 2.5%; }
.cert-foot dl { display: flex; gap: 6cqi; margin: 0; }
.cert-foot dt { font-size: 1.7cqi; font-weight: var(--weight-semibold); color: var(--color-text-muted); }
.cert-foot dd { margin: 0; font-size: 2.1cqi; white-space: nowrap; }
.cert-qr { width: 11cqi; height: 11cqi; fill: var(--color-text); }
.cert-badge { position: absolute; left: -1rem; bottom: 1.25rem; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--color-surface);
  border: var(--border-1) solid var(--color-success); border-left: 0.25rem solid var(--color-success); border-radius: var(--radius-lg); box-shadow: 0 1rem 2rem -0.75rem var(--color-shadow); }
.cert-badge-ico { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-success-bg); color: var(--color-success); }
.cert-badge-ico .ico { width: 1.125rem; height: 1.125rem; color: var(--color-success); }
.cert-badge strong { display: block; color: var(--color-success); }
.cert-badge-sub { display: block; font-size: var(--text-sm); color: var(--color-text-muted); font-family: var(--font-mono); }
.cert-wrap figcaption { position: absolute; right: 0; bottom: 0; font-size: var(--text-xs); color: var(--color-text-muted); }

/* questions */
.faq { max-width: 48rem; margin-left: max(0rem, calc((100% - var(--wrap)) / 2)); border-top: var(--border-1) solid var(--color-border); }
.faq details { border-bottom: var(--border-1) solid var(--color-border); }
.faq summary { list-style: none; cursor: pointer; padding: var(--space-5) 3rem var(--space-5) 0; position: relative; font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: var(--text-xl); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); font-family: var(--font-ui); font-weight: var(--weight-regular); font-size: 1.75rem; color: var(--color-accent); transition: transform var(--dur-base) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 var(--space-5); color: var(--color-text-2); font-size: var(--text-lg); line-height: var(--leading-reading); max-width: 40rem; }

/* the end: the one large petrol surface of the site */
.end { padding: 0 var(--gutter) clamp(4rem, 8vw, 6rem); }
.end-inner { max-width: var(--wrap); margin: 0 auto; border-radius: 1.25rem; background: var(--color-accent); color: var(--color-text-on-accent); text-align: center; padding: clamp(3rem, 7vw, 5.5rem) var(--space-5);
  display: grid; justify-items: center; gap: var(--space-4); position: relative; overflow: hidden; isolation: isolate; }
.end-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.5rem - 0.0625rem), var(--color-text-on-accent) calc(2.5rem - 0.0625rem), var(--color-text-on-accent) 2.5rem);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, var(--color-text) 0, transparent 80%); mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, var(--color-text) 0, transparent 80%); }
.end-mark .mark { width: 3.5rem; height: 3.5rem; color: var(--color-text-on-accent); }
.end-mark .mark * { stroke: var(--color-text-on-accent); }
.end-mark .mark [fill]:not([fill="none"]) { fill: var(--color-text-on-accent); }
.end-title { font-family: var(--font-reading); font-weight: var(--weight-semibold); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; margin: 0; color: var(--color-text-on-accent); }
.end-sub { margin: 0; font-size: var(--text-lg); opacity: 0.85; }
.end .btn-primary { background: var(--color-surface); color: var(--color-accent); border-color: var(--color-surface); }
.end .btn-primary:hover { background: var(--color-bg); }
.end .btn-secondary { background: transparent; color: var(--color-text-on-accent); border-color: color-mix(in srgb, var(--color-text-on-accent) 50%, transparent); }
.end .cta-have, .end .soon, .end .soon strong { color: var(--color-text-on-accent); }
.end .cta-have a { color: var(--color-text-on-accent); }
.end .soon-dot { background: var(--color-text-on-accent); }

/* ---- narrow screens ---- */
@media (max-width: 56.25em) {
  .lnav-links { display: none; }
  .lnav-end { margin-left: auto; }
  .frame-body { grid-template-columns: minmax(0, 1fr); }
  .frame-schema { display: none; }
  .frame-main { padding: var(--space-3); }
  .frame-tabs span:not(.is-on) { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .exam, #percorso { grid-template-columns: minmax(0, 1fr); }
  .path-head { position: static; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card, .card-err, .card-data, .card-review { grid-column: auto; grid-row: auto; }
  .errx-stage { min-height: 19rem; }
  .cert-badge { left: 0; }
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30em) {
  .nav-start { display: none; }
  .ed { font-size: var(--text-sm); }
}

/* ---- motion off ---- */
@media (prefers-reduced-motion: reduce) {
  .lp .reveal, .errx, .shuf-table td, .stop-n, .lnav { transition: none; }
  .hero-trail, .ed .caret { animation: none; }
  .js-anim .lp .reveal:not(.is-in) { opacity: 1; transform: none; }
}
.frame .ex-cmds { pointer-events: none; }
