:root {
  --black: #151515;
  --gold: #f2c230;
  --gold-dark: #b88700;
  --red: #c8102e;
  --red-dark: #8f0b21;
  --cream: #fffaf0;
  --paper: #fffef9;
  --muted: #665f55;
  --line: #ded5c7;
  --green: #245b4a;
  --shadow: 0 16px 42px rgba(28, 20, 8, 0.16);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--black);
  background-color: var(--gold);
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, .11) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, .11) 75%),
    linear-gradient(-45deg, rgba(200, 16, 46, .14) 25%, transparent 25%, transparent 75%, rgba(200, 16, 46, .14) 75%);
  background-position: 0 0, 42px 42px;
  background-size: 84px 84px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 6vw, 4.8rem); margin: .25rem 0 1rem; max-width: 900px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); margin: .25rem 0 .75rem; }
h3 { font-size: 1.2rem; }
a { color: var(--red-dark); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
textarea { resize: vertical; }

.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 1000;
  padding: .75rem 1rem; background: white; color: black;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  color: white; background: rgba(21, 21, 21, .96); border-bottom: 5px solid var(--red);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: .8rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { color: white; text-decoration: none; font-family: Georgia, serif; font-weight: bold; display: flex; align-items: center; gap: .65rem; }
.brand-mark { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; background: var(--gold); color: var(--black); border: 3px solid var(--red); font-family: Arial, sans-serif; font-size: .8rem; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
nav a { color: white; text-decoration: none; font-size: .92rem; }
nav a:hover, nav a:focus { color: var(--gold); }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.panel, .flag-panel {
  margin: 1.25rem 0; padding: clamp(1.25rem, 4vw, 3rem);
  background: rgba(255, 254, 249, .97); border: 2px solid var(--black);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero { position: relative; overflow: hidden; padding-top: clamp(3rem, 8vw, 7rem); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 18px;
  background: linear-gradient(90deg, var(--black) 0 25%, var(--gold) 25% 50%, var(--red) 50% 75%, white 75%);
}
.hero-copy { font-family: Georgia, serif; font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 800px; }
.eyebrow { color: var(--red-dark); text-transform: uppercase; font-size: .78rem; font-weight: 800; letter-spacing: .13em; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.session-strip { margin: 2rem -3rem -3rem; padding: 1rem 3rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; color: white; background: var(--black); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .65rem 1rem; border: 2px solid var(--black); border-radius: 7px;
  font-weight: 800; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover, .button:focus { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.button.primary { color: white; background: var(--red); }
.button.secondary { color: var(--black); background: var(--gold); }
.button.text-button { color: var(--red-dark); background: white; }
.button.mini { min-height: 38px; padding: .4rem .7rem; font-size: .85rem; background: var(--gold); }

.purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.source-note { color: var(--muted); font-size: .9rem; border-left: 4px solid var(--gold); padding-left: .8rem; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.step-badge { flex: 0 0 auto; display: grid; place-items: center; width: 3rem; height: 3rem; color: white; background: var(--red); border: 3px solid var(--black); border-radius: 50%; font-family: Georgia, serif; font-size: 1.4rem; font-weight: bold; }

fieldset { padding: 0; border: 0; }
.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.interest-card { position: relative; display: block; min-height: 132px; }
.interest-card input { position: absolute; opacity: 0; }
.interest-card-content { display: block; height: 100%; padding: 1rem; background: white; border: 2px solid var(--line); border-radius: 10px; transition: .12s ease; }
.interest-card strong { display: block; font-family: Georgia, serif; margin-bottom: .35rem; }
.interest-card small { color: var(--muted); display: block; }
.interest-card input:checked + .interest-card-content { background: #fff0b8; border-color: var(--red); box-shadow: inset 0 0 0 2px var(--gold); }
.interest-card input:checked + .interest-card-content::after { content: "✓"; position: absolute; top: .55rem; right: .7rem; color: white; background: var(--red); width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: bold; }
.interest-card input:focus-visible + .interest-card-content { outline: 3px solid var(--green); outline-offset: 2px; }

.preferences { margin: 1.25rem 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 8px; }
.preferences summary { font-weight: bold; }
.choice-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding-top: 1rem; }
.signup-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 1rem; align-items: end; }
label { display: grid; gap: .35rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: .72rem; color: var(--black); background: white; border: 2px solid #8e877d; border-radius: 6px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(36, 91, 74, .3); border-color: var(--green); }
.choice-row label, .consent { display: flex; align-items: start; gap: .5rem; font-weight: normal; }
.choice-row input, .consent input { width: auto; margin-top: .3rem; }
.consent { margin-top: 1rem; }
.honeypot { position: absolute; left: -10000px; }
.form-status { min-height: 1.5rem; font-weight: bold; }
.form-status.success { color: var(--green); }
.form-status.error { color: var(--red-dark); }

.action-panel { border-top: 10px solid var(--red); }
.action-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2rem; }
.letter-controls { display: grid; gap: 1rem; align-content: start; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.sender-details { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; }
.sender-details legend { padding: 0 .35rem; font-family: Georgia, serif; font-size: 1.15rem; font-weight: 800; }
.field-note { margin: 0; color: var(--muted); font-size: .85rem; font-weight: normal; }
.address-row { display: grid; grid-template-columns: 1.3fr .8fr .8fr; gap: .75rem; }
.optional { color: var(--muted); font-size: .8rem; font-weight: normal; }
.letter-preview-wrap { padding: 1rem; background: #f3ede1; border: 1px solid var(--line); border-radius: 10px; }
.preview-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.letter-preview { min-height: 470px; background: white; font-family: Georgia, serif; line-height: 1.6; }
.letter-next-steps { margin-top: 2rem; padding: 1.5rem; background: #fff8dc; border: 2px solid var(--black); border-left: 10px solid var(--gold-dark); border-radius: 10px; }
.letter-next-steps h3 { margin-top: .25rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.important-note { padding: .8rem 1rem; background: white; border-left: 5px solid var(--red); }
.instruction-list { display: grid; gap: 1rem; padding-left: 1.4rem; }
.instruction-list li { padding-left: .35rem; line-height: 1.55; }
.instruction-list strong { display: block; margin-bottom: .15rem; }
.instruction-actions { margin-top: 1.25rem; }

.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: .75rem; padding: 1rem; background: #f4ede2; border-radius: 10px; }
.results-count { color: var(--muted); font-weight: bold; }
.bill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bill-card { display: flex; flex-direction: column; padding: 1.25rem; background: white; border: 1px solid var(--line); border-left: 7px solid var(--red); border-radius: 10px; }
.bill-card-head, .bill-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.bill-number { font-weight: 900; font-size: 1.15rem; }
.version-pill, .topic-tag { display: inline-block; margin-left: .4rem; padding: .18rem .42rem; background: #eee8dc; border-radius: 999px; font-size: .72rem; }
.topic-tags { text-align: right; }
.topic-tag { margin: .12rem; color: var(--red-dark); background: #fff0b8; }
.bill-title { margin: .75rem 0 .4rem; }
.bill-status { margin: 0; color: var(--green); font-weight: bold; }
.bill-summary { flex-grow: 1; }
.bill-card summary { font-weight: bold; }
.bill-details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .7rem; font-size: .88rem; }
.bill-details dt { font-weight: bold; }
.bill-details dd { margin: 0; }
.bill-actions { margin-top: 1rem; }
.official-link { font-weight: bold; }
.load-more { margin: 1.25rem auto 0; }

.change-list { display: grid; gap: .7rem; }
.change-item { padding: 1rem; background: white; border: 1px solid var(--line); border-left: 5px solid var(--gold-dark); border-radius: 7px; }
.change-item h3 { margin: 0 0 .25rem; font-size: 1rem; }
.change-item p { margin: .2rem 0; }
.change-date { color: var(--muted); font-size: .85rem; }
.compact-panel { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.policy-page { max-width: 850px; margin: 3rem auto; }

footer { padding: 2rem 1rem; color: white; background: var(--black); text-align: center; border-top: 6px solid var(--red); }
footer a { color: var(--gold); }

@media (max-width: 850px) {
  .purpose, .action-layout { grid-template-columns: 1fr; }
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .signup-row, .filters { grid-template-columns: 1fr 1fr; }
  .bill-list { grid-template-columns: 1fr; }
  .session-strip { margin-left: -1.25rem; margin-right: -1.25rem; margin-bottom: -1.25rem; padding: 1rem 1.25rem; }
}

@media (max-width: 600px) {
  .header-inner { align-items: flex-start; }
  nav { display: none; }
  .interest-grid, .signup-row, .filters, .two-column, .address-row { grid-template-columns: 1fr; }
  .interest-card { min-height: 0; }
  .panel, .flag-panel { border-radius: 10px; }
  .bill-card-head, .bill-actions { align-items: flex-start; flex-direction: column; }
  .topic-tags { text-align: left; }
}

@media print {
  body * { visibility: hidden; }
  .letter-preview-wrap, .letter-preview-wrap * { visibility: visible; }
  .letter-preview-wrap { position: absolute; inset: 0; background: white; border: 0; }
  .letter-preview { border: 0; min-height: 95vh; }
  .letter-preview-wrap .button-row, .preview-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
