/* Shared look for Open Mind and Open Origins: a quiet research report.
   Colour tokens come from content.json (injected at ), so each project has its own palette. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Iowan Old Style", "Charter", Georgia, serif; overflow-x: hidden; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
h1, h2, h3, .brand, nav, .kicker, .chip, .lv, .meta, th, .odd span, .tid, .foot { font-family: -apple-system, "Inter", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(34px, 5.6vw, 64px); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(23px, 2.8vw, 31px); line-height: 1.15; margin-bottom: 14px; }
h3 { font-size: 18px; line-height: 1.3; margin-bottom: 6px; }
p, li { text-wrap: pretty; max-width: 70ch; }
code { font: 0.85em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 4px; }

.head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.parent { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.parent:hover { color: var(--ink); }
.slash { color: var(--line-strong); margin: 0 -12px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 17px; }
nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14.5px; }
nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }

main section { padding: clamp(32px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); }
main section:last-child { border-bottom: 0; }
.hero { padding-top: clamp(48px, 8vw, 104px); }
.hero.sm { padding-top: clamp(36px, 5vw, 64px); }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); margin-top: 18px; }

.odds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.odd { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.odd .big { font-size: 32px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.odd span:last-child { font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.crit li, .rules li { margin-bottom: 10px; }

.ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ladder li { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; max-width: none; }
.ladder p { margin: 2px 0 0; color: var(--muted); font-size: 15.5px; }
.lv { font-weight: 700; color: var(--accent); font-size: 15px; padding-top: 2px; }
@media (max-width: 560px) { .ladder li { grid-template-columns: 36px 1fr; } .ladder .chip { grid-column: 2; justify-self: start; } }

.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-open { background: transparent; color: var(--muted); border-color: var(--line-strong); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.score { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
.score th, .score td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.score thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.score tbody tr:last-child > * { border-bottom: 0; }
.score tbody th { font-weight: 650; width: 18%; }
.sub { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.note { font-size: 14.5px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card p { font-size: 15.5px; margin: 6px 0; }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; max-width: none; }
.tasks li:last-child { border-bottom: 0; }
.tid { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 4px; }

.paper { padding: 18px 0; border-bottom: 1px solid var(--line); }
.paper:last-child { border-bottom: 0; }
.paper .meta { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.paper .why { color: var(--muted); font-size: 15.5px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); }

/* Phones: the scoreboard becomes one card per theory */
@media (max-width: 640px) {
  .tablewrap { border: 0; background: none; overflow: visible; }
  table.score { min-width: 0; }
  .score thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .score tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
  .score th, .score td { display: block; border: 0; padding: 0; width: auto !important; }
  .score td { margin-top: 10px; }
  .score td[data-l]::before { content: attr(data-l); display: block; font: 600 12.5px -apple-system, system-ui, sans-serif; color: var(--muted); margin-bottom: 2px; }
}

/* News article: three detail levels */
.h-article { font-size: clamp(28px, 4.2vw, 46px); }
.levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.levels label { font: 600 14px -apple-system, system-ui, sans-serif; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; color: var(--muted); }
.levels input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.levels input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.pane { display: none; width: 100%; font-size: 19px; }
#lvl-gist:checked ~ .pane-gist, #lvl-plain:checked ~ .pane-plain, #lvl-tech:checked ~ .pane-tech { display: block; }

/* Findings page (structure of Open Indus) */
.jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font: 14px -apple-system, system-ui, sans-serif; }
.jump a { color: var(--muted); }
.fblock { display: grid; grid-template-columns: 1fr; gap: 8px 40px; }
@media (min-width: 900px) { .fblock { grid-template-columns: 150px 1fr; } }
.rail { margin: 4px 0 0; font: 600 13px -apple-system, system-ui, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rail span { display: block; font-size: 28px; color: var(--accent); letter-spacing: -0.02em; text-transform: none; }
.fcontent { min-width: 0; }
.fcontent h3 { margin-top: 26px; }
.fcontent p { margin: 8px 0; }
.intro { color: var(--muted); }
.tried-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.tried, .route { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; max-width: none; }
.tried p, .route p { font-size: 16px; margin: 6px 0; }
.tr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tried h4, .route h4, .ft { margin: 0; font: 650 17px/1.35 -apple-system, system-ui, sans-serif; letter-spacing: -0.01em; }
.tr-meta { color: var(--muted); font: 13px -apple-system, system-ui, sans-serif !important; margin-top: 2px !important; }
.reopen { color: var(--muted); }
.tag, .nov { flex: none; display: inline-block; font: 600 12px -apple-system, system-ui, sans-serif; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tag-out, .tag-ns { background: var(--bad-soft); color: var(--bad); }
.tag-weak, .tag-wait { background: var(--warn-soft); color: var(--warn); }
.tag-open { border: 1px solid var(--line-strong); color: var(--muted); }
.tag-part { background: var(--ok-soft); color: var(--ok); }
.nov { border: 1px solid var(--line-strong); color: var(--muted); }
.nov-new { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.legend-row { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.levels { display: grid; gap: 8px; margin: 12px 0; }
.levels div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; }
.levels dd { margin: 0; font-size: 15.5px; color: var(--muted); }
.key-h { font-size: 16px; }
.fmeter { display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px -apple-system, system-ui, sans-serif; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--accent); }
.pips i.on { background: var(--accent); }
.fgroup { display: flex; align-items: center; gap: 10px; margin-top: 28px !important; }
.fgn { font: 600 12px -apple-system, system-ui, sans-serif; color: var(--muted); }
.findings { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; max-width: none; }
.fh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.fg { font-size: 16.5px; margin: 8px 0 0; }
.tech summary { cursor: pointer; font: 600 14px -apple-system, system-ui, sans-serif; color: var(--accent); margin-top: 10px; }
.fbody p { font-size: 15.5px; }
.ftech { font-weight: 650; }
.prior, .where { color: var(--muted); }
.nums { font: 13.5px/1.55 ui-monospace, "SF Mono", Menlo, monospace; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.caveat { color: var(--warn); }
@media (max-width: 560px) { .levels div { grid-template-columns: 1fr; gap: 2px; } .tr-head, .fh { flex-direction: column; gap: 6px; } }

/* Brand hooks. Colours, the divider drawing and the list marker come from each project's site/brand.css. */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
main section { border-bottom: 0; }
main section + section { padding-top: 0; }
main section + section::before { content: ""; display: block; grid-column: 1 / -1; margin-bottom: clamp(32px, 5vw, 56px); }
main ul.mk { list-style: none; padding-left: 24px; }
main ul.mk > li { position: relative; }
main ul.mk > li::before { content: ""; position: absolute; left: -22px; }
.hero.has-art { display: grid; gap: 28px 48px; align-items: center; }
@media (min-width: 920px) { .hero.has-art { grid-template-columns: 1fr 1.05fr; } }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-art figcaption { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 10px; max-width: 62ch; }

/* Open Mind brand: a sleep-lab recording. Pale chart paper with a faint green grid, pen-ink text, night indigo links.
   Dawn amber is the one motif colour (electrode list markers, the dreaming-sleep band). Section dividers are a short
   brain-wave trace, the way Open Indus uses brick courses. Appended after site.css by build.py. */
:root {
  --paper: #F3F4EF; --surface: #FAFBF7; --ink: #15171C; --muted: #4F5560; --line: #DDE0D8; --line-strong: #BCC1B6;
  --accent: #4B3A9C; --ok: #1D6A44; --ok-soft: #DCEFE4; --warn: #7A5200; --warn-soft: #F3E6C8; --bad: #9B2C2C; --bad-soft: #F6DEDC;
  --chart: #F8F9F3; --grid: #E3EADC; --grid-b: #CBD7C2; --glow: #B06A12; --glow-soft: rgb(214 150 50 / 0.16); --trace: #9AA394;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0E1014; --surface: #161920; --ink: #E6E8EC; --muted: #9AA0AC; --line: #252932; --line-strong: #3A404B;
  --accent: #B3A6F2; --ok: #7FD1A5; --ok-soft: #15281F; --warn: #E3B862; --warn-soft: #2E2512; --bad: #EE9A94; --bad-soft: #341A19;
  --chart: #12151A; --grid: #1C2229; --grid-b: #29313A; --glow: #E5A54B; --glow-soft: rgb(229 165 75 / 0.11); --trace: #4A525E;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #0E1014; --surface: #161920; --ink: #E6E8EC; --muted: #9AA0AC; --line: #252932; --line-strong: #3A404B;
  --accent: #B3A6F2; --ok: #7FD1A5; --ok-soft: #15281F; --warn: #E3B862; --warn-soft: #2E2512; --bad: #EE9A94; --bad-soft: #341A19;
  --chart: #12151A; --grid: #1C2229; --grid-b: #29313A; --glow: #E5A54B; --glow-soft: rgb(229 165 75 / 0.11); --trace: #4A525E;
  color-scheme: dark; }

/* divider: a brain-wave trace that runs from waking ripples into slow sleep waves */
main section + section::before { background: var(--trace); height: 16px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 169 16'%3E%3Cpath d='M0 8l3-3 3 6 3-5 3 4 3-4 3 5 3-6 3 5 3-3 3 3 4-4 4 5 4-5 4 4 5-3 6 3c8 0 8-6 16-6s8 12 16 12 8-12 16-12 8 12 16 12 8-6 16-6' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 169px 16px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 169 16'%3E%3Cpath d='M0 8l3-3 3 6 3-5 3 4 3-4 3 5 3-6 3 5 3-3 3 3 4-4 4 5 4-5 4 4 5-3 6 3c8 0 8-6 16-6s8 12 16 12 8-12 16-12 8 12 16 12 8-6 16-6' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 169px 16px; }

/* list marker: an EEG electrode, a ring with a contact in the middle */
main ul.mk > li::before { width: 10px; height: 10px; border-radius: 50%; top: 0.5em;
  background: radial-gradient(circle, var(--glow) 0 1.8px, transparent 2.3px); box-shadow: inset 0 0 0 1.6px var(--glow); }

/* hero: the night's recording on chart paper */
.hero-art svg { background: var(--chart); border: 1px solid var(--line); border-radius: 12px; }
.hero-art .g { stroke: var(--grid); stroke-width: 0.6; } .hero-art .gb { stroke: var(--grid-b); stroke-width: 0.8; }
.hero-art .st { font: 600 12.5px -apple-system, "Inter", system-ui, sans-serif; fill: var(--ink); }
.hero-art .ch { font: 500 11px -apple-system, "Inter", system-ui, sans-serif; fill: var(--muted); text-anchor: end; }
.hero-art .sep { stroke: var(--line-strong); stroke-dasharray: 2 3; }
.hero-art .tr { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; }
.hero-art .rem { fill: var(--glow-soft); }
.hero-art .hyp { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.hero-art .hyp-rem { stroke: var(--glow); stroke-width: 5; stroke-linecap: round; }
