/*! Atlas Modern v0.1.0 — front-end framework (HTML, CSS, JS) */
/* ==========================================================================
   Atlas — a front-end framework (HTML, CSS, JS). Entry stylesheet.
   --------------------------------------------------------------------------
   Development: browsers load this file and its @imports as they are.
   Production: `npm run build` inlines everything into dist/atlas.css.

   Cascade layers (later wins, whatever the specificity):
     reset → tokens → theme → base → layout → components → utilities
   A theme (themes/*.css) fills the `theme` layer: brand colours and fonts.
   An application's own stylesheet, loaded after Atlas without a layer,
   wins over every layer.
   ========================================================================== */
@layer reset, tokens, theme, base, layout, components, utilities;

/* ---- css/base/fonts.css ---- */
/* Atlas Modern · Fonts — Inter, self-hosted (no third-party requests: GDPR and a strict CSP).
   Variable font: weight 100–900 and optical size 14–32 (headings get the "Display" cut
   automatically through font-optical-sizing). Two subsets: latin, and latin-ext for ă ș ț.
   Licence: SIL Open Font License 1.1 (fonts/Inter-OFL.txt). Paths are relative to src/css/base/;
   the build rewrites them for dist/atlas.css. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.4b73e2ff3024.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.084b211fc382.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- css/base/reset.css ---- */
/* Atlas · Reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100vh; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  img, picture, video, canvas, iframe { display: block; max-width: 100%; }
  iframe { border: 0; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  :where(ul, ol)[role="list"] { list-style: none; padding: 0; }
  :where(h1, h2, h3, h4, h5, h6, p, li, dd, dt) { overflow-wrap: break-word; }
  :where(a) { color: inherit; }
  table { border-collapse: collapse; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  [hidden] { display: none !important; }
}

/* ---- css/base/tokens.css ---- */
/* Atlas Modern · Tokens — "Vitrina" (spec v1, §2)
   Editorial calm: white and #F5F5F7 planes, graphite type, one confident blue.

   1  Primitives and scheme-free tokens (:root only — a theme overrides the
      primitives in the `theme` layer, never a --color-* token)
   2  Colour, light — the page and any [data-scheme="light"] island
   3  Colour, dark — :root[data-theme="dark"], any [data-scheme="dark"] subtree,
      and the `auto` media block. The dark block and the auto block are
      byte-identical (scripts/check.mjs diffs them and fails the check):
      edit one, copy it to the other.
      Then the light block once more, for the page's own high-contrast mode
      (.a11y-contrast): it must win over a dark theme, so it comes after the
      dark blocks. It is byte-identical to block 2 (check.mjs again).
   4  Aliases — old names that still resolve (deprecated: migrate away);
      the focus colour of dark surfaces ([data-surface="dark"], the stage)
   5  Context registers — the portal is :root; <body data-context="app">
      (or any wrapper) switches to the app register. Only tokens change.
   6  Motion and accessibility modes — Reduce Motion, Reduce Transparency,
      Increase Contrast, forced colours

   Resolution rule: a custom property that references another token resolves
   on the element where it is declared. Whenever a scheme, context or section
   re-declares a base (--color-tile, --color-focus, --color-accent,
   --color-border …), it re-declares the dependents in the same rule
   (--color-tile-hover, --focus-ring, --color-accent-soft, --tile-ring …). */
@layer tokens {
  :root {
    /* ---- 1 · Primitives (neutral defaults — a theme overrides) ------------ */
    /* Brand: graphite. Headings, emblems and the near-black planes. */
    --brand-50: #F5F5F7;  --brand-100: #E8E8ED; --brand-200: #D2D2D7;
    --brand-300: #AEAEB2; --brand-400: #86868B; --brand-500: #6E6E73;
    --brand-600: #48484A; --brand-700: #3A3A3C; --brand-800: #2C2C2E;
    --brand-900: #1D1D1F; --brand-950: #000000;

    /* Accent: one confident blue (marks, numerals, signature contours, glow).
       400 is the blue that reads on black (stage, dark mode). */
    --accent-50: #EEF5FF;  --accent-100: #DCEBFF; --accent-200: #B9D6FE;
    --accent-300: #86B9FC; --accent-400: #2997FF; --accent-500: #0071E3;
    --accent-600: #0066CC; --accent-700: #0058B0; --accent-800: #00478F;
    --accent-900: #003670;

    /* Action: what can be pressed. 500 fill · 600 link and hover · 700 pressed */
    --action-500: #0071E3; --action-600: #0066CC; --action-700: #0058B0;

    --neutral-0: #FFFFFF;   --neutral-25: #F5F5F7;  --neutral-50: #FAFAFC;
    --neutral-100: #FFFFFF; --neutral-150: #F5F5F7; --neutral-200: #E8E8ED;
    --neutral-300: #D2D2D7; --neutral-400: #AEAEB2; --neutral-500: #86868B;

    /* Ink: 700 is muted text (7.3:1 on white), 600 subtle text (5.7:1) */
    --ink-900: #1D1D1F; --ink-700: #56565B; --ink-600: #66666B;
    --shadow-rgb: 0 0 0;

    /* Status text in light mode (on its tint, and as coloured text on any
       plane: deltas, thanks lines): primitives, so a theme with warmer,
       darker planes can deepen them and keep 4.5:1 there (OTN does) */
    --status-info-fg: #0058B9; --status-success-fg: #1E7B34; --status-warning-fg: #9A5700;
    --status-danger-fg: #C7001A; --status-event-fg: #7E3BAD;

    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;

    /* ---- Stage / inverse: the same values in light and dark -------------- */
    --color-inverse: #000000;
    --color-inverse-2: #161617;
    --color-inverse-tile: #1C1C1E;
    --color-inverse-border: rgb(255 255 255 / .12);
    --color-on-inverse: #F5F5F7;                  /* 19.3:1 on black */
    --color-on-inverse-muted: #A1A1A6;            /* 8.2 black · 7.4 glass · 6.6 #1C1C1E */
    --color-on-inverse-subtle: #8E8E93;           /* 6.4 on black */
    --color-on-inverse-accent: #2997FF;           /* 7.0 on black: links and focus on dark surfaces */
    --glass-on-inverse: rgb(255 255 255 / .065);  /* glass tiles and pills on the stage */
    --glass-on-inverse-ring: rgb(255 255 255 / .1);
    --glass-on-inverse-hover: rgb(255 255 255 / .11);
    --material-inverse: rgb(22 22 23 / .72);      /* the header while it sits over the stage */
    --glass-on-inverse-edge: color-mix(in srgb, var(--color-on-inverse) 24%, transparent);    /* the glass pill's edge (.btn--outline-light) */
    --glass-on-inverse-strong: color-mix(in srgb, var(--color-on-inverse) 18%, transparent);  /* … and its hover */
    --material-tooltip: color-mix(in srgb, var(--color-inverse-tile) 88%, transparent);       /* the tooltip bubble, dark in both schemes */
    --color-scrim: color-mix(in srgb, var(--color-inverse) 32%, transparent);                 /* the dialog backdrop */
    /* Signature on the stage: contours and glow re-tint with the theme */
    --topo-line-inverse: rgb(255 255 255 / .05);
    --topo-index-inverse: color-mix(in oklab, var(--accent-400) 28%, transparent);
    --stage-glow-2: color-mix(in oklab, var(--accent-400) 7%, transparent);

    --color-on-primary: #FFFFFF;
    --color-paper: #FFFFFF;                       /* white that stays white in both schemes: a logo's plate, the map's marker ring */
    --color-knob: var(--color-paper);             /* switch and range knobs, the white pill on dark planes: white in light and dark, as on a phone */
    /* The national colours of the official bar's flag: content, not a theme colour */
    --flag-blue: #002B7F; --flag-yellow: #FCD116; --flag-red: #CE1126;
    --color-danger-solid: #D70015;                /* destructive button, danger badge: white 5.38 */
    --color-success-solid: #248A3D;               /* save-status dot */

    /* ---- Type: 17px portal body, display sizes with tight tracking ------- */
    --step--2: .75rem;                                         /* 12 — the floor: no text below it */
    --step--1: .875rem;                                        /* 14 */
    --step-0: 1.0625rem;                                       /* 17 body */
    --step-1: clamp(1.125rem, 1.08rem + .22vw, 1.3125rem);     /* 18 → 21 */
    --step-2: clamp(1.3125rem, 1.16rem + .55vw, 1.75rem);      /* 21 → 28 */
    --step-3: clamp(1.625rem, 1.3rem + 1.15vw, 2.5rem);        /* 26 → 40 */
    --step-4: clamp(2.125rem, 1.35rem + 2.6vw, 3.5rem);        /* 34 → 56 */
    --step-5: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);             /* 40 → 56 */
    --step-6: clamp(2.875rem, 1.2rem + 5.4vw, 5.75rem);        /* 46 → 92, the hero only */
    --lh-display: 1.04;    /* 34px and up — never below 1.02: Ă Î Ș Ț need room */
    --lh-title: 1.1;
    --lh-head: 1.22;       /* block heads */
    --lh-body: 1.5;
    --lh-prose: 1.65;      /* long reading at 17px, on a --measure column */
    --lh-caption: 1.4;
    --lh-ui: 1.15;         /* single-line controls */
    --lh-tight: 1.06; --lh-snug: 1.25;            /* B's names, kept */
    --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
    --fw-display: 650;     /* display sizes of 34px and up; 700 only for badge counts */
    --tracking-display: -.038em;   /* 64px and up */
    --tracking-title: -.03em;      /* 34–63px */
    --tracking-tight: -.018em;     /* 21–33px */
    --tracking-text: -.011em;      /* 17–20px */
    --tracking-snug: -.008em;      /* tables */
    --tracking-ui: -.006em;        /* 14–16px */
    --tracking-small: -.003em;     /* 12–13px */
    --tracking-caps: .06em;        /* the official uppercase line only */
    /* The editorial kicker is the one tracked uppercase label (portal); the
       app re-declares both, so it reads in sentence case there (§5) */
    --kicker-case: uppercase; --kicker-tracking: var(--tracking-caps);
    --tracking-body: var(--tracking-text);        /* body text of the register (17px portal) */
    /* Type roles that differ by register (§2.6 size map). The app re-declares
       them in §5, so a component reads one token and never needs a
       [data-context] selector of its own. */
    --lh-page-title: 1.04;                        /* .page-head__title and h1: portal 1.04 · app 1.08 */
    --tracking-page-title: var(--tracking-title); /* portal −.03em · app −.028em */
    --step-intro: var(--step-1);                  /* page-head intro, lead: portal 18 → 21 · app 16 */
    --step-tile-title: var(--step-2);             /* tile and card titles: portal 21 → 28 · app 17 → 19 */
    --tracking-tile-title: var(--tracking-tight); /* portal −.018em · app −.011em */
    /* h2 at --step-4: a display size on the portal (34 → 56: 650, −.03em,
       1.04), a title in the app (26 → 34: 600, −.018em, 1.1) */
    --h2-weight: var(--fw-display);
    --h2-tracking: var(--tracking-title);
    --h2-lh: var(--lh-display);

    /* ---- Space ------------------------------------------------------------ */
    --space-1: .25rem; --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
    --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem;  --space-10: 2.5rem;
    --space-12: 3rem;  --space-16: 4rem;  --space-20: 5rem;  --space-24: 6rem;

    /* ---- Shape (concentric rule: inner = outer − padding, at least 6px) -- */
    --radius-xs: 6px; --radius-sm: 10px; --radius-md: 12px; --radius-lg: 20px;
    --radius-xl: 28px; --radius-2xl: 36px; --radius-pill: 999px;
    --radius-tile: var(--radius-xl);              /* portal tiles: 28 · app: 20 */
    /* Fixed radii outside the scale (§2.8) */
    --radius-popover: 16px; --radius-toast: 18px; --radius-menu-item: 8px; --radius-palette: 20px; --radius-code: 16px;

    /* ---- Sizes of the register (portal values; the app re-declares) ------ */
    --btn-h: 2.75rem; --btn-h-sm: 2.25rem; --btn-h-lg: 3.25rem;
    --btn-font: 1rem;                             /* button label: 16 portal · 15 app (lg stays 17) */
    --icon-btn: 2.5rem;                           /* icon button: 40 portal · 36 app · 44 on touch */
    --seg-h: 2.25rem;                             /* segmented control, one segment: 36 portal · 32 app */
    --field-h: 3rem;
    --card-pad: clamp(1.5rem, 1.2rem + .9vw, 2rem);
    --page-head-pad-top: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);     /* 36 → 72 (67 at 1440) */
    --page-head-pad-bottom: clamp(1.75rem, 1rem + 2vw, 3rem);      /* 28 → 48 */
    --target-min: 2.75rem;                        /* 44px: every target on a touch screen */

    /* ---- Depth (light; dark has its own set) ------------------------------ */
    --shadow-knob: 0 3px 8px rgb(0 0 0 / .15), 0 1px 1px rgb(0 0 0 / .06), 0 0 0 .5px rgb(0 0 0 / .04);
    --shadow-thumb: 0 1px 2px rgb(0 0 0 / .1), 0 2px 6px rgb(0 0 0 / .06), 0 0 0 .5px rgb(0 0 0 / .04);

    /* ---- Materials: translucent bars and sheets (colours per scheme below) */
    --material-blur: saturate(180%) blur(20px);        /* bars */
    --material-blur-thick: saturate(180%) blur(32px);  /* overlays */

    /* ---- Motion ----------------------------------------------------------- */
    --ease-out: cubic-bezier(.2, .8, .2, 1);       /* UI */
    --ease-spring: cubic-bezier(.32, .72, 0, 1);   /* sheets, panels, knobs, entrances */
    --ease-bounce: cubic-bezier(.34, 1.36, .64, 1);/* toggles and ticks only */
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);   /* ambient motion */
    --ease-exit: cubic-bezier(.4, 0, 1, 1);        /* exits (about 60% of the entrance) */
    --dur-1: 140ms;        /* press, colour */
    --dur-2: 240ms;        /* small overlays, toggles */
    --dur-3: 420ms;        /* panels, sheets, knobs */
    --dur-4: 640ms;        /* entrances */
    --dur-5: 900ms;        /* count-up, contour segments */
    --dur-ambient: 60s; --dur-ambient-2: 84s;
    --stagger: 60ms;       /* at most 6 steps */
    --press-scale: .97;            /* buttons */
    --press-scale-icon: .92;       /* icon buttons */
    --press-scale-chip: .96;       /* chips, segments */
    --press-scale-tile: .985;      /* cards, tiles, rows */
    --lift: -2px;                  /* hover lift of a linked tile */
    --nudge: 3px;                  /* a forward arrow on hover */

    /* ---- Layout ----------------------------------------------------------- */
    --container: 76rem;
    --container-narrow: 46rem;
    --measure: 68ch;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --header-h: 4rem;
    --section-pad: clamp(4.5rem, 2rem + 6.5vw, 8.5rem);      /* 72 → 136 */
    --section-head-gap: clamp(2.25rem, 1.5rem + 2.4vw, 4rem); /* section head → content: 36 → 64 */
    --tile-gap: clamp(.75rem, .45rem + .9vw, 1.25rem);       /* tile grids */
    --sidebar-w: 16.5rem;
    --sidebar-inset: .625rem;
    --aside-w: 20rem;
    --local-nav-h: 3.25rem;                       /* a service's sticky bar (local-nav.css) */
    --record-bar-h: 3.75rem;                      /* a case file's compressed bar and its gap (record-head.css) */
    --sticky-chrome: 0px;                         /* the page's sticky bar: set under a sticky bar (§5) */
    --sticky-top: 0px;                            /* … plus a bar that slid in under it: what sticks goes below both */

    /* ---- Z-index (dialogs and [popover] use the top layer) ---------------- */
    --z-raised: 1; --z-sticky: 6; --z-sidebar: 49; --z-header: 50;
    --z-popover: 60; --z-toast: 70; --z-overlay: 80;
  }

  /* ---- 2 · Colour, light ----------------------------------------------------
     Components read only these. Contrast figures: WCAG, translucent fills
     composited first. Declared on :root and on [data-scheme="light"], so a
     light island inside a dark surface gets the light set back. */
  :root, [data-scheme="light"] {
    --color-bg: var(--neutral-100);               /* the page: white */
    --color-bg-alt: var(--neutral-150);           /* alternate plane: #F5F5F7 */
    --color-surface: var(--neutral-25);           /* panels: code blocks, docs bands, sidebar column */
    --color-surface-raised: var(--neutral-0);     /* app cards, fields */
    --color-elevated: var(--neutral-0);           /* dialogs (opaque) */
    --color-plane: var(--color-bg);               /* the plane under a component (sections set it) */
    --color-tile: var(--neutral-150);             /* portal tile: tone, no border */
    --color-tile-hover: color-mix(in oklab, var(--color-tile), #FFFFFF 55%);
    --color-tile-alt: var(--color-surface-raised);/* a tile on an alternate plane flips to white */
    --color-tile-alt-hover: var(--color-surface-raised);
    --color-chip: initial;                        /* no value: icon discs fall back to the plane */
    --color-chip-raised: var(--color-fill);       /* a disc on a white tile on a white plane (the app's --color-chip) */
    --tile-ring: 0 0 #0000;                       /* the app draws a hairline */
    --tile-shadow: 0 0 #0000;                     /* the app adds --shadow-1 */
    --tile-shadow-hover: var(--shadow-lift);      /* a linked tile under the pointer · app: --shadow-2 */
    --color-row-hover: var(--color-tile-hover);   /* table rows · app: --color-fill-subtle */
    --color-fill-subtle: rgb(116 116 128 / .06);  /* row hover */
    --color-fill: rgb(116 116 128 / .1);          /* secondary button, tracks, chips */
    --color-fill-hover: rgb(116 116 128 / .17);
    --color-field: var(--neutral-0);
    --color-control-border: var(--neutral-500);   /* fields, checks, switch: 3.62 white · 3.33 #F5F5F7 */
    --color-thumb: #FFFFFF;                       /* segmented thumb, switch knob */
    --color-tint: color-mix(in oklab, var(--brand-500) 12%, transparent);   /* neutral tinted tag */
    --color-tint-fg: var(--brand-900);

    --color-heading: var(--ink-900);              /* 16.8:1 */
    --color-text: var(--ink-900);
    --color-text-muted: var(--ink-700);           /* 7.3 white · 6.7 #F5F5F7 · 6.0 on fill */
    --color-text-subtle: var(--ink-600);          /* 5.7 white · 5.2 #F5F5F7 · 4.68 on fill; placeholders */
    /* Text that sits on --color-fill at rest (segments, chips, muted badges,
       input-group addons, a ghost button under the pointer): 4.5:1 or better
       on every plane in both schemes. On --color-fill-hover keep text at
       --color-heading or --color-text (secondary and link colours drop under
       4.5 there over the grey planes). */
    --color-text-subtle-on-fill: var(--color-text-subtle);   /* 5.06 white · 4.67 #F5F5F7 */
    --color-link-on-fill: var(--color-link);                 /* 4.94 white · 4.56 #F5F5F7 */

    --color-border: rgb(0 0 0 / .09);             /* hairlines adapt to the plane under them */
    --color-border-strong: rgb(0 0 0 / .17);

    --color-primary: var(--action-500);           /* white text 4.70 */
    --color-primary-hover: var(--action-600);     /* 5.57: deepens, keeps AA */
    --color-primary-active: var(--action-700);    /* 6.95 */
    --color-link: var(--action-600);              /* 5.57 white · 5.11 #F5F5F7 */
    --color-link-hover: var(--action-700);
    --color-focus: var(--action-500);             /* 3px outline */
    --focus-ring: 0 0 0 4px color-mix(in oklab, var(--color-focus) 28%, transparent);   /* field halo */

    --color-accent: var(--accent-500);            /* lines, tints, ornament: contours, glow, rings (no minimum: a theme's anchor may be light) */
    --color-accent-figure: var(--accent-600);     /* accent you must see: numerals of 24px+, current marks, icons that mean something: 3:1+ on every plane (5.11 · OTN 3.10) */
    --color-accent-strong: var(--accent-700);     /* eyebrows, accent text under 24px (4.5:1+) */
    --color-accent-soft: color-mix(in oklab, var(--color-accent) 10%, transparent);     /* tinted button, selected row */
    --color-accent-soft-hover: color-mix(in oklab, var(--color-accent) 15%, transparent);
    --color-on-accent-soft: var(--accent-700);    /* 6.06 white plane · 5.59 grey plane */
    --color-selected: var(--ink-900);             /* chosen chip, current page: graphite, not blue */
    --color-on-selected: #FFFFFF;

    /* Status (fg / bg / border): every fg 4.9:1 or better on its bg (the fg are primitives: §1) */
    --color-info-bg: #EEF5FF;    --color-info-fg: var(--status-info-fg);       --color-info-border: #CFE2FA;
    --color-success-bg: #EEF8F0; --color-success-fg: var(--status-success-fg); --color-success-border: #C9E8D1;
    --color-warning-bg: #FFF6E8; --color-warning-fg: var(--status-warning-fg); --color-warning-border: #F5DDB6;
    --color-danger-bg: #FFF1F0;  --color-danger-fg: var(--status-danger-fg);   --color-danger-border: #F8CDCB;
    --color-event-bg: #F7F0FC;   --color-event-fg: var(--status-event-fg);    --color-event-border: #E6D3F3;
    /* Status dots (non-text): 3:1 or better on white and on #F5F5F7. The
       neutral dot follows the theme's control edge (OTN #8C8069: 3.16 on its
       #EDE7DC plane; alb #778193: 3.57 on #F2F4F7). */
    --color-dot-ok: #248A3D; --color-dot-warn: #C26A00; --color-dot-danger: #D70015;
    --color-dot-info: #0071E3; --color-dot-neutral: var(--neutral-500);
    --color-warning-solid: var(--color-dot-warn); /* a solid warning disc (toast, confirmation): #C26A00 */
    --color-on-warning-solid: var(--color-elevated);   /* its glyph: white, 3.6:1 */

    /* The drawn basemap (map.css): graphite land and streets, blue water, a
       sage park; water and parks take the info and ok dots, never the accent */
    --basemap-land: color-mix(in oklab, var(--brand-50) 72%, var(--brand-100));
    --basemap-built: color-mix(in oklab, var(--brand-100) 82%, var(--brand-200));
    --basemap-road: var(--neutral-0);
    --basemap-casing: var(--brand-200);
    --basemap-water: color-mix(in oklab, var(--color-dot-info) 21%, var(--neutral-0));
    --basemap-park: color-mix(in oklab, var(--color-dot-ok) 15%, var(--brand-50));

    /* Charts (chart.css, charts.js). Every value comes from the dataviz
       validator (six checks): re-run it before changing one. Categorical:
       fixed order, never cycled, the colour follows the entity. Slot 1 is
       the theme's own blue (--action-500: #0071E3; Cobalt #2149E0 and OTN
       #2563EB validated with the other seven); slots 3, 4 and 5 sit under
       3:1 on white, so a chart always keeps labels or its table (relief).
       Scatter and small multiples: three slots at most (all-pairs check). */
    --chart-1: var(--action-500); --chart-2: #EB6834; --chart-3: #1BAF7A; --chart-4: #EDA100;
    --chart-5: #E87BA4; --chart-6: #008300; --chart-7: #6250D6; --chart-8: #E34948;
    /* Ordinal (funnel stages, tiers, ordered series): one hue, ramp steps
       300–700 (validated with --ordinal: the light end is 2.50:1 on white and
       2.30:1 on #F5F5F7, over the 2:1 floor; adjacent steps ΔL ≥ 0.06). Five
       steps at most: a sixth class shares a step, never a made-up one */
    --chart-ord-1: #6DA7EC; --chart-ord-2: #3987E5; --chart-ord-3: #256ABF; --chart-ord-4: #184F95; --chart-ord-5: #0D366B;
    /* Sequential (heatmaps, calendars): the blue ramp, low → high (100 → 700) */
    --chart-seq-1: #CDE2FB; --chart-seq-2: #B7D3F6; --chart-seq-3: #9EC5F4; --chart-seq-4: #86B6EF;
    --chart-seq-5: #6DA7EC; --chart-seq-6: #5598E7; --chart-seq-7: #3987E5; --chart-seq-8: #2A78D6;
    --chart-seq-9: #256ABF; --chart-seq-10: #1C5CAB; --chart-seq-11: #184F95; --chart-seq-12: #104281;
    --chart-seq-13: #0D366B;
    /* Diverging arms around a neutral grey; de-emphasis ("Altele", context
       series, the sparkline); furniture: gridlines one step off the tile and
       a stronger baseline; the surface that gaps and rings are cut in */
    --chart-div-neg: #E34948; --chart-div-mid: #E8E8ED; --chart-div-pos: #2A78D6;
    --chart-other: #AEAEB2;
    --chart-grid: rgb(0 0 0 / .07); --chart-axis: rgb(0 0 0 / .22);
    --chart-surface: var(--color-tile);

    /* Signature: contour lines on light planes, glow on the stage */
    --topo-line: color-mix(in oklab, var(--color-heading) 6%, transparent);
    --topo-index: color-mix(in oklab, var(--color-accent) 30%, transparent);
    --stage-glow: color-mix(in oklab, var(--color-accent) 26%, transparent);

    /* Materials (never on cards, tables, fields or dialog bodies) */
    --material-bar: rgb(255 255 255 / .74);       /* site header, topbar */
    --material-sidebar: rgb(246 246 248 / .82);   /* floating sidebar panel */
    --material-overlay: rgb(250 250 252 / .88);   /* popovers, menus, toasts, bars that float */

    /* Depth */
    --shadow-1: 0 1px 2px rgb(var(--shadow-rgb) / .05), 0 1px 4px rgb(var(--shadow-rgb) / .04);
    --shadow-2: 0 2px 8px rgb(var(--shadow-rgb) / .04), 0 16px 36px -10px rgb(var(--shadow-rgb) / .14);
    --shadow-3: 0 4px 14px rgb(var(--shadow-rgb) / .06), 0 30px 70px -14px rgb(var(--shadow-rgb) / .26);
    --shadow-lift: 0 2px 6px rgb(var(--shadow-rgb) / .04), 0 18px 40px -16px rgb(var(--shadow-rgb) / .2);

    color-scheme: light;
  }

  /* ---- 3 · Colour, dark — true black, #1C1C1E and #2C2C2E elevation ---------
     The same names. [data-scheme="dark"] renders any subtree with this set:
     the header and official bar over the stage, the figures band, the auth
     panel. Keep this block and the auto block below byte-identical. */
  :root[data-theme="dark"], [data-scheme="dark"] {
    --color-bg: #000000;
    --color-bg-alt: #101012;
    --color-surface: #161617;
    --color-surface-raised: #1C1C1E;
    --color-elevated: #2C2C2E;
    --color-plane: var(--color-bg);
    --color-tile: #1C1C1E;
    --color-tile-hover: #242426;
    --color-tile-alt: #1C1C1E;
    --color-tile-alt-hover: #242426;
    --color-chip: #2C2C2E;
    --color-chip-raised: #2C2C2E;
    --tile-shadow-hover: var(--shadow-lift);
    --color-row-hover: var(--color-tile-hover);
    --color-fill-subtle: rgb(118 118 128 / .16);
    --color-fill: rgb(118 118 128 / .24);
    --color-fill-hover: rgb(118 118 128 / .34);
    --color-field: rgb(255 255 255 / .05);
    --color-control-border: #808086;
    --color-thumb: #636366;
    --color-tint: rgb(255 255 255 / .08);
    --color-tint-fg: #F5F5F7;
    --color-heading: #F5F5F7;
    --color-text: #E8E8ED;
    --color-text-muted: #AEAEB2;
    --color-text-subtle: #A1A1A6;
    --color-text-subtle-on-fill: var(--color-text-muted);
    --color-link-on-fill: var(--color-link-hover);
    --color-border: rgb(255 255 255 / .1);
    --color-border-strong: rgb(255 255 255 / .18);
    --color-primary: #0071E3;
    --color-primary-hover: #0068D6;
    --color-primary-active: #005EC4;
    --color-link: #2997FF;
    --color-link-hover: #5AB0FF;
    --color-focus: #2997FF;
    --focus-ring: 0 0 0 4px color-mix(in oklab, var(--color-focus) 32%, transparent);
    --color-accent: #2997FF;
    --color-accent-figure: #2997FF;
    --color-accent-strong: #6CB4FF;
    --color-accent-soft: color-mix(in oklab, var(--color-accent) 18%, transparent);
    --color-accent-soft-hover: color-mix(in oklab, var(--color-accent) 26%, transparent);
    --color-on-accent-soft: #7ABBFF;
    --color-selected: #F5F5F7;
    --color-on-selected: #000000;
    --color-info-bg: rgb(10 132 255 / .14);   --color-info-fg: #6CB4FF;    --color-info-border: rgb(10 132 255 / .32);
    --color-success-bg: rgb(48 209 88 / .12); --color-success-fg: #4ADE7B; --color-success-border: rgb(48 209 88 / .28);
    --color-warning-bg: rgb(255 159 10 / .13); --color-warning-fg: #FFB340; --color-warning-border: rgb(255 159 10 / .3);
    --color-danger-bg: rgb(255 69 58 / .14);  --color-danger-fg: #FF7A72;  --color-danger-border: rgb(255 69 58 / .32);
    --color-event-bg: rgb(191 90 242 / .15);  --color-event-fg: #D69CFA;  --color-event-border: rgb(191 90 242 / .32);
    --color-dot-ok: #30D158; --color-dot-warn: #FF9F0A; --color-dot-danger: #FF453A;
    --color-dot-info: #0A84FF; --color-dot-neutral: #8E8E93;
    --color-warning-solid: var(--color-dot-warn);
    --color-on-warning-solid: var(--color-elevated);
    --basemap-land: color-mix(in oklab, var(--color-surface) 80%, var(--color-bg));
    --basemap-built: color-mix(in oklab, var(--color-surface-raised) 70%, var(--color-elevated));
    --basemap-road: color-mix(in oklab, var(--color-elevated) 80%, var(--color-control-border));
    --basemap-casing: var(--color-bg);
    --basemap-water: color-mix(in oklab, var(--color-dot-info) 28%, var(--color-surface));
    --basemap-park: color-mix(in oklab, var(--color-dot-ok) 13%, var(--color-surface));
    --chart-1: #2997FF; --chart-2: #D95926; --chart-3: #199E70; --chart-4: #C98500;
    --chart-5: #D55181; --chart-6: #008300; --chart-7: #9085E9; --chart-8: #E66767;
    --chart-ord-1: #184F95; --chart-ord-2: #256ABF; --chart-ord-3: #3987E5; --chart-ord-4: #6DA7EC; --chart-ord-5: #9EC5F4;
    --chart-seq-1: #0D366B; --chart-seq-2: #104281; --chart-seq-3: #184F95; --chart-seq-4: #1C5CAB;
    --chart-seq-5: #256ABF; --chart-seq-6: #2A78D6; --chart-seq-7: #3987E5; --chart-seq-8: #5598E7;
    --chart-seq-9: #6DA7EC; --chart-seq-10: #86B6EF; --chart-seq-11: #9EC5F4; --chart-seq-12: #B7D3F6;
    --chart-seq-13: #CDE2FB;
    --chart-div-neg: #E66767; --chart-div-mid: #3A3A3C; --chart-div-pos: #3987E5;
    --chart-other: #636366;
    --chart-grid: rgb(255 255 255 / .09); --chart-axis: rgb(255 255 255 / .24);
    --chart-surface: var(--color-tile);
    --topo-line: rgb(255 255 255 / .05);
    --topo-index: color-mix(in oklab, var(--accent-400) 30%, transparent);
    --stage-glow: color-mix(in oklab, var(--accent-500) 26%, transparent);
    --material-bar: rgb(22 22 23 / .72);
    --material-sidebar: rgb(28 28 30 / .78);
    --material-overlay: rgb(36 36 38 / .86);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .5);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .4), 0 16px 36px -10px rgb(0 0 0 / .6);
    --shadow-3: 0 0 0 .5px rgb(255 255 255 / .08), 0 30px 70px -14px rgb(0 0 0 / .8);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
  }

  /* Automatic: <html data-theme="auto"> follows the operating system.
     (The declarations keep the dark block's indentation, so the two bodies
     stay byte-identical.) */
  @media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
    --color-bg: #000000;
    --color-bg-alt: #101012;
    --color-surface: #161617;
    --color-surface-raised: #1C1C1E;
    --color-elevated: #2C2C2E;
    --color-plane: var(--color-bg);
    --color-tile: #1C1C1E;
    --color-tile-hover: #242426;
    --color-tile-alt: #1C1C1E;
    --color-tile-alt-hover: #242426;
    --color-chip: #2C2C2E;
    --color-chip-raised: #2C2C2E;
    --tile-shadow-hover: var(--shadow-lift);
    --color-row-hover: var(--color-tile-hover);
    --color-fill-subtle: rgb(118 118 128 / .16);
    --color-fill: rgb(118 118 128 / .24);
    --color-fill-hover: rgb(118 118 128 / .34);
    --color-field: rgb(255 255 255 / .05);
    --color-control-border: #808086;
    --color-thumb: #636366;
    --color-tint: rgb(255 255 255 / .08);
    --color-tint-fg: #F5F5F7;
    --color-heading: #F5F5F7;
    --color-text: #E8E8ED;
    --color-text-muted: #AEAEB2;
    --color-text-subtle: #A1A1A6;
    --color-text-subtle-on-fill: var(--color-text-muted);
    --color-link-on-fill: var(--color-link-hover);
    --color-border: rgb(255 255 255 / .1);
    --color-border-strong: rgb(255 255 255 / .18);
    --color-primary: #0071E3;
    --color-primary-hover: #0068D6;
    --color-primary-active: #005EC4;
    --color-link: #2997FF;
    --color-link-hover: #5AB0FF;
    --color-focus: #2997FF;
    --focus-ring: 0 0 0 4px color-mix(in oklab, var(--color-focus) 32%, transparent);
    --color-accent: #2997FF;
    --color-accent-figure: #2997FF;
    --color-accent-strong: #6CB4FF;
    --color-accent-soft: color-mix(in oklab, var(--color-accent) 18%, transparent);
    --color-accent-soft-hover: color-mix(in oklab, var(--color-accent) 26%, transparent);
    --color-on-accent-soft: #7ABBFF;
    --color-selected: #F5F5F7;
    --color-on-selected: #000000;
    --color-info-bg: rgb(10 132 255 / .14);   --color-info-fg: #6CB4FF;    --color-info-border: rgb(10 132 255 / .32);
    --color-success-bg: rgb(48 209 88 / .12); --color-success-fg: #4ADE7B; --color-success-border: rgb(48 209 88 / .28);
    --color-warning-bg: rgb(255 159 10 / .13); --color-warning-fg: #FFB340; --color-warning-border: rgb(255 159 10 / .3);
    --color-danger-bg: rgb(255 69 58 / .14);  --color-danger-fg: #FF7A72;  --color-danger-border: rgb(255 69 58 / .32);
    --color-event-bg: rgb(191 90 242 / .15);  --color-event-fg: #D69CFA;  --color-event-border: rgb(191 90 242 / .32);
    --color-dot-ok: #30D158; --color-dot-warn: #FF9F0A; --color-dot-danger: #FF453A;
    --color-dot-info: #0A84FF; --color-dot-neutral: #8E8E93;
    --color-warning-solid: var(--color-dot-warn);
    --color-on-warning-solid: var(--color-elevated);
    --basemap-land: color-mix(in oklab, var(--color-surface) 80%, var(--color-bg));
    --basemap-built: color-mix(in oklab, var(--color-surface-raised) 70%, var(--color-elevated));
    --basemap-road: color-mix(in oklab, var(--color-elevated) 80%, var(--color-control-border));
    --basemap-casing: var(--color-bg);
    --basemap-water: color-mix(in oklab, var(--color-dot-info) 28%, var(--color-surface));
    --basemap-park: color-mix(in oklab, var(--color-dot-ok) 13%, var(--color-surface));
    --chart-1: #2997FF; --chart-2: #D95926; --chart-3: #199E70; --chart-4: #C98500;
    --chart-5: #D55181; --chart-6: #008300; --chart-7: #9085E9; --chart-8: #E66767;
    --chart-ord-1: #184F95; --chart-ord-2: #256ABF; --chart-ord-3: #3987E5; --chart-ord-4: #6DA7EC; --chart-ord-5: #9EC5F4;
    --chart-seq-1: #0D366B; --chart-seq-2: #104281; --chart-seq-3: #184F95; --chart-seq-4: #1C5CAB;
    --chart-seq-5: #256ABF; --chart-seq-6: #2A78D6; --chart-seq-7: #3987E5; --chart-seq-8: #5598E7;
    --chart-seq-9: #6DA7EC; --chart-seq-10: #86B6EF; --chart-seq-11: #9EC5F4; --chart-seq-12: #B7D3F6;
    --chart-seq-13: #CDE2FB;
    --chart-div-neg: #E66767; --chart-div-mid: #3A3A3C; --chart-div-pos: #3987E5;
    --chart-other: #636366;
    --chart-grid: rgb(255 255 255 / .09); --chart-axis: rgb(255 255 255 / .24);
    --chart-surface: var(--color-tile);
    --topo-line: rgb(255 255 255 / .05);
    --topo-index: color-mix(in oklab, var(--accent-400) 30%, transparent);
    --stage-glow: color-mix(in oklab, var(--accent-500) 26%, transparent);
    --material-bar: rgb(22 22 23 / .72);
    --material-sidebar: rgb(28 28 30 / .78);
    --material-overlay: rgb(36 36 38 / .86);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .5);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .4), 0 16px 36px -10px rgb(0 0 0 / .6);
    --shadow-3: 0 0 0 .5px rgb(255 255 255 / .08), 0 30px 70px -14px rgb(0 0 0 / .8);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
    }
  }

  /* The page's own high-contrast mode (.a11y-contrast on <html> or <body>,
     utilities.css) starts from the light set whatever the theme: black on
     white is its point, and the dark set would leave dark materials, light
     status colours and a dark color-scheme under black text.
     :root.a11y-contrast has the specificity of :root[data-theme="dark"] and
     comes after it (and after the auto block), so it wins; a dark island
     ([data-scheme="dark"]) inside keeps its own set. The declarations are
     block 2 byte for byte: edit block 2, copy it here (check.mjs compares
     the two). utilities.css sets the high-contrast values on top. */
  :root.a11y-contrast, .a11y-contrast {
    --color-bg: var(--neutral-100);               /* the page: white */
    --color-bg-alt: var(--neutral-150);           /* alternate plane: #F5F5F7 */
    --color-surface: var(--neutral-25);           /* panels: code blocks, docs bands, sidebar column */
    --color-surface-raised: var(--neutral-0);     /* app cards, fields */
    --color-elevated: var(--neutral-0);           /* dialogs (opaque) */
    --color-plane: var(--color-bg);               /* the plane under a component (sections set it) */
    --color-tile: var(--neutral-150);             /* portal tile: tone, no border */
    --color-tile-hover: color-mix(in oklab, var(--color-tile), #FFFFFF 55%);
    --color-tile-alt: var(--color-surface-raised);/* a tile on an alternate plane flips to white */
    --color-tile-alt-hover: var(--color-surface-raised);
    --color-chip: initial;                        /* no value: icon discs fall back to the plane */
    --color-chip-raised: var(--color-fill);       /* a disc on a white tile on a white plane (the app's --color-chip) */
    --tile-ring: 0 0 #0000;                       /* the app draws a hairline */
    --tile-shadow: 0 0 #0000;                     /* the app adds --shadow-1 */
    --tile-shadow-hover: var(--shadow-lift);      /* a linked tile under the pointer · app: --shadow-2 */
    --color-row-hover: var(--color-tile-hover);   /* table rows · app: --color-fill-subtle */
    --color-fill-subtle: rgb(116 116 128 / .06);  /* row hover */
    --color-fill: rgb(116 116 128 / .1);          /* secondary button, tracks, chips */
    --color-fill-hover: rgb(116 116 128 / .17);
    --color-field: var(--neutral-0);
    --color-control-border: var(--neutral-500);   /* fields, checks, switch: 3.62 white · 3.33 #F5F5F7 */
    --color-thumb: #FFFFFF;                       /* segmented thumb, switch knob */
    --color-tint: color-mix(in oklab, var(--brand-500) 12%, transparent);   /* neutral tinted tag */
    --color-tint-fg: var(--brand-900);

    --color-heading: var(--ink-900);              /* 16.8:1 */
    --color-text: var(--ink-900);
    --color-text-muted: var(--ink-700);           /* 7.3 white · 6.7 #F5F5F7 · 6.0 on fill */
    --color-text-subtle: var(--ink-600);          /* 5.7 white · 5.2 #F5F5F7 · 4.68 on fill; placeholders */
    /* Text that sits on --color-fill at rest (segments, chips, muted badges,
       input-group addons, a ghost button under the pointer): 4.5:1 or better
       on every plane in both schemes. On --color-fill-hover keep text at
       --color-heading or --color-text (secondary and link colours drop under
       4.5 there over the grey planes). */
    --color-text-subtle-on-fill: var(--color-text-subtle);   /* 5.06 white · 4.67 #F5F5F7 */
    --color-link-on-fill: var(--color-link);                 /* 4.94 white · 4.56 #F5F5F7 */

    --color-border: rgb(0 0 0 / .09);             /* hairlines adapt to the plane under them */
    --color-border-strong: rgb(0 0 0 / .17);

    --color-primary: var(--action-500);           /* white text 4.70 */
    --color-primary-hover: var(--action-600);     /* 5.57: deepens, keeps AA */
    --color-primary-active: var(--action-700);    /* 6.95 */
    --color-link: var(--action-600);              /* 5.57 white · 5.11 #F5F5F7 */
    --color-link-hover: var(--action-700);
    --color-focus: var(--action-500);             /* 3px outline */
    --focus-ring: 0 0 0 4px color-mix(in oklab, var(--color-focus) 28%, transparent);   /* field halo */

    --color-accent: var(--accent-500);            /* lines, tints, ornament: contours, glow, rings (no minimum: a theme's anchor may be light) */
    --color-accent-figure: var(--accent-600);     /* accent you must see: numerals of 24px+, current marks, icons that mean something: 3:1+ on every plane (5.11 · OTN 3.10) */
    --color-accent-strong: var(--accent-700);     /* eyebrows, accent text under 24px (4.5:1+) */
    --color-accent-soft: color-mix(in oklab, var(--color-accent) 10%, transparent);     /* tinted button, selected row */
    --color-accent-soft-hover: color-mix(in oklab, var(--color-accent) 15%, transparent);
    --color-on-accent-soft: var(--accent-700);    /* 6.06 white plane · 5.59 grey plane */
    --color-selected: var(--ink-900);             /* chosen chip, current page: graphite, not blue */
    --color-on-selected: #FFFFFF;

    /* Status (fg / bg / border): every fg 4.9:1 or better on its bg (the fg are primitives: §1) */
    --color-info-bg: #EEF5FF;    --color-info-fg: var(--status-info-fg);       --color-info-border: #CFE2FA;
    --color-success-bg: #EEF8F0; --color-success-fg: var(--status-success-fg); --color-success-border: #C9E8D1;
    --color-warning-bg: #FFF6E8; --color-warning-fg: var(--status-warning-fg); --color-warning-border: #F5DDB6;
    --color-danger-bg: #FFF1F0;  --color-danger-fg: var(--status-danger-fg);   --color-danger-border: #F8CDCB;
    --color-event-bg: #F7F0FC;   --color-event-fg: var(--status-event-fg);    --color-event-border: #E6D3F3;
    /* Status dots (non-text): 3:1 or better on white and on #F5F5F7. The
       neutral dot follows the theme's control edge (OTN #8C8069: 3.16 on its
       #EDE7DC plane; alb #778193: 3.57 on #F2F4F7). */
    --color-dot-ok: #248A3D; --color-dot-warn: #C26A00; --color-dot-danger: #D70015;
    --color-dot-info: #0071E3; --color-dot-neutral: var(--neutral-500);
    --color-warning-solid: var(--color-dot-warn); /* a solid warning disc (toast, confirmation): #C26A00 */
    --color-on-warning-solid: var(--color-elevated);   /* its glyph: white, 3.6:1 */

    /* The drawn basemap (map.css): graphite land and streets, blue water, a
       sage park; water and parks take the info and ok dots, never the accent */
    --basemap-land: color-mix(in oklab, var(--brand-50) 72%, var(--brand-100));
    --basemap-built: color-mix(in oklab, var(--brand-100) 82%, var(--brand-200));
    --basemap-road: var(--neutral-0);
    --basemap-casing: var(--brand-200);
    --basemap-water: color-mix(in oklab, var(--color-dot-info) 21%, var(--neutral-0));
    --basemap-park: color-mix(in oklab, var(--color-dot-ok) 15%, var(--brand-50));

    /* Charts (chart.css, charts.js). Every value comes from the dataviz
       validator (six checks): re-run it before changing one. Categorical:
       fixed order, never cycled, the colour follows the entity. Slot 1 is
       the theme's own blue (--action-500: #0071E3; Cobalt #2149E0 and OTN
       #2563EB validated with the other seven); slots 3, 4 and 5 sit under
       3:1 on white, so a chart always keeps labels or its table (relief).
       Scatter and small multiples: three slots at most (all-pairs check). */
    --chart-1: var(--action-500); --chart-2: #EB6834; --chart-3: #1BAF7A; --chart-4: #EDA100;
    --chart-5: #E87BA4; --chart-6: #008300; --chart-7: #6250D6; --chart-8: #E34948;
    /* Ordinal (funnel stages, tiers, ordered series): one hue, ramp steps
       300–700 (validated with --ordinal: the light end is 2.50:1 on white and
       2.30:1 on #F5F5F7, over the 2:1 floor; adjacent steps ΔL ≥ 0.06). Five
       steps at most: a sixth class shares a step, never a made-up one */
    --chart-ord-1: #6DA7EC; --chart-ord-2: #3987E5; --chart-ord-3: #256ABF; --chart-ord-4: #184F95; --chart-ord-5: #0D366B;
    /* Sequential (heatmaps, calendars): the blue ramp, low → high (100 → 700) */
    --chart-seq-1: #CDE2FB; --chart-seq-2: #B7D3F6; --chart-seq-3: #9EC5F4; --chart-seq-4: #86B6EF;
    --chart-seq-5: #6DA7EC; --chart-seq-6: #5598E7; --chart-seq-7: #3987E5; --chart-seq-8: #2A78D6;
    --chart-seq-9: #256ABF; --chart-seq-10: #1C5CAB; --chart-seq-11: #184F95; --chart-seq-12: #104281;
    --chart-seq-13: #0D366B;
    /* Diverging arms around a neutral grey; de-emphasis ("Altele", context
       series, the sparkline); furniture: gridlines one step off the tile and
       a stronger baseline; the surface that gaps and rings are cut in */
    --chart-div-neg: #E34948; --chart-div-mid: #E8E8ED; --chart-div-pos: #2A78D6;
    --chart-other: #AEAEB2;
    --chart-grid: rgb(0 0 0 / .07); --chart-axis: rgb(0 0 0 / .22);
    --chart-surface: var(--color-tile);

    /* Signature: contour lines on light planes, glow on the stage */
    --topo-line: color-mix(in oklab, var(--color-heading) 6%, transparent);
    --topo-index: color-mix(in oklab, var(--color-accent) 30%, transparent);
    --stage-glow: color-mix(in oklab, var(--color-accent) 26%, transparent);

    /* Materials (never on cards, tables, fields or dialog bodies) */
    --material-bar: rgb(255 255 255 / .74);       /* site header, topbar */
    --material-sidebar: rgb(246 246 248 / .82);   /* floating sidebar panel */
    --material-overlay: rgb(250 250 252 / .88);   /* popovers, menus, toasts, bars that float */

    /* Depth */
    --shadow-1: 0 1px 2px rgb(var(--shadow-rgb) / .05), 0 1px 4px rgb(var(--shadow-rgb) / .04);
    --shadow-2: 0 2px 8px rgb(var(--shadow-rgb) / .04), 0 16px 36px -10px rgb(var(--shadow-rgb) / .14);
    --shadow-3: 0 4px 14px rgb(var(--shadow-rgb) / .06), 0 30px 70px -14px rgb(var(--shadow-rgb) / .26);
    --shadow-lift: 0 2px 6px rgb(var(--shadow-rgb) / .04), 0 18px 40px -16px rgb(var(--shadow-rgb) / .2);

    color-scheme: light;
  }

  /* ---- 4 · Aliases ----------------------------------------------------------
     Names from base B (and the grafts from A) that components still read.
     Declared on every element that re-declares their base (the root, scheme
     islands, dark surfaces, the high-contrast mode on <body>), so they
     always follow it. All deprecated: components migrate to the target name. */
  :root, [data-scheme], [data-surface], .a11y-contrast {
    --color-field-border: var(--color-control-border);   /* deprecated alias → --color-control-border */
    --color-switch-off: var(--color-control-border);     /* deprecated alias: B's solid switch track (3:1); the iOS switch uses --color-fill-hover + a --color-control-border ring */
    --color-surface-overlay: var(--color-elevated);      /* deprecated alias (A) → --color-elevated */
    --color-fill-strong: var(--color-fill-hover);        /* deprecated alias (A) → --color-fill-hover */
    --color-inverse-deep: var(--color-inverse);          /* deprecated alias (B) → --color-inverse */
    --focus-halo: var(--focus-ring);                     /* deprecated alias (A) → --focus-ring */
    --material-bg: var(--material-bar);                  /* deprecated alias (B) → --material-bar */
    --material-bg-strong: var(--material-overlay);       /* deprecated alias (B) → --material-overlay */
    --material-filter: var(--material-blur);             /* deprecated alias (B) → --material-blur */
    --radius-control: var(--radius-md);                  /* deprecated alias (A) → --radius-md */
  }

  /* A dark surface that is not a scheme island (the stage hero carries
     data-surface="dark" and keeps the light set for its own tokens) still
     needs the focus blue that reads on black: 6.96:1 on black, 6.28:1 on
     glass. Dark scheme islands get the same #2997FF from the dark block.
     Forced colours (§6) replace both with Highlight. */
  [data-surface="dark"] {
    --color-focus: var(--color-on-inverse-accent);
    --focus-ring: 0 0 0 4px color-mix(in oklab, var(--color-focus) 32%, transparent);
  }

  /* ---- 5 · Context registers -------------------------------------------------
     The portal is editorial (17px body, big type, toned tiles). The app is
     instrumental: 16px body, a 32–40px large title, white tiles with a
     hairline ring and a whisper shadow, 40px controls.
     Context changes tokens only: every value that differs between the two
     registers is a token declared on :root (portal) and re-declared here, so
     no component writes a [data-context] rule of its own. A token that
     references another one is re-declared next to it (resolution rule):
     --step-intro and --step-tile-title follow this rule's --step-0/-1. */
  [data-context="app"] {
    --step-0: 1rem;                                            /* 16 */
    --step-1: clamp(1.0625rem, 1.03rem + .15vw, 1.1875rem);    /* 17 → 19 */
    --step-2: clamp(1.1875rem, 1.12rem + .3vw, 1.375rem);      /* 19 → 22 */
    --step-3: clamp(1.375rem, 1.25rem + .5vw, 1.625rem);       /* 22 → 26 */
    --step-4: clamp(1.625rem, 1.35rem + .9vw, 2.125rem);       /* 26 → 34 */
    --step-5: clamp(2rem, 1.62rem + 1.15vw, 2.5rem);           /* 32 → 40: the large title */
    --lh-body: 1.55;
    --tracking-body: var(--tracking-ui);
    --lh-page-title: 1.08;
    --tracking-page-title: -.028em;
    --h2-weight: var(--fw-semibold);                           /* h2 26 → 34: a title, not a display size */
    --h2-tracking: var(--tracking-tight);
    --h2-lh: var(--lh-title);
    --step-intro: var(--step-0);                               /* 16 */
    --step-tile-title: var(--step-1);                          /* 17 → 19 */
    --tracking-tile-title: var(--tracking-text);
    --radius-tile: var(--radius-lg);
    --btn-h: 2.5rem; --btn-h-sm: 2rem; --btn-h-lg: 3rem;
    --btn-font: .9375rem;                                      /* 15 */
    --icon-btn: 2.25rem;                                       /* 36 */
    --seg-h: 2rem;                                             /* 32 */
    --field-h: 2.75rem;
    --card-pad: clamp(1.25rem, 1rem + .6vw, 1.5rem);
    --page-head-pad-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);    /* 28 → 44 (42 at 1440) */
    --page-head-pad-bottom: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);  /* 24 → 36 */
    --kicker-case: none; --kicker-tracking: var(--tracking-small);
  }
  /* Colour-dependent register tokens: also on scheme islands inside the app,
     so a dark (or light) island keeps the app's tiles. A disc on a white
     tile needs a tone of its own (--color-chip-raised: the fill in light,
     #2C2C2E in dark, as everywhere in dark). */
  [data-context="app"], [data-context="app"] [data-scheme] {
    --color-tile: var(--color-surface-raised);
    --color-tile-hover: var(--color-surface-raised);
    --chart-surface: var(--color-tile);           /* resolution rule: re-declared with the tile */
    --color-chip: var(--color-chip-raised);
    --tile-ring: 0 0 0 1px var(--color-border);
    --tile-shadow: var(--shadow-1);
    --tile-shadow-hover: var(--shadow-2);
    --color-row-hover: var(--color-fill-subtle);
  }
  /* Touch: 44px targets. Buttons of the app grow; icon buttons reach 44px in
     every context (§3.1, K8). */
  @media (pointer: coarse) {
    :root, [data-context="app"] { --icon-btn: var(--target-min); }
    [data-context="app"] { --btn-h: var(--target-min); }
  }

  /* The page's sticky chrome, for what sticks under it: set by each shell —
     the content that follows a sticky site header or topbar, and the app
     shell (its topbar sticks). --sticky-chrome is the bar itself (the record
     bar hangs from it); --sticky-top adds a bar that has slid in under it, so
     a side column, table heads, group heads and the inspector stay clear of
     both (header.js and record.js set the state classes on <html>: the local
     nav of a service page, the record bar of a case file). */
  .site-header ~ *, .topbar--sticky ~ *, .app-shell {
    --sticky-chrome: var(--header-h);
    --sticky-top: calc(var(--sticky-chrome) + var(--sticky-extra, 0px));
  }
  :root.has-local-nav { --sticky-extra: var(--local-nav-h); --header-shadow: none; }
  :root.has-record-bar { --sticky-extra: var(--record-bar-h); }

  /* ---- 6 · Motion and accessibility modes ----------------------------------- */
  /* Reduce Motion: presses, lifts and nudges become colour-only changes
     (base.css also stops every animation and transition). */
  @media (prefers-reduced-motion: reduce) {
    :root {
      --press-scale: 1; --press-scale-icon: 1; --press-scale-chip: 1; --press-scale-tile: 1;
      --lift: 0px; --nudge: 0px;
    }
  }
  /* Reduce Transparency: materials become opaque, nothing blurs. A token
     re-declared here takes its siblings along (the glass hover steps up
     from the opaque glass, as #2C2C2E above #1C1C1E). */
  @media (prefers-reduced-transparency: reduce) {
    :root, :root[data-theme], :root.a11y-contrast, [data-scheme], .a11y-contrast {
      --material-bar: var(--color-bg); --material-sidebar: var(--color-surface);
      --material-overlay: var(--color-elevated); --material-inverse: #161617;
      --glass-on-inverse: var(--color-inverse-tile); --glass-on-inverse-hover: #2C2C2E;
      --material-tooltip: var(--color-inverse-tile);
      --material-blur: none; --material-blur-thick: none;
    }
  }
  /* Increase Contrast: hairlines become control edges, tiles get a ring.
     The fills darken but keep their order (subtle < fill < hover), so hover
     and pressed states still read darker than rest; secondary text darkens
     with them: muted (and subtle, which follows it) moves 90% of the way to
     the text colour — 4.85:1 or better on every fill in both schemes, where
     the old muted fell to 4.07 on a dark hover — and links take their hover
     colour (4.83 or better on the row hover; they keep the underline). Text
     and links that sit on a fill take the full text colour. Selectors: the
     root in every theme, scheme islands, and the page's high-contrast mode
     (it re-declares the light set after the dark blocks, so it is listed
     to stay under these values). */
  @media (prefers-contrast: more) {
    :root, :root[data-theme], :root.a11y-contrast, [data-scheme], .a11y-contrast {
      --color-border: var(--color-control-border); --color-border-strong: var(--color-control-border);
      --color-text-muted: color-mix(in srgb, var(--color-text) 90%, var(--color-bg));
      --color-text-subtle: var(--color-text-muted);
      --color-link: var(--color-link-hover);
      --color-fill-subtle: color-mix(in srgb, var(--color-text) 8%, transparent);
      --color-fill: color-mix(in srgb, var(--color-text) 14%, transparent);
      --color-fill-hover: color-mix(in srgb, var(--color-text) 22%, transparent);
      --color-text-subtle-on-fill: var(--color-text);
      --color-link-on-fill: var(--color-text);
      --tile-ring: 0 0 0 1px var(--color-control-border);
      /* charts: gridlines that are seen (1.5:1), the control edge as the baseline
         (3:1+), and an "Altele" grey of 3:1 (the light set here; dark below) */
      --chart-grid: rgb(0 0 0 / .16); --chart-axis: var(--color-control-border); --chart-other: var(--color-dot-neutral);
    }
    :root[data-theme="dark"]:not(.a11y-contrast), [data-scheme="dark"] { --chart-grid: rgb(255 255 255 / .2); }
  }
  @media (prefers-contrast: more) and (prefers-color-scheme: dark) {
    :root[data-theme="auto"]:not(.a11y-contrast) { --chart-grid: rgb(255 255 255 / .2); }
  }
  /* Forced colours: the system palette wins. The browser drops shadows and
     gradients, so the edges come from outlines (base.css); here focus uses
     Highlight on every surface, materials turn opaque (the browser keeps
     the alpha of a translucent bar, and the page would show through the
     action bar and the header) and the signature (contours, glow)
     disappears. */
  @media (forced-colors: active) {
    :root, :root[data-theme], :root.a11y-contrast, [data-scheme], [data-surface], .a11y-contrast {
      --color-focus: Highlight;
      --focus-ring: 0 0 0 3px Highlight;
      --tile-ring: 0 0 0 1px CanvasText;
      --material-bar: Canvas; --material-sidebar: Canvas; --material-overlay: Canvas; --material-inverse: Canvas;
      --material-blur: none; --material-blur-thick: none;
      --topo-line: transparent; --topo-index: transparent;
      --topo-line-inverse: transparent; --topo-index-inverse: transparent;
      --stage-glow: transparent; --stage-glow-2: transparent;
    }
  }
  /* Print: ink on paper in every theme. Browsers drop backgrounds when they
     print, so a dark theme (or a dark island) would leave light text on white
     paper: every scheme prints with the light text colours, white planes,
     visible hairlines and no materials; dark surfaces print as ink too.
     base.css hides the page chrome. */
  @media print {
    :root, :root[data-theme], :root.a11y-contrast, [data-scheme], [data-surface], .a11y-contrast {
      --color-bg: #FFFFFF; --color-bg-alt: #FFFFFF; --color-surface: #FFFFFF; --color-surface-raised: #FFFFFF; --color-elevated: #FFFFFF;
      --color-plane: #FFFFFF; --color-tile: #FFFFFF; --color-tile-hover: #FFFFFF; --color-tile-alt: #FFFFFF; --color-tile-alt-hover: #FFFFFF;
      --color-chip: #FFFFFF; --color-chip-raised: #FFFFFF; --color-row-hover: transparent; --color-field: #FFFFFF;
      --color-heading: var(--ink-900); --color-text: var(--ink-900); --color-text-muted: var(--ink-700); --color-text-subtle: var(--ink-600);
      --color-text-subtle-on-fill: var(--ink-700); --color-link: var(--ink-900); --color-link-hover: var(--ink-900); --color-link-on-fill: var(--ink-900);
      --color-border: rgb(0 0 0 / .2); --color-border-strong: rgb(0 0 0 / .4); --color-control-border: var(--neutral-500);
      --color-fill-subtle: transparent; --color-fill: rgb(0 0 0 / .06); --color-fill-hover: rgb(0 0 0 / .1);
      --color-tint: rgb(0 0 0 / .06); --color-tint-fg: var(--ink-900);
      --color-selected: var(--ink-900); --color-on-selected: #FFFFFF;
      --color-accent-figure: var(--ink-900); --color-accent-strong: var(--ink-900); --color-on-accent-soft: var(--ink-900);
      --color-info-fg: #0058B9; --color-success-fg: #1E7B34; --color-warning-fg: #9A5700; --color-danger-fg: #C7001A; --color-event-fg: #7E3BAD;
      --color-info-bg: #FFFFFF; --color-success-bg: #FFFFFF; --color-warning-bg: #FFFFFF; --color-danger-bg: #FFFFFF; --color-event-bg: #FFFFFF;
      --color-on-inverse: var(--ink-900); --color-on-inverse-muted: var(--ink-700); --color-on-inverse-subtle: var(--ink-600);
      --color-on-inverse-accent: var(--ink-900); --color-inverse: #FFFFFF; --color-inverse-2: #FFFFFF; --color-inverse-tile: #FFFFFF;
      --color-inverse-border: rgb(0 0 0 / .2); --glass-on-inverse: transparent; --glass-on-inverse-hover: transparent;
      --tile-ring: 0 0 0 1px rgb(0 0 0 / .2); --tile-shadow: 0 0 #0000; --tile-shadow-hover: 0 0 #0000;
      --material-bar: #FFFFFF; --material-sidebar: #FFFFFF; --material-overlay: #FFFFFF; --material-inverse: #FFFFFF; --material-tooltip: #FFFFFF;
      --material-blur: none; --material-blur-thick: none;
      --topo-line: transparent; --topo-index: transparent; --topo-line-inverse: transparent; --topo-index-inverse: transparent;
      --stage-glow: transparent; --stage-glow-2: transparent;
      /* charts print in the light set on white paper (charts.js also adds textures) */
      --chart-1: var(--action-500); --chart-2: #EB6834; --chart-3: #1BAF7A; --chart-4: #EDA100;
      --chart-5: #E87BA4; --chart-6: #008300; --chart-7: #6250D6; --chart-8: #E34948;
      --chart-ord-1: #6DA7EC; --chart-ord-2: #3987E5; --chart-ord-3: #256ABF; --chart-ord-4: #184F95; --chart-ord-5: #0D366B;
      --chart-seq-1: #CDE2FB; --chart-seq-2: #B7D3F6; --chart-seq-3: #9EC5F4; --chart-seq-4: #86B6EF;
      --chart-seq-5: #6DA7EC; --chart-seq-6: #5598E7; --chart-seq-7: #3987E5; --chart-seq-8: #2A78D6;
      --chart-seq-9: #256ABF; --chart-seq-10: #1C5CAB; --chart-seq-11: #184F95; --chart-seq-12: #104281;
      --chart-seq-13: #0D366B;
      --chart-div-neg: #E34948; --chart-div-mid: #E8E8ED; --chart-div-pos: #2A78D6;
      --chart-other: #AEAEB2; --chart-grid: rgb(0 0 0 / .12); --chart-axis: rgb(0 0 0 / .3); --chart-surface: #FFFFFF;
      /* the status dots on paper: the light set (a meter's fill, its level icon; the
         dark set's #FF9F0A would be 2.06:1 on white) */
      --color-dot-ok: #248A3D; --color-dot-warn: #C26A00; --color-dot-danger: #D70015;
      --color-dot-info: #0071E3; --color-dot-neutral: var(--neutral-500);
      color-scheme: light;
    }
  }
}

/* ---- css/base/base.css ---- */
/* Atlas Modern · Base: elements, typography defaults, focus, icons, shared motion
   Type (spec §2.6): one face, optical sizes on (20px and up take the Display
   cut), tracking by size, nothing under 12px, tabular figures for data.
   Motion (§2.11, §4): shared keyframes, page-to-page view transitions, and
   the Reduce Motion rule that stops everything except spinners. */
@layer base {
  /* Focus and anchors land clear of the sticky chrome: the bar, plus a bar
     that has slid in under it (the local nav, the record bar: tokens.css
     --sticky-extra). On phones the docked action bar keeps its own room at
     the bottom (action-bar.css). */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--sticky-extra, 0px) + var(--space-4));
    -webkit-tap-highlight-color: transparent;
  }
  body {
    font-family: var(--font-text);
    font-size: var(--step-0);
    line-height: var(--lh-body);
    letter-spacing: var(--tracking-body);
    color: var(--color-text);
    background: var(--color-bg);
    font-optical-sizing: auto;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
  }
  /* A register wrapper (<div data-context="app">) re-bases its text on its own
     tokens; a scheme island (data-scheme) takes the text colour of its set.
     An island paints no background of its own: the component on it does
     (the header its material, the band its stage, a card its tile). */
  :where([data-context]) { font-size: var(--step-0); line-height: var(--lh-body); letter-spacing: var(--tracking-body); }
  :where([data-scheme]) { color: var(--color-text); }

  h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-title);
    letter-spacing: var(--tracking-tight);
    color: var(--color-heading);
    text-wrap: balance;
  }
  /* h1 and h2 take their register from tokens (tokens.css §5): the portal's
     display sizes (650, 1.04, −.03em), the app's large title (1.08, −.028em)
     and its 26–34px h2, which is a title (600, 1.1, −.018em). */
  h1 { font-size: var(--step-5); font-weight: var(--fw-display); line-height: var(--lh-page-title); letter-spacing: var(--tracking-page-title); }
  h2 { font-size: var(--step-4); font-weight: var(--h2-weight); line-height: var(--h2-lh); letter-spacing: var(--h2-tracking); }
  h3 { font-size: var(--step-2); line-height: var(--lh-head); letter-spacing: var(--tracking-tight); }
  h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: var(--tracking-text); }
  h5 { font-size: var(--step-0); line-height: 1.35; letter-spacing: var(--tracking-body); }
  p { text-wrap: pretty; }
  /* The 12px floor: small print shrinks, never below --step--2 */
  small { font-size: max(var(--step--2), .85em); letter-spacing: var(--tracking-small); }
  sub, sup { font-size: max(var(--step--2), .75em); line-height: 0; }
  /* Figures that are compared or counted line up. Tables set tabular
     figures on their figure cells only (table.css): Inter's tabular set also
     widens the hyphen, which would space out "Cluj-Napoca" in a text cell. */
  :where(time, data, output) { font-variant-numeric: tabular-nums lining-nums; }

  a {
    color: var(--color-link);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in oklab, currentColor 42%, transparent);
    text-underline-offset: .22em;
    transition: color var(--dur-1) var(--ease-out), text-decoration-color var(--dur-1) var(--ease-out);
  }
  a:hover { color: var(--color-link-hover); text-decoration-color: currentColor; }

  /* Focus: a 3px ring in --color-focus on every surface. On dark surfaces
     (scheme islands, the stage) it is the light blue that reads on black:
     6.96:1 on black, 6.28:1 on glass. The colour is a token: tokens.css sets
     it for dark islands, dark surfaces and forced colours (one source). */
  :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-xs); }
  ::selection { background: color-mix(in oklab, var(--color-focus) 26%, transparent); }

  img { height: auto; }
  hr { border: 0; border-top: 1px solid var(--color-border); }
  code, kbd, pre, samp { font-family: var(--font-mono); font-size: max(var(--step--2), .88em); letter-spacing: 0; font-variant-ligatures: none; }
  strong, b { font-weight: var(--fw-semibold); }
  input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); width: 1.125rem; height: 1.125rem; }

  /* Icons: inline SVG sprite, stroke style. In BASE so components can size them. */
  .icon {
    display: inline-block; flex: none; width: 1.2em; height: 1.2em; vertical-align: -.2em;
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  }

  /* ---- Shared keyframes ---------------------------------------------------
     Entrances use fill-mode `backwards` (never leave an element transformed)
     and never run on an element that is display:none at some breakpoint.
     atlas-rise   opacity + a rise of --rise (10px default: page open; the
                  hero sets 18px, field feedback 6px)
     atlas-settle opacity + 14px + scale .985 (a sheet that settles in)
     atlas-pop    opacity + --pop-y (-4px) + --pop-scale (.96): popovers,
                  menus, the select panel; chips set --pop-y: 0, --pop-scale: .9
     atlas-fade   opacity only */
  @keyframes atlas-rise { from { opacity: 0; transform: translateY(var(--rise, 10px)); } }
  @keyframes atlas-settle { from { opacity: 0; transform: translateY(14px) scale(.985); } }
  @keyframes atlas-pop { from { opacity: 0; transform: translateY(var(--pop-y, -4px)) scale(var(--pop-scale, .96)); } }
  @keyframes atlas-fade { from { opacity: 0; } }

  /* ---- Page to page (M10) -------------------------------------------------
     Same-origin navigations cross-fade (the @view-transition rule is at the
     end of this file, outside the layer): the old page fades out in 140ms,
     the new one rises 6px over 280ms after 40ms. The bars persist — each
     name exists once per page: the official bar, one header, or one topbar
     (the app's sticky bar, or the plain bar of the public flow pages, the
     hub and the landings), the app's sidebar.
     While an overlay is on screen (a modal dialog, a drawer, the palette;
     .is-vt-overlay while one is still closing or a popover is up, set by
     motion.js at pageswap and by the theme switch) the bars give up their
     names: the overlay is part of the page's picture, so the page and its
     overlay leave together and no bar is drawn over the overlay. The next
     page's bars sit that transition out too (.is-vt-overlay again, from its
     early script), and its picture comes in once the old one has mostly
     gone, so the drawer's header and the new bar never read double. */
  body > .official-bar { view-transition-name: atlas-official-bar; }
  body > .site-header { view-transition-name: atlas-site-header; }
  body > .topbar { view-transition-name: atlas-topbar; }
  body > .app-shell > .sidebar { view-transition-name: atlas-sidebar; }
  :is(:root:has(dialog:modal), :root.is-vt-overlay) :is(body > .official-bar, body > .site-header, body > .topbar, body > .app-shell > .topbar, body > .app-shell > .sidebar) {
    view-transition-name: none !important;
  }
  ::view-transition-group(atlas-official-bar), ::view-transition-group(atlas-site-header), ::view-transition-group(atlas-topbar), ::view-transition-group(atlas-sidebar) {
    animation-duration: var(--dur-2); animation-timing-function: var(--ease-out);
  }
  /* the phone navigation sheet, left open by a link to another page, fades
     out with the old page (site-header.css names it) */
  ::view-transition-old(atlas-nav-sheet) { animation: 140ms var(--ease-exit) both atlas-vt-out; }
  ::view-transition-old(root) { animation: 140ms var(--ease-exit) both atlas-vt-out; }
  ::view-transition-new(root) { animation: 280ms var(--ease-out) 40ms both atlas-vt-in; }
  /* (before the theme switch's rules, which keep their own timing) */
  html.is-vt-overlay::view-transition-new(root) { animation-delay: 120ms; }
  @keyframes atlas-vt-out { to { opacity: 0; } }
  @keyframes atlas-vt-in { from { opacity: 0; transform: translateY(6px); } }

  /* ---- Theme switch (M34) --------------------------------------------------
     [data-theme-toggle] (controls.js) wraps the change of data-theme in
     document.startViewTransition({ update, types: ['theme'] }) when the
     browser knows view-transition types and motion is allowed. The whole
     picture cross-fades in 240ms (no rise: that belongs to page navigation,
     M10); the persistent bars cross-fade with it. While the switch runs,
     html.is-theme-switching stops the components' own colour transitions, so
     the new picture is final at once and only the cross-fade moves. */
  html.is-theme-switching, html.is-theme-switching *, html.is-theme-switching *::before, html.is-theme-switching *::after { transition: none !important; }
  html:active-view-transition-type(theme)::view-transition-group(*) { animation-duration: var(--dur-2); animation-timing-function: var(--ease-out); }
  html:active-view-transition-type(theme)::view-transition-old(*) { animation: var(--dur-2) var(--ease-out) both atlas-vt-out; }
  html:active-view-transition-type(theme)::view-transition-new(*) { animation: var(--dur-2) var(--ease-out) both atlas-fade; }
  /* an additive cross-fade (as the browser's own): the two pictures' opacities
     add up to 1 at every frame, so what is the same in both themes (the
     black stage, its white headline) never dims mid-switch */
  html:active-view-transition-type(theme)::view-transition-image-pair(*) { isolation: isolate; }
  html:active-view-transition-type(theme)::view-transition-old(*),
  html:active-view-transition-type(theme)::view-transition-new(*) { mix-blend-mode: plus-lighter; }

  /* ---- Print ---------------------------------------------------------------
     The page as a document: tokens.css turns every scheme to ink on white;
     here the chrome goes (official bar, header, topbar and sidebar, footer,
     the TOC and side columns, page feedback, the local nav and record bar,
     floating bars, the variant switcher of the page packages, the print
     button itself), the grid gives the content the whole width, nothing is
     left mid-animation, and links in running text show where they lead.
     !important: these few rules must beat the components' own display and
     layout, which sit in later layers. */
  @media print {
    @page { margin: 16mm 15mm; }
    :is(.skip-link, .official-bar, .site-header, .site-footer, .topbar, .app-shell > .sidebar, .local-nav, .record-bar,
      .toc, .with-aside__side, .inspector, .page-feedback, .action-bar, .datatable__bulk, .toast-region, .palette,
      .map-tools, .map__controls, .map__basemaps, [data-print], #atlas-variante, #atlas-variante-panel, .tip__bubble,
      .record-head__actions, [role="tablist"], .datatable__bar, .datatable__tools, .datatable__filters, .seg, .pagination,
      .composer, .carousel__controls, .section-index, .rail, .copy, .split-panel__bar) { display: none !important; }
    html, body { background: #FFFFFF !important; color: var(--color-text); }
    .app-shell, .with-aside, .with-inspector { display: block !important; min-height: 0 !important; }
    .app-shell__main, .with-aside__main, .with-inspector__main { width: auto !important; max-width: none !important; padding-bottom: 0 !important; }
    .page-fill { height: auto !important; overflow: visible !important; }
    *, *::before, *::after { animation: none !important; transition: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    :is(h1, h2, h3, h4) { break-after: avoid; break-inside: avoid; }
    :is(figure, table, tr, img, .card, .summary-card, .form-section, .side-box, .alert, .settings-group) { break-inside: avoid; }
    /* a split view in "Împărțit" prints the chosen item under its list ("Listă"
       prints what it shows: its full view, or the list alone) */
    .split-view:not([data-split-mode="list"]) > .split-view__panes { display: block !important; height: auto !important; overflow: visible !important; }
    .split-view:not([data-split-mode="list"]) .split-view__detail { display: block !important; overflow: visible !important; }
    /* a carousel prints its slides as a grid, none cut at the page edge */
    .carousel__viewport { overflow: visible !important; margin: 0 !important; padding: 0 !important; }
    .carousel__track { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
    .carousel__track::after { display: none !important; }
    main :is(p, li, dd, td) > a[href^="http"]:not(.btn, .link-arrow)::after { content: " (" attr(href) ")"; font-size: .85em; overflow-wrap: anywhere; color: var(--color-text-muted); }
  }

  /* ---- Reduce Motion (G27) -------------------------------------------------
     Every animation and transition ends at once (delays too), so entrances
     show their content and nothing moves. Spinners keep turning, slower:
     their motion is the message. .a11y-motion (utilities) mirrors this. */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *:not(.spinner), *:not(.spinner)::before, *:not(.spinner, .is-loading)::after {
      animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0s !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
    }
    .spinner, .spinner::before, .spinner::after, .is-loading::after { animation-duration: 1.2s !important; }
  }

  /* ---- Forced colours (Windows High Contrast and the like) ---------------
     The system palette replaces ours and drops shadows, gradients and the
     author's backgrounds.
     Focus: one Highlight ring on whatever has focus. Several components show
     focus with a background or a halo and set outline: none (menu items,
     fields, the select trigger); forced colours drop both, so the ring is
     !important here — in this early layer that beats every later layer,
     components and utilities included. The offset stays the component's
     (some inset their ring because a container clips it). The active option
     of a listbox driven by aria-activedescendant (the select panel, the
     palette) is marked the same way, inside its row.
     Edges: buttons and tiles get a real frame; the stage becomes Canvas and
     the contour lines go (focus turns Highlight and materials opaque in
     tokens.css). The first list holds the tiles (each paints the tile model
     itself) plus the outlined forms: a tile nested in another tile (the empty state
     of a table, a list inside a form section) takes no second frame. The
     second list always gets one: surfaces that float, feedback, the portal's
     linked tiles. Classes that do not exist yet are matched by attribute
     ([class~=…]) so check.mjs still reports them until their component
     lands (B's inferred "how it works" tiles get their frame from
     [class~="steps--tiles"] once the markup carries the class: §1.1 rule 7). */
  @media (forced-colors: active) {
    :focus-visible { outline: 3px solid Highlight !important; }
    [role="option"].is-active { outline: 2px solid Highlight !important; outline-offset: -2px !important; }
    :where(button, [role="button"], .btn, .icon-btn, .chip, .seg, .tag, .badge) { outline: 1px solid ButtonBorder; outline-offset: -1px; }
    :where(.card, .stat:not([class~="stats--joined"] > *, [class~="stats--band"] > *), [class~="stats--joined"],
      .side-box:not(.side-box--muted), .table-wrap, .work-list, .list, .summary-card, .form-section, .empty, .composer):where(:not(
      .table__empty *, :where(.form-section, .card, .summary-card, .side-box) *)),
    :where(dialog, [popover], .action-bar, .alert, .toast, .service-card, .quick-links__item, [class~="steps--tiles"] > *) {
      outline: 1px solid CanvasText; outline-offset: -1px;
    }
    [data-surface="dark"], [data-surface="dark"]::before, [data-surface="dark"]::after { background-image: none !important; }
    .topo { display: none !important; }
  }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* ---- css/base/layout.css ---- */
/* Atlas Modern · Layout primitives
   Sections are big calm planes. A tile is #F5F5F7 on a white plane and white
   on an alternate one: the plane sets --color-tile, every tile-like component
   reads it (background: var(--color-tile); border-radius: var(--radius-tile);
   box-shadow: var(--tile-ring), var(--tile-shadow)). A plane that re-declares
   --color-tile re-declares --color-tile-hover with it (resolution rule).
     .section          white plane, generous padding (--section-pad)
     .section--alt     #F5F5F7 plane; its tiles flip to white (dark: #101012
                       plane, #1C1C1E tiles — the values come from the scheme
                       tokens --color-tile-alt*, so they follow [data-scheme])
     .section--tight   less padding
     .section--band    the near-black figures band; the markup carries
                       data-scheme="dark" so its content takes the dark set:
                       <section class="section section--band" data-scheme="dark">
                       In dark mode it lifts to #101012 between two hairlines. */
@layer layout {
  .container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
  .container--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); margin-inline: auto; }

  .section { padding-block: var(--section-pad); }
  .section--alt {
    background: var(--color-bg-alt);
    --color-plane: var(--color-bg-alt);
    --color-tile: var(--color-tile-alt);
    --color-tile-hover: var(--color-tile-alt-hover);
    --chart-surface: var(--color-tile);           /* the ring of a sparkline dot, cut in the tile */
    --color-surface: var(--color-surface-raised);
    /* Rows on the white tile: the tile hover is the tile itself here, so
       a table row hovers to the faint fill instead (resolution rule). */
    --color-row-hover: var(--color-fill-subtle);
  }
  .section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
  .section--band {
    background: radial-gradient(60rem 26rem at 50% 135%, var(--stage-glow), transparent 65%), var(--color-inverse);
    --color-plane: var(--color-inverse);
  }

  /* (The Phase A tile bridge is gone: every tile-like component now paints
     the tile model itself — background var(--color-tile), radius
     var(--radius-tile), box-shadow var(--tile-ring), var(--tile-shadow) — and
     reads --color-accent-figure for its numerals. base.css keeps the same
     tiles in its forced-colours frame list.) */

  /* The gap belongs to the parent stack: a stack inside a stack keeps the
     outer gap above it and its own gap inside. */
  .stack > * + * { margin-top: var(--stack-gap, var(--space-4)); }
  .stack--sm > * + * { margin-top: var(--space-2); }
  .stack--lg > * + * { margin-top: var(--space-8); }
  .stack--xl > * + * { margin-top: var(--space-16); }
  .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
}

/* Dark: the band would melt into the black page, so it steps up to #101012
   (its own --color-bg-alt) and ends with hairlines. Keep the two rules equal. */
@layer layout {
  :root[data-theme="dark"] .section--band {
    background-color: var(--color-bg-alt); --color-plane: var(--color-bg-alt);
    box-shadow: inset 0 1px 0 var(--color-inverse-border), inset 0 -1px 0 var(--color-inverse-border);
  }
  @media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .section--band {
      background-color: var(--color-bg-alt); --color-plane: var(--color-bg-alt);
      box-shadow: inset 0 1px 0 var(--color-inverse-border), inset 0 -1px 0 var(--color-inverse-border);
    }
  }
}

/* ---- css/components/skip-link.css ---- */
/* Atlas · Skip link
   The first thing a keyboard reaches: a pill that drops in at the top left
   and leads past the header to the content.
     <a class="skip-link" href="#continut">Sari la conținut</a> */
@layer components {
  .skip-link {
    position: fixed; left: var(--space-4); top: var(--space-3); z-index: 1000;
    display: inline-flex; align-items: center; min-height: var(--btn-h); padding: 0 var(--space-5); border-radius: var(--radius-pill);
    background: var(--color-primary); color: var(--color-on-primary); font-weight: var(--fw-semibold); text-decoration: none;
    translate: 0 calc(-100% - var(--space-6)); transition: translate var(--dur-2) var(--ease-spring);
  }
  .skip-link:focus { translate: 0 0; color: var(--color-on-primary); box-shadow: var(--shadow-3); }
  .skip-link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
}

/* ---- css/components/section-head.css ---- */
/* Atlas · Section head (spec §3.9)
   The head of a portal section: an optional eyebrow, a big title, a muted
   intro; --row puts actions on the right (they wrap under it on phones).
     <header class="section-head">
       <p class="section-eyebrow">Servicii</p>                  optional, sentence case
       <h2 class="section-title">Servicii online</h2>
       <p class="section-intro">…</p>
     </header>
     <header class="section-head section-head--row">
       <div class="section-head__text"><p class="section-eyebrow">…</p><h2 class="section-title">…</h2><p class="section-intro">…</p></div>
       <div class="section-head__actions"><a class="btn btn--secondary" href="…">Toate serviciile <svg class="icon">…#i-arrow</svg></a></div>
     </header>
   Title: step-4 (34 → 56px on the portal); in the app the same class reads
   the app's h2 tokens (26 → 34px, 600, −.018em). The head keeps
   --section-head-gap (36 → 64px) to the content under it. */
@layer components {
  .section-head { margin-bottom: var(--section-head-gap); }
  .section-head:last-child { margin-bottom: 0; }
  .section-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-6) var(--space-10); }
  .section-head__text { min-width: 0; max-width: 48rem; }
  .section-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
  .section-eyebrow {
    margin-bottom: var(--space-3);
    font: var(--fw-semibold) var(--step-1)/1.3 var(--font-display); letter-spacing: var(--tracking-text);
    color: var(--color-accent-strong);
  }
  .section-title {
    max-width: 22ch;
    font-size: var(--step-4); font-weight: var(--h2-weight); line-height: var(--h2-lh); letter-spacing: var(--h2-tracking);
    color: var(--color-heading); text-wrap: balance;
  }
  .section-intro {
    margin-top: var(--space-5); max-width: 42ch;
    font-size: var(--step-1); line-height: 1.45; letter-spacing: var(--tracking-text);
    color: var(--color-text-muted); text-wrap: pretty;
  }
  .section-note { margin-top: var(--space-5); font-size: .875rem; line-height: 1.5; color: var(--color-text-subtle); }
}

/* ---- css/components/button.css ---- */
/* Atlas · Button (spec §3.1, M1 press, M2 hover, M34 theme switch)
   One shape everywhere: the pill. Size comes from the register tokens
   (--btn-h: 44 portal / 40 app, --btn-h-sm, --btn-h-lg; --btn-font 16 / 15),
   so a button never needs a [data-context] rule of its own.
     .btn                  primary: the one action of the view (blue, white text)
     .btn--secondary       grey fill, heading text: the default second action
     .btn--accent          tinted (accent-soft): the second most important
                           action, "Intră în cont"
     .btn--ghost           text in the link colour, a fill under the pointer
     .btn--danger          destructive (solid red, white text)
     .btn--light           on a dark plane (the stage, a band): white pill
     .btn--outline-light   on a dark plane: the glass pill, the second action
     .btn--sm · .btn--lg · .btn--block
     .is-loading           a centred spinner; the label hides, the width stays.
                           One markup: <button class="btn is-loading" aria-busy="true">
                           (full colour, no pointer; never aria-disabled, which fades it)
     :disabled · [aria-disabled="true"]   .38, no pointer
   Arrow language: text links end in a CSS chevron (.link-arrow); a button is
   text-only or has a leading icon. Only a button that moves a flow forward
   ("Continuă", "Începe cererea") and the round .go disc carry the forward
   arrow (#i-arrow, after the text); it nudges 3px under the pointer.
     .icon-btn             round icon button: 40 portal / 36 app / 44 on touch
       --ghost --primary --sm (32)   an open menu / popover trigger
                           ([aria-haspopup] or [popovertarget] with
                           aria-expanded="true") = chosen (graphite)
     .link-arrow · .go · .btn-group · .host
   Markup: lab/s2-controls.html. */
@layer components {
  /* ---- Buttons ---------------------------------------------------------- */
  .btn {
    --btn-bg: var(--color-primary); --btn-fg: var(--color-on-primary);
    --btn-bg-hover: var(--color-primary-hover); --btn-fg-hover: var(--btn-fg);
    --btn-bg-active: var(--color-primary-active);
    --btn-ring: 0 0 transparent;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: var(--btn-h); padding: 0 1.375rem;
    border: 0; border-radius: var(--radius-pill);
    background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-ring);
    font: var(--fw-medium) var(--btn-font)/var(--lh-ui) var(--font-text); letter-spacing: -.01em;
    text-align: center; text-decoration: none; white-space: nowrap;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    /* release: colour in --dur-2, the scale springs back (M1) */
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out),
                box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .btn:hover { background: var(--btn-bg-hover); color: var(--btn-fg-hover); text-decoration: none; }
  /* press: in 80ms, scale .97 (1 under Reduce Motion: the token drops) */
  .btn:active { background: var(--btn-bg-active); color: var(--btn-fg-hover); transform: scale(var(--press-scale)); transition-duration: 80ms; }
  .btn .icon { width: 1.1em; height: 1.1em; margin-inline: -.1em; transition: transform var(--dur-2) var(--ease-bounce); }
  /* M2: only a forward arrow nudges (flow buttons) */
  .btn:hover .icon:has(> use[href$="i-arrow"]) { transform: translateX(var(--nudge)); }
  /* a label.btn around a visually hidden input (a file upload): the ring
     goes on the pill while the input inside has the keyboard focus */
  .btn:has(> input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }

  .btn--secondary {
    --btn-bg: var(--color-fill); --btn-fg: var(--color-heading);
    --btn-bg-hover: var(--color-fill-hover); --btn-fg-hover: var(--color-heading); --btn-bg-active: var(--color-fill-hover);
  }
  .btn--accent {
    --btn-bg: var(--color-accent-soft); --btn-fg: var(--color-on-accent-soft);
    --btn-bg-hover: var(--color-accent-soft-hover); --btn-fg-hover: var(--color-on-accent-soft); --btn-bg-active: var(--color-accent-soft-hover);
  }
  /* Text on the fill reads --color-link-on-fill (the dark link blue drops
     under 4.5 on a fill); pressed stays on the fill, never the hover fill */
  .btn--ghost {
    --btn-bg: transparent; --btn-fg: var(--color-link);
    --btn-bg-hover: var(--color-fill); --btn-fg-hover: var(--color-link-on-fill); --btn-bg-active: var(--color-fill);
    padding-inline: 1rem;
  }
  .btn--danger {
    --btn-bg: var(--color-danger-solid); --btn-fg: var(--color-on-primary);
    --btn-bg-hover: color-mix(in oklab, var(--color-danger-solid) 88%, var(--color-inverse));
    --btn-bg-active: color-mix(in oklab, var(--color-danger-solid) 80%, var(--color-inverse));
  }
  /* Dark planes (the stage, a band, the auth panel). The primitives do not
     change with the scheme, so the white pill stays white inside a
     [data-scheme="dark"] island and in dark mode. */
  .btn--light {
    --btn-bg: var(--color-knob); --btn-fg: var(--ink-900);
    --btn-bg-hover: var(--brand-100); --btn-fg-hover: var(--ink-900); --btn-bg-active: var(--brand-200);
  }
  /* The glass pill: the second action on a dark plane, findable at a
     glance (K14). The edge and the hover are mixes of --color-on-inverse
     (24% / 18% white), so they follow the page's high-contrast mode. */
  .btn--outline-light {
    --btn-bg: var(--glass-on-inverse); --btn-fg: var(--color-on-inverse);
    --btn-bg-hover: var(--glass-on-inverse-strong); --btn-fg-hover: var(--color-on-inverse);
    --btn-bg-active: var(--glass-on-inverse-edge);
    --btn-ring: inset 0 0 0 1px var(--glass-on-inverse-edge);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
  }

  /* ---- Sizes ------------------------------------------------------------ */
  .btn--sm { min-height: var(--btn-h-sm); padding: 0 1rem; gap: .4rem; font-size: var(--step--1); }
  .btn--lg { min-height: var(--btn-h-lg); padding: 0 1.75rem; gap: .55rem; font-size: 1.0625rem; letter-spacing: var(--tracking-text); }
  .btn--block { display: flex; width: 100%; white-space: normal; }

  /* ---- States ----------------------------------------------------------- */
  /* Disabled: the pill and its label fade to 38%. The colours fade, not the
     element, so a focused aria-disabled button keeps its focus ring whole. */
  .btn:is(:disabled, [aria-disabled="true"]) {
    background: color-mix(in srgb, var(--btn-bg) 38%, transparent); color: color-mix(in srgb, var(--btn-fg) 38%, transparent);
    cursor: default; pointer-events: none;
  }
  /* Loading: the label stays in the box (the width does not jump) but is
     not painted; an 18px spinner turns in the middle, in the label colour.
     It keeps turning (1.2s) under Reduce Motion (base.css exempts it). */
  .btn.is-loading { -webkit-text-fill-color: transparent; pointer-events: none; }
  .btn.is-loading > * { opacity: 0; }            /* not visibility: the label (and the name) stays for screen readers */
  .btn.is-loading::after {
    content: ""; position: absolute; inset: 0; width: 1.125rem; height: 1.125rem; margin: auto;
    border: 2px solid var(--btn-fg); border-right-color: transparent; border-radius: 50%;
    animation: atlas-spin .7s linear infinite;
  }
  @keyframes atlas-spin { to { transform: rotate(360deg); } }

  /* ---- A label that gives way on a phone ---------------------------------
     .btn--collapsible: at 480px and below the button keeps its icon, turns
     into a circle and keeps its name for screen readers (the label is still
     there, at zero size; a <span class="btn__label"> is hidden the usual way).
     Write an icon. The plain bar of the public flow pages (body > .topbar)
     does this to its actions by itself (topbar.css), so the brand keeps room.
       <a class="btn btn--ghost btn--sm btn--collapsible" href="…"><svg class="icon" …>…</svg> <span class="btn__label">Salvează și ieși</span></a> */
  @media (max-width: 480px) {
    .btn--collapsible { width: var(--btn-h); padding-inline: 0; gap: 0; font-size: 0; letter-spacing: 0; }
    .btn--collapsible.btn--sm { width: var(--btn-h-sm); }
    .btn--collapsible.btn--lg { width: var(--btn-h-lg); }
    .btn--collapsible .icon { width: 1.125rem; height: 1.125rem; margin: 0; }
    .btn--collapsible > .btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media (max-width: 480px) and (pointer: coarse) {
    .btn--collapsible.btn--sm { width: var(--target-min); }
  }

  /* ---- Joined pills (a toolbar of related commands) ---------------------
     For a choice between views use .seg instead (one value at a time). */
  .btn-group { display: inline-flex; gap: 2px; }
  .btn-group > .btn { border-radius: var(--radius-xs); }
  .btn-group > .btn:first-child { border-radius: var(--radius-pill) var(--radius-xs) var(--radius-xs) var(--radius-pill); }
  .btn-group > .btn:last-child { border-radius: var(--radius-xs) var(--radius-pill) var(--radius-pill) var(--radius-xs); }
  .btn-group > .btn:only-child { border-radius: var(--radius-pill); }

  /* ---- Icon buttons ----------------------------------------------------- */
  .icon-btn {
    --ib-bg: var(--color-fill); --ib-fg: var(--color-heading);
    --ib-bg-hover: var(--color-fill-hover); --ib-fg-hover: var(--color-heading);
    position: relative; display: inline-grid; place-items: center; flex: none;
    width: var(--icon-btn); height: var(--icon-btn); padding: 0;
    border: 0; border-radius: var(--radius-pill); background: var(--ib-bg); color: var(--ib-fg);
    text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .icon-btn:hover { background: var(--ib-bg-hover); color: var(--ib-fg-hover); }
  .icon-btn:active { transform: scale(var(--press-scale-icon)); transition-duration: 80ms; }
  .icon-btn .icon { width: 1.15rem; height: 1.15rem; }
  .icon-btn--ghost { --ib-bg: transparent; --ib-fg: var(--color-text-muted); --ib-bg-hover: var(--color-fill); }
  .icon-btn--primary {
    --ib-bg: var(--color-primary); --ib-fg: var(--color-on-primary);
    --ib-bg-hover: var(--color-primary-hover); --ib-fg-hover: var(--color-on-primary);
  }
  .icon-btn--primary:active { background: var(--color-primary-active); }
  /* The trigger of an open menu or popover reads as chosen (graphite).
     Persistent disclosures (a sidebar toggle, a row toggle) stay neutral:
     the rule needs aria-haspopup or popovertarget. */
  .icon-btn:is([aria-haspopup]:not([aria-haspopup="false"]), [popovertarget])[aria-expanded="true"] {
    --ib-bg: var(--color-selected); --ib-fg: var(--color-on-selected);
    --ib-bg-hover: var(--color-selected); --ib-fg-hover: var(--color-on-selected);
  }
  .icon-btn--sm { width: 2rem; height: 2rem; }
  .icon-btn--sm .icon { width: 1rem; height: 1rem; }
  .icon-btn:is(:disabled, [aria-disabled="true"]) {
    background: color-mix(in srgb, var(--ib-bg) 38%, transparent); color: color-mix(in srgb, var(--ib-fg) 38%, transparent);
    cursor: default; pointer-events: none;
  }
  .icon-btn[aria-disabled="true"]:active { transform: none; }

  /* ---- Text link with a chevron: "Toate întrebările ›" -------------------
     Write the forward arrow icon after the text: it is drawn as a chevron.
     A link with a leading icon (help, file) keeps its icon and no chevron. */
  .link-arrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-weight: var(--fw-medium); letter-spacing: -.01em; color: var(--color-link); text-decoration: none;
  }
  .link-arrow .icon { width: 1rem; height: 1rem; transition: transform var(--dur-2) var(--ease-bounce); }
  .link-arrow .icon:has(> use[href$="i-arrow"]) { display: none; }
  .link-arrow:has(> .icon > use[href$="i-arrow"])::after {
    content: ""; flex: none; width: .46em; height: .46em; margin-left: -.1em;
    border: solid currentColor; border-width: 1.6px 1.6px 0 0; border-radius: 1px;
    transform: translateY(.02em) rotate(45deg); transition: transform var(--dur-2) var(--ease-bounce);
  }
  .link-arrow:hover {
    color: var(--color-link-hover);
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  }
  .link-arrow:hover::after { transform: translate(var(--nudge), .02em) rotate(45deg); }

  /* ---- The round "go" disc (tiles, rows): turns blue inside a hovered link */
  .go {
    position: relative; display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--color-fill); color: var(--color-heading);
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-bounce);
  }
  .go .icon { width: .95rem; height: .95rem; transition: transform var(--dur-2) var(--ease-bounce); }
  a:hover .go, a.go:hover { background: var(--color-primary); color: var(--color-on-primary); }
  a:hover .go .icon, a.go:hover .icon { transform: translateX(calc(var(--nudge) * .67)); }
  a:active .go, a.go:active { background: var(--color-primary-active); }

  .host { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; font: var(--fw-medium) .8125rem/1.25 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .host .icon { width: .9rem; height: .9rem; }

  /* ---- Touch: every target reaches 44px ----------------------------------
     The register makes .icon-btn 44 (--icon-btn) and app buttons 44
     (--btn-h). Small sizes keep their look and grow an invisible hit area. */
  @media (pointer: coarse) {
    .btn--sm { min-height: var(--target-min); }
    .icon-btn--sm { width: 2.25rem; height: 2.25rem; }
    .icon-btn--sm::after { content: ""; position: absolute; inset: calc((2.25rem - var(--target-min)) / 2); }
    .go::after { content: ""; position: absolute; inset: calc((2rem - var(--target-min)) / 2); }
    /* a standalone text link ("Toate sarcinile ›"): an invisible 44px hit
       area (::after draws the chevron) */
    .link-arrow { position: relative; }
    .link-arrow::before { content: ""; position: absolute; inset: -.6rem -.25rem; }
  }
}

/* ---- css/components/segmented.css ---- */
/* Atlas · Segmented control (spec §3.2, G10, K24, M17)
   One value out of two to five, shown side by side: views (Listă · Hartă),
   language (RO · EN), density, a theme. A grey pill track; the chosen
   segment is a raised white thumb (#636366 in dark) with its label in
   heading 600; hairlines separate the segments that are not chosen.
     <div class="seg" data-seg role="group" aria-label="Mod de afișare">
       <button type="button" class="seg__btn" aria-pressed="true">Listă</button>
       <button type="button" class="seg__btn" aria-pressed="false">Hartă</button>
     </div>
   The chosen segment is [aria-pressed="true"], [aria-current] (links), or a
   label holding a checked radio (<label class="seg__btn"><input type="radio"
   name="v"> Listă</label>: the radio stays for the keyboard and forms).
   [data-seg] makes the buttons toggle aria-pressed (controls.js); any script
   may set the attributes itself.
     .seg--block   full width, equal segments (phones, sheets, settings)
     .seg--icons   icon-only segments (each button carries an aria-label)
   M17, sliding thumb: controls.js measures the chosen segment and writes
   --thumb-x / --thumb-y / --thumb-w / --thumb-h on the .seg, then adds
   .has-thumb: .seg::before is the one thumb, and it slides (translate +
   width, --dur-3 spring) when the choice changes. The first placement does
   not animate (.is-ready comes a frame later). Without JS each chosen
   segment paints its own thumb. Under Reduce Motion the thumb jumps.
   Markup: lab/s2-controls.html. */
@layer components {
  .seg {
    position: relative; isolation: isolate;
    display: inline-flex; align-items: stretch; max-width: 100%; padding: 2px;
    border-radius: var(--radius-pill); background: var(--color-fill);
    vertical-align: middle;
  }
  .seg__btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; flex: 0 1 auto;
    min-width: 2.25rem; min-height: var(--seg-h); padding: 0 .875rem; margin: 0;
    border: 0; border-radius: var(--radius-pill); background: transparent;
    font: var(--fw-medium) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small);
    color: var(--color-text-muted); text-decoration: none; white-space: nowrap;
    cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out),
                box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .seg__btn:hover { color: var(--color-heading); text-decoration: none; }
  .seg__btn:active { transform: scale(var(--press-scale-chip)); transition-duration: 80ms; }
  .seg__btn:focus-visible { z-index: 2; outline-offset: 1px; }
  .seg__btn .icon { width: 1rem; height: 1rem; }
  .seg__btn img { width: 16px; height: 11px; border-radius: 2px; }
  /* A radio inside a segment covers it (keyboard and forms keep working) */
  .seg__btn > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
  .seg__btn:has(> input:focus-visible) { z-index: 2; outline: 3px solid var(--color-focus); outline-offset: 1px; }

  /* G10: hairlines between segments that are not chosen. They sit under
     the sliding thumb (z-index -2 in the track's stacking context), so the
     thumb covers them as it passes. */
  .seg__btn + .seg__btn::before {
    content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; z-index: -2; width: 1px; border-radius: 1px;
    background: var(--color-border-strong); pointer-events: none;
    transition: opacity var(--dur-2) var(--ease-out);
  }
  .seg__btn:where([aria-pressed="true"], [aria-current]:not([aria-current="false"]), :has(> input:checked))::before,
  .seg__btn:where([aria-pressed="true"], [aria-current]:not([aria-current="false"]), :has(> input:checked)) + .seg__btn::before { opacity: 0; }

  /* The chosen segment: label in heading 600; without JS it paints its own
     thumb (low specificity: .has-thumb below takes the paint away) */
  .seg__btn:where([aria-pressed="true"], [aria-current]:not([aria-current="false"]), :has(> input:checked)) {
    z-index: 1; color: var(--color-heading); font-weight: var(--fw-semibold);
    background: var(--color-thumb); box-shadow: var(--shadow-thumb);
  }

  /* M17: one thumb that slides. The segments stop painting their own. */
  .seg::before {
    content: ""; position: absolute; top: 0; left: 0; z-index: -1;
    width: var(--thumb-w, 0px); height: var(--thumb-h, 0px);
    translate: var(--thumb-x, 0px) var(--thumb-y, 0px);
    border-radius: var(--radius-pill); background: var(--color-thumb); box-shadow: var(--shadow-thumb);
    opacity: 0; pointer-events: none;
  }
  .seg.has-thumb::before { opacity: 1; }
  .seg.has-thumb.is-ready::before {
    transition: translate var(--dur-3) var(--ease-spring), width var(--dur-3) var(--ease-spring),
                height var(--dur-3) var(--ease-spring), scale var(--dur-2) var(--ease-spring);
  }
  .seg.has-thumb > .seg__btn { background: transparent; box-shadow: none; }
  /* pressing the chosen segment presses the thumb with it */
  .seg.has-thumb:has(> .seg__btn[aria-pressed="true"]:active, > .seg__btn[aria-current]:not([aria-current="false"]):active, > .seg__btn > input:checked:active)::before {
    scale: var(--press-scale-chip);
  }

  /* ---- Variants ---------------------------------------------------------- */
  .seg--block { display: flex; width: 100%; }
  .seg--block > .seg__btn { flex: 1 1 0; min-width: 0; }
  .seg--icons > .seg__btn { min-width: calc(var(--seg-h) + .375rem); padding-inline: .5rem; }

  /* Touch: the track stays slim, each segment's hit area reaches 44px */
  @media (pointer: coarse) {
    .seg__btn::after { content: ""; position: absolute; inset: calc((var(--seg-h) - var(--target-min)) / 2) 0; }
  }

  /* Forced colours drop the thumb (a background and a shadow): the chosen
     segment takes the system highlight instead */
  @media (forced-colors: active) {
    .seg::before, .seg__btn + .seg__btn::before { display: none; }
    .seg > .seg__btn:is([aria-pressed="true"], [aria-current]:not([aria-current="false"]), :has(> input:checked)) {
      forced-color-adjust: none; background: Highlight; color: HighlightText;
    }
  }
}

/* ---- css/components/tag.css ---- */
/* Atlas · Tag (spec §3.7)
   A small label that classifies or gives a status: a 26px pill, 12/600.
   Colour never carries the meaning alone: the word does.
     .tag            neutral (grey fill, muted text)
     .tag--brand     neutral tint (the subject: PUG, PUZ)
     .tag--info · --success · --notice (warning) · --danger · --event   status tints
     .tag--outline   a hairline ring, no fill (drafts, secondary facts)
     .tag--light     on a dark plane (the stage, a band)
     .tag__remove    a remove button inside the tag (an active filter);
                     for filters prefer .chip--filter (chip.css)
   Markup: lab/s2-controls.html. */
@layer components {
  .tag {
    --tag-bg: var(--color-fill); --tag-fg: var(--color-text-muted); --tag-ring: 0 0 transparent;
    display: inline-flex; align-items: center; gap: .35rem; flex: none;
    height: 1.625rem; padding: 0 .7rem;
    border-radius: var(--radius-pill); background: var(--tag-bg); color: var(--tag-fg); box-shadow: var(--tag-ring);
    font: var(--fw-semibold) .75rem/1 var(--font-text); letter-spacing: 0; white-space: nowrap;
    vertical-align: middle;
  }
  .tag .icon { width: .875rem; height: .875rem; margin-inline-start: -.1rem; }
  .tag--notice   { --tag-bg: var(--color-warning-bg); --tag-fg: var(--color-warning-fg); }
  .tag--info     { --tag-bg: var(--color-info-bg);    --tag-fg: var(--color-info-fg); }
  .tag--event    { --tag-bg: var(--color-event-bg);   --tag-fg: var(--color-event-fg); }
  .tag--success  { --tag-bg: var(--color-success-bg); --tag-fg: var(--color-success-fg); }
  .tag--danger   { --tag-bg: var(--color-danger-bg);  --tag-fg: var(--color-danger-fg); }
  .tag--brand    { --tag-bg: var(--color-tint);       --tag-fg: var(--color-tint-fg); }
  .tag--outline  { --tag-bg: transparent; --tag-ring: inset 0 0 0 1px var(--color-border-strong); }
  .tag--light    { --tag-bg: var(--glass-on-inverse); --tag-fg: var(--color-on-inverse-muted); --tag-ring: inset 0 0 0 1px var(--color-inverse-border); }

  .tag__remove {
    position: relative; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin-inline: .05rem -.35rem;
    padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .tag__remove:hover { background: color-mix(in oklab, currentColor 16%, transparent); }
  .tag__remove .icon { width: .7rem; height: .7rem; margin: 0; stroke-width: 2.5; }
  @media (pointer: coarse) {
    .tag__remove::after { content: ""; position: absolute; inset: -.8125rem -.75rem -.8125rem -.375rem; }
  }
}

/* ---- css/components/site-header.css ---- */
/* Atlas · Site header (portal) and brand
   A sticky 64px bar of translucent material with a hairline below: the
   emblem (a graphite squircle) and the ministry line, quiet navigation pills
   (the current page in a fill, semibold), then the tools: language (.seg),
   "Intră în cont" (.btn--accent.btn--sm) and the theme (.icon-btn--ghost).
     <header class="site-header" data-site-header>
       <div class="container site-header__inner">
         <a class="brand" href="/">…</a>
         <nav class="site-nav" id="site-nav" aria-label="Navigare principală">
           <ul class="site-nav__list" role="list"><li><a class="site-nav__link" href="…" aria-current="page">Acasă</a></li>…</ul>
           <div class="site-nav__extra">account · language · theme (in the phone sheet)</div>
         </nav>
         <div class="site-header__tools">.seg · .btn--accent.btn--sm · .site-header__theme · .site-header__menu</div>
       </div>
     </header>
   .site-nav--compact (explicit) tightens a long navigation (docs: 10 links).
   Over the stage the header follows the dark surface under it (header.js
   sets data-scheme="dark"; stage pages ship it in the markup): the material
   cross-fades to --material-inverse in 240ms (M33); the text and controls
   switch in one step 20ms in (header.js: .is-scheme-flip), so they never
   tween mid-grey over a mid-grey glass. At 960px and below the navigation
   opens as a sheet under the header (M32); while it is open the page under
   it does not scroll, and a link that leaves the page keeps the sheet open:
   it fades out with the old page (its own view-transition name).
   A navigation list that scrolls (961–1180px, or a long --compact one) fades
   at the edge that has more (header.js: .has-more-start / .has-more-end).
   A .btn--collapsible in the tools (the signed-in person's pill) keeps only
   its icon at 961–1180px, where the navigation needs the room.
   Without JavaScript (scripting: none) the navigation is a plain wrapped
   row under the bar and the menu button goes. */
@layer components {
  /* ---- Site header ------------------------------------------------------ */
  .site-header {
    position: sticky; top: 0; z-index: var(--z-header);
    background: var(--material-bar);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  /* over the stage: one black surface with the stage while the bar sits above
     it, the dark material once it floats over it (header.js: .is-stuck) */
  .site-header[data-scheme="dark"] { background: var(--material-inverse); }
  .site-header[data-scheme="dark"]:not(.is-stuck) { background: var(--color-inverse); border-bottom-color: transparent; }
  /* the shadow once the page scrolls under it; none while a service's local
     nav hangs under it (tokens.css: html.has-local-nav), so the two read as one bar */
  .site-header.is-scrolled { box-shadow: var(--header-shadow, 0 10px 30px -24px rgb(var(--shadow-rgb) / .35)); }
  /* M33: the bar's fill cross-fades; its text, icons and pills change in one
     step once the fill has passed mid-tone (20ms on the ease-out curve) */
  .site-header.is-scheme-flip { transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), color 0s linear 20ms; }
  .site-header.is-scheme-flip *, .site-header.is-scheme-flip *::before, .site-header.is-scheme-flip *::after { transition-duration: 0s !important; transition-delay: 20ms !important; }
  .site-header__inner { position: relative; display: flex; align-items: center; gap: var(--space-6); min-height: var(--header-h); }
  .site-header__tools { display: flex; flex: none; align-items: center; gap: var(--space-2); }
  .site-header__tools .icon-btn { background: transparent; color: var(--color-text-muted); }   /* size: --icon-btn (40 · 44 on touch) */
  .site-header__tools .icon-btn:hover { background: var(--color-fill); color: var(--color-heading); }
  .site-header__tools .icon-btn[aria-expanded="true"] { background: var(--color-fill-hover); color: var(--color-heading); }
  .site-header__menu { display: none; }

  /* ---- Brand: emblem, ministry line, title ------------------------------------ */
  .brand { display: flex; align-items: center; gap: .7rem; flex: 0 1 auto; min-width: 0; margin-right: auto; color: inherit; text-decoration: none; }
  .brand:hover { color: inherit; text-decoration: none; }
  .brand__mark { width: 2.25rem; height: 2.25rem; flex: none; }
  /* Placeholder for an institution's emblem: replace it with <img class="brand__mark" src="stema.svg" alt="">. */
  .brand__emblem {
    display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: var(--radius-sm);
    background: var(--color-heading); color: var(--color-bg);
    box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-on-inverse) 18%, transparent);
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  .brand__emblem .icon { width: 1.2rem; height: 1.2rem; stroke-width: 1.8; }
  .topbar--inverse .brand__emblem, .auth__panel .brand__emblem {
    background: var(--glass-on-inverse-hover); color: var(--color-on-inverse); box-shadow: inset 0 0 0 .5px var(--color-inverse-border);
  }
  .brand__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .brand__title { font: var(--fw-semibold) 1.0625rem/1.15 var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading); transition: color var(--dur-2) var(--ease-out); }
  /* the ministry line: the one tracked uppercase line, never hidden in the site header */
  .brand__sub { font: var(--fw-semibold) .75rem/1.3 var(--font-text); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-muted); transition: color var(--dur-2) var(--ease-out); }
  .brand__sub--short { display: none; }
  @media (min-width: 961px) {
    .site-header .brand { flex-shrink: 0; max-width: 40%; }       /* the identity keeps its room; a long navigation scrolls */
    .site-header .brand__title, .site-header .brand__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }

  /* ---- Navigation pills ----------------------------------------------------- */
  .site-nav { min-width: 0; }
  .site-nav__list { display: flex; gap: 2px; }
  .site-nav__link {
    position: relative; display: inline-flex; align-items: center; height: 2.25rem; padding: 0 .85rem; border-radius: var(--radius-pill);
    font: var(--fw-medium) .9375rem/1 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-decoration: none; white-space: nowrap;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  .site-nav__link:hover { color: var(--color-heading); background: var(--color-fill); text-decoration: none; }
  .site-nav__link[aria-current] { color: var(--color-heading); background: var(--color-fill); font-weight: var(--fw-semibold); }
  .site-nav__link:active { transform: scale(var(--press-scale-chip)); }
  .site-nav__extra { display: none; }
  /* a long navigation, made compact on purpose (no counting of links) */
  .site-nav--compact .site-nav__link { padding-inline: .625rem; font-size: .875rem; }

  /* a small laptop: the same bar, a little tighter; a collapsible pill (the
     signed-in person) keeps its icon and its name for screen readers */
  @media (min-width: 961px) and (max-width: 1180px) {
    .site-header__inner { gap: var(--space-4); }
    .site-nav__link { padding-inline: .6rem; font-size: .875rem; }
    .site-header__tools { gap: .35rem; }
    .site-header__tools > .btn { padding-inline: .8rem; }
    .site-header__tools > .btn--collapsible { width: var(--btn-h-sm); padding-inline: 0; gap: 0; font-size: 0; letter-spacing: 0; }
    .site-header__tools > .btn--collapsible .icon { width: 1.125rem; height: 1.125rem; margin: 0; }
    .site-header__tools > .btn--collapsible > .btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media (min-width: 961px) {
    /* room around the links so a scrolling list never clips their focus ring */
    .site-nav__list { overflow-x: auto; scrollbar-width: none; padding: 7px; margin: -7px; }
    .site-nav__list::-webkit-scrollbar { display: none; }
    /* only while the list scrolls: a fade at the end (or start) that hides more */
    .site-nav__list.has-more-end { -webkit-mask-image: linear-gradient(90deg, black calc(100% - 1.5rem), transparent); mask-image: linear-gradient(90deg, black calc(100% - 1.5rem), transparent); }
    .site-nav__list.has-more-start { -webkit-mask-image: linear-gradient(90deg, transparent, black 1.5rem); mask-image: linear-gradient(90deg, transparent, black 1.5rem); }
    .site-nav__list.has-more-start.has-more-end {
      -webkit-mask-image: linear-gradient(90deg, transparent, black 1.5rem, black calc(100% - 1.5rem), transparent);
      mask-image: linear-gradient(90deg, transparent, black 1.5rem, black calc(100% - 1.5rem), transparent);
    }
  }

  /* ---- 960px and below: a menu button and a sheet under the header (M32) ---- */
  @media (max-width: 960px) {
    .site-header__menu { display: inline-grid; }
    .site-header__tools > .seg, .site-header__theme { display: none; }
    .site-nav {
      position: absolute; top: 100%; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
      height: calc(100dvh - var(--sheet-top, var(--header-h))); overflow-y: auto; overscroll-behavior: contain;   /* --sheet-top: header.js */
      padding: var(--space-2) var(--gutter) var(--space-8);
      background: var(--color-elevated);                 /* opaque: a nested blur cannot see the page */
      box-shadow: 0 1px 0 var(--color-border), 0 30px 50px -30px rgb(var(--shadow-rgb) / .35);
      display: none; opacity: 0; translate: 0 -8px;
      transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-exit), display var(--dur-2) allow-discrete;
    }
    /* open: its own view-transition name, so when a link leaves the page the
       sheet fades out with the old page instead of being caught mid-fade */
    .site-nav.is-open { display: block; opacity: 1; translate: 0 0; view-transition-name: atlas-nav-sheet; transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--ease-spring), display var(--dur-3) allow-discrete; }
    @starting-style { .site-nav.is-open { opacity: 0; translate: 0 -8px; } }
    .site-nav.is-instant { transition: none; }
    /* nothing scrolls under the open sheet (a wheel or a drag on the bar
       would move the page; the gutter stays, so nothing shifts) */
    :root:has(.site-header.has-open-nav) { overflow: hidden; scrollbar-gutter: stable; }
    .site-nav__list { flex-direction: column; gap: 0; }
    .site-nav__link {
      width: 100%; height: 3.5rem; padding: 0; border-radius: 0; border-bottom: 1px solid var(--color-border);
      font-size: 1.75rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); color: var(--color-heading);
    }
    .site-nav__link:hover, .site-nav__link[aria-current] { background: transparent; }
    .site-nav__link:active { transform: none; opacity: .7; }
    .site-nav__link[aria-current]::after { content: ""; flex: none; width: .5rem; height: .5rem; margin-left: .65rem; border-radius: 50%; background: var(--color-primary); }
    .site-nav__link:focus-visible { outline-offset: -3px; }
    /* the links arrive one after another (30ms, at most 6) */
    .site-nav.is-open .site-nav__list > li { animation: atlas-rise var(--dur-3) var(--ease-spring) backwards; --rise: 8px; }
    .site-nav.is-open .site-nav__list > li:nth-child(2) { animation-delay: 30ms; }
    .site-nav.is-open .site-nav__list > li:nth-child(3) { animation-delay: 60ms; }
    .site-nav.is-open .site-nav__list > li:nth-child(4) { animation-delay: 90ms; }
    .site-nav.is-open .site-nav__list > li:nth-child(5) { animation-delay: 120ms; }
    .site-nav.is-open .site-nav__list > li:nth-child(n + 6) { animation-delay: 150ms; }
    .site-nav__extra { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-6); }
    .site-nav__extra > .btn { flex: none; }
  }
  @media (max-width: 600px) {
    .site-header__inner { gap: var(--space-3); }
    .site-header__tools > .btn { display: none; }
    .brand__mark, .brand__emblem { width: 2.125rem; height: 2.125rem; }
    .brand__title { font-size: 1rem; }
    .brand__sub--long { display: none; }
    .brand__sub--short { display: block; }
  }
  @media (pointer: coarse) {
    .site-header .brand { min-height: var(--target-min); }
  }
  @media (pointer: coarse) and (min-width: 961px) {
    .site-nav__link { height: var(--target-min); }
  }

  /* Without JavaScript the menu button cannot open the sheet: the links
     stay on the page as a wrapped row under the bar */
  @media (scripting: none) and (max-width: 960px) {
    .site-header__inner { flex-wrap: wrap; row-gap: 0; }
    .site-header__menu { display: none; }
    .site-nav {
      position: static; order: 9; flex: 1 1 100%; height: auto; overflow: visible; margin: 0 0 var(--space-2); padding: 0;
      background: none; box-shadow: none; display: block; opacity: 1; translate: none;
    }
    .site-nav__list { flex-direction: row; flex-wrap: wrap; gap: 2px; }
    .site-nav__link {
      width: auto; height: 2.25rem; padding: 0 .85rem; border-bottom: 0; border-radius: var(--radius-pill);
      font-size: .9375rem; font-weight: var(--fw-medium); letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
    }
    .site-nav__link[aria-current] { color: var(--color-heading); background: var(--color-fill); font-weight: var(--fw-semibold); }
    .site-nav__link[aria-current]::after { content: none; }
    .site-nav__extra { display: none; }
  }

  /* Forced colours: the current page is a fill, which the system palette
     drops — it gets a frame (the phone sheet's dot is painted in Highlight) */
  @media (pointer: coarse) and (min-width: 961px) and (max-width: 1180px) {
    .site-header__tools > .btn--collapsible { width: var(--target-min); }
  }
  @media (min-width: 961px) and (max-width: 1023px) {
    .site-header__inner { gap: var(--space-3); }
    .site-nav__link { padding-inline: .5rem; }
  }
  @media (forced-colors: active) {
    .site-nav__link[aria-current] { outline: 1px solid CanvasText; outline-offset: -1px; }
    .site-nav__link[aria-current]::after { forced-color-adjust: none; background: Highlight; }
  }
}

/* ---- css/components/topbar.css ---- */
/* Atlas · Topbar
   Standalone, a slim bar with the identity (brand) and an action or two:
   portal flows ("Salvează și ieși"), the hub, landing pages. Static by
   default; .topbar--sticky keeps it on screen in a translucent material;
   .topbar--inverse is the dark version.
     <header class="topbar"><div class="container topbar__inner">
       <a class="brand" href="/">…</a>
       <div class="topbar__actions">…</div>
     </div></header>
   In the app (.app-shell > .topbar, see sidebar.css) it is the sticky
   toolbar: the hairline appears once the page scrolls under it, and the
   page's large title collapses into it (M22: shell.js adds .has-title).
     <header class="topbar" data-site-header><div class="topbar__inner">
       <button class="icon-btn icon-btn--ghost topbar__sidebar" data-sidebar-toggle …>  shown while the sidebar is hidden
       <a class="brand" href="panou.html">…</a>                                        classic, flush, phones
       <p class="topbar__title" aria-hidden="true">Panou</p>                           the collapsed large title
       <button class="topbar__search" data-palette-open …>…</button>                   classic
       <div class="topbar__actions">
         <a class="btn btn--sm topbar__action" href="…">Dosar nou</a>                  the page's primary action, with the title
         notifications (.icon-btn--ghost.has-badge + .badge--dot) ·
         <button class="icon-btn icon-btn--ghost topbar__theme" data-theme-toggle …>  into the user menu at 480px and below
         <button class="topbar__user" popovertarget="user-menu" …>…</button>
         <button class="icon-btn icon-btn--ghost topbar__menu" data-dialog-open="nav-drawer" …>  960px and below
       </div></div></header>
   Room for the collapsed title (M22): it takes at least 6rem once it shows;
   at 1180px and below the search turns into its icon and the user button
   into its avatar. Labels that give way are hidden for the eye only, so the
   buttons keep their names ("Caută… Ctrl K", "Ana Popescu …"). Any topbar
   (in the app shell or standalone, as in the docs) turns its search into
   the icon at 960px and below; the brand keeps at least 8rem. */
@layer components {
  .topbar { background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
  .topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
  .topbar__actions { display: flex; flex: none; align-items: center; gap: var(--space-2); }
  .topbar :is(.topbar__actions, .topbar__inner) > :is(.icon-btn, .tip > .icon-btn) { background: transparent; color: var(--color-text-muted); }
  .topbar :is(.topbar__actions, .topbar__inner) > :is(.icon-btn, .tip > .icon-btn):hover { background: var(--color-fill); color: var(--color-heading); }
  .topbar :is(.topbar__actions, .topbar__inner) > :is(.icon-btn, .tip > .icon-btn)[aria-expanded="true"] { background: var(--color-selected); color: var(--color-on-selected); }
  /* the brand on one line: the ministry line, then the title with an ellipsis */
  .topbar .brand { min-width: min(8rem, 100%); }
  .topbar .brand__text { min-width: 0; }
  .topbar .brand__title, .topbar .brand__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar--sticky {
    position: sticky; top: 0; z-index: var(--z-header);
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    transition: box-shadow var(--dur-3) var(--ease-out);
  }
  /* with data-site-header: a light shadow once the page scrolls under it */
  .topbar--sticky.is-scrolled { box-shadow: 0 10px 30px -24px rgb(var(--shadow-rgb) / .35); }
  .topbar--inverse { background: var(--color-inverse); border-bottom-color: var(--color-inverse-border); color: var(--color-on-inverse); }
  .topbar--inverse .brand__title { color: var(--color-on-inverse); }
  .topbar--inverse .brand__sub { color: var(--color-on-inverse-muted); }
  .topbar--full .topbar__inner { width: auto; margin: 0; padding-inline: var(--space-5) var(--space-4); }

  /* ---- In the app shell ----------------------------------------------------- */
  /* at rest the toolbar is the page itself; once content scrolls under it, it
     turns to material with a hairline (as a macOS toolbar does) */
  .app-shell > .topbar {
    grid-column: 1 / -1; grid-row: 1 / -1; align-self: start; position: sticky; top: 0; z-index: var(--z-header);
    border-bottom: 0; background: transparent;
    box-shadow: inset 0 -1px 0 transparent; transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
    view-transition-name: atlas-topbar;
  }
  .app-shell > .topbar:is(.is-scrolled, .has-title) {
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: inset 0 -1px 0 var(--color-border);
  }
  .app-shell > .topbar .topbar__inner { justify-content: flex-start; width: auto; margin: 0; padding-inline: var(--space-5) var(--space-4); }
  /* classic and flush: the brand fills the sidebar column, so the title lines up with the content */
  .app-shell > .topbar .brand { flex: none; min-width: calc(var(--shell-col) + var(--gutter) - var(--space-5) - var(--space-4)); margin-right: 0; }
  .app-shell > .topbar .topbar__actions { margin-left: auto; }

  /* The collapsed large title (M22): the page's h1, in 15/600, fades in and
     rises 4px once the large title has passed under the bar. Hidden from
     screen readers (the h1 is the title). */
  .topbar__title {
    flex: 1 1 7rem; min-width: 0; margin: 0;  /* shown, a 7rem share and at least 6rem (below) */
    font: var(--fw-semibold) .9375rem/1.25 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-heading);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; translate: 0 4px; visibility: hidden;
    transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-spring), visibility 0s linear var(--dur-2);
  }
  /* hidden, it only fills room nobody else wants: it never squeezes the brand
     (a standalone bar such as the docs' keeps "Sistemul de avizare" whole) */
  .topbar:not(.has-title) .topbar__title { flex-basis: 0; }
  .topbar.has-title .topbar__title { min-width: 6rem; opacity: 1; translate: 0 0; visibility: visible; transition-delay: 0s; }

  /* The search trigger in the topbar (classic): see .sidebar__search in sidebar.css */
  .topbar__search { flex: 0 1 20rem; }

  /* The page's primary action joins the title once the page head has gone */
  .topbar__action { display: none; }
  .topbar.has-title .topbar__action { display: inline-flex; animation: atlas-pop var(--dur-2) var(--ease-spring) backwards; --pop-y: 4px; --pop-scale: .97; }

  /* The signed-in person: 32px avatar, name 13/600, role 12, a chevron that flips */
  .topbar__user {
    display: inline-flex; align-items: center; gap: .55rem; margin-left: var(--space-1); padding: .25rem .65rem .25rem .25rem; border-radius: var(--radius-pill);
    color: var(--color-heading); text-align: left; transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .topbar__user:hover, .topbar__user[aria-expanded="true"] { background: var(--color-fill); }
  .topbar__user:active { transform: scale(var(--press-scale)); }
  .topbar__user .avatar { --avatar: 2rem; }
  .topbar__user-text { display: grid; line-height: 1.2; }
  /* a label that gives way stays the button's name (hidden for the eye only) */
  .topbar__search { position: relative; }
  .topbar__user-text b { font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); white-space: nowrap; }
  .topbar__user-text small { font-size: .75rem; letter-spacing: 0; color: var(--color-text-subtle); white-space: nowrap; }
  .topbar__user > .icon { width: .85rem; height: .85rem; color: var(--color-text-subtle); transition: transform var(--dur-3) var(--ease-spring); }
  .topbar__user[aria-expanded="true"] > .icon { transform: rotate(180deg); }

  /* Brings back a hidden sidebar */
  .topbar__sidebar, .topbar__menu { display: none; }
  @keyframes atlas-topbar-in { from { opacity: 0; transform: translateX(-10px) scale(.9); } }
  @media (min-width: 961px) {
    .app-shell.is-collapsed > .topbar .topbar__sidebar { display: inline-grid; animation: atlas-topbar-in var(--dur-3) var(--ease-spring); }

    /* window: the toolbar covers the content column only and lines up with the
       page's container; brand, search and user live in the sidebar (they come
       back here while the sidebar is hidden) */
    :is([data-shell="window"] .app-shell, .app-shell--window) > .topbar { grid-column: 2; }
    :is([data-shell="window"] .app-shell, .app-shell--window) > .topbar .topbar__inner {
      width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; padding-inline: 0;
    }
    :is([data-shell="window"] .app-shell, .app-shell--window):not(.is-collapsed) > .topbar :is(.brand, .topbar__search, .topbar__theme, .topbar__user) { display: none; }
    :is([data-shell="window"] .app-shell, .app-shell--window).is-collapsed > .topbar .brand { min-width: 0; animation: atlas-pop var(--dur-3) var(--ease-spring) backwards; }
    /* over a page that fills the screen (the map) the toolbar floats on material, no seam */
    :is([data-shell="window"] .page-fill > .app-shell, .page-fill > .app-shell--window) > .topbar {
      background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
      box-shadow: inset 0 -1px 0 var(--color-border);
    }
    /* flush keeps its search in the sidebar, and its bar always ends in a hairline (the grey column meets it) */
    :is([data-shell="flush"] .app-shell, .app-shell--flush):not(.is-collapsed) > .topbar .topbar__search { display: none; }
    :is([data-shell="flush"] .app-shell, .app-shell--flush) > .topbar { box-shadow: inset 0 -1px 0 var(--color-border); }
  }

  /* a small laptop: the search keeps its icon and the user button its
     avatar, so a collapsed title has room in a full bar */
  @media (max-width: 1180px) {
    .app-shell > .topbar .topbar__search { flex: none; width: 2.25rem; padding: 0; justify-content: center; background: transparent; color: var(--color-text-muted); }
    .app-shell > .topbar .topbar__search > :not(.icon), .app-shell > .topbar .topbar__user-text {
      position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .app-shell > .topbar .topbar__user { padding-right: .5rem; }
  }
  @media (max-width: 960px) {
    .topbar__menu { display: inline-grid; }
    .topbar__title { flex-basis: 0; }          /* shown too, it only takes the room the brand text gives up */
    /* the search becomes an icon (the drawer has the full trigger), in any topbar */
    .topbar .topbar__search { flex: none; width: 2.25rem; padding: 0; justify-content: center; background: transparent; color: var(--color-text-muted); }
    .topbar .topbar__search > :not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .app-shell > .topbar .brand, .topbar.has-title .brand { flex: 0 1 auto; min-width: 2.25rem; }   /* the title gives way (ellipsis) before the actions do; the emblem stays whole */
    .app-shell > .topbar .topbar__inner { padding-inline: var(--space-4) var(--space-3); gap: var(--space-3); }
    /* the collapsed title takes the brand's place, in any topbar that shows
       one (the app's, or a standalone one as in the docs); the brand's name
       is hidden for the eye only, so the link keeps it ("Ministerul Exemplu
       Sistemul de avizare"); the user button keeps its avatar */
    .topbar.has-title .brand__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .topbar .topbar__user-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media (max-width: 640px) {
    .topbar__user > .icon, .topbar__action, .app-shell > .topbar .topbar__search { display: none; }
    .topbar__user-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .topbar.has-title .topbar__action { display: none; }
    .topbar__user { padding: .25rem; margin-left: 0; }
  }
  @media (max-width: 480px) {
    /* the plain bar of the public flow pages (and the hub): its actions keep
       their icon and their name for screen readers, the brand keeps its room
       (button.css, .btn--collapsible) */
    body > .topbar .topbar__actions > .btn { width: var(--btn-h); padding-inline: 0; gap: 0; font-size: 0; letter-spacing: 0; }
    body > .topbar .topbar__actions > .btn.btn--sm { width: var(--btn-h-sm); }
    body > .topbar .topbar__actions > .btn .icon { width: 1.125rem; height: 1.125rem; margin: 0; }
    body > .topbar .topbar__actions > .btn > .btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .topbar .brand__sub { display: none; }
    .topbar__actions { gap: var(--space-1); }
    .topbar__theme { display: none; }       /* the theme moves into the user menu (K14) */
    .topbar.has-title .topbar__title { min-width: 4rem; }     /* a 320px bar with a search and two actions */
    .topbar .brand { min-width: min(7rem, 100%); }
    .topbar .topbar__inner { gap: var(--space-3); }
  }
  /* 360px and less: in a bar that is short of room (a search and two actions
     in a narrow frame) the brand's name gives way before the actions do;
     the emblem stays whole */
  @media (max-width: 360px) {
    .topbar .brand { min-width: 2.25rem; }
  }
  @media (max-width: 480px) and (pointer: coarse) {
    body > .topbar .topbar__actions > .btn.btn--sm { width: var(--target-min); }
  }
  @media (pointer: coarse) {
    .topbar .brand { min-height: var(--target-min); }      /* icon buttons: --icon-btn is 44 on touch */
    .topbar__user { min-height: var(--target-min); }
  }
  @media (pointer: coarse) and (max-width: 1180px) {
    .app-shell > .topbar .topbar__search { width: var(--target-min); }
  }
  @media (pointer: coarse) and (max-width: 960px) {
    .topbar .topbar__search { width: var(--target-min); }
  }
}

/* ---- css/components/hero.css ---- */
/* Atlas · Hero — the stage (spec §3.9, M4–M7)
   A black stage lit by two slow glows, the contour signature in the top
   corner, one very large headline. The default front page of the portal uses
   the light hero (.hero--light, hero-variants.css); the stage is kept as a
   resource (pages/public/index-scena.html).
     <section class="hero" data-surface="dark" aria-labelledby="h-hero">
       <svg class="hero__bg topo" viewBox="0 0 1440 640" preserveAspectRatio="xMidYMid slice"
            focusable="false" aria-hidden="true" data-topo='[{"cx":1180,"cy":140,"levels":18,"step":28,"seed":4,"squash":0.85}]'></svg>
       <div class="container hero__inner">
         <div class="hero__copy">
           <a class="notice" href="…">…</a>                               1 · optional
           <h1 class="hero__title" id="h-hero">…</h1>                       2
           <p class="hero__lead">…</p>                                      3
           <div class="hero__actions">                                      4
             <a class="btn btn--light btn--lg" href="…">Începe o cerere <svg class="icon">…#i-arrow</svg></a>
             <a class="btn btn--outline-light btn--lg" href="…">Urmărește o cerere</a></div>
         </div>
         <div class="hero__media"><nav class="quick-links" aria-labelledby="ql-t">…</nav></div>   5
       </div>
     </section>
   data-surface="dark" is required: focus turns the light blue that reads on
   black, and the header knows it sits over the stage (header.js).
   Quick links: four glass tiles in a row, two up to 1180px, one grouped
   list on phones — never hidden.

   Colour: tokens only, so a theme re-tints the stage — the glows read
   --stage-glow / --stage-glow-2, the contours --topo-line-inverse /
   --topo-index-inverse, text the --color-on-inverse set, glass the
   --glass-on-inverse set. The headline is solid (no sheen).
   Motion, all stopped by Reduce Motion:
     M4 arrival   the copy rises 18px line after line (60ms apart), then the
                  quick links cascade (200–320ms)
     M5 contours  the index lines draw themselves (topo.css)
     M6 drift     the two glows drift (60s / 84s, 3% at most, alternate);
                  motion.js pauses them (.is-offscreen) when the stage is out
                  of view — the only loop on a page
     M7 parallax  the contour layer sinks 18% and grows 4% while the hero
                  scrolls away (scroll-driven, where supported) */
@layer components {
  /* ---- The stage --------------------------------------------------------- */
  .hero {
    position: relative; isolation: isolate; overflow: hidden; overflow: clip;
    color: var(--color-on-inverse); background: var(--color-inverse);
    padding-block: clamp(3.5rem, 1rem + 4.6vw, 5.25rem) clamp(3rem, 1rem + 3.4vw, 4.25rem);
  }
  /* Two glow layers, so they can drift on their own (M6) */
  .hero::before, .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    will-change: transform;
  }
  .hero::before {
    background: radial-gradient(64rem 34rem at 88% -12%, var(--stage-glow), transparent 62%);
    animation: atlas-stage-drift-a var(--dur-ambient) var(--ease-in-out) infinite alternate;
  }
  .hero::after {
    background: radial-gradient(40rem 26rem at -6% 112%, var(--stage-glow-2), transparent 64%);
    animation: atlas-stage-drift-b var(--dur-ambient-2) var(--ease-in-out) infinite alternate;
  }
  .hero.is-offscreen::before, .hero.is-offscreen::after { animation-play-state: paused; }
  @keyframes atlas-stage-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3%, 2.5%, 0) scale(1.06); }
  }
  @keyframes atlas-stage-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(3%, -2%, 0) scale(1.05); }
  }

  /* Contours from the top-right corner (M5 in topo.css, M7 below) */
  .hero__bg {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
    --topo: var(--topo-line-inverse); --topo-ix: var(--topo-index-inverse);
    -webkit-mask-image: radial-gradient(120% 90% at 85% 10%, #000 30%, transparent 75%);
    mask-image: radial-gradient(120% 90% at 85% 10%, #000 30%, transparent 75%);
    transform-origin: 70% 0;
  }
  /* The parallax follows the hero itself (a view timeline, from the moment
     its top passes under the top of the window until it has gone): for the
     stage at the top of a page that is the first screen of scroll, and a
     hero further down (docs, the lab) moves only while it leaves too. */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .hero { view-timeline: --atlas-stage block; }
      .hero__bg {
        animation: atlas-stage-parallax linear both;
        animation-timeline: --atlas-stage;
        animation-range: exit-crossing 0% exit-crossing 100%;
      }
      :where(.a11y-motion) .hero__bg { animation: none; }
    }
  }
  @keyframes atlas-stage-parallax { to { transform: translateY(18%) scale(1.04); } }

  /* ---- Copy -------------------------------------------------------------- */
  .hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.25rem, 1rem + 2.4vw, 3rem); align-items: end; }
  .hero__copy { min-width: 0; }
  .hero__title {
    margin-top: var(--space-6); max-width: 15.5em;
    font-size: var(--step-6); font-weight: var(--fw-display); line-height: 1.02; letter-spacing: var(--tracking-display);
    color: var(--color-on-inverse); text-wrap: balance;
  }
  .hero__title:first-child { margin-top: 0; }
  .hero__lead {
    margin-top: var(--space-6); max-width: 50ch;
    font-size: clamp(1.1875rem, 1.02rem + .55vw, 1.5rem); font-weight: var(--fw-regular); line-height: 1.42; letter-spacing: -.016em;
    color: var(--color-on-inverse-muted); text-wrap: pretty;
  }
  .hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-8); }
  .hero__media { min-width: 0; }

  /* ---- Quick links on the stage: glass tiles ------------------------------
     (the panel itself, used anywhere, is in service-card.css; the light
     hero's frosted sheet in hero-variants.css) */
  .hero:not(.hero--light) .quick-links {
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3);
    padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--color-on-inverse);
  }
  .hero:not(.hero--light) .quick-links__title { grid-column: 1 / -1; padding: 0 0 var(--space-1); font-size: var(--step--1); color: var(--color-on-inverse-muted); }
  .hero:not(.hero--light) .quick-links__item {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "icon go" "text text"; align-items: start; gap: var(--space-4) var(--space-3);
    min-height: 7.5rem; padding: 1.125rem 1.25rem 1.125rem 1.25rem; border-radius: var(--radius-lg);
    background: var(--glass-on-inverse); box-shadow: inset 0 0 0 1px var(--glass-on-inverse-ring);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    color: var(--color-on-inverse);
    transition: background-color var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring);
  }
  .hero:not(.hero--light) .quick-links__item:hover { color: var(--color-on-inverse); }
  @media (hover: hover) {
    .hero:not(.hero--light) .quick-links__item:hover { background: var(--glass-on-inverse-hover); transform: translateY(var(--lift)); }
  }
  .hero:not(.hero--light) .quick-links__item:active { transform: scale(var(--press-scale-tile)); transition-duration: var(--dur-1); }
  .hero:not(.hero--light) .quick-links__item:focus-visible { outline-offset: 3px; }
  .hero:not(.hero--light) .quick-links__icon { grid-area: icon; background: color-mix(in oklab, var(--color-on-inverse) 11%, transparent); color: var(--color-on-inverse); }
  .hero:not(.hero--light) .quick-links__text { grid-area: text; align-self: end; }
  .hero:not(.hero--light) .quick-links__text small { color: var(--color-on-inverse-muted); }
  /* a tile, not a list row: its arrow sits in a round .go disc (spec §3.1),
     which turns primary and nudges under the pointer; no CSS chevron here */
  .hero:not(.hero--light) .quick-links__item::after { content: none; }
  .hero:not(.hero--light) .quick-links__item > .icon {
    display: block; grid-area: go; width: 2rem; height: 2rem; padding: .5rem; margin-top: .25rem; border-radius: 50%;
    background: color-mix(in oklab, var(--color-on-inverse) 11%, transparent); color: var(--color-on-inverse);
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-bounce);
  }
  @media (hover: hover) {
    .hero:not(.hero--light) .quick-links__item:hover > .icon { background: var(--color-primary); color: var(--color-on-primary); translate: calc(var(--nudge) * .67) 0; }
  }
  @media (max-width: 1180px) { .hero:not(.hero--light) .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  /* Phones: one inset-grouped list — the rows share one glass panel with
     separators inset to the text column */
  @media (max-width: 640px) {
    .hero:not(.hero--light) .quick-links { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hero:not(.hero--light) .quick-links__title { padding: 0 0 var(--space-2); }
    .hero:not(.hero--light) .quick-links__item {
      grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon text go"; align-items: center; gap: var(--space-3);
      min-height: 4rem; padding: var(--space-3) var(--space-4); border-radius: 0; box-shadow: none;
      background:
        linear-gradient(var(--glass-on-inverse-ring), var(--glass-on-inverse-ring)) no-repeat right top / calc(100% - var(--space-4) - 2.5rem - var(--space-3)) 1px,
        var(--glass-on-inverse);
    }
    @media (hover: hover) {
      .hero:not(.hero--light) .quick-links__item:hover { background-color: var(--glass-on-inverse-hover); background-image: none; transform: none; }
    }
    .hero:not(.hero--light) .quick-links__title + .quick-links__item,
    .hero:not(.hero--light) .quick-links__item:first-child { background-image: none; border-start-start-radius: var(--radius-lg); border-start-end-radius: var(--radius-lg); }
    .hero:not(.hero--light) .quick-links__item:last-child { border-end-start-radius: var(--radius-lg); border-end-end-radius: var(--radius-lg); }
    .hero:not(.hero--light) .quick-links__text { align-self: center; }
    /* a list again: the row ends in the chevron, not the disc */
    .hero:not(.hero--light) .quick-links__item > .icon { display: none; }
    .hero:not(.hero--light) .quick-links__item::after { content: ""; grid-area: go; border-color: var(--color-on-inverse-muted); }
    @media (hover: hover) { .hero:not(.hero--light) .quick-links__item:hover::after { border-color: var(--color-on-inverse); } }
  }

  /* ---- M4 · arrival ------------------------------------------------------- */
  .hero__copy > *, .hero__media > :not(.quick-links), .hero:not(.hero--light) .quick-links > * {
    --rise: 18px; animation: atlas-rise var(--dur-4) var(--ease-spring) backwards;
  }
  .hero__copy > :nth-child(2) { animation-delay: 60ms; }
  .hero__copy > :nth-child(3) { animation-delay: 120ms; }
  .hero__copy > :nth-child(4) { animation-delay: 180ms; }
  .hero__copy > :nth-child(n + 5) { animation-delay: 240ms; }
  .hero:not(.hero--light) .quick-links > :nth-child(1) { animation-delay: 160ms; }
  .hero:not(.hero--light) .quick-links > :nth-child(2) { animation-delay: 200ms; }
  .hero:not(.hero--light) .quick-links > :nth-child(3) { animation-delay: 240ms; }
  .hero:not(.hero--light) .quick-links > :nth-child(4) { animation-delay: 280ms; }
  .hero:not(.hero--light) .quick-links > :nth-child(n + 5) { animation-delay: 320ms; }

  /* ---- Panorama: one column of copy; an illustration fills the right of
     the background and fades out under the text (mask, no overlay colour) */
  .hero--panorama .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero--panorama .hero__copy { max-width: 48rem; }
  .hero__map {
    position: absolute; z-index: -1; right: 1.5%; top: 50%; width: min(52%, 46rem); transform: translateY(-50%);
    opacity: .9;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  }
  .hero__map svg { display: block; width: 100%; height: auto; }
  @media (max-width: 900px) {
    .hero__map { position: relative; z-index: 0; right: auto; top: auto; width: min(100% - 2 * var(--gutter), 34rem); margin: var(--space-8) auto 0; transform: none; opacity: .8; -webkit-mask-image: none; mask-image: none; }
  }

  /* ---- Fill: the hero is exactly the first screen under the sticky header:
     the whole hero shows on arrival and nothing of the next section. svh =
     the viewport with the mobile browser bars visible. Type and spacing
     also scale with the screen HEIGHT so the copy fits short screens. */
  .hero--fill {
    display: grid; align-content: center;
    min-height: calc(100vh - var(--header-h) - 1px);
    min-height: calc(100svh - var(--header-h) - 1px);
    padding-block: clamp(1.5rem, 6svh, 5rem);
  }
  .hero--fill .hero__title { font-size: clamp(2.5rem, min(1.4rem + 4.6vw, 10svh), 5.5rem); }
  .hero--fill .hero__lead { margin-top: clamp(.9rem, 2.6svh, 1.5rem); font-size: clamp(1.05rem, min(1rem + .45vw, 2.5svh), 1.5rem); }
  .hero--fill .hero__actions { margin-top: clamp(1.25rem, 4svh, 2.5rem); }
  @media (max-width: 900px) {
    /* on narrow screens the map becomes a faint backdrop instead of adding height */
    .hero--fill .hero__map { position: absolute; z-index: -1; top: auto; right: -30%; bottom: -3%; width: 125%; margin: 0; opacity: .28; }
  }

  /* ---- Small screens ------------------------------------------------------ */
  @media (max-width: 640px) {
    .hero__title { letter-spacing: var(--tracking-title); }
    /* the contours keep their desktop scale and stay pinned to the top-right
       corner, so a phone still sees the rings around the summit (a sliced
       full-height drawing would only show its empty middle) */
    .hero__bg { inset: 0 0 auto auto; width: max(100%, 90rem); height: min(100%, 40rem); }
  }
  @media (max-width: 480px) {
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
  }

  /* ---- Print: ink on paper, no stage -------------------------------------- */
  @media print {
    .hero {
      color: var(--color-text); background: none; padding-block: var(--space-8);
      /* the stage colours become ink: everything inside (notice, glass
         buttons, quick links) reads them */
      --color-on-inverse: var(--color-heading); --color-on-inverse-muted: var(--color-text-muted);
      --color-on-inverse-subtle: var(--color-text-subtle); --color-on-inverse-accent: var(--color-link);
      --glass-on-inverse: transparent; --glass-on-inverse-hover: transparent; --glass-on-inverse-ring: var(--color-border-strong);
      --color-inverse-border: var(--color-border-strong);
    }
    .hero::before, .hero::after, .hero__bg, .hero__map { display: none; }
    .hero__title { color: var(--color-heading); }
    .hero__lead { color: var(--color-text-muted); }
  }
}

/* Dark mode: the stage would melt into the black page, so it ends with a
   hairline (K18). Keep the two rules equal. */
@layer components {
  :root[data-theme="dark"] .hero { box-shadow: inset 0 -1px 0 var(--color-inverse-border); }
  @media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .hero { box-shadow: inset 0 -1px 0 var(--color-inverse-border); }
  }
}

/* ---- css/components/hero-variants.css ---- */
/* Atlas · Hero variants (spec §3.9, G15, K27; the stage, --panorama and
   --fill are in hero.css)

   .hero--light   the white portal variant: the page white fading to the
                  grouped grey, a faint accent light, graphite contours with
                  the index lines in the accent, and the quick links as a
                  frosted sheet floating over them. No data-surface attribute
                  (it is a light plane); dark mode turns it into a stage on
                  its own, because it reads only scheme tokens.
     <section class="hero hero--light" aria-labelledby="h-hero">
       <svg class="hero__bg topo" … data-topo='[…]'></svg>
       <div class="container hero__inner">
         <div class="hero__copy">
           <a class="notice" href="…">…</a>                         optional
           <h1 class="hero__title" id="h-hero">…</h1>
           <p class="hero__lead">…</p>
           <div class="hero__actions"><a class="btn btn--lg" href="…">Începe o cerere <svg class="icon">…#i-arrow</svg></a>
             <a class="btn btn--secondary btn--lg" href="…">Urmărește o cerere</a></div>
         </div>
         <div class="hero__media"><nav class="quick-links" aria-labelledby="ql-t">…</nav></div>
       </div>
     </section>
                  Split 1.3fr / .85fr above 900px; at 900px and under the
                  sheet moves under the actions (it is never hidden).
   .hero--center  centred copy, for a short statement and one action */
@layer components {
  /* ---- Light hero ---------------------------------------------------------- */
  .hero--light {
    color: var(--color-text);
    background:
      radial-gradient(44rem 30rem at 80% 48%, color-mix(in oklab, var(--color-accent) 9%, transparent), transparent 70%),
      linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    padding-block: clamp(3.5rem, 1.5rem + 5vw, 7rem);
    /* tiles on it are white, like on an alternate plane (resolution rule:
       the dependents move with the tile) */
    --color-plane: var(--color-bg-alt);
    --color-tile: var(--color-tile-alt); --color-tile-hover: var(--color-tile-alt-hover);
    --chart-surface: var(--color-tile);
    --color-row-hover: var(--color-fill-subtle);
  }
  .hero--light::before, .hero--light::after { content: none; }
  .hero--light .hero__bg {
    --topo: var(--topo-line); --topo-ix: var(--topo-index);
    -webkit-mask-image: radial-gradient(90% 100% at 78% 40%, #000 25%, transparent 72%);
    mask-image: radial-gradient(90% 100% at 78% 40%, #000 25%, transparent 72%);
  }
  .hero--light:not(.hero--panorama, .hero--center) .hero__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
  .hero--light .hero__title { max-width: 13em; font-size: clamp(2.875rem, 1.6rem + 3.6vw, 4.75rem); line-height: 1.03; letter-spacing: var(--tracking-display); color: var(--color-heading); }
  .hero--light .hero__lead { max-width: 46ch; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.5; color: var(--color-text-muted); }
  .hero--light .hero__actions { margin-top: var(--space-10); }

  /* The frosted sheet: the overlay material, a hairline and one deep, soft
     shadow; it settles in after the copy (M4) */
  .hero--light .quick-links {
    padding: var(--space-2); border-radius: var(--radius-xl);
    background: var(--material-overlay);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: 0 0 0 1px var(--color-border), 0 32px 72px -24px rgb(var(--shadow-rgb) / .24), 0 10px 24px -12px rgb(var(--shadow-rgb) / .1);
    animation: atlas-settle 720ms var(--ease-spring) 140ms backwards;
  }
  @media (hover: hover) { .hero--light .quick-links__item:hover { background: var(--color-fill-subtle); } }
  .hero--light .quick-links__item:active { background: var(--color-fill); }
  @media (max-width: 900px) {
    .hero--light:not(.hero--panorama, .hero--center) .hero__inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .hero--light .hero__media { max-width: 34rem; }
  }
  @media (max-width: 640px) {
    .hero--light .hero__title { letter-spacing: var(--tracking-title); }
  }

  /* ---- Centred ------------------------------------------------------------- */
  .hero--center .hero__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .hero--center .hero__copy { display: grid; justify-items: center; max-width: 52rem; }
  .hero--center .hero__title, .hero--center .hero__lead { margin-inline: auto; }
  .hero--center .hero__actions { justify-content: center; }
}

/* ---- css/components/notice.css ---- */
/* Atlas · Notice ("Nou" pill above a hero title)
   A 32px pill: a primary "Nou" tag (12/600), one line of 15px text with an
   ellipsis (two lines on phones), and a chevron that nudges on hover.
   On a light plane it is a grey fill pill; on a dark surface (the stage:
   [data-surface="dark"] or any .hero but the light one; any
   [data-scheme="dark"] island) it becomes a
   glass pill: --glass-on-inverse with a .12 inset ring (no literal colours,
   so themes re-tint it).

     <a class="notice" href="…"><span class="notice__tag">Nou</span>
       <span class="notice__text">Avizul arhitectului-șef se poate cere online</span>
       <svg class="icon" aria-hidden="true"><use href="…#i-arrow"/></svg></a> */
@layer components {
  .notice {
    --notice-bg: var(--color-fill); --notice-bg-hover: var(--color-fill-hover); --notice-ring: transparent;
    --notice-fg: var(--color-heading); --notice-icon: var(--color-text-subtle-on-fill); --notice-time: var(--color-link-on-fill);
    position: relative; display: inline-flex; align-items: center; gap: .625rem; max-width: 100%; min-height: 2rem;
    padding: .25rem .875rem .25rem .25rem; border-radius: var(--radius-pill);
    background: var(--notice-bg); box-shadow: inset 0 0 0 1px var(--notice-ring);
    color: var(--notice-fg); font-size: .9375rem; line-height: 1.3; letter-spacing: var(--tracking-ui); text-decoration: none;
    transition: background-color var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  :where([data-surface="dark"], [data-scheme="dark"], .hero:not(.hero--light)) .notice {
    --notice-bg: var(--glass-on-inverse); --notice-bg-hover: var(--glass-on-inverse-hover); --notice-ring: var(--color-inverse-border);
    --notice-fg: var(--color-on-inverse); --notice-icon: var(--color-on-inverse-muted); --notice-time: var(--color-on-inverse-accent);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
  }
  .notice:hover { background: var(--notice-bg-hover); color: var(--notice-fg); text-decoration: none; }
  .notice:active { scale: var(--press-scale); }
  .notice__tag {
    flex: none; display: inline-grid; place-items: center; height: 1.5rem; padding: 0 .625rem; border-radius: var(--radius-pill);
    background: var(--color-primary); color: var(--color-on-primary);
    font: var(--fw-semibold) .75rem/1 var(--font-text); letter-spacing: 0;
  }
  .notice__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notice__text time { color: var(--notice-time); font-weight: var(--fw-semibold); }
  /* The arrow icon is drawn as a chevron (spec §3.1: links end in ›) */
  .notice > .icon { display: none; }
  .notice::after {
    content: ""; flex: none; width: .4375rem; height: .4375rem; margin-left: -.125rem;
    border: solid var(--notice-icon); border-width: 1.6px 1.6px 0 0; border-radius: 1px;
    rotate: 45deg; transition: translate var(--dur-2) var(--ease-bounce), border-color var(--dur-2) var(--ease-out);
  }
  .notice:hover::after { translate: var(--nudge) 0; border-color: var(--notice-fg); }
  @media (max-width: 640px) {
    .notice { border-radius: 1.125rem; }
    .notice__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; text-wrap: pretty; }
  }
  @media (pointer: coarse) {
    .notice::before { content: ""; position: absolute; inset: -.375rem 0; }
  }
}

/* ---- css/components/plate.css ---- */
/* Atlas · Plate
   A map plate for a dark surface (the stage, a band): the signature contour
   lines on a faint survey grid, crosshair labels and one located point —
   framed as a GIS sheet. Decorative: aria-hidden.
     <div class="plate" aria-hidden="true">
       <svg class="topo" viewBox="0 0 400 500" preserveAspectRatio="xMidYMid slice" focusable="false" data-topo='[…]'></svg>
       <span class="plate__label plate__label--n">45°N</span><span class="plate__label plate__label--e">25°E</span><span class="plate__dot"></span>
     </div>
   Markup and options: docs/index.html. */
@layer components {
  .plate {
    --topo: color-mix(in oklab, var(--topo-line-inverse), var(--color-on-inverse) 5%);
    --topo-ix: color-mix(in oklab, var(--topo-index-inverse), var(--color-accent) 20%);
    position: relative; justify-self: end; width: 100%; max-width: 25rem; aspect-ratio: 4 / 5; overflow: hidden;
    border-radius: var(--radius-tile); box-shadow: inset 0 0 0 1px var(--color-inverse-border);
    background:
      linear-gradient(var(--topo-line-inverse) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
      linear-gradient(90deg, var(--topo-line-inverse) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
      var(--color-inverse);
  }
  .plate .topo { position: absolute; inset: 0; width: 100%; height: 100%; }
  .plate__label {
    position: absolute; top: var(--space-4);
    font: var(--fw-medium) var(--step--2)/1 var(--font-mono); letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--color-on-inverse-muted);
  }
  .plate__label--n { left: var(--space-5); } .plate__label--e { right: var(--space-5); }
  .plate__dot {
    position: absolute; left: 60%; top: 46%; width: 10px; height: 10px; border-radius: 50%; translate: -50% -50%;
    background: var(--color-on-inverse-accent);
    box-shadow: 0 0 0 6px color-mix(in oklab, var(--color-on-inverse-accent) 25%, transparent), 0 0 0 16px color-mix(in oklab, var(--color-on-inverse-accent) 10%, transparent);
  }
}

/* ---- css/components/topo.css ---- */
/* Atlas · Topo — the signature contour lines (spec §1.2, §2.2, M5)
   topo.js fills <svg class="topo" data-topo='[{"cx":…,"cy":…,"levels":…,
   "step":…,"seed":…,"squash":…}]'> with seeded contour paths (identical on
   every load); every 5th line is an index contour (class "ix").
   Colours come from the plane through two variables a host may set:
     --topo     regular lines   (default --topo-line: graphite 6% / white .05)
     --topo-ix  index lines     (default --topo-index: the accent at 30%)
   On the stage the hero maps them to --topo-line-inverse / -index-inverse.
   Both tokens re-tint with the theme (OTN draws gold, cobalt cobalt).

   Contour draw (M5) on the hero background, the sign-in stage panel, or any
   svg given .topo--draw: the regular lines fade in over 1.2s while each
   index line draws itself (stroke-dashoffset 1 → 0 over 1.6s, from 250ms,
   inner rings first). topo.js gives every path pathLength="1", so one dash
   of length 1 is the whole line. Reduce Motion: drawn at once (base.css). */
@layer components {
  .topo { pointer-events: none; }
  .topo path { fill: none; stroke: var(--topo, var(--topo-line)); stroke-width: 1; vector-effect: non-scaling-stroke; }
  .topo path.ix { stroke: var(--topo-ix, var(--topo-index)); stroke-width: 1.5; }

  /* ---- M5 · contour draw ------------------------------------------------- */
  :is(.hero__bg, .auth__panel .topo, .topo--draw) path:not(.ix) { animation: atlas-fade 1.2s var(--ease-out) backwards; }
  :is(.hero__bg, .auth__panel .topo, .topo--draw) path.ix[pathLength] {
    stroke-dasharray: 1; stroke-dashoffset: 0;
    animation: atlas-topo-draw 1.6s var(--ease-out) 250ms backwards;
  }
  :is(.hero__bg, .auth__panel .topo, .topo--draw) path.ix[pathLength]:nth-child(10n) { animation-delay: 400ms; }
  :is(.hero__bg, .auth__panel .topo, .topo--draw) path.ix[pathLength]:nth-child(15n) { animation-delay: 550ms; }
  :is(.hero__bg, .auth__panel .topo, .topo--draw) path.ix[pathLength]:nth-child(n + 20) { animation-delay: 700ms; }
  @keyframes atlas-topo-draw { from { stroke-dashoffset: 1; } }
  @media print { .topo path { animation: none !important; } }
}

/* ---- css/components/art-card.css ---- */
/* Atlas · Art card
   A dark platform card: an echo of the stage (black, a faint glow from the
   top corner), the title and a line of text, an action in the stage's light
   blue, and an optional illustration bleeding off the bottom edge. Two per
   row; a lone card (.art-cards--single) turns horizontal.
     <div class="art-cards">
       <a class="art-card" href="…"><span class="art-card__text">
         <span class="host">… geoportal.mdlpa.ro</span><span class="art-card__title">…</span>
         <span class="art-card__desc">…</span><span class="art-card__cta">Deschide platforma …</span></span>
         <img class="art-card__art" src="…" alt=""></a>
     </div>
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Art cards (dark card, illustration bleeding off the bottom) ------- */
  .art-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tile-gap); }
  .art-card {
    --pad: var(--card-pad);
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
    min-height: 16rem; padding: var(--pad); border-radius: var(--radius-tile); text-decoration: none; color: var(--color-on-inverse);
    background: radial-gradient(70% 90% at 100% 0%, var(--stage-glow-2), transparent 70%), var(--color-inverse);
    /* the inset hairline is invisible on a light page and ends the card on a black one */
    box-shadow: inset 0 0 0 1px var(--color-inverse-border), var(--tile-shadow);
    transition: box-shadow var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  .art-card__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); max-width: 34rem; }
  .art-card__title { font-size: var(--step-3); line-height: var(--lh-title); letter-spacing: var(--tracking-tight); color: var(--color-on-inverse); }
  .art-card__desc { max-width: 44ch; font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-on-inverse-muted); }
  .art-card__cta { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-weight: var(--fw-medium); letter-spacing: var(--tracking-ui); color: var(--color-on-inverse-accent); }
  .art-card__cta .icon { width: 1rem; height: 1rem; transition: translate var(--dur-2) var(--ease-bounce); }
  .art-card .host { min-height: 1.625rem; color: var(--color-on-inverse-muted); }   /* as tall as a .tag, so titles line up */
  .art-card__art { order: 2; display: block; width: calc(100% + 2 * var(--pad)); max-width: none; height: auto; margin: auto calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding-top: var(--space-4); }

  a.art-card:hover { color: var(--color-on-inverse); text-decoration: none; }
  @media (hover: hover) {
    a.art-card:hover {
      box-shadow: inset 0 0 0 1px var(--color-inverse-border), var(--tile-shadow-hover); translate: 0 var(--lift);
      transition-duration: var(--dur-3); transition-timing-function: var(--ease-spring);
    }
    a.art-card:hover .art-card__cta .icon { translate: calc(var(--nudge) * .7) calc(var(--nudge) * -.7); }
  }
  a.art-card:hover .art-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
  a.art-card:active { scale: var(--press-scale-tile); transition-duration: 80ms; }

  /* A lone card turns horizontal: text left, illustration right */
  .art-cards--single { grid-template-columns: minmax(0, 1fr); }
  .art-cards--single .art-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: var(--space-6); }
  .art-cards--single .art-card__art { order: 0; grid-column: 2; grid-row: 1; width: calc(100% + var(--pad)); margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; padding-top: 0; align-self: end; }
  @media (max-width: 900px) {
    .art-cards { grid-template-columns: minmax(0, 1fr); }
    .art-cards--single .art-card { display: flex; }
    .art-cards--single .art-card__art { order: 2; width: calc(100% + 2 * var(--pad)); margin: auto calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding-top: var(--space-4); }
  }
  @media (forced-colors: active) { .art-card { outline: 1px solid CanvasText; outline-offset: -1px; } }
}

/* ---- css/components/mosaic.css ---- */
/* Atlas · Mosaic
   A grid of tiles whose rows are always full. The wrapper is a container,
   so the grid adapts to its own width, not the viewport: one column, two
   from 640px, three from 1000px. .is-wide-3 spans two columns at three,
   .is-wide-2 spans both at two, .is-full the whole row.
     <div class="mosaic-wrap"><div class="mosaic"><a class="photo-tile is-wide-3" …>…</a><a class="card" …>…</a></div></div>
   Markup and options: docs/index.html. */
@layer components {
  .mosaic-wrap { container: mosaic / inline-size; }
  .mosaic { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tile-gap); }
  .mosaic > .is-full { grid-column: 1 / -1; }
  @container mosaic (min-width: 640px) {
    .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mosaic > .is-wide-2 { grid-column: span 2; }
  }
  @container mosaic (min-width: 1000px) {
    .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mosaic > .is-wide-2 { grid-column: auto; }
    .mosaic > .is-wide-3 { grid-column: span 2; }
  }
}

/* ---- css/components/photo-tile.css ---- */
/* Atlas · Photo tile
   A photo (or a generated .cover) fills the tile; the text sits on a dark
   scrim at the bottom. The tile is a dark surface in every theme: its text
   reads the on-inverse tokens. Under the pointer the tile lifts 2px and the
   photo grows a little; pressed, it gives (M1, M2).
     <a class="photo-tile" href="…">
       <img class="photo-tile__img" src="…" alt="">          or <span class="cover" aria-hidden="true">…<span class="cover__mono">PMUD</span></span>
       <span class="photo-tile__text"><span class="photo-tile__title">…</span><span class="photo-tile__desc">…</span><span class="host">…</span></span>
     </a>
   In a .mosaic, .is-wide-3 / .is-wide-2 widen a tile so rows stay full.
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Photo tile: one grid area for the image, a row for the text -------
     The image (or cover) spans the whole tile; the text takes the last row,
     so a cover's monogram sits in the free space above it, never under it. */
  .photo-tile {
    position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto;
    min-height: 20rem; overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-inverse); box-shadow: var(--tile-ring), var(--tile-shadow);
    color: var(--color-on-inverse); text-decoration: none;
    transition: box-shadow var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  .photo-tile::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 30%, color-mix(in oklab, var(--color-inverse) 82%, transparent) 100%);
    box-shadow: inset 0 0 0 1px var(--color-inverse-border);   /* ends the tile on a black page */
  }
  /* A photo is taken out of the flow, so its own height never sizes the tile */
  .photo-tile__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: scale var(--dur-4) var(--ease-spring); }
  /* Logos: shown whole on a light plate, kept above the text */
  .photo-tile__img--logo { object-fit: contain; padding: 2% 6% 40%; background: var(--color-paper); }
  .photo-tile__text { grid-area: 2 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--card-pad); }
  .photo-tile__title { font-size: var(--step-tile-title); line-height: 1.15; letter-spacing: var(--tracking-tile-title); color: var(--color-on-inverse); }
  .photo-tile__desc { max-width: 46ch; font-size: .9375rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-ui); color: var(--color-on-inverse-muted); }
  .photo-tile .host { margin-top: var(--space-1); color: var(--color-on-inverse-muted); }
  :is(.is-wide-3, .is-wide-2) .photo-tile__title { font-size: var(--step-3); letter-spacing: var(--tracking-tight); }

  /* A generated cover spans both rows and shares them (subgrid) */
  .photo-tile > .cover { grid-area: 1 / 1 / -1 / -1; z-index: -2; display: grid; grid-template-rows: subgrid; place-items: start center; }
  .photo-tile > .cover .cover__mono { grid-row: 1; align-self: start; margin-top: var(--space-10); padding-bottom: var(--space-4); }

  a.photo-tile:hover { color: var(--color-on-inverse); text-decoration: none; }
  @media (hover: hover) {
    a.photo-tile:hover {
      box-shadow: var(--tile-ring), var(--tile-shadow-hover); translate: 0 var(--lift);
      transition-duration: var(--dur-3); transition-timing-function: var(--ease-spring);
    }
    a.photo-tile:hover .photo-tile__img:not(.photo-tile__img--logo) { scale: 1.035; }
  }
  a.photo-tile:active { scale: var(--press-scale-tile); transition-duration: 80ms; }
  a.photo-tile:hover .photo-tile__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
  @media (prefers-reduced-motion: reduce) { a.photo-tile:hover .photo-tile__img { scale: 1; } }
  @media (forced-colors: active) { .photo-tile { outline: 1px solid CanvasText; outline-offset: -1px; } }
}

/* ---- css/components/cover.css ---- */
/* Atlas · Cover
   A generated cover for a tile without an image: the stage in miniature —
   black, a faint glow from the top corner and the signature contour lines
   (graphite, the index lines lit in the accent), with an optional monogram.
   It re-tints with the theme (OTN: gold), because it reads the signature
   tokens; forced colours hide the lines (base.css).
     <span class="cover" aria-hidden="true">
       <svg class="topo" viewBox="0 0 400 225" preserveAspectRatio="xMidYMid slice" focusable="false" data-topo='[{"cx":300,"cy":60,"levels":12,"step":18,"seed":3}]'></svg>
       <span class="cover__mono">PUG</span>
     </span>
   Used as .card__media, inside .photo-tile, .slide-visual and .figure.
   Markup and options: docs/index.html. */
@layer components {
  /* The stage's contour tokens are tuned for a full-width hero; on a small
     cover the lines need more presence, so they are mixed up from the same
     tokens (still themeable: no colour of their own). */
  .cover, .cover.card__media {
    --cover-line: color-mix(in oklab, var(--topo-line-inverse), var(--color-on-inverse) 7%);
    --cover-index: color-mix(in oklab, var(--topo-index-inverse), var(--color-accent) 24%);
    --topo: var(--cover-line); --topo-ix: var(--cover-index);
    position: relative; display: grid; place-items: center; overflow: hidden;
    background: radial-gradient(90% 110% at 92% -10%, var(--stage-glow), transparent 64%), var(--color-inverse);
  }
  .cover .topo { position: absolute; inset: 0; width: 100%; height: 100%; }
  .cover__mono {
    position: relative; align-self: center; padding-bottom: 6%;
    font: var(--fw-semibold) clamp(2rem, 1.5rem + 1.6vw, 2.75rem)/var(--lh-display) var(--font-display);
    letter-spacing: var(--tracking-tight); color: var(--color-on-inverse);
  }
}

/* ---- css/components/row-link.css ---- */
/* Atlas · Row link
   Directory rows on the plane, split by hairlines: title, one line, and the
   address (.host) or a .tag at the end. The whole row is the link; its
   title underlines under the pointer.
     <div class="row-list">
       <a class="row-link" href="…"><span class="row-link__title">…</span><span class="row-link__desc">…</span><span class="host">… ancpi.ro</span></a>
     </div>
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Row list: directory rows ----------------------------------------- */
  .row-list { border-top: 1px solid var(--color-border); }
  .row-link {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-8); align-items: center;
    padding-block: var(--space-5); border-bottom: 1px solid var(--color-border); color: inherit; text-decoration: none;
    transition: opacity var(--dur-1) var(--ease-out);
  }
  .row-link__title { font-size: var(--step-1); line-height: 1.3; letter-spacing: var(--tracking-text); }
  .row-link__desc { grid-column: 1; max-width: 72ch; font-size: .9375rem; line-height: 1.45; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .row-link > .host, .row-link > .tag { grid-column: 2; grid-row: 1 / 3; justify-self: end; }
  a.row-link:hover { color: inherit; text-decoration: none; }
  a.row-link:hover .row-link__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
  a.row-link:active { opacity: .72; }
  @media (max-width: 640px) {
    .row-link { grid-template-columns: minmax(0, 1fr); }
    .row-link > .host, .row-link > .tag { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--space-1); }
  }
}

/* ---- css/components/news.css ---- */
/* Atlas · News
   A lead story and a list of dated items, each a linked tile (spec §2.9 tile
   model: --color-tile, --radius-tile, --tile-ring + --tile-shadow), so they
   follow the plane (grey on white, white on .section--alt, white with a
   hairline in the app). Under the pointer a tile lifts 2px; pressed, it
   gives a little (M1, M2); its title underlines.
     <div class="news-layout">
       <a class="news-lead" href="…"><span class="news-meta"><span class="tag tag--notice">Informare</span><time datetime="…">22 septembrie 2026</time></span>
         <span class="news-lead__title">…</span><span class="news-lead__excerpt">…</span>
         <span class="news-lead__foot"><span class="host">… MDLPA</span><span class="link-arrow">Citește …</span></span></a>
       <div class="news-list">
         <a class="news-item" href="…"><span class="date-block" aria-hidden="true"><span class="date-block__day">22</span><span class="date-block__month">oct 2025</span></span>
           <span class="news-item__body"><span class="news-meta">…</span><span class="news-item__title">…</span><span class="host news-item__source">…</span></span></a>
       </div>
     </div>
   The date block is aria-hidden: put the date in .news-meta (<time>) or in
   the title when it matters to the reader.
   Markup and options: docs/index.html. */
@layer components {
  /* Section-head actions (used next to every section head with buttons) */
  .section-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

  /* ---- News: lead story + a list with date blocks ---------------------- */
  .news-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--tile-gap); }
  .news-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  .news-meta time { font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; color: var(--color-text-muted); }

  /* The two linked tiles share the tile model and its motion */
  .news-lead, .news-item {
    background: var(--color-tile); border-radius: var(--radius-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    color: inherit; text-decoration: none;
    transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out),
      translate var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  @media (hover: hover) {
    :is(a.news-lead, a.news-item):hover {
      background: var(--color-tile-hover); box-shadow: var(--tile-ring), var(--tile-shadow-hover); translate: 0 var(--lift);
      transition-duration: var(--dur-2), var(--dur-3), var(--dur-3), var(--dur-2); transition-timing-function: var(--ease-out), var(--ease-spring), var(--ease-spring), var(--ease-spring);
    }
  }
  :is(a.news-lead, a.news-item):hover { color: inherit; text-decoration: none; }
  :is(a.news-lead, a.news-item):active { scale: var(--press-scale-tile); transition-duration: 80ms; }
  a.news-lead:hover .news-lead__title, a.news-item:hover .news-item__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }

  .news-lead { display: flex; flex-direction: column; gap: var(--space-4); overflow: hidden; padding: var(--card-pad); }
  .news-lead__title { font-size: var(--step-3); line-height: var(--lh-title); letter-spacing: var(--tracking-tight); }
  .news-lead__excerpt {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
    max-width: 60ch; line-height: var(--lh-body); color: var(--color-text-muted);
  }
  .news-lead__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-top: auto; padding-top: var(--space-5); border-top: 1px solid var(--color-border); }

  .news-list { display: flex; flex-direction: column; gap: var(--tile-gap); }
  .news-item {
    flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-5); align-items: start;
    padding: var(--space-5) var(--space-6) var(--space-5) var(--space-5);
  }
  .news-item__body { display: flex; flex-direction: column; min-height: 100%; }
  .news-item__title { margin-top: var(--space-2); font-size: var(--step-1); line-height: 1.3; letter-spacing: var(--tracking-text); }
  .news-item__source { margin-top: auto; padding-top: var(--space-4); }

  /* The date block is cut out of the tile in the plane's tone (white on a
     grey tile, grey on a white one), with a hairline so it also reads where
     both are white (the app). */
  .date-block {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    width: 4rem; height: 4.5rem; text-align: center;
    border-radius: var(--radius-md); background: var(--color-plane, var(--color-bg)); box-shadow: inset 0 0 0 1px var(--color-border);
    font-variant-numeric: tabular-nums lining-nums;
  }
  .date-block__day { font: var(--fw-semibold) 1.625rem/1 var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading); }
  .date-block__month { font: var(--fw-medium) var(--step--2)/1.2 var(--font-text); letter-spacing: var(--tracking-small); white-space: nowrap; color: var(--color-text-subtle); }

  @media (max-width: 900px) { .news-layout { grid-template-columns: minmax(0, 1fr); } }
  @media (forced-colors: active) { .news-lead, .news-item, .date-block { outline: 1px solid CanvasText; outline-offset: -1px; } }
}

/* ---- css/components/titles.css ---- */
/* Atlas · Titles
   Editorial titles are often a <span> inside a linked tile, or a <p>: they
   keep the heading face, weight and colour. Zero specificity (:where), so
   every component sets its own size, tracking and colour on top of it.
   Markup and options: docs/index.html. */
@layer components {
  :where(.news-lead__title, .news-item__title, .photo-tile__title, .art-card__title, .row-link__title, .story__title,
    .brief__title, .masthead__title, .archive__title, .mono-card__title, .slide-visual__title, .error-page__title) {
    font-family: var(--font-display); font-weight: var(--fw-semibold); color: var(--color-heading); text-wrap: balance;
  }
}

/* ---- css/components/mono-card.css ---- */
/* Atlas · Mono card
   A small dark tile with a monogram over contour lines (a cover in
   miniature), the address at its foot, and the title and one line under the
   tile. --off is a platform without a link (restricted, not yet live): no
   stage, a quiet tone, grey lines.
     <div class="mono-grid">
       <a class="mono-card" href="…">
         <span class="mono-card__tile" aria-hidden="true"><svg class="topo" … data-topo='…'></svg><span class="mono-card__mono">EVR</span><span class="mono-card__host">evr.mdlpa.ro …</span></span>
         <span class="mono-card__title">…</span><span class="mono-card__desc">…</span></a>
       <div class="mono-card mono-card--off">…</div>
     </div>
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Monogram cards: a tile with a generated cover + label -------------- */
  /* Two per row on a phone, up to five on a wide screen */
  .mono-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(9rem, 5rem + 10vw, 13rem)), 1fr)); gap: var(--space-8) var(--tile-gap); }
  .mono-card { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; color: inherit; text-decoration: none; }
  .mono-card__tile {
    --topo: color-mix(in oklab, var(--topo-line-inverse), var(--color-on-inverse) 7%);
    --topo-ix: color-mix(in oklab, var(--topo-index-inverse), var(--color-accent) 24%);
    position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden;
    margin-bottom: var(--space-2); border-radius: var(--radius-lg);
    background: radial-gradient(90% 110% at 92% -10%, var(--stage-glow), transparent 64%), var(--color-inverse);
    box-shadow: inset 0 0 0 1px var(--color-inverse-border), var(--tile-shadow);
    transition: box-shadow var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  .mono-card__tile .topo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
  .mono-card__mono {
    padding-bottom: var(--space-4);
    font: var(--fw-semibold) clamp(1.5rem, 1.2rem + 1vw, 2.25rem)/var(--lh-display) var(--font-display);
    letter-spacing: var(--tracking-tight); color: var(--color-on-inverse);
  }
  .mono-card__host {
    position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-3);
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0;
    font: var(--fw-medium) var(--step--2)/1.25 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-on-inverse-muted);
  }
  .mono-card__host .icon { width: .875rem; height: .875rem; }
  .mono-card__title { font-size: var(--step-0); line-height: 1.3; letter-spacing: var(--tracking-text); }
  .mono-card__desc { font-size: var(--step--1); line-height: var(--lh-caption); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }

  a.mono-card:hover { color: inherit; text-decoration: none; }
  @media (hover: hover) {
    a.mono-card:hover .mono-card__tile {
      box-shadow: inset 0 0 0 1px var(--color-inverse-border), var(--tile-shadow-hover); translate: 0 var(--lift);
      transition-duration: var(--dur-3); transition-timing-function: var(--ease-spring);
    }
  }
  a.mono-card:hover .mono-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  a.mono-card:active .mono-card__tile { scale: var(--press-scale-tile); transition-duration: 80ms; }

  /* Off: no stage — the plane's quiet fill, grey lines, a hairline ring */
  .mono-card--off .mono-card__tile {
    --topo: var(--topo-line); --topo-ix: color-mix(in oklab, var(--color-heading) 14%, transparent);
    background: var(--color-fill-subtle); box-shadow: inset 0 0 0 1px var(--color-border);
  }
  .mono-card--off .mono-card__mono { color: var(--color-text-subtle); }
  .mono-card--off .mono-card__host { color: var(--color-text-subtle-on-fill); }
  @media (forced-colors: active) { .mono-card__tile { outline: 1px solid CanvasText; outline-offset: -1px; } }
}

/* ---- css/components/statement.css ---- */
/* Atlas · Statement
   A large lead sentence, then columns under a hairline. The lead is set in
   grey with the words that matter in the heading colour (<em>), so one
   phrase carries the sentence: no italics, no colour other than graphite.
     <p class="statement__lead">O singură platformă pentru <em>datele, planurile și analizele</em> care descriu teritoriul.</p>
     <div class="statement__cols"><div class="statement__col"><p class="statement__label">…</p>…</div>…</div>
   .statement__label is a column label (sentence case), also used alone
   above a list or a .numbered column.
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Statement: a large lead plus columns ------------------------------ */
  .statement__lead {
    max-width: 26ch;
    font: var(--fw-semibold) var(--step-3)/var(--lh-title) var(--font-display); letter-spacing: var(--tracking-title);
    color: var(--color-text-subtle); text-wrap: balance;
  }
  .statement__lead :is(em, strong) { font-style: normal; font-weight: inherit; color: var(--color-heading); }
  .statement__cols {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8) var(--space-12);
    margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); padding-top: var(--space-8); border-top: 1px solid var(--color-border);
  }
  .statement__col { min-width: 0; }
  .statement__col:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .statement__label {
    margin-bottom: var(--space-4);
    font: var(--fw-semibold) .9375rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui);
    color: var(--color-accent-strong);
  }
  @media (max-width: 640px) { .statement__cols { grid-template-columns: minmax(0, 1fr); } }
}

/* ---- css/components/prose.css ---- */
/* Atlas · Prose — the long-text reading layout (spec §5.12)
   Rich text from an editor (CKEditor and the like) or a long page (a policy,
   a law, a guide): 17px on a 1.65 leading, a 68ch measure, headings that bind
   to the text under them, quiet lists, tables and quotations, and a print
   version that reads well on paper in every theme.
     <div class="prose">
       <p class="lead">Pe scurt: …</p>
       <h2 id="…">…</h2><p>…</p><ul><li>…</li></ul>
       <table>…</table>          raw editor tables are styled here; a .table keeps its own look
       <blockquote><p>…</p></blockquote>
     </div>
   .prose--compact   15px muted text for short blocks inside tiles and columns
   .lead             the opening paragraph of a page or a text (also alone)
   Markup and options: docs/index.html. */
@layer components {
  /* ---- Lead ---------------------------------------------------------------- */
  .lead { font-size: var(--step-intro); line-height: 1.45; letter-spacing: var(--tracking-text); color: var(--color-text-muted); text-wrap: pretty; }

  /* ---- Rhythm: 1em between blocks, more around headings and figures ------ */
  .prose {
    max-width: var(--measure);
    font-size: var(--step-0); line-height: var(--lh-prose); letter-spacing: var(--tracking-body);
    color: var(--color-text); overflow-wrap: break-word;
  }
  .prose > * + * { margin-top: 1em; }
  .prose > .lead + * { margin-top: 1.5em; }

  /* Headings: room above, little below, so each one belongs to its text */
  .prose :is(h2, h3, h4, h5) { scroll-margin-top: calc(var(--header-h) + var(--space-8)); text-wrap: balance; }
  .prose h2 { margin-top: 2em; font-size: var(--step-2); font-weight: var(--fw-semibold); line-height: var(--lh-head); letter-spacing: var(--tracking-tight); }
  .prose h3 { margin-top: 1.9em; font-size: var(--step-1); line-height: 1.3; letter-spacing: var(--tracking-text); }
  .prose h4 { margin-top: 1.7em; font-size: var(--step-0); line-height: 1.4; letter-spacing: var(--tracking-body); }
  .prose h5 { margin-top: 1.5em; font-size: var(--step-0); line-height: 1.4; color: var(--color-text-muted); }
  .prose :is(h2, h3, h4, h5) + * { margin-top: .55em; }
  .prose > :first-child { margin-top: 0; }

  /* Inline */
  .prose :is(strong, b) { color: var(--color-heading); }
  .prose a { text-underline-offset: .2em; }
  .prose mark { padding: 0 .15em; border-radius: 3px; background: var(--color-warning-bg); color: inherit; }

  /* ---- Lists --------------------------------------------------------------- */
  .prose :is(ul, ol) { padding: 0; }
  .prose ul { list-style: none; }
  .prose ul > li { position: relative; padding-inline-start: 1.375rem; }
  .prose ul > li::before {
    content: ""; position: absolute; left: .375rem; top: calc(.5lh - .1875rem);
    width: .375rem; height: .375rem; border-radius: 50%; background: var(--color-text-subtle);
  }
  .prose ol { padding-inline-start: 1.75rem; list-style: decimal; }
  .prose ol > li { padding-inline-start: .25rem; }
  .prose ol > li::marker { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--color-text-subtle); }
  .prose li + li { margin-top: .5em; }
  .prose li > :is(ul, ol, p) { margin-top: .5em; }
  .prose dl > dt { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .prose dl > dd { margin-top: .25em; color: var(--color-text-muted); }
  .prose dl > dd + dt { margin-top: 1em; }

  /* ---- Blocks that interrupt the text get more air ------------------------- */
  .prose > :where(figure, pre, blockquote, table, hr, .figure, .code, .table-wrap),
  .prose > :where(figure, pre, blockquote, table, hr, .figure, .code, .table-wrap) + * { margin-top: 1.6em; }
  .prose hr { border: 0; border-top: 1px solid var(--color-border); }

  /* A citation inside the text (the pull quote is .quote) */
  .prose blockquote {
    margin-inline: 0; padding-inline-start: var(--space-5); border-inline-start: 2px solid var(--color-border-strong);
    font-size: var(--step-1); font-weight: var(--fw-medium); line-height: 1.5; letter-spacing: var(--tracking-text); color: var(--color-heading);
  }
  .prose blockquote > * + * { margin-top: .6em; }
  .prose blockquote :is(cite, footer) { display: block; font-size: var(--step--1); font-style: normal; font-weight: var(--fw-regular); color: var(--color-text-subtle); }

  /* Images and figures */
  .prose :is(img, video) { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
  .prose figure { margin-inline: 0; }
  .prose figcaption { margin-top: var(--space-3); font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }

  /* Code: inline code comes from code.css; a block is the surface panel */
  .prose pre:not(.code) {
    padding: var(--space-5) var(--space-6); overflow-x: auto; border-radius: var(--radius-code);
    background: var(--color-surface); font-size: .8125rem; line-height: 1.7;
  }
  .prose pre > code { font-size: inherit; }

  /* Tables from the editor: open, on the plane, hairline rows (spec §3.5 head:
     13px / 600 / subtle over a stronger rule). A .table keeps table.css. */
  .prose table:not(.table) {
    width: 100%; border-collapse: collapse;
    font-size: .9375rem; line-height: 1.45; letter-spacing: var(--tracking-snug); font-variant-numeric: tabular-nums lining-nums;
  }
  .prose table:not(.table) caption { caption-side: top; padding-bottom: var(--space-3); font-weight: var(--fw-semibold); text-align: start; color: var(--color-heading); }
  .prose table:not(.table) :is(th, td) { padding: .7rem 1.25rem .7rem 0; border-bottom: 1px solid var(--color-border); text-align: start; vertical-align: top; }
  .prose table:not(.table) :is(th, td):last-child { padding-inline-end: 0; }
  .prose table:not(.table) thead th {
    padding-block: .5rem .6rem; border-bottom-color: var(--color-border-strong);
    font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  .prose table:not(.table) tbody th { font-weight: var(--fw-semibold); color: var(--color-heading); }

  /* ---- Compact: short texts inside tiles and columns ----------------------- */
  .prose--compact { font-size: .9375rem; line-height: 1.6; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .prose--compact li + li { margin-top: .35em; }

  /* ---- Print: the measure opens to the page, the ink is always dark, links
     show where they lead, and nothing breaks across a heading or a figure. */
  @media print {
    .prose, .lead {
      --color-text: var(--ink-900); --color-heading: var(--ink-900);
      --color-text-muted: var(--ink-700); --color-text-subtle: var(--ink-600);
      --color-link: var(--ink-900); --color-border: var(--neutral-300); --color-border-strong: var(--neutral-400);
      --color-surface: transparent; --color-fill: transparent;
    }
    .prose { max-width: none; font-size: 11pt; line-height: 1.5; }
    .prose :is(h2, h3, h4, h5) { break-after: avoid; break-inside: avoid; }
    .prose :is(figure, pre, blockquote, table, tr, img) { break-inside: avoid; }
    .prose p { orphans: 3; widows: 3; }
    .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; overflow-wrap: anywhere; color: var(--color-text-muted); }
    .prose pre:not(.code) { border: 1px solid var(--color-border); }
  }
}

/* ---- css/components/split.css ---- */
/* Atlas · Split (spec §3.9)
   Two columns divided by space, stacked on phones. --split is half the
   space between them; a lone child takes the full width.
     <div class="split"><header class="section-head">…</header><div class="accordion">…</div></div>
   A media column (an image, a figure) takes the portal's big radius:
     <div class="split split--media"><div>…text…</div><img class="split__media" src="…" alt="…"></div>
   .split--media     the image column is the wide one; text is centred on it
   .split--reverse   the image comes first on wide screens (DOM order kept) */
@layer components {
  .split, .numbered { --split: clamp(2rem, 1rem + 3.5vw, 4.5rem); }
  .split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: calc(2 * var(--split)); }
  .split > * { min-width: 0; }
  .split > :only-child { grid-column: 1 / -1; }
  .split--media { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
  .split__media { display: block; width: 100%; height: auto; overflow: hidden; border-radius: var(--radius-xl); background: var(--color-tile); object-fit: cover; }
  :where(div, figure, span).split__media { aspect-ratio: 4 / 3; margin: 0; }
  .split__media > .topo { display: block; width: 100%; height: 100%; }
  .split--reverse > :first-child { order: 2; }
  @media (max-width: 900px) {
    .split, .split--media { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-8); }
    .split--reverse > :first-child { order: 0; }
  }
}

/* ---- css/components/numbered.css ---- */
/* Atlas · Numbered
   Numbered parts of a whole (1, 2 …): a large numeral in the accent, the
   title and a short text beside it. Side by side, split by a hairline;
   .numbered--stack puts them one under the other (e.g. inside one column of
   a .split). The numeral is decorative (aria-hidden) and repeated in the
   title for screen readers. Use Arabic numerals: at this size Inter draws
   a Roman I as a bare bar and II as a pause sign.
     <div class="numbered numbered--stack">
       <article class="numbered__item"><span class="numbered__num" aria-hidden="true">1</span>
         <h3 class="numbered__title"><span class="visually-hidden">1. </span>Prima componentă</h3>
         <div class="prose prose--compact"><p>…</p></div>
         <ul class="numbered__tags"><li>Parte</li></ul></article>
     </div>
   Markup and options: docs/index.html. */
@layer components {
  /* Numerals of 24px and more read --color-accent-figure: 3:1 or better on
     every plane in every theme (OTN's anchor gold would not). */
  .numbered { --numbered-size: var(--step-5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-10); }
  .numbered__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-5); align-content: start; min-width: 0; }
  .numbered__item:nth-child(odd) { padding-inline-end: var(--split); }
  .numbered__item:nth-child(even) { padding-inline-start: var(--split); border-inline-start: 1px solid var(--color-border); }
  .numbered__num {
    grid-row: 1 / span 3;
    font: var(--fw-display) var(--numbered-size)/var(--lh-display) var(--font-display); letter-spacing: var(--tracking-display);
    font-variant-numeric: lining-nums tabular-nums; color: var(--color-accent-figure);
  }
  .numbered__title {
    grid-column: 2; margin-top: .35em;
    font-size: var(--step-1); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-text);
  }
  .numbered__item > .prose, .numbered__tags { grid-column: 2; }
  .numbered__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
  .numbered__tags li {
    display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 .75rem;
    border-radius: var(--radius-pill); background: var(--color-fill);
    font: var(--fw-medium) .8125rem/1.2 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-heading);
  }
  @media (max-width: 640px) {
    .numbered { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .numbered__item:nth-child(odd) { padding-inline-end: 0; }
    .numbered__item:nth-child(even) { padding-inline-start: 0; border-inline-start: 0; }
    .numbered__item + .numbered__item { margin-top: var(--space-8); padding-top: var(--space-8); border-top: 1px solid var(--color-border); }
  }
  .numbered--stack { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .numbered--stack > .numbered__item { grid-template-columns: var(--numbered-size) minmax(0, 1fr); padding: 0; border: 0; }   /* titles line up */
  .numbered--stack > .numbered__item + .numbered__item { margin-top: var(--space-8); padding-top: var(--space-8); border-top: 1px solid var(--color-border); }
}

/* ---- css/components/register.css ---- */
/* Atlas · Register
   Rich text whose bulleted list reads as a register of entries split by
   hairlines (items of the same weight: "Ce poți face").
     <div class="prose prose--compact register"><p>…</p><ul><li>…</li><li>…</li></ul></div>
   Markup and options: docs/index.html. */
@layer components {
  .register { max-width: none; }
  .register > p { max-width: 60ch; }
  .register ul { margin-top: var(--space-6); border-top: 1px solid var(--color-border); }
  .register ul > li { padding-block: .85rem; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
  .register ul > li + li { margin-top: 0; }
  .register ul > li::before { top: calc(.85rem + .5lh - .1875rem); }   /* the bullet centred on the first line */
}

/* ---- css/components/breadcrumb.css ---- */
/* Atlas · Breadcrumb
   The path in small grey type, joined by chevrons: the "/" of the markup is
   drawn as a CSS chevron (screen readers skip it either way).
     <nav class="breadcrumb" aria-label="Trasee de navigare">
       <a href="…">Acasă</a><span aria-hidden="true">/</span>
       <span aria-current="page">Certificat de urbanism</span>
     </nav> */
@layer components {
  .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; font-size: .8125rem; line-height: 1.4; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .breadcrumb a { color: var(--color-text-subtle); text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
  .breadcrumb a:hover { color: var(--color-link); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
  .breadcrumb > [aria-hidden="true"] {
    flex: none; width: .34rem; height: .34rem; margin-inline: .05rem .15rem; overflow: hidden; font-size: 0; color: transparent;
    border-top: 1.5px solid var(--color-text-subtle); border-right: 1.5px solid var(--color-text-subtle); transform: rotate(45deg); opacity: .7;
  }
  .breadcrumb [aria-current] { font-weight: var(--fw-medium); color: var(--color-heading); }
  @media (pointer: coarse) {
    .breadcrumb a { position: relative; }
    .breadcrumb a::after { content: ""; position: absolute; inset: calc((var(--target-min) - 100%) / -2) -.3rem; }
  }
}

/* ---- css/components/pagination.css ---- */
/* Atlas · Pagination
   36px ghost circles; the current page is graphite with white figures;
   previous / next are fill pills with chevrons (text links: "Anterior",
   "Următor"; or icon buttons, as the data table renders them).
     <nav class="pagination" aria-label="Paginare">
       <a href="…" rel="prev">Anterior</a> <a href="…">1</a> <span aria-current="page">2</span>
       <a href="…">3</a> <span aria-hidden="true">…</span> <a href="…">12</a> <a href="…" rel="next">Următor</a>
     </nav>
   On phones only previous, the current page and next stay; an optional
   <span class="pagination__status">Pagina 2 din 12</span>, put first inside
   the nav, then takes the current page's place.
   Buttons (a data table): .pagination__prev / .pagination__next hold a chevron
   icon, .pagination__gap is the "…". .pagination--sm is the compact size. */
@layer components {
  .pagination { --page: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-1); }
  .pagination :is(a, span, button) {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: var(--page); height: var(--page); padding: 0 .7rem; border: 0; border-radius: var(--radius-pill);
    font-size: .9375rem; font-weight: var(--fw-medium); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-decoration: none; font-variant-numeric: tabular-nums;
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
  }
  .pagination :is(a, button):hover:not(:disabled) { background: var(--color-fill); color: var(--color-heading); }
  .pagination :is(a, button):active:not(:disabled) { transform: scale(var(--press-scale-chip)); }
  .pagination [aria-current="page"], .pagination [aria-current="page"]:hover { background: var(--color-selected); color: var(--color-on-selected); font-weight: var(--fw-semibold); }
  .pagination .is-disabled, .pagination button:disabled { opacity: .38; cursor: default; }
  .pagination .icon { width: 1rem; height: 1rem; }
  /* previous / next: a fill pill (text) or a fill circle (icon) */
  .pagination :is([rel="prev"], [rel="next"], .pagination__prev, .pagination__next) { background: var(--color-fill); color: var(--color-heading); }
  .pagination :is([rel="prev"], [rel="next"], .pagination__prev, .pagination__next):hover:not(:disabled) { background: var(--color-fill-hover); }
  .pagination :is(.pagination__prev, .pagination__next) { padding: 0; }
  .pagination__prev .icon { transform: rotate(90deg); }
  .pagination__next .icon { transform: rotate(-90deg); }
  /* the CSS chevrons of the text links */
  .pagination [rel="prev"]::before, .pagination [rel="next"]::after {
    content: ""; width: .38rem; height: .38rem; border: solid currentColor; border-width: 1.5px 1.5px 0 0;
  }
  .pagination [rel="prev"]::before { margin-left: .1rem; transform: rotate(-135deg); }
  .pagination [rel="next"]::after { margin-right: .1rem; transform: rotate(45deg); }
  .pagination [rel="prev"] { padding-inline: .8rem 1rem; }
  .pagination [rel="next"] { padding-inline: 1rem .8rem; }
  .pagination :is(.pagination__gap, [aria-hidden="true"]) { min-width: 1.25rem; padding: 0; color: var(--color-text-subtle); }
  .pagination .pagination__status { display: none; }
  .pagination--sm { --page: 2rem; }
  .pagination--sm :is(a, span, button) { padding-inline: .55rem; font-size: var(--step--1); }
  /* a phone: previous · the current page · next; with a .pagination__status
     (put it first in the markup) the words replace the current page */
  @media (max-width: 640px) {
    .pagination > :not([rel="prev"], [rel="next"], .pagination__prev, .pagination__next, [aria-current="page"], .pagination__status) { display: none; }
    .pagination > :is([rel="next"], .pagination__next) { order: 2; }
    .pagination > .pagination__status { display: inline-flex; order: 1; padding-inline: .6rem; font-size: var(--step--1); color: var(--color-text-muted); }
    .pagination > .pagination__status ~ [aria-current="page"] { display: none; }
  }
  @media (pointer: coarse) {
    .pagination { --page: var(--target-min); }
  }
  /* Forced colours: the current page is a fill, which the system palette
     drops: it takes Highlight */
  @media (forced-colors: active) {
    .pagination [aria-current="page"] { forced-color-adjust: none; background: Highlight; color: HighlightText; outline: 0; }
  }
}

/* ---- css/components/chip.css ---- */
/* Atlas · Chip (spec §3.2, M1, M35)
   A pill that filters: 36px, grey fill, 15/500 heading text. The chosen one
   is graphite (--color-selected), never blue: blue means "press here".
     <div class="chips">
       <a class="chip" href="?cat=toate" aria-current="true">Toate <span class="chip__count">24</span></a>
       <a class="chip" href="?cat=avize">Avize <span class="chip__count">8</span></a>
     </div>
   Chosen: .is-active, [aria-current], [aria-pressed="true"] (a toggle
   button), or a label with a checked input — chips that choose:
     <label class="chip"><input type="radio" name="cat" value="x"> Text</label>
     (radio = one at a time, checkbox = several; the input covers the chip,
     so the keyboard, forms and the focus ring keep working).
   Active filters (removable): graphite, with a remove button; a chip that
   arrives after the page loaded pops in (scale .9 → 1, M35: controls.js
   marks it .is-new):
     <span class="chip chip--filter">Județ: <b>Cluj</b>
       <button type="button" class="chip__remove" data-dismiss=".chip" aria-label="Elimină filtrul Județ: Cluj">
         <svg class="icon" aria-hidden="true"><use href="…/icons.svg#i-close"/></svg></button></span>
   Markup: lab/s2-controls.html. */
@layer components {
  .chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .chip {
    position: relative; display: inline-flex; align-items: center; gap: .45rem;
    min-height: 2.25rem; padding: 0 1rem; margin: 0;
    border: 0; border-radius: var(--radius-pill); background: var(--color-fill);
    font: var(--fw-medium) .9375rem/var(--lh-ui) var(--font-text); letter-spacing: var(--tracking-ui);
    color: var(--color-heading); text-decoration: none; white-space: nowrap;
    cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .chip:hover { background: var(--color-fill-hover); color: var(--color-heading); text-decoration: none; }
  .chip:active { transform: scale(var(--press-scale-chip)); transition-duration: 80ms; }
  .chip .icon { width: 1rem; height: 1rem; margin-inline-start: -.15rem; }
  /* A count after the label, in muted text (4.5:1+ on the fill and on its
     hover, in both schemes) */
  .chip__count { font-size: .8125rem; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--color-text-muted); }

  /* Chosen: graphite, white text (in dark: light pill, black text) */
  .chip:is(.is-active, [aria-current]:not([aria-current="false"]), [aria-pressed="true"], :has(> input:checked)) {
    background: var(--color-selected); color: var(--color-on-selected);
  }
  .chip:is(.is-active, [aria-current]:not([aria-current="false"]), [aria-pressed="true"], :has(> input:checked)) .chip__count { color: inherit; opacity: .78; }

  /* Chips that choose: the input covers the chip */
  label.chip { cursor: pointer; }
  .chip > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: inherit; opacity: 0; cursor: pointer; }
  .chip:has(> input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  .chip:has(> input:disabled) { opacity: .38; cursor: default; pointer-events: none; }

  /* Active, removable filter */
  .chip--filter { gap: .35rem; padding-inline: .875rem .375rem; background: var(--color-selected); color: var(--color-on-selected); cursor: default; }
  .chip--filter:hover { background: var(--color-selected); color: var(--color-on-selected); }
  .chip--filter:active { transform: none; }
  .chip--filter b { font-weight: var(--fw-semibold); }
  .chip__remove {
    position: relative; display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; margin-inline-start: .15rem;
    padding: 0; border: 0; border-radius: 50%;
    background: color-mix(in oklab, currentColor 16%, transparent); color: inherit; cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .chip__remove:hover { background: color-mix(in oklab, currentColor 28%, transparent); }
  .chip__remove:active { transform: scale(var(--press-scale-icon)); }
  .chip__remove:focus-visible { outline-offset: 1px; }
  .chip__remove .icon { width: .75rem; height: .75rem; margin: 0; stroke-width: 2.4; }

  /* M35: a chip that arrives pops in (controls.js adds .is-new on insert) */
  .chip.is-new { animation: atlas-pop var(--dur-2) var(--ease-bounce) backwards; --pop-y: 0px; --pop-scale: .9; }

  /* Touch: 44px hit areas, the chip keeps its 36px look */
  @media (pointer: coarse) {
    .chip:not(.chip--filter)::after { content: ""; position: absolute; inset: calc((2.25rem - var(--target-min)) / 2) 0; }
    .chip__remove::after { content: ""; position: absolute; inset: -.625rem -.5rem -.625rem -.25rem; }
  }

  /* Forced colours: the chosen chip takes the system highlight */
  @media (forced-colors: active) {
    .chip:is(.is-active, [aria-current]:not([aria-current="false"]), [aria-pressed="true"], :has(> input:checked)), .chip--filter {
      forced-color-adjust: none; background: Highlight; color: HighlightText;
    }
  }
}

/* ---- css/components/form.css ---- */
/* Atlas Modern · Form (spec §3.2, §2.5 --field-h, M25)
   Clean fields: the field colour, a 3:1 control edge you can always find
   (--color-control-border), 12px corners, body-size text and a soft blue
   halo on focus. 48px tall on the portal, 44px in the app (--field-h).
     <div class="field">
       <label class="field__label" for="x">Nume <span class="req" aria-hidden="true">*</span></label>
       <input class="input" id="x" required>
       <span class="field__hint">Așa cum apare în actul de identitate.</span>
     </div>
   Controls: .input (text, e-mail, number, date, textarea), .select (wraps a
   <select>; select.js turns it into the custom list), .input-wrap (leading
   icon, trailing button), .input-group (prefix, suffix, attached button),
   .number (stepper), and the controls of S2 (.check, .radio, .switch,
   .range, .dropzone, .choice).
   A long form is a column of .form-section tiles: tone on the portal, white
   with a hairline in the app, an optional graphite number disc that turns
   into a blue tick when the section is complete (validate.js). */
@layer components {
  /* ---- Field -------------------------------------------------------------- */
  .field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
  .field__label {
    font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.35;
    letter-spacing: var(--tracking-ui); color: var(--color-heading);
  }
  .field__label .req, .fieldset__legend .req { margin-left: .2em; font-weight: var(--fw-semibold); color: var(--color-danger-fg); }
  .field__label .opt, .fieldset__legend .opt { margin-left: .35em; font-weight: var(--fw-regular); color: var(--color-text-subtle); }
  .field__hint {
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    color: var(--color-text-subtle);
  }
  a.field__hint { color: var(--color-link); }
  /* touch: a link in a hint ("Ai uitat parola?") is a 44px target */
  @media (pointer: coarse) {
    a.field__hint, .field__hint a { position: relative; }
    a.field__hint::after, .field__hint a::after { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) 0; }
    /* in the label row the field's control sits just below: the area grows
       upward and stops at the field's gap, so it never takes the control's edge */
    .field__row > a.field__hint::after { inset: auto 0 calc(-1 * var(--space-2)); height: var(--target-min); }
  }
  a.field__hint:hover { color: var(--color-link-hover); }
  .field__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); }
  .field__counter {
    font-size: .75rem; line-height: 1.3; letter-spacing: 0; color: var(--color-text-subtle);
    font-variant-numeric: tabular-nums lining-nums;
  }
  .field__counter.is-over { color: var(--color-danger-fg); font-weight: var(--fw-semibold); }

  /* Field feedback (M25): 13/500 with a 16px icon; it rises 6px as it
     arrives. It never shakes. */
  .field__error, .field__ok {
    display: flex; align-items: flex-start; gap: .375rem;
    font-size: .8125rem; font-weight: var(--fw-medium); line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    --rise: 6px; animation: atlas-rise var(--dur-2) var(--ease-out) backwards;
  }
  .field__error { color: var(--color-danger-fg); }
  .field__ok { color: var(--color-success-fg); }
  .field__error .icon, .field__ok .icon { flex: none; width: 1rem; height: 1rem; margin-top: .0625rem; }

  /* ---- Text fields and the native select ---------------------------------- */
  .input, .select > select {
    width: 100%; min-height: var(--field-h); padding: .7rem .95rem;
    border: 1px solid var(--color-control-border); border-radius: var(--radius-md);
    background: var(--color-field); color: var(--color-text);
    font-size: var(--step-0); line-height: 1.3; letter-spacing: var(--tracking-body);
    transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
  }
  .input::placeholder { color: var(--color-text-subtle); opacity: 1; }
  .input:hover:not(:focus, :disabled, [readonly]), .select > select:hover:not(:focus, :disabled) {
    border-color: color-mix(in oklab, var(--color-control-border), var(--color-text) 30%);
  }
  .input:focus, .select > select:focus { outline: none; border-color: var(--color-focus); box-shadow: var(--focus-ring); }
  .input:disabled, .input[readonly], .select > select:disabled {
    border-color: transparent; background: var(--color-fill); color: var(--color-text-muted);
  }
  .input:disabled, .select > select:disabled { cursor: not-allowed; }
  .input[readonly]:focus { border-color: var(--color-focus); }
  /* Invalid: a danger edge and, on focus, a danger halo. Valid: a success edge. */
  .input[aria-invalid="true"], .input.is-invalid, .input:user-invalid,
  .select > select[aria-invalid="true"], .select > select:user-invalid { border-color: var(--color-danger-fg); }
  .input[aria-invalid="true"]:focus, .input.is-invalid:focus, .input:user-invalid:focus,
  .select > select[aria-invalid="true"]:focus, .select > select:user-invalid:focus {
    border-color: var(--color-danger-fg); box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-danger-fg) 22%, transparent);
  }
  .input.is-valid { border-color: var(--color-success-fg); }
  textarea.input { min-height: 7.5rem; padding-block: .75rem; line-height: 1.5; resize: vertical; }
  .input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
  .input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

  /* Sizes: --sm 40px / radius 10 (toolbars, table cells), --lg 56px / radius 14 */
  .input--sm, .select--sm > select { min-height: 2.5rem; padding: .45rem .8rem; border-radius: var(--radius-sm); font-size: .9375rem; }
  .input--lg, .select--lg > select { min-height: 3.5rem; padding: .85rem 1.1rem; border-radius: 14px; font-size: var(--step-1); }
  textarea.input--sm { min-height: 5rem; }
  /* touch: the small fields and the search pill reach 44px */
  @media (pointer: coarse) {
    .input--sm, .input--pill, .select--sm > select { min-height: var(--target-min); }
  }

  /* Search: a pill with a 16px magnifier (in an .input-wrap). In app
     toolbars use .input--pill.input--sm (40px). */
  .input--pill { border-radius: var(--radius-pill); padding-inline: 1.15rem; }

  /* A leading icon and/or a trailing button inside the field */
  .input-wrap { position: relative; min-width: 0; }
  .input-wrap > .icon {
    position: absolute; top: 50%; left: .9rem; z-index: 1; width: 1rem; height: 1rem;
    translate: 0 -50%; color: var(--color-text-subtle); pointer-events: none;
  }
  .input-wrap > .icon ~ .input { padding-left: 2.5rem; }
  .input-wrap > .icon ~ .input--pill { padding-left: 2.6rem; }
  .input-wrap > .icon ~ .input--lg { padding-left: 2.85rem; }
  .input-wrap > .input-wrap__end { position: absolute; top: 50%; right: .375rem; z-index: 1; translate: 0 -50%; display: flex; align-items: center; }
  .input-wrap:has(> .input-wrap__end) > .input { padding-right: 3rem; }

  /* The native select (no JS, or data-native): same field, a CSS chevron. */
  .select { position: relative; display: block; min-width: 0; }
  .select > select { padding-right: 2.75rem; appearance: none; cursor: pointer; }
  .select > select[multiple] { min-height: 8rem; padding-right: .95rem; }
  .select::after {
    content: ""; position: absolute; top: 50%; right: 1.1rem; width: .5rem; height: .5rem; margin-top: -.375rem;
    border-right: 1.75px solid var(--color-text-muted); border-bottom: 1.75px solid var(--color-text-muted);
    rotate: 45deg; pointer-events: none;
  }
  .select--sm::after { right: .95rem; }
  .select:has(> select[multiple])::after { display: none; }

  /* ---- Input group: one field with compartments --------------------------
     Addon: fill, muted 15/500, the same 1px edge. A trailing button attaches
     with radius 0 12 12 0. */
  .input-group { display: flex; align-items: stretch; min-width: 0; }
  .input-group > * { border-radius: 0; }
  .input-group > :first-child { border-start-start-radius: var(--radius-md); border-end-start-radius: var(--radius-md); }
  .input-group > :last-child { border-start-end-radius: var(--radius-md); border-end-end-radius: var(--radius-md); }
  .input-group > * + * { margin-left: -1px; }
  .input-group > .input { flex: 1 1 auto; min-width: 0; }
  .input-group > .input:hover, .input-group > .input:focus { position: relative; z-index: 1; }
  .input-group__addon {
    display: inline-flex; flex: none; align-items: center; gap: .4rem; padding: 0 .9rem;
    border: 1px solid var(--color-control-border); background: var(--color-fill);
    font-size: .9375rem; font-weight: var(--fw-medium); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); white-space: nowrap;
  }
  .input-group__addon .icon { width: 1rem; height: 1rem; }
  .input-group > .btn { flex: none; min-height: auto; padding-inline: 1.25rem; }
  .input-group > .btn:active { transform: none; scale: none; }
  .input-group > .btn:focus-visible { position: relative; z-index: 2; }

  /* ---- Number stepper: − [ 2 ] +, pill ends ---------------------------- */
  .number { display: inline-flex; align-items: stretch; min-height: var(--field-h); }
  .number > .input {
    width: 4.5rem; min-height: 0; padding-inline: .5rem; border-radius: 0; text-align: center;
    font-variant-numeric: tabular-nums lining-nums; -moz-appearance: textfield; appearance: textfield;
  }
  .number > .input::-webkit-inner-spin-button, .number > .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  .number > .input:hover, .number > .input:focus { position: relative; z-index: 1; }
  .number > button {
    display: grid; place-items: center; flex: none; width: calc(var(--field-h) + .25rem);
    border: 1px solid var(--color-control-border); background: var(--color-fill);
    color: var(--color-heading); font-size: 1.25rem; font-weight: var(--fw-medium); line-height: 1;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .number > button:first-child { margin-right: -1px; border-radius: var(--radius-pill) 0 0 var(--radius-pill); padding-left: .2rem; }
  .number > button:last-child { margin-left: -1px; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; padding-right: .2rem; }
  .number > button:hover:not(:disabled) { background: var(--color-fill-hover); }
  .number > button:active:not(:disabled) { background: color-mix(in oklab, var(--color-fill-hover), var(--color-heading) 8%); }
  .number > button:disabled { opacity: .38; cursor: not-allowed; }
  .number > button:focus-visible { position: relative; z-index: 2; outline-offset: 2px; }

  /* ---- Fieldset ---------------------------------------------------------- */
  .fieldset { display: grid; gap: var(--space-4); min-width: 0; }
  .fieldset__legend {
    float: none; margin-bottom: .375rem; padding: 0;
    font: var(--fw-semibold) var(--step-0)/1.35 var(--font-text); letter-spacing: var(--tracking-body); color: var(--color-heading);
  }
  .fieldset__hint { margin-top: -.5rem; font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }

  /* ---- Layout -------------------------------------------------------------- */
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
  .form-grid > .is-full { grid-column: 1 / -1; }
  @media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }

  .form-actions {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3);
    padding-top: var(--space-6); border-top: 1px solid var(--color-border);
  }
  .form-actions__start { margin-right: auto; }
  .form-actions--start { justify-content: flex-start; padding-top: var(--space-2); border-top: 0; }
  /* Phones: the buttons share the row and grow (a lone button runs full width). */
  @media (max-width: 640px) {
    .form-actions > .btn { flex: 1 1 auto; white-space: normal; }     /* a long label wraps rather than widen the form */
    .form-actions__start { flex: 1 1 100%; }
  }

  /* ---- Form section: a titled part of a long form ------------------------
     A tile (§2.9): tone on the portal (radius 28), white with a hairline and
     a whisper shadow in the app (radius 20). Each can be the target of a
     table of contents (it has an id and clears the sticky bar).
       <section class="form-section" id="s-doc" aria-labelledby="s-doc-t">
         <div class="form-section__head">
           <h2 class="form-section__title" id="s-doc-t"><span class="form-section__num">1</span> Documentația</h2>
           <p class="form-section__intro">…</p>
         </div>
         <div class="form-grid">…</div>
       </section>
     Completion hook: validate.js adds .is-complete (and data-complete on the
     links that point to it, e.g. the TOC) when every required control of a
     numbered section inside form[data-validate] is valid; the disc turns
     into a blue tick. A page can set .is-complete itself. */
  .form-section {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); min-width: 0; padding: calc(var(--card-pad) * 1.25);
    border-radius: var(--radius-tile); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow);
    scroll-margin-top: calc(var(--header-h) + var(--space-6));
  }
  .form-section + .form-section { margin-top: var(--space-5); }
  .form-section__head { display: grid; gap: var(--space-2); }
  .form-section__title {
    display: flex; align-items: center; gap: .75rem;
    font: var(--fw-semibold) var(--step-2)/var(--lh-head) var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading);
  }
  .form-section__num {
    position: relative; display: inline-grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--color-selected); color: var(--color-on-selected);
    font: var(--fw-semibold) .8125rem/1 var(--font-text); letter-spacing: 0; font-variant-numeric: tabular-nums lining-nums;
    transition: background-color var(--dur-2) var(--ease-out);
  }
  .form-section.is-complete .form-section__num { background: var(--color-primary); color: var(--color-on-primary); font-size: 0; }
  .form-section.is-complete .form-section__num::after {
    content: ""; position: absolute; inset: 0; width: .7rem; height: .375rem; margin: auto; translate: 0 -.0625rem; rotate: -45deg;
    border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
    --pop-y: 0px; --pop-scale: .3; animation: atlas-pop var(--dur-2) var(--ease-bounce) backwards;
  }
  .form-section__intro {
    max-width: 60ch; font-size: calc(var(--step-0) - .0625rem); line-height: 1.5;
    letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
  }

  /* Forced colours: the number disc keeps an edge; a completed one stays filled */
  @media (forced-colors: active) {
    .form-section__num { outline: 1px solid CanvasText; }
    .form-section.is-complete .form-section__num { forced-color-adjust: none; background: Highlight; color: HighlightText; outline: 0; }
  }
}

/* ---- css/components/alert.css ---- */
/* Atlas · Alert
   A tinted tile in the status colour: no border, no side stripe, radius 20.
   The 20px icon and the 600 title take the status colour; the body is 15px
   in the text colour, its links inherit it and are 600. A ghost close
   button sits at the end (controls.js: data-dismiss=".alert").

     <div class="alert alert--warning" role="status">
       <svg class="icon" aria-hidden="true">…</svg>
       <div class="alert__body"><strong class="alert__title">Documentația e incompletă</strong>
         Lipsește planșa de reglementări. <a href="…">Adaug-o acum</a></div>
       <button class="alert__close" data-dismiss=".alert" aria-label="Închide mesajul">…</button>
     </div>
   Kinds: (info) · --success · --warning · --danger (role="alert") · --event.
   .alert__actions holds buttons under the text. */
@layer components {
  .alert {
    --alert-bg: var(--color-info-bg); --alert-fg: var(--color-info-fg);
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-auto-columns: auto; column-gap: var(--space-3); align-items: start;
    padding: clamp(1rem, .9rem + .3vw, 1.25rem) clamp(1.125rem, 1rem + .4vw, 1.5rem);
    border: 0; border-radius: var(--radius-lg); background: var(--alert-bg); color: var(--color-text);
  }
  .alert > .icon { width: 1.25rem; height: 1.25rem; margin-top: .125rem; color: var(--alert-fg); }
  .alert--success { --alert-bg: var(--color-success-bg); --alert-fg: var(--color-success-fg); }
  .alert--warning { --alert-bg: var(--color-warning-bg); --alert-fg: var(--color-warning-fg); }
  .alert--danger { --alert-bg: var(--color-danger-bg); --alert-fg: var(--color-danger-fg); }
  .alert--event { --alert-bg: var(--color-event-bg); --alert-fg: var(--color-event-fg); }

  .alert__title { display: block; margin-bottom: .125rem; font-size: 1rem; font-weight: var(--fw-semibold); line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--alert-fg); text-wrap: balance; }
  .alert__body { font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text); }
  .alert__body a:not(.btn) { color: inherit; font-weight: var(--fw-semibold); }
  .alert__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
  /* The close button: a ghost circle in the third column, top row */
  .alert__close {
    position: relative; grid-column: 3; grid-row: 1; display: grid; place-items: center; width: 2rem; height: 2rem;
    margin: -.3125rem -.5rem -.3125rem 0; border-radius: 50%; color: var(--alert-fg);
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .alert__close:hover { background: color-mix(in oklab, var(--alert-fg) 12%, transparent); }
  .alert__close .icon { width: 1rem; height: 1rem; }
  @media (pointer: coarse) {
    .alert__close::after { content: ""; position: absolute; inset: -.375rem; }
  }
}

/* ---- css/components/site-footer.css ---- */
/* Atlas · Site footer (spec §3.9) — the light Apple footer
   A quiet grey plane in 13px type: the ministry's seal and name, one line on
   the platform, columns of links, then the legal row (© · links between
   hairlines). The ministry and the accessibility statement stay easy to find.
     <footer class="site-footer">
       <div class="container site-footer__grid">
         <div class="site-footer__brand">
           <span class="brand__emblem" aria-hidden="true">…</span>
           <div><p class="site-footer__name">Ghișeul online de urbanism</p>
             <p class="site-footer__sub">Ministerul Exemplu</p>
             <p class="site-footer__desc">…</p></div>
         </div>
         <div><p class="site-footer__h">Servicii</p>
           <ul class="site-footer__links" role="list"><li><a href="…">…</a></li></ul></div>
         …  up to four columns; a column may hold .site-footer__group (label + link)
       </div>
       <div class="container site-footer__bottom">
         <span>© 2026 Ministerul Exemplu</span>
         <span class="site-footer__bottom-links"><a href="…">Termeni</a><a href="…">Confidențialitate</a>…</span>
         <a class="site-footer__a11y" href="…"><svg class="icon">…#i-a11y</svg> Declarația de accesibilitate</a>   optional, prominent
       </div>
     </footer>
   .site-footer--inverse   the black footer, for gravitas. The markup carries
                           data-scheme="dark" so its content takes the dark set:
                           <footer class="site-footer site-footer--inverse" data-scheme="dark"> */
@layer components {
  .site-footer {
    --color-plane: var(--color-bg-alt);
    background: var(--color-bg-alt); color: var(--color-text-muted); border-top: 1px solid var(--color-border);
    font-size: .8125rem; line-height: 1.5; letter-spacing: var(--tracking-small);
  }
  .site-footer__grid {
    display: grid; grid-template-columns: minmax(15rem, 1.5fr) repeat(auto-fit, minmax(10rem, 1fr));
    gap: var(--space-10) var(--space-8); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) var(--space-12);
  }
  /* the seal: emblem, name, ministry line */
  .site-footer__brand { display: flex; align-items: flex-start; gap: var(--space-4); }
  .site-footer__logo { width: 2.75rem; height: 2.75rem; flex: none; }
  .site-footer .brand__emblem { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 12px; }
  .site-footer__name { font: var(--fw-semibold) 1.0625rem/1.25 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .site-footer__sub { margin-top: var(--space-1); font: var(--fw-semibold) .75rem/1.4 var(--font-text); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-muted); }
  .site-footer__desc { margin-top: var(--space-4); max-width: 38ch; line-height: 1.55; text-wrap: pretty; }
  .site-footer__h { margin-bottom: var(--space-4); font: var(--fw-semibold) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-heading); }
  .site-footer__links { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
  .site-footer a { color: var(--color-text-muted); text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
  .site-footer a:hover { color: var(--color-heading); text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: .2em; }
  .site-footer__links .icon { width: .8rem; height: .8rem; margin-inline-start: .3rem; opacity: .7; }
  .site-footer__label { display: block; margin-bottom: 2px; font-size: .75rem; color: var(--color-text-subtle); }
  .site-footer__group a { color: var(--color-heading); font-weight: var(--fw-medium); }
  .site-footer__group a .icon { width: .85rem; height: .85rem; margin-inline-start: .2rem; opacity: .7; }
  .site-footer__group + .site-footer__group { margin-top: var(--space-4); }
  .site-footer__group p { margin-top: 2px; }
  .social { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
  .site-footer .social__link { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--color-fill); color: var(--color-heading); transition: background-color var(--dur-2) var(--ease-out); }
  .site-footer .social__link:hover { background: var(--color-fill-hover); color: var(--color-heading); text-decoration: none; }
  .social__link .icon { width: 1.1rem; height: 1.1rem; }

  /* the legal row: © on the start side, links between hairlines (a divider
     that would start a wrapped line is clipped away; the 6px of padding
     inside the clip leave room for the whole focus ring) */
  .site-footer__bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6);
    padding-block: var(--space-5) var(--space-8); border-top: 1px solid var(--color-border);
    color: var(--color-text-subtle);
  }
  .site-footer > .site-footer__bottom:first-child { border-top: 0; padding-top: var(--space-6); }
  .site-footer__bottom-links { display: flex; flex-wrap: wrap; column-gap: var(--space-6); row-gap: var(--space-2); overflow: hidden; padding: 6px; margin: -6px; }
  .site-footer__bottom-links > a { position: relative; }
  .site-footer__bottom-links > a::before {
    content: ""; position: absolute; top: 50%; inset-inline-start: calc(var(--space-6) / -2 - .5px); width: 1px; height: 1em; margin-top: -.5em; background: var(--color-border-strong);
  }
  .site-footer .site-footer__bottom a { display: inline-flex; align-items: center; gap: .35rem; color: var(--color-text-muted); }
  .site-footer .site-footer__bottom a:hover { color: var(--color-heading); }
  .site-footer__bottom .icon { width: .9rem; height: .9rem; }
  /* the accessibility statement, where everyone looks for it */
  .site-footer .site-footer__bottom .site-footer__a11y { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .site-footer__a11y .icon { width: 1.05rem; height: 1.05rem; color: var(--color-accent-figure); }

  @media (max-width: 960px) {
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__brand { grid-column: 1 / -1; }
  }
  @media (max-width: 480px) {
    .site-footer__grid { gap: var(--space-8) var(--space-5); }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  }
  @media (pointer: coarse) {
    .site-footer__links { gap: 0; }
    .site-footer__links a { display: inline-flex; align-items: center; min-height: var(--target-min); }
    .site-footer__bottom-links > a, .site-footer .site-footer__bottom .site-footer__a11y { min-height: var(--target-min); }
    /* the contact links under their labels: an invisible 44px hit area */
    .site-footer__group a { position: relative; display: inline-block; }
    .site-footer__group a::after { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) 0; }
  }

  /* ---- Inverse: the black footer (data-scheme="dark" in the markup) ------- */
  .site-footer--inverse { --color-plane: var(--color-inverse); background: var(--color-inverse); }
  .site-footer--inverse .brand__emblem { box-shadow: inset 0 0 0 1px var(--color-inverse-border); }
}

/* ---- css/components/page-head.css ---- */
/* Atlas · Page head (spec §3.10, M3)
   The top of an inner page: breadcrumb → (eyebrow) → large title → a muted intro.
     <header class="page-head">
       <nav class="breadcrumb" aria-label="…">…</nav>
       <p class="page-head__eyebrow">…</p>                               optional
       <h1 class="page-head__title">Registrul de dosare</h1>
       <p class="page-head__intro">…</p>
     </header>
   With actions on the right, wrap the title and intro:
     <header class="page-head"><div class="section-head--row">
       <div><h1 class="page-head__title">…</h1><p class="page-head__intro">…</p></div>
       <div class="section-head__actions">…</div></div></header>
   The register sets the scale through tokens only (tokens.css §5): on the
   portal the title is a headline (step-5, 40 → 56px, 1.04, −.03em); with
   data-context="app" it is a system large title (32 → 40px, 1.08, −.028em),
   the intro drops to 16px and the padding tightens. No [data-context] or
   .app-shell selector here: context changes tokens, never this file.

   Page-open choreography (M3): the head's children rise 10px one after the
   other (0 / 40 / 80ms) on the spring, then everything after the head rises
   a beat later (110ms). Fill mode `backwards`, so nothing stays transformed
   once it has arrived (sticky children and stacking keep working). The
   rules have zero specificity (:where), so any component that animates
   itself (a bar that springs up, a dialog) keeps its own motion; dialogs,
   popovers and hidden elements are skipped (an entrance must never replay
   when something comes back from display:none). Reduce Motion: base.css
   ends every animation at once, so the content simply shows. */
@layer components {
  .page-head { padding-block: var(--page-head-pad-top) var(--page-head-pad-bottom); }
  .page-head__title {
    margin-top: var(--space-4);
    font-size: var(--step-5); font-weight: var(--fw-display);
    line-height: var(--lh-page-title); letter-spacing: var(--tracking-page-title);
    color: var(--color-heading); text-wrap: balance;
  }
  .page-head__title:first-child, :where(.page-head) :first-child > .page-head__title:first-child { margin-top: 0; }
  .page-head > .breadcrumb + :not(.page-head__title) { margin-top: var(--space-4); }
  /* A line above the title — the date over the app's large title ("Joi, 15
     octombrie"), a section of the site: 14/500 muted, sentence case.
       <p class="page-head__eyebrow"><time datetime="2026-10-15">Joi, 15 octombrie</time></p><h1 class="page-head__title">…</h1> */
  .page-head__eyebrow {
    margin: 0; font: var(--fw-medium) var(--step--1)/1.35 var(--font-text); letter-spacing: var(--tracking-ui);
    color: var(--color-text-muted); font-variant-numeric: tabular-nums;
  }
  .page-head > .breadcrumb + .page-head__eyebrow { margin-top: var(--space-4); }
  .page-head__eyebrow + .page-head__title { margin-top: var(--space-2); }
  .page-head__intro {
    margin-top: var(--space-4); max-width: 58ch;
    font-size: var(--step-intro); line-height: 1.45; letter-spacing: var(--tracking-body);
    color: var(--color-text-muted); text-wrap: pretty;
  }

  /* ---- M3 · page open ---------------------------------------------------- */
  :where(.page-head > :not([hidden])) { animation: atlas-rise var(--dur-4) var(--ease-spring) backwards; }
  :where(.page-head > :nth-child(2)) { animation-delay: 40ms; }
  :where(.page-head > :nth-child(n + 3)) { animation-delay: 80ms; }
  :where(.page-head ~ :not(dialog, [popover], [hidden], script, template, style, link)) {
    animation: atlas-rise var(--dur-4) var(--ease-spring) 110ms backwards;
  }
  @media print {
    :where(.page-head > *, .page-head ~ *) { animation: none; }
  }
}

/* ---- css/components/kicker.css ---- */
/* Atlas · Kicker
   The small label above a headline on editorial pages ("Informare",
   "Eveniment"): 12px / 600 in --color-accent-strong, or in the item's --mark
   colour. It is the one label that may be tracked uppercase (spec §2.6), on
   the portal's editorial pages. In the app register it reads in sentence
   case like every other label there: the register re-declares two tokens,
   so the markup stays the same.
     <span class="kicker">Informare</span>
     <a class="story mark--warning" href="…">… <span class="kicker">Termen</span> …</a>
   Markup and options: docs/index.html. */
@layer components {
  /* --kicker-case / --kicker-tracking are register tokens (tokens.css §1, §5) */

  /* ---- Editorial page: masthead, front page, archive ---------------------
     A news / bulletin page in a newspaper idiom: rules instead of cards. The
     colour of a .kicker or a row mark comes from --mark (set per item, e.g.
     per content type, by the project theme). */
  .kicker {
    font: var(--fw-semibold) var(--step--2)/1.25 var(--font-text);
    letter-spacing: var(--kicker-tracking); text-transform: var(--kicker-case);
    color: var(--mark, var(--color-accent-strong));
  }
  /* Generic --mark colours (a project may add its own, e.g. per content
     type). Each one is a text colour: 4.5:1 or better on every plane. */
  .mark--info { --mark: var(--color-info-fg); } .mark--success { --mark: var(--color-success-fg); } .mark--warning { --mark: var(--color-warning-fg); }
  .mark--danger { --mark: var(--color-danger-fg); } .mark--event { --mark: var(--color-event-fg); } .mark--accent { --mark: var(--color-accent-strong); }
  .mark--neutral { --mark: var(--color-text-subtle); }
}

/* ---- css/components/masthead.css ---- */
/* Atlas · Masthead
   The frontispiece of a bulletin page: a thin bar (date · RSS) over a
   graphite rule, the kicker, the title centred, one line of intro.
     <header class="masthead">
       <div class="masthead__bar"><span class="masthead__date">miercuri, 7 octombrie 2026</span><a href="…">… Abonare RSS</a></div>
       <p class="masthead__kicker">Buletin informativ</p>
       <h1 class="masthead__title">Fluxul de informații</h1>
       <p class="masthead__intro">…</p>
     </header>
   Markup and options: docs/index.html. */
@layer components {
  .masthead { text-align: center; }
  .masthead__bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6);
    padding-block: var(--space-4) var(--space-3); border-bottom: 1px solid var(--color-heading);
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    font-variant-numeric: tabular-nums; color: var(--color-text-muted); text-align: start;
  }
  .masthead__date { display: inline-block; }
  .masthead__date::first-letter { text-transform: uppercase; }   /* "Miercuri, 7 octombrie": sentence case */
  .masthead__bar a { display: inline-flex; align-items: center; gap: .4rem; color: var(--color-text-muted); text-decoration: none; }
  .masthead__bar a:hover { color: var(--color-heading); text-decoration: underline; text-decoration-color: currentColor; }
  .masthead__bar .icon { width: 1rem; height: 1rem; }
  /* The kicker of the masthead: the same label as .kicker (tracked caps on
     the portal, sentence case in the app) */
  .masthead__kicker {
    margin-top: clamp(2rem, 1.25rem + 2.5vw, 3.5rem);
    font: var(--fw-semibold) var(--step--2)/1.25 var(--font-text);
    letter-spacing: var(--kicker-tracking, var(--tracking-caps)); text-transform: var(--kicker-case, uppercase);
    color: var(--color-accent-strong);
  }
  .masthead__title {
    margin: var(--space-3) auto 0; max-width: 18ch;
    font-size: var(--step-5); font-weight: var(--fw-display); line-height: var(--lh-display); letter-spacing: var(--tracking-title);
  }
  .masthead__intro {
    max-width: 56ch; margin: var(--space-5) auto 0;
    font-size: var(--step-intro); line-height: 1.45; letter-spacing: var(--tracking-text); color: var(--color-text-muted);
  }
}

/* ---- css/components/tabs.css ---- */
/* Atlas · Tabs
   Plain labels in sentence case; the current one in the heading colour,
   semibold, over a 2px graphite line. Links (aria-current) or ARIA tabs
   ([data-tabs] + role=tab + aria-selected); counts as .badge--muted.
     <nav class="tabs tabs--line" aria-label="…"><a class="tabs__tab" href="…" aria-current="page">Toate</a>…</nav>
     <div data-tabs><div class="tabs tabs--plain tabs--line" role="tablist" aria-label="…">
       <button type="button" class="tabs__tab" role="tab" id="t1" aria-controls="p1" aria-selected="true">Detalii</button>…
     </div><div class="tab-panel" role="tabpanel" id="p1" aria-labelledby="t1" tabindex="0">…</div></div>
   .tabs--line   a hairline under the row
   .tabs--plain  no colour dot before the labels (.mark--* sets the dot)
   With JS (tabs.js) one ink line slides from tab to tab (M18): .tabs::after
   reads --ink-x / --ink-w and the per-tab lines step aside (.has-ink).
   Panels: ship them all without `hidden`; while scripting is on, only the
   first one shows until tabs.js takes over (.is-tabs-ready), and without
   JavaScript every panel can be read.
   A row that scrolls sideways (a phone) fades at the edge that hides more
   tabs (tabs.js: .has-more-start / .has-more-end); at 480px and below the
   tabs sit closer. In print each panel shows under its tab's name. */
@layer components {
  .tabs { position: relative; display: flex; gap: var(--space-6); min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__tab {
    position: relative; display: inline-flex; flex: none; align-items: center; gap: .5rem; padding-block: 1rem;
    font: var(--fw-medium) .9375rem/1 var(--font-text); letter-spacing: var(--tracking-ui); text-transform: none;
    color: var(--color-text-muted); text-decoration: none; white-space: nowrap; transition: color var(--dur-2) var(--ease-out);
  }
  .tabs__tab::before { content: ""; flex: none; width: .45rem; height: .45rem; border-radius: 50%; background: var(--mark, var(--color-text-subtle)); }
  /* each tab's own line: grey and growing on hover, graphite when current */
  .tabs__tab::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--color-heading);
    transform: scaleX(0); transition: transform var(--dur-3) var(--ease-spring), background-color var(--dur-2) var(--ease-out);
  }
  .tabs__tab:hover { color: var(--color-heading); text-decoration: none; }
  .tabs__tab:hover::after { background: var(--color-border-strong); transform: scaleX(1); }
  .tabs__tab:is(.is-active, [aria-current], [aria-selected="true"]) { color: var(--color-heading); font-weight: var(--fw-semibold); }
  .tabs__tab:is(.is-active, [aria-current], [aria-selected="true"])::after { background: var(--color-heading); transform: scaleX(1); }
  .tabs__tab:focus-visible { outline-offset: -3px; }
  .tabs__tab .badge { font-weight: var(--fw-semibold); }

  /* M18: one ink line that slides to the current tab (tabs.js) */
  .tabs.has-ink::after {
    content: ""; position: absolute; left: 0; bottom: 0; z-index: 1; width: var(--ink-w, 0px); height: 2px; border-radius: 2px;
    background: var(--color-heading); translate: var(--ink-x, 0px) 0; pointer-events: none;
    transition: translate var(--dur-3) var(--ease-spring), width var(--dur-3) var(--ease-spring);
  }
  .tabs.has-ink .tabs__tab:is(.is-active, [aria-current], [aria-selected="true"])::after { transform: scaleX(0); transition: none; }
  .tabs.no-ink-anim::after { transition: none; }

  .tabs--plain .tabs__tab::before { display: none; }
  /* the hairline is a 1px bottom gradient, not an inset shadow: on a
     scrolling row Firefox paints an inset shadow's edge at the top too */
  .tabs--line { background: linear-gradient(var(--color-border), var(--color-border)) left bottom / 100% 1px no-repeat; }
  .tab-panel { padding-top: var(--space-6); }
  /* before tabs.js runs (scripting on), only the first panel shows */
  @media (scripting: enabled) {
    [data-tabs]:not(.is-tabs-ready) [role="tabpanel"] ~ [role="tabpanel"] { display: none; }
  }
  /* a row that scrolls: the edge that hides more fades */
  .tabs.has-more-end { -webkit-mask-image: linear-gradient(90deg, black calc(100% - 1.5rem), transparent); mask-image: linear-gradient(90deg, black calc(100% - 1.5rem), transparent); }
  .tabs.has-more-start { -webkit-mask-image: linear-gradient(90deg, transparent, black 1rem); mask-image: linear-gradient(90deg, transparent, black 1rem); }
  .tabs.has-more-start.has-more-end {
    -webkit-mask-image: linear-gradient(90deg, transparent, black 1rem, black calc(100% - 1.5rem), transparent);
    mask-image: linear-gradient(90deg, transparent, black 1rem, black calc(100% - 1.5rem), transparent);
  }
  @media (max-width: 480px) {
    .tabs { gap: var(--space-3); }
  }
  @media print {
    .tab-panel[data-print-title]::before {
      content: attr(data-print-title); display: block; margin-bottom: var(--space-3);
      font: var(--fw-semibold) var(--step-2)/var(--lh-head) var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading);
    }
  }
  .tab-panel:not([hidden]) { animation: atlas-fade var(--dur-2) var(--ease-out); }
  .tab-panel:focus-visible { outline-offset: 6px; }
  @media (pointer: coarse) {
    .tabs__tab { min-height: var(--target-min); padding-block: .75rem; }
  }
  /* Forced colours: no button frames (they are a row of tabs, not buttons);
     the line under the current tab (and the sliding ink) is drawn in
     Highlight, the hover line in CanvasText */
  @media (forced-colors: active) {
    .tabs__tab { outline: 0; }
    .tabs__tab::after, .tabs.has-ink::after { forced-color-adjust: none; background: Highlight; height: 3px; }
    .tabs__tab:hover::after { background: CanvasText; }
    .tabs__tab:is(.is-active, [aria-current]:not([aria-current="false"]), [aria-selected="true"])::after { background: Highlight; }
    .tabs--line { background: none; border-bottom: 1px solid CanvasText; }
  }
}

/* ---- css/components/front.css ---- */
/* Atlas · Front
   The front page of a bulletin: the main story (.story) and a column of
   briefs (.briefs) beside it, divided by a hairline. Rules, not cards: the
   whole story is one link, its title underlines under the pointer.
     <div class="front">
       <a class="story mark--warning" href="…"><span class="story__meta"><span class="kicker">Informare</span><span>22 septembrie 2026 · Legislație</span></span>
         <span class="story__title">…</span><span class="story__dek">…</span>
         <span class="story__foot"><span class="host">…</span><span class="story__more">Citește articolul …</span></span></a>
       <aside class="front__aside" aria-label="Alte noutăți"><p class="front__label">Alte noutăți</p>
         <ul class="briefs"><li><a class="brief mark--success" href="…"><span class="brief__meta">…</span><span class="brief__title">…</span></a></li></ul></aside>
     </div>
   .story__cover (optional) is a 2:1 image or a .cover above the title.
   Markup and options: docs/index.html. */
@layer components {
  .front { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); padding-block: clamp(2rem, 1.5rem + 2vw, 3rem); }
  .front--solo { grid-template-columns: minmax(0, 1fr); }
  .front__aside { margin-inline-start: clamp(1.5rem, .5rem + 2.5vw, 3rem); padding-inline-start: clamp(1.5rem, .5rem + 2.5vw, 3rem); border-inline-start: 1px solid var(--color-border); }
  .front__label {
    padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-heading);
    font: var(--fw-semibold) var(--step-0)/1.3 var(--font-text); letter-spacing: var(--tracking-text); color: var(--color-heading);
  }
  @media (max-width: 900px) {
    .front { grid-template-columns: minmax(0, 1fr); }
    .front__aside { margin: var(--space-10) 0 0; padding: 0; border-inline-start: 0; }
  }

  /* ---- The main story ------------------------------------------------------ */
  .story { display: flex; flex-direction: column; gap: var(--space-4); max-width: 52rem; color: inherit; text-decoration: none; transition: opacity var(--dur-1) var(--ease-out); }
  .story__cover { display: block; aspect-ratio: 2 / 1; margin-block: var(--space-1) var(--space-2); overflow: hidden; border-radius: var(--radius-tile); background: var(--color-inverse) center / cover no-repeat; }
  .story__cover > img { width: 100%; height: 100%; object-fit: cover; transition: scale var(--dur-4) var(--ease-spring); }
  .story__meta, .brief__meta {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem;
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); font-variant-numeric: tabular-nums; color: var(--color-text-subtle);
  }
  .story__title { font-size: var(--step-3); line-height: var(--lh-title); letter-spacing: var(--tracking-tight); }
  .story__dek {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; max-width: 60ch;
    font-size: var(--step-1); line-height: 1.5; letter-spacing: var(--tracking-text); color: var(--color-text-muted);
  }
  .story__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); margin-top: var(--space-2); }
  /* "Citește articolul": the action of the story, in the link colour */
  .story__more { display: inline-flex; align-items: center; gap: .4rem; font: var(--fw-medium) .9375rem/1.2 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-link); }
  .story__more .icon { width: 1rem; height: 1rem; transition: translate var(--dur-2) var(--ease-bounce); }
  a.story:hover { color: inherit; text-decoration: none; }
  a.story:hover .story__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
  a.story:hover .story__more { color: var(--color-link-hover); }
  @media (hover: hover) {
    a.story:hover .story__more .icon { translate: var(--nudge) 0; }
    a.story:hover .story__cover > img { scale: 1.03; }
  }

  /* ---- Briefs: the column beside it ---------------------------------------- */
  .briefs { margin: 0; padding: 0; list-style: none; }
  .briefs > li + li { border-top: 1px solid var(--color-border); }
  .brief { display: grid; gap: var(--space-2); padding-block: var(--space-5); color: inherit; text-decoration: none; transition: opacity var(--dur-1) var(--ease-out); }
  .brief__title { font-size: var(--step-1); line-height: 1.3; letter-spacing: var(--tracking-text); }
  a.brief:hover { color: inherit; text-decoration: none; }
  a.brief:hover .brief__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  :is(a.story, a.brief):active { opacity: .72; }
  @media (prefers-reduced-motion: reduce) { a.story:hover .story__cover > img { scale: 1; } }
}

/* ---- css/components/archive.css ---- */
/* Atlas · Archive
   The bulletin's archive: a head over a graphite rule, then one group per
   month — the month on the start side, rows split by hairlines: day, kicker,
   title, arrow. The whole row is the link; the arrow nudges under the
   pointer.
     <section class="archive" aria-label="Arhivă">
       <div class="archive__head"><h2 class="archive__title">Arhivă</h2><span class="archive__note">de la cele mai noi</span></div>
       <div class="archive__group"><p class="archive__month">august 2026</p>
         <ul class="archive__rows"><li><a class="archive-row mark--warning" href="…"><span class="archive-row__day">28</span>
           <span class="kicker archive-row__kind">Informare</span><span class="archive-row__title">…</span>
           <svg class="icon archive-row__go" aria-hidden="true"><use href="…#i-arrow"/></svg></a></li></ul></div>
     </section>
   Markup and options: docs/index.html. */
@layer components {
  .archive { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
  .archive__head {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6);
    padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-heading);
  }
  .archive__title { font-size: var(--step-3); line-height: var(--lh-title); letter-spacing: var(--tracking-tight); }
  .archive__note { font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .archive__group { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 3.4fr); gap: var(--space-2) var(--space-6); padding-top: var(--space-6); }
  .archive__month { padding-top: var(--space-4); font: var(--fw-semibold) .9375rem/1.4 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-heading); }
  .archive__month::first-letter { text-transform: uppercase; }   /* "august 2026" → "August 2026" */
  .archive__rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-border); }
  .archive__rows > li { border-bottom: 1px solid var(--color-border); }
  .archive-row {
    display: grid; grid-template-columns: 2.75rem 7.5rem minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-2) var(--space-5);
    padding-block: var(--space-4); color: inherit; text-decoration: none; transition: opacity var(--dur-1) var(--ease-out);
  }
  .archive-row__day { font: var(--fw-semibold) 1.5rem/1.1 var(--font-display); letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums lining-nums; color: var(--color-heading); }
  .archive-row__title { font-size: var(--step-0); font-weight: var(--fw-regular); line-height: 1.45; letter-spacing: var(--tracking-body); }
  .archive-row__kind { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* the kicker keeps to its column */
  .archive-row__go { align-self: center; width: 1rem; height: 1rem; color: var(--color-text-subtle); transition: translate var(--dur-2) var(--ease-bounce), color var(--dur-2) var(--ease-out); }
  a.archive-row:hover { color: inherit; text-decoration: none; }
  a.archive-row:hover .archive-row__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  a.archive-row:hover .archive-row__go { color: var(--color-heading); translate: var(--nudge) 0; }
  a.archive-row:active { opacity: .72; }
  @media (max-width: 640px) {
    .archive__group { grid-template-columns: minmax(0, 1fr); }
    .archive-row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
    .archive-row__day { grid-row: 1 / span 2; }
    .archive-row__go { grid-column: 3; grid-row: 1 / span 2; }
  }
}

/* ---- css/components/error-page.css ---- */
/* Atlas · Error page (spec §3.10) — 404, maintenance
   Centred: the contour emblem (96px, it draws itself), the code, a title, a
   short muted text, then the way out (the first page, search).
     <div class="error-page">
       <svg class="error-page__emblem topo topo--draw" viewBox="0 0 96 96" focusable="false" aria-hidden="true"
            data-topo='[{"cx":48,"cy":48,"levels":4,"step":9.5,"seed":27,"squash":1,"ix":4}]'></svg>
       <p class="error-page__code" aria-hidden="true">404</p>
       <h1 class="error-page__title">Pagina nu există</h1>
       <p class="error-page__lead">…</p>
       <form class="error-page__search" role="search">…</form>               optional
       <div class="error-page__actions"><a class="btn" href="…">Mergi la prima pagină</a>
         <a class="btn btn--secondary" href="…">Caută</a></div>
     </div>
   .error-page--maintenance   no code: a warning tag, the title, the text and
                              the expected end time in a pill:
       <span class="tag tag--notice">Mentenanță planificată</span>
       <h1 class="error-page__title">Lucrăm la platformă</h1> <p class="error-page__lead">…</p>
       <p class="error-page__when"><svg class="icon">…#i-clock</svg> Revenim <time datetime="2026-10-14T06:00">azi, la 06:00</time></p> */
@layer components {
  .error-page {
    display: flex; flex-direction: column; align-items: center; max-width: 40rem; margin-inline: auto;
    text-align: center;
  }
  .error-page__emblem {
    display: block; width: 6rem; height: 6rem; margin-bottom: var(--space-6); overflow: visible;
    --topo: color-mix(in oklab, var(--color-heading) 22%, transparent);
    --topo-ix: color-mix(in oklab, var(--color-accent-figure) 80%, transparent);
  }
  .error-page__emblem path { stroke-width: 1.25; }
  .error-page__emblem path.ix { stroke-width: 2; }
  .error-page__code {
    font: var(--fw-display) var(--step-6)/1 var(--font-display); letter-spacing: var(--tracking-display);
    font-variant-numeric: tabular-nums lining-nums; color: var(--color-heading);
  }
  .error-page__title {
    margin-top: var(--space-5); max-width: 18ch;
    font-size: var(--step-4); font-weight: var(--h2-weight); line-height: var(--h2-lh); letter-spacing: var(--h2-tracking);
    color: var(--color-heading); text-wrap: balance;
  }
  .error-page__code + .error-page__title { margin-top: var(--space-4); }
  .error-page__lead { margin-top: var(--space-5); max-width: 46ch; font-size: var(--step-1); line-height: 1.5; letter-spacing: var(--tracking-text); color: var(--color-text-muted); text-wrap: pretty; }
  .error-page__search, .error-page > form { width: min(100%, 28rem); margin-top: var(--space-8); text-align: start; }
  .error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-8); }

  /* Maintenance: the tag above the title, the expected end in a pill */
  .error-page--maintenance .tag { margin-bottom: var(--space-2); }
  .error-page__when {
    display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-6);
    min-height: 2.5rem; padding: .5rem 1.1rem; border-radius: var(--radius-pill);
    background: var(--color-fill); font-size: .9375rem; color: var(--color-text-muted);
  }
  .error-page__when .icon { width: 1.05rem; height: 1.05rem; color: var(--color-heading); }
  .error-page__when time, .error-page__when b { font-weight: var(--fw-semibold); color: var(--color-heading); font-variant-numeric: tabular-nums; }

  @media (max-width: 480px) {
    .error-page__actions { flex-direction: column; align-items: stretch; width: 100%; }
  }
}

/* ---- css/components/check.css ---- */
/* Atlas · Check, radio, switch (spec §3.2, G9, K5, M15, M16)
   The native input, restyled: keyboard, forms and validation keep working.
   The label text follows the input inside one <label>; a hint can follow
   the text (.check__hint, 13px).
     <label class="check"><input type="checkbox" name="x"> <span>Text<span class="check__hint">hint</span></span></label>
     <label class="radio"><input type="radio" name="y"> <span>Text</span></label>
     <label class="switch"><input type="checkbox" role="switch"> <span>Text</span></label>
     .options · .options--inline   a column / a row of them
   Check and radio: a 22px box, 1.5px control edge (3:1 on every plane),
   primary when on; the tick or dot pops in (M16: 0 → 1, --dur-2 bounce),
   the box gives under the finger (.9).
   Switch (iOS, 46 × 28): off is a light track (--color-fill-hover) with an
   inset control-edge ring (3:1 against the page); on is primary. The white
   24px knob slides on --ease-bounce and stretches while pressed (M15).
   A radio or checkbox inside a .choice card takes the same look
   (choice.css). Markup: lab/s2-controls.html. */
@layer components {
  .check, .radio, .switch {
    --check-lh: 1.45;
    display: inline-flex; align-items: flex-start; gap: .75rem;
    font-size: var(--step-0); line-height: var(--check-lh); letter-spacing: var(--tracking-body); color: var(--color-text);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }

  /* ---- Check and radio -------------------------------------------------- */
  :is(.check, .radio, .choice) > input:is([type="checkbox"], [type="radio"]) {
    appearance: none; flex: none; display: grid; place-content: center; position: relative;
    width: 1.375rem; height: 1.375rem; margin: max(0px, calc((var(--check-lh, 1.45) * 1em - 1.375rem) / 2)) 0 0;
    border: 1.5px solid var(--color-control-border); border-radius: 7px; background: var(--color-field);
    cursor: pointer;
    transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  :is(.radio, .choice) > input[type="radio"], .radio > input { border-radius: 50%; }
  /* the tick: a clipped shape in the colour on primary */
  :is(.check, .radio, .choice) > input[type="checkbox"]::before {
    content: ""; width: .75rem; height: .75rem; background: var(--color-on-primary); transform: scale(0);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transition: transform 140ms var(--ease-exit);          /* leaving: quick, no bounce (spec 2.11 rule 3) */
  }
  :is(.check, .choice) > input[type="checkbox"]:indeterminate::before { clip-path: inset(41% 4% 41% 4% round 2px); transform: scale(1); }
  /* the dot */
  :is(.radio, .choice) > input[type="radio"]::before {
    content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--color-on-primary); transform: scale(0);
    box-shadow: 0 1px 1px rgb(var(--shadow-rgb) / .12);
    transition: transform 140ms var(--ease-exit);
  }
  /* (:indeterminate only for checkboxes: a radio group with nothing chosen
     is :indeterminate too, and must stay empty) */
  :is(.check, .radio, .choice) > input:is(:checked, [type="checkbox"]:indeterminate) { background: var(--color-primary); border-color: var(--color-primary); }
  :is(.check, .radio, .choice) > input:checked::before { transform: scale(1); transition: transform var(--dur-2) var(--ease-bounce); }   /* arriving: the pop (M16) */
  :is(.check, .radio, .choice) > input:hover:not(:checked, [type="checkbox"]:indeterminate, :disabled) { border-color: color-mix(in oklab, var(--color-control-border), var(--color-text) 35%); }
  /* press: .9 (1 under Reduce Motion: it follows --press-scale-icon) */
  :is(.check, .radio, .choice) > input:active:not(:disabled) { transform: scale(calc(1 - (1 - var(--press-scale-icon)) * 1.25)); transition-duration: 80ms; }
  .check > input:focus-visible, .radio > input:focus-visible, .switch > input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  :is(.check, .radio) > input[aria-invalid="true"]:not(:checked) { border-color: var(--color-danger-fg); }
  .check:has(> input:disabled), .radio:has(> input:disabled), .switch:has(> input:disabled) { opacity: .45; cursor: default; }
  :is(.check, .radio, .switch) > input:disabled { cursor: default; }
  .check__hint { display: block; margin-top: .125rem; font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }

  /* ---- Switch ----------------------------------------------------------- */
  .switch > input {
    --knob: var(--color-knob);          /* white in light and dark, as on a phone */
    appearance: none; flex: none; position: relative;
    width: 2.875rem; height: 1.75rem; margin: calc((var(--check-lh) * 1em - 1.75rem) / 2) 0 0;
    border: 0; border-radius: var(--radius-pill); cursor: pointer;
    background: var(--color-fill-hover); box-shadow: inset 0 0 0 1px var(--color-control-border);
    transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  }
  .switch > input::before {
    content: ""; position: absolute; top: .125rem; left: .125rem; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-pill);
    background: var(--knob); box-shadow: var(--shadow-knob);
    transition: transform var(--dur-3) var(--ease-bounce), width var(--dur-2) var(--ease-spring);
  }
  .switch > input:checked { background: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
  .switch > input:checked::before { transform: translateX(1.125rem); }
  /* the knob stretches under the finger (+5px), toward the side it will go */
  .switch > input:active:not(:disabled)::before { width: 1.8rem; transition-duration: var(--dur-3), 80ms; }
  .switch > input:checked:active:not(:disabled)::before { transform: translateX(.825rem); }
  .switch > input:hover:not(:checked, :disabled) { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-control-border), var(--color-text) 35%); }

  /* ---- Groups ----------------------------------------------------------- */
  .options { display: grid; align-content: start; gap: .875rem; }
  .options--inline { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }

  /* Touch: each input grows an invisible 44px hit area (the label around
     it is a target too); the layout does not move */
  @media (pointer: coarse) {
    :is(.check, .radio, .choice) > input:is([type="checkbox"], [type="radio"])::after { content: ""; position: absolute; inset: calc((1.375rem - var(--target-min)) / 2); }
    .switch > input::after { content: ""; position: absolute; inset: calc((1.75rem - var(--target-min)) / 2) 0; }
  }

  /* Forced colours would paint the box, the tick and the knob in Canvas:
     draw them in system colours instead */
  @media (forced-colors: active) {
    :is(.check, .radio, .choice) > input:is([type="checkbox"], [type="radio"]), .switch > input { forced-color-adjust: none; background: Canvas; border: 1px solid ButtonText; box-shadow: none; }
    :is(.check, .radio, .choice) > input:is([type="checkbox"], [type="radio"]) { border-width: 1.5px; }
    :is(.check, .radio, .choice) > input::before, .switch > input::before { background: ButtonText; box-shadow: none; }
    :is(.check, .radio, .choice, .switch) > input:is(:checked, [type="checkbox"]:indeterminate) { background: Highlight; border-color: Highlight; }
    :is(.check, .radio, .choice, .switch) > input:is(:checked, [type="checkbox"]:indeterminate)::before { background: HighlightText; }
    :is(.check, .radio, .choice, .switch) > input:disabled { border-color: GrayText; }
  }
}

/* ---- css/components/range.css ---- */
/* Atlas · Range (spec §3.2, K19)
   A slider: a 4px track, the filled part in primary, a white 24px knob.
     <div class="range-row">
       <input class="range" id="raza" type="range" min="0" max="50" step="5" value="15" data-output="raza-out" data-unit=" km" aria-label="Raza de căutare">
       <output id="raza-out" for="raza">15 km</output>
     </div>
   The fill: forms.js writes --range-fill (the value as a percentage) on
   every input[type=range] on load and on input (WebKit and Blink have no
   "progress" part); Firefox paints ::-moz-range-progress. data-output
   names an <output> that shows the value (+ data-unit), in a fill pill.
   Markup: lab/s2-controls.html. */
@layer components {
  .range {
    --range-track: var(--color-fill-hover);
    --range-knob: var(--color-knob);              /* white in light and dark */
    display: block; width: 100%; height: 1.75rem; margin: 0; padding: 0;
    appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .range::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--color-primary) var(--range-fill, 0%), var(--range-track) var(--range-fill, 0%));
  }
  .range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--range-track); }
  .range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--color-primary); }
  .range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 1.5rem; height: 1.5rem; margin-top: -.625rem;
    border: 0; border-radius: 50%; background: var(--range-knob); box-shadow: var(--shadow-knob);
    transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out);
  }
  .range::-moz-range-thumb {
    width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: var(--range-knob); box-shadow: var(--shadow-knob);
    transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out);
  }
  /* held: the knob grows a touch (1.08; 1 under Reduce Motion) */
  .range:active::-webkit-slider-thumb { transform: scale(calc(2 - var(--press-scale-icon))); }
  .range:active::-moz-range-thumb { transform: scale(calc(2 - var(--press-scale-icon))); }
  /* Keyboard: the ring goes around the knob */
  .range:focus-visible { outline: none; }
  .range:focus-visible::-webkit-slider-thumb { box-shadow: var(--shadow-knob), 0 0 0 3px var(--color-focus); }
  .range:focus-visible::-moz-range-thumb { box-shadow: var(--shadow-knob), 0 0 0 3px var(--color-focus); }
  .range:disabled { opacity: .45; cursor: default; }

  .range-row { display: flex; align-items: center; gap: var(--space-4); }
  .range-row > .range { flex: 1 1 auto; min-width: 0; }
  .range-row > output {
    flex: none; min-width: 4.25rem; padding: .3125rem .75rem; border-radius: var(--radius-pill); background: var(--color-fill);
    text-align: center; white-space: nowrap;
    font: var(--fw-semibold) var(--step--1)/1.3 var(--font-text); letter-spacing: var(--tracking-ui);
    font-variant-numeric: tabular-nums lining-nums; color: var(--color-heading);
  }

  @media (pointer: coarse) { .range { height: var(--target-min); } }
  @media (forced-colors: active) {
    .range { forced-color-adjust: none; }
    .range::-webkit-slider-runnable-track { background: linear-gradient(90deg, Highlight var(--range-fill, 0%), GrayText var(--range-fill, 0%)); }
    .range::-moz-range-track { background: GrayText; }
    .range::-moz-range-progress { background: Highlight; }
    .range::-webkit-slider-thumb { background: ButtonText; box-shadow: none; }
    .range::-moz-range-thumb { background: ButtonText; box-shadow: none; }
    .range:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
  }
}

/* ---- css/components/dropzone.css ---- */
/* Atlas · Dropzone (spec §3.2, M26)
   Where files are dropped or chosen. A quiet tone with a dashed edge, a
   48px tinted disc with the upload arrow, a title and a hint.
     <label class="dropzone">
       <input type="file" name="doc" multiple accept=".pdf,.zip">
       <span class="dropzone__icon"><svg class="icon" aria-hidden="true"><use href="…#i-upload"/></svg></span>
       <span class="dropzone__title">Trage fișierele aici sau <u>alege-le</u></span>
       <span class="dropzone__hint">PDF sau ZIP, maximum 20 MB fiecare</span>
       <span class="dropzone__files" aria-live="polite"></span>
     </label>
   While files are dragged over it, forms.js sets .is-dragover: a solid
   primary edge, the accent tint, the disc turns blue and lifts 4px, the
   zone grows to 1.01 (--dur-2). forms.js also lists the chosen files.
   Markup: lab/s2-controls.html. */
@layer components {
  .dropzone {
    position: relative; display: grid; justify-items: center; gap: var(--space-2);
    padding: var(--space-10) var(--space-6); text-align: center;
    border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-fill-subtle);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .dropzone:hover { border-color: var(--color-control-border); background: var(--color-fill); }
  .dropzone:is(.is-dragover, .is-over) {
    border-style: solid; border-color: var(--color-primary); background: var(--color-accent-soft);
    transform: scale(calc(1 + (1 - var(--press-scale-tile)) * .667));   /* 1.01 (1 under Reduce Motion) */
  }
  /* the input covers the zone: a click anywhere opens the file chooser */
  .dropzone > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .dropzone:has(> input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
  .dropzone__icon {
    display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: var(--space-1); border-radius: 50%;
    background: var(--color-accent-soft); color: var(--color-on-accent-soft);
    transition: transform var(--dur-2) var(--ease-spring), background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  .dropzone:hover .dropzone__icon { transform: translateY(var(--lift)); }
  .dropzone:is(.is-dragover, .is-over) .dropzone__icon { background: var(--color-primary); color: var(--color-on-primary); transform: translateY(calc(var(--lift) * 2)); }
  .dropzone__icon .icon { width: 1.375rem; height: 1.375rem; }
  .dropzone__title { font-weight: var(--fw-semibold); letter-spacing: var(--tracking-body); color: var(--color-heading); }
  .dropzone__title u { color: var(--color-link-on-fill); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in oklab, currentColor 42%, transparent); text-underline-offset: .22em; }
  .dropzone:hover .dropzone__title u { color: var(--color-link-hover); text-decoration-color: currentColor; }
  .dropzone__hint { font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle-on-fill); }
  .dropzone__files { margin-top: var(--space-2); font-size: var(--step--1); color: var(--color-text); }
  .dropzone__files:empty { display: none; }
  .dropzone:has(> input:disabled) { opacity: .45; cursor: default; pointer-events: none; }
}

/* ---- css/components/choice.css ---- */
/* Atlas · Choice cards (spec §3.2)
   A radio (or checkbox) as a card: for a few options that each need a line
   of explanation. A tile with a hairline ring; the chosen card gets a 2px
   primary ring and its radio fills; the whole card is the target.
     <div class="choices">
       <label class="choice"><input type="radio" name="scop" value="a" required>
         <span class="choice__title">Să construiesc</span>
         <span class="choice__text">o clădire nouă sau o extindere</span></label>
     </div>
   The input takes the radio / checkbox look of check.css. The card shows
   the keyboard focus ring (the input's own ring is not drawn twice).
   Markup: lab/s2-controls.html. */
@layer components {
  .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--space-3); }
  .choice {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: .25rem .875rem;
    padding: 1.125rem 1.25rem; border-radius: var(--radius-lg);
    background: var(--color-tile); box-shadow: inset 0 0 0 1px var(--color-border-strong);
    font-size: var(--step-0); line-height: var(--lh-body); color: var(--color-text);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .choice:hover { background: var(--color-tile-hover); box-shadow: inset 0 0 0 1px var(--color-control-border); }
  .choice:active { transform: scale(var(--press-scale-tile)); transition-duration: 80ms; }
  .choice > input { grid-row: 1 / span 2; }
  .choice__title { font-weight: var(--fw-semibold); letter-spacing: var(--tracking-body); color: var(--color-heading); }
  .choice__text { grid-column: 2; font-size: .875rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-ui); color: var(--color-text-subtle); }
  /* Chosen: a 2px primary ring inside the card */
  .choice:has(> input:checked) { box-shadow: inset 0 0 0 2px var(--color-primary); }
  .choice:has(> input:checked):hover { background: var(--color-tile); }
  /* Keyboard: one ring, on the card */
  .choice > input:focus-visible { outline: none; }
  .choice:has(> input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
  .choice:has(> input:disabled) { opacity: .45; cursor: default; pointer-events: none; }
  .choice:has(> input[aria-invalid="true"]:not(:checked)) { box-shadow: inset 0 0 0 1px var(--color-danger-fg); }
  /* Forced colours drop the ring (a shadow): draw it with outlines */
  @media (forced-colors: active) {
    .choice { outline: 1px solid CanvasText; outline-offset: -1px; }
    .choice:has(> input:checked) { outline: 3px solid Highlight; outline-offset: -3px; }
  }
}

/* ---- css/components/select-custom.css ---- */
/* Atlas Modern · Custom select (spec §3.2, G12, M13, M20)
   select.js turns every .select > select into a styled field and list
   (single or multiple), keeping the native <select> underneath: the form
   still submits it, `required` still validates it, change events still fire
   on it. Without JavaScript the native select stays, styled by form.css.
     <span class="select"><select id="county" name="county">…</select></span>
   Options on the <select>:
     data-search        a search box in the list (on by default above 10 options)
     data-placeholder   text shown when nothing is chosen (multiple)
     data-native        keep the browser's own control
   On an <option>: data-description adds a second, smaller line.
   The first option with an empty value is the placeholder of a single
   select (shown in the field, left out of the list). .select--sm / --lg size
   the field like .input--sm / --lg.
   The list is macOS: a thick material panel (radius 16), 36px rows (44 on
   touch), the highlighted row in the primary blue with white text, the
   chosen one with a blue tick (white on the highlight). It opens from the
   edge next to the field with a 240ms spring (from the bottom edge when it
   opens upwards) and fades out in 140ms; the chevron flips and turns blue. */
@layer components {
  .select.is-enhanced::after { display: none; }
  .select.is-enhanced > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }

  /* ---- The field ------------------------------------------------------- */
  .select__trigger {
    display: flex; align-items: center; gap: .6rem; width: 100%; min-height: var(--field-h);
    padding: .5rem .85rem .5rem .95rem;
    border: 1px solid var(--color-control-border); border-radius: var(--radius-md); background: var(--color-field);
    color: var(--color-text); font-size: var(--step-0); line-height: 1.3; letter-spacing: var(--tracking-body); text-align: start; cursor: pointer;
    transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
  }
  .select__trigger:hover:not(:disabled, [aria-expanded="true"]) { border-color: color-mix(in oklab, var(--color-control-border), var(--color-text) 30%); }
  .select__trigger:focus-visible, .select__trigger[aria-expanded="true"] { outline: none; border-color: var(--color-focus); box-shadow: var(--focus-ring); }
  .select__trigger:disabled { border-color: transparent; background: var(--color-fill); color: var(--color-text-muted); cursor: not-allowed; }
  .select.is-invalid .select__trigger, .select__trigger[aria-invalid="true"] { border-color: var(--color-danger-fg); }
  .select.is-invalid .select__trigger:focus-visible, .select__trigger[aria-invalid="true"]:focus-visible,
  .select__trigger[aria-invalid="true"][aria-expanded="true"] {
    border-color: var(--color-danger-fg); box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-danger-fg) 22%, transparent);
  }
  .select__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .select__value.is-placeholder { color: var(--color-text-subtle); }
  .select__count { flex: none; }
  /* M20: the chevron flips (spring) and turns blue while the list is open */
  .select__chevron {
    flex: none; width: 1rem; height: 1rem; color: var(--color-text-muted);
    transition: rotate var(--dur-3) var(--ease-spring), color var(--dur-2) var(--ease-out);
  }
  .select__trigger[aria-expanded="true"] .select__chevron { rotate: 180deg; color: var(--color-primary); }
  .select--sm .select__trigger { min-height: 2.5rem; padding: .3rem .7rem .3rem .8rem; border-radius: var(--radius-sm); font-size: .9375rem; }
  .select--lg .select__trigger { min-height: 3.5rem; padding-inline: 1.1rem 1rem; border-radius: 14px; font-size: var(--step-1); }

  /* ---- The list: a native [popover] in the top layer --------------------
     Never clipped by dialogs, tables or scrolling boxes; placed next to the
     field by select.js (.is-up when it opens upwards). */
  .select__panel {
    position: fixed; inset: auto; margin: 0; padding: 5px; z-index: var(--z-popover);
    border: 0; border-radius: var(--radius-popover); background: var(--material-overlay); color: var(--color-text);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
    overflow: hidden; transform-origin: 50% 0; flex-direction: column;   /* the layout stays while it fades out */
    /* exit: a 140ms fade, kept in the top layer until it ends */
    opacity: 0;
    transition: opacity 140ms var(--ease-out), display 140ms allow-discrete, overlay 140ms allow-discrete;
  }
  .select__panel.is-up { transform-origin: 50% 100%; --pop-y: 4px; }
  /* entrance (M13): scale .96, 4px from the field, opacity 0 → rest, 240ms spring */
  .select__panel:popover-open { display: flex; opacity: 1; animation: atlas-pop var(--dur-2) var(--ease-spring); }

  .select__search { position: relative; flex: none; padding: 1px 1px 5px; }
  .select__search .icon {
    position: absolute; top: calc(50% - 2px); left: .7rem; width: 1rem; height: 1rem;
    translate: 0 -50%; color: var(--color-text-subtle-on-fill); pointer-events: none;
  }
  .select__search input {
    width: 100%; min-height: 2.25rem; padding: .35rem .75rem .35rem 2.1rem; border: 0;
    border-radius: var(--radius-sm); background: var(--color-fill); color: var(--color-text);
    font-size: .9375rem; letter-spacing: var(--tracking-ui);
  }
  .select__search input::placeholder { color: var(--color-text-subtle-on-fill); opacity: 1; }
  .select__search input:focus { outline: none; background: var(--color-field); box-shadow: inset 0 0 0 1px var(--color-focus), var(--focus-ring); }

  .select__list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; }
  .select__group {
    padding: .625rem .625rem .25rem; font: var(--fw-semibold) .75rem/1.3 var(--font-text);
    letter-spacing: 0; color: var(--color-text-subtle);
  }
  .select__group:first-child { padding-top: .375rem; }
  .select__option {
    display: flex; align-items: center; gap: .625rem; min-height: 2.25rem; padding: .375rem .625rem; border-radius: var(--radius-menu-item);
    font-size: .9375rem; line-height: 1.3; letter-spacing: var(--tracking-ui); color: var(--color-text);
    cursor: default; user-select: none;
  }
  .select__option[aria-selected="true"] { color: var(--color-heading); font-weight: var(--fw-medium); }
  .select__option[aria-disabled="true"] { color: var(--color-text-subtle); opacity: .55; }
  .select__option[hidden] { display: none; }
  /* the highlighted row (pointer or keys): primary with white text */
  .select__option.is-active { background: var(--color-primary); color: var(--color-on-primary); }
  .select__label { display: grid; flex: 1; min-width: 0; }
  .select__desc { font-size: .8125rem; font-weight: var(--fw-regular); line-height: 1.35; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .select__option.is-active .select__desc { color: var(--color-on-primary); }
  .select__check { flex: none; width: 1rem; height: 1rem; margin-left: auto; stroke-width: 2.2; color: var(--color-primary); opacity: 0; }
  .select__option[aria-selected="true"] .select__check { opacity: 1; }
  .select__option.is-active .select__check { color: var(--color-on-primary); }
  /* multiple: a checkbox look */
  .select__box {
    flex: none; display: grid; place-content: center; width: 1.125rem; height: 1.125rem;
    border: 1.5px solid var(--color-control-border); border-radius: 5px; background: var(--color-field);
  }
  .select__box .icon { width: .75rem; height: .75rem; stroke-width: 2.6; color: var(--color-on-primary); opacity: 0; }
  .select__option[aria-selected="true"] .select__box { border-color: var(--color-primary); background: var(--color-primary); }
  .select__option[aria-selected="true"] .select__box .icon { opacity: 1; }
  .select__option.is-active .select__box { border-color: var(--color-on-primary); }
  .select__option.is-active[aria-selected="true"] .select__box { background: var(--color-on-primary); }
  .select__option.is-active[aria-selected="true"] .select__box .icon { color: var(--color-primary); }
  .select__empty { padding: .75rem .625rem; font-size: var(--step--1); color: var(--color-text-subtle); }
  .select__foot {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
    margin-top: 5px; padding: 6px 1px 1px; border-top: 1px solid var(--color-border);
  }

  @media (pointer: coarse) {
    .select--sm .select__trigger { min-height: var(--target-min); }
    .select__option { min-height: var(--target-min); }
    .select__search input { min-height: var(--target-min); }
  }
}

/* ---- css/components/badge.css ---- */
/* Atlas · Badge (spec §3.7, K11, M35)
   A count: a 22px pill, 12/700, tabular figures.
     .badge           primary (blue): new items for you
     .badge--danger   solid red (#D70015, white 5.38:1): overdue, errors
     .badge--muted    grey fill, muted figure: a plain count (sidebar, tabs)
     .badge--accent   accent tint: a word such as "Nou"
     .badge--dot      an 8px dot without a number (unread)
   On an icon button: <button class="icon-btn has-badge" aria-label="Notificări: 3 noi">
   …<span class="badge badge--danger" aria-hidden="true">3</span></button>.
   The badge is ringed in the plane colour (2px), so it reads as cut out of
   the button. A badge that appears or changes after the page loaded pops
   in (scale .9 → 1, --dur-2 bounce; controls.js marks it .is-new).
   Markup: lab/s2-controls.html. */
@layer components {
  .badge {
    display: inline-grid; place-items: center; flex: none; min-width: 1.375rem; height: 1.375rem; padding: 0 .4rem;
    border-radius: var(--radius-pill); background: var(--color-primary); color: var(--color-on-primary);
    font: var(--fw-bold) .75rem/1 var(--font-text); letter-spacing: 0; font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
  }
  .badge--danger { background: var(--color-danger-solid); color: var(--color-on-primary); }
  .badge--muted { background: var(--color-fill); color: var(--color-text-muted); }
  .badge--accent { background: var(--color-accent-soft); color: var(--color-on-accent-soft); }
  .badge--dot { min-width: 0; width: .5rem; height: .5rem; padding: 0; }

  .has-badge { position: relative; }
  .has-badge > .badge {
    position: absolute; top: -.25rem; right: -.3rem; z-index: 1;
    box-shadow: 0 0 0 2px var(--color-plane, var(--color-bg)); pointer-events: none;
  }
  .has-badge > .badge--dot { top: .3rem; right: .3rem; }
  /* M35: a badge that arrives or changes pops in */
  .badge.is-new { animation: atlas-pop var(--dur-2) var(--ease-bounce) backwards; --pop-y: 0px; --pop-scale: .9; }
}

/* ---- css/components/status.css ---- */
/* Atlas · Status (a dot and a word)
   An 8px dot in the status-dot colour (3:1 or better on white and #F5F5F7,
   K10) and 14px text. Used in tables, lists and the record head; a dot on
   its own (aria-hidden) marks a row.

     <span class="status status--warn">În verificare</span>
   Kinds: (neutral) · --ok · --warn · --danger · --info. */
@layer components {
  .status {
    --status: var(--color-dot-neutral);
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: var(--step--1); font-weight: var(--fw-medium); line-height: 1.3; letter-spacing: var(--tracking-ui); color: var(--color-text);
    white-space: nowrap;
  }
  .status::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--status); }
  .status--ok { --status: var(--color-dot-ok); }
  .status--warn { --status: var(--color-dot-warn); }
  .status--danger { --status: var(--color-dot-danger); }
  .status--info { --status: var(--color-dot-info); }
  @media (forced-colors: active) {
    .status::before { forced-color-adjust: none; background: CanvasText; }
  }
}

/* ---- css/components/kbd.css ---- */
/* Atlas · Kbd
   A key: <kbd class="kbd">Ctrl</kbd> + <kbd class="kbd">K</kbd>. A soft key
   cap drawn from the text colour around it (a tint and a bottom edge of
   currentColor), so it reads on white, grey, glass, dark and on a
   highlighted menu row alike. Never under 12px. */
@layer components {
  .kbd {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-width: 1.375rem; height: 1.375rem; padding: 0 .375rem;
    border: 0; border-radius: var(--radius-xs);
    background: color-mix(in oklab, currentColor 9%, transparent);
    box-shadow: inset 0 -1px 0 color-mix(in oklab, currentColor 20%, transparent);
    font: var(--fw-medium) max(var(--step--2), .75em)/1 var(--font-text); letter-spacing: 0;
    font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; color: inherit;
  }
  .kbd + .kbd { margin-inline-start: .2rem; }
}

/* ---- css/components/banner.css ---- */
/* Atlas · Banner
   A full-width strip under the header, in a status tint: 14px text, the
   content centred, a close button at the end (controls.js:
   data-dismiss=".banner"). The maintenance notice uses --warning.

     <div class="banner banner--warning" role="region" aria-label="Anunț">
       <svg class="icon" aria-hidden="true">…</svg>
       <span>Joi, 22:00–23:00, platforma nu va fi disponibilă.</span> <a href="…">Detalii</a>
       <button class="banner__close" data-dismiss=".banner" aria-label="Închide anunțul">…</button>
     </div>
   Kinds: (info) · --success · --warning · --danger. A .tag inside is the
   primary pill ("Nou"). */
@layer components {
  .banner {
    --banner-bg: var(--color-info-bg); --banner-fg: var(--color-info-fg);
    position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-1) var(--space-3);
    min-height: 2.75rem; padding: .625rem calc(var(--gutter) + 2.25rem);
    background: var(--banner-bg); color: var(--color-text);
    font-size: var(--step--1); line-height: 1.4; letter-spacing: var(--tracking-ui); text-align: center;
  }
  .banner > .icon { width: 1.125rem; height: 1.125rem; color: var(--banner-fg); }
  .banner a:not(.btn) { color: var(--banner-fg); font-weight: var(--fw-semibold); }
  .banner .tag { --tag-bg: var(--color-primary); --tag-fg: var(--color-on-primary); --tag-bd: transparent; }
  .banner--success { --banner-bg: var(--color-success-bg); --banner-fg: var(--color-success-fg); }
  .banner--warning { --banner-bg: var(--color-warning-bg); --banner-fg: var(--color-warning-fg); }
  .banner--danger { --banner-bg: var(--color-danger-bg); --banner-fg: var(--color-danger-fg); }
  .banner__close {
    position: absolute; top: 50%; right: max(.375rem, calc(var(--gutter) - .5rem)); translate: 0 -50%;
    display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--banner-fg);
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .banner__close:hover { background: color-mix(in oklab, var(--banner-fg) 12%, transparent); }
  .banner__close .icon { width: 1rem; height: 1rem; }
  /* Phones: the text starts at the gutter, the close button keeps its corner */
  @media (max-width: 640px) {
    /* One flowing line of text: the icon, the words and the link wrap together */
    .banner { display: block; padding: .75rem 3.25rem .75rem var(--gutter); text-align: left; }
    .banner > :not(.banner__close) + :not(.banner__close) { margin-left: .375rem; }
    .banner > .icon { vertical-align: -.25em; }
  }
  @media (pointer: coarse) {
    .banner__close { width: var(--target-min); height: var(--target-min); }
  }
  @media print { .banner__close { display: none; } }
}

/* ---- css/components/toast.css ---- */
/* Atlas · Toast (toast.js: Atlas.toast({ title, text, kind, timeout }))
   A notification card of overlay material (blur-thick, radius 18,
   --shadow-3 and a .5px edge): its symbol in a 22px disc of the solid
   status colour (info = primary), a 15/600 title, 14px muted text and a
   ghost close button. Bottom-right on a desktop; on phones at the bottom,
   the full width less 8px on each side.
   Stacking (M14): the newest sits nearest the edge; older ones scale to .96
   and are pushed up (toast.js slides them, FLIP). Pointer or focus on the
   stack restores them and pauses the 6s auto-dismiss.
   In: rise 20px and scale .94 → rest in --dur-3 spring. Out: sink 8px,
   scale .96 and fade in 240ms. Reduce Motion: instant.

     <div class="toast toast--success" role="status"><svg class="icon">…</svg>
       <div><p class="toast__title">Document publicat</p><p class="toast__text">…</p></div>
       <button class="icon-btn icon-btn--sm icon-btn--ghost" aria-label="Închide">…</button></div>
   Kinds: (info) · --success · --warning · --danger (role="alert"). */
@layer components {
  .toast-region {
    position: fixed; z-index: var(--z-toast); right: var(--space-6); bottom: var(--space-6); left: auto;
    display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-3);
    width: min(24rem, calc(100vw - 2 * var(--space-6))); max-height: calc(100dvh - 2 * var(--space-6));
    pointer-events: none;
  }
  .toast {
    --toast: var(--color-primary); --toast-on: var(--color-on-primary);
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: start;
    padding: .875rem .625rem .875rem 1rem; border-radius: var(--radius-toast);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
    color: var(--color-text); pointer-events: auto; transform-origin: 50% 100%;
    transition: scale var(--dur-3) var(--ease-spring), translate var(--dur-3) var(--ease-spring), opacity var(--dur-2) var(--ease-out);
  }
  .toast-region > .toast { animation: atlas-toast-in var(--dur-3) var(--ease-spring) backwards; }
  .toast > .icon {
    width: 1.375rem; height: 1.375rem; margin-top: -.0625rem; padding: .25rem; border-radius: 50%;
    background: var(--toast); color: var(--toast-on); stroke-width: 2.4;
  }
  .toast > div { min-width: 0; }
  .toast__title { font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-heading); }
  .toast__text { font-size: .875rem; line-height: 1.45; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .toast__title + .toast__text { margin-top: .125rem; }
  .toast > .icon-btn { margin: -.375rem -.125rem -.375rem 0; }
  .toast--success { --toast: var(--color-success-solid); }
  .toast--danger { --toast: var(--color-danger-solid); }
  /* Orange takes a dark glyph in dark mode (--color-elevated: white / #2C2C2E) */
  .toast--warning { --toast: var(--color-warning-solid); --toast-on: var(--color-on-warning-solid); }

  /* The stack: older toasts recede until the stack is looked at */
  .toast.is-behind { scale: .96; }
  .toast-region:hover > .toast, .toast-region:focus-within > .toast { scale: 1; }
  .toast.is-leaving { animation: atlas-toast-out var(--dur-2) var(--ease-exit) forwards; pointer-events: none; }
  @keyframes atlas-toast-in { from { opacity: 0; transform: translateY(20px) scale(.94); } }
  @keyframes atlas-toast-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }

  @media (max-width: 640px) {
    .toast-region { right: .5rem; left: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom)); width: auto; }
  }
  @media (pointer: coarse) {
    .toast > .icon-btn { margin-block: -.625rem; }
  }
  @media print { .toast-region { display: none; } }
}

/* ---- css/components/progress.css ---- */
/* Atlas · Progress (native <progress>)
   An 8px pill: the track in --color-fill-hover, the value in primary. On
   arrival the value draws itself from the start and a soft light sweeps
   once along it (M30, 1.2s); later value changes glide in --dur-4 on the
   spring curve. A <progress> without a value is indeterminate: a short
   bar runs along the track (it rests in the middle under Reduce Motion).

     <div class="progress-row">
       <div class="progress-row__head"><label for="p1">Documentații digitalizate</label><b>62%</b></div>
       <progress class="progress" id="p1" max="100" value="62">62%</progress>
     </div>
   Colours: (primary) · --accent · --success · --warning · --danger. Sizes: --sm 4px · --lg 10px. */
@layer components {
  .progress {
    --progress-bar: var(--color-primary);
    --progress-light: color-mix(in srgb, var(--color-on-primary) 45%, transparent);
    display: block; width: 100%; height: .5rem; -webkit-appearance: none; appearance: none;
    border: 0; border-radius: var(--radius-pill); background: var(--color-fill-hover); overflow: hidden;
    color: var(--color-heading); vertical-align: middle;
  }
  .progress::-webkit-progress-bar { background: var(--color-fill-hover); border-radius: inherit; }
  .progress::-webkit-progress-value {
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--progress-light), transparent) -100% 0 / 50% 100% no-repeat, var(--progress-bar);
    transition: inline-size var(--dur-4) var(--ease-spring), width var(--dur-4) var(--ease-spring);
    animation: atlas-progress-draw var(--dur-4) var(--ease-spring) backwards, atlas-progress-light 1.2s var(--ease-out) 1 backwards;
  }
  .progress::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--progress-light), transparent) -100% 0 / 50% 100% no-repeat, var(--progress-bar);
    animation: atlas-progress-draw var(--dur-4) var(--ease-spring) backwards, atlas-progress-light 1.2s var(--ease-out) 1 backwards;
  }
  .progress--accent { --progress-bar: var(--color-accent-figure); }
  .progress--success { --progress-bar: var(--color-dot-ok); }
  .progress--warning { --progress-bar: var(--color-dot-warn); }
  .progress--danger { --progress-bar: var(--color-dot-danger); }
  .progress--sm { height: .25rem; }
  .progress--lg { height: .625rem; }

  /* Indeterminate: a third of the track runs from start to end */
  .progress:indeterminate {
    background: linear-gradient(90deg, transparent, var(--progress-bar) 30% 70%, transparent) -66.7% 0 / 40% 100% no-repeat, var(--color-fill-hover);
    animation: atlas-progress-run 1.4s var(--ease-in-out) infinite;
  }
  .progress:indeterminate::-webkit-progress-bar { background: transparent; }
  .progress:indeterminate::-moz-progress-bar { background: transparent; }

  .progress-row { display: grid; gap: var(--space-2); }
  .progress-row__head {
    display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
    font-size: var(--step--1); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text);
  }
  .progress-row__head b, .progress-row__head output { font-weight: var(--fw-semibold); color: var(--color-heading); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

  @keyframes atlas-progress-draw { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
  @keyframes atlas-progress-light { from { background-position: -100% 0, 0 0; } to { background-position: 200% 0, 0 0; } }
  @keyframes atlas-progress-run { from { background-position: -66.7% 0, 0 0; } to { background-position: 166.7% 0, 0 0; } }

  /* Reduce Motion: the value pseudo-elements are out of the base rule's
     reach, so they stop here; the bar shows its value at once. The
     indeterminate run stops too (base.css) and rests in the middle. */
  @media (prefers-reduced-motion: reduce) {
    .progress::-webkit-progress-value { animation: none; transition: none; }
    .progress::-moz-progress-bar { animation: none; }
    .progress:indeterminate { background-position: 50% 0, 0 0; }
  }
  .a11y-motion .progress::-webkit-progress-value { animation: none; transition: none; }
  .a11y-motion .progress::-moz-progress-bar { animation: none; }
  .a11y-motion .progress:indeterminate { background-position: 50% 0, 0 0; }

  /* Forced colours: the track and the value are backgrounds, which the
     system palette drops; paint them in system colours instead (a framed
     Canvas track, a Highlight value) */
  @media (forced-colors: active) {
    .progress { forced-color-adjust: none; background: Canvas; border: 1px solid CanvasText; }
    .progress::-webkit-progress-bar { background: Canvas; }
    .progress::-webkit-progress-value { background: Highlight; }
    .progress::-moz-progress-bar { background: Highlight; }
    .progress:indeterminate { background: linear-gradient(90deg, Highlight, Highlight) -66.7% 0 / 40% 100% no-repeat, Canvas; }
  }
}

/* ---- css/components/spinner.css ---- */
/* Atlas · Spinner
   A 20px ring, 2px, in the current colour with a transparent quarter; it
   turns in 700ms, linear (M29). Its motion is the message, so it keeps
   turning under Reduce Motion, at 1.2s (base.css exempts .spinner).

     <span class="spinner" role="status" aria-label="Se încarcă"></span>
     <span class="loading" role="status"><span class="spinner spinner--sm"></span>Se încarcă rezultatele…</span>
   Sizes: --sm 16px · (20px) · --lg 32px. */
@layer components {
  .spinner {
    --spinner: 1.25rem; --spinner-w: 2px;
    display: inline-block; flex: none; width: var(--spinner); height: var(--spinner); vertical-align: -.25em;
    border: var(--spinner-w) solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: atlas-spinner 700ms linear infinite;
  }
  .spinner--sm { --spinner: 1rem; }
  .spinner--lg { --spinner: 2rem; --spinner-w: 3px; }
  .loading { display: inline-flex; align-items: center; gap: .625rem; font-size: var(--step--1); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  @keyframes atlas-spinner { to { rotate: 360deg; } }
}

/* ---- css/components/skeleton.css ---- */
/* Atlas · Skeleton
   Placeholder shapes in --color-fill while content loads; a band of light
   (40% of the elevated surface: white, or #2C2C2E in dark) sweeps across
   them in 1.6s, linear (M28). Static under Reduce Motion. Mark the loading
   region aria-busy="true" and hide the shapes from assistive technology.

     <div class="card" aria-busy="true"><div class="card__body" aria-hidden="true">
       <span class="skeleton skeleton--title"></span>
       <span class="skeleton skeleton--line"></span><span class="skeleton skeleton--line is-short"></span>
     </div></div>
   Shapes: --line · --title · --block (16:9) · --circle (avatar). */
@layer components {
  .skeleton {
    --skeleton-band: color-mix(in srgb, var(--color-elevated) 40%, transparent);
    display: block; border-radius: var(--radius-xs);
    background: linear-gradient(100deg, transparent 35%, var(--skeleton-band) 50%, transparent 65%) 110% 0 / 250% 100% no-repeat, var(--color-fill);
    animation: atlas-skeleton 1.6s linear infinite;
  }
  .skeleton--line { height: .75rem; }
  .skeleton--line + .skeleton--line { margin-top: .625rem; }
  .skeleton--line.is-short { width: 60%; }
  .skeleton--title { width: 68%; height: 1.25rem; margin-bottom: .875rem; }
  .skeleton--block { aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-md); }
  .skeleton--circle { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
  @keyframes atlas-skeleton { from { background-position: 110% 0, 0 0; } to { background-position: -10% 0, 0 0; } }
  /* Reduce Motion: no band at all (the base rule stops the animation) */
  @media (prefers-reduced-motion: reduce) { .skeleton { background-image: none; } }
  .a11y-motion .skeleton { background-image: none; }
}

/* ---- css/components/empty.css ---- */
/* Atlas · Empty state
   A tile, centred: the contour emblem (72px: three contour rings in
   --topo-line and one index ring in --topo-index around a disc with the
   symbol — the signature, drawn in CSS on the icon slot), a step-2 title,
   muted text up to 60ch, and the actions. Inside a table's empty row it
   drops its tile. --bare drops it anywhere (a tab panel, a side column).

     <div class="empty">
       <span class="empty__icon"><svg class="icon" aria-hidden="true"><use href="…#i-search"/></svg></span>
       <p class="empty__title">Niciun rezultat</p>
       <p class="empty__text">Nu am găsit dosare pentru filtrele alese.</p>
       <div class="empty__actions"><button class="btn btn--secondary btn--sm">Șterge filtrele</button></div>
     </div> */
@layer components {
  .empty {
    display: grid; justify-items: center; align-content: center; gap: var(--space-3);
    padding: clamp(2.5rem, 1.8rem + 2.4vw, 4rem) var(--space-6);
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    text-align: center;
  }
  .empty--bare, .table__empty .empty { background: transparent; box-shadow: none; border-radius: 0; }

  /* The emblem: rings drawn as gradients, each a hair off the centre of the
     last, as contours of a hill; the index ring is the second from the disc */
  .empty__icon {
    display: grid; place-items: center; flex: none; width: 4.5rem; height: 4.5rem; margin-bottom: var(--space-2); border-radius: 50%;
    background:
      radial-gradient(circle at 50% 50%, transparent 34.5px, var(--topo-line) 34.75px 35.75px, transparent 36px),
      radial-gradient(circle at 51% 49%, transparent 29.75px, var(--topo-line) 30px 31px, transparent 31.25px),
      radial-gradient(circle at 51.5% 48.5%, transparent 25px, var(--topo-index) 25.25px 26.5px, transparent 26.75px),
      radial-gradient(circle at 51% 49%, transparent 20.75px, var(--topo-line) 21px 22px, transparent 22.25px);
    color: var(--color-text-muted);
  }
  .empty__icon > .icon {
    width: 2.25rem; height: 2.25rem; padding: .5625rem; border-radius: 50%;
    background: var(--color-chip, var(--color-plane, var(--color-bg))); stroke-width: 1.8;
  }
  .empty__title { font: var(--fw-semibold) var(--step-2)/var(--lh-head) var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading); text-wrap: balance; }
  .empty__text { max-width: 60ch; font-size: var(--step--1); line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-wrap: pretty; }
  .empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-2); }
  .empty > .btn { margin-top: var(--space-2); }
}

/* ---- css/components/tooltip.css ---- */
/* Atlas · Tooltip (CSS only; popover.js adds Esc to dismiss)
   A small dark label of material, no arrow, as the system draws it (G22):
   #1C1C1E at 88% + blur, radius 8, 12/500 light text, at most 16rem.
   It appears 300ms after the pointer arrives and at once on keyboard focus,
   with a fade and 2px of travel (M31); it never shows after a mouse click,
   nor while the trigger's own popover or menu is open.
   Hidden with display:none, so a bubble near the screen edge never widens
   the page. WCAG 1.4.13: the pointer can move onto the bubble (an invisible
   8px bridge keeps it open) and Esc dismisses it.

     <span class="tip"><button class="icon-btn" aria-label="Editează" aria-describedby="t1">…</button>
       <span class="tip__bubble" role="tooltip" id="t1">Editează documentul</span></span>
   .tip--bottom shows it below; .tip--end aligns it to the trigger's end edge. */
@layer components {
  .tip { position: relative; display: inline-flex; }
  .tip__bubble {
    --tip-y: 2px;
    position: absolute; z-index: var(--z-popover); bottom: calc(100% + .5rem); left: 50%;
    display: none; width: max-content; max-width: min(16rem, calc(100vw - 2rem));
    padding: .375rem .625rem; border-radius: var(--radius-menu-item);
    background: var(--material-tooltip);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: 0 6px 16px -6px rgb(var(--shadow-rgb) / .4), inset 0 0 0 .5px var(--color-inverse-border);
    color: var(--color-on-inverse); font: var(--fw-medium) .75rem/1.35 var(--font-text); letter-spacing: 0;
    text-align: center; white-space: normal; text-wrap: balance;
    transform: translateX(-50%);
    transition: opacity var(--dur-1) var(--ease-out), translate var(--dur-1) var(--ease-out), display var(--dur-1) allow-discrete;
  }
  /* The bridge over the gap to the trigger: the bubble can be hovered */
  .tip__bubble::before { content: ""; position: absolute; inset: -.5rem; }
  .tip:hover > .tip__bubble { display: block; transition-delay: 300ms; }
  .tip:has(:focus-visible) > .tip__bubble { display: block; transition-delay: 0s; }
  @starting-style {
    .tip:hover > .tip__bubble, .tip:has(:focus-visible) > .tip__bubble { opacity: 0; translate: 0 var(--tip-y); }
  }
  /* Dismissed with Esc, or the trigger's own overlay is open */
  .tip.is-dismissed > .tip__bubble, .tip:has([aria-expanded="true"]) > .tip__bubble { display: none; }
  .tip--bottom > .tip__bubble { --tip-y: -2px; top: calc(100% + .5rem); bottom: auto; }
  .tip--end > .tip__bubble { left: auto; right: 0; transform: none; text-align: left; }
  @media (prefers-reduced-transparency: reduce) {
    .tip__bubble { background: var(--color-inverse-tile); -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
  @media (forced-colors: active) {
    .tip__bubble { border: 1px solid CanvasText; }
  }
}

/* ---- css/components/popover.css ---- */
/* Atlas · Popover (native [popover]; popover.js places it by its trigger)
   A sheet of overlay material (blur-thick, radius 16, --shadow-3 and a
   .5px edge) that grows out of the corner of its trigger (M13): scale .96
   and 4px towards the trigger → rest in --dur-2 on the spring curve; it
   fades out in 140ms. data-align-end aligns it to the trigger's end edge
   and grows it from that corner; popover.js sets data-side="top" when it
   has to open above the trigger, and it then grows from the bottom.
   .menu (menu.css) shares the surface and the motion.

     <button class="btn btn--secondary btn--sm" popovertarget="p1">Ce este un PUZ?</button>
     <div class="popover" id="p1" popover>
       <p class="popover__title">…</p><p class="popover__text">…</p>
       <div class="popover__actions">…</div>
     </div> */
@layer components {
  .popover, .menu {
    --pop-from: 0 -4px; --pop-scale: .96;
    position: fixed; inset: auto; margin: 0; z-index: var(--z-popover); padding: 0; overflow: visible;
    border: 0; border-radius: var(--radius-popover); color: var(--color-text);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
    transform-origin: top left;
  }
  .popover[data-align-end], .menu[data-align-end] { transform-origin: top right; }
  .popover[data-side="top"], .menu[data-side="top"] { --pop-from: 0 4px; transform-origin: bottom left; }
  .popover[data-side="top"][data-align-end], .menu[data-side="top"][data-align-end] { transform-origin: bottom right; }

  .popover[popover], .menu[popover] {
    transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-spring), scale var(--dur-2) var(--ease-spring),
                overlay var(--dur-2) var(--ease-out) allow-discrete, display var(--dur-2) var(--ease-out) allow-discrete;
  }
  /* The way out is a plain fade (140ms) */
  .popover[popover]:not(:popover-open), .menu[popover]:not(:popover-open) {
    opacity: 0; transition-duration: var(--dur-1); transition-timing-function: var(--ease-exit);
  }
  @starting-style {
    .popover[popover]:popover-open, .menu[popover]:popover-open { opacity: 0; translate: var(--pop-from); scale: var(--pop-scale); }
  }
  /* Shared by other floating panels (select panel, map cards, bulk bar) */
  @keyframes atlas-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }

  .popover { width: min(21rem, calc(100vw - 2rem)); padding: var(--space-5); }
  .popover__title {
    margin-bottom: var(--space-2); padding-right: var(--space-6);
    font: var(--fw-semibold) var(--step-0)/1.3 var(--font-text); letter-spacing: var(--tracking-text); color: var(--color-heading);
  }
  .popover__text { font-size: var(--step--1); line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .popover__text + .popover__text { margin-top: var(--space-2); }
  .popover__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }
  .popover__close { position: absolute; top: .625rem; right: .625rem; }

  /* A list of short items (notifications, recent activity): inset hairlines */
  .popover__list { display: grid; margin: 0 calc(-1 * var(--space-2)); padding: 0; list-style: none; }
  .popover__list > li { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); padding: .625rem var(--space-2); font-size: var(--step--1); line-height: 1.45; color: var(--color-text); text-wrap: pretty; }
  .popover__list > li + li::before { content: ""; position: absolute; top: 0; right: var(--space-2); left: calc(var(--space-2) + 1rem + var(--space-3)); height: 1px; background: var(--color-border); }
  .popover__list b { font-weight: var(--fw-semibold); white-space: nowrap; }
  .popover__list > li > .icon { width: 1rem; height: 1rem; margin-top: .1875rem; color: var(--color-text-subtle); }
  .popover__list time, .popover__list small { display: block; margin-top: .125rem; font-size: .8125rem; color: var(--color-text-subtle); }
}

/* ---- css/components/menu.css ---- */
/* Atlas · Menu (a .menu[popover]; popover.js: arrow keys, Home/End;
   Tab or a choice closes it and focus goes back to the trigger)
   A macOS menu on the popover surface (popover.css): 36px rows (44 on
   touch), radius 8, 14px; 16px icons in the subtle grey. The row under the
   pointer or the keyboard turns primary with white text and icons; a
   danger row turns --color-danger-solid. Hairline separators inset 10px,
   12/600 group labels, a shortcut at the end of its row.
   Focus is never "outline: none + a background": the outline stays, in a
   transparent colour, so forced colours draw it (and base.css paints it
   Highlight). popover.js adds .is-keyboard while the arrows drive the menu,
   so a row under a resting pointer does not stay lit next to the focused one.

     <div class="menu" id="m1" popover role="menu" aria-label="…" data-align-end>
       <button class="menu__item" role="menuitem"><svg class="icon">…</svg> Descarcă PDF <kbd class="kbd">Ctrl D</kbd></button>
       <div class="menu__sep" role="separator"></div>
       <p class="menu__label">Atenție</p>
       <button class="menu__item menu__item--danger" role="menuitem">…</button>
     </div> */
@layer components {
  .menu { min-width: 13.5rem; max-width: min(20rem, calc(100vw - 1rem)); padding: 5px; }
  .menu__item {
    position: relative; display: flex; align-items: center; gap: .625rem; width: 100%; min-height: 2.25rem;
    padding: .375rem .625rem; border-radius: var(--radius-menu-item);
    font: var(--fw-regular) .875rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui);
    color: var(--color-text); text-align: left; text-decoration: none; text-wrap: pretty;
    outline: none;
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  }
  .menu__item .icon { width: 1rem; height: 1rem; color: var(--color-text-subtle); transition: color var(--dur-1) var(--ease-out); }
  /* The highlight: pointer (unless the keyboard is driving) or keyboard */
  .menu:not(.is-keyboard) .menu__item:hover, .menu__item:focus-visible {
    background: var(--color-primary); color: var(--color-on-primary); text-decoration: none;
  }
  /* Keyboard focus keeps a real outline, transparent: invisible on the blue
     row, drawn by forced colours (which drop the background) */
  .menu__item:focus-visible { outline: 2px solid transparent; outline-offset: -2px; }
  .menu:not(.is-keyboard) .menu__item:hover :is(.icon, .kbd, kbd), .menu__item:focus-visible :is(.icon, .kbd, kbd) { color: var(--color-on-primary); }
  .menu__item--danger, .menu__item--danger .icon { color: var(--color-danger-fg); }
  .menu:not(.is-keyboard) .menu__item--danger:hover, .menu__item--danger:focus-visible { background: var(--color-danger-solid); color: var(--color-on-primary); }
  .menu__item[aria-disabled="true"], .menu__item:disabled { opacity: .42; pointer-events: none; }
  /* The current choice of a group (theme, density): a check at the end */
  .menu__item[aria-checked="true"]::after {
    content: ""; flex: none; width: .375rem; height: .7rem; margin: -.15rem .2rem 0 auto;
    border: solid currentColor; border-width: 0 1.75px 1.75px 0; rotate: 45deg;
  }
  /* A shortcut sits at the end, as text (no keycap) */
  .menu__item :is(.kbd, kbd) {
    min-width: 0; height: auto; margin-left: auto; padding: 0 0 0 var(--space-4); border: 0; background: none; box-shadow: none;
    font: var(--fw-regular) .8125rem/1 var(--font-text); letter-spacing: .02em; color: var(--color-text-subtle);
  }
  .menu__label { padding: .5rem .625rem .25rem; font: var(--fw-semibold) .75rem/1.3 var(--font-text); letter-spacing: 0; color: var(--color-text-subtle); }
  .menu__sep { height: 1px; margin: 5px 10px; background: var(--color-border); }

  /* Disclosure chevron of the trigger (M20) */
  [popovertarget] .icon--chevron { transition: rotate var(--dur-3) var(--ease-spring); }
  [popovertarget][aria-expanded="true"] .icon--chevron { rotate: 180deg; }

  @media (pointer: coarse) {
    .menu__item { min-height: var(--target-min); }
  }
  /* Forced colours: the highlighted row is the system's selection */
  @media (forced-colors: active) {
    .menu__item:hover, .menu__item:focus-visible { forced-color-adjust: none; background: Highlight; color: HighlightText; }
    .menu__item:hover :is(.icon, .kbd, kbd), .menu__item:focus-visible :is(.icon, .kbd, kbd) { color: HighlightText; }
  }
}

/* ---- css/components/dialog.css ---- */
/* Atlas · Dialog, drawer, bottom sheet (native <dialog>; dialog.js opens/closes)
   An opaque sheet (--color-elevated, radius 28) that rises over a dimmed,
   lightly blurred page and sinks back when it closes. CSS only: the way in
   is @starting-style, the way out transitions display and overlay
   (allow-discrete), so the dialog stays in the top layer until it is gone.

   Motion API (spec §3.8, M12) — four variables, read by every variant:
     --dlg-from   where it comes from (translate)     dialog 0 26px
     --dlg-to     where it goes when it closes        dialog 0 18px
     --dlg-fade   its opacity at both ends            dialog 0 (fades)
     --dlg-scale  its scale at both ends              dialog .97
   A drawer slides from its edge (100% 0 / start: -100% 0, no fade, no
   scale); on phones a dialog is a bottom sheet (0 100%). Entrances take
   --dur-3 on the spring curve; exits take 240ms on --ease-exit (≈60%).
   Reduce Motion: everything is instant (base.css; the backdrop below).

     <dialog class="dialog" id="x" aria-labelledby="x-t">
       <div class="dialog__head"><h2 class="dialog__title" id="x-t">…</h2>
         <button class="icon-btn icon-btn--sm icon-btn--ghost" data-dialog-close aria-label="Închide">…</button></div>
       <div class="dialog__body">…</div>
       <div class="dialog__foot"><button class="btn btn--ghost" data-dialog-close>Renunță</button><button class="btn">…</button></div>
     </dialog>
   .dialog--danger   red title; the primary button of its foot turns red
   .dialog--drawer   a side panel of material (+ .dialog--start: from the start edge) */
@layer components {
  .dialog {
    --dlg-from: 0 26px; --dlg-to: 0 18px; --dlg-fade: 0; --dlg-scale: .97;
    --dlg-pad: var(--space-8);
    --dlg-scrim: var(--color-scrim);
    width: min(34rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem);
    margin: auto; padding: 0; border: 0; border-radius: var(--radius-xl);
    background: var(--color-elevated); color: var(--color-text);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border);
    overflow: auto; overscroll-behavior: contain;
    flex-direction: column;     /* the layout lives here, not in [open]: the exit keeps the shape the entrance had */
    transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--ease-spring), scale var(--dur-3) var(--ease-spring),
                overlay var(--dur-3) var(--ease-out) allow-discrete, display var(--dur-3) var(--ease-out) allow-discrete;
  }
  /* Open: a column, so a long body scrolls between a fixed head and foot */
  .dialog[open] { display: flex; }
  .dialog > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .dialog:not([open]) {
    opacity: var(--dlg-fade); translate: var(--dlg-to); scale: var(--dlg-scale);
    transition-duration: var(--dur-2); transition-timing-function: var(--ease-exit);
  }
  @starting-style { .dialog[open] { opacity: var(--dlg-fade); translate: var(--dlg-from); scale: var(--dlg-scale); } }

  /* The page behind dims and blurs (0 → .32 / 6px). The fallbacks keep it
     right in a browser where ::backdrop does not inherit custom properties. */
  .dialog::backdrop {
    background-color: var(--dlg-scrim, rgb(0 0 0 / .32));
    -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%);
    transition: background-color var(--dur-3, 420ms) var(--ease-out, ease-out), backdrop-filter var(--dur-3, 420ms) var(--ease-out, ease-out),
                -webkit-backdrop-filter var(--dur-3, 420ms) var(--ease-out, ease-out),
                overlay var(--dur-3, 420ms) allow-discrete, display var(--dur-3, 420ms) allow-discrete;
  }
  .dialog:not([open])::backdrop {
    background-color: transparent; -webkit-backdrop-filter: blur(0) saturate(100%); backdrop-filter: blur(0) saturate(100%);
    transition-duration: var(--dur-2, 240ms); transition-timing-function: var(--ease-exit, ease-in);
  }
  @starting-style {
    .dialog[open]::backdrop { background-color: transparent; -webkit-backdrop-filter: blur(0) saturate(100%); backdrop-filter: blur(0) saturate(100%); }
  }

  /* ---- Head, body, foot ----------------------------------------------------- */
  .dialog__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex: none;
    padding: var(--space-6) var(--dlg-pad) 0;
  }
  .dialog__head > .icon-btn { margin: -.375rem -.875rem 0 auto; }
  .dialog__title {
    min-width: 0; padding-top: .0625rem;
    font-size: var(--step-2); font-weight: var(--fw-semibold); line-height: var(--lh-head); letter-spacing: var(--tracking-tight);
    color: var(--color-heading);
  }
  .dialog__body {
    flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: var(--space-3) var(--dlg-pad) var(--space-6);
    font-size: 1rem; line-height: 1.55; letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
  }
  .dialog__body > * + * { margin-top: var(--space-4); }
  .dialog__head + .dialog__foot { margin-top: var(--space-6); }
  .dialog__foot {
    display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--space-3); flex: none;
    padding: var(--space-2) var(--space-6) var(--space-6);
  }

  /* ---- Danger: the title says it, the primary button does it ----------------- */
  .dialog--danger .dialog__title { color: var(--color-danger-fg); }
  .dialog--danger .dialog__foot .btn:not(.btn--secondary, .btn--ghost, .btn--accent) {
    --btn-bg: var(--color-danger-solid); --btn-fg: var(--color-on-primary);
    --btn-bg-hover: color-mix(in oklab, var(--color-danger-solid) 88%, var(--color-inverse));
  }

  /* ---- Drawer: a side panel of material that slides from its edge ----------- */
  .dialog--drawer {
    --dlg-from: 100% 0; --dlg-to: 100% 0; --dlg-fade: 1; --dlg-scale: 1; --dlg-pad: var(--space-6);
    width: min(26rem, calc(100vw - 2.5rem)); height: 100dvh; max-height: none;
    margin: 0 0 0 auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
  }
  /* From the start edge (the app's sidebar on narrow screens, G14) */
  .dialog--start { --dlg-from: -100% 0; --dlg-to: -100% 0; margin: 0 auto 0 0; border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
  .dialog--drawer .dialog__head { align-items: center; padding: var(--space-5) var(--space-5) var(--space-2) var(--dlg-pad); }
  .dialog--drawer .dialog__head > .icon-btn { margin: 0 -.25rem 0 auto; }
  .dialog--drawer .dialog__title { font-size: var(--step-1); letter-spacing: var(--tracking-text); }
  .dialog--drawer .dialog__body { flex: 1 1 auto; padding: var(--space-3) var(--dlg-pad) var(--space-6); color: var(--color-text); }
  .dialog--drawer .dialog__foot { padding: var(--space-4) var(--dlg-pad) var(--space-5); border-top: 1px solid var(--color-border); }
  .dialog--drawer .dialog__body > .sidebar { margin-inline: calc(-1 * var(--space-3)); }

  /* ---- Phones: the dialog is a bottom sheet ---------------------------------- */
  @media (max-width: 640px) {
    .dialog:not(.dialog--drawer, .palette) {
      --dlg-from: 0 100%; --dlg-to: 0 100%; --dlg-fade: 1; --dlg-scale: 1; --dlg-pad: var(--space-6);
      width: 100%; max-height: calc(100dvh - 2.5rem); margin: auto 0 0;
      padding-bottom: env(safe-area-inset-bottom);
      border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    /* The grabber: a sheet, not a window (36 × 5) */
    .dialog:not(.dialog--drawer, .palette)::before {
      content: ""; flex: none; align-self: center; width: 2.25rem; height: .3125rem; margin-top: .375rem;
      border-radius: var(--radius-pill); background: var(--color-fill-hover);
    }
    .dialog:not(.dialog--drawer, .palette) .dialog__head { padding-top: var(--space-4); }
    .dialog:not(.dialog--drawer, .palette) .dialog__foot { padding-inline: var(--dlg-pad); }
    .dialog:not(.dialog--drawer, .palette) .dialog__foot > .btn { flex: 1 1 auto; }
    /* Nothing scrolls under a sheet */
    :root:has(.dialog:modal) { overflow: hidden; }
  }

  /* Reduce Motion: the backdrop is a pseudo-element the base rule does not reach */
  @media (prefers-reduced-motion: reduce) {
    .dialog::backdrop { transition-duration: .01ms !important; transition-delay: 0ms !important; }
  }
  .a11y-motion .dialog::backdrop { transition-duration: .01ms !important; transition-delay: 0ms !important; }
  /* Reduce Transparency and forced colours: the page behind only dims (the
     sheet keeps its frame in forced colours, base.css) */
  @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
    .dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
}

/* ---- css/components/sidenav.css ---- */
/* Atlas · Sidenav
   A list of places in a side column (settings sections, an account): quiet
   rows, the current one a fill pill in the heading colour. With data-spy it
   follows the reading.
     <nav class="sidenav" aria-label="Setări">
       <div><p class="sidenav__label">Contul meu</p>
       <ul class="sidenav__list"><li><a class="sidenav__link" href="#profil" aria-current="true"><svg class="icon">…</svg> Profil</a></li>…</ul></div>
     </nav> */
@layer components {
  .sidenav { display: grid; gap: var(--space-5); font-size: var(--step--1); }
  .sidenav__label { margin-bottom: var(--space-2); padding-inline: .75rem; font: var(--fw-semibold) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .sidenav__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
  .sidenav__link {
    display: flex; align-items: center; gap: var(--space-3); min-height: 2.25rem; padding: .45rem .75rem; border-radius: var(--radius-sm);
    font-size: .9375rem; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  }
  .sidenav__link .icon { flex: none; width: 1.05rem; height: 1.05rem; transition: color var(--dur-1) var(--ease-out); }
  .sidenav__link .badge { margin-left: auto; }
  .sidenav__link:hover { background: var(--color-fill-subtle); color: var(--color-heading); text-decoration: none; }
  .sidenav__link[aria-current] { background: var(--color-fill); color: var(--color-heading); font-weight: var(--fw-semibold); }
  .sidenav__link[aria-current] .icon { color: var(--color-primary); }
  .sidenav__link:focus-visible { outline-offset: -2px; }
  @media (pointer: coarse) {
    .sidenav__link { min-height: var(--target-min); }
  }
  /* Forced colours: the fill pill is dropped; the current row is framed in Highlight */
  @media (forced-colors: active) {
    .sidenav__link[aria-current]:not([aria-current="false"]) { outline: 2px solid Highlight; outline-offset: -2px; }
    .sidenav__link[aria-current]:not([aria-current="false"]) .icon { color: Highlight; }
  }
}

/* ---- css/components/sidebar.css ---- */
/* Atlas · App shell and sidebar
   One markup, three looks. The look is chosen with data-shell on <html> (or
   <body>), or with a class on .app-shell; at 960px and below every look
   becomes the same phone layout (topbar + drawer).
     classic (default)    a full-width topbar (brand, search, user); the
                          sidebar is a floating panel under it
     window               data-shell="window" · .app-shell--window: a
                          full-height floating sidebar (brand, search, links,
                          user) and a translucent toolbar over the content
                          column only, like a macOS window
     flush                data-shell="flush" · .app-shell--flush: a
                          full-height grey column under a full-width topbar
   <div class="app-shell">
     <header class="topbar" data-site-header>…</header>                        (topbar.css)
     <nav class="sidebar" id="app-nav" aria-label="Meniu principal">
       <a class="sidebar__brand" href="…">.brand__emblem + .brand__text</a>     window
       <button class="sidebar__search" data-palette-open …>…</button>         window, flush
       <div class="sidebar__group"><p class="sidebar__label">Lucru</p>
         <a class="sidebar__link" href="…" aria-current="page"><span class="sidebar__icon"><svg class="icon">…</svg></span>
         <span class="sidebar__text">Panou</span><span class="sidebar__desc">Situația pe scurt</span></a>…</div>
       <div class="sidebar__foot"><button class="sidebar__hide" data-sidebar-toggle …>…</button>…</div>
       <button class="sidebar__user" popovertarget="user-menu" …>…</button>   window
     </nav>
     <main class="app-shell__main" id="continut">…</main>
   </div>
   [data-sidebar-toggle] hides the sidebar (shell.js): the column closes and
   the panel slides out (M21); .topbar__sidebar brings it back. Below 960px
   the same links open in dialog.dialog--drawer.dialog--start from
   .topbar__menu. .sidebar--compact (a narrow rail that widens on hover) is
   kept for compatibility only; the pages do not use it.
   Short windows (860px tall or less): the link descriptions and the version
   note give way and the groups close up, so the whole panel usually fits;
   when it still scrolls, the signed-in person (.sidebar__user, window look)
   stays pinned at its bottom, on a shelf of the panel's tone.
   The main column ends with breathing room (and the phone's home-indicator
   inset); a page that fills the screen (.page-fill, the map) keeps none.
   The saved state "sidebar hidden" may be applied before the first paint
   (atlas-early.js / the page's early script adds .is-collapsed.no-anim as
   the shell is parsed); shell.js then only syncs the toggles.
   Without JavaScript (scripting: none) the drawer cannot open: at 960px and
   below the sidebar stays in the page, above the content. */
/* The width of the sidebar column, registered so it can be animated: hiding
   the sidebar closes the column and slides the panel out with it. */
@property --shell-col { syntax: "<length>"; inherits: true; initial-value: 0px; }   /* the initial value must not use rem */

@layer components {
  /* ---- Shell: the grid ------------------------------------------------------
     Row 1 is the bar's height; the topbar spans both rows (so it can stick for
     the whole page) and the main column starts in row 2. */
  .app-shell {
    --shell-pad: var(--sidebar-inset);                           /* the panel's inset from the window: 10px */
    --shell-open: calc(var(--sidebar-w) + 2 * var(--shell-pad)); /* the column, open */
    --shell-col: var(--shell-open);                              /* the column now (animated) */
    display: grid; grid-template-columns: var(--shell-col) minmax(0, 1fr); grid-template-rows: var(--header-h) auto;
    align-items: start; min-height: 100dvh;
    transition: --shell-col 520ms var(--ease-spring);
  }
  .app-shell__main {
    --main-end: calc(clamp(2.5rem, 1.5rem + 3vw, 4.5rem) + env(safe-area-inset-bottom, 0px));
    grid-column: 2; grid-row: 2; min-width: 0; padding-bottom: var(--main-end);
  }
  .page-fill > .app-shell > .app-shell__main { --main-end: 0px; }
  .app-shell > .sidebar {
    grid-column: 1; grid-row: 2; align-self: start; position: sticky; z-index: var(--z-sidebar);
    top: calc(var(--header-h) + var(--shell-pad));
    width: var(--sidebar-w); height: calc(100dvh - var(--header-h) - 2 * var(--shell-pad)); max-height: none;
    margin: var(--shell-pad) 0 var(--shell-pad) var(--shell-pad); padding: var(--space-3);
    border-radius: var(--radius-lg); background: var(--material-sidebar);
    -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: 0 0 0 1px var(--color-border), var(--shadow-1);
    transform: translateX(calc(var(--shell-col) - var(--shell-open))); transition: visibility 0s;
  }
  /* [data-sidebar-toggle] hides it (remembered between pages): the column closes and the panel slides out */
  .app-shell.is-collapsed { --shell-col: 0px; }
  .app-shell.is-collapsed > .sidebar { visibility: hidden; transition: visibility 0s 520ms; }
  .app-shell.no-anim, .app-shell.no-anim > .sidebar { transition: none !important; }   /* beats the Reduce Motion rule too */
  /* a page that fills the screen (the map): the main row takes what is left */
  .page-fill > .app-shell { grid-template-rows: var(--header-h) minmax(0, 1fr); }
  /* B's markup (a sticky topbar before the shell, outside it) keeps working in the classic look */
  body > .topbar ~ .app-shell { grid-template-rows: 0 auto; min-height: calc(100dvh - var(--header-h)); }
  /* classic: brand, search and user live in the topbar */
  .app-shell > .sidebar > :is(.sidebar__brand, .sidebar__user, .sidebar__search) { display: none; }

  @media (min-width: 961px) {
    /* window: the panel runs the full height; the toolbar covers the content column only */
    :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar {
      grid-row: 1 / -1; top: var(--shell-pad); height: calc(100dvh - 2 * var(--shell-pad)); padding-top: var(--space-4); gap: var(--space-4);
    }
    :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar > .sidebar__brand { display: flex; }
    :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar > .sidebar__user {
      display: grid; position: sticky; bottom: 0; z-index: 1; container-type: scroll-state;
    }
    /* the shelf behind the person: the panel's tone, from its edges to the
       panel's bottom, so links scrolling under it never show through */
    :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar > .sidebar__user::after {
      content: ""; position: absolute; z-index: -1; inset: calc(-1 * var(--space-2)) calc(-1 * var(--space-3)) calc(-1 * var(--space-3));
      background: var(--color-surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); pointer-events: none;
      opacity: 0;
    }
    @container scroll-state(stuck: bottom) {
      :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar > .sidebar__user::after { opacity: 1; box-shadow: 0 -1px 0 var(--color-border); }
    }
    @supports not (container-type: scroll-state) {
      :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar > .sidebar__user::after { opacity: 1; }
    }
    :is([data-shell="window"] .app-shell, .app-shell--window, [data-shell="flush"] .app-shell, .app-shell--flush) > .sidebar > .sidebar__search { display: flex; }
    /* window, a page that fills the screen (the map): the content runs up to
       the top of the window under the toolbar, which floats over it on
       material (topbar.css); --fill-top says how much of it the bar covers */
    :is([data-shell="window"] .page-fill > .app-shell, .page-fill > .app-shell--window) > .app-shell__main { grid-row: 1 / -1; --fill-top: var(--header-h); }

    /* flush: a grey column, full height under the bar, edge to edge */
    :is([data-shell="flush"] .app-shell, .app-shell--flush) {
      --shell-pad: 0px;
      background: linear-gradient(90deg, var(--color-surface) var(--shell-col), transparent var(--shell-col));
    }
    :is([data-shell="flush"] .app-shell, .app-shell--flush) > .sidebar {
      top: var(--header-h); height: calc(100dvh - var(--header-h)); padding: var(--space-5) var(--space-3) var(--space-5) var(--space-4);
      border-radius: 0; background: var(--color-surface); -webkit-backdrop-filter: none; backdrop-filter: none;
      box-shadow: inset -1px 0 0 var(--color-border);
    }
  }
  /* a short window: the panel closes up so the whole of it usually fits */
  @media (min-width: 961px) and (max-height: 860px) {
    .app-shell > .sidebar :is(.sidebar__desc, .sidebar__note) { display: none; }
    .app-shell > .sidebar { gap: var(--space-3); }
    :is([data-shell="window"] .app-shell, .app-shell--window) > .sidebar { gap: var(--space-3); padding-top: var(--space-3); }
    .app-shell > .sidebar .sidebar__link { padding-block: .4rem; }
    .app-shell > .sidebar .sidebar__foot { gap: var(--space-1); padding-top: var(--space-2); }
  }
  @media (max-width: 960px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); background: none; }
    .app-shell > .sidebar { display: none; }
    .app-shell__main { grid-column: 1; }
  }
  /* No JavaScript: the drawer cannot open, so the links stay in the page */
  @media (scripting: none) and (max-width: 960px) {
    .app-shell > .sidebar {
      display: flex; grid-column: 1; grid-row: 2; position: static; width: auto; height: auto; max-height: none;
      margin: var(--space-2) var(--sidebar-inset) 0; transform: none; overflow: visible;
    }
    .app-shell__main { grid-row: 3; }
    .topbar__menu { display: none !important; }
  }

  /* ---- Sidebar -------------------------------------------------------------
     Standalone it is 16.5rem wide (G7); in the shell the look decides its
     surface. Groups of links; the current one is a raised row with a blue
     edge mark (the app's "you are here"). */
  /* standalone (outside the shell) it is a panel of its own: the surface,
     radius 20, a hairline ring and a whisper shadow */
  .sidebar {
    display: flex; flex-direction: column; gap: var(--space-5); width: 16.5rem; min-width: 0;
    padding: var(--space-5) var(--space-3) var(--space-5) var(--space-4); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border), var(--shadow-1);
  }
  .dialog .sidebar { width: auto; height: auto; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* The app's identity at the top of the panel (window) and in the drawer */
  .sidebar__brand {
    display: flex; flex: none; align-items: center; gap: .7rem; min-width: 0; padding: .15rem .4rem .35rem; border-radius: var(--radius-md);
    color: inherit; text-decoration: none;
  }
  .sidebar__brand:hover { color: inherit; text-decoration: none; }
  .sidebar__brand .brand__text { min-width: 0; }
  .sidebar__brand .brand__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* the app's name may take two lines (a long name, or text spacing set by
     the reader: WCAG 1.4.12); only the topbar keeps it to one */
  .sidebar__brand .brand__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .sidebar__brand .brand__title { font-size: 1rem; }

  /* The search trigger: a quiet pill that opens the command palette (the real
     field, with its 3:1 edge, lives in the palette). The topbar's is the same. */
  .sidebar__search, .topbar__search {
    display: flex; align-items: center; gap: .55rem; min-width: 0; min-height: 2.25rem; padding: 0 .4rem 0 .8rem;
    border: 0; border-radius: var(--radius-pill); background: var(--color-fill); color: var(--color-text-subtle-on-fill);
    font: var(--fw-regular) .9375rem/1.2 var(--font-text); letter-spacing: var(--tracking-ui); text-align: left; cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
  }
  .sidebar__search { flex: none; width: 100%; }
  :is(.sidebar__search, .topbar__search) > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :is(.sidebar__search, .topbar__search) > .icon { flex: none; width: 1rem; height: 1rem; }
  :is(.sidebar__search, .topbar__search) > .kbd {
    flex: none; min-width: 0; padding: .15rem .4rem; border: 0; border-radius: var(--radius-xs);
    background: var(--color-surface-raised); box-shadow: 0 0 0 .5px var(--color-border-strong), 0 1px 0 var(--color-border);
    font-size: var(--step--2); line-height: 1.2; color: var(--color-text-muted);
  }
  :is(.sidebar__search, .topbar__search):hover { background: var(--color-fill-hover); color: var(--color-heading); }
  :is(.sidebar__search, .topbar__search):active { transform: scale(var(--press-scale-tile)); }
  /* B's real field (label.sidebar__search > .input) still works */
  label.sidebar__search { position: relative; display: block; min-height: 0; padding: 0; background: none; cursor: auto; }
  label.sidebar__search:hover { background: none; }
  label.sidebar__search:active { transform: none; }
  label.sidebar__search .input { min-height: 2.375rem; padding-left: 2.3rem; border-radius: var(--radius-pill); font-size: .9375rem; }
  label.sidebar__search .icon { position: absolute; top: 50%; left: .85rem; z-index: 1; transform: translateY(-50%); color: var(--color-text-subtle); pointer-events: none; }

  .sidebar__group { display: grid; gap: 2px; }
  .sidebar__label { padding: 0 .65rem .3rem; font: var(--fw-semibold) .75rem/1.3 var(--font-text); letter-spacing: 0; color: var(--color-text-subtle); }
  .sidebar__link {
    position: relative; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; align-items: center; column-gap: .55rem;
    padding: .5rem .6rem .5rem .65rem; border-radius: var(--radius-sm); color: var(--color-text-muted); text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .sidebar__icon { display: grid; justify-items: center; gap: .25rem; grid-row: 1 / span 2; }
  .sidebar__icon .icon { width: 1.125rem; height: 1.125rem; color: var(--color-text-muted); transition: color var(--dur-2) var(--ease-out); }
  .sidebar__mini { display: none; }
  .sidebar__text { grid-column: 2; min-width: 0; font: var(--fw-medium) .9375rem/1.25 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-heading); }
  .sidebar__desc { grid-column: 2; min-width: 0; font-size: .75rem; line-height: 1.35; letter-spacing: 0; color: var(--color-text-subtle); }
  /* counts: a quiet pill at the end of the row */
  .sidebar__link .badge { grid-column: 3; grid-row: 1 / span 2; background: var(--color-fill); color: var(--color-text-muted); box-shadow: none; }
  .sidebar__link:hover { background: var(--color-fill); text-decoration: none; }
  .sidebar__link:active { transform: scale(var(--press-scale-tile)); }
  /* The current page: a raised row and a 3 × 20px blue mark at its start edge
     (on the dark materials the raised row is the elevated grey, so the
     description keeps its contrast) */
  .sidebar__link[aria-current] { background: var(--color-elevated); box-shadow: var(--shadow-thumb); }
  .sidebar__link[aria-current]::before {
    content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 1.25rem; margin-top: -.625rem;
    border-radius: 0 3px 3px 0; background: var(--color-primary);
  }
  .sidebar__link[aria-current] .sidebar__text { font-weight: var(--fw-semibold); }
  .sidebar__link[aria-current] .sidebar__icon .icon { color: var(--color-primary); }
  .sidebar__link:focus-visible { outline-offset: -2px; }

  /* Foot: a hairline, "Ascunde meniul", the help link, the version */
  .sidebar__foot { display: grid; justify-items: start; gap: var(--space-2); margin-top: auto; padding: var(--space-3) .65rem 0; border-top: 1px solid var(--color-border); }
  .sidebar__note { font-size: .75rem; line-height: 1.4; color: var(--color-text-subtle); }
  /* the foot's rows share one text column: 16px icons, an 8px gap */
  .sidebar__foot .link-arrow { gap: .5rem; font-size: .875rem; }
  .sidebar__foot .link-arrow .icon { width: 1rem; height: 1rem; }
  .sidebar__hide {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem; padding: .35rem .65rem; margin-left: -.65rem; border-radius: var(--radius-pill);
    font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-text-muted);
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  }
  .sidebar__hide:hover { background: var(--color-fill); color: var(--color-heading); }
  .sidebar__hide .icon { width: 1rem; height: 1rem; transform: rotate(90deg); transition: transform var(--dur-2) var(--ease-spring); }
  .sidebar__hide:hover .icon { transform: rotate(90deg) translateY(2px); }
  .dialog .sidebar__hide, .sidebar--compact .sidebar__hide { display: none; }

  /* The signed-in person at the bottom of the panel (window): opens the user
     menu (Profil, Temă, Ieșire) above it */
  .sidebar__user {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; flex: none;
    width: 100%; padding: .4rem .55rem .4rem .4rem; border-radius: var(--radius-md); color: var(--color-heading); text-align: left;
    transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .sidebar__user:hover, .sidebar__user[aria-expanded="true"] { background: var(--color-fill); }
  .sidebar__user:active { transform: scale(var(--press-scale-tile)); }
  .sidebar__user .avatar { --avatar: 2rem; }
  .sidebar__user-text { display: grid; min-width: 0; line-height: 1.25; }
  .sidebar__user-text b, .sidebar__user-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar__user-text b { font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); }
  .sidebar__user-text small { font-size: .75rem; letter-spacing: 0; color: var(--color-text-subtle); }
  .sidebar__user > .icon { width: .85rem; height: .85rem; color: var(--color-text-subtle); transform: rotate(180deg); transition: transform var(--dur-3) var(--ease-spring); }
  .sidebar__user[aria-expanded="true"] > .icon { transform: none; }

  /* ---- Compact (kept for compatibility; the pages do not use it) ---------- */
  .app-shell--compact { --sidebar-w: 5.25rem; }
  .sidebar--compact { width: 5.25rem; gap: .2rem; padding: var(--space-4) .55rem; overflow: hidden; transition: width var(--dur-3) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out); }
  .sidebar--compact:hover, .sidebar--compact:focus-within { width: 16rem; box-shadow: var(--shadow-3); }
  .sidebar--compact .sidebar__link { grid-template-columns: 4.15rem minmax(0, 1fr); min-height: 3.75rem; padding: 0; border-radius: var(--radius-md); }
  .sidebar--compact .sidebar__link .badge { position: absolute; top: .25rem; right: .5rem; }
  .sidebar--compact .sidebar__mini { display: block; font: var(--fw-semibold) .75rem/1 var(--font-text); letter-spacing: 0; color: var(--color-text-muted); }
  .sidebar--compact .sidebar__text, .sidebar--compact .sidebar__desc { min-width: 11rem; opacity: 0; transition: opacity var(--dur-1) var(--ease-out); }
  .sidebar--compact:hover .sidebar__text, .sidebar--compact:hover .sidebar__desc,
  .sidebar--compact:focus-within .sidebar__text, .sidebar--compact:focus-within .sidebar__desc { opacity: 1; }
  .sidebar--compact:hover .sidebar__mini, .sidebar--compact:focus-within .sidebar__mini { opacity: 0; }
  .sidebar--compact .sidebar__link[aria-current] .sidebar__mini { color: var(--color-heading); }
  .sidebar--compact .sidebar__foot { justify-items: center; margin-top: var(--space-4); padding-inline: 0; }
  .sidebar--compact:not(:hover):not(:focus-within) .sidebar__foot .seg { flex-direction: column; }
  .sidebar--compact:hover .sidebar__foot, .sidebar--compact:focus-within .sidebar__foot { justify-items: start; padding-inline: .55rem; }

  /* ---- The drawer (960px and below) -------------------------------------------
     dialog.dialog--drawer.dialog--start: dialog.css places it at the start
     edge and slides it in through --dlg-from (G14); here only what the
     sidebar needs inside it (the brand in its head, the links' rhythm). */
  .dialog--drawer .dialog__head .sidebar__brand { flex: 1 1 auto; padding: 0; }
  .dialog--drawer .sidebar { gap: var(--space-5); }

  @media (pointer: coarse) {
    .sidebar__link, .sidebar__hide, .sidebar__user, .sidebar__search, .topbar__search { min-height: var(--target-min); }
    :is(.sidebar__search, .topbar__search) > .kbd { display: none; }     /* no keyboard shortcut on a touch screen */
  }
  /* Forced colours: the raised row and its blue mark are a background and a
     shadow, which the system palette drops: frame the current row in
     Highlight and keep the edge mark */
  @media (forced-colors: active) {
    .app-shell > .sidebar { outline: 1px solid CanvasText; outline-offset: -1px; }
    :is([data-shell="flush"] .app-shell, .app-shell--flush) > .sidebar { outline: 0; border-right: 1px solid CanvasText; }
    .sidebar__link[aria-current]:not([aria-current="false"]) { outline: 2px solid Highlight; outline-offset: -2px; }
    .sidebar__link[aria-current]:not([aria-current="false"])::before { forced-color-adjust: none; background: Highlight; }
    .sidebar__link[aria-current]:not([aria-current="false"]) .sidebar__icon .icon { color: Highlight; }
  }
}

/* ---- css/components/rail.css ---- */
/* Atlas · Rail and section index — floating navigation on the left edge
   For pages with a static topbar: the section links float beside the content.
     .rail            a glass pill of icon links; the name shows on hover / focus;
                      on phones it becomes a floating dock at the bottom
     .section-index   one line per section (plus up / down arrows); hovering
                      reveals the names; on phones, a bottom bar with the
                      current section's name
   Both take [data-spy] (atlas.js marks the current link with aria-current and,
   over a [data-surface="dark"] block, sets data-over="dark"). Put .has-rail on
   <body> so .container keeps clear of the left edge; on phones the page's
   footer keeps room under its last line for the floating dock.
   On phones the section dots keep their names (the labels are hidden for
   the eye only) and are 24px targets; the 44px up / down steps beside them
   do the same job on touch. */
@layer components {
  .has-rail { --rail-space: 5.5rem; }
  @media (min-width: 761px) {
    .has-rail .container { width: min(100% - var(--rail-space) - var(--gutter), var(--container)); margin-left: max(var(--rail-space), calc((100% - var(--container)) / 2)); }
  }
  /* the dock floats over the end of the page: the footer (the rail pages end
     with one) keeps its plane under it, so no white band follows the grey */
  @media (max-width: 760px) { .has-rail .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); } }

  /* ---- Rail ---- */
  .rail {
    position: fixed; z-index: var(--z-header); left: var(--space-4); top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .4rem;
    border-radius: var(--radius-pill); background: var(--material-overlay);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: 0 0 0 .5px var(--color-border-strong), var(--shadow-2);
  }
  .rail__link {
    position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: var(--color-text-muted); text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
  }
  .rail__link .icon { width: 1.15rem; height: 1.15rem; }
  .rail__link:hover { background: var(--color-fill); color: var(--color-heading); }
  .rail__link:active { transform: scale(var(--press-scale-icon)); }
  .rail__link[aria-current] { background: var(--color-selected); color: var(--color-on-selected); }
  .rail__link[aria-current]::after { content: ""; position: absolute; right: -.4rem; top: 50%; width: 3px; height: 1.1rem; margin-top: -.55rem; border-radius: 3px 0 0 3px; background: var(--color-accent-figure); }
  .rail__tip {
    position: absolute; left: calc(100% + .9rem); top: 50%; padding: .35rem .65rem; border-radius: var(--radius-xs);
    background: var(--color-inverse-tile); color: var(--color-on-inverse); font: var(--fw-medium) .8125rem/1.2 var(--font-text); white-space: nowrap;
    box-shadow: var(--shadow-2);
    pointer-events: none; opacity: 0; transform: translate(-4px, -50%); transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
  }
  .rail__link:hover .rail__tip, .rail__link:focus-visible .rail__tip { opacity: 1; transform: translate(0, -50%); }
  .rail__sep { width: 1.4rem; height: 1px; margin: .3rem 0; background: var(--color-border-strong); }
  .rail__text { width: 2.6rem; height: 2.1rem; border-radius: var(--radius-pill); font: var(--fw-semibold) .75rem/1 var(--font-text); letter-spacing: .02em; color: var(--color-heading); }
  .rail__text:hover { background: var(--color-fill); }
  @media (pointer: coarse) { .rail__text { width: var(--target-min); height: var(--target-min); } }
  /* over a dark block (data-over, spy.js) the pill takes the dark material */
  .rail[data-over="dark"] { background: var(--color-inverse-tile); box-shadow: 0 0 0 .5px var(--color-inverse-border), var(--shadow-2); }
  .rail[data-over="dark"] .rail__link:not([aria-current]), .rail[data-over="dark"] .rail__text { color: var(--color-on-inverse-muted); }
  .rail[data-over="dark"] .rail__link:not([aria-current]):hover, .rail[data-over="dark"] .rail__text:hover { background: var(--glass-on-inverse-hover); color: var(--color-on-inverse); }
  .rail[data-over="dark"] .rail__sep { background: var(--color-inverse-border); }
  .rail[data-over="dark"] .rail__link[aria-current] { background: var(--color-on-inverse); color: var(--color-inverse); }
  @media (max-width: 760px) {
    .rail { left: 50%; top: auto; bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); flex-direction: row; }
    .rail__tip, .rail__link[aria-current]::after, .rail [data-rail-wide] { display: none; }
    .rail__sep { width: 1px; height: 1.4rem; margin: 0 .2rem; }
    .rail__link { width: 2.75rem; height: 2.75rem; }
  }

  /* ---- Section index ---- */
  .section-index {
    position: fixed; z-index: var(--z-header); left: var(--space-4); top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .6rem .55rem; border-radius: var(--radius-lg);
    color: var(--color-text-subtle); transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  .section-index[data-over="dark"]:not(:hover):not(:focus-within) { color: var(--color-on-inverse-muted); }
  .section-index:hover, .section-index:focus-within {
    background: var(--material-overlay); box-shadow: 0 0 0 .5px var(--color-border-strong), var(--shadow-2);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
  }
  .section-index__step { display: grid; place-items: center; width: 2rem; height: 2rem; margin-left: -.15rem; border-radius: 50%; color: inherit; }
  .section-index__step:hover { background: var(--color-fill); }
  .section-index__step .icon { width: 1rem; height: 1rem; }
  .section-index__step--next .icon { transform: rotate(180deg); }
  .section-index__list { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
  .section-index__link { display: flex; align-items: center; gap: .8rem; height: 1.85rem; padding: 0 .3rem; border-radius: var(--radius-xs); color: inherit; font: var(--fw-semibold) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small); text-decoration: none; }
  .section-index__dash { width: 1rem; height: 2px; border-radius: 2px; background: currentColor; transition: width var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
  .section-index__link[aria-current] { color: var(--color-heading); }
  .section-index__link[aria-current] .section-index__dash { width: 2.1rem; background: var(--color-accent-figure); }
  .section-index[data-over="dark"]:not(:hover):not(:focus-within) .section-index__link[aria-current] { color: var(--color-on-inverse); }
  .section-index__label { opacity: 0; transform: translateX(-4px); white-space: nowrap; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
  .section-index:hover .section-index__label, .section-index:focus-within .section-index__label { opacity: 1; transform: none; }
  .section-index__current { display: none; }
  @media (max-width: 760px) {
    .section-index {
      left: 50%; top: auto; bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
      flex-direction: row; align-items: center; padding: .35rem; border-radius: var(--radius-pill);
      background: var(--material-overlay); box-shadow: 0 0 0 .5px var(--color-border-strong), var(--shadow-2); color: var(--color-text-subtle);
      -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    }
    .section-index[data-over="dark"]:not(:hover):not(:focus-within) { color: var(--color-text-subtle); }
    .section-index[data-over="dark"]:not(:hover):not(:focus-within) .section-index__link[aria-current] { color: var(--color-heading); }
    .section-index__list { display: flex; gap: 0; }
    /* each dot is a 24px target (its name stays: the label is hidden for the eye only) */
    .section-index__link { position: relative; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0; gap: 0; }
    .section-index__dash { width: .35rem; height: .35rem; border-radius: 50%; }
    .section-index__link[aria-current] .section-index__dash { width: 1rem; border-radius: 3px; }
    .section-index__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 1; transform: none; }
    .section-index__current { display: block; min-width: 7.5rem; text-align: center; font: var(--fw-semibold) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-heading); }
    .section-index__step { width: 2.75rem; height: 2.75rem; }
  }
  /* touch, a row of dots: the hit area grows up and down only (spec §2.5) */
  @media (max-width: 760px) and (pointer: coarse) {
    .section-index__link::after { content: ""; position: absolute; inset: calc((1.5rem - var(--target-min)) / 2) 0; }
  }

  /* Forced colours: "you are here" is a background, which the system palette
     drops — the current rail link and dash are painted in Highlight, and the
     floating panels keep an edge */
  @media (forced-colors: active) {
    .rail { outline: 1px solid CanvasText; outline-offset: -1px; }
    @media (max-width: 760px) { .section-index { outline: 1px solid CanvasText; outline-offset: -1px; } }
    :is(.rail, .rail[data-over]) .rail__link[aria-current] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
    :is(.rail, .rail[data-over]) .rail__link[aria-current]::after { forced-color-adjust: none; background: Highlight; }
    .section-index__link[aria-current] .section-index__dash { forced-color-adjust: none; background: Highlight; }
  }
}

/* ---- css/components/steps.css ---- */
/* Atlas · Steps
   .steps          a tracker: 36px dots on a hairline. Done = blue with a tick,
                   current (aria-current="step") = white with a blue ring and a
                   soft halo, future = a ringed disc. Vertical at 640px and below.
     <ol class="steps" aria-label="Procedura de avizare">
       <li class="steps__item is-done"><span class="steps__title">Depunere</span><span class="steps__text">12 martie</span></li>
       <li class="steps__item" aria-current="step">…</li><li class="steps__item">…</li>
     </ol>
   .steps--tiles   "how it works": the same list as tiles with large numerals
                   (explicit; no states are read from the markup). Four in a
                   row while the row is 52rem or wider, two by two below it,
                   one column under 30rem: never three and an orphan.
     <ol class="steps steps--tiles"><li class="steps__item"><span class="steps__title">Intri în cont</span><span class="steps__text">…</span></li>…</ol> */
@layer components {
  .steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0; list-style: none; counter-reset: step; }
  .steps__item { position: relative; display: grid; justify-items: center; align-content: start; gap: var(--space-2); padding: 0 var(--space-2); text-align: center; counter-increment: step; }
  .steps__item::before {
    content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: var(--space-1); border-radius: 50%;
    background: var(--color-tile); font: var(--fw-semibold) .875rem/1 var(--font-text); color: var(--color-text-muted); font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px var(--color-border-strong), 0 0 0 5px var(--color-plane, var(--color-bg));
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  }
  .steps__item + .steps__item::after { content: ""; position: absolute; top: 1.125rem; right: 50%; width: 100%; height: 1px; background: var(--color-border-strong); }
  .steps__title { font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-ui); color: var(--color-heading); text-wrap: balance; }
  .steps__text { font-size: var(--step--1); line-height: 1.45; color: var(--color-text-muted); }
  .steps__item.is-done::before { content: "✓"; background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 0 0 5px var(--color-plane, var(--color-bg)); }
  .steps__item.is-done + .steps__item::after { height: 2px; margin-top: -.5px; background: var(--color-primary); }
  /* current: the ring is the primary blue (an edge, 3:1 is enough); the
     numeral is text, so it takes the link blue (4.5:1 or better: 5.57 light,
     5.64 dark on the disc) */
  .steps__item[aria-current="step"]::before {
    background: var(--color-surface-raised); color: var(--color-link);
    box-shadow: inset 0 0 0 2px var(--color-primary), 0 0 0 9px var(--color-accent-soft), 0 0 0 9px var(--color-plane, var(--color-bg));
  }

  /* ---- "How it works": tiles with large numerals ------------------------------ */
  .steps--tiles {
    --steps-min: clamp((100% - 3 * var(--tile-gap)) / 4 - .5px, (52rem - 100%) * 999,
                       clamp((100% - var(--tile-gap)) / 2 - .5px, (30rem - 100%) * 999, 100%));
    grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(var(--steps-min), 1fr)); gap: var(--tile-gap);
  }
  .steps--tiles .steps__item {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-height: 14.5rem; padding: var(--card-pad); text-align: left;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .steps--tiles .steps__item::before {
    display: block; width: auto; height: auto; margin: 0 0 var(--space-10); padding: 0; border-radius: 0; background: none; box-shadow: none;
    font: var(--fw-display) clamp(2.75rem, 2rem + 2vw, 3.75rem)/1 var(--font-display); letter-spacing: -.04em; color: var(--color-accent-figure);
  }
  .steps--tiles .steps__item + .steps__item::after { display: none; }
  .steps--tiles .steps__title { font-size: var(--step-1); letter-spacing: var(--tracking-text); }
  .steps--tiles .steps__text { font-size: .9375rem; }

  @media (max-width: 640px) {
    .steps:not(.steps--tiles) { grid-auto-flow: row; }
    .steps:not(.steps--tiles) .steps__item { grid-template-columns: 2.25rem minmax(0, 1fr); justify-items: start; column-gap: var(--space-3); row-gap: .15rem; padding: 0 0 var(--space-5); text-align: left; }
    .steps:not(.steps--tiles) .steps__item::before { grid-row: 1 / span 2; align-self: start; margin: 0; }
    .steps:not(.steps--tiles) :is(.steps__title, .steps__text) { grid-column: 2; }
    .steps:not(.steps--tiles) .steps__title { padding-top: .45rem; }
    /* the line runs down from each dot to the next one */
    .steps:not(.steps--tiles) .steps__item::after { content: none; }
    .steps:not(.steps--tiles) .steps__item:not(:last-child)::after {
      content: ""; position: absolute; top: 2.25rem; bottom: 0; left: calc(1.125rem - .5px); right: auto; width: 1px; height: auto; margin: 0; background: var(--color-border-strong);
    }
    .steps:not(.steps--tiles) .steps__item.is-done:not(:last-child)::after { left: calc(1.125rem - 1px); width: 2px; background: var(--color-primary); }
    .steps--tiles .steps__item { min-height: 0; }
    .steps--tiles .steps__item::before { margin-bottom: var(--space-5); }
  }

  /* Forced colours: the dots and the line are backgrounds and shadows, which
     the system palette drops. Dots get a CanvasText ring, the line is drawn
     in CanvasText; done = a Highlight disc, current = a Highlight ring with
     a second ring around it. */
  @media (forced-colors: active) {
    .steps:not(.steps--tiles) .steps__item::before { border: 2px solid CanvasText; box-shadow: none; }
    .steps:not(.steps--tiles) .steps__item::after { forced-color-adjust: none; background: CanvasText; }
    .steps:not(.steps--tiles) .steps__item.is-done::before { forced-color-adjust: none; border-color: Highlight; background: Highlight; color: HighlightText; }
    @media (min-width: 641px) { .steps:not(.steps--tiles) .steps__item.is-done + .steps__item::after { background: Highlight; } }
    @media (max-width: 640px) { .steps:not(.steps--tiles) .steps__item.is-done:not(:last-child)::after { background: Highlight; } }
    .steps:not(.steps--tiles) .steps__item[aria-current="step"]::before {
      forced-color-adjust: none; border: 3px solid Highlight; background: Canvas; color: Highlight;
      outline: 2px solid Highlight; outline-offset: 3px;
    }
  }
}

/* ---- css/components/accordion.css ---- */
/* Atlas · Accordion — the FAQ (spec §3.9, M19)
   Questions on hairlines; a plus in a soft disc turns into a cross as the
   answer opens (135°, spring) and turns back the moment closing starts.
   The height opens on the spring curve (accordion.js); without JS, or with
   Reduce Motion, native <details> simply toggles.
     <div class="accordion" data-single>                 data-single: one open at a time
       <details><summary>Am nevoie de cont?</summary>
         <div class="accordion__body"><p>…</p></div></details>
     </div> */
@layer components {
  .accordion { border-top: 1px solid var(--color-border-strong); }
  .accordion > details { border-bottom: 1px solid var(--color-border-strong); }
  .accordion summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
    min-height: var(--target-min); padding: var(--space-6) 0; cursor: pointer; list-style: none;
    font: var(--fw-semibold) var(--step-1)/1.3 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading);
    text-wrap: balance; transition: color var(--dur-2) var(--ease-out);
  }
  .accordion summary::-webkit-details-marker { display: none; }
  .accordion summary::after {
    content: ""; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background:
      linear-gradient(currentColor, currentColor) center / .75rem 1.6px no-repeat,
      linear-gradient(currentColor, currentColor) center / 1.6px .75rem no-repeat,
      var(--color-fill);
    transition: transform var(--dur-3) var(--ease-spring), background-color var(--dur-2) var(--ease-out);
  }
  .accordion summary:hover { color: var(--color-link); }
  .accordion summary:hover::after { background-color: var(--color-fill-hover); color: var(--color-heading); }
  .accordion details[open] > summary::after { transform: rotate(135deg); }
  .accordion details.is-closing > summary::after { transform: rotate(0deg); }   /* turns back as soon as closing starts */
  .accordion summary:focus-visible { outline-offset: 4px; border-radius: var(--radius-xs); }
  .accordion__body {
    padding-bottom: var(--space-6); max-width: 64ch;
    font-size: var(--step-0); line-height: 1.55; color: var(--color-text-muted);
  }
  .accordion__body > * + * { margin-top: var(--space-3); }
  .accordion__body a { color: var(--color-link); }
  @media print {
    .accordion summary::after { display: none; }
  }
}

/* ---- css/components/card.css ---- */
/* Atlas · Card (spec §3.3)
   A tile: background var(--color-tile), radius var(--radius-tile),
   box-shadow var(--tile-ring), var(--tile-shadow) — tone only on the portal
   (#F5F5F7 on white, white on an alternate plane), white with a hairline
   ring and a whisper shadow in the app.
     <article class="card">
       <img class="card__media" src="…" alt="">                 optional, 16:9
       <div class="card__body">
         <p class="card__eyebrow">Urbanism · 12 mai</p>
         <h3 class="card__title">…</h3>
         <p class="card__text">…</p>
       </div>
       <div class="card__foot">…</div>                           optional
     </article>
   A linked card is an <a class="card">: it lifts 2px under the pointer
   (the soft lift on the portal, --shadow-2 with the ring in the app), its
   title underlines (the link affordance) and it presses to .985.
   .card--flat       no fill, a hairline ring (a quiet card on any plane)
   .card--elevated   raised, with a real shadow (floats over a busy plane)
   .card--horizontal media on the start side (stacks on phones)
   The body grows to the card's height; a .progress-row that closes it sits
   at its bottom, so the bars of a row of cards line up whatever wraps above
   them (cererile-mele). An image waits on the grey fill while it loads (a
   .cover keeps its own dark art). The lift and underline happen only where
   a pointer can hover (hover: hover). */
@layer components {
  .card {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    color: inherit;
  }
  .card__media { aspect-ratio: 16 / 9; max-width: 100%; object-fit: cover; }
  :where(img, picture, video, iframe).card__media { display: block; width: 100%; background: var(--color-fill); }
  .card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--card-pad); }
  .card > .card__body { flex: 1 1 auto; }
  .card__body > .progress-row:last-child { margin-top: auto; }
  .card__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .card__title { font: var(--fw-semibold) var(--step-tile-title)/1.22 var(--font-display); letter-spacing: var(--tracking-tile-title); color: var(--color-heading); text-wrap: balance; }
  .card__text { font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-wrap: pretty; }
  .card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding: 0 var(--card-pad) var(--card-pad); }
  .card--flat { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
  .card--elevated { background: var(--color-surface-raised); box-shadow: var(--shadow-2); }

  /* Linked card: lift, underline, press (M1, M2) */
  a.card {
    text-decoration: none;
    transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-spring);
  }
  a.card:hover { color: inherit; text-decoration: none; }
  @media (hover: hover) {
    a.card:hover { background: var(--color-tile-hover); box-shadow: var(--tile-ring), var(--tile-shadow-hover); transform: translateY(var(--lift)); }
    a.card--flat:hover { background: var(--color-tile); box-shadow: inset 0 0 0 1px var(--color-border); }
    a.card--elevated:hover { background: var(--color-surface-raised); box-shadow: var(--shadow-3); }
    a.card:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
    .card:has(.card__link:hover) { background: var(--color-tile-hover); box-shadow: var(--tile-ring), var(--tile-shadow-hover); transform: translateY(var(--lift)); }
  }
  a.card:active { transform: scale(var(--press-scale-tile)); box-shadow: var(--tile-ring), var(--tile-shadow); transition-duration: var(--dur-1); }
  a.card:focus-visible { outline-offset: 3px; }


  /* A card whose title is the link (an article with other controls in it):
     the title link reads in the heading colour, never as an underlined
     accent link. Give it .card__link and the whole tile becomes its target
     (a stretched link) with the linked card's lift, underline, press and
     focus ring; the card's own buttons and links stay pressable above it.
       <article class="card"><div class="card__body">
         <h3 class="card__title"><a class="card__link" href="…">Str. Morilor nr. 12</a></h3> …</div>
         <div class="card__foot"><a class="btn btn--secondary btn--sm" href="…">Descarcă</a></div></article> */
  .card { position: relative; }
  .card__title a { color: inherit; text-decoration: none; }
  .card__title a:hover { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  .card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
  article.card :is(a[href], button, input, select, textarea, summary, label):not(.card__link) { position: relative; z-index: 2; }
  article.card { transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-spring); }
  .card:has(.card__link:active) { transform: scale(var(--press-scale-tile)); box-shadow: var(--tile-ring), var(--tile-shadow); transition-duration: var(--dur-1); }
  .card__link:focus-visible { outline: none; }
  .card:has(.card__link:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }

  .card--horizontal { flex-direction: row; }
  .card--horizontal .card__media { width: 38%; aspect-ratio: auto; }
  @media (max-width: 640px) {
    .card--horizontal { flex-direction: column; }
    .card--horizontal .card__media { width: 100%; aspect-ratio: 16 / 9; }
  }
}

/* ---- css/components/carousel.css ---- */
/* Atlas · Carousel
   Native horizontal scrolling with snap points, so touch, trackpad and
   keyboard scrolling work without script; atlas.js adds previous / next,
   page dots (or a progress bar), ← → Home End on the viewport, and an
   optional autoplay (data-autoplay="6000": paused on hover, on focus, off
   screen and in a background tab, with a pause button; never under Reduce
   Motion).
     <section class="carousel carousel--3" data-carousel aria-label="Noutăți">
       <div class="carousel__viewport" tabindex="0">
         <ul class="carousel__track" role="list"><li class="carousel__slide">…</li>…</ul>
       </div>
       <div class="carousel__controls">
         <div class="carousel__dots"></div>                     or <div class="carousel__progress" aria-hidden="true"></div>
         <div class="carousel__nav">
           <button type="button" class="icon-btn carousel__prev" data-carousel-prev aria-label="Anterior"><svg class="icon" …#i-arrow/></button>
           <button type="button" class="icon-btn" data-carousel-next aria-label="Următorul"><svg class="icon" …#i-arrow/></button>
         </div>
       </div>
     </section>
   Slides per view: default 1, .carousel--2, .carousel--3 (two under 900px,
   one under 640px, where the next slide peeks in). .carousel--peek always
   shows the edge of the next slide. Slides stretch to the tallest one.
   The viewport bleeds --carousel-bleed (16px) past the column on each side
   so a lifted tile and its shadow are never clipped; set it to 0 where
   there is no room. Markup and options: docs/index.html. */
@layer components {
  .carousel {
    --per: 1; --peek: 1; --gap: var(--tile-gap); --carousel-bleed: var(--space-4);
    display: grid; gap: var(--space-5); min-width: 0;
  }
  .carousel--2 { --per: 2; }
  .carousel--3 { --per: 3; }
  .carousel--peek { --peek: .86; }
  @media (max-width: 900px) { .carousel--3 { --per: 2; } }
  @media (max-width: 640px) { .carousel--2, .carousel--3 { --per: 1; --peek: .86; } }

  .carousel__viewport {
    position: relative;
    margin: calc(-1 * var(--space-5)) calc(-1 * var(--carousel-bleed));
    padding: var(--space-5) var(--carousel-bleed);
    scroll-padding-inline: var(--carousel-bleed);
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  }
  .carousel__viewport::-webkit-scrollbar { display: none; }
  .carousel__viewport:focus-visible { outline-offset: -4px; border-radius: calc(var(--radius-tile) + var(--carousel-bleed)); }
  .carousel__track { position: relative; display: flex; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
  /* The last slide stops at the column's edge, not at the bleed's */
  .carousel__track::after { content: ""; flex: none; width: 1px; margin-inline-start: calc(var(--carousel-bleed) - var(--gap) - 1px); }
  .carousel__slide {
    display: grid; flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per) * var(--peek));
    min-width: 0; scroll-snap-align: start;
  }

  /* ---- Controls: page dots (or progress) on the start side, buttons on the end */
  .carousel__controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--icon-btn); }
  .carousel__dots { display: flex; flex-wrap: wrap; align-items: center; margin-inline-start: -.5rem; }
  .carousel__dot { position: relative; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; }
  .carousel__dot::before {
    content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--color-control-border);
    transition: background-color var(--dur-2) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  .carousel__dot:hover::before { background: var(--color-text-muted); }
  .carousel__dot[aria-current="true"]::before { background: var(--color-selected); scale: 1.25; }
  .carousel__dot:focus-visible { outline-offset: 0; border-radius: 50%; }
  @media (pointer: coarse) { .carousel__dot { width: 2rem; height: var(--target-min); } }
  /* Forced colours: the dots are fills, which the palette drops: rings, the
     current one filled in Highlight */
  @media (forced-colors: active) {
    .carousel__dot { outline: 0; }
    .carousel__dot::before { forced-color-adjust: none; background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
    .carousel__dot[aria-current="true"]::before { background: Highlight; box-shadow: none; }
  }

  /* Progress: a thin track; the thumb is as wide as the part in view and
     moves with the scroll (atlas.js sets --carousel-f and --carousel-p). */
  .carousel__progress { position: relative; flex: 1; max-width: 12rem; height: 3px; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-fill-hover); }
  .carousel__progress::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--carousel-f, 1) * 100%);
    border-radius: inherit; background: var(--color-selected);
    translate: calc(var(--carousel-p, 0) * (1 / var(--carousel-f, 1) - 1) * 100%) 0;
  }

  /* Previous / next: icon buttons with a chevron (the arrow icon of the
     markup is replaced, as on every non-flow control: spec §3.1) */
  .carousel__nav { display: flex; align-items: center; gap: var(--space-2); }
  .carousel__nav :is([data-carousel-prev], [data-carousel-next]) > .icon { display: none; }
  .carousel__nav :is([data-carousel-prev], [data-carousel-next])::before {
    content: ""; width: .5rem; height: .5rem; border: solid currentColor; border-width: 1.75px 1.75px 0 0; border-radius: 1px;
    rotate: 45deg; translate: -.09rem 0;
  }
  .carousel__nav [data-carousel-prev]::before { rotate: -135deg; translate: .09rem 0; }
  /* At an end the button is aria-disabled (it keeps the focus where the user
     left it): button.css fades its fill and chevron, the focus ring stays whole */
  .carousel__nav .icon-btn[aria-disabled="true"]:active { scale: 1; }
  .carousel__prev .icon { rotate: 180deg; }
  .carousel__count { font-size: .8125rem; font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }

  /* ---- A full-width visual slide: image or generated cover, caption over it */
  .slide-visual {
    position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: var(--space-2);
    min-height: clamp(18rem, 34vw, 28rem); padding: var(--card-pad); overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-inverse); color: var(--color-on-inverse);
  }
  .slide-visual > img, .slide-visual > .cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
  .slide-visual::after {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, transparent 35%, color-mix(in oklab, var(--color-inverse) 80%, transparent) 100%);
    box-shadow: inset 0 0 0 1px var(--color-inverse-border);
  }
  .slide-visual > .tag { margin-bottom: var(--space-1); }
  .slide-visual__title { max-width: 24ch; font-size: var(--step-3); line-height: var(--lh-title); letter-spacing: var(--tracking-tight); color: var(--color-on-inverse); }
  .slide-visual__text { max-width: 52ch; font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-on-inverse-muted); }
  @media (forced-colors: active) { .slide-visual { outline: 1px solid CanvasText; outline-offset: -1px; } }
}

/* ---- css/components/stat.css ---- */
/* Atlas · Stat
   Figures in three explicit forms (no form is guessed from the page):
     .stats             separate tiles (portal): a 14px label on top, a 36→48px
                        figure, the change in a delta pill at the bottom
     .stats--joined     one tile, the figures split by hairlines (the app's
                        dashboard and registers): 30→42px; in a container of
                        34rem or less two columns, an odd last figure spans the row
     .stats--band       inside <section class="section section--band"
                        data-scheme="dark"> (layout.css paints the band): no
                        tiles, 44→76px white figures over a 17px caption,
                        hairlines between; 2 × 2 at 720px or less. motion.js
                        counts [data-count] figures up on arrival (M9)
     <div class="stats stats--joined">
       <div class="stat"><span class="stat__label">Dosare în lucru</span>
         <span class="stat__value">48</span>
         <span class="stat__delta stat__delta--up"><svg class="icon">…i-up…</svg> 6 față de luna trecută</span></div>
     </div>
   Delta pill: --up / --down set the arrow (alone: up = success tint, down =
   danger tint); --good / --bad / --neutral set the tint whatever the arrow;
   no modifier = neutral fill; on phones, and in a figure narrower than
   9rem, it becomes coloured text.
   .stat__unit after the number ("18 zile") is smaller and muted.
   A figure stands alone, so it keeps Inter's proportional figures (tabular
   ones would space "121" like "000": the dataviz stat-tile rule); the band's
   figures stay tabular, as they count up (M9) and must not wobble.
   A .stat on its own (outside .stats) keeps at least 12rem: it is a size
   container, so it would otherwise collapse when placed shrink-to-fit. */
@layer components {
  /* ---- Tiles (default) ---------------------------------------------------- */
  /* Up to four tiles in a row while the row is 52rem or wider, two by two
     below it, one column under 20rem: never three and an orphan. The
     smallest track is a quarter (≥ 52rem), a half (≥ 20rem) or the whole
     row, picked by clamp() on the row's own width. In two columns an odd
     last tile spans the row (the row is a container for that). */
  .stats {
    --stats-gap: var(--tile-gap);
    --stats-min: clamp((100% - 3 * var(--stats-gap)) / 4 - .5px, (52rem - 100%) * 999,
                       clamp((100% - var(--stats-gap)) / 2 - .5px, (20rem - 100%) * 999, 100%));
    container: stats / inline-size;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--stats-min), 1fr)); gap: var(--stats-gap);
  }
  @container stats (20rem <= width < 52rem) {
    .stats:not(.stats--band) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }
  .stat {
    container-type: inline-size;
    display: flex; flex-direction: column; min-width: min(100%, 12rem); padding: var(--card-pad);
    border-radius: var(--radius-lg); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .stats > .stat { min-width: 0; }
  .stat__label { order: -1; font-size: var(--step--1); font-weight: var(--fw-medium); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-wrap: balance; }
  .stat__value {
    margin-block: var(--space-2) var(--space-3);
    font: var(--fw-display) var(--stat-value, clamp(2.25rem, 1.7rem + 1.6vw, 3rem))/1.04 var(--font-display);
    letter-spacing: var(--stat-tracking, -.035em); color: var(--color-heading); font-variant-numeric: proportional-nums lining-nums;
  }
  .stat__unit { margin-left: .18em; font-size: .42em; font-weight: var(--fw-semibold); letter-spacing: -.01em; color: var(--color-text-muted); }

  /* The change: a pill (C's delta), tinted by its sense */
  .stat__delta {
    align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem; margin-top: auto;
    padding: .2rem .55rem .2rem .45rem; border-radius: var(--radius-pill);
    background: var(--color-fill); color: var(--color-text-muted);
    font-size: .78125rem; font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-small); font-variant-numeric: tabular-nums;
  }
  .stat__delta .icon { flex: none; width: .875rem; height: .875rem; stroke-width: 2.2; }
  /* Direction and meaning are separate: --up / --down choose the arrow (and,
     alone, keep their old meaning: up is good, down is bad); --good / --bad /
     --neutral choose the tint, so "1 more overdue" is red with an up arrow:
       <span class="stat__delta stat__delta--up stat__delta--bad">…i-up… 1 mai mult ca ieri</span> */
  .stat__delta--up { background: var(--color-success-bg); color: var(--color-success-fg); }
  .stat__delta--down { background: var(--color-danger-bg); color: var(--color-danger-fg); }
  .stat__delta--down .icon { transform: rotate(180deg); }
  .stat__delta--good { background: var(--color-success-bg); color: var(--color-success-fg); }
  .stat__delta--bad { background: var(--color-danger-bg); color: var(--color-danger-fg); }
  .stat__delta--neutral { background: var(--color-fill); color: var(--color-text-muted); }
  /* on phones, and in a tile too narrow for the pill (it would wrap into a
     lozenge), the change is coloured text */
  @media (max-width: 640px) {
    .stat__delta { align-items: flex-start; padding: 0; background: none; }
    .stat__delta .icon { margin-top: .1em; }
  }
  @container (max-width: 9rem) {
    .stat__delta { align-items: flex-start; padding: 0; background: none; }
    .stat__delta .icon { margin-top: .1em; }
  }

  /* ---- Joined: one tile, figures split by hairlines (G20) ----------------- */
  /* One row while the tile is wider than 34rem, two columns at 34rem or
     less, and an odd last figure spans its row: the figures are flex items
     whose basis is 0 above 34rem and half the row below it (no query on the
     tile itself, so it works in any column). Each figure draws a hairline
     on its start and top edges outside itself; the tile clips the ones on
     its outer edge, so lines fall only between figures. */
  .stats--joined {
    --stat-value: clamp(1.875rem, 1.45rem + 1.2vw, 2.625rem); --stat-tracking: -.03em;
    display: flex; flex-wrap: wrap; gap: 0;
    overflow: hidden; border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .stats--joined > .stat {
    flex: 1 1 min(max(0px, (34rem - 100%) * 999), calc(50% - 1px));
    padding: var(--space-4) var(--space-6) var(--space-5); border-radius: 0; background: none;
    box-shadow: -1px 0 0 var(--color-border), 0 -1px 0 var(--color-border);
  }
  .stats--joined .stat__value { margin-block: var(--space-1) var(--space-3); }
  @media (max-width: 640px) {
    .stats--joined > .stat { padding: var(--space-4) var(--space-5) var(--space-5); }
  }
  /* one row of narrow figures (34–52rem): a label may wrap; every label keeps
     two lines of room, so the figures of the row share one baseline; the
     sides close up to 16px, so a change keeps one line ("2 zile mai repede"
     in a 154px figure, the narrowest beside the sidebar) */
  @container stats (34rem < width < 52rem) {
    .stats--joined .stat__label { min-height: calc(2 * 1.35em); }
    .stats--joined > .stat { padding-inline: var(--space-4); }
  }

  /* ---- Band: the figures of a dark section (no tiles) --------------------- */
  /* The band itself is layout.css's .section--band (data-scheme="dark"):
     its scheme gives the on-inverse text and hairline colours here. */
  .stats--band { --band-pad: clamp(1rem, .5rem + 1.5vw, 2.25rem); --stats-min: min(100%, 10rem); gap: var(--space-8) 0; margin-inline: calc(-1 * var(--band-pad)); }
  .stats--band > .stat { padding: var(--space-2) var(--band-pad); border-radius: 0; background: none; box-shadow: none; }
  .stats--band > .stat + .stat { box-shadow: -1px 0 0 var(--color-inverse-border); }
  .stats--band .stat__label { order: 1; max-width: 22ch; margin-top: var(--space-3); font-size: 1.0625rem; font-weight: var(--fw-regular); line-height: 1.4; letter-spacing: var(--tracking-text); color: var(--color-on-inverse-muted); }
  /* the figure follows its own cell (each .stat is a size container), not
     the window: 44px in a 721–768px row of four, 76px at 1440 (44 → 76) */
  .stats--band .stat__value {
    margin: 0; font-size: clamp(2.75rem, 30cqi, 4.75rem); line-height: 1.02; letter-spacing: -.045em; color: var(--color-on-inverse);
    font-variant-numeric: tabular-nums lining-nums;
  }
  .stats--band .stat__unit { color: var(--color-on-inverse-muted); }
  .stats--band .stat__delta { order: 2; margin-top: var(--space-3); }
  @media (max-width: 720px) {
    .stats--band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats--band > .stat:nth-child(odd) { box-shadow: none; }
  }
  @media (forced-colors: active) {
    .stats--joined > .stat { outline: 1px solid GrayText; outline-offset: -1px; }
    .stat__delta { outline: 1px solid CanvasText; outline-offset: -1px; }
  }
}

/* ---- css/components/table.css ---- */
/* Atlas · Table
   A .table inside a .table-wrap: the frame is a tile (portal: tone; app:
   white with a hairline ring and a whisper shadow), radius 20, and it
   scrolls sideways when the table is wider than the page. Markup and every
   option: docs/index.html, section "Tabele"; lab/s6-data.html.
     Frame     .table-wrap  --flush (no frame)  --scroll (fixed height, --table-height)
     Table     --zebra  --compact  --relaxed  --bordered  --top  --fixed  --static (no hover)
               --sticky-head (a material head row)  --sticky-col  --numbered
               --stack (rows become cards in a frame of 40rem or less)
     Types     --heat (matrix coloured by value)  --compare  --spec  --tree  --form
     Cells     .num  .center  .nowrap  .cell-shrink  .cell-check  .cell-actions  .cell-index
               .cell-title / .cell-meta  .cell-mono  .cell-muted  .cell-truncate  .cell-bar  .delta
               .cell-optional (a column that steps aside in a 40–54rem frame)
     Rows      .is-selected  .is-muted  .is-new  .is-warn  .is-danger  .is-open
               .table__group  .table__subtotal  .table__detail  .table__empty
   Row tones go through one custom property, --row-bg, set on the row: hover
   (--color-row-hover: the tile hover on the portal, the faint fill in the
   app), selection (--color-accent-soft), zebra, groups. Every cell paints
   it, and a sticky cell lays it over an opaque tile.
   A --sticky-head table sticks its head under the page's bar (--sticky-top,
   with-aside.css) whenever it fits its frame: table.js then marks the frame
   .is-fit, which stops it being a scroll container; inside a --scroll frame
   it sticks to the frame's top.
   Figures: tabular figures go to the cells that hold figures (.num,
   [data-value], .cell-bar, .delta, heat cells, ids, times), never to the
   whole table: Inter's tabular set also widens the hyphen, which would
   space out "Cluj-Napoca" in a text cell.
   A frame a little narrow for every column (40–54rem, a stacking table):
   the cells close up and .cell-optional columns step aside, so the table
   still fits and its head still sticks. When a frame does scroll sideways,
   the row actions (.cell-actions) stay pinned at its end, with a shadow
   while more columns hide under them (table.js: .has-more-end).
   atlas.js (table.js) sorts, fills bars and heat, folds trees, expands rows,
   adds and removes rows; datatable.js adds search, filters and pages. */
@layer components {
  /* ---- Frame ------------------------------------------------------------- */
  .table-wrap {
    --table-radius: var(--radius-lg);
    position: relative; max-width: 100%; overflow-x: auto;
    border-radius: var(--table-radius); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow);
    scrollbar-width: thin;
  }
  .table-wrap--flush { border-radius: 0; background: transparent; box-shadow: none; }
  .table-wrap--scroll { max-height: var(--table-height, 26rem); overflow: auto; overscroll-behavior: contain; }
  /* A sticky head that fits its frame sticks to the page (table.js): the
     frame keeps its look, its corners move to the corner cells. */
  .table-wrap.is-fit { overflow: visible; }
  .table-wrap.is-fit > .table > thead > tr:first-child > :first-child { border-start-start-radius: var(--table-radius); }
  .table-wrap.is-fit > .table > thead > tr:first-child > :last-child { border-start-end-radius: var(--table-radius); }
  .table-wrap.is-fit > .table > :last-child > tr:is(:last-child, .is-last) > :first-child { border-end-start-radius: var(--table-radius); }
  .table-wrap.is-fit > .table > :last-child > tr:is(:last-child, .is-last) > :last-child { border-end-end-radius: var(--table-radius); }
  /* Busy: a thin moving line on top and the rows dimmed. */
  .table-wrap.is-busy::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent) 0 0 / 40% 100% no-repeat;
    animation: atlas-table-busy 1.1s linear infinite;
  }
  .table-wrap.is-busy tbody { opacity: .55; transition: opacity var(--dur-2) var(--ease-out); }
  @keyframes atlas-table-busy { from { background-position: -40% 0; } to { background-position: 140% 0; } }

  /* ---- Table ------------------------------------------------------------- */
  .table {
    --cell-px: var(--space-5); --cell-py: .85rem;
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: .9375rem; line-height: 1.4; letter-spacing: var(--tracking-snug);
  }
  .table :is(.num, .cell-bar, .delta, .cell-mono, .cell-index, td[data-heat], td[data-value], th[data-value], time, data, output) { font-variant-numeric: tabular-nums lining-nums; }
  .table caption { padding: var(--space-4) var(--cell-px) 0; text-align: left; font-weight: var(--fw-semibold); color: var(--color-heading); caption-side: top; }
  .table th, .table td {
    padding: var(--cell-py) var(--cell-px); text-align: left; vertical-align: middle;
    border-bottom: 1px solid var(--color-border); background-color: var(--row-bg, transparent);
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .table :is(th, td):first-child { padding-left: calc(var(--cell-px) + .25rem); }
  .table :is(th, td):last-child { padding-right: calc(var(--cell-px) + .25rem); }
  /* Head: 13px, 600, subtle, sentence case, over a stronger hairline */
  .table thead th {
    padding-block: .8rem .7rem; vertical-align: bottom;
    font-size: .8125rem; font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-small); text-transform: none;
    color: var(--color-text-subtle); white-space: nowrap; border-bottom-color: var(--color-border-strong);
  }
  .table thead th[colspan] { text-align: center; }
  .table thead th.cell-check { padding-block: .5rem; vertical-align: middle; }
  .table thead tr:not(:last-child) th { padding-bottom: .45rem; }
  .table tbody th { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .table tbody:last-of-type tr:last-child > *, .table tbody tr.is-last > * { border-bottom: 0; }
  .table tbody + tbody tr:first-child > * { border-top: 1px solid var(--color-border); }
  .table:not(.table--static, .table--heat, .table--form) tbody tr:not(.table__group, .table__subtotal, .table__detail, .table__empty):hover {
    --row-bg: var(--color-row-hover);
  }
  .table tfoot td, .table tfoot th { font-weight: var(--fw-semibold); color: var(--color-heading); border-top: 1px solid var(--color-border-strong); border-bottom: 0; }

  /* ---- Variants ---------------------------------------------------------- */
  .table--zebra tbody tr:nth-child(even) { --row-bg: var(--color-fill-subtle); }
  .table--compact { --cell-py: .5rem; --cell-px: var(--space-4); font-size: .875rem; }
  .table--compact thead th { padding-block: .65rem .55rem; }
  .table--relaxed { --cell-py: 1.15rem; }
  .table--bordered th, .table--bordered td { border-right: 1px solid var(--color-border); }
  .table--bordered :is(tbody, tfoot) tr > :last-child, .table--bordered thead tr:first-child > :last-child { border-right: 0; }
  .table--top th, .table--top td { vertical-align: top; }
  .table--tight { --cell-px: var(--space-3); }
  .table--fixed { table-layout: fixed; }

  /* Sticky head: the head row on the bar material, the rows passing under it
     blurred. In a --scroll frame it sticks to the frame; in a frame that fits
     (.is-fit) it sticks under the page's bar. Head rows after the first get
     their offset from table.js. */
  .table--sticky-head { --sticky-top-own: 0px; }
  .table-wrap.is-fit > .table--sticky-head { --sticky-top-own: var(--sticky-top, 0px); }
  /* keyboard focus scrolls a row clear of the stuck head (its height is about 2.75rem) */
  .table-wrap.is-fit > .table--sticky-head tbody :is(a, button, input, select, [tabindex]) { scroll-margin-top: calc(var(--sticky-top-own) + 3.25rem); }
  .table--sticky-head thead th {
    position: sticky; top: var(--sticky-top-own); z-index: 2;
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
  }
  .table--sticky-col :is(th, td):first-child {
    position: sticky; left: 0; z-index: 1;
    background: linear-gradient(var(--row-bg, transparent), var(--row-bg, transparent)), var(--color-tile);
    border-right: 1px solid var(--color-border);
  }
  .table--sticky-col thead th:first-child { z-index: 3; }
  .table--sticky-head.table--sticky-col thead th:first-child { background: var(--material-bar); }
  .table-wrap.is-scrolled .table--sticky-col :is(th, td):first-child { box-shadow: 10px 0 14px -12px rgb(var(--shadow-rgb) / .45); }

  /* Numbered rows: an empty .cell-index cell shows the row number. */
  .table--numbered tbody { counter-reset: atlas-row; }
  .table--numbered tbody tr:not(.table__detail, .table__empty, [hidden]) { counter-increment: atlas-row; }
  .table .cell-index { width: 1%; padding-right: 0; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .table--numbered tbody .cell-index::before { content: counter(atlas-row); }

  /* ---- Cells ------------------------------------------------------------- */
  .table .num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
  .table .center { text-align: center; }
  .table .nowrap { white-space: nowrap; }
  .table .cell-shrink { width: 1%; white-space: nowrap; }
  .table .cell-check { width: 1%; padding-right: 0; }
  .cell-check .check { vertical-align: middle; }
  .cell-check .check > input { margin: 0; }
  .table .cell-actions { width: 1%; padding-block: 0; white-space: nowrap; text-align: right; }
  .cell-actions > * + * { margin-left: .15rem; }
  .cell-actions .icon-btn { vertical-align: middle; }
  .cell-title { display: block; min-width: min(var(--title-min, 11rem), 55vw); font-weight: var(--fw-semibold); letter-spacing: -.011em; color: var(--color-heading); line-height: 1.3; }
  a.cell-title { text-decoration: none; }
  @media (pointer: coarse) {          /* a 44px hit area around the row's title link */
    a.cell-title { position: relative; }
    a.cell-title::after { content: ""; position: absolute; inset: -.75rem 0; }
  }
  a.cell-title:hover { color: var(--color-link); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
  .cell-meta { display: block; margin-top: .125rem; font-size: .8125rem; line-height: 1.3; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .cell-meta > .tag, .cell-meta > .cell-mono { vertical-align: middle; }
  .cell-meta > * + .cell-mono, .cell-meta > .tag + * { margin-left: .45rem; }
  /* IDs (OTN-2026-01261): mono, 13px, muted, never broken */
  .cell-mono { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: 0; white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
  /* a tag on the meta line is a compact 18px pill, so two-line rows stay low
     (five registry rows above the fold at 1440 × 900) */
  .cell-meta .tag { height: 1.125rem; padding-inline: .4rem; font-size: .75rem; }
  .table .status, .table .person__name, .table .person__role { white-space: nowrap; }
  .cell-muted { color: var(--color-text-subtle); }
  .cell-truncate { display: block; max-width: var(--truncate, 14rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table .progress { min-width: 5rem; }

  /* A value with a bar: <span class="cell-bar" data-bar="412">412</span>.
     table.js sets --bar (0–1) against the largest value of the column. */
  .cell-bar { --bar: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .cell-bar::before {
    content: ""; flex: none; width: var(--bar-width, 5.5rem); height: .375rem; border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--bar-color, var(--color-primary)) calc(var(--bar) * 100%), var(--color-fill-hover) 0);
  }
  .cell-bar--accent { --bar-color: var(--color-accent-figure); }

  /* Change against a previous value (text form; the stat tiles use pills). */
  .delta { display: inline-flex; align-items: center; gap: .2rem; font-size: .8125rem; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--color-text-subtle); }
  .delta .icon { width: .8rem; height: .8rem; stroke-width: 2.25; }
  .delta--up { color: var(--color-success-fg); }
  .delta--down { color: var(--color-danger-fg); }
  .delta--down .icon { transform: rotate(180deg); }

  /* ---- Row states -------------------------------------------------------- */
  /* Selected: the accent tint (a deeper tint under the pointer). Links on
     a toned row (hovered, selected, open) read the on-fill link colour:
     #0066CC in light, #5AB0FF in dark (#2997FF is 4.35:1 on the dark tint). */
  .table tbody tr.is-selected { --row-bg: var(--color-accent-soft); }
  .table:not(.table--static) tbody tr.is-selected:hover { --row-bg: var(--color-accent-soft-hover); }
  .table tbody tr:is(:hover, .is-selected, .is-open, .table__detail) a:not(.btn, .icon-btn, .cell-title) { color: var(--color-link-on-fill); }
  /* New, to watch, problem: a 3px mark inside the row's start edge */
  .table tbody tr:is(.is-new, .is-warn, .is-danger) > :first-child { box-shadow: inset 3px 0 0 var(--row-mark); }
  .table tbody tr.is-new { --row-mark: var(--color-accent-figure); }
  .table tbody tr.is-warn { --row-mark: var(--color-dot-warn); }
  .table tbody tr.is-danger { --row-mark: var(--color-dot-danger); }
  .table tbody tr.is-muted > * { color: var(--color-text-subtle); }
  .table tbody tr.is-muted .cell-title { color: var(--color-text-muted); font-weight: var(--fw-medium); }

  /* Group heading rows (one <tbody> per group) and subtotals. */
  .table .table__group { --row-bg: var(--color-fill-subtle); }
  .table .table__group > * { padding-block: .5rem; font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); text-transform: none; color: var(--color-text-muted); }
  .table .table__subtotal { --row-bg: var(--color-fill-subtle); }
  .table .table__subtotal > * { font-weight: var(--fw-semibold); color: var(--color-heading); }

  /* Expandable rows: a [data-row-toggle] button opens the next tr.table__detail. */
  .row-toggle .icon { transition: transform var(--dur-3) var(--ease-spring); }
  .row-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .table tbody tr.is-open { --row-bg: var(--color-row-hover); }
  .table tbody tr.is-open > * { border-bottom-color: transparent; }
  .table .table__detail { --row-bg: var(--color-row-hover); }
  .table .table__detail > td { padding: 0; }
  .table__detail-body { padding: var(--space-2) var(--space-5) var(--space-6); }

  /* Empty and loading states: the empty state sits in the frame, no tile of
     its own (one frame, never two); its emblem is 64px here. */
  .table .table__empty > td { padding: 0; }
  .table__empty .empty { --empty-emblem: 4rem; border: 0; border-radius: 0; background: none; box-shadow: none; padding-block: var(--space-12); }
  .table .skeleton--line { min-width: 3rem; }

  /* ---- Heat map: td[data-heat] coloured by value (table.js) -------------- */
  /* The scale runs from the tile to 66% of --heat-color (oklab keeps the
     light end light): heading-colour text reads 5:1 or better on every
     step, light and dark, in every theme (Cobalt's deep blue included), so
     no cell needs white text. table.js marks the upper half .is-hot (600). */
  .table--heat td[data-heat] {
    --heat: 0; text-align: center; font-variant-numeric: tabular-nums; color: var(--color-heading);
    background: color-mix(in oklab, var(--heat-color, var(--color-primary)) calc(var(--heat) * 66%), var(--color-tile));
  }
  .table--heat td[data-heat].is-hot { font-weight: var(--fw-semibold); }
  .table--heat td[data-heat]:hover { outline: 2px solid var(--color-heading); outline-offset: -2px; }
  .table--heat thead th:not(:first-child) { text-align: center; }
  .table--heat :is(th, td):not(:first-child) { padding-inline: .5rem; }
  .table--heat td { border-bottom-color: var(--color-tile); }
  .table--heat td + td { border-left: 1px solid var(--color-tile); }
  .heat-legend { display: inline-flex; align-items: center; gap: var(--space-2); font-size: .75rem; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .heat-legend__bar {
    width: 8rem; height: .5rem; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--color-border);
    background: linear-gradient(90deg, var(--color-tile), color-mix(in oklab, var(--heat-color, var(--color-primary)) 66%, var(--color-tile)));
  }

  /* ---- Comparison -------------------------------------------------------- */
  .table--compare th, .table--compare td { text-align: center; }
  .table--compare :is(th, td):first-child { text-align: left; }
  .table--compare tbody th { font-weight: var(--fw-regular); color: var(--color-text); }
  .table--compare thead th { vertical-align: bottom; padding-block: var(--space-5) var(--space-4); text-transform: none; letter-spacing: 0; white-space: normal; }
  .compare__name { display: block; font: var(--fw-semibold) var(--step-1)/1.2 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .compare__desc { display: block; margin-top: .25rem; font-size: .8125rem; font-weight: var(--fw-regular); color: var(--color-text-subtle); }
  .compare__badge { margin-bottom: var(--space-2); }
  .table--compare .is-featured { background-color: var(--color-accent-soft); }
  .table--compare thead .is-featured { box-shadow: inset 0 3px 0 var(--color-accent-figure); }
  .cell-yes, .cell-no { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; }
  .cell-yes { background: var(--color-success-bg); color: var(--color-success-fg); }
  .cell-no { color: var(--color-text-subtle); }
  .cell-yes .icon, .cell-no .icon { width: .95rem; height: .95rem; stroke-width: 2.25; }

  /* ---- Specification: headers down the side ------------------------------ */
  .table--spec tbody th { width: 40%; font-weight: var(--fw-regular); color: var(--color-text-muted); }
  .table--spec td { color: var(--color-heading); font-weight: var(--fw-medium); }

  /* ---- Tree: rows with data-level, a .tree-toggle on the parents --------- */
  .table--tree tr[data-level="1"] > :first-child { padding-left: calc(var(--space-5) + 1.6rem); }
  .table--tree tr[data-level="2"] > :first-child { padding-left: calc(var(--space-5) + 3.2rem); }
  .table--tree tr[data-level="3"] > :first-child { padding-left: calc(var(--space-5) + 4.8rem); }
  .table--tree tbody th { font-weight: var(--fw-regular); color: var(--color-text); }
  .table--tree tr[data-level="1"] > th { font-weight: var(--fw-medium); color: var(--color-heading); }
  .table--tree tr[data-level="0"] > * { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .tree-toggle, .tree-leaf { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin: -.2rem .3rem -.2rem -.4rem; vertical-align: middle; border-radius: var(--radius-xs); color: var(--color-text-muted); }
  .tree-toggle:hover { background: var(--color-fill); color: var(--color-heading); }
  .tree-toggle:focus-visible { outline-offset: 1px; }
  .tree-toggle .icon { width: 1rem; height: 1rem; transform: rotate(-90deg); transition: transform var(--dur-3) var(--ease-spring); }
  .tree-toggle[aria-expanded="true"] .icon { transform: none; }
  .tree-leaf::before { content: ""; width: .3rem; height: .3rem; border-radius: 50%; background: var(--color-border-strong); }

  /* ---- Editable rows: inputs in cells, a row added from a <template> ------ */
  .table--form th, .table--form td { padding: .45rem .5rem; }
  .table--form :is(th, td):first-child { padding-left: var(--space-4); }
  .table--form :is(th, td):last-child { padding-right: var(--space-3); }
  .table--form tbody td { border-bottom-color: transparent; }
  .table--form td > .input[size] { width: auto; }
  .table--form tbody tr:first-child td { padding-top: .75rem; }
  .table--form tbody tr:last-child td { padding-bottom: .75rem; }
  .table-add { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); font-size: .8125rem; color: var(--color-text-subtle); }
  .table--form tbody tr.is-added > * { --pop-y: 6px; --pop-scale: 1; animation: atlas-pop var(--dur-3) var(--ease-spring) backwards; }

  /* ---- Sort buttons in the header ---------------------------------------- */
  .th-sort { display: inline-flex; align-items: center; gap: .3rem; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap; border-radius: var(--radius-xs); }
  .th-sort:hover { color: var(--color-heading); }
  .th-sort .icon { width: .8rem; height: .8rem; opacity: .35; transition: transform var(--dur-3) var(--ease-spring), opacity var(--dur-2) var(--ease-out); }
  .num > .th-sort { flex-direction: row-reverse; }
  [aria-sort] > .th-sort { color: var(--color-heading); }
  [aria-sort] > .th-sort .icon { opacity: 1; }
  [aria-sort="ascending"] > .th-sort .icon { transform: rotate(180deg); }

  /* ---- Stacked: in a frame narrower than 40rem every row becomes a card ---
     (a container query on the frame, not the screen). The first cell (after
     a .cell-check) is the card title; the others show their column name from
     data-label, which table.js copies from the header. A .cell-check sits
     on the left of the title, .cell-actions in the top right corner. */
  .table-wrap:has(> .table--stack) { container-type: inline-size; }
  /* a frame a little narrow (40–54rem): the cells close up, optional columns step aside */
  @container (40rem < width <= 54rem) {
    .table--stack { --cell-px: var(--space-3); --title-min: 9rem; }
    .table--stack .cell-optional { display: none; }
  }
  @container (width > 40rem) {
    .table-wrap:not(.is-fit) > .table--stack .cell-actions { position: sticky; right: 0; z-index: 1; }
    .table-wrap:not(.is-fit) > .table--stack tbody .cell-actions { background: linear-gradient(var(--row-bg, transparent), var(--row-bg, transparent)), var(--color-tile); }
    .table-wrap.has-more-end:not(.is-fit) > .table--stack .cell-actions { box-shadow: -10px 0 14px -12px rgb(var(--shadow-rgb) / .45); }
  }
  @container (max-width: 40rem) {
    .table--stack, .table--stack tbody, .table--stack tfoot, .table--stack tr, .table--stack td, .table--stack tbody th { display: block; }
    .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    /* the head's controls (select all, sort) are hidden with it: from the
       keyboard they show as a bar while one of them has the focus (the
       toolbar's "Sortează după" serves the pointer: datatable.js) */
    .table--stack thead:focus-within { position: static; display: block; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
    .table--stack thead:focus-within tr { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem var(--space-4); padding: var(--space-3) var(--space-5); box-shadow: inset 0 -1px 0 var(--color-border-strong); }
    .table.table--stack thead:focus-within th { display: block; position: static; padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .table--stack caption { display: block; padding-bottom: var(--space-3); }
    .table--stack tbody tr { position: relative; padding: var(--space-4) var(--space-5); background: var(--row-bg, transparent); transition: background-color var(--dur-1) var(--ease-out); }
    /* separators inset to the text column, as in every list */
    .table--stack tbody tr:not([hidden]) ~ tr::before { content: ""; position: absolute; top: 0; left: var(--space-5); right: 0; height: 1px; background: var(--color-border); }
    .table--stack tbody tr:has(> .cell-check) { padding-left: calc(var(--space-5) + 2rem); }
    .table--stack tbody tr:has(> .cell-check)::before { left: calc(var(--space-5) + 2rem); }
    .table--stack tbody tr:has(> .cell-actions) { padding-right: 3.25rem; }
    .table.table--stack tbody tr > *, .table.table--stack tbody tr:hover > * { width: auto; padding: .2rem 0; border: 0; background: none; box-shadow: none; text-align: left; }
    .table--stack tbody tr:is(.is-new, .is-warn, .is-danger) { box-shadow: inset 3px 0 0 var(--row-mark); }
    .table.table--stack tbody tr > .cell-check { position: absolute; top: calc(var(--space-4) + .2rem); left: var(--space-5); padding: 0; }
    .table.table--stack tbody tr > .cell-actions { position: absolute; top: .65rem; right: var(--space-3); padding: 0; }
    .table--stack tbody tr > :is(:first-child:not(.cell-check), .cell-check + *) { padding-bottom: .5rem; font-size: var(--step-0); font-weight: var(--fw-semibold); color: var(--color-heading); }
    .table--stack .cell-title { min-width: 0; }
    .table--stack tbody td[data-label]:not(:first-child, .cell-check + *, .cell-check, .cell-actions) { position: relative; min-height: 1.6rem; padding-left: var(--stack-label, 8.5rem); }
    .table--stack tbody td[data-label]:not(:first-child, .cell-check + *, .cell-check, .cell-actions)::before {
      content: attr(data-label); position: absolute; left: 0; top: .42rem; width: calc(var(--stack-label, 8.5rem) - var(--space-3));
      font-size: .8125rem; font-weight: var(--fw-medium); line-height: 1.3; letter-spacing: var(--tracking-small); text-transform: none; color: var(--color-text-subtle);
    }
    .table--stack .cell-meta { margin: .2rem 0 0; }
    .table--stack .cell-bar { justify-content: flex-start; }
    .table--stack .table__empty > td { padding: 0; }
    .table--stack tfoot tr { display: flex; justify-content: space-between; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border-strong); background: transparent; }
    .table--stack tfoot :is(td, th) { padding: 0; border: 0; }
    /* an editable table that stacks: its fields take the whole width of their cell */
    .table--stack.table--form td > :is(.input, .select, .select__trigger, .input-group, .number, .input-wrap, textarea, select) { width: 100%; max-width: none; }
    .table--stack.table--form td > .input[size] { width: 100%; }
    .table--stack.table--form tbody td[data-label]:not(:first-child, .cell-check + *, .cell-check, .cell-actions) { padding-block: .35rem; }
    /* an editable card: each label sits above its field, which takes the card's width */
    .table--stack.table--form tbody td[data-label]:not(:first-child, .cell-check + *, .cell-check, .cell-actions) { padding: 1.5rem 0 .35rem; }
    .table--stack.table--form tbody td[data-label]:not(:first-child, .cell-check + *, .cell-check, .cell-actions)::before { top: 0; width: 100%; }
  }

  /* Reduce Transparency and forced colours: the sticky head is opaque. */
  @media (prefers-reduced-transparency: reduce) {
    .table--sticky-head thead th { background: var(--color-tile); }
  }
  @media (forced-colors: active) {
    .table--sticky-head thead th, .table--sticky-col :is(th, td):first-child, .table .cell-actions { background: Canvas; }
    .table tbody tr.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
  }
  /* touch: sort buttons and tree toggles reach 44px through a hit area */
  @media (pointer: coarse) {
    .th-sort, .tree-toggle { position: relative; }
    .th-sort::after { content: ""; position: absolute; inset: -.85rem -.35rem; }
    .tree-toggle::after { content: ""; position: absolute; inset: -.625rem; }
  }
}

/* ---- css/components/datatable.css ---- */
/* Atlas · Data table
   A .table with its tools around it, driven by atlas.js (datatable.js):
     <div class="datatable" data-datatable data-dt-noun="documentație|documentații">
       .datatable__bar      ONE row: search [data-dt-search] (a 40px pill, flexible,
                            28rem at most) · filters select[data-dt-filter="<column>"]
                            (small pills) · .datatable__tools on the right (density
                            .seg, "Coloane", "CSV" as small secondary pills)
       .datatable__meta     under the row: the count [data-dt-count] ("36 de
                            documentații", the number in the heading colour) and the
                            active filters [data-dt-chips] (graphite chips; the line
                            holds them only while a filter is on)
       .table-wrap > .table rows with input[data-dt-select], header input[data-dt-select-all]
       .datatable__foot     rows per page [data-dt-size], range [data-dt-range], pages [data-dt-pager]
       .datatable__bulk     [data-dt-bulk]: a floating capsule while rows are selected
                            ("3 selectate" · actions · close); Esc clears the selection
     </div>
   .datatable__bar may stand alone (outside a .datatable): it wraps.
   Older markup kept .datatable__tools inside .datatable__meta: datatable.js
   moves it into the bar, so the toolbar is one row in either case.
   The box is a container: under 52rem the search takes a row of its own,
   under 34rem the tools keep only their icons and the pages read
   "Pagina 2 din 8". Everything works on the rows already in the page. */
@layer components {
  .datatable { container: datatable / inline-size; display: grid; gap: var(--space-3); min-width: 0; }
  .datatable > .datatable__meta { margin-top: calc(-1 * var(--space-1)); }
  .datatable > .table-wrap { margin-top: 0; scroll-margin-top: calc(var(--sticky-top, 0px) + var(--space-4)); }
  .datatable .table { --cell-px: var(--space-4); }

  /* ---- The toolbar: one row ------------------------------------------------ */
  /* The bar wraps by itself, so it also holds up outside a .datatable (a
     catalog's search and filters): inside one, the box's container queries
     below set the rows (the search on a row of its own under 52rem). */
  .datatable__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
  .datatable__search { position: relative; flex: 1 1 14rem; min-width: 0; max-width: 28rem; }
  .datatable__search > .input {
    width: 100%; min-height: 2.5rem; height: 2.5rem; padding-block: 0; padding-left: 2.5rem; padding-right: 1rem;
    border-radius: var(--radius-pill); font-size: .9375rem;
  }
  .datatable__search > .icon { position: absolute; top: 50%; left: .95rem; z-index: 1; width: 1rem; height: 1rem; translate: 0 -50%; color: var(--color-text-subtle); pointer-events: none; }
  .datatable__filters { display: flex; flex: none; gap: var(--space-2); min-width: 0; }
  .datatable__filters .select { min-width: 9.5rem; }
  .datatable__bar :is(.select__trigger, .select > select) { border-radius: var(--radius-pill); padding-left: 1rem; }
  .datatable__tools { display: flex; flex: none; align-items: center; gap: var(--space-2); margin-left: auto; }
  .datatable__tools .seg__btn { min-width: 2.25rem; padding-inline: .55rem; }
  .datatable__tools .seg__btn .icon { width: 1rem; height: 1rem; }
  .datatable__tools .btn--sm { padding-inline: .875rem; }

  /* ---- Under the row: the count and the active filters ------------------- */
  .datatable__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: 1.25rem; font-size: var(--step--1); color: var(--color-text-muted); }
  /* the tools before datatable.js moves them into the bar (older markup) */
  .datatable__meta > .datatable__tools { margin-left: auto; }
  .datatable__count { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
  .datatable__count strong { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .datatable__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
  .datatable__chips:empty { display: none; }
  /* the active filters are chip.css's .chip.chip--filter (+ .chip__remove) */
  .datatable__clear {
    height: 1.875rem; padding-inline: .5rem; border-radius: var(--radius-pill);
    font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-link); text-decoration: none;
  }
  .datatable__clear:hover { color: var(--color-link-hover); background: var(--color-fill-subtle); }
  /* while rows are selected: a way to the bulk bar (after the rows) */
  .datatable__skip {
    height: 1.875rem; padding-inline: .5rem; border-radius: var(--radius-pill);
    font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-link);
  }
  .datatable__skip:hover { color: var(--color-link-hover); background: var(--color-fill-subtle); text-decoration: underline; }
  /* rows as cards hide the head: the sort is a select in the toolbar then */
  .datatable__sort { display: none; }

  /* ---- Foot: rows per page, range, pages ---------------------------------- */
  .datatable__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); padding-top: var(--space-1); font-size: var(--step--1); color: var(--color-text-muted); }
  .datatable__size { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
  .datatable__size .select { width: 5.5rem; }
  .datatable__size :is(.select__trigger, .select > select) { border-radius: var(--radius-pill); }
  .datatable__range { font-variant-numeric: tabular-nums; }
  .datatable__foot .pagination { margin-left: auto; }
  /* "Pagina 2 din 8": shown instead of the numbers in a narrow box */
  .pagination > .datatable__page { display: none; min-width: 0; padding-inline: var(--space-2); font-size: var(--step--1); font-weight: var(--fw-medium); color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* ---- Bulk actions: a floating capsule (M24) ---------------------------- */
  /* Sticky at the bottom of the screen while the table runs under it; it
     springs up when the first row is selected and sinks away when the last
     one is cleared (datatable.js adds .is-leaving for the exit). */
  .datatable__bulk {
    position: sticky; bottom: max(var(--space-4), env(safe-area-inset-bottom)); z-index: var(--z-sticky); justify-self: center;
    display: flex; align-items: center; gap: var(--space-2); max-width: 100%;
    padding: .375rem .375rem .375rem var(--space-5); border-radius: var(--radius-lg);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
    animation: atlas-bulk-in var(--dur-3) var(--ease-spring) backwards;
  }
  .datatable__bulk[hidden] { display: none; }
  .datatable__bulk.is-leaving { animation: atlas-bulk-out var(--dur-2) var(--ease-exit) forwards; pointer-events: none; }
  .datatable__bulk-count {
    margin-right: var(--space-3); font-size: .9375rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-ui);
    color: var(--color-heading); font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .datatable__bulk .btn { white-space: nowrap; }
  /* Older markup used the dark plane's buttons: on the light capsule they
     read as the secondary pill. Use .btn--secondary in new markup. */
  .datatable__bulk .btn--outline-light {
    --btn-bg: var(--color-fill); --btn-fg: var(--color-heading); --btn-bd: transparent;
    --btn-bg-hover: var(--color-fill-hover); --btn-fg-hover: var(--color-heading);
    padding-inline: .875rem; text-decoration: none;
  }
  .datatable__bulk .btn--outline-light::after { content: none; }
  .datatable__bulk > .icon-btn:last-child { margin-left: var(--space-1); }
  @keyframes atlas-bulk-in { from { opacity: 0; transform: translateY(120%) scale(.96); } }
  @keyframes atlas-bulk-out { to { opacity: 0; transform: translateY(60%) scale(.97); } }

  /* ---- Narrow boxes (container queries) ----------------------------------- */
  @container datatable (max-width: 52rem) {
    .datatable__bar { flex-wrap: wrap; }
    .datatable__search { flex-basis: 100%; max-width: none; }
    .datatable__filters { flex: 1 1 auto; }
    .datatable__filters .select { flex: 1 1 8rem; min-width: 0; }
  }
  /* the sort select takes a row of its own, after the filters: its value
     ("Depusă, descrescător") and the filters' ("Toate stările") read whole */
  @container datatable (max-width: 40rem) {
    .datatable__sort { display: block; flex: 1 1 100%; min-width: 0; }
  }
  @container datatable (max-width: 34rem) {
    /* the tools keep their icons; the labels stay for screen readers */
    .datatable__tools .btn--sm { width: var(--btn-h-sm); padding: 0; }
    .datatable__tools .btn--sm > :not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .datatable__tools .btn--sm .icon { margin: 0; }
    .datatable__tools { flex-wrap: nowrap; }
    .datatable__foot { justify-content: center; }
    .datatable__foot .pagination { width: 100%; margin-left: 0; justify-content: space-between; }
    .datatable__foot .pagination > :not(.pagination__prev, .pagination__next, .datatable__page) { display: none; }
    .datatable__foot .pagination > .datatable__page { display: grid; }
    .datatable__range { display: none; }
    /* the capsule spans the box; its buttons keep their icons */
    .datatable__bulk { justify-self: stretch; padding-left: var(--space-4); }
    .datatable__bulk-count { margin-right: auto; }
    .datatable__bulk .btn { width: var(--btn-h-sm); min-width: var(--btn-h-sm); padding: 0; }
    .datatable__bulk .btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media (max-width: 640px) {
    .datatable__bulk { bottom: max(var(--space-2), env(safe-area-inset-bottom)); }
  }
  @media (prefers-reduced-transparency: reduce) {
    .datatable__bulk { background: var(--color-elevated); }
  }
  /* touch: the search pill is 44px tall; the icon-only tools and bulk
     buttons are 44px wide too */
  @media (pointer: coarse) {
    .datatable__search > .input { min-height: var(--target-min); height: var(--target-min); }
    @container datatable (max-width: 34rem) {
      .datatable__tools .btn--sm, .datatable__bulk .btn { width: var(--target-min); min-width: var(--target-min); }
    }
  }
  /* touch: the small targets reach 44px through an invisible hit area */
  @media (pointer: coarse) {
    .datatable__clear, .datatable__skip { position: relative; }
    .datatable__clear::after, .datatable__skip::after { content: ""; position: absolute; inset: -.4375rem 0; }
  }
}

/* ---- css/components/chart.css ---- */
/* Atlas · Charts — statistics and analysis (charts.js).
   Every chart is a figure whose markup is its table: without JavaScript the
   table shows; with it the chart draws from it (Apache ECharts, SVG, loaded
   only on pages that hold a chart) and "Vezi datele" swaps the table back in.
     <figure class="chart chart-card" data-chart="line" data-chart-unit="dosare" id="…">
       <div class="chart__head">
         <h3 class="chart__title">Dosare depuse și avize emise</h3>
         <p class="chart__sub"><span data-chart-range>nov. 2025 – oct. 2026</span> · lunar</p>
       </div>
       <div class="chart__plot chart__plot--md"></div>     reserves the height
       <div class="chart__data"><div class="table-wrap"><table class="table table--compact">…</table></div></div>
       <figcaption class="chart__source">Sursa: registrul de dosare</figcaption>
     </figure>
   Parts: .chart__head (.chart__title, .chart__sub, an optional headline
   .chart__value + .chart__unit (+ a .stat__delta), .chart__actions:
   generated) · .chart__body (generated: the legend under the title — before
   the plot in the DOM too, so Tab meets it first — the plot, the scale
   legend) · .chart__plot --sm 11rem · --md 16rem (default)
   · --lg 22rem, always including the axis bands; bar-h, diverging, heatmap,
   calendar, funnel and horizontal bars size themselves to their data
   (--chart-h); pie and donut are a 13rem ring · .chart__legend (HTML keys: a
   rect for bars and slices, a short line for lines, a dot for points, a
   dash for a target; a click toggles a series) · .chart__legend--values (pie
   and donut: swatch · name · value · share) · .chart__total (the donut's
   total) · .chart__scale (sequential legend) · .chart__data (the table twin
   and "Descarcă CSV") · .chart__source · .chart__empty (generated).
   States: .is-chart (JS on) · .is-rendered · .is-data (table shown) ·
   .is-empty · .is-busy (held at reduced opacity while new data loads) ·
   .is-failed (the library did not load: the table stays) · .is-textured.
   Frames and layout: .chart-card (the tile: a chart in a dashboard) ·
   .chart-grid (--2 · --3: at most two / three columns, each ≥ 20rem;
   .chart-card--wide spans two where there is room; a wrapper around a card —
   a lab's .stack with its heading — spans with .chart-grid__wide) ·
   .chart-filters (the one
   filter row above everything it scopes: .chart-filters__label, a .seg,
   .chart-filters__end for tools).
   KPI tiles drawn from a chart (.stat[data-stat-source]): the generated
   .stat__change holds the .stat__delta pill and the named period (.stat__vs).
   Pieces without the library: .spark (--sm · --lg · --area) · .meter,
   .meter--ring, in .meters / .meters--rings (.meter__state: the level's
   icon and word, generated) · .bar-list (__item, __label, __value).
   Tooltip: .chart-tooltip (ECharts' box, transparent) holding our
   .chart-tip (the material). Markup of everything: lab/s9-charts.html. */
@property --meter-p { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --bar-p { syntax: "<number>"; inherits: true; initial-value: 0; }

@layer components {
  /* ---- The figure and its frame -------------------------------------------- */
  .chart {
    --chart-h: 16rem;
    container: chart / inline-size;
    display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; margin: 0;
  }
  .chart-card {
    min-width: 0; padding: var(--card-pad);
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .chart-card > .chart + .chart { margin-top: var(--space-8); }

  /* ---- Head: title, sub line, an optional figure, the tools ----------------- */
  .chart__head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
    column-gap: var(--space-3); row-gap: .125rem;
  }
  .chart__head > :not(.chart__actions) { grid-column: 1; min-width: 0; }
  .chart__title {
    margin: 0; font: var(--fw-semibold) var(--step-tile-title)/1.25 var(--font-display);
    letter-spacing: var(--tracking-tile-title); color: var(--color-heading); text-wrap: balance;
  }
  .chart__sub {
    margin: 0; font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    color: var(--color-text-subtle); text-wrap: pretty;
  }
  /* the chart's headline figure: proportional figures (standalone) */
  .chart__value {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem var(--space-3); margin: var(--space-2) 0 0;
    font: var(--fw-display) clamp(1.75rem, 1.45rem + .9vw, 2.25rem)/1.05 var(--font-text);
    letter-spacing: -.03em; color: var(--color-heading);
  }
  .chart__unit { margin-left: -.1em; font-size: .5em; font-weight: var(--fw-semibold); letter-spacing: -.01em; color: var(--color-text-muted); }
  .chart__value .stat__delta { align-self: center; margin: 0; font-family: var(--font-text); letter-spacing: var(--tracking-small); }
  .chart__actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: var(--space-1); margin: -.25rem -.5rem 0 0; }

  /* A quiet tool in the head ("Vezi datele"): muted until pressed, then on
     the fill in heading 600 (a view toggle, aria-pressed) */
  .chart__tool {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
    min-height: 2rem; padding: 0 .75rem; border: 0; border-radius: var(--radius-pill);
    background: transparent; color: var(--color-text-muted);
    font: var(--fw-medium) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small); white-space: nowrap;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .chart__tool .icon { width: 1rem; height: 1rem; }
  .chart__tool:hover { background: var(--color-fill); color: var(--color-heading); }
  .chart__tool:active { transform: scale(var(--press-scale-chip)); transition-duration: 80ms; }
  .chart__tool[aria-pressed="true"] { background: var(--color-fill); color: var(--color-heading); font-weight: var(--fw-semibold); }
  @media (pointer: coarse) {
    .chart__tool::after { content: ""; position: absolute; inset: calc((2rem - var(--target-min)) / 2); }
  }
  /* a narrow chart keeps the icon; the label stays the button's name */
  @container chart (max-width: 24rem) {
    .chart__tool { width: 2rem; padding: 0; }
    .chart__tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  }

  /* ---- Body: legend (under the title), plot, scale legend -------------------- */
  .chart__body { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
  /* isolate: ECharts gives its tooltip z-index 9999999; it stays in the plot's layer,
     under the page's sticky bars */
  .chart__plot {
    position: relative; isolation: isolate; height: var(--chart-h); min-width: 0;
    border-radius: var(--radius-sm); outline-offset: 6px;
  }
  .chart__plot--sm { --chart-h: 11rem; }
  .chart__plot--md { --chart-h: 16rem; }
  .chart__plot--lg { --chart-h: 22rem; }
  /* important: ECharts writes position: relative on a container it finds static
     (it is, on paper), and that inline style would outlive the print */
  .chart__canvas { position: absolute !important; inset: 0; }
  .chart__plot:focus-visible { outline: 3px solid var(--color-focus); }
  /* figures that line up (value axes, value labels: charts.js draws them in the
     family "Inter Num", a name that falls through to Inter) take tabular figures;
     names, categories and dates keep Inter's own (proportional) figures and
     hyphen. ECharts writes the font inline, so this one declaration is important */
  .chart__canvas text[style*="Inter Num"] { font-variant-numeric: tabular-nums !important; }
  /* waiting for the library: four faint gridlines, no shimmer */
  .chart.is-chart:not(.is-rendered, .is-empty, .is-failed) .chart__canvas {
    background: repeating-linear-gradient(180deg, transparent 0 calc(25% - 1px), var(--chart-grid) calc(25% - 1px) 25%);
    opacity: .8;
  }
  .chart__empty {
    position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: var(--space-4);
    font-size: var(--step--1); line-height: 1.45; text-align: center; color: var(--color-text-subtle); text-wrap: balance;
  }
  .chart:not(.is-empty) .chart__empty { display: none; }
  .chart.is-empty .chart__canvas { visibility: hidden; }
  /* refetch: the previous render holds at reduced opacity, no skeleton */
  .chart.is-busy .chart__body { opacity: .5; pointer-events: none; transition: opacity var(--dur-2) var(--ease-out); }

  /* The table twin: shown without JavaScript, behind "Vezi datele" with it */
  .chart.is-chart:not(.is-failed, .is-data) > .chart__data { display: none; }
  @media (scripting: enabled) {
    .chart:not(.is-failed, .is-data) > .chart__data { display: none; }
  }
  @media (scripting: none) {
    .chart > .chart__plot, .chart > .chart__body { display: none; }
  }
  .chart.is-data > :is(.chart__body, .chart__plot) { display: none; }
  .chart.is-failed > :is(.chart__body, .chart__plot), .chart.is-failed .chart__tool { display: none; }
  .chart__data .table-wrap { max-height: var(--chart-data-h, 26rem); overflow: auto; overscroll-behavior: contain; }
  .chart-card .chart__data .table-wrap { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
  .chart__data-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-3); }

  .chart__source {
    margin: 0; font-size: .75rem; line-height: var(--lh-caption); letter-spacing: 0;
    color: var(--color-text-subtle); text-wrap: pretty;
  }
  .chart__source a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  .chart__source a:hover { color: var(--color-link-hover); }

  /* ---- Legend: under the title; the swatch mirrors the mark ------------------ */
  .chart__legend { display: flex; flex-wrap: wrap; align-items: center; gap: .125rem var(--space-1); margin: -.25rem 0 0 -.5rem; }
  .chart__legend[hidden] { display: none; }
  .chart__key {
    position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 1.75rem; padding: 0 .5rem;
    border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-text);
    font: var(--fw-medium) .8125rem/1.25 var(--font-text); letter-spacing: var(--tracking-small); text-align: left;
  }
  button.chart__key {
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  button.chart__key:hover { background-color: var(--color-fill-subtle); }
  button.chart__key:active { transform: scale(var(--press-scale-chip)); transition-duration: 80ms; }
  .chart__key[aria-pressed="false"] { color: var(--color-text-subtle); }
  .chart__key.is-context { color: var(--color-text-muted); }
  .chart__swatch {
    flex: none; width: .625rem; height: .625rem; border-radius: 3px; background-color: var(--chart-key);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .chart__swatch--line { width: 1rem; height: .1875rem; border-radius: 2px; }
  .chart__swatch--dot { width: .5625rem; height: .5625rem; border-radius: 50%; }
  .chart__swatch--dash { width: 1rem; height: .125rem; border-radius: 1px; background: repeating-linear-gradient(90deg, var(--chart-key) 0 4px, transparent 4px 7px); }
  .chart__key[aria-pressed="false"] .chart__swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--chart-key); }
  .chart__key[aria-pressed="false"] .chart__swatch--line { box-shadow: inset 0 0 0 1px var(--chart-key); }
  .chart__key-icon { width: .9375rem; height: .9375rem; margin-left: -.25rem; color: var(--color-text-muted); }
  /* textures (forced colours, print, .a11y-grayscale, [data-chart-texture]):
     the key carries the slot's own stripes, the line key its dash */
  .chart.is-textured .chart__swatch:not(.chart__swatch--line, .chart__swatch--dash) {
    width: .875rem; height: .875rem;
    background-image: repeating-linear-gradient(var(--chart-key-angle, 45deg), rgb(0 0 0 / .34) 0 1.4px, transparent 1.4px var(--chart-key-gap, 3px));
  }
  .chart.is-textured .chart__swatch--line { height: .1875rem; }
  .chart.is-textured .chart__swatch--line[data-dash="1"] { background: repeating-linear-gradient(90deg, var(--chart-key) 0 6px, transparent 6px 9px); }
  .chart.is-textured .chart__swatch--line[data-dash="2"] { background: repeating-linear-gradient(90deg, var(--chart-key) 0 2px, transparent 2px 4.5px); }
  .chart.is-textured .chart__swatch--line[data-dash="3"] { background: repeating-linear-gradient(90deg, var(--chart-key) 0 7px, transparent 7px 9px, var(--chart-key) 9px 11px, transparent 11px 13px); }

  /* The value legend of a pie or donut: swatch · name · value · share, in
     aligned columns, beside the ring (under it in a narrow chart) */
  .chart__legend--values {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0; margin: 0; align-self: center;
  }
  .chart__legend--values .chart__key {
    grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; column-gap: .625rem;
    min-height: 2.25rem; padding: .25rem .5rem; border-radius: var(--radius-sm);
  }
  /* the hairline between rows is painted on the key itself (no box of its own:
     an extra box at a key's top edge drew a touch near the row above to it) */
  .chart__legend--values .chart__key + .chart__key {
    background-image: linear-gradient(var(--color-border), var(--color-border));
    background-repeat: no-repeat; background-position: 1.625rem 0; background-size: calc(100% - 2.125rem) 1px;
  }
  .chart__key-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chart__key-value { font-weight: var(--fw-semibold); color: var(--color-heading); font-variant-numeric: tabular-nums; text-align: right; }
  .chart__key-share { min-width: 3.25rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; text-align: right; }
  .chart__key[aria-pressed="false"] :is(.chart__key-value, .chart__key-share) { color: var(--color-text-subtle); font-weight: var(--fw-regular); }
  /* touch: every key is a real 44px box (no invisible hit area reaching into the
     row above or below, and no other box at its edges: a tap at the edge of a key
     toggles that key) */
  @media (pointer: coarse) {
    .chart__legend { row-gap: 0; }
    button.chart__key, .chart__legend--values .chart__key { min-height: var(--target-min); }
  }
  /* the ring beside its legend: only while the chart shows (the data view and a
     failed library hide the body, as for every type) */
  .chart:is([data-chart="pie"], [data-chart="donut"]):not(.is-data, .is-failed) .chart__body {
    display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: center; gap: var(--space-4) var(--space-8);
  }
  /* the ring's tooltip sits beside the ring, over the legend: the ring's layer goes first */
  .chart:is([data-chart="pie"], [data-chart="donut"]) .chart__plot { --chart-h: 13rem; width: 13rem; z-index: 1; }
  @container chart (max-width: 30rem) {
    .chart:is([data-chart="pie"], [data-chart="donut"]):not(.is-data, .is-failed) .chart__body { grid-template-columns: minmax(0, 1fr); }
    .chart:is([data-chart="pie"], [data-chart="donut"]) .chart__plot { --chart-h: 12rem; width: 12rem; justify-self: center; }
  }

  /* The donut's total, in the middle of the ring */
  .chart__total {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; text-align: center;
  }
  .chart__total-value { font: var(--fw-display) 1.75rem/1.05 var(--font-text); letter-spacing: -.03em; color: var(--color-heading); font-variant-numeric: proportional-nums lining-nums; }
  .chart__total-label { margin-top: .25rem; font-size: .75rem; line-height: 1.3; color: var(--color-text-subtle); }

  /* Sequential scale legend (heatmap, calendar): low ▬▬▬ high */
  .chart__scale {
    order: 1; align-self: flex-end; display: inline-flex; align-items: center; gap: var(--space-2);
    font-size: .75rem; line-height: 1; color: var(--color-text-subtle); font-variant-numeric: tabular-nums;
  }
  .chart__scale-bar {
    width: 7.5rem; height: .5rem; border-radius: var(--radius-pill); background: var(--chart-scale, var(--chart-seq-7));
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* ---- Tooltip: ECharts places .chart-tooltip; .chart-tip is the material ----- */
  .chart-tooltip { pointer-events: none; }
  .chart-tip {
    min-width: 8.5rem; max-width: 16rem; padding: .5rem .75rem .5625rem;
    border-radius: 12px; background: var(--material-overlay);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
    color: var(--color-text); font: var(--fw-regular) .8125rem/1.35 var(--font-text); letter-spacing: var(--tracking-small);
    text-align: left; white-space: normal;
  }
  .chart-tip__head { margin-bottom: .3125rem; font-size: .75rem; font-weight: var(--fw-semibold); line-height: 1.3; color: var(--color-text-subtle); }
  .chart-tip__row { display: flex; align-items: baseline; gap: .5rem; padding-block: .0625rem; }
  .chart-tip__key { flex: none; align-self: center; width: .5rem; height: .5rem; border-radius: 2px; background: var(--chart-key); }
  .chart-tip__key--line { width: .75rem; height: .125rem; border-radius: 1px; }
  .chart-tip__key--dot { border-radius: 50%; }
  .chart-tip__value { font-weight: var(--fw-semibold); color: var(--color-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .chart-tip__name { min-width: 0; color: var(--color-text-muted); }
  .chart-tip__note { margin-left: auto; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .chart-tip__foot {
    display: flex; align-items: center; gap: .375rem; margin-top: .375rem; padding-top: .375rem;
    border-top: 1px solid var(--color-border); font-size: .75rem; line-height: 1.35; color: var(--color-text-muted);
  }
  .chart-tip__foot--bad { color: var(--color-danger-fg); font-weight: var(--fw-semibold); }
  .chart-tip .icon { width: .875rem; height: .875rem; flex: none; }

  /* ---- Dashboards: the grid and the filter row ------------------------------ */
  .chart-grid {
    --chart-grid-min: 20rem;
    container: chart-grid / inline-size;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--chart-grid-min)), 1fr)); gap: var(--tile-gap);
  }
  .chart-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--chart-grid-min), (100% - var(--tile-gap)) / 2 - .5px)), 1fr)); }
  .chart-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--chart-grid-min), (100% - 2 * var(--tile-gap)) / 3 - .5px)), 1fr)); }
  .chart-grid > * { min-width: 0; }
  @container chart-grid (min-width: 42rem) {
    .chart-grid > :is(.chart-card--wide, .chart-grid__wide) { grid-column: span 2; }
  }
  /* one row, above everything it scopes (a .seg for the period, then tools) */
  .chart-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
  .chart-filters__label { font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-text-muted); }
  .chart-filters__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-left: auto; }

  /* ---- KPI tiles drawn from a chart (.stat[data-stat-source]): the change is
     a compact pill (the amount) and the period it is measured against ------ */
  .stat[data-stat-source] .stat__value { font-family: var(--font-text); }
  /* the kit writes the unit after a no-break space ("21,3 zile", "88,8 %"; Inter's
     space is .225em): the margin gives that width back, the gap stays .18em */
  .stat[data-stat-source] .stat__unit { margin-left: -.045em; }
  .stat__change { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-top: auto; }
  .stat__change > .stat__delta { margin-top: 0; }
  .stat__change[hidden] { display: none; }
  .stat__vs { font-size: .75rem; line-height: 1.3; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }

  /* ---- Sparkline: the trend of a figure (de-emphasis grey, the current
     period in the accent with a surface ring) ------------------------------- */
  .spark { display: block; width: 100%; height: 2rem; min-width: 4rem; }
  .stat .spark { order: 0; margin-block: var(--space-1) var(--space-3); }
  .spark--sm { height: 1.5rem; }
  .spark--lg { height: 3rem; }
  .spark__svg { display: block; max-width: 100%; height: auto; overflow: visible; }
  .spark__line { fill: none; stroke: var(--chart-other); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .spark__area { fill: var(--chart-other); fill-opacity: .12; stroke: none; }
  .spark__dot { fill: var(--chart-1); stroke: var(--chart-surface); stroke-width: 2; }

  /* ---- Meter: one ratio against its limit -------------------------------------
     The fill carries the severity (accent → warning → danger: --warn,
     --danger from data-low / data-high), the track is a lighter step of the
     same hue; a warning or a danger also says so, never by colour alone: its
     icon (a triangle, an octagon) and its word ("atenție", "critic") in the
     generated .meter__state — beside the value of a bar, under a ring's label. */
  .meter {
    --meter-fill: var(--chart-1);
    --meter-track: color-mix(in oklab, var(--meter-fill) 16%, transparent);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-2) var(--space-3); min-width: 0;
    transition: --meter-p var(--dur-4) var(--ease-spring);
  }
  .meter--warn { --meter-fill: var(--color-dot-warn); }
  .meter--danger { --meter-fill: var(--color-dot-danger); }
  .meter__label { min-width: 0; font-size: var(--step--1); font-weight: var(--fw-medium); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .meter__value {
    display: inline-flex; align-items: center; gap: .25rem; justify-self: end;
    font-size: var(--step--1); font-weight: var(--fw-semibold); line-height: 1.35; color: var(--color-heading);
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .meter__state {
    display: inline-flex; align-items: center; gap: .25rem; margin-right: .375rem;
    font-size: .75rem; font-weight: var(--fw-medium); line-height: 1.3; letter-spacing: var(--tracking-small);
    color: var(--color-text-muted); white-space: nowrap;
  }
  .meter__state .icon { flex: none; width: .875rem; height: .875rem; stroke-width: 2.2; color: var(--meter-fill); }
  .meter__track {
    position: relative; grid-column: 1 / -1; height: .5rem; overflow: hidden;
    border-radius: var(--radius-pill); background: var(--meter-track);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .meter__fill {
    position: absolute; inset: 0; border-radius: inherit; background: var(--meter-fill);
    clip-path: inset(0 calc((1 - var(--meter-p)) * 100%) 0 0 round var(--radius-pill));
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* The ring: a conic fill on its track, rounded at both ends */
  .meter--ring { --ring: 5.75rem; --ring-w: .625rem; grid-template-columns: auto; justify-items: center; align-content: start; text-align: center; }
  .meter__ring { position: relative; display: grid; place-items: center; width: var(--ring); height: var(--ring); }
  .meter__ring::before, .meter__ring::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .meter__ring::before {
    background:
      radial-gradient(circle at 50% calc(var(--ring-w) / 2), var(--meter-fill) calc(var(--ring-w) / 2 - .5px), transparent calc(var(--ring-w) / 2)),
      conic-gradient(var(--meter-fill) calc(var(--meter-p) * 360deg), var(--meter-track) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w) - .5px), #000 calc(100% - var(--ring-w)));
    mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w) - .5px), #000 calc(100% - var(--ring-w)));
  }
  .meter__ring::after {
    background: radial-gradient(circle at 50% calc(var(--ring-w) / 2), var(--meter-fill) calc(var(--ring-w) / 2 - .5px), transparent calc(var(--ring-w) / 2));
    rotate: calc(var(--meter-p) * 360deg);
  }
  .meter--ring .meter__value {
    position: relative; justify-self: center; font-size: 1.0625rem; letter-spacing: -.01em;
    font-variant-numeric: proportional-nums lining-nums;
  }
  .meter--ring .meter__label { max-width: 10rem; text-align: center; text-wrap: balance; }
  .meter--ring .meter__state { margin: -.25rem 0 0; }
  .meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-5) var(--space-8); }
  /* rings: as many in a row as fit (three on a phone), a shorter last row centred */
  .meters--rings { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6) var(--space-4); }
  .meters--rings > .meter { flex: 1 1 var(--ring); max-width: 11rem; }

  /* ---- Bar list: a semantic ranking (label · value · bar) ------------------------ */
  .bar-list { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
  .bar-list__item {
    --bar-c: var(--chart-1);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .375rem var(--space-3);
    transition: --bar-p var(--dur-4) var(--ease-spring);
  }
  .bar-list__item::after {
    content: ""; grid-column: 1 / -1; height: .375rem; border-radius: 0 3px 3px 0; background: var(--bar-c);
    clip-path: inset(0 calc((1 - var(--bar-p)) * 100%) 0 0 round 0 3px 3px 0);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .bar-list.has-emphasis .bar-list__item:not(.is-emphasis) { --bar-c: var(--chart-other); }
  .bar-list__label {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: var(--step--1); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text);
  }
  a.bar-list__label { text-decoration: none; }
  a.bar-list__label:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  .bar-list__item.is-emphasis .bar-list__label { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .bar-list__value { font-size: var(--step--1); font-weight: var(--fw-semibold); line-height: 1.35; color: var(--color-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .bar-list__value small { margin-left: .25rem; font-size: .8125rem; font-weight: var(--fw-regular); color: var(--color-text-subtle); }

  /* ---- Forced colours: the system palette; charts.js redraws with system
     colours and textures, so the drawing (the SVG, the swatches, the scale)
     keeps what it drew; the HTML over it (the donut's total, the empty note,
     the tooltip) takes the system's colours like any text ------------------- */
  @media (forced-colors: active) {
    .chart__canvas svg, .chart__swatch, .chart-tip__key, .chart__scale-bar, .spark { forced-color-adjust: none; }
    .chart__total-value, .chart__total-label, .chart__empty,
    .chart-tip__head, .chart-tip__value, .chart-tip__name, .chart-tip__note, .chart-tip__foot { color: CanvasText; }
    .chart-tip { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
    .chart-tip__key { outline: 1px solid CanvasText; outline-offset: 0; }
    .chart.is-textured .chart__swatch:not(.chart__swatch--line, .chart__swatch--dash) {
      background-color: Canvas; box-shadow: inset 0 0 0 1px CanvasText;
      background-image: repeating-linear-gradient(var(--chart-key-angle, 45deg), CanvasText 0 1.4px, transparent 1.4px var(--chart-key-gap, 3px));
    }
    .chart__key[aria-pressed="false"] .chart__swatch { background: Canvas; box-shadow: inset 0 0 0 1px GrayText; }
    .chart__tool[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
    .spark__line { stroke: CanvasText; }
    .spark__area { fill: transparent; }
    .spark__dot { fill: Highlight; stroke: Canvas; }
    /* only the drawn parts keep their colours (the ring's track and caps, the
       bars): the figures and names in and beside them take the system's text */
    .meter__track, .meter__fill, .meter__ring::before, .meter__ring::after, .bar-list__item::after { forced-color-adjust: none; }
    .meter { --meter-fill: Highlight; --meter-track: Canvas; }
    .meter__track { box-shadow: inset 0 0 0 1px CanvasText; }
    /* the ring as the bar: Highlight on a Canvas track, both rims in CanvasText (a
       GrayText track can sit 1.1:1 from Highlight in a light system palette) */
    .meter__ring::before {
      background:
        radial-gradient(circle at 50% calc(var(--ring-w) / 2), var(--meter-fill) calc(var(--ring-w) / 2 - .5px), transparent calc(var(--ring-w) / 2)),
        radial-gradient(farthest-side, transparent calc(100% - 1.5px), CanvasText calc(100% - 1px)),
        radial-gradient(farthest-side, transparent calc(100% - var(--ring-w) - .5px), CanvasText calc(100% - var(--ring-w)), CanvasText calc(100% - var(--ring-w) + 1px), transparent calc(100% - var(--ring-w) + 1.5px)),
        conic-gradient(var(--meter-fill) calc(var(--meter-p) * 360deg), var(--meter-track) 0);
    }
    .meter__state .icon { color: CanvasText; }
    .bar-list__item { --bar-c: CanvasText; }
    .bar-list.has-emphasis .bar-list__item:not(.is-emphasis) { --bar-c: GrayText; }
    .bar-list.has-emphasis .bar-list__item.is-emphasis { --bar-c: Highlight; }
  }

  /* ---- Print: every chart drawn (beforeprint), in the light set, with
     textures; the tools go, the chart scales to the paper ------------------ */
  @media print {
    .chart-grid { display: block; }
    .chart-grid > * + * { margin-top: var(--space-4); }
    .chart, .chart-card, .meter, .bar-list__item { break-inside: avoid; }
    .chart__actions, .chart__data-bar, .chart-tooltip, .chart-filters { display: none !important; }
    .chart__plot { height: auto !important; }
    .chart__canvas, .chart__canvas > div { position: static !important; width: 100% !important; height: auto !important; }
    .chart__canvas svg { position: static !important; display: block; width: 100% !important; height: auto !important; }
    .chart:not(.is-rendered) > .chart__data { display: block !important; }
    .chart:not(.is-rendered) > :is(.chart__body, .chart__plot) { display: none !important; }
    .chart__data .table-wrap { max-height: none; overflow: visible; }
  }
}

/* ---- css/components/meta.css ---- */
/* Atlas · Meta
   A row of short facts with icons: "Termen: 30 de zile · Gratuit · Online".
     <ul class="meta"><li><svg class="icon">…</svg> Termen: <b>30 de zile</b></li>…</ul>
   14px muted, 16px icons in the subtle grey, the value that matters in
   <b> (heading, 600). .meta--stack puts one fact per line; a .due, .tag or
   .status may stand in for the value. */
@layer components {
  .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); padding: 0; list-style: none; font-size: var(--step--1); line-height: 1.4; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .meta > li { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; }
  .meta .icon { flex: none; width: 1rem; height: 1rem; color: var(--color-text-subtle); }
  .meta b { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .meta .due { margin-left: .1rem; }
  .meta--stack { display: grid; gap: var(--space-3); }
}

/* ---- css/components/official-bar.css ---- */
/* Atlas · Official bar
   The thin strip above the header of a public platform: who runs the site
   and how to recognise its official address. The note opens in a popover.
     <div class="official-bar"><div class="container official-bar__inner">
       <span class="official-bar__flag" aria-hidden="true"></span>
       <span class="official-bar__text">Platformă oficială a <strong>Ministerului …</strong></span>
       <button type="button" class="official-bar__toggle" popovertarget="official-note">Cum recunoști un site oficial <svg class="icon">…</svg></button>
       <div class="popover official-bar__note" id="official-note" popover>…</div>
     </div></div>
   On a page that opens on the dark stage, give it data-scheme="dark" (with
   the header): it turns #101012 with light text, so there is no light seam
   above the stage. */
@layer components {
  .official-bar {
    background: var(--color-bg-alt); color: var(--color-text-muted); font-size: .8125rem; line-height: 1.35; letter-spacing: var(--tracking-small);
  }
  .official-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem var(--space-3); min-height: 2.25rem; padding-block: .35rem; }
  .official-bar__flag {
    flex: none; width: 1.125rem; height: .75rem; border-radius: 2px;
    background: linear-gradient(90deg, var(--flag-blue) 0 33.34%, var(--flag-yellow) 0 66.67%, var(--flag-red) 0);
    box-shadow: 0 0 0 .5px var(--color-border-strong);
  }
  .official-bar__text strong { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .official-bar__toggle {
    display: inline-flex; align-items: center; gap: .25rem; color: var(--color-link); font-weight: var(--fw-medium);
    text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
    transition: color var(--dur-1) var(--ease-out), text-decoration-color var(--dur-1) var(--ease-out);
  }
  .official-bar__toggle:hover { color: var(--color-link-hover); text-decoration-color: currentColor; }
  /* the chevron flips while the note is open (M20) */
  .official-bar__toggle .icon { width: .8rem; height: .8rem; transition: transform var(--dur-3) var(--ease-spring); }
  .official-bar__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .official-bar__note { width: min(30rem, calc(100vw - 2rem)); }
  .official-bar__points { display: grid; gap: var(--space-4); padding: 0; list-style: none; }
  .official-bar__points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); font-size: var(--step--1); line-height: 1.5; color: var(--color-text-muted); }
  .official-bar__points .icon { width: 1.25rem; height: 1.25rem; margin-top: .1rem; color: var(--color-accent-figure); }
  .official-bar__points b { display: block; color: var(--color-heading); }
  /* touch: an invisible 44px hit area, the bar keeps its 36px */
  @media (pointer: coarse) {
    .official-bar__toggle { position: relative; z-index: 1; }   /* its hit area stays above the wrapped text line */
    /* most of the extra height goes up, over the bar's text: the header below covers its bottom edge */
    .official-bar__toggle::after { content: ""; position: absolute; inset: calc(100% - var(--target-min) + .3rem) -.25rem -.3rem; }
  }
}

/* ---- css/components/service-card.css ---- */
/* Atlas · Service card, service grid, bento, quick links (spec §3.3, K1, K3)
   One online service: an icon disc, its name, one line on what it is for,
   and the practical facts. A tile, separated by tone (portal) or by a
   hairline and a whisper shadow (app): background var(--color-tile),
   radius var(--radius-tile), box-shadow var(--tile-ring), var(--tile-shadow).
     <div class="service-grid">
       <a class="service-card" href="…">
         <span class="service-card__icon"><svg class="icon" aria-hidden="true">…</svg></span>
         <svg class="icon service-card__go" aria-hidden="true"><use href="…#i-arrow"/></svg>
         <span class="service-card__title">Certificat de urbanism</span>
         <span class="service-card__text">…</span>
         <ul class="meta service-card__meta"><li><svg class="icon">…</svg> Termen: <b>30 de zile</b></li></ul>
       </a>
       <div class="service-card service-card--off">… <span class="tag">În curând</span> …</div>
     </div>
   Linked tiles lift 2px under the pointer (--tile-shadow-hover: the soft
   lift on the portal, --shadow-2 with the ring in the app), the title
   underlines, the .go disc turns primary and nudges; pressed: .985.

   Bento — explicit, never inferred from the number of children:
     <div class="service-grid service-grid--bento">
       <a class="service-card service-card--lead" href="…">  icon, go, title, text, then
         <dl class="facts">…</dl></a>                        (facts.css)
       … five more .service-card …
     </div>
   When the grid is 60rem wide or more, the lead tile spans 2 × 2 with the
   contour rings in its corner and a large title; narrower, it is a normal
   tile that keeps its facts. Put the lead tile first (reading order).

   .service-card--featured  a dark tile (stage colours)
   .service-card--off       a service that is not online yet

   Three tiles in a row (help, contact, a pack of three) — explicit:
     <div class="service-grid service-grid--trio">…three .service-card…</div>
   Three across while three 19rem tiles fit, one column otherwise: never
   two and an orphan (clamp() picks the track from the row's own width,
   as .stats does).
   Hover (lift, underline, the .go disc) happens only where a pointer can
   hover (hover: hover): a tap on a phone never leaves a tile raised. */
@layer components {
  .service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--tile-gap); }
  .service-grid--trio {
    --trio-min: clamp((100% - 2 * var(--tile-gap)) / 3 - .5px, (57rem + 2 * var(--tile-gap) - 100%) * 999, 100%);
    grid-template-columns: repeat(auto-fit, minmax(var(--trio-min), 1fr));
  }

  .service-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0;
    padding: var(--card-pad); padding-inline-end: calc(var(--card-pad) + 2.25rem);
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    color: inherit; text-decoration: none;
    transition: background-color var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease-out);
  }
  a.service-card:hover { color: inherit; text-decoration: none; }
  @media (hover: hover) {
    a.service-card:hover { background: var(--color-tile-hover); box-shadow: var(--tile-ring), var(--tile-shadow-hover); transform: translateY(var(--lift)); }
    a.service-card:hover .service-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
  }
  a.service-card:active { transform: scale(var(--press-scale-tile)); box-shadow: var(--tile-ring), var(--tile-shadow); transition-duration: var(--dur-1); }
  a.service-card:focus-visible { outline-offset: 3px; }

  .service-card__icon {
    display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; margin-bottom: var(--space-5); border-radius: 50%;
    background: var(--color-chip, var(--color-plane, var(--color-bg))); color: var(--color-accent-figure);
  }
  .service-card__icon .icon { width: 1.35rem; height: 1.35rem; }
  .service-card__title {
    font: var(--fw-semibold) var(--step-tile-title)/1.2 var(--font-display); letter-spacing: var(--tracking-tile-title);
    color: var(--color-heading); text-wrap: balance;
  }
  .service-card__text { max-width: 40ch; font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-wrap: pretty; }
  .service-card__meta { margin-top: auto; padding-top: var(--space-5); width: 100%; font-size: .8125rem; gap: var(--space-1) var(--space-4); }
  .service-card__meta .icon { width: .875rem; height: .875rem; }
  .service-card__go {
    position: absolute; top: var(--card-pad); right: var(--card-pad);
    width: 2.25rem; height: 2.25rem; padding: .6rem; border-radius: 50%;
    background: var(--color-chip, var(--color-plane, var(--color-bg))); color: var(--color-heading);
    transition: transform var(--dur-3) var(--ease-spring), color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
  }
  @media (hover: hover) {
    a.service-card:hover .service-card__go { transform: translateX(var(--nudge)); background: var(--color-primary); color: var(--color-on-primary); }
  }
  .service-card > .tag { position: absolute; top: var(--card-pad); right: var(--card-pad); }

  /* Not online yet: no fill, a hairline ring, a muted title */
  .service-card--off { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
  .service-card--off .service-card__icon { background: var(--color-fill); color: var(--color-text-subtle-on-fill); }
  .service-card--off .service-card__title { color: var(--color-text-muted); }

  /* Featured: a dark tile in the stage colours */
  .service-card--featured { background: var(--color-inverse-tile); box-shadow: none; color: var(--color-on-inverse-muted); }
  .service-card--featured .service-card__icon { background: color-mix(in oklab, var(--color-on-inverse) 10%, transparent); color: var(--color-on-inverse-accent); }
  .service-card--featured .service-card__title { color: var(--color-on-inverse); }
  .service-card--featured .service-card__text, .service-card--featured .meta { color: var(--color-on-inverse-muted); }
  .service-card--featured .meta b { color: var(--color-on-inverse); }
  .service-card--featured .meta .icon { color: var(--color-on-inverse-accent); }
  .service-card--featured .service-card__go { background: color-mix(in oklab, var(--color-on-inverse) 10%, transparent); color: var(--color-on-inverse); }
  @media (hover: hover) {
    a.service-card--featured:hover { background: color-mix(in oklab, var(--color-inverse-tile), var(--color-on-inverse) 6%); }
  }

  /* ---- Bento (explicit) ---------------------------------------------------- */
  .service-grid--bento { container: bento / inline-size; }
  .service-card--lead { isolation: isolate; overflow: hidden; }
  /* contour rings from the top-right corner, the hero's motif in miniature;
     they widen a little under the pointer. The rings interpolate in sRGB:
     their stops are colour mixes (non-legacy colours), so by default the
     gradient would mix in Oklab, and Firefox then fills the gaps between the
     hard stops instead of drawing 1px rings. An engine that cannot read the
     interpolation keeps the first declaration: the glow alone. */
  .service-card--lead::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(70% 60% at 100% 0%, color-mix(in oklab, var(--color-accent) 9%, transparent), transparent 75%);
    background:
      repeating-radial-gradient(in srgb circle at 100% 0%, transparent 0 2.1rem, color-mix(in oklab, var(--color-accent) 22%, transparent) 2.1rem calc(2.1rem + 1px)),
      radial-gradient(70% 60% at 100% 0%, color-mix(in oklab, var(--color-accent) 9%, transparent), transparent 75%);
    -webkit-mask-image: radial-gradient(85% 85% at 100% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(85% 85% at 100% 0%, #000 0%, transparent 78%);
    transform-origin: 100% 0;
    transition: transform var(--dur-4) var(--ease-spring);
  }
  @media (prefers-reduced-motion: no-preference) and (hover: hover) {
    a.service-card--lead:hover::before { transform: scale(1.06); }
    :where(.a11y-motion) a.service-card--lead:hover::before { transform: none; }
  }
  /* the facts take the full width of the tile (the end padding only keeps
     text clear of the .go disc) and stay three across in a narrow tile */
  .service-card--lead .facts {
    width: calc(100% + 2.25rem); margin-top: var(--space-6);
    --facts-min: 4.5rem; --facts-gap: var(--space-6);
  }
  .service-card--lead .facts__value { font-size: clamp(1.75rem, 1.55rem + .6vw, 2.25rem); }
  @container bento (min-width: 60rem) {
    .service-card--lead {
      grid-column: span 2; grid-row: span 2; gap: var(--space-3);
      padding: clamp(2rem, 1.4rem + 1.4vw, 2.75rem);
    }
    .service-card--lead .service-card__icon { width: 4.25rem; height: 4.25rem; margin-bottom: auto; }
    .service-card--lead .service-card__icon .icon { width: 1.9rem; height: 1.9rem; stroke-width: 1.5; }
    .service-card--lead .service-card__title {
      margin-top: var(--space-12); max-width: 10em;
      font-size: clamp(2rem, 1.3rem + 2vw, 3rem); font-weight: var(--fw-display); line-height: 1.04; letter-spacing: var(--tracking-title);
    }
    .service-card--lead .service-card__text { max-width: 30ch; font-size: var(--step-1); line-height: 1.45; letter-spacing: var(--tracking-text); }
    .service-card--lead .service-card__meta { margin-top: var(--space-4); padding-top: 0; font-size: var(--step--1); }
    .service-card--lead .service-card__go { top: clamp(2rem, 1.4rem + 1.4vw, 2.75rem); right: clamp(2rem, 1.4rem + 1.4vw, 2.75rem); width: 2.75rem; height: 2.75rem; padding: .75rem; }
    .service-card--lead .facts { margin-top: var(--space-8); --facts-gap: clamp(1.25rem, .8rem + 1.6vw, 2.5rem); }
    .service-card--lead .facts__value { font-size: clamp(2.25rem, 1.8rem + 1.3vw, 3rem); }
  }
}

/* Quick links: the few most used services, as one panel.
     <nav class="quick-links" aria-labelledby="ql-t"><p class="quick-links__title" id="ql-t">Cele mai cerute</p>
       <a class="quick-links__item" href="…"><span class="quick-links__icon"><svg class="icon">…</svg></span>
         <span class="quick-links__text"><b>Certificat de urbanism</b><small>15 minute · online</small></span><svg class="icon">…#i-arrow</svg></a>
     </nav>
   As a list (here, in the light hero's frosted sheet, on a phone) each row
   ends in a CSS chevron › (spec §3.1); on the stage hero the rows become
   four glass tiles and the arrow of the markup sits in a round disc
   (hero.css); the light hero's sheet is in hero-variants.css. */
@layer components {
  .quick-links { display: grid; gap: 2px; padding: var(--space-2); border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow); color: var(--color-text); }
  .quick-links__title { padding: var(--space-3) var(--space-3) var(--space-2); font: var(--fw-semibold) .875rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .quick-links__item {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3);
    border-radius: calc(var(--radius-tile) - var(--space-2)); color: var(--color-heading); text-decoration: none;
    transition: background-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
  }
  .quick-links__item:hover { color: var(--color-heading); text-decoration: none; }
  @media (hover: hover) { .quick-links__item:hover { background: var(--color-chip, var(--color-plane, var(--color-bg))); } }
  .quick-links__item:active { transform: scale(var(--press-scale-tile)); }
  .quick-links__item:focus-visible { outline-offset: -3px; }
  .quick-links__icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--color-chip, var(--color-plane, var(--color-bg))); color: var(--color-accent-figure); }
  .quick-links__icon .icon { width: 1.15rem; height: 1.15rem; }
  .quick-links__text { display: grid; gap: .1rem; min-width: 0; }
  .quick-links__text b { font-size: var(--step-0); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-body); }
  .quick-links__text small { font-size: .8125rem; line-height: 1.35; color: var(--color-text-subtle); }
  /* the row ends in a 14px chevron (a list row, spec §3.4); the arrow icon of
     the markup waits for the stage tiles, where hero.css shows it in a disc */
  .quick-links__item > .icon { display: none; }
  .quick-links__item::after {
    content: ""; justify-self: end; width: .5rem; height: .5rem; margin-right: .375rem;
    border: solid var(--color-text-subtle); border-width: 1.6px 1.6px 0 0; border-radius: 1px; rotate: 45deg;
    transition: translate var(--dur-2) var(--ease-spring), border-color var(--dur-2) var(--ease-out);
  }
  @media (hover: hover) { .quick-links__item:hover::after { translate: var(--nudge) 0; border-color: var(--color-heading); } }
}

/* ---- css/components/task-list.css ---- */
/* Atlas · Task list
   The parts of a long process and where each one stands, so a person can do
   them in any order and come back later. Each section: a heading (step-1,
   its number in the subtle grey), then its items in one tile, separators
   inset to the text.
     <ol class="task-list">
       <li class="task-list__section">
         <h2 class="task-list__heading"><span class="task-list__num">1.</span> Date despre lucrare</h2>
         <ul class="task-list__items">
           <li class="task-list__item">
             <a class="task-list__link" href="…">Informații generale</a>
             <span class="task-list__hint">…</span>
             <span class="tag tag--success">Completat</span>
           </li>
           <li class="task-list__item is-blocked"><span class="task-list__link">…</span><span class="tag tag--outline">Indisponibil</span></li>
     Tags: tag--success Completat · tag--info În lucru · tag Neînceput · tag--outline Indisponibil.
   .task-summary above it: "Ai completat 3 din 6 secțiuni" with a progress bar. */
@layer components {
  .task-summary { display: grid; gap: var(--space-2); max-width: 32rem; }
  .task-summary__text { font-size: var(--step--1); color: var(--color-text-muted); }
  .task-summary__text b { color: var(--color-heading); font-weight: var(--fw-semibold); }

  .task-list { display: grid; gap: var(--space-8); padding: 0; list-style: none; }
  .task-list__section { min-width: 0; }
  .task-list__heading { display: flex; gap: .5rem; margin-bottom: var(--space-3); font: var(--fw-semibold) var(--step-1)/1.3 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .task-list__num { color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .task-list__items {
    --task-px: var(--space-5);
    padding: 0; list-style: none; overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .task-list__item {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .15rem var(--space-4);
    min-height: 3.5rem; padding: .8rem var(--task-px); transition: background-color var(--dur-1) var(--ease-out);
  }
  .task-list__item + .task-list__item::before { content: ""; position: absolute; top: 0; left: var(--task-px); right: 0; height: 1px; background: var(--color-border); pointer-events: none; }
  .task-list__link { font-weight: var(--fw-semibold); letter-spacing: -.011em; color: var(--color-link); text-decoration: none; }
  a.task-list__link::after { content: ""; position: absolute; inset: 0; }
  a.task-list__link:focus-visible { outline: none; }
  .task-list__item:has(> a.task-list__link:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: -3px; border-radius: var(--radius-md); }
  .task-list__item:has(> a.task-list__link:hover) { background: var(--color-fill-subtle); }
  .task-list__item:has(> a.task-list__link:hover) .task-list__link { color: var(--color-link-hover); }
  .task-list__item:has(> a.task-list__link:active) { background: var(--color-fill); }
  .task-list__hint { grid-column: 1; font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .task-list__item > .tag { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
  .task-list__item.is-blocked .task-list__link { color: var(--color-text-muted); text-decoration: none; font-weight: var(--fw-medium); }
  /* forced colours drop backgrounds: the separators are drawn in GrayText */
  @media (forced-colors: active) {
    .task-list__item + .task-list__item::before { forced-color-adjust: none; background: GrayText; }
  }
}

/* ---- css/components/summary-list.css ---- */
/* Atlas Modern · Summary list (spec §3.3, §5.6 verificare, §5.4 dosar)
   The answers given so far, each with a way back to change it (the "check
   your answers" page before submitting), or the facts of a record. An
   inset-grouped tile: a title, then rows of key (muted) · value ·
   „Modifică ›", split by hairlines that start at the text and run to the
   tile's edge.
     <section class="summary-card" aria-labelledby="v-sol">
       <div class="summary-card__head"><h2 class="summary-card__title" id="v-sol">Solicitantul</h2>
         <a class="summary-card__action" href="…">Modifică<span class="visually-hidden"> datele solicitantului</span></a></div>   (one link for the whole card, optional)
       <dl class="summary-list">
         <div class="summary-list__row"><dt>Nume</dt><dd>Ion Popescu</dd>
           <dd class="summary-list__action"><a href="…">Modifică<span class="visually-hidden"> numele</span></a></dd></div>
       </dl>
     </section>
   A .summary-list also stands alone (no tile), e.g. inside a side box.
   On phones the key goes above its value; the link stays at the row's end. */
@layer components {
  .summary-card {
    --summary-pad: var(--card-pad);
    border-radius: var(--radius-tile); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow); overflow: clip;
  }
  .summary-card + .summary-card { margin-top: var(--space-4); }
  .summary-card__head {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4);
    padding: calc(var(--summary-pad) * .8) var(--summary-pad) .25rem;
  }
  .summary-card__title { font: var(--fw-semibold) var(--step-1)/1.3 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .summary-card > .summary-list { padding: 0 0 calc(var(--summary-pad) * .3) var(--summary-pad); }
  .summary-card > .summary-list > * { padding-right: var(--summary-pad); }

  /* „Modifică ›": a link with a CSS chevron that moves on hover */
  .summary-card__action, .summary-list__action a {
    display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; min-height: 1.5rem;   /* WCAG 2.5.8: 24px with any pointer */
    font-size: var(--step--1); font-weight: var(--fw-medium); line-height: 1.3; letter-spacing: var(--tracking-ui);
    color: var(--color-link); text-decoration: none;
  }
  .summary-card__action::after, .summary-list__action a::after {
    content: ""; flex: none; width: .4rem; height: .4rem; margin-left: .05rem;
    border-top: 1.75px solid currentColor; border-right: 1.75px solid currentColor; rotate: 45deg;
    transition: translate var(--dur-2) var(--ease-spring);
  }
  .summary-card__action:hover, .summary-list__action a:hover {
    color: var(--color-link-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  }
  .summary-card__action:hover::after, .summary-list__action a:hover::after { translate: var(--nudge) 0; }
  /* touch: "Modifică ›" gets an invisible 44px hit area (::after is the chevron) */
  @media (pointer: coarse) {
    .summary-card__action, .summary-list__action a { position: relative; }
    .summary-card__action::before, .summary-list__action a::before { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) -.4rem; }
  }

  .summary-list { margin: 0; }
  .summary-list__row {
    display: grid; grid-template-columns: minmax(7.5rem, 30%) minmax(0, 1fr) auto; align-items: baseline;
    gap: var(--space-1) var(--space-5); padding-block: .875rem;
    border-bottom: 1px solid var(--color-border);
  }
  .summary-list__row:last-child { border-bottom: 0; }
  .summary-list dt {
    min-width: 0; font-size: calc(var(--step-0) - .0625rem); font-weight: var(--fw-regular); line-height: 1.5;
    letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
  }
  .summary-list dd {
    margin: 0; min-width: 0; font-size: calc(var(--step-0) - .0625rem); line-height: 1.5;
    letter-spacing: var(--tracking-ui); color: var(--color-heading); overflow-wrap: anywhere;
  }
  .summary-list dd.summary-list__action { justify-self: end; text-align: end; }
  .summary-list .file-list { margin-top: .125rem; }
  @media (max-width: 640px) {
    .summary-list__row { grid-template-columns: minmax(0, 1fr) auto; gap: .125rem var(--space-4); }
    .summary-list dt { grid-column: 1; grid-row: 1; font-size: .8125rem; }
    .summary-list dd:not(.summary-list__action) { grid-column: 1 / -1; grid-row: 2; }
    .summary-list dd.summary-list__action { grid-column: 2; grid-row: 1; }
  }
}

/* ---- css/components/confirm-panel.css ---- */
/* Atlas Modern · Confirmation panel (spec §3.7, M27, §5.6 confirmare)
   The end of a process: what happened, the reference number to keep, and
   (below it, in the page) what happens next (.timeline). A tile with a 72px
   success disc whose tick draws itself: the disc springs from .6 to 1
   (bounce, 420ms), then the tick draws (stroke-dashoffset, 420ms). The
   reference number sits in a fill pill, in mono, with its copy button.
     <div class="confirm-panel" role="status">
       <span class="confirm-panel__icon"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path pathLength="1" d="M5 12.5 10 17.5 19 7"/></svg></span>
       <h1 class="confirm-panel__title">Cererea a fost trimisă</h1>
       <p class="confirm-panel__text">Numărul cererii tale. Îl găsești oricând în „Cererile mele”.</p>
       <p class="confirm-panel__ref"><span id="ref">GU-2026-004812</span>
         <button type="button" class="btn btn--secondary btn--sm" data-copy="ref"><svg class="icon" aria-hidden="true">…#i-copy</svg> <span>Copiază</span></button></p>
     </div>
   The tick is drawn on an inline path (the i-check path with
   pathLength="1"): browsers do not animate a stroke inside a sprite <use>.
   With the sprite icon (<use href="…#i-check">) the tick pops in instead.
   --warning: something still needs to be done (pay a fee; maintenance):
   a warning disc with its own icon (i-clock, i-alert), no drawing. */
@layer components {
  .confirm-panel {
    --cp-solid: var(--color-success-solid); --cp-on: var(--color-on-primary);
    display: grid; justify-items: center; gap: var(--space-4); min-width: 0;
    padding: clamp(2rem, 1.25rem + 3vw, 3.5rem) clamp(1.25rem, .75rem + 2vw, 3rem);
    border: 0; border-radius: var(--radius-tile); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow); text-align: center;
  }
  /* orange takes a dark glyph in dark mode (--color-on-warning-solid: white
     in light, #2C2C2E in dark: 6.8:1 on #FF9F0A), as the warning toast does */
  .confirm-panel--warning { --cp-solid: var(--color-warning-solid); --cp-on: var(--color-on-warning-solid); }
  .confirm-panel__icon {
    display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: var(--space-2); border-radius: 50%;
    background: var(--cp-solid); color: var(--cp-on);
    box-shadow: 0 0 0 .5rem color-mix(in oklab, var(--cp-solid) 12%, transparent);
    animation: atlas-cp-disc var(--dur-3) var(--ease-bounce) backwards;
  }
  .confirm-panel__icon .icon { width: 2.25rem; height: 2.25rem; stroke-width: 2.4; }
  /* M27: after the disc, the tick. An inline path draws itself; a sprite
     icon (any icon of the success panel) pops in after the disc. */
  .confirm-panel:not(.confirm-panel--warning) .confirm-panel__icon .icon > use {
    transform-box: view-box; transform-origin: 50% 50%;
    --pop-y: 0px; --pop-scale: .5; animation: atlas-pop var(--dur-2) var(--ease-bounce) 200ms backwards;
  }
  .confirm-panel:not(.confirm-panel--warning) .confirm-panel__icon .icon > path {
    stroke-dasharray: 1; stroke-dashoffset: 0;
    animation: atlas-cp-tick var(--dur-3) var(--ease-out) 200ms backwards;
  }
  @keyframes atlas-cp-disc { from { opacity: 0; scale: .6; } }
  @keyframes atlas-cp-tick { from { stroke-dashoffset: 1; } }

  .confirm-panel__title {
    max-width: 20ch; font-size: var(--step-4); font-weight: var(--fw-display); line-height: var(--lh-display);
    letter-spacing: var(--tracking-title); color: var(--color-heading); text-wrap: balance;
  }
  .confirm-panel__text { max-width: 48ch; font-size: var(--step-0); line-height: 1.5; color: var(--color-text-muted); text-wrap: pretty; }
  /* The reference: one fill pill — the number in mono 20px, the copy
     button raised inside it like a segmented thumb. */
  .confirm-panel__ref {
    display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-3);
    max-width: 100%; margin-top: var(--space-1); padding: .3125rem .3125rem .3125rem 1.125rem;
    border-radius: var(--radius-pill); background: var(--color-fill);
  }
  .confirm-panel__ref > span {
    min-width: 0; font: var(--fw-semibold) 1.25rem/1.2 var(--font-mono); letter-spacing: .01em;
    color: var(--color-heading); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
  }
  .confirm-panel__ref > .btn { background: var(--color-thumb); color: var(--color-heading); box-shadow: var(--shadow-thumb); }
  .confirm-panel__ref > .btn:hover { background: var(--color-thumb); color: var(--color-heading); box-shadow: var(--shadow-1), var(--shadow-thumb); }

  /* Forced colours: the disc keeps its shape in system colours */
  @media (forced-colors: active) {
    .confirm-panel { outline: 1px solid CanvasText; outline-offset: -1px; }
    .confirm-panel__icon { forced-color-adjust: none; background: Highlight; color: HighlightText; box-shadow: none; }
    .confirm-panel__ref { outline: 1px solid CanvasText; }
  }
}

/* ---- css/components/error-summary.css ---- */
/* Atlas Modern · Error summary (spec §3.7, M25)
   At the top of a form that could not be sent: every problem, each a link
   to its field. validate.js fills it for form[data-validate] (and shows the
   message under each field); it can also come from the server, already
   filled. A danger-tinted tile (radius 20, no border, no side stripe), a
   17/600 title in the danger colour, underlined danger links. When it
   appears it takes the focus and rises 6px into place; it never shakes.
     <div class="error-summary" tabindex="-1" role="alert">
       <h2 class="error-summary__title"><svg class="icon" aria-hidden="true">…#i-alert</svg> Formularul are 2 probleme</h2>
       <p class="error-summary__text">Corectează câmpurile și trimite din nou.</p>   (optional)
       <ul class="error-summary__list"><li><a href="#field">Completează „E-mail”.</a></li></ul>
     </div> */
@layer components {
  .error-summary {
    display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-6);
    border: 0; border-radius: var(--radius-lg);
    background: var(--color-danger-bg); color: var(--color-text);
    scroll-margin-top: calc(var(--header-h) + var(--space-6));
    --rise: 6px; animation: atlas-rise var(--dur-2) var(--ease-out) backwards;
  }
  /* Focused from code after a submit: the ring shows when the person is on
     the keyboard; otherwise the tile arriving is the cue. */
  .error-summary:focus { outline: none; }
  .error-summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
  .error-summary__title {
    display: flex; align-items: center; gap: var(--space-2);
    font: var(--fw-semibold) var(--step-0)/1.3 var(--font-text); letter-spacing: var(--tracking-body); color: var(--color-danger-fg);
  }
  .error-summary__title .icon { flex: none; width: 1.25rem; height: 1.25rem; }
  .error-summary__text { font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui); color: var(--color-text); }
  .error-summary__list { display: grid; gap: var(--space-2); margin: 0; padding: 0 0 0 1.75rem; list-style: none; }
  .error-summary__list a {
    font-size: .9375rem; font-weight: var(--fw-medium); line-height: 1.45; letter-spacing: var(--tracking-ui);
    color: var(--color-danger-fg); text-decoration-line: underline; text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in oklab, currentColor 55%, transparent); text-underline-offset: .2em;
  }
  .error-summary__list a:hover { color: var(--color-danger-fg); text-decoration-color: currentColor; text-decoration-thickness: 2px; }

  /* Forced colours: the tint is dropped, so the tile gets a frame */
  @media (forced-colors: active) {
    .error-summary { outline: 2px solid CanvasText; outline-offset: -2px; }
    .error-summary:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }
  }
}

/* ---- css/components/form-progress.css ---- */
/* Atlas Modern · Form progress, back link, one question per page
   (spec §3.6, G23, M30, §5.6, §5.13)
   Where a person is in a form of several pages, and the way back.
     <a class="back-link" href="…">Înapoi</a>
     <div class="form-progress">
       <p class="form-progress__label">Pasul 2 din 4 · <b>Documente</b></p>
       <ol class="form-progress__steps" aria-hidden="true"><li class="is-done"></li><li class="is-current"></li><li></li><li></li></ol>
     </div>
   The label says it in words (14px muted, the step name in heading); the
   segments only draw it: 6px pills, done in the primary blue, the current
   one filled to 55% with a soft leading-edge light that sweeps along it
   once when the page opens (M30). One blue only: no gradient of hues. */
@layer components {
  /* ---- Back link: 14/600 muted with a CSS chevron ‹ ---------------------- */
  .back-link {
    position: relative; display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
    font-size: var(--step--1); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-ui);
    color: var(--color-text-muted); text-decoration: none;
  }
  .back-link::before {
    content: ""; flex: none; width: .45rem; height: .45rem; margin-left: .15rem;
    border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg;
    transition: translate var(--dur-2) var(--ease-spring);
  }
  .back-link:hover { color: var(--color-heading); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
  .back-link:hover::before { translate: calc(-1 * var(--nudge)) 0; }
  /* Touch: a 44px hit area without changing the look (whatever the line height) */
  @media (pointer: coarse) { .back-link::after { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) -.5rem; } }

  /* ---- Form progress ------------------------------------------------------ */
  .form-progress { display: grid; gap: .625rem; }
  .form-progress__label {
    font-size: var(--step--1); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
    font-variant-numeric: tabular-nums lining-nums;
  }
  .form-progress__label b { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .form-progress__steps {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .3125rem;
    margin: 0; padding: 0; list-style: none;
  }
  .form-progress__steps > li { position: relative; height: .375rem; border-radius: var(--radius-pill); background: var(--color-fill-hover); }
  .form-progress__steps > li.is-done { background: var(--color-primary); }
  /* Current: the fill (::before) grows to 55% on the spring; the light
     (::after) travels along it once and settles on its leading edge. */
  .form-progress__steps > li.is-current::before,
  .form-progress__steps > li.is-current::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 55%; border-radius: inherit; pointer-events: none;
  }
  .form-progress__steps > li.is-current::before {
    /* the last 2.5rem brighten towards the tip: the light's tail */
    background: linear-gradient(90deg, var(--color-primary) calc(100% - 2.5rem), color-mix(in oklab, var(--color-primary), var(--color-on-primary) 28%));
    box-shadow: 0 0 10px -2px color-mix(in oklab, var(--color-primary) 45%, transparent);
    transform-origin: 0 50%;
    animation: atlas-fp-fill var(--dur-4) var(--ease-spring) 120ms backwards;
  }
  /* the light: a soft point centred on the tip (the box runs .5rem past it) */
  .form-progress__steps > li.is-current::after {
    top: -.25rem; bottom: -.25rem; width: calc(55% + .5rem); border-radius: 0;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--color-primary), var(--color-on-primary) 72%), color-mix(in oklab, var(--color-primary) 32%, transparent) 62%, transparent)
      100% 50% / 1.25rem 100% no-repeat;
    animation: atlas-fp-sweep 1.2s var(--ease-out) 120ms backwards;
  }
  @keyframes atlas-fp-fill { from { transform: scaleX(0); } }
  @keyframes atlas-fp-sweep {
    from { translate: -100% 0; opacity: 0; }
    20% { opacity: 1; }
  }

  /* ---- One question per page (§5.13): the question is the page title ---- */
  .question { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); max-width: 40rem; min-width: 0; }
  .question__title {
    font-size: var(--step-4); font-weight: var(--fw-display); line-height: var(--lh-display);
    letter-spacing: var(--tracking-title); color: var(--color-heading); text-wrap: balance;
  }
  .question__lead { max-width: 52ch; font-size: var(--step-intro); line-height: 1.45; letter-spacing: var(--tracking-body); color: var(--color-text-muted); text-wrap: pretty; }

  /* Forced colours: backgrounds are dropped, so the segments are drawn in
     system colours (track: an edge; done and the current fill: Highlight) */
  @media (forced-colors: active) {
    .form-progress__steps > li { forced-color-adjust: none; background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
    .form-progress__steps > li.is-done, .form-progress__steps > li.is-current::before { background: Highlight; box-shadow: none; }
    .form-progress__steps > li.is-current::after { display: none; }
  }
}

/* ---- css/components/action-bar.css ---- */
/* Atlas Modern · Action bar (spec G8, K4, §5.6)
   The buttons of a long form, kept in reach at the bottom of the screen:
   one floating capsule of thick material, the save status at its start
   (a success dot; a warning dot while there are unsaved changes), the
   buttons at its end. Above 640px it is always one row: the status gives
   way and ends in an ellipsis. At 640px and below it docks to the bottom
   edge, full width, the status above the buttons.
     <div class="action-bar">
       <span class="action-bar__status" data-draft-status>Toate modificările sunt salvate</span>
       <div class="action-bar__buttons">
         <a class="btn btn--ghost" href="…">Renunță</a>
         <button type="button" class="btn btn--secondary" data-draft-save>Salvează ciorna</button>
         <button type="submit" class="btn">Înregistrează dosarul</button>
       </div>
     </div>
   validate.js adds .is-dirty while form[data-track-changes] has unsaved
   changes and rewrites the status text; the status is a polite live region
   (role="status", set by validate.js), so a save is announced.
   A bar too narrow for its status (a container under 34rem, above 640px:
   a form beside its table of contents on a small laptop) shows the dot and
   a short word instead (data-short, written by validate.js: "Salvat",
   "Nesalvat"); the full text stays the status' accessible text.
   On phones the page keeps the docked bar's height as scroll padding, so a
   field that takes the focus is never hidden under it. */
/* the docked bar's height (forms.js writes it on <html>, only while the bar
   is docked) is read on <html> only: it need not inherit to every element */
@property --action-bar-h { syntax: "*"; inherits: false; }
@layer components {
  .action-bar {
    container: action-bar / inline-size;
    position: sticky; bottom: var(--space-4); z-index: var(--z-sticky);
    display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-4);
    margin-top: var(--space-8); padding: .375rem .375rem .375rem 1.25rem;
    border: 0; border-radius: var(--radius-pill);
    background: var(--material-overlay);
    -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-3), 0 0 0 .5px var(--color-border-strong);
  }
  .action-bar__status {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .8125rem; line-height: 1.4; letter-spacing: var(--tracking-small); color: var(--color-text-muted);
  }
  .action-bar__status::before {
    content: ""; display: inline-block; width: .5rem; height: .5rem; margin: 0 .5rem .0625rem 0; border-radius: 50%; vertical-align: middle;
    background: var(--color-success-solid);
    animation: atlas-ab-saved var(--dur-2) var(--ease-bounce) backwards;
  }
  .action-bar.is-dirty .action-bar__status { color: var(--color-text); }
  .action-bar.is-dirty .action-bar__status::before {
    background: var(--color-dot-warn); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-dot-warn) 22%, transparent);
    animation-name: atlas-ab-dirty;
  }
  /* the dot pops when the state changes (two names, so each change restarts it) */
  @keyframes atlas-ab-saved { from { scale: .2; } }
  @keyframes atlas-ab-dirty { from { scale: .2; } }
  .action-bar__buttons { display: flex; flex: none; align-items: center; gap: var(--space-2); margin-left: auto; }
  @media (min-width: 641px) {
    @container action-bar (max-width: 34rem) {
      .action-bar__status[data-short] { flex: 0 1 auto; font-size: 0; }
      .action-bar__status[data-short]::after { content: attr(data-short) / ""; font-size: .8125rem; }
      .action-bar__buttons > .btn--ghost { padding-inline: .75rem; }
    }
  }

  /* Phones: docked to the bottom edge, full width, like a toolbar. The
     buttons join the bar's own rows: the status shares the first row with a
     ghost button (Renunță), the other buttons share the next row and grow. */
  @media (max-width: 640px) {
    .action-bar {
      bottom: 0; flex-wrap: wrap; gap: .5rem var(--space-2);
      margin-inline: calc(-1 * var(--gutter)); padding: .5rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom));
      border-radius: 0;
      box-shadow: 0 -.5px 0 var(--color-border-strong), 0 -18px 36px -24px rgb(var(--shadow-rgb) / .28);
    }
    .action-bar__status { flex: 1 1 8rem; }
    .action-bar__buttons { display: contents; }
    .action-bar__buttons > .btn { flex: 1 1 40%; }
    .action-bar__buttons > .btn--ghost { flex: 0 0 auto; padding-inline: .75rem; }
    /* focus never lands under the docked bar: the page scrolls a field into
       view above it (forms.js measures the bar: --action-bar-h) */
    :root:has(.action-bar) { scroll-padding-bottom: calc(var(--action-bar-h, 7.5rem) + var(--space-4)); }
  }

  /* Forced colours: the status dot stays visible */
  @media (forced-colors: active) {
    .action-bar__status::before { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
  }
}

/* ---- css/components/record-head.css ---- */
/* Atlas · Record head and record bar
   The top of a page about one thing (a case file, a request): breadcrumb;
   the name (step-4: 26 → 34 in the app) with its status tag; the number in
   mono with a copy button and the facts with icons; the actions on the
   right (secondary, primary, ⋯, the inspector toggle); then the tabs.
     <header class="record-head" id="dosar-head">
       <nav class="breadcrumb">…</nav>
       <div class="record-head__main">
         <div class="record-head__text">
           <div class="record-head__titlebar">
             <h1 class="record-head__title">Zona Industrială Est, Arad</h1>
             <span class="tag tag--info">În consultare</span>
           </div>
           <div class="record-head__facts">
             <span class="record-head__id"><span class="cell-mono">OTN-2026-01284</span>
               <button class="icon-btn icon-btn--sm icon-btn--ghost" data-copy="OTN-2026-01284" aria-label="Copiază numărul">…i-copy…</button></span>
             <ul class="meta">…UAT · Tip · Depus · Termen…</ul>
           </div>
         </div>
         <div class="record-head__actions">…buttons…</div>
       </div>
     </header>
   (B's order, an eyebrow line .record-head__eyebrow above the title, still works.)

   Record bar (M23): when the head has scrolled away under the page's bar,
   a floating capsule with the name, the status and the primary action
   slides down from under it (record.js; instant under Reduce Motion). Put it
   right after the head; it takes no room in the page:
     <div class="record-bar" data-record-for="dosar-head">
       <div class="record-bar__inner">
         <span class="record-bar__title">Zona Industrială Est, Arad</span>
         <span class="tag tag--info">În consultare</span>
         <span class="record-bar__id cell-mono">OTN-2026-01284</span>
         <div class="record-bar__actions"><a class="btn btn--sm" href="…">Continuă avizarea</a></div>
       </div>
     </div>
   While hidden the bar is inert (no tab stop, not read). */
@layer components {
  .record-head { padding-top: var(--page-head-pad-top); }
  .record-head__main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5) var(--space-8); margin-top: var(--space-4); }
  /* the text keeps at least 34rem beside the actions; narrower, the actions
     wrap under it rather than squeeze the title, the tag and the facts */
  .record-head__text { display: grid; gap: var(--space-3); flex: 1 1 34rem; min-width: 0; max-width: 54rem; }
  .record-head__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--step--1); color: var(--color-text-subtle); }
  .record-head__eyebrow .cell-mono { font-size: .875rem; }
  .record-head__titlebar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
  .record-head__title {
    font-size: var(--step-4); font-weight: var(--fw-display); line-height: var(--lh-title); letter-spacing: var(--tracking-page-title);
    color: var(--color-heading); text-wrap: balance;
  }
  .record-head__titlebar > .tag { flex: none; translate: 0 .1em; }
  .record-head__facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-5); }
  .record-head__facts > .meta { flex: 1 1 22rem; min-width: 0; }
  .record-head__id { display: inline-flex; align-items: center; gap: .15rem; }
  .record-head__id .cell-mono { font-size: .875rem; color: var(--color-text-muted); }
  .record-head__id .icon-btn { color: var(--color-text-subtle); }
  .record-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
  .record-head__tabs { margin-top: var(--space-6); }
  /* phones: the actions take the full width, the buttons share it */
  @media (max-width: 640px) {
    .record-head__actions { width: 100%; }
    .record-head__actions > .btn { flex: 1 1 9rem; }
  }

  /* ---- Record bar (M23) ---------------------------------------------------- */
  /* A zero-height sticky anchor under the page's bar; the capsule hangs from
     it, so it never moves the page. It sits below the bar in the stacking
     order: it slides out from under it. While it shows, html.has-record-bar
     (record.js) grows --sticky-top by --record-bar-h, so a sticky side column
     moves down out from under it. */
  .record-bar { position: sticky; top: var(--sticky-chrome, 0px); z-index: calc(var(--z-sticky) + 1); height: 0; }
  .record-bar__inner {
    position: absolute; top: var(--space-2); left: 0; right: 0;
    display: flex; align-items: center; gap: var(--space-3); min-height: 3.25rem; padding: .375rem .375rem .375rem var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
    box-shadow: var(--shadow-2), 0 0 0 .5px var(--color-border-strong);
    translate: 0 calc(-100% - var(--space-4)); opacity: 0; visibility: hidden;
    transition: translate var(--dur-2) var(--ease-exit), opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2);
  }
  .record-bar.is-visible .record-bar__inner {
    translate: 0 0; opacity: 1; visibility: visible;
    transition: translate var(--dur-3) var(--ease-spring), opacity var(--dur-1) var(--ease-out), visibility 0s;
  }
  .record-bar__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; font-weight: var(--fw-semibold); letter-spacing: -.011em; color: var(--color-heading); }
  .record-bar__inner > .tag { flex: none; }
  .record-bar__id { flex: none; font-size: .8125rem; }
  .record-bar__actions { display: flex; flex: none; align-items: center; gap: var(--space-2); margin-left: auto; }
  @media (max-width: 640px) {
    .record-bar__id { display: none; }
    .record-bar__inner { padding-left: var(--space-4); }
  }
  @media (max-width: 480px) {
    .record-bar__inner > .tag { display: none; }
  }
  @media (prefers-reduced-transparency: reduce) {
    .record-bar__inner { background: var(--color-elevated); }
  }
}

/* ---- css/components/with-aside.css ---- */
/* Atlas · Content with a side column, side boxes, block heads
   The main content and a narrower column next to it: actions and facts of a
   record, help next to a form, filters next to results, a table of contents
   next to a long text. The side column sticks under the page's bar while
   the content scrolls.
     <div class="with-aside">                        side column on the right
       <div class="with-aside__main">…</div>
       <aside class="with-aside__side">…</aside>
     </div>
     .with-aside--start   side column on the left (filters, contents; 16rem)
     --aside-w            its width (tokens: 20rem)
   At 1180px or less the side column goes under the content (--start: above).

   Side boxes: one tile of facts plus quiet notes, never filled and outlined
   boxes side by side.
     <div class="side-box"><h2 class="side-box__title">Pe scurt</h2>…</div>
     <div class="side-box side-box--muted"><h2 class="side-box__title">Legislație</h2>…</div>
   .side-box is a tile with a 17px title; .side-box--muted has no box: the
   same inline padding, a hairline above it.
   .side-box--beside is shown only while the column stands beside the
   content: at 1180px or less, where the column goes under it, it hides
   (the outline of a flow's steps, which the progress bar above repeats,
   would otherwise become a page-wide tile).
     <div class="side-box side-box--beside"><h2 class="side-box__title">Certificat de urbanism</h2><ol class="timeline timeline--compact">…</ol></div>

   --sticky-top: the height of the page's sticky bar (the site header or the
   app's topbar, every shell), 0 when there is none. Every sticky part of
   the data components (side column, table head, record bar, group heads,
   inspector) sits under it. */
@layer components {

  .with-aside { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside-w); gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: start; }
  .with-aside--start { --aside-w: 16rem; grid-template-columns: var(--aside-w) minmax(0, 1fr); }
  .with-aside__main { min-width: 0; }
  .with-aside__side {
    --aside-top: calc(var(--sticky-top, 0px) + var(--space-6));
    position: sticky; top: var(--aside-top); display: grid; gap: var(--space-5); min-width: 0;
    max-height: calc(100dvh - var(--aside-top) - var(--space-6)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    padding: 8px; margin: -8px;   /* room for focus rings and tile shadows inside the scrolling column */
  }
  .with-aside--start > .with-aside__side { grid-column: 1; grid-row: 1; }
  .with-aside--start > .with-aside__main { grid-column: 2; grid-row: 1; }
  @media (max-width: 1180px) {
    .with-aside, .with-aside--start { grid-template-columns: minmax(0, 1fr); }
    .with-aside__side { position: static; max-height: none; overflow: visible; }
    .with-aside--start > .with-aside__side, .with-aside--start > .with-aside__main { grid-column: 1; grid-row: auto; }
    .with-aside__side > .side-box--beside { display: none; }
  }

  /* The heading of a block inside an app page: a title and, on the right,
     its action ("Toate sarcinile"). <div class="block-head"><h2 class="block-head__title">…</h2><a>…</a></div> */
  .block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-4); }
  .block-head__title { font: var(--fw-semibold) var(--step-2)/var(--lh-head) var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading); }
  .block-head__title small { margin-left: .5rem; font: var(--fw-medium) var(--step--1)/1 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-text-subtle); }
  * + .block-head { margin-top: var(--space-12); }

  /* ---- Side box ------------------------------------------------------------- */
  .side-box {
    display: grid; gap: var(--space-4); min-width: 0; padding: var(--card-pad);
    border-radius: var(--radius-lg); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .side-box--muted {
    padding: var(--space-5) var(--card-pad) 0; border-top: 1px solid var(--color-border);
    border-radius: 0; background: transparent; box-shadow: none;
  }
  .side-box__title { font: var(--fw-semibold) 1.0625rem/1.3 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); text-wrap: balance; }
  .side-box__title + * { margin-top: calc(-1 * var(--space-1)); }
  /* In the 20rem column the label takes only its own width (plus a gap), so
     short values keep their line ("Certificat de urbanism") */
  .side-box .kv:not(.kv--stack) { grid-template-columns: max-content minmax(0, 1fr); }
  .side-box .kv > dt, .side-box .kv > dd { padding-block: .55rem; }
  .side-box .kv > dt { padding-right: var(--space-4); font-size: var(--step--1); }
  .side-box .kv > dd { font-size: var(--step--1); }
  /* stacked (narrow, phones): the label sits right on its value */
  .side-box .kv--stack > dt { padding-bottom: .1rem; padding-right: 0; }
  .side-box .kv--stack > dd { padding-top: 0; }
  @media (max-width: 520px) {
    .side-box .kv:not(.kv--stack) { grid-template-columns: minmax(0, 1fr); }
    .side-box .kv > dt { padding-bottom: .1rem; padding-right: 0; }
    .side-box .kv > dd { padding-top: 0; }
  }
  .side-box > .btn { width: 100%; }
  .side-box .timeline { --tl-gap: var(--space-4); }
  .side-box .timeline__title { font-size: var(--step--1); }
  .side-box > p { font-size: var(--step--1); line-height: 1.5; color: var(--color-text-muted); }
  .side-box .person + .person { margin-top: calc(-1 * var(--space-1)); }
  /* touch: a link in a side box (legislation, help) is a 44px target */
  @media (pointer: coarse) {
    .side-box :is(p, li, dd, dt) a:not(.btn, .link-arrow) { position: relative; }
    .side-box :is(p, li, dd, dt) a:not(.btn, .link-arrow)::after { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) 0; }
    /* links one under the other (.meta--stack) sit 44px apart, so one
       link's area never covers the next one's */
    .side-box .meta--stack > li > a:not(.btn, .link-arrow) { display: inline-flex; align-items: center; min-height: calc(var(--target-min) - var(--space-3)); }
  }
}

/* ---- css/components/file-list.css ---- */
/* Atlas · File list
   Documents attached to a request or a record, in one tile: a 36px
   file-type squircle on the fill (the type as a 12px caption, coloured by
   its family), the name (15px, 600), size and date (13px, tabular, subtle),
   their state, and ghost icon buttons. Separators inset to the text.
     <ul class="file-list">
       <li class="file">
         <span class="file__icon" data-type="pdf">PDF</span>
         <span class="file__body"><a class="file__name" href="…">Memoriu.pdf</a>
           <span class="file__meta">2,4 MB · 12.03.2026</span></span>
         <span class="status status--ok">Verificat</span>
         <span class="file__actions">…icon-btn--sm icon-btn--ghost…</span>
       </li>
       <li class="file is-uploading">… <progress class="progress" value="40" max="100"></progress></li>
     </ul>
   Write the type as its usual abbreviation, in three or four capitals (PDF,
   DWG, GEO, SHP, ZIP, XLS, CSV, DOC, IMG): the caption is not transformed. data-type colours the caption: pdf, doc, xls/csv,
   dwg/shp/geojson, zip, img. .file-list--plain drops the tile (inside a
   comment, a card). .is-uploading shows a 4px inline progress bar,
   .is-error turns the meta line red. */
@layer components {
  .file-list {
    --file-px: var(--space-4); --file-icon: 2.25rem;
    display: grid; padding: 0; list-style: none; overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .file {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .35rem var(--space-4);
    min-height: 3.75rem; padding: .7rem var(--file-px); transition: background-color var(--dur-1) var(--ease-out);
  }
  .file + .file::before { content: ""; position: absolute; top: 0; left: calc(var(--file-px) + var(--file-icon) + var(--space-4)); right: 0; height: 1px; background: var(--color-border); pointer-events: none; }
  .file:has(a.file__name:hover) { background: var(--color-fill-subtle); }
  .file__icon {
    --ft: var(--color-text-muted);
    display: grid; place-items: center; width: var(--file-icon); height: var(--file-icon); overflow: hidden; border-radius: var(--radius-sm);
    background: var(--color-fill); color: var(--ft);
    font: var(--fw-bold) .75rem/1 var(--font-text); letter-spacing: -.01em; white-space: nowrap;
  }
  .file__icon[data-type="pdf"] { --ft: var(--color-danger-fg); }
  .file__icon:is([data-type="xls"], [data-type="csv"]) { --ft: var(--color-success-fg); }
  .file__icon:is([data-type="dwg"], [data-type="shp"], [data-type="geojson"]) { --ft: var(--color-info-fg); }
  .file__icon:is([data-type="doc"], [data-type="img"]) { --ft: var(--color-event-fg); }
  .file__icon[data-type="zip"] { --ft: var(--color-warning-fg); }
  /* Increase Contrast darkens the fill: the caption turns heading-coloured
     (the tinted captions drop near 4.2:1 there) */
  @media (prefers-contrast: more) {
    .file__icon[data-type] { --ft: var(--color-heading); }
  }
  .file__body { display: grid; gap: .1rem; min-width: 0; }
  /* the name may take two lines (a long name, or the reader's own text
     spacing), then ends in an ellipsis */
  .file__name {
    display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere;
    font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.35; letter-spacing: -.01em; color: var(--color-heading);
  }
  a.file__name { text-decoration: none; }
  /* the whole row is the link's target (its buttons stay above it) */
  a.file__name::after { content: ""; position: absolute; inset: 0; }
  .file > :is(.status, .tag, .file__actions, .progress) { position: relative; z-index: 1; }
  a.file__name:hover { color: var(--color-link); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
  .file__meta { font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .file__actions { display: flex; gap: .15rem; }
  .file > .status, .file > .tag { white-space: nowrap; }
  .file.is-uploading .progress { grid-column: 2 / -1; height: 4px; }
  .file.is-error .file__meta { color: var(--color-danger-fg); }
  .file-list--plain { border-radius: 0; background: transparent; box-shadow: none; }
  .file-list--plain .file { padding-inline: 0; }
  .file-list--plain .file + .file::before { left: calc(var(--file-icon) + var(--space-4)); }
  @media (pointer: coarse) { .file__actions { gap: var(--space-2); } }    /* two 44px hit areas never overlap */
  @media (max-width: 560px) {
    .file { grid-template-columns: auto minmax(0, 1fr) auto; }
    .file > .status, .file > .tag { grid-column: 2; grid-row: 2; justify-self: start; }
    .file__actions { grid-column: 3; grid-row: 1 / span 2; }
  }
  /* forced colours drop backgrounds: the separators are drawn in GrayText */
  @media (forced-colors: active) {
    .file + .file::before { forced-color-adjust: none; background: GrayText; }
  }
}

/* ---- css/components/comments.css ---- */
/* Atlas · Comments
   A thread of messages on a record (the applicant's and the staff's), with
   internal notes set apart, and a box to write a new one. Avatar, name
   (600), role and time (subtle); the message in a bubble: incoming on the
   faint fill, radius 16 with the corner next to the avatar at 6, own
   messages (.comment--mine, on the right) on the accent tint, internal
   notes on the warning tint.
     <ol class="comments">
       <li class="comment">
         <span class="avatar avatar--sm">AP</span>
         <div class="comment__body">
           <p class="comment__head"><b>Andrei Popa</b><span>verificator</span><time>ieri, 14:20</time></p>
           <div class="comment__text"><p>…</p></div>
         </div>
       </li>
       <li class="comment comment--internal">… <span class="tag tag--notice">Notă internă</span></li>
       <li class="comment-event">Ana Popescu a marcat studiul ca primit · 04.10.2026</li>
     </ol>
     <form class="composer">…<textarea class="input">…</textarea><div class="composer__foot">…</div></form> */
@layer components {
  .comments { display: grid; gap: var(--space-5); padding: 0; list-style: none; }
  .comment { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-3); }
  .comment__body {
    justify-self: start; max-width: min(100%, 44rem); min-width: 0; padding: .75rem 1rem .85rem;
    border-radius: 6px 16px 16px 16px; background: var(--color-fill-subtle);
  }
  .comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem var(--space-2); margin-bottom: .3rem; font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .comment__head b { font-size: var(--step--1); font-weight: var(--fw-semibold); color: var(--color-heading); }
  .comment__head time { margin-left: auto; padding-left: var(--space-3); font-variant-numeric: tabular-nums; }
  .comment__head .tag { height: 1.375rem; padding-inline: .5rem; align-self: center; }
  .comment__text { font-size: .9375rem; line-height: 1.55; letter-spacing: var(--tracking-ui); color: var(--color-text); }
  .comment__text > * + * { margin-top: var(--space-2); }
  .comment__files { margin-top: var(--space-2); }
  .comment--internal .comment__body { background: var(--color-warning-bg); }
  .comment--internal .comment__head { color: var(--color-text-muted); }
  .comment--mine { grid-template-columns: minmax(0, 1fr) auto; }
  .comment--mine > .avatar { grid-column: 2; grid-row: 1; }
  .comment--mine .comment__body { grid-column: 1; grid-row: 1; justify-self: end; border-radius: 16px 6px 16px 16px; background: var(--color-accent-soft); }
  .comment--mine .comment__head { color: var(--color-text-muted); }
  .comment-event { display: flex; align-items: center; gap: var(--space-3); font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); text-align: center; }
  .comment-event::before, .comment-event::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

  /* The box for a new message: a tile with the field and its tools */
  .composer {
    display: grid; gap: var(--space-3); padding: var(--space-4);
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .composer .input { min-height: 6rem; }
  .composer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
  .composer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
  @media (forced-colors: active) {
    .comment__body { outline: 1px solid CanvasText; outline-offset: -1px; }
  }
}

/* ---- css/components/facets.css ---- */
/* Atlas · Facets
   Filters next to a list of results: groups that fold, options with their
   counts, a reset. atlas.js (filter.js) applies them to [data-filter-item]s.
     <div class="facets">
       <div class="facets__head"><h2 class="facets__title">Filtre</h2><button class="facets__reset" data-filter-reset>Resetează</button></div>
       <details class="facet" open>
         <summary class="facet__title">Domeniu</summary>
         <div class="facet__body">
           <label class="check facet__opt"><input type="checkbox" data-filter-key="domeniu" value="urbanism"> Urbanism <span class="facet__count">12</span></label>
         </div>
       </details>
     </div>
   Groups are split by hairlines; the disclosure chevron turns on the spring. */
@layer components {
  .facets { display: grid; }
  .facets__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); }
  .facets__title { font: var(--fw-semibold) 1.0625rem/1.3 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .facets__reset { font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-link); text-decoration: none; border-radius: var(--radius-xs); }
  .facets__reset:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: .2em; }
  .facet { border-top: 1px solid var(--color-border); }
  .facet:last-child { border-bottom: 1px solid var(--color-border); }
  .facet__title {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 2.75rem; padding: var(--space-3) 0;
    list-style: none; cursor: pointer; font-size: .9375rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-ui); color: var(--color-heading);
    border-radius: var(--radius-xs);
  }
  .facet__title::-webkit-details-marker { display: none; }
  .facet__title::after {
    content: ""; flex: none; width: .45rem; height: .45rem; margin-right: .3rem;
    border-right: 1.75px solid var(--color-text-subtle); border-bottom: 1.75px solid var(--color-text-subtle);
    transform: translateY(-25%) rotate(45deg); transition: transform var(--dur-3) var(--ease-spring);
  }
  .facet[open] > .facet__title::after { transform: translateY(15%) rotate(225deg); }
  .facet__title:hover::after { border-color: var(--color-heading); }
  /* 4px under the group's title: the first 22px box keeps its 24px of room
     (WCAG 2.5.8), clear of the title's own target */
  .facet__body { display: grid; gap: var(--space-3); padding: var(--space-1) 0 var(--space-5); }
  .facet__opt { width: 100%; font-size: var(--step--1); }
  .facet__opt > input { margin-top: .05rem; }
  .facet__count { margin-left: auto; padding-left: var(--space-2); font-size: .8125rem; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .facet__body .input, .facet__body .select { font-size: var(--step--1); }
}

/* ---- css/components/auth.css ---- */
/* Atlas Modern · Sign-in page (spec §3.10, §5.8, M5, K22)
   A page of its own, split in two. The start side is a stage panel: black,
   the blue glow, contour lines that draw themselves (topo.js), the brand,
   a one-line promise and three benefits. The end side holds the form on
   the page colour, at most 26rem wide: a step-3 title, the sign-in methods
   as large rows (ROeID, CEI, e-mail), a „sau" divider, the fields and one
   primary block button. Below 900px the stage becomes a band at the top
   (160px on phones) with the brand and the promise.
     <div class="auth">
       <section class="auth__panel" data-scheme="dark" data-surface="dark" aria-label="…">
         <svg class="topo" … data-topo='…'></svg>
         <a class="brand" href="index.html">…</a>
         <p class="auth__lead">Un singur cont pentru toate cererile de urbanism.</p>
         <ul class="auth__points"><li><svg class="icon">…</svg><span>…</span></li>…</ul>
         <p class="auth__foot">Ai o problemă cu contul? <a href="…">Scrie-ne</a></p>
       </section>
       <main class="auth__main" id="continut">
         <div class="auth-card">
           <div class="stack stack--sm"><h1 class="auth-card__title">Intră în cont</h1><p class="auth-card__lead">…</p></div>
           <ul class="auth-methods" role="list">
             <li><a class="auth-method" href="…">
               <span class="auth-method__mark"><svg class="icon" aria-hidden="true">…#i-shield</svg></span>
               <span class="auth-method__text"><span class="auth-method__title">ROeID</span><span class="auth-method__hint">Identitatea electronică, fără parolă</span></span>
               <span class="tag tag--info">Recomandat</span></a></li>
             …
           </ul>
           <p class="divider">sau cu e-mail</p>
           <form class="stack" …>…<button type="submit" class="btn btn--block">Intră în cont</button></form>
           <div class="auth-card__foot">…</div>
         </div>
       </main>
     </div>
   A single method can also be one large row on its own: .btn.btn--secondary.btn-eid. */
@layer components {
  .auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100dvh; background: var(--color-bg); }

  /* ---- The stage panel ----------------------------------------------------
     Colours come from the inverse tokens (the same in light and dark), so it
     reads right with data-scheme="dark" or only data-surface="dark". */
  .auth__panel {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; gap: var(--space-8);
    padding: clamp(2rem, 1rem + 3vw, 3.5rem);
    color: var(--color-on-inverse-muted);
    background:
      radial-gradient(48rem 32rem at 100% -8%, var(--stage-glow), transparent 62%),
      radial-gradient(36rem 26rem at -8% 112%, var(--stage-glow-2), transparent 64%),
      var(--color-inverse);
    box-shadow: inset -1px 0 0 var(--color-inverse-border);
  }
  .auth__panel .topo {
    position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
    --topo: var(--topo-line-inverse); --topo-ix: var(--topo-index-inverse);
    -webkit-mask-image: radial-gradient(120% 90% at 85% 10%, var(--color-inverse) 35%, transparent 90%);
    mask-image: radial-gradient(120% 90% at 85% 10%, var(--color-inverse) 35%, transparent 90%);
  }
  .auth__panel .brand__title { color: var(--color-on-inverse); }
  .auth__panel .brand__sub { color: var(--color-on-inverse-subtle); }
  .auth__lead {
    margin-top: auto; max-width: 15ch;
    font: var(--fw-display) clamp(2rem, 1.25rem + 2vw, 3.25rem)/var(--lh-display) var(--font-display);
    letter-spacing: var(--tracking-title); color: var(--color-on-inverse); text-wrap: balance;
    --rise: 14px; animation: atlas-rise var(--dur-4) var(--ease-spring) 80ms backwards;
  }
  .auth__points { display: grid; gap: var(--space-3); max-width: 30rem; margin: 0; padding: 0; list-style: none; }
  .auth__points li {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3);
    font-size: .9375rem; line-height: 1.5; letter-spacing: var(--tracking-ui);
  }
  .auth__points .icon { width: 1.125rem; height: 1.125rem; margin-top: .1875rem; color: var(--color-on-inverse-accent); }
  .auth__foot { font-size: .8125rem; line-height: var(--lh-caption); color: var(--color-on-inverse-subtle); }
  .auth__foot a { color: var(--color-on-inverse); }
  .auth__foot a:hover { color: var(--color-on-inverse-accent); }

  /* ---- The form side ------------------------------------------------------- */
  .auth__main { display: grid; place-items: center; min-width: 0; padding: clamp(2rem, 1rem + 4vw, 5rem) var(--gutter); }
  .auth-card { display: grid; gap: var(--space-5); width: min(100%, 26rem); }
  .auth-card__title {
    font-size: var(--step-3); font-weight: var(--fw-display); line-height: var(--lh-title);
    letter-spacing: var(--tracking-title); color: var(--color-heading);
  }
  .auth-card__lead { font-size: var(--step-0); line-height: 1.45; color: var(--color-text-muted); }
  .auth-card__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--step--1); }
  .auth-card__foot {
    display: grid; gap: var(--space-2); padding-top: var(--space-5); border-top: 1px solid var(--color-border);
    font-size: var(--step--1); line-height: 1.45; color: var(--color-text-muted);
  }

  /* ---- Sign-in methods: large rows in one inset-grouped tile ------------- */
  .auth-methods {
    display: grid; margin: 0; padding: 0; list-style: none;
    border-radius: var(--radius-lg); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow); overflow: clip;
  }
  .auth-methods > li + li { position: relative; }
  .auth-methods > li + li::before {
    content: ""; position: absolute; top: 0; right: 0; left: 4.25rem; z-index: 1; height: 1px; background: var(--color-border);
  }
  .auth-method, .btn-eid.btn {
    display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: 4.5rem;
    padding: .75rem 1.125rem .75rem 1rem; text-align: start; color: var(--color-heading); text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .auth-method:hover { background: var(--color-row-hover); color: var(--color-heading); text-decoration: none; }
  .auth-method:active { background: var(--color-fill-subtle); }
  .auth-method:focus-visible { outline-offset: -3px; border-radius: inherit; }
  .auth-method::after, .btn-eid.btn::after {
    content: ""; flex: none; width: .5rem; height: .5rem; margin-inline: var(--space-1) .125rem;
    border-top: 1.75px solid var(--color-text-subtle); border-right: 1.75px solid var(--color-text-subtle); rotate: 45deg;
    transition: translate var(--dur-2) var(--ease-spring);
  }
  .auth-method:hover::after, .btn-eid.btn:hover::after { translate: var(--nudge) 0; }
  .auth-method__mark, .btn-eid__mark {
    display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm);
    background: var(--color-elevated); box-shadow: var(--shadow-1), 0 0 0 .5px var(--color-border);
    color: var(--color-accent-figure);
  }
  .auth-method__mark .icon, .btn-eid__mark .icon { width: 1.25rem; height: 1.25rem; }
  .auth-method__text, .btn-eid__text { display: grid; flex: 1; gap: .125rem; min-width: 0; text-align: start; }
  .auth-method__title { font-size: var(--step-0); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-body); }
  .auth-method__hint, .btn-eid__text small {
    font-size: .8125rem; font-weight: var(--fw-regular); line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    color: var(--color-text-muted);
  }
  .auth-method__title .tag { margin-left: var(--space-2); vertical-align: .0625rem; }
  .auth-method > .tag { flex: none; }
  /* One method on its own: the same large row as a button (.btn--secondary) */
  .btn-eid.btn {
    justify-content: flex-start; height: auto; border-radius: var(--radius-lg); white-space: normal;
    font-size: var(--step-0); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: var(--tracking-body);
  }
  .btn-eid.btn:active { transform: none; scale: none; }

  /* ---- Tablet and phone: the stage becomes a band above the form -------- */
  @media (max-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .auth__panel {
      min-height: 10rem; justify-content: space-between; gap: var(--space-4);
      padding: var(--space-5) var(--gutter); box-shadow: inset 0 -1px 0 var(--color-inverse-border);
    }
    .auth__lead { margin-top: 0; max-width: 22ch; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem); line-height: 1.1; letter-spacing: var(--tracking-tight); }
    .auth__points { display: none; }
    .auth__foot { margin-top: calc(-1 * var(--space-2)); }     /* the account help stays: the only contact path on this page */
    .auth__main { place-items: start center; padding-top: var(--space-8); }
  }

  /* Forced colours: the methods tile and the marks keep an edge */
  @media (forced-colors: active) {
    .auth-methods, .auth-method__mark, .btn-eid__mark { outline: 1px solid CanvasText; outline-offset: -1px; }
    .auth-methods > li + li::before { background: CanvasText; }
  }
}

/* ---- css/components/toc.css ---- */
/* Atlas · Table of contents
   The sections of a long text or a long form; with data-spy the current one
   is marked while reading: heading colour, semibold, and a 2px graphite bar
   on the rail that grows in each time it moves.
     <nav class="toc" data-spy aria-labelledby="toc-t">
       <p class="toc__title" id="toc-t">Cuprins</p>
       <ol class="toc__list"><li><a class="toc__link" href="#s1">Cine suntem</a></li>…</ol>
     </nav>
   .toc--plain         no numbers
   .toc__link.is-done  a finished section of a long form: its number becomes a
                       tick. Inside form[data-validate] pages validate.js sets
                       .is-complete + data-complete and adds the hidden
                       „ · completat” itself; do not write it by hand there.
                       Elsewhere (a static .is-done) add
                       <span class="visually-hidden">, completat</span>. */
@layer components {
  .toc { display: grid; gap: var(--space-3); }
  .toc__title { padding-left: 2px; font: var(--fw-semibold) .875rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .toc__list { display: grid; gap: 1px; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid var(--color-border); }
  .toc__link {
    position: relative; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); padding: .45rem .5rem .45rem var(--space-4);
    font-size: .9375rem; line-height: 1.4; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); text-decoration: none; counter-increment: toc;
    transition: color var(--dur-2) var(--ease-out);
  }
  .toc__link::before { content: counter(toc) "."; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .toc__link::after {
    content: ""; position: absolute; left: -1.5px; top: .35rem; bottom: .35rem; width: 2px; border-radius: 2px; background: var(--color-heading);
    transform: scaleY(0); transition: transform var(--dur-3) var(--ease-spring);
  }
  .toc__link:hover { color: var(--color-heading); text-decoration: none; }
  .toc__link[aria-current] { color: var(--color-heading); font-weight: var(--fw-semibold); }
  .toc__link[aria-current]::after { transform: scaleY(1); }
  .toc__link:focus-visible { outline-offset: -2px; }
  /* a finished section: the number becomes a tick */
  .toc__link:is(.is-done, .is-complete, [data-complete])::before {
    content: ""; justify-self: start; width: .32rem; height: .6rem; margin: .3rem 0 0 .2rem;
    border: solid var(--color-success-fg); border-width: 0 2px 2px 0; transform: rotate(45deg);
  }
  .toc--plain .toc__link { grid-template-columns: minmax(0, 1fr); }
  @media (pointer: coarse) { .toc__link { min-height: var(--target-min); align-content: center; } }
  .toc--plain .toc__link::before { content: none; }
  /* Forced colours: the bar on the rail is a background; draw it in Highlight */
  @media (forced-colors: active) {
    .toc__link::after { forced-color-adjust: none; background: Highlight; }
  }
}

/* ---- css/components/work-list.css ---- */
/* Atlas · Work list and due dates
   Things to do, with their deadline and who has them: an inbox of tasks in
   one tile, separators inset to the text (as in Mail).
     <ul class="work-list">
       <li class="work-list__group">Depășite <span class="work-list__count">2</span></li>   (optional)
       <li class="work-item">
         <span class="work-item__mark status status--danger" aria-hidden="true"></span>
         <div class="work-item__body">
           <a class="work-item__title" href="…">Verifică documentația depusă</a>
           <ul class="meta"><li><span class="cell-mono">OTN-2026-01261</span></li><li><span class="tag tag--brand">PUZ</span></li><li>Ghiroda</li></ul>
         </div>
         <span class="due due--late"><svg class="icon">…i-clock…</svg> Depășit cu 2 zile</span>
         <span class="avatar avatar--sm" aria-label="Responsabil: Ana Popescu">AP</span>
       </li>
     </ul>
   The 8px mark reads the status dot tokens (--ok, --warn, --danger, --info,
   none = neutral). The title's link covers the row. .work-list__group rows
   head a group ("Depășite", "Azi", "Săptămâna aceasta") and stick under the
   page's bar on the material while their group scrolls (--sticky-top).
   .due: a 28px pill with a clock — --late (past) danger tint, --soon (this
   week) warning tint, --ok neutral fill. */
@layer components {
  .work-list {
    --work-px: var(--space-5);
    padding: 0; list-style: none; overflow: clip;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .work-item {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-2) var(--space-4);
    min-height: 4rem; padding: .875rem var(--work-px); transition: background-color var(--dur-1) var(--ease-out);
  }
  /* separators inset to the text column: after the 8px mark and its gap */
  .work-item + .work-item::before {
    content: ""; position: absolute; top: 0; left: calc(var(--work-px) + .5rem + var(--space-4)); right: 0;
    height: 1px; background: var(--color-border); pointer-events: none;
  }
  .work-item:has(a.work-item__title:hover) { background: var(--color-fill-subtle); }
  .work-item:has(a.work-item__title:active) { background: var(--color-fill); }
  .work-item:has(a.work-item__title:hover)::before, .work-item:has(a.work-item__title:hover) + .work-item::before { opacity: 0; }

  /* the status mark: an 8px dot in the dot tokens, no halo */
  .work-item__mark { gap: 0; }
  .work-item > .work-item__mark::before { width: .5rem; height: .5rem; box-shadow: none; background: var(--work-dot, var(--color-dot-neutral)); }
  .work-item > .work-item__mark.status--ok { --work-dot: var(--color-dot-ok); }
  .work-item > .work-item__mark.status--warn { --work-dot: var(--color-dot-warn); }
  .work-item > .work-item__mark.status--danger { --work-dot: var(--color-dot-danger); }
  .work-item > .work-item__mark.status--info { --work-dot: var(--color-dot-info); }

  .work-item__body { display: grid; gap: .25rem; min-width: 0; }
  .work-item__title { font-size: var(--step-0); font-weight: var(--fw-semibold); line-height: 1.35; letter-spacing: -.011em; color: var(--color-heading); text-decoration: none; }
  a.work-item__title::after { content: ""; position: absolute; inset: 0; }
  a.work-item__title:hover { color: var(--color-heading); text-decoration: none; }
  a.work-item__title:focus-visible { outline: none; }
  .work-item:has(a.work-item__title:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: -3px; border-radius: var(--radius-md); }
  .work-item .meta { gap: .15rem var(--space-3); font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .work-item .meta .tag { height: 1.375rem; padding-inline: .5rem; }
  .work-item > .avatar, .work-item > .avatar-group, .work-item > .btn, .work-item > .icon-btn, .work-item > .due { position: relative; z-index: 1; }
  .work-item.is-done .work-item__title { color: var(--color-text-muted); font-weight: var(--fw-medium); }

  /* group heads: sticky on the bar material */
  .work-list__group {
    position: sticky; top: var(--sticky-top, 0px); z-index: 2;
    display: flex; align-items: baseline; gap: var(--space-2); padding: .55rem var(--work-px);
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: inset 0 -1px 0 var(--color-border);
    font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); color: var(--color-heading);
  }
  .work-list__group:not(:first-child) { box-shadow: inset 0 1px 0 var(--color-border), inset 0 -1px 0 var(--color-border); }
  .work-list__count { font-weight: var(--fw-medium); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .work-list__group + .work-item::before { content: none; }
  /* focus scrolls a task clear of its group's sticky head */
  .work-list .work-item :is(a, button) { scroll-margin-top: 2.75rem; }

  @media (max-width: 640px) {
    .work-item { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
    .work-item > .work-item__mark { margin-top: .5rem; }
    .work-item > .due { grid-column: 2; grid-row: 2; justify-self: start; }
    .work-item > .avatar { grid-column: 3; grid-row: 1; }
  }

  /* ---- Due date pill ------------------------------------------------------- */
  .due {
    display: inline-flex; align-items: center; gap: .35rem; height: 1.75rem; padding: 0 .7rem; border-radius: var(--radius-pill);
    background: var(--color-fill); color: var(--color-text-muted);
    font: var(--fw-semibold) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small); white-space: nowrap; font-variant-numeric: tabular-nums;
  }
  .due .icon { flex: none; width: .875rem; height: .875rem; margin-left: -.1rem; }
  .due--late { background: var(--color-danger-bg); color: var(--color-danger-fg); }
  .due--soon { background: var(--color-warning-bg); color: var(--color-warning-fg); }
  .due--ok { background: var(--color-fill); color: var(--color-text-muted); }
  @media (prefers-reduced-transparency: reduce) {
    .work-list__group { background: var(--color-tile); }
  }
  @media (forced-colors: active) {
    .due { outline: 1px solid CanvasText; outline-offset: -1px; }
    .work-item + .work-item::before { forced-color-adjust: none; background: GrayText; }
    .work-list__group { background: Canvas; }
  }
}

/* ---- css/components/page-feedback.css ---- */
/* Atlas · Page feedback
   At the end of a public page, a tile row: "A fost utilă această pagină?"
   with Da / Nu (secondary small pills), and "Raportează o problemă ›" at the
   end. After an answer (controls.js adds .is-done and fires
   "atlas:feedback") the thank-you line cross-fades in where the question
   was: both share one grid cell, so the row keeps its height.
   The question and its two answers are one grid row at every width: Da and
   Nu never part (the question wraps first); at 900px and below the report
   link moves under them.

     <div class="page-feedback">
       <div class="page-feedback__ask">A fost utilă această pagină?
         <button type="button" class="btn btn--secondary btn--sm" data-feedback="da">Da</button>
         <button type="button" class="btn btn--secondary btn--sm" data-feedback="nu">Nu</button></div>
       <p class="page-feedback__thanks" role="status"><svg class="icon" aria-hidden="true">…#i-check</svg> Mulțumim pentru răspuns.</p>
       <a href="…">Raportează o problemă cu această pagină</a>
     </div> */
@layer components {
  .page-feedback {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3) var(--space-6);
    min-height: 4rem; padding: var(--space-3) var(--space-5) var(--space-3) var(--space-6);
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    font-size: var(--step--1); letter-spacing: var(--tracking-ui); color: var(--color-text-muted);
  }
  .page-feedback__ask, .page-feedback__thanks { grid-area: 1 / 1; transition: opacity var(--dur-2) var(--ease-out), visibility var(--dur-2) var(--ease-out); }
  .page-feedback__ask {
    display: grid; grid-template-columns: minmax(0, max-content) auto auto; justify-content: start; align-items: center; gap: var(--space-2) var(--space-3);
    font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.35; color: var(--color-heading);
  }
  /* Da / Nu: secondary pills; on a grey tile they turn white (the chip) */
  .page-feedback__ask .btn { min-width: 4rem; --btn-bg: var(--color-chip, var(--color-plane, var(--color-bg))); --btn-bg-hover: var(--color-fill-hover); }
  .page-feedback__ask .btn:first-of-type { margin-left: var(--space-1); }
  .page-feedback__thanks {
    display: inline-flex; align-items: center; gap: .5rem; visibility: hidden; opacity: 0;
    font-size: .9375rem; font-weight: var(--fw-semibold); color: var(--color-success-fg);
  }
  .page-feedback__thanks .icon { width: 1.125rem; height: 1.125rem; }
  .page-feedback.is-done .page-feedback__ask { visibility: hidden; opacity: 0; }
  .page-feedback.is-done .page-feedback__thanks { visibility: visible; opacity: 1; transition-delay: 80ms, 0s; }   /* visible at once, so it can take the focus */
  /* "Raportează o problemă ›": a link that ends in a chevron */
  .page-feedback > a {
    grid-area: 1 / 2; display: inline-flex; align-items: center; gap: .375rem;
    font-weight: var(--fw-medium); color: var(--color-link); text-decoration: none; white-space: nowrap;
  }
  .page-feedback > a::after {
    content: ""; flex: none; width: .4375rem; height: .4375rem; margin-left: -.0625rem;
    border: solid currentColor; border-width: 1.6px 1.6px 0 0; border-radius: 1px;
    rotate: 45deg; transition: translate var(--dur-2) var(--ease-bounce);
  }
  .page-feedback > a:hover { color: var(--color-link-hover); text-decoration: underline; }
  .page-feedback > a:hover::after { translate: var(--nudge) 0; }
  @media (max-width: 900px) {
    .page-feedback { grid-template-columns: minmax(0, 1fr); }
    .page-feedback > a { grid-area: 2 / 1; justify-self: start; white-space: normal; }
  }
  @media (max-width: 640px) {
    .page-feedback { gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); }
    .page-feedback__ask { grid-template-columns: minmax(0, 1fr) auto auto; justify-content: stretch; }
  }
  /* touch: the report link is a 44px target (an invisible hit area) */
  @media (pointer: coarse) {
    .page-feedback > a { position: relative; }
    .page-feedback > a::before { content: ""; position: absolute; inset: calc(50% - var(--target-min) / 2) -.25rem; }
  }
}

/* ---- css/components/map.css ---- */
/* Atlas · Map
   The frame around a map, whatever draws it (Leaflet, MapLibre, OpenLayers
   or a drawn <svg class="map__canvas">): a panel with search, layers and a
   legend, floating controls, markers, the scale, and the card of the
   selected item. Every floating part is a sheet of material (frosted glass)
   16px from the map's edges.
     <div class="map-app map-app--float" data-map data-basemap="harta">
       <aside class="map-panel">
         <button class="map-panel__grabber" data-map-sheet>  (phones; added by atlas.js if missing)
         .map-panel__head (.map-panel__bar: title, note, [data-map-panel-min]; the search)
         .map-panel__body (.layer-list, .map-results, .map-legend)
       </aside>
       <div class="map">
         <div class="map__viewport" tabindex="0" role="application" aria-label="Hartă: săgețile mută harta, + și − o măresc…">
           <svg class="map__canvas" viewBox="…" role="group" aria-labelledby="…">  the drawing aria-hidden;
             <a class="map-marker" href="#id" tabindex="-1" data-feature="id">…</a>   features: pointer only
           </svg></div>                                (the panel's list rows are their keyboard way)
         <div class="map__controls"><div class="map-tools">…zoom, locate, full screen…</div></div>
         <div class="map__basemaps">…seg…</div>
         <div class="map__status">…scale, coordinates…</div>
         <div class="map-feature" hidden="until-found">
           <article class="map-feature__card" id="id" data-feature-card="id" hidden="until-found">…</article></div>
       </div>
     </div>
   Full markup: lab/s8-map.html. With a map library, put its element in
   .map__viewport and keep the rest: atlas.js fires "atlas:map-select" and
   "atlas:map-zoom" for it to follow.
   .page-fill on <body>: the page fills the screen and the map takes what is
   left under the header.
   .map-app--float: the panel floats over the map and shrinks to a pill
   ("5 straturi active"); without it the panel is a column beside the map.
   Phones (640px and less): the panel becomes a bottom sheet with a grabber
   and three detents: peek (96px), half and full (drag, keys, buttons).
   Markers: .map-marker (a 14px dot with a white ring) for items; .map-pin
   (a drop with a glyph) for places such as a counter or a meeting. */
@layer components {
  .page-fill { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .page-fill > main, .page-fill > .app-shell { flex: 1; min-height: 0; }
  .page-fill > .app-shell { align-items: stretch; }
  .page-fill > .app-shell > .app-shell__main, .page-fill > main { display: flex; flex-direction: column; min-height: 0; }
  .page-fill .map-app { flex: 1; height: auto; }

  /* ---- Tokens of the map (scoped here; see the S8a report) ---------------- */
  .map-app {
    --map-panel-w: 21rem;
    --map-inset: var(--space-4);                   /* floating parts sit 16px from the map's edges */
    --map-gap: .625rem;                            /* between floating parts */
    --map-pad: 1.25rem;                            /* inside the panel */
    --map-ctl: 2.5rem;                             /* map buttons: 40px, 44 on touch */
    --map-peek: 6rem;                              /* phone sheet: the peek detent */
    /* the top of the floating parts: below a toolbar that floats over the map
       (the window look sets --fill-top on a page that fills the screen) */
    --map-top: calc(var(--fill-top, 0px) + var(--map-inset));
    --map-sheet: 0;                                /* 1 while the panel is a bottom sheet (read by atlas.js) */
    --map-float-shadow: 0 0 0 .5px var(--color-border), var(--shadow-3);
    --map-chip-shadow: 0 0 0 .5px var(--color-border), var(--shadow-2);
    --map-marker-ring: var(--color-paper);
    --map-marker-shadow: drop-shadow(0 1px 1.5px rgb(var(--shadow-rgb) / .24)) drop-shadow(0 3px 6px rgb(var(--shadow-rgb) / .12));
    --map-halo: color-mix(in oklab, var(--color-accent) 22%, transparent);   /* the selected marker's 6px halo */

    /* data layers: marks, not text, so the dot colours (3:1 or more on the basemap) */
    --tone-ok: var(--color-dot-ok); --tone-info: var(--color-dot-info); --tone-warn: var(--color-dot-warn);
    --tone-danger: var(--color-dot-danger); --tone-mark: var(--color-event-fg); --tone-line: var(--color-text-muted);

    /* The drawn basemap: the scheme tokens --basemap-* (tokens.css, light and
       dark blocks, so a dark island works too); the two other basemaps are
       mixes of them */
    --map-land: var(--basemap-land);
    --map-built: var(--basemap-built);
    --map-road: var(--basemap-road);
    --map-casing: var(--basemap-casing);
    --map-water: var(--basemap-water);
    --map-park: var(--basemap-park);
    --map-water-label: var(--color-info-fg);
    --map-rail: var(--color-text-subtle);
    --map-label: var(--color-text-subtle);
    --map-label-strong: var(--color-heading);
    --map-contour: color-mix(in oklab, var(--color-heading) 7%, transparent);
    --map-contour-ix: color-mix(in oklab, var(--color-heading) 11%, transparent);
  }
  /* Terrain: contours drawn, parks greener. Grey: a quiet base for busy data. */
  .map-app[data-basemap="teren"] {
    --map-park: color-mix(in oklab, var(--color-dot-ok) 10%, var(--basemap-park));
    --map-land: color-mix(in oklab, var(--color-dot-ok) 4%, var(--basemap-land));
    --map-contour: color-mix(in oklab, var(--color-heading) 16%, transparent);
    --map-contour-ix: color-mix(in oklab, var(--color-heading) 26%, transparent);
  }
  .map-app[data-basemap="gri"] {
    --map-water: color-mix(in oklab, var(--basemap-built) 70%, var(--basemap-land));
    --map-water-label: var(--color-text-subtle);
    --map-park: color-mix(in oklab, var(--basemap-land) 55%, var(--basemap-built));
    --map-built: color-mix(in oklab, var(--basemap-land) 45%, var(--basemap-built));
    --map-contour: transparent; --map-contour-ix: transparent;
  }
  @media (pointer: coarse) { .map-app { --map-ctl: var(--target-min); } }
  @media (max-width: 900px) { .map-app { --map-panel-w: 18.5rem; } }
  .map-app [data-tone="ok"] { --tone: var(--tone-ok); }
  .map-app [data-tone="info"] { --tone: var(--tone-info); }
  .map-app [data-tone="warn"] { --tone: var(--tone-warn); }
  .map-app [data-tone="danger"] { --tone: var(--tone-danger); }
  .map-app [data-tone="mark"] { --tone: var(--tone-mark); }
  .map-app [data-tone="line"] { --tone: var(--tone-line); }

  /* ---- Frame -------------------------------------------------------------- */
  .map-app {
    position: relative; isolation: isolate; container: map / inline-size;
    display: grid; grid-template-columns: var(--map-panel-w) minmax(0, 1fr);
    height: var(--map-height, 38rem); min-height: 24rem; overflow: hidden; overflow: clip; background: var(--map-land);
  }
  .map-app:fullscreen { height: 100%; }

  /* ---- Panel -------------------------------------------------------------- */
  /* beside the map (the default) */
  .map-panel {
    position: relative; z-index: 6; display: flex; flex-direction: column; min-width: 0; min-height: 0;
    background: var(--color-bg); box-shadow: 1px 0 0 var(--color-border);
  }
  .map-app:not(.map-app--float) > .map-panel { padding-top: var(--fill-top, 0px); }   /* the column starts below a floating toolbar */
  .map-panel__handle, .map-panel__grabber { display: none; }    /* phones only (the handle is B's; the grabber replaces it) */
  .map-panel__head {
    position: relative; z-index: 1; flex: none; display: grid; gap: var(--space-3);
    padding: var(--space-4) var(--space-4) var(--space-3) var(--map-pad); transition: box-shadow var(--dur-2) var(--ease-out);
  }
  .map-panel.is-scrolled .map-panel__head { box-shadow: 0 1px 0 var(--color-border); }
  .map-panel__bar { display: flex; align-items: center; gap: var(--space-2); min-width: 0; min-height: 1.875rem; }
  .map-panel__title {
    flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font: var(--fw-semibold) 1.0625rem/1.25 var(--font-text); letter-spacing: var(--tracking-text); color: var(--color-heading);
  }
  .map-panel__note {
    display: none; flex: none; font: var(--fw-medium) .8125rem/1.2 var(--font-text); letter-spacing: var(--tracking-small);
    color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums;
  }
  /* the panel's own close, and the card's: a small round button on a fill */
  .map-panel .map-panel__bar > .map-panel__min, .map-feature__head > .icon-btn {
    position: relative; flex: none; width: 1.875rem; height: 1.875rem; margin-left: auto;
    background: var(--color-fill); color: var(--color-text-muted);
  }
  .map-panel .map-panel__bar > .map-panel__min:hover, .map-feature__head > .icon-btn:hover { background: var(--color-fill-hover); color: var(--color-heading); }
  .map-panel .map-panel__bar > .map-panel__min .icon, .map-feature__head > .icon-btn .icon { width: 1rem; height: 1rem; }
  .map-panel__min .icon { rotate: 180deg; transition: rotate var(--dur-3) var(--ease-spring); }
  @media (pointer: coarse) {
    .map-panel .map-panel__bar > .map-panel__min::after, .map-feature__head > .icon-btn::after { content: ""; position: absolute; inset: -.4375rem; }
  }
  /* search: a 40px pill */
  .map-panel__head .input-wrap > .icon { left: .875rem; width: 1rem; height: 1rem; }
  .map-panel__head .input-wrap > .input {
    min-height: 2.5rem; padding-block: .5rem; padding-left: 2.375rem; border-radius: var(--radius-pill);
    font-size: .9375rem; letter-spacing: var(--tracking-ui);
  }
  @media (pointer: coarse) { .map-panel__head .input-wrap > .input { min-height: var(--target-min); } }

  .map-panel__body {
    flex: 1; display: grid; align-content: start; gap: var(--space-6); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: var(--space-1) var(--map-pad) var(--map-pad); scrollbar-width: thin;
  }
  .map-panel__body > .field__hint { margin: 0; }
  .map-panel__section { display: grid; gap: var(--space-2); }
  .map-panel__label {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin: 0;
    font: var(--fw-semibold) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  .map-panel__label span { font-weight: var(--fw-regular); font-variant-numeric: tabular-nums; }

  /* ---- Layers: settings rows (swatch, name, count, switch), opacity under ---- */
  .layer-list { --layer-switch: 2.5rem; display: grid; margin-inline: calc(-1 * var(--space-2)); }
  .layer { position: relative; display: grid; padding-inline: var(--space-2); }
  .layer + .layer::before { content: ""; position: absolute; top: 0; left: calc(var(--space-2) + 1.5rem); right: var(--space-2); height: 1px; background: var(--color-border); }
  .layer-list .layer__toggle {
    display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 2.875rem; padding-block: .375rem;
    font: var(--fw-medium) .9375rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-heading); cursor: pointer;
  }
  .layer-list .layer__toggle > input { order: 9; flex: none; margin: 0 0 0 var(--space-1); }
  .layer__name { flex: 1 1 auto; min-width: 0; color: var(--color-heading); transition: color var(--dur-2) var(--ease-out); }
  .layer__count { flex: none; font: var(--fw-regular) .8125rem/1 var(--font-text); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .layer:has(> .layer__toggle > input:not(:checked)) .layer__name { color: var(--color-text-muted); }
  .layer:has(> .layer__toggle > input:not(:checked)) .layer__opacity { display: none; }
  /* The toggle is a compact switch, 40 x 24 (a dense inspector, like the small
     switches of a Mac panel), drawn here for label.switch (role="switch", the
     markup in lab/s8-map.html) and for B's label.check alike. */
  .layer-list .layer__toggle > input[type="checkbox"] {
    position: relative; display: block; width: 2.5rem; height: 1.5rem; border: 0; border-radius: var(--radius-pill);
    background: var(--color-fill-hover); box-shadow: inset 0 0 0 1px var(--color-control-border);
    transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  }
  .layer-list .layer__toggle > input[type="checkbox"]::before {
    content: ""; position: absolute; top: .125rem; left: .125rem; width: 1.25rem; height: 1.25rem; border-radius: var(--radius-pill);
    background: var(--map-marker-ring); box-shadow: var(--shadow-knob); clip-path: none; transform: none;
    transition: translate var(--dur-3) var(--ease-bounce), width var(--dur-2) var(--ease-spring);
  }
  .layer-list .layer__toggle > input[type="checkbox"]:checked { background: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
  .layer-list .layer__toggle > input[type="checkbox"]:checked::before { translate: 1rem 0; transform: none; }
  .layer-list .layer__toggle > input[type="checkbox"]:active { transform: none; }
  .layer-list .layer__toggle > input[type="checkbox"]:active:not(:disabled)::before { width: 1.5rem; }
  .layer-list .layer__toggle > input[type="checkbox"]:checked:active:not(:disabled)::before { translate: .75rem 0; }
  /* opacity: a slim range under the name, ending where the switch begins
     (map.js sets --range-fill for the filled part) */
  /* its own band under the row (no overlap: a click on the row's lower edge
     toggles the layer, never jumps the opacity); as tall as its knob */
  .layer-list .layer__opacity {
    display: block; width: calc(100% - 1.5rem - var(--layer-switch) - var(--space-4)); min-width: 0; height: 1.125rem;
    margin: 0 0 .5rem 1.5rem; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer;
  }
  .layer-list .layer__opacity::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--color-primary) var(--range-fill, 100%), var(--color-fill-hover) var(--range-fill, 100%));
  }
  .layer-list .layer__opacity::-moz-range-track { height: 4px; border-radius: 2px; background: var(--color-fill-hover); }
  .layer-list .layer__opacity::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--color-primary); }
  .layer-list .layer__opacity::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 1.125rem; height: 1.125rem; margin-top: -.4375rem; border: 0; border-radius: 50%;
    background: var(--map-marker-ring); box-shadow: var(--shadow-knob); transition: scale var(--dur-2) var(--ease-spring);
  }
  .layer-list .layer__opacity::-moz-range-thumb { width: 1.125rem; height: 1.125rem; border: 0; border-radius: 50%; background: var(--map-marker-ring); box-shadow: var(--shadow-knob); }
  .layer-list .layer__opacity:active::-webkit-slider-thumb { scale: 1.12; }
  .layer__opacity:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-pill); }
  @media (pointer: coarse) { .layer-list .layer__opacity { height: 2.25rem; margin-block: 0 .125rem; } }

  /* ---- Swatches (layers, legend, results, card): 12px, radius 3 ----------- */
  .swatch {
    flex: none; display: inline-block; box-sizing: border-box; width: .75rem; height: .75rem; border-radius: 3px;
    background: color-mix(in oklab, var(--tone, var(--color-primary)) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--tone, var(--color-primary));
  }
  .swatch--line {
    border-radius: 0; box-shadow: none;
    background: linear-gradient(90deg, var(--tone, var(--color-heading)) 0 40%, transparent 40% 60%, var(--tone, var(--color-heading)) 60%) center / 100% 2px no-repeat;
  }
  .swatch--pin {
    border-radius: 50%; background: var(--tone, var(--color-primary));
    box-shadow: inset 0 0 0 2px var(--map-marker-ring), 0 0 0 .5px var(--color-border-strong), 0 1px 2px rgb(var(--shadow-rgb) / .18);
  }
  .swatch--hatch { background: repeating-linear-gradient(135deg, var(--tone) 0 1.5px, transparent 1.5px 4px), color-mix(in oklab, var(--tone) 10%, transparent); }
  .swatch--road { height: .375rem; background: var(--map-road); box-shadow: inset 0 0 0 1px var(--map-casing); }
  .swatch--water { background: var(--map-water); box-shadow: inset 0 0 0 1px var(--color-border); }
  .swatch--park { background: var(--map-park); box-shadow: inset 0 0 0 1px var(--color-border); }
  .swatch--built { background: var(--map-built); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
  .swatch--rail { border-radius: 0; box-shadow: none; background: radial-gradient(circle, var(--map-rail) 0 1px, transparent 1.5px) 0 50% / 4px 4px repeat-x; }

  .map-legend {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr)); gap: .625rem var(--space-4); margin: 0; padding: 0; list-style: none;
    font: var(--fw-regular) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-muted);
  }
  .map-legend > li { display: flex; align-items: center; gap: .5rem; min-width: 0; }

  /* ---- Items on the map, as a list (each one flies to its place) ---------- */
  .map-results { display: grid; gap: 1px; margin: 0 calc(-1 * var(--space-2)); padding: 0; list-style: none; }
  .map-result {
    display: grid; grid-template-columns: .75rem minmax(0, 1fr); align-items: start; gap: .125rem .75rem; width: 100%;
    padding: .5625rem var(--space-2); border-radius: var(--radius-md); text-align: left; color: inherit;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .map-result > .swatch { grid-row: 1 / span 2; margin-top: .25rem; }
  .map-result:hover { background: var(--color-fill-subtle); }
  .map-result:active { background: var(--color-fill); }
  .map-result:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; }
  .map-result.is-selected { background: var(--color-accent-soft); }
  .map-result__title { font: var(--fw-semibold) .9375rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui); color: var(--color-heading); }
  .map-result__meta { font-size: .8125rem; line-height: 1.35; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .map-result.is-selected .map-result__meta { color: var(--color-text-muted); }

  /* ---- The map -------------------------------------------------------------- */
  .map { position: relative; isolation: isolate; min-width: 0; min-height: 0; overflow: hidden; overflow: clip; background: var(--map-land); }
  .map__viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; outline: none; }
  .map__viewport.is-dragging { cursor: grabbing; }
  /* an outline paints above the map drawn inside (an inset shadow would sit under it) */
  .map__viewport:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; }
  .map__canvas { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }

  /* the drawn map (the example in the templates); --map-px = one screen pixel in map units (map.js) */
  .map__canvas [data-layer-of] { transition: opacity var(--dur-3) var(--ease-out), visibility 0s; }
  .map__canvas [data-layer-of].is-off { opacity: 0 !important; visibility: hidden; transition: opacity var(--dur-2) var(--ease-exit), visibility 0s var(--dur-2); }
  .map-land, .map-water, .map-river, .map-park, .map-built, .map-road, .map-road-casing, .map-terrain path {
    transition: fill var(--dur-4) var(--ease-out), stroke var(--dur-4) var(--ease-out);
  }
  .map-land { fill: var(--map-land); }
  .map-water { fill: var(--map-water); }
  .map-river { fill: none; stroke: var(--map-water); stroke-linecap: round; }
  .map-park { fill: var(--map-park); }
  .map-built { fill: var(--map-built); }
  .map-road, .map-road-casing { fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .map-road { stroke: var(--map-road); }
  .map-road-casing { stroke: var(--map-casing); }
  .map-rail { fill: none; stroke: var(--map-rail); stroke-width: 2; stroke-dasharray: 1.5 5; stroke-linecap: round; opacity: .7; }
  .map-road, .map-road-casing, .map-rail { vector-effect: non-scaling-stroke; }
  /* the contours run on past the canvas edge: zoomed out (map.js stops once
     the whole canvas fits the clear area), the land around it is not cut */
  .map-terrain { --topo: var(--map-contour); --topo-ix: var(--map-contour-ix); overflow: visible; }
  .map-label {
    --px: var(--map-px, var(--map-scale, 1));
    font-family: var(--font-text); font-weight: var(--fw-semibold); font-size: calc(12px * var(--px)); letter-spacing: 0;
    fill: var(--map-label); paint-order: stroke; stroke: var(--map-land); stroke-width: calc(3px * var(--px)); stroke-linejoin: round;
    pointer-events: none; transition: fill var(--dur-4) var(--ease-out), stroke var(--dur-4) var(--ease-out);
  }
  .map-label--town { font-size: calc(20px * var(--px)); font-weight: var(--fw-display); letter-spacing: .06em; fill: var(--map-label-strong); }
  .map-label--area { font-size: calc(12px * var(--px)); text-transform: none; }
  .map-label--water { fill: var(--map-water-label); font-style: italic; font-weight: var(--fw-medium); }

  /* zones (layers) */
  .map-shape { cursor: pointer; outline: none; }
  .map-shape > path {
    fill: color-mix(in oklab, var(--tone, var(--color-primary)) 16%, transparent); stroke: var(--tone, var(--color-primary));
    stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke;
    transition: fill var(--dur-1) var(--ease-out), stroke-width var(--dur-1) var(--ease-out);
  }
  .map-shape:hover > path { fill: color-mix(in oklab, var(--tone, var(--color-primary)) 26%, transparent); stroke-width: 2; }
  .map-shape.is-selected > path { fill: color-mix(in oklab, var(--tone, var(--color-primary)) 30%, transparent); stroke-width: 3; }
  .map-shape:focus-visible > path { stroke: var(--color-focus); stroke-width: 3; }
  .map-hatch-line { stroke: var(--tone-mark); stroke-width: 1.25; opacity: .75; }
  .map-shape.map-zone-hatch > path { fill: url(#map-hatch); stroke: var(--tone-mark); }
  .map-zone-line > path { fill: none; stroke: var(--tone-line); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; opacity: .8; }

  /* markers: a 14px dot with a 2px white ring; hover 1.15; chosen 1.2 + a 6px halo.
     The marker sits at (0,0) of its <a transform="translate(x y)">; it keeps its
     size on screen at any zoom. */
  .map-marker, .map-pin { cursor: pointer; outline: none; }
  .map-marker__body, .map-pin__body {
    --k: 1;
    transform: scale(calc(var(--map-px, var(--map-scale, 1)) * var(--k))); transform-box: view-box; transform-origin: 0 0;
    transition: transform var(--dur-2) var(--ease-spring);
  }
  .map-marker:hover .map-marker__body, .map-pin:hover .map-pin__body { --k: 1.15; }
  .map-marker.is-selected .map-marker__body, .map-pin.is-selected .map-pin__body { --k: 1.2; }
  .map-marker__hit { fill: transparent; }
  .map-marker__halo {
    fill: var(--map-halo); opacity: 0; scale: .6; transform-box: fill-box; transform-origin: center;
    transition: opacity var(--dur-2) var(--ease-out), scale var(--dur-3) var(--ease-spring);
  }
  .map-marker.is-selected .map-marker__halo { opacity: 1; scale: 1; }
  .map-marker__dot { fill: var(--tone, var(--color-primary)); stroke: var(--map-marker-ring); stroke-width: 2; filter: var(--map-marker-shadow); }
  .map-marker:focus-visible .map-marker__halo { opacity: 1; scale: 1; fill: none; stroke: var(--color-focus); stroke-width: 3; }
  /* pins: a drop with a glyph, the tip at (0,0) */
  .map-pin__body { --k: .94; filter: var(--map-marker-shadow); }
  .map-pin:hover .map-pin__body { --k: 1.08; }
  .map-pin.is-selected .map-pin__body { --k: 1.13; filter: var(--map-marker-shadow) drop-shadow(0 0 2px var(--map-halo)) drop-shadow(0 0 4px var(--map-halo)); }
  .map-pin__drop { fill: var(--tone, var(--color-primary)); stroke: var(--map-marker-ring); stroke-width: 2; }
  .map-pin__icon { fill: none; stroke: var(--map-marker-ring); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .map-pin:focus-visible .map-pin__drop { stroke: var(--color-focus); stroke-width: 3.5; }
  /* "where am I": a blue dot that grows its halo once */
  .map-me { pointer-events: none; }
  .map-me circle { transform-box: fill-box; transform-origin: center; scale: var(--map-px, var(--map-scale, 1)); }
  .map-me__dot { fill: var(--color-dot-info); stroke: var(--map-marker-ring); stroke-width: 3; filter: var(--map-marker-shadow); }
  .map-me__halo { fill: color-mix(in oklab, var(--color-dot-info) 16%, transparent); stroke: color-mix(in oklab, var(--color-dot-info) 34%, transparent); stroke-width: 1; animation: atlas-map-me var(--dur-5) var(--ease-spring) backwards; }
  @keyframes atlas-map-me { from { opacity: 0; transform: scale(.3); } }

  /* ---- Floating parts: controls, basemaps, status ------------------------- */
  .map__controls { position: absolute; top: var(--map-top); right: var(--map-inset); z-index: 5; display: grid; gap: var(--map-gap); }
  .map-tools {
    display: grid; width: var(--map-ctl); border-radius: var(--radius-pill); overflow: hidden;
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur); box-shadow: var(--map-chip-shadow);
  }
  .map-tools > button {
    position: relative; display: grid; place-items: center; width: var(--map-ctl); height: var(--map-ctl); border-radius: 6px; color: var(--color-heading);
    transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  }
  .map-tools > button:first-child { border-top-left-radius: var(--radius-pill); border-top-right-radius: var(--radius-pill); }
  .map-tools > button:last-child { border-bottom-left-radius: var(--radius-pill); border-bottom-right-radius: var(--radius-pill); }
  .map-tools > button + button::before { content: ""; position: absolute; top: 0; left: .625rem; right: .625rem; height: 1px; background: var(--color-border); }
  .map-tools > button:hover { background: var(--color-fill); }
  .map-tools > button:active { background: var(--color-fill-hover); }
  .map-tools > button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; }
  .map-tools > button[aria-pressed="true"] { background: var(--color-accent-soft); color: var(--color-on-accent-soft); }
  .map-tools .icon { width: 1.125rem; height: 1.125rem; transition: scale var(--dur-1) var(--ease-out); }
  .map-tools > button:active .icon { scale: var(--press-scale-icon); }

  .map__basemaps {
    position: absolute; right: var(--map-inset); bottom: var(--map-inset); z-index: 5; padding: 3px; border-radius: var(--radius-pill);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur); box-shadow: var(--map-chip-shadow);
    transition: opacity var(--dur-2) var(--ease-out), visibility 0s;
  }
  .map__basemaps .seg { padding: 0; background: transparent; box-shadow: none; }
  .map__status {
    position: absolute; left: var(--map-inset); bottom: var(--map-inset); z-index: 5; display: flex; align-items: center; gap: .625rem;
    min-height: 2rem; max-width: calc(100% - 2 * var(--map-inset)); padding: .375rem .875rem; border-radius: var(--radius-pill);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur); box-shadow: var(--map-chip-shadow);
    font: var(--fw-medium) .75rem/1.2 var(--font-mono); letter-spacing: 0; color: var(--color-text-muted);
    font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity var(--dur-2) var(--ease-out), visibility 0s;
  }
  .map__status > * + * { padding-left: .625rem; box-shadow: inset 1px 0 0 var(--color-border); }
  .map__status > :not(.map__scale, .map__coords) { font-family: var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .map__scale { display: inline-flex; align-items: flex-end; gap: .5rem; }
  .map__scale-bar { width: 80px; height: .375rem; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 1px 1px; }
  .map__coords { font-size: .75rem; }
  @container map (max-width: 52rem) { .map__coords { display: none; } }

  /* ---- The card of the selected item ---------------------------------------- */
  .map-feature {
    position: absolute; top: var(--map-top); right: calc(var(--map-inset) + var(--map-ctl) + var(--map-gap)); z-index: 7;
    width: min(22rem, calc(100% - 2 * var(--map-inset) - var(--map-ctl) - var(--map-gap)));
    max-height: calc(100% - var(--map-top) - 2 * var(--map-inset) - 2rem); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius-lg);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick); box-shadow: var(--map-float-shadow);
    transform-origin: top right; --pop-y: -6px; --pop-scale: .96; animation: atlas-pop var(--dur-2) var(--ease-spring);
  }
  .map-app--float .map-feature { width: min(22rem, calc(100% - var(--map-panel-w) - 2 * var(--map-inset) - var(--map-ctl) - 2 * var(--map-gap))); }
  .map-feature__card { display: grid; gap: var(--space-4); padding: var(--space-4) var(--map-pad) var(--map-pad); }
  /* without JavaScript a feature's link opens its card (hidden="until-found"
     on the card and on .map-feature): only the card followed last shows */
  @media (scripting: none) { .map-feature__card:not(:target) { display: none; } }
  .map-feature__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .25rem var(--space-3); }
  .map-feature__kicker {
    display: flex; align-items: center; gap: .5rem; margin: 0; font: var(--fw-medium) .8125rem/1.3 var(--font-text);
    letter-spacing: var(--tracking-small); text-transform: none; color: var(--color-text-subtle);
  }
  .map-feature__title { grid-column: 1; margin: 0; font: var(--fw-semibold) 1.0625rem/1.3 var(--font-text); letter-spacing: var(--tracking-text); color: var(--color-heading); text-wrap: balance; }
  .map-feature__title:focus { outline: none; }
  .map-feature__head > .icon-btn { grid-column: 2; grid-row: 1 / span 2; margin: 0 -.25rem 0 0; }
  .map-feature .kv { grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr); margin: 0; }
  .map-feature .kv > dt, .map-feature .kv > dd { padding-block: .5rem; font-size: .875rem; line-height: 1.4; border-bottom: 1px solid var(--color-border); }
  .map-feature .kv > dt { color: var(--color-text-muted); }
  .map-feature .kv > dd { color: var(--color-heading); }
  .map-feature .kv > :nth-last-child(-n + 2) { border-bottom: 0; }
  .map-feature__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

  /* ---- Floating panel: a card over the map that shrinks to a pill ---------- */
  .map-app--float { grid-template-columns: minmax(0, 1fr); }
  .map-app--float > .map { grid-column: 1; grid-row: 1; }
  .map-app--float > .map-panel {
    position: absolute; top: var(--map-top); left: var(--map-inset); z-index: 6; width: var(--map-panel-w);
    max-width: calc(100% - 2 * var(--map-inset)); max-height: calc(100% - var(--map-top) - var(--map-inset) - 2rem - var(--map-gap));
    overflow: hidden; border-radius: var(--radius-lg);
    background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick); box-shadow: var(--map-float-shadow);
  }
  @media (min-width: 641px) {
    .map-panel.is-min { width: auto; border-radius: var(--radius-pill); }
    .map-panel.is-min .map-panel__head { padding: .4375rem .4375rem .4375rem 1.125rem; }
    .map-panel.is-min .map-panel__head > :not(.map-panel__bar), .map-panel.is-min .map-panel__body { display: none; }
    .map-panel.is-min .map-panel__bar { gap: var(--space-3); cursor: pointer; }
    .map-panel.is-min .map-panel__title { font-size: .9375rem; letter-spacing: var(--tracking-ui); }
    .map-panel.is-min .map-panel__note { display: inline; --pop-y: 0px; --pop-scale: .9; animation: atlas-pop var(--dur-3) var(--ease-spring) backwards; }
    .map-panel.is-min .map-panel__min .icon { rotate: 0deg; }
  }

  /* ---- Phones: the panel is a bottom sheet with three detents --------------- */
  @media (max-width: 640px) {
    .map-app { --map-sheet: 1; --map-inset: .75rem; --map-pad: 1rem; grid-template-columns: minmax(0, 1fr); }
    .map-app > .map { grid-column: 1; grid-row: 1; }
    .map-app > .map-panel {
      position: absolute; top: auto; right: 0; bottom: 0; left: 0; z-index: 8; width: auto; max-width: none;
      height: calc(100% - var(--map-inset)); max-height: none; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      background: var(--material-overlay); -webkit-backdrop-filter: var(--material-blur-thick); backdrop-filter: var(--material-blur-thick);
      box-shadow: 0 0 0 .5px var(--color-border), 0 -6px 30px -10px rgb(var(--shadow-rgb) / .24);
      transform: translateY(var(--sheet-y, 50%)); transition: transform var(--dur-3) var(--ease-spring);
    }
    .map-panel[data-detent="peek"] { --sheet-y: calc(100% - var(--map-peek) - env(safe-area-inset-bottom, 0px)); }
    .map-panel[data-detent="half"] { --sheet-y: 50%; }
    .map-panel[data-detent="full"] { --sheet-y: 0px; }
    .map-panel.is-dragging { transform: translateY(var(--sheet-drag, var(--sheet-y, 50%))); transition: none; }
    .map-panel.is-instant { transition: none; }
    .map-panel__grabber {
      position: relative; display: block; flex: none; width: 100%; height: 1.375rem; margin: 0; padding: 0; border: 0;
      border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: none; cursor: grab; touch-action: none;
    }
    .map-panel__grabber::before {
      content: ""; position: absolute; top: .4375rem; left: 50%; width: 2.25rem; height: 5px; margin-left: -1.125rem;
      border-radius: 3px; background: var(--color-border-strong);
    }
    .map-panel__grabber:focus-visible { outline: none; }
    .map-panel__grabber:focus-visible::before { outline: 3px solid var(--color-focus); outline-offset: 3px; }
    /* touch: the grabber is a 44px target (the pill stays 36 × 5); the peek
       detent grows by the same amount, so the bar still shows whole */
    @media (pointer: coarse) {
      .map-app { --map-peek: calc(6rem + var(--target-min) - 1.375rem); }
      .map-panel__grabber { height: var(--target-min); }
      .map-panel__grabber::before { top: .75rem; }
    }
    .map-panel__head { padding: 0 var(--map-pad) var(--space-3); touch-action: none; }
    .map-panel__bar { -webkit-user-select: none; user-select: none; }
    .map-panel__body { padding-bottom: calc(var(--sheet-pad, 50dvh) + var(--map-pad) + env(safe-area-inset-bottom, 0px)); }
    .map-panel__note { display: inline; }
    .map-panel .map-panel__bar > .map-panel__min .icon { rotate: 0deg; }
    .map-panel[data-detent="peek"] .map-panel__min .icon { rotate: 180deg; }
    /* peek: only the bar shows; the rest fades */
    .map-panel__head > :not(.map-panel__bar), .map-panel__body { transition: opacity var(--dur-3) var(--ease-out), visibility 0s; }
    .map-panel[data-detent="peek"] .map-panel__head > :not(.map-panel__bar), .map-panel[data-detent="peek"] .map-panel__body {
      opacity: 0; visibility: hidden; transition: opacity var(--dur-2) var(--ease-exit), visibility 0s var(--dur-2);
    }
    .map-panel[data-detent="peek"] .map-panel__bar { cursor: pointer; }
    .map__basemaps, .map__status { bottom: calc(var(--map-peek) + var(--map-gap)); }
    .map__basemaps { right: var(--map-inset); }
    .map__status { left: var(--map-inset); }
    .map__coords, .map__status > :not(.map__scale) { display: none; }
    .map-app.is-sheet-up .map__basemaps, .map-app.is-sheet-up .map__status { opacity: 0; visibility: hidden; transition: opacity var(--dur-1) var(--ease-exit), visibility 0s var(--dur-1); }
    .map-app .map-feature {
      top: auto; right: var(--map-inset); bottom: calc(var(--map-peek) + var(--map-gap)); left: var(--map-inset); z-index: 9; width: auto;
      max-height: calc(100% - var(--map-peek) - var(--map-gap) - var(--map-inset) - 3.5rem); transform-origin: bottom center; --pop-y: 10px;
    }
  }
  /* a narrow map (a phone, a docs demo): the scale sits above the basemap
     switcher instead of beside it, where the two would touch */
  @container map (max-width: 28rem) {
    .map__status { bottom: calc(var(--map-inset) + var(--seg-h) + 6px + var(--map-gap)); }
  }
  @media (max-width: 640px) {
    @container map (max-width: 28rem) {
      .map__status { bottom: calc(var(--map-peek) + 2 * var(--map-gap) + var(--seg-h) + 6px); }
    }
  }

  /* ---- Accessibility modes ---------------------------------------------- */
  @media (forced-colors: active) {
    .map-panel, .map-feature, .map-tools, .map__basemaps, .map__status { outline: 1px solid CanvasText; outline-offset: -1px; }
    .layer-list .layer__toggle > input[type="checkbox"] { forced-color-adjust: none; background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
    .layer-list .layer__toggle > input[type="checkbox"]:checked { background: Highlight; box-shadow: none; }
    .layer-list .layer__toggle > input[type="checkbox"]::before { background: CanvasText; box-shadow: none; }
    .layer-list .layer__toggle > input[type="checkbox"]:checked::before { background: HighlightText; }
    .map-panel__grabber::before { background: CanvasText; }
    .swatch, .map-legend .swatch { forced-color-adjust: none; }
    .layer-list .layer__opacity { forced-color-adjust: none; }
    .layer-list .layer__opacity::-webkit-slider-runnable-track { background: linear-gradient(90deg, Highlight var(--range-fill, 100%), GrayText var(--range-fill, 100%)); }
    .layer-list .layer__opacity::-webkit-slider-thumb { background: Canvas; box-shadow: inset 0 0 0 2px CanvasText; }
    .layer-list .layer__opacity::-moz-range-track { background: GrayText; }
    .layer-list .layer__opacity::-moz-range-progress { background: Highlight; }
    .layer-list .layer__opacity::-moz-range-thumb { background: Canvas; box-shadow: inset 0 0 0 2px CanvasText; }
  }
}

/* ---- css/components/kv.css ---- */
/* Atlas · Key–value list
   Facts as label and value: the label muted (14px), the value in the
   heading colour (15px), rows split by hairlines inset to the content.
     <dl class="kv"><dt>Tip</dt><dd>Plan urbanistic zonal</dd>…</dl>
   .kv--stack puts the label over the value (narrow columns); on phones
   (520px or less) every .kv does. A value may hold a .due, .status, .tag
   or a .cell-mono number. */
@layer components {
  .kv { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); align-content: start; }
  /* label and value share the row's height (one continuous hairline) and
     centre in it, so a pill in the value lines up with its label */
  .kv > dt, .kv > dd { align-content: center; padding-block: .7rem; border-bottom: 1px solid var(--color-border); }
  .kv > dt { padding-right: var(--space-6); font-size: var(--step--1); line-height: 1.4; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  .kv > dd { margin: 0; min-width: 0; font-size: .9375rem; line-height: 1.4; letter-spacing: var(--tracking-ui); color: var(--color-heading); overflow-wrap: anywhere; }
  .kv > :nth-last-child(-n + 2) { border-bottom: 0; }
  .kv > dd > :is(.due, .tag, .status) { vertical-align: middle; }
  .kv--stack { grid-template-columns: minmax(0, 1fr); }
  .kv--stack > dt { padding-bottom: .1rem; padding-right: 0; border-bottom: 0; }
  .kv--stack > dd { padding-top: 0; }
  @media (max-width: 520px) {
    .kv { grid-template-columns: minmax(0, 1fr); }
    .kv > dt { padding-bottom: .1rem; border-bottom: 0; }
    .kv > dd { padding-top: 0; }
  }
}

/* ---- css/components/timeline.css ---- */
/* Atlas · Timeline
   What happened and what comes next, as a 2px rail with 10px dots:
   done = a solid dot in the heading colour, current = the primary blue with
   a 4px accent-soft halo, future = a ring. Time 13px tabular subtle, title
   15px 600, text 14px muted.
     <ol class="timeline">
       <li class="timeline__item is-done"><span class="timeline__date">12.03.2026</span>
         <p class="timeline__title">Documentația a fost depusă</p><p class="timeline__text">…</p></li>
       <li class="timeline__item is-current">…</li>
       <li class="timeline__item">…</li>
     </ol>
   The rail is drawn in segments between the dots, so it needs no knowledge
   of the surface under it (white tile, grey plane, dark mode).
   .timeline--compact tightens it for side columns and the inspector. */
@layer components {
  .timeline { --tl-dot: .625rem; --tl-x: .3125rem; --tl-top: .3rem; --tl-gap: var(--space-6); --tl-rail-gap: 5px; position: relative; padding: 0 0 0 1.75rem; list-style: none; }
  .timeline__item { position: relative; padding-bottom: var(--tl-gap); }
  .timeline__item:last-child { padding-bottom: 0; }
  /* the dot */
  .timeline__item::before {
    content: ""; position: absolute; top: var(--tl-top); left: calc(-1.75rem + var(--tl-x) - var(--tl-dot) / 2 + 1px);
    width: var(--tl-dot); height: var(--tl-dot); border-radius: 50%; box-sizing: border-box;
    border: 1.5px solid var(--color-control-border); background: transparent;
  }
  .timeline__item.is-done::before { border-color: var(--color-heading); background: var(--color-heading); }
  .timeline__item.is-current::before { border-color: var(--color-primary); background: var(--color-primary); box-shadow: 0 0 0 4px var(--color-accent-soft); }
  /* the rail: from below this dot to above the next one */
  .timeline__item:not(:last-child)::after {
    content: ""; position: absolute; left: calc(-1.75rem + var(--tl-x)); width: 2px; border-radius: 1px;
    top: calc(var(--tl-top) + var(--tl-dot) + var(--tl-rail-gap)); bottom: calc(var(--tl-rail-gap) - var(--tl-top));
    background: var(--color-border-strong);
  }
  .timeline__item.is-done:not(:last-child)::after { background: color-mix(in oklab, var(--color-heading) 30%, transparent); }
  .timeline__date { display: block; font-size: .8125rem; font-weight: var(--fw-medium); line-height: 1.35; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .timeline__title { margin-top: .1rem; font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.4; letter-spacing: -.011em; color: var(--color-heading); }
  .timeline__text { margin-top: .2rem; font-size: var(--step--1); line-height: 1.45; color: var(--color-text-muted); }
  .timeline__item.is-current .timeline__date { color: var(--color-heading); font-weight: var(--fw-semibold); }
  .timeline--compact { --tl-gap: var(--space-4); --tl-rail-gap: 3px; padding-left: 1.5rem; }
  .timeline--compact .timeline__item::before { left: calc(-1.5rem + var(--tl-x) - var(--tl-dot) / 2 + 1px); }
  .timeline--compact .timeline__item:not(:last-child)::after { left: calc(-1.5rem + var(--tl-x)); }
  .timeline--compact .timeline__title { font-size: var(--step--1); }
  .timeline--compact .timeline__text { font-size: .8125rem; }
  @media (forced-colors: active) {
    .timeline__item::before { forced-color-adjust: none; border-color: CanvasText; }
    .timeline__item:is(.is-done, .is-current)::before { background: CanvasText; }
    .timeline__item:not(:last-child)::after { background: CanvasText; }
  }
}

/* ---- css/components/avatar.css ---- */
/* Atlas · Avatar (spec §3.4)
   A person: a circle with a photo or initials. Neutral by default
   (--color-fill-hover, heading initials 600), never a colour per person.
     .avatar--xs 24 · .avatar--sm 32 · .avatar 40 · .avatar--lg 56
     .avatar--accent    tinted: "you" (your own row, your messages)
     .avatar--inverse   graphite (the system, an institution)
     .avatar-group      overlapping avatars, each ringed in the plane colour
                        (a tile can set --avatar-ring: var(--color-tile))
     .person · .person__name · .person__role   avatar + name + role
   Initials never go under 12px. Markup: lab/s2-controls.html. */
@layer components {
  .avatar {
    --avatar: 2.5rem;
    display: inline-grid; place-items: center; flex: none; width: var(--avatar); height: var(--avatar); overflow: hidden;
    border-radius: 50%; background: var(--color-fill-hover); color: var(--color-heading);
    font: var(--fw-semibold) max(var(--step--2), calc(var(--avatar) * .36))/1 var(--font-text); letter-spacing: 0;
    -webkit-user-select: none; user-select: none;
  }
  .avatar img { width: 100%; height: 100%; object-fit: cover; }
  .avatar--xs { --avatar: 1.5rem; font-size: var(--step--2); }
  .avatar--sm { --avatar: 2rem; }
  .avatar--lg { --avatar: 3.5rem; }
  .avatar--accent { background: var(--color-accent-soft); color: var(--color-on-accent-soft); }
  .avatar--inverse { background: var(--color-selected); color: var(--color-on-selected); }

  .avatar-group { display: inline-flex; align-items: center; }
  .avatar-group > .avatar { box-shadow: 0 0 0 2px var(--avatar-ring, var(--color-plane, var(--color-bg))); }
  .avatar-group > .avatar + .avatar { margin-inline-start: calc(var(--avatar) * -.16); }

  .person { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; }
  .person__name { display: block; font-weight: var(--fw-semibold); color: var(--color-heading); line-height: 1.3; }
  .person__role { display: block; font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
}

/* ---- css/components/list.css ---- */
/* Atlas · List
   An inset grouped list, as in Settings: a tile of rows at least 52px tall,
   an optional 36px squircle on the fill with a heading-colour glyph (never a
   blue gradient), a 16px title and a 13px line under it, separators inset to
   the text column. A linked row (a.list__item) shows a chevron at its end,
   hovers to the faint fill and darkens while pressed.
     <ul class="list">
       <li class="list__item"><span class="list__icon"><svg class="icon">…</svg></span>
         <span class="list__body"><span class="list__title">Memoriu general.pdf</span>
         <span class="list__meta">2,4 MB · 12.03.2026</span></span>
         <button class="icon-btn icon-btn--ghost" …>…</button></li>
       <li><a class="list__item" href="…">…</a></li>
     </ul>
   .list--plain: rows without icons (the separators start at the text). */
@layer components {
  .list {
    --list-px: var(--space-5); --list-icon: 2.25rem;
    padding: 0; list-style: none; overflow: hidden;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .list > li { position: relative; }
  .list__item {
    position: relative; display: flex; align-items: center; gap: var(--space-4); min-height: 3.25rem;
    padding: .7rem var(--list-px); color: inherit; text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  /* separators inset to the text column (G19): after an icon, from the text */
  .list > :is(li, .list__item) + :is(li, .list__item)::before {
    content: ""; position: absolute; z-index: 1; top: 0; left: var(--list-sep, calc(var(--list-px) + var(--list-icon) + var(--space-4))); right: 0;
    height: 1px; background: var(--color-border); pointer-events: none;
  }
  .list--plain { --list-sep: var(--list-px); }
  .list__icon {
    display: grid; place-items: center; flex: none; width: var(--list-icon); height: var(--list-icon); border-radius: var(--radius-sm);
    background: var(--color-fill); color: var(--color-heading);
  }
  .list__icon .icon { width: 1.125rem; height: 1.125rem; }
  .list__body { flex: 1; min-width: 0; }
  .list__title { display: block; font-size: var(--step-0); font-weight: var(--fw-semibold); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-heading); }
  .list__meta { display: block; margin-top: .1rem; font-size: .8125rem; line-height: 1.35; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .list__end { flex: none; font-size: var(--step--1); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
  a.list__item:hover { background: var(--color-fill-subtle); }
  a.list__item:active { background: var(--color-fill); }
  a.list__item:focus-visible { outline-offset: -3px; border-radius: inherit; }
  /* the trailing disclosure: a 14px subtle chevron */
  a.list__item::after {
    content: ""; flex: none; width: .5rem; height: .5rem; margin: 0 .2rem 0 auto;
    border: solid var(--color-text-subtle); border-width: 1.75px 1.75px 0 0; border-radius: 1px;
    transform: rotate(45deg); transition: transform var(--dur-2) var(--ease-spring);
  }
  a.list__item:hover::after { transform: translateX(2px) rotate(45deg); }
  /* forced colours drop backgrounds: the separators are drawn in GrayText */
  @media (forced-colors: active) {
    .list > :is(li, .list__item) + :is(li, .list__item)::before { forced-color-adjust: none; background: GrayText; }
  }
}

/* ---- css/components/quote.css ---- */
/* Atlas · Quote
   A pull quote: the words large and calm, the source small under them. The
   Romanian quotation marks („…”) come from CSS — do not type them.
     <blockquote class="quote">
       <p>Un plan bun nu desenează doar clădiri, ci felul în care oamenii trăiesc între ele.</p>
       <footer><cite>Arhitect-șef</cite>, primărie de municipiu</footer>
     </blockquote>
   (A short citation inside long text is a plain <blockquote> in .prose.)
   Markup and options: docs/index.html. */
@layer components {
  .quote { margin: 0; quotes: "„" "”" "«" "»"; }
  .quote > p {
    font: var(--fw-medium) var(--step-2)/1.32 var(--font-display); letter-spacing: var(--tracking-tight);
    color: var(--color-heading); text-wrap: pretty;
  }
  .quote > p + p { margin-top: .6em; }
  .quote > p:first-of-type::before { content: open-quote; }
  .quote > p:last-of-type::after { content: close-quote; }
  .quote > footer {
    margin-top: var(--space-4);
    font-size: var(--step--1); line-height: var(--lh-caption); letter-spacing: var(--tracking-ui); color: var(--color-text-subtle);
  }
  .quote cite { font-style: normal; font-weight: var(--fw-semibold); color: var(--color-heading); }
}

/* ---- css/components/code.css ---- */
/* Atlas · Code
   Inline code on a soft fill; a code block on the surface panel (spec
   §3.12: --color-surface, mono 13px, radius 16) with a copy pill.
     Cod în text: <code>--color-primary</code>
     <pre class="code"><code id="cod-1">…</code><button type="button" class="copy" data-copy="cod-1"><svg class="icon" aria-hidden="true"><use href="…#i-copy"/></svg><span>Copiază</span></button></pre>
   atlas.js copies the text of the element named by data-copy and says
   "Copiat" for a moment (data-copied changes the word).
   Markup and options: docs/index.html. */
@layer components {
  :not(pre) > code {
    padding: .12em .4em; border-radius: var(--radius-xs);
    background: var(--color-fill); color: var(--color-heading);
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
  .code {
    position: relative; margin: 0; padding: var(--space-5) var(--space-6); max-width: 100%; overflow-x: auto;
    border-radius: var(--radius-code); background: var(--color-surface); color: var(--color-text);
    font: .8125rem/1.7 var(--font-mono); letter-spacing: 0; tab-size: 2;
  }
  .code > code { font-size: inherit; }
  /* the copy pill has a band of its own above the code (it never sits on a
     line), on an opaque fill, and it stays at the band's visible end while
     a long line scrolls sideways: the block is one column as wide as its
     longest line, the pill sticks 12px from the visible edge (the sticky
     offset counts from the padding's inner edge, hence 12 − 24px). It
     does not print (base.css). */
  .code:has(> .copy) { display: grid; grid-template-columns: minmax(max-content, 1fr); padding-top: var(--space-3); }
  .code:has(> .copy) > code { grid-row: 2; }
  .code .copy {
    grid-row: 1; justify-self: end; position: sticky; right: calc(var(--space-3) - var(--space-6));
    margin: 0 calc(var(--space-3) - var(--space-6)) var(--space-2) 0;
    background: linear-gradient(var(--color-fill), var(--color-fill)), var(--color-surface-raised);
  }
  .code .copy:hover { background: linear-gradient(var(--color-fill-hover), var(--color-fill-hover)), var(--color-surface-raised); }
  .copy {
    position: relative; display: inline-flex; align-items: center; gap: .4rem; height: 2rem; padding: 0 .8rem;
    border: 0; border-radius: var(--radius-pill); background: var(--color-fill); color: var(--color-heading);
    font: var(--fw-medium) .8125rem/1 var(--font-text); letter-spacing: var(--tracking-small); white-space: nowrap; cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-out), scale var(--dur-2) var(--ease-spring);
  }
  .copy:hover { background: var(--color-fill-hover); }
  .copy:active { scale: var(--press-scale-chip); transition-duration: var(--dur-1); }
  .copy .icon { width: 1rem; height: 1rem; }
  @media (pointer: coarse) { .copy::after { content: ""; position: absolute; inset: -.375rem 0; } }
}

/* ---- css/components/figure.css ---- */
/* Atlas · Figure
   An image (or a generated .cover) with its caption.
     <figure class="figure"><img src="…" alt="…"><figcaption>Figura 1. …</figcaption></figure>
   Markup and options: docs/index.html. */
@layer components {
  .figure { display: grid; gap: var(--space-3); }   /* margins come from the flow it sits in (.prose, .stack) */
  .figure > :is(img, picture, video, svg, .cover) { display: block; width: 100%; overflow: hidden; border-radius: var(--radius-lg); }
  .figure > .cover { aspect-ratio: 16 / 9; }
  .figure > figcaption {
    max-width: var(--measure);
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small);
    color: var(--color-text-subtle);
  }
}

/* ---- css/components/divider.css ---- */
/* Atlas · Divider
   A hairline with a short word in the middle: splits two options or two
   groups of content. Empty, it is a plain hairline with room around it.
     <p class="divider">sau</p>
   Markup and options: docs/index.html. */
@layer components {
  .divider {
    display: flex; align-items: center; gap: var(--space-4);
    font: var(--fw-medium) .8125rem/var(--lh-caption) var(--font-text); letter-spacing: var(--tracking-small);
    color: var(--color-text-subtle);
  }
  .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
  .divider:empty { gap: 0; margin-block: var(--space-6); }
  .divider:empty::after { display: none; }
}

/* ---- css/components/facts.css ---- */
/* Atlas · Facts (spec §3.3, K3) — a row of big numbers with short labels:
   the few figures a citizen decides on (the legal term, the time online,
   the fee). Used in the bento lead tile and on a service page.
     <dl class="facts">
       <div class="facts__item"><dt class="facts__label">Termen legal</dt>
         <dd class="facts__value">30<span class="facts__unit">zile</span></dd></div>
       <div class="facts__item"><dt class="facts__label">Completezi online</dt>
         <dd class="facts__value">15<span class="facts__unit">min</span></dd></div>
       <div class="facts__item"><dt class="facts__label">Taxă, de la</dt>
         <dd class="facts__value">5<span class="facts__unit">lei</span></dd></div>
     </dl>
   The value shows first and the label under it, but the reading order
   stays label → value (CSS `order`, the markup is untouched). Three items
   is the measure; they wrap on narrow screens, and the hairlines between
   them follow (a divider that would start a row is clipped away).
   .facts--sm   the smaller figures of a dense column (28 → 34px)
   .facts--quad four figures: two by two on phones, never 3 + 1
   --facts-min  the narrowest column before the row wraps (5.25rem): three
                facts stay three across on a phone, where the figures take
                the --sm size (a 2 + 1 row would leave an empty half) */
@layer components {
  .facts {
    --facts-gap: clamp(1.25rem, .8rem + 1.6vw, 2.5rem); --facts-min: 5.25rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--facts-min)), 1fr)); gap: var(--space-5) var(--facts-gap);
    margin: 0; padding: 0; overflow: hidden;
  }
  .facts__item { position: relative; display: flex; flex-direction: column; min-width: 0; }
  /* the hairline sits in the middle of the gap, at the start of each item;
     the one in front of a row's first item falls outside and is clipped */
  .facts__item::before {
    content: ""; position: absolute; inset-block: .35rem .2rem; inset-inline-start: calc(var(--facts-gap) / -2);
    width: 1px; background: var(--color-border);
  }
  /* the unit drops under the figure rather than overflow a narrow column */
  .facts__value {
    order: -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .14em; margin: 0;
    font: var(--fw-display) clamp(2.25rem, 1.8rem + 1.3vw, 3rem)/1 var(--font-display);
    letter-spacing: -.035em; font-variant-numeric: tabular-nums lining-nums;
    color: var(--color-heading); white-space: nowrap;
  }
  .facts__unit { font-size: max(var(--step--2), .42em); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-text); color: var(--color-text-muted); }
  .facts__label { margin-top: var(--space-2); font-size: .8125rem; line-height: 1.35; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); text-wrap: balance; }
  .facts--sm .facts__value { font-size: clamp(1.75rem, 1.5rem + .7vw, 2.125rem); letter-spacing: -.03em; }
  @media (max-width: 480px) {
    .facts__value { font-size: clamp(1.75rem, 1.5rem + .7vw, 2.125rem); letter-spacing: -.03em; }
  }
  @media (max-width: 599px) {
    .facts--quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}

/* ---- css/components/palette.css ---- */
/* Atlas · Command palette (⌘K / Ctrl+K, "/", or a [data-palette-open] trigger)
   A dialog variant (dialog.css gives the surface, the backdrop and the
   sheet motion, M12) anchored at 12vh: min(40rem, 100vw − 2rem), radius 20.
   A 52px borderless search at 19px with a magnifier; results grouped
   (Dosare · Acțiuni · Pagini) in menu-style rows that light up in primary;
   keyboard hints in the foot. On phones it is a full-height sheet from the
   bottom with a "Renunță" button (palette.js adds it). palette.js filters
   (case- and diacritic-insensitive), moves the active row with ↑/↓
   (aria-activedescendant), opens it with Enter and returns focus on close.
   Markup: CONTRACTS §3.1 and lab/s5-overlays.html#paleta. */
@layer components {
  .palette {
    --dlg-from: 0 -10px; --dlg-to: 0 -6px; --dlg-fade: 0; --dlg-scale: .98;
    width: min(40rem, calc(100vw - 2rem)); max-height: min(34rem, calc(88dvh - 2rem));
    margin: 12vh auto auto; border-radius: var(--radius-palette); overflow: hidden; flex-direction: column;
  }
  .palette[open] { display: flex; }

  /* ---- The search -------------------------------------------------------- */
  .palette__search {
    position: relative; display: flex; align-items: center; gap: .5rem; flex: none; min-height: 3.25rem;
    padding: 0 .875rem 0 1.25rem; box-shadow: inset 0 -1px 0 var(--color-border);
  }
  /* The field is borderless: focus shows as the search row's own underline
     in the focus colour (it is always there while the palette is open) */
  .palette__search:focus-within { box-shadow: inset 0 -2px 0 var(--color-focus); }
  .palette__search > .icon { width: 1.25rem; height: 1.25rem; color: var(--color-text-subtle); stroke-width: 1.9; }
  .palette__input {
    flex: 1 1 auto; min-width: 0; height: 3.25rem; padding: 0 .25rem; border: 0; border-radius: 0; background: transparent;
    font: var(--fw-regular) 1.1875rem/1.2 var(--font-text); letter-spacing: var(--tracking-text); color: var(--color-heading);
    outline: none;
  }
  .palette__input:focus-visible { outline: 2px solid transparent; outline-offset: -2px; }
  .palette__input::placeholder { color: var(--color-text-subtle); opacity: 1; }
  .palette__input::-webkit-search-cancel-button { display: none; }
  .palette__search > .kbd { flex: none; cursor: pointer; }
  .palette__cancel { display: none; flex: none; min-height: var(--target-min); padding: 0 .25rem; font-size: 1rem; font-weight: var(--fw-medium); color: var(--color-link); }

  /* ---- Results ----------------------------------------------------------- */
  .palette__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .375rem; scroll-padding-block: .375rem; }
  .palette__group + .palette__group { margin-top: .375rem; }
  .palette__label { padding: .625rem .75rem .375rem; font: var(--fw-semibold) .75rem/1.3 var(--font-text); letter-spacing: 0; color: var(--color-text-subtle); }
  .palette__item {
    display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 2.75rem; padding: .375rem .75rem .375rem .5rem;
    border-radius: 10px; font: var(--fw-regular) .9375rem/1.3 var(--font-text); letter-spacing: var(--tracking-ui);
    color: var(--color-text); text-align: left; text-decoration: none; cursor: pointer;
    outline: none;
  }
  .palette__item:hover { color: var(--color-text); text-decoration: none; }
  .palette__item > .icon {
    width: 1.75rem; height: 1.75rem; padding: .3125rem; border-radius: 7px;
    background: var(--color-fill); color: var(--color-text-muted); stroke-width: 1.8;
  }
  .palette__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .palette__mark { background: none; color: var(--color-heading); font-weight: var(--fw-semibold); }
  .palette__hint { flex: none; font-size: .8125rem; color: var(--color-text-subtle); }
  /* The active row: primary, white text and icons (macOS) */
  .palette__item.is-active { background: var(--color-primary); color: var(--color-on-primary); }
  .palette__item.is-active > .icon { background: color-mix(in srgb, var(--color-on-primary) 20%, transparent); color: var(--color-on-primary); }
  .palette__item.is-active :is(.palette__hint, .palette__mark) { color: var(--color-on-primary); }

  .palette__empty { padding: var(--space-10) var(--space-8); text-align: center; font-size: .9375rem; line-height: 1.5; color: var(--color-text-muted); text-wrap: balance; }

  /* ---- Foot: keyboard hints ---------------------------------------------- */
  .palette__foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1.25rem; flex: none;
    padding: .625rem 1.25rem; box-shadow: inset 0 1px 0 var(--color-border);
    font-size: .75rem; line-height: 1.3; letter-spacing: 0; color: var(--color-text-subtle);
  }
  .palette__foot > span { display: inline-flex; align-items: center; gap: .25rem; }
  .palette__foot > span > .kbd + .kbd { margin-left: -.125rem; }
  .palette :is(.palette__search, .palette__foot) .kbd { font-size: .75rem; color: var(--color-text-subtle); }

  /* ---- Phones: a full-height sheet --------------------------------------- */
  @media (max-width: 640px) {
    .palette {
      --dlg-from: 0 100%; --dlg-to: 0 100%; --dlg-fade: 1; --dlg-scale: 1;
      width: 100%; height: calc(100dvh - .75rem - env(safe-area-inset-top)); max-height: none;
      margin: auto 0 0; border-radius: var(--radius-palette) var(--radius-palette) 0 0; padding-bottom: env(safe-area-inset-bottom);
    }
    .palette__search { padding: .25rem .75rem 0 1rem; }
    .palette__input { font-size: 1.0625rem; }
    .palette__search > .kbd, .palette__foot, .palette__hint { display: none; }
    /* The row's text gets the width it needs: two lines, never cut mid-name */
    .palette__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; }
    .palette__cancel { display: inline-flex; align-items: center; }
  }
  @media (forced-colors: active) {
    .palette__item.is-active { forced-color-adjust: none; background: Highlight; color: HighlightText; }
    .palette__item.is-active :is(.icon, .palette__hint, .palette__mark) { color: HighlightText; }
  }
}

/* ---- css/components/settings.css ---- */
/* Atlas Modern · Settings (spec §5.11, §8.1) — System Settings style
   Settings as inset-grouped tiles: a small title above each group, rows
   inside one tile split by inset hairlines, an optional note under it.
   Each row: on the start side a label (15/600) and a hint (13, subtle); on
   the end side the control — a switch, a select, a segmented control, a
   button, a value. Rows are at least 56px tall.
     <div class="settings">
       <section class="settings-group" aria-labelledby="sg-aspect">
         <h2 class="settings-group__title" id="sg-aspect">Aspect</h2>
         <div class="settings-group__tile">

           A switch (the whole row is the label: one big target):
           <label class="settings-row">
             <span class="settings-row__text"><span class="settings-row__label">Rezumatul săptămânii</span>
               <span class="settings-row__hint">Luni dimineața, pe e-mail</span></span>
             <span class="switch settings-row__end"><input type="checkbox" role="switch" checked></span>
           </label>

           A wide control (select, segmented): it moves under the text, full
           width, when the tile is narrow (a phone):
           <div class="settings-row">
             <span class="settings-row__text"><label class="settings-row__label" for="s-lang">Limba</label>
               <span class="settings-row__hint">…</span></span>
             <div class="settings-row__control"><span class="select select--sm"><select id="s-lang">…</select></span></div>
           </div>

           A row that opens a page: <a class="settings-row" href="…">… <span class="settings-row__value">Română</span></a>
         </div>
         <p class="settings-group__note">…</p>
       </section>
     </div>
   .settings-group__tile--icons: rows start with a 32px icon squircle
   (.settings-row__icon); the hairlines then start after it.
   Sub-navigation on wide screens: the page puts .settings in the main
   column of .with-aside.with-aside--start and a .sidenav (data-spy) in the
   side column, one link per group (lab/s3-forms.html). */
@layer components {
  .settings { display: grid; gap: clamp(1.75rem, 1.4rem + 1vw, 2.5rem); max-width: 46rem; min-width: 0; }
  .settings-group, .settings-group__tile { --settings-pad: clamp(1rem, .85rem + .5vw, 1.25rem); --settings-inset: var(--settings-pad); }
  .settings-group { display: grid; gap: var(--space-2); min-width: 0; scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
  .settings-group__title {
    padding-inline: var(--settings-pad);
    font: var(--fw-semibold) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  .settings-group__tile {
    container: settings-tile / inline-size;
    min-width: 0; border-radius: var(--radius-tile); background: var(--color-tile);
    box-shadow: var(--tile-ring), var(--tile-shadow); overflow: clip;
  }
  .settings-group__tile--icons { --settings-inset: calc(var(--settings-pad) + 2rem + var(--space-4)); }
  .settings-group__tile + .settings-group__tile { margin-top: var(--space-3); }
  .settings-group__note {
    padding-inline: var(--settings-pad); max-width: 60ch;
    font-size: .8125rem; line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }

  /* ---- Row ----------------------------------------------------------------- */
  .settings-row {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
    min-height: 3.5rem; padding: .75rem var(--settings-pad);
    color: var(--color-text); text-decoration: none;
  }
  /* inset hairline: from the text to the tile's end edge */
  .settings-row + .settings-row::before {
    content: ""; position: absolute; top: 0; right: 0; left: var(--settings-inset); height: 1px; background: var(--color-border);
  }
  label.settings-row { cursor: pointer; }
  .settings-row__icon {
    display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: var(--radius-sm);
    background: var(--color-chip-raised); color: var(--color-heading);
  }
  .settings-row__icon .icon { width: 1.125rem; height: 1.125rem; }
  .settings-row__text { display: grid; flex: 1 1 8rem; gap: .125rem; min-width: 0; }
  .settings-row__label {
    font-size: .9375rem; font-weight: var(--fw-semibold); line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-heading);
  }
  .settings-row__hint {
    font-size: .8125rem; font-weight: var(--fw-regular); line-height: var(--lh-caption); letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  /* End side, compact (never moves): a switch, a value, a status, a small button */
  .settings-row__end { display: flex; flex: none; align-items: center; gap: var(--space-3); margin-left: auto; }
  .settings-row__end.switch > input { margin: 0; }
  .settings-row__value { font-size: .9375rem; line-height: 1.35; letter-spacing: var(--tracking-ui); color: var(--color-text-muted); }
  /* End side, wide (a select, a segmented control, a group of buttons) */
  .settings-row__control { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; gap: var(--space-2); min-width: 0; margin-left: auto; }
  .settings-row__control > .select { width: 13.5rem; }
  @container settings-tile (max-width: 34rem) {
    .settings-row__control { flex: 1 1 100%; justify-content: stretch; margin-left: 0; }
    .settings-row__control > .select, .settings-row__control > .seg { flex: 1 1 auto; width: 100%; }
    .settings-row__control > .seg > .seg__btn { flex: 1 1 0; }
    .settings-row__control > .btn { flex: 1 1 auto; }
  }

  /* A row that opens something: hover tone and a trailing chevron ›. */
  a.settings-row, button.settings-row { width: 100%; text-align: start; cursor: pointer; transition: background-color var(--dur-1) var(--ease-out); }
  a.settings-row:hover, button.settings-row:hover { background: var(--color-row-hover); color: var(--color-text); text-decoration: none; }
  a.settings-row:active, button.settings-row:active { background: var(--color-fill-subtle); }
  a.settings-row::after {
    content: ""; flex: none; width: .5rem; height: .5rem; margin-inline: 0 .125rem;
    border-top: 1.75px solid var(--color-text-subtle); border-right: 1.75px solid var(--color-text-subtle); rotate: 45deg;
  }
  a.settings-row > .settings-row__value { margin-left: auto; }
  .settings-row:focus-visible { outline-offset: -3px; border-radius: var(--radius-sm); }
  /* A destructive action row: centred, in the danger colour */
  .settings-row--danger { justify-content: center; font-size: .9375rem; font-weight: var(--fw-medium); color: var(--color-danger-fg); }
  button.settings-row--danger:hover, a.settings-row--danger:hover { color: var(--color-danger-fg); }
  a.settings-row--danger::after { content: none; }

  /* Forced colours: the tile keeps an edge (the tone and the ring are dropped) */
  @media (forced-colors: active) {
    .settings-group__tile { outline: 1px solid CanvasText; outline-offset: -1px; }
    .settings-row + .settings-row::before { background: CanvasText; }
  }
}

/* ---- css/components/local-nav.css ---- */
/* Atlas · Local nav (a service's sticky bar, SPEC §5.3)
   Once the page head has scrolled past, a slim bar slides down from under
   the site header with the service's name and its main action, so
   "Începe cererea" stays within reach on a long service page. Put it right
   after the site header (or at the start of <main>); header.js shows it.
     <div class="local-nav" data-local-nav="#svc-head">
       <div class="container local-nav__inner">
         <p class="local-nav__title">Certificat de urbanism</p>
         <a class="btn btn--sm local-nav__action" href="autentificare.html">Începe cererea <svg class="icon" aria-hidden="true"><use href="…#i-arrow"/></svg></a>
       </div>
     </div>
   data-local-nav names the element that must scroll past first (default:
   main .page-head). Hidden, it is inert (out of the tab order); while it is
   shown <html> carries .has-local-nav, so sticky side columns move down. */
@layer components {
  .local-nav {
    position: fixed; top: calc(var(--header-h) + 1px); left: 0; right: 0; z-index: calc(var(--z-header) - 1);   /* under the header and its hairline */
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: inset 0 -1px 0 var(--color-border), 0 10px 30px -24px rgb(var(--shadow-rgb) / .35);
    translate: 0 -100%; opacity: 0; visibility: hidden;
    transition: translate var(--dur-2) var(--ease-exit), opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2);
  }
  .local-nav.is-visible {
    translate: 0 0; opacity: 1; visibility: visible;
    transition: translate var(--dur-3) var(--ease-spring), opacity var(--dur-2) var(--ease-out), visibility 0s;
  }
  .local-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--local-nav-h); }
  .local-nav__title { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--fw-semibold) 1.0625rem/1.2 var(--font-display); letter-spacing: var(--tracking-text); color: var(--color-heading); }
  .local-nav__action { flex: none; }
  .local-nav__action .icon { transition: transform var(--dur-2) var(--ease-bounce); }
  .local-nav__action:hover .icon { transform: translateX(var(--nudge)); }
  /* sticky side columns keep clear of it: while it shows, html.has-local-nav
     grows --sticky-top by --local-nav-h (tokens.css) */
  @media (max-width: 640px) {
    .local-nav__title { font-size: .9375rem; }
  }
  /* touch: the pill keeps its 36px inside the 52px bar and reaches 44px
     through an invisible hit area (::after is the button's spinner) */
  @media (pointer: coarse) {
    .local-nav .local-nav__action { min-height: var(--btn-h-sm); }
    .local-nav .local-nav__action::before { content: ""; position: absolute; inset: calc((var(--btn-h-sm) - var(--target-min)) / 2) 0; }
  }
}

/* ---- css/components/split-view.css ---- */
/* Atlas · Split view ("vedere împărțită", as in Mail)
   A list of things on the left, the chosen one on the right, without
   leaving the page. Each pane scrolls on its own; a hairline divides them.
     <div class="split-view" id="registru" data-split data-split-mode="split">
       <div class="split-view__head">
         <p class="split-view__summary"><strong>6</strong> dosare</p>
         <div class="seg" role="group" aria-label="Afișare">
           <button type="button" class="seg__btn" data-split-mode-set="list" aria-pressed="false">…i-list… Listă</button>
           <button type="button" class="seg__btn" data-split-mode-set="split" aria-pressed="true">…i-columns… Împărțit</button>
         </div>
       </div>
       <div class="split-view__full">…the full table or list ("Listă")…</div>   (optional)
       <div class="split-view__panes">
         <div class="split-view__list">
           <div class="split-view__list-head"><h2 class="split-view__title">Dosare</h2><span class="split-view__count">6</span></div>
           <ul class="split-view__items" aria-labelledby="…" aria-describedby="…hint: săgețile aleg, Enter deschide…">
             <li><a class="split-item is-unread" href="dosar.html" data-split-key="OTN-2026-01261" aria-current="true">
               <span class="split-item__title"><span class="visually-hidden">Necitit: </span>Parc logistic Vest</span>
               <time class="split-item__time" datetime="2026-10-15T09:12">09:12</time>
               <span class="split-item__meta"><span class="cell-mono">OTN-2026-01261</span> Ghiroda · PUZ</span>
               <span class="split-item__flags"><span class="due due--late">Depășit</span></span>
               <span class="split-item__text">Verifică documentația depusă de solicitant…</span>
             </a></li>
           </ul>
         </div>
         <div class="split-view__detail">
           <article class="split-panel" data-split-panel="OTN-2026-01261" aria-labelledby="…">
             <div class="split-panel__bar">
               <button type="button" class="btn btn--ghost btn--sm split-panel__back" data-split-back>…i-chevron… Dosare</button>
               <span class="split-panel__crumb cell-mono">OTN-2026-01261</span>
               <div class="split-panel__actions">…icon buttons… <a class="btn btn--secondary btn--sm" href="dosar.html">Deschide dosarul</a></div>
             </div>
             <div class="split-panel__body">…</div>
           </article>
           <article class="split-panel" data-split-panel="…" hidden>…</article>
           <p class="split-view__empty" hidden>Alege un dosar din listă.</p>
         </div>
       </div>
     </div>
   Rows are links to the full page: without JS they navigate. split.js turns
   a click into a choice (aria-current="true"; the panel shows without
   navigation), ↑/↓ (Home/End) move the choice while the list has focus,
   Enter or a double click opens the full page, the URL hash keeps the
   choice (reload and Back return to it).
   Modes, data-split-mode: "split" (list + detail) or "list" (the full
   .split-view__full instead; without one, the list alone at full width and
   rows navigate). [data-split-mode-set] buttons switch it (remembered).
   At 960px or less the list stands alone; choosing a row pushes the detail
   with a back button (a slide; instant under Reduce Motion), and the
   phone's Back returns to the list.
   States on rows: .is-unread (a blue dot, a heavier title; say it in a
   visually hidden "Necitit: "), .is-overdue (the time in red). */
@layer components {
  .split-view { display: grid; gap: var(--space-4); min-width: 0; }
  .split-view__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
  .split-view__summary { font-size: var(--step--1); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
  .split-view__summary strong { font-weight: var(--fw-semibold); color: var(--color-heading); }
  .split-view__head .seg__btn .icon { width: 1rem; height: 1rem; }

  /* Modes: the full view in "list", the panes in "split" (no JS needed) */
  .split-view[data-split-mode="split"] > .split-view__full { display: none; }
  .split-view[data-split-mode="list"] > .split-view__full ~ .split-view__panes { display: none; }

  /* ---- The panes: one tile, two scrolling columns ------------------------- */
  .split-view__panes {
    --split-list-w: clamp(19rem, 26vw, 25rem);
    --split-h: max(30rem, calc(100dvh - var(--sticky-top, 0px) - var(--space-8)));
    display: grid; grid-template-columns: var(--split-list-w) minmax(0, 1fr); height: var(--split-h); min-width: 0;
    overflow: hidden; border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
  }
  .split-view[data-split-mode="list"] .split-view__panes { grid-template-columns: minmax(0, 1fr); height: auto; }
  .split-view[data-split-mode="list"] .split-view__detail { display: none; }

  /* ---- List pane ------------------------------------------------------------ */
  .split-view__list { display: flex; flex-direction: column; min-width: 0; min-height: 0; box-shadow: inset -1px 0 0 var(--color-border); }
  .split-view[data-split-mode="list"] .split-view__list { box-shadow: none; }
  .split-view__list-head {
    display: flex; align-items: center; gap: var(--space-2); min-height: 3.25rem; padding: .5rem var(--space-5);
    box-shadow: inset 0 -1px 0 var(--color-border);
  }
  .split-view__title { font: var(--fw-semibold) .9375rem/1.3 var(--font-text); letter-spacing: -.011em; color: var(--color-heading); }
  .split-view__count { font-size: .8125rem; font-weight: var(--fw-medium); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .split-view__list-head > :last-child:not(:first-child, .split-view__count) { margin-left: auto; }
  .split-view__items { flex: 1; min-height: 0; margin: 0; padding: .375rem; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .split-view__items > li { position: relative; }
  .split-view__items > li[hidden] { display: none; }
  /* separators inset to the text, hidden next to the chosen and hovered rows */
  .split-view__items > li + li::before {
    content: ""; position: absolute; top: 0; left: 1.5rem; right: .875rem; height: 1px;
    background: var(--color-border); pointer-events: none; transition: opacity var(--dur-1) var(--ease-out);
  }
  .split-view__items > li:has(> .split-item:is([aria-current="true"], :hover))::before,
  .split-view__items > li:has(> .split-item:is([aria-current="true"], :hover)) + li::before { opacity: 0; }

  /* Group heads inside the list (Depășite · Azi · Săptămâna aceasta): a row
     of the list that sticks to the top of the scrolling pane while its group
     passes under it; its hairline is inset like the rows', and the row under
     it draws no second line. li.split-view__list-head (older markup) is the
     same thing.
       <li class="split-view__group"><h3 class="split-view__group-title" id="g-late">Depășite</h3><span class="split-view__count">2</span></li> */
  .split-view__items > :is(.split-view__group, .split-view__list-head) {
    position: sticky; top: -.375rem; z-index: 1;
    display: flex; align-items: baseline; gap: var(--space-2); min-height: 0;
    margin: 0 calc(1px - .375rem) 0 -.375rem; padding: .875rem calc(.875rem + .375rem - 1px) .5rem calc(1.5rem + .375rem);   /* stops 1px short of the pane's divider */
    background: var(--color-tile); box-shadow: none;
  }
  .split-view__items > :is(.split-view__group, .split-view__list-head):first-child { margin-top: -.375rem; }
  .split-view__items > :is(.split-view__group, .split-view__list-head)::before { content: none; }
  .split-view__items > :is(.split-view__group, .split-view__list-head)::after {
    content: ""; position: absolute; bottom: 0; left: calc(1.5rem + .375rem); right: calc(.875rem + .375rem - 1px); height: 1px; background: var(--color-border);
  }
  .split-view__items > :is(.split-view__group, .split-view__list-head) + li::before { content: none; }
  .split-view__group-title, .split-view__items > .split-view__list-head > .split-view__title {
    margin: 0; font: var(--fw-semibold) .8125rem/1.3 var(--font-text); letter-spacing: var(--tracking-small); color: var(--color-text-muted);
  }

  /* ---- A row ---------------------------------------------------------------- */
  .split-item {
    --si-pt: .75rem;                    /* the top padding: the unread dot hangs from it (compact: .5rem) */
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .1rem var(--space-3);
    padding: var(--si-pt) .875rem .8rem 1.5rem; border-radius: var(--radius-md);
    color: inherit; text-decoration: none; -webkit-user-select: none; user-select: none;
    transition: background-color var(--dur-1) var(--ease-out);
  }
  .split-item:hover { background: var(--color-fill-subtle); color: inherit; text-decoration: none; }
  .split-item:active { background: var(--color-fill); }
  .split-item:focus-visible { outline-offset: -3px; border-radius: var(--radius-md); }
  .split-item__title {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .9375rem; font-weight: var(--fw-medium); line-height: 1.35; letter-spacing: -.011em; color: var(--color-heading);
  }
  .split-item__time { justify-self: end; font-size: .8125rem; letter-spacing: var(--tracking-small); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .split-item__meta {
    display: flex; align-items: center; gap: .45rem; min-width: 0; overflow: hidden; white-space: nowrap;
    font-size: .8125rem; line-height: 1.4; letter-spacing: var(--tracking-small); color: var(--color-text-muted);
  }
  .split-item__meta .cell-mono { font-size: .75rem; flex: none; }
  /* the place gives way with an ellipsis, never cut mid-word by the pill */
  .split-item__meta > :not(.cell-mono) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .split-item__flags { display: flex; align-items: center; gap: .3rem; justify-self: end; }
  .split-item__flags .due, .split-item__flags .tag { height: 1.375rem; padding-inline: .5rem; font-size: .75rem; }
  .split-item__flags .due .icon { width: .75rem; height: .75rem; }
  .split-item__text {
    grid-column: 1 / -1; display: -webkit-box; margin-top: .15rem; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    font-size: .8125rem; line-height: 1.4; letter-spacing: var(--tracking-small); color: var(--color-text-subtle);
  }
  /* unread: a blue dot in the margin and a heavier title */
  .split-item.is-unread::before {
    content: ""; position: absolute; top: calc(var(--si-pt) + .4rem); left: .6rem; width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--color-dot-info);
  }
  .split-item.is-unread .split-item__title { font-weight: var(--fw-semibold); }
  .split-item__unread { white-space: nowrap; }   /* the visually hidden "Necitit: " (removed once read) */
  .split-item.is-overdue .split-item__time { color: var(--color-danger-fg); font-weight: var(--fw-semibold); }
  /* chosen: the accent tint; a deeper tint while the list has focus */
  .split-item[aria-current="true"] { background: var(--color-accent-soft); }
  .split-view__items:focus-within .split-item[aria-current="true"] { background: var(--color-accent-soft-hover); }
  .split-item[aria-current="true"] .split-item__title { font-weight: var(--fw-semibold); }

  /* ---- Detail pane ---------------------------------------------------------- */
  .split-view__detail { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .split-panel { display: flex; flex-direction: column; min-height: 100%; }
  .split-panel[hidden] { display: none; }
  .split-panel:focus { outline: none; }
  .split-panel.is-entering > .split-panel__body { --rise: 6px; animation: atlas-rise var(--dur-2) var(--ease-out) backwards; }
  .split-panel__bar {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; gap: var(--space-2); min-height: 3.25rem; padding: .375rem var(--space-3) .375rem var(--space-6);
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: inset 0 -1px 0 var(--color-border);
  }
  .split-panel__back { display: none; margin-left: calc(-1 * var(--space-3)); padding-inline: .5rem .75rem; }
  .split-panel__back .icon { transform: rotate(90deg); }
  .split-panel__crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--color-text-subtle); }
  .split-panel__actions { display: flex; flex: none; align-items: center; gap: .25rem; margin-left: auto; }
  .split-panel__actions > .btn { margin-left: var(--space-2); }
  .split-panel__body { display: grid; gap: var(--space-8); width: 100%; max-width: 50rem; padding: var(--space-6) var(--space-8) var(--space-12); }
  .split-panel__head { display: grid; gap: var(--space-3); }
  .split-panel__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
  .split-panel__title { font: var(--fw-semibold) var(--step-3)/var(--lh-title) var(--font-display); letter-spacing: var(--tracking-tight); color: var(--color-heading); text-wrap: balance; }
  .split-panel__section { display: grid; gap: var(--space-3); min-width: 0; }
  .split-panel__label { font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); color: var(--color-text-subtle); }
  .split-view__empty {
    display: grid; place-items: center; min-height: 100%; padding: var(--space-10);
    font-size: var(--step--1); color: var(--color-text-subtle); text-align: center;
  }
  .split-view__empty[hidden] { display: none; }

  /* ---- Narrow: the list alone, the detail pushed over it ------------------ */
  @media (max-width: 960px) {
    .split-view__panes { grid-template-columns: minmax(0, 1fr); height: auto; overflow: clip; }
    .split-view__list { box-shadow: none; }
    .split-view__items { overflow: visible; }
    .split-view__detail { display: none; overflow: visible; }
    .split-view.is-detail .split-view__list { display: none; }
    .split-view.is-detail .split-view__detail { display: block; animation: atlas-split-push var(--dur-3) var(--ease-spring) backwards; }
    .split-view.is-back .split-view__list { animation: atlas-split-pop var(--dur-3) var(--ease-spring) backwards; }
    .split-view.is-instant .split-view__detail { animation: none; }
    .split-panel__back { display: inline-flex; }
    .split-panel__bar { top: var(--sticky-top, 0px); padding-left: var(--space-4); border-radius: var(--radius-tile) var(--radius-tile) 0 0; }
    .split-panel__crumb { display: none; }
    .split-panel__body { padding: var(--space-5) var(--space-5) var(--space-8); }
  }
  @media (max-width: 480px) {
    .split-panel__actions > .btn { display: none; }
  }
  @keyframes atlas-split-push { from { transform: translateX(100%); } }
  @keyframes atlas-split-pop { from { transform: translateX(-30%); opacity: .4; } }

  @media (prefers-reduced-transparency: reduce) {
    .split-panel__bar { background: var(--color-tile); }
  }
  @media (forced-colors: active) {
    .split-item[aria-current="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
    .split-view__panes { border: 1px solid CanvasText; }   /* a border, not an inset outline: the sticky group heads and the panel bar would paint over it */
    .split-view__list { border-right: 1px solid CanvasText; }
    .split-item.is-unread::before { forced-color-adjust: none; background: CanvasText; }
    .split-panel__bar { background: Canvas; }
    .split-view__items > li + li::before { forced-color-adjust: none; background: GrayText; }
  }
}

/* ---- css/components/inspector.css ---- */
/* Atlas · Inspector
   The case file's side panel, as in Xcode or Keynote: the facts of the
   record in groups that fold (Stadiu, Responsabil, Termene, Istoric,
   Etichete), next to the content, sticking under the page's bar and
   scrolling on its own. [data-inspector-toggle] buttons hide and show it
   with a slide; record.js remembers the choice (localStorage, per id).
     <div class="with-inspector">
       <div class="with-inspector__main">…tabs, summary, documents…</div>
       <aside class="inspector" id="inspector" aria-label="Detaliile dosarului">
         <div class="inspector__panel">
           <div class="inspector__head">
             <h2 class="inspector__title">Detalii</h2>
             <button type="button" class="icon-btn icon-btn--sm icon-btn--ghost" data-inspector-toggle aria-controls="inspector" aria-label="Ascunde detaliile">…i-close…</button>
           </div>
           <details class="inspector__section" open>
             <summary class="inspector__summary">Stadiu</summary>
             <div class="inspector__body"><ol class="timeline timeline--compact">…</ol></div>
           </details>
           …Responsabil (.person) · Termene (.kv with .due) · Istoric (.timeline--compact) · Etichete (.inspector__tags)…
         </div>
       </aside>
     </div>
   And in the record head: <button class="icon-btn" data-inspector-toggle aria-controls="inspector" aria-expanded="true" aria-label="Detaliile dosarului">…i-info…</button>
   The column slides through the registered --inspector-w (as the sidebar's
   --sidebar-w): the panel keeps its width and leaves past the edge.
   At 1180px or less the inspector stands under the content, its groups in
   columns, always shown (the toggles hide). */
@property --inspector-w { syntax: "<length>"; inherits: true; initial-value: 0px; }

@layer components {
  .with-inspector {
    --inspector-panel: 20rem; --inspector-gap: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
    --inspector-w: calc(var(--inspector-panel) + var(--inspector-gap));
    display: grid; grid-template-columns: minmax(0, 1fr) var(--inspector-w); align-items: start;
    transition: --inspector-w var(--dur-3) var(--ease-spring);
  }
  .with-inspector__main { min-width: 0; }
  .inspector { position: sticky; top: calc(var(--sticky-top, 0px) + var(--space-4)); min-width: 0; }
  .inspector__panel {
    width: var(--inspector-panel); margin-left: auto;
    max-height: calc(100dvh - var(--sticky-top, 0px) - 2 * var(--space-4)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    border-radius: var(--radius-tile); background: var(--color-tile); box-shadow: var(--tile-ring), var(--tile-shadow);
    transition: opacity var(--dur-2) var(--ease-out), visibility 0s;
  }
  /* hidden: the column closes, the panel slides out past the edge */
  @media (min-width: 1181px) {
    /* the panel starts level with the content's first row (the tabs), never
       right under the record head's buttons */
    .with-inspector > .inspector { margin-top: var(--space-6); }
    .with-inspector.is-collapsed { --inspector-w: 0px; }
    .with-inspector.is-collapsed .inspector { overflow: clip; }
    .with-inspector.is-collapsed .inspector__panel {
      opacity: 0; visibility: hidden;
      transition: opacity var(--dur-3) var(--ease-exit), visibility 0s linear var(--dur-3);
    }
    .with-inspector.is-sliding .inspector { overflow: clip; }
    .with-inspector.is-instant, .with-inspector.is-instant .inspector__panel { transition: none; }
  }

  .inspector__head {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 3.25rem; padding: .375rem .5rem .375rem var(--space-5);
    background: var(--material-bar); -webkit-backdrop-filter: var(--material-blur); backdrop-filter: var(--material-blur);
    box-shadow: inset 0 -1px 0 var(--color-border);
  }
  .inspector__title { font: var(--fw-semibold) .9375rem/1.3 var(--font-text); letter-spacing: -.011em; color: var(--color-heading); }

  /* ---- Groups that fold ------------------------------------------------------ */
  .inspector__section { position: relative; }
  .inspector__section + .inspector__section::before { content: ""; position: absolute; top: 0; left: var(--space-5); right: var(--space-5); height: 1px; background: var(--color-border); }
  .inspector__summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 2.75rem; padding: .5rem var(--space-5);
    list-style: none; cursor: pointer; border-radius: var(--radius-md);
    font-size: .8125rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-small); color: var(--color-heading);
    -webkit-user-select: none; user-select: none;
  }
  .inspector__summary::-webkit-details-marker { display: none; }
  .inspector__summary:focus-visible { outline-offset: -3px; }
  .inspector__summary::after {
    content: ""; flex: none; width: .4rem; height: .4rem; margin-right: .25rem;
    border-right: 1.6px solid var(--color-text-subtle); border-bottom: 1.6px solid var(--color-text-subtle);
    transform: translateY(-20%) rotate(45deg); transition: transform var(--dur-3) var(--ease-spring);
  }
  .inspector__section[open] > .inspector__summary::after { transform: translateY(15%) rotate(225deg); }
  .inspector__summary:hover::after { border-color: var(--color-heading); }
  .inspector__summary-note { margin-left: auto; font-weight: var(--fw-medium); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
  .inspector__body { display: grid; gap: var(--space-3); padding: 0 var(--space-5) var(--space-5); min-width: 0; }
  /* the open and close of a group glide where the browser can animate it */
  @supports selector(::details-content) {
    .inspector__section { interpolate-size: allow-keywords; }
    .inspector__section::details-content {
      block-size: 0; overflow: clip;
      transition: block-size var(--dur-3) var(--ease-spring), content-visibility var(--dur-3) var(--ease-spring) allow-discrete;
    }
    .inspector__section[open]::details-content { block-size: auto; }
  }

  /* ---- Content of the groups ------------------------------------------------ */
  .inspector .timeline { --tl-gap: var(--space-3); }
  .inspector .kv { grid-template-columns: minmax(0, 1fr) auto; }
  .inspector .kv > dt, .inspector .kv > dd { padding-block: .5rem; font-size: var(--step--1); }
  .inspector .kv > dd { text-align: right; }
  .inspector .kv > dd > .due { height: 1.625rem; }
  .inspector .person__role { font-size: .8125rem; }
  .inspector__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-width: 0; }
  .inspector__tags { display: flex; flex-wrap: wrap; gap: .375rem; }
  .inspector__note { font-size: .8125rem; line-height: 1.45; color: var(--color-text-subtle); }

  /* ---- Under the content ----------------------------------------------------- */
  @media (max-width: 1180px) {
    .with-inspector { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-8); transition: none; }
    .inspector { position: static; }
    .inspector__panel { width: auto; max-height: none; overflow: visible; margin: 0; columns: 2 18rem; column-gap: 0; }
    /* every group draws its own top hairline, so the first group of each
       column reads the same as the others */
    .inspector__head { position: static; column-span: all; box-shadow: none; }
    .inspector__section { break-inside: avoid; }
    .inspector__section::before { content: ""; position: absolute; top: 0; left: var(--space-5); right: var(--space-5); height: 1px; background: var(--color-border); }
    :is(button, a)[data-inspector-toggle] { display: none; }
  }
  @media (prefers-reduced-transparency: reduce) {
    .inspector__head { background: var(--color-tile); }
  }
  @media (forced-colors: active) {
    .inspector__panel { outline: 1px solid CanvasText; outline-offset: -1px; }
    .inspector__head { background: Canvas; }
    .inspector__section::before { forced-color-adjust: none; background: GrayText; }
  }
}

/* ---- css/components/motion.css ---- */
/* Atlas · Motion on the portal (spec §4: M8 reveal, M9 count-up, M11 morph;
   M6's pause class lives in hero.css). motion.js drives them; without
   JavaScript, under Reduce Motion or with .a11y-motion, nothing is hidden
   and nothing moves.

   M8 · reveal (portal only — never in the app, on forms or on tables)
     <header class="section-head" data-reveal>…</header>       the block rises in
     <div class="service-grid" data-reveal="stagger">…</div>   its children, 60ms apart (6 at most)
     motion.js marks only what is below the fold when the page opens
     (.is-pending: transparent, 16px lower), then reveals it when 15% of it
     is in view (.is-revealed: --dur-4 on the spring) and removes the class
     once it has arrived. What the reader sees on arrival is never hidden;
     print shows everything; focus reveals at once.
     Values: "" (the element) or "stagger" (its children). Other values of
     data-reveal belong to the password toggle (controls.js), not to this.

   M9 · count-up (the figures band)
     <span class="stat__value" data-count>48.210</span>
     <span class="stat__value" data-count>17<span class="stat__unit">zile</span></span>
     The markup holds the final number, in Romanian format, and the DOM keeps
     it: while the count runs, the moving digits are generated content
     (.count__run, aria-hidden) laid over the real figure (.count__final, at opacity 0),
     which keeps the final width, so the unit after it never moves;
     find-in-page, copy and screen readers always get the real number.
     When the figure is 40% in view it counts from 0 over --dur-5
     (ease-out-cubic). data-count="48210" (a plain number) may give the
     target when the text is not a number.

   M11 · morph (service tile → service page title, registry row → record)
     <a class="service-card" href="serviciu.html" data-morph>…</a>
     On click, the link's title (.service-card__title, .card__title, … or
     an element marked data-morph-title, else the link itself) is named
     atlas-morph; the next page names its .page-head__title or
     .record-head__title as it is parsed (the page's early script: it reads
     the flag before the first render), so the title flies into place.
     One name per page at any time; cleared when the transition ends.
     While named, a title hugs its text (.is-morph-named: fit-content) and
     both pictures scale by their height, so a title that wraps differently
     at the two ends never stretches; a morph that finds no partner leaves
     with the old page (140ms) or arrives with the new one. */
@layer components {
  /* ---- M8 · reveal ------------------------------------------------------- */
  [data-reveal].is-pending:not([data-reveal="stagger"]),
  [data-reveal="stagger"].is-pending > * { opacity: 0; transform: translateY(16px); }
  [data-reveal].is-revealed:not([data-reveal="stagger"]),
  [data-reveal="stagger"].is-revealed > * { --rise: 16px; animation: atlas-rise var(--dur-4) var(--ease-spring) backwards; }
  [data-reveal="stagger"].is-revealed > :nth-child(2) { animation-delay: 60ms; }
  [data-reveal="stagger"].is-revealed > :nth-child(3) { animation-delay: 120ms; }
  [data-reveal="stagger"].is-revealed > :nth-child(4) { animation-delay: 180ms; }
  [data-reveal="stagger"].is-revealed > :nth-child(5) { animation-delay: 240ms; }
  [data-reveal="stagger"].is-revealed > :nth-child(n + 6) { animation-delay: 300ms; }
  @media print {
    [data-reveal].is-pending, [data-reveal].is-pending > * { opacity: 1 !important; transform: none !important; }
  }

  /* ---- M9 · count-up: figures that count keep their width ---------------- */
  [data-count] { font-variant-numeric: tabular-nums lining-nums; }
  .count { position: relative; display: inline-block; }
  .count__final { opacity: 0; }
  .count__run { position: absolute; top: 0; right: 0; white-space: nowrap; pointer-events: none; -webkit-user-select: none; user-select: none; }
  .count__run::before { content: attr(data-n) / ""; }     /* generated: never in the text, the copy or the accessibility tree */

  /* ---- M11 · morph -------------------------------------------------------- */
  /* the title flies and scales on the spring; the two snapshots cross-fade
     over the same time (the UA's fade inherits the group's timing) */
  ::view-transition-group(atlas-morph) { animation-duration: var(--dur-3); animation-timing-function: var(--ease-spring); }
  :is(.page-head__title, .record-head__title, .cell-title, .service-card__title, .card__title, .quick-links__text b,
      .work-item__title, .row-link__title, [data-morph-title]).is-morph-named { width: fit-content; max-width: 100%; }
  ::view-transition-old(atlas-morph), ::view-transition-new(atlas-morph) {
    width: auto; height: 100%; object-fit: contain; object-position: 0 50%;
  }
  /* no partner: the old title leaves with the old page, a lone new title
     arrives with the new page (M10's timings) */
  ::view-transition-old(atlas-morph):only-child { animation: 140ms var(--ease-exit) both atlas-vt-out; }
  ::view-transition-new(atlas-morph):only-child { animation: 280ms var(--ease-out) 40ms both atlas-vt-in; }
}

/* ---- css/base/utilities.css ---- */
/* Atlas · Utilities and accessibility modes
   The .a11y-* classes are the page's own accessibility panel (they sit on
   <html> or <body>); the operating-system modes live in tokens.css and
   base.css. A class that re-declares a base token re-declares its dependents
   and aliases too (resolution rule). */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .nowrap { white-space: nowrap; }
  /* Space above a block, when a layout component does not give it already. */
  .mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); } .mt-12 { margin-top: var(--space-12); }

  /* Text size: zoom the page regions, never the controls of the panel itself */
  .a11y-fontscale .site-header, .a11y-fontscale main, .a11y-fontscale .site-footer { zoom: var(--a11y-font-scale, 1); }

  /* High contrast: black on white, black control edges, rings on tiles.
     It starts from the light token set in every theme, dark included:
     tokens.css re-declares the light block on .a11y-contrast after the dark
     blocks (materials, status colours, accents, color-scheme), and these
     values go on top. Every token it re-declares takes its dependents along
     (fills in order, text and links on fills, the row hover). The app
     register re-declares its tiles on <body data-context="app"> (or a docs
     wrapper), so the high-contrast tile is given back there too. With the
     class on <body>, the root's scrollbars and canvas turn light as well. */
  :root:has(> .a11y-contrast) { color-scheme: light; }
  .a11y-contrast {
    --color-bg: #FFFFFF; --color-bg-alt: #FFFFFF; --color-surface: #FFFFFF; --color-surface-raised: #FFFFFF;
    --color-plane: var(--color-bg);
    --color-heading: #000000; --color-text: #000000; --color-text-muted: #1B1B1B; --color-text-subtle: #1B1B1B;
    --color-border: #565656; --color-border-strong: #000000;
    --color-control-border: #000000;
    --color-field-border: var(--color-control-border); --color-switch-off: var(--color-control-border);
    --color-tile: #F2F2F2; --color-tile-hover: #FFFFFF; --color-tile-alt: #FFFFFF; --color-tile-alt-hover: #FFFFFF;
    --color-row-hover: var(--color-tile-hover);
    --chart-surface: var(--color-tile);
    --tile-ring: 0 0 0 1px var(--color-control-border);
    /* charts: gridlines that are seen, a black baseline, a 3:1 "Altele" grey */
    --chart-grid: rgb(0 0 0 / .16); --chart-axis: var(--color-control-border); --chart-other: #86868B;
    --color-fill-subtle: rgb(0 0 0 / .05); --color-fill: rgb(0 0 0 / .1); --color-fill-hover: rgb(0 0 0 / .16);
    --color-link: #0A3AA0; --color-link-hover: var(--color-link);
    --color-accent-strong: color-mix(in oklab, var(--accent-700) 70%, #000000); --color-accent-figure: var(--color-accent-strong);
    --color-text-subtle-on-fill: var(--color-text-subtle); --color-link-on-fill: var(--color-link);
    --color-on-inverse: #FFFFFF; --color-on-inverse-muted: #FFFFFF; --color-on-inverse-subtle: #FFFFFF;
  }
  .a11y-contrast [data-context] {
    --color-tile: #F2F2F2; --color-tile-hover: #FFFFFF; --color-row-hover: var(--color-fill-subtle);
    --chart-surface: var(--color-tile);
    --tile-ring: 0 0 0 1px var(--color-control-border);
  }
  .a11y-contrast :focus-visible { outline: 3px solid #000000 !important; outline-offset: 2px !important; box-shadow: 0 0 0 5px #FFD94A !important; }
  .a11y-contrast .photo-tile::after { background: linear-gradient(180deg, rgb(0 0 0 / .25) 0%, rgb(0 0 0 / .92) 100%); }

  .a11y-grayscale .site-header, .a11y-grayscale main, .a11y-grayscale .site-footer { filter: grayscale(1); }

  .a11y-links :is(.prose, .row-link__desc, .site-footer__links, .breadcrumb, .site-footer__bottom, .statement) a,
  .a11y-links a.link-arrow { text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .a11y-links a.row-link .row-link__title, .a11y-links a.news-lead .news-lead__title, .a11y-links a.news-item .news-item__title, .a11y-links a.mono-card .mono-card__title, .a11y-links a.photo-tile .photo-tile__title { text-decoration: underline; text-decoration-thickness: 2px; }

  .a11y-spacing :is(p, li, dd, figcaption) { line-height: 1.75 !important; letter-spacing: .04em !important; word-spacing: .12em !important; }

  .a11y-cursor {
    cursor: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"%3E%3Cpath d="M6 3L6 31L13 24L18 35L23 33L18 22L27 22Z" fill="white" stroke="rgb(10,37,64)" stroke-width="2.5" stroke-linejoin="round"/%3E%3C/svg%3E') 6 3, auto;
  }
  .a11y-cursor :is(a[href], button, [role="button"], label, summary, select) {
    cursor: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44"%3E%3Cpath d="M7 3L7 34L15 26L20 39L26 36L21 24L31 24Z" fill="rgb(201,169,104)" stroke="rgb(10,37,64)" stroke-width="2.5" stroke-linejoin="round"/%3E%3C/svg%3E') 7 3, pointer;
  }

  /* Reduce motion, from the page's own panel: mirrors the prefers-reduced-motion
     rule of base.css (delays too; spinners keep turning at 1.2s), turns
     presses and lifts into colour-only changes and skips view transitions. */
  .a11y-motion {
    --press-scale: 1; --press-scale-icon: 1; --press-scale-chip: 1; --press-scale-tile: 1;
    --lift: 0px; --nudge: 0px;
  }
  .a11y-motion *:not(.spinner), .a11y-motion *:not(.spinner)::before, .a11y-motion *:not(.spinner, .is-loading)::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0s !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  .a11y-motion .spinner, .a11y-motion .spinner::before, .a11y-motion .spinner::after, .a11y-motion .is-loading::after { animation-duration: 1.2s !important; }
  :root:is(.a11y-motion, :has(> .a11y-motion)) { scroll-behavior: auto; }
  :root:is(.a11y-motion, :has(> .a11y-motion))::view-transition-group(*),
  :root:is(.a11y-motion, :has(> .a11y-motion))::view-transition-old(*),
  :root:is(.a11y-motion, :has(> .a11y-motion))::view-transition-new(*) { animation: none !important; }
  .a11y-motion :is(a, button):hover, .a11y-motion :is(a, button):hover * { transform: none !important; }

  /* Density (controls.js [data-density-set], remembered): <html data-density="compact">
     tightens the app's tables, lists, rows and spacing. Controls keep their
     size (44px targets on touch stay); a table a page (or its own density
     control: datatable.js .table--normal) made relaxed or normal stays so. */
  :root[data-density="compact"] [data-context="app"] {
    --card-pad: clamp(1rem, .85rem + .4vw, 1.25rem);
    --page-head-pad-top: clamp(1.25rem, .9rem + 1vw, 2rem);
    --page-head-pad-bottom: clamp(1rem, .8rem + .8vw, 1.5rem);
    --tile-gap: clamp(.5rem, .35rem + .5vw, .875rem);
  }
  :root[data-density="compact"] .table:not(.table--relaxed, .table--normal) { --cell-py: .5rem; --cell-px: var(--space-4); font-size: .875rem; }
  :root[data-density="compact"] .work-item { min-height: 3.25rem; padding-block: .55rem; }
  :root[data-density="compact"] .list__item { min-height: 2.75rem; padding-block: .45rem; }
  :root[data-density="compact"] .split-item { --si-pt: .5rem; padding-bottom: .55rem; }
  :root[data-density="compact"] .kv > :is(dt, dd) { padding-block: .45rem; }
  :root[data-density="compact"] .sidebar__link { padding-block: .35rem; }
}
