/*
 * Outright Mental ID: one stylesheet, two skins.
 *
 * The skeleton (split screen, top bar, left nav, rows, notices, dialogs) is
 * shared. A skin is a set of tokens on <html data-experience>, plus the few
 * devices that belong to one house only:
 *
 *   om    the studio. Dark only, hue-free greys, and the flag: blue, pink and
 *         gold (docs/BRAND.md). Blue is the base and holds most of the room;
 *         pink is a narrow pop and gold the narrowest. Blue is only ever a
 *         fill, with a tint of it for links and focus. Gold is never flat
 *         where it has room: it is foil, and it catches the light. Lora
 *         for the human lines. Status colour always sits beside a word.
 *   apes  A.P.E.S. Corporation. Ink on paper, light with a dark variant, system
 *         faces, hazard band, bracketed captions, perforation rules, the seal.
 *         2px radii, no shadows: a document, not an app.
 *
 * The response headers allow no inline style, so everything a page needs is a
 * class in this file.
 */

@font-face {
  font-family: "Lora";
  src: url("fonts/Lora/Lora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("fonts/Lora/Lora-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("fonts/Lora/Lora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens: om ----------------------------------------------------------- */

:root {
  color-scheme: dark;

  --ground: #0e0e0e;
  --surface-1: #161616;
  --surface-2: #1c1c1c;
  --surface-3: #232323;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --text: #e0e0e0;
  --text-2: #b4b4b4;
  --text-3: #8c8c8c;

  /* The public site's value bands. Every seam is a change of value. */
  --band-ink: #101010;
  --band-deep: #2c2c2c;
  --band-canvas: #454545;

  /* The flag (docs/BRAND.md). Blue is a fill and never text; its tint may be
     text. Pink and gold may be either. The gold pair shades the leaf. */
  --flag-blue: #000f89;
  --flag-blue-lift: #0014b8;
  --flag-pink: #ff00c8;
  --flag-gold: #d4af4a;
  --flag-gold-light: #f3dc8c;
  --flag-gold-deep: #a67c1e;
  --tint: #c4cfff;
  --tint-soft: rgba(196, 207, 255, .22);
  --ink-blue: var(--flag-blue);
  --on-ink-blue: #ffffff;

  /* Status only, and always beside a word. Kept clear of the flag's hues. */
  --ok: #00ff88;
  --warn: #ff9f0a;
  --danger: #ff453a;
  --on-danger: #0e0e0e;

  --btn-bg: var(--flag-blue);
  --btn-bg-hover: var(--flag-blue-lift);
  --btn-fg: #ffffff;

  --dialog-bg: #ececec;
  --dialog-fg: #0e0e0e;
  --dialog-fg-2: #3a3a3a;
  --dialog-line: #c8c8c8;

  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-pill: 999px;

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --label-size: 12px;
  --label-weight: 600;
  --label-track: .12em;
  --label-case: uppercase;

  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .55);
  --ease: 160ms ease;
  --focus-ring: 0 0 0 3px var(--tint-soft);
}

/* --- Tokens: apes --------------------------------------------------------- */

:root[data-experience="apes"] {
  color-scheme: light dark;

  --ground: #f0f0f0;
  --surface-1: #e6e6e6;
  --surface-2: #e0e0e0;
  --surface-3: #d4d4d4;
  --line: #c0c0c0;
  --line-strong: #696969;
  --text: #141414;
  --text-2: #505050;
  --text-3: #505050;

  --oxide: #555555;
  --amber: #b9a05b;

  --tint: #2f4f4e;
  --tint-soft: rgba(47, 79, 78, .25);
  --ink-blue: #555555;
  --on-ink-blue: #f0f0f0;

  --ok: #28663a;
  --warn: #8a6300;
  --danger: #632c2c;
  --on-danger: #f0f0f0;

  --btn-bg: #555555;
  --btn-bg-hover: #141414;
  --btn-fg: #f0f0f0;

  --dialog-bg: #f0f0f0;
  --dialog-fg: #141414;
  --dialog-fg-2: #505050;
  --dialog-line: #696969;

  --r-1: 2px;
  --r-2: 2px;
  --r-3: 2px;
  --r-pill: 2px;

  --font-display: var(--font-ui);
  --shadow-pop: none;
  --focus-ring: 0 0 0 0 transparent;
}

@media (prefers-color-scheme: dark) {
  :root[data-experience="apes"] {
    --ground: #181818;
    --surface-1: #1e1e1e;
    --surface-2: #222222;
    --surface-3: #2c2c2c;
    --line: #333333;
    --line-strong: #808080;
    --text: #eaeaea;
    --text-2: #a8a8a8;
    --text-3: #a8a8a8;
    --oxide: #a0a0a0;
    --amber: #c4ad6a;
    --tint: #7aa7a3;
    --tint-soft: rgba(122, 167, 163, .3);
    --ink-blue: #a0a0a0;
    --on-ink-blue: #181818;
    --ok: #7fc08f;
    --warn: #c48a2e;
    --danger: #da9090;
    --on-danger: #181818;
    --btn-bg: #a0a0a0;
    --btn-bg-hover: #eaeaea;
    --btn-fg: #181818;
    --dialog-bg: #222222;
    --dialog-fg: #eaeaea;
    --dialog-fg-2: #a8a8a8;
    --dialog-line: #808080;
  }
}

/* --- Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[data-experience="apes"] body { font-size: 16px; }

[hidden] { display: none !important; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--text);
  text-wrap: balance;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
}
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
[data-experience="apes"] h1 { font-size: clamp(24px, 6vw, 34px); letter-spacing: 0; }
[data-experience="apes"] h2 { font-size: clamp(18px, 4.5vw, 21px); }

a {
  color: var(--tint);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .2em;
  transition: color var(--ease), text-decoration-color var(--ease);
}
a:hover { text-decoration-color: currentColor; }
[data-experience="om"] a:hover { color: #ffffff; }
[data-experience="apes"] a { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 2px;
}
[data-experience="apes"] :focus-visible {
  outline: 3px solid var(--oxide);
  box-shadow: 0 0 0 5px var(--ground);
}

img, svg { display: block; max-width: 100%; }

.mono { font-family: var(--font-mono); font-size: .94em; overflow-wrap: anywhere; }
.mono--quiet { color: var(--text-3); font-size: .86em; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.num { text-align: right; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--r-2);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--btn-fg); }

.icon { width: 18px; height: 18px; flex: none; }

/* The label voice: uppercase by CSS, never in the markup. */
.eyebrow, .label, .filter-label, dt, .notice-label,
.plain-label, .disclosure-label, .brand-tag, .table th, .stat-label {
  font-family: var(--font-ui);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-track);
  text-transform: var(--label-case);
}

.eyebrow { color: var(--text-3); margin-bottom: 14px; }
[data-experience="om"] .eyebrow { color: var(--flag-gold); }
.lede {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
[data-experience="apes"] .lede { font-size: 18px; color: var(--text); }
.fine { margin-top: 28px; font-size: 13px; line-height: 1.6; color: var(--text-3); }
[data-experience="apes"] .fine {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hint { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.aside { margin-top: 24px; font-size: 14px; color: var(--text-2); }
.callsign { font-family: var(--font-mono); font-weight: 600; letter-spacing: -.01em; }

/* Bracketed captions: the Corporation's stamp. One per page. */
.stamp-line {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.stamp-line .form-no { margin-right: auto; }
.stamp, .form-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.stamp::before { content: "\2308\00a0"; }
.stamp::after { content: "\00a0\2309"; }

.perf {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}

.hazard {
  height: 12px;
  flex: none;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, transparent 8px 16px);
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-track);
  text-transform: var(--label-case);
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--block { display: flex; width: 100%; }
.btn--small { min-height: 34px; padding: 0 14px; font-size: 11px; }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
[data-experience="om"] a.btn--primary:hover { color: var(--btn-fg); }

.btn--quiet { border-color: var(--line-strong); color: var(--text); }
.btn--quiet:hover { border-color: var(--tint); color: var(--tint); text-decoration: none; }
[data-experience="om"] a.btn--quiet:hover { color: var(--tint); }

.btn--danger { background: var(--danger); color: var(--on-danger); }
.btn--danger:hover { filter: brightness(1.12); }
.btn--danger-quiet { border-color: var(--line-strong); color: var(--text); }
.btn--danger-quiet:hover { border-color: var(--danger); }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.btn.is-busy { cursor: progress; }
.btn.is-busy .icon { animation: pulse 1.1s ease-in-out infinite; }

[data-experience="apes"] .btn {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
}
[data-experience="apes"] .btn--small { font-size: 13px; }
[data-experience="apes"] .btn--quiet { border-width: 2px; }
[data-experience="apes"] .btn--danger-quiet { border-width: 2px; }
[data-experience="apes"] .btn--primary:hover { color: var(--ground); }

.link-button, .menu-out {
  padding: 0;
  border: 0;
  background: none;
  color: var(--tint);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .2em;
}
.link-button:hover { text-decoration-color: currentColor; }
[data-experience="apes"] .link-button { text-decoration-color: currentColor; }

/* --- Fields --------------------------------------------------------------- */

.form { margin-top: 28px; display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.label { color: var(--text-2); }

.input, .select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.3;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}
.input::placeholder { color: var(--text-3); opacity: .75; }
.input:hover, .select:hover { border-color: var(--text-3); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--tint);
  box-shadow: var(--focus-ring);
}
[data-experience="apes"] .input, [data-experience="apes"] .select { border-width: 2px; }
[data-experience="apes"] .input:focus, [data-experience="apes"] .select:focus {
  outline: 3px solid var(--oxide);
  outline-offset: 2px;
  border-color: var(--text);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.input--mono { font-family: var(--font-mono); }
.input--area { min-height: 112px; resize: vertical; line-height: 1.5; font-family: var(--font-display); }
.input--row { min-height: 38px; padding: 6px 12px; font-size: 15px; }

.input-wrap { position: relative; }
.input-wrap .counter {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.input-wrap--area .counter { top: auto; bottom: 10px; transform: none; }
.input-wrap.has-counter .input { padding-right: 76px; }
.input-wrap--area.has-counter .input { padding-right: 14px; padding-bottom: 30px; }
.counter.is-over { color: var(--danger); }

.field-error {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
  padding-left: 10px;
  border-left: 3px solid var(--danger);
}

.select {
  min-height: 36px;
  padding: 6px 30px 6px 10px;
  font-size: 14px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* The six-digit code. One real input; without script it is a wide mono field. */
.code-input {
  height: 58px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .32em;
  text-align: center;
}
.code-wrap { position: relative; width: 100%; max-width: 348px; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}
[data-experience="apes"] .code-box { border-width: 2px; }
.code-box.is-filled { border-color: var(--text-3); }
.code-wrap.is-focused .code-box.is-active {
  border-color: var(--tint);
  box-shadow: var(--focus-ring);
  background: var(--surface-3);
}
[data-experience="apes"] .code-wrap.is-focused .code-box.is-active { border-color: var(--text); outline: 3px solid var(--oxide); outline-offset: 2px; }
.code-wrap.is-focused .code-box.is-active:empty::after {
  content: "";
  width: 2px; height: 26px;
  background: var(--tint);
  animation: caret 1.1s steps(1) infinite;
}
.code-wrap.is-invalid .code-box { border-color: var(--danger); }
.code-wrap .code-input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  letter-spacing: 0;
  cursor: text;
}

.or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
[data-experience="apes"] .or::before, [data-experience="apes"] .or::after {
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}

.async-status { min-height: 0; font-size: 13.5px; color: var(--text-2); }
.async-status:not(:empty) { margin-top: 10px; }
.async-status.is-error { padding-left: 10px; border-left: 3px solid var(--danger); color: var(--text); }
.async-status.is-ok { padding-left: 10px; border-left: 3px solid var(--ok); color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.actions--stack { flex-direction: column; }
.actions--decision { justify-content: flex-end; }
.actions--decision .btn { flex: 0 1 auto; }
.inline-form { display: block; }
.aside-rows { margin-top: 24px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }

.points { margin-top: 22px; display: grid; gap: 10px; }
.points li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.points .icon { margin-top: 3px; color: var(--text); }
.points--plain li { padding-left: 14px; border-left: 1px solid var(--line-strong); }

/* --- Notices and toasts --------------------------------------------------- */

.notice {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--tint);
  border-radius: var(--r-1);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-2);
}
[data-experience="apes"] .notice { border-left-width: 4px; border-radius: 0; color: var(--text); }
.notice-icon { margin-top: 2px; color: var(--text); }
.notice-body { display: grid; gap: 6px; min-width: 0; }
.notice-label { color: var(--text); }
.notice--success { border-left-color: var(--ok); }
.notice--warn { border-left-color: var(--warn); }
.notice--error { border-left-color: var(--danger); color: var(--text); }
.form .notice { margin-top: 0; }

.toasts { margin: 12px 16px 0; display: grid; gap: 8px; justify-items: end; order: -1; }
.js .toasts {
  position: fixed;
  top: 68px; right: 16px;
  z-index: 60;
  margin: 0;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  padding: 12px 12px 12px 14px;
  border-left: 3px solid var(--ok);
  border-radius: var(--r-1);
  background: var(--surface-3);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  color: var(--text);
  animation: toast-in 200ms ease both;
}
[data-experience="apes"] .toast { border: 2px solid var(--text); border-left-width: 6px; }
.toast p { flex: 1; }
.toast-icon { margin-top: 2px; }
.toast--error { border-left-color: var(--danger); }
.toast--info { border-left-color: var(--tint); }
.toast.is-leaving { animation: toast-out 160ms ease both; }
.toast-close {
  display: inline-flex;
  padding: 2px;
  border: 0;
  border-radius: var(--r-1);
  background: none;
  color: var(--text-3);
  cursor: pointer;
}
.toast-close:hover { color: var(--text); }

/* --- Dialog --------------------------------------------------------------- */

.dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--r-3);
  background: var(--dialog-bg);
  color: var(--dialog-fg);
  box-shadow: var(--shadow-pop);
}
[data-experience="apes"] .dialog { border: 2px solid var(--dialog-fg); }
.dialog::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); }
[data-experience="apes"] .dialog::backdrop { background: rgba(20, 20, 20, .7); backdrop-filter: none; }
.dialog[open] { animation: dialog-in 180ms ease both; }
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 18px 24px;
  border-bottom: 1px solid var(--dialog-line);
}
.dialog-head h2 { font-size: 20px; color: var(--dialog-fg); }
.dialog-close {
  display: inline-flex;
  padding: 6px;
  border: 0;
  border-radius: var(--r-1);
  background: none;
  color: var(--dialog-fg);
  cursor: pointer;
}
.dialog-close:focus-visible, .dialog .btn:focus-visible { outline-color: var(--dialog-fg); }
.dialog-body { padding: 22px 24px 8px; display: grid; gap: 14px; font-size: 15.5px; color: var(--dialog-fg-2); }
.dialog-body strong { color: var(--dialog-fg); font-family: var(--font-mono); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 20px 24px 24px; }
.dialog .btn--cancel { background: var(--dialog-fg); color: var(--dialog-bg); }
.dialog .btn--cancel:hover { filter: brightness(1.35); }
.dialog .btn--go { border-color: var(--dialog-fg); color: var(--dialog-fg); background: transparent; }
.dialog .btn--go:hover { background: var(--dialog-fg); color: var(--dialog-bg); }
.dialog .btn--go.is-danger { border-color: var(--dialog-fg); }

/* --- Top bar -------------------------------------------------------------- */

.topbar {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}
/* The flag under the studio's top bar, in its proportions: blue most, pink far less, gold least. */
[data-experience="om"] .topbar {
  border-bottom: 0;
  background:
    linear-gradient(90deg, var(--flag-blue) 0 70%, var(--flag-pink) 70% 88%, var(--flag-gold) 88% 100%) bottom / 100% 2px no-repeat,
    #0a0a0a;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1168px;
  min-height: 58px;
  margin: 0 auto;
  padding: 0 24px;
}
.topbar-end { margin-left: auto; display: flex; align-items: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-lockup { height: 30px; width: auto; }
.brand-roger { width: 34px; height: 34px; }
.brand-tag {
  padding: 3px 8px;
  border-radius: var(--r-1);
  background: var(--ink-blue);
  color: var(--on-ink-blue);
  font-size: 11px;
  white-space: nowrap;
}
.brand--apes { gap: 10px; }
.brand--apes .brand-mark { width: 24px; height: 24px; }
.brand-word { font-size: 13px; font-weight: 700; letter-spacing: .18em; }
.brand-entity {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: .04em;
}
[data-experience="apes"] a.brand { text-decoration: none; }
[data-experience="om"] a.brand:hover { color: var(--text); }

.menu { position: relative; }
.menu summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--r-pill);
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: background-color var(--ease);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--surface-2); }
.menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.menu-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.menu-chevron { width: 14px; height: 14px; color: var(--text-3); transition: transform var(--ease); }
.menu[open] .menu-chevron { transform: rotate(180deg); }
.menu-panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 248px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface-2);
  box-shadow: var(--shadow-pop);
  animation: pop-in 140ms ease both;
}
[data-experience="apes"] .menu-panel { border-width: 2px; border-color: var(--text); background: var(--ground); }
.menu-email {
  padding: 8px 10px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}
.menu-panel a, .menu-out {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-1);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}
.menu-panel a:hover, .menu-out:hover { background: var(--surface-3); color: var(--text); }
.menu-panel form { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

.tabs { align-self: stretch; display: flex; }
.tabs ul { display: flex; gap: 4px; align-items: stretch; }
.tabs li { display: flex; }
.tabs a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-2);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-track);
  text-transform: var(--label-case);
  text-decoration: none;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--tint); border-bottom-color: var(--tint); }
[data-experience="om"] .tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--flag-pink); }

/* --- Disclosure (apes) ---------------------------------------------------- */

.disclosure {
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-1);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
}
.disclosure p { max-width: 70rem; margin: 0 auto; text-wrap: balance; }
.disclosure-label {
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
}
.disclosure-label::before { content: "\2308\00a0"; }
.disclosure-label::after { content: "\00a0\2309"; }
.disclosure a { white-space: nowrap; font-weight: 600; }

/* --- Split screen --------------------------------------------------------- */

.split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(440px, 45fr) 55fr;
  min-height: 0;
}
.split-form {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 36px clamp(24px, 5vw, 72px) 28px;
  background: var(--ground);
}
.split-head, .split-main, .split-form .footer { width: 100%; max-width: 400px; margin-inline: auto; }
.split-main { margin-block: auto; padding: 56px 0 40px; animation: rise 320ms ease both; }

.panel { position: relative; overflow: hidden; min-height: 240px; }

/* om: diagonal bands and the mark. No photograph. The greys are the ground;
   the flag crosses it as blue, then pink, then gold: the blue wide, the pink a
   narrow band, the gold the narrowest. The gold is not a flat fill: the
   bottom layer is one sheet of gold foil, the bands are painted over it with a window left
   open where the gold band falls, and between the two a sheen crosses the
   leaf and its glints come and go. */
.panel--om { background: var(--band-deep); color: #ffffff; }
.panel-bands {
  --gold-from: 85%;
  --gold-to: 90%;
  position: absolute;
  inset: 0;
  background: url("gold-leaf.svg") 0 0 / 100% 100% no-repeat, var(--flag-gold);
}
.panel-bands::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 42%, rgba(255, 246, 208, .5) 50%, transparent 58%) 130% 0 / 320% 100% no-repeat,
    url("gold-glint.svg") 0 0 / 240px 240px;
  mix-blend-mode: screen;
  animation: sheen 11s ease-in-out infinite, glint 3.6s ease-in-out infinite alternate;
}
.panel-bands::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    112deg,
    var(--band-deep) 0 calc(14% - .5px),
    var(--band-ink) calc(14% + .5px) calc(38% - .5px),
    var(--band-canvas) calc(38% + .5px) calc(52% - .5px),
    var(--flag-blue) calc(52% + .5px) calc(78% - .5px),
    var(--flag-pink) calc(78% + .5px) calc(var(--gold-from) - .5px),
    transparent calc(var(--gold-from) + .5px) calc(var(--gold-to) - .5px),
    var(--band-ink) calc(var(--gold-to) + .5px) 100%
  );
}
.panel-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 48px 48px 120px;
}
.panel-lockup {
  width: min(66%, 600px);
  height: auto;
  animation: swell 9s ease-in-out infinite;
}
.panel-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #e0e0e0;
  padding-left: .34em;
}
.panel--om .panel-motto {
  position: absolute;
  left: 44px; bottom: 76px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  color: #ffffff;
}
.panel-caption {
  position: absolute;
  left: 44px; bottom: 44px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b4b4b4;
}

/* apes: a paper panel in the manner of a government counter. */
.panel--apes {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--text);
  background: var(--surface-2);
  color: var(--text);
}
.panel--apes .panel-motto {
  padding: 9px 16px;
  background: var(--oxide);
  color: var(--ground);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
}
.panel-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 32px;
}
.panel-captions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.panel-seal { margin: 44px auto 40px; width: min(72%, 300px); color: var(--oxide); transform: rotate(-4deg); }
.panel-seal .seal { width: 100%; height: auto; }
.panel-heading { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.15; }
.panel--apes .perf { width: 100%; margin: 24px 0 18px; }
.panel-entity { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.panel-fine {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* --- Pages with a top bar ------------------------------------------------- */

.page { flex: 1; width: 100%; max-width: 1168px; margin: 0 auto; padding: 48px 24px 72px; }
.page--account { display: grid; grid-template-columns: 200px minmax(0, 660px); gap: 56px; }
.page--plain { display: flex; justify-content: center; }
.content { min-width: 0; animation: rise 280ms ease both; }
.content--narrow { width: 100%; max-width: 480px; margin-top: clamp(0px, 6vh, 64px); }
.content--doc { width: 100%; max-width: 44rem; }
.content--wide { width: 100%; }

.sidenav { position: sticky; top: 24px; align-self: start; padding-top: 6px; }
.sidenav ul { display: grid; gap: 2px; }
.sidenav-quiet { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sidenav a {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease);
}
.sidenav a:hover { color: var(--text); }
.sidenav a[aria-current="page"] { color: var(--text); border-left-color: var(--flag-pink); }
[data-experience="apes"] .sidenav a[aria-current="page"] { color: var(--text); border-left-color: var(--oxide); border-left-width: 3px; }

.card--focus { padding: 0; }
.greeting { margin-bottom: 8px; }
.greeting .callsign { color: #ffffff; }
[data-experience="apes"] .greeting .callsign { color: inherit; }

.section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-head, .setting-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-note { font-size: 13px; color: var(--text-3); }
.section > .section-note { margin-top: 10px; }
.section-actions { margin-top: 16px; display: grid; gap: 4px; justify-items: start; }
.edit-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.setting-value { font-size: 16px; }
.setting-value .callsign { font-size: 20px; }
.bio { font-family: var(--font-display); font-size: 16.5px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.rule { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.rule .icon { margin-top: 2px; color: var(--text); }
.setting .form { margin-top: 12px; justify-items: start; }
.setting .form .field, .setting .form .rows { width: 100%; }
.empty-line { margin-top: 10px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-2); color: var(--text-2); font-size: 14px; }

/* Rows: channels, passkeys, sessions, access. */
.rows { margin-top: 14px; display: grid; gap: 6px; }
/* A group of rows under a section, named: Settings groups the home's places this way. */
.group-name {
  margin: 26px 0 0;
  font-family: var(--font-ui);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-track);
  text-transform: var(--label-case);
  color: var(--flag-gold);
}
.group-name + .rows { margin-top: 10px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-1);
  transition: border-color var(--ease), background-color var(--ease);
}
.row:hover { border-color: var(--line-strong); }
[data-experience="apes"] .row { border-color: var(--line-strong); background: transparent; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; }
label.row-title { display: block; margin-bottom: 6px; }
.row-sub { margin-top: 1px; font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.row-meta, .row-hosts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--text-3); }
.row-actions { display: flex; flex: none; gap: 8px; align-items: center; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form .input-wrap { flex: 1 1 180px; }
.row--empty .glyph { color: var(--text-3); }
.row--field { align-items: flex-start; }
.row--field .glyph { margin-top: 2px; }
.row--contact { margin-top: 24px; }
.rows--tight .row { min-height: 0; padding: 8px 10px; }

.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px; height: 38px;
  border-radius: var(--r-1);
  background: var(--surface-3);
  color: var(--text);
}
.glyph svg { width: 22px; height: 22px; }
[data-experience="apes"] .glyph { background: transparent; border: 1px solid var(--line-strong); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}
.badge--ok::before, .badge--danger::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
}
.badge--danger::before { background: var(--danger); }
.badge--accent { border-color: var(--tint); color: var(--tint); }
.badge--fill { border-color: var(--ink-blue); background: var(--ink-blue); color: var(--on-ink-blue); }
.row-meta .badge, h1 .badge { margin-left: 0; }
h1 .badge { font-family: var(--font-ui); letter-spacing: .08em; }

/* A client's mark, in the admin section. */
.tile-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px; height: 64px;
  border-radius: var(--r-2);
  background: var(--ground);
  border: 1px solid var(--line);
}
.tile-mark img { width: 44px; height: 44px; object-fit: contain; }
.tile-mark--small { width: 44px; height: 44px; }
.tile-mark--small img { width: 30px; height: 30px; }

/* --- The home: shelves of places ------------------------------------------- */

/* The whole body of the home is the places a person can go, across the full
   width of whatever is showing it. No cards and no boxes: a place is a row of
   type on a hairline, in one size for games, products and platforms, and a
   smaller one for the lab. Under a pointer the row fills with the flag's blue. */
.page--home { max-width: none; padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 80px) clamp(56px, 8vw, 112px); }
.page--home .greeting { margin-bottom: clamp(28px, 5vw, 64px); }
.page--home .greeting h1 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
/* The top bar and the footer run the full width with it. */
.shell-home .topbar-inner, .shell-home .footer { max-width: none; padding-inline: clamp(20px, 5vw, 80px); }

.home-empty { margin-top: clamp(24px, 4vw, 48px); font-family: var(--font-display); font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); }

.shelf {
  --name-size: clamp(20px, 2vw, 29px);
  --mark-size: 40px;
  display: grid;
  grid-template-columns: clamp(96px, 12vw, 200px) minmax(0, 1fr);
  column-gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(36px, 5vw, 72px);
}
/* The games lead by coming first and by a larger mark, not by larger type. */
.shelf--games { --mark-size: 48px; }
.shelf--lab { --name-size: clamp(17px, 1.35vw, 20px); --mark-size: 32px; }
.shelf-name {
  position: sticky;
  top: 20px;
  align-self: start;
  margin: 0;
  padding-top: calc(18px + (var(--name-size) * .5) - 7px);
  font-family: var(--font-ui);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-track);
  text-transform: var(--label-case);
  color: var(--flag-gold);
}
.shelf-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.place {
  display: grid;
  grid-template-columns: var(--mark-size) minmax(min-content, 2fr) minmax(0, 1.2fr) minmax(0, 12rem);
  align-items: center;
  column-gap: clamp(14px, 2.2vw, 32px);
  padding: 18px clamp(10px, 1.4vw, 20px);
  margin-inline: calc(-1 * clamp(10px, 1.4vw, 20px));
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(var(--flag-blue), var(--flag-blue)) no-repeat 0 0 / 0% 100%;
  transition: background-size 260ms cubic-bezier(.2, .7, .2, 1), color var(--ease);
}
.place:hover, .place:focus-visible { background-size: 100% 100%; color: var(--on-ink-blue); text-decoration: none; }
[data-experience="om"] a.place:hover { color: var(--on-ink-blue); }
.place-mark { display: block; width: var(--mark-size); height: var(--mark-size); }
.place-mark img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 22%; }
.place-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--name-size);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: #ffffff;
}
.place-desc { font-family: var(--font-display); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; color: var(--text-2); }
.place-host { display: inline-flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 8px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.place-host .icon { width: 15px; height: 15px; transition: transform var(--ease); }
.place:hover .place-desc, .place:hover .place-host, .place:focus-visible .place-desc, .place:focus-visible .place-host { color: var(--on-ink-blue); }
.place:hover .place-host .icon, .place:focus-visible .place-host .icon { transform: translate(3px, -3px); }

/* A name stays on one line wherever a place is laid out as a row: the column
   grows to hold it, and what the place is gives way. */
@media (min-width: 1024px) {
  .place-name { white-space: nowrap; }
}

/* The lab is many small things: two columns of them where there is room. */
@media (min-width: 1400px) {
  .shelf--lab .shelf-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 88px); }
  .shelf--lab .place { grid-template-columns: var(--mark-size) minmax(0, 1fr) auto; }
  .shelf--lab .place-desc { grid-column: 2 / 3; grid-row: 2; font-size: 14.5px; }
  .shelf--lab .place-host { grid-column: 3; grid-row: 1 / 3; }
}

/* On a narrow screen the section's name sits above its places, and a place
   is its mark and its name, with what it is underneath. */
@media (max-width: 1023px) {
  .shelf { grid-template-columns: 1fr; }
  .shelf-name { position: static; padding: 0 0 12px; }
  .place { grid-template-columns: var(--mark-size) minmax(0, 1fr); row-gap: 6px; padding-block: 16px; }
  .place-desc { grid-column: 2; }
  .place-host { grid-column: 2; justify-self: start; }
  .shelf--games { --mark-size: 48px; }
}

.empty {
  margin-top: 16px;
  padding: 44px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: var(--text-2);
}
.empty h3 { color: var(--text); font-size: 22px; }
.empty p { max-width: 46ch; font-family: var(--font-display); font-size: 16px; }
.empty-mark { width: 84px; height: 84px; margin-bottom: 6px; animation: swell 9s ease-in-out infinite; }

.facts { margin-top: 6px; }
.facts > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 0; }
dt { color: var(--text-3); font-size: 11px; }
.facts-action { font-size: 14px; font-weight: 600; min-width: 56px; text-align: right; }
.facts--stack > div { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
.facts--form { margin-top: 24px; border: 1px solid var(--line-strong); }
.facts--form > div { padding: 12px 14px; border-bottom-color: var(--line-strong); }
.return { border-top: 0; margin-top: 0; padding-top: 0; }
.return p { margin-top: 8px; color: var(--text-2); }

/* --- Admin ---------------------------------------------------------------- */

.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.count { margin-top: 6px; color: var(--text-3); font-size: 14px; }
.count strong { color: var(--text); font-weight: 600; }
.crumb { margin-bottom: 18px; font-size: 13px; color: var(--text-3); }

.filters { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface-1); }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input--search { padding-left: 42px; padding-right: 44px; }
.input--search::-webkit-search-cancel-button { filter: grayscale(1); }
.kbd {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.input--search:focus ~ .kbd { opacity: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter { display: grid; gap: 4px; flex: 1 1 130px; max-width: 200px; }
.filter-label { font-size: 10.5px; color: var(--text-3); }

.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chips--active { display: flex; align-items: center; margin-top: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  text-decoration: none;
}
.chip--all { border-color: var(--ink-blue); background: var(--ink-blue); color: var(--on-ink-blue); }
.chip--remove { color: var(--text); }
.chip--remove:hover { border-color: var(--tint); }
.clear { margin-left: 6px; font-size: 13px; }

.table-wrap { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; background: var(--surface-1); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table thead th { font-size: 10.5px; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
.table th.num, .table td.num { text-align: right; }
.table tbody th { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table--people tbody tr { position: relative; }
.person-link { display: grid; gap: 1px; color: var(--text); text-decoration: none; }
.person-link::after { content: ""; position: absolute; inset: 0; }
.person-link:focus-visible { outline: none; }
.person-link:focus-visible::after { outline: 2px solid var(--tint); outline-offset: -2px; }
.person-name { font-weight: 600; font-size: 14.5px; }
.person-email { color: var(--text-3); font-size: 12.5px; }
.table-wrap .empty-line { margin: 12px; }
.action { color: var(--text); }
.detail { color: var(--text-2); overflow-wrap: anywhere; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.pager-note { font-size: 13px; color: var(--text-3); }
.pager-links { display: flex; gap: 8px; }
.pager .icon { width: 14px; height: 14px; }

.person-head { display: flex; gap: 18px; align-items: center; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px; height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.person-title { min-width: 0; display: grid; gap: 2px; }
.person-title h1 { font-size: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.person-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.person-side .bio { margin-top: 14px; font-size: 15px; }
.person-side .muted { margin-top: 12px; font-size: 14px; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.switch-track {
  position: relative;
  width: 42px; height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-3);
  transition: background-color var(--ease), border-color var(--ease);
}
.switch-thumb {
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform var(--ease), background-color var(--ease);
}
.switch[aria-checked="true"] .switch-track { background: var(--ink-blue); border-color: var(--ink-blue); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); background: #ffffff; }
.switch[aria-checked="true"] { color: var(--text); }
.switch-text { min-width: 2.2em; text-align: left; }
.switch[disabled] { opacity: .55; cursor: default; }

.row-stat { flex: none; text-align: right; min-width: 96px; }
.stat-link { display: block; color: var(--text); text-decoration: none; }
.stat-num { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat-label { display: block; font-size: 10.5px; color: var(--text-3); }
.row--product { align-items: flex-start; padding: 18px; }

/* --- The Instrument of Custody -------------------------------------------- */

.instrument-head { padding-bottom: 24px; border-bottom: 2px solid var(--text); }
.clauses { counter-reset: clause; }
.clauses > li {
  counter-increment: clause;
  position: relative;
  padding: 22px 0 22px 56px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.clauses > li::before {
  content: counter(clause) ".";
  position: absolute;
  left: 0; top: 23px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}
.clauses h2 { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.clauses p { max-width: 62ch; }
.plain {
  margin-top: 4px;
  padding: 12px 14px;
  border-left: 4px solid var(--line-strong);
  background: var(--surface-2);
}
.plain-label { display: block; margin-bottom: 2px; color: var(--text-2); font-size: 11px; }
.instrument-foot { display: flex; gap: 28px; align-items: center; }
.instrument-foot p { margin-top: 4px; }
.instrument-seal { flex: none; width: 128px; color: var(--oxide); transform: rotate(-4deg); }

/* --- Footer --------------------------------------------------------------- */

.footer {
  width: 100%;
  max-width: 1168px;
  margin: 0 auto;
  padding: 22px 24px 30px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}
.footer a { color: var(--text-2); font-weight: 600; }
.footer--compact { padding: 20px 0 0; border-top: 1px solid var(--line); }
/* The studio's footer: the company on the left, support on the right, under one rule. */
.footer--ends { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.footer--ends a { text-decoration: none; }
.footer--ends a:hover { text-decoration: underline; }
.colophon { color: var(--text-2); }

/* --- Motion --------------------------------------------------------------- */

@keyframes sheen {
  0%, 35% { background-position: 130% 0, 0 0; }
  75%, 100% { background-position: -30% 0, 0 0; }
}
@keyframes glint {
  from { opacity: .45; }
  to { opacity: 1; }
}
@keyframes swell {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-8px) rotate(-.6deg) scale(1.012); }
}
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(12px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* The Corporation does not animate. */
[data-experience="apes"] .content, [data-experience="apes"] .split-main,
[data-experience="apes"] .menu-panel, [data-experience="apes"] .dialog[open] { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .panel-lockup, .empty-mark, .panel-bands::before { animation: none; }
}

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 899px) {
  .split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .panel { order: -1; min-height: 0; }
  .panel--om { height: 148px; }
  .panel-art { padding: 0 24px; flex-direction: row; justify-content: flex-start; gap: 20px; }
  .panel-lockup { width: auto; height: 62px; animation: none; }
  .panel-eyebrow, .panel-caption { display: none; }
  .panel--om .panel-motto { display: none; }
  .panel--apes { border-left: 0; border-bottom: 2px solid var(--text); }
  .panel-sheet { flex-direction: row; align-items: center; gap: 18px; max-width: none; padding: 16px 24px; }
  .panel-seal { width: 76px; margin: 0; flex: none; order: -1; }
  .panel-captions, .panel--apes .perf, .panel-fine { display: none; }
  .panel-heading { font-size: 19px; }
  .panel-entity { display: none; }
  .panel--apes > .hazard { display: none; }
  .split-form { padding: 24px 24px 24px; }
  .split-head { display: none; }
  .split-main { margin-block: 0; padding: 28px 0 40px; }

  .page--account { grid-template-columns: 1fr; gap: 28px; }
  .sidenav { position: static; display: flex; gap: 6px; overflow-x: auto; margin: -8px -24px 0; padding: 0 24px 2px; border-bottom: 1px solid var(--line); }
  .sidenav ul { display: flex; gap: 2px; }
  .sidenav-quiet { margin: 0; padding: 0; border: 0; }
  .sidenav a { padding: 10px 12px; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .sidenav a[aria-current="page"] { border-bottom-color: var(--tint); }
  [data-experience="apes"] .sidenav a[aria-current="page"] { border-left-width: 0; border-bottom-color: var(--oxide); }
  .person-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 760px) {
  .page { padding: 32px 16px 56px; }
  .topbar-inner { padding: 0 16px; gap: 12px; flex-wrap: wrap; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 8px; border-top: 1px solid var(--line); overflow-x: auto; }
  .tabs a { padding: 12px 10px; }
  .menu-name { display: none; }
  .brand-entity { display: none; }
  .sidenav { margin-inline: -16px; padding-inline: 16px; }
  .footer:not(.footer--compact) { padding-inline: 16px; }

  .table thead { display: none; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table th, .table td { padding: 3px 0; border: 0; text-align: left; }
  .table td.num { text-align: left; }
  .table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 88px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .filter { max-width: none; flex-basis: 44%; }
  .facts > div { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; }
  .row { flex-wrap: wrap; }
  .row-actions { margin-left: auto; }
  .row--product .row-stat { text-align: left; min-width: 0; flex-basis: 100%; padding-left: 78px; }
  .row--passkey .row-actions, .row--session .row-actions { flex-basis: 100%; justify-content: flex-end; }
  .instrument-foot { flex-direction: column; align-items: flex-start; }
  .clauses > li { padding-left: 40px; }
  .disclosure { text-align: left; padding: 8px 16px; font-size: 12.5px; }
}

@media (max-width: 420px) {
  .code-boxes { gap: 6px; }
  .code-box { height: 52px; font-size: 22px; }
  .panel-lockup { height: 50px; }
  .panel--om { height: 128px; }
  .brand-lockup { height: 26px; }
  .actions--decision .btn { flex: 1 1 100%; }
}

@media (forced-colors: active) {
  .btn, .input, .row, .badge, .chip { border: 1px solid CanvasText; }
  .hazard { background: CanvasText; }
}

@media print {
  .topbar, .sidenav, .footer-links, .toasts, .skip, .panel { display: none; }
  body { background: #ffffff; color: #000000; }
}
