:root {
  --ink: #3c3c3b; --muted: #6f6f6e; --surface: #f2f2f2; --line: #d9d9d8; --paper: #ffffff;
  --accent: #d50f25; --green: #2f7d4f; --yellow: #f2b705; --red: #d50f25;
  --green-bg: #e6f2ea; --yellow-bg: #fdf3d0; --red-bg: #fbe3e6;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.45; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
header.top { border-bottom: 3px solid var(--accent); background: var(--paper); }
header.top .bar { max-width: 1280px; margin: 0 auto; padding: .6rem 1.2rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
header.top .brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-right: .6rem; }
header.top nav { display: flex; gap: .15rem; flex-wrap: wrap; flex: 1; }
header.top nav a { padding: .3rem .6rem; text-decoration: none; border-radius: 3px; }
header.top nav a.on { background: var(--surface); font-weight: 600; }
header.top .who { display: flex; gap: .6rem; align-items: center; color: var(--muted); font-size: .9rem; }
main { max-width: 1280px; margin: 0 auto; padding: 1.2rem; }
footer { max-width: 1280px; margin: 2rem auto 1rem; padding: 0 1.2rem; color: var(--muted); font-size: .85rem; }
h1 { font-size: 1.5rem; margin: .2rem 0 .8rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
p.lead { color: var(--muted); max-width: 70rem; margin-top: 0; }
table { border-collapse: collapse; width: 100%; margin: .4rem 0 1rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font-weight: 600; font-size: .9rem; white-space: nowrap; }
td.num, th.num { text-align: right; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip::before { font-size: .8rem; }
.chip.green { background: var(--green-bg); color: #1d5a37; border-color: #b9dcc6; } .chip.green::before { content: "●"; color: var(--green); }
.chip.yellow { background: var(--yellow-bg); color: #6b5200; border-color: #ecd98a; } .chip.yellow::before { content: "▲"; color: #b58900; }
.chip.red { background: var(--red-bg); color: #8f0a19; border-color: #f0b3ba; } .chip.red::before { content: "■"; color: var(--red); }
.chip.upcoming, .chip.not_applicable { background: var(--surface); color: var(--muted); border-color: var(--line); }
.chip.upcoming::before { content: "○"; } .chip.not_applicable::before { content: "–"; }
.chip.big { font-size: 1rem; padding: .25rem .8rem; }
.tag { display: inline-block; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 3px; font-size: .8rem;
  background: var(--paper); color: var(--muted); white-space: nowrap; }
.tag.warn { border-color: var(--accent); color: var(--accent); }
.card { border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0; background: var(--paper); }
.card > .head { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .7rem .9rem; background: var(--surface);
  border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.card > .head h2 { margin: 0; flex: 1; font-size: 1.1rem; }
.card > .body { padding: .6rem .9rem .9rem; }
.card.red { border-left: 6px solid var(--red); } .card.yellow { border-left: 6px solid var(--yellow); } .card.green { border-left: 6px solid var(--green); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .3rem 1.2rem; margin: .4rem 0 .8rem; }
.facts div span { display: block; color: var(--muted); font-size: .8rem; }
.alert { border-left: 4px solid var(--accent); background: var(--red-bg); padding: .55rem .8rem; margin: .5rem 0; }
.note { border-left: 4px solid var(--yellow); background: var(--yellow-bg); padding: .55rem .8rem; margin: .5rem 0; }
.info { border-left: 4px solid var(--line); background: var(--surface); padding: .55rem .8rem; margin: .5rem 0; }
.flash { padding: .55rem .8rem; margin: 0 0 .8rem; border-radius: 4px; }
.flash.ok { background: var(--green-bg); } .flash.error { background: var(--red-bg); border-left: 4px solid var(--accent); }
details { margin: .2rem 0; } details > summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
details[open] > summary { margin-bottom: .3rem; }
.trace { background: var(--surface); padding: .5rem .7rem; border-radius: 4px; font-size: .9rem; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .3rem 0; }
.chain .node { border: 1px solid var(--line); background: var(--paper); border-radius: 4px; padding: .1rem .45rem; }
.chain .node.ev { border-color: var(--ink); font-weight: 600; }
.chain .edge { color: var(--muted); font-size: .82rem; }
.chain .edge.hit { color: var(--accent); font-weight: 600; }
.slot { margin: 0 0 .45rem; } .slot:last-child { margin-bottom: 0; }
form.inline { display: inline; }
form.panel { background: var(--surface); padding: .8rem .9rem; border-radius: 6px; margin: .6rem 0 1rem; }
form.panel .row { display: flex; gap: .8rem 1rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .6rem; }
label { display: block; font-size: .85rem; color: var(--muted); }
label.check { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-size: .92rem; margin-right: .9rem; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  font: inherit; color: var(--ink); padding: .35rem .5rem; border: 1px solid #b9b9b8; border-radius: 4px; background: var(--paper);
  min-width: 12rem; max-width: 100%; }
textarea { width: 100%; min-height: 6rem; }
select[multiple] { min-height: 6.5rem; }
button, .button { font: inherit; padding: .38rem .8rem; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: #222; color: #fff; }
button.ghost, .button.ghost { background: var(--paper); color: var(--ink); }
button.ghost:hover, .button.ghost:hover { background: var(--surface); color: var(--ink); }
button.small { padding: .15rem .5rem; font-size: .85rem; }
button.danger { border-color: var(--accent); background: var(--paper); color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 1.5rem; }
.matrix td, .matrix th { text-align: left; }
.login { max-width: 24rem; margin: 4rem auto; }
.login input { width: 100%; margin-bottom: .7rem; }
.login .guest { margin-top: 1.2rem; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
pre.code { background: var(--surface); padding: .7rem; border-radius: 4px; overflow-x: auto; font-size: .82rem; }
.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin: .4rem 0 .8rem; align-items: center; }
td.verdict label { display: inline-flex; margin-right: .5rem; color: var(--ink); gap: .2rem; align-items: center; white-space: nowrap; }
/* narrow screens: the navigation is one row to swipe, wide tables scroll inside the page instead of widening it */
@media (max-width: 720px) {
  header.top .bar { gap: .3rem .8rem; padding: .5rem .8rem; }
  header.top .brand { flex: 1 1 auto; }
  header.top .who { order: 2; flex-wrap: wrap; }
  header.top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
  header.top nav a { white-space: nowrap; }
  main { padding: .8rem; }
  main table { display: block; overflow-x: auto; max-width: 100%; }
  input[type=text], input[type=password], input[type=date], input[type=number], select, textarea { min-width: 0; }
}
@media print {
  header.top nav, header.top .who, form.panel, .toolbar, .noprint { display: none !important; }
  details > summary { display: none; } details > *:not(summary) { display: block; }
  .card { break-inside: avoid; } main { padding: 0; } html { font-size: 12px; }
}
.grow { flex: 1; } .wide { width: 100%; } .mt { margin-top: .4rem; }
table.obl { table-layout: fixed; }
table.obl th:nth-child(1) { width: 7.5rem; } table.obl th:nth-child(2) { width: 24%; } table.obl th:nth-child(3) { width: 24%; }
table.obl th:nth-child(5) { width: 11%; }
.lawtext { background: var(--surface); padding: 1rem 1.2rem; border-radius: 6px; max-width: 62rem; line-height: 1.6; white-space: pre-wrap; }
table.cov td:first-child { width: 2rem; } div.panel { background: var(--surface); padding: .8rem .9rem; border-radius: 6px; margin: .6rem 0 1rem; }
.scope td, .scope th { font-size: .88rem; padding: .3rem .5rem; }
table.wl th:nth-child(1) { width: 8rem; } table.wl th:nth-child(6) { width: 26%; }
.chip.none { background: var(--surface); color: var(--ink); border-color: #9a9a99; } .chip.none::before { content: "?"; }
.card.none { border-left: 6px solid #9a9a99; }
.stops { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.stops a.stop { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; text-decoration: none; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper); min-width: 9rem; max-width: 13rem; }
.stops a.stop.on { border-color: var(--ink); background: var(--surface); }
.stops a.stop.future { border-style: dashed; }
header.top .brand .tagline { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); line-height: 1.1; }
/* diagrams of the graph underneath */
.gv-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; padding: .4rem; background: var(--paper); margin: .6rem 0; }
svg.gv { display: block; font-family: inherit; max-width: 100%; height: auto; }
svg.gv .gv-node rect { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
svg.gv a:hover .gv-node rect { stroke: var(--ink); }
svg.gv .gv-node.green rect { fill: var(--green-bg); stroke: var(--green); }
svg.gv .gv-node.yellow rect { fill: var(--yellow-bg); stroke: var(--yellow); }
svg.gv .gv-node.red rect { fill: var(--red-bg); stroke: var(--red); }
svg.gv .gv-node.upcoming rect, svg.gv .gv-node.text rect { fill: var(--surface); }
svg.gv .gv-node.assessed rect { stroke: var(--ink); stroke-width: 2; }
svg.gv .gv-node.hit rect { stroke: var(--red); stroke-width: 2; }
svg.gv .gv-node.missing rect, svg.gv .gv-node.other rect { stroke-dasharray: 5 4; }
svg.gv .gv-kind { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
svg.gv .gv-label { font-size: 12px; font-weight: 600; fill: var(--ink); }
svg.gv .gv-sub { font-size: 10.5px; fill: var(--muted); }
svg.gv .gv-edge { fill: none; stroke: #9a9a99; stroke-width: 1.3; }
svg.gv .gv-edge.derived { stroke: var(--ink); stroke-dasharray: 5 4; }
svg.gv .gv-edge.join { stroke: var(--red); }
svg.gv .gv-edge.other { stroke-dasharray: 2 4; }
svg.gv .gv-head { fill: #9a9a99; }
svg.gv .gv-el { font-size: 10px; fill: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
svg.gv .gv-el.derived { fill: var(--ink); font-family: inherit; font-weight: 600; }
svg.gv .gv-el.join { fill: var(--red); }
.gv-legend .gv-key { display: inline-block; width: 1.8rem; border-top: 2px solid #9a9a99; vertical-align: middle; margin: 0 .3rem 0 .8rem; }
.gv-legend .gv-key.dashed { border-top: 2px dashed var(--ink); }
.gv-legend .gv-key.join { border-top: 2px solid var(--red); }
pre.turtle { background: var(--surface); padding: .8rem; border-radius: 6px; overflow-x: auto; font-size: .82rem; line-height: 1.35; }
.prepared { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.prepared a.stop { text-decoration: none; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; max-width: 24rem; font-size: .9rem; }
.prepared a.stop.on { border-color: var(--ink); background: var(--surface); }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
a.button { display: inline-block; text-decoration: none; }
.gv-wrap.wide { width: min(96vw, 1760px); margin-left: calc((100% - min(96vw, 1760px)) / 2); }
.tag.bad { border-color: var(--red); background: var(--red-bg); color: var(--red); font-weight: 600; }
.lawdiff { font-size: .9rem; padding: .25rem .6rem; margin: .15rem 0; border-left: 3px solid var(--line); }
.lawdiff.removed { border-color: var(--red); background: var(--red-bg); text-decoration: line-through; text-decoration-color: #b58; }
.lawdiff.added { border-color: var(--green); background: var(--green-bg); }
