:root {
  color-scheme: light;

  /* Keep these away from troyny.gov's maroon (#6C2727), navy (#233365), and
     Lato font, so the page is not mistaken for an official City site. */
  --paper:      oklch(0.97 0.014 75);
  --paper-tint: oklch(0.935 0.022 60);
  --ink:        oklch(0.24 0.012 250);
  --ink-muted:  oklch(0.45 0.015 250);
  --rule:       oklch(0.85 0.025 60);

  --brick:       oklch(0.46 0.13 32);
  --brick-hover: oklch(0.39 0.12 32);
  --on-brick:    oklch(0.985 0.01 75);
  --river:       oklch(0.44 0.06 235);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.875rem, 0.85rem + 0.11vw, 0.9375rem);
  --step-0:  clamp(1rem, 0.95rem + 0.23vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.4rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.1vw, 2.4rem);
  --step-5:  clamp(2.5rem, 1.9rem + 2.8vw, 4.25rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:      oklch(0.19 0.01 250);
    --paper-tint: oklch(0.23 0.012 250);
    --ink:        oklch(0.93 0.012 75);
    --ink-muted:  oklch(0.76 0.015 70);
    --rule:       oklch(0.35 0.015 250);
    --brick:       oklch(0.74 0.11 35);
    --brick-hover: oklch(0.82 0.09 35);
    --on-brick:    oklch(0.2 0.03 32);
    --river:       oklch(0.8 0.06 230);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      oklch(0.19 0.01 250);
  --paper-tint: oklch(0.23 0.012 250);
  --ink:        oklch(0.93 0.012 75);
  --ink-muted:  oklch(0.76 0.015 70);
  --rule:       oklch(0.35 0.015 250);
  --brick:       oklch(0.74 0.11 35);
  --brick-hover: oklch(0.82 0.09 35);
  --on-brick:    oklch(0.2 0.03 32);
  --river:       oklch(0.8 0.06 230);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--space-24); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  margin: 0;
  text-wrap: pretty;
}
h1 { font-size: var(--step-5); letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; margin-bottom: var(--space-8); }
h3 { font-size: var(--step-1); font-weight: 600; }

p { margin: 0; }

a { color: var(--brick); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 40rem) { .wrap { padding-inline: var(--space-8); } }

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--brick);
  color: var(--on-brick);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus { top: var(--space-4); }

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  min-height: 60px;
  padding-block: var(--space-2);
}
.brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-left: auto;
  font-size: var(--step--1);
}
nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-block: var(--space-2);
}
nav a:hover { color: var(--ink); }
@media (max-width: 47.99rem) { nav { display: none; } }

.theme-toggle {
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 var(--space-4);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }
@media (max-width: 47.99rem) {
  .masthead-row { flex-wrap: nowrap; column-gap: var(--space-2); }
  .brand, .theme-toggle { white-space: nowrap; }
  .brand { font-size: 1rem; }
  .theme-toggle { margin-left: auto; flex-shrink: 0; padding: 0 var(--space-3); }
}

.hero { padding-block: var(--space-16) var(--space-16); }
@media (min-width: 48rem) { .hero { padding-block: var(--space-24) var(--space-16); } }
.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: var(--space-4);
}
.hero h1 { max-width: 14em; }
.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-muted);
  margin-block: var(--space-6) var(--space-8);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: 999px;
  background: var(--brick);
  color: var(--on-brick);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--brick-hover); color: var(--on-brick); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6) var(--space-4);
  margin: var(--space-16) 0 0;
  padding-top: var(--space-8);
  border-top: 1px solid var(--rule);
}
/* With `column-reverse`, `flex-end` keeps the values at the top, so they line
   up when one label wraps to two lines. */
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: center; text-align: center; gap: var(--space-1); }
.stats div + div { border-left: 1px solid var(--rule); }
.stats dt { font-size: var(--step--1); color: var(--ink-muted); }
.stats dd {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
}
.stats-note { font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--space-6); text-align: center; }

.section { padding-block: var(--space-16); }
@media (min-width: 48rem) { .section { padding-block: var(--space-24); } }
.tinted { background: var(--paper-tint); }
.section-lede { color: var(--ink-muted); margin: calc(var(--space-8) * -1 + var(--space-3)) 0 var(--space-8); }

.meta { font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--space-3); }
.meta strong { color: var(--ink); font-weight: 600; }

.laws {
  list-style: none;
  counter-reset: law;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-12);
}
.laws li {
  counter-increment: law;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: var(--space-4);
}
@media (min-width: 48rem) { .laws li { grid-template-columns: 5rem 1fr; } }
.laws li::before {
  content: counter(law);
  grid-row: span 3;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1;
  color: var(--brick);
}
.laws h3 { margin-bottom: var(--space-2); }

.items {
  display: grid;
  gap: var(--space-12) var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
/* Two fixed columns, so four items make a 2 by 2 grid instead of 3 plus 1. */
@media (min-width: 48rem) { .items-pairs { grid-template-columns: repeat(2, 1fr); } }
.items article { border-top: 3px solid var(--brick); padding-top: var(--space-4); }
.items h3 { margin-bottom: var(--space-2); }

.facts {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: 0;
}
.facts div { display: flex; flex-direction: column; gap: var(--space-1); }
.facts dt {
  font-size: var(--step-3);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.facts dd { margin: 0; }
.heard .meta { margin-top: var(--space-8); }

.members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.members li {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  align-content: center;
  column-gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.portrait {
  grid-row: span 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--river);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.25; align-self: end; }
.role { grid-column: 2; font-size: var(--step--1); color: var(--ink-muted); align-self: start; }
#council .meta { margin-top: var(--space-6); }

.calendar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}
.calendar li {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1) var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
@media (min-width: 40rem) { .calendar li { grid-template-columns: 11rem 1fr; align-items: baseline; } }
.calendar time {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 650;
  display: flex;
  flex-direction: column;
}
.calendar time span { font-family: var(--font-body); font-size: var(--step--1); font-weight: 400; color: var(--ink-muted); }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-8); }
.hero .links { margin-top: 0; }
.follow { margin-top: var(--space-6); }

.footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-8) var(--space-12);
  font-size: var(--step--1);
  color: var(--ink-muted);
}
