/* =================================================================================================
 * @suntek-solutions/design-base — the universal Suntek base stylesheet.
 *
 * One file. Plain CSS custom properties and plain CSS classes. No framework, no build step, no
 * runtime dependency. A vanilla page links it; a bundler imports it; React uses the classes through
 * `className`. Nothing in here needs React, Tailwind, NativeWind or react-native-web.
 *
 * -------------------------------------------------------------------------------------------------
 * PROVENANCE — read before changing a colour.
 *
 * The component vocabulary, the scales and the look of the controls come from About Time Tours'
 * design system (`src/styles/designTokens.js`, `theme.js`, `global.css`, `STYLING.md`). What ports
 * from there is the ARCHITECTURE, never a value: ATT is React Native rendered through
 * react-native-web with NativeWind, and none of that can enter a framework-free console.
 *
 * Every COLOUR comes from SuntekSolutions.io's `assets/css/brand-v2.css` (the `--v2-*` set). ATT's
 * turquoise family (#1DB0AB, #45C4BE, #127D79, #7FD8D3), its navies, its orange #FF9500, its
 * Material-ish status hues and its eight-step grey ramp do NOT appear in this file.
 *
 * There are exactly two kinds of colour value here:
 *
 *   1. A brand PRIMITIVE, declared once in the palette block below, each line citing the
 *      `brand-v2.css` line and token it was copied from.
 *   2. A DERIVATION — `color-mix()` of primitives. That is brand-v2.css's own idiom (lines 188,
 *      210, 255-256, 265), and it is used here for every value the brand does not declare.
 *
 * `#ffffff` is the one exception and the only literal in this file that is not a brand token. It is
 * the light theme's paper. brand-v2.css is dark-ONLY — it has no light values at all — so the light
 * theme needs an anchor at the other end of the range, and white is that anchor. It is named once,
 * as a primitive, so it is visible rather than scattered.
 *
 * `src/__tests__/tokens.test.ts` enforces all of the above, plus the measured contrast of every
 * text-on-surface pair in BOTH themes. A number in a comment here is a number that test asserts.
 *
 * -------------------------------------------------------------------------------------------------
 * THE TWO LAYERS, AND WHY THEY ARE NOT INTERCHANGEABLE.
 *
 *   `--su-brand-*`  the PALETTE. Brand hexes. Theme-invariant: a hex is a hex.
 *   `--su-*`        the ROLE vocabulary. Composed from the palette, redefined per theme.
 *
 * Components in this file reference ROLES ONLY. That is the whole point of the architecture and it
 * is what makes a theme switch possible; a component that reached for `--su-brand-cyan` would be
 * correct in one theme and wrong in the other. The test asserts no component rule names a primitive.
 *
 * -------------------------------------------------------------------------------------------------
 * THREE THEME STATES, NOT TWO — and no new stamp.
 *
 * Both Suntek consumers already solved this, independently, with the same three scopes:
 * `products/connect/apps/api/styles/console.css` ("THEMING: THREE STATES, NOT TWO") stamps
 * `data-theme` on the root; `platform/core/apps/admin/src/styles.css` ("Three theme states, not
 * two") stamps `.light` / `.dark`. ATT's NativeWind `darkMode:"class"` is a TWO-state model that
 * cannot express "follow my OS", so it is not ported.
 *
 * This file honours BOTH existing stamps and introduces no third one:
 *
 *     :root                                                         -> light   (un-stamped default)
 *     @media (prefers-color-scheme: dark) :root:not([data-theme="light"]):not(.light)  -> dark
 *     :root[data-theme="dark"], :root.dark                          -> dark   (explicit)
 *
 * The duplication of the dark set is NOT redundant. It is the only reason the first paint is never
 * the wrong colour with JavaScript still loading — both consumers' own headers say so. The test
 * asserts the two dark blocks declare byte-identical values, because that is the property the
 * duplication is for.
 *
 * Suntek is dark-first and brand-v2.css is dark-only, so the states invert relative to both
 * consumers' current files: the DARK set is the canonical, brand-authored one, and the LIGHT set is
 * a deliberate, complete second set derived from the same palette. It is not an inversion of the
 * dark set. Light-mode ink cannot reuse the brand accents at all — measured against #ffffff, cyan is
 * 1.81:1, heading 2.16:1, green 1.92:1, amber 1.67:1, red 2.77:1 and blue 3.86:1. Every one of those
 * is a light-on-dark value. So each hue is darkened toward `--su-brand-ink` until it clears AA on
 * white AND on its own tint, and ATT's rule that the two are a measured PAIR is applied per theme,
 * exactly as `designTokens.js` keeps `lightStatusSurfaces` and `darkStatusSurfaces` apart.
 *
 * -------------------------------------------------------------------------------------------------
 * SCOPE AND NAMESPACE.
 *
 *   `--su-*`         tokens, on `:root`. Additive and prefixed; they collide with nothing.
 *   `.su-*`          component classes. Verified free in both consumers (`grep -c "\.su-"` -> 0 in
 *                    console.css and in admin/src/styles.css).
 *   `[data-su-base]` the opt-in scope for the resets and the focus treatment. Nothing that restyles
 *                    a bare element applies until a host puts this attribute on (usually) <html>.
 *                    Same pattern, and the same reason, as brand-v2.css requiring
 *                    `[data-suntek-brand="v2"]`: the sheet can load on a page that has not been
 *                    converted without touching it.
 *
 * Component rules live in `@layer su-components` so a host's own layered rules can win predictably.
 * Token declarations are deliberately UNLAYERED so they always apply; import this file first and
 * override a token afterwards.
 * ============================================================================================== */

@layer su-base, su-components;

/* =================================================================================================
 * 1. THE PALETTE — brand primitives. Theme-invariant.
 * ============================================================================================== */

:root {
  /* Surfaces. brand-v2.css:25-30 records that these are the reference pages' :root VERBATIM, and
     that dev had been 2, 8 and 11 off and was corrected TO these. Approximating them again would
     undo a deliberate fix. */
  --su-brand-bg: #060a14;             /* brand-v2.css:24  --v2-bg */
  --su-brand-surface: #0a1120;        /* brand-v2.css:28  --v2-surface      (reference --bg-2)   */
  --su-brand-card: #0e1728;           /* brand-v2.css:29  --v2-card         (reference --panel)  */
  --su-brand-card-raised: #111c31;    /* brand-v2.css:30  --v2-card-raised  (reference --panel-2)*/

  /* Text. Four steps, which is one more than either consumer has, and the fourth is what makes a
     placeholder its own role rather than a reuse of tertiary. */
  --su-brand-text: #eaf0fa;           /* brand-v2.css:32  --v2-text         (reference --ink)    */
  --su-brand-secondary: #c3ccdd;      /* brand-v2.css:33  --v2-secondary */
  --su-brand-muted: #97a4bc;          /* brand-v2.css:34  --v2-muted   — lightened from #8999b4 so it clears AA */
  --su-brand-muted-2: #7f8db0;        /* brand-v2.css:35  --v2-muted-2 — "the quietest supporting line" */

  /* Edges. */
  --su-brand-border: #253047;         /* brand-v2.css:37  --v2-border */
  --su-brand-border-strong: #33405c;  /* brand-v2.css:38  --v2-border-strong */
  --su-brand-control-border: #8999b4; /* brand-v2.css:46  --v2-control-border — .v2-button-secondary's edge */

  /* Accents. */
  --su-brand-blue: #2d7cff;           /* brand-v2.css:39  --v2-blue */
  --su-brand-blue-deep: #1e5bff;      /* brand-v2.css:40  --v2-blue-deep — GRADIENT END ONLY, 3.41:1 on card */
  --su-brand-cyan: #22d3ee;           /* brand-v2.css:41  --v2-cyan  (= --v2-focus, brand-v2.css:45) */
  --su-brand-heading: #56baf5;        /* brand-v2.css:42  --v2-heading */
  --su-brand-ink: #04101f;            /* brand-v2.css:44  --v2-button-text — dark ink for every brand fill */

  /* Status. brand-v2.css:48-55 is explicit that these are SEMANTIC, not brand, and that --v2-green
     is an emerald at hue 158 deliberately distinct from the retired brand green #43e97b. */
  --su-brand-red: #f87171;            /* brand-v2.css:53  --v2-red   — needs attention / high risk */
  --su-brand-amber: #fbbf24;          /* brand-v2.css:54  --v2-amber — getting by / watch */
  --su-brand-green: #34d399;          /* brand-v2.css:55  --v2-green — solid / visible now */

  /* The light theme's paper. NOT from brand-v2.css, which is dark-only; see the header. */
  --su-brand-paper: #ffffff;

  /* Gradients. One ports, and only one: the brand's primary action. ATT's wash, edge, band and
     tiles gradients do not — the tiles gradient collapses to a flat 12% tint, which is
     indistinguishable at 40px, and the other three are marketing-page treatments. Suntek's own
     --v2-grad-head is likewise a marketing heading treatment, not a console one. */
  --su-brand-cta: linear-gradient(135deg, #2d7cff 0%, #22d3ee 100%);       /* brand-v2.css:59  --v2-cta */
  --su-brand-cta-hover: linear-gradient(135deg, #1e5bff 0%, #16c5e0 100%); /* brand-v2.css:60  --v2-cta-hover */
}

/* =================================================================================================
 * 2. SCALES — theme-neutral. ATT's scale ARCHITECTURE (named steps, one source, no bracket values)
 *    with Suntek's shapes substituted for radius.
 * ============================================================================================== */

:root {
  /* ---- spacing: ATT's designTokens.js verbatim. Brand-neutral 4px-grid geometry; nothing to
     recolour. STYLING.md's rule ports word for word: never write p-[12px] or mt-[2px]. `xxs` and
     `smd` exist precisely so those two values have names. */
  --su-space-xxs: 2px;
  --su-space-xs: 4px;
  --su-space-sm: 8px;
  --su-space-smd: 12px;
  --su-space-md: 16px;
  --su-space-lg: 24px;
  --su-space-xl: 32px;
  --su-space-xxl: 48px;
  --su-space-xxxl: 64px;

  /* ---- type size: ATT's steps verbatim, with its paired line heights. NOT Suntek's clamp()
     helpers (.v2-h1 is clamp(38px,4.2vw,46px), body 17px/1.6) — those are a marketing page's fluid
     display scale, and a 46px heading has no place above a fleet grid. A console is a dense
     instrument, not a hero. */
  --su-text-xxs: 11px;
  --su-text-xs: 12px;
  --su-text-sm: 14px;
  --su-text-md: 16px;
  --su-text-lg: 18px;
  --su-text-xl: 20px;
  --su-text-xxl: 24px;
  --su-text-xxxl: 32px;

  --su-lh-xxs: 14px;
  --su-lh-xs: 16px;
  --su-lh-sm: 20px;
  --su-lh-md: 24px;
  --su-lh-lg: 28px;
  --su-lh-xl: 32px;
  --su-lh-xxl: 36px;

  /* ---- weight: ATT's names, plus Suntek's two additions. 650 is brand-v2.css:156's button label
     and 800 is brand-v2.css:111's h1. Declared as their own steps rather than rounded to 600/700,
     because a variable face resolves them. */
  --su-weight-light: 300;
  --su-weight-regular: 400;
  --su-weight-medium: 500;
  --su-weight-semibold: 600;
  --su-weight-button: 650;
  --su-weight-bold: 700;
  --su-weight-display: 800;

  /* ---- radius: ATT's NAMES, Suntek's VALUES. Radius is shape, and shape is part of the look the
     owner assigned to Suntek.
       sm   4px  — ATT only, hairline chips.
       md   9px  — brand-v2.css:68 --v2-radius-control. Already the value everywhere buttons, the
                   skip link and form controls appear; naming it is what lets a design doc forbid
                   every other literal.
       mlg 12px  — brand-v2.css:65 --v2-radius-sm, an exact match with ATT's mlg. A free alignment.
       lg  18px  — brand-v2.css:64 --v2-radius, the card/panel corner.
       round     — pills and badges.
     ATT's xl 24 and Suntek's device radii (34/26) are dropped: no console element wants either.
     ATT's clipping rule comes along unchanged — anything clipped inside a rounded card clips at the
     CARD's radius, so the corners line up. */
  --su-radius-sm: 4px;
  --su-radius-md: 9px;
  --su-radius-mlg: 12px;
  --su-radius-lg: 18px;
  --su-radius-round: 9999px;

  /* ---- border width: ATT's four-step rule, which neither consumer had a stated version of.
     Dividers hairline/thin; input borders thin; selected/active and focus rings thick. No 1.5, no
     3, no 0.5 outside dividers. */
  --su-border-hairline: 1px;
  --su-border-thin: 1px;
  --su-border-thick: 2px;

  /* ---- content width. ATT: 640 / 960 / 1280. Suntek: .v2-container min(100% - 128px, 1280px)
     with a 1136px compact modifier (brand-v2.css:115-118). The Connect console: 1200px. All three
     agree within noise at the top end, so the console's measured 1200 is kept; 1280 is the brand
     figure and 1136 the compact one, recorded here so nobody has to go and look. */
  --su-content-narrow: 640px;
  --su-content-default: 960px;
  --su-content-wide: 1200px;
  --su-content-brand: 1280px;
  --su-content-compact: 1136px;

  /* ---- breakpoints. A GENUINE CONFLICT, resolved rather than copied.
     ATT: 768 / 1024 / 1440, fed from one source into both useResponsive() and Tailwind's variants
     so "JS layout decisions and className variants can never disagree". The Connect console: 860,
     760 and 480, each MEASURED by e2e/tests/responsive.spec.mjs rather than chosen — 860 is where
     the tile row and topbar crowd, 760 is where the 52rem fleet grid becomes cards, 480 is where
     the tiles drop to two columns. Suntek's own are different again (1023 / 699 / 599).
     The console's three win, because they are measured against its actual content and a failing
     responsive spec is the arbiter. What is adopted from ATT is the SINGLE-SOURCE principle: they
     are named here so the spec and the stylesheet read the same numbers.
     CSS cannot use a custom property inside @media, so the media queries below repeat the literal.
     These tokens and those literals must be changed together. */
  --su-bp-narrow: 480px;
  --su-bp-cards: 760px;
  --su-bp-dense: 860px;

  /* ---- type faces. brand-v2.css:76-77 verbatim. Sora for headings, Inter for body, verified from
     the live site on 2026-09-11, self-hosted, no third-party font origin.
     ATT's font layer is not ported in either of its two versions: .design-sync/conventions.md and
     fonts.css declare Lato + Josefin Sans, while designTokens.js (the file tailwind.config.mjs
     actually imports, modified twelve days later) declares Figtree + Montserrat. Porting the stale
     one would ship a specification for faces the app no longer asks for.
     The stacks fall back to system-ui, so this file is correct with no font files present. See
     `fonts.css` for the optional self-hosted faces.
     Monospace: no third webfont. This is the Connect console's existing system stack verbatim — it
     is the right answer and it already ships. */
  --su-font-body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --su-font-head: Sora, Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --su-font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* =================================================================================================
 * 3. ROLES — state 1 of 3: the un-stamped system default. LIGHT.
 *
 * This is what a viewer whose OS says light gets before any JavaScript runs, so it must be a
 * complete set and it cannot be the brand set.
 *
 * Every value is a derivation from the palette. The percentages are not taste: each one is the
 * value the test measures and asserts.
 * ============================================================================================== */

:root {
  color-scheme: light dark;
  /* `tokens.test.ts`, `icons.test.ts` and `src/resolve.mjs` read this block by its structure, its
     selector and enclosing at-rules (`src/css-blocks.mjs`, OPEN-ITEMS B19), and skip comments and
     quoted strings. So a comment anywhere in it, or a brace in one, is only text.

     `light dark` is right for the UN-STAMPED state and only for it: the browser then picks
     scrollbars, native selects, date pickers and form controls by the OS, which is what the tokens
     do here too (the dark block below is an OS media query). The two STAMPED states override it —
     see `color-scheme FOLLOWS THE STAMP` above the explicit dark block. */

  /* ---- surfaces. ATT's light-theme rule ports exactly: the CANVAS is the tinted one and cards
     read as raised by being LIGHTER than it (designTokens.js: "`secondary` is the page canvas;
     `paper`/`card` are white so a card reads as a raised surface on it"). The tint is the brand
     blue-grey over paper, so the canvas keeps the brand hue instead of going neutral grey. */
  /* 18%, not 10%: MEASURED in a browser 2026-09-25, a 10% tint put the canvas at 1.08:1 against a
     white card, so a card barely read as raised — the exact property this block claims. The canvas
     is also a GROUND for text and control edges, so it cannot simply be darkened: at 27% this
     package's own contrast tests failed three ways (control-edge fell to 2.86 against it, a text
     pair to 3.97, and a luminance floor to 0.79). 18% is the darkest tint that keeps every one of
     those guarantees while still lifting the card off the page. */
  --su-surface-canvas: color-mix(in srgb, var(--su-brand-muted) 18%, var(--su-brand-paper));
  --su-surface-bar: var(--su-brand-paper);
  --su-surface-card: var(--su-brand-paper);
  --su-surface-raised: color-mix(in srgb, var(--su-brand-muted) 6%, var(--su-brand-paper));
  --su-surface-quiet: color-mix(in srgb, var(--su-brand-muted) 20%, var(--su-brand-paper));
  /* An empty field must not be the same colour as the page, or it reads as a gap. In light the page
     is the tinted canvas, so paper is the step above it. */
  --su-surface-input: var(--su-brand-paper);
  /* A disabled control's fill: the edge 60% into the card, in every scheme, so a disabled button or field reads as
     off in every product and never as a faded brand fill (2026-10-26). Its ink is fg-disabled. */
  --su-surface-disabled: color-mix(in srgb, var(--su-edge) 60%, var(--su-surface-card));

  /* ---- foreground. Six roles. `placeholder` is deliberately NOT `tertiary`: designTokens.js
     records it as its own role because tertiary sits too close to entered text for an empty field
     to read as empty, and it measures ATT's light placeholder at ~3.17:1 against ~14.7:1 for real
     text. The derivation below lands in the same band. `disabled` is fainter still and is
     explicitly not reusable as a placeholder. */
  --su-fg: var(--su-brand-bg);
  --su-fg-secondary: color-mix(in srgb, var(--su-brand-bg) 62%, var(--su-brand-muted));
  --su-fg-tertiary: color-mix(in srgb, var(--su-brand-bg) 42%, var(--su-brand-muted));
  /* 31%, not 22%: MEASURED 2026-09-25, 22% gave 3.87:1 on the input surface — a real WCAG 1.4.3
     failure, and placeholder text is text. 31% is the lightest that clears 4.5 (4.69:1) and it still
     sits well below `tertiary` (6.01:1), so an empty field still reads as empty. */
  --su-fg-placeholder: color-mix(in srgb, var(--su-brand-bg) 31%, var(--su-brand-muted));
  --su-fg-disabled: color-mix(in srgb, var(--su-brand-muted) 55%, var(--su-brand-paper));
  /* Ink on a coloured fill. Theme-INVARIANT, and that is the measurement talking: the brand fills
     are bright in both themes, so dark ink is correct on all of them (10.57:1 on cyan, 4.95:1 on
     blue, 9.94:1 on green, 11.45:1 on amber, 6.91:1 on red). This is the opposite of ATT's light
     theme, where fg-inverse is #FFFFFF — and the reason is measurable: --su-brand-text on blue is
     only 3.37:1 and fails. */
  --su-fg-inverse: var(--su-brand-ink);

  /* ---- edges. Three, and the third is the one that matters. ATT's designTokens.js calls out
     `inputBorder` as a deliberately NEUTRAL resting border with the recorded reason: "A blue
     resting border made every empty field read as already focused." Focus is marked by the halo,
     never by recolouring the resting edge. That rule is worth more than the values.
     `--su-control-edge` clears WCAG 1.4.11 (3:1 for a non-text UI boundary) on the worst-case
     ground, so a field's boundary is unmistakable without being blue. `--su-edge` and
     `--su-edge-strong` are rules, not boundaries: they are quiet by design, so anything relying on
     a border ALONE to convey state (a zebra stripe, a selected row) needs a second signal. */
  /* 45/70, not 34/55: MEASURED 2026-09-25, 34% put a rule at 1.32:1 on white — present in the file
     and invisible on a screen. These stay "quiet by design" per the note above; quiet is not the
     same as absent, and a fleet grid separated by rules needs them to exist. */
  --su-edge: color-mix(in srgb, var(--su-brand-muted) 45%, var(--su-brand-paper));
  --su-edge-strong: color-mix(in srgb, var(--su-brand-muted) 70%, var(--su-brand-paper));
  --su-control-edge: color-mix(in srgb, var(--su-brand-muted) 82%, var(--su-brand-bg));

  /* ---- accent, the INK role. ATT's turquoise carried two different jobs and they split onto two
     different Suntek colours here. This is the ink half: links, times, small highlights, a chip's
     active label, a sorted column head, the focus ring. Suntek's cyan is the correct heir because
     brand-v2.css already assigns it to exactly these jobs (--v2-focus is #22d3ee at line 45,
     .v2-button-secondary:hover borders cyan at 162, the instrument's selected option is a 12% cyan
     fill with a cyan border at 265-266). In light it is darkened toward the brand ink until it
     clears AA on paper AND on its own tint. */
  /* 47%, not 54%: MEASURED 2026-09-25 against its own 12% tint — 54% landed at 4.64:1, which passes
     AA by 0.14 and would fail on any later tint adjustment. 47% is the LIGHTEST mix (so the most hue
     kept) that reaches 5.5:1, chosen that way on purpose: contrast is the floor, hue identity is what
     is maximised under it. The same rule sets good/warn/bad below. */
  --su-accent: color-mix(in srgb, var(--su-brand-cyan) 47%, var(--su-brand-ink));
  --su-accent-soft: color-mix(in srgb, var(--su-brand-cyan) 12%, var(--su-brand-paper));
  --su-accent-edge: color-mix(in srgb, var(--su-brand-cyan) 42%, var(--su-brand-paper));
  /* --su-brand-heading has no ATT counterpart. It takes the heading / link-on-a-quiet-surface role,
     which is what brand-v2.css:126 (.v2-eyebrow) and :137 (.v2-accent) use it for. */
  /* 52%, not 60%: the canvas above was darkened from 10% to 18%, and this token is read ON it. At
     60% it measured 4.28:1 there — this package's own test caught it, which is the whole reason the
     test asserts against the canvas and not only the card. */
  --su-accent-heading: color-mix(in srgb, var(--su-brand-heading) 52%, var(--su-brand-ink));
  /* ---- the selected nav item (a side nav row, a top-bar link, a tab): its ink and its fill, as a PAIR so a
     look can restyle both together (ui.css aliases them to --ui-nav-sel-text and --ui-nav-sel-bg). Here the
     accent on its own tint, the pair the token test measures at AA in both themes. */
  --su-nav-sel-ink: var(--su-accent);
  --su-nav-sel-fill: var(--su-accent-soft);
  --su-nav-sel-ring: 0 0 transparent;   /* the selection hairline: none here (a list-safe no-shadow, never none); a look sets its own (1.0.3) */
  --su-bottom-inset: env(safe-area-inset-bottom, 0px);   /* a bar docked at the bottom sits this far up: an app with a bottom tab bar sets it once on its frame (1.0.3) */

  /* ---- action, the FILL role — the other half of ATT's primary. Theme-invariant: the CTA is the
     brand's one action and it is the same gradient in both themes, with the same measured ink.
     ATT's primary.light/primary.dark hover PAIR does not port as a second hex: brand-v2.css:160
     hovers with filter: brightness(1.1), and that treatment is used instead.
     `--su-action-flat` is a FILL and must never be used as ink. MEASURED: #2d7cff is 4.64:1 on the
     dark card (scrapes AA), 4.41:1 on the raised card (FAILS) and 4.04:1 on its own 12% tint
     (FAILS). Cyan on cyan-soft is 7.82:1. So every soft-fill-plus-same-hue-ink pattern — the
     accent badge, the active chip, the chosen choice card — takes cyan, not blue.
     ATT's secondary ORANGE #FF9500 has no port. Suntek has no orange; the nearest is amber, which
     is spoken for as a STATUS colour, and reusing it for a brand highlight would make "getting by"
     and "highlighted" the same colour. The role is dropped. */
  --su-action: var(--su-brand-cta);
  --su-action-hover: linear-gradient(135deg, color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper)) 0%, color-mix(in srgb, var(--su-brand-cyan) 84%, var(--su-brand-paper)) 100%);
  --su-action-flat: var(--su-brand-blue);
  --su-action-hover-flat: color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper));
  --su-action-ink: var(--su-brand-ink);

  /* ---- status, as PAIRS. This is the single best architectural idea in ATT and neither consumer
     had it as a stated contract. designTokens.js lines 51-79: the naive approach — using
     error.light #EF5350 as a background under error.dark ink — measured 1.43:1, and warning.main on
     warning.light measured 1.16:1. The fixed pairs measure 5.72 light / 8.54 dark (error), 6.69 /
     9.84 (warning), 6.39 / 8.53 (success), and the file says it plainly: "They are a pair;
     splitting them is what produced the original bug."
     So: A SOFT SURFACE IS NOT A LIGHTER SHADE OF THE HUE. It is a separately measured surface with
     its own declared ink, and the two are declared together, per theme, never derived by inverting
     the other theme's.
     ATT has no info role — STYLING.md retired its pre-redesign blue in Sept 2026 and a unit test
     fails on any *-info* class. That ban does NOT port: the Connect console legitimately has
     --c-info for its live-pulse badge. Info takes CYAN here, because Suntek's only blues are
     #2d7cff and #1e5bff and blue fails as ink on its own tint (4.04:1). That collapses info and
     accent onto one hue — see the README's open questions, because it conflicts with Core admin's
     hue-budget rule. */
  /* 49%: 56% measured 4.86:1 on its own tint; 49% is the lightest reaching 5.53:1. */
  --su-good: color-mix(in srgb, var(--su-brand-green) 49%, var(--su-brand-ink));
  --su-good-soft: color-mix(in srgb, var(--su-brand-green) 12%, var(--su-brand-paper));
  --su-good-edge: color-mix(in srgb, var(--su-brand-green) 42%, var(--su-brand-paper));
  --su-good-fill: var(--su-brand-green);

  /* Amber is the brightest of the three hues, so it needs the most darkening. 54% cleared AA on
     paper (4.83:1) and on its own tint (4.54:1) but measured only 4.46:1 on the tinted CANVAS —
     which is the ground a status word sits on outside a card. 52% clears all three. This is the
     same class of defect Core admin's own header records for its teal accent, and the same fix:
     measure each hue against every ground it actually lands on, not just the lightest one. */
  /* 47%: 52% measured 4.54:1 — four hundredths above AA, on the hue with the least headroom. */
  --su-warn: color-mix(in srgb, var(--su-brand-amber) 47%, var(--su-brand-ink));
  --su-warn-soft: color-mix(in srgb, var(--su-brand-amber) 12%, var(--su-brand-paper));
  --su-warn-edge: color-mix(in srgb, var(--su-brand-amber) 42%, var(--su-brand-paper));
  --su-warn-fill: var(--su-brand-amber);

  /* 59%: 68% measured 4.61:1. Red keeps the most hue of the four because it starts darkest. */
  --su-bad: color-mix(in srgb, var(--su-brand-red) 59%, var(--su-brand-ink));
  --su-bad-soft: color-mix(in srgb, var(--su-brand-red) 12%, var(--su-brand-paper));
  --su-bad-edge: color-mix(in srgb, var(--su-brand-red) 42%, var(--su-brand-paper));
  --su-bad-fill: var(--su-brand-red);

  /* `info` IS `accent`, deliberately, and DESIGN-BASE.md section 3 records it as an ANSWER rather
     than leaving it looking like an oversight (Q8, 2026-09-29). MEASURED from the resolved export:
     info, info-soft and info-edge are byte-identical to their accent counterparts in BOTH themes;
     only info-fill differs. This brand accent IS its information colour, and a distinct info hue is
     not in brand-v2.css, so choosing one is the owner call and not this file. Use `info` when the
     meaning is "this is information" -- the day a separate hue is chosen, only these names move.
     The consequence to design around: an info badge cannot be told from a branded or active element
     by colour alone; separate them by shape, weight or an icon. */
  --su-info: var(--su-accent);
  --su-info-soft: var(--su-accent-soft);
  --su-info-edge: var(--su-accent-edge);
  --su-info-fill: var(--su-brand-cyan);

  /* Ink on an OPAQUE status fill. Theme-invariant, measured above. */
  --su-status-ink: var(--su-brand-ink);

  /* ---- charts (added 2026-10-09, Insights' G2/B6: the SuntekIQ Overview drew its series BLACK in dark
     mode because no role existed, so the chart library fell back to its own default).
     `chart-1` to `chart-8` are CATEGORICAL series: they tell one category from another and mean nothing
     else. A gain or a loss is never a series colour; it is `chart-positive` / `chart-negative`, which ARE
     the status inks, and `chart-neutral` is "no change". Do not put both kinds in one chart, because
     series 6 is the brand green and series 2 the brand amber.
     Every series is built from the brand hues only, and two of them are mixes of the brand's own:
     violet (blue with red) and orange (amber with red), plus rose (red with blue). No hue was added.
     MEASURED by tokens.test.ts, both themes: every series clears WCAG 1.4.11 (3:1 for a graphic) on the
     card, the canvas, the raised and the quiet surface; every pair differs by at least 20 in CIE76 delta
     E, and neighbours by at least 24, so the order is part of the design: no close pair sits side by
     side (closest pair: 23.7 light, cyan and slate; 29.0 dark, violet and rose). In light each pure hue is darkened toward the brand ink to the
     LIGHTEST mix that clears 3.3:1 on the tinted canvas (the same rule as the status inks: contrast is
     the floor, hue is what is kept); the mixed hues are mixed from roles that are already darkened,
     because the resolver follows one level of color-mix. */
  --su-chart-1: color-mix(in srgb, var(--su-brand-blue) 95%, var(--su-brand-ink));
  --su-chart-2: color-mix(in srgb, var(--su-brand-amber) 62%, var(--su-brand-ink));
  --su-chart-3: color-mix(in srgb, var(--su-chart-1) 60%, var(--su-bad));
  --su-chart-4: color-mix(in srgb, var(--su-brand-cyan) 64%, var(--su-brand-ink));
  --su-chart-5: color-mix(in srgb, var(--su-chart-2) 50%, var(--su-bad));
  --su-chart-6: color-mix(in srgb, var(--su-brand-green) 66%, var(--su-brand-ink));
  --su-chart-7: color-mix(in srgb, var(--su-bad) 75%, var(--su-chart-1));
  --su-chart-8: color-mix(in srgb, var(--su-brand-muted) 77%, var(--su-brand-ink));
  --su-chart-positive: var(--su-good);
  --su-chart-negative: var(--su-bad);
  --su-chart-neutral: var(--su-fg-tertiary);

  /* ---- focus. brand-v2.css:45 makes --v2-focus cyan. Two treatments, one hue, chosen by element
     type rather than by stylesheet accident — see section 5. */
  --su-focus: var(--su-accent);
  --su-focus-ring: 3px solid color-mix(in srgb, var(--su-accent) 32%, transparent);

  /* ---- overlay. Suntek declares no overlay token. Derived from the brand GROUND rather than from
     black, so the scrim reads as the same room. ATT's is rgba(3,25,44,0.4) in light and
     rgba(0,0,0,0.5) in dark; the same reasoning, applied to this palette, gives a ground-tinted
     scrim in light and a heavier one in dark, because on a dark-first palette a black scrim over a
     near-black ground is nearly invisible. Core admin already has --h-scrim / --scrim-a for this,
     so it maps rather than adopts. */
  --su-scrim: color-mix(in srgb, var(--su-brand-bg) 45%, transparent);

  /* ---- shadow. ATT's five-step SCALE with its web geometry (xs 0 1px 2px through lg 0 12px 28px),
     recoloured to the brand ground for light and to black for dark. ATT's navy
     rgba(5,36,62,.06-.14) does not port as a value: on Suntek's #060a14 ground a navy shadow is
     invisible.
     `--su-shadow-xl` is brand-v2.css:73 --v2-shadow and belongs on at most one element.
     `--su-glow` is brand-v2.css:74 --v2-glow, and the rule at brand-v2.css:182-184 ports with it:
     opt-in, at most one per page, because "a glow only directs attention while it remains rare". */
  --su-shadow-xs: 0 1px 2px color-mix(in srgb, var(--su-brand-bg) 6%, transparent);
  --su-shadow-sm: 0 2px 6px color-mix(in srgb, var(--su-brand-bg) 8%, transparent);
  --su-shadow-md: 0 6px 16px color-mix(in srgb, var(--su-brand-bg) 10%, transparent);
  --su-shadow-lg: 0 12px 28px color-mix(in srgb, var(--su-brand-bg) 14%, transparent);
  --su-shadow-xl: 0 24px 60px -20px rgb(0 0 0 / 35%);
  --su-glow: 0 0 0 1px color-mix(in srgb, var(--su-brand-blue) 18%, transparent),
             0 18px 50px -12px color-mix(in srgb, var(--su-brand-cyan) 18%, transparent);

  /* ---- edge marks (2026-10-16). A mark drawn inside an element's edge as a box-shadow, so marking
     a row never moves its content: a rail down the left edge of the selected or current row (accent)
     or of a row in a state (warn, bad), at the selected/active width; a hairline ring round a neutral
     chip on a quiet fill. Products drew these by hand (Core admin seven, Insights studio's canonical
     model five) before the package named them. A status dot's halo is not a role: it is an
     outline in the dot's own currentColor, as a field's focus halo is, which no exported token could carry. */
  --su-rail-accent: inset var(--su-border-thick) 0 0 var(--su-accent);
  --su-rail-warn: inset var(--su-border-thick) 0 0 var(--su-warn);
  --su-rail-bad: inset var(--su-border-thick) 0 0 var(--su-bad);
  --su-ring-edge: inset 0 0 0 var(--su-border-hairline) var(--su-edge);
}

/* =================================================================================================
 * 4. ROLES — states 2 and 3: DARK. brand-v2.css, verbatim.
 *
 * This is the canonical, measured, brand-authored set, and it is Suntek's real theme. Declared
 * twice on purpose (see the header). The two blocks must stay identical; the test asserts it.
 *
 * Measured against --su-surface-card #0e1728, which is the ground most text sits on:
 *   text #eaf0fa 15.65:1 · secondary #c3ccdd 11.09:1 · muted #97a4bc 7.13:1 · muted-2 #7f8db0 5.41:1
 *   cyan #22d3ee 9.92:1 · heading #56baf5 8.31:1 · green 9.32:1 · amber 10.73:1 · red 6.48:1
 *   blue #2d7cff 4.64:1 here but 4.41:1 on the raised card — FILL ONLY
 * ============================================================================================== */

@media (prefers-color-scheme: dark) {
  /* The OS says dark and nobody has stamped an explicit light choice. Not redundant with the block
     below: this is what makes the first paint correct with JavaScript still loading. */
  :root:not([data-theme='light']):not(.light) {
    /* surfaces — Suntek's four already form exactly ATT's seven-role ladder, so the mapping is
       one-to-one with no derivation. surface-quiet (ATT's surface-tertiary: chip fills, skeleton
       blocks, zebra) shares --su-brand-card-raised with the raised state, because Suntek has no
       fifth step and inventing one would break the trace. */
    --su-surface-canvas: var(--su-brand-bg);
    /* THE LADDER IS LIT, not flat. MEASURED 2026-09-25 against About Time Tours: its dark card
       stands 1.311:1 above its canvas; ours stood at 1.104:1 — under the step an eye reads without
       help, which is why every one of our cards needed a border to exist at all. Its surfaces also
       carry real chroma (card #0F3050, chroma 65) where ours were near-neutral (chroma 26).
       Mixing the brand HEADING into each surface fixes both at once and keeps the hue Suntek's.
       Two consequences encoded here: `raised` and `quiet` stop being the same hex and become their
       own steps, and `input` drops BELOW the card so a field reads as a recess rather than a tile —
       ATT's fields sit 1.181:1 under its card for the same reason. */
    --su-surface-bar: color-mix(in srgb, var(--su-brand-heading) 5%, var(--su-brand-surface));
    --su-surface-card: color-mix(in srgb, var(--su-brand-heading) 8%, var(--su-brand-card));
    --su-surface-raised: color-mix(in srgb, var(--su-brand-heading) 10%, var(--su-brand-card-raised));
    --su-surface-quiet: color-mix(in srgb, var(--su-brand-heading) 14%, var(--su-brand-card));
    --su-surface-input: var(--su-brand-card);
    --su-surface-disabled: color-mix(in srgb, var(--su-edge) 60%, var(--su-surface-card));

    /* foreground — Suntek's fourth text step exists for exactly ATT's reason. */
    --su-fg: var(--su-brand-text);
    --su-fg-secondary: var(--su-brand-secondary);
    --su-fg-tertiary: var(--su-brand-muted);
    --su-fg-placeholder: var(--su-brand-muted-2);
    /* No Suntek token for this one; derived with brand-v2.css's own idiom. 80% since 2026-10-20 (OPEN-ITEMS A4):
       at 60% it measured 2.42:1 on the dark card, too faint to read as text at all; 80% clears 3:1 on every dark
       surface and stays below the placeholder. Light is unchanged (README, "Disabled text"). */
    --su-fg-disabled: color-mix(in srgb, var(--su-brand-muted-2) 80%, var(--su-brand-card));
    --su-fg-inverse: var(--su-brand-ink);

    /* edges — Suntek has ONE default edge, not ATT's two, so edge-light and edge-main collapse.
       Collapsing them is honest. --su-control-edge measures 6.21:1 on the card. */
    /* MEASURED 2026-09-25: the brand's own --v2-border on the card is 1.36:1 — a rule that exists in
       the stylesheet and not on a screen. Lifted toward the brand's control border (its other
       primitive, so no new hue) until a hairline is actually visible at 2.2:1, still well under the
       control edge so a field boundary stays the stronger signal. */
    --su-edge: color-mix(in srgb, var(--su-brand-control-border) 30%, var(--su-brand-border));
    --su-edge-strong: var(--su-brand-border-strong);
    --su-control-edge: var(--su-brand-control-border);

    --su-accent: var(--su-brand-cyan);
    --su-accent-soft: color-mix(in srgb, var(--su-brand-cyan) 12%, var(--su-brand-card));
    --su-accent-edge: color-mix(in srgb, var(--su-brand-cyan) 42%, var(--su-brand-card));
    --su-accent-heading: var(--su-brand-heading);
    --su-nav-sel-ink: var(--su-accent);
    --su-nav-sel-fill: var(--su-accent-soft);
    --su-nav-sel-ring: 0 0 transparent;
    --su-bottom-inset: env(safe-area-inset-bottom, 0px);

    --su-action: var(--su-brand-cta);
    --su-action-hover: linear-gradient(135deg, color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper)) 0%, color-mix(in srgb, var(--su-brand-cyan) 84%, var(--su-brand-paper)) 100%);
    --su-action-flat: var(--su-brand-blue);
  --su-action-hover-flat: color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper));
    --su-action-ink: var(--su-brand-ink);

    --su-good: var(--su-brand-green);
    --su-good-soft: color-mix(in srgb, var(--su-brand-green) 12%, var(--su-brand-card));
    --su-good-edge: color-mix(in srgb, var(--su-brand-green) 42%, var(--su-brand-card));
    --su-good-fill: var(--su-brand-green);

    --su-warn: var(--su-brand-amber);
    --su-warn-soft: color-mix(in srgb, var(--su-brand-amber) 12%, var(--su-brand-card));
    --su-warn-edge: color-mix(in srgb, var(--su-brand-amber) 42%, var(--su-brand-card));
    --su-warn-fill: var(--su-brand-amber);

    --su-bad: var(--su-brand-red);
    --su-bad-soft: color-mix(in srgb, var(--su-brand-red) 12%, var(--su-brand-card));
    --su-bad-edge: color-mix(in srgb, var(--su-brand-red) 42%, var(--su-brand-card));
    --su-bad-fill: var(--su-brand-red);

    --su-info: var(--su-accent);
    --su-info-soft: var(--su-accent-soft);
    --su-info-edge: var(--su-accent-edge);
    --su-info-fill: var(--su-brand-cyan);

    --su-status-ink: var(--su-brand-ink);

    /* charts: the brand hues as they are (bright on a dark ground), the three mixes at the same weights
       as light's, and the deltas are the status inks. Measured in tokens.test.ts. */
    --su-chart-1: var(--su-brand-blue);
    --su-chart-2: var(--su-brand-amber);
    --su-chart-3: color-mix(in srgb, var(--su-brand-blue) 50%, var(--su-brand-red));
    --su-chart-4: var(--su-brand-cyan);
    --su-chart-5: color-mix(in srgb, var(--su-brand-amber) 50%, var(--su-brand-red));
    --su-chart-6: var(--su-brand-green);
    --su-chart-7: color-mix(in srgb, var(--su-brand-red) 75%, var(--su-brand-blue));
    --su-chart-8: var(--su-brand-muted);
    --su-chart-positive: var(--su-good);
    --su-chart-negative: var(--su-bad);
    --su-chart-neutral: var(--su-fg-tertiary);

    --su-focus: var(--su-accent);
    --su-focus-ring: 3px solid color-mix(in srgb, var(--su-accent) 32%, transparent);

    --su-scrim: color-mix(in srgb, var(--su-brand-bg) 72%, transparent);

    /* Tinted with the brand's own darkest ink, never black, and with ATT's blur-to-offset ratio
       (2.0 / 3.0 / 2.67 / 2.33). Black on a #060a14 canvas has almost nothing left to darken; what
       a shadow buys here is the spread of light around the card, not a hole beneath it. */
    --su-shadow-xs: 0 1px 2px color-mix(in srgb, var(--su-brand-ink) 55%, transparent);
    --su-shadow-sm: 0 2px 6px color-mix(in srgb, var(--su-brand-ink) 60%, transparent);
    --su-shadow-md: 0 6px 16px color-mix(in srgb, var(--su-brand-ink) 66%, transparent);
    --su-shadow-lg: 0 12px 28px color-mix(in srgb, var(--su-brand-ink) 72%, transparent);
    --su-shadow-xl: 0 24px 60px -20px rgb(0 0 0 / 65%);
    --su-glow: 0 0 0 1px color-mix(in srgb, var(--su-brand-blue) 18%, transparent),
               0 18px 50px -12px color-mix(in srgb, var(--su-brand-cyan) 18%, transparent);
    --su-rail-accent: inset var(--su-border-thick) 0 0 var(--su-accent);
    --su-rail-warn: inset var(--su-border-thick) 0 0 var(--su-warn);
    --su-rail-bad: inset var(--su-border-thick) 0 0 var(--su-bad);
    --su-ring-edge: inset 0 0 0 var(--su-border-hairline) var(--su-edge);
  }
}

/* Explicit dark, honouring both consumers' existing stamps: the Connect console's `data-theme` and
   Core admin's `.dark`. No third mechanism is introduced. */
/* ---- color-scheme FOLLOWS THE STAMP, not only the OS.
 *
 * `:root { color-scheme: light dark }` tells the browser to pick native chrome by the OS. That is
 * correct while nothing is stamped, and WRONG the moment something is: a page stamped
 * `data-theme="dark"` on a light OS keeps its dark tokens and gets LIGHT scrollbars, selects and date
 * pickers inside them — and the mirror case is worse, because a page forced light on a dark OS gets a
 * dark picker on a white card. Reported by the Studio seat 2026-09-29, which was carrying two local
 * override rules for it; those can go.
 *
 * Both stamps, both directions, and no third stamp introduced — the same two this file already
 * honours.
 *
 * Written as one line each for brevity only. The token readers (`src/css-blocks.mjs`, OPEN-ITEMS B19)
 * find a block by its selector, not its text, and merge this rule with the dark token block below in
 * source order, as the cascade does, so its form changes nothing they read. */
:root[data-theme='dark'], :root.dark { color-scheme: dark; }
:root[data-theme='light'], :root.light { color-scheme: light; }

:root[data-theme='dark'],
:root.dark {
  --su-surface-canvas: var(--su-brand-bg);
  /* THE LADDER IS LIT, not flat. MEASURED 2026-09-25 against About Time Tours: its dark card
     stands 1.311:1 above its canvas; ours stood at 1.104:1 — under the step an eye reads without
     help, which is why every one of our cards needed a border to exist at all. Its surfaces also
     carry real chroma (card #0F3050, chroma 65) where ours were near-neutral (chroma 26).
     Mixing the brand HEADING into each surface fixes both at once and keeps the hue Suntek's.
     Two consequences encoded here: `raised` and `quiet` stop being the same hex and become their
     own steps, and `input` drops BELOW the card so a field reads as a recess rather than a tile —
     ATT's fields sit 1.181:1 under its card for the same reason. */
  --su-surface-bar: color-mix(in srgb, var(--su-brand-heading) 5%, var(--su-brand-surface));
  --su-surface-card: color-mix(in srgb, var(--su-brand-heading) 8%, var(--su-brand-card));
  --su-surface-raised: color-mix(in srgb, var(--su-brand-heading) 10%, var(--su-brand-card-raised));
  --su-surface-quiet: color-mix(in srgb, var(--su-brand-heading) 14%, var(--su-brand-card));
  --su-surface-input: var(--su-brand-card);
  --su-surface-disabled: color-mix(in srgb, var(--su-edge) 60%, var(--su-surface-card));

  --su-fg: var(--su-brand-text);
  --su-fg-secondary: var(--su-brand-secondary);
  --su-fg-tertiary: var(--su-brand-muted);
  --su-fg-placeholder: var(--su-brand-muted-2);
  --su-fg-disabled: color-mix(in srgb, var(--su-brand-muted-2) 80%, var(--su-brand-card));
  --su-fg-inverse: var(--su-brand-ink);

  /* See the note in the prefers-color-scheme block: the brand border alone measures 1.36:1. */
  --su-edge: color-mix(in srgb, var(--su-brand-control-border) 30%, var(--su-brand-border));
  --su-edge-strong: var(--su-brand-border-strong);
  --su-control-edge: var(--su-brand-control-border);

  --su-accent: var(--su-brand-cyan);
  --su-accent-soft: color-mix(in srgb, var(--su-brand-cyan) 12%, var(--su-brand-card));
  --su-accent-edge: color-mix(in srgb, var(--su-brand-cyan) 42%, var(--su-brand-card));
  --su-accent-heading: var(--su-brand-heading);
  --su-nav-sel-ink: var(--su-accent);
  --su-nav-sel-fill: var(--su-accent-soft);
  --su-nav-sel-ring: 0 0 transparent;
  --su-bottom-inset: env(safe-area-inset-bottom, 0px);

  --su-action: var(--su-brand-cta);
  --su-action-hover: linear-gradient(135deg, color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper)) 0%, color-mix(in srgb, var(--su-brand-cyan) 84%, var(--su-brand-paper)) 100%);
  --su-action-flat: var(--su-brand-blue);
  --su-action-hover-flat: color-mix(in srgb, var(--su-brand-blue) 84%, var(--su-brand-paper));
  --su-action-ink: var(--su-brand-ink);

  --su-good: var(--su-brand-green);
  --su-good-soft: color-mix(in srgb, var(--su-brand-green) 12%, var(--su-brand-card));
  --su-good-edge: color-mix(in srgb, var(--su-brand-green) 42%, var(--su-brand-card));
  --su-good-fill: var(--su-brand-green);

  --su-warn: var(--su-brand-amber);
  --su-warn-soft: color-mix(in srgb, var(--su-brand-amber) 12%, var(--su-brand-card));
  --su-warn-edge: color-mix(in srgb, var(--su-brand-amber) 42%, var(--su-brand-card));
  --su-warn-fill: var(--su-brand-amber);

  --su-bad: var(--su-brand-red);
  --su-bad-soft: color-mix(in srgb, var(--su-brand-red) 12%, var(--su-brand-card));
  --su-bad-edge: color-mix(in srgb, var(--su-brand-red) 42%, var(--su-brand-card));
  --su-bad-fill: var(--su-brand-red);

  --su-info: var(--su-accent);
  --su-info-soft: var(--su-accent-soft);
  --su-info-edge: var(--su-accent-edge);
  --su-info-fill: var(--su-brand-cyan);

  --su-status-ink: var(--su-brand-ink);

  /* charts: the brand hues as they are (bright on a dark ground), the three mixes at the same weights
     as light's, and the deltas are the status inks. Measured in tokens.test.ts. */
  --su-chart-1: var(--su-brand-blue);
  --su-chart-2: var(--su-brand-amber);
  --su-chart-3: color-mix(in srgb, var(--su-brand-blue) 50%, var(--su-brand-red));
  --su-chart-4: var(--su-brand-cyan);
  --su-chart-5: color-mix(in srgb, var(--su-brand-amber) 50%, var(--su-brand-red));
  --su-chart-6: var(--su-brand-green);
  --su-chart-7: color-mix(in srgb, var(--su-brand-red) 75%, var(--su-brand-blue));
  --su-chart-8: var(--su-brand-muted);
  --su-chart-positive: var(--su-good);
  --su-chart-negative: var(--su-bad);
  --su-chart-neutral: var(--su-fg-tertiary);

  --su-focus: var(--su-accent);
  --su-focus-ring: 3px solid color-mix(in srgb, var(--su-accent) 32%, transparent);

  --su-scrim: color-mix(in srgb, var(--su-brand-bg) 72%, transparent);

  /* Tinted with the brand's own darkest ink, never black, and with ATT's blur-to-offset ratio
     (2.0 / 3.0 / 2.67 / 2.33). Black on a #060a14 canvas has almost nothing left to darken; what
     a shadow buys here is the spread of light around the card, not a hole beneath it. */
  --su-shadow-xs: 0 1px 2px color-mix(in srgb, var(--su-brand-ink) 55%, transparent);
  --su-shadow-sm: 0 2px 6px color-mix(in srgb, var(--su-brand-ink) 60%, transparent);
  --su-shadow-md: 0 6px 16px color-mix(in srgb, var(--su-brand-ink) 66%, transparent);
  --su-shadow-lg: 0 12px 28px color-mix(in srgb, var(--su-brand-ink) 72%, transparent);
  --su-shadow-xl: 0 24px 60px -20px rgb(0 0 0 / 65%);
  --su-glow: 0 0 0 1px color-mix(in srgb, var(--su-brand-blue) 18%, transparent),
             0 18px 50px -12px color-mix(in srgb, var(--su-brand-cyan) 18%, transparent);
  --su-rail-accent: inset var(--su-border-thick) 0 0 var(--su-accent);
  --su-rail-warn: inset var(--su-border-thick) 0 0 var(--su-warn);
  --su-rail-bad: inset var(--su-border-thick) 0 0 var(--su-bad);
  --su-ring-edge: inset 0 0 0 var(--su-border-hairline) var(--su-edge);
}

/* =================================================================================================
 * 5. BASE — resets and the focus treatment. Opt in with [data-su-base] on the host root.
 * ============================================================================================== */

@layer su-base {
  [data-su-base] {
    background: var(--su-surface-canvas);
    color: var(--su-fg);
    font-family: var(--su-font-body);
    font-size: var(--su-text-md);
    line-height: var(--su-lh-md);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  [data-su-base],
  [data-su-base] *,
  [data-su-base] *::before,
  [data-su-base] *::after {
    box-sizing: border-box;
  }

  [data-su-base] :where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--su-font-head);
    font-weight: var(--su-weight-bold);
    letter-spacing: -0.02em;
    line-height: 1.14;
    color: var(--su-fg);
    text-wrap: balance;
  }
  [data-su-base] :where(h1) {
    font-weight: var(--su-weight-display);
    letter-spacing: -0.03em;
  }
  [data-su-base] :where(h1, h2, h3, h4, p, figure, ul, ol, dl, dd) { margin: 0; }
  [data-su-base] :where(button, input, select, textarea) { font: inherit; color: inherit; }
  [data-su-base] :where(a) { color: inherit; }
  [data-su-base] :where(button) { cursor: pointer; }
  /* `img` ONLY, and `svg` deliberately NOT — a reset must be safe for markup it does not control.
     A flex item's automatic minimum size is clamped by its max-width, so `max-width: 100%` lets an
     icon collapse to whatever width its container happens to offer.
     MEASURED by the Insights seat 2026-09-29: ten sidebar icons rendered 3x16 instead of 16x16.
     The first fix exempted `.su-i`, and MEASURED 2026-09-30 that was not enough: 0 of 2,200 SVGs on
     the Insights page carry `.su-i` — they are lucide-react elements classed `lucide lucide-search
     size-3.5` — so all 916 flexed icons still computed `max-width: 100%`, and 13 of them squashed to
     about 3.5x16. An exemption keyed on OUR class only protects markup that already knows about us,
     which is no protection at all for a product using an icon library. Desk, Route and Studio all
     use one.
     So the clamp is scoped to `img`, which removes the mechanism instead of counteracting it. That is
     also the honest category: `max-width: 100%` guards REPLACED content whose intrinsic size is large
     and unknown — a photograph. An inline `<svg>` is authored markup with a viewBox and, in every
     icon library, explicit dimensions; treating it as an unknown-sized photo was the category error.
     The cost, stated rather than discovered: an inline SVG with no width or height and a large
     viewBox can now overflow its column, and constraining that is its own wrapper's job. That
     failure is immediately visible; the squash was not. */
  [data-su-base] :where(img) { max-width: 100%; }
  /* Tabular numerals wherever a figure is compared to another figure. */
  [data-su-base] :where(code, kbd, samp, pre) { font-family: var(--su-font-mono); }

  /* ---- FOCUS: the soft halo, generalised.
   *
   * ATT's global.css replaces the UA ring with a soft halo, and the reasoning in its comment is
   * sound and general: a hard second line drawn next to an already-visible resting border
   * "recreates the doubled-box look", and the ring cannot simply be removed either, because the
   * resting border is deliberately NEUTRAL on every input, so without a ring nothing marks which
   * field has focus.
   *
   * What is NOT ported is the `:has()` half. ATT needs it because react-native-web renders
   * <TextInput> as a DOM <input> nested inside a styled container View, so the UA ring paints
   * INSIDE the field's own border. Neither Suntek consumer has that nesting, so the selector would
   * be machinery guarding against a problem that does not exist here.
   *
   * Two treatments, one hue, chosen by ELEMENT TYPE rather than by stylesheet accident:
   *   fields          -> the 3px soft halo at offset 0, drawn on the field itself.
   *   buttons, links  -> 2px solid at offset 5px, which is brand-v2.css:94 verbatim.
   * The Connect console currently has both treatments applied to unrelated selectors
   * (`:focus-visible { outline-2 outline-accent outline-offset-2 }` and
   * `input:focus { box-shadow: 0 0 0 3px var(--c-accent-soft) }`); this unifies them.
   */
  [data-su-base] :where(input, textarea, select):focus { outline: none; }
  [data-su-base] :where(input, textarea, select):focus-visible {
    outline: var(--su-focus-ring);
    outline-offset: 0;
  }
  [data-su-base] :where(button, a, summary, [tabindex]):focus-visible {
    outline: var(--su-border-thick) solid var(--su-focus);
    outline-offset: 5px;
    border-radius: 2px;
  }

  /* Fields. The resting edge is the neutral control edge, never the accent. */
  [data-su-base] :where(input, textarea, select) {
    background: var(--su-surface-input);
    color: var(--su-fg);
    border: var(--su-border-thin) solid var(--su-control-edge);
    border-radius: var(--su-radius-md);
  }
  [data-su-base] :where(input, textarea)::placeholder { color: var(--su-fg-placeholder); }
  [data-su-base] :where(input, textarea, select):disabled {
    color: var(--su-fg-disabled);
    /* ATT reaches for gray-200 here. There is no grey ramp to reach for — see the README — so the
       role is named instead. */
    background: var(--su-surface-disabled);
    cursor: not-allowed;
  }

  /* WCAG 2.5.8 on coarse pointers, brand-v2.css:361-380's rule and its reason. */
  @media (pointer: coarse) {
    [data-su-base] :is(input[type='checkbox'], input[type='radio']) {
      min-width: 24px;
      min-height: 24px;
    }
  }
}

/* =================================================================================================
 * 6. COMPONENTS. Plain classes, usable from vanilla markup and from React `className`.
 *
 * EVERY RULE BELOW REFERENCES ROLES ONLY. No `--su-brand-*` appears past this line; the test
 * asserts it. A component that named a primitive would be right in one theme and wrong in the
 * other, which is the whole reason the two layers exist.
 * ============================================================================================== */

@layer su-components {
  /* ---- status pill / badge --------------------------------------------------------------------
   * ATT's StatusChip renders a filled pill from a TONE TABLE of literal class pairs.
   *
   * THE SOFT SURFACE IS NOT A LIGHTER SHADE OF THE HUE. It is a separately measured surface with
   * its own declared ink, and the two are written as ONE RULE per tone so they cannot be split.
   * designTokens.js:51-79 records what splitting them cost: error.light under error.dark ink
   * measured 1.43:1, and warning.main on warning.light measured 1.16:1.
   */
  .su-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--su-space-xs);
    padding: 0 var(--su-space-sm);
    min-height: 20px;
    border: var(--su-border-thin) solid var(--su-edge);
    border-radius: var(--su-radius-round);
    background: var(--su-surface-quiet);
    color: var(--su-fg-secondary);
    font-size: var(--su-text-xs);
    line-height: var(--su-lh-xs);
    font-weight: var(--su-weight-semibold);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  /* One rule per tone: surface, edge and ink together. */
  .su-badge.is-good { background: var(--su-good-soft); border-color: var(--su-good-edge); color: var(--su-good); }
  .su-badge.is-warn { background: var(--su-warn-soft); border-color: var(--su-warn-edge); color: var(--su-warn); }
  .su-badge.is-bad  { background: var(--su-bad-soft);  border-color: var(--su-bad-edge);  color: var(--su-bad); }
  .su-badge.is-info { background: var(--su-info-soft); border-color: var(--su-info-edge); color: var(--su-info); }
  .su-badge.is-neutral { background: var(--su-surface-quiet); border-color: var(--su-edge); color: var(--su-fg-tertiary); }

  /* ---- filter chip --------------------------------------------------------------------------
   * ATT has two components with one shape (FilterChip and PillFilter). The COUNT INSIDE THE CHIP is
   * the part neither Suntek consumer had.
   *
   * State is carried by `aria-pressed`, not by a class, so it is announced rather than only seen.
   * ATT's opaque active fill (bg-primary) is deliberately dropped: on this palette an opaque
   * #2d7cff chip needs dark ink at 4.95:1 and reads as a CTA sitting in a filter row. The active
   * chip takes the accent tint instead, whose ink measures 7.82:1 in dark and clears AA in light.
   */
  .su-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 var(--su-space-smd);
    border: var(--su-border-thin) solid var(--su-edge);
    border-radius: var(--su-radius-round);
    background: var(--su-surface-quiet);
    color: var(--su-fg-secondary);
    font-size: var(--su-text-xs);
    font-weight: var(--su-weight-button);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  }
  .su-chip:hover { border-color: var(--su-edge-strong); }
  .su-chip[aria-pressed='true'] {
    background: var(--su-accent-soft);
    border-color: var(--su-accent-edge);
    border-width: var(--su-border-thick);
    color: var(--su-accent);
  }
  /* `currentColor` makes ONE rule serve both states, which is what ATT achieves with two class
     pairs and a hard-coded primary.contrast+'33'. */
  .su-chip__n {
    min-width: 16px;
    padding: 0 5px;
    border-radius: var(--su-radius-round);
    background: color-mix(in srgb, currentColor 18%, transparent);
    font-variant-numeric: tabular-nums;
    text-align: center;
  }
  /* On a PRESSED chip the count sits on the card surface, not on a tint of the accent over the accent's soft fill:
     that double tint left the accent ink at 4.3:1 in light (Growth's companies a11y run, finding K1, 2026-10-07).
     The accent on the card is the pair the pressed chip's own label already passes on. */
  .su-chip[aria-pressed='true'] .su-chip__n { background: var(--su-surface-card); }

  /* ---- banner ------------------------------------------------------------------------------
   * ATT's AppToast is a raised card on the page surface with the status carried by a TINTED ICON
   * BADGE rather than by tinting the whole card, and it reuses the same surface/on-surface pairs as
   * the Banner "so a toast and a banner for the same outcome read as one family".
   *
   * Its accessibility carries across verbatim and is not optional: role="alert" on the element,
   * aria-live="assertive" for a bad outcome and "polite" otherwise.
   */
  .su-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--su-space-smd);
    align-items: start;
    padding: var(--su-space-smd) 14px;
    background: var(--su-surface-card);
    border: var(--su-border-thin) solid var(--su-edge);
    border-left: 3px solid var(--su-tone, var(--su-accent));
    border-radius: var(--su-radius-mlg);
    box-shadow: var(--su-shadow-sm);
    color: var(--su-fg-secondary);
    font-size: var(--su-text-sm);
    line-height: var(--su-lh-sm);
  }
  .su-banner__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--su-radius-md);
    display: grid;
    place-items: center;
    background: var(--su-tone-soft, var(--su-accent-soft));
    color: var(--su-tone, var(--su-accent));
  }
  .su-banner__title { color: var(--su-fg); font-weight: var(--su-weight-semibold); }
  .su-banner.is-good { --su-tone: var(--su-good); --su-tone-soft: var(--su-good-soft); }
  .su-banner.is-warn { --su-tone: var(--su-warn); --su-tone-soft: var(--su-warn-soft); }
  .su-banner.is-bad  { --su-tone: var(--su-bad);  --su-tone-soft: var(--su-bad-soft); }
  .su-banner.is-info { --su-tone: var(--su-info); --su-tone-soft: var(--su-info-soft); }

  /* ---- empty state, and no-results ---------------------------------------------------------
   * TWO states, deliberately different, and keeping them apart IS the idea: EmptyState means
   * "there is nothing yet" and offers a way forward; NoResults means "your filter matched nothing"
   * and carries no action, because the only thing to do is widen the filter. A single
   * undifferentiated empty state tells the reader neither.
   */
  .su-empty {
    display: grid;
    justify-items: center;
    gap: var(--su-space-sm);
    padding: var(--su-space-xxxl) var(--su-space-xl);
    min-height: 280px;
    align-content: center;
  }
  .su-empty__glyph { width: 48px; height: 48px; color: var(--su-fg-tertiary); }
  .su-empty__title {
    font-family: var(--su-font-head);
    font-size: var(--su-text-xl);
    line-height: var(--su-lh-xl);
    font-weight: var(--su-weight-bold);
    color: var(--su-fg);
  }
  .su-empty__body {
    color: var(--su-fg-secondary);
    font-size: var(--su-text-md);
    line-height: var(--su-lh-md);
    max-width: 320px;
    text-align: center;
  }
  /* "Your filter matched nothing": smaller, and the action slot is hidden rather than left empty. */
  .su-empty--filtered { padding: 40px var(--su-space-lg); min-height: 0; }
  .su-empty--filtered .su-empty__glyph { width: 40px; height: 40px; }
  .su-empty--filtered .su-empty__title { font-size: var(--su-text-lg); line-height: var(--su-lh-lg); }
  .su-empty--filtered .su-empty__action { display: none; }

  /* ---- buttons -----------------------------------------------------------------------------
   * ATT's ThemedButton contributes its STRUCTURE: an explicit variant table, a size table, one
   * disabled treatment shared by every fill, and a web state block, because "a button with no
   * hover, focus ring or cursor change reads as dead until it is clicked".
   *
   * The SHAPE is brand-v2.css:153-162 verbatim: min-height 48px, padding 12px 22px, radius 9px,
   * weight 650, gap 12px. The primary fill is the brand CTA gradient with dark ink — 4.95:1 at the
   * blue end, 10.57:1 at the cyan end, both measured, and #eaf0fa on blue is 3.37:1, which is why
   * the ink is dark. Hover is filter: brightness(1.1), exactly brand-v2.css:160, not a colour
   * change — which is also how ATT's primary.light/primary.dark hover pair is avoided.
   */
  .su-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--su-space-smd);
    min-height: 48px;
    padding: var(--su-space-smd) 22px;
    border: var(--su-border-thin) solid transparent;
    border-radius: var(--su-radius-md);
    background: transparent;
    color: var(--su-fg);
    font-family: var(--su-font-body);
    font-size: var(--su-text-sm);
    font-weight: var(--su-weight-button);
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  }
  .su-btn--primary { background: var(--su-action); color: var(--su-action-ink); }
  .su-btn--primary:hover:not(:disabled) { filter: brightness(1.1); }
  /* brand-v2.css:161-162: a neutral visible edge at rest, cyan on hover. */
  .su-btn--secondary { border-color: var(--su-control-edge); }
  .su-btn--secondary:hover:not(:disabled) { border-color: var(--su-accent); }
  .su-btn--danger { background: var(--su-bad-fill); color: var(--su-status-ink); }
  .su-btn--danger:hover:not(:disabled) { filter: brightness(1.1); }
  .su-btn--ghost { color: var(--su-fg-secondary); }
  .su-btn--ghost:hover:not(:disabled) { background: var(--su-surface-quiet); color: var(--su-fg); }
  /* Sizes: ATT's two, its values. `sm` is the in-row action. */
  .su-btn--sm { min-height: 36px; padding: 6px var(--su-space-smd); font-size: 13px; }
  /* One disabled treatment, shared by every variant — ATT's rule. */
  .su-btn:disabled {
    filter: none;
    background: var(--su-surface-disabled);
    border-color: transparent;
    color: var(--su-fg-disabled);
    cursor: not-allowed;
  }

  /* ---- skeleton ----------------------------------------------------------------------------
   * The stated rule is the valuable part, and it is a rule about WHEN, not about CSS: skeletons are
   * for a screen's FIRST load. Spinners are only for pull-to-refresh, load-more and a button's
   * inline busy state — never as a whole-screen first-load state.
   * Size each block with inline width/height so it is shaped like the row it stands in for.
   */
  @keyframes su-skel {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }
  .su-skel {
    background: var(--su-surface-quiet);
    border-radius: var(--su-radius-mlg);
    animation: su-skel 1.8s ease-in-out infinite;
  }
  .su-skel-row { display: grid; gap: var(--su-space-sm); }

  /* ---- sparkline that refuses to lie -------------------------------------------------------
   * ATT draws a LINE only once there are three or more points; below that it draws dots, "so a page
   * opened the day after launch shows 'one week observed', never a slope". A series reconstructed
   * rather than observed is dashed and captioned as such.
   *
   * That is CLAUDE.md §7's rule — every fact MEASURED or RECORDED — encoded in a component. The
   * geometry is plain arithmetic and belongs in the consuming page; these are the classes it needs.
   */
  .su-spark { display: block; }
  .su-spark path { stroke: var(--su-accent); stroke-width: 1.5; fill: none; }
  .su-spark path.is-reconstructed { stroke-dasharray: 3 3; }
  .su-spark circle { fill: var(--su-accent); }
  .su-spark circle.is-unobserved { fill: var(--su-fg-tertiary); }
  .su-spark figcaption { font-size: 10px; color: var(--su-fg-tertiary); }

  /* ---- tinted icon tile --------------------------------------------------------------------
   * ATT's IconTile: a rounded 40px square, tinted from the theme at 12% alpha with the icon in the
   * full-strength hue. The same derivation brand-v2.css uses at line 265, so it needs no new value.
   * ATT's gradient variant is skipped: it needs expo-linear-gradient and buys nothing a flat tint
   * does not at 40px.
   */
  .su-icon-tile {
    width: 40px;
    height: 40px;
    border-radius: var(--su-radius-mlg);
    display: grid;
    place-items: center;
    background: var(--su-tone-soft, var(--su-accent-soft));
    color: var(--su-tone, var(--su-accent));
    flex: none;
  }
  .su-icon-tile.is-good { --su-tone: var(--su-good); --su-tone-soft: var(--su-good-soft); }
  .su-icon-tile.is-warn { --su-tone: var(--su-warn); --su-tone-soft: var(--su-warn-soft); }
  .su-icon-tile.is-bad  { --su-tone: var(--su-bad);  --su-tone-soft: var(--su-bad-soft); }
  .su-icon-tile.is-info { --su-tone: var(--su-info); --su-tone-soft: var(--su-info-soft); }

  /* ---- surfaces and the scrim -------------------------------------------------------------- */
  /* shadow-SM, not xs: ATT's STYLING.md says it twice — the canonical card is
     `borderRadius.lg, background.card, ...theme.shadows.sm`, and its new-screen checklist repeats
     "Cards use borderRadius.lg, background.card, shadows.sm". At xs a card is a bordered rectangle;
     the elevation is what makes it read as a surface sitting ON the page, which is the entire reason
     the canvas is tinted beneath it. */
  .su-card {
    background: var(--su-surface-card);
    border: 0;
    border-radius: var(--su-radius-lg);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--su-fg) 7%, transparent),
      var(--su-shadow-sm);
  }
  /* brand-v2.css:176's hover treatment. */
  .su-card--link { display: block; text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
  .su-card--link:hover { border-color: var(--su-edge-strong); background: var(--su-surface-raised); }
  .su-scrim { position: fixed; inset: 0; background: var(--su-scrim); }
  /* Opt-in, at most one per page — brand-v2.css:182-184. A glow only directs attention while it
     remains rare. */
  .su-spotlight { box-shadow: var(--su-glow); }

  .su-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* =================================================================================================
 * 7. MOTION AND FORCED COLOURS.
 *
 * The reduce-motion block is what makes the skeleton's pulse free: ATT stops the animation when the
 * OS reports reduce-motion, and one rule here does it for everything in the file.
 * ============================================================================================== */

@media (prefers-reduced-motion: reduce) {
  [data-su-base] *,
  [data-su-base] *::before,
  [data-su-base] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .su-skel { animation: none; }
}

@media (forced-colors: active) {
  .su-spotlight { box-shadow: none; }
}

/* ============================================================================================
 * THE FOCAL SET — added 2026-09-25 after looking at the About Time Tours app itself rather than
 * only at its stylesheet.
 *
 * The scales were already ported and the result still read as a specification. Three devices in
 * ATT's shipped screens do most of the work, and none of them is a token:
 *
 *  1. ONE HERO. Its dashboard and its tour screen each have a single large gradient card carrying
 *     the thing you are actually doing, with a nested DARKER panel inside it for the number that
 *     matters and its actions sitting in the card. Everything else on the page is quiet and white.
 *     Colour is CONCENTRATED, not distributed — our preview gave five tiles equal weight and
 *     therefore gave nothing emphasis.
 *  2. A PROGRESS RAIL. "Stop 2 of 4" renders as four segments, filled behind you and empty ahead.
 *     Three 7px dots say the same thing and say it faintly.
 *  3. TINTED ICON TILES. Every list row in "Needs your attention" leads with a rounded square in a
 *     status tint holding a glyph. It is the most repeated device in the app and it is what makes a
 *     list of text read as a designed surface.
 *
 * Ported as TREATMENT, never as ATT's hue: every colour below resolves from a Suntek role.
 * ============================================================================================ */
@layer su-components {
  /* ---- 1. The hero. One per view. A second one means neither is the hero. */
  .su-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--su-radius-lg);
    border: var(--su-border-thin) solid var(--su-accent-edge);
    /* Built from ROLES, so it re-derives per theme instead of being a painted-on dark card: in
       light it lands as a deep tinted panel, in dark as the card lifted toward the accent. */
    background:
      radial-gradient(120% 140% at 88% -10%, color-mix(in srgb, var(--su-accent) 22%, transparent), transparent 60%),
      linear-gradient(140deg, var(--su-surface-raised), color-mix(in srgb, var(--su-accent) 14%, var(--su-surface-card)));
    box-shadow: var(--su-shadow-lg);
    padding: var(--su-space-md);
    display: grid;
    gap: var(--su-space-smd);
  }
  .su-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: var(--su-text-xxs); text-transform: uppercase; letter-spacing: .09em;
    font-weight: var(--su-weight-semibold); color: var(--su-accent);
  }
  .su-hero__title { font-family: var(--su-font-head); font-size: var(--su-text-xxl); font-weight: var(--su-weight-bold); line-height: 1.15; letter-spacing: -0.01em; margin: 0; color: var(--su-fg); }
  .su-hero__sub { margin: 0; color: var(--su-fg-secondary); font-size: var(--su-text-sm); }
  /* The nested panel. ATT darkens INSIDE the hero rather than adding another card — the number
     stays in the focal element instead of being pushed out of it. */
  .su-hero__panel {
    display: flex; align-items: flex-end; justify-content: space-between; gap: var(--su-space-md);
    flex-wrap: wrap;
    padding: var(--su-space-smd) var(--su-space-md);
    border-radius: var(--su-radius-mlg);
    background: color-mix(in srgb, var(--su-surface-canvas) 55%, transparent);
    border: var(--su-border-thin) solid color-mix(in srgb, var(--su-accent) 14%, transparent);
  }
  .su-hero__actions { display: flex; gap: var(--su-space-sm); flex-wrap: wrap; }

  /* ---- The metric. Big tabular number under an uppercase micro-label — the ONE place ATT's
     11px uppercase treatment belongs, per its own STYLING.md. */
  .su-metric { display: grid; gap: 2px; }
  .su-metric__k { font-size: var(--su-text-xxs); text-transform: uppercase; letter-spacing: .09em; color: var(--su-fg-tertiary); font-weight: var(--su-weight-semibold); }
  .su-metric__v { font-family: var(--su-font-head); font-weight: var(--su-weight-bold); font-size: var(--su-text-xxxl); line-height: 1; font-variant-numeric: tabular-nums; color: var(--su-fg); }
  .su-metric--sm .su-metric__v { font-size: var(--su-text-lg); }
  .su-metric__v.is-good { color: var(--su-good); }
  .su-metric__v.is-warn { color: var(--su-warn); }
  .su-metric__v.is-bad { color: var(--su-bad); }

  /* ---- 2. The progress rail. Segments, not dots: the count is readable at a glance and the
     remaining work is visible as empty track. */
  .su-rail { display: flex; align-items: center; gap: 4px; }
  .su-rail > i {
    flex: 1 1 0; height: 4px; border-radius: var(--su-radius-round);
    background: var(--su-edge-strong);
  }
  .su-rail > i.is-done { background: var(--su-good); }
  .su-rail > i.is-now { background: var(--su-accent); }
  .su-rail > i.is-bad { background: var(--su-bad); }
  .su-rail--thick > i { height: 6px; }

  /* ---- 3. The tinted icon tile. The device that makes a list of rows look designed. */
  .su-itile {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--su-radius-mlg);
    background: var(--su-tone-soft, var(--su-accent-soft));
    color: var(--su-tone, var(--su-accent));
    border: var(--su-border-thin) solid var(--su-tone-edge, var(--su-accent-edge));
    font-size: var(--su-text-sm); font-weight: var(--su-weight-bold);
    line-height: 1;
  }
  .su-itile--lg { width: 44px; height: 44px; border-radius: var(--su-radius-lg); }
  .su-itile.is-good { --su-tone: var(--su-good); --su-tone-soft: var(--su-good-soft); --su-tone-edge: var(--su-good-edge); }
  .su-itile.is-warn { --su-tone: var(--su-warn); --su-tone-soft: var(--su-warn-soft); --su-tone-edge: var(--su-warn-edge); }
  .su-itile.is-bad  { --su-tone: var(--su-bad);  --su-tone-soft: var(--su-bad-soft);  --su-tone-edge: var(--su-bad-edge); }
  .su-itile.is-info { --su-tone: var(--su-info); --su-tone-soft: var(--su-info-soft); --su-tone-edge: var(--su-info-edge); }

  /* ---- A row built around that tile. ATT's "Needs your attention" anatomy: tile, then a
     two-line body, then a chevron — and the whole row is the target. */
  .su-row {
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: var(--su-space-smd);
    padding: var(--su-space-smd);
    border-radius: var(--su-radius-mlg);
    border: var(--su-border-thin) solid transparent;
    transition: background-color .15s ease, border-color .15s ease;
  }
  .su-row + .su-row { border-top: var(--su-border-thin) solid var(--su-edge); border-top-left-radius: 0; border-top-right-radius: 0; }
  .su-row:hover { background: var(--su-surface-raised); border-color: var(--su-edge); }
  .su-row__t { font-weight: var(--su-weight-semibold); color: var(--su-fg); font-size: var(--su-text-sm); }
  .su-row__s { color: var(--su-fg-tertiary); font-size: var(--su-text-xs); }
  .su-row__go { color: var(--su-fg-tertiary); font-size: var(--su-text-lg); line-height: 1; }

  /* ---- Avatar. Initials, one tone, round. */
  .su-avatar {
    width: 32px; height: 32px; border-radius: var(--su-radius-round);
    display: grid; place-items: center;
    background: var(--su-accent-soft); color: var(--su-accent);
    border: var(--su-border-thin) solid var(--su-accent-edge);
    font-size: var(--su-text-xxs); font-weight: var(--su-weight-bold); letter-spacing: .02em;
    /* A 32px circle in a flex row never gives up its width, and its two initials never wrap: with the brand faces
       loaded (wider than system-ui), a long title beside it squeezed "CG" onto two lines (Growth, 2026-10-08). */
    flex-shrink: 0; white-space: nowrap;
  }

  /* ---- Segmented control. ATT uses it for "Taylor | Jordan" and for its filter row; the active
     segment is FILLED, which is what makes the choice obvious without a label. */
  .su-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--su-surface-quiet); border: var(--su-border-thin) solid var(--su-edge); border-radius: var(--su-radius-round); }
  .su-seg > button {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    padding: 5px 14px; border-radius: var(--su-radius-round);
    font-size: var(--su-text-xs); font-weight: var(--su-weight-semibold); color: var(--su-fg-secondary);
    transition: background-color .15s ease, color .15s ease;
  }
  .su-seg > button:hover { color: var(--su-fg); }
  .su-seg > button[aria-pressed='true'] { background: var(--su-surface-card); color: var(--su-fg); box-shadow: var(--su-shadow-xs); }

  /* ---- Section header: title left, quiet meta right. ATT puts "Required for each client" and
     "Shared with listing agent" here, which is where a caveat stops being a footnote. */
  .su-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--su-space-md); flex-wrap: wrap; }
  .su-sechead__t { font-family: var(--su-font-head); font-size: var(--su-text-lg); font-weight: var(--su-weight-bold); letter-spacing: -0.01em; color: var(--su-fg); margin: 0; }
  .su-sechead__m { font-size: var(--su-text-xs); color: var(--su-fg-tertiary); }

  /* ---- Sticky action bar. ATT's tour screen keeps the decision reachable without scrolling and
     puts the blocking reason directly above it. */
  .su-actionbar {
    /* --su-bottom-inset (1.0.3): an app with a bottom tab bar sets it once on its frame, so the bar docks above it */
    position: sticky; bottom: var(--su-bottom-inset, env(safe-area-inset-bottom, 0px)); z-index: 4;
    display: grid; gap: var(--su-space-xs); justify-items: center;
    padding: var(--su-space-smd) var(--su-space-md);
    background: color-mix(in srgb, var(--su-surface-bar) 90%, transparent);
    backdrop-filter: blur(10px);
    border-top: var(--su-border-thin) solid var(--su-edge);
  }
  .su-actionbar__why { font-size: var(--su-text-xs); color: var(--su-fg-tertiary); }
  .su-actionbar__set { display: flex; gap: var(--su-space-sm); flex-wrap: wrap; justify-content: center; }

  /* ---- 4. THE APP SHELL. ATT's admin console is a left rail plus a content column, and the rail
     is doing real work: it groups by domain under uppercase micro-labels, gives every item an icon,
     fills the ACTIVE item as a pill, and hangs a count on the items that are waiting for you. A
     console without it is a document; with it, it is software. */
  .su-side {
    display: flex; flex-direction: column; gap: var(--su-space-md);
    width: 232px; flex: 0 0 232px;
    padding: var(--su-space-md) var(--su-space-smd);
    /* The bar role over an OPAQUE base (1.0.3, C30 item 5): --su-surface-bar is translucent under a look (84 to 88%,
       made for a backdrop blur this rail does not have), so a rail made sticky showed the page through it. The canvas
       under it makes it opaque in every look and without one; no backdrop-filter, which would re-anchor any
       position: fixed menu inside it. */
    background: linear-gradient(var(--su-surface-bar), var(--su-surface-bar)), var(--su-surface-canvas);
    border-right: var(--su-border-thin) solid var(--su-edge);
  }
  .su-navgroup { display: grid; gap: 2px; }
  .su-navgroup__k {
    padding: var(--su-space-sm) var(--su-space-smd) var(--su-space-xs);
    font-size: var(--su-text-xxs); text-transform: uppercase; letter-spacing: .1em;
    color: var(--su-fg-tertiary); font-weight: var(--su-weight-semibold);
  }
  .su-navitem {
    display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: var(--su-space-sm);
    padding: 8px var(--su-space-smd);
    border-radius: var(--su-radius-md);
    color: var(--su-fg-secondary); font-size: var(--su-text-sm); font-weight: var(--su-weight-medium);
    text-decoration: none; border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .su-navitem:hover { background: var(--su-surface-raised); color: var(--su-fg); }
  /* The active item is FILLED, the way ATT fills it — an outline or a colour change alone does not
     survive a glance down a list of twenty. */
  /* A TINT plus an accent rail, not a saturated fill. ATT's active item is a soft teal pill — a
     full-intensity action colour behind a label reads as a button you failed to press, and it also
     puts body-weight text on a strong ground where the ink was never measured. */
  .su-navitem[aria-current='page'] {
    background: var(--su-nav-sel-fill);
    color: var(--su-nav-sel-ink);
    font-weight: var(--su-weight-semibold);
    box-shadow: inset 2px 0 0 var(--su-accent);
  }
  .su-navitem__n {
    min-width: 20px; padding: 0 6px; border-radius: var(--su-radius-round);
    background: var(--su-accent-soft); color: var(--su-accent);
    font-size: var(--su-text-xxs); font-weight: var(--su-weight-bold); text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .su-navitem__i { display: grid; place-items: center; opacity: .9; }

  /* ---- The icon primitive. Stroked, sized in em so it tracks the text it sits beside, and coloured
     by `currentColor` so a status tile tints its own glyph by setting `color` alone. See
     css/icons.svg for the sheet and the drawing rules. A Unicode character is NOT an icon: it
     renders at whatever weight and baseline the viewer's font supplies. */
  .su-i {
    /* `max-width: none` belongs HERE as well as in the su-base exemption: it makes the icon class
       self-sufficient against a CONSUMER's own reset, which lands in a later layer than ours and
       would otherwise reintroduce the collapse this pair fixes. */
    width: 1.15em; height: 1.15em; flex: 0 0 auto; max-width: none;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    vertical-align: -0.18em;
  }
  .su-i--lg { width: 1.4em; height: 1.4em; }
  .su-i--sm { width: 1em; height: 1em; stroke-width: 2; }

  /* ---- Breadcrumb over a page title, with the page's one action on the right. */
  .su-crumb { font-size: var(--su-text-xs); color: var(--su-fg-tertiary); display: flex; gap: 6px; align-items: center; }
  .su-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--su-space-md); flex-wrap: wrap; }
  .su-pagehead__t { font-family: var(--su-font-head); font-size: var(--su-text-xxxl); font-weight: var(--su-weight-bold); letter-spacing: -0.02em; margin: 0; color: var(--su-fg); line-height: 1.1; }

  /* ---- 5. NESTED PANELS. The figures live INSIDE the card that frames them, as translucent
     panels, instead of becoming a row of separate tiles with equal weight and no subject. */
  .su-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--su-space-sm); }
  .su-panel {
    display: grid; gap: 2px;
    padding: var(--su-space-smd);
    border-radius: var(--su-radius-mlg);
    background: color-mix(in srgb, var(--su-surface-canvas) 42%, transparent);
    border: var(--su-border-thin) solid color-mix(in srgb, var(--su-fg) 8%, transparent);
  }
  .su-panel__k { font-size: var(--su-text-xs); color: var(--su-fg-secondary); }
  .su-panel__v { font-family: var(--su-font-head); font-size: var(--su-text-xxl); font-weight: var(--su-weight-bold); line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--su-fg); }
  .su-panel__m { font-size: var(--su-text-xxs); color: var(--su-fg-tertiary); }
  .su-panel__m.is-warn { color: var(--su-warn); }

  /* ---- Card header: icon tile, title, subtitle, and a quiet count or link on the right. Every
     card in ATT's admin opens this way, which is most of why its cards read as a family. */
  .su-cardhead { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--su-space-smd); }
  .su-cardhead__t { font-family: var(--su-font-head); font-size: var(--su-text-md); font-weight: var(--su-weight-bold); color: var(--su-fg); }
  .su-cardhead__s { font-size: var(--su-text-xs); color: var(--su-fg-tertiary); }

  /* ---- THE ONE-APP SHELL'S OWN PARTS (OPEN-ITEMS B2, 2026-10-18). The Suntek One shell (ADR-0052,
     ledger/specs/2026-09-29-suntek-one-app.md §2) is a top bar over the rail (.su-side) and the page.
     The top bar holds, in this order: the brand, the organization switcher, navigation search (Ctrl+K),
     then the alerts bell, the theme toggle, the app grid and the account menu. These classes are the
     parts; the shell element wires them. Nothing here names a product: the grid draws whatever modules
     the navigation read returns. Every colour is a role. */
  .su-top-bar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; gap: var(--su-space-sm);
    min-height: 56px;
    padding: var(--su-space-sm) var(--su-space-md);
    /* The bar role over an opaque canvas, as .su-side (1.0.3, C30 item 5): the role is translucent under a
       look, and a sticky bar must not show the page scrolling under it. */
    background: linear-gradient(var(--su-surface-bar), var(--su-surface-bar)), var(--su-surface-canvas);
    border-bottom: var(--su-border-thin) solid var(--su-edge);
  }
  .su-top-bar__brand {
    display: inline-flex; align-items: center; gap: var(--su-space-sm); flex: none;
    color: var(--su-fg); text-decoration: none;
    font-family: var(--su-font-head); font-size: var(--su-text-md); font-weight: var(--su-weight-bold); letter-spacing: -0.01em;
  }
  /* Search opens the shell's navigation search, so it is a button drawn as a field, with its key hint. */
  .su-top-bar__search {
    flex: 1 1 240px; min-width: 0; max-width: 420px;
    display: inline-flex; align-items: center; gap: var(--su-space-sm);
    height: 36px; padding: 0 var(--su-space-smd);
    border: var(--su-border-thin) solid var(--su-control-edge); border-radius: var(--su-radius-md);
    background: var(--su-surface-input); color: var(--su-fg-secondary);
    font: inherit; font-size: var(--su-text-sm); text-align: left; cursor: pointer;
  }
  .su-top-bar__search > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .su-top-bar__search kbd {
    flex: none; padding: 0 var(--su-space-xs);
    border: var(--su-border-thin) solid var(--su-edge); border-radius: var(--su-radius-sm);
    font-family: var(--su-font-mono); font-size: var(--su-text-xxs); color: var(--su-fg-tertiary);
  }
  .su-top-bar__end { display: inline-flex; align-items: center; gap: var(--su-space-xxs); margin-left: auto; flex: none; }
  /* An icon button in the bar: the bell, the theme toggle, the app grid's opener. Named by aria-label. */
  .su-top-bar__btn {
    position: relative; display: inline-grid; place-items: center; flex: none;
    width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: var(--su-radius-md);
    background: transparent; color: var(--su-fg-secondary); cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
  }
  .su-top-bar__btn:hover { background: var(--su-surface-raised); color: var(--su-fg); }
  .su-top-bar__btn:is([aria-expanded='true'], [aria-pressed='true']) { background: var(--su-nav-sel-fill); color: var(--su-nav-sel-ink); }
  /* --optional: a control the bar can spare on a narrow phone (the theme toggle). Below 480 px it hides,
     and the shell offers the same action in the account menu, so the organization's name keeps its room. */
  /* The bell's count: the danger fill with its measured ink, the pair .su-btn--danger uses. */
  .su-top-bar__n {
    position: absolute; top: 1px; right: 1px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: var(--su-radius-round);
    background: var(--su-bad-fill); color: var(--su-status-ink);
    font-size: var(--su-text-xxs); font-weight: var(--su-weight-bold); line-height: 16px; text-align: center;
    font-variant-numeric: tabular-nums;
  }

  /* The switcher: a button that names the current choice, over a menu of the choices. The organization
     switcher, the module switcher (on a phone, where the rail folds) and the account menu are all one.
     The current choice is marked aria-current="true" (a link) or aria-selected="true" (an option). */
  .su-switcher { position: relative; display: inline-flex; min-width: 0; }
  .su-switcher__btn {
    display: inline-flex; align-items: center; gap: var(--su-space-xs);
    min-width: 0; max-width: 260px; height: 36px; padding: 0 var(--su-space-sm) 0 var(--su-space-smd);
    border: var(--su-border-thin) solid var(--su-edge); border-radius: var(--su-radius-md);
    background: var(--su-surface-card); color: var(--su-fg);
    font: inherit; font-size: var(--su-text-sm); font-weight: var(--su-weight-semibold); cursor: pointer;
  }
  .su-switcher__btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .su-switcher__btn:hover { background: var(--su-surface-raised); }
  .su-switcher__btn[aria-expanded='true'] { border-color: var(--su-accent-edge); }
  /* A trailing i-chevron points down at rest and up while the menu is open. */
  .su-switcher__btn > .su-i:last-child { transform: rotate(90deg); color: var(--su-fg-tertiary); transition: transform .15s ease; }
  .su-switcher__btn[aria-expanded='true'] > .su-i:last-child { transform: rotate(-90deg); }
  .su-switcher__menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 6;
    display: grid; gap: 2px; align-content: start;
    width: max-content; min-width: 240px; max-width: min(340px, calc(100vw - 2 * var(--su-space-md)));
    max-height: min(440px, 70dvh); overflow: auto;
    padding: var(--su-space-xs);
    background: var(--su-surface-card); color: var(--su-fg);
    border: var(--su-border-thin) solid var(--su-edge); border-radius: var(--su-radius-mlg);
    box-shadow: var(--su-shadow-lg);
  }
  .su-switcher__menu[hidden] { display: none; }
  .su-switcher--end .su-switcher__menu { left: auto; right: 0; }
  .su-switcher__k {
    padding: var(--su-space-sm) var(--su-space-sm) var(--su-space-xxs);
    font-size: var(--su-text-xxs); text-transform: uppercase; letter-spacing: .1em;
    color: var(--su-fg-tertiary); font-weight: var(--su-weight-semibold);
  }
  .su-switcher__filter {
    height: 32px; margin: 2px 2px var(--su-space-xs); padding: 0 var(--su-space-sm);
    border: var(--su-border-thin) solid var(--su-control-edge); border-radius: var(--su-radius-md);
    background: var(--su-surface-input); color: var(--su-fg); font: inherit; font-size: var(--su-text-sm);
  }
  .su-switcher__opt {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--su-space-sm);
    width: 100%; min-height: 36px; padding: 6px var(--su-space-sm);
    border: 0; border-radius: var(--su-radius-md);
    background: transparent; color: var(--su-fg-secondary);
    font: inherit; font-size: var(--su-text-sm); text-align: left; text-decoration: none; cursor: pointer;
  }
  .su-switcher__opt:hover { background: var(--su-surface-raised); color: var(--su-fg); }
  .su-switcher__opt:is([aria-current='true'], [aria-selected='true']) {
    background: var(--su-nav-sel-fill); color: var(--su-nav-sel-ink); font-weight: var(--su-weight-semibold);
  }
  .su-switcher__opt > small { font-size: var(--su-text-xxs); color: var(--su-fg-tertiary); font-weight: var(--su-weight-regular); }
  /* On the selected fill the tertiary ink fell to 3.46:1 under Suntek Calm dark (SUN-964): the small line takes the selected ink, at its own weight. */
  .su-switcher__opt:is([aria-current='true'], [aria-selected='true']) > small { color: var(--su-nav-sel-ink); }
  .su-switcher__sep { height: 0; margin: var(--su-space-xs) var(--su-space-xxs); border: 0; border-top: var(--su-border-thin) solid var(--su-edge); }

  /* The app grid: every module the person can open, as a tile and its job name ("Reports", not the
     product's name, spec §3), in the read's order. In the top bar it sits in a switcher's menu; on a
     home page, .su-app-grid--wide lays it out across the page. The module showing is aria-current. */
  .su-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--su-space-xxs); width: min(312px, calc(100vw - 4 * var(--su-space-md))); }
  .su-app-grid--wide { width: auto; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--su-space-sm); }
  .su-app-grid__item {
    display: grid; justify-items: center; align-content: start; gap: var(--su-space-xs);
    min-width: 0; padding: var(--su-space-smd) var(--su-space-xs);
    border-radius: var(--su-radius-mlg);
    color: var(--su-fg-secondary); text-decoration: none; text-align: center;
    font-size: var(--su-text-xs); font-weight: var(--su-weight-medium);
    transition: background-color .15s ease, color .15s ease;
  }
  .su-app-grid__item:hover { background: var(--su-surface-raised); color: var(--su-fg); }
  .su-app-grid__item[aria-current='page'] { background: var(--su-nav-sel-fill); color: var(--su-nav-sel-ink); font-weight: var(--su-weight-semibold); }
  .su-app-grid__item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .su-app-grid--wide .su-app-grid__item { border: var(--su-border-thin) solid var(--su-edge); background: var(--su-surface-card); }
  .su-app-grid--wide .su-app-grid__item:hover { background: var(--su-surface-raised); }

  @media (max-width: 900px) {
    .su-side { width: auto; flex: 1 1 auto; border-right: 0; border-bottom: var(--su-border-thin) solid var(--su-edge); }
  }
  /* A phone: the bar keeps its controls and drops words. The brand keeps its mark, search keeps its
     glass, the switcher's name shortens; nothing wraps to a second row and nothing scrolls sideways. */
  @media (max-width: 760px) {
    .su-top-bar { gap: var(--su-space-xs); padding-inline: var(--su-space-sm); }
    .su-top-bar__brand > :not(:first-child) { display: none; }
    .su-top-bar__search { flex: none; width: 36px; padding: 0; justify-content: center; }
    .su-top-bar__search > :not(:first-child) { display: none; }
    .su-switcher__btn { max-width: 150px; }
  }
  @media (max-width: 480px) {
    .su-top-bar__btn--optional { display: none; }
    /* The organization's name whole on a phone (SUN-916): up to two lines in the small size, cut at the end of
       the second only when it is longer still. Its leading glyph, its chevron and the bar's spare spacing give the
       name that room; the border still says it is a menu. Served at 375 with a coarse pointer, where seven 44 px
       targets share the bar, the name had 0 px and "Arbys" read "Arby/s" with a fine one; now every live
       organization's name is whole. A word stays whole, and one wider than the room ends in an ellipsis (SUN-1302):
       a break anywhere read "Arb" over "y's" at 360. */
    .su-top-bar { gap: 2px; padding-inline: var(--su-space-xs); }
    .su-top-bar .su-switcher__btn { height: auto; min-height: 36px; padding-block: 2px; padding-inline: 6px; gap: 0; }
    .su-top-bar .su-switcher__btn > .su-i:first-child:not(:last-child),
    .su-top-bar .su-switcher__btn > .su-i:last-child:not(:first-child) { display: none; }
    .su-top-bar .su-switcher__btn > span {
      display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
      white-space: normal; overflow-wrap: normal; text-overflow: ellipsis; font-size: var(--su-text-xs); line-height: 1.15;
    }
  }
  /* A touch phone (SUN-2018): seven 44 px targets share the bar, and its 2 px gaps, its padding and the sun/moon and
     "Aa" borrowing their neighbours' room left the name 57 px, so "UNITS of Phoenix" read "UNITS" over "of...". The
     targets sit edge to edge (each glyph keeps its own space inside its 44 px), the bar keeps a 2 px edge, and only the
     chip keeps 2 px from the bordered search box beside it: the name gets 53 px, "UNITS of" over "Phoenix". */
  @media (max-width: 480px) and (pointer: coarse) {
    .su-top-bar, .su-top-bar__end { gap: 0; }
    .su-top-bar { padding-inline: 2px; }
    .su-top-bar .su-switcher__btn { margin-left: 2px; padding-inline: 2px; }
  }
  /* Under 375, beside seven targets, those sizes leave the name 26 px at 360. One step down in type and tighter
     padding leave it 34 px, where "Arby's" takes 33 px at this size (SUN-1302). */
  @media (max-width: 374px) {
    .su-top-bar .su-switcher__btn { padding-inline: 2px; }
    .su-top-bar .su-switcher__btn > span { font-size: var(--su-text-xxs); }
  }
  /* A coarse pointer gets 44 px targets (1.0.3), whatever the width. The bar's own switcher rule above outranks the
     plain one, so it is named here too. */
  @media (pointer: coarse) {
    .su-top-bar__btn, .su-top-bar__search, .su-switcher__btn, .su-top-bar .su-switcher__btn { min-height: 44px; }
    .su-top-bar__btn, .su-top-bar__search { min-width: 44px; }
    .su-switcher__opt { min-height: 44px; }
    /* iPhone Safari and Chrome zoom the page in when a field under 16 px is tapped; in a one-page app it stays (SUN-1831). */
    .su-switcher__filter { height: 44px; font-size: var(--su-text-md); }
  }
}

/* =================================================================================================
 * 8. UNDER A LOOK (1.0.3). The Suntek One ui layer (ui/ui.css with ui.js) re-colours every role
 * above through the --su-* aliases, but a few parts here carry ATT's STRUCTURE in literal sizes and
 * paint: the 48 px button, the hero's gradient and the card's edge, which leaned on a shadow some
 * looks do not have. Under a look they take the look's structure, as .ui-btn and .ui-card do:
 *   - .su-btn takes the look's control height (32 px, Linear 30, 44 on a phone) beside .ui-btn
 *     (G3, CAT-15: page actions were 48 px beside 32 px controls);
 *   - .su-card draws the look's card edge and lift (G2: in Linear and Vercel the edge was only a
 *     shadow those looks set to nothing, and a Vercel dark card was the canvas colour);
 *   - .su-hero is flat, a card with the accent edge (Suntek One has no gradient and no glow).
 * Scoped as the aliases are (an element with a real look, not inside data-ui-aliases="off"), in
 * su-components after the rules they adjust, so a consumer's own later layer still wins. Without a
 * look nothing here matches and the parts are as above.
 * ============================================================================================== */
@layer su-components {
  :where([data-look]:not([data-look=""]):not([data-look="none"]):not([data-ui-aliases="off"])) .su-btn:where(:not([data-ui-aliases="off"] *)) {
    min-height: var(--ui-ctl-h, 32px);
    padding: 4px 14px;
    font-size: var(--ui-fs-2, 13px);
    line-height: 1.2;
  }
  :where([data-look]:not([data-look=""]):not([data-look="none"]):not([data-ui-aliases="off"])) .su-btn--sm:where(:not([data-ui-aliases="off"] *)) {
    min-height: calc(var(--ui-ctl-h, 32px) - 6px);
    padding: 2px 10px;
    font-size: var(--ui-fs-1, 12px);
  }
  :where([data-look]:not([data-look=""]):not([data-look="none"]):not([data-ui-aliases="off"])) .su-card:where(:not([data-ui-aliases="off"] *)) {
    border: var(--ui-card-border, 0);
    box-shadow: var(--ui-shadow-1, var(--su-shadow-sm));
  }
  :where([data-look]:not([data-look=""]):not([data-look="none"]):not([data-ui-aliases="off"])) .su-hero:where(:not([data-ui-aliases="off"] *)) {
    background: var(--su-surface-card);
    box-shadow: var(--ui-shadow-1, var(--su-shadow-sm));
  }
}

/* =================================================================================================
 * 9. THE READING PARTS (SUN-811, 2026-10-30). Three parts a page that reads figures needs, after the
 * owner's approved charcoal and blue design (D-051; batch 2, p2 and p3). Roles only, so each reads
 * its look: the base sheet's roles here, Suntek Calm's under data-look="calm".
 *
 *   .su-eyebrow: a small upper-case label over a section or a group of links (the rail's "Restaurant
 *   analytics"). --accent takes the accent.
 *     <p class="su-eyebrow">Restaurant analytics</p>
 *
 *   .su-par: a bar from 0 to a maximum with a mark at par, for a score where 50 is par, not a grade.
 *   The fill grows from zero to the value; is-bad (below par) and is-good (above) tone it, and
 *   --plain is a neutral contribution bar with no mark. Set --su-par-value on .su-par, and
 *   --su-par-max (100) and --su-par-at (half the maximum) when they differ. The track is role="img"
 *   with an aria-label that says the value, the scale and par in words; the visible value and
 *   scale beside it repeat that label, so they are aria-hidden.
 *     <div class="su-par is-bad" style="--su-par-value: 38; --su-par-at: 50">
 *       <div class="su-par__track" role="img" aria-label="38 of 100, below par (50)">
 *         <span class="su-par__fill"></span><span class="su-par__mark"></span>
 *       </div>
 *       <b class="su-par__value" aria-hidden="true">38</b>
 *       <span class="su-par__scale" aria-hidden="true"><span>0</span><span>100</span></span>
 *     </div>
 *
 *   .su-metric--tile: a figure's card. The value takes the look's large-value size (--ui-fs-value,
 *   32px without a look), and --sm with it keeps 32px for a row of four. __delta says the change in
 *   words as well as colour (is-good and is-bad tone the words and the arrow; the words say the
 *   direction); __note is a quiet line; __foot is a link row at the card's foot.
 *     <article class="su-card su-metric su-metric--tile">
 *       <h3 class="su-metric__k">Net sales</h3>
 *       <span class="su-metric__v">$48,210</span>
 *       <span class="su-metric__delta is-bad"><svg class="su-i" aria-hidden="true" style="rotate: 180deg"><use href="#i-arrow-up"/></svg><b>Down 8.7%</b> vs last year</span>
 *       <p class="su-metric__note">Same weekday last year</p>
 *       <a class="su-metric__foot" href="/stores">View stores <span aria-hidden="true">→</span></a>
 *     </article>
 *
 * Then, under Suntek Calm only, two notes from qa's review of slice 1 against the PDF: the selected
 * segment of .su-seg is the solid blue action with its ink (p7), and a badge's ink is its tone eased
 * toward the text, the lighter ink of the PDF's pills (p3), held to AA on its soft fill
 * (src/__tests__/tokens.test.ts). Scoped as section 8 is, so every other look renders as before.
 * ============================================================================================== */
@layer su-components {
  /* ---- Eyebrow */
  .su-eyebrow {
    display: flex; align-items: center; gap: 6px; margin: 0;
    font-size: var(--su-text-xs); line-height: var(--su-lh-xs);
    font-weight: var(--su-weight-semibold); text-transform: uppercase; letter-spacing: .08em;
    color: var(--su-fg-tertiary);
  }
  .su-eyebrow--accent { color: var(--su-accent); }

  /* ---- Par bar. The track is the accent's faint tint on the quiet surface, so an empty bar still
     reads as a bar on a card (the PDF's blue-grey track); the mark sits on the card with a ring of
     the card's colour, so it parts the fill where the two meet. */
  .su-par {
    --su-par-value: 0;
    --su-par-max: 100;
    --su-par-at: calc(var(--su-par-max) / 2);
    --su-tone: var(--su-accent);
    display: grid; grid-template-columns: minmax(48px, 1fr); align-items: center; column-gap: var(--su-space-smd);
    min-width: 0;
  }
  .su-par__track {
    position: relative; grid-column: 1; height: 10px; margin-block: 4px;
    border-radius: var(--su-radius-round);
    background: color-mix(in srgb, var(--su-accent) 14%, var(--su-surface-quiet));
  }
  .su-par__fill {
    position: absolute; inset-block: 0; inset-inline-start: 0;
    width: clamp(0%, calc(var(--su-par-value) / var(--su-par-max) * 100%), 100%);
    border-radius: inherit;
    background: var(--su-tone);
  }
  .su-par__mark {
    position: absolute; inset-block: -4px;
    inset-inline-start: clamp(0%, calc(var(--su-par-at) / var(--su-par-max) * 100%), 100%);
    width: 2px; margin-inline-start: -1px; border-radius: 1px;
    background: var(--su-fg-secondary);
    box-shadow: 0 0 0 2px var(--su-surface-card);
  }
  .su-par__value {
    grid-column: 2; grid-row: 1; min-width: 2ch; text-align: end;
    font-size: var(--su-text-xl); line-height: var(--su-lh-md); font-weight: var(--su-weight-bold);
    font-variant-numeric: tabular-nums; color: var(--su-fg);
  }
  .su-par__scale {
    grid-column: 1; display: flex; justify-content: space-between; gap: var(--su-space-sm);
    font-size: var(--su-text-sm); line-height: var(--su-lh-sm); font-variant-numeric: tabular-nums;
    color: var(--su-fg-tertiary);
  }
  .su-par.is-good { --su-tone: var(--su-good); }
  .su-par.is-bad { --su-tone: var(--su-bad); }
  .su-par--plain { --su-tone: var(--su-fg-tertiary); }
  .su-par--plain .su-par__mark { display: none; }

  /* ---- The figure's card */
  .su-metric--tile {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--su-space-sm);
    min-width: 0; padding: var(--su-space-md);
  }
  .su-metric--tile .su-metric__k {
    display: flex; align-items: center; gap: var(--su-space-sm); margin: 0;
    font-family: var(--su-font-head); font-size: var(--su-text-md); line-height: var(--su-lh-md);
    font-weight: var(--su-weight-semibold); text-transform: none; letter-spacing: 0; color: var(--su-fg);
  }
  .su-metric--tile .su-metric__v {
    font-size: var(--ui-fs-value, var(--su-text-xxxl)); line-height: 1.05; letter-spacing: -0.02em;
    overflow-wrap: anywhere;
  }
  .su-metric--tile.su-metric--sm .su-metric__v { font-size: var(--su-text-xxxl); }
  .su-metric__delta {
    --su-tone: var(--su-fg);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px;
    font-size: var(--su-text-sm); line-height: var(--su-lh-sm); font-variant-numeric: tabular-nums;
    color: var(--su-fg-secondary);
  }
  .su-metric__delta > :is(b, strong) { font-size: var(--su-text-lg); font-weight: var(--su-weight-bold); color: var(--su-tone); }
  .su-metric__delta > .su-i { align-self: center; width: 1.3em; height: 1.3em; stroke-width: 2.6; color: var(--su-tone); }
  .su-metric__delta.is-good { --su-tone: var(--su-good); }
  .su-metric__delta.is-bad { --su-tone: var(--su-bad); }
  .su-metric__note { margin: 0; font-size: var(--su-text-xs); line-height: var(--su-lh-xs); color: var(--su-fg-tertiary); }
  .su-metric__foot {
    display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: var(--su-space-smd);
    border-top: var(--su-border-thin) solid var(--su-edge);
    font-size: var(--su-text-sm); line-height: var(--su-lh-sm); font-weight: var(--su-weight-semibold);
    color: var(--su-accent); text-decoration: none;
  }
  .su-metric__foot:hover { text-decoration: underline; text-underline-offset: 3px; }
  @media (pointer: coarse) {
    .su-metric__foot { min-height: 44px; }
  }

  /* A forced palette drops backgrounds, which would empty the bar: it keeps the system's own colours. */
  @media (forced-colors: active) {
    .su-par__track { forced-color-adjust: none; background: Canvas; outline: 1px solid CanvasText; }
    .su-par__fill { background: Highlight; }
    .su-par__mark { background: CanvasText; box-shadow: none; }
  }

  /* ---- Under Suntek Calm only (qa's review of slice 1) */
  :where([data-look="calm"]:not([data-ui-aliases="off"])) .su-seg > button[aria-pressed='true']:where(:not([data-ui-aliases="off"] *)) {
    background: var(--su-action-flat); color: var(--su-action-ink); box-shadow: none;
  }
  :where([data-look="calm"]:not([data-ui-aliases="off"])) .su-badge.is-good:where(:not([data-ui-aliases="off"] *)) { color: color-mix(in srgb, var(--su-good) 60%, var(--su-fg)); }
  :where([data-look="calm"]:not([data-ui-aliases="off"])) .su-badge.is-warn:where(:not([data-ui-aliases="off"] *)) { color: color-mix(in srgb, var(--su-warn) 60%, var(--su-fg)); }
  :where([data-look="calm"]:not([data-ui-aliases="off"])) .su-badge.is-bad:where(:not([data-ui-aliases="off"] *)) { color: color-mix(in srgb, var(--su-bad) 60%, var(--su-fg)); }
  :where([data-look="calm"]:not([data-ui-aliases="off"])) .su-badge.is-info:where(:not([data-ui-aliases="off"] *)) { color: color-mix(in srgb, var(--su-info) 60%, var(--su-fg)); }
}
