/* diakarpos shell styles (05 sections 5 and 12). Tokens on :root, redefined for dark under the system preference
   (unless the reader chose light) and under [data-theme="dark"]. Faces: Archivo, Newsreader and IBM Plex Mono when
   assets/fonts/fonts.css is present; system faces otherwise. */
:root {
  --bg: #F4F3EE; --surface: #FBFAF6; --ink: #1E1F1A; --ink-2: #4A4B44; --ink-3: #66675F; --rule: #D7D6CE;
  --accent: #5A6E0E; --caution-ink: #7A4F00; --warning: #fab219; --critical: #B42D2D;
  --seq-0: #cde2fb; --seq-1: #86b6ef; --seq-2: #3987e5; --seq-3: #256abf; --seq-4: #184f95; --seq-5: #0d366b;
  --gate-open: #1baf7a; --gate-cond: #2a78d6; --gate-closed: #eb6834;
  --f-ui: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-prose: "Newsreader", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: 32px; --maxw: 1440px; --drawer-w: 440px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111410; --surface: #181B16; --ink: #E6E5DE; --ink-2: #C3C2B7; --ink-3: #9A9B92; --rule: #2C3029;
    --accent: #A9C23F; --caution-ink: #E8A93A; --critical: #E66767;
    --seq-0: #0d366b; --seq-1: #184f95; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #86b6ef; --seq-5: #cde2fb;
    --gate-open: #199e70; --gate-cond: #3987e5; --gate-closed: #d95926;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111410; --surface: #181B16; --ink: #E6E5DE; --ink-2: #C3C2B7; --ink-3: #9A9B92; --rule: #2C3029;
  --accent: #A9C23F; --caution-ink: #E8A93A; --critical: #E66767;
  --seq-0: #0d366b; --seq-1: #184f95; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #86b6ef; --seq-5: #cde2fb;
  --gate-open: #199e70; --gate-cond: #3987e5; --gate-closed: #d95926;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-ui);
  overflow-wrap: anywhere; min-width: 0;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:not([href]) { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: 32px; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .6em; }
code, kbd, .dk-hash { font-family: var(--f-mono); font-size: 13px; }
img, svg { max-width: 100%; }
.dk-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dk-skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.dk-skip:focus { left: 8px; }
.dk-g, .dk-icon { width: 12px; height: 12px; flex: none; vertical-align: -1px; }
.dk-icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- header */
.dk-header { background: var(--surface); border-bottom: 2px solid var(--ink); position: relative; z-index: 20; }
.dk-header__bar { max-width: var(--maxw); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dk-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.dk-brand__g { width: 20px; height: 20px; color: var(--accent); }
.dk-wordmark { font-size: 18px; font-weight: 300; letter-spacing: 0.01em; }
.dk-wordmark b { font-weight: 800; }
.dk-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.dk-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px 0; }
.dk-nav a:hover, .dk-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.dk-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.dk-iconbtn { background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: 4px; min-width: 32px; min-height: 32px; display: inline-grid; place-items: center; cursor: pointer; }
.dk-menu-btn { display: none; }
.dk-search { position: relative; display: flex; align-items: center; }
.dk-search input { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 5px 28px 5px 8px; width: 220px; max-width: 100%; }
.dk-kbd { position: absolute; right: 6px; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; font-size: 11px; }
.dk-search__results { position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; width: min(360px, 90vw); max-height: 60vh; overflow: auto; padding: 6px; z-index: 40; }
.dk-search__results a { display: block; padding: 4px 6px; color: var(--ink); text-decoration: none; border-radius: 3px; }
.dk-search__results a:hover, .dk-search__results a:focus { background: var(--bg); }
.dk-search__group { font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 6px 6px 2px; text-transform: uppercase; letter-spacing: .04em; }
.dk-profile { font-size: 14px; color: var(--ink-2); }
.dk-profile select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 4px; }

/* ---------------------------------------------------------------- mode banner (05 section 3.3) */
.dk-mode--strip { background: color-mix(in srgb, var(--warning) 8%, var(--bg)); color: var(--ink-2); border-bottom: 1px solid var(--rule); padding: 0 var(--gutter); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dk-mode--strip a { color: var(--ink-2); }
.dk-mode__warn { font-weight: 600; color: var(--caution-ink); }
.dk-mode__sources { position: relative; }
.dk-mode__sources summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.dk-mode__sources p { max-width: 65ch; padding: 8px 0; }
.dk-nav__browse { position: relative; }
.dk-nav__browse summary { cursor: pointer; font-size: 14px; min-height: 44px; align-content: center; color: var(--ink-2); }
.dk-nav__browse details>ul { position: absolute; z-index: 25; min-width: 180px; display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--rule); padding: 8px 16px; box-shadow: 0 6px 16px #0002; }
.dk-mode-chip { border: 1px solid var(--ink-3); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------------------------------------------------------------- page frame */
main { display: block; max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 48px; outline: none; }
.dk-crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-3); }
.dk-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-3); }
.dk-lede { font-size: 20px; line-height: 1.4; max-width: 66ch; color: var(--ink); margin: 8px 0 12px; }
.dk-cov-chip { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); border-radius: 4px; padding: 3px 10px; font-size: 13px; text-decoration: none; margin: 0 0 16px; }
.dk-cov-chip__k { font-weight: 700; color: var(--ink); }
.dk-changed { font-size: 14px; border-left: 3px solid var(--caution-ink); padding-left: 10px; }
.dk-section { margin: 28px 0; }
.dk-section__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 10px; padding-bottom: 4px; }
.dk-section__head h2, .dk-section__head h3 { margin: 0; }
.dk-box { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; margin: 10px 0; }
.dk-box h3 { font-size: 14px; margin-top: 4px; }
.dk-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.dk-dl > div { display: contents; }
.dk-dl dt { color: var(--ink-3); font-size: 14px; }
.dk-dl dd { margin: 0; min-width: 0; }
.dk-pagelist { columns: 2 280px; font-size: 14px; }
.dk-notice { font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--rule); padding-left: 8px; }
.dk-notice--error { border-left-color: var(--critical); }
.dk-verbatim { font-family: var(--f-prose); font-size: 17px; border-left: 3px solid var(--rule); margin: 10px 0; padding: 4px 12px; max-width: 66ch; }
.dk-verbatim footer { font-family: var(--f-ui); font-size: 13px; margin-top: 4px; }
.dk-prose { font-family: var(--f-prose); font-size: 17px; max-width: 66ch; }

/* ---------------------------------------------------------------- numbers (05 section 7.1) */
.dk-num, .dk-evlink {
  font: inherit; color: inherit; background: none; border: 0; padding: 0 1px; margin: 0; cursor: pointer;
  text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; text-decoration-thickness: 1px;
  font-variant-numeric: tabular-nums; border-radius: 2px; text-align: inherit;
}
.dk-num:hover, .dk-evlink:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.dk-numwrap { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.dk-num data { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- badges (05 section 7.4) */
.dk-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; vertical-align: middle; }
.dk-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 4px;
  font: 600 11px/1 var(--f-ui); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink-3); color: var(--ink-2); background: transparent; cursor: pointer;
}
.dk-badge .dk-g { width: 10px; height: 10px; }
.dk-badge--human_accepted { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dk-badge--accepted_by_run { color: var(--ink); }
.dk-badge--demonstrated { border-color: var(--accent); color: var(--accent); }
.dk-badge--model_output { border-style: dashed; font-style: italic; }
.dk-badge--provisional, .dk-badge--source_projection, .dk-badge--projected_unshown, .dk-badge--hypothetical { border-style: dashed; }
.dk-badge--classifier_match, .dk-badge--not_found { border-style: dotted; }
.dk-badge--licence_unconfirmed { background: var(--warning); border-color: var(--warning); color: #1E1F1A; }
.dk-badge--local_only { border-color: var(--warning); }
.dk-badge--stale, .dk-badge--inputs_revised, .dk-badge--disputed { border-color: var(--caution-ink); color: var(--caution-ink); }
.dk-badge--stress_replay { border-style: dashed; border-color: var(--caution-ink); color: var(--caution-ink); }
.dk-badge--experimental { border-style: dotted; border-color: var(--caution-ink); color: var(--caution-ink); }
.dk-badge--controlled { border-color: var(--ink); color: var(--ink); }
.dk-badge--superseded span { text-decoration: line-through; }
.dk-badge--p10_below_zero { border-color: var(--critical); color: var(--critical); }
.dk-badge--unreviewed { border-color: transparent; color: var(--ink-3); }
.dk-badge--more { font-family: var(--f-ui); }

/* ---------------------------------------------------------------- states (05 section 7.5): never 0, blank or a dash */
.dk-state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px; min-height: 20px; background: transparent; font-family: var(--f-ui); }
button.dk-state { cursor: pointer; }
.dk-state--searched_not_found { border-style: dotted; }
.dk-state--withheld_licence { border-style: double; border-width: 3px; }
.dk-state--not_applicable { border-color: transparent; }

/* ---------------------------------------------------------------- tables, cards below 480 px */
.dk-table-wrap { max-width: 100%; }
.dk-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.dk-table caption { text-align: left; color: var(--ink-3); font-size: 13px; padding-bottom: 4px; }
.dk-table th, .dk-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; min-height: 32px; }
.dk-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); border-bottom: 1px solid var(--ink-3); }
/* the source, snapshot, method and conclusion pages: a header word stays whole, so a narrow count column widens to it */
html[data-page^="sources/"] .dk-table thead th, html[data-page^="snapshots/"] .dk-table thead th,
html[data-page^="methods/"] .dk-table thead th, html[data-page^="conclusions/"] .dk-table thead th { overflow-wrap: normal; }
.dk-table[data-sortable] thead th { cursor: pointer; }
.dk-table th[aria-sort="ascending"]::after { content: " \2191"; }
.dk-table th[aria-sort="descending"]::after { content: " \2193"; }
.dk-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-legend td:first-child { white-space: nowrap; }

/* ---------------------------------------------------------------- charts and map legend */
.dk-figure { margin: 12px 0; max-width: 720px; }
.dk-figure figcaption { font-size: 13px; color: var(--ink-3); }
.dk-chart { display: block; overflow: visible; font: 12px var(--f-ui); max-width: 100%; height: auto; }
.dk-chart--spark { display: inline-block; vertical-align: middle; }
.dk-chart text { fill: var(--ink-2); }
.dk-chart__state { font-style: italic; fill: var(--ink-3); }
.dk-chart__value { fill: var(--ink); font-variant-numeric: tabular-nums; }
.dk-bar { fill: var(--seq-3); }
.dk-bar--model { fill: none; stroke: var(--seq-3); stroke-dasharray: 3 2; }
.dk-range { stroke: var(--seq-2); stroke-width: 6; stroke-linecap: round; opacity: .55; }
.dk-range--model { stroke-dasharray: 4 3; }
.dk-whisker { stroke: var(--ink-2); stroke-width: 2; }
.dk-whisker--neg { stroke: var(--critical); }
.dk-dot { fill: var(--ink); }
.dk-zero, .dk-timeline { stroke: var(--rule); stroke-width: 1; }
.dk-spark { fill: none; stroke: var(--seq-3); stroke-width: 1.5; }
.dk-spark--model { stroke-dasharray: 3 2; }
.dk-panel { fill: none; stroke: var(--rule); }
.dk-fan { fill: var(--seq-1); opacity: .45; }
.dk-fan__mid { fill: none; stroke: var(--seq-4); stroke-width: 1.5; stroke-dasharray: 4 3; }
.dk-tl { fill: var(--ink); }
.dk-tl--future, .dk-tl--proposed { fill: var(--surface); stroke: var(--ink); stroke-dasharray: 2 2; }
.dk-mark { cursor: pointer; }
.dk-mark:focus { outline: none; }
.dk-mark:focus-visible > * { stroke: var(--accent); stroke-width: 2; }
.dk-chart__table summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.dk-map-legend { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.dk-map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dk-swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--rule); color: var(--ink-3); }
.dk-seq-0 { background: var(--seq-0); fill: var(--seq-0); }
.dk-seq-1 { background: var(--seq-1); fill: var(--seq-1); }
.dk-seq-2 { background: var(--seq-2); fill: var(--seq-2); }
.dk-seq-3 { background: var(--seq-3); fill: var(--seq-3); }
.dk-seq-4 { background: var(--seq-4); fill: var(--seq-4); }
.dk-seq-5 { background: var(--seq-5); fill: var(--seq-5); }
.dk-pivot { font-size: 14px; border-left: 3px solid var(--rule); padding-left: 10px; }
.dk-pivot__joint { font-weight: 700; color: var(--caution-ink); }

/* ---------------------------------------------------------------- drawer (05 section 7.3) */
.dk-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 60; }
.dk-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 100vw); background: var(--surface);
  border-left: 1px solid var(--rule); z-index: 70; display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, .12); animation: dk-in .16s ease-out;
}
.dk-drawer[hidden], .dk-scrim[hidden], .dk-keys[hidden] { display: none; }
.dk-drawer__handle { display: none; }
.dk-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.dk-drawer__head h2 { margin: 0; font-size: 16px; text-transform: uppercase; letter-spacing: .05em; }
.dk-drawer__body { overflow: auto; padding: 12px 16px 24px; font-size: 14px; }
.dk-drawer__value { margin-bottom: 6px; }
.dk-drawer__num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dk-drow { border-top: 1px solid var(--rule); padding: 8px 0; }
.dk-drow h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 4px; }
.dk-drow__none { color: var(--ink-2); font-style: italic; }
.dk-id code { font-size: 12px; color: var(--ink-3); }
.dk-keys { position: fixed; right: 16px; bottom: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; z-index: 80; font-size: 14px; }
@keyframes dk-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- footer */
.dk-footer { border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 13px; }
.dk-footer p { max-width: var(--maxw); margin: 0 auto; padding: 4px var(--gutter); }
.dk-footer p:first-child { padding-top: 14px; }
.dk-footer p:last-child { padding-bottom: 20px; }
.dk-footer a { color: var(--ink-2); }
.dk-footer__details { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 12px; }
.dk-footer__details summary { cursor: pointer; min-height: 44px; align-content: center; }
.dk-footer__details p { padding: 6px 0; }
.dk-drow--disclosure>summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 600; }
.dk-drow__summary { display: block; color: var(--ink-3); font-size: 13px; font-weight: 400; padding: 3px 0; }
.dk-drawer__context { font-size: 14px; color: var(--ink-2); }

/* Coordinator derivative: 44px touch targets; CSS only, no hidden warning content. */
@media (max-width: 859px), (pointer: coarse) {
.dk-brand, .dk-nav a, .dk-mode-chip, .dk-mode--strip a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
.dk-iconbtn { min-width: 44px; min-height: 44px; }
.dk-search input, .dk-profile select { min-height: 44px; }
}

/* ---------------------------------------------------------------- breakpoints (05 section 6.2) */
@media (max-width: 1199px) { :root { --gutter: 24px; } }
@media (max-width: 859px) {
  :root { --gutter: 16px; }
  h1 { font-size: 24px; }
  .dk-lede { font-size: 18px; }
  .dk-menu-btn { display: inline-grid; }
  .dk-nav { order: 10; flex-basis: 100%; display: none; }
  .dk-nav.dk-nav--open { display: block; }
  .dk-nav ul { flex-direction: column; gap: 4px; }
  .dk-search input { width: 150px; }
  main { padding-top: 16px; }
  .dk-header__bar { padding-top: 8px; padding-bottom: 8px; gap: 8px 12px; }
  .dk-iconbtn { min-width: 44px; min-height: 44px; }
  .dk-nav a { display: inline-block; padding: 8px 0; }
  .dk-mode--strip { display: flex; line-height: 1.4; gap: 0 12px; }
  .dk-nav__browse details>ul { position: static; box-shadow: none; border: 0; }
  .dk-drawer { top: auto; left: 0; width: 100vw; height: 92vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: 12px 12px 0 0; animation-name: dk-up; }
  .dk-drawer__handle { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: 8px auto 0; }
  @keyframes dk-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media (max-width: 479px) {
  .dk-tools { margin-left: auto; flex: 1 1 200px; justify-content: flex-end; }
  .dk-mode-chip { white-space: normal; }
  .dk-search { flex: 1 1 96px; min-width: 0; }
  .dk-search input { width: 100%; min-width: 0; }
  .dk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dk-table, .dk-table tbody, .dk-table tr, .dk-table td, .dk-table caption { display: block; width: 100%; }
  .dk-table tr { border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; background: var(--surface); }
  .dk-table td { border: 0; padding: 3px 0; white-space: normal; }
  .dk-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
  .dk-table td[data-phone="hide"] { display: none; }
  .dk-dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-drawer { animation: none; }
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media (forced-colors: active) {
  .dk-badge, .dk-state, .dk-cov-chip { border-color: CanvasText; }
  .dk-bar { fill: CanvasText; }
  .dk-swatch { forced-color-adjust: none; }
}
