/* factura-subterana: a bill on cool grey paper, the stamped document in white, coral only for marks added on top */
:root {
  --bg: #eef1f5; --bg2: #e2e7ee; --card: #ffffff; --fg: #0f1b2d; --mut: #3a4960; --line: #b9c3d0; --line-soft: #d5dce6;
  --acc: #882014; --coral: #e8563f; --link: #0b4a8f; --ok: #0d5c52;
  --kA: #1273c4; --kC: #0f8a7e; --kK: #1f2f6b; --kO: #7a4fc4; --kS: #44546a; --kL: #44546a; --kT: #1f2f6b;
  --map-bg: #e3e8ef; --map-minor: #c9d0db; --map-mid: #b4bdcb; --map-major: #9ba6b8; --map-water: #c3d6ea; --map-sector: #8793a6; --sel: #0f1b2d; --paper: #ffffff; --ink-doc: #10151c;
  --topbar: 48px; --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --radius: 10px; --shadow: 0 1px 0 rgba(15, 27, 45, .05), 0 14px 34px -16px rgba(15, 27, 45, .38);
  color-scheme: light;
}
:root.dark {
  --bg: #0c1220; --bg2: #141d30; --card: #131b2c; --fg: #eef2f7; --mut: #b9c4d3; --line: #33415a; --line-soft: #222d42;
  --acc: #ffb4a6; --coral: #ff7a63; --link: #8cc4ff; --ok: #7fe0d2;
  --kA: #4aa8ff; --kC: #3fd0c0; --kK: #a9b8ff; --kO: #c9a3ff; --kS: #8fa0b8; --kL: #8fa0b8; --kT: #a9b8ff;
  --map-bg: #080d18; --map-minor: #1c2638; --map-mid: #27344b; --map-major: #36465f; --map-water: #14263c; --map-sector: #4a5a75; --sel: #ffffff;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 14px 38px -14px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
svg[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 14px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); overflow-anchor: none; }
a { color: var(--link); text-underline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--fg); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
section[id], [id].streetcol { scroll-margin-top: calc(var(--topbar) + 14px); }

.topbar { position: sticky; top: 0; z-index: 40; height: calc(var(--topbar) + var(--browser-safe-top, env(safe-area-inset-top))); padding: var(--browser-safe-top, env(safe-area-inset-top)) 16px 0; display: flex; align-items: center; gap: 14px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); border-bottom: 1px solid var(--line-soft); font: 500 14px/1 var(--sans); }
.home { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 600; white-space: nowrap; }
.motif { width: 22px; height: 22px; color: var(--fg); }
.topnav { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; }
.home, .chip, .icon-btn { flex: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--mut); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.topnav a:hover { color: var(--fg); }
.spacer { flex: 1 1 0; min-width: 0; }
.chip { color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 7px 11px; font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; font: 600 18px/1 var(--sans); padding: 0; }
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }
@media (max-width: 720px) { .topnav { display: none; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--fg); background: var(--fg); color: var(--bg); border-radius: 8px; padding: 10px 16px; font: 600 15px/1.2 var(--sans); cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.small { padding: 7px 11px; font-size: 13.5px; }
@media (pointer: coarse) { .btn { min-height: 44px; } }

/* hero */
.hero { padding: 26px 0 8px; }
.herotext, .herogrid { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.kicker { font: 600 13px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin: 0 0 12px; }
h1 { font: 700 clamp(30px, 4.4vw, 50px)/1.08 var(--sans); letter-spacing: -.022em; margin: 0 0 14px; max-width: 26ch; }
.deck { font-size: 18.5px; color: var(--mut); margin: 0 0 22px; max-width: 70ch; }
.herogrid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.herogrid h2 { font: 650 20px/1.25 var(--sans); letter-spacing: -.005em; margin: 0 0 12px; }
@media (max-width: 900px) { .herogrid { grid-template-columns: minmax(0, 1fr); gap: 26px; } h1 { font-size: clamp(27px, 7.6vw, 34px); } .deck { font-size: 16.5px; } }

/* the bill stub */
.bill { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px 12px; box-shadow: var(--shadow); position: relative; }
.bill::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px; background: linear-gradient(-45deg, transparent 5px, var(--card) 0) 0 0 / 10px 7px repeat-x, linear-gradient(45deg, transparent 5px, var(--card) 0) 0 0 / 10px 7px repeat-x; filter: drop-shadow(0 1px 0 var(--line)); }
.stubtitle { font: 500 12.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.billin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bill label, .finder label, .reqtool label, .tabfilter label { display: block; font: 600 13.5px/1.25 var(--sans); margin-bottom: 5px; }
.bill input { width: 100%; font: 500 20px/1.2 var(--mono); padding: 10px 11px; border: 2px solid var(--fg); border-radius: 7px; background: var(--card); color: var(--fg); }
.billt { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font: 400 14.5px/1.3 var(--mono); }
.billt th, .billt td { padding: 5px 0; text-align: right; border-bottom: 1px dotted var(--line); font-weight: 400; }
.billt thead th { font: 600 12.5px/1.2 var(--sans); color: var(--mut); }
.billt tbody th { text-align: left; font-family: var(--sans); }
.billt .tot th, .billt .tot td { font-weight: 600; border-bottom: 0; border-top: 1.5px solid var(--fg); }
.plus { margin: 10px 0 2px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plus b { font: 600 clamp(30px, 6vw, 38px)/1 var(--mono); color: var(--acc); letter-spacing: -.02em; }
.plus span { font-size: 15px; color: var(--mut); }
.year, .eur, .example { margin: 4px 0 0; font-size: 14px; color: var(--mut); line-height: 1.45; }
.status { font-size: 14.5px; color: var(--mut); margin: 6px 0 0; }
.status.err { color: var(--acc); font-weight: 600; }
.billnotes { margin-top: 26px; }

/* street finder */
.finder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: end; }
.finder label { grid-column: 1 / -1; margin-bottom: 0; }
.finder .f { position: relative; min-width: 0; }
.finder input { width: 100%; font: 500 18px/1.2 var(--sans); padding: 13px 14px; border: 2.5px solid var(--fg); border-radius: 9px; background: var(--card); color: var(--fg); }
.finder input::placeholder { color: var(--mut); opacity: .85; }
.finder input:focus, .bill input:focus { outline: 3px solid var(--link); outline-offset: 1px; }
.sugg { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--shadow); max-height: 320px; overflow: auto; position: absolute; left: 0; right: 0; z-index: 30; }
.sugg li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 10px; border-radius: 7px; cursor: pointer; align-items: baseline; }
.sugg li:hover, .sugg li.act { background: var(--bg2); }
.sugg .l { font-weight: 600; } .sugg .p { color: var(--mut); font-size: 13.5px; white-space: nowrap; }
.sugg .p b { color: var(--acc); font-weight: 600; }
.help { font-size: 14.5px; color: var(--mut); margin: 8px 0 0; max-width: 62ch; }

/* the street card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px; box-shadow: var(--shadow); margin-top: 14px; }
.card h3 { font: 700 23px/1.15 var(--sans); letter-spacing: -.01em; margin: 0 0 4px; }
.card .sub { margin: 0 0 8px; color: var(--mut); font-size: 14.5px; }
.card .verdict { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.card p { margin: 8px 0; font-size: 15.5px; line-height: 1.5; }
.card h4 { font: 650 15px/1.3 var(--sans); margin: 18px 0 6px; }
.rowlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.rowlist li { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.rl-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 15px; }
.rl-head .nr { font: 500 13.5px/1.2 var(--mono); color: var(--mut); }
.rl-head b { font-weight: 600; }
.rl-meta { margin: 3px 0 0; font-size: 14px; color: var(--mut); line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.tag { font: 500 12.5px/1.3 var(--sans); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; color: var(--fg); }
.tag.leg { border-color: var(--coral); }
.net { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.net::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--kA); flex: none; }
.net.kC::before { background: var(--kC); } .net.kK::before { background: var(--kK); } .net.kQ::before { background: var(--kA); border-radius: 50%; } .net.kD::before { background: var(--kK); border-radius: 50%; }
/* the row cut from the scan: always white paper, in both themes */
.scanrow { display: block; width: 100%; background-color: var(--paper); background-repeat: no-repeat; border: 1px solid var(--line); border-radius: 2px; margin-top: 8px; }
.scanrow.half + .scanrow.half { margin-top: -1px; }
.rl-doc { margin: 4px 0 0 !important; font: 400 14px/1.4 var(--mono); }
.pagelink { font-size: 13.5px; }
.card .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.near { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
.near li { margin: 4px 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.oldlist { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14.5px; }
.oldlist li { padding: 6px 0 6px 12px; border-left: 3px solid var(--kO); margin: 6px 0; line-height: 1.45; }
.oldlist.ops li { border-color: var(--line); }
.oldlist small, .note { color: var(--mut); font-size: 13.5px; }

/* ladder */
.ladder { list-style: none; margin: 14px 0; padding: 0; counter-reset: rung; }
.ladder li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; position: relative; padding-bottom: 10px; counter-increment: rung; }
.ladder li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: -2px; width: 2px; background: var(--line); }
.ladder li:last-child::before { display: none; }
.rung { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; font: 600 13px/1 var(--mono); color: var(--mut); position: relative; z-index: 1; }
.rung::after { content: counter(rung); }
.ladder .on .rung { background: var(--coral); border-color: var(--coral); color: #1a0d0a; }
.ladder .lt { padding-top: 3px; font-size: 15.5px; line-height: 1.35; }
.ladder .on .lt { font-weight: 600; }
.ladder .off .lt { color: var(--mut); }
.ladder small { display: block; font-weight: 400; color: var(--mut); font-size: 13.5px; }
.card .ladder { margin: 8px 0 4px; }
.card .ladder li { padding-bottom: 6px; grid-template-columns: 26px minmax(0, 1fr); }
.card .rung { width: 22px; height: 22px; font-size: 11.5px; }
.card .ladder li::before { left: 10px; top: 21px; }
.card .ladder .lt { font-size: 14.5px; padding-top: 1px; }

/* map stage */
.stagewrap { position: relative; max-width: 1180px; margin: 14px auto 0; padding: 0 16px; }
.stage { position: relative; height: clamp(420px, calc(var(--vh, 1vh) * 74), 780px); margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--map-bg); border: 1px solid var(--line); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.stage canvas.grabbing { cursor: grabbing; }
.map-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; }
.map-tools .btn.small { background: var(--card); color: var(--fg); border-color: var(--line); }
.stage .legend { position: absolute; right: 12px; bottom: 30px; display: flex; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--card) 90%, transparent); padding: 8px 10px; border-radius: 8px; font: 500 13px/1.25 var(--sans); color: var(--fg); border: 1px solid var(--line-soft); max-width: 62%; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 20px; height: 0; border-top: 3px solid var(--fg); display: inline-block; flex: none; }
.legend i.lA { border-color: var(--kA); } .legend i.lC { border-color: var(--kC); } .legend i.lK { border-color: var(--kK); border-top-width: 4.5px; } .legend i.lold { border-color: var(--kO); }
.legend i.lx { width: 11px; height: 11px; border: 2.5px solid var(--fg); border-radius: 50%; margin: 0 4.5px; } .legend i.lst { border-top-style: dashed; }
.attrib { position: absolute; right: 8px; bottom: 6px; margin: 0; font: 400 11.5px/1.2 var(--sans); color: var(--mut); background: color-mix(in srgb, var(--card) 80%, transparent); padding: 3px 7px; border-radius: 5px; pointer-events: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); font-size: 15px; margin: 0; }
.tip { position: absolute; z-index: 6; pointer-events: none; background: var(--fg); color: var(--bg); font: 500 13px/1.3 var(--sans); padding: 5px 9px; border-radius: 6px; max-width: 260px; transform: translate(-50%, calc(-100% - 12px)); }
.tip small { display: block; opacity: .85; font-size: 12px; }
.stagewrap .card { position: absolute; left: 28px; bottom: 14px; width: min(430px, calc(100% - 56px)); max-height: calc(100% - 150px); overflow: auto; z-index: 5; margin-top: 0; }
@media (max-width: 860px) { .stagewrap .card { position: static; width: auto; max-height: none; margin-top: 12px; } .stage { height: clamp(360px, calc(var(--vh, 1vh) * 58), 600px); }
  .stage .legend { bottom: 26px; left: 8px; right: 8px; max-width: none; flex-direction: row; flex-wrap: wrap; gap: 3px 12px; font-size: 12px; padding: 6px 9px; }
  .map-tools { top: 10px; right: 10px; } }
.maprow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hint { font-size: 14px; color: var(--mut); }
.tiers li { margin: 8px 0; }

/* share */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-row .lbl { font-size: 13.5px; color: var(--mut); margin-right: 2px; }
.share-row a, .share-row button { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line-soft); background: transparent; color: var(--fg); cursor: pointer; padding: 0; }
.share-row svg { width: 19px; height: 19px; }
.share-row a:hover, .share-row button:hover, .share-row a:focus-visible, .share-row button:focus-visible { color: var(--acc); border-color: var(--acc); }
@media (pointer: coarse) { .share-row a, .share-row button { width: 44px; height: 44px; } }

/* reading sections */
.block { padding: 40px 0 6px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wide.narrow { max-width: 900px; }
h2 { font: 700 clamp(25px, 3vw, 33px)/1.15 var(--sans); margin: 0 0 14px; letter-spacing: -.016em; position: relative; }
h3 { font: 650 19.5px/1.25 var(--sans); margin: 26px 0 8px; letter-spacing: -.005em; }
h2 .anchor { position: absolute; left: -1.05em; color: var(--mut); text-decoration: none; font-weight: 400; opacity: 0; }
h2:hover .anchor, h2 .anchor:focus { opacity: 1; }
.herogrid h2 .anchor { display: none; }
.wrap p, .wrap li { max-width: 68ch; }
ul.plain { padding-left: 20px; } ul.plain li { margin: 8px 0; }
.sources li { overflow-wrap: anywhere; }
.fig { margin: 22px 0; }
.fig figcaption, .scan figcaption { font: 600 14.5px/1.35 var(--sans); margin-bottom: 8px; color: var(--fg); }
.twofig { display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; max-width: 980px; margin: 0 auto; }
@media (max-width: 760px) { .twofig { grid-template-columns: 1fr; gap: 0; } }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14.5px; }
.bars.wide-label .bar { grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 44px; }
.bar .t { background: var(--bg2); border-radius: 3px; height: 20px; position: relative; overflow: hidden; border: 1px solid var(--line-soft); }
.bar .t i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--kS); }
.bar .t i.kT { background: var(--kT); } .bar .t i.kL { background: var(--kL); }
.bar .v { font: 500 14px/1 var(--mono); text-align: right; }
blockquote.doc { margin: 16px 0; padding: 14px 18px; background: var(--paper); color: var(--ink-doc); border: 1px solid var(--line); border-left: 4px solid var(--coral); border-radius: 2px; font: 400 15.5px/1.55 var(--mono); }
blockquote.doc p { margin: 0; max-width: none; }
blockquote.doc footer { margin-top: 8px; font: 500 13.5px/1.3 var(--sans); }
blockquote.doc a { color: #0b4a8f; }
.scan { margin: 18px 0; }
.scan figcaption { margin: 8px 0 0; font-weight: 500; color: var(--mut); }
.scanbox { position: relative; border: 1px solid var(--line); background: var(--paper); border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); }
.scanbox img { display: block; width: 100%; height: auto; }
.scanscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) { .scanscroll .scanbox { min-width: 640px; } }
.mark { position: absolute; background: color-mix(in srgb, var(--coral) 30%, transparent); outline: 1.5px solid var(--coral); border-radius: 2px; mix-blend-mode: multiply; }
.mark.m-total { background: color-mix(in srgb, #1273c4 22%, transparent); outline-color: #1273c4; }

/* the sum tool */
.sumtool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0 10px; }
.sumtool fieldset { border: 0; margin: 0 0 10px; padding: 0; }
.sumtool legend { font: 600 14.5px/1.3 var(--sans); padding: 0; margin-bottom: 6px; }
.chk { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dotted var(--line); cursor: pointer; }
.chk input { width: 22px; height: 22px; accent-color: var(--coral); margin: 0; }
.chk .cv { font: 500 15px/1.2 var(--mono); white-space: nowrap; }
.chk .cl { font-size: 15px; line-height: 1.3; }
.sumbars { margin-top: 14px; display: grid; gap: 8px; }
.sb { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.sb .st { height: 18px; background: var(--bg2); border: 1px solid var(--line-soft); border-radius: 3px; position: relative; overflow: hidden; }
.sb .st i { position: absolute; left: 0; top: 0; bottom: 0; }
.sb .st i.tot { background: var(--kA); } .sb .st i.part { background: var(--coral); transition: width .35s ease; }
.sb .sv { font: 500 14.5px/1.2 var(--mono); white-space: nowrap; }
.sb.gap .st { visibility: hidden; } .sb.gap .sv { color: var(--acc); font-weight: 600; }
@media (max-width: 560px) { .sb { grid-template-columns: 1fr auto; } .sb .st { grid-column: 1 / -1; order: 3; } .sb.gap .st { display: none; } .chk { grid-template-columns: 28px minmax(0, 1fr); } .chk .cv { grid-column: 2; } }
@media (prefers-reduced-motion: reduce) { .sb .st i.part { transition: none; } }
.result { font-weight: 600; }

/* documents */
.docs { padding-left: 22px; }
.docs li { margin: 12px 0; }
.docs b { display: block; }
.docs span { display: block; font-size: 15.5px; }
.docs .who { color: var(--mut); font-size: 14px; }
.reqtool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; display: grid; gap: 6px; }
.reqtool select, .tabfilter select, .tabfilter input { width: 100%; font: 500 15.5px/1.2 var(--sans); padding: 10px 11px; border: 1.5px solid var(--fg); border-radius: 7px; background: var(--card); color: var(--fg); }
.reqtool textarea { width: 100%; font: 400 14px/1.5 var(--mono); padding: 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink-doc); resize: vertical; }
.reqtool label { margin-top: 6px; }
.reqtool .btn { justify-self: start; margin-top: 4px; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin: 12px 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data thead th { font: 600 13px/1.25 var(--sans); background: var(--bg2); position: sticky; top: 0; }
table.data td.n { text-align: right; font-family: var(--mono); white-space: nowrap; }
table.data td.m { font-family: var(--mono); }
table.data td.d { min-width: 220px; }
table.data td.u { color: var(--mut); font-family: var(--sans); font-size: 13px; white-space: normal; }
table.data tr.x { display: none; }
table.data.open tr.x { display: table-row; }
table.data tr.f { display: none !important; }
table.data .tot td { font-weight: 600; border-top: 1.5px solid var(--fg); }
table.cmp td.dn { color: var(--acc); }
.tabfilter { display: grid; grid-template-columns: minmax(0, 1fr) 120px 200px; gap: 10px; align-items: end; max-width: 760px; }
@media (max-width: 640px) { .tabfilter { grid-template-columns: 1fr 1fr; } .tabfilter > div:first-child { grid-column: 1 / -1; } }
.more { margin: 4px 0 0; }

footer { max-width: 1180px; margin: 48px auto 0; padding: 22px 16px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 14px; color: var(--mut); }
footer a { color: var(--mut); }

/* reading rail (from standards/v2/templates/reading-rail.css; widest column = 1180px) */
.rail { display: none; }
@media (min-width: 1320px) {
  .rail { --col: 1180px; --gut: 1.1rem; display: flex; flex-direction: column; position: fixed; top: 50%; left: calc(50% + var(--col) / 2 + var(--gut)); transform: translateY(-50%); z-index: 30; margin: 0; padding: .4rem 0; max-height: calc(100vh - 7rem); }
  .rail::before { content: ""; position: absolute; left: calc(.875rem - .5px); top: 1.1rem; bottom: 1.1rem; width: 1px; background: var(--line); }
  .rail-dot { position: relative; display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; text-decoration: none; border-radius: 50%; }
  .rail-dot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mut); box-shadow: 0 0 0 3px var(--bg); transition: transform .2s, background .2s, box-shadow .2s; flex: none; }
  .rail-dot:hover .dot, .rail-dot:focus-visible .dot { background: var(--acc); transform: scale(1.25); }
  .rail-dot[aria-current=true] .dot { background: var(--acc); transform: scale(1.45); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px color-mix(in srgb, var(--acc) 38%, transparent); }
  .rail-dot:focus-visible { outline: 2px solid var(--acc); outline-offset: -1px; }
  .rail-label { position: absolute; right: calc(100% + .3rem); top: 50%; transform: translate(6px, -50%); padding: .22rem .65rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--bg); color: var(--fg); box-shadow: 0 6px 20px rgba(0, 0, 0, .14); font-size: .82rem; font-weight: 600; line-height: 1.3; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
  .rail-dot:hover .rail-label, .rail-dot:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
}
@media (prefers-reduced-motion: reduce) { .rail .dot, .rail-label { transition: none; } }
@media print { .topbar, .rail, .map-tools, .share-row, .finder, .tabfilter { display: none !important; } table.data tr.x { display: table-row; } }
