/* Illinois Legislation Tracker — original stylesheet.
   Theme: Chicago cyber tech zine. Night asphalt, river cyan, flag-star red,
   bone ink, all-mono type. Every mark drawn in-house: six-point stars, the
   municipal fork, the city grid, El-loop arcs, xerox grain. No borrowed assets. */

:root {
  --top: #141a28;
  --mid: #0c111d;
  --low: #070a11;
  --ink: #e7e1d2;      /* bone: photocopied white */
  --dim: #8f9baa;      /* steel grey */
  --river: #57c7ea;   /* links, structure, YEA — the vote, never a party */
  --on-river: #04141c;
  --star: #e8452e;     /* flag-star red, NAY, alerts */
  --fill: #a52e20;
  --flag: #4b7fbf;    /* Chicago flag blue — ornament only */
  --stripe: #8ab4e6;
  --line: #354254;
  --hair: rgba(139, 180, 230, .30);
  --panel: rgba(9, 13, 20, .74);
  --field: rgba(5, 8, 14, .82);
  --amber: #e0a63e;
  --green: #4fc07c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* six-point star, sharp points — drawn for this project */
  --star16: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolygon points='8.00,0.80 9.55,5.32 14.24,4.40 11.10,8.00 14.24,11.60 9.55,10.68 8.00,15.20 6.45,10.68 1.76,11.60 4.90,8.00 1.76,4.40 6.45,5.32' fill='%23e8452e'/%3E%3C/svg%3E");
  /* the municipal fork, drawn for this project */
  --ydev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f9baa' stroke-width='2.4' stroke-linecap='square'%3E%3Cpath d='M12 22V13M12 13 5 4M12 13l7-9'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ---------- backdrop: night, grid, zero-line, El arcs, grain, scanlines ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    /* El-loop arcs, top-right corner */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='380' fill='none' stroke='%2357c7ea' stroke-opacity='.06'%3E%3Ccircle cx='380' cy='0' r='95' stroke-width='11'/%3E%3Ccircle cx='380' cy='0' r='158' stroke-dasharray='38 26'/%3E%3Ccircle cx='380' cy='0' r='224' stroke-width='4' stroke-dasharray='2 11'/%3E%3Ccircle cx='380' cy='0' r='296'/%3E%3C/svg%3E") 100% 0 / min(72vw, 460px) no-repeat,
    /* city grid */
    repeating-linear-gradient(0deg, rgba(139, 180, 230, .05) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(139, 180, 230, .05) 0 1px, transparent 1px 72px),
    /* State & Madison zero lines */
    linear-gradient(rgba(139, 180, 230, .09), rgba(139, 180, 230, .09)) 0 42% / 100% 1px no-repeat,
    linear-gradient(rgba(139, 180, 230, .09), rgba(139, 180, 230, .09)) 64% 0 / 1px 100% no-repeat,
    /* xerox grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    /* scanlines */
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .13) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--top) 0%, #101522 34%, var(--mid) 58%, #090d16 80%, var(--low) 100%);
}

body {
  margin: 0;
  background: var(--low);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

/* right gutter: hatch and a flag stripe */
html::after {
  content: "";
  position: fixed; top: 0; bottom: 0; right: 0; width: 10px; z-index: -1;
  background:
    repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 8px) 0 7rem / 100% 11rem no-repeat,
    linear-gradient(var(--stripe), var(--stripe)) 100% 23rem / 1px 9rem no-repeat,
    repeating-linear-gradient(135deg, rgba(53, 66, 84, .55) 0 2px, transparent 2px 8px) 0 38rem / 100% 8rem no-repeat;
}

@media (min-width: 940px) { html::after { width: 14px; } }

/* ---------- left rail: star, ruler ticks, zero point ---------- */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 34px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 17, 29, .92), rgba(7, 10, 17, .96));
  z-index: 50;
  display: none;
}
.rail::before {
  content: "";
  position: absolute; top: 10px; left: 9px;
  width: 16px; height: 16px;
  background: var(--star16) 0 0 / 16px 16px no-repeat;
}
.rail::after {
  content: "";
  position: absolute; top: 44px; bottom: 0; left: 8px; width: 17px;
  background:
    repeating-linear-gradient(0deg, var(--hair) 0 1px, transparent 1px 84px) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(0deg, rgba(143, 155, 170, .22) 0 1px, transparent 1px 14px) 0 0 / 5px 100% no-repeat;
}
.rail .rail-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--dim);
  text-transform: uppercase;
  z-index: 1;
}
@media (min-width: 940px) {
  .rail { display: block; }
  body { margin-left: 34px; }
}

/* ---------- status tape ---------- */
.preview {
  margin: 0;
  padding: 5px 42px;
  background:
    var(--star16) 12px 50% / 13px 13px no-repeat,
    var(--star16) calc(100% - 12px) 50% / 13px 13px no-repeat,
    repeating-linear-gradient(-45deg, rgba(165, 46, 32, .38) 0 7px, transparent 7px 14px),
    var(--fill);
  color: #f3ece0;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- deck ---------- */
header.deck {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 17, 29, .85), rgba(9, 13, 20, .6));
}
.deck-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 18px 12px;
}
.brandline { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.brand a {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand .mark {
  width: 30px; height: 30px; flex: none;
  background: var(--star16) 50% 50% / 26px 26px no-repeat,
    linear-gradient(135deg, transparent 48%, rgba(87, 199, 234, .5) 49%) 0 0 / 100% 100%,
    rgba(9, 13, 20, .9);
  border: 1px solid var(--line);
}
.brand .wordmark {
  font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.15;
}
.brand .wordmark small {
  display: block; font-size: 9.5px; font-weight: 400; color: var(--dim); letter-spacing: .2em;
}
.brand .wordmark b { color: var(--river); }
.statusline {
  font-size: 10.5px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; text-align: right; line-height: 1.7;
}
.statusline b { color: var(--ink); font-weight: 400; }
.statusline .dot { color: var(--river); }
@media (prefers-reduced-motion: no-preference) {
  .statusline .dot { animation: blip 2.4s infinite steps(1); }
  @keyframes blip { 0%, 88% { opacity: 1; } 88%, 100% { opacity: .25; } }
}

nav.mainnav {
  max-width: 1060px; margin: 0 auto; padding: 0 18px 12px;
  display: flex; flex-wrap: wrap; gap: 3px;
  counter-reset: tab;
}
nav.mainnav a {
  counter-increment: tab;
  position: relative;
  color: var(--river); text-decoration: none;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px 6px 30px;
  background:
    linear-gradient(135deg, var(--river) 7px, transparent 7.5px) 0 0 / 100% 100% no-repeat,
    var(--field);
  border: 1px solid var(--line);
  border-left-color: rgba(87, 199, 234, .4);
}
nav.mainnav a::before {
  content: counter(tab, decimal-leading-zero);
  position: absolute; left: 10px; top: 6px;
  font-size: 9px; color: var(--dim);
}
nav.mainnav a::after {
  content: attr(data-c);
  margin-left: 8px; padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--dim); font-size: 9px; letter-spacing: .08em;
}
nav.mainnav a:hover {
  background:
    linear-gradient(135deg, var(--river) 7px, transparent 7.5px) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(135deg, rgba(87, 199, 234, .12) 0 3px, transparent 3px 8px),
    #163243;
  color: #fff;
}
nav.mainnav a[aria-current="page"] {
  background:
    linear-gradient(135deg, var(--on-river) 7px, transparent 7.5px) 0 0 / 100% 100% no-repeat,
    var(--river);
  color: var(--on-river); border-color: var(--river);
}
nav.mainnav a[aria-current="page"]::before,
nav.mainnav a[aria-current="page"]::after { color: var(--on-river); border-left-color: rgba(4, 20, 28, .4); }

main { max-width: 1060px; margin: 0 auto; padding: 26px 18px 70px; }

/* ---------- footer: flag stripes, stars, colophon ---------- */
footer.colophon { border-top: 1px solid var(--line); background: rgba(9, 13, 20, .8); }
footer.colophon::before {
  content: "";
  display: block; height: 8px;
  background:
    linear-gradient(90deg, var(--flag) 0 100%) 0 0 / 100% 2px no-repeat,
    linear-gradient(90deg, var(--flag) 0 100%) 0 6px / 100% 2px no-repeat;
  opacity: .85;
}
footer.colophon .inner { max-width: 1060px; margin: 0 auto; padding: 18px 18px 30px; }
footer.colophon .stars {
  display: flex; gap: 10px; align-items: center; margin: 2px 0 14px;
}
footer.colophon .stars i {
  width: 14px; height: 14px; flex: none;
  background: var(--star16) 0 0 / 14px 14px no-repeat;
}
footer.colophon .stars span {
  margin-left: 10px; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim);
}
footer.colophon .ydev {
  float: right; width: 22px; height: 22px;
  background: var(--ydev) 0 0 / 22px 22px no-repeat;
  opacity: .65;
}
footer.colophon p { font-size: 11.5px; color: var(--dim); max-width: 92ch; }
footer.colophon p b { color: var(--ink); font-weight: 700; }
footer.colophon a { color: var(--river); }
footer.colophon .fine { font-size: 10.5px; }

/* ---------- micro labels / plate lines with section numbers ---------- */
main { counter-reset: sec; }
.section { counter-increment: sec; }
.tag {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim);
  padding-bottom: 7px; margin-bottom: 4px;
  border-bottom: 1px solid var(--hair);
}
.tag::before { content: "// "; color: var(--river); }
.section > .tag::after {
  content: " // § " counter(sec, decimal-leading-zero);
  color: var(--star);
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 {
  font-size: 25px; margin: 8px 0 12px; letter-spacing: .02em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
h1::before {
  content: "";
  width: 17px; height: 17px; flex: none;
  background: var(--star16) 0 0 / 17px 17px no-repeat;
}
h2 { font-size: 17px; margin: 26px 0 10px; letter-spacing: .04em; text-transform: uppercase;
  padding-left: 10px; border-left: 3px solid var(--river); }
h3 { font-size: 13px; margin: 18px 0 6px; letter-spacing: .06em; text-transform: uppercase; color: var(--river); }
p.lede { font-size: 15px; max-width: 78ch; color: var(--ink); }
p.fine, .fine { font-size: 11px; color: var(--dim); max-width: 92ch; }
hr.rule {
  border: 0; height: 1px; margin: 26px 0;
  background: linear-gradient(90deg, transparent, var(--hair) 12% 88%, transparent);
}
a { color: var(--river); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--river); outline-offset: 2px; }

/* ---------- countdown tile ---------- */
.tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 3px solid var(--star);
  padding: 16px 20px 14px;
  background:
    linear-gradient(135deg, rgba(87, 199, 234, .18) 0 9px, transparent 9.5px) 0 0 / 100% 100% no-repeat,
    var(--panel);
  margin: 8px 0 18px;
}
.tile .num {
  font-size: 64px; font-weight: 700; line-height: .95;
  color: var(--river);
  border-right: 1px solid var(--hair);
  padding-right: 20px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(87, 199, 234, .35);
}
.tile .ttl { font-size: 13.5px; letter-spacing: .04em; margin: 4px 0 2px; }
.tile .sub { font-size: 11.5px; color: var(--dim); margin: 0; }
.tile .opens { font-size: 10.5px; color: var(--ink); letter-spacing: .1em; text-transform: uppercase; }
.tile .ascii {
  grid-column: 1 / -1;
  color: var(--dim);
  border-top: 1px solid var(--hair);
  padding-top: 8px; margin-top: 2px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; text-align: right;
  white-space: pre; overflow: hidden;
}

.interim { margin: 10px 0 6px; }
.interim .track {
  position: relative; height: 14px;
  border: 1px solid var(--line);
  background: var(--field);
}
.interim .track i {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: repeating-linear-gradient(90deg, var(--river) 0 4px, transparent 4px 8px);
  box-shadow: 0 0 12px rgba(87, 199, 234, .3);
}
.interim .ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- search / filter fields ---------- */
form.searchbox {
  display: flex; max-width: 640px;
  border: 1px solid var(--river);
  background: var(--field);
  box-shadow: 0 0 0 1px rgba(87, 199, 234, .15), 0 0 24px rgba(87, 199, 234, .07);
}
form.searchbox input {
  flex: 1; border: 0; padding: 11px 12px;
  font: inherit; color: var(--ink); background: transparent; outline: none;
}
form.searchbox input::placeholder { color: var(--dim); }
form.searchbox button {
  border: 0; border-left: 1px solid var(--river);
  padding: 10px 20px; background: var(--river); color: var(--on-river);
  font: inherit; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 11px;
  cursor: pointer;
}
form.searchbox button:hover { background: #fff; color: var(--on-river); }

.filterbox { margin: 10px 0 14px; max-width: 340px; width: 100%; border: 1px solid var(--line); background: var(--field); }
.filterbox input { border: 0; width: 100%; padding: 9px 11px; font: inherit; outline: none; background: transparent; color: var(--ink); }
.filterbox input::placeholder { color: var(--dim); }

/* ---------- stats band ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  margin: 16px 0;
  background: var(--line);
}
.stats-row .cell { background: var(--panel); padding: 10px 14px 12px; }
.stats-row .cell::after {
  content: "";
  display: block; height: 3px; margin-top: 8px;
  background: repeating-linear-gradient(90deg, var(--hair) 0 1px, transparent 1px 6px);
}
.stats-row .k { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.stats-row .v { font-size: 23px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- meter ---------- */
.meter { margin: 16px 0; }
.meter .track { position: relative; height: 16px; border: 1px solid var(--line); background: var(--field); }
.meter .track i { position: absolute; top: 0; bottom: 0; left: 0; background: repeating-linear-gradient(90deg, var(--river) 0 4px, transparent 4px 8px); }
.meter p { font-size: 11px; color: var(--dim); margin: 5px 0 0; }
.meter p strong { color: var(--ink); font-weight: 400; }

/* ---------- method grid ---------- */
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 14px 0; counter-reset: step; }
.method .step { background: var(--panel); padding: 14px 16px; }
.method .step b { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); counter-increment: step; }
.method .step b::before { content: counter(step, decimal-leading-zero) " // "; color: var(--river); }
.method .step span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.method .step em { color: var(--star); font-style: normal; }

/* ---------- digit strip (roll call) ---------- */
.strip {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px; letter-spacing: .16em;
  word-break: break-all;
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--field); border: 1px solid var(--line);
}
.strip::before { content: "ROLL CALL // "; color: var(--dim); font-size: 9px; letter-spacing: .2em; }
.strip b { font-weight: 400; }
.strip .y { color: var(--river); text-shadow: 0 0 10px rgba(87, 199, 234, .3); }
.strip .n { color: var(--star); }
.strip .o { color: var(--dim); opacity: .7; }

/* ---------- tally bars ---------- */
.tally { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.tally .bar { display: flex; height: 12px; width: 260px; max-width: 60vw; border: 1px solid var(--line); }
.tally .bar i { display: block; }
.tally .bar i.y { background: var(--river); box-shadow: 0 0 10px rgba(87, 199, 234, .35); }
.tally .bar i.n { background: var(--star); }
.tally .bar i.o { background: repeating-linear-gradient(45deg, rgba(143, 155, 170, .5) 0 3px, transparent 3px 6px); }
.tally .nums { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tally .nums b { font-weight: 700; }
.tally .nums .y { color: var(--river); }
.tally .nums .n { color: var(--star); }
.tally .nums .o { color: var(--dim); }

/* ---------- roll-call blocks ---------- */
.vote-event { border: 1px solid var(--line); background: var(--panel); margin: 14px 0; }
.vote-event + .vote-event { margin-top: 10px; }
.vote-event .head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(87, 199, 234, .16) 0 8px, transparent 8.5px) 0 0 / 100% 100% no-repeat,
    var(--field);
}
.vote-event .head .m { font-size: 12.5px; }
.vote-event .head .m b { letter-spacing: .03em; }
.vote-event .head .when { font-size: 10px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.vote-event .body { padding: 12px 14px; }
.vote-event details { margin-top: 10px; }
.vote-event summary { cursor: pointer; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--river); list-style: none; }
.vote-event summary::before { content: "[+] "; color: var(--star); }
.vote-event summary:hover { color: #fff; }
.membergrid { columns: 3; column-gap: 26px; font-size: 11.5px; margin: 8px 0 0; padding: 0; list-style: none; }
.membergrid li { break-inside: avoid; padding: 1px 0; }
.membergrid .v { display: inline-block; width: 14px; text-align: center; font-weight: 700; }
.membergrid .v.y { color: var(--river); }
.membergrid .v.n { color: var(--star); }
.membergrid .v.o { color: var(--dim); }
@media (max-width: 800px) { .membergrid { columns: 2; } }
@media (max-width: 520px) { .membergrid { columns: 1; } }

.partyline { font-size: 11px; color: var(--dim); margin: 6px 0 0; }
.partyline b { font-weight: 400; color: var(--ink); }

/* ---------- chips (zine stickers) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 4px 9px;
  background: repeating-linear-gradient(135deg, rgba(143, 155, 170, .07) 0 3px, transparent 3px 9px), var(--panel);
  color: var(--dim);
}
.chip.ok { border-color: var(--green); color: var(--green); background: rgba(79, 192, 124, .08); }
.chip.red { border-color: var(--star); color: var(--star); background: rgba(232, 69, 46, .08); }
.chip.navy { border-color: var(--flag); color: var(--stripe); background: rgba(75, 127, 191, .1); }
.chip.amber { border-color: var(--amber); color: var(--amber); background: rgba(224, 166, 62, .08); }

/* ---------- tables ---------- */
table.record { width: 100%; border-collapse: collapse; font-size: 12px; }
table.record th {
  text-align: left; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); font-weight: 400;
  border-bottom: 1px solid var(--line); border-top: 1px solid var(--hair);
  padding: 7px 8px;
}
table.record td { border-bottom: 1px solid rgba(53, 66, 84, .55); padding: 7px 8px; vertical-align: top; }
table.record tr:hover td { background: rgba(87, 199, 234, .05); }
table.record td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.record a { text-decoration: none; }
table.record a:hover { text-decoration: underline; }

/* ---------- timeline ---------- */
ol.path { list-style: none; margin: 12px 0; padding: 0; }
ol.path li { position: relative; padding: 4px 0 4px 24px; font-size: 12px; }
ol.path li::before {
  content: ""; position: absolute; left: 5px; top: 9px;
  width: 7px; height: 7px;
  background: var(--ink);
  transform: rotate(45deg);
}
ol.path li:not(:last-child)::after {
  content: ""; position: absolute; left: 8px; top: 18px; bottom: -7px;
  width: 1px; background: var(--line);
}
ol.path .d { color: var(--dim); font-size: 10.5px; letter-spacing: .06em; margin-right: 8px; white-space: nowrap; }
ol.path .tally-inline { color: var(--river); font-variant-numeric: tabular-nums; }
ol.path li.pass::before { background: var(--green); }
ol.path li.fail::before { background: var(--star); }
ol.path li.pass .tally-inline { color: var(--green); }
ol.path li.fail .tally-inline { color: var(--star); }

/* ---------- cards / notes ---------- */
.section { margin: 26px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cardbox {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(139, 180, 230, .16) 0 8px, transparent 8.5px) 0 0 / 100% 100% no-repeat,
    var(--panel);
  padding: 15px 17px;
}
.cardbox h3 { margin-top: 0; }
.cardbox h3 a { color: inherit; text-decoration: none; }
.cardbox h3 a:hover { color: var(--river); }

.note {
  border-left: 3px solid var(--amber);
  background: repeating-linear-gradient(135deg, rgba(224, 166, 62, .06) 0 3px, transparent 3px 10px), var(--panel);
  padding: 11px 15px; font-size: 11.5px; color: var(--dim); margin: 14px 0;
}
.note b { color: var(--ink); }
.note.red { border-left-color: var(--star); background: repeating-linear-gradient(135deg, rgba(232, 69, 46, .07) 0 3px, transparent 3px 10px), var(--panel); }
.note.navy { border-left-color: var(--flag); background: repeating-linear-gradient(135deg, rgba(75, 127, 191, .09) 0 3px, transparent 3px 10px), var(--panel); }

/* ---------- barcode + ascii (decor, drawn by rules not glyphs) ---------- */
.barcode {
  height: 30px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 11px, var(--ink) 11px 14px, transparent 14px 17px),
    linear-gradient(180deg, transparent 0 4px, rgba(9, 13, 20, .9) 4px calc(100% - 4px), transparent calc(100% - 4px));
  opacity: .8;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.ascii {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); white-space: pre; overflow: hidden;
}

/* ---------- search results ---------- */
.results h3 { margin-top: 22px; }
.results .empty { color: var(--dim); font-size: 12px; padding: 14px 0; }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 18px; font-size: 12px; margin: 12px 0; }
.kv dt { color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; }
.biglink {
  font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--river);
  border-bottom: 2px solid var(--star);
  padding-bottom: 2px;
}
.biglink:hover { color: #fff; border-bottom-color: #fff; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0; }
::selection { background: var(--river); color: var(--on-river); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  h1 { font-size: 21px; }
  h2 { font-size: 15px; }
  .tile { grid-template-columns: auto 1fr; }
  .tile .num { font-size: 44px; padding-right: 14px; }
  .brandline { gap: 8px; }
  .statusline { text-align: left; }
  nav.mainnav a { padding: 6px 8px 6px 26px; }
  nav.mainnav a::after { display: none; }
}
