/*
Theme Name: On the Evidence
Theme URI: https://ontheevidence.example/
Author: Intelligency Group
Description: Official England and Wales criminal justice statistics, explained in plain English. Interactive front page plus a search-friendly page for every police force and court region, all built from one data file.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ote
*/

/* Layout: a single readable column that follows a case through the system, stage by stage, with a sticky stage bar. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #12151c;
  --ink-2: #4b5260;
  --ink-3: #6b7280;
  --line: #dde1e8;
  --grid: #e9ecf1;
  --accent: #1c5cab;
  --accent-soft: #e6eefa;
  --s1: #2a78d6;
  --s1-light: #86b6ef;
  --s2: #eb6834;
  --n1: #5d6370;
  --n2: #9aa0ab;
  --n3: #c4c8d0;
  --n4: #e0e3e8;
  --critical: #d03b3b;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101217; --surface: #181b22; --ink: #eef0f4; --ink-2: #b4bac6; --ink-3: #8e95a2;
    --line: #2b303a; --grid: #232731; --accent: #6da7ec; --accent-soft: #1b2a40;
    --s1: #3987e5; --s1-light: #1c5cab; --s2: #d95926;
    --n1: #a3a9b4; --n2: #6e7480; --n3: #4a4f59; --n4: #343842; --critical: #e66767;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101217; --surface: #181b22; --ink: #eef0f4; --ink-2: #b4bac6; --ink-3: #8e95a2;
  --line: #2b303a; --grid: #232731; --accent: #6da7ec; --accent-soft: #1b2a40;
  --s1: #3987e5; --s1-light: #1c5cab; --s2: #d95926;
  --n1: #a3a9b4; --n2: #6e7480; --n3: #4a4f59; --n4: #343842; --critical: #e66767;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
.wrap { max-width: 980px; margin: 0 auto; padding-inline: 20px; }
.prose { max-width: 66ch; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; font-family: var(--font-body); }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }

/* Prototype banner */
.proto { background: var(--accent-soft); color: var(--ink); font-size: 0.85rem; }
.proto .wrap { padding-block: 8px; }

/* Header */
header.top { padding-block: 48px 32px; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.hero { display: grid; gap: 18px; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.updated { font-size: 0.9rem; color: var(--ink-3); }

/* Stage nav */
nav.stages { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
nav.stages ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.stages ol::-webkit-scrollbar { display: none; }
nav.stages a { display: flex; align-items: center; gap: 8px; padding: 12px 10px; white-space: nowrap; font-size: 0.92rem; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; }
nav.stages a .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--n2); font-size: 0.75rem; font-weight: 700; }
nav.stages a.on { color: var(--ink); border-bottom-color: var(--accent); }
nav.stages a.on .n { background: var(--accent); border-color: var(--accent); color: var(--surface); }

/* Key numbers */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.key { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.key .v { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.05; }
.key .d { font-size: 0.93rem; color: var(--ink-2); line-height: 1.4; }
.key .w { font-size: 0.78rem; color: var(--ink-3); }

/* How to read */
.howto { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px 18px; border-radius: 10px; border: 1px dashed var(--n2); }
.howto svg { width: 26px; height: 26px; color: var(--accent); }
.howto p { font-size: 0.95rem; color: var(--ink-2); }

/* Sections */
section.stage { padding-block: 64px 24px; border-top: 1px solid var(--line); }
.stage-head { display: grid; gap: 10px; margin-bottom: 22px; }
.stage-tag { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.stage-tag .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--surface); font-size: 0.8rem; letter-spacing: 0; }
.stage-head p { color: var(--ink-2); }

.figure { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.figure + .figure { margin-top: 16px; }
.fig-title { font-weight: 700; font-size: 1.02rem; }
.fig-sub { font-size: 0.9rem; color: var(--ink-3); margin-top: 2px; }
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-body); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.source { font-size: 0.82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tier { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.tier::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--s1); }
details.table { font-size: 0.9rem; }
details.table summary { cursor: pointer; color: var(--accent); font-weight: 700; }
details.table .scroll { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--ink-3); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td.r, th.r { text-align: right; }

.meaning { margin-top: 18px; display: grid; gap: 10px; padding: 18px 20px; border-radius: 12px; background: var(--accent-soft); }
.meaning h3 { display: flex; align-items: center; gap: 8px; }
.meaning p { color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.fact { border-left: 3px solid var(--n3); padding: 2px 0 2px 14px; display: grid; gap: 2px; }
.fact .v { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.fact .d { font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; }

.caveat { font-size: 0.9rem; color: var(--ink-2); display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 14px; }
.caveat b { color: var(--ink); }

/* Glossary terms in text */
button.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; border-bottom: 2px dotted var(--accent); line-height: 1.2; text-align: inherit; }
button.term:hover { background: var(--accent-soft); }
#pop { position: absolute; z-index: 50; max-width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.18); padding: 14px 16px; font-size: 0.93rem; line-height: 1.5; }
#pop strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
#pop a { font-size: 0.85rem; display: inline-block; margin-top: 8px; }

/* Waffle */
.waffle-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; max-width: 620px; }
.waffle-grid div { aspect-ratio: 1; border-radius: 3px; }
.waffle-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 22px; }
.wk { display: grid; grid-template-columns: 16px 3.2ch 1fr; gap: 10px; align-items: baseline; font-size: 0.93rem; }
.wk i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; transform: translateY(2px); }
.wk b { font-family: var(--font-display); font-size: 1.15rem; text-align: right; }
.wk span { color: var(--ink-2); line-height: 1.4; }

/* Tooltip */
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 0.82rem; line-height: 1.4; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); z-index: 5; }
.tip b { font-weight: 700; }
.tip .row { display: flex; align-items: center; gap: 6px; }
.tip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Glossary list */
.gloss-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.gloss-tools label { font-weight: 700; font-size: 0.9rem; }
.gloss-tools input { font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--n2); background: var(--surface); color: var(--ink); width: min(360px, 100%); }
dl.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 28px; margin: 0; }
dl.gloss > div { padding-block: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
dl.gloss dt { font-weight: 700; }
dl.gloss dd { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }
dl.gloss > div:target { background: var(--accent-soft); }
.empty { color: var(--ink-3); font-size: 0.95rem; }

/* Sources */
ul.src { padding-left: 1.1em; display: grid; gap: 8px; margin: 12px 0 0; }
footer { padding-block: 40px 60px; color: var(--ink-3); font-size: 0.88rem; border-top: 1px solid var(--line); margin-top: 48px; }
footer .wrap { display: grid; gap: 8px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .figure { padding: 14px; }
  .waffle-grid { gap: 2px; }
  section.stage { padding-block: 48px 16px; }
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand svg { width: 30px; height: 30px; color: var(--accent); }

/* Period control */
.period { margin-top: 22px; display: grid; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.period-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.period-row strong { font-size: 1rem; margin-right: 4px; }
.period label { font-size: 0.9rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.period p { font-size: 0.86rem; color: var(--ink-3); }
select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--n2); background: var(--surface); color: var(--ink); max-width: 100%; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 0.85rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--n2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
nav.stages .wrap { display: flex; align-items: center; gap: 8px; }
nav.stages ol { flex: 1; min-width: 0; }
.pill { flex: none; font-size: 0.8rem; font-weight: 700; color: var(--accent); text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.fixed { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 700; color: var(--ink-3); border: 1px dashed var(--n2); border-radius: 999px; padding: 1px 9px; margin-top: 6px; }

/* Toggles */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.fig-head { display: grid; gap: 10px; }

/* Your area */
.area-pick { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.area-pick label { font-weight: 700; }
.area-pick select { font-size: 1.05rem; min-width: min(320px, 100%); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid2 .figure + .figure { margin-top: 0; }
.scroll { overflow-x: auto; max-width: 100%; }
.cmp { width: 100%; }
.cmp td.m { min-width: 9.5em; }
.cmp td, .cmp th { white-space: normal; vertical-align: top; }
.cmp td.m { font-weight: 700; }
.cmp td.m small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.8rem; }
.chg { font-weight: 700; white-space: nowrap; }
.flag { font-size: 0.86rem; color: var(--ink-2); }

/* Correlation */
.result { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 14px 16px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.result .r { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.result .s { font-weight: 700; }
.result .e { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.95rem; }
.meter { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--n3), var(--n4) 50%, var(--n3)); margin-top: 6px; }
.meter i { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--ink); transform: translateX(-2px); }
.meter-l { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-3); margin-top: 4px; }

@media (max-width: 760px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .cmp { font-size: 0.86rem; } .cmp td, .cmp th { padding: 6px 5px; } .cmp td.m { min-width: 7em; } .cmp td.m small { display: none; } .pill { display: none; } .result .r { font-size: 1.6rem; } }
:root { --s3: #1a9a7c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s3: #2fb593; } }
:root[data-theme="dark"] { --s3: #2fb593; }

/* What's changed */
.changes-wrap { margin-top: 10px; display: grid; gap: 12px; }
.changes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.ch-h { font-size: 1.25rem; }
.changes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.chg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.chg-card .t { font-size: 0.86rem; color: var(--ink-2); font-weight: 700; }
.chg-card .v { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.chg-card .d { font-size: 0.86rem; color: var(--ink-2); }
.chg-card .d b { color: var(--ink); }
.chg-card .w { font-size: 0.76rem; color: var(--ink-3); }
.arrow { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; margin-right: 4px; vertical-align: 1px; }
.arrow.up { border-bottom: 7px solid var(--ink-2); }
.arrow.down { border-top: 7px solid var(--ink-2); }

/* Force summary */
.summary { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; display: grid; gap: 8px; }
.area-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.copied { font-size: 0.85rem; color: var(--ink-2); }

/* Share */
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.share .chip { font-size: 0.8rem; padding: 3px 10px; }
dialog#share-dlg { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); width: min(680px, calc(100vw - 32px)); padding: 16px 18px; }
dialog#share-dlg::backdrop { background: rgb(0 0 0 / 0.45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dlg-x { font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 2px 8px; }
#share-body { display: grid; gap: 10px; font-size: 0.93rem; color: var(--ink-2); }
#share-body img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
#share-body textarea { width: 100%; min-height: 96px; font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border-radius: 8px; border: 1px solid var(--n2); background: var(--bg); color: var(--ink); resize: vertical; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { font: inherit; font-size: 0.9rem; font-weight: 700; padding: 7px 14px; border-radius: 8px; border: 0; background: var(--accent); color: var(--surface); cursor: pointer; text-decoration: none; }

/* Dual-handle year slider */
.p-read { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.dual { position: relative; height: 34px; margin: 2px 11px 0; touch-action: none; cursor: pointer; }
.dual-track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 2px; background: var(--n3); }
.dual-track i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; }
.dual input[type=range] { position: absolute; left: -11px; width: calc(100% + 22px); top: 0; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type=range]::-webkit-slider-runnable-track { background: none; height: 34px; }
.dual input[type=range]::-moz-range-track { background: none; }
.dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); cursor: grab; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); cursor: grab; }
.dual input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
.dual input[type=range]:focus-visible::-moz-range-thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
.dual-ticks { position: relative; height: 18px; margin: 0 11px; font-size: 0.76rem; color: var(--ink-3); }
.dual-ticks span { position: absolute; transform: translateX(-50%); }
@media (max-width: 560px) { .dual-ticks span:nth-child(even) { display: none; } }

/* Consistent spacing and full-width boxes */
:root { --gap: 20px; }
@media (max-width: 560px) { :root { --gap: 14px; } }
section.stage > .wrap { display: grid; gap: var(--gap); }
section.stage > .wrap > * { margin: 0 !important; }
.stage-head { margin: 0; }
.figure { gap: 14px; }
.grid2, .changes, .facts { gap: var(--gap); }
.changes-wrap { gap: var(--gap); }
.summary.prose, .meaning.prose, .caveat.prose { max-width: none; }
.meaning { display: block; columns: 2 340px; column-gap: 32px; padding: 20px 22px; }
.meaning h3 { column-span: all; margin-bottom: 10px; }
.meaning p { margin: 0 0 10px; }
.meaning p:last-child { margin-bottom: 0; }
.facts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fact { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 16px; align-content: start; }
.figure .fact { background: var(--bg); }
.caveat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.area-pick, .area-actions { margin: 0; }

.grid2 { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
@media (max-width: 860px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* Main menu */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand-link { text-decoration: none; color: inherit; display: flex; align-items: center; }
.site-head .brand { white-space: nowrap; }
.site-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.site-menu a { display: block; padding: 8px 8px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.site-menu a:hover, .site-menu a:focus-visible { background: var(--accent-soft); color: var(--ink); }
.menu-btn { display: none; font: inherit; font-weight: 700; font-size: 0.92rem; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -5px; } .menu-btn span::after { top: 5px; }
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; }
  .site-menu { display: none; flex-basis: 100%; padding-bottom: 12px; }
  .site-menu.open { display: block; }
  .site-menu ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .site-menu a { background: var(--bg); padding: 10px 12px; }
  .site-menu li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.dual, .dual-ticks { user-select: none; -webkit-user-select: none; }
.dual input[type=range]:focus, .dual input[type=range]:focus-visible { outline: none; box-shadow: none; }

.support { display: grid; grid-template-columns: auto 1fr; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--s3); border-radius: 12px; padding: 14px 18px; font-size: 0.93rem; color: var(--ink-2); }
.support.prose { max-width: none; }
.support b { color: var(--ink); }
/* Self-hosted fonts (SIL Open Font Licence, see assets/fonts) */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("assets/fonts/literata-latin-opsz-normal.woff2") format("woff2-variations"), url("assets/fonts/literata-latin-opsz-normal.woff2") format("woff2"); }


/* ---------- WordPress theme: force, region and archive pages ---------- */
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.ote-page { padding-block: 28px 64px; }
.ote-page > .wrap { display: grid; gap: var(--gap); }
.crumbs { font-size: 0.88rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.ote-head { display: grid; gap: 10px; }
.ote-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.ote-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 12px; min-width: 0; }
.ote-card h2 { font-size: 1.2rem; }
.ote-card table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.ote-card th, .ote-card td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ote-card thead th { font-size: 0.82rem; color: var(--ink-2); font-weight: 700; }
.ote-card td.r, .ote-card th.r { text-align: right; }
.ote-card tr.ew th, .ote-card tr.ew td { background: var(--accent-soft); font-weight: 700; }
.fact .t { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.ote-cta { margin: 0; }
.ote-cta .btn { display: inline-block; padding: 11px 18px; }
.ote-faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.ote-faq summary { font-weight: 700; cursor: pointer; }
.ote-faq details p { margin-top: 8px; color: var(--ink-2); }
.ote-sources ul { padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 0.93rem; }
.ote-sources p { font-size: 0.9rem; color: var(--ink-2); }
.ote-forcelist ul { list-style: none; padding: 0; margin: 0; columns: 4 180px; column-gap: 20px; }
.ote-forcelist li { padding: 4px 0; break-inside: avoid; font-size: 0.93rem; }
.prose-wide > * + * { margin-top: 12px; }
.site-menu .current-menu-item > a { color: var(--ink); background: var(--accent-soft); }
@media (max-width: 560px) { .ote-card { padding: 14px; } .ote-card th, .ote-card td { padding: 7px 6px; } }
.ote-card tbody th { text-transform: none; letter-spacing: 0; font-size: 0.93rem; color: var(--ink); font-weight: 700; }
.ote-card thead th { white-space: normal; }
.ote-page > .wrap > * { margin: 0; }

/* Pages, form and footer links */
.ote-page article.prose-wide { max-width: none; }
.ote-page article h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; }
.ote-page article h2 { font-size: 1.25rem; margin-top: 22px; }
.ote-page article ul { padding-left: 20px; display: grid; gap: 6px; }
.ote-page article .lede { font-size: 1.12rem; color: var(--ink-2); }
.ote-page article p, .ote-page article li { max-width: 72ch; }
.ote-small { font-size: 0.88rem; color: var(--ink-2); }
.foot-links ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; }
