
:root {
  --bg: #0b1120;
  --bg-soft: #020617;
  --card: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56,189,248,0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15,23,42,0.65);
  --shadow-light: 0 0 0 1px rgba(148,163,184,0.2);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.layout-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom,
    rgba(15,23,42,0.95),
    rgba(15,23,42,0.9),
    transparent 100%
  );
}

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0ea5e9 46%, #0369a1 100%);
  box-shadow:
    0 0 0 1px rgba(148,163,184,0.4),
    0 12px 28px rgba(8,47,73,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #e0f2fe;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-links a.nav-active {
  color: #e0f2fe;
  border-color: rgba(148,163,184,0.6);
  background: radial-gradient(circle at top left,
    rgba(56,189,248,0.4),
    rgba(15,23,42,0.9)
  );
  box-shadow:
    0 0 0 1px rgba(148,163,184,0.45),
    0 12px 32px rgba(15,23,42,0.85);
}

.nav-links a:hover {
  border-color: rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.75);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: radial-gradient(circle at top left,
    rgba(148,163,184,0.18),
    rgba(15,23,42,0.98)
  );
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: 0 5px 0 #e5e7eb, 0 -5px 0 #e5e7eb;
}

.nav-menu-mobile {
  display: none;
  padding: 4px 16px 10px;
  border-bottom: 1px solid rgba(51,65,85,0.9);
  background: radial-gradient(circle at top, #020617, #020617 60%, #000 100%);
}

.nav-menu-mobile a {
  display: block;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-menu-mobile a.nav-active {
  color: #e0f2fe;
  border-color: rgba(148,163,184,0.7);
  background: radial-gradient(circle at top left,
    rgba(56,189,248,0.4),
    rgba(15,23,42,0.96)
  );
}

.nav-menu-mobile a:last-child {
  margin-bottom: 0;
}

main {
  flex: 1;
}

.hero-shell {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0,1.6fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .layout-shell {
    padding: 20px 20px 40px;
  }
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-menu-mobile {
    display: none !important;
  }

  .hero-shell {
    grid-template-columns: minmax(0,1.5fr) minmax(0,1.25fr);
    align-items: stretch;
    margin-top: 24px;
    gap: 20px;
  }
}

.hero-card {
  border-radius: 26px;
  padding: 20px 18px 18px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.4), transparent 65%),
    radial-gradient(circle at top right, rgba(59,130,246,0.28), transparent 70%),
    linear-gradient(to bottom right, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  box-shadow:
    0 0 0 1px rgba(148,163,184,0.18),
    0 30px 80px rgba(15,23,42,0.95);
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 4px;
  border-radius: 999px;
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.65);
  box-shadow: 0 0 0 1px rgba(15,23,42,0.9);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.pill-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: conic-gradient(from 210deg,
    #22c55e,
    #22c55e,
    #22c55e,
    #eab308,
    #eab308,
    #f97316,
    #ef4444,
    #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(21,128,61,0.45);
}

.pill-dot span {
  width: 8px;
  height: 8px;
  border-radius: inherit;
  background: #020617;
}

.hero-title {
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
}

.hero-title span {
  background: linear-gradient(to right, #38bdf8, #a855f7, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(51,65,85,0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  color: inherit;
}

.btn-primary {
  background: radial-gradient(circle at top left,
    rgba(56,189,248,0.7),
    rgba(56,189,248,0.16)
  );
  border-color: rgba(56,189,248,0.75);
  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 18px 44px rgba(8,47,73,0.95);
  color: #0b1120;
  font-weight: 600;
}

.btn-primary span.badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.75);
}

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

.hero-footnote {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.hero-visual {
  border-radius: 26px;
  padding: 16px 14px 16px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.4), transparent 65%),
    radial-gradient(circle at bottom right, rgba(129,140,248,0.3), transparent 70%),
    linear-gradient(to bottom right, #020617, #020617);
  box-shadow:
    0 0 0 1px rgba(148,163,184,0.22),
    0 26px 70px rgba(15,23,42,0.98);
  position: relative;
  overflow: hidden;
}

.hero-visual-inner {
  position: relative;
  border-radius: 18px;
  padding: 16px 14px 12px;
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(2,6,23,1));
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow: 0 18px 40px rgba(15,23,42,0.9);
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.visual-title {
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
}

.visual-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,1);
  border: 1px solid rgba(148,163,184,0.7);
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(51,65,85,0.95);
  color: var(--muted);
}

.timeline {
  position: relative;
  padding-left: 14px;
  margin-bottom: 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 6px;
  left: 4px;
  width: 1.5px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #38bdf8, rgba(148,163,184,0.1));
}

.timeline-item {
  position: relative;
  padding-left: 8px;
  margin-bottom: 8px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    0 0 0 4px rgba(56,189,248,0.2),
    0 0 0 1px rgba(15,23,42,1);
}

.timeline-label {
  font-size: 11px;
  color: #e5e7eb;
  margin-bottom: 1px;
}

.timeline-caption {
  font-size: 10px;
  color: var(--muted);
}

.sparkline {
  margin-top: 10px;
  border-radius: 11px;
  padding: 8px 9px 6px;
  background: radial-gradient(circle at top left, rgba(56,189,248,0.3), rgba(15,23,42,1));
  border: 1px solid rgba(148,163,184,0.7);
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.spark-bar {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(15,23,42,1), #38bdf8);
}

.spark-bar:nth-child(3),
.spark-bar:nth-child(7),
.spark-bar:nth-child(10) {
  background: linear-gradient(to top, rgba(15,23,42,1), #a855f7);
}

.spark-footer {
  font-size: 9px;
  color: #e5e7eb;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  opacity: 0.85;
}

.section-shell {
  margin-top: 22px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.section-caption {
  font-size: 11px;
  color: var(--muted);
}

.index-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .index-controls {
    flex-direction: row;
    align-items: center;
  }
}

.field {
  position: relative;
  flex: 1;
}

.field input,
.field select {
  width: 100%;
  padding: 9px 11px 9px 30px;
  border-radius: 999px;
  border: 1px solid rgba(51,65,85,1);
  background: rgba(15,23,42,0.96);
  color: #e5e7eb;
  font-size: 12px;
  outline: none;
}

.field select {
  padding-left: 11px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 10px,
    calc(100% - 7px) 10px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pill-filter {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(51,65,85,0.95);
  background: rgba(15,23,42,0.9);
  color: var(--muted);
  cursor: pointer;
}

.pill-filter.active {
  border-color: rgba(56,189,248,0.9);
  background: rgba(56,189,248,0.2);
  color: #e0f2fe;
}

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

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

.card-topic {
  border-radius: 18px;
  padding: 12px 11px 11px;
  background: radial-gradient(circle at top left,
    rgba(15,23,42,0.98),
    rgba(15,23,42,0.98)
  );
  border: 1px solid rgba(51,65,85,1);
  box-shadow:
    0 0 0 1px rgba(2,6,23,1),
    0 18px 40px rgba(15,23,42,0.95);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
              border-color 0.12s ease-out, background 0.12s ease-out;
}

.card-topic:hover {
  transform: translateY(-3px);
  border-color: rgba(148,163,184,0.9);
  background: radial-gradient(circle at top left,
    rgba(56,189,248,0.12),
    rgba(15,23,42,1)
  );
  box-shadow:
    0 0 0 1px rgba(148,163,184,0.8),
    0 24px 60px rgba(15,23,42,0.98);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.card-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(51,65,85,0.95);
  color: var(--muted);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

.card-body {
  font-size: 11px;
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.badge-audience {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.8);
  color: #e0f2fe;
  background: rgba(8,47,73,0.9);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #e0f2fe;
}

.link-arrow span {
  font-size: 12px;
}

.topic-page {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 16px;
}

@media (min-width: 900px) {
  .topic-page {
    grid-template-columns: minmax(0,1.7fr) minmax(0,1.1fr);
  }
}

.topic-main,
.topic-aside {
  border-radius: 24px;
  padding: 16px 14px 16px;
  background: radial-gradient(circle at top left,
    rgba(15,23,42,0.98),
    rgba(15,23,42,1)
  );
  border: 1px solid rgba(51,65,85,1);
  box-shadow:
    0 0 0 1px rgba(2,6,23,1),
    0 20px 56px rgba(15,23,42,0.98);
}

.topic-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.topic-heading {
  font-size: 20px;
  margin: 0 0 8px;
}

.topic-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.topic-section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}

.topic-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}

.topic-list li {
  margin-bottom: 4px;
}

.tip-callout {
  margin-top: 10px;
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(8,47,73,0.9);
  border: 1px solid rgba(56,189,248,0.85);
  font-size: 11px;
  color: #e0f2fe;
}

.toc-box {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc-box strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.toc-box a {
  display: block;
  padding: 4px 0;
}

.video-stack {
  margin-top: 4px;
}

.video-card {
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(15,23,42,0.98);
  border: 1px solid rgba(51,65,85,0.95);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.video-card strong {
  display: block;
  font-size: 11px;
  color: #e5e7eb;
  margin-bottom: 2px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  margin-top: 2px;
}

.badge-platform {
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.25);
  color: #f9fafb;
  background: rgba(15,23,42,0.95);
}

footer {
  margin-top: 28px;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(30,64,175,0.8);
  font-size: 11px;
  color: var(--muted);
  background: radial-gradient(circle at top, #020617, #000 80%);
}

footer .footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

footer a {
  color: #e0f2fe;
}
