:root {
  --bg: #0b1020;
  --bg-2: #0f172a;
  --panel: #111827;
  --panel-2: #0f172a;
  --line: rgba(255,255,255,0.08);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --gold: #c4a962;
  --gold-soft: rgba(196, 169, 98, 0.14);
  --blue: #7aa2f7;
  --shadow: 0 18px 50px rgba(0,0,0,0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(122,162,247,0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(196,169,98,0.07), transparent 28%),
    linear-gradient(180deg, #08101d 0%, #0b1020 45%, #0a1222 100%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  margin-top: 0;
  letter-spacing: -0.02em;
  color: #f3f4f6;
}

p, li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: rgba(6, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #f8fafc;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav-links a {
  text-decoration: none;
  color: #dbe4f0;
  margin-left: 18px;
  font-weight: 600;
  font-size: 0.95rem;
}

.topnav-links a:hover {
  color: var(--gold);
}

.hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 28px 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: stretch;
}

.hero-main,
.hero-side,
.card,
.unit-card,
.source-card {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 40px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1 {
  font-size: 4rem;
  line-height: 0.98;
  margin-bottom: 18px;
}

.hero-subtext {
  max-width: 680px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn,
.btn-secondary {
  display: inline-block;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn {
  background: var(--gold);
  color: #0a0f1b;
}

.btn:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.14);
  color: #e5e7eb;
  background: rgba(255,255,255,0.03);
}

.hero-side {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.stat-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.stat-block:last-child {
  border-bottom: none;
}

.stat-title {
  color: #f3f4f6;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 28px 70px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 2.3rem;
}

.section-sub {
  max-width: 760px;
  margin-bottom: 26px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
}

.card h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}

.card-accent-gold {
  box-shadow: inset 0 1px 0 rgba(196,169,98,0.12), var(--shadow);
  border-color: rgba(196,169,98,0.2);
}

.card-accent-blue {
  border-color: rgba(122,162,247,0.22);
}

.unit-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 54px 28px 80px;
}

.unit-hero {
  margin-bottom: 26px;
}

.unit-hero h1 {
  font-size: 3.4rem;
  margin-bottom: 10px;
}

.unit-grid {
  display: grid;
  gap: 18px;
}

.unit-card {
  padding: 24px;
}

.lesson-title {
  font-size: 1.35rem;
  color: #f8fafc;
  font-family: "Playfair Display", Georgia, serif;
  margin-bottom: 8px;
}

.lesson-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.lesson-links a {
  text-decoration: none;
  color: var(--gold);
  font-weight: 700;
}

.lesson-links a:hover {
  text-decoration: underline;
}

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

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: rgba(8, 12, 22, 0.88);
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar h2 {
  font-size: 1rem;
  margin-bottom: 18px;
  color: #f5f5f5;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: #dbe4f0;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar a:hover {
  background: rgba(196,169,98,0.08);
  color: var(--gold);
}

.sidebar a.active {
  background: rgba(196,169,98,0.16);
  color: var(--gold);
}

.sidebar .back-link {
  margin-top: 18px;
  color: var(--muted);
}

.main {
  flex: 1;
  padding: 54px 40px 80px;
  max-width: 980px;
}

.page-kicker {
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.main h1 {
  font-size: 3rem;
  margin-bottom: 8px;
}

.subtle {
  color: var(--muted);
  margin-bottom: 10px;
}

.section {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  margin-top: 22px;
  box-shadow: var(--shadow);
}

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.section h3 {
  font-size: 1.3rem;
  margin: 26px 0 10px;
}

.source,
.callout {
  border-left: 3px solid var(--gold);
  background: rgba(255,255,255,0.03);
  padding: 16px 18px;
  border-radius: 14px;
  margin-top: 14px;
}

.question {
  margin-top: 18px;
  color: #dbe4f0;
  font-weight: 500;
}

textarea,
input[type="text"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: #f8fafc;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: rgba(196,169,98,0.45);
  box-shadow: 0 0 0 3px rgba(196,169,98,0.12);
}

button {
  margin-top: 20px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: #0a0f1b;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover {
  opacity: 0.96;
}

.btn-link {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  color: var(--gold);
  font-weight: 700;
}

.btn-link:hover {
  text-decoration: underline;
}

.result {
  margin-top: 14px;
  font-weight: 700;
}

iframe {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .layout {
    display: block;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .main {
    padding: 32px 20px 60px;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topnav-links a {
    margin-left: 0;
    margin-right: 14px;
  }

  .hero h1,
  .unit-hero h1,
  .main h1 {
    font-size: 2.35rem;
  }

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

  .hero-wrap,
  .content-wrap,
  .unit-page {
    padding-left: 18px;
    padding-right: 18px;
  }
}
