/* ============================================================================
   Fuse Wallet Studio — styles.css

   The token block below takes its values from the Fuse Design System in
   Figma, read verbatim into scripts/fixtures/figma-tokens.json. Until 19
   October 2026 it was a copy of the client hub's (clients-fuse-cx/assets/
   portal.css). Figma replaced the hub as the source, so the two products now
   drift unless the hub is moved too -- and nothing in this repository can
   catch that any more.

   scripts/test-design-system.js holds every token in its FROM_FIGMA map to the
   fixture's value, and every other token must be declared in STUDIO_OWN with
   the reason Figma does not supply it. The file declares colours and text
   styles only, so radius and layout were MEASURED off its eight studio
   screens. docs/design/figma-token-mapping.md is the mapping, and the seven
   findings behind the tokens that deliberately do not follow the file.

   What the hub had and the studio never carried is recorded at the foot of
   this file.
   ========================================================================= */

/* ── Fonts, self-hosted ──────────────────────────────────────────────────
   The hub loads these from Google Fonts. This surface does not, for the
   reason the hub itself gives at common.mjs:200 when it inlines its logo:
   remove the outbound request from a gated page. It also means studioCsp()
   needs no font-src -- these are 'self', which default-src already allows.

   One file per family. Google now serves both as variable fonts, so the four
   Inter weights and the two mono weights were six requests for two files. */
@font-face {
  font-family: Inter;
  src: url("fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* UX-95. THE STUDIO'S SPACING AND RADIUS SCALE.
   Sixty-four distinct padding declarations and twenty-two distinct gaps --
   13, 14, 15 and 17px side by side -- because every panel was spaced by eye.
   Declared on body, not :root, because :root is the parity surface that
   test-design-system.js holds to the Figma file declaration by declaration, and
   Figma declares no spacing; these are the studio's own and cascade to
   everything in it. The Figma screens space on the same steps (2 to 32px)
   plus 40px, which --pad carries. --radius-sm was used by
   two rules and defined nowhere, so they drew square corners; it is defined
   here. The phone mock keeps its literal sizes, which are Apple's and Google's
   proportions scaled as one. */
body {
  --s-0: 2px; --s-1: 4px; --s-2: 6px; --s-3: 8px; --s-4: 12px;
  --s-5: 16px; --s-6: 20px; --s-7: 24px; --s-8: 32px; --s-9: 48px;
  --radius-sm: 4px;
  --radius-pill: 100px;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Colour: Figma variables, `Fuse / Color` ───────────────────────── */
  --ink:        #0e142b;   /* color/deep-dark-blue */
  --ink-soft:   #1a2140;   /* color/ink-soft */
  --ink-lift:   #121e2a;   /* a panel ON ink, one step up, not a border. Figma has none */
  --canvas:     #ffffff;   /* color/white, the page ground */
  --white:      #ffffff;   /* color/white */
  --tint:       #f3f6f9;   /* color/grey-tint, the ONLY soft fill: hovers and inset strips */
  --blue:       #00bdf2;   /* color/accent-blue. 2.20:1 on white, INK GROUNDS ONLY, see --focus */
  --blue-hover: #00a8d8;   /* color/blue-hover. Still carries ink text, 6.58:1 */
  /* NOT in Figma, and the reason it stays (finding F2): nothing blue in the
     file can carry text or a focus ring on white -- accent-blue is 2.20:1 there.
     --blue-deep was darkened to #056a99 (5.95:1 on white) to meet BR-NF9 /
     TR-F6, and the Figma screens avoid needing it only by setting links in ink
     with a blue arrow. Keep it until the file adds a text-safe blue. */
  --blue-deep:  #056a99;
  --muted:      #4a5568;   /* color/dark-grey. 7.53:1 on white, 6.94:1 on --tint */
  --muted-lift: #a0aec0;   /* color/mid-grey, for ink grounds. 8.07:1 on ink, 2.26:1 on white */
  /* NOTE the direction of that rule, which the hub learned the hard way:
     darkening the light-ground grey made it FAIL on ink. --muted is 2.42:1 on
     ink now. Anything on an ink ground takes --muted-lift, and that includes
     the rail's own class names (.module-rail__user-org, .module-rail a .count),
     not just .on-ink. And --muted-lift is NEVER text on white (finding F4),
     though the Figma screens use mid-grey that way. */

  /* The focus ring is a NON-TEXT indicator: SC 1.4.11 wants 3:1 against the
     ground it sits on, and one value cannot serve both grounds. --blue is 8.29:1
     on ink and 2.20:1 on white, so the ring takes --blue-deep on the white
     workspace, where every row and link lives. Custom properties inherit, so
     `.on-ink` overriding this one token is enough and :focus-visible stays a
     single rule. */
  --focus:      var(--blue-deep);
  /* The card hairline: soft-grey, 1px, on every card on the Figma screens.
     A container edge at 1.19:1 -- it is seen as a boundary between white
     boxes, and it cannot carry a control's own edge, which is --line-strong. */
  --line:       #e6ecf2;   /* color/soft-grey */
  /* 3.37:1 on white, so it satisfies SC 1.4.11 for a control's own boundary.
     The Figma screens draw inputs in mid-grey, which is 2.26:1 and fails it
     (finding F3), so this stays the studio's. Declared as a hex rather than an
     alpha so the contrast guard can measure it. */
  --line-strong: #848d95;
  --line-soft:  rgba(14, 20, 43, .09);
  --line-dark:  rgba(255, 255, 255, .12);
  --ease:       cubic-bezier(.16, 1, .3, 1);
  /* Not a Figma colour: the error and destructive text. color/ruby-text is
     5.65:1 on white; sharp-ruby (2.94:1) is a fill, not text. */
  --danger-text: #c42b20;  /* color/ruby-text */

  /* ── RAG ───────────────────────────────────────────────────────────
     BR-NF9 needs three delivery states. Green and red are Figma variables;
     amber is the paint style `Fuse - Orange`, which the file never made a
     variable. --rag-amber is confined to .rag, and anywhere else is a bug.
     All three carry INK text: green-light is 1.76:1 on white, so it is a fill
     or a dot and never a word on a light ground. */
  --rag-green:  #2ddd9d;   /* color/green-light */
  --rag-amber:  #ff9501;   /* paint style Fuse - Orange */
  --rag-red:    #ff6257;   /* color/sharp-ruby */

  /* The person's avatar in the top bar. A paint style, not a variable, in the
     file. It carries INK text, 4.72:1; Figma's white is 3.86:1 (finding F9). */
  --spark:      #7c6cff;   /* paint style Fuse - Purple Spark */

  /* The four surfaces, as Figma's Create by surface edges its cards: Braze
     purple, QR and print green, NFC orange, links yellow. Edges only -- the
     card's name carries the surface, so these are decoration and never text.
     NFC is not --rag-amber though it is the same paint: that token is
     confined to .rag, and a guard holds it there. */
  --surface-braze: #7c6cff;   /* paint style Fuse - Purple Spark */
  --surface-qr:    #2ddd9d;   /* color/green-light */
  --surface-nfc:   #ff9501;   /* paint style Fuse - Orange */
  --surface-link:  #f8e53a;   /* paint style Fuse Yellow */

  /* ── Type: Figma text styles, as the eight FW_ screens use them ─────
     The file's marketing scale (Display 120px to H4 48px) is for a hero, and
     only H4 and H5 reach a work surface: H5 is the page title and H4 is the
     KPI figure on every screen. Figma also declares `Wallet/Page title` at
     24/32, which no screen uses (finding F7); the screens win. */
  --t-name:     36px;   /* Fuse H5, 36/48 700, the page title           */
  --t-value:    48px;   /* Fuse H4, 48/56 700, the KPI figure           */
  --t-title:    20px;   /* Fuse H6, 20/26 700, a section heading        */
  --t-lede:     16px;   /* Fuse Body | S | Reg, 16/24 400               */
  --t-card:     16px;   /* Fuse Body | S | Bold, 16/22 700, card title  */
  --t-body:     14px;   /* Fuse Body | Xs | Reg, 14/20 400              */
  --t-eyebrow:  12px;   /* Fuse Eyebrow, 12 700, upper, .04em           */
  --t-micro:    12px;   /* Fuse Body | Xxs, 12/20 500                   */
  /* NOT in Figma (finding F5): the file has no monospace, and sets ids in
     Inter 12. The studio keeps mono for ids and data cells only, because
     dropping it loses the aligned figures in every table. */
  --t-data:     13px;   /* mono, tabular-nums */

  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Layout: MEASURED off the FW_ screens, because Figma declares none ──
     A measured figure is a reading of a mock, not a rule. If the file ever
     declares a radius or a spacing variable, it moves into FROM_FIGMA. */
  --radius:     12px;   /* every metric and feature card */
  --radius-lg:  16px;   /* the large panels: routes, the campaign list */
  --radius-md:  8px;    /* nav items and tables */
  /* 260px on all eight screens. The `Side nav` component is 300px, and one of
     the two is stale (finding F6); the screens are what was designed against. */
  --rail:       260px;
  --rail-w:     var(--rail);   /* what the grid reads; the toggle swaps it */
  --gap:        16px;   /* between cards */
  --pad:        40px;   /* from the rail to the content */
  /* The reading measure. It caps CONTENT, never a ground -- see .main. The
     screens' content is 1100px in a 1440px frame and declare no cap. */
  --measure:    1180px;
  /* Clean boxes: the edge is a hairline, not a drop shadow, which the Figma
     cards keep. The only lift left is on overlays. */
  --lift:       0 12px 34px -12px rgba(14, 20, 43, .28);
  /* The select on the screens is 44px tall; an input lines up with it in a
     .form-row. */
  --field-h:    44px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.43;   /* Fuse Body | Xs | Reg: 14 on 20 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue); color: var(--ink); }
/* .field is display:flex, which beats the hidden attribute's UA display:none.
   The engage page's customer picker is shown and hidden with that attribute,
   so without this it is permanently visible. */
[hidden] { display: none !important; }

/* Every figure that sits in a column lines up. Hours, dates, currency. */
 .cell__value, .table td { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }
/* The ink shell takes the blue back: on ink it is 8.29:1, and a dark ring on a
   dark ground would be the same mistake in the other direction. */
.on-ink, .module-rail, .app-header, .toast { --focus: var(--blue); }

/* ── Type ──────────────────────────────────────────────────────────────────
   Figma's text styles carry no tracking at these sizes, and every heading on
   the FW_ screens is 700. Line heights are the styles' own: H5 36/48, H6
   20/26, Body S Bold 16/22. */
h1 { font-size: var(--t-name); font-weight: 700; letter-spacing: 0; line-height: 1.33; }
h2 { font-size: var(--t-title); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
h3 { font-size: var(--t-card); font-weight: 700; letter-spacing: 0; line-height: 1.375; }
p  { color: var(--muted); }

/* Inter, not mono (finding F5): `Fuse Eyebrow` is 12px 700 upper at 4%. Mono
   is kept for ids and data cells, where the figures have to line up; an
   eyebrow is a label, and nothing aligns on it. */
.eyebrow {
  font-family: var(--font);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.data { font-family: var(--mono); font-size: var(--t-data); color: var(--muted); }
.muted { color: var(--muted); }
.on-ink .eyebrow, .on-ink .data { color: var(--muted-lift); }

/* ── Containers ────────────────────────────────────────────────────────── */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-6) var(--s-7);
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-2) var(--s-6);
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel__head .eyebrow { white-space: nowrap; }
/* A panel whose children are a stack rather than prose. Replaces the six
   inline style="margin-top:18px" attributes the old markup carried. */
.panel--stack { display: flex; flex-direction: column; gap: var(--s-5); }
/* Inside a panel the tiles sit inset, like everything else in it, as the
   Figma People and Campaigns panels draw them. They used to bleed to the
   panel's edges with a rule above, because the hairline grid had no edges of
   its own; each tile has one now. */
.panel--stack > .cells { margin: 0; }

/* A section that needs no box: an eyebrow, a hairline, and the content. */
.section { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-6);
  margin-bottom: 12px;
}

/* ── Signals ───────────────────────────────────────────────────────────── */
/* .chip is TAXONOMY -- what kind of thing this is. .rag is HEALTH -- what
   state it is in. Holding that line is what retired the wallet's four pale
   fills: a chip has no ground of its own, so there is nothing to tint. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--s-1) var(--s-4);
  font-size: var(--t-micro);
  color: var(--muted);
  white-space: nowrap;
}
.chip--on { border-color: var(--ink); color: var(--ink); font-weight: 500; }
.on-ink .chip { border-color: var(--line-dark); color: var(--muted-lift); }
.on-ink .chip--on { border-color: rgba(0, 189, 242, .5); color: var(--blue); }

/* The Figma status badge: Inter 12px bold, upper, 8%, in a soft-grey pill
   with a dot. It was mono at 10px, .12em -- the eyebrow's old treatment, which
   F5 retired. */
.rag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--s-0) var(--s-3);
  color: var(--ink);
  background: var(--white);
}
/* The word carries the state; the dot is reinforcement, never the signal. */
.rag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rag-amber);
  flex: none;
}
.rag--green::before { background: var(--rag-green); }
.rag--amber::before { background: var(--rag-amber); }
/* Archived and Skipped are finished, not a warning: a grey dot rather than the
   amber that means "worth a look". */
.rag--neutral::before { background: var(--muted-lift); }
.rag--red::before   { background: var(--rag-red); }
.on-ink .rag { background: var(--ink-lift); border-color: var(--line-dark); color: var(--white); }

/* The "read this" marker: --tint ground and one 4px accent-blue rule on the
   left, as the Figma screens draw it (Settings' "Secrets are write-only",
   Places' "2 places are in no group"). It was the hub's 3px ink edge and a
   hairline. The rule is decoration -- the ground and the words carry the
   meaning -- so its 2:1 on the tint is not a contrast question, and still no
   pale blue well: --tint is the only soft fill in the system. */
.callout {
  background: var(--tint);
  border: 0;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: var(--s-5) var(--s-5);
  font-size: var(--t-data);
  color: var(--ink);
}
.callout b, .callout strong { font-weight: 600; }
.callout > div + div { margin-top: 4px; }

/* ── The blast radius ──────────────────────────────────────────────────
   How many phones the send screen is about to reach, stated before anything
   else on the page and kept true as the audience changes. It is a callout
   rather than a metric cell because it is the one number on this screen that
   has to be read, and .cells reads as a dashboard strip -- something you scan
   past. Borders not shadows, --tint the only fill, like everything else. */
.reach {
  display: flex;
  align-items: baseline;
  gap: var(--s-5);
  flex-wrap: wrap;
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
}
.reach__count { font-size: 21px; font-weight: 600; letter-spacing: -.02em; flex: none; }
.reach__said { font-size: var(--t-data); color: var(--ink); flex: 1; min-width: 220px; }
.reach .linkarrow { flex: none; margin-left: auto; }
/* THE QUIET ONE IS THE NARROW AUDIENCE. Weight, not colour: --rag-amber is
   documented as confined to .rag and borrowing it here would be exactly the
   palette creep that rule exists to stop. A send aimed at one pass drops to a
   hairline and a grey number; everything broader keeps the full ink rule, which
   is the default and therefore the loud state. */
.reach--one { border-left: 1px solid var(--line); padding-left: var(--s-6); }
.reach--one .reach__count { color: var(--muted); font-size: var(--t-body); }

/* ── Actions ───────────────────────────────────────────────────────────
   The Figma Buttons sheet: every action is a 40px pill at 16px bold. The
   blue pill is the one forward action on a page, and carries INK text --
   Figma's white is 2.20:1 on it (finding F1), ink is 8.29:1. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 40px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--ink);
  padding: 0 var(--s-7);
  font-size: var(--t-card);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
/* Figma's hover is darker than its accent where the old one was lighter, and
   still carries ink text (6.58:1). */
.btn:hover { background: var(--blue-hover); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
/* The one in flight, distinguished from the others that are merely disabled
   while it runs. Drawn from an attribute rather than a rewritten label, so it
   cannot survive the state that set it. */
.btn[data-busy] { opacity: 1; }
.btn[data-busy]::after { content: "…"; }
.btn[disabled]:hover { transform: none; }
/* In a table row the pill is the row's own action (Open, Edit), 14px as the
   FW_ screens set it, so a column of them does not outweigh the names. */
.table .btn { font-size: var(--t-body); padding: 0 var(--s-5); }

/* THE WORKHORSE IS AN OUTLINE NOW (D2). The ink pill appears on no Figma
   screen; every secondary action is a white pill with a 2px edge. Figma draws
   that edge in accent blue, which is 2.20:1 on white -- below the 3:1 SC
   1.4.11 asks of a control's own boundary (finding F8) -- so the edge is INK,
   18.2:1, and the hover is a tint rather than a colour that would take the
   boundary below 3:1 at the moment somebody points at it. The class keeps its
   name: 37 call sites say btn--ink and mean "the ordinary action". */
.btn--ink { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn--ink:hover { background: var(--tint); }
/* The quieter outline, for Cancel and its kind. Its edge was --line, 1.35:1 and
   then 1.19:1 -- a button whose boundary nobody could see. --line-strong is the
   control edge, 3.37:1, and 1px keeps it quieter than the workhorse. */
.btn--ghost { background: none; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--tint); }
/* On ink both outlines turn white-on-ink. The ghost's edge was white at 25%,
   about 2:1 on ink; --muted-lift is 8.07:1. */
.on-ink .btn--ink {
  background: none;
  color: var(--white);
  border-color: var(--white);
}
.on-ink .btn--ink:hover { background: rgba(255, 255, 255, .06); }
.on-ink .btn--ghost {
  background: none;
  color: var(--white);
  border: 1px solid var(--muted-lift);
}
.on-ink .btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); }
/* Destructive, and the only place a red is allowed outside .rag's dot. Still
   an outline: suppressing a customer is reversible by an admin, so it is not
   a filled-red irreversible action. Figma draws the edge in sharp-ruby, 2.94:1
   on white; ruby-text is 5.65:1 and is what the word is set in anyway. */
.btn--danger { background: none; color: var(--danger-text); border: 1px solid var(--danger-text); }
.btn--danger:hover { background: rgba(255, 98, 87, .08); }

/* The workhorse. A text link that admits it goes somewhere. */
.linkarrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-data);
  font-weight: 500;
  color: var(--blue-deep);
  cursor: pointer;
  white-space: nowrap;
}
.linkarrow::after { content: "\2192"; font-size: 12px; transition: transform .2s var(--ease); }
.linkarrow:hover::after { transform: translateX(3px); }
.on-ink .linkarrow { color: var(--blue); }
.linkarrow--quiet { color: var(--muted); font-weight: 400; }
.linkarrow--quiet:hover { color: var(--ink); }

/* A row of actions at the foot of a panel. */
.actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.actions .push { margin-left: auto; }

/* ============================================================================
   SHELL — app-header + module-rail, continuous ink
   The hub's, and this is what "same product" means: navigation is a persistent
   ink rail beside a white workspace, under one ink identity bar. The wallet's
   gradient sidebar and gradient logo tile are both gone; there are no
   gradients in this system outside a client's own brand.

   The hub's rail COLLAPSES to icons -- roughly eighty lines of CSS, a pre-paint
   <html> attribute and two breakpoint override blocks, to reclaim 172px on a
   page a client reads for thirty seconds. An operator sits in this tool for an
   hour and wants the labels permanently, so the ground, the link treatment and
   aria-current are taken and the toggle is not.
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: 73px minmax(0, 1fr);
  min-height: 100vh;
}

.app-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  /* The Figma top bar: 24px in from both edges, 24px between groups. It used
     to track the content measure on the right; the bar now carries the
     workspace and the account, which belong at the window's edge. */
  gap: var(--s-7);
  padding: 0 var(--s-7);
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
  position: sticky;
  top: 0;
  z-index: 20;
}
/* The Fuse Wallet lock-up, 28px tall: the blue mark and "Fuse", then "Wallet"
   in near-white for this ink bar. It replaced the Fuse mark and its
   "Acquisition Studio" label on 20 October 2026. Never filtered: the mark was
   flattened to white with brightness(0) invert(1) once, to match the marketing
   site, and a filter on this asset would turn the blue word white with it. */
.app-header__logo { height: 28px; width: auto; display: block; flex: none; }
.app-header__spacer { flex-grow: 1; }

/* A disc of initials: the workspace's on accent blue, the person's on Purple
   Spark. INK text on both. Figma sets the person's initial in white, which is
   3.86:1 on that purple (finding F9); ink is 4.72:1. */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: var(--radius-pill);
  font-size: var(--t-micro); font-weight: 600; color: var(--ink);
}
.avatar--workspace { background: var(--blue); }
.avatar--user { width: 28px; height: 28px; font-size: var(--t-body); background: var(--spark); }

/* The workspace pill: 38px, a white hairline at 20%, the initials, the name. */
.app-header__workspace {
  display: flex; align-items: center; gap: var(--s-3); min-width: 0; max-width: 280px;
  height: 38px; padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-pill);
  font-size: var(--t-body); color: var(--white);
}
.app-header__workspace-name { padding-right: var(--s-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The account menu. */
.usermenu { position: relative; }
.usermenu__toggle {
  display: flex; align-items: center; gap: var(--s-3);
  height: 40px; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-2);
  border-radius: var(--radius-pill); cursor: pointer; list-style: none;
  font-size: var(--t-body); color: var(--white);
}
.usermenu__toggle::-webkit-details-marker { display: none; }
/* The account menu's chevron. The workspace picker draws its own, INSIDE the
   select (below): drawn by the pill, it sat beside the control, outside it, so
   pressing it did nothing. A single workspace is a name, not a control, and
   has none. */
.usermenu__toggle::after {
  content: ""; width: 10px; height: 6px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.usermenu__toggle:hover { background: rgba(255, 255, 255, .06); }
.usermenu__menu {
  position: absolute; right: 0; top: calc(100% + var(--s-3)); z-index: 30;
  display: flex; flex-direction: column; gap: var(--s-4); min-width: 220px;
  padding: var(--s-5); background: var(--ink-soft);
  border: 1px solid var(--line-dark); border-radius: var(--radius);
}
.usermenu__email { font-size: var(--t-body); color: var(--muted-lift); overflow-wrap: anywhere; }

.module-rail {
  background: var(--ink);
  color: var(--white);
  padding: var(--s-6) var(--s-5);
  position: sticky;
  top: 73px;
  align-self: start;
  /* The ink column must always reach the bottom of the viewport. With
     align-self:start it sizes to its content and reads as a broken block. */
  height: calc(100vh - 73px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
/* renderNav() owns the inside of this element, so the account block has to be
   its sibling rather than its last child -- otherwise every re-render would
   delete it. */
.module-rail__nav { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
/* The Figma Side nav: each group opens 16px down, its label in the `Label`
   style (12px 700, upper, 8%) in mid-grey. A group with no label after the
   first -- Settings -- stands 24px apart instead, as Figma draws it. */
.module-rail__group { display: flex; flex-direction: column; gap: var(--s-1); padding-top: var(--s-5); }
.module-rail__group:first-child { padding-top: 0; }
.module-rail__group:not(:first-child):not(:has(.module-rail__label)) { padding-top: var(--s-7); }
.module-rail__label.eyebrow { padding: 0 var(--s-5) var(--s-1); letter-spacing: .08em; }
.module-rail a, .module-rail button {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  /* 48px items, 16px bold in soft grey: the Figma Side nav component. A
     min-height rather than padding alone, because the 1px edge the current
     item draws would otherwise make every item 50px. */
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--line);
  font-size: var(--t-card);
  font-weight: 700;
  line-height: 24px;
  text-align: left;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.module-rail a:hover, .module-rail button:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
/* Where you are: blue-tint over ink, an accent-blue edge, accent-blue text --
   6.67:1 on that composite, which test-design-system.js measures. It was a
   tint with white text, so the current page was told apart by its ground
   alone. */
.module-rail [aria-current="page"] { background: rgba(0, 189, 242, .13); border-color: var(--blue); color: var(--blue); }
.module-rail .count { margin-left: auto; font-size: var(--t-micro); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted-lift); }
.module-rail [aria-current="page"] .count { color: var(--blue); }
/* The account block sits at the foot of the column, which is what gives the
   full-height rail a bottom. The workspace picker that Figma also draws here
   is in the top bar instead (D8), so it is not shown twice. */
.module-rail__foot { margin-top: auto; padding-top: var(--s-6); border-top: 1px solid var(--line-dark); }

/* The workspace picker, inside the top bar's pill. A select rather than a list
   of links: the estate grows, and a switcher that scrolls is a navigation
   problem of its own.

   APPEARANCE:NONE, AND AN EXPLICIT GROUND. A select left to the platform paints
   its closed control with the SELECTED OPTION's colours -- and the options here
   are deliberately light, because the popup is drawn by the platform on its own
   ground rather than on this bar. So the control was transparent until somebody
   chose a workspace and then went white, with ink text, on the ink: the one
   moment the control is used is the moment it stopped matching the thing it sits
   in.

   Fixing it by lightening the options would be the wrong end -- the popup is
   NOT on this ground and light is right for it. The fix is to stop the closed
   control inheriting from them, which needs the appearance reset and a real
   background rather than `transparent`.

   AND IT HAS TO UNDO THE FORM FIELD IT ALSO IS. The global `input, select`
   rule gives every select `width: 100%` and the 44px field height, and
   `select:hover` / `select:focus` give it the tint and white grounds a form
   field takes. All four reached this one: a 44px control in a 38px pill
   painted its ink over the pill's top and bottom edges, and pointing at it or
   choosing from it turned it white on the ink bar. Seen in production on 20
   October 2026, the day after it shipped, because every render had one
   workspace -- which draws a name, not a select -- so the control was never
   drawn at all. The chevron is drawn here, in the select, so pressing it
   opens the picker. */
.app-header__workspace select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 200px;
  min-height: 0;
  height: auto;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  --picker-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: var(--white);
  background-color: var(--ink);
  background-image: var(--picker-chevron);
  background-repeat: no-repeat;
  background-position: right var(--s-1) center;
  border: 0;
  border-radius: 0;
  padding: 0 var(--s-6) 0 0;
  text-overflow: ellipsis;
  cursor: pointer;
}
/* The ink stays the ink on hover and focus -- the form field's tint and white
   are exactly what turned it white. The chevron is RE-STATED, not inherited:
   the global `select:hover` uses the `background` shorthand, which also resets
   background-image, and it comes later in the file at the same specificity as
   the rule above -- so overriding only the colour would leave a picker that
   loses its chevron the moment it is pointed at. The keyboard ring goes on the
   PILL, which is the control's visible edge, rather than on the select. */
.app-header__workspace select:hover,
.app-header__workspace select:focus {
  background-color: var(--ink); background-image: var(--picker-chevron);
  background-repeat: no-repeat; background-position: right var(--s-1) center;
  border: 0; outline: none;
}
.app-header__workspace:has(select):hover { border-color: rgba(255, 255, 255, .4); }
.app-header__workspace:has(select:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The options themselves are drawn by the platform on its own ground, so they
   need the light palette rather than this bar's. The rule above is what stops
   the CLOSED control borrowing these. */
.app-header__workspace option { color: var(--ink); background: var(--canvas); }
.app-header__workspace optgroup { color: var(--ink); background: var(--canvas); }

/* The Figma foot: the email at 16px bold, the organisation under it. */
.module-rail__user { padding: 0 var(--s-5) var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
/* One line, as Figma draws it, with the whole address on hover. Wrapped, a
   long email took a second line and pushed the rail past a 900px screen. */
.module-rail__user-name { font-size: var(--t-card); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-rail__user-org { font-size: var(--t-body); color: var(--muted-lift); }

/* .main FILLS the workspace column, and the measure is applied PER BLOCK, so a
   wide screen adds margin rather than stretching a blurb to 150 characters.
   The flex gap is what deleted the inline margin-top attributes. */
.main {
  padding: var(--s-7) var(--pad) var(--s-9);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.main > * { width: 100%; max-width: var(--measure); margin-inline: auto; }

/* The page's own blocks, and this rule is load-bearing. .main's gap separates
   the page head from #app and NOTHING ELSE -- every panel, strip, table and
   section a page function emits lands inside #app, which is one element as far
   as .main is concerned. Without a column rhythm here they all abut: the
   stepper sits flush against the KPI strip below it and the panel above it,
   with no edge between the two borders. */
.page { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }

/* The page head. Not the hub's masthead: that is an ink hero card with a
   texture grid and a halo, for a page read for thirty seconds. This is a tool.
   An eyebrow, a name and the page's one action. */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding-bottom: var(--s-1);
}
.page-head h1 { margin-top: 4px; }

/* ============================================================================
   WORKSPACE — bands and cells, not a 12-column grid
   The old markup carried .grid with .s3/.s4/.s5/.s7/.s8/.s12 spans written
   into the JS helpers. The hub's vocabulary is three named shapes, and every
   layout in this studio is one of them.
   ========================================================================= */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: stretch;
}
/* A block with nothing beside it becomes one full-width column, with no gap
   and no placeholder. */
.band > :only-child { grid-column: 1 / -1; }
/* The 8/4 split the wizard and the deployment pages used. */
.band--wide { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
.band--even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* THE PREVIEW FOLLOWS THE EDITOR DOWN.
   The pass editor is sixty-odd controls and the preview beside it is the only
   feedback loop in the whole screen -- so it was on screen while somebody
   edited the first two fields and gone for every one after that. The header and
   the rail have been sticky since the shell was built; this is the third thing
   that should never leave.
   align-self, because .band stretches its columns to the height of the row and
   a stretched item has no room inside its own track to move. */
.panel--sticky { position: sticky; top: 89px; align-self: start; }

/* Metric tiles -- SEPARATE CARDS since D3, as every Figma screen draws them:
   12px corners, a soft-grey edge, 16px between them, an upper-case label, a
   48px figure, and a note under it.

   They were the hub's open hairline grid. That needed a box-shadow per cell
   and overflow:hidden to clip the outer edges, because a --line ground behind
   a 1px gap painted every empty track in a short last row as a solid grey
   block. Separate cards have no shared edge, so an empty track is simply
   empty and none of that machinery is needed. */
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap); }
.cells > * {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* A LONG VALUE STAYS IN ITS CARD. A grid item's minimum width is its
     content, so one unbreakable string -- the SHA-256 in Apple signing, a test
     URL, a template id where a design name was expected -- widened the card
     past its track and ran over the next. The hairline grid clipped that with
     overflow:hidden; separate cards (D3) need to break it instead (full pass,
     20 October 2026). */
  min-width: 0;
  overflow-wrap: anywhere;
}
.cell__value { font-size: var(--t-value); font-weight: 700; letter-spacing: 0; line-height: 1.17; }
/* `Fuse Eyebrow`, as the tiles' labels are drawn: "PAGE OPENS". */
.cell__label { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
/* Provenance, not a delta. The old stylesheet put "Measured" and "All time" in
   green, which reads as a positive change; the only green in this system is
   the dot inside .rag. 14px semi-bold, as Figma's tiles set it. */
.cell__note { font-size: var(--t-body); font-weight: 600; color: var(--muted); margin-top: auto; padding-top: var(--s-1); }

/* ── Tiles ─────────────────────────────────────────────────────────────
   The six acquisition methods, derived from the hub's .feature-tile. The
   column count is DECLARED rather than left to auto-fit: the hub hit exactly
   this (portal.css:1002) and found a 320px floor silently fell to two tracks
   at every laptop width, so "3 across" meant 2 on most screens. */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.tile {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: var(--s-6) var(--s-6);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.tile:hover { background: var(--tint); border-color: rgba(14, 20, 43, .24); border-left-color: var(--blue); }
.tile__name { font-size: var(--t-lede); font-weight: 600; letter-spacing: -.012em; }
.tile__blurb { font-size: var(--t-data); color: var(--muted); }
.tile__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-top: auto;
  padding-top: var(--s-5);
}

/* ── Option tiles ──────────────────────────────────────────────────────
   Derived from .feature-tile, NOT from .locked-module: dashed-and-unfilled
   means "offered, not yours", which is the opposite of an available choice.

   Two things .feature-tile never needed. The 3px edge is present-but-
   transparent in every state, so selecting does not shift the content beside
   it. And selection carries THREE signals -- ink border, blue edge, weight,
   plus the tick -- because --blue is 2.29:1 on white and cannot be the sole
   indicator under SC 1.4.11. */
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.option {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  text-align: left;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.option:hover { background: var(--tint); border-color: rgba(14, 20, 43, .24); border-left-color: transparent; }
/* A type card carries a diagram of the layout that type gives you. The figure
   leads, because the difference between these three IS visual -- a small square
   image beside the fields, or a full-width band behind the biggest value -- and
   that is not a thing a sentence lands as well as a picture does. */
.option--fig { gap: var(--s-3); }
.typefig {
  --chart-1: var(--blue);
  --chart-2: #00a0d2;
  --chart-3: #0084b4;
  --chart-4: var(--blue-deep);
  width: 100%; max-width: 172px; height: auto; display: block;
}
.option__name { font-size: var(--t-body); font-weight: 500; }
.option__note { font-size: var(--t-data); color: var(--muted); }
.option[aria-checked="true"] {
  border-color: var(--ink);
  border-left-color: var(--blue);
  background: var(--white);
}
.option[aria-checked="true"] .option__name { font-weight: 600; }
.option[aria-checked="true"] .option__name::after { content: " \2713"; color: var(--blue-deep); }

/* A METHOD CARD WEARS ITS SURFACE, as Figma's Create by surface draws it: a
   4px left edge, purple for Braze, green for QR and print, orange for NFC,
   yellow for every kind of link. The surface comes from METHOD_FACETS through
   methodSurface(), so it cannot disagree with the Campaigns filter.

   The edge holds on hover and when chosen, because it names the surface, not
   the state. Choosing still carries the signals that are not colour -- the
   ink border, the weight and the tick -- so the blue edge a plain option uses
   for selection is the one signal these cards give up. */
.option[data-surface] { border-left-width: 4px; }
.option[data-surface="braze"] { --surface: var(--surface-braze); }
.option[data-surface="qr"] { --surface: var(--surface-qr); }
.option[data-surface="nfc"] { --surface: var(--surface-nfc); }
.option[data-surface="link"] { --surface: var(--surface-link); }
.option[data-surface],
.option[data-surface]:hover,
.option[data-surface][aria-checked="true"] { border-left-color: var(--surface); }

/* ── The stepper ───────────────────────────────────────────────────────
   ONE of these, not two. The home hero had a vertical numbered list and the
   wizard had a dark rail; they said the same thing in two vocabularies. This
   is built like .cells -- a hairline strip -- and the numeral ring reuses
   .rowlink__go's geometry and its ink-fill-on-engage gesture, so the system
   has one circular affordance rather than two. */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
  background: var(--white);
  padding: var(--s-4) var(--s-5);
  font-size: var(--t-data);
  color: var(--muted);
}
.step__n {
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--t-micro);
  font-weight: 500;
  color: var(--muted);
}
/* Wraps rather than truncating. Ellipsis turned "Acquire audience" into
   "Acquire audi..." for every width between the row breakpoint and roughly
   900px -- and a step whose name is cut off is not a step you can follow. The
   tracks are 1fr, so a two-line label just makes the whole strip taller. */
.step__label { min-width: 0; }
.step--done { color: var(--ink); }
.step--done .step__n { background: var(--ink); border-color: var(--ink); color: var(--white); }
.step--current { color: var(--ink); font-weight: 600; background: var(--tint); }
.step--current .step__n { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ── The pass editor's five steps ──────────────────────────────────────
   The same .steps rail, made navigable. A sequence you can only walk forwards
   is a form with extra clicks: somebody coming back to change one colour should
   press step 2, not Next four times. It doubles as the map -- five titles and
   where you are among them -- which is the thing a page of nine drawers could
   not tell you.

   Buttons, so they are reachable and pressable without script beyond the
   dispatcher every other control already uses. text-align:left because a .step
   is a row of two things, not a centred label. */
.steps--nav { margin-top: 18px; }
.steps--nav .step { width: 100%; text-align: left; cursor: pointer; border: 0; font-family: inherit; }
.steps--nav .step:hover { background: var(--tint); }
.steps--nav .step:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Shown, not hidden, while the design does not exist yet: seeing that this is
   one of five is the whole reason the rail is on the create form. They simply
   cannot be pressed -- artwork has nowhere to upload to and a PATCH has nothing
   to patch until the POST has happened. */
.steps--nav .step--locked { cursor: default; color: var(--muted); }
.steps--nav .step--locked:hover { background: var(--white); }

/* A STEP IS HIDDEN, NEVER UNRENDERED. saveTemplate reads every control by id
   and posts the lot, so a step that mounted only its own fields would send
   empty strings for the other four and blank them. `hidden` keeps them in the
   DOM, which is the same reason the drawers are <details> rather than a
   conditional. The column carries the gap the .panel--stack siblings expect. */
.wizcol { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.wizstep { display: flex; flex-direction: column; gap: var(--gap); }
.wizstep[hidden] { display: none; }

/* ── Form fields ───────────────────────────────────────────────────────
   The hub styles no input, select, textarea or label -- it has no forms. So
   these are derived rather than copied, from the one comment in its token
   block that settles the question: --line-strong exists because "a ring that
   IS the button needs to be seen, not felt". An input IS a control, so it
   takes --line-strong; a panel is a container and keeps --line.

   The label is .eyebrow. The old stylesheet gave every label
   `color: var(--blue); font-weight: 900`, which is twenty fields shouting. */
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
/* UX-96. A FORM LABEL IS A WORD, NOT A SPECIMEN. It wore .eyebrow's treatment
   -- 10px mono, uppercase, .18em tracking, in --muted -- so on the pass editor,
   the one page where somebody writes what a customer will read, the dominant
   texture was 68 tracked-out grey capitals, and the label and the note under it
   were the same colour and nearly the same size (review 36, 4.1; still true). A
   label is now the thing being asked, in ink; the note is the footnote.

   D9 (19 October 2026) takes the capitals back, as `Fuse Eyebrow` draws every
   field label on the Figma screens, and keeps the rest of UX-96: Inter, not
   mono; INK, not grey, so it still reads as the question above a grey note;
   .04em, not .18em. Decided knowing the editor will again carry a column of
   capitals -- the fix for "68 grey specimens" was the grey and the mono as much
   as the case. */
.field > label {
  font-family: var(--font); font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.field__note { font-size: var(--t-micro); color: var(--muted); }

/* ONE FIELD, ONE BLOCK: its label, its value and its change message.
   These were two panels a step apart, so the three facts about a single field
   were never on screen together. Bordered rather than filled -- borders, not
   shadows -- and the set-once pair folds behind a .hint inside the block, which
   keeps UX-21's rule at field granularity instead of page granularity. */
.fieldblock { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5) var(--s-5); }
.fieldblock + .fieldblock { margin-top: 12px; }
.fieldblock__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3); margin-bottom: 10px; }
.fieldblock__head h4 { margin: 0; font-size: var(--t-body); }
/* Prose in a flex row wraps only if it is allowed to: this is the sentence
   explaining what the field is for, and it is the first thing read. */
.fieldblock__role { flex: 1 1 14ch; min-width: 0; font-size: var(--t-micro); color: var(--muted); white-space: normal; }
/* .fieldblock__set is deleted, not merely unused. It spaced the disclosure
   UX-21 gave every field block, and the four-controls-in-two-rows layout
   removed the summary it belonged to -- test-studio-disclosure.js asserts
   fieldBlock does not name it. The rule outlived the markup by two days and
   was found by the pattern library's coverage report, which is the one thing
   in this repository that reads the stylesheet rather than the screen. */

/* WHERE VARIABLE CONTENT IS INSERTED, marked rather than described.
   `%@` becomes the new value and `{name}` becomes the holder's name; a change
   message WITHOUT %@ raises no iOS notification at all, so the missing state
   has to look different from the present one. --tint is the only soft fill in
   this system, and --rag-amber is confined to .rag, so "missing" is carried by
   the border and the weight rather than by a colour borrowed from elsewhere.

   THREE STATES, AND THEY WERE TWO. tokenHint() computes offered, doing its job
   and missing, and emitted .token, .token--on and .token--missing for them --
   but .token--on was declared NOWHERE, so the state an operator is watching FOR
   was drawn identically to the state they started in. Typing %@ into a change
   message changed nothing on the screen. Found by the pattern library, whose
   guard refused a specimen naming a class the stylesheet does not declare;
   invisible in app.js, which was correct all along.

   A LADDER, one property per rung, because these never appear together -- one
   box draws one of them -- so what has to be legible is which rung this is
   rather than how two of them differ side by side:

     offered   hairline border, inherited (muted) text
     on        + an INK border. The edge going from nearly invisible to solid
               as the token is typed is the whole feedback loop.
     missing   + ink text and weight 600, so it is strictly the loudest. It is
               the only one of the three that reports something wrong.

   `currentColor` is deliberately gone from the missing rule. It resolved
   against .field__status, which is --muted, so the WARNING carried a lighter
   border than the ink one "on" now takes -- the ladder inverted at the top. A
   colour that depends on where the chip is placed cannot hold an ordering. */
.token {
  font-family: var(--mono); font-size: var(--t-micro);
  padding: 1px var(--s-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--tint); white-space: nowrap;
}
.token--on { border-color: var(--ink); }
.token--missing { border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* A SECRET SHOWN ONCE, WHICH IS NOT A .token.
   .token is an inline chip and carries white-space: nowrap, which is right
   for `%@` beside a field and wrong for a 40-character bearer token: it would
   run out of its own panel on a laptop. This wraps, breaks anywhere, and is
   selectable in one gesture, because the only thing the operator can do with
   it is copy it before it is gone. */
.secret {
  font-family: var(--mono); font-size: var(--t-micro);
  padding: var(--s-4) var(--s-4); margin: 8px 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--tint);
  overflow-wrap: anywhere; user-select: all;
}

/* A TICKBOX READS THE OTHER WAY ROUND FROM EVERY OTHER FIELD.
   .field puts its label above its control, which is right for an input and
   wrong here: the label of a checkbox is what it means, and it belongs beside
   the box. The uppercase mono treatment .field > label carries is undone for
   the same reason -- these are sentences an operator reads before granting
   something, not the name of a slot. */
.field--check > label {
  flex-direction: row; align-items: center; gap: var(--s-3);
  font-family: inherit; font-size: inherit; font-weight: inherit;
  letter-spacing: normal; text-transform: none; color: inherit;
  display: flex; min-height: 24px; cursor: pointer;
}
/* AND THE BOX ITSELF IS A BOX, NOT A TEXT FIELD. The global `input` rule
   gives every input `width: 100%`, a field-height minimum and padding, which
   is right for something you type into and turned each tickbox here into a
   full-width row with the box floating in the middle and its label pushed to
   the far edge -- the API-key scopes read as a column of empty squares with
   their meanings stranded on the right. Seen on 6 October 2026 by somebody
   about to grant a key; the same 16px box .pickbox draws, held off the flex
   squeeze so a long label cannot shrink it, and a 24px target round it. */
.field--check input[type="checkbox"] {
  width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0;
  flex: none; align-self: center; cursor: pointer;
}

/* WHERE A FIELD LANDS, second to what it is for.
   The note above says the job; this says which line of which wallet, which is
   a question the preview beside the form already answers better -- so it opens
   rather than occupying the sentence. Quiet: this is a footnote on a footnote,
   and it must not out-weigh the note it sits under.
   No JavaScript anywhere in it. The CSP is script-src 'self' with no
   unsafe-inline, and a guard fails the build on an inline handler. */
.hint { font-size: var(--t-micro); color: var(--muted); }
.hint > summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  width: fit-content;
}
.hint > summary::-webkit-details-marker { display: none; }
.hint > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.hint[open] > summary { margin-bottom: 4px; }
.hint > span { display: block; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
.form-stack { display: flex; flex-direction: column; gap: var(--s-5); }

input, select, textarea {
  width: 100%;
  min-height: var(--field-h);
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-body);
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
/* A TICKBOX OR A RADIO IS NOT A FIELD. The rule above sized every input, so a
   pass-table checkbox was 16 x 44 and the new-list kind radios 510 x 44,
   pushing their labels onto the next line -- worse once --field-h went from
   38px to 44px (full pass, 20 October 2026). They keep their own size. */
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; padding: 0; }
/* A select in a row of actions is one of the row's controls, at the pills'
   40px, not a full-width 44px field on a line of its own -- the selection
   bar's "Add to a list" did exactly that. */
.actions > select { width: auto; min-height: 40px; }
textarea { min-height: calc(var(--field-h) * 2); resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: var(--t-data); }
select[multiple] { min-height: calc(var(--field-h) * 2.6); padding: var(--s-1); }
select[multiple] option { padding: var(--s-1) var(--s-3); border-radius: var(--radius-sm); }
input:hover, select:hover, textarea:hover { background: var(--tint); }
/* An ink edge on top of the global focus ring: the ring says "focus is here",
   the edge says "and this is the box it is on". */
input:focus, select:focus, textarea:focus { background: var(--white); border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 2px; }
/* Disabled DEMOTES the control edge to a container edge. --line plus --tint is
   precisely what --tint is documented for, and it means the difference reads
   as "this is not a control" rather than as "this control is faded". */
input:disabled, select:disabled, textarea:disabled {
  border-color: var(--line);
  background: var(--tint);
  color: var(--muted);
  cursor: default;
}
input::placeholder, textarea::placeholder { color: var(--muted); }

/* A hex field with its colour beside it. The swatch takes --line-strong like
   any other control edge, because on a pale brand it is the only thing
   separating the swatch from the panel. It is painted from JavaScript, never
   from an interpolated style attribute: the value is a database column and
   escapeHtml escapes neither ")" nor ";". */
.colour { display: flex; align-items: center; gap: var(--s-3); }
/* An <input type="color">, styled down to the swatch it replaced. The
   browser draws the well itself, so the padding and the inner border have to
   be reset per engine or it renders as a chunky OS button that belongs to no
   design system at all. It keeps --line-strong like any other control edge,
   and being a real input it is focusable and keyboard-operable, which the
   <span> it replaced was not. */
.colour__swatch {
  flex: none;
  width: var(--field-h);
  height: var(--field-h);
  min-height: var(--field-h);
  padding: var(--s-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: border-color .16s var(--ease);
}
.colour__swatch:hover { border-color: var(--ink); }
.colour__swatch::-webkit-color-swatch-wrapper { padding: 0; }
.colour__swatch::-webkit-color-swatch { border: 0; border-radius: var(--radius-sm); }
.colour__swatch::-moz-color-swatch { border: 0; border-radius: var(--radius-sm); }
.colour input { font-family: var(--mono); }

/* ── Asking in place ───────────────────────────────────────────────────
   A destructive button becomes its own confirmation rather than opening a
   dialog. --tint ground and a 3px ink edge: the same "read this" device as
   .callout, because it is the same thing said smaller. No new colour, and
   no modal -- the design system has none and did not need one for this. */
.confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
}
.confirm__ask { font-size: var(--t-data); color: var(--ink); max-width: 42ch; }

/* In a table the strip is two lines tall where the button was one, so arming
   it grew the row and pushed every row below it down -- under a cursor that
   is at that moment hovering a destructive yes/no. Anchored to its own cell
   instead, so nothing moves. Only where there is room to float left across
   the row; on a narrow table the reflow is the lesser problem. */
.confirm__hold { display: none; }
@media (min-width: 900px) {
  .table tbody tr { position: relative; }
  /* Invisible, unfocusable, and exactly the size of the button that was
     there, so taking the strip out of flow costs the row no height. */
  .table .confirm__hold { display: inline-block; visibility: hidden; }
  .table .confirm {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    max-width: min(560px, calc(100% - 40px));
    background: var(--white);
  }
  .table .confirm__ask { max-width: 30ch; }
}
/* Optional, and it looks it: the suppression reason is not a gate. */
.confirm__reason { width: 22ch; min-height: 32px; padding: var(--s-2) var(--s-3); font-size: var(--t-data); }

/* ── Artwork slots ─────────────────────────────────────────────────────
   Three per image, one per scale, sitting on the .cells hairline grid so an
   empty slot reads as a gap in a set rather than as a broken card. Declared
   column count for the same reason .tile-grid declares one. */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-1);
  border: 1px dashed rgba(14, 20, 43, .26);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
}
/* Filled takes a solid edge, because dashed-and-empty is the whole signal. */
.slot--filled { border-style: solid; border-color: var(--line); background: var(--white); }
/* UX-36. The image, before it is published. A slot listed a filename and a
   pixel size and showed nothing, so the only way to see what a design carries
   was to install a pass -- and the mistake this panel exists to catch, a wrong
   or missing Retina variant, was two filenames and some arithmetic.

   contain, never cover: a logo cropped to fill a square would be the mock
   lying about the asset, which is the one thing a slot preview must not do. The
   chequerboard is two gradients rather than an image file, and it is what makes
   a transparent PNG legible as transparent rather than as white. */
.slot__thumb {
  width: 100%;
  height: 46px;
  object-fit: contain;
  object-position: left center;
  display: block;
  border-radius: var(--radius-sm);
  background-color: var(--tint);
  background-image:
    linear-gradient(45deg, rgba(14, 20, 43, .07) 25%, transparent 25%, transparent 75%, rgba(14, 20, 43, .07) 75%),
    linear-gradient(45deg, rgba(14, 20, 43, .07) 25%, transparent 25%, transparent 75%, rgba(14, 20, 43, .07) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}
/* The empty slot keeps the same box so a row of slots does not jump in height
   as they fill, and so a gap beside a filled sibling reads as the absence it
   is -- which is exactly the missing @2x. */
.slot__thumb--empty { background-image: none; opacity: .5; }
.slot__name { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.slot__size { font-family: var(--mono); font-size: var(--t-data); color: var(--ink); }
.slot--filled .slot__size { font-weight: 500; }
/* A label wrapping the input: the only way to restyle a file picker. The
   input was carrying the `hidden` attribute, which [hidden]{display:none}
   above makes unfocusable -- so all nine upload controls were keyboard-dead
   and the :focus-within rule below could never fire. Clipped instead of
   hidden: off-screen to the eye, still in the tab order. */
.slot__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.slot__pick {
  position: relative;
  font-size: var(--t-data);
  font-weight: 500;
  color: var(--blue-deep);
  cursor: pointer;
  margin-top: 2px;
}
.slot__pick:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ── Charts ────────────────────────────────────────────────────────────
   Analytics had no chart of any kind: four panels of number tiles, so the one
   question an acquisition funnel exists to answer -- where do people drop out,
   and is it growing -- was four unrelated integers the reader had to divide in
   their head.

   THE RAMP IS DECLARED HERE AND NOT IN :root, deliberately. :root is the parity
   surface: test-design-system.js compares it token for token against the Figma
   file, and every token Figma does not supply has to be declared with a stated
   reason. A chart ramp is not a token the file holds -- it has no charts --
   so putting it there would widen a contract to hold something the contract is
   not about. It is scoped to the component that owns it.

   ONE HUE, LIGHT TO DARK, and the steps are computed rather than picked. The
   funnel's stages are an ORDERED scale, so the colour job is sequential: a
   categorical set here would double-encode bar length as hue and burn the only
   free channel on information the bar already shows. The four steps below pass
   the ordinal checks against a white surface -- monotone lightness, every
   adjacent gap >= 0.06 L (0.084, 0.083, 0.079 in OKLab), single hue (6 deg
   spread), and the light end clearing 2:1 against the surface so the first
   stage is not a ghost. The dark end IS --blue-deep rather than a fifth blue:
   the system already has a dark blue that carries text at 5.95:1, and
   inventing a neighbour for it is how a palette starts to drift.
   scripts/test-design-system.js re-checks the order.

   D4: the LIGHT end is Figma's accent, var(--blue), the colour FW_Analytics
   draws its bars in -- 2.20:1 on white, over the 2:1 floor. The two middle
   steps were re-derived between it and --blue-deep when the accent moved from
   #16b8f3 to #00bdf2. Figma ALTERNATES accent blue and ink between stages; the
   ramp does not, because alternating colours double-encode an order the bar
   lengths already show, and read as two series where there is one.

   The ramp is re-declared on .typefig, .share__key and .spark, for the reason
   each of them gives: they sit outside the <svg class="chart"> that owns it.

   EVERY CHART IS SVG, and that is a constraint rather than a preference. The
   design guard refuses any `style="…${…}"` in app.js -- escapeHtml escapes
   neither ")" nor ";", and a database colour once wrote a live declaration
   through one. A bar sized with `style="width:62%"` is that same pattern, so
   geometry rides SVG PRESENTATION attributes (x, width, d), which are not
   style, and colour rides a class. Nothing is painted from JS afterwards, so a
   chart survives render() rebuilding #app without a second paint step. */
.chart {
  --chart-1: var(--blue);
  --chart-2: #00a0d2;
  --chart-3: #0084b4;
  --chart-4: var(--blue-deep);
  /* One step off the surface, hairline, solid. Never dashed: dashing reads as
     "projection" or "threshold" when it is just a grid. */
  --chart-grid: var(--line-soft);
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart__grid { stroke: var(--chart-grid); stroke-width: 1; }
/* Text on a chart wears TEXT tokens, never the series colour: --chart-1 is
   2.05:1 on white, which is correct for a mark and illegible as a word. */
.chart__tick { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.chart__bar { fill: var(--chart-3); }
.chart__bar--1 { fill: var(--chart-1); }
.chart__bar--2 { fill: var(--chart-2); }
.chart__bar--3 { fill: var(--chart-3); }
.chart__bar--4 { fill: var(--chart-4); }
/* The de-emphasis step, for the part of a mark that is context rather than
   subject -- the unfilled half of a meter, the previous period. */
.chart__track { fill: var(--tint); }

/* The funnel's own text sizes. The stage name is body weight because it is the
   thing being read; the value is the figure beside it. */
.chart__stage { fill: var(--ink); font-size: var(--t-body); font-weight: 600; }
.chart__micro { fill: var(--muted); font-size: var(--t-micro); }
/* UX-84. The conversion rides the stage's own line, so it cannot be read as
   belonging to the bar above it. */
.chart__rate { fill: var(--muted); font-size: var(--t-data); font-weight: 400; }
.chart__figure { fill: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
/* The connector between two funnel stages, carrying the conversion. Hairline
   and solid, like every other rule on a chart. */

/* ── Part to whole ─────────────────────────────────────────────────────
   One stacked bar, which is what three of the four "Customers / Known /
   Anonymous / Suppressed" tiles were: Known + Anonymous IS Customers, so the
   tiles asked the reader to spot a sum. The segments are separated by a 2px
   gap in the surface colour -- never a border, which would add ink that is not
   data. Suppressed stays a tile: it is a STATE a customer is in, not a share of
   the same whole, and stacking it would invent a fourth slice of a pie that
   already adds to 100. */
/* The key re-declares the two steps it paints, because it is HTML sitting
   OUTSIDE the <svg class="chart"> that declares the ramp -- and a legend swatch
   with no colour is worse than no swatch. The two values are the ramp's ends,
   named the same way, so the guard that checks the order sees one list. */
.share__key {
  --chart-1: var(--blue);
  --chart-4: var(--blue-deep);
  display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: 11px; font-size: var(--t-micro);
}
.share__item { display: flex; align-items: center; gap: var(--s-3); }
.share__dot { width: 9px; height: 9px; border-radius: var(--radius-sm); flex: none; }
.share__dot--1 { background: var(--chart-4); }
.share__dot--2 { background: var(--chart-1); }
.share__n { font-weight: 600; font-variant-numeric: tabular-nums; }
.share__of { color: var(--muted); }

/* A rate in a table row: the fill is the number, and the digits beside it are
   for comparing two rows precisely. The bar is inside a .chart, so it takes the
   ramp from there. tabular-nums HERE and not on the funnel's figures -- these
   align down a column, those are standalone. */
/* A sparkline under a KPI figure. No axis, no labels, no second number: the
   tile already carries the value and this carries only its shape. The line is
   recessive and the END POINT takes the accent, because what is being shown is
   where the series has got TO -- a dot on every week would be a number on every
   point wearing a different hat. The end dot carries a 2px ring in the surface
   colour so it stays legible where it sits on the line. */
.spark {
  --chart-1: var(--blue);
  --chart-4: var(--blue-deep);
  width: 104px; height: 22px; margin: 3px 0 -1px;
}
.spark__line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark__end { fill: var(--chart-4); stroke: var(--canvas); stroke-width: 2; }

.meter { display: flex; align-items: center; gap: var(--s-3); }
.meter__bar { flex: none; width: 66px; height: 8px; }
.meter__n { font-family: var(--mono); font-size: var(--t-micro); font-variant-numeric: tabular-nums; }
.share__item { display: flex; align-items: baseline; gap: var(--s-3); }
.share__dot { width: 9px; height: 9px; border-radius: var(--radius-sm); flex: none; align-self: center; }
.share__dot--1 { background: var(--chart-4); }
.share__dot--2 { background: var(--chart-1); }
.share__n { font-weight: 600; font-variant-numeric: tabular-nums; }
.share__of { color: var(--muted); }

/* UX-38. The range control and what it scopes, on one row above the charts.
   Not a picker per chart: filters inside chart cards are how two charts on one
   screen come to be showing different periods while looking like a pair. */

/* ── Tables ────────────────────────────────────────────────────────────
   Real <table>s, not .cells: six heterogeneous columns need cross-row
   alignment that auto-fit cannot give. And not .rowlink either -- the hub's
   "the row is the control" comment says THINGS TO OPEN, and neither wallet
   table has a destination. The customers table's only action is destructive
   and permissioned, so making the whole row that control would be wrong. */
/* The Figma tables: an 8px soft-grey box, a tint header row, 16px cells. */
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  white-space: nowrap;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  padding: var(--s-5);
  /* Upper case, as Figma draws every column name ("CAMPAIGN", "PAGE OPENS"):
     the same answer D9 gave the field labels, with the rest of UX-96 kept --
     Inter not mono, and none of the .18em tracking. Muted rather than ink, as
     the screens set it: a header names a column, it is not the question a
     field label asks. */
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* nowrap, because .tablewrap already scrolls. A wrapping cell pays for both:
   "2026-08-01" breaks across two lines AND the table still scrolls. Middle,
   not top, so a row's pill and badge sit level with its name, as the screens
   draw them. */
.table td { padding: var(--s-5); border-bottom: 1px solid var(--line-soft); font-size: var(--t-body); vertical-align: middle; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--tint); }
/* A row's name, 16px bold: "Fuse Test 01" on FW_Campaigns. */
.table td b { font-weight: 700; font-size: var(--t-card); }
.table__id { font-family: var(--mono); font-size: var(--t-micro); color: var(--muted); overflow-wrap: anywhere; }
/* Inside a table, DON'T break the id. .tablewrap already scrolls horizontally,
   so wrapping a 36-character customer id makes every row four lines tall and
   the table scrolls anyway -- it pays the cost of both answers. Outside a
   table the same class carries a key fingerprint in a narrow panel, where
   breaking is the right answer. */
.table .table__id { overflow-wrap: normal; white-space: nowrap; }
/* FIGURES IN INTER, WITH TABULAR NUMERALS (D7). Mono was here for one reason:
   so a column of counts lines up digit for digit. Inter's tabular figures do
   the same job, and the Figma tables set every figure in Inter. Ids keep mono
   (.table__id), because there the character shapes matter -- an l and a 1, an
   O and a 0 -- not only their width. Right-aligned, not centred as the screens
   draw them: a column of numbers is compared by its last digit. */
.table__num { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; }
.table__foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-micro); color: var(--muted); }
/* A SENTENCE INSIDE A CELL, and the nowrap that cascades into it.
   `.table td` is `white-space: nowrap` -- right for an id, a coordinate and a
   date -- and it INHERITS. So `.confirm__ask`'s own `max-width: 30ch` was
   inert: the question rendered as one unbreakable line, overflowed a
   max-width that clips nothing, and ran across the page on top of its own
   Delete and Cancel buttons. The one strip in this product whose entire job is
   to be read before it is answered was unreadable, and its Cancel was under
   the text asking the question. A max-width beside an inherited nowrap is
   always one of the two doing nothing.
   `.field__note` had the same cause with a quieter symptom: the routes using a
   place sat hard against the place's name -- "Ballsbridge RetailerNot on any
   route" -- because the span had nowhere to go. A second line in a cell is a
   BLOCK, the way `.table__id` above already is. */
.table .confirm, .table .confirm__ask { white-space: normal; }
.table .field__note { display: block; white-space: normal; margin-top: 3px; }
/* A SELECT IN A CELL SIZES TO ITS OPTIONS, NOT TO THE CELL. The global field
   rule's `width: 100%` is a percentage of a cell that an auto-layout table
   sizes from its content -- so the select asked the cell, the cell asked the
   select, and Places' per-row group picker collapsed to a sliver showing no
   name at all (production, 20 October 2026). */
.table select { width: auto; min-width: 16ch; }
/* A line of history is a sentence, and it wrapped as one line past the table's
   edge -- "A device collected the update 3 times in a few minutes -- a device
   may have refused it" pushed the By column off the right of the page, seen on
   the rendered pass page. The cell wraps; its detail lines are .field__note. */
.table .timeline__what { white-space: normal; min-width: 28ch; }


/* The one place a table row explains itself: a downstream figure that exceeds
   the one above it. A <details> rather than a tooltip, because the CSP makes an
   inline handler inert and a title attribute is unreachable by keyboard. */
.why { display: inline-block; margin-left: 6px; }
.why > summary { cursor: pointer; font-size: var(--t-micro); color: var(--blue-deep); list-style: none; }
.why > summary::-webkit-details-marker { display: none; }
.why > p { white-space: normal; max-width: 34ch; margin: 6px 0 0; }

/* What is left of the designs table while one of them is open: who is being
   edited, and a way to the others. One row, so the wizard starts near the top
   of the page rather than below four rows of counts. */
.switcher { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; padding: var(--s-5) var(--s-5); }
.switcher .eyebrow { margin-bottom: 2px; }
.switcher .table__id { margin-left: 8px; }
/* Wraps, and the select's 190px floor yields to the row's width: at 375px the
   version popout, the gap and a 190px select needed 318px of 311, and the
   select ran 7px out of the editor's header panel (full pass, 20 October
   2026). */
.switcher .actions { margin: 0; display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.switcher select { min-width: min(190px, 100%); }

/* A PERSON, AND UNDER THEM WHAT THEY HOLD.
   The child rows are the same table so the columns still line up; what says
   they are children is the indent, the lighter ground and the rule running
   down from the person above. Borders not shadows, --tint as the only soft
   fill: the same two rules the rest of this file follows. */
.table--tree .tree__parent td { border-bottom: 0; }
.table--tree .tree__child td { background: var(--tint); border-bottom: 0; padding-top: var(--s-3); padding-bottom: var(--s-3); }
.table--tree .tree__child + .tree__parent td { border-top: 1px solid var(--line); }
.table--tree .tree__child td:first-child { padding-left: var(--s-8); position: relative; }
/* The rule is the hierarchy, drawn rather than indented alone -- an indent on
   its own reads as a wrapped cell. */
.table--tree .tree__rule {
  position: absolute; left: 18px; top: -8px; bottom: 50%;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  width: 8px; content: "";
}
.table--tree .tree__child:hover td { background: var(--tint); }
/* The one cell a child row has for saying what the pass IS. Wraps, because it
   is prose rather than a column, and the table must not need more width than
   the panel has. */
.table--tree .tree__what { white-space: normal; }
.table--tree .tree__what .table__id { margin-left: 8px; }
.table--tree .tree__what .rag { margin-left: 8px; }
/* The person's summary is prose too -- "3 passes - 1 installed - 1 voided" on
   one unbreakable line was 318px of a 1083px table. */
.table--tree .tree__holds { white-space: normal; min-width: 150px; }

/* PEOPLE ON A PHONE: A CARD PER PERSON, AND THE COUNTS ON ONE LINE.
   Review 48 §0.11 / §1.15, measured at 375px: the four count tiles stacked
   two by two, so the table began 1,406px down and then scrolled 932px sideways
   inside a 341px box. Under 720px the tree table is the same markup drawn as
   cards -- each cell a row, labelled from PEOPLE_COLUMNS through data-label,
   which is static markup and never a client value -- and the tiles are one
   compact strip. Borders not shadows; --tint stays the child rows' fill. */
@media (max-width: 720px) {
  .cells.cells--people { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
  .cells--people > * { padding: var(--s-3); gap: 0; }
  .cells--people .cell__value { font-size: var(--t-title); }
  .cells--people .cell__label { font-size: 10px; letter-spacing: 0; }
  .cells--people .cell__note { display: none; }
  .table--tree, .table--tree tbody, .table--tree tr, .table--tree td { display: block; width: auto; }
  .table--tree thead { display: none; }
  .table--tree .tree__parent { border-top: 1px solid var(--line); padding-top: var(--s-4); }
  .table--tree .tree__parent:first-child { border-top: 0; }
  .table--tree td { white-space: normal; padding: var(--s-1) var(--s-4); border: 0; }
  .table--tree .tree__child + .tree__parent td { border-top: 0; }
  .table--tree td[data-label] { display: flex; justify-content: space-between; gap: var(--s-4); }
  .table--tree td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: var(--t-eyebrow); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .table--tree .tree__holds { min-width: 0; }
  .table--tree .tree__child { margin: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
  .table--tree .tree__child td:first-child { padding-left: var(--s-4); }
  .table--tree .tree__rule { display: none; }
  .table--tree .tree__what .table__id { display: block; margin-left: 0; white-space: normal; }
  .table--tree .tree__parent td:last-child, .table--tree .table__actions { padding-bottom: var(--s-3); }
}

/* ── The pass preview ──────────────────────────────────────────────────
   Two mocks, because there are two passes. Apple lays out labelled
   primary/secondary/auxiliary fields on ONE flat background colour; Google
   lays out a card title, a header, a subheader and text modules. Drawing one
   rectangle for both is drawing neither, which is what the single .pass mock
   did -- complete with a two-stop gradient that no wallet renders, because
   template.secondary reaches neither platform.

   The background is a custom property rather than an interpolated style
   attribute, which is what closed a CSS injection: escapeHtml escapes
   neither ")" nor ";", so a template colour of `red);background-image:url(`
   wrote a live declaration. The server now sends a validated rgb() or hex.

   SIZES ARE APPLE'S, SCALED. The card is 230px against a real pass's ~320pt,
   so a 160x50pt logo gets 115x36px and a 90x90pt thumbnail gets 65px. Drawn
   smaller, the preview disagrees with the phone about how much of the pass a
   brand occupies, which is most of what an operator is judging. */
.phone {
  width: 268px;
  margin: 0 auto;
  border: 9px solid var(--ink);
  border-radius: 30px;
  background: var(--tint);
  padding: 13px 10px 24px;
}
.phone--waiting { min-height: 240px; display: flex; align-items: center; justify-content: center; }

.pkpass, .gpass {
  --pass-bg: #0a6cce;
  background: var(--pass-bg);
  color: var(--white);
  border-radius: 12px;
  padding: 15px;
  min-height: 214px;
  display: flex;
  flex-direction: column;
}
/* White on a pale brand is unreadable, and this system measures contrast
   rather than eyeballing it: app.js computes the relative luminance of the
   ONE colour the platform actually uses and sets this above ~0.55. */
.pkpass.is-light, .gpass.is-light { color: var(--ink); }

/* ── Apple ─────────────────────────────────────────────────────────── */
.pkpass__top { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.pkpass__logo { height: 36px; width: auto; max-width: 115px; object-fit: contain; display: block; }
.pkpass__mark {
  background: var(--white); color: var(--ink); border-radius: 5px;
  padding: 5px 7px; font-family: var(--mono); font-size: var(--t-eyebrow); font-weight: 500;
}
.pkpass.is-light .pkpass__mark { background: var(--ink); color: var(--white); }
.pkpass__logotext { font-size: var(--t-micro); font-weight: 500; letter-spacing: .01em; opacity: .92; }
/* A poster with a header field leaves the logo text about one character. */
.pkpass__top > .pkpass__logotext.pkpass__logotext--clipped { max-width: 1ch; overflow: hidden; white-space: nowrap; text-overflow: clip; flex: none; }
/* The bundled placeholder a pass carries with no logo of its own: a blue
   striped bar at the logo's 160x50 shape. Hatched like .pkcode, so it reads as
   "nothing chosen here" rather than as a brand. */
.pklogo-placeholder {
  display: block; flex: none; height: 30px; aspect-ratio: 160 / 50;
  background: repeating-linear-gradient(90deg, #0a6cce 0 3px, #1e9cf0 3px 6px);
  border-radius: 2px;
}
.pkstack .pklogo-placeholder { height: 22px; }
/* The header field, in Apple's own corner: the far right of the LOGO row, not
   the bottom of a vertical stack. It is the only value a holder can read while
   the pass is stacked in Wallet, which is what the note beside its input has
   always claimed and what no screen drew. */
.pkpass__header { margin-left: auto; text-align: right; max-width: 46%; min-width: 0; }
/* With values on one line, the header and the logo text must both be allowed
   to shrink, or a long name runs left over the logo text instead of being cut
   -- which is what the phone does to both. */
.pkpass__top > .pkpass__logotext { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pkpass__header .pkfield { align-items: flex-end; }
.pkpass__body { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; }
.pkpass__fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
/* SECONDARY AND AUXILIARY ARE ROWS, up to four across, which is how Apple lays
   them out and why the four-field ceiling on a square barcode exists at all.
   Stacked vertically -- as they were -- a full row looked like a list with room
   for more, and Apple does not refuse the surplus: it stops drawing it on the
   device, where nothing here can see. */
.pkpass__rows { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.pkrow { display: flex; gap: 12px; align-items: flex-start; }
.pkrow .pkfield { flex: 1 1 0; min-width: 0; }
/* The strip is a BACKGROUND, and the primary value is drawn over it. Rendered
   as a band above the fields, as it was, the mock could not show that a busy
   image and a long value collide -- which is the single thing an operator is
   judging when they upload one. */
.pkpass__stripwrap { position: relative; margin: 15px -15px 0; }
.pkpass__over {
  position: absolute; inset: auto 15px 9px; text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.pkpass.is-light .pkpass__over { text-shadow: 0 1px 3px rgba(255, 255, 255, .55); }
/* The strip: full bleed, edge to edge, behind the value. 375x144 points on the
   real pass, so the preview keeps that ratio rather than letting a
   wrongly-shaped upload look correct here and wrong on the phone. */
.pkpass__strip {
  display: block;
  width: 100%;
  aspect-ratio: 375 / 144;
  object-fit: cover;
}

.pkpass__thumb {
  flex: none; width: 65px; height: 65px; border-radius: 5px; object-fit: cover;
  box-shadow: 0 0 0 1px currentColor;
}
/* Label above value, uppercase and small -- Apple's own treatment, and the
   thing the old mock omitted entirely. An operator could not see that every
   pass Fuse issues says LOTTO JACKPOT. */
.pkfield { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pkfield__label {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; opacity: .8;
}
/* ONE LINE, AND CUT. A field on the face of a pass does not wrap: the card is a
   fixed shape, and Wallet truncates a value that does not fit -- seen on iOS 27
   as "Reward Rea…" and "The Fuse Bra…". Wrapped, as it was, a long name took
   three lines here and showed in full while the phone cut it off. */
.pkfield__value { font-size: var(--t-micro); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The primary field is the largest thing on the pass. The old mock made the
   headline largest and the subheadline smallest, which is the inversion of
   what the phone shows. */
.pkfield--primary .pkfield__value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }

/* TWO KINDS OF EMPTY, DRAWN AS TWO DIFFERENT THINGS.

   --unset is a slot that IS on the pass and says "Not set" to the customer, so
   it keeps its weight and is only dimmed: the words really are there.
   --ghost is a slot the pass OMITS, so it is an outline holding space -- it
   must not read as something a customer would see. Both sit on the client's
   own colour, so the treatment is opacity and a dashed rule rather than a
   named ink that would collide with whatever background they chose. */
.pkfield--unset .pkfield__value { opacity: .55; font-style: italic; }
.pkfield--ghost {
  border: 1px dashed currentColor;
  border-radius: 6px;
  padding: 3px 6px;
  opacity: .45;
}
.pkfield--ghost .pkfield__value { font-style: italic; font-weight: 400; }
.pkfield--ghost.pkfield--primary .pkfield__value { font-size: var(--t-micro); font-weight: 400; letter-spacing: 0; }

.pkpass__barcode {
  background: var(--white); border-radius: 5px; padding: 9px;
  margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pkpass__barcode svg { width: 86px; height: 86px; display: block; }
/* The pass id, printed under the code exactly as Apple prints altText. It is
   long and ugly and the operator had never been shown it. */
.pkpass__alt {
  color: var(--ink); font-family: var(--mono); font-size: 8px;
  max-width: 100%; overflow-wrap: anywhere; text-align: center;
}

/* APPLE'S POSTER FACE, from iOS 27. TR-P18.
   Full-bleed artwork with the content over it, so the ground is the art and
   the fields sit on top. --tint rather than the brand colour for the empty
   ground: there is no background slot yet, and painting the brand colour here
   would read as a finished poster rather than a missing image. Borders, not
   shadows. */
/* DRAWN TO THE DEVICE, NOT TO A GUESS. Measured off an iPhone on iOS 27 on 30
   September 2026 (The Fuse Braai 2026, a 923px-wide screenshot), as fractions
   of the CARD:

     the card            847 x 1181, an aspect of 0.717 -- NOT the artwork's
                         0.80, so Wallet fills the height and crops ~5% off
                         each side, which object-fit: cover does here too
     logo and header     top 2.6% to 10%, 4% in from each side
     the barcode tile    46.7% to 77.8% down, 43.6% of the width, square
     the field columns   labels at 84%, values at 87.7%

   The mock was a 5:6 box with its three rows spread by space-between, which put
   the barcode at roughly 30-62% and squashed the open third -- the only part of
   the artwork a holder sees -- to nothing. CLAUDE.md recorded that disagreement
   on 23 September; this is it fixed. Sizes are in cqw so the whole face scales
   with the card, as it does between iPhones. */
.pkpass--poster { padding: 0; min-height: 0; background: transparent; border-radius: 14px; }
.pkposter {
  position: relative; width: 100%; aspect-ratio: 847 / 1181;
  border-radius: 14px; overflow: hidden; container-type: inline-size;
}
/* NO ARTWORK YET: the design's own colour, hatched. It was --tint, which kept
   the promise that a missing image must not read as a finished poster -- and
   broke a worse one, because the fields and the header are WHITE and vanished
   into it, so a design without artwork previewed as a blank card. The hatch and
   the note still say "missing"; the colour lets the content be read. */
.pkposter__art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 6px, transparent 6px 14px), var(--pass-bg);
  display: flex; align-items: center; justify-content: center;
}
.pkposter__artnote {
  position: absolute; top: 24%; left: 0; right: 0;
  font-size: 9px; color: var(--white); opacity: .8; text-align: center; padding: 0 12px;
}
.pkposter__art--image { display: block; object-fit: cover; object-position: center; }
/* THE BOTTOM QUARTER IS WALLET'S, NOT THE ARTWORK'S. Seen on an iPhone on iOS
   27 on 7 October 2026, with a bright day poster published to the Braai for
   exactly this (docs/review/assets/2026-10-07-braai-day-poster-iphone.webp):
   the image stops at 75.8% of the card, level with the barcode tile's lower
   edge, and from there Wallet paints a band of its own -- brown into purple on
   that poster, colours plainly drawn from the artwork -- and the columns sit on
   THAT. The mock drew the artwork to the bottom edge, so sand and embers
   composed below three quarters previewed as visible and never appeared.
   Wallet's colours are its own choice, so this is a stand-in: the artwork
   beneath, blurred and darkened, which is where the phone's come from. Under
   .pkposter__over, so the fields still draw on top. */
.pkposter__strip {
  position: absolute; top: 75.8%; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .05), rgba(30, 10, 50, .5));
  backdrop-filter: blur(18px) saturate(1.1) brightness(.72);
}
.pkposter__over { position: absolute; inset: 0; }
/* REVIEW 48 §1.10. WHERE THE ARTWORK IS SEEN, drawn on request over the mock.
   No numbers here: every band's top and height, and the side guides' inset,
   come from POSTER_SAFE_AREAS in app.js through setProperty, so the overlay,
   its legend and the contrast check read one declaration. Above the fields
   and the code, because it is a measuring tool laid over the finished face. */
.pkposter__safe { position: absolute; inset: 0; pointer-events: none; }
.pkposter__band {
  position: absolute; left: 0; right: 0; top: var(--band-top); height: var(--band-height);
  border-top: 1px dashed rgba(255, 255, 255, .85); box-sizing: border-box;
}
.pkposter__band span {
  position: absolute; left: 2cqw; top: 1cqw; font-size: 2.6cqw; line-height: 1.2;
  color: #fff; background: rgba(0, 0, 0, .6); padding: .4cqw 1.2cqw; border-radius: 1cqw;
}
.pkposter__band--text { background: rgba(255, 196, 0, .22); }
.pkposter__band--open { background: rgba(0, 200, 120, .16); }
.pkposter__band--hidden { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .38) 0 5px, rgba(0, 0, 0, .16) 5px 10px); }
/* The strip band ends at the card's foot and starts above the tile's; its
   label sits at its own foot so the two labels cannot overprint. */
.pkposter__band[data-band="strip"] span { top: auto; bottom: 1cqw; }
.pkposter__side {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed rgba(255, 64, 64, .95);
}
.pkposter__side--left { left: var(--side-inset); }
.pkposter__side--right { right: var(--side-inset); }
.pkposter__legend { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--muted); }
.pkposter__legend li { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.pkposter__swatch { flex: none; width: 12px; height: 12px; border: 1px solid var(--line); border-radius: 2px; }
.pkposter__swatch--text { background: rgba(255, 196, 0, .45); }
.pkposter__swatch--open { background: rgba(0, 200, 120, .35); }
.pkposter__swatch--hidden { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .5) 0 3px, rgba(0, 0, 0, .15) 3px 6px); }
.pkposter__swatch--side { border: 0; border-left: 2px dashed rgba(255, 64, 64, .95); border-radius: 0; }
.pkposter__over .pkpass__top {
  position: absolute; top: 3.6cqw; left: 4cqw; right: 4cqw; min-height: 0; align-items: flex-start;
}
.pkposter__over .pkpass__logo { height: 7.8cqw; max-width: 46cqw; }
.pkposter__over .pkpass__header .pkfield { gap: 0; }
.pkposter__over .pkpass__header .pkfield__label { font-size: 3.4cqw; line-height: 1.1; letter-spacing: .02em; opacity: 1; }
.pkposter__over .pkpass__header .pkfield__value { font-family: var(--mono); font-size: 4.2cqw; line-height: 1.15; font-weight: 400; }
/* ONE ROW, HOWEVER MANY FIELDS. A poster has no second or third row -- the
   editor's own note beside the layout picker says so, and pass-preview.js drops
   anything that will not fit into `poster.dropped` for exactly that reason.
   This was `1fr 1fr`, a two-column grid, so a ticket with three fields wrapped
   to two rows in the mock and one row on the phone. The preview was the only
   place that disagreement existed, which is the worst place for it: a mock is
   read as the answer to "what will this look like".

   grid-auto-flow with equal columns rather than flex, so four narrow fields
   share the width the way Wallet lays them out instead of hugging their text. */
.pkposter__fields {
  position: absolute; top: 82.3%; left: 4cqw; right: 4cqw;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0 3cqw; align-items: start;
}
/* The phone title-cases these (posterLabel in app.js) and draws values in a
   monospaced face; the header keeps its capitals. */
.pkposter__fields .pkfield { gap: 0; }
.pkposter__fields .pkfield__label { font-size: 3.6cqw; line-height: 1.1; letter-spacing: 0; text-transform: none; font-weight: 400; font-family: var(--mono); opacity: 1; }
.pkposter__fields .pkfield__value { font-family: var(--mono); font-size: 4.6cqw; line-height: 1.2; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkposter__fields .pkfield:nth-child(2):not(:last-child) { text-align: center; align-items: center; }
.pkposter__fields .pkfield:last-child:not(:first-child) { text-align: right; align-items: flex-end; }

/* THE CODE SITS ON THE ART, between the logo row and the fields, which is
   where a real pass draws it. Centred and capped so it reads as the largest
   thing on the pass without swallowing the artwork the poster exists to show. */
/* No margin auto: .pkposter__over is space-between over three children, so the
   logo row, the code and the fields land top, middle and bottom on their own. */
.pkposter__code {
  position: absolute; top: 46.7%; left: 28.2%; width: 43.6%; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--white); border-radius: 2.4cqw;
}

/* AN UNDRAWN SYMBOLOGY, AT ITS REAL SHAPE. See barcodePlaceholder.
   Only QR has an encoder, and the other three were rendering as one line of
   text -- so a design using Code 128 previewed with a barcode the height of a
   caption where the pass has a strip across it. The proportions here are the
   ones Apple draws: square for Aztec and QR, a wide rectangle for PDF417, a
   wide short strip for Code 128.

   Hatched rather than barred ON PURPOSE. A plausible pattern would make the
   mock look scannable when nothing in it is encoded, and a screenshot of it
   would eventually be pointed at a reader. The hatch says "a code goes here,
   this big"; it cannot be mistaken for the code. */
.pkcode {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px), var(--white);
  border: 1px solid var(--line); border-radius: 3px; width: 100%;
}
.pkcode--square { aspect-ratio: 1 / 1; max-width: 118px; margin: 0 auto; }
.pkcode--wide { aspect-ratio: 5 / 2; max-width: 168px; margin: 0 auto; }
.pkcode--line { aspect-ratio: 6 / 1; max-width: 168px; margin: 0 auto; }
.pkcode__name {
  font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--white); padding: 1px 4px; border-radius: 2px;
}
.pkposter__code svg, .pkposter__code img { width: 86%; height: auto; background: var(--white); }
.pkposter__code .pkpass__alt:empty { display: none; }

/* A LONGER SCREEN FOR THE POSTER, because the phone is. The frame was as tall as
   its content, so the card and the tiles filled a squat box; an iPhone is about
   9:19.5, and the open pass sits under a row of controls with the tiles below. */
.phone--poster { aspect-ratio: 9 / 19.5; padding: 40px 10px 18px; display: flex; flex-direction: column; }

/* THE TILES WALLET DRAWS UNDER THE PASS, from iOS 27. TR-P17.
   Inside .phone and outside .pkpass, because a featured action is beside the
   card rather than on it -- which is the one thing about this feature a mock
   has to get right. Two at most, so a fixed two-column grid rather than a
   wrapping flex: a single tile should sit at half width the way Wallet draws
   one, not stretch to fill the row. Borders, not shadows, and --tint is the
   phone's own ground so these carry --white to lift off it. */
.pktiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.pktiles .field__note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 9px; }
.pktile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.pktile__type { font-size: 9px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pktile__caption { font-size: 8px; color: var(--muted); }
.pktile__note { font-size: 8px; color: var(--muted); overflow-wrap: anywhere; }

/* ── A tile's icon, a stand-in for Apple's ─────────────────────────────
   Apple draws its own symbol in a filled circle. The five colours are the ones
   SEEN on a phone (pass-featured-actions.js `seen`), declared here on the
   component and not on :root -- :root is held to the Figma file and is compared
   declaration for declaration, the same reason the chart ramp lives on .chart.
   Sampled off an iPhone on iOS 27: red #E84B4C and blue #0190F6 on 30 Sep 2026;
   orange and purple from 23 Sep, approximated to Apple's system colours;
   magenta #DB34F2 sampled off View Offers and Rewards on 14 Oct 2026; pink
   #FF3863 off Listen to Music on 24 Nov 2026. Grey
   means no phone has shown that type yet. */
.tileicon {
  --tile-red: #e84b4c;
  --tile-blue: #0190f6;
  --tile-orange: #ff9f0a;
  --tile-purple: #bf5af2;
  --tile-magenta: #db34f2;
  --tile-pink: #ff3863;
  --tile-unseen: #8e8e93;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--tile-unseen); color: #fff;
}
.tileicon svg { width: 11px; height: 11px; }
.tileicon--red { background: var(--tile-red); }
.tileicon--blue { background: var(--tile-blue); }
.tileicon--orange { background: var(--tile-orange); }
.tileicon--purple { background: var(--tile-purple); }
.tileicon--magenta { background: var(--tile-magenta); }
.tileicon--pink { background: var(--tile-pink); }
.tileicon--none { background: transparent; border: 1px dashed var(--line); }
.action-pick { display: flex; align-items: center; gap: var(--s-3); }
.action-pick .tileicon { width: 28px; height: 28px; }
.action-pick .tileicon svg { width: 16px; height: 16px; }
.action-pick select { flex: 1; min-width: 0; }

/* ── The pass at rest ──────────────────────────────────────────────────
   A pass spends almost all of its life collapsed in the Wallet stack, showing a
   band of its background, the brand mark and the header field. The two cards
   behind are the rest of the holder's wallet, drawn in the same colour at low
   opacity: what is being judged is whether this brand is recognisable in a
   40-point sliver among five others, which is a different question from whether
   the open pass looks good. */
.pkpass--stacked { background: none; padding: 0; min-height: 0; gap: 0; }
.pkstack { display: flex; flex-direction: column; }
.pkstack__card {
  background: var(--pass-bg);
  border-radius: 12px;
  padding: 13px 15px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Overlapped, so the two behind read as a stack rather than as three passes in
   a list. The one in front keeps its full height; the others are a sliver. */
.pkstack__card.is-behind { min-height: 34px; margin-bottom: -14px; order: -1; opacity: .55; }
.pkstack__card.is-behind-2 { min-height: 30px; margin-bottom: -14px; order: -2; opacity: .3; }
.pkstack__logo { height: 22px; width: auto; max-width: 84px; object-fit: contain; display: block; }

/* The back of the pass. Three fields on every pass Fuse has ever issued,
   invisible in the studio until now -- which is how one client's name went
   on being printed on every other client's pass. */
/* AND IT IS WALLET'S SCREEN, NOT THE CARD. Seen on an iPhone on 30 September
   2026, in dark mode: the pass's name as a title, then a grouped list on the
   phone's own ground -- labels as written, values in the system grey, links
   on one line with the address right-aligned in the system blue. These are
   Apple's dark-mode system colours, not brand or studio tokens, because that is
   what the holder is looking at. */
.pkpass.pkpass--back { background: #000; color: #fff; }
.pkback { display: flex; flex-direction: column; gap: 10px; }
.pkback__title { font-size: 15px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.pkback__list { background: #1c1c1e; border-radius: 12px; padding: 0 11px; }
.pkback__row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.pkback__row + .pkback__row { border-top: 1px solid #38383a; }
.pkback__row--link { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 8px; }
.pkback__label { font-size: var(--t-micro); }
.pkback__value { font-size: var(--t-micro); color: #98989f; overflow-wrap: anywhere; }
.pkback__row--link .pkback__value { text-align: right; min-width: 0; }
.pkback__link { color: #0a84ff; text-decoration: none; }

/* ── Google ──────────────────────────────────────────────────────────
   The round logo and the issuer's name, kept for the collapsed stack. */
.gpass__logo { height: 28px; width: 28px; border-radius: 50%; object-fit: cover; background: var(--white); }
/* Android draws the disc whether or not a design published google-logo.png, so
   the mock draws it too. Omitting the slot made a missing asset read as a
   tidier card. */
.gpass__logo--empty {
  display: flex; align-items: center; justify-content: center; flex: none;
  color: var(--ink); font-family: var(--mono); font-size: var(--t-eyebrow); font-weight: 600;
}
.gpass__title { font-size: var(--t-micro); font-weight: 500; opacity: .92; }

/* ── The open Android pass, which is a SCREEN ──────────────────────────
   Measured off the Braai event ticket on an A16, 4 October 2026, at the
   phone's 412dp scaled to this frame's 250px (x0.61). The 2026 redesign paints
   the brand colour over the whole screen, so the frame loses its own padding
   and ground and the pass fills it -- a card on the studio's grey made a
   vibrant colour read as an accent, and on the device it is everything.

   The details were drawn on the studio's white, in the workspace's ink, under
   a "Details" heading. On the device they are tiles a shade off the brand
   colour, on the brand colour, with no heading -- so they inherit the pass's
   foreground like everything else on the screen. */
.phone--android { padding: 0; overflow: hidden; }
.gscreen {
  --pass-bg: #0a6cce;
  background: var(--pass-bg);
  color: var(--white);
  border-radius: 21px;
  padding-bottom: 16px;
  min-height: 460px;
}
.gscreen.is-light { color: var(--ink); }
.gscreen__card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 13px 22px;
}
/* Centred, and never beside a title: the wide logo replaces the disc AND the
   issuer's name. 1280x400, so a fixed height keeps it the shape it was made. */
.gscreen__head { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 5px; }
/* 43% of the screen's width: the Fuse mark fills 940 of the file's 1280px and
   spanned 284 of the A16's 923, centred. */
.gscreen__wordmark { width: 43%; height: auto; aspect-ratio: 1280 / 400; object-fit: contain; display: block; }
.gscreen__disc {
  height: 56px; width: 56px; border-radius: 50%; object-fit: cover;
  background: var(--white); border: 1px solid currentColor;
}
.gscreen__disc--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-family: var(--mono); font-size: var(--t-body); font-weight: 600;
}
.gscreen__issuer { font-size: 10px; }
/* About twice the old title, and it wraps: "The Fuse Braai 2026" took two
   lines across the whole width on the device. */
.gscreen__title { font-size: 29px; font-weight: 700; line-height: 1.25; margin-top: 16px; overflow-wrap: anywhere; }
.gscreen__sub { font-size: var(--t-micro); margin-top: 14px; overflow-wrap: anywhere; }
.gscreen__sub--unset { opacity: .6; font-style: italic; }
.gscreen__code {
  background: var(--white); border-radius: 8px; padding: 12px; margin-top: 14px;
  display: flex; justify-content: center;
}
.gscreen__code svg { width: 96px; height: 96px; display: block; }
/* An undrawn symbology's stand-in is `width: 100%` of its tile, and this tile
   shrink-wraps inside a centred column -- so PDF417 and Code 128 collapsed to
   a 44x18 chip around their own label. Sized here instead: square at the QR's
   96px, the wide two at the 168px their own max-width allows. */
.gscreen__code .pkcode--square { width: 96px; }
.gscreen__code .pkcode--wide, .gscreen__code .pkcode--line { width: 168px; }
.gscreen__alt { font-size: 10px; font-weight: 600; margin-top: 6px; overflow-wrap: anywhere; }
/* Start item at the left edge, end item at the right, a third in the middle:
   twoItems and threeItems as Google lays them out. */
.gscreen__rows { align-self: stretch; display: flex; flex-direction: column; gap: 18px; margin-top: 28px; text-align: left; }
/* EQUAL COLUMNS, not content-sized ones. Sized by content, a long end value --
   "An Extremely Long Company Name (Holdings) Limited" -- took the whole row and
   squeezed the guest's name to "Gue / st". Each item gets its share and wraps
   inside it. */
.gscreen__row { display: flex; gap: 10px; }
.gscreen__cell { flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.gscreen__cell:last-child:not(:first-child) { text-align: right; }
.gscreen__cell:nth-child(2):not(:last-child) { text-align: center; }
.gscreen__label { font-size: 9px; }
.gscreen__value { font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
/* Under the card, the full width of the screen, at Google's own proportion. */
.gscreen__hero { display: block; width: 100%; aspect-ratio: 1032 / 812; object-fit: cover; }
.gscreen__hero--empty {
  display: flex; align-items: center; justify-content: center;
  border-top: 1px dashed currentColor; border-bottom: 1px dashed currentColor; opacity: .55;
  font-size: var(--t-micro);
}
.gtiles { display: flex; flex-direction: column; gap: 2px; margin: 12px 13px 0; border-radius: 13px; overflow: hidden; }
.gtile {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .1); padding: 15px 13px;
}
.gscreen.is-light .gtile { background: rgba(0, 0, 0, .06); }
.gtile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gtile__title { font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
/* Labels exactly as the design wrote them -- GUEST in capitals, The evening
   not -- where .gdetails__label upper-cased every one. Two lines, then cut. */
.gtile__body {
  font-size: var(--t-micro); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* A link is one line beside its icon, as the device draws Questions and Event pack. */
.gtile--link { gap: 12px; padding-block: 14px; }
.gglyph { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Google's own collapsed state ──────────────────────────────────────
   Apple had three faces and Google had none, which read as the mock being
   half-built for Android. It was, but not symmetrically: Google has no BACK --
   which is why the rows a design writes for one arrive as text modules under
   Details -- and it certainly has a collapsed state, because a Wallet holding
   four passes shows four collapsed cards.

   The difference from Apple's stack is the whole reason to draw it. Collapsed,
   an Apple pass shows the brand mark AND the header field, one value the design
   picks. Google's shows the logo and the card title and nothing else: there is
   no header slot to put a number in. The editor already tags "Stacked value" as
   Apple only; this is the screen that makes that tag mean something. Same
   geometry as .pkstack, deliberately, so the two are comparable by flipping
   the platform tab rather than by remembering. */
.gpass--stacked { background: none; padding: 0; min-height: 0; }
.gstack { display: flex; flex-direction: column; }
.gstack__card {
  background: var(--pass-bg);
  border-radius: 12px;
  padding: 13px 15px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gstack__card.is-behind { min-height: 34px; margin-bottom: -14px; order: -1; opacity: .55; }
.gstack__card.is-behind-2 { min-height: 30px; margin-bottom: -14px; order: -2; opacity: .3; }

/* ── The platform / side switch ────────────────────────────────────────
   A segmented control rather than tabs: two or three peers, one chosen, no
   panel semantics underneath. Borders not shadows, like everything else. */
/* The group's outer edge is a control's boundary, so it is the 3.37:1 control
   edge, not the 1.19:1 hairline (full pass, 20 October 2026). */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.seg--quiet { margin: 12px 0 0; }
.seg__item {
  appearance: none; border: 0; background: var(--white); color: var(--muted);
  font: inherit; font-size: var(--t-data); padding: var(--s-2) var(--s-4); cursor: pointer;
}
.seg__item + .seg__item { border-left: 1px solid var(--line); }
.seg__item:hover { color: var(--ink); }
.seg__item.is-on { background: var(--ink); color: var(--white); font-weight: 500; }

/* ── The notification preview ──────────────────────────────────────────
   Two lock screens side by side, because the two platforms do genuinely
   different things and the studio said neither: Apple raises a banner from
   the changed field's changeMessage, Google appends a message to the pass
   and notifies. Drawn as a phone's dark ground rather than the studio's
   white, because that is the surface the sentence lands on and its
   legibility there is the thing being judged. */
.notify { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-6); }
.notify__col { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.lockscreen { background: var(--ink); border-radius: 14px; padding: 14px 12px 16px; }
.lockscreen__time { color: var(--white); font-size: 26px; font-weight: 300; text-align: center; letter-spacing: -.01em; opacity: .92; }
/* The notification itself: a light card on the dark ground, the way both
   platforms render one. */
.lock { background: rgba(255, 255, 255, .93); border-radius: 10px; padding: 9px 11px; margin-top: 12px; }
.lock__app { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lock__title { font-size: var(--t-data); font-weight: 600; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.lock__body { font-size: var(--t-data); color: var(--ink); margin-top: 1px; overflow-wrap: anywhere; }
.lockscreen + .lockscreen { margin-top: 8px; }

/* ── The drawer ────────────────────────────────────────────────────────
   A real <details>, not a class and a click handler: it opens with a
   keyboard, it is announced as expandable, and it survives a re-render
   because the open state lives on the element rather than in a variable
   render() would rebuild past. */
.drawer { border: 1px solid var(--line); border-radius: var(--radius); margin-top: 18px; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); cursor: pointer; font-size: var(--t-data); font-weight: 500;
  list-style: none;
}
/* The default marker is a wingding in one browser and an arrow in another,
   so it is replaced with the same character .linkarrow uses, rotated. */
.drawer__head::-webkit-details-marker { display: none; }
.drawer__head::after { content: "\2192"; color: var(--muted); transition: transform .2s var(--ease); }
.drawer[open] .drawer__head::after { transform: rotate(90deg); }
.drawer__head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--radius); }
.drawer__hint { color: var(--muted); font-weight: 400; font-size: var(--t-micro); margin-left: auto; margin-right: 8px; }
.drawer__body { padding: 0 var(--s-5) var(--s-5); border-top: 1px solid var(--line); }
.drawer__body > .field__note { display: block; margin: 12px 0 14px; }

/* ── Generated assets ──────────────────────────────────────────────────── */
.route {
  background: var(--ink);
  color: var(--muted-lift);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  font-family: var(--mono);
  font-size: var(--t-data);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.qr { width: 186px; height: 186px; display: block; margin: 0 auto; border: 10px solid var(--white); box-shadow: 0 0 0 1px var(--line); }

/* ── Toast ─────────────────────────────────────────────────────────────
   Derived from .iam-band -- --ink-lift, --line-dark, white text. This is the
   SECOND and last legitimate use of --lift, whose comment reserves it for
   something that overlays content. A toast overlays. */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: none;
  max-width: min(420px, calc(100vw - 48px));
  background: var(--ink-lift);
  color: var(--white);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  padding: var(--s-4) var(--s-5);
  font-size: var(--t-body);
}
.toast.show { display: block; }

/* Always rendered, never seen: the announcer the toast bubble cannot be. */
.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Empty ─────────────────────────────────────────────────────────────
   Not the hub's .empty__display at 52px: the hub's empty state owns a whole
   page, and these sit INSIDE tables and panels. */
.empty { padding: var(--s-8) var(--s-7); text-align: center; color: var(--muted); font-size: var(--t-data); }
.tablewrap .empty { padding: var(--s-7) var(--s-5); }

/* ============================================================================
   RESPONSIVE — redesigned at each step, not scaled
   ========================================================================= */
@media (max-width: 1120px) {
  :root { --rail: 204px; --pad: 24px; }
  /* Figma's 16px cells, measured at 1440, pushed three more tables into a
     sideways scroll at 1024 (Campaigns, Analytics, a design's Distribute tab).
     12px across keeps the rows' height and gives the columns back. */
  .table th, .table td { padding-inline: var(--s-4); }
  .band, .band--wide { grid-template-columns: minmax(0, 1fr); }
  /* One column puts the preview AFTER the form, where sticking it would pin a
     pass to the bottom of a page the operator has already scrolled past. */
  .panel--sticky { position: static; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 73px auto minmax(0, 1fr); }
  /* The rail sits under the header and stays ink, so the shell is still one
     surface. UX-107: it WRAPS rather than scrolls. A horizontal scroller with
     its scrollbar hidden put Analytics and Settings off the right edge of a
     375px screen with nothing to say they were there; at eight destinations,
     two rows show all of them, which a menu button would only hide again. */
  .module-rail {
    position: static;
    height: auto;
    width: 100%;
    padding: 0 var(--s-3);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: visible;
    border-bottom: 1px solid var(--line-dark);
    /* On ink a scrollbar track reads as a stray grey rule under the tabs.
       Swipe and keyboard scrolling are unaffected. */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .module-rail::-webkit-scrollbar { display: none; }
  /* Review 48 §0.11: no gap between tabs, which carry their own padding. */
  .module-rail__nav { flex-direction: row; flex-wrap: wrap; gap: 0; }
  /* `contents`, so the tabs wrap as one list. As flex rows of their own the
     groups wrapped as whole units, and nine destinations took four rows. */
  .module-rail__group, .module-rail__group:not(:first-child):not(:has(.module-rail__label)) { display: contents; }
  /* The top bar keeps its discs and drops the names on a phone. The Fuse
     Wallet lock-up is 216px at 28px tall, and with it the bar ran 86px past a
     375px screen with the account menu off the edge, so on a phone it is 20px
     tall (154px), the gaps are 8px and Search is tighter. */
  .app-header { gap: var(--s-3); padding: 0 var(--s-4); }
  .app-header__logo { height: 20px; }
  .app-header__search { padding-inline: var(--s-4); }
  .app-header__workspace-name, .usermenu__name { display: none; }
  .usermenu__toggle { padding-right: var(--s-2); }
  .usermenu__toggle::after { content: none; }
  /* The workspace is just its disc on a phone -- the pill's edge goes with the
     name rather than hugging the disc off-centre. With a choice, the select is
     laid over the disc, invisible, so tapping the disc opens the phone's own
     picker sheet: it was squeezed to 16px wide, where nothing could be read or
     pressed. */
  .app-header__workspace { position: relative; border: 0; padding: 0; height: auto; flex: none; }
  .app-header__workspace select { position: absolute; inset: 0; max-width: none; width: 100%; padding: 0; opacity: 0; }
  .module-rail__label, .module-rail__foot { display: none; }
  /* Tabs at 14px, not the desktop rail's 48px items at 16px: at that size the
     nine destinations wrapped to four rows on a 375px screen, where UX-107
     settled on two.
     Review 48 §0.11: and at 12px a side they still took THREE rows once the
     Till made nine, measured at 360 and 375. 6px a side, a 4px gap to the
     count, 8px rail edges and no gap between tabs puts them on two rows at
     360px (334px and 329px of a 344px row), which
     test-studio-review-48.js pins by number. The tap target keeps its
     12px top and bottom. */
  .module-rail a, .module-rail button {
    width: auto;
    min-height: 0;
    border-radius: 0;
    gap: var(--s-1);
    padding: var(--s-4) var(--s-2);
    font-size: var(--t-body);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
  }
  /* A tab underline here, not the desktop's boxed edge: the boxed edge would
     draw all four sides around a tab. */
  .module-rail [aria-current="page"] { background: none; border-color: transparent; border-bottom-color: var(--blue); }
  .tile-grid { grid-template-columns: minmax(0, 1fr); }
  /* UX-107. Tabs and steppers stay a ROW and scroll, with a fade at the edge
     saying there is more. Stacked, a design's four tabs were a 225px list
     above the thing they switch between. */
  .steps { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .steps::-webkit-scrollbar { display: none; }
}

@media (max-width: 560px) {
  :root { --pad: 16px; --gap: 14px; --t-name: 25px; --t-title: 19px; --t-lede: 16px; --t-value: 22px; }
  .main { padding: var(--s-5) var(--pad) var(--s-8); }
  .form-row, .option-grid { grid-template-columns: minmax(0, 1fr); }
  .cells { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .page-head { align-items: flex-start; }
  .toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================================
   NOT CARRIED OVER FROM THE HUB, and why
   --t-display and .masthead--editorial: the hub's own comment calls display
   scale "unreadable on a work surface". The italic-accent headline: brand
   voice, and it reads as marketing copy in a control panel. .empty__display at
   52px: the wallet's empty states sit inside tables. The masthead grid and
   halo: decorative, and they repaint on every click because #app is rebuilt
   wholesale. .offer-card__media's drawn motif: the wallet has real imagery.
   .eyebrow--brand: the stylesheet itself scopes it to "the hub and nowhere
   dense". .fuse-only: the whole studio is the Fuse-only zone. .rowlink: no
   wallet row has a destination. The print stylesheet: nobody prints this.
   ========================================================================= */

/* ============================================================================
   BEFORE WE KNOW WHO YOU ARE
   The shell shipped as though somebody were signed in -- a Sign out button and
   "Loading..." where the account goes -- for the two or three seconds ClerkJS
   takes to load, and permanently when it never loads at all. The first screen
   a visitor met offered to sign them out of a session they did not have.

   Driven by data-auth on .app, set to "in" only once a session is confirmed,
   so the default state of the markup is the honest one: nothing claiming an
   account. A data attribute and a rule here rather than a style written from
   JS, which is what the design-system guard requires anyway.
   ========================================================================= */
.app:not([data-auth="in"]) [data-when-signed-in] { display: none; }

/* The rail's account block keeps its space while we check, so confirming a
   session does not shift the page under the pointer. */
.app:not([data-auth="in"]) .module-rail__user { opacity: .55; }

/* The artwork slot an operator was just sent to. A file input cannot be opened
   from script, so "Add" can only take them to it -- and without a mark, being
   scrolled to a row of identical slots is not obviously an answer. */

/* ── A POPOUT: READ RARELY, READ WHOLE ─────────────────────────────────
   Version history in the page header. It is a property of the object rather
   than a step in making one, and at the foot of the editor column it was the
   tallest thing on the page on a design saved eight times -- below the work,
   where the sequence ended on a list of what the design used to say.

   A <details>, so the platform does the toggling: `script-src 'self'` makes an
   inline handler inert and the delegated dispatcher is for acts, not for
   showing and hiding. The summary reports state like every drawer hint here.

   Absolutely positioned so opening it does not shove the h1 down. Right-anchored
   because it sits at the right end of the header, and capped in height because
   a design with forty versions should scroll inside the popout rather than
   growing one. Borders, not shadows. */
.popout { position: relative; }
.popout > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--s-2) var(--s-4);
  font-size: var(--t-micro); background: var(--white);
}
.popout > summary::-webkit-details-marker { display: none; }
.popout > summary:hover { border-color: var(--ink); }
.popout__label { font-weight: 600; }
.popout__hint { color: var(--muted); }
.popout[open] > summary { border-color: var(--ink); }
.popout__body {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  width: min(680px, calc(100vw - 48px));
  max-height: min(70vh, 560px); overflow: auto;
  border: 1px solid var(--ink); border-radius: var(--radius); background: var(--white);
}
/* The panel inside already carries its own padding and border; a second border
   round it would draw a box in a box, which is the nesting this design system
   spends most of its rules avoiding. */
.popout__body > .panel { border: 0; border-radius: 0; margin: 0; }
@media (max-width: 760px) {
  .popout__body { right: auto; left: 0; width: calc(100vw - 32px); }
}

/* ── THE IDENTITY MODULE'S HEAD KEEPS ITS ACTION ON THE RIGHT ──────────
   .panel__head is flex-wrap:wrap, and its first child has no basis -- so a
   head whose prose runs the full width pushes the action onto a line of its
   own, left-aligned under the paragraph. Every other head here gets away with
   it because its text is short; this one explains what a design is and does
   not, which put Version history below the prose looking like an afterthought
   rather than beside the heading like every other panel action.

   A basis rather than nowrap: at narrow widths wrapping is still the right
   answer, and 320px is where the two stop fitting side by side. */

/* ── A FIELD'S NOTE IS ON DEMAND, NOT ON THE PAGE ──────────────────────
   Four controls to a block and a sentence under each one is four lines of
   explanation per field and twelve on a step -- prose that is worth reading
   once and then never again, printed permanently under the thing it explains.

   So inside a field block the note is revealed by hovering or focusing the
   field it belongs to. It is NOT removed: it stays in the DOM and in the
   accessibility tree, hidden with opacity rather than `display` or
   `visibility`, so a screen reader still reads it and nothing is lost -- which
   was the condition this change was asked for under.

   Absolutely positioned so revealing one does not move the fields under it.
   A note that pushed the page down on hover would be worse than one always
   there, because the control you were reaching for would move. */
.fieldblock .field { position: relative; }
.fieldblock .field > .field__note {
  position: absolute; left: 0; top: calc(100% + 5px); z-index: 6;
  width: max(100%, 240px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.fieldblock .field:hover > .field__note,
.fieldblock .field:focus-within > .field__note { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .fieldblock .field > .field__note { transition: none; }
}

/* A STATUS IS NOT A NOTE. The change message's token line answers "%@ missing
   -- without it iOS raises no notification at all", which is the one sentence
   in this block somebody needs WHILE typing rather than on demand: a change
   message without the token is silent, and silent is indistinguishable from
   delivered. It stays in flow. */
.field__status { font-size: var(--t-micro); color: var(--muted); margin-top: 4px; display: block; }

/* ── THE INTRO PAGE ────────────────────────────────────────────────────
   Overview used to be a CTA, a four-stage stepper and four tiles: 53 words,
   and the stepper derived "where you are" from campaigns.length, so three
   paused test routes put a workspace at stage 3 of 4. It is the first screen
   anybody sees and it explained nothing about what the product is.

   Borders not shadows, one tint, cards with their own edges -- the same rules
   as every other surface here, and since D5 drawn to FW_Overview, which is
   this explainer. Nothing on this page is a new visual idea; what is new
   is that it says something. */
.intro-hero h2 { max-width: 30ch; }
.intro-hero p { max-width: 68ch; }
/* The one line that reports state. --tint is the only soft fill in this system
   and this is what it is for: a fact about THIS workspace, lifted off the
   panel without becoming a callout, which is reserved for something wrong. */
.intro-hero__state {
  background: var(--tint); border-radius: var(--radius); padding: var(--s-4) var(--s-4);
  font-size: var(--t-micro); color: var(--ink); margin: 0;
}

/* Four statements, as FW_Overview draws them: four separate cards, a soft-grey
   edge and 12px corners, 16px apart -- the same card D3 made of the metric
   tiles. They were a hairline grid. Still not buttons: a card you can press
   would be a promise the page cannot keep. Figma heads each with an icon
   square; the studio has no icon set to put in one, so the card leads with its
   title instead. */
/* FOUR, THEN TWO, THEN ONE -- DECLARED, not auto-fit, for the reason the
   method tiles give: auto-fit strands an orphan. At 240px columns the
   Overview's drawer took three and left the fourth alone; at 200px it fitted
   four at 1440 and went 3 + 1 at 1024. Four facts divide by four, two and
   one, so those are the only counts it may take. */
.intro-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1120px) { .intro-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .intro-facts { grid-template-columns: minmax(0, 1fr); } }
.intro-fact { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); }
.intro-fact h3 { margin: 0 0 var(--s-3); font-size: var(--t-card); }
.intro-fact p { margin: 0; font-size: var(--t-body); color: var(--muted); }

/* The five nouns, in the order the work is done. A button each, because every
   one of them IS a screen -- which is the difference between this and the
   stepper it replaces, where the stages were a diagram and went nowhere.

   FW_Overview draws them as ONE card holding the steps as columns, with no
   rules between them, rather than a hairline grid of cells: a numeral, the
   noun at 16px bold, and the workspace's own count under it. The numeral stays
   a number where the frame draws a tick, because a tick would need this page
   to decide a stage is "done", which is the stepper's mistake again. */
.intro-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-3);
}
.intro-step {
  display: grid; gap: var(--s-2); align-content: start;
  background: var(--white); border: 0; border-radius: var(--radius-md); padding: var(--s-5);
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.intro-step:hover { background: var(--tint); }
.intro-step__n {
  width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; font-size: var(--t-micro); font-weight: 600; color: var(--ink);
}
.intro-step__name { font-size: var(--t-card); font-weight: 700; }
.intro-step__blurb { font-size: var(--t-body); color: var(--muted); }
.intro-step__count { font-size: var(--t-body); font-weight: 600; color: var(--muted); margin-top: var(--s-1); }
.intro-step__count b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* UX-79. The editor's save bar stays in view. The answer to "have I saved
   this" sat 360px below the fold of a laptop screen, beside the button, and was
   the only thing on the page that said so. Sticky to the bottom of the editor
   column rather than fixed to the window, so it never covers the preview. */
.savebar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top-color: var(--ink);
}
.savebar > .field__note { font-size: var(--t-micro); }
/* The held navigation. The same strip as .confirm -- --tint, a hairline, one
   ink edge -- because it is the same kind of moment: the screen asking before
   it does something it cannot take back. */
.leave {
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.leave__ask { margin: 0; font-size: var(--t-data); color: var(--ink); font-weight: 600; }
/* UX-80. Passes in wallets on an older version, said in the save bar where
   the decision to move them is made -- not inside Version history, where it
   sat behind a summary reading "no versions yet". */
.behind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
  font-size: var(--t-data);
  color: var(--ink);
}
/* Archive lives here, below the sticky bar, so a destructive control does not
   travel down the page beside Publish on every scroll position. UX-94. */
.dangerrow { display: flex; justify-content: flex-end; }
/* UX-97 (started for UX-83). A way BACK points back. ".linkarrow" draws a
   forward arrow on everything, so "All passes" and "All campaigns" -- both
   links to the collection you came from -- pointed the way you were not
   going. */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-data);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: var(--s-2) 0;
}
.backlink::before { content: "\2190"; font-size: 12px; transition: transform .2s var(--ease); }
.backlink:hover { color: var(--ink); }
.backlink:hover::before { transform: translateX(-3px); }
/* UX-94. A row's secondary and destructive actions. Opens in place, stacking
   its buttons under the toggle, because a floating list would be clipped by
   the horizontally scrolling .tablewrap every table sits in. */
.rowmenu { display: inline-block; vertical-align: middle; }
/* The quiet outline button's measure -- 40px, 14px bold, the 3.37:1 control
   edge -- so More sits level with the Suspend pill beside it. It was a 33px
   pill on the 1.19:1 container hairline, nearly invisible on a hovered row's
   tint (full pass, 20 October 2026). */
.rowmenu__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--ink);
  padding: 0 var(--s-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
/* A row's actions sit level and apart: a text link, a pill and the More
   menu were flush against each other at 24, 40 and 33px. A cell cannot be a
   flex box without leaving the table, so the spacing is on its children. */
.table__actions > * { vertical-align: middle; }
.table__actions > * + * { margin-left: var(--s-3); }
.rowmenu__toggle::-webkit-details-marker { display: none; }
.rowmenu__toggle::after { content: "\25BE"; margin-left: 6px; font-size: 10px; }
.rowmenu[open] > .rowmenu__toggle { color: var(--ink); border-color: var(--ink); }
.rowmenu__list { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); margin-top: 8px; }
/* UX-86. An id, short on screen and whole when copied. Mono, because it is a
   machine string and should look like one; quiet, because it is never the
   thing a person scans a row for. */
.idchip {
  font-family: var(--mono);
  font-size: var(--t-micro);
  color: var(--muted);
  background: none;
  border: 0;
  padding: var(--s-0) 0;
  cursor: copy;
}
.idchip:hover { color: var(--ink); text-decoration: underline; }
/* UX-87. What is wrong, beside the box it is about. Red text on the canvas,
   in the same --t-data size as the field's own note, and a red edge on the
   control so the field reads as the problem from across the page. */
.field__error { display: block; margin-top: 6px; font-size: var(--t-data); color: var(--danger-text); }
[aria-invalid="true"] { border-color: var(--danger-text) !important; }
/* UX-88. What needs a person, one line each: the health, the sentence, and
   the way to the screen that fixes it. A list, not cards -- these are read top
   to bottom and acted on, not compared. */
.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.attention__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
  font-size: var(--t-data);
  color: var(--ink);
}
.attention__item:first-child { border-top: 0; }
@media (max-width: 640px) { .attention__item { grid-template-columns: 1fr; gap: var(--s-2); } }
/* UX-104. A toast says what kind of news it is. An error keeps a red edge and
   stays until dismissed; Undo and Dismiss are text actions on the dark ground,
   in the toast's own focus colour. */
.toast { align-items: center; gap: var(--s-5); }
.toast.show { display: flex; }
.toast[data-tone="error"] { border-left: 3px solid var(--rag-red); }
.toast__text { flex: 1; }
.toast__act {
  background: none;
  border: 0;
  padding: var(--s-1) 0;
  color: var(--blue);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.toast__act:hover { text-decoration: underline; }
/* UX-97. The way back sits above the eyebrow on an object page. */
.page-head .backlink { display: inline-flex; margin-bottom: 4px; }
/* UX-108. Every control a pointer has to hit is at least 24px in both
   directions (WCAG 2.2, 2.5.8). The selection box keeps its native 16px look
   inside a 24px label; text actions in a table get the height a finger needs
   without growing the row. */
.pickbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin: calc(var(--s-1) * -1) var(--s-1) calc(var(--s-1) * -1) calc(var(--s-1) * -1);
  vertical-align: middle;
  cursor: pointer;
}
.pickbox input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.linkarrow, .idchip, .backlink, details > summary { min-height: 24px; }
.linkarrow, .idchip { align-items: center; }
/* UX-105. A PENDING FETCH LOOKS PENDING. Twelve panels drew "Loading..." in the
   same grey sentence as "there is nothing here", and the first load was a
   blank white page for several seconds on production. Two bars where the
   content will be, the sentence beneath them as a caption, and a slow shimmer
   that stops for anybody who has asked for less motion. --tint is the only
   soft fill in the system, so the bars are --tint. The shimmer is a 16% ink
   alpha: it WAS --line, back when --line was that alpha, and the Figma tokens
   made --line a solid #e6ecf2 barely darker than the tint, so the shimmer all
   but stopped showing (full pass, 20 October 2026). */
.empty--loading { display: flex; flex-direction: column; gap: var(--s-3); align-items: stretch; text-align: left; }
.skeleton {
  display: block;
  height: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--tint) 0%, rgba(14, 20, 43, .16) 50%, var(--tint) 100%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.6s ease-in-out infinite;
}
.skeleton--short { width: 60%; }
.empty__label { font-size: var(--t-micro); color: var(--muted); }
@keyframes skeleton-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.page > .boot { display: flex; flex-direction: column; gap: var(--gap); }
.page > .boot .skeleton { height: 120px; border-radius: var(--radius); }
.page > .boot .skeleton--short { height: 48px; }

/* UX-107. The jump to the preview exists only where the preview is below the
   form. */
.jump-preview { display: none; }
@media (max-width: 1120px) { .jump-preview { display: inline-flex; } }
/* UX-112. The test pass's code, at a size a phone camera reads from a laptop
   screen, with the copyable link beside it. */
.testpass { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.testpass img { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
/* UX-110. The search palette: a panel over a dimmed page, borders not
   shadows except the one lift the system keeps for overlays. */
.palette { position: fixed; inset: 0; z-index: 40; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(14, 20, 43, .32); }
.palette__panel {
  position: relative;
  margin: 12vh auto 0;
  width: min(620px, calc(100vw - 32px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  padding: var(--s-3);
}
.palette__input { width: 100%; font-size: var(--t-body); padding: var(--s-4) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.palette__list { list-style: none; margin: var(--s-3) 0 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.palette__item { display: flex; align-items: baseline; gap: var(--s-4); width: 100%; min-height: 36px; padding: var(--s-3) var(--s-4); background: none; border: 0; border-radius: var(--radius-sm); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.palette__item:hover, .palette__item.is-on { background: var(--tint); }
.palette__kind { flex: 0 0 72px; font-size: var(--t-micro); color: var(--muted); }
.palette__label { font-size: var(--t-data); font-weight: 500; }
.palette__none { padding: var(--s-4); font-size: var(--t-data); color: var(--muted); }
.palette__hint { margin: var(--s-3) var(--s-4) var(--s-1); font-size: var(--t-micro); color: var(--muted); }
/* 40px, the height of the account pill beside it. */
.app-header__search { height: 40px; padding-block: 0; }
.app-header__search kbd { font-family: var(--mono); font-size: var(--t-micro); color: var(--muted-lift); margin-left: var(--s-2); }
@media (max-width: 560px) { .app-header__search kbd { display: none; } }
/* The till. The step box is a count, so it is narrow; the camera's picture is
   drawn on the light tint rather than ink, because nothing is painted on it and
   an ink ground would join INK_GROUNDS for a frame that is mostly video. */
.till__add { display: flex; align-items: center; gap: var(--s-3); }
.till__step { width: 9ch; }
.till__video { display: block; width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint); }

/* REVIEW 48 §1.18. THE PRINTED QR SHEET. Built by printQrSheet as a direct
   child of <body>, never inside #app, so printing can hide every other child
   of body outright -- hiding the page around a nested sheet keeps the page's
   height and the printer adds a blank sheet for each screenful. Never shown on
   screen: the print dialog is the preview.

   Sized in millimetres because it is paper, and each size is a NAMED page
   since @page cannot be scoped by class: an A5 sheet sent to a printer set to
   A4 would otherwise print top-left on the bigger sheet. Black on white and no
   brand colour, because a venue's printer is whatever it is and a QR code
   printed in a mid-tone is the one that will not scan. */
.printsheet { display: none; }
@page qr-a5 { size: A5 portrait; margin: 0; }
@page qr-a4 { size: A4 portrait; margin: 0; }
@media print {
  body[data-printing] > :not(.printsheet) { display: none !important; }
  body[data-printing] { background: var(--white); }
  .printsheet {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-sizing: border-box; color: var(--ink); background: var(--white); text-align: center;
    font-family: var(--font); break-inside: avoid;
  }
  .printsheet--a5 { page: qr-a5; width: 148mm; height: 209mm; padding: 14mm; gap: 7mm; }
  .printsheet--a4 { page: qr-a4; width: 210mm; height: 296mm; padding: 20mm; gap: 10mm; }
  .printsheet__mark { display: flex; align-items: center; justify-content: center; }
  .printsheet__logo { display: block; max-width: 70%; height: auto; }
  .printsheet--a5 .printsheet__logo { max-height: 22mm; }
  .printsheet--a4 .printsheet__logo { max-height: 32mm; }
  /* The name stands in for the mark only when there is no published mark. */
  .printsheet__name { display: none; font-weight: 700; }
  .printsheet--named .printsheet__name { display: block; }
  .printsheet--a5 .printsheet__name { font-size: 20pt; }
  .printsheet--a4 .printsheet__name { font-size: 30pt; }
  /* Ink, said rather than inherited: the studio's base `p` is muted grey, and
     the one sentence on the sheet is the one that must read across a table. */
  .printsheet__line { margin: 0; max-width: 32ch; font-weight: 600; line-height: 1.25; color: var(--ink); }
  .printsheet--a5 .printsheet__line { font-size: 16pt; }
  .printsheet--a4 .printsheet__line { font-size: 24pt; }
  /* The quiet zone is in the SVG; nothing here may crop it. */
  .printsheet__qr { display: block; height: auto; }
  .printsheet--a5 .printsheet__qr { width: 90mm; }
  .printsheet--a4 .printsheet__qr { width: 130mm; }
  .printsheet__route { margin: 0; font-family: var(--mono); font-size: 8pt; color: var(--muted); word-break: break-all; }
}
/* What the till remembers about the pass in front of it (review 48 §1.12):
   one line under the holder's name, muted so it reads as context to the
   verdict rather than competing with it. */
.till__history { margin: var(--s-2) 0 0; font-size: var(--t-body); color: var(--muted); }
/* The door's count, at the KPI figure's size, because it is read from across
   a doorway rather than from a chair. */
.till__count { font-size: var(--t-title); }
.till__count b { font-size: var(--t-value); line-height: 1.15; }
/* CHECK-IN MODE (review 48 §1.14): the till on its own. The rail and both
   headers go, and the workspace column takes the whole window -- a door
   laptop has nothing to navigate to, and a menu one tap from Settings is a
   menu somebody will open by accident with a queue in front of them. */
.app[data-mode="checkin"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.app[data-mode="checkin"] .app-header,
.app[data-mode="checkin"] .module-rail,
.app[data-mode="checkin"] .page-head { display: none; }
