:root {
  color-scheme: light;
  --paper: #eef1ee; --paper-2: #f7f9f7; --paper-3: #e2e8e4; --rule: #c9d3cd;
  --ink: #10241f; --ink-2: #44564f; --ink-3: #5f6f68; --note: #1d6b57; --note-soft: #d6e6df;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #8a63c9;
  --bad: #b3261e; --warn: #8a5a00;
  --c-core: #1d6b57; --c-out: #7c8983;
  --gutter: 16px; --max: 1120px;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sans: "Public Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0d1513; --paper-2: #131d1a; --paper-3: #1b2824; --rule: #2a3a35;
    --ink: #e7eee9; --ink-2: #b4c2bb; --ink-3: #93a39c; --note: #5fbf9f; --note-soft: #1d3a31;
    --s1: #5a9fef; --s2: #f08a5d; --s3: #3cc893; --s4: #a98ee6;
    --bad: #ff8a80; --warn: #e0b04a;
    --c-core: #3fa582; --c-out: #5c6b65;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d1513; --paper-2: #131d1a; --paper-3: #1b2824; --rule: #2a3a35;
  --ink: #e7eee9; --ink-2: #b4c2bb; --ink-3: #93a39c; --note: #5fbf9f; --note-soft: #1d3a31;
  --s1: #5a9fef; --s2: #f08a5d; --s3: #3cc893; --s4: #a98ee6;
  --bad: #ff8a80; --warn: #e0b04a;
  --c-core: #3fa582; --c-out: #5c6b65;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans);
  font-variant-numeric: tabular-nums; overflow-x: hidden; }
a { color: var(--note); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--note); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 16px; z-index: 10; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.dim { color: var(--ink-3); }
.bad { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 800 24px/1 var(--display); }
.mark { width: 30px; height: 30px; flex: none; }
.mark .fk { fill: var(--ink); } .mark .fp { fill: var(--paper); }
.head-tools { display: flex; align-items: center; gap: 14px; }
.home-link { font-size: 14px; color: var(--ink-2); }
.home-link .hl-short { display: none; }
.wordmark span { white-space: nowrap; }
@media (max-width: 640px) { .home-link .hl-long { display: none; } .home-link .hl-short { display: inline; } }
.theme { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper-2);
  color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; fill: currentColor; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { display: block; padding: 12px 10px 10px; color: var(--ink-2); text-decoration: none; font-weight: 600;
  font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--note); }
.tabs .ts { display: none; }
@media (max-width: 640px) { .tabs .tl { display: none; } .tabs .ts { display: inline; } }

/* page heading */
.page-h { padding: 28px 0 8px; }
h1 { margin: 0 0 8px; font: 800 44px/1 var(--display); letter-spacing: 0; }
.asof { margin: 0; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.asof-old { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; max-width: 80ch; }

/* sections */
.sec { padding: 28px 0 8px; border-top: 1px solid var(--rule); margin-top: 24px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec h2 { margin: 0; font: 700 30px/1.1 var(--display); }
.sub-h { margin: 20px 0 8px; font-size: 17px; }
.sec h3 { font-size: 17px; }
.lead { max-width: 75ch; color: var(--ink); margin: 0 0 12px; }
.note { max-width: 75ch; color: var(--ink-2); font-size: 14.5px; }
.src { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 90ch; }
.src .basis { color: var(--ink-3); }
.claim { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; border: 1px solid var(--rule);
  color: var(--ink-2); background: var(--paper-2); cursor: help; }
.claim-observed { border-color: var(--note); color: var(--note); }
.claim-derived { border-color: var(--s1); color: var(--s1); }
.claim-reported { border-color: var(--warn); color: var(--warn); }
.claim-interpreted { border-color: var(--s4); color: var(--s4); }

/* headline numbers: one ruled row, no boxes */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 24px; margin: 24px 0 0;
  border-top: 2px solid var(--ink); }
.kpi { padding: 14px 0 16px; display: flex; flex-direction: column; min-width: 0; border-bottom: 1px solid var(--rule); }
.kpi h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.kpi-v { margin: 8px 0 2px; font: 800 40px/1 var(--display); color: var(--ink); }
.kpi-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink); }
a.fn { text-decoration: none; font-weight: 700; padding: 8px 4px; margin: -8px -4px; }
a.fn sup { font-size: 11px; line-height: 0; }
.kpi-notes { margin: 12px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); max-width: 110ch; }
.kpi-notes li { margin: 0 0 4px; }
.kpi-notes li:target { background: var(--note-soft); }
.kpi-notes .basis { color: var(--ink-3); }

/* signature chart: credible core vs reported */
.sig { margin: 20px 0 8px; }
.sig h2 { margin: 0 0 14px; font: 700 30px/1.1 var(--display); max-width: 30ch; }
.sig svg { width: 100%; height: auto; display: none; overflow: visible; }
.sig .sig-s { display: block; }
.sig .grid { stroke: var(--rule); stroke-width: 1; }
.sig .ax { fill: var(--ink-3); font-family: var(--sans); }
.sig .rowh { fill: var(--ink); font-family: var(--sans); font-weight: 700; }
.sig .rowv { fill: var(--ink); font-family: var(--display); font-weight: 800; }
.sig .vn { fill: var(--ink-2); font-family: var(--sans); font-weight: 600; }
.sig .vv { fill: var(--ink-3); font-family: var(--sans); }
.sig .brk { fill: none; stroke: var(--ink-3); stroke-width: 1.25; }
.sig .brt { fill: var(--ink-2); font-family: var(--sans); font-weight: 600; }
.seg-core { fill: var(--c-core); } .seg-out { fill: var(--c-out); }
.sig-legend .sw { height: 10px; width: 14px; border-radius: 2px; }
.sw.seg-core { background: var(--c-core); } .sw.seg-out { background: var(--c-out); }
.sig-basis { max-width: 100ch; }
@media (min-width: 600px) { .sig .sig-s { display: none; } .sig .sig-m { display: block; } .sig h2 { font-size: 36px; } }
@media (min-width: 1000px) { .sig .sig-m { display: none; } .sig .sig-l { display: block; } .sig h2 { font-size: 40px; } }

/* tables */
.tw { overflow-x: auto; margin: 8px 0; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13px; font-weight: 700; color: var(--ink-2); border-bottom: 1.5px solid var(--ink-3); }
td.n, th.n { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 700; border-bottom: 0; }
table.wide td:first-child, table.wide th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.dlg-body table.wide td:first-child, .dlg-body table.wide th:first-child, .vcard table.wide td:first-child,
.vcard table.wide th:first-child { background: var(--paper-2); }
td p { margin: 0 0 6px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--note-soft); }
.flag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--warn); border: 1px solid currentColor;
  border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.vlink { font-weight: 700; }
/* 32px hit area on small links without changing the line box */
td a, .src a, .rc a, .note a, .site-foot a, .home-link { padding-block: 8px; }

/* charts */
.chart { margin: 8px 0; max-width: 560px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .ax { fill: var(--ink-3); font: 13px var(--sans); }
.chart .bar { fill: var(--c-core); }
.chart .ln { fill: none; stroke-width: 2.5; }
.chart .ln.s1, .chart .pt.s1 { stroke: var(--c-core); } .chart .pt.s1 { fill: var(--c-core); }
.chart .ln.s2, .chart .pt.s2 { stroke: var(--c-out); } .chart .pt.s2 { fill: var(--c-out); }
.chart .pt { stroke: var(--paper); stroke-width: 2; }
.legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--ink-2); }
.sw { display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; }
.sw.s1 { background: var(--c-core); } .sw.s2 { background: var(--c-out); }
.hbars { list-style: none; padding: 0; margin: 8px 0 12px; max-width: 720px; }
.hbars li { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 10px; align-items: center; padding: 4px 0; }
.hb-l { font-weight: 700; font-size: 14px; }
.hb-t { height: 14px; background: var(--paper-3); border-radius: 2px; }
.hb-b { display: block; height: 100%; border-radius: 2px; }
.hb-b { background: var(--c-core); }
.hb-v { font-size: 14px; text-align: right; min-width: 72px; }
.hb-n { grid-column: 2 / -1; font-size: 12.5px; color: var(--ink-3); margin-top: -2px; }

/* changed since yesterday */
.changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 820px; }
.chg { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px 12px; background: var(--paper-2);
  border: 1px solid var(--rule); border-left: 4px solid var(--ink-3); border-radius: 4px; }
.chg p { margin: 0; }
.chg-t { font-weight: 700; }
.chg-o { font-size: 14.5px; }
.chg-r { font-size: 13px; color: var(--ink-3); margin-top: 2px !important; }
.chg-new { border-left-color: var(--bad); } .chg-pending { border-left-color: var(--warn); }
.chg-resolved { border-left-color: var(--note); }
.chip { align-self: start; justify-self: start; font-size: 12.5px; font-weight: 700; border: 1px solid var(--rule);
  border-radius: 999px; padding: 1px 9px; background: var(--paper); white-space: nowrap; }

/* venue cards */
.vcard { display: none; }
.vcard:target { display: block; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 16px; margin: 16px 0; }
.vcard h2, .dlg-body h2 { margin: 0; font: 800 34px/1 var(--display); }
.vcard h3, .dlg-body h3 { margin: 20px 0 4px; font-size: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facts span { font-size: 13px; border: 1px solid var(--rule); border-radius: 999px; padding: 1px 10px; color: var(--ink-2); background: var(--paper); }
dialog#venue { border: 0; padding: 0; margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(760px, 100vw);
  max-width: 100vw; background: var(--paper-2); color: var(--ink); border-left: 1px solid var(--rule); }
dialog#venue::backdrop { background: rgba(0, 0, 0, .35); }
.dlg { position: relative; height: 100%; overflow-y: auto; }
.dlg-body { padding: 18px var(--gutter) 32px; }
.close { position: sticky; top: 8px; float: right; margin: 8px 8px 0 0; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
table.kv { max-width: 480px; }

/* rules */
.deltas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.delta { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 14px; }
.delta header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.delta h3 { margin: 0; font: 700 24px/1 var(--display); }
.delta dl { margin: 10px 0 0; }
.delta dl div { padding: 6px 0; border-top: 1px solid var(--rule); }
.delta dt { font-weight: 700; font-size: 13.5px; }
.delta dd { margin: 0; font-size: 14.5px; }
.search { margin: 4px 0 12px; max-width: 520px; }
.search label { display: block; font-weight: 600; margin-bottom: 4px; }
.search input { width: 100%; font: 16px var(--sans); padding: 10px 12px; border: 1px solid var(--ink-3); border-radius: 4px;
  background: var(--paper-2); color: var(--ink); }
.search p { margin: 4px 0 0; font-size: 13.5px; }
.lawgroup h3 { margin: 18px 0 6px; font-size: 16px; }
details.law { border-bottom: 1px solid var(--rule); }
details.law summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
details.law .ref { font-weight: 700; color: var(--note); margin-right: 4px; }
.law-b { padding: 0 0 12px; max-width: 80ch; }
.law-b p { margin: 6px 0; font-size: 14.5px; }
.rdim { margin: 8px 0 20px; }
.rdim h3 { margin: 0; }
.rdim > .dim { margin: 2px 0 8px; font-size: 14px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; align-items: start; }
.rc { border: 1px solid var(--rule); border-radius: 4px; padding: 10px; background: var(--paper-2); font-size: 14px; }
.rc p { margin: 0 0 4px; }
.rc .rj { font-weight: 700; }
.rc-ok { border-left: 4px solid var(--note); } .rc-rel { border-left: 4px solid var(--warn); }
.rc-non { background: transparent; border-style: dashed; }

/* folded sections */
.sec.fold { padding-bottom: 0; margin-top: 0; }
.sec.fold summary { list-style: none; cursor: pointer; margin: 0; padding: 4px 40px 20px 0; position: relative; }
.sec.fold summary::-webkit-details-marker { display: none; }
.sec.fold summary::after { content: ""; position: absolute; right: 8px; top: 12px; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); }
.sec.fold details[open] > summary::after { transform: rotate(-135deg); top: 18px; }
.sec.fold summary:hover h2 { color: var(--note); }
.fold-b { padding-bottom: 20px; }

/* entering + methodology */
.toc { margin: 8px 0 24px; }
.toc ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.toc ul { gap: 0 22px; }
.toc a { display: inline-block; font-size: 14.5px; font-weight: 600; padding: 6px 0; }
.kvlist { margin: 0; max-width: 820px; }
.kvlist div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kvlist dt { font-weight: 700; }
.kvlist dd { margin: 0; color: var(--ink-2); }
.gaps { max-width: 80ch; padding-left: 20px; }
.gaps li { margin: 6px 0; }

/* footer, same structure as ursanomics.com */
.site-foot { border-top: 1px solid var(--rule); margin-top: 48px; padding: 32px 0 48px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 16px; font-size: 15px; color: var(--ink-2); }
.foot-grid .who { grid-column: 1 / span 5; margin: 0; }
.foot-grid .contact { grid-column: 7 / span 3; margin: 0; list-style: none; padding: 0; }
.foot-grid .note { grid-column: 10 / span 3; margin: 0; color: var(--ink-3); font-size: inherit; }
.foot-grid .ls { display: none; }
.foot-grid .copy { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--ink-3); }

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  h1 { font-size: 60px; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  h1 { font-size: 40px; }
  .tabs ul { gap: 0; }
  .tabs a { padding: 12px 7px 10px; font-size: 14px; }
  .sec h2 { font-size: 27px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .kpi-v { font-size: 30px; }
  .kpi h3, .kpi-sub { font-size: 13.5px; }
  /* stacked tables: each row becomes a block of label/value lines */
  table.stack thead { position: absolute; left: -9999px; }
  table.stack, table.stack tbody, table.stack tfoot, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 10px;
    text-align: left; white-space: normal; }
  table.stack td::before { content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--ink-3); }
  table.stack td:first-child { font-size: 16px; font-weight: 700; display: block; }
  table.stack td:first-child::before { content: none; }
  table.stack td:empty { display: none; }
  table.stack td.n { text-align: left; }
  table.stack.long td { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
  /* wide comparison tables scroll sideways with the first column pinned */
  table.wide { min-width: 100%; width: auto; }
  table.wide td, table.wide th { min-width: 12rem; }
  table.wide td.n, table.wide th.n { min-width: 0; }
  table.wide td:first-child, table.wide th:first-child { box-shadow: 1px 0 0 var(--rule); min-width: 6.5rem;
    max-width: 8.5rem; }
  tr.click:hover td { background: transparent; }
  .chg { grid-template-columns: 1fr; gap: 6px; }
  .kvlist div { grid-template-columns: 1fr; gap: 2px; }
  .foot-grid { font-size: 13px; column-gap: 16px; }
  .foot-grid .who { grid-column: 1 / span 4; }
  .foot-grid .contact { grid-column: 5 / span 4; }
  .foot-grid .note { grid-column: 9 / span 4; }
  .foot-grid .copy { font-size: 13px; }
  .foot-grid .lf { display: none; }
  .foot-grid .ls { display: inline; }
  dialog#venue { width: 100vw; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
