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

:root {
  /* Texas-Modern palette */
  --bg:           #0b0d12;
  --surface:      #13161e;
  --surface-2:    #1c202b;
  --border:       #2a2f3d;
  --border-sub:   #1c202b;
  --text:         #e8edf5;
  --text-muted:   #8b95a8;
  --text-dim:     #444c5c;

  --blue:         #388bfd;
  --blue-dim:     rgba(56,139,253,0.12);
  --blue-border:  rgba(56,139,253,0.35);
  --green:        #3fb950;
  --green-dim:    rgba(63,185,80,0.08);
  --green-border: rgba(63,185,80,0.35);
  --yellow:       #d29922;
  --yellow-dim:   rgba(210,153,34,0.08);
  --yellow-border:rgba(210,153,34,0.35);
  --red:          #f85149;
  --red-dim:      rgba(248,81,73,0.08);
  --red-border:   rgba(248,81,73,0.35);
  --cyan:         #79c0ff;

  /* Texas accent */
  --tx:           #bf5700;
  --tx-dim:       rgba(191,87,0,0.10);
  --tx-border:    rgba(191,87,0,0.38);
  --tx-glow:      rgba(191,87,0,0.05);

  --sidebar-w:    272px;
  --r:            8px;
  --r-sm:         5px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-icon { font-size: 26px; line-height: 1; }

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 18px 20px 8px;
}

.amendment-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.amendment-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.amendment-btn.active {
  background: var(--tx-dim);
  border-left-color: var(--tx);
  color: var(--text);
}

.numeral-badge {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.amendment-btn.active .numeral-badge {
  background: var(--tx-dim);
  border-color: var(--tx-border);
  color: var(--tx);
}

.btn-amendment-info { flex: 1; min-width: 0; }

.btn-amendment-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.btn-amendment-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.amendment-btn.active .btn-amendment-sub {
  color: var(--tx);
  opacity: 0.8;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.home-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.home-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.home-btn.active {
  background: var(--tx-dim);
  border-left-color: var(--tx);
  color: var(--text);
  font-weight: 600;
}

.home-icon { font-size: 16px; }

/* ── Language toggle ─────────────────────────────────────────────────────── */

.lang-toggle {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.lang-btn {
  flex: 1;
  padding: 7px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.12s;
}

.lang-btn.active {
  background: var(--tx);
  border-color: var(--tx);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Main ────────────────────────────────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 48px 48px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Subtle Lone Star watermark — pure CSS, Texas burnt orange */
.main::before {
  content: '★';
  position: fixed;
  font-size: 680px;
  color: var(--tx-glow);
  pointer-events: none;
  top: 50%;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2);
  transform: translate(-50%, -48%);
  line-height: 1;
  z-index: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-filter: blur(2px);
  filter: blur(2px);
}

.main > * { position: relative; z-index: 1; width: 100%; }

/* ── Welcome ─────────────────────────────────────────────────────────────── */

.welcome {
  max-width: 720px;
  padding-top: 48px;
  text-align: center;
  margin: 0 auto;
}

.welcome-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tx);
  margin-bottom: 14px;
}

.welcome-heading {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.welcome-heading span { color: var(--tx); }

.welcome-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 44px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  max-width: 720px;
}

.welcome-disclaimer {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

.welcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.welcome-card:hover {
  border-color: var(--tx);
  background: var(--tx-dim);
  transform: translateY(-1px);
}

.wc-numeral {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--tx);
  line-height: 1;
  margin-bottom: 12px;
}

.wc-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wc-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Question section ────────────────────────────────────────────────────── */

.question-section { max-width: 640px; margin: 0 auto; width: 100%; }

.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  min-height: 32px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.amendment-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 12px;
}

.question-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 24px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, background 0.12s;
}

.option-label:hover { border-color: var(--text-muted); }

.option-label.selected {
  border-color: var(--tx);
  background: var(--tx-dim);
}

.option-label input[type="radio"] { display: none; }

.radio-dot {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s;
}

.option-label.selected .radio-dot {
  border-color: var(--tx);
  background: var(--tx);
}

.radio-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.12s;
}

.option-label.selected .radio-dot::after { opacity: 1; }

.option-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  transition: color 0.12s;
}

.option-label.selected .option-text {
  color: var(--text);
  font-weight: 500;
}

.btn-continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--tx);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.15s, filter 0.12s;
}

.btn-continue.ready {
  opacity: 1;
  pointer-events: auto;
}

.btn-continue.ready:hover { filter: brightness(1.1); }

/* ── Conclusion section ──────────────────────────────────────────────────── */

.conclusion-section { max-width: 640px; margin: 0 auto; width: 100%; }

/* Alert card */
.alert-card {
  border-radius: var(--r);
  border: 1px solid;
  overflow: hidden;
  margin-bottom: 16px;
}

.alert-card.info    { border-color: var(--green); background: var(--green-dim); }
.alert-card.warning { border-color: var(--yellow); background: var(--yellow-dim); }
.alert-card.critical{ border-color: var(--red);   background: var(--red-dim); }

.alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.alert-card.info     .alert-header { border-color: var(--green-border); color: var(--green); }
.alert-card.warning  .alert-header { border-color: var(--yellow-border); color: var(--yellow); }
.alert-card.critical .alert-header { border-color: var(--red-border);   color: var(--red); }

.alert-icon { font-size: 16px; }

.alert-body {
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Rights card */
.rights-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.rights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rights-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.rights-list li::before {
  content: '•';
  color: var(--green);
  font-size: 18px;
  line-height: 1.1;
  flex-shrink: 0;
}

/* Advice / "What to say" card */
.advice-card {
  border: 1px solid var(--yellow-border);
  background: var(--yellow-dim);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 28px;
}

.advice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--yellow-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--yellow);
}

.advice-body {
  padding: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Texas law callout */
.texas-note {
  border: 1px solid var(--tx-border);
  background: var(--tx-dim);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 16px;
}

.texas-note-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--tx-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tx);
}

.tx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--tx);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
}

.texas-note-body {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Action buttons */
.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--tx);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s;
}

.btn-primary:hover { filter: brightness(1.1); }

/* ── Mobile menu toggle ──────────────────────────────────────────────────── */

.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.menu-toggle:hover { color: var(--text); border-color: var(--text-muted); }

/* Dim overlay when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9;
}

body.menu-open .sidebar-overlay { display: block; }

/* ── Responsive breakpoints ──────────────────────────────────────────────── */

/* Tablet: 641px – 960px */
@media (max-width: 960px) {
  :root { --sidebar-w: 230px; }

  .main { padding: 40px 28px 60px; }

  .welcome { padding-top: 32px; }
  .welcome-heading { font-size: 34px; }
  .welcome-cards { grid-template-columns: repeat(2, 1fr); }

  .question-section,
  .conclusion-section { max-width: 100%; }

  .main::before { font-size: 480px; }
}

/* Mobile: ≤ 640px */
@media (max-width: 640px) {
  .menu-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 10;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }

  .main {
    margin-left: 0;
    padding: 68px 16px 60px;  /* top pad clears menu-toggle button */
    align-items: stretch;
  }

  .welcome {
    padding-top: 8px;
    text-align: left;
  }

  .welcome-eyebrow { font-size: 11px; }
  .welcome-heading { font-size: 26px; }
  .welcome-sub     { font-size: 14px; margin-bottom: 28px; text-align: left; max-width: 100%; }

  .welcome-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 100%;
  }

  .wc-numeral { font-size: 22px; }
  .wc-title   { font-size: 12px; }
  .wc-sub     { font-size: 11px; }

  .question-text { font-size: 19px; }

  .option-label { padding: 12px 14px; gap: 12px; }
  .option-text  { font-size: 13px; }

  .alert-body   { font-size: 14px; padding: 14px 16px; }
  .alert-header { padding: 11px 16px; }

  .rights-list li { font-size: 13px; }
  .advice-body    { font-size: 13px; padding: 14px 16px; }

  .action-row {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .nav-row { flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

  .main::before { font-size: 260px; opacity: 0.6; }

  .texas-note-body { font-size: 12px; }
}
