/*
Theme Name: Riverbend
Description: Theme for the Riverbend Residents Panel community site and map.
Version: 1.0.0
Author: Barron AI Solutions
Text Domain: riverbend
Requires PHP: 8.0
*/

@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --ink: #16242b;
  --paper: #f4efe6;
  --card: #fffdf8;
  --brick: #9c3b25;
  --hivis: #f2b705;
  --river: #1f5f7a;
  --ok: #2f7d4f;
  --line: rgba(22, 36, 43, .16);
  --mute: rgba(22, 36, 43, .72);
  --quiet: rgba(22, 36, 43, .58);
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --gap: 24px;
  --wrap: 1240px;
  --side: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(rgba(22, 36, 43, .07) 1px, transparent 1.2px); background-size: 5px 5px; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--hivis); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: .95; letter-spacing: -.005em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); text-transform: uppercase; }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--side)); margin-inline: auto; position: relative; z-index: 1; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--hivis); color: var(--ink); padding: 10px 16px; font-weight: 700; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 700 .85rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.kicker::before { content: ""; width: 26px; border-top: 3px dotted currentColor; }
.lede { font-size: 1.2rem; color: var(--mute); max-width: 62ch; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 900; background: rgba(244, 239, 230, .94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand svg { width: 46px; height: 46px; flex: none; }
.brand__name { font: 800 1.45rem/.9 var(--font-head); text-transform: uppercase; letter-spacing: .01em; }
.brand__name small { display: block; font: 700 .72rem/1.2 var(--font-body); letter-spacing: .14em; color: var(--mute); text-transform: uppercase; margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; padding: 10px 12px; font-weight: 700; text-decoration: none; border-radius: 4px; }
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_item > a { background: rgba(22, 36, 43, .07); }
.nav .current-menu-item > a, .nav .current_page_item > a { box-shadow: inset 0 -4px 0 var(--hivis); }
.nav__report { margin-left: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 800 1.08rem/1 var(--font-head); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; box-shadow: 4px 4px 0 var(--hivis); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--hivis); color: var(--paper); }
.btn--hivis { background: var(--hivis); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn--hivis:hover { color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost:hover { color: var(--ink); box-shadow: none; background: rgba(22, 36, 43, .06); }
.btn--light { border-color: var(--paper); background: transparent; color: var(--paper); box-shadow: none; }
.btn--light:hover { background: rgba(255, 255, 255, .12); color: var(--paper); box-shadow: none; }
.menu-toggle { display: none; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; font: 700 1rem/1 var(--font-body); color: var(--ink); cursor: pointer; }
  .menu-toggle span { display: block; width: 18px; border-top: 2px solid; box-shadow: 0 5px 0, 0 -5px 0; height: 0; margin: 6px 0; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--paper); border-bottom: 2px solid var(--ink); flex-direction: column; align-items: stretch; padding: 10px var(--side) 20px; display: none; max-height: calc(100vh - 72px); overflow: auto; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 14px 6px; font-size: 1.15rem; border-bottom: 1px dashed var(--line); border-radius: 0; }
  .nav__report { margin: 14px 0 0; }
  .brand__name { font-size: 1.2rem; }
  .brand svg { width: 38px; height: 38px; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; color: var(--paper); background: #1b1512 var(--hero) center / cover no-repeat; min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 12, 12, .9) 0%, rgba(14, 12, 12, .72) 38%, rgba(14, 12, 12, .1) 70%), linear-gradient(0deg, rgba(14, 12, 12, .7) 0%, transparent 45%); }
.hero .wrap { padding: 120px 0 56px; }
.hero h1 { font-size: clamp(3rem, 8.2vw, 7.4rem); line-height: .84; max-width: 12ch; margin: 0 0 22px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--hivis); }
.hero p { color: rgba(244, 239, 230, .82); font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 46ch; }
.hero .kicker { color: rgba(244, 239, 230, .78); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__patch { position: absolute; right: var(--side); bottom: 40px; width: clamp(140px, 22vw, 300px); opacity: .9; }
.hero__patch path { fill: rgba(242, 183, 5, .14); stroke: var(--hivis); stroke-width: 1.6; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero__patch figcaption { font: 700 .78rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: rgba(244, 239, 230, .78); margin-top: 8px; text-align: right; }
@media (max-width: 760px) { .hero__patch { display: none; } .hero { min-height: 84vh; } .hero .wrap { padding: 110px 0 40px; } }

/* ---------- council first notice ---------- */
.notice-strip { position: relative; z-index: 2; margin-top: -26px; }
.noticeboard { background: var(--hivis); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 20px 24px; display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-.6deg); }
.noticeboard__tag { grid-row: span 2; font: 800 2.6rem/.85 var(--font-head); text-transform: uppercase; }
.noticeboard p { margin: 0; font-weight: 700; }
.noticeboard ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.noticeboard a { font-weight: 700; text-decoration-color: var(--ink); }
@media (max-width: 760px) { .noticeboard { grid-template-columns: 1fr; transform: none; } .noticeboard__tag { grid-row: auto; font-size: 2rem; } }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--tight { padding-top: 40px; }
.section__head { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.section__head h2 { margin: 0; }
.section__head p { margin: 0; max-width: 54ch; color: var(--mute); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink a { color: var(--paper); }
.section--ink .kicker { color: rgba(244, 239, 230, .7); }
.tide { display: block; width: 100%; height: 26px; color: var(--ink); }

/* priorities */
.priorities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 2px solid var(--paper); }
.priorities li { border-bottom: 1px dashed rgba(244, 239, 230, .3); }
.priorities a { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 22px 18px 22px 0; text-decoration: none; height: 100%; }
.priorities a:hover .priorities__t { text-decoration: underline; text-decoration-color: var(--hivis); }
.priorities__n { grid-row: span 3; font: 800 3rem/.85 var(--font-head); color: var(--hivis); }
.priorities__ref { font: 700 .8rem/1 var(--font-body); letter-spacing: .12em; opacity: .7; }
.priorities__t { font: 700 1.5rem/1.05 var(--font-head); text-transform: uppercase; }
.priorities__m { font-size: .95rem; opacity: .78; }

/* how it works */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
.steps li { counter-increment: s; position: relative; padding-top: 64px; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 50px; height: 50px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font: 800 1.6rem/1 var(--font-head); background: var(--card); }
.steps li:nth-child(odd)::before { background: var(--hivis); }
.steps h3 { text-transform: uppercase; margin-bottom: 8px; }
.steps p { color: var(--mute); margin: 0; }

/* news */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 6px; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; position: relative; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.card__meta { font: 700 .82rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 0; }
.card h3 { margin: 0; font-size: 1.5rem; line-height: 1; text-transform: uppercase; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--mute); }
.card__tag { align-self: flex-start; font: 700 .78rem/1 var(--font-body); padding: 6px 10px; border-radius: 999px; background: rgba(31, 95, 122, .12); color: var(--river); }

/* page header */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.page-head h1 { margin: 0 0 14px; max-width: 16ch; }
.page-head .lede { margin: 0; }
.page-head__patch { position: absolute; right: var(--side); top: 50%; transform: translateY(-50%) rotate(-8deg); width: clamp(120px, 20vw, 260px); opacity: .9; pointer-events: none; }
.page-head__patch path { fill: rgba(242, 183, 5, .25); stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@media (max-width: 760px) { .page-head__patch { display: none; } }

/* prose */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: 1.4em; }
.prose h3 { margin-top: 1.4em; text-transform: uppercase; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 6px solid var(--hivis); background: var(--card); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .9rem; color: var(--mute); margin-top: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.aside-card { background: var(--card); border: 2px solid var(--ink); border-radius: 6px; padding: 22px; }
.aside-card h2, .aside-card h3 { font-size: 1.6rem; }
.photo-frame img { display: block; width: 100%; border: 2px solid var(--ink); border-radius: 6px; }

.areas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.areas li { padding: 14px; border: 2px solid var(--ink); border-radius: 6px; background: var(--card); }
.areas b { display: block; font: 800 1.4rem/1 var(--font-head); text-transform: uppercase; }
.areas span { font-size: .88rem; color: var(--mute); }

/* single post */
.post-head { padding: clamp(48px, 7vw, 80px) 0 24px; }
.post-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; }
.post-meta { color: var(--mute); font-weight: 700; }
.post-body { padding-bottom: 80px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }

/* footer */
.site-foot { background: var(--ink); color: var(--paper); padding: 64px 0 28px; position: relative; overflow: hidden; z-index: 1; }
.site-foot a { color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font-size: 1.3rem; margin-bottom: 12px; color: var(--hivis); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-big { font: 800 clamp(2rem, 3.6vw, 2.8rem)/.9 var(--font-head); text-transform: uppercase; margin: 0 0 14px; }
.foot-note { margin-top: 40px; padding-top: 18px; border-top: 1px dashed rgba(244, 239, 230, .3); font-size: .88rem; color: rgba(244, 239, 230, .72); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.foot-patch { position: absolute; right: -40px; bottom: -40px; width: 420px; opacity: .14; pointer-events: none; }
.foot-patch path { fill: none; stroke: var(--hivis); stroke-width: 1.4; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .btn, .card { transition: none; } }

.demo-bar { position: relative; z-index: 950; background: var(--ink); color: var(--paper); text-align: center; font: 700 .82rem/1.3 var(--font-body); padding: 7px var(--side); letter-spacing: .02em; }
.report-first { max-width: 70ch; font-size: 1.1rem; padding: 14px 18px; border-left: 6px solid var(--hivis); background: var(--card); margin-bottom: 30px; }

/* =========================================================
   Home: the live case, the tape, the record, the tally
   ========================================================= */
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
:root { --font-mono: "IBM Plex Mono", ui-monospace, monospace; }
.mono { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0; }

.case-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: #120f0e var(--hero) center / cover no-repeat; min-height: calc(100svh - 104px); display: flex; align-items: flex-end; }
.case-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(10, 9, 9, .93) 0%, rgba(10, 9, 9, .78) 42%, rgba(10, 9, 9, .2) 75%), linear-gradient(0deg, rgba(10, 9, 9, .8), transparent 50%); }
.case-hero__patch { position: absolute; z-index: -1; right: 3%; top: 54%; width: min(44vw, 620px); transform: translateY(-50%) rotate(-4deg); overflow: visible; }
.case-hero__patch path { fill: rgba(242, 183, 5, .07); stroke: var(--hivis); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1000; stroke-dashoffset: 1000;  filter: drop-shadow(0 0 10px rgba(242, 183, 5, .45)); }
@keyframes survey { to { stroke-dashoffset: 0; } }
.case-hero__inner { padding: 72px 0 56px; }
.stamp { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; }
.stamp span { border: 1.5px solid rgba(255, 255, 255, .55); padding: 7px 10px; border-radius: 3px; }
.stamp .stamp__hot { background: var(--hivis); color: var(--ink); border-color: var(--hivis); }
.case-hero h1 { font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: .9; max-width: 16ch; margin: 0 0 30px; color: #fff; }
.case-hero__facts { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 26px; border-top: 1.5px solid rgba(255, 255, 255, .4); max-width: 760px; }
.case-hero__facts div { display: flex; flex-direction: column-reverse; padding: 14px 34px 0 0; margin-right: 34px; border-right: 1.5px dashed rgba(255, 255, 255, .3); }
.case-hero__facts div:last-child { border-right: 0; }
.case-hero__facts dd { margin: 0; font: 800 clamp(2rem, 3.4vw, 2.9rem)/.9 var(--font-head); color: var(--hivis); }
.case-hero__facts dd.is-date { font-size: clamp(1.3rem, 2vw, 1.7rem); color: #fff; padding-top: .35em; }
.case-hero__facts dt { font: 600 .78rem/1.3 var(--font-mono); text-transform: uppercase; color: rgba(255, 255, 255, .72); margin-top: 6px; }
.case-hero__lede { color: rgba(255, 255, 255, .8); font-size: 1.15rem; max-width: 52ch; }
.case-hero__lede .mono { display: block; font-size: .78rem; text-transform: uppercase; color: var(--hivis); margin-bottom: 4px; }
.case-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
@media (max-width: 760px) {
  .case-hero { min-height: auto; }
  .case-hero__inner { padding: 48px 0 40px; }
  .case-hero__patch { width: 120vw; right: -40vw; top: 30%; opacity: .7; }
  .case-hero__facts div { padding-right: 18px; margin-right: 18px; }
}

/* street-works tape */
.tape { position: relative; z-index: 2; background: repeating-linear-gradient(-45deg, var(--hivis) 0 22px, var(--ink) 22px 44px); padding: 9px 0; transform: rotate(-1.2deg) scale(1.03); margin: -14px 0 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tape__run { background: var(--hivis); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px 18px; padding: 12px var(--side); font-weight: 700; color: var(--ink); text-align: center; }
.tape__run strong { font: 800 1.35rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .03em; }
.tape__run a { color: var(--ink); text-decoration-color: var(--ink); }

/* the record: sticky map + scrolling log */
.record { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; border-bottom: 2px solid var(--ink); position: relative; z-index: 1; }
.record__map { position: sticky; top: 74px; height: calc(100vh - 74px); background: #d9ddd8; border-right: 2px solid var(--ink); }
.record__log { padding: 64px clamp(20px, 4vw, 56px) 64px; background: var(--paper); }
.record__head h2 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); text-transform: none; line-height: .95; margin: 10px 0 14px; }
.record__head p { color: var(--mute); }
.record__head .mono { color: var(--ink); font-size: .82rem; text-transform: uppercase; margin: 0; }
.log { list-style: none; margin: 34px 0 0; padding: 0; }
.log__case { position: relative; padding: 26px 0 30px 26px; border-top: 1.5px dashed var(--line); transition: opacity .3s; }
.log__case::before { content: ""; position: absolute; left: 0; top: 30px; bottom: 30px; width: 6px; border-radius: 3px; background: var(--pin); transition: width .25s; }
.log__case.is-current::before { width: 10px; }
.log.has-current .log__case:not(.is-current) { opacity: .55; }
.log__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; color: var(--mute); }
.log__stamp { border: 1.5px solid currentColor; padding: 3px 7px; border-radius: 3px; transform: rotate(-2deg); color: var(--ink); }
.log__case--priority .log__stamp { background: var(--hivis); border-color: var(--hivis); }
.log__case--escalated .log__stamp { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.log__case--resolved .log__stamp { color: var(--ok); }
.log__case--development .log__stamp { color: var(--river); }
.log__case h3 { font: 700 clamp(1.4rem, 2vw, 1.7rem)/1.05 var(--font-head); margin: 0 0 6px; text-transform: none; }
.log__case h3 a { text-decoration: none; }
.log__case h3 a:hover { text-decoration: underline; text-decoration-color: var(--hivis); }
.log__case--resolved h3 { text-decoration: line-through; text-decoration-color: var(--ok); text-decoration-thickness: 3px; }
.log__case--resolved h3 a { text-decoration: none; }
.log__where { margin: 0 0 12px; color: var(--mute); font-size: .95rem; }
.log__latest { margin: 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; font-size: .97rem; }
.log__latest .mono { display: block; font-size: .74rem; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.log__votes { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: .8rem; }
.log__bar { height: 10px; width: calc(var(--n) * 2.4%); min-width: 6px; max-width: 70%; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 9px); }
.record__end { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 26px; border-top: 1.5px dashed var(--line); margin: 0; }
@media (max-width: 900px) {
  .record { grid-template-columns: 1fr; }
  .record__map { top: 72px; height: 42vh; z-index: 5; border-right: 0; border-bottom: 2px solid var(--ink); }
  .record__log { padding-top: 36px; }
}

/* the tally */
.tally { padding: clamp(64px, 9vw, 120px) 0; background: var(--ink); color: var(--paper); position: relative; z-index: 1; }
.tally h2 { font-size: .85rem; text-transform: uppercase; color: rgba(244, 239, 230, .65); margin: 0 0 24px; }
.tally__sentence { font: 700 clamp(1.5rem, 2.8vw, 2.3rem)/1.25 var(--font-head); max-width: 34ch; margin: 0 0 28px; }
.tally__sentence b { display: inline-block; font-weight: 800; font-size: 1.3em; line-height: .9; padding: 0 .08em; border-bottom: 4px dotted rgba(244, 239, 230, .5); }
.tally__sentence .is-hivis { color: var(--hivis); border-color: var(--hivis); }
.tally__sentence .is-ok { color: #6fcf97; border-color: #6fcf97; }
.tally__more { color: var(--hivis) !important; font-weight: 700; }

/* the ledger */
.ledger { padding: clamp(56px, 8vw, 96px) 0; position: relative; z-index: 1; }
.ledger__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 12px; }
.ledger__head h2 { margin: 0; }
.ledger__head a { font-weight: 700; }
.ledger__list { list-style: none; margin: 0; padding: 0; }
.ledger__list li { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1.5px dashed var(--line); }
.ledger__list time { font-size: .9rem; color: var(--mute); text-transform: uppercase; }
.ledger__list a { font: 700 clamp(1.25rem, 2vw, 1.55rem)/1.1 var(--font-head); text-decoration: none; }
.ledger__list a:hover { text-decoration: underline; text-decoration-color: var(--hivis); }
.ledger__list li > span { font-size: .78rem; color: var(--river); }
@media (max-width: 640px) { .ledger__list li { grid-template-columns: 1fr; gap: 4px; } }

.rb-pin { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--pin); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); transition: transform .3s; }
.rb-pin.is-current { transform: scale(1.7); box-shadow: 0 0 0 6px rgba(242, 183, 5, .55), 0 1px 5px rgba(0, 0, 0, .4); }
html { overflow-x: clip; }
.tape { overflow: hidden; }

.case-hero__patch { display: none; }
.case-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 40px; align-items: end; }
.case-hero h1 { max-width: 15ch; }
.case-hero h1 em { font-style: normal; color: var(--hivis); }
.case-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: rgba(244, 239, 230, .96); color: var(--ink); border: 2px solid var(--ink); border-top: 8px solid var(--hivis); border-radius: 6px; text-decoration: none; box-shadow: 8px 8px 0 rgba(0, 0, 0, .35); }
.case-card:hover .case-card__go { text-decoration: underline; }
.case-card__label { font-size: .74rem; text-transform: uppercase; color: var(--mute); }
.case-card__title { font: 700 1.45rem/1.05 var(--font-head); }
.case-card__facts { font-size: .82rem; text-transform: uppercase; display: flex; gap: 6px; align-items: baseline; }
.case-card__facts b { font: 800 1.8rem/1 var(--font-head); color: #8a6700; margin-left: 8px; }
.case-card__facts b:first-child { margin-left: 0; }
.case-card__latest { font-size: .95rem; color: var(--mute); }
.case-card__latest .mono { font-size: .74rem; text-transform: uppercase; }
.case-card__go { font-weight: 700; }
@media (max-width: 900px) { .case-hero__inner { grid-template-columns: 1fr; } }
.case-hero { min-height: 0; align-items: center; }
.case-hero__inner { padding: 56px 0 64px; }
.page-head { padding: 40px 0 28px; }
@media (max-width: 760px) { .case-hero__inner { padding: 32px 0 44px; } }

/* ---------- impact ---------- */
.ci { position: relative; }
.ci-lede { font: 700 clamp(1.5rem, 2.8vw, 2.3rem)/1.25 var(--font-head); max-width: 34ch; margin: 0 0 34px; }
.ci-lede b { font-size: 1.3em; font-weight: 800; border-bottom: 4px dotted var(--line); }
.ci-lede .is-ok { color: #2f7d4f; border-color: #2f7d4f; }
.ci-lede .is-esc { color: #3d55a8; border-color: #3d55a8; }
.ci-lede__small { color: var(--mute); }
.ci-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 56px; border-top: 2px solid var(--ink); }
.ci-figs > div { padding: 16px 18px 18px 0; border-right: 1.5px dashed var(--line); margin-right: 18px; display: flex; flex-direction: column; }
.ci-figs > div:last-child { border-right: 0; }
.ci-figs dd { margin: 0; font: 800 2.6rem/1 var(--font-head); }
.ci-figs dt { font-weight: 700; margin-top: 4px; }
.ci-figs .ci-figs__d { font: 400 .9rem/1.4 var(--font-body); color: var(--mute); margin-top: 4px; }
@media (max-width: 760px) { .ci-figs { grid-template-columns: 1fr 1fr; } .ci-figs > div:nth-child(2) { border-right: 0; } }
.ci-block { margin: 0 0 64px; }
.ci-block h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 6px; }
.ci-sub { color: var(--mute); max-width: 70ch; margin-bottom: 18px; }
.ci-areas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: 6px; padding: 28px; }
@media (max-width: 760px) { .ci-areas { grid-template-columns: 1fr; padding: 18px; } }
.ci-areamap { width: 100%; height: auto; }
.ci-areamap path { stroke: var(--card); stroke-width: 2.5; stroke-linejoin: round; transition: opacity .15s; }
.ci-areamap path:hover { opacity: .85; }
.ci-area-label { pointer-events: none; text-anchor: middle; font: 700 13px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: rgba(255, 253, 248, .85); stroke-width: 3px; }
.ci-area-label.is-dark { fill: #fff; stroke: rgba(80, 25, 12, .6); }
.ci-area-n { font: 600 11px var(--font-mono); }
.ci-key { list-style: none; padding: 0; margin: 14px 0 0; display: flex; gap: 18px; font-size: .9rem; color: var(--mute); }
.ci-key span { display: inline-block; width: 22px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line); }
.ci-legend { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; font-weight: 700; }
.ci-sw { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 12px; margin-right: 6px; vertical-align: -4px; }
.ci-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); margin-right: 6px; vertical-align: -1px; }
.ci-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ci-tl { width: 100%; min-width: 720px; height: auto; display: block; background: var(--card); border: 2px solid var(--ink); border-radius: 6px; }
.ci-grid { stroke: var(--line); stroke-dasharray: 2 4; }
.ci-axis { font: 600 12px var(--font-mono); fill: var(--mute); text-transform: uppercase; }
.ci-today { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 1 3; }
.ci-hit { fill: transparent; }
.ci-row:hover .ci-hit, .ci-row:focus .ci-hit { fill: rgba(242, 183, 5, .14); }
.ci-row:focus { outline: none; }
.ci-label { font: 700 14px var(--font-body); fill: var(--ink); }
.ci-ref { font: 600 12px var(--font-mono); fill: var(--mute); }
.ci-bar { stroke-width: 6; stroke-linecap: round; }
.ci-upd { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.ci-end { stroke: var(--card); stroke-width: 2; }
.ci-glyph { fill: #fff; text-anchor: middle; font: 900 13px var(--font-body); }
.ci-days { font: 600 12px var(--font-mono); fill: var(--mute); }
.ci-table { margin-top: 12px; }
.ci-table summary { cursor: pointer; font-weight: 700; }
.ci-table table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; margin-top: 10px; }
.ci-table th, .ci-table td { text-align: left; padding: 8px 10px; border-bottom: 1px dashed var(--line); }
.ci-table th { border-bottom: 2px solid var(--ink); }
.ci-cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 760px; }
.ci-cats li { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 30px; gap: 14px; align-items: center; }
.ci-cats__name { font-weight: 700; }
.ci-cats__bar { height: 14px; }
.ci-cats__bar i { display: block; height: 100%; background: var(--ink); border-radius: 0 4px 4px 0; }
.ci-cats__n { font: 600 .95rem var(--font-mono); }
@media (max-width: 560px) { .ci-cats li { grid-template-columns: 1fr 30px; } .ci-cats__bar { grid-column: 1 / -1; grid-row: 2; } }
.ci-note { color: var(--mute); font-size: .92rem; }
.ci-tip { position: absolute; z-index: 20; pointer-events: none; max-width: 300px; background: var(--ink); color: var(--paper); padding: 8px 11px; border-radius: 4px; font-size: .88rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }

/* Phoros's batch: hero text up under the header, roomier chips on a phone. */
.case-hero__inner { padding-top: 28px; }
@media (max-width: 760px) { .case-hero__inner { padding-top: 18px; } }
@media (max-width: 760px) {
  .cm-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cm-layers legend { grid-column: 1 / -1; }
  .cm-chip { min-height: 44px; padding: 6px 10px; font-size: .84rem; line-height: 1.15; }
  .cm-chip__name { flex: 1; }
}

.ci-area-label { font: 700 12px var(--font-body); text-anchor: middle; paint-order: normal; stroke: none; fill: var(--ink); }
.ci-area-label.is-dark { fill: #fff; stroke: none; }
.ci-arealist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: .98rem; }
.ci-arealist span { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; margin-right: 8px; border: 1px solid var(--line); }
.ci-arealist b { margin-right: 4px; }

/* Impact on a phone: a stacked list instead of the wide timeline. */
.ci-mob { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .ci-tl, .ci-block .ci-scroll:has(.ci-tl) { display: none; }
  .ci-mob { display: grid; gap: 0; border-top: 2px solid var(--ink); }
  .ci-mob li { border-bottom: 1.5px dashed var(--line); }
  .ci-mob a { display: grid; gap: 6px; padding: 14px 0; text-decoration: none; }
  .ci-mob__t { font-weight: 700; line-height: 1.3; }
  .ci-mob__line { display: flex; align-items: center; gap: 0; height: 22px; }
  .ci-mob__line i { display: block; height: 6px; border-radius: 3px; }
  .ci-mob__line .ci-sw { margin: 0 0 0 -4px; flex: none; }
  .ci-mob__m { font: 600 .78rem/1.3 var(--font-mono); color: var(--mute); text-transform: uppercase; }
  .ci-legend { gap: 8px 14px; font-size: .86rem; }
  .ci-legend li { white-space: nowrap; }
  .ci-area-label { display: none; }
}
@media (max-width: 760px) { .ci-legend li:last-child { display: none; } }
