/* Developmental World Models / Baby Senses Lab: site stylesheet.
   One type family everywhere (Inter, system sans fallback); monospace only for code. */
:root {
  --cardinal: #A31F34;
  --cardinal-dark: #8B1A2B;
  --silver: #8A8B8C;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #F4F4F3;
  --text: #1a1a1a;
  --muted: #55565a;
  --faint: #6b6c70;
  --border: #D6D6D3;
  --accent: #A31F34;
  --accent-hover: #8B1A2B;
  --on-accent: #ffffff;
  --header-bg: #ffffff;
  --c-vision: #2a78d6;
  --c-audio: #eb6834;
  --c-touch: #1baf7a;
  --c-proprio: #eda100;
  --c-curriculum: #2a78d6;
  --c-grown: #1baf7a;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --radius: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111112; --surface: #1a1a1c; --surface-2: #232325; --text: #ececec; --muted: #b0b0b4;
    --faint: #9a9a9f; --border: #38383c; --accent: #f0788a; --accent-hover: #ff9aa8; --header-bg: #111112;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111112; --surface: #1a1a1c; --surface-2: #232325; --text: #ececec; --muted: #b0b0b4;
  --faint: #9a9a9f; --border: #38383c; --accent: #f0788a; --accent-hover: #ff9aa8; --header-bg: #111112;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cardinal); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; color: #fff; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.page { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
main { min-width: 0; padding: 36px 0 64px; }
main.narrow { max-width: 760px; }

/* ---- header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); border-bottom: 1px solid var(--border); border-top: 4px solid var(--cardinal); }
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; min-height: 56px; }
.brand { font-weight: 700; color: var(--text); font-size: 17px; letter-spacing: -.01em; margin-right: auto; }
.brand:hover { color: var(--accent); text-decoration: none; }
nav.primary { order: 4; width: 100%; display: flex; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; margin-top: -4px; }
nav.primary::-webkit-scrollbar { display: none; }
nav.primary a { color: var(--muted); font-size: 15px; padding: 6px 0 10px; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
nav.primary a:hover { color: var(--text); text-decoration: none; }
nav.primary a[aria-current] { color: var(--text); border-bottom-color: var(--cardinal); }
.who { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; padding: 2px; background: var(--surface-2); }
.who button { border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 99px; cursor: pointer; }
.who button:hover { color: var(--text); }
.who button[aria-pressed="true"] { background: var(--cardinal); color: #fff; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 99px; padding: 5px 11px; cursor: pointer; font-size: 13px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.who-banner { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 14.5px; }
.who-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
.who-banner span { margin-right: auto; }

/* ---- typography */
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12; margin: 0 0 14px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.25; margin: 48px 0 10px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 17px; line-height: 1.35; margin: 22px 0 6px; font-weight: 650; }
h4 { font-size: 15px; margin: 18px 0 4px; font-weight: 650; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 4px; }
p.lede { font-size: 19px; color: var(--muted); max-width: 680px; line-height: 1.55; }
p.sub { color: var(--muted); max-width: 720px; margin-top: 0; }
.note { font-size: 14px; color: var(--muted); }
code { font: .88em var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; font: 13px/1.5 var(--mono); margin: 0 0 16px; }
pre code { background: none; padding: 0; overflow-wrap: normal; }

/* ---- components */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; color: var(--text); }
a.card:hover { text-decoration: none; border-color: var(--cardinal); box-shadow: 0 2px 12px rgba(0,0,0,.10); }
a.card h3 { color: var(--text); }
a.card p { color: var(--muted); }
.go { font-size: 14px; font-weight: 650; color: var(--accent); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); margin: 0 4px 4px 0; white-space: nowrap; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 99px; border: 1.5px solid var(--cardinal); background: transparent; color: var(--accent); font-weight: 650; font-size: 14.5px; cursor: pointer; text-align: center; }
.btn.primary { background: var(--cardinal); border-color: var(--cardinal); color: #fff; }
.btn:hover { text-decoration: none; background: var(--cardinal-dark); border-color: var(--cardinal-dark); color: #fff; }
.btn.small { padding: 4px 12px; font-size: 13.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 14px 0 18px; }
.controls label { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
input[type=range] { width: min(360px, 60vw); accent-color: var(--cardinal); }
select { font-size: 14px; padding: 5px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
details { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); margin: 0 0 12px; }
details summary { cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: 8px; }
details > :last-child { margin-bottom: 0; }
.tablewrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: var(--radius); }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t th { background: var(--surface-2); font-weight: 650; font-size: 13.5px; }
table.t tr:last-child td, table.t tr:last-child th { border-bottom: 0; }
.tip { display: none; }

/* ---- home: the first question */
.choose { min-height: calc(100vh - 210px); display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.choose h1 { max-width: 760px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; margin-top: 26px; max-width: 860px; }
.choice { display: block; text-align: left; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 26px 24px; cursor: pointer; font-size: 16px; }
.choice:hover, .choice:focus-visible { border-color: var(--cardinal); box-shadow: 0 4px 16px rgba(0,0,0,.10); text-decoration: none; color: var(--text); }
.choice .ic { font-size: 30px; line-height: 1; display: block; margin-bottom: 14px; }
.choice b { display: block; font-size: 20px; margin-bottom: 6px; letter-spacing: -.01em; }
.choice span.d { color: var(--muted); font-size: 15px; display: block; }
.choice .go { display: block; margin-top: 14px; }
[data-show] { display: none; }
html:not([data-persona]) [data-show="none"], html[data-persona="family"] [data-show="family"], html[data-persona="research"] [data-show="research"] { display: block; }

/* ---- home screens */
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 52px); max-width: 820px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 8px; }
.tile { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface); color: var(--text); }
.tile:hover { border-color: var(--cardinal); text-decoration: none; color: var(--text); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.tile b { display: block; font-size: 18px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 15px; }
.tile .ic { font-size: 24px; display: block; margin-bottom: 10px; }
.paper { display: grid; gap: 6px; }
.paper .n { font-size: 12.5px; font-weight: 700; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.paper h3 { margin: 0 0 4px; font-size: 19px; }
.paper .links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; font-weight: 600; font-size: 14.5px; }
.quiet { color: var(--muted); font-size: 14px; margin-top: 26px; }

/* ---- findings */
.tabs { display: inline-flex; gap: 4px; border: 1px solid var(--border); border-radius: 99px; padding: 3px; background: var(--surface-2); margin: 10px 0 24px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 99px; font-size: 14.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.finding { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--border); }
.finding:first-of-type { border-top: 0; }
.finding .n { font-size: 14px; font-weight: 700; color: var(--accent); padding-top: 3px; }
.finding h3 { margin: 0 0 6px; font-size: 19px; }
.finding p { margin: 0 0 6px; color: var(--muted); max-width: 720px; }
.finding .nums { font-size: 14px; color: var(--text); background: var(--surface-2); border-radius: 6px; padding: 8px 12px; margin-top: 8px; max-width: 720px; font-variant-numeric: tabular-nums; }
.verdict { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; border: 1.5px solid var(--silver); color: var(--muted); letter-spacing: .02em; }
.scope { border-left: 4px solid var(--cardinal); background: var(--surface-2); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 8px 0 18px; font-size: 15px; max-width: 760px; }

/* ---- steps (approach) */
.steps { counter-reset: s; display: grid; gap: 14px; margin: 18px 0; }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.step::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--cardinal); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.step h3 { margin: 4px 0 4px; }
.step p { margin: 0; color: var(--muted); }

/* ---- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 14px; padding: 26px 0 36px; margin-top: 24px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px 28px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer b { color: var(--text); }
noscript .nojs { background: var(--surface-2); padding: 10px 24px; font-size: 14px; }

@media (max-width: 640px) {
  .wrap, .page { padding: 0 16px; }
  .site-header { position: static; }
  .site-header .wrap { gap: 8px 10px; padding-top: 8px; }
  .brand { font-size: 16px; width: 100%; }
  .who button { padding: 5px 10px; }
  main { padding-top: 24px; }
  .choose { min-height: 0; padding-top: 4px; }
  .choice { padding: 20px 18px; }
  .finding { grid-template-columns: minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
}
@media print {
  .site-header, .who-banner, .controls, .btns, .skip { display: none !important; }
  .page { padding: 0; }
  body { font-size: 11pt; background: #fff; color: #000; }
  a { color: #000; }
  .site-footer { background: none; }
  .card, .tablewrap { break-inside: avoid; }
}
html:not([data-persona]) body[data-path="index.html"] nav.primary { display: none; }
