/* 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 Origins brand: deep time in rock. Pale limestone paper, basalt-dark text, deep-sea teal links.
   Iron-oxide rust is the one motif colour (ribose-ring list markers). Section dividers are a strip of banded iron
   formation, the way Open Indus uses brick courses. Appended after site.css by build.py. */
:root {
  --paper: #F1EEE6; --surface: #F9F7F1; --ink: #1C1B17; --muted: #575449; --line: #DCD6C9; --line-strong: #BFB7A6;
  --accent: #1D6670; --ok: #1D6A44; --ok-soft: #DCEFE4; --warn: #7A5200; --warn-soft: #F3E6C8; --bad: #9B2C2C; --bad-soft: #F6DEDC;
  --rust: #A4512B; --stone: #E2D9C6; --sea: #DAE7E4; --band-a: #CB9471; --band-b: #E0D3BA; --band-c: #BBAA90; --lam: rgb(70 45 20 / 0.22); --grain: #9C8D76;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #11110E; --surface: #1A1A16; --ink: #E9E6DD; --muted: #A39E91; --line: #2A2924; --line-strong: #403D35;
  --accent: #79C2C9; --ok: #7FD1A5; --ok-soft: #15281F; --warn: #E3B862; --warn-soft: #2E2512; --bad: #EE9A94; --bad-soft: #341A19;
  --rust: #D98257; --stone: #26231D; --sea: #12201F; --band-a: #6B3D26; --band-b: #39332A; --band-c: #4B4236; --lam: rgb(0 0 0 / 0.35); --grain: #5C5345;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #11110E; --surface: #1A1A16; --ink: #E9E6DD; --muted: #A39E91; --line: #2A2924; --line-strong: #403D35;
  --accent: #79C2C9; --ok: #7FD1A5; --ok-soft: #15281F; --warn: #E3B862; --warn-soft: #2E2512; --bad: #EE9A94; --bad-soft: #341A19;
  --rust: #D98257; --stone: #26231D; --sea: #12201F; --band-a: #6B3D26; --band-b: #39332A; --band-c: #4B4236; --lam: rgb(0 0 0 / 0.35); --grain: #5C5345;
  color-scheme: dark; }

/* divider: a strip of banded iron formation, rust and chert in thin wavy layers */
main section + section::before { height: 12px;
  background: linear-gradient(var(--band-a) 0 30%, var(--band-b) 30% 48%, var(--band-a) 48% 66%, var(--band-c) 66% 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M0 2c25 0 25 2 50 2s25-3 50-3 25 2 50 2 25-1 50-1v9c-25 0-25-2-50-2s-25 2-50 2-25-3-50-3S25 10 0 10z'/%3E%3C/svg%3E") repeat-x left center / 200px 12px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M0 2c25 0 25 2 50 2s25-3 50-3 25 2 50 2 25-1 50-1v9c-25 0-25-2-50-2s-25 2-50 2-25-3-50-3S25 10 0 10z'/%3E%3C/svg%3E") repeat-x left center / 200px 12px; }

/* list marker: a five-sided ribose ring, the sugar in RNA */
main ul.mk > li::before { width: 10px; height: 10px; top: 0.5em; background: var(--rust);
  clip-path: polygon(50% 0, 100% 38%, 81% 100%, 19% 100%, 0 38%); }

/* hero: a stromatolite cut in half */
.hero-art svg { border-radius: 12px; }
.hero-art .sed { fill: var(--stone); } .hero-art .sea { fill: var(--sea); }
.hero-art .ba { fill: var(--band-a); } .hero-art .bb { fill: var(--band-b); } .hero-art .bc { fill: var(--band-c); }
.hero-art .lam { fill: none; stroke: var(--lam); stroke-width: 0.7; } .hero-art .gr { fill: var(--grain); }
.hero-art .tl { font: 600 11.5px -apple-system, "Inter", system-ui, sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--stone); stroke-width: 3px; stroke-linejoin: round; }
.hero-art .ar { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; paint-order: stroke; }
