:root {
  /* "Histology" palette, shared with afferentsignal.com and synapse.afferentsignal.com so all
     three sites read as one organization. Hematoxylin indigo (--accent) is primary; parchment is
     the ground; eosin rose (--syn) marks the Synapse tie-in; mint (--ok) marks success/verified. */
  --bg: #f8f5ee; --surface: #fcfaf5; --text: #161a33; --muted: #565b75; --line: #e4decf;
  --accent: #34409b; --accent-ink: #f8f5ee; --accent-soft: #e6e8f6;
  --warn-bg: color-mix(in srgb, #a6741a 14%, var(--bg)); --warn-line: #a6741a;
  --bad: oklch(0.577 0.245 27.325); --bad-soft: color-mix(in oklch, oklch(0.577 0.245 27.325) 14%, var(--bg));
  --ok: #0b7a63; --ok-soft: color-mix(in srgb, #0b7a63 14%, var(--bg));
  --syn: #a63f59; --syn-soft: color-mix(in srgb, #a63f59 14%, var(--bg));
  --radius: 12px; --shadow: 0 1px 2px rgba(22, 26, 51, .06);
  /* Brand badge: identical in both themes so the mark never changes identity (same as the other sites). */
  --badge-hi: #5b69d0; --badge-lo: #2e3990; --badge-ink: #f8f5ee; --badge-dot: #62e6c8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1128; --surface: #141834; --text: #eceef9; --muted: #a2a8c6; --line: rgb(236 238 249 / 9%);
    --accent: #8e9bf5; --accent-ink: #0e1128; --accent-soft: #1c2152;
    --warn-bg: color-mix(in srgb, #e0b15c 18%, var(--bg)); --warn-line: #e0b15c;
    --bad: oklch(0.704 0.191 22.216); --bad-soft: color-mix(in oklch, oklch(0.704 0.191 22.216) 16%, var(--bg));
    --ok: #62e6c8; --ok-soft: color-mix(in srgb, #62e6c8 16%, var(--bg));
    --syn: #f08aa0; --syn-soft: color-mix(in srgb, #f08aa0 16%, var(--bg)); --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 48px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { margin: 0 0 6px; }
section { margin: 24px 0; }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topinner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
/* Radial glow instead of a flat fill, matching afferentsignal.com and synapse.afferentsignal.com. */
.brand-badge { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  color: var(--badge-ink); background: radial-gradient(circle at 32% 28%, var(--badge-hi) 0%, var(--badge-lo) 78%);
  box-shadow: 0 0 14px 1px color-mix(in srgb, var(--badge-hi) 40%, transparent); }
.brand-badge svg { width: 18px; height: 18px; }
nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
nav a { text-decoration: none; }
.foot { color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; border-top: 1px solid var(--line); }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 8px;
  padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 5px 12px; font-size: .9rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
form.inline, form.inline-block { display: inline; }
form.inline-block { margin-left: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2.4rem; max-width: 22ch; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.steps, .tiers, .grid, .two, .kpis { display: grid; gap: 16px; }
.steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tiers { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 16px 0; }
.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tier ul { padding-left: 18px; margin: 8px 0 0; }
.tier.current { border-color: var(--accent); }
.project { text-decoration: none; color: inherit; display: block; }
.project:hover { border-color: var(--accent); }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .big { font-size: 1.7rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.titlebar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 24px; }

.muted { color: var(--muted); } .small { font-size: .85rem; }
.narrow { max-width: 420px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } .hero h1 { font-size: 1.8rem; } }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
label.check { flex-direction: row; gap: 8px; align-items: flex-start; font-weight: 400; }
input:not([type=checkbox]), select { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
input[type=checkbox] { margin-top: 4px; }

.alert { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); border-radius: 8px; padding: 10px 14px; }
.note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 10px 14px; }

.chip { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.plan-synapse { background: var(--syn-soft); color: var(--syn); border-color: transparent; }
.chip.persona { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.defect { background: var(--warn-bg); border-color: var(--warn-line); }
.chip.link { text-decoration: none; margin: 0 2px 6px 0; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.bar label { flex-direction: row; justify-content: space-between; font-weight: 500; }
div.bar { margin-bottom: 10px; }
progress { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select { width: auto; min-width: 190px; }
.bio { margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
blockquote { margin: 12px 0 8px; padding-left: 12px; border-left: 3px solid var(--accent); font-style: italic; }
.insight { margin: 0; }
.pager { margin-top: 16px; }

.legal { max-width: 720px; }
.legal h2 { margin-top: 24px; }
.legal p, .legal li { color: var(--text); }
.danger-zone { margin: 32px 0; border-color: var(--bad); }
.foot a { color: var(--muted); }

.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }

.brief { max-width: 780px; }
.brief-head h1 { margin-bottom: 4px; }
.brief .kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 24px 0 0; }
.brief-block { margin: 22px 0; break-inside: avoid; }
.brief .example { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin: 14px 0; break-inside: avoid; }
.brief .example .tag { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.brief .example blockquote { border: 0; padding: 0; margin: 4px 0; }
.brief-foot { border-top: 1px solid var(--line); padding-top: 12px; }
@media print {
  .topbar, .foot, .noprint { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main.wrap { padding: 0; max-width: none; }
  .brief { max-width: none; }
  a { color: #000; text-decoration: none; }
  th, td { border-bottom-color: #bbb; }
  .brief .kicker { color: #000; }
}

[hidden] { display: none !important; }   /* .btn sets display, which would otherwise defeat the hidden attribute */
