/* VocalVault shared design system — tokens, base, components, nav, footer.
   Loaded on every page; page-specific CSS stays inline. Theme via [data-theme]. */

:root {
  --brand: #5468ee;
  --brand-600: #4152e0;
  --brand-700: #354bd0;
  --brand-050: #eef1fe;
  --brand-100: #e0e6fd;
  --brand-200: #c7d2fb;
  /* --brand is the FILL (white-on-brand is 4.57:1). --brand-ink is the same
     hue tuned for TEXT: plain --brand as a link colour was 4.27:1 on --bg,
     under the 4.5:1 WCAG AA floor, so every link on the site failed. */
  --brand-ink: #4a5fe8;
  /* Signed-in sidebar: a dark console in both themes, on the --code surface,
     beside a light or dark work surface (DESIGN.md, App shell). Its own tokens
     because it does not invert with the theme. Every pairing clears 4.5:1 on
     both --code values; the lowest, --rail-grp on light --code, is 5.12:1. */
  --rail: var(--code);
  --rail-line: rgba(255, 255, 255, .08);
  --rail-fg: #9fb2d4;
  --rail-fg-strong: #e6ecfb;
  --rail-grp: #7d8cab;
  --rail-hover: rgba(255, 255, 255, .055);
  --rail-active-bg: rgba(84, 104, 238, .20);
  --rail-active-fg: #a3aef8;
  --bg: #f5f7fe;
  --panel: #ffffff;
  --panel2: #f4f7ff;
  --line: #e5e9f5;
  /* Greys and semantics re-tuned for WCAG AA (>=4.5:1 on the worst surface,
     --bg). Previous values measured: dim 4.40, faint 2.30, ok 3.16, bad 3.80,
     warn 2.98, idle 2.25 — all failing. The three-level grey ramp is kept
     distinct rather than collapsed to the darkest passing value. */
  --text: #141a2b;
  --dim: #56607a;
  --faint: #66718b;
  --ok: #127a45;
  --bad: #cf2d22;
  --warn: #8f6213;
  --idle: #5c6f8c;
  /* Incident severity in charts: one amber ramp, ordinal (validated: monotone,
     visible steps, low end >= 2:1 on --panel). High is --warn itself. */
  --sev-critical: #5e3f08;
  --sev-high: #8f6213;
  --sev-medium: #b98019;
  --sev-low: #d9a648;
  --code: #101a30;
  --code-fg: #e6ecfb;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r-sm: 9px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow: 0 1px 2px rgba(16, 32, 80, .04), 0 18px 40px -28px rgba(41, 64, 148, .45);
  --shadow-lg: 0 2px 6px rgba(16, 32, 80, .05), 0 34px 60px -34px rgba(41, 64, 148, .55);
  --nav-h: 60px;
}

[data-theme="dark"] {
  --brand-050: #1b2646;
  --brand-100: #2c3c66;
  --brand-200: #3a4f86;
  --bg: #0d111c;
  --panel: #151b29;
  --panel2: #1a2130;
  --line: #273042;
  --brand-ink: #8b99f5;
  /* --brand is only 3.52:1 on --panel2 in dark */
  --text: #e8edf8;
  --dim: #a3b0c6;
  --faint: #8592a8;
  --ok: #3fce85;
  --bad: #ff8279;
  --warn: #e6b455;
  --idle: #9aa8bd;
  /* Flipped for the dark panel: critical brightest. */
  --sev-critical: #f2c873;
  --sev-high: #d49f3a;
  --sev-medium: #a87822;
  --sev-low: #7d5716;
  --code: #0a0f1c;
  --code-fg: #dbe6ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -28px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .35), 0 40px 70px -34px rgba(0, 0, 0, .8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-ink);
  text-decoration: none;
}

a:hover {
  color: var(--brand-600);
}

h1,
h2,
h3,
h4 {
  letter-spacing: -.02em;
  line-height: 1.12;
  margin: 0 0 .4em;
}

p {
  margin: 0 0 1em;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--brand-200);
}

/* ---------- layout ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 22px;
}

.section {
  padding: 56px 0;
}

.eyebrow {
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Visually hidden but available to screen readers — for text that describes a
   decorative visual the sighted reader already understands. */
.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;
}

/* ---------- skip link (WCAG 2.4.1) ----------
   Off-screen until focused, then pinned over the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  padding: 11px 18px;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
  outline: 2px solid var(--text);
  outline-offset: -4px;
}

/* ---------- navbar (injected by vv-nav.js) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  font-size: 17px;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 3px 10px -3px var(--brand);
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links>a {
  color: var(--dim);
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 999px;
  position: relative;
}

.nav-links>a:hover {
  color: var(--text);
  background: var(--panel2);
}

.nav-links>a.active {
  color: var(--brand-ink);
}

.nav-links>a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

/* Written as `.nav-links > a.nav-cta` because `.nav-links > a` above is more
   specific than a bare `.nav-cta` and was winning — which is why this button
   rendered with dim text instead of white on brand. */
.nav-cta,
.nav-links>a.nav-cta {
  background: var(--brand);
  color: #fff !important;
  font-weight: 650;
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--brand);
}

.nav-cta:hover,
.nav-links>a.nav-cta:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff !important;
}

.nav-links>a.nav-cta.active::after {
  display: none;
}

.nav-burger {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease;
}

.nav-burger:hover {
  background: var(--panel2);
  border-color: var(--brand);
}

.nav-burger span {
  position: absolute;
  top: 18px;
  left: 10px;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

.nav-burger span::before {
  top: -6px;
}

.nav-burger span::after {
  top: 6px;
}

.nav.open .nav-burger span {
  background: transparent !important;
}

.nav.open .nav-burger span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav.open .nav-burger span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width:760px) {
  .nav {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .nav-inner {
    padding: 0 16px;
    height: 100%;
    box-sizing: border-box;
  }

  .nav-brand {
    font-size: 16px;
    font-weight: 700;
    gap: 9px;
  }

  .nav-brand img {
    width: 28px;
    height: 28px;
  }

  .nav-burger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 14px 16px 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-height: calc(100dvh - var(--nav-h, 60px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform .18s, opacity .18s, visibility 0s .18s;
  }

  [data-theme="dark"] .nav-links {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
  }

  .nav.open .nav-links {
    transform: none;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform .18s, opacity .18s, visibility 0s;
  }

  .nav-links>a {
    padding: 11px 14px;
    font-size: 15.5px;
    font-weight: 600;
    border-radius: 8px;
    color: var(--dim);
    transition: background .15s ease, color .15s ease;
  }

  .nav-links>a:hover {
    background: var(--panel2);
    color: var(--text);
  }

  .nav-links>a.active {
    color: var(--brand);
    background: var(--brand-050);
  }

  .nav-links>a.active::after {
    display: none;
  }

  .nav-links>a.nav-cta {
    margin-top: 8px;
    padding: 12px 14px;
    font-size: 15.5px;
    justify-content: center;
    text-align: center;
  }

  .nav-links .btn {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .nav-inner {
    padding: 0 12px;
  }

  .nav-brand span {
    font-size: 15px;
  }
}

/* ---------- footer (minimal centered black strip) ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #050811;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  font-family: var(--font);
}

.footer-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
}

.footer-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px 52px;
  align-items: start;
  max-width: 860px;
  margin: 0 auto;
}

/* Brand column */
.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.footer-brand:hover {
  opacity: 0.9;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: block;
}

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.6;
  color: #7d8ea6;
  margin: 0;
  max-width: 340px;
}


.footer-direct-contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
  color: #93a4be;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-direct-contact a:hover {
  color: #ffffff;
}

/* Navigation columns */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  margin: 0;
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a {
  font-size: 13.5px;
  color: #8292a8;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer-col-links a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

/* Bottom Bar */
.footer-bottom-bar {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 680px;
  font-size: 12px;
  line-height: 1.6;
  color: #63738a;
}

.footer-entity-line strong {
  color: #c4d0e5;
  font-weight: 650;
}

.footer-prototype-note {
  color: #607086;
}

.footer-copyright {
  color: #516075;
  margin-top: 2px;
}

.footer-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-cookie-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #8a9bb3;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.footer-cookie-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.footer-imprint-link {
  font-size: 12px;
  font-weight: 600;
  color: #8b99f5;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-imprint-link:hover {
  color: #b4bffe;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 840px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
  .footer-brand-col {
    grid-column: span 2;
  }
}

@media (max-width: 580px) {
  .footer-wrap {
    padding: 40px 18px 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-brand-col {
    grid-column: span 1;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 16px;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 650;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: .14s;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 12px 22px -12px var(--brand);
}

.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
}

/* ---------- surfaces & bits ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-ink);
}

.mono {
  font-family: var(--mono);
}

.dim {
  color: var(--dim);
}

.ok {
  color: var(--ok)
}

.bad {
  color: var(--bad)
}

.warn {
  color: var(--warn)
}

/* ---------- forms ----------
   Typed selectors were missing `email`, `search`, `url`, `tel` and `date`, so
   those rendered with browser defaults next to styled siblings. Matching on
   `input:not(...)` covers every text-like field and keeps covering them when a
   new type is used. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]),
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  transition: border-color .14s, box-shadow .14s;
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--brand-200);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

/* Focus ring for every other interactive element. The UA default is fine in
   WebKit but disappears against dark surfaces in some browsers, and
   --brand-200 was too pale to meet the 3:1 non-text contrast floor for a
   focus indicator — --brand clears it on every surface we paint. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: var(--panel2);
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

/* Native selects carry system chrome — a different height, font and arrow on
   every platform — so they never sit level with the inputs beside them.
   `appearance:none` removes it; the chevron is drawn back in as a background
   image, one per theme because a background image cannot inherit currentColor. */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px 15px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23697488" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
}

[data-theme="dark"] select {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2394a1b8" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
}

select:focus {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%235468ee" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
}

/* The dropdown list itself is drawn by the OS; these are the only two
   properties browsers reliably honour, and they stop a dark theme showing
   white-on-white options. */
select option {
  background: var(--panel);
  color: var(--text);
}

/* File inputs: the button half is the only stylable part, and only via this
   pseudo-element. */
input[type=file] {
  font-family: inherit;
  font-size: 14px;
  color: var(--dim);
  max-width: 100%;
}

input[type=file]::file-selector-button {
  font-family: inherit;
  font-weight: 650;
  font-size: 14px;
  margin-right: 12px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  transition: .14s;
}

input[type=file]::file-selector-button:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
}

/* Checkboxes keep native behaviour — accent-color is enough to brand them and
   avoids reimplementing focus and keyboard handling badly. */
input[type=checkbox],
input[type=radio] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ---------- code ---------- */
.code {
  background: var(--code);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.code-head .lang {
  color: #8ea2c8;
  font: 12px var(--mono);
  letter-spacing: .05em;
}

.code-head .copy {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #cdd9f2;
  border-radius: 7px;
  padding: 5px 11px;
  font: 12px var(--font);
  font-weight: 600;
  cursor: pointer;
}

.code-head .copy:hover {
  border-color: var(--brand);
  color: #fff;
}

.code pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
}

.code code {
  font: 13.5px/1.6 var(--mono);
  color: var(--code-fg);
  white-space: pre;
}

/* motion */
@media (prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}

/* ==========================================================================
   APP SHELL — signed-in pages. Public pages keep the marketing nav above;
   everything under /app and /admin uses this sidebar layout instead.
   ========================================================================== */

/* The shell reads as an instrument rather than a generic SaaS dashboard: a
   dark console rail (--rail-*, the --code surface) in both themes, the same
   navy as the home page's hero and bands. */
.app {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

.app-side {
  background: var(--rail);
  border-right: 1px solid var(--rail-line);
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.app-side .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--rail-fg-strong);
  font-size: 16.5px;
  padding: 10px 12px 10px;
  letter-spacing: -.02em;
}

.app-side .brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.app-side .grp {
  color: var(--rail-grp);
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 20px 12px 8px;
}

.app-side .grp::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 8px;
  background: var(--rail-line);
}

.app-side a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--rail-fg);
  font-weight: 600;
  font-size: 14.5px;
  position: relative;
  transition: color .15s, background .15s;
}

.app-side a:hover {
  background: var(--rail-hover);
  color: var(--rail-fg-strong);
}

.app-side a.active {
  background: var(--rail-active-bg);
  color: var(--rail-active-fg);
}

/* A lit bar on the active item — the rail reads as a signal path. */
.app-side a.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.app-side a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.app-side .side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rail-line);
}

.app-side .side-upgrade,
.app-side a.side-upgrade {
  justify-content: center;
  background: var(--brand);
  color: #fff;
  margin: 14px 4px 0;
  font-weight: 650;
}

.app-side a.side-upgrade:hover {
  background: var(--brand-600);
  color: #fff;
}

.app-side a.side-upgrade::before {
  display: none;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-top {
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.app-top .ctx {
  font: 600 11.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.app-top .who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-body {
  padding: 30px 26px 72px;
  max-width: 1220px;
  width: 100%;
}

.app-burger {
  display: none;
}

/* ---------- page header ----------
   Mono kicker over a large title, closed by a rule — the same head shape the
   public pages use, so the product reads as one thing across the sign-in line. */
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow-m {
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 9px;
  display: block;
}

.page-head h1 {
  font-size: 29px;
  margin: 0 0 5px;
  letter-spacing: -.028em;
}

.page-head p {
  color: var(--dim);
  margin: 0;
  font-size: 14.5px;
  max-width: 64ch;
}

.page-head .actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

/* ---------- stat row ----------
   Not tiles. A single hairline-divided row: mono label, tabular number, note.
   Four boxes in a line is the shape every dashboard defaults to; this reads as
   a readout instead. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.stat {
  padding: 18px 22px 17px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 2px;
}

.stat .k {
  color: var(--faint);
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.stat .v {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.035em;
  margin-top: 10px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.stat .v.ok {
  color: var(--ok);
}

.stat .v.bad {
  color: var(--bad);
}

.stat .v.warn {
  color: var(--warn);
}

.stat .s {
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 6px;
}

@media (max-width:820px) {
  .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 2px;
  }

  .stat:first-child {
    border-top: 0;
  }
}

/* ---------- cards ---------- */
.card>h2:first-child {
  font-size: 15px;
  letter-spacing: .01em;
  margin: -4px 0 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

/* A ruled header sitting directly on a row list left 25px between the rule and
   the first row against 19px between every row after it — a visible dent at the
   top of the card. Tuck the first row up so the rhythm is even all the way down. */
.card>h2:first-child+.kv,
.card>h2:first-child+.pending-row,
.card>.card-head:first-child+.kv {
  padding-top: 3px;
}

/* ---------- sub-tabs ----------
   Views of one list (devices in use / revoked), underlined like the hairline
   tables they sit above. */
.subtabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.subtabs button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 9px 12px;
  cursor: pointer;
}

.subtabs button:hover {
  color: var(--text);
}

.subtabs button[aria-selected="true"] {
  color: var(--brand-ink);
  border-bottom-color: var(--brand);
}

.subtabs .count {
  font: 600 11.5px var(--mono);
  color: var(--faint);
  margin-left: 6px;
}

/* ---------- tables ----------
   Hairline-bounded rather than a floating rounded panel, so a table reads as
   part of the page rather than as another card sitting on it. */
.tablewrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

table.vt {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.vt th {
  text-align: left;
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 14px 16px 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.vt th:first-child,
table.vt td:first-child {
  padding-left: 2px;
}

table.vt td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.vt tr:last-child td {
  border-bottom: 0;
}

table.vt tbody tr {
  transition: background .13s;
}

table.vt tbody tr:hover {
  background: var(--panel2);
}

table.vt td.num,
table.vt th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Anything a reader could check independently is set in mono. */
table.vt td .mono,
table.vt td.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ---------- app shell: narrow ---------- */
@media (max-width:900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .app-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .2s cubic-bezier(.22, .7, .3, 1);
    visibility: hidden;
  }

  .app.side-open .app-side {
    transform: none;
    visibility: visible;
  }

  .app-burger {
    display: block;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
  }

  .app-body {
    padding: 24px 18px 60px;
  }

  .page-head h1 {
    font-size: 24px;
  }
}

/* Page entrance. Each view fades up once on mount; the stagger comes from an
   --i index so nothing has to be timed by hand. Collapses to nothing when the
   viewer has asked for reduced motion. */
@media (prefers-reduced-motion:no-preference) {
  .app-body>* {
    animation: appIn .42s cubic-bezier(.22, .7, .3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 55ms);
  }

  @keyframes appIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge.ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}

.badge.bad {
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 30%, transparent);
}

.badge.warn {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
}

.badge.idle {
  background: var(--panel2);
  color: var(--dim);
  border-color: var(--line);
}

.badge.brand {
  background: var(--brand-050);
  color: var(--brand-ink);
  border-color: var(--brand-100);
}

/* Filled: the one level above its own tint, for an incident that is critical
   (components/Incidents.tsx). --panel on --warn clears 4.5:1 in both themes. */
.badge.solid.warn {
  background: var(--warn);
  color: var(--panel);
  border-color: var(--warn);
}

/* ---------- forms (app) ---------- */
.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
}

.field .hint {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
}

/* Keep room for the chevron — the rule above would otherwise let long option
   text run underneath it. */
.field select {
  padding-right: 36px;
  background-position: right 12px center;
}

.field input[type=file] {
  padding: 0;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width:620px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: radial-gradient(760px 420px at 50% -60px, var(--brand-050), transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.auth-card .lg {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 6px;
}

.auth-card .lg img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.auth-card h1 {
  font-size: 22px;
  text-align: center;
  margin: 12px 0 6px;
}

.auth-card .sub {
  text-align: center;
  color: var(--dim);
  font-size: 14px;
  margin-bottom: 22px;
}

.auth-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12.5px;
  margin: 18px 0;
}

.auth-alt::before,
.auth-alt::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.auth-foot {
  text-align: center;
  font-size: 14px;
  color: var(--dim);
  margin-top: 20px;
}

/* ---------- misc ---------- */
/* .empty is the older class; .t-empty above supersedes it. Kept as an alias so
   any page still using it does not lose its centring. */
.empty,
.t-empty {
  text-align: center;
  color: var(--dim);
}

.empty {
  padding: 46px 20px;
}

.empty .ic {
  font-size: 34px;
  opacity: .5;
  margin-bottom: 10px;
}

.t-loading p {
  opacity: .8;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

@media (max-width:820px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* The pairing code, read off the screen and typed on a phone. Wide letter
   spacing because the alphabet deliberately excludes I, L, O and U but a
   reader still has to tell 8 from B. */
.pair-code {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: .22em;
  padding: 16px 0 4px;
  color: var(--fg);
  user-select: all;
}

button.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand-ink);
  cursor: pointer;
  text-decoration: underline;
}

/* A device awaiting approval: description on the left, the decision on the
   right. Wraps rather than crushing the buttons on a narrow screen. */
.pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pending-row:first-of-type {
  border-top: 0;
}

.pending-row .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv .k {
  color: var(--dim);
  margin-top: 4px;
  margin-bottom: 5px;
}

.kv .v {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  margin-top: 4px;
}

/* Nothing is cut off with "…" anywhere in VocalVault: a long value wraps
   onto the next line instead, so all of it can be read and checked. .trunc
   keeps its name for older markup and now only bounds the width. */
.trunc {
  max-width: 220px;
  display: inline-block;
  vertical-align: bottom;
  overflow-wrap: anywhere;
}

/* ---------- SPA-only pieces ---------- */
.drop {
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  background: var(--panel);
  transition: .15s;
}

.drop:hover {
  border-color: var(--brand);
  background: var(--brand-050);
}

.drop .dropicon {
  color: var(--faint);
}

.drop:hover .dropicon {
  color: var(--brand-ink);
}

/* The Sign form: the file beside its title, the device as cards below. */
.sign-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 8px;
}

@media (max-width:900px) {
  .sign-grid {
    grid-template-columns: 1fr;
  }
}

.drop.drop-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px 24px;
  cursor: pointer;
  min-height: 196px;
  justify-content: center;
}

.drop-sm .dropicon .art {
  width: 96px;
  height: auto;
}

.drop-sm strong {
  font-size: 15.5px;
}

.drop.is-over {
  border-color: var(--brand);
  background: var(--brand-050);
}

.drop.is-bad {
  border-color: var(--bad);
}

.drop-btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 650;
  font-size: 14px;
  color: var(--brand-ink);
}

.drop:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.picked {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--panel2);
}

.picked-name {
  display: block;
  overflow-wrap: anywhere;
}

.device-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 10px;
}

.choice.consent {
  align-items: flex-start;
  margin: 4px 0 18px;
}

.choice.consent input {
  margin-top: 3px;
}

.sign-send {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.verdicts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Verdict cards carry their state on a left rule rather than a full coloured
   border, so the grey "unverified" case does not have to shout to be legible. */
.vc {
  border: 1px solid var(--line);
  border-left: 3px solid var(--idle);
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--panel);
}

.vc-ok {
  border-left-color: var(--ok);
}

.vc-bad {
  border-left-color: var(--bad);
}

.vc-idle {
  border-left-color: var(--idle);
}

.vc h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.vc p {
  margin: 0;
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.6;
}

/* Empty state for tables and panels. An empty table used to render as a bare
   header row, which reads as breakage rather than as "nothing here yet". */
.t-empty {
  text-align: center;
  padding: 38px 20px;
  color: var(--dim);
}

.t-empty strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.t-empty p {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.6;
}

/* The unverified badge takes the idle token explicitly: it is a verdict, not
   a neutral chip, and must stay distinguishable from --dim body text. */
.badge.idle {
  color: var(--idle);
  border-color: color-mix(in srgb, var(--idle) 30%, transparent);
  background: color-mix(in srgb, var(--idle) 12%, transparent);
}

/* icons sit on the text baseline inside links and buttons */
.app-side a svg,
.btn svg,
.side-foot a svg {
  flex: none;
}

.vv-themebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  border-radius: 10px;
  cursor: pointer;
}

.vv-themebtn:hover {
  color: var(--brand-ink);
  border-color: var(--brand);
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 14, 26, .5);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  padding: 22px 24px 24px;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  font-size: 18px;
  margin: 0;
}

.modal-x {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  border-radius: 9px;
  cursor: pointer;
}

.modal-x:hover {
  color: var(--bad);
  border-color: var(--bad);
}

/* ---------- upgrade call-to-action in the sidebar ---------- */
/* Scoped under `.app-side a` so it outranks that rule's hover state. Without
   this the hover painted `--panel2` (near-white in light mode) behind white
   text and the label vanished. */
.app-side a.side-upgrade {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  font-weight: 650;
  font-size: 14px;
  color: #fff;
  /* Solid brand, not a gradient into violet: the page has one accent, and an
     upgrade CTA is the last place to introduce a second hue. */
  background: var(--brand);
  box-shadow: 0 10px 22px -12px var(--brand);
}

.app-side a.side-upgrade:hover {
  color: #fff;
  background: var(--brand-600);
}

/* ---------- plan cards ---------- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.plan-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.plan-card.current {
  border-color: var(--brand);
  box-shadow: 0 16px 40px -28px var(--brand);
}

.plan-tag {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 999px;
}

.plan-card h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.plan-price {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}

.plan-price span {
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 14px;
}

.plan-list li {
  padding: 5px 0 5px 22px;
  position: relative;
  color: var(--dim);
}

.plan-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

.plan-note {
  font-size: 12.5px;
  color: var(--faint);
  margin: 0 0 14px;
}

.plan-card .btn,
.plan-card a.btn {
  margin-top: auto;
  width: 100%;
}

/* ==========================================================================
   PAGE LANGUAGE — the shared vocabulary introduced with the home redesign.
   Left-aligned, hairline-separated, one accent. Every page below the nav is
   built from these; page-specific pieces stay inline in the page.
   ========================================================================== */

/* Vertical rhythm. Sections are separated by a rule, not by floating gaps, so
   a page reads as one document rather than a stack of blocks. */
.band {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.band:first-of-type {
  border-top: 0;
}

.band.tight {
  padding: 64px 0;
}

.lede {
  font-size: clamp(16.5px, 1.4vw, 18.5px);
  color: var(--dim);
  max-width: 62ch;
}

/* Section label. Names the topic in plain language — never numbers it. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 20px;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

h2.display {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -.025em;
  line-height: 1.1;
  max-width: 20ch;
  text-wrap: balance;
  margin: 0 0 16px;
}

h1.display {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -.032em;
  line-height: 1.05;
  max-width: 18ch;
  text-wrap: balance;
  margin: 0 0 18px;
}

/* Asymmetric two-column. The default page layout; centred is the exception. */
.split {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 60px;
  align-items: start;
}

.split.even {
  grid-template-columns: 1fr 1fr;
}

.split.wide {
  grid-template-columns: .8fr 1.2fr;
}

/* A single number, given room. */
.figure {
  border-left: 2px solid var(--brand);
  padding-left: 22px;
}

.figure .n {
  font-size: clamp(34px, 4.4vw, 50px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.figure .u {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--brand-ink);
  margin-top: 2px;
}

.figure p {
  font-size: 13.5px;
  color: var(--dim);
  margin: 14px 0 0;
  line-height: 1.55;
}

/* Term/definition list with hairlines — the default alternative to a card grid. */
.spec {
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(170px, .42fr) 1fr;
  gap: 28px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.spec-row:hover {
  background: var(--panel2);
}

.spec-row dt {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

.spec-row dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--dim);
  line-height: 1.6;
}

.spec-row dd code,
.spec-row dt code {
  font: 13px var(--mono);
  color: var(--brand-ink);
}

/* Numbered rows for a short sequence of parallel items. */
.zig {
  display: grid;
  gap: 0;
}

.zig-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  padding: 28px 4px;
  border-top: 1px solid var(--line);
}

.zig-row:last-child {
  border-bottom: 1px solid var(--line);
}

.zig-row .idx {
  font: 700 13px/1 var(--mono);
  color: var(--brand-ink);
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}

.zig-row h3 {
  font-size: 19px;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}

.zig-row p {
  color: var(--dim);
  margin: 0;
  max-width: 62ch;
  font-size: 15px;
}

.zig-row .who {
  font: 600 11px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 12px;
  display: block;
}

/* Label-over-value row, under one rule. Three facts at a glance. */
.assure {
  display: flex;
  column-gap: 0;
  row-gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  flex-wrap: wrap;
  margin: 0;
}

.assure div {
  flex: 1 1 0;
  min-width: 150px;
  padding-right: 18px;
}

.assure dt {
  font: 600 11px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 7px;
}

.assure dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* Closing band. Dark in both themes like the code surface — never a gradient. */
.close {
  background: var(--code);
  border-radius: var(--r-xl);
  padding: 60px 44px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.close::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: radial-gradient(70% 100% at 50% 100%, rgba(84, 104, 238, .34), transparent 70%);
  pointer-events: none;
}

.close h2 {
  position: relative;
  color: #fff;
  font-size: clamp(25px, 3.4vw, 36px);
  letter-spacing: -.03em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.close p {
  position: relative;
  color: #b9c6e4;
  max-width: 52ch;
  margin: 0 auto 26px;
  font-size: 16px;
}

.close .ctas {
  position: relative;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.close .btn {
  background: #fff;
  color: #101a30;
  border-color: #fff;
  padding: 13px 26px;
}

.close .btn:hover {
  background: #e6ecfb;
  color: #101a30;
  border-color: #e6ecfb;
}

.close .btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .34);
}

.close .btn.ghost:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: #fff;
}

.close a:focus-visible {
  outline-color: #fff;
}

/* Notice block. One rule, one colour, no icon soup. */
.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--dim);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  background: var(--panel);
  margin: 22px 0;
}

.note strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
  letter-spacing: -.01em;
}

.note p {
  margin: 0;
  font-size: 14px;
  color: var(--dim);
  line-height: 1.6;
}

.note.warn {
  border-left-color: var(--warn);
}

.note.warn strong {
  color: var(--warn);
}

.note.bad {
  border-left-color: var(--bad);
}

.note.bad strong {
  color: var(--bad);
}

.note.info {
  border-left-color: var(--brand);
}

.note.info strong {
  color: var(--brand-ink);
}

/* Legal reading column. Long prose needs a measure and generous leading. */
.doc {
  max-width: 74ch;
}

.doc h2 {
  font-size: 21px;
  letter-spacing: -.02em;
  margin: 44px 0 12px;
  scroll-margin-top: 84px;
}

.doc h2:first-of-type {
  margin-top: 32px;
}

.doc h3 {
  font-size: 16.5px;
  margin: 26px 0 8px;
}

.doc p {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--dim);
  margin: 0 0 14px;
}

.doc p strong,
.doc li strong {
  color: var(--text);
}

.doc ul,
.doc ol {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--dim);
  padding-left: 20px;
  margin: 0 0 16px;
}

.doc li {
  margin-bottom: 7px;
}

.doc .updated {
  font: 600 12.5px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Cards and notes inside prose need their own air — .doc p carries only a
   bottom margin, so a paragraph after a card would otherwise sit flush to it. */
.doc .card,
.doc .note {
  margin: 22px 0 26px;
}

.doc .card .kv:last-child {
  border-bottom: 0;
}

/* Scroll reveal. Opt in with .rv; vv-theme.js adds .in once, then stops watching. */
.rv {
  opacity: 0;
  transform: translateY(18px);
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity .62s cubic-bezier(.22, .7, .3, 1) var(--d, 0ms),
    transform .62s cubic-bezier(.22, .7, .3, 1) var(--d, 0ms);
}

@media (prefers-reduced-motion:reduce) {
  .rv {
    opacity: 1;
    transform: none;
  }

  .rv.in {
    transition: none;
  }
}

@media (max-width:960px) {

  .split,
  .split.even,
  .split.wide {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .band {
    padding: 72px 0;
  }
}

@media (max-width:620px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .close {
    padding: 46px 22px;
  }

  .band {
    padding: 60px 0;
  }
}
/* ==========================================================================
   APP — PLAIN LAYER. The signed-in screens say the one thing someone needs;
   explanations sit behind an ⓘ (.info-btn / .info-pop), and evidence (key
   ids, hashes, the frame) behind a .tech fold that only owners and admins
   get. See DESIGN.md, "Evidence one click away".
   ========================================================================== */

/* ⓘ — 14px glyph, 44px of touch target. */
.info-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--faint);
  cursor: pointer;
  vertical-align: -3px;
  flex: none;
  transition: color .15s, background .15s;
}

.info-btn::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.info-btn:hover,
.info-btn[aria-expanded="true"] {
  color: var(--brand-ink);
  background: var(--brand-050);
}

.info-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.info-pop {
  position: fixed;
  z-index: 120;
  width: min(300px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px 15px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--dim);
  white-space: normal;
  animation: info-in .16s ease-out;
}

.info-pop strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.info-pop p {
  margin: 0 0 8px;
}

.info-pop p:last-child {
  margin-bottom: 0;
}

/* Evidence inside a popover: label over value, mono, wrapping anywhere. */
.info-pop dl {
  margin: 8px 0 0;
}

.info-pop dt {
  font: 700 10px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 10px;
}

.info-pop dd {
  margin: 4px 0 0;
  font: 12.5px/1.45 var(--mono);
  color: var(--text);
  word-break: break-all;
}

@keyframes info-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.term {
  display: inline-flex;
  align-items: center;
}

/* A stat label with an ⓘ must not stand taller than one without. */
.stat .k {
  display: flex;
  align-items: center;
  height: 11px;
}

/* Technical details: a closed fold, owners and admins only. */
.tech {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.tech summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 0 4px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--dim);
}

.tech summary::-webkit-details-marker {
  display: none;
}

.tech summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s;
}

.tech[open] summary::before {
  transform: rotate(45deg);
}

.tech summary:hover {
  color: var(--brand-ink);
}

.tech summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.tech-who {
  margin-left: auto;
  font: 700 10px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.tech-body .kv .v {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
}

/* Numbered steps — the home page's "01 · ON THE DEVICE", hairline-divided
   like the stat readout rather than boxed. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.steps li {
  padding: 4px 22px 6px;
  border-left: 1px solid var(--line);
}

.steps li:first-child {
  border-left: 0;
  padding-left: 0;
}

.steps-art {
  color: var(--faint);
  margin-bottom: 12px;
}

.steps-art .art {
  width: 100%;
  max-width: 120px;
  height: auto;
}

.steps-idx {
  display: block;
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.steps strong {
  display: block;
  font-size: 15.5px;
  margin: 7px 0 4px;
  letter-spacing: -.01em;
}

.steps p {
  margin: 0;
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.55;
}

.steps li.is-done .steps-idx {
  color: var(--ok);
}

@media (max-width:820px) {
  .steps li {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0;
  }

  .steps li:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

.art-accent {
  stroke: var(--brand);
}

.dev-glyph {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  background: var(--brand-050);
  color: var(--brand-ink);
}

.ring {
  flex: none;
}

.ring circle {
  fill: none;
  stroke-width: 3.6;
}

.ring-track {
  stroke: var(--line);
}

.ring-fill {
  stroke: var(--brand);
  stroke-linecap: round;
}

.ring-ok .ring-fill {
  stroke: var(--ok);
}

.ring-warn .ring-fill {
  stroke: var(--warn);
}

/* The dashboard's welcome band: the --code surface with one brand glow, and
   the page's one primary action in white. */
.hero-sign {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  gap: 22px 30px;
  flex-wrap: wrap;
  padding: 30px 30px 28px;
  margin-bottom: 26px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(84, 104, 238, .34), transparent 55%),
    var(--code);
  /* In dark the band is darker than the page; a hairline keeps its edge. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  color: #e6ecfb;
}

.hero-sign .hs-text {
  flex: 1 1 340px;
  position: relative;
}

.hero-sign .eyebrow-m {
  display: block;
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a3aef8;
  margin-bottom: 10px;
}

.hero-sign h1 {
  font-size: 29px;
  margin: 0 0 6px;
  color: #fff;
  letter-spacing: -.028em;
}

.hero-sign p {
  margin: 0;
  color: #9fb2d4;
  font-size: 15px;
  max-width: 58ch;
}

.hero-sign .hs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.hero-sign .btn-primary {
  background: #fff;
  color: #141a2b;
  box-shadow: none;
}

.hero-sign .btn-primary:hover {
  color: var(--brand-700);
}

.hero-sign .btn:not(.btn-primary) {
  background: transparent;
  color: #e6ecfb;
  border-color: rgba(255, 255, 255, .22);
}

.hero-sign .btn:not(.btn-primary):hover {
  border-color: #a3aef8;
  color: #fff;
}

.hero-sign .btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hero-sign .hs-wave {
  position: absolute;
  right: 26px;
  top: 22px;
  color: #a3aef8;
  opacity: .28;
}

@media (max-width:620px) {
  .hero-sign {
    padding: 24px 20px 22px;
  }

  .hero-sign h1 {
    font-size: 24px;
  }

  .hero-sign .hs-wave {
    display: none;
  }
}

/* A list of things, one per hairline row: glyph, name and a plain line,
   state and actions at the right. For devices, recordings, members. */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.rows>.row-item:first-child {
  border-top: 0;
}

.card>h2:first-child+.rows>.row-item:first-child {
  padding-top: 6px;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-main>strong,
.row-main>a {
  display: block;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.row-sub {
  font-size: 13px;
  color: var(--faint);
  margin-top: 2px;
}

.row-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wave-chip {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-050);
  color: var(--brand-ink);
}

.wave-chip.is-gone {
  background: var(--panel2);
  color: var(--faint);
}

@media (max-width:620px) {
  .row-item {
    flex-wrap: wrap;
  }

  .row-end {
    width: 100%;
    justify-content: flex-start;
    padding-left: 52px;
  }
}

/* "Get started": a short checklist that leaves once it is done. */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.checklist li:first-child {
  border-top: 0;
}

.checklist .tick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.6px solid var(--line);
  display: inline-grid;
  place-items: center;
  flex: none;
  color: transparent;
  font: 700 11px/1 var(--mono);
}

.checklist .tick.n {
  color: var(--faint);
}

.checklist li.is-done .tick {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.checklist li.is-done .cl-text {
  color: var(--dim);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}

.checklist .cl-text {
  flex: 1;
}

.checklist a {
  font-weight: 650;
  font-size: 13.5px;
  white-space: nowrap;
}

/* A plain empty state with an illustration over it. */
.empty-art {
  text-align: center;
  padding: 26px 16px 22px;
  color: var(--faint);
}

.empty-art strong {
  display: block;
  color: var(--text);
  font-size: 15.5px;
  margin: 10px 0 4px;
}

.empty-art p {
  margin: 0 auto 14px;
  color: var(--dim);
  font-size: 14px;
  max-width: 46ch;
}

/* The recording page's player hero: what it is, how long, and its state. */
.rec-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rec-hero .row-main h2 {
  font-size: 17px;
  margin: 0;
}

/* A meeting platform's own logo on a quiet tile, so four differently drawn
   marks sit at one size and weight. */
.pf-logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--dim);
}

.pf-logo img {
  display: block;
  object-fit: contain;
}

/* The platforms, side by side: hairline-divided columns like the stat row,
   two by two on a phone. */
.pf-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pf-grid li {
  padding: 4px 18px 6px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.pf-grid li:first-child {
  border-left: 0;
  padding-left: 0;
}

.pf-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Names wrap rather than truncate: "Micr…" names nothing. */
.pf-name strong {
  font-size: 15px;
  line-height: 1.25;
  min-width: 0;
}

.pf-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 34px;
}

.pf-observer {
  display: flex;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  font-size: 13.5px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width:900px) {
  .pf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .pf-grid li:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width:620px) {
  .pf-grid li {
    padding: 4px 12px 6px;
  }

  .pf-name {
    gap: 8px;
  }

  .acct-check {
    padding: 2px 10px;
  }
}

.pf-cell {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

/* "Updated 12:03:04" beside a page's Refresh button. */
.live-note {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.live-note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 8px;
}

/* The account page's head: who you are, then the account's health in one
   hairline-divided row, each check with its fix beneath it. */
.acct-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.acct-head .row-main {
  flex: 1 1 200px;
}

.acct-head h2 {
  font-size: 20px;
  margin: 0;
}

.acct-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-050);
  color: var(--brand-ink);
  font-weight: 750;
  font-size: 19px;
  letter-spacing: .02em;
}

.acct-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 16px;
}

.acct-check {
  display: flex;
  gap: 11px;
  padding: 2px 16px;
  border-left: 1px solid var(--line);
}

.acct-check:first-child {
  border-left: 0;
  padding-left: 0;
}

.acct-tick {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
  margin-top: 1px;
}

.acct-check.is-warn .acct-tick {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
}

.acct-k {
  display: flex;
  align-items: center;
  font: 700 10.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  min-height: 14px;
  line-height: 1.3;
}

.acct-v {
  font-weight: 650;
  font-size: 15px;
  margin-top: 5px;
}

.acct-a {
  font-size: 13.5px;
  margin-top: 2px;
}

@media (max-width:820px) {
  .acct-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }

  .acct-check:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

/* An organisation's mark: the account avatar, squared off. */
.org-avatar {
  border-radius: 14px;
}

/* An on/off setting with its words beside it. */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.switch-row span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}

.switch-row .hint {
  font-weight: 400;
  margin-top: 2px;
}

input.switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

input.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 32, 80, .25);
  transition: transform .2s;
}

input.switch:checked {
  background: var(--brand);
  border-color: var(--brand);
}

input.switch:checked::after {
  transform: translateX(16px);
}

input.switch:disabled {
  opacity: .5;
  cursor: not-allowed;
}

input.switch:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* One choice of several, each with what it means and how strong it is. */
.choice-set {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.choice-set legend {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 8px;
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-top: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.choice:hover {
  border-color: var(--brand-200);
}

.choice.is-on {
  border-color: var(--brand);
  background: var(--brand-050);
}

.choice input {
  margin: 0;
  flex: none;
}

/* WebKit draws an unchecked radio white on any background unless told. */
[data-theme="dark"] .choice input {
  color-scheme: dark;
}

.choice-main {
  flex: 1;
  min-width: 0;
}

.choice-main strong {
  display: block;
  font-size: 14px;
}

.choice-main span {
  display: block;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.45;
}

.strength {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  flex: none;
}

.strength i {
  width: 4px;
  border-radius: 2px;
  background: var(--line);
}

.strength i:nth-child(1) { height: 6px; }
.strength i:nth-child(2) { height: 9px; }
.strength i:nth-child(3) { height: 12px; }
.strength i:nth-child(4) { height: 15px; }

.strength i.on {
  background: var(--brand);
}

@media (prefers-reduced-motion:reduce) {
  input.switch,
  input.switch::after {
    transition: none;
  }
}

/* Card title with an ⓘ or an action beside it. */
.card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-head h2 {
  font-size: 15px;
  letter-spacing: .01em;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.card-head .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

@media (prefers-reduced-motion:reduce) {
  .info-pop {
    animation: none;
  }

  .tech summary::before {
    transition: none;
  }
}

/* ==========================================================================
   APP — PHONES. The signed-in app at phone width. Every rule is scoped to
   the app shell (.app / .app-body), so the home page and the public pages,
   which share this stylesheet, are untouched.
   ========================================================================== */

/* A value wraps between words; only a long unbroken token (a hash, an
   address) breaks where it must. `break-all` split "key" into "ke / y". */
.app-body .kv .v {
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (max-width:620px) {

  /* The top bar: the organisation on one line, the name left to the
     Account item in the menu. */
  .app-top {
    padding: 0 16px;
    gap: 10px;
  }

  /* A long organisation name wraps to a second line rather than losing its end. */
  .app-top .ctx {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
    padding: 6px 0;
  }

  .app-top .who {
    margin-left: 0;
    gap: 8px;
  }

  .app-top .who-name {
    display: none;
  }

  .app-body {
    padding: 22px 16px 56px;
  }

  /* Page head: the actions under the title, from the left, the search
     field taking the room that is left. */
  .app-body .page-head {
    margin-bottom: 20px;
  }

  .app-body .page-head h1 {
    font-size: 25px;
  }

  .app-body .page-head .actions {
    margin-left: 0;
    width: 100%;
  }

  .app-body .page-head .actions input[type=search] {
    flex: 1 1 160px;
    min-width: 0 !important;
  }

  .app-body .card {
    padding: 18px 16px;
  }

  /* Tables become a stack of small cards: the first cell is the row's
     name, and every other cell shows its column's name beside its value
     (UI.tsx puts the name on each cell). Nothing scrolls sideways. */
  .app-body .tablewrap {
    overflow: visible;
    border-bottom: 0;
  }

  .app-body table.vt,
  .app-body table.vt tbody,
  .app-body table.vt tr,
  .app-body table.vt td {
    display: block;
    width: 100%;
  }

  .app-body table.vt thead {
    display: none;
  }

  .app-body table.vt tr {
    padding: 12px 0 10px;
    border-bottom: 1px solid var(--line);
  }

  .app-body table.vt tbody tr:hover {
    background: none;
  }

  /* The column's name on the left; whatever the cell holds (a badge and the
     line under it, say) stacked on the right. */
  .app-body table.vt td,
  .app-body table.vt td:first-child {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 14px;
    row-gap: 3px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .app-body table.vt td > * {
    grid-column: 2;
    justify-self: end;
  }

  .app-body table.vt td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 4;
    font: 700 10px/1.3 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: left;
  }

  /* The row's name, on its own line and in full. */
  .app-body table.vt td:first-child {
    display: block;
    text-align: left;
    padding-bottom: 6px;
    font-size: 15px;
  }

  /* Safari aligns block children by justify-self too, so undo the push to
     the right that the value cells get. */
  .app-body table.vt td:first-child > * {
    justify-self: auto;
  }

  .app-body table.vt td:first-child::before,
  .app-body table.vt td[data-label=""]::before {
    content: none;
  }

  /* A cell holding only an ⓘ or an action sits at the end of the card. */
  .app-body table.vt td[data-label=""] {
    display: flex;
    justify-content: flex-end;
  }

  .app-body table.vt td[colspan] {
    display: block;
    text-align: center;
  }

  /* Steps: the drawing beside the words, not above them, so three steps
     do not fill three screens. */
  .app-body .steps li {
    display: grid;
    grid-template-columns: 76px 1fr;
    column-gap: 14px;
    align-items: center;
  }

  .app-body .steps-art {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .app-body .steps-art .art {
    max-width: 76px;
  }

  .app-body .steps strong {
    margin-top: 5px;
  }

  /* The pager: count on one line, controls on the next, full width. */
  .app-body .pager {
    flex-direction: column;
    align-items: stretch;
  }

  /* Dialogs use the whole width and scroll inside themselves. */
  .app .modal-back {
    padding: 12px;
    align-items: end;
  }

  .app .modal {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 20px 18px 22px;
  }

  /* Touch targets: small buttons at least 40px tall. */
  .app-body .btn-sm {
    min-height: 40px;
  }
}

.side-scrim {
  display: none;
}

@media (max-width:900px) {
  .side-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(6, 10, 20, .5);
    animation: scrim-in .2s ease-out;
  }
}

@keyframes scrim-in {
  from {
    opacity: 0;
  }
}

/* ==========================================================================
   DEVELOPERS — /developers and its pages. Documentation in three columns:
   the pages at the left, the reading column, and "On this page" at the
   right. The API reference (.dev.ref) drops the right column and gives each
   endpoint two halves instead: what it does, and the request and response.
   Everything sits under main.devdocs, so nothing here reaches another page.
   ========================================================================== */
.devdocs .dev {
  max-width: 1320px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 184px;
  gap: 0 56px;
  align-items: start;
  /* Top and bottom only: the sides are .container's gutter. */
  padding-top: 40px;
  padding-bottom: 96px;
}

.devdocs .dev.ref {
  grid-template-columns: 216px minmax(0, 1fr);
}

/* -- the pages, at the left -- */
.dev-nav {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  display: grid;
  gap: 1px;
  padding: 0 4px 12px 0;
}

.dev-nav .grp {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  padding: 22px 10px 7px;
}

.dev-nav .grp:first-child {
  padding-top: 0;
}

.dev-nav > a {
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
  text-decoration: none;
  transition: background .14s, color .14s;
}

.dev-nav > a:hover {
  background: var(--panel2);
  color: var(--text);
}

.dev-nav > a[aria-current="page"] {
  background: var(--brand-050);
  color: var(--brand-ink);
}

/* Shown on a phone only, and only once vv-docs.js is there to work it. */
.dev-menu-btn {
  display: none;
}

/* -- "On this page": the right column, or under the page's own link in the
   API reference. A hairline with the section being read marked on it. -- */
.dev-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}

.dev-toc .grp {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  padding: 0 0 9px 13px;
}

.devdocs .toc {
  display: grid;
  border-left: 1px solid var(--line);
}

.dev-nav .toc {
  margin: 4px 0 4px 12px;
}

.devdocs .toc a {
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--faint);
  text-decoration: none;
}

.devdocs .toc a:hover {
  color: var(--text);
}

.devdocs .toc a.on {
  color: var(--brand-ink);
  border-left-color: var(--brand);
}

/* -- the reading column -- */
.devdocs .doc {
  max-width: 740px;
  min-width: 0;
}

.devdocs .dev.ref .doc {
  max-width: none;
}

.devdocs .dev-head {
  margin-bottom: 32px;
}

.devdocs .doc .dev-crumb {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-ink);
}

.devdocs .dev-head h1 {
  font-size: clamp(28px, 3vw, 34px);
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0 0 12px;
  text-wrap: balance;
}

.devdocs .dev-head .lede {
  margin: 0;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--dim);
}

.devdocs .doc p,
.devdocs .doc ul,
.devdocs .doc ol {
  font-size: 15.5px;
  line-height: 1.7;
}

.devdocs .doc h2 {
  font-size: 22px;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 52px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.devdocs .doc h3 {
  font-size: 16.5px;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 30px 0 8px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

/* A heading's own link, after its text, shown on hover or focus. */
.devdocs .h-anchor {
  margin-left: 8px;
  color: var(--faint);
  text-decoration: none;
  font-weight: 600;
  opacity: 0;
  transition: opacity .14s;
}

.devdocs .doc h2:hover .h-anchor,
.devdocs .doc h3:hover .h-anchor,
.devdocs .h-anchor:focus-visible {
  opacity: 1;
}

/* Inline code: quiet, so a sentence with three names in it still reads. */
.devdocs .doc :not(pre) > code {
  font: 13px var(--mono);
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  /* break-word, not anywhere: a table column stays as wide as its longest
     name, and a name only breaks when nothing else can give. */
  overflow-wrap: break-word;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.devdocs .doc a > code {
  color: var(--brand-ink);
}

/* -- code blocks: the dark surface, flat. The label names the language or
   what the block is ("Response"); vv-docs.js colours comments, strings and
   keywords, in the one hue the page already has. -- */
.devdocs .doc .code {
  margin: 16px 0 24px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.devdocs .doc .code-head {
  min-height: 40px;
  padding: 5px 8px 5px 14px;
}

.devdocs .doc .code-head .copy {
  background: none;
  border-color: transparent;
  color: #8ea2c8;
  padding: 5px 9px;
}

.devdocs .doc .code-head .copy:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.devdocs .doc .code pre {
  padding: 14px 16px 16px;
}

.devdocs .doc .code code {
  font-size: 13px;
  line-height: 1.65;
}

.devdocs .code .tk-c {
  color: #8ea2c8;
}

.devdocs .code .tk-s {
  color: #a5d3f7;
}

.devdocs .code .tk-k {
  color: #a3aef8;
}

/* Language switch on a code block: a real tablist (vv-docs.js), and the
   choice holds for every block on every page. */
.devdocs .code-head [role="tablist"] {
  display: flex;
  gap: 2px;
  margin-left: -6px;
}

.devdocs .code-head [role="tab"] {
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font: 600 12.5px var(--font);
  color: #8ea2c8;
  cursor: pointer;
}

.devdocs .code-head [role="tab"]:hover {
  color: #fff;
}

.devdocs .code-head [role="tab"][aria-selected="true"] {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.devdocs .code [role="tabpanel"][hidden] {
  display: none;
}

/* -- tables: status codes, scopes, methods, limits -- */
.devdocs .table-wrap {
  margin: 16px 0 24px;
  overflow-x: auto;
}

.devdocs .doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}

.devdocs .doc th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--faint);
  padding: 0 16px 9px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.devdocs .doc td {
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  vertical-align: top;
}

.devdocs .doc th:last-child,
.devdocs .doc td:last-child {
  padding-right: 0;
}

.devdocs .doc td:first-child {
  color: var(--text);
  font-weight: 600;
}

.devdocs .doc td.nw {
  white-space: nowrap;
}

/* -- parameters and fields: the name, its type, then what it is -- */
.devdocs .params-title {
  margin: 26px 0 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--faint);
}

.devdocs .params {
  margin: 0 0 24px;
}

.devdocs .params > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.devdocs .params dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.devdocs .doc .params dt > code {
  font: 600 13.5px var(--mono);
  background: none;
  border: 0;
  padding: 0;
}

.devdocs .params .type {
  font-size: 13px;
  color: var(--faint);
}

.devdocs .params .req {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.devdocs .params dd {
  margin: 5px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--dim);
}

/* -- numbered steps -- */
.devdocs .doc .dev-steps {
  list-style: none;
  counter-reset: step;
  margin: 18px 0 24px;
  padding: 0;
}

.devdocs .dev-steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0 0 22px 44px;
}

.devdocs .dev-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--panel);
  font: 600 12.5px/26px var(--mono);
  text-align: center;
  color: var(--text);
}

/* The line that joins one step to the next. */
.devdocs .dev-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.devdocs .dev-steps h3 {
  margin: 0 0 4px;
  font-size: 15.5px;
  line-height: 26px;
}

.devdocs .dev-steps p {
  margin: 0 0 10px;
  color: var(--dim);
}

.devdocs .dev-steps .code {
  margin: 12px 0 4px;
}

.devdocs .doc .note {
  margin: 20px 0 24px;
}

/* -- the overview's "where to go": rows of links, two across -- */
.devdocs .dev-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 18px 0 8px;
  border-top: 1px solid var(--line);
}

.devdocs .dev-links a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.devdocs .dev-links strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.devdocs .dev-links span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

.devdocs .dev-links a:hover strong {
  color: var(--brand-ink);
}

/* -- an endpoint's method and path. GET is outlined, never green: --ok
   means a verified signature, and nothing else. DELETE is not red either:
   --bad means a signature that failed. -- */
.devdocs .doc .ep {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 14px;
  line-height: 1.3;
}

.devdocs .verb {
  flex: none;
  font: 700 11px/1 var(--mono);
  letter-spacing: .04em;
  padding: 5px 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--brand);
}

.devdocs .verb.get,
.devdocs .verb.del {
  background: none;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.devdocs .doc .ep .path,
.devdocs .doc td .path {
  font: 600 13.5px var(--mono);
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: break-word;
  min-width: 0;
}

.devdocs .scope {
  font: 600 11.5px/1 var(--mono);
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand-ink);
  background: var(--brand-050);
  white-space: nowrap;
}

.devdocs .scope.public {
  color: var(--dim);
  background: var(--panel2);
}

.devdocs td .verb {
  display: inline-block;
  margin-right: 8px;
}

/* -- the API reference: each endpoint is a row of two halves, the words at
   the left and the request and response, which stay in view, at the right -- */
.devdocs .ep-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 48px;
  align-items: start;
  padding: 36px 0 20px;
  border-top: 1px solid var(--line);
}

.devdocs .ep-sec > * {
  min-width: 0;
}

.devdocs .ep-sec h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.devdocs .ep-code {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.devdocs .ep-code .code {
  margin: 0 0 16px;
}

.devdocs .ep-code .code pre {
  max-height: 440px;
}

.devdocs .dev.ref .doc h2 {
  margin: 64px 0 8px;
  font-size: 24px;
}

.devdocs .dev.ref .doc h2 + p {
  max-width: 68ch;
  margin-bottom: 28px;
}

.devdocs .ref-intro {
  max-width: 740px;
}

/* -- previous and next page -- */
.devdocs .dev-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.devdocs .dev-pager a {
  display: grid;
  gap: 5px;
  text-decoration: none;
}

.devdocs .dev-pager .next {
  grid-column: 2;
  text-align: right;
}

.devdocs .dev-pager span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
}

.devdocs .dev-pager strong {
  font-size: 15.5px;
  color: var(--brand-ink);
}

.devdocs .dev-pager a:hover strong {
  text-decoration: underline;
}

/* No room for three columns: "On this page" goes, and the reference's
   two halves stack. */
@media (max-width:1180px) {
  .devdocs .dev {
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 0 44px;
  }

  .dev-toc {
    display: none;
  }

  .devdocs .ep-sec {
    grid-template-columns: minmax(0, 1fr);
  }

  .devdocs .ep-code {
    position: static;
    margin-top: 8px;
  }
}

/* A phone: one column, the pages behind a "Menu" button. */
@media (max-width:900px) {
  .devdocs .dev,
  .devdocs .dev.ref {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 18px;
  }

  .dev-nav {
    position: static;
    max-height: none;
    margin-bottom: 26px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
  }

  .dev-nav > a {
    padding: 11px 10px;
  }

  .dev-nav .toc {
    display: none;
  }

  .devdocs.js .dev-menu-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font: 600 14.5px var(--font);
    color: var(--text);
    cursor: pointer;
  }

  .dev-menu-btn::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }

  .dev-menu-btn[aria-expanded="true"]::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .devdocs.js .dev-nav:not(.open) {
    display: none;
  }

  .devdocs .h-anchor {
    display: none;
  }
}

@media (max-width:620px) {
  .devdocs .dev-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .devdocs .dev-pager strong {
    font-size: 14.5px;
  }
}

/* ---------- auth pages: sign-in and register ----------
   A dark panel at the left says what happens next, in the product's own
   terms; the form stands on the page at the right. The panel is the same
   --code surface as the app's rail and the dashboard's welcome band, so the
   way in already looks like the product. Below 900px: the form alone. */
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 44%) 1fr;
  background: var(--bg);
}

/* At least the window's height, and taller when its content needs it: on a
   short screen the steps push it down rather than being clipped. */
.auth-aside {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 36px 48px 32px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(84, 104, 238, .30), transparent 60%),
    var(--code);
  color: #e6ecfb;
}

.auth-split .lg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: inherit;
  text-decoration: none;
}

.auth-split .lg img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.auth-aside-body {
  margin: auto 0;
  padding: 40px 0;
  max-width: 440px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a3aef8;
  margin-bottom: 18px;
}

.auth-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.auth-aside h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: -.025em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 30px;
  color: #fff;
}

/* Register: the three steps, each with its drawing. */
.auth-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-steps li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.auth-steps-art {
  color: #8ea2c8;
}

.auth-steps-art .art {
  width: 74px;
  height: auto;
  display: block;
}

.auth-steps-idx {
  display: block;
  font: 700 11px/1 var(--mono);
  letter-spacing: .12em;
  color: #a3aef8;
  margin-bottom: 6px;
}

.auth-steps strong {
  display: block;
  font-size: 15.5px;
  color: #fff;
  margin-bottom: 3px;
}

.auth-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #b4c2dc;
}

/* Sign-in: three facts, a mono label over each. */
.auth-facts {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-facts > div {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.auth-facts dt {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8ea2c8;
  margin-bottom: 8px;
}

.auth-facts dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: #e6ecfb;
}

.auth-aside-foot {
  display: flex;
  gap: 18px;
  margin: 0;
  font-size: 13px;
}

.auth-aside-foot a {
  color: #9fb2d4;
}

.auth-aside-foot a:hover {
  color: #fff;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.auth-form {
  width: 100%;
  max-width: 400px;
}

/* The logo only shows here when the panel is gone. */
.auth-form .lg {
  display: none;
  margin-bottom: 26px;
}

.auth-form h1 {
  font-size: 28px;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.auth-form .sub {
  color: var(--dim);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 26px;
}

/* Password: a Show button inside the field, and the rules beneath it. */
.pw-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-forgot {
  font-size: 13.5px;
  font-weight: 600;
}

.pw {
  position: relative;
}

.pw input {
  width: 100%;
  padding-right: 64px !important;
}

.pw-show {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: 600 13px var(--font);
  color: var(--brand-ink);
  cursor: pointer;
}

.pw-show:hover {
  background: var(--panel2);
}

.pw-need {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--dim);
}

.pw-need li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pw-need li.ok {
  color: var(--ok);
}

.pw-dot {
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
}

.pw-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.auth-checks {
  display: grid;
  gap: 12px;
  margin: 6px 0 20px;
}

.auth-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}

.auth-check input {
  margin-top: 3px;
  flex: none;
}

@media (max-width:900px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    place-items: start center;
    padding: 40px 20px;
    background: radial-gradient(760px 420px at 50% -60px, var(--brand-050), transparent 70%);
  }

  .auth-form .lg {
    display: inline-flex;
  }
}

/* On a phone, code wraps instead of running off the side: every character of
   a key, a hash or a command stays on screen. Only in the app and the
   developer pages; wide screens keep one line per line. */
@media (max-width:620px) {
  .app-body .code code,
  .devdocs .code code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}


/* ---------- charts (app/src/components/Charts.tsx) ----------
   Thin marks, hairline grid, labels in text tokens, never in the mark's
   colour. Every chart has a table view; the tooltip only adds to it. */
.viz {
  position: relative;
}

.viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--dim);
}

.viz-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viz-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.viz svg {
  display: block;
  overflow: visible;
}

.viz .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.viz .tick {
  fill: var(--faint);
  font: 11px var(--font);
  font-variant-numeric: tabular-nums;
}

.viz .hit {
  fill: transparent;
  cursor: default;
  outline: none;
}

.viz .hit:hover,
.viz .hit:focus-visible {
  fill: color-mix(in srgb, var(--text) 5%, transparent);
}

.viz-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px 10px;
  font-size: 12.5px;
  min-width: 132px;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}

.viz-tip .t {
  color: var(--dim);
  margin-bottom: 4px;
}

.viz-tip .row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
}

.viz-tip .row b {
  color: var(--text);
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

.viz-tip .key {
  width: 12px;
  height: 2px;
  border-radius: 1px;
}

.viz-toggle {
  font-size: 12.5px;
}

/* Horizontal bars as HTML: label, track, value at the tip. */
.hbars {
  display: grid;
  gap: 9px;
}

.hbar {
  display: grid;
  /* Wide enough for "Acknowledged" before a word is ever broken. */
  grid-template-columns: minmax(112px, 38%) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.hbar .lab {
  color: var(--text);
  overflow-wrap: anywhere;
}

.hbar .lab small {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
}

.hbar .track {
  height: 10px;
  position: relative;
}

.hbar .fill {
  height: 10px;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--brand);
}

.hbar .val {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}

/* A ratio against its target: the track is a light step of the fill's hue. */
.meter {
  margin-bottom: 16px;
}

.meter .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.meter .top b {
  font-variant-numeric: tabular-nums;
}

.meter .bar {
  height: 8px;
  border-radius: 999px;
  background: var(--brand-050);
  overflow: hidden;
}

.meter .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.meter.short .bar {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
}

.meter.short .bar i {
  background: var(--warn);
}

.meter .s {
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 5px;
}

/* Many small states at a glance: one cell each, named on hover and focus,
   counted in words beside it. */
.tracker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tracker i {
  width: 14px;
  height: 22px;
  border-radius: 3px;
  background: var(--ok);
  outline: none;
}

.tracker i.warn {
  background: var(--warn);
}

.tracker i.idle {
  background: color-mix(in srgb, var(--idle) 45%, transparent);
}

.tracker i:focus-visible {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand);
}

.spark {
  display: block;
  margin-top: 8px;
}

.spark polyline {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.spark circle {
  fill: var(--brand);
  stroke: var(--panel);
  stroke-width: 2;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

@media (max-width:980px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}
