/* Atlas of Swiss Law. White paper, black type, one red for what you act on; the blue ramp says who
   made a rule (constitution darkest), ochre marks treaties. Geist / Geist Mono (SIL OFL, fonts/). */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #0e1116;
  --ink-2: #474c55;
  --ink-3: #80858d;
  --rule: #e6e7e9;
  --rule-2: #d3d5d8;
  --wash: #f4f5f6;
  --wash-2: #eceef0;
  --accent: #e2001a;
  --accent-ink: #b00014;
  --c0: #0b2a4a; --c1: #1f5fae; --c2: #78a6dc; --c3: #cfe0f3; --c4: #d8b679; --c5: #e4e4e2; --c6: #cfcfcf;
  --on-c0: #ffffff; --on-c1: #ffffff; --on-c2: #0b1a2b; --on-c3: #0b1a2b; --on-c4: #2a1f0b; --on-c5: #3c3c3c; --on-c6: #3c3c3c;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: 11px; --t-s: 12.5px; --t-m: 14px; --t-b: 15px; --t-l: 17px; --t-xl: 22px; --t-xxl: 30px;
  --top: 60px; --bar: 52px; --side: 408px; --foot: 28px;
  --shadow: 0 1px 2px rgba(14, 17, 22, .06), 0 8px 24px rgba(14, 17, 22, .10);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-m)/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden;
  font-feature-settings: "ss01" 1;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -40px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header */
.top {
  position: relative; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 28px;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--rule); background: var(--paper);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 640; font-size: var(--t-b); letter-spacing: -.01em; white-space: nowrap; }
.brand .mark { width: 14px; height: 14px; background: var(--accent); flex: none; }
.views { display: flex; gap: 4px; }
.views a {
  text-decoration: none; font-weight: 520; color: var(--ink-2); padding: 8px 10px; border-radius: 6px; white-space: nowrap;
  position: relative;
}
.views a:hover { color: var(--ink); background: var(--wash); }
.views a[aria-current="page"] { color: var(--ink); }
.views a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -11px; height: 2px; background: var(--ink); }
.search { position: relative; flex: 1 1 220px; max-width: 460px; margin-left: auto; min-width: 160px; }
.search input {
  width: 100%; height: 38px; border: 1px solid transparent; background: var(--wash); border-radius: 8px;
  padding: 0 12px 0 36px; outline: none; font-size: var(--t-m);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { background: var(--paper); border-color: var(--ink); }
.search .glass { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search .closeq { display: none; }
.langs { display: flex; gap: 2px; }
.langs button { font: 560 var(--t-s)/1 var(--mono); padding: 8px 7px; border-radius: 6px; color: var(--ink-3); letter-spacing: .02em; }
.langs button:hover { color: var(--ink); background: var(--wash); }
.langs button[aria-pressed="true"] { color: var(--ink); }
.qbtn { display: none; }
.langsel { display: none; }

.results {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; max-height: min(70vh, 560px); overflow: auto; z-index: 40;
}
.results .grp { font: 600 var(--t-xs)/1 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 10px 10px 6px; }
.results button {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 6px;
}
.results button[aria-selected="true"], .results button:hover { background: var(--wash); }
.results .lab { font-weight: 620; white-space: nowrap; }
.results .sub { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.results .meta { font: 500 var(--t-xs)/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.results .sw { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.results .empty { padding: 14px 10px; color: var(--ink-3); }
.results button.off .lab, .results button.off .sub { color: var(--ink-3); }

/* ---------- main frame */
main { position: relative; height: calc(100% - var(--top) - var(--foot)); display: flex; }

/* ---------- footer: the date of the data, the sources, who made it; one quiet line */
.foot {
  height: var(--foot); display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--rule); background: var(--paper);
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(20px, env(safe-area-inset-left, 0px));
  font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; letter-spacing: .01em;
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.foot .sep { color: var(--rule-2); }
.foot .heart { font-family: var(--sans); color: var(--ink-2); }
.view { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; }

/* ---------- map */
.mapbar {
  height: var(--bar); flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
}
.crumbs { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; font-size: var(--t-m); }
.crumbs a, .crumbs span { text-decoration: none; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 3.2em; max-width: 22em; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { flex: none; min-width: 0; color: var(--rule-2); margin: 0 8px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; flex-shrink: 0.15; max-width: none; }
.crumbs .tot { flex: none; min-width: 0; margin-left: 12px; font: 500 var(--t-s)/1 var(--mono); color: var(--ink-3); }
.crumbs .upbtn { flex: none; min-width: 0; width: 28px; height: 28px; margin-right: 8px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-2); }
.crumbs .upbtn:hover { background: var(--wash); color: var(--ink); }
.seg { display: inline-flex; align-items: center; gap: 0; flex: none; }
.seg .seglabel { color: var(--ink-3); margin-right: 10px; font-size: var(--t-s); }
.seg button {
  height: 30px; padding: 0 12px; border: 1px solid var(--rule-2); font-size: var(--t-s); font-weight: 540; color: var(--ink-2);
  background: var(--paper); white-space: nowrap;
}
.seg button + button { margin-left: -1px; }
.seg button:first-of-type { border-radius: 6px 0 0 6px; }
.seg button:last-of-type { border-radius: 0 6px 6px 0; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; position: relative; z-index: 1; }

.stage { position: relative; flex: 1 1 auto; min-height: 0; margin: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.stage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.legend .keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-width: 0; }
.legend .seg { margin-right: 14px; }
.legend {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 52px;
  padding: 10px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
  font-size: var(--t-s); color: var(--ink-2);
}
.legend .it { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 2px 4px; margin: 0 -4px; border-radius: 4px; }
.legend button.it:hover, .legend button.it[aria-pressed="true"] { background: var(--wash); color: var(--ink); }
.legend .sw { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.legend .ramp { display: inline-flex; align-items: center; gap: 8px; }
.legend .ramp i { display: block; width: 120px; height: 10px; border-radius: 2px; }
.legend .ramp .num { color: var(--ink-3); font-size: var(--t-xs); }
.sw.c0 { background: var(--c0); } .sw.c1 { background: var(--c1); } .sw.c2 { background: var(--c2); } .sw.c3 { background: var(--c3); }
.sw.c4 { background: var(--c4); } .sw.c5 { background: repeating-linear-gradient(135deg, var(--c5) 0 3px, #cfcfcd 3px 4px); } .sw.c6 { background: var(--c6); }

.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 340px; background: var(--ink); color: #fff;
  padding: 9px 11px; border-radius: 8px; font-size: var(--t-s); line-height: 1.35; box-shadow: var(--shadow);
}
.tip b { display: block; font-weight: 640; font-size: var(--t-m); }
.tip .t2 { display: block; color: #c9ccd1; margin-top: 2px; }
.tip .t3 { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #fff; font-family: var(--mono); font-size: var(--t-xs); }
.tip .t3 i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- dossier (side panel) */
.dossier {
  flex: 0 0 var(--side); width: var(--side); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--rule); background: var(--paper); position: relative;
  padding: 22px 24px 48px; scrollbar-width: thin;
}
.dossier .x {
  position: sticky; top: 0; float: right; margin: -6px -10px 0 8px; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-2); background: var(--paper); z-index: 2;
}
.dossier .x:hover { background: var(--wash); color: var(--ink); }
.dossier .grab { display: none; }
.k { font: 500 var(--t-s)/1.2 var(--mono); color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; letter-spacing: 0; }
.k .badge { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--wash); color: var(--ink-2); }
.k .badge.on { background: #e8f3ea; color: #1c6b34; }
.dossier h1 { font-size: var(--t-xxl); line-height: 1.08; letter-spacing: -.025em; font-weight: 680; margin: 10px 0 8px; text-wrap: balance; overflow-wrap: anywhere; }
.dossier h1.long { font-size: var(--t-xl); letter-spacing: -.015em; }
.dossier .lede { font-size: var(--t-b); color: var(--ink-2); margin: 0 0 12px; text-wrap: pretty; }
.dossier .src { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 560; text-decoration: none; }
.dossier .srcs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }   /* Fedlex · GitHub · its versions */
.dossier .srcs > span { display: contents; }
.dossier .src:hover { text-decoration: underline; text-underline-offset: 3px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 18px 0 4px; border-top: 1px solid var(--rule); }
.facts dt, .facts dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-3); padding-right: 16px; white-space: nowrap; }
.facts dd { color: var(--ink); text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 7px; min-width: 0; }
.facts dd .sw { width: 10px; height: 10px; border-radius: 2px; }
.stat { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 2px; }
.stat b { font: 600 34px/1 var(--mono); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); }
.stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 2px; }
.stat2 .stat { margin: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.stat2 .stat b { font-size: 26px; }
.dossier section { margin-top: 26px; }
.dossier h2 {
  font: 600 var(--t-xs)/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
  margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.dossier h2 .n { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.dossier p { margin: 0 0 10px; }
.dossier .note { color: var(--ink-2); font-size: var(--t-s); }
#legend .note { flex-basis: 100%; color: var(--ink-3); font-size: var(--t-xs); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows .r {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 14px; width: 100%;
  padding: 8px 6px; margin: 0 -6px; width: calc(100% + 12px); text-align: left; text-decoration: none; border-radius: 4px;
}
.rows a.r:hover, .rows button.r:hover { background: var(--wash); }
.rows .r .a { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .r .a .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.rows .r .b { grid-column: 1; color: var(--ink-2); font-size: var(--t-s); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .r .v { grid-row: 1; grid-column: 2; font: 500 var(--t-s)/1.4 var(--mono); color: var(--ink-2); white-space: nowrap; }
.rows .r.wrap .b, .rows .r.wrap .a { white-space: normal; }
.rows .moreb { display: block; width: 100%; text-align: left; padding: 9px 0; color: var(--accent-ink); font-weight: 560; }
.rows .moreb:hover { text-decoration: underline; text-underline-offset: 3px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li button {
  display: grid; grid-template-columns: 5.4em minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left;
  padding: 5px 4px; margin: 0 -4px; width: calc(100% + 8px); border-radius: 4px;
}
.bars li button:hover { background: var(--wash); }
.bars .a { font-weight: 600; white-space: nowrap; }
.bars .t { position: relative; min-width: 0; height: 22px; display: flex; align-items: center; }
.bars .t i { position: absolute; left: 0; top: 4px; bottom: 4px; background: var(--c3); border-radius: 2px; }
.bars .t span { position: relative; padding-left: 7px; font-size: var(--t-s); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .v { font: 500 var(--t-s)/1 var(--mono); color: var(--ink-2); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font: 500 10.5px/1 var(--mono); fill: var(--ink-3); }
.chart .bar { fill: var(--c1); }
.chart .bar:hover, .chart .bar.on { fill: var(--accent); }
.chart { padding-top: 18px; }
.chart .top { position: absolute; top: 0; transform: translateX(-100%); padding-right: 4px; font: 500 var(--t-xs)/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.chart .cap { font: 500 var(--t-xs)/1.2 var(--mono); color: var(--ink-3); display: flex; justify-content: space-between; margin-top: 4px; }
.chart .peek { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font: 500 var(--t-xs)/1 var(--mono); padding: 5px 7px; border-radius: 5px; pointer-events: none; white-space: nowrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--ink); font-weight: 560; background: var(--paper); text-decoration: none;
}
.btn:hover { background: var(--ink); color: #fff; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ing { font-size: var(--t-s); color: var(--ink-2); white-space: pre-line; border-left: 2px solid var(--rule); padding-left: 12px; margin: 0; }
details.more > summary { cursor: pointer; color: var(--accent-ink); font-weight: 560; list-style: none; padding: 6px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }
.stack { display: flex; height: 12px; border-radius: 2px; overflow: hidden; margin: 10px 0 8px; gap: 1px; background: var(--paper); }
.stack i { display: block; height: 100%; }
.stackkey { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: var(--t-s); color: var(--ink-2); }
.stackkey span { display: flex; align-items: center; gap: 7px; }
.stackkey .num { color: var(--ink); text-align: right; }
.stackkey .sw { width: 10px; height: 10px; border-radius: 2px; }
.path { font-size: var(--t-s); color: var(--ink-2); margin: 0 0 10px; }
.path span + span::before { content: " › "; color: var(--rule-2); }
.empty { color: var(--ink-3); }
.spin { color: var(--ink-3); font-size: var(--t-s); }

/* ---------- network (canvas) */
#nstage canvas { cursor: grab; }
#nstage canvas:active { cursor: grabbing; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px;
  border: 1px solid var(--rule-2); font-size: var(--t-s); font-weight: 540; color: var(--ink-3); background: var(--paper);
}
.chip i { width: 14px; height: 3px; border-radius: 2px; opacity: .35; }
.chip .num { font-size: var(--t-xs); color: var(--ink-3); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] i { opacity: 1; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.fit { width: 30px; padding: 0; justify-content: center; color: var(--ink-2); }
#nfoot .it { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#nfoot .it.end { margin-left: auto; }
#nfoot i.ln { display: block; width: 18px; height: 3px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1.5px #fff; }
#nfoot i.pt { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.ntitle { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.ntitle .crumbs { font-size: var(--t-b); }
.ntitle .crumbs [aria-current] { max-width: 28em; overflow: hidden; text-overflow: ellipsis; }
.ntitle .crumbs a { min-width: 0; }
.nhint {
  position: absolute; left: 10px; top: 8px; z-index: 2; margin: 0; pointer-events: none; max-width: calc(100% - 20px);
  font-size: var(--t-s); color: var(--ink-2); background: rgba(255,255,255,.92); border: 1px solid var(--rule);
  padding: 6px 10px; border-radius: 6px; animation: nhint .5s ease-out; max-width: min(300px, calc(100% - 20px)); line-height: 1.4;
}
@keyframes nhint { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nhint.gone { opacity: 0; transition: opacity .6s ease; }
/* ---------- decision 35: brand, sub-row, questions, impact, cantons, health check, news */
.by { font: 500 var(--t-s)/1 var(--mono); color: var(--ink-3); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.by:hover { color: var(--ink); }
.subnav { display: flex; gap: 2px; padding: 8px max(14px, env(safe-area-inset-left, 0px)) 0; border-bottom: 1px solid var(--rule); flex: none; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { text-decoration: none; color: var(--ink-2); font-weight: 520; font-size: var(--t-m); padding: 6px 10px 9px; position: relative; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); }
.subnav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); }
.rows.asks .r .a { white-space: normal; font-weight: 560; }
.rows.asks .r .v { color: var(--ink-3); }
.rows button.r { font: inherit; }
.lede2 { font-size: var(--t-b); color: var(--ink); margin: 0 0 10px; text-wrap: pretty; }
.depth { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; color: var(--ink-2); font-size: var(--t-s); }
.depth b { color: var(--ink); font-weight: 600; }
.juris { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.juris li { display: contents; }
.juris .w { font: 560 var(--t-s)/1.3 var(--mono); }
.juris .t { position: relative; height: 10px; }
.juris .t i, .ctlist .t i, .cartlist .t i, .ktab .t i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c2); border-radius: 2px; }
.juris .num { font-size: var(--t-s); color: var(--ink-2); text-align: right; }
.page .doc.wide { max-width: 1100px; }
.csearch input { width: 100%; max-width: 520px; height: 40px; border: 1px solid var(--rule-2); border-radius: 8px; padding: 0 12px; font-size: var(--t-b); margin: 6px 0 4px; }
.csearch input:focus { outline: none; border-color: var(--ink); }
.strip { display: grid; grid-template-columns: repeat(26, 1fr); gap: 2px; min-width: 0; }
.strip i { display: block; height: 12px; border-radius: 1.5px; background: var(--wash-2); }
.strip i.c1 { background: var(--c3); } .strip i.c2 { background: var(--c2); } .strip i.c3 { background: var(--c1); }
.cthead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr) 150px; gap: 14px; padding: 0 0 4px; }
.cthead .strip b { font: 500 9px/1 var(--mono); color: var(--ink-3); text-align: center; overflow: hidden; }
.ctlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ctlist li { border-bottom: 1px solid var(--rule); }
.ctlist a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr) 150px; gap: 14px; align-items: center; padding: 9px 0; text-decoration: none; }
.ctlist a:hover { background: var(--wash); }
.ctlist .a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctlist .b, .ctab .b { color: var(--ink-2); font-size: var(--t-s); }
.ctlist .v { font: 500 var(--t-s)/1 var(--mono); color: var(--ink-2); text-align: right; white-space: nowrap; }
.page .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: 0; }
.page .crumb { margin: 0 0 6px; font-size: var(--t-m); }
.page .crumb a { color: var(--ink-2); text-decoration: none; }
.page .crumb a:hover { color: var(--ink); }
.page h2.acth { margin-top: 18px; font-size: var(--t-xxl); }
.page .stat1 { font-size: var(--t-b); }
.page .stat1 a { margin-left: 10px; color: var(--accent-ink); font-weight: 560; }
.ctab th { width: 190px; font-weight: 560; color: var(--ink); font-size: var(--t-m); white-space: nowrap; }
.ctab td.r { width: 40px; }
.ctab tr.none th, .ctab .none { color: var(--ink-3); }
.ct { display: inline-block; min-width: 24px; font: 600 var(--t-xs)/1 var(--mono); color: var(--ink-3); }
.cacts { list-style: none; margin: 0; padding: 0; }
.cacts li { margin: 0 0 4px; }
.cacts a { text-decoration: none; }
.cacts a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.arts { font: 500 var(--t-xs)/1.4 var(--mono); color: var(--ink-2); white-space: nowrap; }
.cartlist { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.cartlist a { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px; gap: 12px; align-items: center; padding: 5px 0; text-decoration: none; }
.cartlist a:hover { background: var(--wash); }
.cartlist .t, .ktab .t { position: relative; height: 12px; display: block; min-width: 80px; }
.cartlist .v { font: 500 var(--t-s)/1 var(--mono); color: var(--ink-2); text-align: right; }
.page .moreb { color: var(--accent-ink); font-weight: 560; padding: 6px 0; }
.page .moreb:hover { text-decoration: underline; text-underline-offset: 3px; }
.kscope { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 0; color: var(--ink-2); font-size: var(--t-m); }
.kscope select { height: 36px; border: 1px solid var(--rule-2); border-radius: 8px; padding: 0 8px; font: inherit; color: var(--ink); background: var(--paper); }
.ktoc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 18px 0 0; }
.ktoc a { font-size: var(--t-s); color: var(--ink-2); text-decoration: none; padding: 5px 9px; border: 1px solid var(--rule); border-radius: 999px; }
.ktoc a:hover { color: var(--ink); border-color: var(--ink); }
.kpart h2 { display: flex; align-items: baseline; gap: 12px; }
.kpart h2 .n { font-size: var(--t-l); color: var(--ink-3); font-weight: 500; }
.ktab a { text-decoration: none; font-weight: 560; }
.ktab a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ktab .cl { color: var(--ink-2); font-size: var(--t-s); }
.ktab td { overflow-wrap: break-word; }
.ktab td:first-child { width: 34%; min-width: 180px; }
.ktab td:first-child + td { width: 30%; min-width: 160px; }
.ktab .arts { white-space: normal; }
.ktab .arts.miss { color: var(--accent-ink); }
@media (max-width: 720px) {
  .by { display: none; }
  .cthead { display: none; }
  .ctlist a { grid-template-columns: minmax(0, 1fr) auto; }
  .ctlist .strip { grid-column: 1 / -1; grid-row: 2; }
  .ctab th { width: auto; white-space: normal; }
  .cartlist a { grid-template-columns: 70px minmax(0, 1fr) 76px; }
  .page .ktab thead { display: none; }
  .page .ktab tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .page .ktab td { display: block; border: 0; padding: 2px 0; width: auto; min-width: 0; }
  .page .ktab td:first-child + td::before { content: "→ "; color: var(--ink-3); }
  .page .ktab td.r { text-align: left; }
  .page .ktab td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nhint { animation: none; } }
#nmini {
  position: absolute; inset: auto auto 10px 10px; width: 112px; height: 112px; z-index: 2; cursor: pointer;
  background: rgba(255,255,255,.94); border-radius: 8px; box-shadow: 0 0 0 1px var(--rule), 0 2px 8px rgba(14,17,22,.08);
}
.tip .t4 { display: block; margin-top: 5px; color: #fff; }
.chip.past { border-style: dashed; }
.chip.past .num { font-family: var(--sans); }

/* ---------- the time view (decision 31) */
.tbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; flex: none;
  border: 1px solid var(--rule-2); font-size: var(--t-s); font-weight: 560; color: var(--ink-2); background: var(--paper);
}
.tbtn:hover { color: var(--ink); border-color: var(--ink); }
.tbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mapbar .tbtn { margin-left: auto; }
.timebar {
  flex: none; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 6px max(20px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--rule); background: var(--paper);
}
.timebar .trow { display: flex; align-items: center; gap: 14px; min-width: 0; }
.timebar .tplay {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: #fff;
}
.timebar .tplay:hover { background: var(--accent); }
.timebar .tyear { font: 600 28px/1 var(--mono); letter-spacing: -.02em; width: 3.1em; flex: none; color: var(--ink); }
.timebar .ttrack { position: relative; flex: 1 1 auto; min-width: 120px; height: 62px; cursor: ew-resize; touch-action: none; border-radius: 4px; }
.timebar .ttrack:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.timebar .ttrack canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.timebar .tstat { flex: none; width: 15em; font: 500 var(--t-s)/1.35 var(--mono); color: var(--ink-2); }
.timebar .tclose { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.timebar .tclose:hover { background: var(--wash); color: var(--ink); }
.timebar .tnote { margin: 4px 0 0; font-size: var(--t-xs); line-height: 1.4; color: var(--ink-3); max-width: 110ch; }
.tip .t4::before { content: "→ "; color: #9aa0a8; }
#nfoot .it.num { margin-left: auto; color: var(--ink-3); font-size: var(--t-xs); }

/* ---------- hierarchy (SVG) */
.vhead {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; min-height: var(--bar);
  padding: 10px max(20px, env(safe-area-inset-right, 0px)) 6px max(20px, env(safe-area-inset-left, 0px));
}
.vhead h1 { font-size: var(--t-l); font-weight: 640; letter-spacing: -.01em; margin: 0; flex: 1 1 auto; min-width: 0; text-wrap: balance; }
.scroller { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#hsvg { display: block; margin-left: max(20px, env(safe-area-inset-left, 0px)); }
#hsvg .row { font: 600 var(--t-s)/1 var(--sans); fill: var(--ink); }
#hsvg .rown { font: 500 var(--t-xs)/1 var(--mono); fill: var(--ink-3); }
#hsvg .divider { stroke: var(--ink); stroke-width: 1; }
#hsvg .divt { font: 500 var(--t-xs)/1 var(--sans); fill: var(--ink-2); }
#hsvg .blk rect { stroke: none; }
#hsvg .blk text { font: 600 10.5px/1 var(--sans); pointer-events: none; }
#hsvg .blk { cursor: pointer; }
#hsvg .blk:focus-visible rect { outline: none; stroke: var(--accent); stroke-width: 2; }
#hsvg .flow { fill: var(--c2); opacity: .32; transition: opacity .15s; }
#hsvg .flow.f0 { fill: var(--c1); }
#hsvg .stub { opacity: .9; }
#hsvg .trunk { fill: none; stroke: var(--c0); stroke-width: 1.4; opacity: .5; }
#hsvg .trunkt { font: 600 var(--t-xs)/1 var(--sans); fill: var(--c0); }
#hsvg .colt { font: 600 10.5px/1 var(--mono); fill: var(--ink-2); }
#hsvg .bvt { font: 500 10.5px/1 var(--sans); fill: var(--ink-2); }
#hsvg.dim .flow { opacity: .07; }
#hsvg.dim .blk:not(.hot) { opacity: .35; }
#hsvg.dim .stub:not(.hot) { opacity: .2; }
#hsvg .flow.hot { opacity: .78; }
#hsvg .sel rect { stroke: var(--accent); stroke-width: 2; }
.hkey { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: var(--t-s); color: var(--ink-2); }
.hkey > span { color: var(--ink-3); }
.hkey button { display: inline-flex; align-items: center; gap: 7px; padding: 3px 5px; margin: 0 -5px; border-radius: 4px; }
.hkey button:hover, .hkey button[aria-pressed="true"] { background: var(--wash); color: var(--ink); }
.hkey .sw { width: 12px; height: 12px; border-radius: 2px; }
.sw.s-fed { background: var(--c1); } .sw.s-unres, .sw.s-lower { background: var(--c4); } .sw.s-none { background: var(--rule-2); }
.sw.s-noing { background: repeating-linear-gradient(135deg, var(--rule-2) 0 2px, transparent 2px 4px); outline: 1px solid var(--rule-2); outline-offset: -1px; }
.hfoot { flex: none; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); font-size: var(--t-s); color: var(--ink-2); }
.hfoot .scl { display: inline-flex; align-items: center; gap: 8px; }
.hfoot .scl i { display: inline-block; height: 8px; background: var(--ink-2); border-radius: 1px; }

/* ---------- matrix (canvas) */
.mwrap { position: relative; }
.mwrap canvas { position: absolute; left: 0; top: 0; }
#mx { outline: none; }
#mx:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mramp { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-s); color: var(--ink-2); }
.mramp i { display: inline-block; width: 120px; height: 10px; border-radius: 2px; }
.mramp .num { font-size: var(--t-xs); color: var(--ink-3); }
.mshare { display: flex; height: 10px; border-radius: 2px; overflow: hidden; gap: 1px; width: 220px; }
.mshare i { display: block; height: 100%; }
.mkey { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mkey span { display: inline-flex; align-items: center; gap: 6px; }
.mkey .sw { width: 10px; height: 10px; border-radius: 2px; }
.lowbtn { color: var(--accent-ink); font-weight: 560; }
.lowbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- method (a page) */
.page { overflow-y: auto; display: block; }
.page .doc { max-width: 760px; margin: 0 auto; padding: 40px max(20px, env(safe-area-inset-right, 0px)) 80px max(20px, env(safe-area-inset-left, 0px)); }
.page h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.03em; font-weight: 680; margin: 0 0 14px; text-wrap: balance; }
.page h2 { font-size: var(--t-xl); letter-spacing: -.015em; margin: 44px 0 12px; font-weight: 640; text-wrap: balance; }
.page h3 { font-size: var(--t-l); margin: 34px 0 10px; font-weight: 640; }
.page p, .page li { font-size: var(--t-b); line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.page .lead { font-size: var(--t-l); color: var(--ink-2); }
.page ul { padding-left: 1.1em; }
.page li { margin: 6px 0; }
.page .tw { overflow-x: auto; margin: 12px 0; }
.page table { border-collapse: collapse; width: 100%; font-size: var(--t-m); }
.page td, .page th { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.page th { font-weight: 600; color: var(--ink-3); font-size: var(--t-s); }
.page td.r, .page th.r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.page .note { color: var(--ink-2); font-size: var(--t-m); }
.page .sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.page .foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: var(--t-s); }

.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: var(--t-s); background: var(--paper); z-index: 5; }
.loading .bar { width: 160px; height: 2px; background: var(--rule); overflow: hidden; margin-top: 12px; }
.loading .bar i { display: block; height: 100%; width: 40%; background: var(--ink); animation: load 1.1s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- medium screens: the panel floats over the view */
@media (max-width: 1180px) {
  .top { gap: 18px; }
  .views a { padding: 8px 8px; }
  .dossier { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; box-shadow: var(--shadow); width: min(var(--side), 92vw); }
}
@media (max-width: 960px) {
  .brand .name { display: none; }
}

/* ---------- phones */
@media (max-width: 720px) {
  :root { --top: 100px; --bar: 46px; }
  .top { flex-wrap: wrap; height: var(--top); align-content: flex-start; gap: 0 10px; padding-top: 0; }
  .brand { height: 52px; order: 0; }
  .brand .name { display: inline; max-width: none; font-size: var(--t-m); }
  .qbtn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; margin-left: auto; order: 1; color: var(--ink-2); }
  .qbtn:hover { background: var(--wash); }
  .langs { display: none; }
  .langsel {
    display: block; order: 2; height: 34px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--paper);
    font: 560 var(--t-s)/1 var(--mono); padding: 0 8px; color: var(--ink);
  }
  .brand .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 150px); }
  body.sheet #v-map { padding-bottom: 46dvh; }
  body.sheet #v-map .legend { display: none; }
  .views { order: 3; width: 100%; height: 48px; align-items: center; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 4px; gap: 0; }
  .views::-webkit-scrollbar { display: none; }
  .views a { padding: 8px 10px; }
  .views a[aria-current="page"]::after { bottom: -6px; }
  .search { position: absolute; left: 0; right: 0; top: 0; height: 52px; max-width: none; margin: 0; padding: 7px 12px; background: var(--paper); z-index: 5; display: none; }
  .search.open { display: block; }
  .search .glass { left: 24px; top: 18px; }
  .search input { padding-right: 44px; }
  .search .closeq { display: grid; place-items: center; position: absolute; right: 16px; top: 10px; width: 32px; height: 32px; color: var(--ink-2); }
  .results { position: fixed; top: 52px; left: 8px; right: 8px; max-height: calc(100dvh - 64px); }
  .langs button { padding: 8px 5px; }
  .mapbar { gap: 10px; }
  .seg .seglabel { display: none; }
  .seg button { padding: 0 10px; height: 30px; }
  .crumbs .tot { display: none; }
  .stage { margin: 0 8px; }
  .legend { gap: 6px 12px; padding: 8px 12px 10px; font-size: var(--t-xs); min-height: 0; }
  .legend .keys { gap: 4px 12px; }
  .dossier {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 46dvh; max-height: calc(100dvh - 60px);
    border-left: 0; border-top: 1px solid var(--rule); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(14, 17, 22, .14);
    padding: 8px 18px calc(32px + env(safe-area-inset-bottom, 0px)); z-index: 35; transition: height .28s var(--ease);
  }
  .dossier.full { height: calc(100dvh - 60px); }
  .foot .src, .foot .gl { display: none; }
  .foot { gap: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .dossier .grab { display: block; position: sticky; top: 0; width: 100%; height: 24px; margin-bottom: 2px; z-index: 3; background: var(--paper); }
  .dossier .grab::before { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--rule-2); }
  .dossier .x { top: 24px; }
  .dossier h1 { font-size: 26px; }
  .page h1 { font-size: 30px; }
  .vhead h1 { font-size: var(--t-b); }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .chip .num { display: none; }
  .chip { padding: 0 9px; gap: 6px; font-size: var(--t-xs); }
  #nfoot .it.num { margin-left: 0; width: 100%; white-space: normal; }
  body.sheet #v-net { padding-bottom: 46dvh; }
  body.sheet #v-net .legend { display: none; }
  .ntitle .crumbs { font-size: var(--t-m); }
  .ntitle .crumbs .upbtn { margin-right: 4px; }
  #nmini { width: 84px; height: 84px; inset: auto auto 6px 6px; }
  .tbtn span { display: none; }
  #v-net .vhead { position: relative; }
  #v-net .vhead .tbtn { position: absolute; right: 8px; top: 6px; }
  #v-net .vhead .ntitle { padding-right: 46px; }
  .tbtn { padding: 0 9px; }
  .timebar { padding: 6px 8px 4px; }
  .timebar .trow { flex-wrap: wrap; gap: 6px 10px; }
  .timebar .tyear { font-size: 22px; width: auto; }
  .timebar .tstat { order: 3; width: auto; flex: 1 1 auto; font-size: var(--t-xs); }
  .timebar .ttrack { order: 4; flex: 1 1 100%; height: 52px; }
  .timebar .tclose { order: 2; margin-left: auto; }
  .timebar .tnote { font-size: 10.5px; margin-top: 2px; }
  .nhint { font-size: var(--t-xs); left: 6px; right: 6px; top: 6px; max-width: none; text-align: center; }
  .hkey, .hfoot { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: var(--t-xs); }
  .hkey::-webkit-scrollbar, .hfoot::-webkit-scrollbar { display: none; }
  .hkey button, .hfoot > span { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
