/* ─────────────────────────────────────────────────────────────────────────────
   Cuelight — web design system

   The same three ideas as the desktop app (src/renderer/shared/theme.css): a
   warm near-black stage, one amber light on it, geometry built from thick
   strokes with rounded ends. This file holds the tokens, the base layer and
   the components; each page adds only its own layout on top.

   Fonts are served from /assets/fonts, not a CDN, so the pages look right on
   a network with no way out to the internet.
   ───────────────────────────────────────────────────────────────────────────── */

@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root{
  /* Ghost Light — the same palette, with the same values, as the desktop app
     (src/renderer/shared/theme.css); test/palette.test.js holds the two files
     to each other. A true-black stage and one warm-white bulb for the accent.
     Colours are named for what they mean; each used with an alpha also has an
     -rgb token, so a tint follows the palette instead of staying a literal. */
  --stage-900:#000000; --stage-850:#0A0A0A; --stage-800:#111111;
  --stage-750:#1A1A1A; --stage-700:#242424; --stage-600:#2E2E2E;
  /* Base ground (rgb) for translucent insets, and the popover surface. Both
     flip in the light theme below so no dark inset survives on a light page. */
  --ground-rgb:0,0,0; --panel-rgb:10,10,10;
  --popover-bg:rgba(20,20,20,.97);

  /* --fg-3 is #8E8A84, not #75706A: the old value measured under 4:1 on
     the stage, short of the 4.5:1 body text needs, and it set hints people read. */
  --fg:#EDEAE4; --fg-2:#B2AEA7; --fg-3:#8E8A84; --fg-4:#5E5B56;

  --line-rgb:255,245,230;
  --line:rgba(var(--line-rgb),.07);
  --line-mid:rgba(var(--line-rgb),.11);
  --line-strong:rgba(var(--line-rgb),.18);

  /* The light: one warm-white bulb, applied flat. */
  --accent-rgb:242,223,184;
  --accent:#F2DFB8; --accent-bright:#FFF1D6; --accent-deep:#C9B58C;
  --on-accent:#1B1710;
  --accent-fill:var(--accent);
  --accent-tint:rgba(var(--accent-rgb),.12);
  /* Primary button fill. Dark: the cream light. Light: near-black ink with
     white text (chosen 2026-10-05), since the yellow ink read as brown. */
  --btn-bg:var(--accent); --btn-fg:var(--on-accent);
  --btn-glow:0 6px 22px rgba(var(--accent-rgb),.32);

  /* Meaning, never decoration. Them and me are the two voices in a session;
     ok, info and danger are states. */
  --them-rgb:123,167,224; --them:#7BA7E0;
  --me-rgb:240,166,74;    --me:#F0A64A;
  --ok-rgb:143,203,160;   --ok:#8FCBA0;
  --info:var(--them);
  --warn-rgb:236,190,110; --warn:#ECBE6E;
  --danger-rgb:239,123,123; --danger:#EF7B7B;

  --glow-accent:0 0 0 1px rgba(var(--accent-rgb),.35), 0 4px 18px rgba(var(--accent-rgb),.16);
  --shadow-card:0 1px 0 rgba(var(--line-rgb),.02) inset, 0 8px 28px rgba(0,0,0,.30);
  --shadow-pop:0 18px 50px rgba(0,0,0,.5);

  --r-xs:6px; --r-sm:9px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-pill:999px;

  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --mono:'JetBrains Mono','SF Mono',ui-monospace,SFMono-Regular,monospace;

  --ease:cubic-bezier(.32,.72,0,1);
  color-scheme:dark;
}


/* ── Light theme ────────────────────────────────────────────────────────────
   The dark :root above stays the base and the reference palette (test/
   palette.test.js holds it and the desktop's theme.css to each other, and to
   WCAG AA). Light is layered on top: it follows the OS by default, and an
   explicit choice (data-theme, set by assets/theme.js) wins either way. The
   signature cream reads as nothing on a white ground, so on light the accent
   becomes a deep stage-yellow ink; contrast is verified in palette.test.js. */
:root[data-theme="light"] {
  color-scheme:light;
  /* Light is paper white with neutral greys -- no cream, no brown cast. The
     accent becomes a deep stage-yellow ink (#9A5E07, 5.3:1 on white) so the light still reads
     as the lit thing on a white page. */
  --stage-900:#FFFFFF; --stage-850:#FAFAF7; --stage-800:#FFFFFF;
  --stage-750:#F1F3F5; --stage-700:#E6E8EC; --stage-600:#D5D9DF;
  --ground-rgb:255,255,255; --panel-rgb:248,249,250;
  --popover-bg:#FFFFFF;
  --fg:#111318; --fg-2:#454A54; --fg-3:#5F6571; --fg-4:#8A909B;
  --line-rgb:17,24,39;
  --line:rgba(var(--line-rgb),.08); --line-mid:rgba(var(--line-rgb),.13); --line-strong:rgba(var(--line-rgb),.22);
  --accent-rgb:154,94,7;
  --accent:#9A5E07; --accent-bright:#854D0E; --accent-deep:#8A5A0B;
  --on-accent:#FFFFFF;
  --btn-bg:#111318; --btn-fg:#FFFFFF; --btn-glow:0 6px 18px rgba(17,24,39,.22);
  --accent-tint:rgba(var(--accent-rgb),.07);
  --them-rgb:29,95,199; --them:#1D5FC7;
  --me-rgb:179,90,0; --me:#B35A00;
  --ok-rgb:22,122,72; --ok:#167A48;
  --warn-rgb:138,97,0; --warn:#8A6100;
  --danger-rgb:198,40,40; --danger:#C62828;
  --glow-accent:0 1px 2px rgba(var(--accent-rgb),.25), 0 6px 16px rgba(var(--accent-rgb),.18);
  --shadow-card:0 1px 2px rgba(17,24,39,.04), 0 4px 14px rgba(17,24,39,.05);
  --shadow-pop:0 24px 56px rgba(17,24,39,.14), 0 2px 6px rgba(17,24,39,.06);
}
:root[data-theme="light"] ::selection { background:rgba(var(--accent-rgb),.22); color:var(--fg); }

/* ── Base ─────────────────────────────────────────────────────────────────── */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; min-height:100vh;
  font-family:var(--font); font-size:13.5px; line-height:1.55; color:var(--fg);
  background:var(--stage-900);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4{ margin:0; font-weight:600; letter-spacing:-.015em; }
p{ margin:0; }
a{ color:var(--accent); text-decoration:none; }
/* Scoped away from anything that styles itself, the same way the underline
   below is. A bare `a:hover` (0,1,1) outranks a component's own hover colour
   (0,1,0), so <a class="btn"> went brown on hover: the accent ink landed on
   the button's own fill. The :where() keeps this at (0,1,1), so component
   rules like `.foot__links a:hover` still win as they did. */
a:where(:not([class])):hover{ color:var(--accent-bright); }
/* The bulb sits close to the text colour, so a link inside running text also
   carries an underline; nav links and buttons are styled on their own. */
p a, li a, .hint a{ text-decoration:underline; text-decoration-color:rgba(var(--accent-rgb),.45); text-underline-offset:2px; }
img,svg{ max-width:100%; }
code,kbd,samp,pre{ font-family:var(--mono); }
code{ font-size:.92em; color:var(--accent-bright); }
::selection{ background:rgba(var(--accent-rgb),.3); color:#fff; }
:focus-visible{ outline:2px solid var(--accent-bright); outline-offset:2px; border-radius:var(--r-xs); }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:rgba(var(--line-rgb),.14); border-radius:6px; border:2px solid transparent; background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover{ background:rgba(var(--line-rgb),.26); background-clip:padding-box; }
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ── Brand marks ──────────────────────────────────────────────────────────── */
.wordmark{
  font-weight:700; letter-spacing:-.025em;
  color:var(--accent-fill);
}
.mark{ flex-shrink:0; display:block; }
.mark--lit{ filter:drop-shadow(0 6px 22px rgba(var(--accent-rgb),.28)); }

/* ── Typography helpers ───────────────────────────────────────────────────── */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:10px; font-weight:700; letter-spacing:.15em; text-transform:uppercase;
  color:var(--accent-bright);
}
.eyebrow::before{
  content:''; width:6px; height:6px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 0 4px rgba(var(--accent-rgb),.12);
}
.lede{ color:var(--fg-2); font-size:13.5px; }
.lede strong{ color:var(--fg); font-weight:600; }
.hint{ color:var(--fg-3); font-size:11.5px; line-height:1.5; }
.mono{ font-family:var(--mono); font-variant-ligatures:none; }
.nums{ font-variant-numeric:tabular-nums; }
/* Credit arriving, in a column where everything else is credit leaving. The
   sign alone is easy to miss at the end of a long row. */
.nums.is-add{ color:var(--ok, #7FD1A6); }
.trunc{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card{
  position:relative; overflow:hidden;
  background:var(--stage-800);
  border:1px solid var(--line); border-radius:var(--r-xl);
  box-shadow:var(--shadow-card);
}
.card__head{
  display:flex; align-items:center; gap:10px;
  padding:16px 20px; border-bottom:1px solid var(--line);
}
.card__head svg{ width:16px; height:16px; color:var(--accent); flex-shrink:0; }
.card__title{ font-size:13px; font-weight:600; }
.card__actions{ margin-left:auto; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.card__head{ flex-wrap:wrap; }
.card__head .card__title{ flex:0 0 auto; }
@media (max-width: 560px) {
  /* Once wrapped, the buttons start the second line rather than hanging off
     the end of the first. */
  .card__actions{ margin-left:0; width:100%; }
}
.card__body{ padding:20px; }
.card__foot{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:14px 20px; border-top:1px solid var(--line); background:rgba(var(--ground-rgb),.28);
}
/* A dim edge of light along the top when the card holds focus. */
.card--focusable::before{
  content:''; position:absolute; inset:0 0 auto 0; height:1px; opacity:0;
  background:rgba(var(--accent-rgb),.28);
  transition:opacity .3s var(--ease);
}
.card--focusable:focus-within::before{ opacity:1; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
/* An author `display` outranks the UA sheet's [hidden] rule, so anything gated
   that declares its own display — .btn, .chip, .navitem — stays on screen while
   marked hidden. That is how a dead "Download" button kept showing on a
   platform with no build. One rule closes it for every element here. */
[hidden]{ display:none !important; }

.btn{
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:9px 17px; border:1px solid transparent; border-radius:var(--r-pill);
  font-family:inherit; font-size:12.5px; font-weight:600; letter-spacing:.005em; white-space:nowrap;
  background:var(--btn-bg); color:var(--btn-fg); cursor:pointer;
  transition:filter .14s, box-shadow .18s, transform .12s, background .14s, border-color .14s, color .14s;
}
/* flex-shrink:0 -- an icon has only a viewBox, so no minimum width, and in a
   squeezed button (a narrow table column, a crowded row) it shrank to a speck. */
.btn svg{ width:14px; height:14px; flex-shrink:0; }
.btn:hover:not(:disabled){ filter:brightness(1.07); box-shadow:var(--btn-glow); transform:translateY(-1px); }
.btn:active:not(:disabled){ transform:translateY(0); box-shadow:none; }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn--ghost{ background:var(--stage-750); background-image:none; color:var(--fg); border-color:var(--line-mid); font-weight:500; }
.btn--ghost:hover:not(:disabled){ background:var(--stage-700); border-color:var(--line-strong); box-shadow:none; filter:none; }
.btn--quiet{ background:transparent; background-image:none; color:var(--fg-2); border-color:transparent; font-weight:500; }
.btn--quiet:hover:not(:disabled){ background:var(--stage-750); color:var(--fg); box-shadow:none; filter:none; }
.btn--danger{ background:transparent; background-image:none; color:var(--danger); border-color:rgba(var(--danger-rgb),.32); font-weight:500; }
.btn--danger:hover:not(:disabled){ background:rgba(var(--danger-rgb),.12); border-color:rgba(var(--danger-rgb),.5); box-shadow:none; filter:none; }
.btn--sm{ padding:6px 12px; font-size:11.5px; }
/* Icon-only: square, and no gap left where a label would have been. */
.btn--icon{ padding:6px; }
.btn--icon svg{ margin:0; }
.btn--sm svg{ width:12px; height:12px; }
.btn--icon{ padding:7px; border-radius:var(--r-sm); }
/* A small icon-only button keeps the height of a small labelled one (Test,
   Save) but not its 12px glyph, which is too faint without a word beside it. */
.btn--sm.btn--icon{ padding:6px; }
.btn--sm.btn--icon svg{ width:14px; height:14px; }
.btn--block{ width:100%; }

/* Sign-in tabs, and a button that reads as part of a sentence. Shaped like the
   download page's tabs so the two pages do not each invent their own. */
.gate__tabs{ display:flex; gap:6px; padding:3px; border:1px solid var(--line); border-radius:var(--r-pill); }
.gate__tab{
  flex:1; padding:7px 12px; border:0; border-radius:var(--r-pill);
  background:transparent; color:var(--fg-2);
  font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:.15s;
}
.gate__tab:hover{ color:var(--fg); }
.gate__tab.is-active{ background:var(--stage-750); color:var(--fg); }

.linkish{
  background:none; border:0; padding:0; font:inherit;
  color:var(--accent); cursor:pointer; text-decoration:underline;
}
.linkish:hover{ color:var(--accent-bright); }

/* The console link every public page carries. Fixed rather than in the flow:
   these pages have three different headers between them, and none of them had
   a place to put this. */
.navlink{
  position:fixed; top:14px; right:16px; z-index:20;
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  border:1px solid var(--line-mid); border-radius:var(--r-pill);
  background:var(--stage-800); color:var(--fg-2);
  font-size:12px; font-weight:600; text-decoration:none; transition:.15s;
}
.navlink:hover{ color:var(--fg); border-color:var(--line-strong); background:var(--stage-750); }
/* A live session gets the accent; signing in does not need advertising. */
.navlink--in{ color:var(--accent); border-color:rgba(var(--accent-rgb),.32); }
.navlink--in:hover{ color:var(--accent-bright); }
/* In a page's own header row (nav.js): in the flow, pushed to the right end. */
.navlink--inline{ position:static; margin-left:auto; }
.btn--lg{ padding:12px 22px; font-size:13.5px; }
.btn--lg svg{ width:16px; height:16px; }
/* Pending state: the label stays put and a ring spins in front of it. */
.btn.is-busy{ color:transparent !important; pointer-events:none; }
.btn.is-busy::after{
  content:''; position:absolute; inset:calc(50% - 7px) auto auto calc(50% - 7px);
  width:14px; height:14px; border-radius:50%;
  border:2px solid currentColor; border-top-color:transparent; color:var(--on-accent);
  animation:spin .6s linear infinite;
}
.btn--ghost.is-busy::after, .btn--quiet.is-busy::after, .btn--danger.is-busy::after{ color:var(--fg-2); }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ── Fields ───────────────────────────────────────────────────────────────── */
.field{ display:block; min-width:0; }
.field + .field{ margin-top:16px; }
.field__label{
  display:flex; align-items:center; gap:8px; margin-bottom:7px;
  font-size:10px; font-weight:600; letter-spacing:.11em; text-transform:uppercase; color:var(--fg-3);
}
.field__label .hint{ text-transform:none; letter-spacing:0; font-weight:400; }
.field__note{ margin-top:7px; }
.input,.select,.textarea{
  width:100%; padding:10px 13px;
  font-family:inherit; font-size:12.5px; line-height:1.5; color:var(--fg);
  background:rgba(var(--ground-rgb),.55); border:1px solid var(--line-mid); border-radius:var(--r-md);
  outline:none; transition:border-color .14s, box-shadow .14s, background .14s;
}
.input::placeholder,.textarea::placeholder{ color:var(--fg-4); }
.input:hover,.select:hover,.textarea:hover{ border-color:var(--line-strong); }
.input:focus,.select:focus,.textarea:focus{
  background:rgba(var(--ground-rgb),.78); border-color:rgba(var(--accent-rgb),.55);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.13);
}
.input:focus-visible,.select:focus-visible,.textarea:focus-visible{ outline:none; }
.input.is-invalid,.select.is-invalid{ border-color:rgba(var(--danger-rgb),.55); box-shadow:0 0 0 3px rgba(var(--danger-rgb),.12); }
.input--mono{ font-family:var(--mono); font-size:12px; letter-spacing:-.01em; }
.textarea{ resize:vertical; min-height:78px; }
.select{
  appearance:none; -webkit-appearance:none; padding-right:34px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A9A49C' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
}
.grid{ display:grid; gap:14px; }
.grid--2{ grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); }
.grid--3{ grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
.grid--4{ grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
.grid > .field + .field{ margin-top:0; }
.actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* A password field with a reveal toggle sitting inside it. */
.reveal{ position:relative; }
.reveal .input{ padding-right:46px; }
.reveal__btn{
  position:absolute; top:50%; right:6px; transform:translateY(-50%);
  display:inline-flex; padding:6px; border:none; border-radius:var(--r-sm);
  background:transparent; color:var(--fg-3); cursor:pointer; transition:color .14s, background .14s;
}
.reveal__btn:hover{ color:var(--fg); background:var(--stage-700); }
.reveal__btn svg{ width:15px; height:15px; display:block; }

/* ── Chips & badges ───────────────────────────────────────────────────────── */
.chip{
  display:inline-flex; align-items:center; gap:6px; padding:3px 10px;
  border-radius:var(--r-pill); border:1px solid var(--line);
  background:var(--stage-750); color:var(--fg-2);
  font-size:10.5px; font-weight:600; letter-spacing:.02em; white-space:nowrap;
}
.chip--ok{ background:rgba(var(--ok-rgb),.1); color:var(--ok); border-color:rgba(var(--ok-rgb),.26); }
.chip--warn{ background:rgba(var(--warn-rgb),.1); color:var(--warn); border-color:rgba(var(--warn-rgb),.28); }
.chip--bad{ background:rgba(var(--danger-rgb),.1); color:var(--danger); border-color:rgba(var(--danger-rgb),.26); }
.chip--accent{
  background:var(--accent-tint);
  color:var(--accent-bright); border-color:rgba(var(--accent-rgb),.3);
  text-transform:uppercase; letter-spacing:.09em; font-size:9.5px;
}
.chip--mono{ font-family:var(--mono); font-weight:400; letter-spacing:0; }
.dot{ width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }
.dot--live{ background:var(--ok); box-shadow:0 0 0 3px rgba(var(--ok-rgb),.16); }
.dot--down{ background:var(--danger); box-shadow:0 0 0 3px rgba(var(--danger-rgb),.16); }

/* ── Avatar ───────────────────────────────────────────────────────────────── */
.avatar{
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:28px; height:28px; border-radius:50%;
  background:rgba(var(--accent-rgb),.18);
  border:1px solid rgba(var(--accent-rgb),.28); color:var(--accent-bright);
  font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:uppercase;
}
.avatar--lg{ width:38px; height:38px; font-size:13px; }

/* ── Stat tiles & meter ───────────────────────────────────────────────────── */
.tile{
  padding:15px 17px; border-radius:var(--r-lg);
  background:rgba(var(--ground-rgb),.42); border:1px solid var(--line);
}
.tile__k{
  font-size:9.5px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
  color:var(--fg-3); margin-bottom:8px;
}
.tile__v{ font-size:24px; font-weight:700; letter-spacing:-.02em; line-height:1.1; font-variant-numeric:tabular-nums; }
.tile__v--lit{
  color:var(--accent-fill);
}
.tile__sub{ margin-top:6px; font-size:11px; color:var(--fg-3); }

.meter{ height:6px; border-radius:var(--r-pill); background:rgba(var(--line-rgb),.07); overflow:hidden; }
.meter__fill{ height:100%; border-radius:inherit; background:var(--accent-fill); transition:width .5s var(--ease); }
.meter__fill--warn{ background:var(--warn); }
.meter__fill--full{ background:var(--danger); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap{ overflow-x:auto; }
.table{ width:100%; border-collapse:collapse; font-size:12.5px; }
.table th,.table td{ text-align:left; padding:11px 12px; border-bottom:1px solid var(--line); }
.table thead th{
  position:sticky; top:0; z-index:1;
  font-size:9.5px; font-weight:600; letter-spacing:.11em; text-transform:uppercase; color:var(--fg-3);
  background:var(--stage-800); white-space:nowrap;
}
.table tbody tr{ transition:background .12s; }
.table tbody tr:hover td{ background:rgba(var(--line-rgb),.03); }
.table tbody tr:last-child td{ border-bottom:none; }
.table td.num,.table th.num{ text-align:right; font-variant-numeric:tabular-nums; }

/* The actions column carries between four and seven buttons depending on the
   state of the account in that row — a pending one gains Approve, an unverified
   one gains Verify — so its width is not a number anyone can pick once and be
   right about. Measured on a tidy account it fitted; on a pending, unverified
   one it ran 107px past the container and cut the delete button off.
   Wrapping is the only answer that holds at every width and every combination:
   the row grows downwards, which a table can do, instead of sideways, which
   this one cannot. */
.table td.act{ text-align:right; white-space:normal; padding-bottom:7px; }
.table td.act > *{ margin-bottom:4px; }
.table .input{ padding:6px 9px; font-size:12px; }

.empty{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:34px 20px; text-align:center; color:var(--fg-3);
}
.empty svg{ width:26px; height:26px; color:var(--fg-4); }
.empty__title{ color:var(--fg-2); font-size:12.5px; font-weight:600; }

/* ── Copy box: a real button, so it is reachable from the keyboard ────────── */
.copy{ position:relative; }
.copy__code{
  /* Right padding reserves the gutter the absolute select/copy button sits in;
     the uppercase "SELECT" label is wider than it looks, so 74px let it ride
     over the end of the command. */
  margin:0; padding:13px 92px 13px 15px; overflow-x:auto;
  background:rgba(var(--ground-rgb),.62); border:1px solid rgba(var(--accent-rgb),.24); border-radius:var(--r-md);
  font-family:var(--mono); font-size:11.5px; line-height:1.6; color:var(--accent-bright);
  /* pre, not pre-wrap: break-all split commands mid-token (…/d + ownloads/…),
     which is unreadable in the one place a reader is being asked to check what
     they are about to run. Long lines scroll instead. */
  white-space:pre;
  transition:border-color .16s, background .16s;
}
.copy:hover .copy__code{ border-color:rgba(var(--accent-rgb),.42); background:rgba(var(--accent-rgb),.07); }
.copy__btn{
  position:absolute; top:8px; right:8px;
  display:inline-flex; align-items:center; gap:5px; padding:4px 10px;
  border-radius:var(--r-pill); border:1px solid rgba(var(--accent-rgb),.32);
  background:rgba(var(--accent-rgb),.14); color:var(--accent);
  font-family:var(--font); font-size:9.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  cursor:pointer; transition:.15s;
}
.copy__btn:hover{ background:rgba(var(--accent-rgb),.24); color:var(--accent-bright); }
.copy__btn svg{ width:11px; height:11px; }
.copy.is-copied .copy__code{ border-color:rgba(var(--ok-rgb),.4); }
.copy.is-copied .copy__btn{ background:rgba(var(--ok-rgb),.16); border-color:rgba(var(--ok-rgb),.36); color:var(--ok); }

/* Install command (downloads page, console Distribution): the button sits inside
   the box, beside the command. Floating over the <pre>, a command long enough
   to scroll slid underneath it; moved to a row of its own above, it cost a line
   and read as outside the box. Here the box's border moves from the <pre> to
   the row and the <pre> scrolls in its own slot, so nothing passes under the
   button. Declared after .copy__btn so `position:static` wins. */
.copy--cmd{
  display:flex; align-items:center; gap:10px; padding:5px 8px 5px 0;
  background:rgba(var(--ground-rgb),.62); border:1px solid rgba(var(--accent-rgb),.24); border-radius:var(--r-md);
  transition:border-color .16s, background .16s;
}
.copy--cmd:hover{ border-color:rgba(var(--accent-rgb),.42); background:rgba(var(--accent-rgb),.07); }
.copy.copy--cmd .copy__code,
.copy.copy--cmd:hover .copy__code{
  flex:1 1 auto; min-width:0; padding:8px 0 8px 15px; border:0; border-radius:0; background:transparent;
}
.copy--cmd .copy__btn{ position:static; flex:0 0 auto; }
.copy.copy--cmd.is-copied{ border-color:rgba(var(--ok-rgb),.4); }

/* ── Status strip (inline, aria-live) ─────────────────────────────────────── */
.status{
  display:none; align-items:flex-start; gap:9px; margin-top:14px;
  padding:10px 14px; border-radius:var(--r-md);
  border:1px solid transparent; font-size:12.5px; line-height:1.5;
}
.status.is-ok,.status.is-err,.status.is-info{ display:flex; }
.status.is-ok{ background:rgba(var(--ok-rgb),.09); color:var(--ok); border-color:rgba(var(--ok-rgb),.24); }
.status.is-err{ background:rgba(var(--danger-rgb),.09); color:var(--danger); border-color:rgba(var(--danger-rgb),.24); }
.status.is-info{ background:rgba(var(--them-rgb),.09); color:var(--info); border-color:rgba(var(--them-rgb),.24); }
.status svg{ width:15px; height:15px; flex-shrink:0; margin-top:1px; }

/* ── Toasts ───────────────────────────────────────────────────────────────── */
/* Bottom right, clear of the top bar and its account menu. New toasts are
   appended last, so they land at the bottom and push older ones up. */
.toasts{
  position:fixed; z-index:60; right:18px; bottom:max(18px, env(safe-area-inset-bottom));
  display:flex; flex-direction:column; gap:9px; width:min(340px,calc(100vw - 36px));
  pointer-events:none;
}
.toast{
  display:flex; align-items:flex-start; gap:10px; padding:12px 14px;
  border-radius:var(--r-md); border:1px solid var(--line-mid);
  background:var(--popover-bg); box-shadow:var(--shadow-pop);
  font-size:12.5px; color:var(--fg); pointer-events:auto;
  animation:toast-in .26s var(--ease);
}
.toast.is-out{ animation:toast-out .2s var(--ease) forwards; }
.toast svg{ width:15px; height:15px; flex-shrink:0; margin-top:1px; }
.toast--ok{ border-color:rgba(var(--ok-rgb),.32); } .toast--ok svg{ color:var(--ok); }
.toast--err{ border-color:rgba(var(--danger-rgb),.32); } .toast--err svg{ color:var(--danger); }
.toast--info{ border-color:rgba(var(--them-rgb),.3); } .toast--info svg{ color:var(--info); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px) scale(.98); } }
@keyframes toast-out{ to{ opacity:0; transform:translateX(12px); } }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal[hidden]{ display:none; }
.modal{
  position:fixed; inset:0; z-index:70; display:grid; place-items:center; padding:20px;
  background:rgba(6,7,10,.68); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
  animation:fade-in .18s var(--ease);
}
.modal__box{
  width:min(420px,100%); padding:22px;
  background:var(--stage-800);
  border:1px solid var(--line-mid); border-radius:var(--r-xl); box-shadow:var(--shadow-pop);
  animation:pop-in .22s var(--ease);
}
.modal__title{ font-size:15px; font-weight:600; margin-bottom:8px; }
.modal__text{ color:var(--fg-2); font-size:12.5px; margin-bottom:20px; }
.modal__actions{ display:flex; justify-content:flex-end; gap:10px; }
/* A modal that asks for a value. The field fills the box; the buttons take
   their distance from the rule below rather than from the text above, which
   is absent whenever the question fits in the title alone. */
.modal__field{ width:100%; }
.modal__box--ask .modal__actions{ margin-top:18px; }
@keyframes fade-in{ from{ opacity:0; } }
@keyframes pop-in{ from{ opacity:0; transform:translateY(10px) scale(.97); } }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.foot{
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px;
  padding:16px; font-size:10.5px; color:var(--fg-4);
}
.foot .sep{ width:3px; height:3px; border-radius:50%; background:currentColor; }
.foot a{ color:var(--fg-3); }
.foot a:hover{ color:var(--accent); }

/* ── One height per control ────────────────────────────────────────────────
   Heights were left to line-height, so a monospace box, a native date picker
   and a select each worked out their own (39, 40, 41, 43) and rows sat a few
   pixels out of line. And a label carrying a hint was a pixel taller than a
   bare one, which pushed its own field down. Both are fixed here rather than
   patched per screen. */
.input, .select { height: 40px; }
.textarea { height: auto; }
.input--sm, .select--sm { height: 28px; }
.table .input, .table .select { height: 32px; }
.field__label, .field__label .hint { line-height: 16px; }
.field__label { min-height: 16px; }
/* A link styled as a button inherited the page's line-height and came out
   taller than the buttons beside it ("Open downloads" was 32 next to 28). */
.btn { line-height: 1.2; }

/* ── Theme toggle button (assets/theme.js) ──────────────────────────────────── */
.themebtn{ display:inline-grid; place-items:center; width:34px; height:34px; padding:0; cursor:pointer;
  background:transparent; border:1px solid var(--line); border-radius:var(--r-pill); color:var(--fg-2);
  transition:color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.themebtn:hover{ color:var(--fg); background:var(--line); border-color:var(--line-strong); }
.themebtn svg{ width:16px; height:16px; }

/* ── Brand mark on a light ground ────────────────────────────────────────────
   The mark keeps its dark tile on a white page too: a near-black tile with the
   bulb lit in it is crisper on white than any recoloured version was. Only the
   hairline stroke darkens so the tile edge holds against #FFF. */
:root[data-theme="light"] .mark rect{ stroke:var(--line-strong); }

/* ── Bolam, the mascot (behaviour in assets/bolam.js) ─────────────────────────
   The states bolam.js sets on an inline Bolam. Without the script none of
   these classes appear and the figure holds still. */
.bolam-on{ overflow:visible; transform-origin:50% 90%; transition:filter .25s var(--ease); }
svg.kiu.bolam-on, svg.bolam-live{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
/* A mouse click focuses the figure too; only a keyboard focus gets a ring,
   and that ring is the soft accent glow, never the browser's dark outline. */
svg.kiu:focus, svg.bolam-live:focus{ outline:none; }
svg.kiu:focus-visible, svg.bolam-live:focus-visible{ outline:none; filter:drop-shadow(0 0 0 transparent) drop-shadow(0 0 10px rgba(var(--accent-rgb),.55)); }
.b-look{ transition:transform .14s linear; }
/* One group per eye (the pupil and its glint), so a blink or a squint
   closes the glint with it. */
.bolam-on .b-eye{ transform-box:fill-box; transform-origin:center; animation:b-blink 5.5s infinite; transition:transform .15s var(--ease); }
.bolam-on .b-eye + .b-eye{ animation-delay:.04s; }
.is-sleepy .b-eye{ animation:none; transform:scaleY(.22); }
.is-sleepy{ animation:b-breathe 3.6s ease-in-out infinite; }
.is-shy .b-eye{ animation:none; transform:scaleY(.1); }
.is-peek .b-eye:first-child{ animation:none; transform:scaleY(.1); }
.is-peek .b-eye:last-child{ animation:none; transform:scale(1.2); }
.is-excited{ filter:drop-shadow(0 0 14px rgba(242,223,184,.85)) brightness(1.04); }
.is-hop{ animation:b-hop .55s var(--ease); }
.is-shake{ animation:b-shake .42s ease-in-out; }
.is-flicker{ animation:b-flicker .6s steps(1); }
.kiu--bow:not(.is-visible) .kiu-wave{ animation-play-state:paused; }
@keyframes b-blink{ 0%,93%,100%{ transform:scaleY(1); } 96%{ transform:scaleY(.1); } }
@keyframes b-hop{ 0%{ transform:translateY(0) scale(1); } 30%{ transform:translateY(-14%) scale(1.04,.96); } 60%{ transform:translateY(0) scale(1.05,.94); } 100%{ transform:none; } }
@keyframes b-shake{ 0%,100%{ transform:none; } 20%{ transform:translateX(-5%) rotate(-4deg); } 50%{ transform:translateX(5%) rotate(4deg); } 80%{ transform:translateX(-3%); } }
@keyframes b-flicker{ 0%{ opacity:1; } 15%{ opacity:.35; } 30%{ opacity:1; } 45%{ opacity:.5; } 60%{ opacity:1; } }
@keyframes b-breathe{ 0%,100%{ transform:none; } 50%{ transform:scale(1.02,.98); } }
/* The speech bubble a click brings up, beside whichever figure was poked. */
.bolam-say{ position:absolute; z-index:5; left:50%; bottom:calc(100% + 6px); transform:translate(-50%,6px);
  width:max-content; max-width:min(240px,80vw); padding:8px 12px; border-radius:12px;
  background:var(--popover-bg); color:var(--fg); border:1px solid var(--line-mid); box-shadow:var(--shadow-pop);
  font-size:13px; font-weight:550; line-height:1.4; text-align:center; pointer-events:none;
  opacity:0; transition:opacity .18s var(--ease), transform .18s var(--ease); }
.is-talking > .bolam-say{ opacity:1; transform:translate(-50%,0); }
@media (prefers-reduced-motion:reduce){ .bolam-on, .bolam-on *{ animation:none !important; } }

/* Bolam's faces as small heading glyphs (#i-bolam-*), a touch larger than the
   line icons they replaced so the face reads. */
.card__head svg.face, svg.face{ width:22px; height:22px; color:inherit; flex-shrink:0; }

/* ── Language dropdown (behaviour in assets/i18n.js) ───────────────────────── */
.langdd{ position:relative; margin-left:6px; }
.langdd > summary{ list-style:none; display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 10px;
  border:1px solid var(--line-mid); border-radius:var(--r-pill); color:var(--fg-2); cursor:pointer;
  font-size:12px; font-weight:650; letter-spacing:.04em; user-select:none;
  transition:color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.langdd > summary::-webkit-details-marker{ display:none; }
.langdd > summary:hover, .langdd[open] > summary{ color:var(--fg); background:var(--line); border-color:var(--line-strong); }
.langdd > summary svg{ width:15px; height:15px; flex-shrink:0; }
.langdd > summary .langdd__chev{ width:13px; height:13px; transition:transform .18s var(--ease); }
.langdd[open] > summary .langdd__chev{ transform:rotate(180deg); }
.langdd__menu{ position:absolute; right:0; top:calc(100% + 8px); z-index:50; min-width:196px; padding:6px;
  background:var(--popover-bg); border:1px solid var(--line-mid); border-radius:var(--r-lg); box-shadow:var(--shadow-pop);
  display:flex; flex-direction:column; gap:2px; animation:langdd-in .14s var(--ease); }
@keyframes langdd-in{ from{ opacity:0; transform:translateY(-4px); } }
.langdd__opt{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%;
  padding:9px 11px; border:0; border-radius:var(--r-sm); background:transparent; color:var(--fg-2);
  font:inherit; font-size:13.5px; font-weight:550; text-align:left; cursor:pointer; }
.langdd__opt small{ font-family:var(--mono); font-size:11px; color:var(--fg-4); }
.langdd__opt:hover{ background:var(--line); color:var(--fg); }
.langdd__opt.is-active{ background:var(--accent-tint); color:var(--fg); }
.langdd__opt.is-active small{ color:var(--accent); }
.drawer__lang.langdd{ margin:16px 0 0 0; align-self:flex-start; }
.drawer__lang .langdd__menu{ left:0; right:auto; }

/* "Continue with Google" (assets/google.js). Google's own four-colour mark on
   a neutral button, as their branding asks; the label stays the theme's. */
.btn--google .g-logo{ width:18px; height:18px; flex-shrink:0; }
.or-rule{ display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--fg-mute, var(--fg)); font-size:12px; opacity:.75; }
.or-rule::before, .or-rule::after{ content:""; flex:1; height:1px; background:var(--line-mid); }

/* Pager (assets/pager.js): rows per page on the left, where you are and the
   arrows on the right. Under a table, inside its card. */
.pager{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 16px; border-top:1px solid var(--line); font-size:12px; color:var(--fg-3); }
.pager__size{ display:inline-flex; align-items:center; gap:8px; }
.pager__select{ width:auto; min-width:64px; }
.pager__where{ margin-left:auto; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pager__nav{ display:inline-flex; gap:6px; }
.pager__nav .btn{ min-width:34px; justify-content:center; font-size:15px; line-height:1; }
/* One short page and nowhere to go: no controls, just the list. */
.pager.pager--quiet{ display:none; }

/* After a Windows download: the SmartScreen steps (platform.js armWinHint). */
.winhint{ position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(0,0,0,.55); }
.winhint[hidden]{ display:none; }
.winhint__card{ display:flex; gap:12px; align-items:flex-start; width:min(460px, 100%); padding:18px 16px 18px 20px; border-radius:16px; background:var(--popover-bg); color:var(--fg); border:1px solid rgba(var(--accent-rgb),.4); box-shadow:0 20px 60px rgba(0,0,0,.45); font-size:14px; line-height:1.5; }
.winhint__body{ flex:1; min-width:0; }
.winhint__k{ display:block; margin-bottom:4px; color:var(--accent); font-size:15px; }
.winhint__t{ margin:0; }
.winhint__x{ flex:none; width:28px; height:28px; border:0; border-radius:8px; background:transparent; color:inherit; font-size:18px; line-height:1; cursor:pointer; opacity:.7; }
.winhint__x:hover{ opacity:1; background:rgba(127,127,127,.15); }

/* Where to write for help, under the card on the account pages. */
.contactline{ margin:22px auto 30px; text-align:center; font-size:13px; color:var(--fg-3); }
.contactline a{ color:var(--accent); text-decoration:none; }
.contactline a:hover{ text-decoration:underline; }

/* The contact address as its own small button, not one more footer link:
   an envelope, a label and the address (landing, guide, legal, downloads). */
.mailpill{ display:inline-flex; align-items:center; gap:9px; padding:7px 14px 7px 11px; border-radius:999px;
  border:1px solid var(--line-strong); background:var(--stage-850); color:var(--fg-2) !important;
  font-size:13.5px; line-height:1.2; text-decoration:none !important; transition:border-color .15s, background .15s; white-space:nowrap; }
.mailpill svg{ width:16px; height:16px; flex:none; color:var(--accent); }
.mailpill__k{ color:var(--fg-4); font-size:12.5px; }
.mailpill__v{ color:var(--fg); font-weight:560; }
.mailpill:hover{ border-color:rgba(var(--accent-rgb),.5); background:rgba(var(--accent-rgb),.07); }
.doc__foot{ align-items:center; } .doc__foot .mailpill{ margin-left:auto; }
