/* Oligo Intelligence — design tokens and layout. Light theme first. */
:root {
  --paper: #F5F3ED;
  --paper-2: #EDEAE1;
  --ink: #1D2725;
  --green: #1E4D46;
  --green-2: #16403A;
  --muted: #57625B;
  --rule: #D8DDD6;
  --brass: #9A8552;          /* decorative only; never sole carrier of meaning */
  --hold: #7A4B2A;           /* warm brown for review notices (text on paper: 6.7:1) */
  --focus: #1E4D46;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1280px;
  --measure: 68ch;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;
  --fs-0: 0.875rem; --fs-1: 1rem; --fs-2: 1.125rem; --fs-3: 1.375rem; --fs-4: 1.75rem; --fs-5: 2.25rem; --fs-6: 3rem;
}
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-Variable.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-Italic-Variable.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 100%; line-height: 1.55; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: var(--s1) var(--s2); z-index: 100; }
.skip:focus { left: var(--s2); top: var(--s2); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s2); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s3); } }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 var(--s2); letter-spacing: -0.005em; color: var(--ink); }
h1 { font-size: var(--fs-5); } h2 { font-size: var(--fs-4); } h3 { font-size: var(--fs-3); } h4 { font-size: var(--fs-2); }
@media (min-width: 768px) { h1 { font-size: var(--fs-6); } }
p, ul, ol, dl, table { margin: 0 0 var(--s2); }
small, .small { font-size: var(--fs-0); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.9em; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--paper-2); padding: 0 0.25em; border-radius: 2px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s4) 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding-top: var(--s2); padding-bottom: var(--s2); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand .word { font-family: var(--serif); font-weight: 600; font-size: var(--fs-3); letter-spacing: 0.01em; }
.brand .desc { display: none; color: var(--muted); font-size: var(--fs-0); margin-left: var(--s1); }
@media (min-width: 1024px) { .brand .desc { display: inline; } }
.nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0; padding: 0; list-style: none; font-size: var(--fs-0); }
.nav a { text-decoration: none; color: var(--ink); padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--green); }
.nav-search { margin-left: auto; display: flex; gap: var(--s1); }
.nav-search input { font: inherit; font-size: var(--fs-0); padding: 6px 8px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; color: var(--ink); min-width: 12ch; }
.button, button.button { font: inherit; font-size: var(--fs-0); padding: 6px 12px; border: 1px solid var(--green); border-radius: 3px; background: var(--green); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.button.secondary { background: transparent; color: var(--green); }

/* Footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--rule); padding: var(--s4) 0; color: var(--muted); font-size: var(--fs-0); }
.site-footer .wrap { display: grid; gap: var(--s2); grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); }

/* Main grid */
main { padding: var(--s4) 0 var(--s6); }
.grid { display: grid; gap: var(--s3); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-12 { grid-column: span 12; }
@media (min-width: 1024px) { .col-8 { grid-column: span 8; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } }
@media (max-width: 1023px) { .col-8, .col-4, .col-6 { grid-column: span 12; } }
.breadcrumbs { font-size: var(--fs-0); color: var(--muted); margin-bottom: var(--s3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 6px; color: var(--rule); }

/* Epigraph */
.epigraph { border-left: 3px solid var(--brass); padding: var(--s1) var(--s2); margin: 0 0 var(--s4); max-width: var(--measure); }
.epigraph p { font-family: var(--serif); font-style: italic; font-size: var(--fs-2); margin: 0 0 var(--s1); }
.epigraph cite { font-style: normal; color: var(--muted); font-size: var(--fs-0); }
.hero { display: grid; gap: var(--s3); align-items: start; margin-bottom: var(--s4); }
@media (min-width: 1024px) { .hero { grid-template-columns: 7fr 5fr; } }
.lede { font-size: var(--fs-2); max-width: var(--measure); color: var(--ink); }

/* Editorial rows */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.row { display: grid; gap: 4px var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 768px) { .row { grid-template-columns: 11rem 1fr; } }
.row .when { color: var(--muted); font-size: var(--fs-0); font-variant-numeric: tabular-nums; }
.row .when time { display: block; color: var(--ink); }
.row h3 { font-size: var(--fs-2); margin: 0 0 4px; }
.row h3 a { text-decoration: none; color: var(--ink); }
.row h3 a:hover { text-decoration: underline; }
.row .sum { margin: 0 0 6px; max-width: var(--measure); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-0); color: var(--muted); margin: 0; padding: 0; list-style: none; }
.tag { border: 1px solid var(--rule); border-radius: 3px; padding: 0 6px; background: #fff; white-space: nowrap; }
.tag.role { border-color: var(--green); color: var(--green); }
.tag.adjacent { border-style: dashed; }
.tag.notice { border-color: var(--hold); color: var(--hold); font-weight: 600; }

/* Article */
.article { max-width: var(--measure); }
.article header h1 { font-size: var(--fs-4); }
@media (min-width: 768px) { .article header h1 { font-size: var(--fs-5); } }
.article .summary { font-size: var(--fs-2); font-family: var(--serif); }
.article .facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--s2); font-size: var(--fs-0); border: 1px solid var(--rule); padding: var(--s2); background: #fff; margin: var(--s3) 0; }
.article .facts dt { color: var(--muted); }
.article .facts dd { margin: 0; }
.article h2 { font-size: var(--fs-3); margin-top: var(--s4); }
.article p { font-size: 1.0625rem; }
.sources { list-style: none; padding: 0; }
.sources li { padding: var(--s1) 0; border-bottom: 1px solid var(--rule); font-size: var(--fs-0); }
.sources .loc { display: block; color: var(--muted); }
.notice { border: 1px solid var(--hold); color: var(--hold); background: #fff; padding: var(--s2); margin: 0 0 var(--s3); }
.notice::before { content: "Review notice — "; font-weight: 700; }
.corrections li { margin-bottom: var(--s1); }
.aside { border-top: 3px solid var(--green); padding-top: var(--s2); font-size: var(--fs-0); }
.aside h2 { font-size: var(--fs-2); }
.aside ul { padding-left: 1.1em; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 var(--s3) var(--s3); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--green); }
.timeline li.current::before { background: var(--green); }
.timeline .when { color: var(--muted); font-size: var(--fs-0); font-variant-numeric: tabular-nums; }
.timeline h4 { margin: 2px 0 4px; }
details.proc { border: 1px solid var(--rule); padding: var(--s2); margin-bottom: var(--s2); background: #fff; }
details.proc summary { cursor: pointer; font-weight: 600; font-family: var(--serif); font-size: var(--fs-2); }
details.proc summary:focus-visible { outline: 3px solid var(--focus); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-0); background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); }
td.num { font-variant-numeric: tabular-nums; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: end; padding: var(--s2); border: 1px solid var(--rule); background: #fff; margin-bottom: var(--s3); }
.filters label { display: flex; flex-direction: column; font-size: var(--fs-0); color: var(--muted); gap: 2px; min-width: 9rem; flex: 1 1 9rem; }
.filters select, .filters input { font: inherit; font-size: var(--fs-0); padding: 6px 8px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; color: var(--ink); max-width: 100%; }
.filters .actions { display: flex; gap: var(--s1); flex: 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 var(--s2); font-size: var(--fs-0); }
.chips a { border: 1px solid var(--rule); border-radius: 3px; padding: 2px 8px; text-decoration: none; background: #fff; }
.chips a[aria-current="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.search-status { font-size: var(--fs-0); color: var(--muted); margin: 0 0 var(--s2); min-height: 1.4em; }
.matched { background: #EFEAD8; }
.js-only { display: none; }
.js .js-only { display: initial; }
.js .no-js-only { display: none; }

/* Status blocks */
.status-grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.stat { border: 1px solid var(--rule); background: #fff; padding: var(--s2); }
.stat .n { font-family: var(--serif); font-size: var(--fs-4); display: block; }
.stat .l { color: var(--muted); font-size: var(--fs-0); }
.jur-strip { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 var(--s3); font-size: var(--fs-0); }
.jur-strip a { text-decoration: none; border: 1px solid var(--rule); border-radius: 3px; padding: 2px 8px; background: #fff; color: var(--ink); }
.jur-strip .st { color: var(--muted); margin-left: 4px; }
.empty { border: 1px dashed var(--rule); padding: var(--s3); color: var(--muted); background: #fff; }
.dl-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s2); font-size: var(--fs-0); }
.dl-grid dt { color: var(--muted); } .dl-grid dd { margin: 0; overflow-wrap: anywhere; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s4); }
[dir="rtl"] { text-align: right; }
.wordwrap { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  details.proc[open] summary ~ * { animation: fade 160ms ease-out; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
@media print { .site-header, .site-footer, .filters, .nav-search { display: none; } a { color: inherit; } }

/* Utilities (no inline styles: CSP style-src 'self') */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-compact { font-size: var(--fs-4); margin-bottom: var(--s1); }
@media (min-width: 768px) { .h-compact { font-size: var(--fs-4); } }
.mt-5 { margin-top: var(--s5); }
.article-wide { max-width: none; }
.measure { max-width: var(--measure); }
