:root {
  --ink: #1c1915;
  --navy: #0e2744;
  --navy-soft: #16365c;
  --gold: #8d7340;
  --gold-line: #c6b48a;
  --paper: #f4f0e7;
  --card: #fffdf8;
  --line: #e3dccb;
  --muted: #5e584e;
  --link: #1d4e89;
  --serif: "Literata", "Liberation Serif", "Times New Roman", Times, serif;
  --sans: "Golos Text", "Liberation Sans", "Segoe UI", sans-serif;
  --shadow: 0 12px 40px rgba(14, 39, 68, 0.06);
}

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

html { font-size: 17px; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(14, 39, 68, 0.045) 0.7px, transparent 0.7px);
  background-size: 16px 16px;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; }

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

a:hover { color: var(--navy); }

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

::selection { background: #e7d7a8; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  z-index: 40;
}

.skip:focus { top: 8px; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow { width: min(760px, calc(100% - 32px)); }

.util {
  background: var(--navy);
  color: #f3efe4;
  font-size: 0.82rem;
}

.util-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}

.tricolor {
  height: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.tricolor span:nth-child(1) { background: #fff; box-shadow: inset 0 0 0 1px rgba(14, 39, 68, 0.08); }
.tricolor span:nth-child(2) { background: #0039a6; }
.tricolor span:nth-child(3) { background: #d52b1e; }

.sticky-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f7f4ec;
  border-bottom: 1px solid var(--line);
}

.site-header { padding: 14px 0 0; }

.header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand auth"
    "nav nav";
  gap: 8px 24px;
  align-items: center;
}

.brand {
  grid-area: brand;
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand img { flex: 0 0 auto; }

.brand-kicker {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--navy);
}

.header-auth {
  grid-area: auth;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.header-auth-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.header-auth a {
  text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--gold-line);
  background: #fff;
  padding: 8px 12px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.header-auth a:hover { border-color: var(--navy); }

.nav-toggle {
  display: none;
  grid-area: toggle;
  border: 1px solid var(--gold-line);
  background: #fff;
  color: var(--navy);
  min-height: 40px;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
}

#site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 6px 0 10px;
}

#site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

#site-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

main { padding: 36px 0 64px; min-height: 58vh; }

.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 650; color: var(--navy); scroll-margin-top: 120px; }

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1.15;
}

h2 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 12px; }

h3 { font-size: 1.2rem; margin: 0 0 8px; }

.lede, .lead-clip { color: var(--ink); }

.lede { font-size: 1.12rem; max-width: 68ch; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.folio {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px 22px 22px 26px;
  position: relative;
}

.folio::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
}

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

.law-title {
  font-family: var(--serif);
  color: var(--navy);
  margin: 0 0 8px;
}

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

.small { font-size: 0.92rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 8px 0 36px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 16px 14px;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 650;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat span { color: var(--muted); font-size: 0.92rem; }

.section { margin: 40px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.section-head a { white-space: nowrap; }

.stack { display: grid; gap: 12px; }

.reg-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px 18px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.monogram {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: var(--navy);
  background: #f7f1e4;
  letter-spacing: 0.03em;
}

.idline {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.reg-card h2,
.reg-card h3 { margin: 0 0 4px; font-size: 1.28rem; }

.reg-card h2 a,
.reg-card h3 a { color: var(--navy); text-decoration: none; }

.reg-card h2 a:hover,
.reg-card h3 a:hover { text-decoration: underline; }

.meta { margin: 0 0 8px; color: var(--muted); }

.lead-clip {
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.tone-collect { color: var(--navy); background: #e7eef6; }
.tone-check { color: #6b4e12; background: #f8f1de; }
.tone-commission { color: #1d4e89; background: #e7f0f8; }
.tone-submitted { color: #1e6b45; background: #e7f5ee; }
.tone-post { color: #6e2430; background: #f8ecee; }
.tone-sample { color: #3e382c; background: #f3efe4; border-color: var(--gold-line); }

.reg-side { text-align: right; min-width: 180px; }

.support-num {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.support-label { margin: 4px 0 8px; color: var(--muted); font-size: 0.82rem; }

.bar {
  height: 6px;
  background: #ece5d6;
  margin-bottom: 10px;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gold-line);
}

.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.action-row, .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 14px 14px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
}

.steps strong { display: block; margin-bottom: 6px; color: var(--navy); }

.feed { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); }

.feed li { padding: 12px 16px; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }

.feed time { display: block; color: var(--gold); font-size: 0.82rem; }

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 0.8fr));
  gap: 10px;
  margin: 16px 0;
  align-items: end;
}

label.field { display: grid; gap: 4px; font-size: 0.82rem; color: var(--muted); }

input[type="search"],
select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--gold-line);
  min-height: 44px;
  padding: 0 10px;
  width: 100%;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.95rem;
}

.registry-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.table-wrap { overflow-x: auto; max-width: 100%; background: var(--card); border: 1px solid var(--line); }

table.registry {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.registry th,
table.registry td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.registry th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

table.registry a { color: var(--navy); font-weight: 600; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.pager .btn[aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.crumbs a { color: var(--link); }

.person-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.person-head .monogram { width: 76px; height: 76px; font-size: 1.2rem; }

.plate {
  background: #f7f1e4;
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  margin: 0 0 16px;
}

.progress-block { margin: 8px 0 18px; max-width: 460px; }

.petition-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.prose { max-width: 74ch; }

.prose p,
.prose li { line-height: 1.6; }

.prose h2 { margin-top: 1.5em; }

.facts {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 16px 14px;
}

.facts dl { margin: 0; }
.facts dt { margin-top: 12px; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; }

.merit-list, .doc-list { padding-left: 18px; }

.doc-list li { margin: 8px 0; }
.doc-state { color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  padding: 0 0 16px 16px;
  border-left: 2px solid var(--gold-line);
  position: relative;
}
.timeline li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy);
  position: absolute;
  left: -5px;
  top: 6px;
}
.timeline time { color: var(--gold); font-size: 0.85rem; }

.page-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.toc p { margin: 0 0 4px; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

.toc a { color: var(--navy); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.formal { padding-left: 1.2rem; }
.formal li { margin: 10px 0; }

.msg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.msg-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.msg-card:hover { border-color: var(--navy); }

.msg-kicker { font-family: var(--serif); font-size: 1.4rem; color: var(--navy); }
.msg-text { color: var(--muted); flex: 1; }
.msg-go { font-weight: 700; color: var(--link); }

details.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
}

details.faq:last-of-type { border-bottom: 1px solid var(--line); }

details.faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 650;
  color: var(--navy);
}

details.faq .faq-body { padding: 0 16px 14px; }

.banner {
  background: #f8f1de;
  border: 1px solid var(--gold-line);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.empty {
  background: var(--card);
  border: 1px dashed var(--gold-line);
  padding: 24px 16px;
}

.receipt p:first-child { margin-top: 0; }

.noscript-note {
  padding-bottom: 28px;
}

.site-footer { background: var(--navy); color: #efe8da; margin-top: 12px; }

.site-footer a { color: #f3e6c4; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  padding: 28px 0 10px;
}

.footer-name { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 8px; }

.footer-label {
  margin: 0 0 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #d4bc7d;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 6px 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.footer-legal {
  padding: 8px 0 22px;
  color: #c9c1b2;
  font-size: 0.85rem;
}

.num { font-variant-numeric: tabular-nums; }

@media (max-width: 960px) {
  .hero,
  .stats,
  .steps,
  .msg-grid,
  .petition-layout,
  .page-grid,
  .footer-grid,
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .page-grid,
  .petition-layout,
  .hero,
  .footer-grid { grid-template-columns: 1fr; }

  .toc { position: static; }

  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .header-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "auth auth"
      "nav nav";
  }

  #site-nav { display: none; flex-direction: column; gap: 0; padding-bottom: 12px; }
  body.nav-open #site-nav { display: flex; }
  #site-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }

  .header-auth { justify-content: flex-start; }
  .reg-card { grid-template-columns: auto minmax(0, 1fr); }
  .reg-side { grid-column: 1 / -1; text-align: left; min-width: 0; }
}

@media (max-width: 640px) {
  .util-inner { flex-direction: column; gap: 2px; }
  .stats,
  .steps,
  .filters,
  .msg-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.98rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .registry-tools { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .util,
  .sticky-head,
  .site-footer,
  .no-print,
  .action-row,
  .nav-toggle { display: none !important; }

  body { background: #fff; }
  .folio, .reg-card, .facts { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  main { padding-top: 0; }
}
