/* WFM – Beyond the Spreadsheet · community site
   Design tokens first, then base, layout, components, pages. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Roster palette: each hue means one thing, everywhere on the site. */
  --ink: #030a22;
  --deep: #021b3a;
  --deep-2: #082d56;
  --phone: #00ede0;      /* on the phones, brand cyan */
  --blue: #0059ee;
  --blue-light: #83b8ff;
  --ai: #e0f7ff;         /* AI-assisted / moved by the demo */
  --pause: #ffb547;      /* breaks, cautions, warnings */
  --short: #ff6b5e;      /* shortfall, red lines */
  --paper: #f6f7fb;
  --white: #ffffff;
  --line: #dde2ee;
  --text: #0f1733;
  --muted: #56617f;
  --on-dark: #e8ecf8;
  --on-dark-muted: #a6b0cf;

  /* text-safe variants on light backgrounds */
  --phone-text: #0050c9;
  --ai-text: #0050c9;
  --short-text: #b9302a;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --r-chip: 4px;
  --r-panel: 14px;
  --r-big: 22px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--phone-text); text-underline-offset: 3px; }
a:hover { color: var(--ai-text); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 5.4vw, 4.3rem); letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-weight: 750; font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -0.025em; }
h3 { font-weight: 700; font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--pause); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--pause); color: var(--ink); padding: 10px 14px; border-radius: 6px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }

/* ───────── Rule strip (always visible) ───────── */
.rule-strip { background: var(--pause); color: var(--ink); font-size: .9rem; line-height: 1.35; }
.rule-strip .wrap { display: flex; gap: 10px 18px; align-items: center; justify-content: space-between; padding-block: 8px; flex-wrap: wrap; }
.rule-strip strong { font-weight: 700; }
.rule-strip a { color: var(--ink); font-weight: 600; }
.rule-strip a:hover { color: var(--ink); text-decoration-thickness: 2px; }

/* ───────── Header ───────── */
.site-header { background: var(--ink); color: var(--on-dark); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 750; font-size: 1.06rem; letter-spacing: -.01em; line-height: 1.1; }
.brand:hover { color: #fff; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .74rem; letter-spacing: 0; color: var(--on-dark-muted); margin-top: 3px; }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 9px 13px; border-radius: 999px; font-weight: 500; font-size: .98rem; }
.nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav a[aria-current="page"] { background: rgba(0,237,224,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(0,237,224,.55); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; }

@media (max-width: 880px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 22px; border-bottom: 1px solid rgba(255,255,255,.1); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; border-radius: 10px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
  .brand small { display: none; }
}

/* ───────── Buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 1rem; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent; text-decoration: none; cursor: pointer; line-height: 1.2; transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--phone); color: var(--ink); }
.btn-primary:hover { background: #70fff5; color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--deep-2); color: #fff; }
.btn-line { border-color: var(--text); color: var(--text); background: transparent; }
.btn-line:hover { background: var(--text); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 14px; font-size: .92rem; border-radius: 8px; }

/* ───────── Hero ───────── */
.hero { background: var(--ink); color: var(--on-dark); padding: clamp(36px, 5vw, 64px) 0 clamp(44px, 6vw, 80px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
    radial-gradient(900px 420px at 88% -10%, rgba(0,89,238,.28), transparent 60%),
    radial-gradient(700px 380px at 0% 105%, rgba(0,237,224,.18), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 17ch; margin-bottom: .35em; }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--on-dark-muted); max-width: 62ch; margin-bottom: 1.4em; }
.hero-lede strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); }

/* ───────── Coverage strip (hero demo) ───────── */
.coverage { background: var(--deep); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-big); padding: clamp(16px, 2.5vw, 28px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.coverage-head { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.coverage-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0 0 4px; }
.coverage-sub { color: var(--on-dark-muted); font-size: .92rem; margin: 0; max-width: 46ch; }
.readouts { display: flex; gap: 12px; flex-wrap: wrap; }
.readout { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 16px; min-width: 150px; }
.readout .num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; color: #fff; display: block; transition: color .2s ease; }
.readout .lab { font-size: .84rem; color: var(--on-dark-muted); display: block; margin-top: 6px; }
.readout.is-bad .num { color: var(--short); }
.readout.is-good .num { color: var(--phone); }
.controls { display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; margin-bottom: 18px; padding: 14px 16px; background: rgba(255,255,255,.04); border-radius: 12px; }
.control { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.control label { font-weight: 600; color: #fff; font-size: .96rem; }
.control output { font-family: var(--font-display); font-weight: 700; color: var(--pause); min-width: 3ch; display: inline-block; }
input[type="range"] { accent-color: var(--phone); width: min(240px, 60vw); height: 28px; cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: #3a4670; position: relative; transition: background-color .18s ease; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--pause); outline-offset: 3px; }
.switch .sw-label { font-weight: 600; color: #fff; font-size: .96rem; }
.switch .sw-note { color: var(--on-dark-muted); font-weight: 400; font-size: .86rem; display: block; }
.chart-scroll { overflow-x: auto; padding-bottom: 6px; }
.chart-scroll svg { min-width: 760px; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--on-dark-muted); font-size: .88rem; margin: 14px 0 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
.sw-phone { background: var(--phone); }
.sw-pause { background: var(--pause); }
.sw-moved { background: var(--pause); outline: 2px solid var(--ai); outline-offset: 1px; }
.sw-short { background: var(--short); }
.sw-need { background: transparent; border: 2px dashed #fff; }
.coverage-foot { color: var(--on-dark-muted); font-size: .85rem; margin: 12px 0 0; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.coverage-foot strong { color: #fff; }

/* chart svg parts */
.cv-cell { rx: 2px; transition: fill .25s ease, opacity .25s ease; }
.cv-cell.is-phone { fill: var(--phone); }
.cv-cell.is-pause { fill: var(--pause); }
.cv-cell.is-off { fill: rgba(255,255,255,.05); }
.cv-cell.is-moved { stroke: var(--ai); stroke-width: 2.5px; }
.cv-bar { transition: height .25s ease, y .25s ease, fill .25s ease; }
.cv-axis { fill: #a6b0cf; font-size: 11px; font-family: var(--font-body); }
.cv-need { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 5 4; }
.cv-hit { fill: transparent; cursor: crosshair; }
.cv-hit:focus-visible, .cv-hit:hover { fill: rgba(255,255,255,.08); }
.cv-tip { font-size: 12px; fill: #fff; font-family: var(--font-body); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cv-cell, .cv-bar, .btn, .switch .track, .switch .track::after { transition: none; }
}

/* ───────── Sections ───────── */
section { padding-block: clamp(52px, 7vw, 96px); }
.on-light { background: var(--paper); }
.on-white { background: var(--white); }
.on-dark { background: var(--ink); color: var(--on-dark); }
.on-dark h2, .on-dark h3 { color: #fff; }
.section-head { max-width: 62ch; margin-bottom: clamp(26px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.on-dark .section-head p { color: var(--on-dark-muted); }

/* ruled rows (home: three areas) */
.areas { border-top: 2px solid var(--text); }
.area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 14px 40px; align-items: center; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--line); }
.area h3 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 750; margin: 0; letter-spacing: -.025em; }
.area p { margin: 0; color: var(--muted); }
.area .go { white-space: nowrap; }
@media (max-width: 760px) { .area { grid-template-columns: 1fr; } }

/* good-at / needs-you */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.col { background: var(--white); border-radius: var(--r-big); padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); position: relative; }
.col::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 5px; border-radius: 0 4px 4px 0; background: var(--phone); }
.col.needs::before { background: var(--short); }
.col h3 { margin-bottom: .6em; }
.col ul { margin: 0; padding-left: 1.1em; }
.col li { margin-bottom: .55em; }
.col li::marker { color: var(--phone-text); }
.col.needs li::marker { color: var(--short-text); }

/* red-line block */
.redline { background: var(--ink); color: var(--on-dark); border-radius: var(--r-big); padding: clamp(26px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px 48px; }
@media (max-width: 860px) { .redline { grid-template-columns: 1fr; } }
.redline h2 { color: #fff; }
.redline .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -.025em; color: var(--pause); margin: 0 0 .5em; }
.nevers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nevers li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: rgba(255,255,255,.05); border-radius: 10px; border: 1px solid rgba(255,255,255,.08); }
.nevers svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--short); }

/* ───────── Notices ───────── */
.notice { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); background: var(--white); border-left: 6px solid var(--muted); margin: 0 0 1.4em; font-size: .98rem; }
.notice > :last-child { margin-bottom: 0; }
.notice--warn { border-left-color: var(--pause); background: #fff8ec; border-color: #f4dfb8; }
.notice--danger { border-left-color: var(--short); background: #fff1ef; border-color: #f6cbc6; }
.notice--draft { border-left-color: var(--ai); background: #edf5ff; border-color: #c3d9f7; }
.notice strong:first-child { font-weight: 700; }
.tag { display: inline-block; font-size: .8rem; font-weight: 650; padding: 3px 9px; border-radius: var(--r-chip); background: #e9ecf6; color: var(--text); vertical-align: middle; }
.tag--ai { background: #e5efff; color: var(--ai-text); }
.tag--fict { background: #fff0d4; color: #7a4d00; }
.ph { background: #fff0d4; color: #7a4d00; padding: 0 5px; border-radius: 4px; font-weight: 600; }

/* ───────── Page head (inner pages) ───────── */
.page-head { background: var(--ink); color: var(--on-dark); padding: clamp(40px, 6vw, 76px) 0 clamp(34px, 5vw, 56px); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 92% 0%, rgba(0,89,238,.25), transparent 62%); pointer-events: none; }
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); color: #fff; max-width: 20ch; margin-bottom: .3em; }
.page-head p { color: var(--on-dark-muted); font-size: 1.15rem; max-width: 60ch; margin: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jump a { color: #fff; border: 1px solid rgba(255,255,255,.3); padding: 7px 14px; border-radius: 999px; text-decoration: none; font-size: .94rem; font-weight: 550; }
.jump a:hover { background: rgba(255,255,255,.1); }

/* ───────── Tools (AI Lab) ───────── */
.tool { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-big); padding: clamp(20px, 3vw, 36px); margin-bottom: 36px; }
.tool-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.tool-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.tool-lede { color: var(--muted); max-width: 66ch; }
.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 44px; margin-top: 18px; }
@media (max-width: 860px) { .tool-body { grid-template-columns: minmax(0, 1fr); } }
.fields { display: grid; gap: 14px; align-content: start; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.field .hint { color: var(--muted); font-size: .86rem; display: block; margin-top: 3px; }
.field input[type="number"], .field select, .field input[type="text"], textarea.input { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid #b8c0d6; border-radius: 8px; background: #fff; color: var(--text); }
.field input:focus, .field select:focus, textarea.input:focus { border-color: var(--ai); outline: 3px solid rgba(0,89,238,.25); outline-offset: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.results { background: var(--paper); border-radius: 16px; padding: 22px; align-self: start; border: 1px solid var(--line); }
.big-result { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; letter-spacing: -.03em; color: var(--text); }
.big-result small { font-family: var(--font-body); font-weight: 500; font-size: 1rem; letter-spacing: 0; color: var(--muted); display: block; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 18px 0 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat b { font-family: var(--font-display); font-size: 1.35rem; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn b { color: var(--short-text); }
.stat.ok b { color: var(--phone-text); }
.explain { margin-top: 16px; font-size: .94rem; color: var(--muted); }
.explain code, .prose code { background: #eceff8; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.table-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: .96rem; }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.grid th:first-child, table.grid td:first-child { text-align: left; }
table.grid thead th { font-weight: 650; color: var(--muted); font-size: .86rem; border-bottom: 2px solid var(--text); }
table.grid input { width: 96px; font: inherit; padding: 6px 8px; border: 1.5px solid #b8c0d6; border-radius: 6px; text-align: right; }
table.grid td.neg { color: var(--short-text); }
table.grid td.pos { color: var(--phone-text); }

/* prompts */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.tabs button { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--text); background: transparent; color: var(--text); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--text); color: #fff; }
.prompts { display: grid; gap: 16px; }
.prompt { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.prompt[hidden] { display: none; }
.prompt header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; }
.prompt h3 { margin: 0; font-size: 1.15rem; }
.prompt .why { padding: 0 18px; color: var(--muted); font-size: .95rem; margin: 0 0 10px; }
.prompt pre { margin: 0; padding: 16px 18px; background: #0f1733; color: #e8ecf8; font: .92rem/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.prompt .check { padding: 10px 18px 14px; font-size: .9rem; background: #fff8ec; border-top: 1px solid #f4dfb8; }

/* ───────── Library ───────── */
.lib-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 56px; align-items: start; }
@media (max-width: 960px) { .lib-grid { grid-template-columns: minmax(0, 1fr); } }
details.howto { border-top: 1px solid var(--line); }
details.howto:last-of-type { border-bottom: 1px solid var(--line); }
details.howto summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.015em; position: relative; }
details.howto summary::-webkit-details-marker { display: none; }
details.howto summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; border-right: 2.5px solid var(--text); border-bottom: 2.5px solid var(--text); transform: translateY(-70%) rotate(45deg); transition: transform .18s ease; }
details.howto[open] summary::after { transform: translateY(-30%) rotate(225deg); }
details.howto .howto-body { padding: 0 0 22px; max-width: 64ch; }
details.howto .howto-body ol, details.howto .howto-body ul { padding-left: 1.2em; }
.meta { color: var(--muted); font-size: .9rem; font-weight: 400; }
.gloss-search { margin-bottom: 16px; }
dl.gloss { margin: 0; }
dl.gloss .term { padding: 12px 0; border-bottom: 1px solid var(--line); }
dl.gloss dt { font-weight: 700; font-family: var(--font-display); font-size: 1.08rem; }
dl.gloss dd { margin: 3px 0 0; color: var(--muted); }
dl.gloss .term[hidden] { display: none; }
.downloads { display: grid; gap: 12px; }
.dl { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.dl b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.dl span { color: var(--muted); font-size: .9rem; }

/* ───────── Community ───────── */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border: 1.5px solid var(--text); border-radius: var(--r-panel); overflow: hidden; }
.cat { padding: 22px; border-right: 1.5px solid var(--text); background: var(--white); }
.cat:last-child { border-right: 0; }
.cat h3 { font-size: 1.2rem; margin-bottom: .3em; }
.cat p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 700px) { .cat { border-right: 0; border-bottom: 1.5px solid var(--text); } .cat:last-child { border-bottom: 0; } }
.flow { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.flow li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.flow li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.flow b { font-family: var(--font-display); font-size: 1.12rem; display: block; }
.example-post { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.example-post .by { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .92rem; color: var(--muted); flex-wrap: wrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--deep-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.example-post h3 { font-size: 1.2rem; margin-bottom: .3em; }
.example-post p { margin: 0; color: var(--muted); }
.examples { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* checker */
.checker textarea.input { min-height: 190px; resize: vertical; line-height: 1.5; }
.checker-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 860px) { .checker-grid { grid-template-columns: minmax(0, 1fr); } }
.preview { white-space: pre-wrap; word-break: break-word; background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px; min-height: 190px; line-height: 1.6; }
.preview mark { padding: 1px 3px; border-radius: 4px; color: var(--text); }
.preview mark.hi { background: #ffc7c0; box-shadow: inset 0 -2px 0 var(--short); }
.preview mark.rv { background: #ffe3ae; box-shadow: inset 0 -2px 0 #d38a00; }
.findings { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.findings li { padding: 10px 12px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); border-left-width: 6px; font-size: .95rem; }
.findings li.hi { border-left-color: var(--short); }
.findings li.rv { border-left-color: var(--pause); }
.findings li.ok { border-left-color: var(--phone); }
.confirm { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-weight: 550; }
.confirm input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.watch { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #e9ecf6; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .9rem; }
.chip button { border: 0; background: rgba(15,23,51,.12); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-weight: 700; line-height: 1; }

/* ───────── Prose (legal and guidelines) ───────── */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: clamp(34px, 5vw, 64px); }
@media (max-width: 960px) { .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.toc { position: sticky; top: 90px; font-size: .94rem; }
@media (max-width: 960px) { .toc { position: static; } }
.toc b { font-family: var(--font-display); display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--ai-text); text-decoration: underline; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.65rem; margin-top: 1.9em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0 1.5em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--text); font-weight: 650; }
.updated { color: var(--muted); font-size: .95rem; margin-bottom: 1.4em; }

/* ───────── Footer ───────── */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 56px 0 36px; font-size: .95rem; }
.site-footer a { color: var(--on-dark); text-decoration-color: rgba(255,255,255,.35); }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 30px 40px; margin-bottom: 36px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.site-footer .foot-h { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.site-footer .brand { margin-bottom: 14px; }
.indep { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; max-width: 90ch; }
.link-btn { background: none; border: 0; padding: 0; color: var(--on-dark); font: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: #fff; }

/* ───────── Cookie notice ───────── */
.cookie { position: fixed; z-index: 80; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); background: #fff; color: var(--text); border-radius: 16px; padding: 18px 20px; box-shadow: 0 20px 60px -10px rgba(10,16,36,.45); border: 1px solid var(--line); }
.cookie[hidden] { display: none; }
.cookie h2 { font-size: 1.1rem; margin: 0 0 6px; }
.cookie p { font-size: .94rem; margin: 0 0 12px; color: var(--muted); }
.cookie .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.cta-band { background: var(--ink); color: var(--on-dark); border-radius: var(--r-big); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin: 0 0 .25em; }
.cta-band p { margin: 0; color: var(--on-dark-muted); max-width: 52ch; }

@media print {
  .rule-strip, .site-header, .site-footer, .cookie, .toc { display: none !important; }
  body { background: #fff; }
}

/* spacing helpers and small additions */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.indep strong { color: #fff; }

/* ───────── Teams page ───────── */
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--text); counter-reset: l; }
.loop li { padding: 22px 18px 22px 0; border-right: 1px solid var(--line); margin-right: 18px; position: relative; }
.loop li:last-child { border-right: 0; margin-right: 0; }
.loop li::before { content: ""; position: absolute; left: 0; top: -5px; width: 48px; height: 8px; border-radius: 4px; background: var(--phone); }
.loop li:nth-child(2)::before { background: var(--ai); }
.loop li:nth-child(3)::before { background: var(--pause); }
.loop li:nth-child(4)::before { background: var(--phone); }
.loop li:nth-child(5)::before { background: var(--short); }
.loop h3 { font-size: 1.15rem; margin-top: 8px; }
.loop p { margin: 0 0 .6em; font-size: .98rem; color: var(--muted); }
.loop .feeds { color: var(--text); font-size: .92rem; }
@media (max-width: 980px) {
  .loop { grid-template-columns: 1fr; border-top: 0; }
  .loop li { border-right: 0; margin-right: 0; padding: 22px 0 18px; border-top: 1px solid var(--line); }
  .loop li::before { top: -4px; }
}
.role { padding: clamp(28px, 4vw, 48px) 0; border-top: 2px solid var(--text); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px 44px; scroll-margin-top: 80px; }
.role:first-child { border-top: 0; padding-top: 0; }
.role-title h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .3em; }
.role-title p { color: var(--muted); margin: 0; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.role-grid h3 { font-size: 1rem; margin-bottom: .4em; color: var(--ai-text); }
.role-grid ul { margin: 0; padding-left: 1.1em; }
.role-grid li { margin-bottom: .45em; }
.role-link { grid-column: 2; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 960px) {
  .role { grid-template-columns: 1fr; }
  .role-link { grid-column: 1; }
}
@media (max-width: 640px) { .role-grid { grid-template-columns: 1fr; } }

.chips-light { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 28px; }
.chips-light span { font-weight: 600; margin-right: 6px; }
.chips-light a { border: 1.5px solid var(--text); color: var(--text); padding: 6px 14px; border-radius: 999px; text-decoration: none; font-size: .94rem; font-weight: 550; }
.chips-light a:hover { background: var(--text); color: #fff; }

.scroll-hint { display: none; color: var(--on-dark-muted); font-size: .88rem; margin: 0 0 8px; }
@media (max-width: 880px) { .scroll-hint { display: block; } }

.nav a.btn-primary { color: var(--ink); }
.nav a.btn-primary:hover { background: #70fff5; color: var(--ink); }
.prose .link-btn { color: var(--phone-text); text-decoration-color: currentColor; }
.prose .link-btn:hover { color: var(--ai-text); }
/* Brand atmosphere and progressive 3D layer. All styles are external for CSP. */
.hero h1{max-width:22ch}.hero h1::after{content:"";display:block;width:160px;height:4px;margin-top:24px;background:linear-gradient(90deg,var(--blue),var(--phone))}.btn-primary{box-shadow:0 0 28px #0059ee33}.brand-mark{object-fit:contain}.site-footer .brand-mark{width:40px;height:40px}.scene-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:4px 0 16px;font-size:.85rem;color:var(--on-dark-muted)}.scene-toolbar button{font:inherit;font-weight:600;background:#082d56;color:#fff;border:1px solid #83b8ff;border-radius:7px;padding:8px 12px;cursor:pointer;min-height:40px}.view-switch{display:flex;gap:5px}.scene-toolbar button[aria-pressed=true]{background:var(--phone);color:var(--ink);border-color:var(--phone)}#view-status{margin-right:auto}#roster-scene{position:relative;height:480px;border-radius:12px;overflow:hidden;background:#030a22;border:1px solid #28609a;touch-action:pan-y}#roster-canvas{width:100%;height:100%;display:block;touch-action:pan-y}.scene-caption{position:absolute;top:20px;left:22px;pointer-events:none;z-index:1;text-shadow:0 2px 8px #030a22}.scene-caption span{display:block;font-size:.65rem;letter-spacing:.2em;color:#83b8ff}.scene-caption strong{display:block;font-family:var(--font-display);font-size:1.25rem;color:#fff}.scene-axis{position:absolute;bottom:14px;left:22px;right:22px;display:flex;justify-content:space-between;gap:12px;font-size:.65rem;letter-spacing:.1em;color:#c6d9f3;pointer-events:none}.scene-help{font-size:.78rem;color:var(--on-dark-muted);margin:10px 0}.time-control{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:16px 0 8px;font-size:.9rem}.time-control input{flex:1;min-width:120px;max-width:none}.time-control label{font-weight:600;color:white}.time-control span{color:var(--phone);font-weight:600}.now-readout{display:flex;gap:16px 32px;flex-wrap:wrap;padding:12px 0;border-block:1px solid #28609a;font-size:.85rem;color:#c6d9f3}.now-readout strong{color:#fff;margin-left:5px}.now-readout.is-short #now-avail{color:var(--short)}.is-3d .chart-scroll,.is-3d .scroll-hint{display:none}.readout.is-ai .num{color:var(--ai)}.sw-moved{outline-color:var(--ai);border:1px solid #030a22}.cv-cell.is-moved{stroke-dasharray:3 2}.switch input:checked + .track{background:#0059ee}.loop li:nth-child(2)::before{background:var(--blue)}.notice--draft{border-left-color:var(--blue)}
[hidden]{display:none!important}
@media(max-width:600px){#roster-scene{height:360px}.scene-caption{top:16px;left:14px}.scene-caption strong{font-size:1rem}.scene-caption span{font-size:.58rem}.scene-axis{left:14px;right:14px;font-size:.55rem}.readouts{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}.readout{min-width:0;padding:10px}.readout:first-child{grid-column:1/-1}.readout .lab{font-size:.78rem}.scene-toolbar{gap:8px}#view-status{flex-basis:55%;font-size:.75rem}.now-readout{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:.78rem}.time-control{gap:8px}.brand{font-size:.91rem;gap:8px}.hero h1{font-size:2.65rem}}
@media(max-width:600px){.prose table{display:table;table-layout:fixed;width:100%;font-size:.85rem}.prose td,.prose th{overflow-wrap:anywhere;padding:8px 6px}}
