/* Brand tokens from /brand/tokens.css (Liberal Democrats Design System). Square corners, no shadows. */
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url("/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url("/fonts/open-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 800; font-display: swap; src: url("/fonts/open-sans-latin-800-normal.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-page, #fff); color: var(--text-body, #000); font-family: "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.45; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }

.top { background: var(--ld-orange); color: #000; padding: 28px 0 24px; border-bottom: 6px solid #000; }
.kicker { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; margin: 0 0 8px; }
.top h1 { font-size: clamp(36px, 8vw, 60px); }
.lede { font-size: 18px; max-width: 640px; margin: 12px 0 0; }

section { padding: 28px 0 8px; }
h2 { font-size: 28px; margin-bottom: 8px; }
h3 { font-size: 17px; margin: 18px 0 4px; letter-spacing: -0.01em; }
.hint, .muted { color: #444; font-size: 14px; }

.items { list-style: none; padding: 0; margin: 16px 0 0; counter-reset: s; }
.item { border-top: 2px solid #000; padding: 14px 0 16px; counter-increment: s; }
.item.half { border-top-width: 6px; }
.half-label { display: block; font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; color: #444; margin-bottom: 6px; }
.item p { font-weight: 700; font-size: 17px; margin: 0 0 10px; }
.item p::before { content: counter(s) ". "; }
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; border: 0; padding: 0; margin: 0; }
.scale legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.scale label { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 6px 4px;
  border: 2px solid #000; font-size: 13px; line-height: 1.15; cursor: pointer; background: #fff; user-select: none; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale input:checked + span { font-weight: 800; }
.scale label:has(input:checked) { background: #000; color: #fff; }
.scale label:has(input:focus-visible) { outline: 3px solid var(--ld-orange); outline-offset: 2px; }
.scale label.dk { border-style: dashed; }
@media (max-width: 560px) { .scale { grid-template-columns: repeat(3, 1fr); } }

.btn { margin: 20px 0 8px; font: inherit; font-weight: 800; font-size: 18px; padding: 14px 22px; border: 0; background: #000; color: #fff; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--ld-orange-darker, #333); }
.btn:focus-visible { outline: 3px solid var(--ld-orange); outline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.err { color: var(--ld-error, #b00020); font-weight: 700; }

.you { font-size: 18px; border-left: 6px solid var(--ld-orange); padding: 6px 0 6px 12px; margin: 8px 0 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin: 8px 0 10px; }
.toggle { font-weight: 700; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: #000; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.legend i.x { border-radius: 0; background: none; width: 12px; height: 12px; position: relative; }
.legend i.x::before, .legend i.x::after { content: ""; position: absolute; left: 5px; top: -1px; width: 3px; height: 14px; background: #1a1a1a; transform: rotate(45deg); }
.legend i.x::after { transform: rotate(-45deg); }
.legend li.off { display: none; }
.chart { margin: 0; }
#chart svg { display: block; width: 100%; height: auto; max-width: 720px; }

.notes p { margin: 4px 0 10px; max-width: 700px; }
.foot { border-top: 6px solid var(--ld-orange); margin-top: 32px; padding: 16px 0 28px; font-size: 13px; font-weight: 700; }
#chart .t { font-size: 14px; fill: #444; }
#chart .a { font-size: 15px; font-weight: 700; fill: #000; }
#chart .you-l { font-size: 20px; font-weight: 800; fill: #000; paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.legend i.sw.wyb { background: #2b2b2b; }
.legend i.sw.common_cause { background: #f28c00; }

.legend i.sw.you { background: #000; box-shadow: 0 0 0 3px #ff6400; width: 10px; height: 10px; margin: 0 2px; }
.toggles { display: grid; gap: 8px; margin: 10px 0 8px; }
.trow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #444; min-width: 100%; }
@media (min-width: 720px) { .tl { min-width: 190px; } }
.toggles button { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; min-height: 40px; border: 2px solid #000; background: #fff; color: #000; cursor: pointer; border-radius: 0; }
.toggles button[aria-pressed="true"] { background: #000; color: #fff; }
.toggles button:focus-visible { outline: 3px solid var(--ld-orange); outline-offset: 2px; }
.toggles button i.sw, .legend i.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.toggles button[aria-pressed="true"] i.x::before, .toggles button[aria-pressed="true"] i.x::after { background: #fff; }
.toggles i.x { display: inline-block; position: relative; width: 12px; height: 12px; }
.toggles i.x::before, .toggles i.x::after { content: ""; position: absolute; left: 5px; top: -1px; width: 3px; height: 14px; background: #1a1a1a; transform: rotate(45deg); }
.toggles i.x::after { transform: rotate(-45deg); }
i.sw.soft_con { background: #072f5f; }
i.sw.ld { background: #faa61a; } i.sw.ref { background: #00bed6; } i.sw.snp { background: #c9b400; }
i.sw.lab { background: #e4003b; } i.sw.con { background: #0087dc; }
i.sw.heat { background: #ff6400; opacity: .7; border-radius: 0 !important; }
.toggles button[aria-pressed="true"] i.sw { box-shadow: 0 0 0 2px #fff; }
[hidden] { display: none !important; }
i.sw.common_cause { background: #f28c00; } i.sw.wyb { background: #2b2b2b; }
#chart .tag { font-size: 15px; font-weight: 800; fill: #000; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.academic { border-top: 6px solid #000; margin-top: 24px; padding-top: 4px; }
.academic summary { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; cursor: pointer; padding: 10px 0; list-style-position: outside; }
.academic summary:focus-visible { outline: 3px solid var(--ld-orange); outline-offset: 3px; }
.academic h4 { font-size: 16px; font-weight: 800; margin: 18px 0 4px; }
.academic ul { margin: 4px 0 10px; padding-left: 20px; max-width: 700px; }
.academic li { margin: 4px 0; }
.academic .refs { font-size: 14px; list-style: none; padding-left: 0; }
.academic .refs li { padding-left: 1.5em; text-indent: -1.5em; }
.academic .refs a { color: #000; text-decoration: underline; word-break: break-all; }
