/* Social — shared design tokens.

   ONE LAW, ONE PALETTE — docs/design.md. This app shipped three visual laws
   and two palettes at once: a Plans day-cell inverted to #17181a while the tab
   bar under it drew #201e1d, and the plan panel's brass was #a8742f while the
   tab bar's was #b07b33. docs/design.md § THE GROUNDS, § THE ACCENT and
   § THE CATEGORIES are now the only place a role is named, and this file is
   the only place a role has a value.

   THE ROLES ARE APPLE'S, and the reason is structural rather than a taste: the
   app is built on MapKit and reads as a native iOS app, so the grounds are
   systemGroupedBackground, the accent is systemIndigo and every category hue
   is one Apple system colour — which is what lets a pin sit beside Apple Maps'
   own restaurant and bar pins without clashing.

   FOUR INK LEVELS, NOT THREE. The old law had three and the third was doing
   two jobs at once — carrying real information (times, prices, distances) and
   being the quiet decorative tone (separators, disabled) — so it was tuned for
   the wrong one. --ink-quiet carries information and never goes below the
   value below it; --ink-faint is never text a person is expected to read.

   NIGHT IS ON, AND IT FOLLOWS THE PHONE ([UI REBUILD 3] L8). The
   `[data-theme="night"]` block below is still a second derivation rather than
   an inversion, and it is still gated on the ATTRIBUTE ONLY — there is no
   `prefers-color-scheme` rule in this file. The phone's preference, and the
   Appearance choice in Settings that can overrule it, are read by
   src/lib/appearance.ts and by the inline script at the top of src/index.html,
   which turn them into that one attribute before the first paint. One
   attribute is still the whole switch; what changed is who flips it. */

:root {
  /* ==========================================================
     THE DAY PALETTE — the law's own hexes, and the only place
     a value lives. Every color in the app flows from these
     tokens; there are no hardcoded colors outside this block
     and its night twin.
     ========================================================== */

  /* page + surfaces

     THE GROUND (docs/mockups/redesign/new-look-frame/RULES.md § 1): --page with
     two faint glows in the corners, --ground-glow, drawn once behind every page
     by src/shell/frame.css. Words, pictures and controls sit straight on it.

     --surface, --surface-sunken, --border and --border-strong are the cards,
     wells and lines of pages not yet rebuilt in the new look; each page's own
     pass takes them off it. */
  /* THE UA'S OWN GROUND — scrollbars, form controls and the canvas behind the
     page follow the ground this block describes. */
  color-scheme: light;

  --page: #f2f2f7;            /* the ground, by day */
  --ground-glow:
    radial-gradient(ellipse 120% 46% at 18% -4%, rgba(176, 188, 236, 0.55), rgba(176, 188, 236, 0) 72%),
    radial-gradient(ellipse 100% 42% at 100% 96%, rgba(150, 140, 246, 0.42), rgba(150, 140, 246, 0) 72%);
  --surface: #ffffff;         /* cards, list rows */
  --surface-sunken: #e0e3ec;  /* inputs, wells inside cards */
  --border: #d6dae4;          /* visible card and input borders */
  --border-strong: #9aa0ae;   /* hairlines that must read as lines: day
                                 dividers, the calendar grid, table rules */

  /* ink — four levels, each with one job, darkest to lightest. The top level
     is the frame's ink (new-look-frame/RULES.md § 2): near-black by day, white
     at night. The two middle levels clear 4.5:1 on --page, --surface and
     --surface-sunken. */
  --ink: #0b0b0f;             /* titles, and what a person came to read */
  --ink-soft: #3c3c43;        /* venue lines, sub-copy, second lines */
  --ink-quiet: #5c5c66;       /* times, prices, distances, section labels —
                                 CARRIES INFORMATION, never taken lower */
  --ink-faint: #b2b7c3;       /* separators, disabled, decoration — NEVER
                                 text a person is expected to read */

  /* indigo brand — systemIndigo, and it does exactly one job: it marks what
     is yours and what is live. Brass is retired, for a structural reason
     worth recording: Apple Maps' ground is a warm pale beige and brass is the
     same family, so a brass pin sank into the terrain instead of sitting on
     it — and brass was also Music's category hue, so selection and "this is a
     concert" said the same thing. */
  --brand: #5856d6;           /* primary action, current tab, selection, links */
  --brand-strong: #4a48c4;    /* hover / pressed / text-on-light accents */
  /* THE FILL BEHIND WHITE WORDS — [UI REBUILD 3] L8. On day it IS --brand. On
     night --brand is lifted to read as ink on black, and white on it measures
     3.53:1; where a fill carries a literal white word (a selected cell, a
     badge, a primary press typed before night existed) it wears this instead,
     Apple's own dark systemIndigo, where white reads 5.06:1. A fill whose word
     is --surface keeps --brand, which is § THE ACCENT's rule and reads 4.82:1. */
  --brand-fill: var(--brand);

  /* status */
  --accent: #ff453a;          /* red: the bell's dot, an alert dot, the NEW tag */
  --ok: #34c759;              /* success confirmations, free shows */

  /* GOLD, AND IT IS A REAL COLOUR NOW. The golden ticket's gold was DERIVED
     from --brand — `color-mix(in srgb, var(--brand) 76%, var(--surface))`, in
     src/social.css and again in src/feed.css. That worked while --brand was
     brass: mixing brass toward white gives leaf. --brand is indigo, and mixing
     indigo toward white gives LAVENDER, so every golden ticket in the app has
     been shipping pale purple. A ticket that is not golden is a bug in the one
     object whose entire meaning is its colour, so the gold stops being a
     function of the accent and becomes a value of its own — which is also what
     stops the next re-hue of --brand from repainting it again.

     It is a leaf gold rather than a metallic yellow: it carries text on the
     feed card's dark ground and sits on Apple Maps' warm beige without sinking
     into it, which is the same argument that retired brass. */
  --gold: #c9922f;            /* the golden ticket, and nothing else */

  /* cold — the one COOL color, and it names one idea: ground with nobody on
     it. It is the parked Warmer demo's (parked/warmer/), which washes the
     basemap in it and paints its quietest districts with it; heat stays
     --brand's, because a person is warmth. Nothing in the app draws with it. Deliberately a slate BLUE and not a teal: --ok is what this app
     spends on a FRIEND, and cold that could be mistaken at a glance for
     somebody you know would be a bug rather than a style. It is its own
     token instead of a borrowed category hue for the reason the group below
     states — those are read through src/lib/categories.ts and mean a KIND OF
     EVENT, so a re-hue there must never repaint the map.

     UNCHANGED BY THE PALETTE PASS. Everything around it got warmer or louder;
     this one did not move, because its whole job is to be the temperature
     nothing is happening at. */
  --cold: #4a6fa5;

  /* category hues — read through src/lib/categories.ts, which is the one list
     mapping category ids onto these. [UI REBUILD 3] L19 — docs/design-system/
     event-types.md — made it TWELVE categories, one hue each; [UI REBUILD 3]
     L31 re-cut all twelve (docs/mockups/event-colours/README.md rule 1, the
     owner's ruling of Sep 29 2026) so that NO TWO LOOK ALIKE — OKLab distance
     x100, 16.2 or more apart in each theme and 7.0 or more under red-green
     colour blindness; tests/event-colours-apart.spec.ts reads these twelve and
     fails under 15 and under 6. They are no longer Apple's system hues (the
     old Music and Sports were 4.5 apart), and none sits on the app's indigo,
     its alert red or its success green.
     Where a category hue may appear: the map pin, its glyph, a card's tag dot,
     a filter chip's dot — and the three surfaces the owner chose to tint (the
     Events shelf card, the day rail, the Feed poster). Never a button, a card
     fill elsewhere, a header or a selected state, because a category is
     information and not emphasis. NO EVENT TYPE IS EVER GRAY. */
  --cat-music: #e41b70;       /* pink */
  --cat-nightlife: #b432db;   /* purple */
  --cat-comedy: #fbde5c;      /* yellow — takes DARK ink; white on yellow
                                 fails contrast on both grounds */
  --cat-theater: #990045;     /* wine red */
  --cat-arts: #a45c04;        /* bronze — the glyph is museum columns */
  --cat-sports: #1e9cff;      /* blue — was the alert red before L31 */
  --cat-food: #f67808;        /* orange */
  --cat-festival: #88d326;    /* lime — takes over the tent glyph from the
                                 retired 'market' */
  --cat-attraction: #7bd0fe;  /* sky blue — no longer --cat-water's hue */
  --cat-family: #008149;      /* green — no longer --ok's or --cat-games' hue */
  --cat-fitness: #15ba9d;     /* teal */
  --cat-other: #5b759d;       /* slate blue, OFF GRAY. CATEGORY_LIST's 'other'
                                 entry points here, not at --ink-soft. */
  --cat-market: #30b0c7;      /* RETIRED, L19. 'market' is no longer a chip
                                 CATEGORY_LIST enumerates; an existing
                                 market-tagged row still resolves through
                                 categoryStyle('market'), which draws it
                                 exactly as --cat-festival above. This token
                                 stays declared, at its old value, for a reader
                                 who still holds the word — delete nothing. */

  /* PARKED — the bars layer's own two, untouched by L19 and L31. Not event
     types; see docs/design-system/app-rules.md § THE CATEGORIES. */
  --cat-water: #32ade6;       /* systemCyan */
  --cat-games: #34c759;       /* systemGreen */

  /* ── GLYPH INK — docs/mockups/event-colours/README.md rule 1's brackets ──
     The colour a category GLYPH draws in when it sits ON that category's own
     FILL (a map pin, its cluster badge, the event page's pin) — never on a
     card or a chip, where the glyph takes the category colour itself (see the
     note above). Every category gets its own token, even where the value
     repeats, so a hue that darkens or lightens between day and night can
     flip its ink without touching a second category's. Each clears 3:1 on its
     own pin (the lowest is Music by day, 4.48:1). */
  --cat-ink-music: #ffffff;
  --cat-ink-nightlife: #ffffff;
  --cat-ink-comedy: #0b1017;
  --cat-ink-theater: #ffffff;
  --cat-ink-arts: #ffffff;
  --cat-ink-sports: #0b1017;
  --cat-ink-food: #0b1017;
  --cat-ink-festival: #0b1017;
  --cat-ink-attraction: #0b1017;
  --cat-ink-family: #ffffff;
  --cat-ink-fitness: #0b1017;
  --cat-ink-other: #ffffff;

  /* the one shadow: soft ink, for cards and raised menus */
  --shadow: rgba(45, 43, 43, 0.12);

  /* type — SAN FRANCISCO, VIA THE SYSTEM STACK, and it is the one face here
     that is loaded by not being loaded. docs/design.md § TYPE has said so
     since the law was written — "A custom face is the loudest single tell
     that an app is not native" — while this file went on declaring Archivo
     and the shell went on fetching it from Google Fonts. Both loads are gone.

     THE THREE NAMES STAY, because they carry 230 declarations between them
     and renaming buys churn. All three resolve to ONE stack, the law's own
     character for character, and what they mean is a ROLE and not a face:

       --font-display  the poster voice. WEIGHT is what makes a display line
                       now, and the weight is written at every site already.
       --font-body     running text, and the app's default.
       --font-mono     TABULAR, NOT A SECOND FACE — the places whose subject
                       is a NUMBER, which is why the rules reading it carry
                       font-variant-numeric. Nothing in this app wants a
                       fixed advance, and the retired chain gave none either:
                       it began 'Archivo', so ui-monospace was never reached.

     NO "SF Pro Display" FOR THE DISPLAY TOKEN, and no variable-axis settings
     anywhere. Those are the retired discrete optical cuts; modern SF is one
     variable face that interpolates optical size from the point size, and
     naming a cut — or an axis — fights it. */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  /* 8px spacing grid */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;

  --radius: 6px;
  --radius-lg: 10px;
  --touch: 48px; /* minimum touch target */

  /* The bottom bar's row of tabs, EXCLUDING its 1px hairline and the safe-area
     strip beneath it: the bar is 50 high with the hairline, 84 on a 390 by 844
     phone. A token rather than a number, because the bar's own box, every
     page's bottom run-off and every full-height room's last band agree on it. */
  --tabbar-h: 49px;
  /* ── THE BUILDING BLOCKS — [UI REBUILD 3] L21 ────────────────────────────
     docs/design-system/tokens.json, blessed by the owner Sep 25 2026. The
     sixteen names that system uses and this sheet did not declare yet, at its
     values; src/blocks.css is what spends them. Two spellings stay the app's
     own (--cat-ink-<word>, --font-body). ONE NAME MOVED: the system's `pin`
     is --pin-h here, because --pin is already the per-pin COLOUR custom
     property (.map-pin's `var(--pin, var(--ink-soft))`) and a length declared
     under that name on :root would blank every pin that sets no colour of its
     own, clusters first. */
  --accent-ink: #d70015;      /* red as TEXT: errors, the destructive label */
  --on-brand: #ffffff;        /* words and icons on --brand-fill */
  --brand-soft: #5856d62e;    /* indigo at 18%: the wash behind an indigo word */
  --s-half: 4px;              /* inside a segmented track; dot to its word */
  --radius-card: 13px;        /* form cards and sheets */
  --radius-field-multi: 22px; /* a field that grows past one line */
  --radius-pill: 9999px;      /* every field, button, chip and segment */
  --field-h: 50px;
  --field-h-compact: 44px;
  --button-h: 44px;
  --button-h-lg: 52px;
  --chip-h: 36px;
  --pin-h: 36px;              /* the system's `pin` — see the note above */
  --shadow-card: 0 1px 3px #2d2b2b1f;
  --shadow-pin: 0 1px 3px #00000059;
  /* THE ONE FOCUS RING. A 1px --brand-strong line and a 4px indigo halo
     beyond it, drawn as a shadow so it follows a pill all the way round. No
     other stylesheet types a ring value (tests/focus-ring-guard.spec.ts).
     --focus-ring-inset is the same line drawn INSIDE the box, for a row that
     sits flush in a scroller, where an outward ring would be cut. */
  --focus-ring: 0 0 0 1px #4a48c4, 0 0 0 5px #5856d638;
  --focus-ring-inset: inset 0 0 0 2px #4a48c4;

  /* ── THE REDESIGN BOARDS' TOKENS — [UI REBUILD 3] L33 ────────────────────
     docs/design-system/tokens.json, Sep 30 2026: the values the owner's
     approved boards (docs/mockups/redesign/) draw that the sheet did not
     declare. NOTHING SPENDS THEM YET and no existing value moved; the four
     build passes (the frame, the Feed, Events, Friends) are what use them.
     `--dot` and the face sizes are lengths under the system's own names; none
     of them collides with a name a stylesheet already reads. The scrim is
     --sheet-scrim and not --scrim because src/tonight.css reads
     var(--scrim, …) with a fallback of its own. */
  --ok-ink: #1f6d33;          /* green as text: Free, In */
  --gold-ink: #8a5f00;        /* gold as text, and the gold button's word and tint */
  --gold-text: #6e4a00;       /* the gold word on its own tint or a sheet by day: 4.5:1 and over */
  --on-gold: #0b1017;         /* the label on the gold-filled button */
  --sheet-scrim: #0000006b;   /* black at 42% behind a sheet, in both themes */
  --pill-tint: #ffffffc7;     /* surface at 78%: a pill laid over a picture */
  --shadow-pane: 0 6px 20px #2d2b2b1f;
  --shadow-sheet: 0 -6px 24px #0b10172e;
  --shadow-menu: 0 6px 24px #0b10172e;
  --shadow-fab: 0 6px 20px #2d2b2b38;
  --appbar-h: 44px;
  --tab-glyph: 26px;
  --progress-h: 3px;
  --badge-size: 20px;
  --close-glyph: 22px;
  --face-xs: 24px;
  --face-sm: 32px;
  --face-md: 40px;
  --face: 48px;
  --face-lg: 64px;
  --face-xl: 96px;
  --thumb-sm: 36px;
  --thumb: 48px;
  --dot: 10px;
  --story-ring: 2.5px;
  --button-h-sm: 36px;
  --bubble-max: 270px;
  --radius-bubble: 18px;
  --radius-bubble-tail: 4px;
  --s1-half: 12px;
  --s2-half: 20px;
  --opacity-disabled: 0.4;

  /* ── THE FRAME AND THE BLOCKS — [UI REBUILD 3] L34 ───────────────────────
     tokens.json, Sep 30 2026. --on-fill is white on a filled red or green disc
     (the bell's count, the Posted check) and the Switch's knob, the same in
     both themes, so the frame and the blocks type no literal colour. The
     Switch's three sizes are iOS's own switch (screens.md, THE FEED). */
  --on-fill: #ffffff;
  --switch-w: 51px;
  --switch-h: 31px;
  --switch-knob: 27px;
  --shadow-knob: 0 2px 6px #0000004d;   /* the Switch's knob */

  /* ── MOTION — [UI REBUILD 3] L71 ─────────────────────────────────────────
     app-rules.md § MOTION's four curves, declared for the first time (L69-043:
     src/map-card.css read --ease-snap with no declaration, so the picked pin's
     transition was invalid). Each is a curve only; the duration is the rule's.
     The same in both themes. */
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);       /* 200ms, taps and selection */
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);      /* 380ms, sheets and detents */
  --ease-settle: cubic-bezier(0.33, 1.14, 0.62, 1);  /* 220ms, the feed's spring */
  --ease-fly: cubic-bezier(0.22, 0.61, 0.36, 1);     /* 300ms, the feed's exit */

  /* ── THE PRIVATE GREY — [UI REBUILD 3] L85 ───────────────────────────────
     docs/mockups/redesign/whos-going/ (RULES.md § 2): a pressed answer only you
     will see — Going, Maybe or Here kept private, the Feed's private Going and
     its stamps — with white words (--on-fill) on it: 5.93:1 by day; night has
     its own, below. */
  --private-fill: #5f6470;

  /* ── THE NEW LOOK'S FRAME AND GLASS ──────────────────────────────────────
     docs/mockups/redesign/new-look-frame/RULES.md, with the boards' own values.

     THE FRAME (§§ 2, 3). The top row has no bar: bare --bar-glyph glyphs on the
     ground. The bottom bar is solid --bar with one --bar-line hairline on top;
     the tab you are on is --ink, the others --tab-off. */
  --bar: #f7f7fa;
  --bar-line: #0000001a;      /* black at 10% */
  --tab-off: #85858d;
  --bar-glyph: 24px;

  /* TEXT (§ 4): six sizes and no other. 34 the one thing a page is about, 22
     the second thing and a sheet's title, 17 a row's title, a button's word and
     anything typed, 15 a supporting line, 13 a label, a caption or a note, 11
     only under a glyph. */
  --type-34: 34px;
  --type-22: 22px;
  --type-17: 17px;
  --type-15: 15px;
  --type-13: 13px;
  --type-11: 11px;

  /* GLASS (§ 6) is for controls on a page and for sheets, never the frame.
     A control: --glass with a --glass-edge line, --glass-shadow and --glass-blur.
     A sheet and an action menu: the --glass-sheet set. A control on a picture:
     --glass-dark with white words, the same in both themes. */
  --glass: #ffffffb3;         /* white at 70% */
  --glass-edge: #ffffffeb;    /* white at 92% */
  --glass-shadow: 0 14px 40px rgba(30, 30, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-blur: blur(30px) saturate(170%);
  --glass-sheet: #ffffff99;   /* white at 60% */
  --glass-sheet-edge: #ffffffeb;
  --glass-sheet-shadow: 0 14px 40px rgba(30, 30, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-sheet-blur: blur(40px) saturate(170%);
  --glass-dark: #14141a94;    /* rgb(20 20 26) at 58% */
  --glass-dark-edge: #ffffff38; /* white at 22% */
  --glass-dark-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 22px rgba(0, 0, 0, 0.3);
  /* A FILLED CONTROL (§ 7): tapped is --brand-fill, kept private is
     --private-fill; both carry white words, this edge and this shadow. */
  --fill-edge: #ffffff38;     /* white at 22% */
  --fill-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 26px rgba(0, 0, 0, 0.28);
  /* A QUIET GROUP (§ 8): the rows of a sheet, a chip that is off, a segmented
     track, a search field. --hairline is the line between two rows. */
  --group: #ffffffa8;         /* white at 66% */
  --group-edge: #fffffff2;    /* white at 95% */
  --hairline: #00000017;      /* black at 9% */
  --grab: #0b0b0f33;          /* a sheet's grab bar: ink at 20% */
  --radius-sheet: 30px;       /* a sheet's top corners, an action menu's card */
  --radius-group: 18px;       /* a quiet group */
  --radius-picture: 20px;     /* a picture: a show's photo or place, a clip's film */
  --radius-option: 24px;      /* a glass option: one of This or that's two rows */

  /* The bar treatment, shared by the app bar and the tab bar so the two edges
     of the app match: the page color, thinned, with a blur behind it where
     the browser supports one. color-mix rather than a fifth surface hex —
     this file's no-hardcoded-color contract holds. */
  /* The frame does not read it: the top row has no bar and the bottom bar is
     solid --bar (src/shell/frame.css). The Map's floating pieces and the pull's
     pill still do. */
  --bar-bg: color-mix(in srgb, var(--page) 88%, transparent);

  /* ── THE DARK GROUND — the poster's own, and it does not follow the theme ──
     docs/design.md § THE GROUNDS, THE DARK GROUND. The two POSTER surfaces —
     the feed's stream and the Plans day view's part stack, one card component
     between them — are drawn on the NIGHT ground whichever theme the html
     attribute names: the card is the screen and the chrome floats over it. So
     their roles are declared ONCE, here, at the night table's values to the
     hex, and are NOT restated in the night block below, because a ground that
     does not follow the theme has no second value to restate. Eight roles —
     the night ground's four levels and its four inks — under a prefix of their
     own, so a poster rule can never be reading the page's ground by accident
     and a page rule can never be reading the poster's. tests/design-law.spec.ts
     reads each value out of the law's own table and asserts it here and
     nowhere else. RETIRED FOR THE FEED POSTER (L31 note): the Feed follows the
     theme now and src/feed.css no longer spends them; src/story.css does. */
  --poster-page: #000000;
  --poster-surface: #1c1c1e;
  --poster-surface-sunken: #2c2c2e;
  --poster-border: #48484d;
  --poster-ink: #ffffff;
  --poster-ink-soft: #b3b3b8;
  --poster-ink-quiet: #77777c;
  --poster-ink-faint: #48484d;
}

/* ── NIGHT ─────────────────────────────────────────────────────────────────
   A second derivation, not an inversion: the same value reads darker against
   a dark ground, so every level is re-picked rather than flipped. Gated on the
   attribute ALONE, which src/shell/appearance.ts sets from the Appearance choice
   (Match phone / Light / Dark) — see the header.

   Only the ROLES that change are restated. --cold, --shadow, the faces, the
   steps, the radii, the type sizes and the bar heights are ground-independent
   and are declared once, above.

   The ground is the new look's near-black (new-look-frame/RULES.md § 1), and
   the two middle inks are the boards' own: --ink-soft reads 12.5:1 and
   --ink-quiet 8.9:1 on it. */

[data-theme="night"] {
  color-scheme: dark;

  --page: #0a0a0c;
  --ground-glow:
    radial-gradient(ellipse 120% 46% at 18% -4%, rgba(86, 98, 196, 0.26), rgba(86, 98, 196, 0) 72%),
    radial-gradient(ellipse 100% 42% at 100% 96%, rgba(104, 92, 236, 0.34), rgba(104, 92, 236, 0) 72%);
  --surface: #1c1c1e;
  --surface-sunken: #2c2c2e;
  --border: #48484d;

  --ink: #ffffff;
  --ink-soft: #cdcdd3;
  --ink-quiet: #adadb5;
  --ink-faint: #48484d;

  --brand: #7d7bef;
  --brand-strong: #8f8df5;
  --brand-fill: #5e5ce6;
  /* The private grey at night: white words on it read 5.07:1. */
  --private-fill: #6e6e73;

  /* THE LINE THAT MUST READ AS A LINE, re-picked for black. The day value
     (#9aa0ae) is a bright rule on a dark page — every bar edge, chip rim and
     field outline turned into a glare. #5a5a5f reads as a line on black and on
     --surface without shouting, and stays a step above --border. */
  --border-strong: #5a5a5f;

  --accent: #ff453a;
  --ok: #30d158;

  /* Lifted on black, like every other pigment here — the day value reads as
     brown against the night ground rather than as gold. */
  --gold: #e0b45c;

  /* L31 — docs/mockups/event-colours/README.md rule 1. Night keeps its own
     twelve values; it is not the day colours inverted. */
  --cat-music: #ff35a1;
  --cat-nightlife: #ab37f6;
  --cat-comedy: #ffef90;
  --cat-theater: #a64e7d;
  --cat-arts: #a97101;
  --cat-sports: #128dbf;
  --cat-food: #ff8f4b;
  --cat-festival: #8ae838;
  --cat-attraction: #87f1ff;
  --cat-family: #099352;
  --cat-fitness: #09cda5;
  --cat-other: #9faafd;
  --cat-market: #40c8e0;      /* RETIRED, L19 — see the day block's note */

  /* PARKED — untouched by L19 and L31. */
  --cat-water: #64d2ff;
  --cat-games: #30d158;

  /* GLYPH INK — rule 1's brackets, night column. Four differ from the day ink
     (music, arts, family and other go from white to dark as their fill
     lightens); the other eight repeat it. */
  --cat-ink-music: #0b1017;
  --cat-ink-nightlife: #ffffff;
  --cat-ink-comedy: #0b1017;
  --cat-ink-theater: #ffffff;
  --cat-ink-arts: #0b1017;
  --cat-ink-sports: #0b1017;
  --cat-ink-food: #0b1017;
  --cat-ink-festival: #0b1017;
  --cat-ink-attraction: #0b1017;
  --cat-ink-family: #0b1017;
  --cat-ink-fitness: #0b1017;
  --cat-ink-other: #0b1017;
  /* THE BUILDING BLOCKS' NIGHT VALUES — L21, tokens.json's dark column.
     Only the ones that differ; --on-brand, the sizes, the radii and the two
     shadows are ground-independent and live above. */
  --accent-ink: #ff6961;
  --brand-soft: #5e5ce62e;
  --focus-ring: 0 0 0 1px #8f8df5, 0 0 0 5px #7d7bef47;
  --focus-ring-inset: inset 0 0 0 2px #8f8df5;
  /* THE REDESIGN BOARDS' NIGHT VALUES — L33, tokens.json's dark column. Only
     the ones that differ from day. The boards are day-only; night follows the
     system's night values. */
  --ok-ink: #30d158;
  --gold-ink: #f2c14e;
  --gold-text: #f2c14e;
  --pill-tint: #1c1c1ec7;
  --shadow-pane: 0 6px 20px #00000080;
  --shadow-sheet: 0 -6px 24px #00000080;
  --shadow-menu: 0 6px 24px #00000080;
  --shadow-fab: 0 6px 20px #00000080;

  /* THE NEW LOOK'S FRAME AND GLASS, at night: only the values that differ. */
  --bar: #0a0a0c;
  --bar-line: #ffffff1f;      /* white at 12% */
  --tab-off: #8e8e96;
  --glass: #ffffff21;         /* white at 13% */
  --glass-edge: #ffffff33;    /* white at 20% */
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 30px rgba(0, 0, 0, 0.3);
  --glass-sheet: #7c7c8642;   /* rgb(124 124 134) at 26% */
  --glass-sheet-edge: #ffffff33;
  --glass-sheet-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 48px rgba(0, 0, 0, 0.34);
  --group: #ffffff12;         /* white at 7% */
  --group-edge: #ffffff1f;    /* white at 12% */
  --hairline: #ffffff24;      /* white at 14% */
  --grab: #ffffff57;          /* white at 34% */
}

/* ── REDUCED TRANSPARENCY: THE MATERIAL GETS ITS OPAQUE TWIN ─────────────
   docs/design.md § THE MATERIAL: "Every glass token has an opaque twin and it
   is not optional." We cannot read iOS's transparency slider, so a reader who
   has turned it down gets the ground itself rather than a thinned one. The
   BLUR is not touched here and that is deliberate: three specs assert
   `backdrop-filter: blur(10px)` verbatim against the sheets that declare it,
   and dropping the filter is that pass's work rather than this one's. */

@media (prefers-reduced-transparency: reduce) {
  :root {
    --bar-bg: var(--page);
    --pill-tint: var(--surface);
  }
}

/* ── INCREASED CONTRAST ─────────────────────────────────────────────────
   Two roles move and no third: the hairline becomes the one that reads as a
   line, and the quiet level gives up being quiet. On the night ground that is
   a straight lift (--ink-soft is the lighter of the two against black); on
   day the two sit within 15 points of each other, so it is a small move
   rather than a dramatic one — the level that carries information is already
   the darker of the pair by the law's own tuning.
   L71: since the day values swapped, --ink-soft is the higher-contrast of the
   two by day as well as at night, so this rule lifts --ink-quiet on both. */

@media (prefers-contrast: more) {
  :root {
    --border: var(--border-strong);
    --ink-quiet: var(--ink-soft);
  }
}

/* --- reduced motion: disable every animation --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
