/* Eckleburg. Visual system.
   Fonts: Jost and Public Sans, both under the SIL Open Font License 1.1. */

@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/public-sans-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+1EA0-1EF9, U+20AB; }

:root {
  /* Layout idea: one calm column on ash paper. Each incident is a lens and red is kept for the worst. */
  --page: #EDEFF1;        /* ash */
  --surface: #F7F8FA;     /* paper that charts sit on */
  --raised: #FFFFFF;
  --ink: #101B28;
  --ink-2: #445263;
  --ink-3: #5F6B7A;
  --line: #D8DDE3;
  --line-strong: #9AA5B1;
  --ring: #76828F;        /* lens outline */
  --blue: #1D4F91;        /* billboard blue: links and primary actions */
  --on-blue: #FFFFFF;
  --yellow: #E8B520;      /* spectacle yellow: selection and focus */
  --gold: #B88708;
  --red: #C7372F;         /* signal red: Critical only */
  --sev-high: #17406F;
  --sev-medium: #3F78BA;
  --sev-low: #8FB5DE;
  --bar: #3F78BA;
  --bar-soft: #C4D7EC;
  --wash: rgba(232, 181, 32, .16);
  --scrim: rgba(16, 27, 40, .46);
  --shadow: 0 1px 2px rgba(16, 27, 40, .06), 0 10px 28px rgba(16, 27, 40, .10);
  --font-display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
  --gutter: 24px;
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0C131C; --surface: #121B27; --raised: #18232F;
    --ink: #E8EDF2; --ink-2: #B4BFCC; --ink-3: #8593A3;
    --line: #233040; --line-strong: #4A5A6D; --ring: #6B7D94;
    --blue: #7FB2F0; --on-blue: #0C131C; --yellow: #F0C239; --gold: #F0C239; --red: #F0635B;
    --sev-high: #A9CBF5; --sev-medium: #5E98DD; --sev-low: #2F5F9E;
    --bar: #5E98DD; --bar-soft: #25415F;
    --wash: rgba(240, 194, 57, .14); --scrim: rgba(3, 7, 12, .66);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0C131C; --surface: #121B27; --raised: #18232F;
  --ink: #E8EDF2; --ink-2: #B4BFCC; --ink-3: #8593A3;
  --line: #233040; --line-strong: #4A5A6D; --ring: #6B7D94;
  --blue: #7FB2F0; --on-blue: #0C131C; --yellow: #F0C239; --gold: #F0C239; --red: #F0635B;
  --sev-high: #A9CBF5; --sev-medium: #5E98DD; --sev-low: #2F5F9E;
  --bar: #5E98DD; --bar-soft: #25415F;
  --wash: rgba(240, 194, 57, .14); --scrim: rgba(3, 7, 12, .66);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 3vw + 1rem, 3.25rem); line-height: 1.04; }
h2 { font-size: clamp(1.45rem, 1.1vw + 1.1rem, 1.9rem); line-height: 1.15; }
h3 { font-size: 1.02rem; line-height: 1.3; font-weight: 700; }
h4 { font-size: .78rem; line-height: 1.3; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--yellow); border-radius: 4px; }
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible, main:focus-visible { outline: none; box-shadow: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--page); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.2; text-decoration: none; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--blue); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--blue); padding-left: 10px; padding-right: 10px; }
.btn-quiet:hover { border-color: var(--line-strong); }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.linkbtn:hover { text-decoration-thickness: 2px; }
.arrow::after { content: "\2192"; margin-left: .35em; text-decoration: none; display: inline-block; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); font-size: .8rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chip .lens { width: 16px; height: 16px; margin-left: -4px; flex: none; }
.chip-critical { border-color: var(--red); color: var(--ink); }
.chip-plain { border-style: dashed; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 6px 2px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--raised); color: var(--ink); font-size: .84rem; font-weight: 600; }
.chip-x:hover { border-color: var(--ink); }
.chip-x .x { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--page); font-size: .95rem; line-height: 1; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--page); background: color-mix(in srgb, var(--page) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 44px; height: 22px; flex: none; }
.brand-mark .rim { fill: none; stroke: var(--gold); stroke-width: 2.4; }
.brand-mark .iris { fill: var(--blue); }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; letter-spacing: .005em; }
.brand-desc { font-size: .76rem; color: var(--ink-3); font-weight: 500; letter-spacing: .01em; }
.nav { display: flex; align-items: stretch; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--yellow); }
.theme { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 0; }
.theme:hover { border-color: var(--ink); }
.theme svg { width: 18px; height: 18px; }

/* ---------- selection bar ---------- */
.selbar { background: var(--wash); border-bottom: 1px solid var(--line); }
.selbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; font-size: .9rem; }
.selbar strong { font-weight: 700; }
.selbar .spacer { flex: 1 1 auto; }

/* ---------- views ---------- */
.view { padding: clamp(24px, 3vw, 40px) 0 72px; }
.view > .wrap > * + * { margin-top: clamp(20px, 2.4vw, 28px); }
.pagehead { max-width: 60rem; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.lede { margin-top: 12px; font-size: clamp(1.05rem, .5vw + 1rem, 1.25rem); line-height: 1.45; color: var(--ink-2); max-width: 44rem; }
.coverage { margin-top: 10px; font-size: .9rem; color: var(--ink-3); max-width: 44rem; }
.coverage strong { color: var(--ink-2); font-weight: 700; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2.2vw, 28px); }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.panel-head > div:first-child { max-width: 46rem; }
.panel-head p { margin-top: 6px; color: var(--ink-2); font-size: .95rem; }
.panel-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.note { margin-top: 16px; font-size: .875rem; color: var(--ink-3); max-width: 52rem; }
.note strong { color: var(--ink-2); }
.scope { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.scope.is-sel { color: var(--ink); }
.scope.is-sel::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px var(--ink); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }

/* ---------- headline metrics ---------- */
.metrics { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; margin-top: 14px; }
.metric { padding: 6px 24px 8px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric:first-child { padding-left: 0; border-left: 0; }
.metric-fig { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.1rem, 2.2vw + 1rem, 2.75rem); line-height: 1; letter-spacing: -.02em; }
.metric-unit { font-size: .46em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.metric-hero .metric-fig { font-size: clamp(4.2rem, 6vw + 1rem, 6rem); line-height: .86; font-weight: 500; }
.metric-label { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.metric-sub { font-size: .875rem; color: var(--ink-2); line-height: 1.45; }
.metric .linkbtn { font-size: .875rem; margin-top: auto; padding-top: 4px; align-self: flex-start; }
.surebar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.surebar h3 { font-size: .92rem; color: var(--ink); }
.surebar b { color: var(--ink); font-weight: 700; }

/* ---------- lenses ---------- */
.lens { display: block; width: 100%; height: 100%; overflow: visible; }
.lens-ring { fill: none; stroke: var(--ring); stroke-width: 1.5; }
.lens-ring.is-unsure { stroke-dasharray: 2.7 2.5; }
.lens-eye { stroke: none; }
.sev-critical { fill: var(--red); }
.sev-high { fill: var(--sev-high); }
.sev-medium { fill: var(--sev-medium); }
.sev-low { fill: var(--sev-low); }
.lens-other .lens-ring { stroke: var(--line-strong); }
/* the centers open once when a view first appears */
.is-fresh .field .lens-eye, .is-fresh .tl .lens-eye { animation: eye-open .45s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes eye-open { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.mk { width: 24px; height: 24px; padding: 0; border: 0; background: none; border-radius: 50%; flex: none; position: relative; transition: opacity .18s ease; }
.mk:hover .lens-ring, .mk:focus-visible .lens-ring, .mk.is-on .lens-ring { stroke: var(--ink); stroke-width: 1.9; }
.mk:hover, .mk.is-on { background: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.mk:focus-visible { background: var(--yellow); }
.mk.is-off { opacity: .2; }
.mk.is-off:hover, .mk.is-off:focus-visible { opacity: 1; }
.mk-sq { border-radius: 5px; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 34px; font-size: .84rem; color: var(--ink-2); margin-bottom: 14px; }
.legend-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.legend-title { font-weight: 700; color: var(--ink); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-item .lens { width: 20px; height: 20px; flex: none; }

/* ---------- field: incidents by area of life ---------- */
.field { border-top: 1px solid var(--line); }
.frow { display: grid; grid-template-columns: 218px minmax(0, 1fr); align-items: center; column-gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.frow-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.frow-n { display: block; font-size: .82rem; color: var(--ink-3); font-weight: 500; margin-top: 1px; }
.frow-marks { display: flex; flex-wrap: wrap; align-items: center; }

/* ---------- data tables (table view of a chart) ---------- */
.tablewrap { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dt caption { text-align: left; font-size: .84rem; color: var(--ink-3); padding-bottom: 8px; caption-side: top; }
.dt th, .dt td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt th:first-child, .dt td:first-child { text-align: left; white-space: normal; }
.dt thead th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; border-bottom-color: var(--line-strong); vertical-align: bottom; }
.dt tbody th { font-weight: 600; }
.dt tfoot th, .dt tfoot td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--line-strong); }

/* ---------- event lists ---------- */
.events { border-top: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event .lensbox { width: 26px; height: 26px; margin-top: 1px; }
.event-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.event-title:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.event-meta { font-size: .82rem; color: var(--ink-3); margin-top: 3px; }
.event-why { font-size: .92rem; color: var(--ink-2); margin-top: 4px; }
.events.compact .event { padding: 11px 0; }
.events.compact .event-title { font-size: .95rem; }

/* ---------- timeline ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; min-width: 0; }
.focus { position: sticky; top: 88px; }
.focus h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; }
.focus-count { margin-top: 4px; font-size: .92rem; color: var(--ink-2); }
.focus .events { margin-top: 14px; }
.focus-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tl { display: grid; grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr)); column-gap: 6px; }
.tl-col { display: contents; }
.tl-top { grid-row: 1; grid-column: var(--c); display: flex; justify-content: center; align-items: flex-end; min-height: 48px; }
.tl-stack { display: flex; flex-wrap: wrap-reverse; align-content: flex-start; width: 48px; }
.tl-axis { grid-row: 2; grid-column: 1 / -1; height: 1px; background: var(--line-strong); margin-top: 6px; }
.tl-month { grid-row: 3; grid-column: var(--c); width: 100%; min-height: 44px; margin-top: 4px; padding: 4px 1px; border: 1px solid transparent; border-radius: 6px; background: none;
  font-size: .86rem; font-weight: 700; color: var(--ink); line-height: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; }
.tl-month small { display: block; font-size: .7rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-month .tl-count { font-size: .78rem; color: var(--ink-2); }
.tl-month:hover { border-color: var(--line-strong); }
.tl-month[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.tl-month[aria-pressed="true"] small, .tl-month[aria-pressed="true"] .tl-count { color: var(--page); }
.tl-band { grid-row: 4; grid-column: 1 / -1; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.tl-under { grid-row: 5; grid-column: var(--c); justify-self: center; display: flex; flex-wrap: wrap; align-content: flex-start; width: 48px; margin-top: 6px; min-height: 24px; }
.tl.only-incident-date .mk:not(.by-incident-date) { opacity: .16; }

/* ---------- matrix ---------- */
.mx { width: 100%; border-collapse: collapse; }
.mx th, .mx td { padding: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mx thead th { vertical-align: bottom; border-bottom-color: var(--line-strong); padding-bottom: 6px; }
.mx thead th:first-child { text-align: left; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 12px; }
.mx-col, .mx-row, .mx-cell { width: 100%; border: 0; background: none; text-align: left; border-radius: 6px; }
.mx-col { padding: 6px 8px; font-size: .82rem; font-weight: 700; line-height: 1.2; color: var(--ink-2); min-height: 44px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.mx-col b { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--ink); letter-spacing: -.01em; }
.mx-row { padding: 12px 8px 12px 0; font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--ink); min-height: 48px; }
.mx-row span { display: block; font-size: .8rem; font-weight: 500; color: var(--ink-3); }
.mx-cell { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 6px; padding: 12px 8px; min-height: 48px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .95rem; }
.mx-cell .track { height: 10px; }
.mx-cell .bar { display: block; height: 10px; min-width: 3px; background: var(--bar); border-radius: 0 4px 4px 0; }
.mx-cell.is-zero { color: var(--ink-3); font-weight: 400; }
.mx-col:hover, .mx-row:hover, .mx-cell:hover { background: var(--page); }
.mx [aria-pressed="true"] { background: var(--wash); box-shadow: inset 3px 0 0 var(--yellow); }
.mx td.in-col, .mx th.in-col { background: color-mix(in srgb, var(--wash) 55%, transparent); }
.mx tr.in-row > * { background: color-mix(in srgb, var(--wash) 55%, transparent); }
.mx-label { display: none; }
.refine { display: none; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
.tab .n { font-weight: 500; color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.tab[aria-pressed="true"] .n, .tab:hover .n { color: inherit; }
.tab:disabled { opacity: .45; cursor: default; }

/* ---------- ranked figures ---------- */
.rank { border-top: 1px solid var(--line); margin-top: 16px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 24px; row-gap: 6px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rank-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.rank-what { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }
.rank-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .95rem; }
.rank-fig b { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: -.01em; }
.rank-track { height: 12px; margin-top: 6px; }
.rank-bar { display: block; height: 12px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--bar); }
.rank-bar.is-soft { background: var(--bar-soft); box-shadow: inset 0 0 0 1px var(--bar); }
.rank-bar.is-claim { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--bar) 3px 4.5px); box-shadow: inset 0 0 0 1px var(--bar); }
.rank-bar .ext { display: block; height: 100%; float: right; background: var(--bar-soft); box-shadow: inset 0 0 0 1px var(--bar); border-radius: 0 4px 4px 0; }
.status { font-size: .78rem; font-weight: 700; letter-spacing: .03em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.status-confirmed { border-color: var(--ink-2); color: var(--ink); }
.status-claimed, .status-disputed { border-style: dashed; }
.keyline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ink-2); margin-top: 14px; align-items: center; }
.keyline .sw { display: inline-block; width: 26px; height: 10px; border-radius: 0 3px 3px 0; margin-right: 6px; vertical-align: -1px; }
.moneylist { margin-top: 18px; display: grid; gap: 10px; font-size: .92rem; }
.moneylist dt { font-weight: 700; }
.moneylist dd { color: var(--ink-2); }
.moneylist div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 4px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* ---------- bar lists ---------- */
.bars { border-top: 1px solid var(--line); }
.bars-row { display: grid; grid-template-columns: 236px 44px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bars-label { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.bars-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.bars-track { height: 12px; }
.bars-bar { display: block; height: 12px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--bar); }
.bars-bar.is-soft { background: var(--bar-soft); box-shadow: inset 0 0 0 1px var(--bar); }
.bars-bar.is-none { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.bars-note { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-3); margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sub-h { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: 4px; }
.sub-p { font-size: .9rem; color: var(--ink-2); margin-bottom: 14px; }

/* ---------- browse ---------- */
.filters { display: grid; gap: 12px; }
.searchbox { position: relative; max-width: 34rem; }
.searchbox label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.searchbox input { width: 100%; min-height: 46px; padding: 8px 14px 8px 42px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); }
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox svg { position: absolute; left: 15px; bottom: 14px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.fmenus { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.fmenu { position: relative; }
.fmenu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; font-size: .92rem; cursor: pointer; user-select: none; }
.fmenu > summary::-webkit-details-marker { display: none; }
.fmenu > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .7; }
.fmenu[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.fmenu > summary:hover { border-color: var(--ink); }
.fmenu.has-sel > summary { border-color: var(--ink); background: var(--raised); box-shadow: inset 0 -3px 0 var(--yellow); }
.fmenu .fcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--page); font-size: .75rem; font-weight: 700; }
.fpop { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; min-width: 280px; max-width: min(92vw, 380px); max-height: 60vh; overflow: auto; padding: 8px; background: var(--raised);
  border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); }
.fpop fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; font-size: .92rem; line-height: 1.25; cursor: pointer; }
.opt:hover { background: var(--page); }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.opt-n { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.opt.is-empty { color: var(--ink-3); }
.opt small { display: block; color: var(--ink-3); font-size: .78rem; }
.morefilters { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.resultbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.resultbar .count { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; }
.resultbar .count small { font-family: var(--font-body); font-size: .86rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.resultbar .tools { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.select { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.select select { min-height: 38px; padding: 4px 30px 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: .88rem; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { min-height: 38px; padding: 4px 14px; border: 0; background: none; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.seg button:focus-visible { border-radius: 999px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card:hover { border-color: var(--ink-2); }
.card-top { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.card-top .lensbox { width: 26px; height: 26px; flex: none; }
.card h3 { font-size: 1.05rem; line-height: 1.28; }
.card-open { border: 0; background: none; padding: 0; text-align: left; font: inherit; font-weight: 700; color: var(--ink); }
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-open:focus-visible { outline: none; box-shadow: none; }
.card-open:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--yellow); }
.card:hover .card-open { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .16em; }
.card p { font-size: .9rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.more { display: flex; justify-content: center; margin-top: 22px; }
.rt td:first-child, .rt th:first-child { white-space: nowrap; }
.rt td, .rt th { text-align: left; white-space: normal; vertical-align: top; }
.rt .linkbtn { color: var(--ink); text-decoration: none; }
.rt .linkbtn:hover { text-decoration: underline; }
.rt td.nowrap { white-space: nowrap; }
.empty { margin-top: 18px; padding: 36px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
.empty p { margin: 8px auto 16px; color: var(--ink-2); max-width: 34rem; }
.empty .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(640px, 100vw); max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.drawer::backdrop { background: var(--scrim); }
.drawer[open] { display: flex; flex-direction: column; animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 24px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-kind { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.drawer-close { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--raised); font-weight: 600; font-size: .9rem; }
.drawer-close:hover { border-color: var(--ink); }
.drawer-body { overflow-y: auto; padding: 22px 24px 40px; flex: 1 1 auto; overscroll-behavior: contain; }
.drawer-body > * + * { margin-top: 22px; }
.drawer h2 { font-size: clamp(1.5rem, 1.4vw + 1.1rem, 2rem); line-height: 1.12; }
.drawer-meta { margin-top: 10px; font-size: .9rem; color: var(--ink-2); }
.drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sec h3 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; }
.sec p { max-width: 40rem; }
.sec p + p { margin-top: 8px; }
.sec .quiet { color: var(--ink-3); font-size: .9rem; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.facts > div { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 4px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.facts dt { color: var(--ink-3); font-weight: 600; }
.facts dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.facts dd small { display: block; color: var(--ink-3); font-size: .84rem; margin-top: 2px; }
.figs { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 10px; }
.fig { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fig-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fig-top b { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; }
.fig-what { font-size: .88rem; color: var(--ink-2); margin-top: 2px; }
.fig-note { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }
.sevbox { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.sevbox .lensbox { width: 34px; height: 34px; }
.sevbox b { font-weight: 700; }
.srcs { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.src { padding: 11px 0; border-bottom: 1px solid var(--line); }
.src a { font-weight: 600; overflow-wrap: anywhere; }
.src-meta { font-size: .84rem; color: var(--ink-3); margin-top: 3px; }
.fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; font-weight: 700; cursor: pointer; min-height: 48px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; opacity: .7; }
.fold[open] > summary::after { transform: rotate(225deg); }
.fold > summary:hover { background: var(--page); border-radius: var(--radius); }
.fold > summary small { display: block; font-weight: 500; color: var(--ink-3); font-size: .86rem; margin-top: 2px; }
.fold-body { padding: 4px 16px 18px; }
.fold-body > * + * { margin-top: 14px; }
.fold-body p, .fold-body li { max-width: 46rem; }
.fold-body ul.dots { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.claims { display: grid; gap: 0; border-top: 1px solid var(--line); }
.claim { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.claim small { display: block; color: var(--ink-3); margin-top: 2px; }
.related { display: grid; gap: 0; border-top: 1px solid var(--line); }
.related li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.related small { display: block; color: var(--ink-3); margin-top: 2px; }

/* ---------- evidence ---------- */
.folds { display: grid; gap: 10px; }
.srcfilter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.srcfilter .searchbox { flex: 1 1 280px; }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.gloss div { padding: 10px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.gloss dt { font-weight: 700; }
.gloss dd { color: var(--ink-2); font-size: .92rem; }
.rules { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rules th, .rules td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.rules th { white-space: nowrap; font-weight: 700; }
.rules th .lensbox { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; }
.rules td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; padding-right: 0; }

/* ---------- tooltip ---------- */
.tip { position: fixed; z-index: 60; max-width: 280px; padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--page); font-size: .84rem; line-height: 1.35; box-shadow: var(--shadow); pointer-events: none; }
.tip b { display: block; font-weight: 700; }
.tip span { display: block; opacity: .82; margin-top: 2px; }

/* ---------- loading and errors ---------- */
.boot { display: grid; place-items: center; gap: 14px; text-align: center; padding: 18vh 24px; color: var(--ink-2); }
.boot .lensbox { width: 44px; height: 44px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.boot h1 { font-size: 1.6rem; }
.boot p { max-width: 32rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 20px 0 24px; font-size: .84rem; color: var(--ink-3); flex: none; }
.foot-in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.foot-brand { color: var(--ink-2); font-weight: 600; letter-spacing: .01em; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .split { display: flex; flex-direction: column; }
  .stack { display: contents; }
  .stack > :first-child { order: 1; }
  .focus { position: static; order: 2; }
  .stack > :nth-child(n+2) { order: 3; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .metric:nth-child(3) { padding-left: 0; border-left: 0; }
  .metric:nth-child(n+3) { padding-top: 22px; border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .top-in { gap: 12px; }
  .nav a { padding: 0 8px; }
  .nav a[aria-current="page"]::after { left: 8px; right: 8px; }
  .mx, .mx thead, .mx tbody, .mx tr, .mx th { display: block; }
  .mx th { border-bottom: 0; }
  .mx thead::before, .mx tbody::before { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 0 8px 6px; }
  .mx thead::before { content: "By consequence"; }
  .mx tbody::before { content: "By area of life"; padding-top: 18px; }
  .mx thead th:first-child, .mx tbody td { display: none; }
  .mx thead th, .mx tbody tr { border-top: 1px solid var(--line); border-bottom: 0; padding: 0; }
  .mx-col { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px; font-size: .95rem; color: var(--ink); }
  .mx-col b { font-size: 1.15rem; min-width: 2ch; text-align: right; }
  .mx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px; }
  .mx-row span { flex: none; font-size: .86rem; }
  .mx td.in-col, .mx tr.in-row > * { background: none; }
  .refine { display: flex; }
  .wide-only { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .gloss { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 12px; }
  body { padding-bottom: 60px; }
  .top { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--page); }
  .top-in { min-height: 56px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--surface); border-top: 1px solid var(--line-strong); padding: 0 4px; }
  .nav a { justify-content: center; min-height: 58px; padding: 0 2px; font-size: .8rem; border-radius: 0; text-align: center; }
  .nav a[aria-current="page"]::after { left: 18%; right: 18%; top: 0; bottom: auto; border-radius: 0 0 3px 3px; }
  .frow { grid-template-columns: minmax(0, 1fr); row-gap: 6px; padding: 12px 0; }
  .frow-n { display: inline; margin-left: 6px; }
  .mk { width: 26px; height: 26px; }
  .metrics { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .metric, .metric:nth-child(3) { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .metric:first-child { border-top: 0; padding-top: 4px; }
  .metric:nth-child(n+3) { padding-top: 18px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .tl { display: block; }
  .tl-col { display: grid; grid-template-columns: 68px minmax(0, 1fr); grid-template-areas: "m s" "m u"; column-gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tl-month { grid-area: m; margin: 0; align-items: flex-start; text-align: left; padding: 6px 8px; }
  .tl-top { grid-area: s; justify-content: flex-start; min-height: 0; }
  .tl-stack { width: auto; flex-wrap: wrap; }
  .tl-under { grid-area: u; width: auto; justify-self: start; margin-top: 2px; min-height: 0; }
  .tl-axis, .tl-band { display: none; }
  .rank-row { grid-template-columns: minmax(0, 1fr); }
  .bars-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .bars-track { grid-column: 1 / -1; margin-top: 6px; }
  .moneylist div { grid-template-columns: minmax(0, 1fr); }
  .fmenu { position: static; }
  .fmenus, .morefilters { position: relative; }
  .fpop { left: 0; right: 0; top: auto; min-width: 0; max-width: none; margin-top: 6px; }
  .resultbar .tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .drawer { width: 100vw; border-left: 0; }
  .drawer-bar { padding-left: 16px; }
  .drawer-body { padding: 18px 16px 36px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .foot-in { flex-direction: column; }
  .rules th { white-space: normal; }
  .rules th, .rules td { padding-right: 10px; overflow-wrap: anywhere; }
  .fold > summary { padding: 12px; }
  .fold-body { padding: 4px 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .mk:hover, .mk.is-on, .mk:focus-visible { outline: 2px solid Highlight; }
  .lens-ring { stroke: CanvasText; }
  .lens-eye { fill: CanvasText; }
  .bars-bar, .rank-bar, .mx-cell .bar { background: CanvasText; }
}
