/* NY — "After dark" */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #0a0a0b;      /* page */
  --black: #000;         /* headline band, masthead */
  --panel: #151619;      /* boards, tiles */
  --panel-2: #1d1f23;    /* hover */
  --line: #34363c;       /* non-text dividers */
  --white: #f5f5f2;      /* 18.6:1 on night */
  --grey: #ababab;       /* secondary text, 8.9:1 on night, 8.0:1 on panel */
  --taxi: #f7c600;       /* the one accent; 12.8:1 on night */
  --display: "Archivo", "Arial Narrow", sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--white); font: 400 1.125rem/1.55 var(--serif); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--white); text-decoration-color: var(--taxi); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--taxi); }
:focus-visible { outline: 3px solid var(--taxi); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-stretch: 65%; font-weight: 800; line-height: 0.92; text-transform: uppercase; letter-spacing: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--taxi); color: var(--black); }

.kicker { font: 700 0.875rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }

/* ---------- masthead ---------- */
.masthead { background: var(--black); border-bottom: 1px solid var(--line); }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.home { display: inline-flex; color: var(--white); text-decoration: none; }
.home:hover .brand-name { color: var(--taxi); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-code { font: 900 1.25rem/1 var(--display); font-stretch: 65%; border: 2px solid var(--white); padding: 4px 6px 3px; }
.brand-name { font: 800 1.25rem/1 var(--display); font-stretch: 65%; text-transform: uppercase; letter-spacing: 0.02em; }
.nav-wide ul { display: flex; }
.nav-wide a, .menu a { font: 700 0.9375rem/1 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.06em; color: var(--white); text-decoration: none; display: flex; align-items: center; min-height: 44px; }
.nav-wide a { padding: 0 14px; }
.nav-wide li:last-child a { padding-right: 0; }
.nav-wide a:hover, .menu a:hover { color: var(--taxi); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 800 0.9375rem/1 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.08em; border: 2px solid var(--white); padding: 0 16px; min-height: 44px; display: flex; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--white); color: var(--black); }
.menu nav { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); z-index: 5; }
.menu li + li { border-top: 1px solid var(--line); }
.menu a { padding: 0 16px; min-height: 48px; }
@media (max-width: 940px) { .nav-wide { display: none; } .menu { display: block; } }

/* ---------- hero: skyline + black band ---------- */
.hero-photo img { width: 100%; height: clamp(260px, 52vw, 60vh); object-fit: cover; object-position: center 60%; }
.band { position: relative; background: var(--black); padding: 28px 0 40px; }
.band h1 { position: relative; }
.hero:not(.hero-plain) .band { padding-top: 0; display: flow-root; }
/* headline sits on solid black strips that rise over the photo's lower edge */
.hero:not(.hero-plain) .band h1 { margin-top: clamp(-200px, -12vw, -64px); }
.hero:not(.hero-plain) .band h1 span { background: var(--black); padding: 0.06em 0.18em 0; margin-left: -0.18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.band h1 { font-size: clamp(2.875rem, 1.2rem + 6.4vw, 7.5rem); line-height: 0.98; max-width: 22ch; text-wrap: balance; }
.band-grid { display: grid; gap: 40px; margin-top: 32px; }
@media (min-width: 980px) { .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: start; margin-top: 40px; } }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--white); max-width: 54ch; }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn, .btn-ghost { font: 800 1.0625rem/1.2 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.04em; display: inline-flex; align-items: center; min-height: 52px; padding: 12px 22px; text-decoration: none; border: 2px solid var(--white); }
.btn { background: var(--taxi); border-color: var(--taxi); color: var(--black); }
.btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-ghost { color: var(--white); background: transparent; }
.btn-ghost:hover { color: var(--taxi); border-color: var(--taxi); }
.photo-credit { padding-top: 10px; padding-bottom: 12px; font-size: 0.875rem; color: var(--grey); background: var(--black); }
.hero .photo-credit { background: none; }
.photo-credit a { color: var(--grey); }

.next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 32px; padding: 14px 0; min-height: 48px; max-width: 54ch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--white); text-decoration: none; }
#lt-next[hidden] { display: none; }
.next [data-part="label"] { flex-basis: 100%; font: 700 0.875rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.next [data-part="date"] { font: 800 2.5rem/1 var(--display); font-stretch: 65%; text-transform: uppercase; color: var(--taxi); }
.next [data-part="type"] { font-size: 1.125rem; }
.next:hover [data-part="type"] { text-decoration: underline; text-decoration-color: var(--taxi); }

/* the building directory */
.board { background: var(--panel); border: 1px solid var(--line); scroll-margin-top: 16px; }
.board-head { padding: 18px 18px 14px; }
.board h2 { margin-top: 6px; font-size: 2rem; line-height: 0.95; }
.finder { padding: 0 18px 14px; }
.finder label { display: block; margin-bottom: 6px; font: 700 0.875rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.08em; text-transform: uppercase; }
.finder input { width: 100%; min-height: 52px; padding: 8px 14px; font: 700 1.375rem/1.2 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.03em; color: var(--white); background: var(--black); border: 2px solid var(--grey); border-radius: 0; -webkit-appearance: none; appearance: none; }
.finder input:focus-visible { border-color: var(--taxi); outline-offset: 0; outline-width: 2px; }
.count { margin-top: 6px; font-size: 0.9375rem; color: var(--grey); }
.dir { background: var(--black); border-top: 1px solid var(--line); max-height: min(30rem, 64vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--line) var(--black); }
.grp { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.grp:last-child { border-bottom: 0; }
.ltr { padding: 12px 0 0 18px; font: 900 1.125rem/1 var(--display); font-stretch: 65%; color: var(--grey); }
.grp a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 44px; padding: 11px 18px 9px 0; text-decoration: none; font: 700 1.1875rem/1.1 var(--display); font-stretch: 70%; text-transform: uppercase; letter-spacing: 0.03em; }
.grp a:hover { color: var(--taxi); }
.dir a:focus-visible { outline-offset: -3px; }
.boro { font: 400 1rem/1.2 var(--serif); text-transform: none; letter-spacing: 0; color: var(--grey); text-align: right; }
.grp-city { grid-template-columns: 1fr; border-bottom: 2px solid var(--grey); }
.grp-city .ltr { padding: 14px 18px 4px; font-size: 0.875rem; font-weight: 700; font-stretch: 80%; letter-spacing: 0.12em; text-transform: uppercase; }
.grp-city ul { padding-left: 2.75rem; }
.grp-city a { font-size: 1.375rem; }
.grp-city .boro { color: var(--white); }
.none { padding: 14px 18px; font-size: 1rem; color: var(--grey); background: var(--black); }

/* ---------- the city grid ---------- */
.city { padding-top: 32px; padding-bottom: 72px; }
.sec { padding: 56px 0 0; scroll-margin-top: 8px; }
.sec-head { margin-bottom: 28px; }
.sec-head .kicker { margin-bottom: 8px; }
.sec h2 { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 5rem); max-width: 24ch; text-wrap: balance; }
.credit { margin-top: 20px; font-size: 1rem; color: var(--grey); max-width: 72ch; }
.credit a { color: var(--white); }
.cta { margin-top: 24px; }
.about p { max-width: 64ch; }
.about p + p { margin-top: 16px; }

/* steps: three columns */
.steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { background: var(--panel); padding: 22px 20px 12px; display: flex; flex-direction: column; }
.step-no { font: 900 3.5rem/0.9 var(--display); font-stretch: 65%; color: var(--grey); margin-bottom: 14px; }
.step-accent .step-no { color: var(--taxi); }
.step h3 { font-size: 1.875rem; line-height: 0.95; margin-bottom: 10px; }
.step p { font-size: 1.0625rem; }
.step-links { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 0 20px; }
.step-links a { display: inline-flex; align-items: center; min-height: 44px; font: 700 1rem/1.2 var(--display); font-stretch: 80%; text-transform: uppercase; letter-spacing: 0.04em; }
.note { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--line); font-size: 1.0625rem; max-width: none; }
.note-label { font: 800 0.9375rem/1 var(--display); font-stretch: 75%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--taxi); margin-right: 6px; }

/* elections + legislation side by side */
@media (min-width: 980px) { .pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } .pair .sec h2 { font-size: clamp(2.5rem, 1rem + 2.6vw, 3.75rem); } }
.fallback { padding: 18px 20px; background: var(--panel); max-width: 70ch; }
.board-list { background: var(--panel); }
.board-list .fallback { background: none; }
.election { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.election-date { font: 800 2.25rem/1 var(--display); font-stretch: 65%; text-transform: uppercase; color: var(--white); }
.election-type { margin-top: 4px; color: var(--grey); }
.uocava { padding: 0 20px; border-bottom: 1px solid var(--line); }
.uocava summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 10px; font: 700 0.9375rem/1.2 var(--display); font-stretch: 80%; letter-spacing: 0.06em; text-transform: uppercase; }
.uocava summary::before { content: "+"; width: 1em; color: var(--taxi); }
.uocava[open] summary::before { content: "\2212"; }
.uocava li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.fvap { padding: 10px 0 14px; font-size: 1rem; }
.fvap a { display: inline-flex; align-items: center; min-height: 44px; }
.bills { display: grid; gap: 12px; }
.bill { background: var(--panel); padding: 18px 20px 8px; }
.bill-meta { font: 700 0.9375rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.bill-title { font: 500 1.25rem/1.3 var(--serif); text-transform: none; max-width: 60ch; }
.bill-action { margin-top: 8px; font-size: 0.9375rem; color: var(--grey); }
.bill a { display: inline-flex; align-items: center; min-height: 44px; font: 700 1rem/1.2 var(--display); font-stretch: 80%; text-transform: uppercase; letter-spacing: 0.04em; }
.updated { padding: 12px 0; font-size: 0.875rem; color: var(--grey); }
.board-list .updated { padding: 12px 20px; }

/* resources: dense tile grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.tiles a { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; height: 100%; min-height: 96px; padding: 16px 18px; background: var(--panel); text-decoration: none; font: 800 1.375rem/1 var(--display); font-stretch: 70%; text-transform: uppercase; letter-spacing: 0.02em; }
.tiles a:hover { background: var(--panel-2); color: var(--taxi); }
.host { font: 400 0.9375rem/1.3 var(--serif); text-transform: none; letter-spacing: 0; color: var(--grey); overflow-wrap: anywhere; }
.sub { margin: 32px 0 14px; font-size: 1.75rem; }
.sub:has(+ .tiles-info:empty), .tiles-info:empty { display: none; }

/* about + the capitol, small */
@media (min-width: 860px) { .sec-about { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 56px; align-items: start; } .sec-about .sec-head { grid-column: 1 / -1; } }
.capitol { margin: 32px 0 0; max-width: 340px; }
@media (min-width: 860px) { .capitol { margin-top: 0; } }
.capitol figcaption, .cphoto figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--grey); }
.capitol figcaption a, .cphoto figcaption a { color: var(--grey); }

/* footer */
.foot { background: var(--black); border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; }
.foot-brand { font: 800 1.25rem/1 var(--display); font-stretch: 65%; text-transform: uppercase; letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; font: 700 0.9375rem/1.2 var(--display); font-stretch: 80%; text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 560px) { .actions .btn, .actions .btn-ghost, .cta .btn-ghost { width: 100%; justify-content: center; text-align: center; } }

/* ---------- county page ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; font: 700 0.875rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; padding: 0 10px; }
.crumbs a { color: var(--grey); display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 560px) { .crumbs li[aria-current] { display: none; } }
.county-page .band { padding-top: 12px; padding-bottom: 48px; }
.county-top { display: grid; gap: 32px; margin-top: 20px; }
@media (min-width: 980px) { .county-top { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: end; } .county-solo { grid-template-columns: 1fr; } }
.county-top .kicker { margin-bottom: 12px; color: var(--taxi); }
.county-page h1 { font-size: clamp(3rem, 1rem + 5.6vw, 6.25rem); text-wrap: balance; overflow-wrap: break-word; }
.county-page .lede { margin-top: 24px; }
.cphoto { margin: 0; }
.cphoto img { width: 100%; max-height: 60vh; object-fit: cover; }
.back { margin-top: 24px; }
.back a { display: inline-flex; align-items: center; min-height: 44px; font: 800 1.125rem/1.2 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.04em; }

/* county details: facts board, communities, history, neighbors */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 0; }
.facts > div { background: var(--panel); padding: 16px 16px 18px; }
@media (min-width: 720px) { .facts > div { padding: 18px 20px 20px; } }
.facts dt { font: 700 0.875rem/1.3 var(--display); font-stretch: 80%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.facts dd { margin: 8px 0 0; font: 800 clamp(1.625rem, 1rem + 2vw, 2.25rem)/1 var(--display); font-stretch: 65%; text-transform: uppercase; overflow-wrap: anywhere; }
.places { background: var(--panel); }
.places li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.places li:last-child { border-bottom: 0; }
.pl-name { font: 700 1.25rem/1.15 var(--display); font-stretch: 70%; text-transform: uppercase; letter-spacing: 0.03em; }
.seat { display: inline-block; margin-left: 8px; font: 700 0.8125rem/1 var(--display); font-stretch: 80%; letter-spacing: 0.08em; color: var(--taxi); vertical-align: 0.15em; }
.pl-pop { font-size: 1.0625rem; color: var(--grey); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pair-solo { grid-template-columns: 1fr !important; }
.tiles-near a { min-height: 64px; justify-content: center; }
