/* ===== Variables ===== */
:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #16161a;
  --bg-card: #1c1c21;
  --bg-elevated: #242429;
  --text-primary: #e8e8ec;
  --text-secondary: #a0a0a8;
  --text-muted: #6c6c74;
  --accent-red: #c23d3d;
  --accent-red-hover: #d94a4a;
  --accent-red-muted: rgba(194, 61, 61, 0.2);
  --accent-blue: #3d6ec2;
  --accent-blue-hover: #4a7ed9;
  --accent-blue-muted: rgba(61, 110, 194, 0.2);
  --border: #2a2a30;
  --border-focus: var(--accent-blue);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --header-height: 84px;
  --max-width: 720px;
  --max-width-wide: 960px;
}

/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-md);
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  min-height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.logo:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.logo-img {
  display: block;
  height: 75px;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  background: var(--bg-elevated);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.site-header.is-open .nav {
  transform: translateX(0);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-size: 1.1rem;
}

.nav-list a {
  color: var(--text-primary);
  padding: var(--space-sm) 0;
  display: block;
}

.nav-list a:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    transform: none;
    padding: 0;
    background: none;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    gap: var(--space-lg);
    font-size: 0.95rem;
  }
}

/* ===== Section layout ===== */
.section-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-3xl);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.section-lead {
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl);
  max-width: 56ch;
}

/* ===== Hero ===== */
.hero {
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Stylized stars and stripes background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-svg {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Red glow — more pronounced, center top */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 720px);
  height: 320px;
  background: radial-gradient(
    ellipse 90% 60% at 50% -10%,
    rgba(194, 61, 61, 0.45) 0%,
    rgba(194, 61, 61, 0.2) 40%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 1;
}

/* Blue glow — more pronounced, bottom right */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 280px;
  background: radial-gradient(
    ellipse 70% 60% at 100% 100%,
    rgba(61, 110, 194, 0.45) 0%,
    rgba(61, 110, 194, 0.2) 40%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl);
  line-height: 1.6;
}

/* ===== Opener (above The Proposals) ===== */
.opener-section {
  background: var(--bg-secondary);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border);
}

.opener-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.opener-section p {
  margin: 0 0 var(--space-lg);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--accent-blue-muted);
  color: var(--accent-blue);
}

.btn-secondary:hover {
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
}

/* ===== Amendments section ===== */
.amendments-section {
  background: var(--bg-primary);
  padding: var(--space-3xl) 0;
}

.amendments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

/* Index page: amendment cards linking to amendment pages */
.amendments-index-list {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .amendments-index-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .amendments-index-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.amendment-index-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.amendment-index-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.amendment-index-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: inherit;
}

.amendment-index-card-desc {
  flex: 1;
  margin: 0 0 var(--space-md);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.amendment-index-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.amendment-index-card:hover .amendment-index-card-link {
  color: var(--accent-blue-hover);
}

.amendment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.amendment-card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.amendment-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  flex: 1 1 100%;
}

@media (min-width: 640px) {
  .amendment-card-title {
    flex: 1 1 auto;
  }
}

.version-select-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.version-select-wrap label {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.version-select {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.version-select:hover,
.version-select:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.amendment-body {
  padding: var(--space-lg);
}

.amendment-version-content {
  display: none;
}

.amendment-version-content.is-active {
  display: block;
}

.amendment-section-block {
  margin-bottom: var(--space-xl);
}

.amendment-section-block:last-child {
  margin-bottom: 0;
}

.amendment-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin: 0 0 var(--space-sm);
}

.amendment-section-body {
  margin: 0;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* Version history list (sidebar or below) */
.version-history {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.version-history-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.version-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.version-history-list li {
  margin: 0;
}

.version-history-list button {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.version-history-list button:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.version-history-list button.is-active {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  background: var(--accent-blue-muted);
}

/* ===== Single amendment page (explainer + full text) ===== */
.amendment-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.amendment-page .section-inner {
  max-width: var(--max-width);
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

.amendment-page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 var(--space-xl);
  color: var(--text-primary);
}

.explainer {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.explainer p {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
  line-height: 1.65;
}

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

/* ===== FAQ page ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.faq-item {
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.faq-answer {
  color: var(--text-secondary);
  line-height: 1.65;
}

.faq-answer p {
  margin: 0 0 var(--space-sm);
}

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

/* Full-text card on amendment pages */
.amendment-text-block {
  margin-top: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent-blue);
  padding: var(--space-xl);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.amendment-text-heading {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.amendment-single-content .amendment-body {
  padding: 0;
}

.amendment-single-content .version-select-wrap.amendment-single-version {
  margin-bottom: var(--space-lg);
}

/* ===== Advocacy ===== */
.advocacy-section {
  background: var(--bg-secondary);
  padding: var(--space-3xl) 0;
}

.advocacy-grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .advocacy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.advocacy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.advocacy-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.advocacy-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== How to help ===== */
.help-section {
  background: var(--bg-primary);
  padding: var(--space-3xl) 0;
}

.help-list {
  max-width: var(--max-width);
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-list li {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
  position: relative;
  color: var(--text-secondary);
}

.help-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

.help-list li strong {
  color: var(--text-primary);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
