/* ============ TOKENS ============ */

:root {
  --yours: #0fa37e;
  --theirs: #e8921a;
  --ok: #0fa37e;
  --bad: #d64545;
  --focus: #0fa37e;
  --radius: 12px;
  --radius-s: 8px;
  --rule: 1px solid;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --shadow: none;
}

[data-theme="console"] {
  --bg: #f2f4f0;
  --surface: #ffffff;
  --surface-2: #e9ede8;
  --surface-3: #f7f9f6;
  --ink: #16211d;
  --muted: #5f6d67;
  --border: #d8ded9;
  --border-strong: #b9c4bd;
  --yours: #0e9777;
  --theirs: #d98614;
  --ok: #0e9777;
  --bad: #cf3f3f;
  --focus: #0e9777;
  --hero-yours: rgba(14, 151, 119, 0.08);
  --hero-theirs: rgba(217, 134, 20, 0.08);
  --shadow: 0 1px 2px rgba(22, 33, 29, 0.06);
}

[data-theme="terminal"] {
  --bg: #0a1210;
  --surface: #101b17;
  --surface-2: #15231e;
  --surface-3: #0d1713;
  --ink: #dcebe5;
  --muted: #7e948c;
  --border: #22332c;
  --border-strong: #35503f;
  --yours: #2fd9a3;
  --theirs: #f5a92e;
  --ok: #2fd9a3;
  --bad: #ef6a5c;
  --focus: #2fd9a3;
  --hero-yours: rgba(47, 217, 163, 0.07);
  --hero-theirs: rgba(245, 169, 46, 0.07);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-theme="track"] {
  --bg: #0e0b04;
  --surface: #171104;
  --surface-2: #1f1706;
  --surface-3: #140e03;
  --ink: #ffc24d;
  --muted: #9c7a2e;
  --border: #3a2c10;
  --border-strong: #5a4519;
  --yours: #ffc24d;
  --theirs: #ff7a3d;
  --ok: #ffc24d;
  --bad: #ff5a3d;
  --focus: #ffc24d;
  --hero-yours: rgba(255, 194, 77, 0.06);
  --hero-theirs: rgba(255, 122, 61, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ============ RESET / BASE ============ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  transition: background 0.25s ease, color 0.25s ease;
}
::selection { background: var(--yours); color: var(--bg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
a { color: inherit; }

.mono { font-family: var(--mono); }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* ============ HEADER ============ */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: var(--rule) var(--border);
}
.head-inner { display: flex; align-items: center; gap: 22px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.logo-word em { font-style: normal; color: var(--yours); }
.logo-glyph { position: relative; width: 22px; height: 22px; }
.logo-glyph span { position: absolute; inset: 0; border-radius: 6px; }
.lg-a { background: var(--yours); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 42%); }
.lg-b { background: var(--theirs); clip-path: polygon(0 100%, 100% 60%, 100% 100%, 0 100%); transform: scaleX(-1); }
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { font-size: 0.75rem; color: var(--muted); }
.text-btn {
  background: none; border: none; color: var(--yours); cursor: pointer;
  font-size: 0.78rem; padding: 4px 6px; border-radius: 6px;
}
.text-btn:hover { background: var(--surface-2); }

/* status chip */
.chip {
  font-size: 0.72rem; letter-spacing: 0.06em; padding: 4px 10px;
  border-radius: 999px; border: var(--rule) var(--border-strong);
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.chip .on { color: var(--yours); font-weight: 600; }

/* theme popover */
.theme-wrap { position: relative; }
.theme-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: var(--rule) var(--border); color: var(--muted);
  font-size: 0.74rem; padding: 5px 10px; border-radius: 8px; cursor: pointer;
}
.theme-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.dot, .sw { display: inline-block; border-radius: 999px; }
.dot { width: 8px; height: 8px; }
.d1 { background: var(--yours); }
.d2 { background: var(--theirs); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--surface); border: var(--rule) var(--border); border-radius: 10px;
  padding: 6px; box-shadow: var(--shadow); z-index: 60;
}
.theme-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: none; color: var(--ink); cursor: pointer;
  font-family: var(--body); font-size: 0.9rem; padding: 8px 10px; border-radius: 7px; text-align: left;
}
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button em { font-style: normal; font-size: 0.7rem; color: var(--muted); margin-left: auto; }
.sw { width: 9px; height: 9px; }

/* ============ TYPOGRAPHY ============ */

h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 750; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--yours); font-weight: 600;
}
.led { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono-sm { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em; }

/* ============ COMPONENTS ============ */

main { padding: 30px 0 70px; outline: none; }

.card {
  background: var(--surface); border: var(--rule) var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--yours); color: var(--bg); border: none; border-radius: var(--radius-s);
  padding: 10px 18px; font-family: var(--body); font-size: 0.92rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; border-radius: 7px; }
.btn.ghost { background: transparent; border: var(--rule) var(--border-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.amber { background: var(--theirs); color: var(--bg); }
.btn.bad { background: var(--bad); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

input, textarea, select {
  width: 100%; background: var(--surface-2); border: var(--rule) var(--border);
  color: var(--ink); border-radius: var(--radius-s); padding: 10px 12px;
  font-family: var(--body); font-size: 0.93rem; margin-bottom: 14px;
  transition: border-color 0.15s;
}
input:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
input::placeholder { color: var(--muted); opacity: 0.7; }
label { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 14px; align-items: end; }
@media (max-width: 700px) { .row, .row-3 { grid-template-columns: 1fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 3px 10px; font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.05em; white-space: nowrap;
}
.badge.yours { background: color-mix(in srgb, var(--yours) 14%, transparent); color: var(--yours); }
.badge.theirs { background: color-mix(in srgb, var(--theirs) 14%, transparent); color: var(--theirs); }
.badge.gray { background: var(--surface-2); color: var(--muted); border: var(--rule) var(--border); }
.badge.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

/* ============ SWAP METER (signature) ============ */

.meter { display: flex; align-items: center; gap: 12px; }
.meter-side { flex: 1; display: flex; align-items: center; gap: 9px; }
.meter-label { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; color: var(--muted); min-width: 44px; }
.meter-track { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); border: var(--rule) var(--border); overflow: hidden; }
.meter-fill { height: 100%; width: 0%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.meter-side.yours .meter-fill { background: var(--yours); }
.meter-side.theirs .meter-fill { background: var(--theirs); }
.meter-num { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.meter-glyph {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 999px;
  display: grid; place-items: center; font-size: 0.85rem;
  border: var(--rule) var(--border-strong); color: var(--muted);
  background: var(--surface-2); transition: all 0.4s;
}
.meter.done .meter-glyph { background: var(--yours); color: var(--bg); border-color: transparent; }
.meter.done .meter-fill { width: 100% !important; }
.meter .meter-fill.done-anim { width: 100% !important; }

/* ============ LANDING ============ */

.hero { text-align: center; padding: 54px 0 30px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 780; max-width: 860px; margin: 16px auto 0; }
.hero h1 em { font-style: normal; color: var(--yours); }
.hero .lede { color: var(--muted); max-width: 640px; margin: 18px auto 30px; font-size: 1.05rem; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-demo {
  margin: 42px auto 0; max-width: 640px; text-align: left;
  background: var(--surface); border: var(--rule) var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.demo-row { padding: 12px 0; border-top: var(--rule) var(--border); }
.demo-row .appline { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.demo-row .appline strong { font-family: var(--display); font-size: 0.95rem; }
.demo-row .appline .mono { font-size: 0.72rem; color: var(--muted); }
.demo-result { margin-top: 14px; text-align: center; font-family: var(--mono); font-size: 0.78rem; color: var(--yours); min-height: 1.4em; font-weight: 600; }

.rules-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-top: 40px; }
@media (max-width: 760px) { .rules-grid { grid-template-columns: 1fr; } }
.rule-list { list-style: none; }
.rule-list li { display: flex; gap: 11px; padding: 9px 0; border-bottom: var(--rule) var(--border); font-size: 0.95rem; }
.rule-list li:last-child { border-bottom: none; }
.rule-list .mk { color: var(--yours); font-family: var(--mono); font-weight: 700; }
.golden { background: color-mix(in srgb, var(--theirs) 8%, var(--surface)); border: var(--rule) color-mix(in srgb, var(--theirs) 35%, var(--border)); border-radius: var(--radius); padding: 18px 20px; }
.golden h3 { color: var(--theirs); margin-bottom: 8px; }
.golden p { font-size: 0.93rem; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 10px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: var(--rule) var(--border); border-radius: var(--radius); padding: 18px; position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 0.7rem; color: var(--yours); font-weight: 600; }
.step h3 { margin: 8px 0 6px; font-size: 0.98rem; }
.step p { color: var(--muted); font-size: 0.85rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 46px 0 6px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.55rem; }

/* ============ LEDGER / DASHBOARD ============ */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .mono-pkg { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 9px; flex-wrap: wrap; }

.ledger-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .ledger-grid { grid-template-columns: 1fr; } }
.led-box { background: var(--surface); border: var(--rule) var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.led-box::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; }
.led-box.yours::before { background: var(--yours); }
.led-box.theirs::before { background: var(--theirs); }
.led-box .lbl { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.led-box .big { font-family: var(--mono); font-size: 2.1rem; font-weight: 600; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.led-box .big.yours { color: var(--yours); }
.led-box .big.theirs { color: var(--theirs); }
.led-box .note2 { font-size: 0.78rem; color: var(--muted); }
.clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.clock .sep { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.gate-list { list-style: none; }
.gate-list li { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: var(--rule) var(--border); }
.gate-list li:last-child { border-bottom: none; }
.gate-list .gate-ck {
  width: 21px; height: 21px; flex-shrink: 0; border-radius: 6px;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  border: var(--rule) var(--border-strong); color: transparent; background: var(--surface-2);
  transition: all 0.2s;
}
.gate-list li.done .gate-ck { background: var(--yours); border-color: var(--yours); color: var(--bg); }
.gate-list .gate-txt { flex: 1; font-size: 0.93rem; }
.gate-list li.done .gate-txt { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.gate-list .gate-val { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.gate-list li input[type=checkbox] { display: none; }
.gate-list li.gate-clickable { cursor: pointer; }
.gate-list li.gate-clickable:hover .gate-ck { border-color: var(--yours); }
.gate-progress { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.gate-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--yours), var(--theirs)); transition: width 0.5s ease; }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.ledger-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: var(--rule) var(--border); font-size: 0.9rem; }
.ledger-row:last-child { border-bottom: none; }
@media (max-width: 700px) { .ledger-row { grid-template-columns: 1fr 1fr; } }
.ledger-row .tname { font-weight: 600; font-size: 0.88rem; }
.ledger-row .tmail { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.add-line { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: end; margin-top: 14px; }
@media (max-width: 700px) { .add-line { grid-template-columns: 1fr; } }
.add-line input { margin-bottom: 0; }

.trade-row { padding: 11px 0; border-bottom: var(--rule) var(--border); }
.trade-row:last-child { border-bottom: none; }
.trade-row .tline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.trade-row .tline strong { font-size: 0.92rem; }
.trade-row .tline .mono { font-size: 0.7rem; color: var(--muted); }
.trade-row .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.copy-line { display: flex; gap: 10px; align-items: center; }
.copy-line input { margin-bottom: 0; font-family: var(--mono); font-size: 0.78rem; }

/* ============ COMMUNITY ============ */

.devs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 780px) { .devs-grid { grid-template-columns: 1fr; } }
.dev-card { background: var(--surface); border: var(--rule) var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.dev-card .dname { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dev-card .pkg { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.dev-card .ddesc { font-size: 0.88rem; color: var(--muted); }
.dev-card .dmeta { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-card .dacts { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.dev-card .meter { margin-top: 2px; }

/* ============ AUTH ============ */

.auth-wrap { max-width: 430px; margin: 30px auto 0; }
.auth-card { position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--yours) 0 50%, var(--theirs) 50% 100%); }
.auth-card h1 { margin: 10px 0 4px; }
.auth-card .sub { margin-bottom: 20px; }
.auth-card .btn { width: 100%; margin-top: 4px; }
.auth-note { background: var(--surface); border: var(--rule) var(--border); border-radius: var(--radius); padding: 15px 18px; margin-top: 16px; }

/* ============ ONBOARDING ============ */

.onboard { max-width: 560px; margin: 0 auto; }
.onboard .step { margin-bottom: 12px; }
.onboard .step p { font-size: 0.88rem; }

/* ============ SETTINGS ============ */

.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .set-grid { grid-template-columns: 1fr; } }
.ai-draft { background: var(--surface-2); border: var(--rule) var(--border); border-radius: var(--radius-s); padding: 16px; white-space: pre-wrap; font-family: var(--mono); font-size: 0.84rem; line-height: 1.7; margin-top: 14px; }
.draft-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.kbd { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); border: var(--rule) var(--border); border-radius: 5px; padding: 2px 7px; background: var(--surface-2); }

/* ============ EMPTY / ERROR / TOAST ============ */

.empty { color: var(--muted); text-align: center; padding: 34px 16px; font-size: 0.92rem; }
.empty strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 5px; }
.empty .btn { margin-top: 14px; }
.inline-err { color: var(--bad); font-size: 0.86rem; margin-bottom: 12px; min-height: 1.2em; }
.inline-ok { color: var(--yours); font-size: 0.86rem; margin-bottom: 12px; min-height: 1.2em; }

.toasts { position: fixed; left: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--surface); color: var(--ink); border: var(--rule) var(--border-strong);
  border-left: 3px solid var(--yours); border-radius: 9px; padding: 11px 15px;
  font-size: 0.86rem; box-shadow: var(--shadow); max-width: 340px;
  animation: toast-in 0.25s ease; font-family: var(--body);
}
.toast.err { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ FOOTER ============ */

.site-foot { margin-top: auto; border-top: var(--rule) var(--border); padding: 20px 0; }
.site-foot p { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.03em; }
.foot-links { display: flex; gap: 16px; margin-top: 8px; }
.foot-links a { color: var(--muted); font-size: 0.78rem; text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

/* ============ MOBILE CTA ============ */

.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-top: var(--rule) var(--border);
  padding: 10px 0;
}
.mobile-cta .btn { width: 100%; }
@media (max-width: 760px) {
  body.has-cta .mobile-cta { display: block; }
  body.has-cta main { padding-bottom: 110px; }
}

/* ============ COOKIE BANNER ============ */

.cookie-banner {
  position: fixed; right: 18px; bottom: 18px; z-index: 95;
  max-width: 360px; background: var(--surface); color: var(--ink);
  border: var(--rule) var(--border-strong); border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.cookie-banner p { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.cookie-actions { display: flex; gap: 9px; }

/* ============ LEGAL / CONTACT ============ */

.prose { line-height: 1.75; font-size: 0.95rem; color: var(--ink); }
.prose p { margin-bottom: 14px; }
.prose h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.prose ul { padding-left: 20px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.8em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.contact-topic { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.topic-chip {
  flex: 1; min-width: 130px; text-align: left; background: var(--surface-2);
  border: var(--rule) var(--border); color: var(--ink); border-radius: 8px;
  padding: 9px 12px; font-family: var(--body); font-size: 0.85rem; cursor: pointer;
}
.topic-chip.on { border-color: var(--yours); background: color-mix(in srgb, var(--yours) 10%, var(--surface-2)); }

/* ============ FORM ERROR STATES ============ */

input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
input.invalid:focus { border-color: var(--bad); }

/* ============ 404 (client route) ============ */

.notfound { text-align: center; padding: 60px 0; }
.notfound code { font-family: var(--mono); font-size: 0.75rem; color: var(--theirs); letter-spacing: 0.15em; }
.notfound h1 { font-size: 2.4rem; margin: 14px 0 10px; }
.notfound p { color: var(--muted); margin-bottom: 24px; }

/* ============ THANK YOU ============ */

.thanks { text-align: center; padding: 40px 0; }
.thanks .tick {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 999px;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
  background: color-mix(in srgb, var(--yours) 15%, transparent); color: var(--yours);
  border: var(--rule) var(--yours);
}

/* ============ MISC ============ */

.spinner { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; padding: 40px 0; text-align: center; }
.spinner::after { content: '…'; animation: blink 1.2s steps(1) infinite; }
.note-line { font-size: 0.83rem; color: var(--muted); margin-top: 10px; }
.divider { border: none; border-top: var(--rule) var(--border); margin: 26px 0; }

/* ============ ACCESSIBILITY ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
