/* Unbiased Machine v2. Concept: a calibration chart. Blue = calibrated, orange = the bias.
   Layout: flat blue opening band, then ruled rows on a cool white page. No rounded cards. */
:root {
  --bg: #fbfcff; --ink: #11133a; --muted: #50547a; --line: #cfd4ea;
  --link: #2430d8; --band: #2430d8; --on-band: #ffffff; --on-band-2: #d9ddff;
  --bias: #ffa564; --bias-text: #b2460a; --tint: #e9ecff;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Atkinson Hyperlegible", Verdana, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e26; --ink: #eef0ff; --muted: #a9aed6; --line: #2b3060;
    --link: #a3adff; --band: #1c26b4; --bias-text: #ffa564; --tint: #191d48; color-scheme: dark;
  }
}
/* Oddities live in the negative of the site */
.odd-page {
  --bg: #11133a; --ink: #f3f4ff; --muted: #b3b8e0; --line: #363b7a;
  --link: #ffa564; --band: #11133a; --bias-text: #ffa564; --tint: #1d2058; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--body); overflow-wrap: break-word; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--bias); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-bottom: 72px; }
main.narrow { max-width: 748px; }

/* Header */
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.brand { font: 800 21px/1.2 var(--display); letter-spacing: -.02em; color: inherit; text-decoration: none; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; font-size: 16px; }
.nav a { color: inherit; text-decoration: none; padding: 3px 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-color: currentColor; }
.nav a[aria-current="page"] { border-color: var(--bias); }
.nav .lang { font-weight: 700; }
body:has(.hero) .site-header { background: var(--band); color: var(--on-band); }

/* Opening band: full bleed from inside the centred column */
.hero { background: var(--band); color: var(--on-band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); padding: 40px 0 56px; margin-bottom: 56px; }
.hero h1 { font-size: clamp(36px, 5vw, 60px); margin: 0 0 20px; max-width: 18ch; }
.hero .lead { color: var(--on-band-2); }
.hero a { color: inherit; }
.eyebrow { margin: 0 0 14px; font-size: 17px; }
.hero .eyebrow { color: var(--bias); }
.lead { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 58ch; margin: 0; }
.hero.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.cta { display: flex; gap: 12px 28px; align-items: center; flex-wrap: wrap; margin: 30px 0 0; }
.btn { display: inline-block; padding: 13px 22px; font-weight: 700; text-decoration: none; }
.hero .btn { background: var(--on-band); color: #2430d8; }
.hero .btn:hover { background: var(--bias); color: #11133a; }
.hero .btn.ghost { background: none; color: inherit; padding: 13px 0; text-decoration: underline; }
.hero .btn.ghost:hover { background: none; color: var(--bias); }

/* Calibration chart */
.cal { margin: 0; min-width: 0; }
.cal svg { display: block; width: 100%; height: auto; overflow: visible; }
.cal text { font: 15px var(--body); fill: #d9ddff; }
.cal .axis { stroke: #6f79f2; stroke-width: 1; fill: none; }
.cal .ideal-line { stroke: #fff; stroke-width: 2; stroke-dasharray: 2 6; fill: none; }
.cal .gap { fill: #ffa564; opacity: .22; }
.cal .curve { stroke: #ffa564; stroke-width: 4; fill: none; }
.cal .push { stroke: #ffa564; stroke-width: 2; }
.cal .dot { fill: #ffa564; }
.cal .t-ideal { fill: #fff; }
.cal .t-bias { fill: #ffa564; }
.cal label { display: flex; gap: 14px; align-items: center; margin-top: 12px; font-weight: 700; font-size: 16px; }
.cal input { flex: 1; min-width: 0; height: 28px; accent-color: #ffa564; }
.cal figcaption { margin-top: 6px; font-size: 16px; line-height: 1.45; color: var(--on-band-2); }
.cal output { display: block; color: #fff; font-variant-numeric: tabular-nums; }

/* Sections */
section { padding: 0 0 64px; }
section > h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 18px; }
.ideal .lead { margin-bottom: 30px; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.pillars b { display: block; font: 700 22px/1.2 var(--display); margin-bottom: 8px; }
.pillars span { color: var(--muted); }
.more { margin: 22px 0 0; font-weight: 700; }

/* Toolkit rows */
.grid { display: grid; border-bottom: 2px solid var(--ink); }
.card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 4px 32px; align-items: baseline; padding: 22px 0; border-top: 2px solid var(--ink); color: inherit; text-decoration: none; }
.card h2, .card h3 { font-size: 27px; margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .go { grid-column: 2; font-weight: 700; color: var(--link); }
.card:hover h2, .card:hover h3 { color: var(--link); }
.card:hover .go { text-decoration: underline; }
.card.odd { background: #11133a; color: #f3f4ff; padding: 32px; border: 0; }
.card.odd p { color: #b3b8e0; }
.card.odd .go, .card.odd:hover h3 { color: #ffa564; }

/* Posts */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { border-top: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 20px; }
.posts time { color: var(--muted); font-variant-numeric: tabular-nums; }
.posts a { color: inherit; text-decoration: none; font-weight: 700; }
.posts a:hover { color: var(--link); text-decoration: underline; }
.note { background: var(--tint); padding: 14px 18px; margin: 0 0 18px; }

/* Tools page */
.cat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); grid-template-rows: auto 1fr; gap: 8px 48px; padding: 28px 0 44px; border-top: 2px solid var(--ink); scroll-margin-top: 16px; }
.hero + .cat { border-top: 0; padding-top: 0; }
.cat h2 { font-size: 32px; margin: 0; grid-column: 1; }
.cat > p { grid-column: 1; color: var(--muted); margin: 0; }
.items { grid-column: 2; grid-row: 1 / span 2; list-style: none; padding: 0; margin: 0; display: grid; align-content: start; gap: 24px; }
.items li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.items b { font: 700 21px/1.25 var(--display); }
.items a { font-weight: 700; }
.soon { font-size: 16px; color: var(--bias-text); }
.soon::before { content: ""; display: inline-block; width: .6em; height: .6em; border: 2px solid currentColor; border-radius: 50%; margin-right: .5em; }

/* Long-form text */
.prose { padding-top: 40px; }
.prose h1 { font-size: clamp(38px, 6vw, 62px); color: var(--link); margin: 0 0 14px; }
.prose h2 { font-size: 30px; margin: 56px 0 14px; scroll-margin-top: 16px; }
.prose h2 .n { color: var(--bias-text); margin-right: 12px; }
.prose p, .prose li { font-size: 19px; line-height: 1.65; }
.prose p { margin: 0 0 18px; }
.prose ul { padding-left: 1.2em; margin: 0 0 20px; }
.prose li { margin-bottom: 12px; }
.prose li::marker { color: var(--bias-text); }
.prose blockquote { margin: 0 0 20px; padding-left: 32px; font: 600 24px/1.35 var(--display); }
.prose .byline { font-size: 20px; color: var(--muted); margin-bottom: 40px; }
.prose ol.steps { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: s; border-bottom: 2px solid var(--ink); }
.prose ol.steps li { counter-increment: s; position: relative; padding: 16px 0 16px 56px; border-top: 2px solid var(--ink); margin: 0; }
.prose ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 9px; font: 800 32px/1.3 var(--display); color: var(--link); }
.prose ol.steps small { display: block; font-size: 17px; color: var(--muted); margin-top: 4px; }
.layers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 8px 0 28px; }
.layer { background: var(--tint); padding: 16px 18px; }
.layer b { display: block; font: 700 20px/1.2 var(--display); margin-bottom: 4px; }
.layer span { display: block; font-size: 17px; line-height: 1.45; color: var(--muted); }
.prose .refs { font-size: 16px; color: var(--muted); margin-top: 32px; }
.glyph { font: 700 28px/1.5 var(--display); color: var(--bias-text); margin: 28px 0; letter-spacing: .2em; }
.glyph.big { font-size: clamp(110px, 24vw, 200px); line-height: 1; letter-spacing: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 16px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: inherit; }

@media (max-width: 820px) {
  .hero.split, .pillars, .cat { grid-template-columns: minmax(0, 1fr); }
  .hero.split { gap: 36px; }
  .pillars { gap: 24px; }
  .items { grid-column: 1; grid-row: auto; margin-top: 18px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 24px 0 40px; margin-bottom: 44px; }
  .card, .posts li, .layers { grid-template-columns: minmax(0, 1fr); }
  .card .go { grid-column: 1; }
  .card.odd { padding: 24px; }
}
