/* United Westside — unitedwestside.org
   Black-and-white, print-native. Every page must read when printed in B&W.
   Zero webfonts (slow connections and older phones are the audience). */

:root {
  --ink: #000;
  --ground: #faf8f4;
  --paper: #fff;
  --rule: #000;
  --measure: 62rem;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Georgia, "Liberation Serif", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Masthead (the flyer's kicker row) ---------- */

.masthead {
  border-bottom: 3px solid var(--rule);
  padding: 1.25rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.masthead .org {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.masthead nav {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.masthead nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.masthead nav a:hover,
.masthead nav a:focus-visible { border-bottom-color: var(--ink); }
.masthead nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- Type ---------- */

h1, h2, h3, .sans { font-family: var(--sans); }

h1 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.93;
  font-size: clamp(2.25rem, 7.5vw, 4.25rem);
  margin: 1.75rem 0 1rem;
  max-width: 22ch;
}

h2 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.0625rem;
  line-height: 1.25;
  border-top: 3px solid var(--rule);
  padding-top: 0.6rem;
  margin: 2.5rem 0 0.75rem;
}

.h-campaign {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  margin: 0 0 1rem;
  max-width: 26ch;
}

h3 {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.3;
  margin: 1.5rem 0 0.35rem;
}

p { margin: 0 0 0.9rem; }

.deck {
  font-size: clamp(1.125rem, 2.6vw, 1.375rem);
  line-height: 1.42;
  max-width: 46ch;
  margin-bottom: 1.5rem;
}

.deck strong, .lede strong { font-family: var(--sans); font-weight: 800; }

.small { font-size: 0.9375rem; line-height: 1.45; }

a { color: var(--ink); }

.kicker {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

/* ---------- Layout ---------- */

section { margin: 0 0 1rem; }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
  align-items: start;
}

.cols--wide { grid-template-columns: 1.15fr 1fr; }

@media (max-width: 46rem) {
  .cols, .cols--wide { grid-template-columns: 1fr; gap: 0.5rem; }
}

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* ---------- Black boxes: the single most important thing on a page ---------- */

.blackbox {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem 1.5rem 1.4rem;
  margin: 1.25rem 0 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 40rem) {
  .blackbox { grid-template-columns: 1fr; gap: 0.9rem; }
}

.blackbox a { color: var(--paper); }

.blackbox .when { font-family: var(--sans); font-weight: 800; line-height: 1.05; }
.blackbox .when .day { font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; }
.blackbox .when .date { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.01em; margin-top: 0.15rem; }
.blackbox .when .time { font-size: 1.125rem; margin-top: 0.15rem; }
.blackbox .where { line-height: 1.35; }
.blackbox .where b { font-family: var(--sans); font-weight: 800; display: block; margin-bottom: 0.2rem; }
.blackbox p:last-child { margin-bottom: 0; }

.notebox {
  background: var(--ink);
  color: var(--paper);
  padding: 1.1rem 1.4rem 1.2rem;
  margin: 1.5rem 0;
}
.notebox .lbl {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.0625rem;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}
.notebox p { margin: 0; }
.notebox a { color: var(--paper); }

/* ---------- Buttons: solid black blocks ---------- */

.btnrow { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 1rem; }

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border: 3px solid var(--ink);
  line-height: 1.2;
}

.btn:hover, .btn:focus-visible { background: var(--ground); color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ink); color: var(--ground); }

/* ---------- Numbered steps: black squares ---------- */

.steps { counter-reset: s; list-style: none; margin: 1rem 0 1.25rem; padding: 0; }
.steps li { position: relative; padding-left: 3rem; margin: 0 0 1rem; }
.steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute; left: 0; top: 0.1rem;
  width: 2.1rem; height: 2.1rem;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-weight: 800; font-size: 1.25rem;
  text-align: center; line-height: 2.1rem;
}
.steps b, .steps strong { font-family: var(--sans); font-weight: 800; }

/* ---------- Timeline: verdict then fact ---------- */

.timeline { list-style: none; margin: 1rem 0 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
}
.timeline .d {
  font-family: var(--sans); font-weight: 800;
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.3; padding-top: 0.15rem;
}
.timeline .t b { font-family: var(--sans); font-weight: 800; }
.timeline .t p:last-child { margin-bottom: 0; }

@media (max-width: 40rem) {
  .timeline li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Roll call ---------- */

.rollcall { border: 3px solid var(--rule); padding: 1.1rem 1.25rem 1.2rem; margin: 1.25rem 0; }
.rollcall .lbl {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 1rem; margin-bottom: 0.6rem;
}
.rollcall .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.rollcall .row b {
  font-family: var(--sans); font-weight: 800; display: block;
  font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.25rem; margin-bottom: 0.35rem;
}
.rollcall ul { list-style: none; margin: 0; padding: 0; line-height: 1.45; }
.rollcall .tag { font-family: var(--sans); font-weight: 800; font-size: 1.0625rem; margin-top: 0.9rem; }

@media (max-width: 34rem) { .rollcall .row { grid-template-columns: 1fr; gap: 0.9rem; } }

/* ---------- Pull quotes: left rule ---------- */

.quotes { list-style: none; margin: 1rem 0; padding: 0; }
.quotes li { margin: 0 0 1rem; padding-left: 0.9rem; border-left: 4px solid var(--rule); }
.quotes .who {
  font-family: var(--sans); font-weight: 800; font-size: 0.8125rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: block; margin-top: 0.25rem;
}

.pull {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.2;
  margin: 1.25rem 0;
}

/* ---------- Form ---------- */

.form { margin: 1.25rem 0; max-width: 34rem; }
.form label {
  display: block; font-family: var(--sans); font-weight: 800;
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin: 1rem 0 0.3rem;
}
.form input[type="text"],
.form input[type="email"] {
  width: 100%; font-family: var(--serif); font-size: 1.0625rem;
  padding: 0.6rem 0.7rem; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); border-radius: 0;
}
.form .choices { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-top: 0.3rem; }
.form .choices span { display: flex; align-items: center; gap: 0.4rem; }
.form .choices label {
  font-family: var(--serif); font-weight: 400; font-size: 1.0625rem;
  letter-spacing: 0; text-transform: none; margin: 0;
}
.form button { margin-top: 1.5rem; cursor: pointer; font: inherit; }
.form .form-lbl {
  font-family: var(--sans); font-weight: 800; font-size: 0.8125rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 1.25rem 0 0.3rem;
}
.form input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--ink); margin: 0; }
.form input:focus-visible, .form button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.form .choices { flex-direction: column; gap: 0.5rem; }

.mt-lede { margin-top: 1.5rem; }
.h-flush { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.deck--tight { margin-bottom: 1rem; }
.deck--small { font-size: 1.125rem; max-width: 60ch; }
.plainlist { list-style: none; margin: 0; padding: 0; line-height: 1.7; }
.note { margin-top: 0.75rem; }

/* ---------- Sources: the house habit ---------- */

.sources { font-size: 0.875rem; line-height: 1.5; margin: 2.5rem 0 0; }
.sources h2 { font-size: 0.875rem; }
.sources ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.sources li { margin: 0 0 0.4rem; padding-left: 1rem; text-indent: -1rem; word-wrap: break-word; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.pagefoot {
  border-top: 3px solid var(--rule);
  margin-top: 3rem;
  padding: 1rem 0 3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.pagefoot b { font-weight: 800; }

/* ---------- Campaign state machine ----------
   Flip <html data-campaign="..."> to change every campaign module on the site.
   States: pending | passed_awaiting_mayor | vetoed | defeated | dissolved
   Elements carry data-state with one or more space-separated state names. */

[data-state] { display: none; }
[data-campaign="pending"]               [data-state~="pending"],
[data-campaign="passed_awaiting_mayor"] [data-state~="passed_awaiting_mayor"],
[data-campaign="vetoed"]                [data-state~="vetoed"],
[data-campaign="defeated"]              [data-state~="defeated"],
[data-campaign="dissolved"]             [data-state~="dissolved"] { display: var(--on, revert); }

/* Components whose layout depends on a specific display value declare it here,
   so the state machine restores the right one rather than the UA default. */
.btn    { --on: inline-block; }
.blackbox { --on: grid; }
.timeline li { --on: grid; }

/* ---------- Print: this site gets printed and handed out ---------- */

@media print {
  :root { --ground: #fff; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.34; }
  .wrap { max-width: none; padding: 0; }
  .masthead nav, .btnrow, .form button { display: none; }
  .blackbox, .notebox, .btn {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  h1 { font-size: 30pt; }
  h2 { font-size: 11.5pt; }
  a { text-decoration: none; }
  .sources a::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }
  .pagefoot { padding-bottom: 0; }
  section, .rollcall, .blackbox, .notebox { break-inside: avoid; }
}
