/* QuorumCivic home page: the Public Record Program.
 * Its own visual world, separate from styles.css (the legal and support
 * pages): a black title band over a strict keylined grid, set in Public
 * Sans. Ember is a rule, not an accent: it marks only your own three and
 * the primary action.
 */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #FFFFFF;
  --ink: #111111;
  --ink-2: #3A3D44;
  --ink-3: #5B5F68;
  --field: #D9DCE1;
  --rule: #111111;
  --rule-soft: #C9CDD3;
  --band: #111111;
  --band-ink: #FFFFFF;
  --band-ink-2: #C9CCD2;
  --spark: #FF6200;
  --ember: #BE4700;
  --ember-hover: #9E3B00;
  --on-ember: #FFFFFF;
  --sq-yea: #111111;
  --sq-nay: #FFFFFF;
  --sq-nv: #6E737C;
  --err: #A1261B;
  --pad: 40px;
  --max: 1440px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E0F12;
    --ink: #F2F3F5;
    --ink-2: #C3C6CC;
    --ink-3: #9A9EA7;
    --field: #17191D;
    --rule: #9A9EA7;
    --rule-soft: #2E3138;
    --band: #000000;
    --band-ink: #F2F3F5;
    --band-ink-2: #A9ADB5;
    --ember: #FF6200;
    --ember-hover: #FF8533;
    --on-ember: #0B0B0F;
    --sq-yea: #F2F3F5;
    --sq-nay: #0E0F12;
    --sq-nv: #5A5E68;
    --err: #FF8A7A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 "Public Sans", system-ui, sans-serif;
  font-feature-settings: "tnum" 0;
}
::selection { background: var(--ink); color: var(--ground); }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, figcaption { margin: 0; text-wrap: pretty; }
img { max-width: 100%; }
[hidden] { display: none !important; }

html.android .ios-only, html.ios .android-only { display: none; }
.nav-tight { display: none; }

/* ── Store buttons: the one ember control besides your three ─────────────── */
.store, .sticky-bar .btn, .zip-field button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ember);
  color: var(--on-ember);
  border: 0;
  font: 650 15px/1 "Public Sans", system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s cubic-bezier(.16, 1, .3, 1);
}
.store:hover, .sticky-bar .btn:hover, .zip-field button:hover { background: var(--ember-hover); text-decoration: none; }

/* ── Title band ───────────────────────────────────────────────────────────── */
.band { background: var(--band); color: var(--band-ink); }
/* The program's signature: a ground hairline, then a heavy black rule. */
.band::after { content: ""; display: block; height: 3px; background: var(--ground); border-bottom: 8px solid var(--band); }
.band-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--pad) 18px;
  display: flex;
  align-items: flex-end;
  gap: 32px;
}
.band :focus-visible { outline-color: var(--band-ink); }
.wordmark { text-decoration: none; display: flex; flex-direction: column; margin-right: auto; }
.wordmark-name { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.wordmark .spark { color: var(--spark); }
.wordmark-sub { font-size: 14px; color: var(--band-ink-2); margin-top: 8px; }
.band-nav { display: flex; gap: 4px; padding-bottom: 2px; }
.band-nav a {
  color: var(--band-ink);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  padding: 12px 12px;
}
.band-nav a:hover { text-decoration: underline; }
.band-store { display: flex; gap: 8px; }
/* No platform detected (desktop): two outlined links, so ember stays the rule
   for a single primary action. A phone gets its one store button in ember. */
html:not(.ios):not(.android) .band .store, html:not(.ios):not(.android) .closing .store { background: transparent; color: var(--band-ink); box-shadow: inset 0 0 0 1.5px var(--band-ink); }
html:not(.ios):not(.android) .band .store:hover, html:not(.ios):not(.android) .closing .store:hover { background: var(--band-ink); color: var(--band); }
.band-line {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad) 14px;
  border-top: 1px solid #3A3D44;
  font-size: 14px;
  color: var(--band-ink-2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* ── The record: finding + board ─────────────────────────────────────────── */
main { max-width: var(--max); margin: 0 auto; }
.record {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border-bottom: 1px solid var(--rule);
}
.panel { padding: 36px var(--pad) 40px; }
.finding { border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.finding h1 {
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.finding-dek { margin-top: 18px; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.finding-more { margin-top: 22px; }
.finding-more a { font-weight: 700; font-size: 17px; }
.finding-more a::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); }
.finding-source { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }
.finding-top { margin-bottom: 32px; }
.statement {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  color: var(--ink-2);
  max-width: 58ch;
}

.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; }
.board-head h2 { font-size: 26px; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; }
.board-vote { margin-top: 8px; font-size: 15px; color: var(--ink-2); max-width: 52ch; }
.tally { display: flex; gap: 22px; margin: 0; }
.tally div { display: flex; flex-direction: column-reverse; }
.tally dt { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.tally dd { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

.board {
  --cols: 44;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 3px;
  padding: 12px;
  background: var(--field);
  border: 1px solid var(--rule);
  min-height: 120px;
}
.board.is-empty { display: grid; place-items: center; font-size: 15px; color: var(--ink-3); grid-template-columns: 1fr; }
.sq { display: block; aspect-ratio: 1; border-radius: 1px; transition: opacity .7s cubic-bezier(.16, 1, .3, 1); }
.sq.y { background: var(--sq-yea); }
.sq.n { background: var(--sq-nay); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sq.nv { background: var(--sq-nv); }
.sq.me { background: var(--ember); box-shadow: 0 0 0 2px var(--field), 0 0 0 4px var(--ember); position: relative; z-index: 1; }
/* The one authored moment: when your representative is found, the rest of
 * the chamber steps back and your square holds the light. */
.board.found .sq:not(.me) { opacity: .55; }
.board.found .sq.me { animation: lamp 1.1s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes lamp {
  from { box-shadow: 0 0 0 2px var(--field), 0 0 0 14px transparent; transform: scale(1.6); }
  to { box-shadow: 0 0 0 2px var(--field), 0 0 0 4px var(--ember); transform: scale(1); }
}

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend .sq { width: 11px; }

.zip-form { margin-top: 26px; }
.zip-form label { display: block; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.zip-field { display: flex; max-width: 460px; border: 2px solid var(--ink); }
.zip-field input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 19px "Public Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  caret-color: var(--ember);
}
.zip-field input::placeholder { color: var(--ink-3); letter-spacing: 0; }
.zip-field input:focus { outline: none; }
.zip-field:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.zip-field button { min-height: 52px; padding: 0 22px; font-size: 16px; }
.zip-field button:disabled { opacity: .7; cursor: progress; }
.zip-err { margin-top: 8px; font-size: 14px; font-weight: 650; color: var(--err); }
.zip-note { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); max-width: 60ch; }
.source { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ── Your own three ──────────────────────────────────────────────────────── */
.three { border-bottom: 1px solid var(--rule); }
.three-head { display: flex; align-items: baseline; gap: 28px; padding: 28px var(--pad) 22px; border-bottom: 1px solid var(--rule-soft); }
.three-head h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; white-space: nowrap; }
.three-head p { color: var(--ink-2); font-size: 16px; max-width: 60ch; }
.three-out:empty { display: none; }
.members { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.member { padding: 24px var(--pad) 26px; border-right: 1px solid var(--rule-soft); display: grid; grid-template-columns: 16px 1fr; gap: 14px; }
.member:last-child { border-right: 0; }
.member .mark { width: 16px; height: 16px; background: var(--ember); margin-top: 6px; }
.member .mark.idle { background: transparent; border: 1.5px dashed var(--rule-soft); }
.members-idle .member-name { color: var(--ink-3); font-weight: 650; }
.member-name { font-size: 22px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.25; }
.member-name a { text-decoration: none; }
.member-name a:hover { text-decoration: underline; }
.member-seat { font-size: 14px; color: var(--ink-3); margin-top: 3px; }
.member-vote { font-size: 16px; margin-top: 10px; color: var(--ink-2); }
.member-vote b { color: var(--ink); }
.three-msg { padding: 22px var(--pad); font-size: 16px; color: var(--ink-2); }
.three-msg.err { color: var(--err); font-weight: 600; }
.three-msg button { margin-left: 8px; background: none; border: 0; padding: 10px 4px; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.three-ctx { padding: 0 var(--pad) 20px; font-size: 13.5px; color: var(--ink-3); }
.three-ctx button { background: none; border: 0; padding: 10px 2px; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.senate { padding: 4px var(--pad) 26px; }
.senate-vote { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.board-senate { --cols: 50; max-width: 760px; }
.zip-cta { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 20px var(--pad); border-top: 1px solid var(--rule-soft); background: var(--field); }
.zip-cta p { flex: 1 1 320px; font-size: 16px; font-weight: 600; }

.trust {
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-2);
}
.trust span { display: block; max-width: 66ch; }

/* ── Screenshots ─────────────────────────────────────────────────────────── */
.shots-section { padding: 64px 0 56px; border-bottom: 1px solid var(--rule); }
.shots-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 var(--pad); margin-bottom: 28px; }
.shots-head h2, .inside h2, .prose h2, .closing h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.shots-nav { display: none; gap: 8px; }
@media (pointer: fine) { .shots-nav { display: flex; } }
.shots-btn { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ground); color: var(--ink); border: 1.5px solid var(--ink); cursor: pointer; }
.shots-btn:hover { background: var(--ink); color: var(--ground); }
.shots-btn:disabled { opacity: .3; cursor: default; background: var(--ground); color: var(--ink); }
.shots-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.shots {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad);
  padding: 4px var(--pad) 12px;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots:focus-visible { outline-offset: -2px; }
.phone { flex: 0 0 232px; margin: 0; scroll-snap-align: start; }
.phone .frame { background: #16171B; padding: 8px; border-radius: 34px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); }
.phone img { display: block; width: 100%; height: auto; border-radius: 26px; }
.phone figcaption { margin-top: 16px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* ── What's inside: a keylined index, not cards ──────────────────────────── */
.inside { padding: 64px var(--pad) 60px; border-bottom: 1px solid var(--rule); }
.inside h2 { margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.feature { padding: 20px 24px 8px 0; border-right: 1px solid var(--rule-soft); }
.feature + .feature { padding-left: 24px; }
.feature:last-child { border-right: 0; }
.feature h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 10px; }
.feature p { font-size: 15.5px; color: var(--ink-2); }

.prose { padding: 60px var(--pad); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 5fr 7fr; column-gap: 40px; }
.prose h2 { grid-column: 1; }
.prose p { grid-column: 2; max-width: 56ch; color: var(--ink-2); }
.prose p + p { margin-top: 16px; }
.prose a { color: var(--ink); }

/* ── Close: the band again, as a bookend ─────────────────────────────────── */
.closing { background: var(--band); color: var(--band-ink); padding: 64px var(--pad) 68px; }
.closing p { margin-top: 14px; color: var(--band-ink-2); max-width: 54ch; font-size: 17px; }
.closing-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.closing-row .store { min-height: 52px; padding: 0 24px; font-size: 16px; }
.closing :focus-visible { outline-color: var(--band-ink); }
html.android .closing-row a[data-store="google_play"] { order: -1; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 40px; font-size: 14px; color: var(--ink-3); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 6px; margin-left: -10px; }
.footer-links a { color: var(--ink-2); text-decoration: none; padding: 12px 10px; }
.footer-links a:hover { text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--ink); font-weight: 650; }
.footer-social { display: flex; gap: 2px; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink-2); }
.footer-social a:hover { color: var(--ink); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-credit { margin-top: 10px; }

/* ── Mobile sticky store bar (phones only; home.js toggles .show) ────────── */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--ground);
  border-top: 2px solid var(--ink);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), visibility .35s;
}
.sticky-bar.show { transform: translateY(0); visibility: visible; }
.sticky-inner { display: flex; align-items: center; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.sticky-line { flex: 1; font-size: 14px; line-height: 1.35; font-weight: 600; }
body.has-sticky footer { padding-bottom: 110px; }
@media (min-width: 761px) { .sticky-bar { display: none; } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .board { --cols: 30; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
  .feature:nth-child(3) { padding-left: 0; }
}
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .record { grid-template-columns: 1fr; }
  .finding { border-right: 0; border-bottom: 1px solid var(--rule); }
  .statement { margin-top: 28px; }
  .board { --cols: 29; }
  .prose { grid-template-columns: 1fr; }
  .prose h2 { margin-bottom: 18px; }
  .prose p { grid-column: 1; }
  .three-head { flex-direction: column; gap: 8px; }
}
@media (max-width: 760px) {
  .band-inner { flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 18px; padding-bottom: 12px; }
  .wordmark-name { font-size: 34px; }
  .band-nav { order: 3; width: 100%; margin-left: -12px; }
  .band-store { display: none; }
  .band-line { display: block; font-size: 13px; }
  .band-asof, .bl-tail { display: none; }
  .band::after { height: 2px; border-bottom-width: 5px; }
  .band-inner { padding-top: 12px; padding-bottom: 4px; }
  .band-line { padding-top: 6px; padding-bottom: 8px; }
  .band-line { padding-top: 10px; padding-bottom: 12px; }
  .band-nav a { padding: 8px 12px; font-size: 14.5px; }
  .wordmark-sub { margin-top: 4px; font-size: 13px; }
  .board { --cols: 30; gap: 2px; padding: 8px; }
  /* Phones: finding, then the board and its ZIP field, then the product
     statement, so the primary action lands in the first screen. */
  .record { display: flex; flex-direction: column; }
  .finding { display: contents; }
  .finding > * { padding-left: var(--pad); padding-right: var(--pad); }
  .finding h1 { padding-top: 16px; font-size: 27px; }
  .board-panel { margin-top: 8px; padding-top: 16px; }
  .board-panel { border-top: 1px solid var(--rule); display: flex; flex-direction: column; }
  .board-panel .zip-form { margin-top: 10px; }
  .zip-field input, .zip-field button { min-height: 48px; }
  /* ZIP sits right under the board on a phone; the key and source follow it. */
  .board-panel .legend, .board-panel .source { order: 2; }
  .board-panel .legend { margin-top: 18px; }
  .finding-dek { display: none; }
  .finding-top { margin-bottom: 0; }
  .finding-more { margin-top: 12px; }
  .finding-source { margin-top: 6px; font-size: 13px; line-height: 1.35; }
  .statement { order: 3; margin: 0; padding: 22px var(--pad) 26px; border-top: 1px solid var(--rule); }
  .board-head h2 { font-size: 21px; }
  .board-vote { font-size: 14.5px; margin-top: 6px; }
  .board-head { margin-bottom: 8px; }
  .board-senate { --cols: 20; }
  .board-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tally dd { font-size: 24px; }
  .board-head { gap: 10px; }
  .legend { font-size: 12.5px; gap: 4px 14px; margin-top: 10px; }
  .member { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .shots-head h2, .inside h2, .prose h2, .closing h2 { font-size: 28px; }
  .phone { flex-basis: 70%; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature + .feature { padding: 18px 0 10px; border-right: 0; }
  .feature + .feature { border-top: 1px solid var(--rule-soft); }
  .nav-wide { display: none; }
  .nav-tight { display: inline; }
}
@media (max-width: 380px) {
  .zip-field button { padding: 0 14px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
