:root {
  color-scheme: dark;
  --bg: #0d1110;
  --bg-alt: #111714;
  --panel: #161d1a;
  --panel-soft: #1d2521;
  --text: #f5efe6;
  --text-strong: #fffaf2;
  --muted: #aab5ae;
  --line: rgba(245, 239, 230, 0.15);
  --line-strong: rgba(245, 239, 230, 0.27);
  --accent: #a9f5cc;
  --accent-ink: #0d1110;
  --rust: #e06c56;
  --blue: #86b7e7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --header-bg: rgba(13, 17, 16, 0.9);
  --max: 1180px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f0e6;
  --bg-alt: #eee6d8;
  --panel: #fffaf2;
  --panel-soft: #f2ebdf;
  --text: #111614;
  --text-strong: #0b0f0d;
  --muted: #59645f;
  --line: rgba(17, 22, 20, 0.14);
  --line-strong: rgba(17, 22, 20, 0.26);
  --accent: #145f3b;
  --accent-ink: #fffaf2;
  --rust: #a34132;
  --blue: #315e88;
  --shadow: 0 22px 70px rgba(17, 22, 20, 0.12);
  --header-bg: rgba(246, 240, 230, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(3.15rem, 8vw, 6.8rem);
  font-weight: 880;
  line-height: 0.94;
  text-wrap: balance;
}

h2 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(2rem, 4.8vw, 4.5rem);
  font-weight: 850;
  line-height: 1;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.18;
}

p {
  margin-bottom: 18px;
}

strong {
  color: var(--text-strong);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  padding: 14px clamp(16px, 4vw, 44px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: max-content;
  color: var(--text-strong);
  font-weight: 850;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text-strong);
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.brand-name {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  min-width: 0;
  justify-content: center;
  gap: 4px;
}

.site-nav a,
.theme-toggle,
.nav-toggle,
.button,
.copy-button {
  min-height: 42px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.site-nav a,
.theme-toggle,
.nav-toggle {
  padding: 10px 11px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"],
.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--line-strong);
  color: var(--text-strong);
  outline: none;
}

.site-nav .nav-donate {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle {
  justify-self: end;
  border-color: var(--line);
}

.nav-toggle {
  display: none;
  justify-self: end;
  gap: 10px;
  border-color: var(--line);
}

.menu-icon {
  width: 16px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.hero,
.page-hero,
.section-grid,
.join-section,
.content-grid,
.cta-strip {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  padding: clamp(72px, 10vw, 142px) 0 clamp(56px, 8vw, 104px);
}

.split-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(34px, 7vw, 90px);
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-overline,
.section-kicker span,
.box-label {
  display: block;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-overline,
.section-kicker span {
  color: var(--rust);
}

.hero-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.action-row,
.input-row,
.cta-actions,
.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stacked-actions {
  display: grid;
}

.button,
.copy-button {
  border-color: currentColor;
  padding: 13px 17px;
}

.button:hover,
.button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: var(--accent-ink);
}

.button-secondary,
.copy-button {
  background: transparent;
  color: var(--text-strong);
}

.full-width {
  width: 100%;
}

.position-box,
.side-panel,
.notice-box,
.template-box,
.toc-panel,
.state-result,
.signup {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.position-box {
  padding: clamp(24px, 4vw, 36px);
}

.position-box p:last-child {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 720;
  line-height: 1.22;
}

.line-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.line-band div {
  min-height: 98px;
  border-right: 1px solid var(--line);
  display: grid;
  align-items: center;
  padding: 20px clamp(18px, 3vw, 34px);
  color: var(--text-strong);
  font-weight: 820;
}

.line-band div:last-child {
  border-right: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(68px, 10vw, 124px) 0;
}

.section-grid.compact {
  padding-top: clamp(42px, 7vw, 82px);
}

.section-kicker {
  min-width: 0;
}

.section-kicker span {
  border-top: 2px solid var(--line-strong);
  padding-top: 14px;
}

.section-body {
  min-width: 0;
}

.prose {
  max-width: 920px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 44px);
}

.statement,
.large-copy {
  max-width: 900px;
  margin: 28px 0 0;
  border-left: 3px solid var(--accent);
  padding-left: 22px;
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.16;
}

.comparison-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-grid article,
.card-grid article {
  background: var(--panel);
  padding: clamp(22px, 3vw, 32px);
}

.comparison-grid p,
.card-grid p,
.site-footer p,
.form-note,
.content-stack p,
.state-result p,
.notice-box p {
  color: var(--muted);
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.plain-list li::before {
  position: absolute;
  top: 1.18em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  content: "";
}

.plain-list li:last-child {
  border-bottom: 0;
}

.accent-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  gap: clamp(28px, 6vw, 72px);
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(54px, 8vw, 92px) max(18px, calc((100vw - var(--max)) / 2));
}

.accent-section h2,
.accent-section .section-overline,
.accent-section p {
  color: var(--accent-ink);
}

.accent-section p {
  align-self: end;
  margin-bottom: 0;
  font-weight: 650;
}

.law-text {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: clamp(26px, 5vw, 52px);
}

.law-text p {
  max-width: 960px;
  border-left: 3px solid var(--rust);
  padding-left: 20px;
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.7vw, 1.34rem);
  line-height: 1.34;
}

.law-text p:last-child {
  margin-bottom: 0;
}

.section-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.text-link {
  display: inline-flex;
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-weight: 820;
}

.cta-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: clamp(28px, 5vw, 48px);
}

.cta-strip.local {
  width: auto;
}

.cta-strip h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.7rem);
}

.join-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(68px, 10vw, 124px) 0;
}

.signup {
  align-self: start;
  padding: clamp(22px, 4vw, 36px);
}

.signup label,
.field-label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 850;
}

.signup input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  padding: 0 14px;
}

.signup input {
  flex: 1 1 220px;
  min-width: min(100%, 240px);
}

.signup input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(169, 245, 204, 0.2);
}

.form-note {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.page-shell {
  min-height: 70vh;
}

.page-hero {
  padding: clamp(62px, 9vw, 116px) 0 clamp(34px, 6vw, 72px);
}

.page-hero h1 {
  max-width: 1080px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.33fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
  padding: 0 0 clamp(72px, 10vw, 132px);
}

.side-panel,
.toc-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: clamp(20px, 3vw, 30px);
}

.toc-panel {
  display: grid;
  gap: 8px;
  box-shadow: none;
}

.toc-panel a {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.toc-panel a:last-child {
  border-bottom: 0;
}

.content-stack {
  display: grid;
  gap: clamp(38px, 6vw, 72px);
  min-width: 0;
}

.content-stack > section {
  min-width: 0;
}

.notice-box,
.state-result {
  padding: clamp(24px, 4vw, 38px);
}

.template-box {
  overflow: auto;
  max-width: 100%;
  padding: clamp(22px, 4vw, 34px);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--panel);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 17px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-strong);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

.sources-list a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.amount-grid a {
  display: grid;
  min-height: 82px;
  place-items: center;
  background: var(--panel-soft);
  color: var(--text-strong);
  font-size: 1.75rem;
  font-weight: 850;
}

.amount-grid a:hover,
.amount-grid a:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 34px max(18px, calc((100vw - var(--max)) / 2));
}

.site-footer strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.1rem;
}

.site-footer p {
  margin: 8px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer nav a {
  border: 1px solid var(--line);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .site-nav.is-open {
    display: grid;
    justify-content: stretch;
    gap: 0;
  }

  .site-nav a {
    justify-content: flex-start;
    border-bottom: 1px solid var(--line);
    padding: 15px;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .split-hero,
  .section-grid,
  .accent-section,
  .join-section,
  .content-grid,
  .cta-strip {
    grid-template-columns: 1fr;
  }

  .position-box {
    max-width: 720px;
  }

  .section-kicker span {
    width: max-content;
  }

  .side-panel,
  .toc-panel {
    position: static;
  }

  .cta-strip {
    align-items: start;
  }
}

@media (max-width: 780px) {
  .site-header {
    gap: 10px;
    padding: 11px 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    max-width: 156px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .theme-toggle,
  .nav-toggle {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .nav-toggle span:last-child {
    display: none;
  }

  .site-nav {
    inset: 62px 14px auto;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  h2 {
    font-size: clamp(1.85rem, 10vw, 3.1rem);
  }

  .hero,
  .page-hero,
  .section-grid,
  .join-section,
  .content-grid,
  .cta-strip {
    width: calc(100% - 32px);
  }

  .hero {
    padding-top: 56px;
  }

  .line-band,
  .two-col,
  .comparison-grid,
  .card-grid,
  .card-grid.three {
    grid-template-columns: 1fr;
  }

  .line-band div {
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .line-band div:last-child {
    border-bottom: 0;
  }

  .section-grid,
  .join-section {
    padding: 56px 0;
  }

  .page-hero {
    padding: 52px 0 34px;
  }

  .section-title-row {
    display: grid;
  }

  .button,
  .copy-button,
  .action-row .button,
  .cta-actions .button,
  .input-row .button {
    width: 100%;
  }

  .site-footer {
    display: block;
  }

  .site-footer nav {
    justify-content: flex-start;
    margin-top: 22px;
  }
}
