/* PlayCall site (playcall.coach)
   Server-rendered pages: landing, pricing, account, share sheet, legal, admin, 404.
   Same design language as the film room (app/src/styles.css): dim film-room chrome, the
   coach's play card is the lit object, telestrator yellow is the only accent, team color
   lives on the cards. The token block and the .btn/.panel/.pill/.pcard/.sheet rules are
   copied from the SPA stylesheet so a card looks identical on both surfaces. */

/* ---------- tokens (copied from app/src/styles.css) */
:root {
  --bg: #0f1518; --panel: #161f24; --panel-2: #1d282e; --panel-3: #243139; --line: #2a3a42; --line-2: #35474f;
  --fg: #e9eef0; --muted: #93a6ae; --faint: #6c7f87;
  --accent: #f2c230; --accent-ink: #1a1400; --accent-text: #f2c230; --accent-soft: rgba(242, 194, 48, 0.14);
  --good: #58d08a; --warn: #ffb347; --bad: #ff6b6b; --info: #7fc8ff;
  --team: #4e2a84; --team-ink: #ffffff;
  --turf: #2d6a3a; --turf2: #2a6136; --oob: rgba(0, 0, 0, 0.22); --sideline: rgba(255, 255, 255, 0.85); --yardline: rgba(255, 255, 255, 0.5); --los: #8fd3ff; --fdline: #f2c230;
  --route: #f8d44c; --ball: #ff4d6d; --ball-ink: #ffffff; --def: #ff9a76; --def-fill: #3a2320; --def-ink: #ffe3d6;
  --off: #0f1518; --off-fill: #ffffff; --off-ink: #0f1518; --block: #eef4f0; --fake: #cfd8dc; --motion: #f8d44c;
  --font-display: "Big Shoulders Display", "Archivo Narrow", Impact, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px; --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --card-w: 340px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f0; --panel: #ffffff; --panel-2: #e7ece9; --panel-3: #dde4e1; --line: #d2dad7; --line-2: #bfcac6;
    --fg: #121a1d; --muted: #5a6b71; --faint: #8a9a9f;
    --accent: #f2c230; --accent-ink: #1a1400; --accent-text: #8a6400; --accent-soft: rgba(138, 100, 0, 0.12);
    --good: #1f9d55; --warn: #b36b00; --bad: #c8323a; --info: #1b6fb3;
    --def-fill: #4a2a24; --shadow: 0 12px 32px rgba(20, 30, 34, 0.14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef1f0; --panel: #ffffff; --panel-2: #e7ece9; --panel-3: #dde4e1; --line: #d2dad7; --line-2: #bfcac6;
  --fg: #121a1d; --muted: #5a6b71; --faint: #8a9a9f;
  --accent: #f2c230; --accent-ink: #1a1400; --accent-text: #8a6400; --accent-soft: rgba(138, 100, 0, 0.12);
  --good: #1f9d55; --warn: #b36b00; --bad: #c8323a; --info: #1b6fb3;
  --def-fill: #4a2a24; --shadow: 0 12px 32px rgba(20, 30, 34, 0.14);
  color-scheme: light;
}

/* ---------- base (copied) */
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
* { box-sizing: border-box; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent-text); }
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; }
.row .spacer { flex: 1; }
.section.section-tight { padding-top: 28px; }
.banner-good { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.banner-good b { color: var(--good); }
.pcard-skip { padding: 12px; color: var(--muted); font-size: 12px; grid-template-columns: 1fr; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- controls (copied) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--panel-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); background: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.btn .k { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 7px 9px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); min-width: 0; }
.field input[type="color"] { padding: 2px; height: 34px; }
.field input:read-only { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-width: 0; }
.panel h2 { font-size: 20px; letter-spacing: 0.03em; }
.panel h2 + p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 12px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--panel-3); color: var(--fg); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow); z-index: 60; max-width: min(92vw, 520px); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid var(--line-2); color: var(--muted); }
.pill.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.pill.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); }
.pill.accent { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 50%, transparent); }
.steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 13px; color: var(--muted); }
.steps li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 13px; background: var(--panel-3); color: var(--fg); }
.steps li b { color: var(--fg); }
.progress { height: 6px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr)); gap: 14px; }

/* ---------- play card (coach's card anatomy; copied) */
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; grid-template-rows: auto auto auto auto; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; min-width: 0; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pcard.skipped { opacity: 0.55; }
.pcard.static, .pcard.static:hover { cursor: default; transform: none; }
.pcard-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; background: var(--team); color: var(--team-ink); }
.pcard-num { font-family: var(--font-display); font-weight: 900; font-size: 18px; line-height: 1; background: #fff; color: #111; padding: 3px 7px 2px; border-radius: 3px; min-width: 28px; text-align: center; }
.pcard-head h3 { font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.pcard-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pcard-body { display: grid; grid-template-columns: 78px 1fr; }
.pcard-rail { padding: 8px 8px; display: grid; align-content: start; gap: 8px; background: var(--panel-2); border-right: 1px solid var(--line); }
.pcard-rail small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.pcard-rail b { display: block; font-size: 11.5px; line-height: 1.25; font-weight: 600; }
.pcard-field { min-width: 0; background: var(--turf); line-height: 0; }
.pcard-field svg { display: block; width: 100%; height: auto; }
.pcard-foot { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px; border-top: 1px solid var(--line); }
.kp-label { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 0.08em; background: var(--team); color: var(--team-ink); padding: 3px 6px; border-radius: 3px; white-space: nowrap; }
.pcard-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 11.5px; line-height: 1.3; }
.pcard-foot li::before { content: "\2022"; color: var(--accent-text); margin-right: 5px; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 8px 8px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
.pcard-meta .res { font-weight: 700; color: var(--fg); }
.pcard-meta .res.good { color: var(--good); }
.pcard-meta .res.bad { color: var(--bad); }
.pcard-meta .flag { margin-left: auto; }
.pcard.skipped { align-self: start; }
.pcard.skipped .pcard-check { visibility: hidden; }

/* ---------- playbook sheet (copied) */
.sheet { background: #f7f8f7; color: #121a1d; border-radius: 8px; padding: 14px; box-shadow: var(--shadow); --panel: #ffffff; --panel-2: #eef1ef; --line: #d9dfdc; --muted: #5a6b71; --fg: #121a1d; --accent-text: #8a6400; --def-fill: #4a2a24; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: var(--team); color: var(--team-ink); border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
.sheet-head h2 { font-size: 28px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.sheet-head .vs { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; text-align: center; }
.sheet-head .date { text-align: right; font-family: var(--font-display); font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; }
.sheet-head .date small { display: block; font-family: var(--font-body); font-size: 11px; letter-spacing: 0.08em; opacity: 0.85; }
.sheet .cards { --card-w: 250px; gap: 10px; }
.sheet .pcard { cursor: default; box-shadow: none; }
.sheet .pcard:hover { transform: none; }
.sheet .pcard-check { display: none; }
.sheet .pcard-meta .flag { display: none; }
.sheet .pcard-rail { padding: 6px 6px; gap: 6px; }
.sheet .pcard-rail b { font-size: 10.5px; }
.sheet .pcard-field { display: grid; }
.sheet .pcard-field svg { height: 100%; }
.sheet-bottom { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.sheet .box { background: #fff; border: 1px solid #d9dfdc; border-radius: 6px; overflow: hidden; }
.sheet .box h4 { background: var(--team); color: var(--team-ink); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; }
.sheet .box .in { padding: 8px 10px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sheet th { text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #5a6b71; padding: 3px 4px; border-bottom: 1px solid #d9dfdc; }
.sheet td { padding: 3px 4px; border-bottom: 1px solid #eef1ef; }
.sheet td.num, .sheet th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet tr.total td { font-weight: 700; border-top: 2px solid var(--team); }
.sheet .notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; }
.sheet .notes li::before { content: "\2713"; color: var(--team); font-weight: 800; margin-right: 6px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tile { background: #fff; border: 1px solid #d9dfdc; border-radius: 4px; padding: 6px 8px; text-align: center; }
.tile b { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--team); }
.tile small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #5a6b71; }
.formation-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.formation-index .f { text-align: center; font-size: 11px; }
.formation-index .f svg { width: 100%; height: auto; display: block; background: #eef1ef; border-radius: 4px; }
.formation-index .f .fx-field { aspect-ratio: 360 / 220; background: #eef1ef; border-radius: 4px; overflow: hidden; line-height: 0; }
.formation-index .f b { display: block; font-size: 11px; margin-top: 3px; }
.formation-index .f small { color: #5a6b71; }
.sheet .fine { font-size: 10px; color: #5a6b71; margin-top: 8px; font-style: italic; }

/* ---------- site shell */
.site { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--panel); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 14px; padding-block: 10px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-in { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: inherit; }
.brand h1, .brand .wordmark { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: 0.04em; }
.brand span, .brand .wordmark span { color: var(--accent-text); }
.brand .sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.topbar .spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.nav-links a:hover { color: var(--fg); background: var(--panel-2); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--panel-2); }
.nav-app { display: none; }
@media (min-width: 640px) { .nav-app { display: inline-flex; } }
.menu { position: relative; }
.menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--panel-3); }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel-3); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--fg); flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 28px; }
.menu > summary .name { font-size: 13px; font-weight: 600; padding-right: 8px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; z-index: 50; display: grid; }
.menu-panel .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-panel .who b { display: block; font-size: 13px; }
.menu-panel .who span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.menu-item { display: block; width: 100%; text-align: left; text-decoration: none; background: none; border: 0; padding: 8px 10px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--fg); }
.menu-item:hover { background: var(--panel-2); }
.menu-item.danger { color: var(--bad); }
.menu form { margin: 0; }

main.site-main { min-width: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap.narrow { max-width: 900px; }
.wrap.prose-wrap { max-width: 760px; }
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; max-width: 640px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 40px); line-height: 1; letter-spacing: 0.02em; }
.section-head p { color: var(--muted); font-size: 16px; }
.lede { font-size: 17px; color: var(--muted); line-height: 1.55; max-width: 56ch; }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); padding-block: 22px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.site-footer .in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer .mail { font-family: var(--font-mono); font-size: 12px; user-select: all; }
.site-footer .spacer { flex: 1; }

.auth-error { color: var(--bad); font-size: 13px; margin-top: 8px; }
.gsi-wrap { display: grid; gap: 4px; justify-items: start; }
.g_id_signin { min-height: 44px; }
.cta-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- landing */
.hero { position: relative; padding-block: 56px 64px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--fg) 6%, transparent) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.hero h1 { font-size: clamp(44px, 7.2vw, 86px); font-weight: 900; line-height: 0.92; letter-spacing: 0.015em; text-transform: uppercase; }
.hero h1 .ln { display: block; }
.hero .lede { font-size: 18px; }
.hero-cta { display: grid; gap: 6px; justify-items: start; margin-top: 4px; }
.hero-cta .row { gap: 12px; }
.hero-art { display: grid; gap: 10px; justify-items: center; }
.hero-card { width: min(100%, 380px); box-shadow: var(--shadow); }
.hero-caption { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.02em; }
.hero-caption b { color: var(--fg); font-weight: 500; }

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: how; }
.how article { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.how article::before { counter-increment: how; content: counter(how); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 20px; background: var(--panel-3); color: var(--fg); }
.how article:first-child::before { background: var(--accent); color: var(--accent-ink); }
.how h3 { font-size: 22px; letter-spacing: 0.02em; margin-bottom: 6px; }
.how p { color: var(--muted); font-size: 14px; }

.brain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.brain .panel { padding: 18px; display: grid; gap: 10px; align-content: start; }
.brain h3 { font-size: 22px; letter-spacing: 0.02em; }
.brain p { color: var(--muted); font-size: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 36px; line-height: 1; letter-spacing: 0.01em; }
.stat small { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.rules li { display: flex; gap: 8px; align-items: baseline; }
.rules li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; transform: translateY(-1px); }
.rules code { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.teaser { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cta-band { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 40px clamp(18px, 4vw, 48px); display: grid; gap: 14px; justify-items: start; }
.cta-band h2 { font-size: clamp(32px, 5vw, 52px); line-height: 0.95; letter-spacing: 0.02em; text-transform: uppercase; }
.cta-band p { color: var(--muted); max-width: 52ch; }

/* ---------- pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: grid; gap: 16px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow); }
.plan .plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan h2, .plan h3 { font-size: 28px; letter-spacing: 0.04em; text-transform: uppercase; }
.plan .price { display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-family: var(--font-display); font-weight: 900; font-size: 56px; line-height: 1; letter-spacing: 0.01em; }
.plan .price span { color: var(--muted); font-size: 14px; }
.plan .tagline { color: var(--muted); font-size: 14px; }
.plan dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.plan dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.plan dt { color: var(--muted); font-size: 13px; }
.plan dd { margin: 0; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.plan .plan-cta { display: grid; gap: 8px; justify-items: start; }
.plan.compact { padding: 18px; gap: 10px; }
.plan.compact .price b { font-size: 40px; }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
.faq h3 { font-size: 20px; letter-spacing: 0.02em; margin-bottom: 6px; }
.faq p { color: var(--muted); font-size: 14px; }

/* ---------- page head (account/admin/legal) */
.page-head { padding-block: 34px 10px; display: grid; gap: 6px; }
.page-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.page-head p { color: var(--muted); }

/* ---------- account */
.acct { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 18px 64px; }
.acct-nav { position: sticky; top: calc(66px + env(safe-area-inset-top, 0px)); display: grid; gap: 2px; }
.acct-nav a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 5px; }
.acct-nav a:hover { color: var(--fg); background: var(--panel-2); }
.acct-nav a.danger { color: var(--bad); }
.acct-main { display: grid; gap: 16px; min-width: 0; }
.acct .panel { padding: 18px; }
.acct .panel h2 { font-size: 24px; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.profile .fields { display: grid; gap: 10px; }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.meter { display: grid; gap: 6px; padding: 12px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--line); }
.meter .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.meter .lbl small { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.meter .lbl b { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.meter .lbl b span { font-size: 16px; color: var(--muted); font-weight: 700; }
.meter .bar { height: 8px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter .bar i.warn { background: var(--warn); }
.meter .bar i.bad { background: var(--bad); }
.plan-line { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; font-size: 14px; }
.plan-line .pname { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; }
.defaults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list td.mono, table.list td .mono { font-family: var(--font-mono); font-size: 12px; }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.num { white-space: nowrap; }
table.list td.cell-clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
.secret { display: grid; gap: 8px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); border-radius: 8px; }
.secret code { display: block; font-family: var(--font-mono); font-size: 13px; word-break: break-all; user-select: all; padding: 8px 10px; background: var(--bg); border-radius: 5px; border: 1px solid var(--line-2); }
.secret p { font-size: 13px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.danger-zone h2 { color: var(--bad); }
.inline-msg { font-size: 13px; color: var(--muted); min-height: 1.2em; }
.inline-msg.ok { color: var(--good); }
.inline-msg.err { color: var(--bad); }
.form-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 200px; }

/* ---------- share sheet page */
.share-bar { display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); background: var(--panel); border-bottom: 1px solid var(--line); }
.share-bar .in { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.share-bar .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-bar .spacer { flex: 1; }
.sheet-head .kicker { opacity: 0.85; letter-spacing: 0.1em; text-transform: uppercase; }
.sheet .situational { margin-top: 8px; color: #5a6b71; }
.share-wrap { max-width: 1280px; margin: 0 auto; padding: 18px var(--gutter-r) 40px var(--gutter-l); }
.share-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px; }
.share-foot a { color: inherit; }
.sheet .cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sheet .pcard-field[data-play-index]:empty::after { content: ""; display: block; aspect-ratio: 360 / 220; }

/* ---------- admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.kpi b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; }
.kpi small { display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.kpi .sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input[type="search"], .toolbar select { padding: 6px 9px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-size: 13px; min-width: 0; }
.toolbar input[type="search"] { flex: 1 1 220px; }
.tabs2 { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs2 button { background: none; border: 0; padding: 8px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs2 button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
table.list select { padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font-size: 12px; }
table.list input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.status-dot.running { background: var(--info); }
.status-dot.queued { background: var(--warn); }
.status-dot.error { background: var(--bad); }
.status-dot.done { background: var(--good); }
.admin-grid { display: grid; gap: 16px; padding-bottom: 64px; }

/* ---------- legal prose */
.prose { padding-block: 10px 64px; font-size: 15px; line-height: 1.65; }
.prose h2 { font-size: 26px; letter-spacing: 0.02em; margin: 34px 0 10px; }
.prose h3 { font-size: 18px; letter-spacing: 0.02em; margin: 22px 0 6px; font-family: var(--font-body); font-weight: 700; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose a { color: var(--accent-text); }
.prose .meta { color: var(--muted); font-size: 13px; }
.prose .callout { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; margin: 16px 0; font-size: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 14px; }
.prose th, .prose td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- 404 */
.notfound { min-height: 60vh; display: grid; place-content: center; justify-items: start; gap: 12px; padding-block: 48px; }
.notfound .code { font-family: var(--font-display); font-weight: 900; font-size: clamp(96px, 20vw, 180px); line-height: 0.85; letter-spacing: 0.02em; color: var(--panel-3); }
.notfound h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.02em; text-transform: uppercase; }
.notfound p { color: var(--muted); max-width: 48ch; }

/* ---------- responsive */
@media (max-width: 1100px) { .sheet-bottom { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { justify-items: start; }
  .how, .brain { grid-template-columns: 1fr; }
  .acct { grid-template-columns: 1fr; }
  .acct-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 720px) {
  .teaser, .plans, .faq, .meters, .defaults { grid-template-columns: 1fr; }
  .section { padding-block: 40px; }
  .hero { padding-block: 36px 44px; }
  .menu > summary .name { display: none; }
}
@media (max-width: 560px) {
  :root { --card-w: 100%; }
  .cards { grid-template-columns: 1fr; }
  .sheet .cards { grid-template-columns: 1fr; }
  .sheet-bottom, .grid2 { grid-template-columns: 1fr; }
  .sheet-head { grid-template-columns: 1fr; text-align: left; }
  .sheet-head .date, .sheet-head .vs { text-align: left; }
  .brand h1, .brand .wordmark { font-size: 22px; }
  .hero-card { width: 100%; }
  .profile { grid-template-columns: 1fr; }
  .plan .price b { font-size: 48px; }
  .how article { grid-template-columns: 32px 1fr; }
  .how article::before { width: 30px; height: 30px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- print (the share sheet is the thing that gets printed) */
@media print {
  :root { --bg: #ffffff; --fg: #121a1d; --panel: #ffffff; --panel-2: #f1f4f2; --panel-3: #e4e9e6; --line: #d2dad7; --line-2: #bfcac6; --muted: #5a6b71; --accent-text: #8a6400; --def-fill: #4a2a24; color-scheme: light; }
  body { background: #fff; color: #121a1d; }
  body::before, .topbar, .share-bar, .site-footer, .toast, .menu, .no-print { display: none !important; }
  .share-wrap { padding: 0; max-width: none; }
  .sheet { box-shadow: none; padding: 0; border-radius: 0; }
  .sheet .cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pcard { break-inside: avoid; page-break-inside: avoid; border-color: #c8d0cd; }
  .sheet .box { break-inside: avoid; }
  .share-foot { color: #5a6b71; }
  a { text-decoration: none; }
}
