:root {
  --bg: #08111f;
  --bg-soft: #0d1a2e;
  --panel: #101f35;
  --panel-light: #152842;
  --text: #edf4ff;
  --muted: #9fb0c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #43f0b0;
  --accent-strong: #12c98a;
  --warning: #ffcf66;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --theme-transition: 0.35s ease;
}

[data-theme="light"] {
  --bg: #f4f7fc;
  --bg-soft: #e8edf5;
  --panel: #dce2ed;
  --panel-light: #cdd6e4;
  --text: #0a1a2e;
  --muted: #4a5a72;
  --line: rgba(0, 0, 0, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fc;
    --bg-soft: #e8edf5;
    --panel: #dce2ed;
    --panel-light: #cdd6e4;
    --text: #0a1a2e;
    --muted: #4a5a72;
    --line: rgba(0, 0, 0, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  }
}

[data-theme="dark"] {
  --bg: #08111f;
  --bg-soft: #0d1a2e;
  --panel: #101f35;
  --panel-light: #152842;
  --text: #edf4ff;
  --muted: #9fb0c8;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

/* Theme transition */
body,
.site-header,
.site-footer,
.section,
.hero-card,
.disclaimer-panel,
.risk-panel,
.newsletter,
.comparison-grid article,
.matrix-grid article,
.tool-stack article,
.article-list article,
.library-grid article {
  transition: background var(--theme-transition), color var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(67, 240, 176, 0.15), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(69, 119, 255, 0.16), transparent 28rem),
    var(--bg);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
main:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  border-radius: 999px;
  background: var(--accent);
  color: #06111f;
  font-weight: 800;
  padding: 10px 16px;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

.nav,
.section,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand,
.nav-links,
.hero-actions,
.signup-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #8ab4ff);
  color: #06111f;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  border: 1px solid rgba(67, 240, 176, 0.4);
  border-radius: 999px;
  color: var(--accent) !important;
  padding: 10px 16px;
}

.section {
  padding: 92px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 46px;
  min-height: 680px;
}

.eyebrow,
.card-kicker,
.article-list span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

p {
  color: var(--muted);
}

.hero-copy {
  max-width: 690px;
  font-size: 1.16rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 20px;
}

.button.primary {
  background: var(--accent);
  color: #06111f;
}

.button.primary:hover {
  background: #71f7c5;
}

.button.secondary {
  border-color: var(--line);
  color: var(--text);
}

.hero-card,
.disclaimer-panel,
.risk-panel,
.newsletter {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 40, 66, 0.92), rgba(13, 26, 46, 0.84));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 30px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.signal-grid div {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  padding: 20px;
}

.signal-grid strong {
  display: block;
  color: var(--text);
  font-size: 2.5rem;
  line-height: 1;
}

.signal-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 0;
}

.logos span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 10px 16px;
}

.disclaimer-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 34px;
  padding: 38px;
}

.disclaimer-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.disclaimer-list li {
  border: 1px solid rgba(255, 207, 102, 0.28);
  border-radius: 16px;
  background: rgba(255, 207, 102, 0.07);
  color: var(--muted);
  padding: 14px 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 44px;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.comparison-grid,
.matrix-grid,
.tool-stack,
.article-list,
.library-grid {
  display: grid;
  gap: 16px;
}

.comparison-grid,
.matrix-grid {
  grid-template-columns: repeat(3, 1fr);
}

.comparison-grid article,
.matrix-grid article,
.tool-stack article,
.article-list article,
.library-grid article {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: 22px;
}

.comparison-grid span {
  color: var(--warning);
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.risk-panel,
.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  padding: 46px;
}

.checklist {
  display: grid;
  gap: 12px;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 14px;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.tool-stack {
  grid-template-columns: repeat(2, 1fr);
}

.article-list {
  grid-template-columns: repeat(4, 1fr);
}

.article-list article {
  min-height: 164px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  padding: 8px 14px;
  font-weight: 800;
}

.tag-list a:hover {
  border-color: rgba(67, 240, 176, 0.6);
}

.comparison-grid a,
.article-list a,
.article-body a,
.library-grid a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(67, 240, 176, 0.55);
  text-underline-offset: 4px;
}

.comparison-grid a:hover,
.article-list a:hover,
.article-body a:hover,
.library-grid a:hover {
  color: var(--accent);
}

.library-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 22px;
}

.library-grid article {
  min-height: 210px;
}

.status-note {
  border-top: 1px solid var(--line);
  margin: 18px 0 0;
  padding-top: 14px;
  font-size: 0.9rem;
}

.status-note strong {
  color: var(--text);
}

.article-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}

.article-body {
  width: 100%;
}

.article-body section {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 34px;
}

.article-meta {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(67, 240, 176, 0.28);
  border-radius: 22px;
  background: rgba(67, 240, 176, 0.07);
  margin: 34px 0;
  padding: 22px;
}

.article-meta p {
  margin: 0;
}

.article-meta strong {
  color: var(--text);
}

.article-checklist {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.article-nav {
  justify-content: flex-end;
}

.article-nav a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.article-nav a:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.signup-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
}

.signup-row {
  gap: 10px;
}

.signup-row input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 18px;
}

.signup-row input:focus {
  border-color: var(--accent);
}

.form-note {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.form-note.success {
  color: var(--accent);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 26px 0 42px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ===== SEARCH ===== */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s, border-color 0.2s;
}
.search-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.search-modal-content {
  width: min(680px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.search-modal-header input {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 16px;
  font-size: 1rem;
}
.search-modal-header input:focus {
  border-color: var(--accent);
}
.search-modal-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 12px;
}
.search-modal-header button:hover {
  color: var(--text);
  border-color: var(--accent);
}
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.search-result-item {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.search-result-item:hover,
.search-result-item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.08);
}
.search-result-item h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.search-result-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.search-no-results {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--muted);
  opacity: 0.5;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.breadcrumb a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  height: 3px;
  background: var(--accent);
  width: 0%;
  transition: width 60ms linear;
  pointer-events: none;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s, border-color 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent);
  color: #06111f;
  border-color: var(--accent);
}

/* ===== ARTICLE PREV/NEXT NAV ===== */
.article-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.article-prev-next a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-prev-next a:hover {
  text-decoration-color: var(--accent);
}
.article-prev-next .next-link {
  margin-left: auto;
}

/* ===== SECTION SCROLL ANIMATIONS ===== */
.section {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section.section-hidden {
  opacity: 0;
  transform: translateY(24px);
}
.section.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 400px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease forwards;
  pointer-events: auto;
}
.toast.toast-out {
  animation: toast-out 0.3s ease forwards;
}
.toast.success {
  border-color: var(--accent);
}
.toast.error {
  border-color: var(--warning);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ===== SUBSCRIBER COUNT ===== */
.subscriber-count {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== BUTTON DISABLED STATE ===== */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 920px) {
  .hero,
  .split,
  .split.reverse,
  .disclaimer-panel,
  .risk-panel,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .comparison-grid,
  .matrix-grid,
  .article-list,
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .article-nav {
    display: flex;
    width: auto;
    flex: 1 1 100%;
  }

  .section {
    padding: 62px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .comparison-grid,
  .matrix-grid,
  .tool-stack,
  .article-list,
  .library-grid,
  .signal-grid {
    grid-template-columns: 1fr;
  }

  .risk-panel,
  .disclaimer-panel,
  .newsletter {
    padding: 26px;
  }

  .signup-row,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .search-modal {
    padding: 40px 12px;
  }
  .search-modal-content {
    max-height: 80vh;
  }
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
  .article-prev-next {
    flex-direction: column;
    align-items: stretch;
  }
  .article-prev-next .next-link {
    margin-left: 0;
  }
  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: 0;
    max-width: none;
  }
}
