:root {
  --bg: #050811;
  --bg-alt: #0b1324;
  --accent: #ff4d4f;
  --accent-soft: #ff9f9f;
  --text: #f7f7ff;
  --text-muted: #c4c7e0;
  --card: #111827;
  --max-width: 960px;
  --radius: 14px;
}

/* Reset-ish */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header + Nav */

header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(8,47,73,0.96));
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent-soft);
  text-decoration: none;
}

.logo:hover {
  text-decoration: underline;
}

.nav-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 280px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.nav-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.7);
}

/* Layout helpers */

main {
  flex: 1;
}

.hero {
  max-width: var(--max-width);
  margin: 1.8rem auto 0;
  padding: 2.2rem 1.25rem 2.8rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 2.2rem;
}

.page {
  max-width: var(--max-width);
  margin: 2rem auto 2.5rem;
  padding: 0 1.25rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
              border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ef4444, #fb923c);
  color: #0b1020;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(248, 113, 113, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(248, 113, 113, 0.5);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.4);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  color: var(--text);
  border-color: rgba(248, 250, 252, 0.6);
}

/* Hero */

.hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin-bottom: 0.7rem;
}

.hero-highlight {
  color: var(--accent);
}

.hero-lede {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-bottom: 1.3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(248, 250, 252, 0.16);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  margin-bottom: 0.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Stat card */

.stat-card {
  background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.06), transparent),
              linear-gradient(145deg, #020617, #020617, #020617, #020617);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.2rem 1.25rem 1.3rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.85);
  position: relative;
  overflow: hidden;
}

.stat-card h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-value span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-soft);
  margin-left: 0.25rem;
}

.stat-footnote {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.pill {
  display: inline-flex;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-top: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  gap: 0.3rem;
  align-items: center;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.8);
}

/* Sections / cards */

.section-title {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 1rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.75);
}

.card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* CTA block */

.cta {
  background: radial-gradient(circle at top, rgba(248, 113, 113, 0.2), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius);
  border: 1px solid rgba(248, 113, 113, 0.6);
  padding: 1.3rem 1.2rem 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.cta h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.cta p {
  font-size: 0.86rem;
  color: #fef2f2;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Generic typography for inner pages */

.page h1 {
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

.page h2 {
  font-size: 1.2rem;
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
  color: var(--accent-soft);
}

.page p {
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}

.page ul,
.page ol {
  margin-left: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.page li {
  margin-bottom: 0.3rem;
}

/* Footer */

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.8rem 1.25rem 1.1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

/* Links */

a {
  color: var(--accent-soft);
}

a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    order: -1;
  }

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

  .cta-actions {
    justify-content: flex-start;
  }

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

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    margin-top: 0.2rem;
  }

  .nav-tagline {
    max-width: none;
  }
}

/* Global nav link spacing */
nav a {
  margin: 0 8px;
  display: inline-block;
}

/* Story page tweaks */
.story p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card h2,
.card h3 {
  margin-top: 1rem;
  margin-bottom: 0.7rem;
}

/* Email button on Stories page */
.email-button {
  display: inline-block;
  padding: 10px 16px;
  background: #2da4ff;
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
}

.email-button:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

/* Tips section on letter generator */
.tips details {
  margin-bottom: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.tips summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

.tips p,
.tips ul {
  font-size: 0.84rem;
  margin-top: 0.35rem;
}

/* Example Letters section */
.examples pre {
  background: rgba(2, 6, 23, 0.85);
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow-x: auto;
}

.examples summary {
  cursor: pointer;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}


/* Regulator helper section */
.regulator-helper-select {
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #020617;
  color: var(--text);
  font-size: 0.85rem;
}

.regulator-info {
  margin-top: 0.7rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* --- Stories page layout tweak ---
   Make the top section use the same wide layout as the rest of the site. */
.stories-page .content-narrow {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===============================
   Single-line nav (Option A)
   Forces nav links onto one row.
   =============================== */

.nav-links {
  display: flex;
  flex-wrap: nowrap;      /* prevent wrapping to second line */
  white-space: nowrap;    /* keep labels on one line */
  gap: 1.25rem;
  overflow-x: auto;       /* allow gentle horizontal scroll on very small screens */
  scrollbar-width: none;  /* hide scrollbar (Firefox) */
}

.nav-links::-webkit-scrollbar {
  display: none;          /* hide scrollbar (Chrome/Safari) */
}

/* BEGIN NAVBAR AUTO */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-mark {
  font-size: 1.5rem;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
}

.logo-tagline {
  font-size: 0.75rem;
  color: #6b7280;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.95rem;
  text-decoration: none;
  color: #374151;
  padding: 0.4rem 0;
  position: relative;
}

.main-nav a:hover {
  color: #111827;
}

.main-nav a.active {
  font-weight: 600;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: #2563eb;
  border-radius: 999px;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background: #111827;
  border-radius: 999px;
}

/* Mobile layout */
@media (max-width: 768px) {
  .logo-tagline {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.75rem 1rem 1rem;
    background: #ffffff;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 0.5rem 0;
  }
}
/* END NAVBAR AUTO */

