:root {
  color-scheme: light;
  --bg: #f7f1e7;
  --bg-2: #edf4ff;
  --bg-3: #f4f7f0;
  --ink: #101523;
  --muted: #4b5563;
  --line: rgba(15, 23, 42, 0.12);
  --accent: #ff6a3d;
  --accent-2: #1c7cff;
  --accent-3: #14b8a6;
  --card: #ffffff;
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.14);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 106, 61, 0.12), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(28, 124, 255, 0.12), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(20, 184, 166, 0.12), transparent 40%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.04) 0 1px, transparent 1px 26px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.backdrop .flare {
  position: absolute;
  border-radius: 999px;
  opacity: 0.7;
  filter: blur(0px);
}

.backdrop .flare.one {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.45), rgba(255, 106, 61, 0));
  top: -140px;
  right: -120px;
}

.backdrop .flare.two {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(28, 124, 255, 0.35), rgba(28, 124, 255, 0));
  bottom: -140px;
  left: -80px;
}

.backdrop .flare.three {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.3), rgba(20, 184, 166, 0));
  top: 45%;
  left: 55%;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}

.hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 21, 35, 0.12);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--ink);
  color: #ffffff;
  border-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 16px;
}

.hero-panel .panel-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.attention-grid {
  height: 120px;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(255, 106, 61, 0.25), rgba(28, 124, 255, 0.25)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px 12px);
  position: relative;
  overflow: hidden;
}

.attention-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 106, 61, 0.6), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(28, 124, 255, 0.5), transparent 60%),
    radial-gradient(circle at 45% 75%, rgba(20, 184, 166, 0.4), transparent 55%);
  mix-blend-mode: multiply;
}

.meta-grid {
  display: grid;
  gap: 12px;
}

.meta-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 21, 35, 0.08);
  background: rgba(248, 250, 252, 0.85);
}

.meta-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.meta-value {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 12px;
}

.section-nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 21, 35, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.section-nav a.active {
  background: var(--accent-2);
  color: #ffffff;
  border-color: transparent;
}

.chapter {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
}

.chapter::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.chapter h2 {
  margin: 0 0 12px 18px;
  font-size: 22px;
}

.chapter h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  color: var(--accent-2);
  font-weight: 600;
}

.chapter p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: var(--muted);
}

.chapter ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.chapter li {
  margin-bottom: 8px;
}

.highlight-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.highlight-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 21, 35, 0.12);
  background: rgba(248, 250, 252, 0.9);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-card strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.callout {
  background: rgba(255, 106, 61, 0.1);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  margin-top: 12px;
}

.formula {
  font-family: "IBM Plex Mono", "Space Grotesk", monospace;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(28, 124, 255, 0.3);
  padding: 12px 14px;
  overflow-x: auto;
  color: #0f172a;
}

.data-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 12px;
}

.data-chip {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 21, 35, 0.12);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.resource-item span {
  font-weight: 600;
  color: var(--muted);
}

.resource-item a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent-2);
}

.citation {
  background: #0f172a;
  color: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.copy-btn {
  margin-top: 10px;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--accent-2);
  color: #ffffff;
  cursor: pointer;
}

.footer {
  margin-top: 42px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 640px) {
  .page {
    padding: 36px 18px 70px;
  }

  .hero-panel {
    padding: 18px;
  }

  .chapter {
    padding: 20px;
  }

  .chapter h2 {
    font-size: 20px;
  }

  .section-nav a {
    font-size: 11px;
  }
}
