/* AI51 — Console, Control Tower, sign-in, Mobile Desk.
   v1.23.0 Night glass (docs/decisions/0044): the Opsdom Brand System look. Night is black with a starry sky and glass panels; Day is the
   same layout on light grounds. Buttons and inputs are square, panels are 14px glass, the primary button is amber with black text, the
   focus ring is amber at Night (ink in Day). Amber marks what is live or needs a person; green is a status only (always with a word).
   The brand has no red: --seal (off, error, stop) stays the one functional colour outside the brand palette.
   The token names are older than the look (--indigo is now the neutral "selected" colour: white at Night, black in Day).
   Accessibility (WCAG 2.1 AA, see docs/ACCESSIBILITY.md): every text token pair is >= 4.5:1 in BOTH schemes (test/v1-23-glass.test.mjs
   computes them from this file); --field-line gives form fields a >= 3:1 boundary (1.4.11); --on-indigo and --on-seal are the text
   colours ON those fills. */
@font-face { font-family: "Saira"; src: url("/static/fonts/saira-latin-wdth.woff2") format("woff2"); font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --paper: #f2f4f7;
  --surface: #ffffff;
  --ink: #000000;
  --ink-2: #2b333d;
  --ink-3: #4a5563;
  --line: #d5dae1;
  --field-line: #6f7987;
  --indigo: #000000;
  --indigo-2: #e6e9ee;
  --pine: #13784f;
  --pine-2: #dcefe6;
  --seal: #a83a29;
  --seal-2: #f6e3df;
  --amber: #8a5a00;
  --amber-2: #f8eedb;
  --on-indigo: #ffffff;
  --on-seal: #ffffff;
  --brand-amber: #ffb000;
  --on-brand-amber: #000000;
  --focus: #000000;
  --input-bg: #ffffff;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-edge: rgba(0, 0, 0, 0.10);
  --sky-glow: #e6e9ee;
  --sky-deep: #f2f4f7;
  --stars: linear-gradient(transparent, transparent);
  --radius-s: 0px;
  --radius-m: 14px;
  --font-display: "Saira", "Arial Narrow", system-ui, sans-serif;
  --font: "IBM Plex Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
/* Night: the primary theme. Same values in the automatic dark scheme and when chosen on purpose (Day / Night / Auto). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000; --surface: #070a0f; --ink: #f2f4f7; --ink-2: #c9d0da; --ink-3: #a9b2bf; --line: #2a3340;
    --indigo: #f2f4f7; --indigo-2: #1a222d; --pine: #3ddc97; --pine-2: #12291f; --seal: #e57a66; --seal-2: #43251f; --amber: #ffb000; --amber-2: #3b2d16;
    --field-line: #6f7b8b; --on-indigo: #000000; --on-seal: #000000;
    --focus: #ffb000; --input-bg: rgba(0, 0, 0, 0.4); --glass: rgba(255, 255, 255, 0.06); --glass-edge: rgba(255, 255, 255, 0.18);
    --sky-glow: #1b2433; --sky-deep: #05070a; --stars: var(--night-stars);
  }
}
:root[data-theme="dark"] {
  --paper: #000000; --surface: #070a0f; --ink: #f2f4f7; --ink-2: #c9d0da; --ink-3: #a9b2bf; --line: #2a3340;
  --indigo: #f2f4f7; --indigo-2: #1a222d; --pine: #3ddc97; --pine-2: #12291f; --seal: #e57a66; --seal-2: #43251f; --amber: #ffb000; --amber-2: #3b2d16;
  --field-line: #6f7b8b; --on-indigo: #000000; --on-seal: #000000;
  --focus: #ffb000; --input-bg: rgba(0, 0, 0, 0.4); --glass: rgba(255, 255, 255, 0.06); --glass-edge: rgba(255, 255, 255, 0.18);
  --sky-glow: #1b2433; --sky-deep: #05070a; --stars: var(--night-stars);
}
/* fifteen faint stars (1 to 2 px, 15 to 50% white), pure CSS */
:root {
  --night-stars:
    radial-gradient(1px 1px at 8% 14%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 17% 62%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 24% 31%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 33% 84%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 41% 9%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(2px 2px at 48% 47%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 56% 73%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 63% 22%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 71% 55%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 78% 11%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 84% 90%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90% 38%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 95% 68%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 4% 92%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 37% 40%, rgba(255, 255, 255, 0.15), transparent);
}
:root:not([data-theme]) { color-scheme: light dark; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--indigo); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
/* visually hidden but read by screen readers; becomes visible when focused (skip link) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--surface); color: var(--indigo); padding: 8px 14px; border: 2px solid var(--indigo); border-radius: var(--radius-s); font-weight: 600; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
h1[tabindex="-1"]:focus { outline: none; }
h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.25rem; font-weight: 650; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; font-weight: 650; }
/* a section heading that looks like h3 but sits at h2 level (keeps heading levels in order, WCAG 1.3.1) */
h2.sub { font-size: 1rem; margin: 1rem 0 0.4rem; }
.panel > h2.sub:first-child { margin-top: 0; }
p { margin: 0.4rem 0 0.8rem; max-width: 72ch; }
.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }

/* shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; font-weight: 700; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 13px; }
.rail nav a { display: block; padding: 7px 10px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; }
.rail nav a[aria-current="page"] { background: var(--indigo-2); color: var(--indigo); font-weight: 600; }
.rail nav a:hover { color: var(--ink); }
.rail .group { margin: 14px 10px 4px; color: var(--ink-3); font-size: 0.82rem; }
.rail .badge { float: right; background: var(--seal); color: var(--on-seal); border-radius: 9px; font-size: 0.75rem; padding: 0 7px; line-height: 18px; }
.rail-foot { margin-top: 20px; padding: 10px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-3); }
main { padding: 26px 34px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.banner { border-radius: var(--radius-m); padding: 10px 14px; margin-bottom: 16px; background: var(--amber-2); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.banner.off { background: var(--seal-2); color: var(--seal); border-color: color-mix(in srgb, var(--seal) 30%, transparent); }
.banner.ok { background: var(--pine-2); color: var(--pine); border-color: color-mix(in srgb, var(--pine) 30%, transparent); }

/* the seal */
.seal { --c: var(--seal); display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2.5px solid var(--c); color: var(--c);
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.04em; transform: rotate(-8deg); flex: none; text-align: center; line-height: 1.05; background: color-mix(in srgb, var(--c) 7%, transparent); }
.seal.on { --c: var(--pine); }
.seal.warn { --c: var(--amber); }
.seal.sm { width: 38px; height: 38px; font-size: 0.66rem; border-width: 2px; }

/* blocks */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; }
.stat b { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.stat span { color: var(--ink-3); font-size: 0.86rem; }
.meter { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--indigo); }
.meter i.hot { background: var(--seal); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1 1 220px; width: auto; }
.row > select { width: auto; max-width: 100%; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: 0.86rem; background: color-mix(in srgb, var(--paper) 55%, var(--surface)); }
tr:last-child td { border-bottom: 0; }
td.nw { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: color-mix(in srgb, var(--indigo-2) 45%, transparent); }
tr.click:focus-visible { outline: 2px solid var(--indigo); outline-offset: -2px; }
tr.click:focus-visible td { background: color-mix(in srgb, var(--indigo-2) 45%, transparent); }

.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 0.8rem; background: var(--indigo-2); color: var(--indigo); white-space: nowrap; }
.pill.ok { background: var(--pine-2); color: var(--pine); }
.pill.bad { background: var(--seal-2); color: var(--seal); }
.pill.warn { background: var(--amber-2); color: var(--amber); }
.pill.plain { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* forms */
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 4px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: 0.84rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: var(--radius-s); background: var(--surface); }
::placeholder { color: var(--ink-3); opacity: 1; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain > legend { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 4px; padding: 0; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--indigo); vertical-align: -3px; margin-right: 6px; }
.check { font-weight: 400; display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 0 8px; }
.check:has(> .hint) { flex-wrap: wrap; }
.check > input[type="checkbox"], .check > input[type="radio"] { flex-shrink: 0; margin: 3px 0 0; width: 18px; height: 18px; }
.check > .hint { flex-basis: 100%; padding-left: 22px; }
.btn { border: 1px solid var(--field-line); background: var(--surface); padding: 7px 14px; border-radius: var(--radius-s); cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--indigo); border-color: var(--indigo); color: var(--on-indigo); }
.btn.danger { color: var(--seal); border-color: color-mix(in srgb, var(--seal) 45%, var(--line)); }
.btn.ok { color: var(--pine); border-color: color-mix(in srgb, var(--pine) 45%, var(--line)); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.link { border: 0; background: none; color: var(--indigo); padding: 4px 6px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 600; }
pre, code { font-family: var(--mono); font-size: 0.85rem; }
pre.snip { background: var(--paper); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-s); white-space: pre-wrap; word-break: break-all; }
.empty { padding: 26px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius-m); }

/* drawer + toast */
.drawer-back { position: fixed; inset: 0; background: rgba(15, 20, 28, 0.35); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--surface); z-index: 21; overflow: auto; padding: 22px 26px 40px; box-shadow: -10px 0 30px rgba(10, 15, 25, 0.18); }
/* toasts: two live regions (role=status / role=alert) exist from page load, empty; a .toast is put INTO one so screen readers announce it */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 90vw; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: var(--radius-s); display: flex; gap: 12px; align-items: center; }
.toast.bad { background: var(--seal); color: var(--on-seal); }
.toast button { background: none; border: 1px solid currentColor; color: inherit; border-radius: var(--radius-s); padding: 2px 8px; cursor: pointer; min-height: 24px; }
.toast button:focus-visible { outline-color: currentColor; }

/* chat transcript (Try it, Live) */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow: auto; padding: 4px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--indigo); color: var(--on-indigo); border-bottom-right-radius: 3px; }
.msg.agent { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 3px; }
.msg.staff { align-self: flex-start; background: var(--pine-2); color: var(--ink); border-bottom-left-radius: 3px; }
.msg .meta { display: block; font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }
.msg.user .meta { color: var(--on-indigo); opacity: 0.9; }

/* sign-in */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
main.center { max-width: none; }
.card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .rail .group, .rail-foot { display: none; }
  main { padding: 18px 16px 50px; }
  .grid2 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* v1.8.0 — Missions cards: labelled facts in one column, stacked full width */
dl.facts { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 6px 14px; margin: 10px 0 0; }
dl.facts dt { color: var(--muted, #667); font-size: .85rem; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: 8px; } }

/* v1.9.0 — The Sky. One deliberately dark world in both themes (a night sky), so every colour here is literal and set explicitly. */
.sky-host { margin: -8px 0 0; }
.sky { position: relative; height: min(820px, calc(100vh - 48px)); min-height: 560px; border-radius: 10px; overflow: hidden; background: #02050A; color: #E6F7FF; }
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.sky-canvas.dragging { cursor: grabbing; }
.sky-hud { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; gap: 12px; }
.sky-hud button, .sky-card { pointer-events: auto; }
.sky-top, .sky-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sky-bottom { align-items: flex-end; }
.sky-title { font-weight: 700; letter-spacing: .22em; font-size: 15px; }
.sky-mode { font: 500 11px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: #3FE0FF; display: flex; align-items: center; gap: 8px; margin-top: 8px; max-width: 70ch; }
.sky-mode i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; animation: sky-blink 1.4s ease-in-out infinite; }
.sky-mode.amber { color: #FFB347; }
.sky-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sky-stats { display: flex; gap: 22px; }
.sky-stats div { text-align: right; }
.sky-stats b { display: block; font-size: 28px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: #E6F7FF; }
.sky-stats b.c { color: #3FE0FF; } .sky-stats b.a { color: #FFB347; }
.sky-stats span { font: 500 9.5px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: #8FA6B8; }
.sky-badge { font: 500 9.5px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: #FFB347; border: 1px solid rgba(255,179,71,.5); padding: 5px 8px; border-radius: 2px; background: rgba(2,5,10,.7); }
.sky-card { width: min(420px, 100%); box-sizing: border-box; background: rgba(4,12,22,.78); border: 1px solid rgba(63,224,255,.22); border-radius: 4px; padding: 14px 16px; }
.sky-eyebrow { font: 500 10px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .16em; color: #8FA6B8; display: flex; justify-content: space-between; gap: 8px; }
.sky-card h2 { margin: 6px 0 2px; font-size: 24px; font-weight: 700; color: #E6F7FF; }
.sky-role { font: 500 11px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; color: #3FE0FF; }
.sky-card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: #C9DCE8; }
.sky-card p:empty { display: none; }
.sky-card dl { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 8px 0 0; font-size: 12px; }
.sky-card dt { font: 500 10px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; color: #8FA6B8; margin-top: 4px; }
.sky-card dd { margin: 0; color: #E6F7FF; overflow-wrap: anywhere; }
.sky-now { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(63,224,255,.12); font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; color: #E6F7FF; min-height: 3.2em; }
.sky-now em { font-style: normal; color: #FFB347; font-size: 9.5px; letter-spacing: .14em; display: block; margin-bottom: 2px; }
.sky-caret { display: inline-block; width: 7px; height: 13px; background: #3FE0FF; vertical-align: -2px; margin-left: 2px; animation: sky-blink 1s step-end infinite; }
.sky-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: 540px; }
.sky-crew, .sky-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.sky-crew button { font: 500 11px ui-monospace, Menlo, Consolas, monospace; min-height: 36px; padding: 0 10px; background: rgba(4,12,22,.7); color: #A9BBC9; border: 1px solid rgba(143,166,184,.32); border-radius: 2px; cursor: pointer; }
.sky-crew button[aria-pressed="true"] { color: #E6F7FF; border-color: #3FE0FF; background: rgba(63,224,255,.12); }
.sky-btn { font: 500 12px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; min-height: 46px; padding: 0 16px; border-radius: 2px; cursor: pointer; background: rgba(2,5,10,.6); }
.sky-wheel { color: #3FE0FF; border: 1px solid #3FE0FF; } .sky-wheel:hover { background: rgba(63,224,255,.14); }
.sky-stop { color: #FFB347; border: 1px solid #FFB347; } .sky-stop:hover { background: rgba(255,179,71,.16); }
.sky button:focus-visible { outline: 2px solid #E6F7FF; outline-offset: 2px; }
.sky-toast { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); font: 500 11px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .16em; color: #3FE0FF; background: rgba(2,5,10,.85); border: 1px solid rgba(63,224,255,.22); padding: 8px 12px; pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.sky-banner { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); text-align: center; font: 500 14px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .2em; color: #FFB347; border: 1px solid #FFB347; padding: 14px 20px; background: rgba(2,5,10,.88); pointer-events: none; }
.sky-banner b { display: block; font-weight: 500; } .sky-banner span { display: block; font-size: 10.5px; color: #A9BBC9; letter-spacing: .14em; margin-top: 6px; }
@keyframes sky-blink { 50% { opacity: .2; } }
@media (max-width: 760px) {
  .sky { height: calc(100vh - 24px); }
  .sky-top, .sky-bottom { flex-direction: column; align-items: stretch; }
  .sky-right { align-items: flex-start; } .sky-stats { gap: 14px; } .sky-stats b { font-size: 20px; } .sky-stats div { text-align: left; }
  .sky-controls, .sky-crew, .sky-row { align-items: stretch; justify-content: flex-start; max-width: none; }
  .sky-card { width: 100%; padding: 10px 12px; } .sky-card h2 { font-size: 19px; } .sky-card p, .sky-card dl { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sky-mode i, .sky-caret { animation: none; } }

/* v1.10.0 — the Desk: three lanes side by side; inside each lane the cards stack in ONE full-width column. Lanes stack on a narrow screen. */
.desk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 12px; }
.desk-lane { min-width: 0; }
.desk-lane > h2.sub { margin-top: 0; }
.desk-stack { display: grid; grid-template-columns: 1fr; gap: 8px; }
.desk-card { display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; cursor: pointer; min-height: 64px; }
.desk-card:hover { border-color: var(--ink-3); }
.desk-card:focus-visible { outline: 2px solid var(--indigo, #3b4cca); outline-offset: 2px; }
.desk-card.urgent { border-left-color: var(--seal, #b3261e); }
.desk-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.desk-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.desk-line { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 980px) { .desk { grid-template-columns: 1fr; } }
/* v1.11.0 — the Desk: the alert switch, a card that is new since you opened the Desk, the Closed list, and the "not known yet" line. */
.desk-alert { margin: 4px 0 12px; }
.desk-alert .btn[aria-pressed="true"] { border-color: var(--indigo, #3b4cca); box-shadow: inset 0 0 0 1px var(--indigo, #3b4cca); font-weight: 600; }
.desk-alert .btn[aria-pressed="true"]::before { content: "On: "; }
.desk-card.fresh { border-left-color: var(--amber, #b26a00); animation: desk-fresh 1.2s ease-out 2; }
@keyframes desk-fresh { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber, #b26a00) 45%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .desk-card.fresh { animation: none; } }
.desk-closed { margin-top: 20px; }
.desk-partial { border-left: 4px solid var(--amber, #b26a00); padding: 6px 10px; color: var(--ink); }

/* v1.12.0 — Reach Me: the Mobile Desk (/m). Phone first: one thumb, every target at least 44 px, cards in ONE full-width column, no
   sideways scroll. Colours are the tokens above, so dark mode follows. Nothing moves under prefers-reduced-motion (the rule above). */
.m-body { min-height: 100vh; overflow-x: hidden; }
.m-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.m-title { font-weight: 700; }
.m-main { max-width: 560px; margin: 0 auto; padding: 12px 16px 24px; width: 100%; }
.m-main h1 { font-size: 1.15rem; margin: 4px 0 8px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-big { min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-m); cursor: pointer; }
.m-big b { font-size: 1.05rem; }
.m-big span { font-size: 0.82rem; color: var(--ink-3); }
.m-big[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo-2); color: var(--indigo); }
.m-big[aria-pressed="true"] span { color: var(--indigo); }
.m-big.m-off[aria-pressed="true"] { border-color: var(--seal); background: var(--seal-2); color: var(--seal); }
.m-big.m-off[aria-pressed="true"] span { color: var(--seal); }
.m-big:focus-visible, .m-card:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
.m-mode { margin: 12px 0 6px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); border-left: 4px solid var(--line); }
.m-mode[data-mode="at_desk"], .m-mode[data-mode="mobile"] { border-left-color: var(--pine); }
.m-mode[data-mode="driving"], .m-mode[data-mode="meeting"] { border-left-color: var(--amber); }
.m-mode[data-mode="off"] { border-left-color: var(--seal); }
.m-switch { margin: 8px 0 4px; }
.m-switch .check { min-height: 44px; align-items: center; font-weight: 600; }
.m-switch input[type=checkbox] { width: 24px; height: 24px; }
.m-sec { margin-top: 18px; min-width: 0; }
.m-stack { display: grid; grid-template-columns: 1fr; gap: 10px; }
.m-card { display: grid; grid-template-columns: 1fr; gap: 6px; width: 100%; min-height: 64px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius-s); padding: 12px; cursor: pointer; min-width: 0; }
.m-card.m-hot { border-left-color: var(--seal); cursor: default; }
.m-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.m-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.m-line { margin: 0; overflow-wrap: anywhere; }
.m-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.m-body .btn, .m-body button, .m-body input:not([type=checkbox]), .m-body textarea { min-height: 44px; }
.m-wide { width: 100%; }
.m-input { min-height: 72px; }
.m-chat { max-height: 50vh; }
.m-chat .msg { max-width: 92%; overflow-wrap: anywhere; }
.m-team { margin: 0; padding-left: 18px; }
.m-team li { margin: 4px 0; }
.m-foot { max-width: 560px; margin: 0 auto; padding: 12px 16px 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.m-foot a { min-height: 44px; display: inline-flex; align-items: center; }
@media (prefers-reduced-motion: no-preference) { .m-card.m-hot { animation: m-hot 1.2s ease-out 2; } }
@keyframes m-hot { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 40%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }

/* v1.13.0 the update bar (public/upkeep.js): a full-width bar at the top of the screen, above everything else */
.update-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 16px;
  background: var(--indigo-2, #eef0ff); color: var(--ink, #1b1f2a); border-bottom: 1px solid color-mix(in srgb, var(--indigo, #3b4cca) 35%, transparent); }
.update-bar .update-text { margin: 0; flex: 1 1 260px; line-height: 1.4; }
.update-bar .btn { min-height: 36px; }

/* v1.13.0 Errors (Control Tower): one card per line, full width (owner's UI rule: single column, never a grid) */
.error-list, .lead-list, .trial-list { display: grid; grid-template-columns: 1fr; gap: 12px; } /* v1.26.0 leads, v1.27.0 trials: same single column */
.error-card, .lead-card, .trial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; }
.error-head, .lead-head, .trial-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.error-msg { margin: 8px 0 10px; overflow-wrap: anywhere; }
.error-facts, .lead-facts, .trial-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 0.92em; }
.error-facts dt, .lead-facts dt, .trial-facts dt { color: var(--ink-3); }
.error-facts dd, .lead-facts dd, .trial-facts dd { margin: 0; overflow-wrap: anywhere; }
/* v1.27.0 Free trials (Customers): the card's parts stack in one column; the length control is a labelled field with its Save button */
.trial-list { margin-bottom: 18px; }
.trial-card { display: grid; grid-template-columns: 1fr; gap: 10px; }
.trial-set { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.trial-set > div { flex: 0 1 240px; min-width: 0; }
.trial-set label { margin-top: 0; }
@media (max-width: 520px) { .trial-facts { grid-template-columns: 1fr; gap: 0; } .trial-facts dd { margin-bottom: 6px; } .trial-set > div { flex-basis: 100%; } }
.error-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 4px; }

/* v1.14.0 Set up (Console): steps and cards in one full-width column (owner's UI rule: never a grid of columns) */
.setup-step { display: grid; grid-template-columns: 1fr; gap: 10px; }
.setup-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.setup-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.setup-card-head h3 { margin: 0; font-size: 1rem; }
.setup-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.setup-card textarea { width: 100%; }
/* v1.29.0 the Set up interview (decision 0051): one column of messages; tokens only */
.setup-form { display: grid; grid-template-columns: 1fr; gap: 16px; }
.iv-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; padding: 4px 2px; }
.iv-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.iv-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.iv-msg.me { align-self: flex-end; background: color-mix(in srgb, var(--amber) 14%, var(--surface)); }
.iv-who { font-size: 0.75rem; font-weight: 650; color: var(--ink-2); }
.iv-say textarea { width: 100%; }
.iv-suggest { border-left: 3px solid var(--amber); padding-left: 12px; display: grid; gap: 6px; }
.iv-suggest p { margin: 0; }
@media (max-width: 640px) { .iv-msg { max-width: 100%; } .iv-log { max-height: 360px; } }
/* v1.30.0 the simpler Set up (decision 0053): one column throughout. The three install choices are full-width buttons, one per line;
   the open one's steps sit right under it. The form fallback is a <details>. */
.setup-approve, .setup-form { display: grid; grid-template-columns: 1fr; }
.setup-change { display: grid; grid-template-columns: 1fr; gap: 10px; }
.setup-change[hidden], .ins-pane[hidden] { display: none; }
.ins-choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ins-choice { display: grid; grid-template-columns: 1fr; gap: 2px; width: 100%; text-align: left; min-height: 56px; padding: 12px 16px; cursor: pointer;
  background: var(--glass, var(--surface)); color: inherit; font: inherit; border: 1px solid var(--glass-edge, var(--line)); border-radius: var(--radius-m); }
.ins-choice b { font-size: 1rem; }
.ins-choice:hover { border-color: var(--ink-3); }
.ins-choice[aria-expanded="true"] { border-color: var(--amber); box-shadow: inset 3px 0 0 var(--amber); }
.ins-pane { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 4px 4px 8px 16px; border-left: 2px solid var(--glass-edge, var(--line)); }
.ins-pane p { margin: 0; }
.ins-guide { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ins-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.ins-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.ins-check { margin-top: 6px; }
.setup-formbox > summary { cursor: pointer; list-style-position: inside; min-height: 32px; }
.setup-formbox > summary .sub { font-weight: 600; }
.setup-formbox[open] > summary { margin-bottom: 10px; }

/* v1.15.0 Crew (Control Tower): one card per line, full width (owner's UI rule) */
.crew-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
.crew-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.crew-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.crew-head h3 { margin: 0; font-size: 1rem; }
.crew-count { font-size: 1.4rem; }
.crew-what { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.crew-big { font-size: 1.6rem; }

/* v1.17.0 Your agent's sky (docs/decisions/0037). The stage is the night sky in both themes on purpose: it is the showcase. */
.asky-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.asky-cta > div { min-width: 0; }
.asky-views { display: inline-flex; gap: 6px; }
.asky-views .btn[aria-pressed="true"], .page-head .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--indigo); }
.asky-stage { position: relative; border-radius: var(--radius-m, 10px); overflow: hidden; border: 1px solid #0f1c31; background: radial-gradient(ellipse at 60% 45%, #0c1a33 0%, #050b16 70%); color: #e8f0ff; }
.asky-canvas { display: block; width: 100%; height: clamp(440px, 68vh, 720px); }
.asky-caption { position: absolute; left: 0; right: 0; bottom: 14px; padding: 0 18px; text-align: center; font: 600 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: #e8f0ff; text-shadow: 0 1px 8px #000; pointer-events: none; text-wrap: balance; }
.asky-caption em { font-style: normal; color: #7fb4ff; }
.asky-caption small { display: block; margin-top: 4px; font: 400 10px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .3em; text-transform: uppercase; color: #6f86a8; }
.asky-w { color: #f5a524; }
.asky-tip { position: absolute; pointer-events: none; background: rgba(8, 16, 30, .95); border: 1px solid #1b2a44; border-radius: 6px; padding: 8px 10px; font: 400 11px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #b8c8e2; max-width: 260px; box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
.asky-tip .asky-b { color: #e8f0ff; font-weight: 600; }
.asky-tip .asky-g { color: #2fd27a; }
.asky-tip .asky-w { color: #f5a524; }
.asky-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; font: 400 10px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.asky-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
.asky-l-live::before { background: #2fd27a; } .asky-l-wait::before { background: #f5a524; } .asky-l-page::before { border: 1.5px solid #2fd27a; width: 5px !important; height: 5px !important; } .asky-l-hub::before { background: #fff; box-shadow: 0 0 0 1.5px #f5a524; }
.asky-scene[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--indigo); }
.asky-scene b { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .asky-caption { font-size: 13px; bottom: 10px; } }
.asky-list { list-style: none; padding: 0; margin: 0; }

/* v1.19.0 pricing line in other languages */
.pl-langs { margin: 6px 0 14px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.pl-langs summary { cursor: pointer; font-weight: 600; }

/* v1.19.0: no sideways scroll on a phone (found by the pricing gate; Agents, Lessons, Insights, Settings and Billing were 2 to 216 px too wide).
   A wide table scrolls inside its own box; fields and code never push past the screen. Cards for these tables on phones: docs/TODO.md. */
.shell > main { min-width: 0; }
main table { display: block; position: relative; max-width: 100%; overflow-x: auto; }
main input, main select, main textarea { max-width: 100%; box-sizing: border-box; }
main pre { max-width: 100%; overflow-x: auto; }

/* v1.20.0 (docs/decisions/0040): on a phone every table is a stack of cards, one per row, one column (the owner's rule for cramped
   tables). Each value carries its column name (data-label, set by AD.labelTables in app.js). Desktop keeps the table. */
@media (max-width: 640px) {
  main table.cardable { display: grid; grid-template-columns: 1fr; gap: 10px; background: none; border: 0; overflow: visible; }
  main table.cardable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  main table.cardable tbody { display: grid; grid-template-columns: 1fr; gap: 10px; }
  main table.cardable tr { display: grid; grid-template-columns: 1fr; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; }
  main table.cardable td { display: block; padding: 2px 0; border: 0; text-align: left; min-width: 0; overflow-wrap: anywhere; background: none; }
  main table.cardable td[data-label]::before { content: attr(data-label); display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }
  main table.cardable td:first-child { font-weight: 600; font-size: 1.02rem; }
  main table.cardable td:first-child::before { display: none; }
  main table.cardable td:empty { display: none; }
  main table.cardable td.num { text-align: left; }
  main table.cardable tr.click:hover td { background: none; }
  main table.cardable tr.click:hover { border-color: var(--indigo); }
}

/* v1.20.0 phone alerts row */
.alerts-row { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.alerts-row .row { flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* v1.20.0 the Control Tower Sky as the neural map or constellation (docs/decisions/0040) */
.tsky-bar { justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sky-looks .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--indigo); }
.tsky-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: 0.9rem; color: var(--ink-2); }
.tsky-stat b { font-variant-numeric: tabular-nums; color: var(--ink); }
.tsky-stat.warn b { color: var(--amber, #b26b00); }
.tsky-h { margin-top: 18px; }

/* ── v1.20.0 (docs/decisions/0040): the Console built for a phone. Under 640 px the rail is replaced by a compact header and a bottom
   tab bar (Home, Questions, Lessons, More); every other page lives in More. Thumb-sized targets (44 px+); nothing scrolls sideways. ── */
.phone-top, .tabbar, .lesson-rows { display: none; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--line) 55%, var(--paper)); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 0.86rem; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
#rail-theme .seg { margin: 8px 0 6px; }
.more-title { font-size: 1.7rem; margin: 4px 0 14px; }
.more-group { margin: 0 0 16px; }
.more-h { margin: 0 4px 6px; font-size: 0.74rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.more-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.more-link:nth-child(odd) { border-right: 1px solid var(--line); }
.more-link:hover { background: var(--indigo-2); }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 12px; }
.more-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.more-foot .btn.link { min-height: 44px; }
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: var(--surface); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.agent-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--pine-2); color: var(--pine); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.agent-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pine); }
.agent-chip.off { background: var(--seal-2); color: var(--seal); }
.agent-chip.off::before { background: var(--seal); }

@media (max-width: 640px) {
  .has-tabbar.shell { display: block; min-height: 100vh; }
  .has-tabbar .rail { display: none; }
  .phone-top { display: flex; align-items: center; gap: 10px; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .phone-top .brand-mark { flex-shrink: 0; }
  .phone-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
  .phone-name b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .has-tabbar main { padding: 6px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--ink-3); text-decoration: none; font-size: 0.7rem; font-weight: 500; }
  .tabbar a[aria-current="page"] { color: var(--indigo); font-weight: 650; }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .tab-badge { position: absolute; top: 3px; left: calc(50% + 6px); }
  /* page tops: a big title, the action as a compact button beside it */
  .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .page-head h1 { font-size: 1.7rem; }
  .page-head p { font-size: 0.9rem; margin: 2px 0 0; }
  .page-head .row .btn { min-height: 44px; border-radius: 22px; padding: 0 16px; white-space: nowrap; }
  .panel { border-radius: 16px; padding: 16px; }
  input[type="search"], main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), main select, main textarea { min-height: 44px; border-radius: 12px; width: 100%; max-width: 100% !important; }
  .btn { min-height: 44px; }
  .hide-phone { display: none !important; }
  .lesson-rows { display: block; list-style: none; margin: 0 0 16px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .lesson-rows li + li { border-top: 1px solid var(--line); }
  .lesson-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
  .lesson-row:hover { background: var(--indigo-2); }
  .lr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .lr-text b { font-size: 0.98rem; overflow-wrap: anywhere; }
  .lesson-rows .empty { padding: 16px; }
  /* every other table: one quiet card per row; label on the left, value on the right */
  main table.cardable tr { padding: 4px 16px; border-radius: 16px; gap: 0; }
  main table.cardable td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); text-align: right; font-size: 0.92rem; }
  main table.cardable td:first-child { display: block; border-top: 0; text-align: left; padding: 12px 0 8px; }
  main table.cardable td[data-label]::before { display: inline; margin: 0; flex-shrink: 0; text-transform: none; letter-spacing: 0; font-size: 0.86rem; font-weight: 400; color: var(--ink-3); text-align: left; }
  main table.cardable td:not([data-label]):not(:first-child) { justify-content: flex-end; }
  main table.cardable td:first-child::before { display: none; }
}
.tab-badge[hidden], .agent-chip[hidden] { display: none; }
.m-tap { display: flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; }

/* v1.20.1: the Control Tower's Day / Night / Auto sits under the menu (shown on a phone too, where the menu's foot is hidden) */
.rail-theme { padding: 10px 8px 4px; }
/* v1.20.1: on a phone every editor (a drawer) opens full screen, above the tab bar, with Close always in reach */
@media (max-width: 640px) {
  .drawer-back { z-index: 39; }
  .drawer { z-index: 40; width: 100vw; left: 0; padding: env(safe-area-inset-top, 0px) 16px calc(28px + env(safe-area-inset-bottom, 0px)); box-shadow: none; }
  .drawer > .row:first-child { position: sticky; top: 0; z-index: 1; margin: 0 -16px 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .drawer > .row:first-child .btn { min-height: 44px; }
  .drawer h1 { font-size: 1.4rem; }
}

/* ── v1.21.0 the Inbox (docs/decisions/0041; owner-approved design "AI51 Inbox, Console look"). Theme tokens only, no fixed colours,
   so a new brand look is a token change. Desktop: people on the left, the conversation on the right. Phone (< 640 px): the list,
   then the conversation full screen with a back button; 44 px+ targets; nothing scrolls sideways. ── */
.tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.ib-headrow { align-items: center; }
.ib-pill { border-radius: 999px; min-height: 40px; padding: 0 16px; white-space: nowrap; }
.ib { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 560px; height: calc(100vh - 170px); }
.ib-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ib-tools { padding: 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.ib-tools input[type="search"] { border-radius: 10px; background: color-mix(in srgb, var(--line) 35%, var(--surface)); border-color: transparent; min-height: 40px; }
.ib-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ib-chip { flex: none; min-height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 0.82rem; font-weight: 500; cursor: pointer; }
.ib-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 650; }
.ib-count { font-variant-numeric: tabular-nums; }
.ib-rows { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 0; }
.ib-row { display: flex; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: none; color: var(--ink); cursor: pointer; }
.ib-row:hover, .ib-row[aria-current="true"] { background: color-mix(in srgb, var(--indigo-2) 60%, transparent); }
.ib-row.needs { border-left-color: var(--amber); }
.ib-row.lead { border-left-color: var(--indigo); }
.ib-av { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--indigo-2); color: var(--indigo); display: inline-flex; align-items: center; justify-content: center; font-weight: 650; font-size: 0.86rem; }
.ib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ib-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ib-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-when { margin-left: auto; font-size: 0.78rem; color: var(--ink-3); white-space: nowrap; }
.ib-prev { font-size: 0.88rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-tag { font-size: 0.76rem; font-weight: 600; color: var(--ink-2); }
.ib-row.needs .ib-tag { color: var(--amber); }
.ib-row.lead .ib-tag { color: var(--indigo); }
.ib-row.done .ib-tag { color: var(--pine); }
.ib-empty { padding: 20px 16px; color: var(--ink-3); }
.ib-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--paper); }
.ib-none { display: grid; place-items: center; flex: 1; }
.ib-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ib-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ib-title { margin: 0; font-size: 1.05rem; }
.ib-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ib-back { display: none; }
.ib-notes { margin: 12px 18px 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.88rem; color: var(--ink-2); }
.ib-notes b { color: var(--ink); }
.ib-log { list-style: none; margin: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; overflow: auto; flex: 1; min-height: 0; }
.ib-msg { display: flex; flex-direction: column; gap: 3px; max-width: 72%; }
.ib-msg.them { align-self: flex-start; }
.ib-msg.agent, .ib-msg.staff { align-self: flex-end; align-items: flex-end; }
.ib-by { font-size: 0.76rem; color: var(--ink-3); }
.ib-msg.them .ib-by { display: none; }
.ib-bubble { padding: 9px 14px; border-radius: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.ib-msg.them .ib-bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ib-msg.agent .ib-bubble { background: var(--indigo-2); color: var(--ink); border-bottom-right-radius: 4px; }
.ib-msg.staff .ib-bubble { background: var(--indigo); color: var(--on-indigo); border-bottom-right-radius: 4px; }
.ib-event { align-self: center; font-size: 0.76rem; color: var(--ink-3); padding: 3px 12px; border-radius: 12px; background: color-mix(in srgb, var(--line) 55%, var(--paper)); text-align: center; max-width: 90%; }
.ib-compose { margin: 0 18px 16px; background: var(--surface); border: 1px solid var(--field-line); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ib-compose-top { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.ib-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.ib-compose textarea { flex: 1; border: 0; resize: none; min-height: 44px; background: transparent; padding: 8px 4px; }
.ib-compose textarea:focus-visible { outline: none; }
.ib-compose:focus-within { box-shadow: 0 0 0 2px var(--indigo); }
.ib-send { border-radius: 22px; min-height: 44px; padding: 0 20px; }
.ib-ended { margin: 0 18px 16px; padding: 12px 14px; background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.ib-activity { max-width: 720px; }
.ib-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ib-post { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ib-post p { margin: 6px 0 10px; }
.ib-post-top { display: flex; align-items: baseline; gap: 8px; }
.ib-post .btn { display: inline-flex; align-items: center; text-decoration: none; }
.ib:has(.ib-activity) { display: block; height: auto; min-height: 0; background: none; border: 0; overflow: visible; }
@media (max-width: 980px) and (min-width: 641px) { .ib { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ib { display: block; background: none; border: 0; border-radius: 0; height: auto; min-height: 0; overflow: visible; }
  .ib-list { border: 0; }
  .ib-tools { padding: 0 0 10px; border: 0; }
  .ib-chip { min-height: 38px; }
  .ib-rows { display: flex; flex-direction: column; gap: 8px; overflow: visible; }
  .ib-row { border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; background: var(--surface); min-height: 64px; }
  .ib-row.agent, .ib-row.done { border-left-color: var(--line); }
  .ib .ib-thread { display: none; }
  .ib.has-open .ib-list { display: none; }
  /* the open conversation is full screen, above the header and the tab bar */
  /* v1.28.0: a solid background. The glass restyle (v1.23.0) made .ib-thread transparent, so on a phone the header and the buttons
     behind showed through the full-screen conversation. Found by the People browser check's phone screenshot. */
  .ib.has-open .ib-thread { display: flex; position: fixed; inset: 0; z-index: 35; background: var(--paper); }
  .ib-head { padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; gap: 8px; flex-wrap: nowrap; }
  .ib-back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: none; flex: none; }
  .ib-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .ib-head .ib-av { flex-basis: 36px; width: 36px; height: 36px; }
  .ib-acts .btn { min-height: 44px; padding: 0 14px; }
  .ib-acts .btn:not(.ib-done) { display: none; }
  .ib-notes { margin: 10px 12px 0; }
  .ib-log { padding: 12px; }
  .ib-msg { max-width: 84%; }
  .ib-compose { margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .ib-compose .seg button { min-height: 38px; }
  .ib-compose textarea { border: 1px solid var(--field-line); border-radius: 22px !important; padding: 10px 14px; background: var(--paper); }
  .ib-ended { margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* actions hidden in the header on a phone appear in a row under it */
  .ib-moreacts { display: flex; gap: 8px; padding: 8px 12px 0; flex-wrap: wrap; }
}
@media (min-width: 641px) { .ib-moreacts { display: none; } }

/* v1.28.0 People, CRM v1 inside the Inbox (docs/decisions/0050). One column of cards; tokens only. */
.ib-views { flex-wrap: nowrap; }
.pp-tools { display: flex; gap: 8px; align-items: center; }
.pp-tools input[type="search"] { flex: 1; min-width: 0; border-radius: 10px; background: color-mix(in srgb, var(--line) 35%, var(--surface)); border-color: transparent; min-height: 40px; }
.ib-row.fu .ib-tag { color: var(--amber); }
.pp-body { overflow: auto; flex: 1; min-height: 0; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.pp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pp-card h3 { margin: 0; font-size: 0.95rem; }
.pp-card p { margin: 0; }
.pp-quiet { background: none; border-style: dashed; }
.pp-due.now b { color: var(--amber); }
.pp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.pp-acts .btn { min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.pp-acts > div { display: flex; flex-direction: column; gap: 4px; }
.pp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.pp-details { margin: 0 2px; }
.pp-check { display: flex; gap: 10px; align-items: center; }
.pp-check input { width: 20px; height: 20px; }
.pp-card textarea { width: 100%; }
@media (max-width: 640px) {
  .pp-body { padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .pp-acts .btn { min-height: 44px; }
  .pp-tools .btn { min-height: 40px; }
  .ib-headrow .row { width: 100%; }
  .ib-views { width: 100%; }
  .ib-views button { flex: 1; min-height: 40px; }
}

/* v1.22.0 earned auto-approval (decisions 0042, 0043): the sealed prediction, the reveal, the scoreboard. Tokens only. */
.row.wrap { flex-wrap: wrap; }
.sealed { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--radius-s); color: var(--ink-2); font-size: 0.9rem; }
.seal-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px dashed var(--ink-3); flex: none; }
.panel.reveal { border-color: color-mix(in srgb, var(--indigo) 40%, var(--line)); }
.panel.score .meter span { display: block; height: 100%; background: var(--indigo); }
.logrow { padding: 6px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.logrow:last-child { border-bottom: 0; }
@media (max-width: 640px) { .row.wrap .btn { min-height: 44px; } }


/* ═══ v1.23.0 Night glass (docs/decisions/0044) ═══════════════════════════════════════════════════════════════════════════════════════
   One layer over the rules above: the night sky, glass panels, the floating header, square controls, the amber primary button. */

/* The sky: a fixed radial glow and a few faint stars behind everything (Night only; Day has just the soft glow). */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--stars), radial-gradient(ellipse at 70% 120%, var(--sky-glow) 0%, var(--sky-deep) 60%, var(--paper) 100%); }
html, body { background: var(--paper); }
body { font-family: var(--font); }
h1, h2.page-title { font-family: var(--font-display); font-stretch: 112%; font-weight: 600; letter-spacing: 0.02em; }
*:focus-visible { outline-color: var(--focus) !important; }   /* amber at Night, ink in Day; one rule for every component */

/* Glass: fill, 1px edge, 14px corners, 16px blur. Blur only on the large surfaces; small cards inside them take the fill alone. */
.rail, .panel, .stat, .card, .phone-top, .tabbar, .ib, .more-grid, .more-row, .lesson-rows, table, .error-card, .lead-card, .trial-card, .setup-card, .crew-card, .ib-post, .banner {
  background: var(--glass); border-color: var(--glass-edge); }
.rail, .panel, .stat, .card, .phone-top, .tabbar, .ib, .more-grid, .more-row, table {
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.rail, .panel, .stat, .card, .phone-top, .tabbar, .ib, .more-grid, .more-row, .lesson-rows, table, .error-card, .lead-card, .trial-card, .setup-card, .crew-card, .ib-post, .ib-notes, .ib-ended, .desk-card, .m-card, .m-mode { border-radius: var(--radius-m); }
.desk-card, .m-card, .m-mode, .ib-notes, .ib-ended { background: var(--glass); border-color: var(--glass-edge); }
.desk-card, .m-card { border-left-color: var(--glass-edge); }
.desk-card.urgent, .m-card.m-hot { border-left-color: var(--seal); }
.desk-card.fresh { border-left-color: var(--amber); }
.ib-thread, .ib-head { background: transparent; }
.ib-head { border-bottom-color: var(--glass-edge); }
.ib-list { border-right-color: var(--glass-edge); }
.ib-tools { border-bottom-color: var(--glass-edge); }
.ib-row { border-bottom-color: var(--glass-edge); }
pre.snip { background: var(--input-bg); }
.msg.agent { background: var(--indigo-2); }
.ib-compose { background: var(--glass); border-color: var(--field-line); border-radius: var(--radius-m); }

/* The layout: a floating glass header over the rail and the page, 16px between panels. */
.shell { gap: 16px; padding: 16px; align-content: start; }
.phone-top { display: flex; align-items: center; gap: 12px 16px; order: -1; grid-column: 1 / -1; position: sticky; top: 16px; z-index: 20; min-height: 56px; padding: 8px 20px; flex-wrap: wrap; }
.rail { top: 88px; height: auto; max-height: calc(100vh - 104px); border-right: 1px solid var(--glass-edge); padding: 14px 12px; align-self: start; }
main { padding: 4px 4px 60px; }
.shell > main { padding-top: 4px; }
.ib { height: calc(100vh - 190px); }

/* The lockup: the Closing mark, OPSDOM, a thin divider, AI51 (decision 0044; the brand's header). The ring takes the ink colour. */
.mark { flex: none; display: block; width: 36px; height: 36px; color: var(--ink); }  /* the full Closing mark (dashed half); at 36px the dashes stay crisp */
.lockup-text { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.lockup-text .wordmark { font-family: var(--font-display); font-stretch: 125%; font-weight: 600; font-size: 14px; letter-spacing: 0.3em; }
.lockup-text .divider { width: 2px; height: 19px; background: var(--ink); opacity: 0.5; flex: none; }
.lockup-text .product { font-family: var(--font-display); font-stretch: 125%; font-weight: 300; font-size: 14px; letter-spacing: 0.2em; }
.phone-name { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; gap: 2px; }
.phone-name .who { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-name .who b { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.top-eyebrow { font-family: var(--font-display); font-stretch: 112%; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.need { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-stretch: 112%; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; min-height: 44px; }
.need b { color: var(--amber); font-size: 15px; font-variant-numeric: tabular-nums; }
.need[hidden] { display: none; }
.rail .brand { padding: 0 8px 12px; font-family: var(--font-display); font-stretch: 112%; letter-spacing: 0.04em; }
.rail .brand .mark { display: none; }
.agent-chip { font-family: var(--font-display); font-stretch: 112%; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; background: transparent; border-radius: 0; padding: 6px 0; color: var(--ink-2); }
.agent-chip::before { background: var(--pine); }
.agent-chip.off { background: transparent; color: var(--seal); }

/* Controls are square. The primary button is amber with black text. */
.btn { background: transparent; border-radius: 0; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand-amber); border-color: var(--brand-amber); color: var(--on-brand-amber); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:disabled:hover { background: var(--brand-amber); border-color: var(--brand-amber); color: var(--on-brand-amber); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input:not([type]), select, textarea { background: var(--input-bg); border-radius: 0; }
.seg, .seg button { border-radius: 0; }
.seg { background: transparent; border: 1px solid var(--field-line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.ib-pill, .ib-chip, .ib-send { border-radius: 0; }
.ib-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rail .badge, .tab-badge { background: var(--brand-amber); color: var(--on-brand-amber); }
.rail nav a[aria-current="page"] { background: var(--indigo-2); color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand-amber); }
a { text-underline-offset: 2px; }

/* The Sky, the agent sky and the neural map keep their own night; they only take the glass edge and corner. */
.sky, .asky-stage { border-radius: var(--radius-m); border: 1px solid var(--glass-edge); }

/* The phone: a floating glass tab bar and header with a gap, square controls. */
@media (max-width: 640px) {
  .shell, .has-tabbar.shell { padding: 12px 0 0; gap: 12px; }
  .phone-top { margin: 0 12px; top: 12px; padding: 8px 14px; }
  .tabbar { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 4px 4px; }
  .has-tabbar main { padding: 6px 16px calc(112px + env(safe-area-inset-bottom, 0px)); }
  .panel, .lesson-rows, .more-grid, .more-row, main table.cardable tr, .ib-row { border-radius: var(--radius-m); }
  main table.cardable tr { background: var(--glass); border-color: var(--glass-edge); }
  main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), main select, main textarea { border-radius: 0; }
  .page-head .row .btn, .ib-pill, .ib-send { border-radius: 0; }
  .ib-compose textarea { border-radius: 0 !important; }
  /* the open conversation is position: fixed; a blurred ancestor would become its containing block and pin it inside the list */
  .ib { -webkit-backdrop-filter: none; backdrop-filter: none; background: none; }
  .ib-row { background: var(--glass); border-color: var(--glass-edge); }
  .ib-compose { background: var(--surface); border-radius: 0; }
  .need span { display: none; }
  /* one row, as in the approved phone design: mark, OPSDOM | AI51, the count, Agent on */
  .phone-top { flex-wrap: nowrap; gap: 10px; }
  .lockup-text { gap: 8px; }
  .lockup-text .wordmark { letter-spacing: 0.22em; }
  .lockup-text .product { letter-spacing: 0.14em; }
  .agent-chip { font-size: 11px; letter-spacing: 0.1em; white-space: nowrap; }
}

/* Where blur is missing, or a person asks for less transparency, glass becomes a solid panel. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rail, .panel, .stat, .card, .phone-top, .tabbar, .ib, .more-grid, .more-row, table, .ib-compose { background: var(--surface); }
}
@media (prefers-reduced-transparency: reduce) {
  .rail, .panel, .stat, .card, .phone-top, .tabbar, .ib, .more-grid, .more-row, table, .ib-compose, .desk-card, .m-card, .m-mode { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
