/* ════════════════════════════════════════════════════════════════════════
   LPM.CSS — the platform design system
   ────────────────────────────────────────────────────────────────────────
   One stylesheet for every platform page (marketing site, both Studios,
   Command HQ, recovery pages). No build step and no CDN framework: the CSP
   only allows scripts from 'self', so pages must never depend on a runtime
   CSS generator such as the Tailwind Play CDN.

   Look: light, warm monochrome. Instrument Serif for display type, Geist for
   everything else, Geist Mono for numbers and codes. Colour is used only to
   carry meaning (ok / warn / danger), never for decoration.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #F6F5F2;
  --bg-2: #EFEDE8;
  --surface: #FFFFFF;
  --ink: #111110;
  --ink-2: #3D3C39;
  --muted: #6E6C67;
  --faint: #A3A09A;
  --line: #E4E2DC;
  --line-strong: #CFCCC4;
  --wash: #F0EEE9;
  --hover: #2B2A27;

  --ok: #1F7A45;
  --ok-wash: #E6F2EA;
  --warn: #8A5A0B;
  --warn-wash: #F6EEDC;
  --danger: #A32620;
  --danger-wash: #F8E7E5;

  --focus: 0 0 0 3px rgba(17, 17, 16, .18);
  --shadow-sm: 0 1px 2px rgba(17, 17, 16, .06);
  --shadow: 0 10px 30px rgba(17, 17, 16, .08);
  --shadow-lg: 0 24px 60px rgba(17, 17, 16, .18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --head-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--surface); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--surface); text-decoration: none; }
.skip:focus { top: 12px; }

/* ── Typography ────────────────────────────────────────────────────────── */
.display { font: 400 clamp(44px, 7.4vw, 92px)/1 var(--serif); letter-spacing: -.02em; }
.h1, .page-title { font: 400 clamp(34px, 5vw, 52px)/1.05 var(--serif); letter-spacing: -.015em; }
.h2 { font: 400 clamp(28px, 3.6vw, 40px)/1.1 var(--serif); letter-spacing: -.01em; }
.h3 { font: 400 26px/1.15 var(--serif); }
.h4 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.serif { font-family: var(--serif); font-weight: 400; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.prose p + p { margin-top: 1em; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.link:hover { text-decoration-color: var(--ink); }

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-wide { max-width: 1440px; }
.wrap-narrow { max-width: 760px; }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-sm { padding: clamp(40px, 6vw, 72px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: var(--surface); }
.band-ink .muted, .band-ink .eyebrow, .band-ink .lede { color: rgba(255, 255, 255, .68); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-sm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.spread-end { align-items: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; } .mt-6 { margin-top: 72px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ── Brand ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: var(--surface);
  font: italic 400 20px/1 var(--serif);
}
.brand-name em { font-style: normal; color: var(--muted); font-weight: 500; }

/* ── Site header (marketing pages) ─────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  height: var(--head-h);
  background: rgba(246, 245, 242, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-head.scrolled, .site-head.solid { border-bottom-color: var(--line); }
.site-head .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; color: var(--ink-2); text-decoration: none; background: none; border: 0; padding: 4px 0; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); align-items: center; justify-content: center; }
.mobile-nav { display: none; }

/* ── App bar (HQ + Studios) ────────────────────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 10px var(--gutter);
  background: rgba(246, 245, 242, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.appbar-mid { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appbar-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.who { font-size: 13px; color: var(--muted); white-space: nowrap; }
.who strong { color: var(--ink); font-weight: 600; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { background: var(--hover); border-color: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-quiet:hover { background: var(--wash); border-color: transparent; color: var(--ink); }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.btn-light:hover { background: var(--wash); border-color: var(--wash); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8A1F1A; border-color: #8A1F1A; }
.btn-ghost.btn-danger { background: transparent; color: var(--danger); border-color: rgba(163, 38, 32, .35); }
.btn-ghost.btn-danger:hover { background: var(--danger-wash); border-color: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 13px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--surface) var(--surface) transparent transparent;
  animation: lpm-spin .7s linear infinite;
}
.btn-ghost.busy::after, .btn-quiet.busy::after { border-color: var(--ink) var(--ink) transparent transparent; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: clamp(18px, 2.4vw, 28px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px 0; }
.card-head .h3 { font-size: 24px; }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.card-lift { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-ink { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.card-ink .muted, .card-ink .eyebrow { color: rgba(255, 255, 255, .64); }
.card-wash { background: var(--wash); border-color: var(--line); }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat-n { display: block; font: 400 34px/1.05 var(--serif); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-l { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.stat.ink { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.stat.ink .stat-l, .stat.ink .stat-sub { color: rgba(255, 255, 255, .64); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field { display: block; min-width: 0; }
.field + .field { margin-top: 14px; }
.label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.label small { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 42px; padding: 9px 13px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236E6C67' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--wash); color: var(--muted); }
.input-mono { font-family: var(--mono); font-size: 14px; }
.input-color { padding: 4px; width: 46px; min-height: 42px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); }
.help { margin-top: 6px; font-size: 12px; color: var(--muted); }
.error-text { min-height: 20px; font-size: 14px; color: var(--danger); }
.with-btn { display: flex; gap: 8px; }
.with-btn .input { flex: 1 1 auto; }
.pw { position: relative; }
.pw .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 12px; color: var(--muted); padding: 6px 8px; border-radius: 6px; }
.pw-toggle:hover { color: var(--ink); background: var(--wash); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.switch-row:first-child { border-top: 0; padding-top: 0; }
.switch-row h4 { font-size: 15px; font-weight: 600; }
.switch-row p { font-size: 13px; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* ── Pills + dots ──────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.pill-ink { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.pill-wash { background: var(--wash); border-color: var(--wash); }
.pill-ok { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.pill-warn { background: var(--warn-wash); border-color: transparent; color: var(--warn); }
.pill-danger { background: var(--danger-wash); border-color: transparent; color: var(--danger); }
.pill-dashed { border-style: dashed; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-danger { background: var(--danger); }
.dot-live { background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 122, 69, .4); animation: lpm-ping 2s infinite; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll { max-height: 440px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 16px; background: #FBFAF8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #FBFAF8; }
.table .right { text-align: right; }
.table .muted-row td { color: var(--muted); }
.cell-main { display: block; font-weight: 600; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.strike { text-decoration: line-through; color: var(--muted); }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 0; background: transparent; padding: 12px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"], .tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tab .count { margin-left: 6px; font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: var(--surface); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"], .seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; }

/* ── Notes / alerts ────────────────────────────────────────────────────── */
.note { padding: 12px 14px; border-radius: 10px; background: var(--wash); font-size: 14px; color: var(--ink-2); }
.note-ok { background: var(--ok-wash); color: var(--ok); }
.note-warn { background: var(--warn-wash); color: var(--warn); }
.note-danger { background: var(--danger-wash); color: var(--danger); }
.note strong { font-weight: 600; }

/* ── Dialogs ───────────────────────────────────────────────────────────── */
.shroud { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(17, 17, 16, .38); animation: lpm-fade .15s ease; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); animation: lpm-rise .2s ease; }
.dialog-lg { width: min(760px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 4px; }
.dialog-head .h3 { font-size: 28px; }
.dialog-body { padding: 12px 22px 6px; }
.dialog-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 22px 22px; }
.x { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; color: var(--ink-2); }
.x:hover { border-color: var(--ink); color: var(--ink); }

/* ── Toasts ────────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: 0 10px 30px rgba(17, 17, 16, .25); animation: lpm-rise .2s ease; }
.toast.error { background: var(--danger); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

/* ── Overlay (full-screen progress) ────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px; background: rgba(246, 245, 242, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay-card { max-width: 440px; text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--ink); animation: lpm-spin .8s linear infinite; margin: 0 auto; }
.progress { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--ink); animation: lpm-slide 1.4s ease-in-out infinite; }

/* ── Bars (simple horizontal charts) ───────────────────────────────────── */
.bar { height: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .4s ease; }

/* ── Site footer ───────────────────────────────────────────────────────── */
.site-foot { padding: 56px 0 40px; border-top: 1px solid var(--line); background: var(--bg); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.6fr repeat(3, 1fr); }
.foot-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.foot-col a, .foot-col span { display: block; font-size: 14px; color: var(--muted); text-decoration: none; padding: 3px 0; }
.foot-col a:hover { color: var(--ink); }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ── Signed-out gate (HQ, Studios) ─────────────────────────────────────── */
.gate { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 32px 16px; }
.gate-card { width: min(440px, 100%); padding: clamp(24px, 4vw, 36px); }

/* ── Misc ──────────────────────────────────────────────────────────────── */
.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); }
.code { font-family: var(--mono); font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--wash); overflow-wrap: anywhere; }
.list-check { display: flex; flex-direction: column; gap: 10px; }
.list-check li { position: relative; padding-left: 26px; color: var(--ink-2); }
.list-check li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.card-ink .list-check li, .band-ink .list-check li { color: rgba(255, 255, 255, .82); }
.card-ink .list-check li::before, .band-ink .list-check li::before { border-color: var(--surface); }
.list-x li::before { content: "×"; border: 0; transform: none; top: 0; left: 3px; width: auto; height: auto; color: var(--muted); font-size: 18px; line-height: 1.3; }
.skeleton { background: linear-gradient(90deg, var(--wash), #F7F6F3, var(--wash)); background-size: 200% 100%; animation: lpm-shimmer 1.4s infinite; border-radius: 8px; }

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes lpm-spin { to { transform: rotate(360deg); } }
@keyframes lpm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lpm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lpm-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes lpm-shimmer { to { background-position: -200% 0; } }
@keyframes lpm-ping { 0% { box-shadow: 0 0 0 0 rgba(31, 122, 69, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 122, 69, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 122, 69, 0); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .grid-3, .split { grid-template-columns: minmax(0, 1fr); }
  .site-nav, .head-actions .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav.open {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: var(--head-h); left: 0; right: 0; z-index: 39;
    padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .mobile-nav a { padding: 12px 0; font-size: 17px; text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-nav .btn { margin-top: 12px; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .grid-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lede { font-size: 17px; }
  .who, .appbar .hide-sm { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
  .table-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-stack td { padding: 2px 0; border: 0; }
  .table-stack td.right { text-align: left; }
  .table-stack td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stat-n { font-size: 30px; }
}
