@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --clr-primary: #99ffcc;
  --clr-accent: #00ff41;
  --clr-ink: #001e3c;
  --clr-ink-80: rgba(0,30,60,0.8);
  --clr-ink-40: rgba(0,30,60,0.4);
  --clr-ink-10: rgba(0,30,60,0.07);
  --clr-bg: #f4fdf8;
  --clr-surface: #ffffff;
  --clr-felt: #0a2a1a;
  --clr-card-border: #99ffcc;
  --font-serif: 'EB Garamond', 'Crimson Text', Georgia, serif;
  --font-body: 'Crimson Text', 'EB Garamond', Georgia, serif;
  --header-h: 64px;
  --aside-w: 220px;
  --max-prose: 720px;
  --radius: 10px;
  --gap: 1.5rem;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-ink);
  background: var(--clr-bg);
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--clr-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #006622; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-ink);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: .5rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: .5rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); margin-bottom: .4rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }

/* ============================================================
   HEADING DECORATION — h2 > span, h3 > span
   ============================================================ */
h2 > span, h3 > span {
  display: inline;
  background: linear-gradient(90deg, var(--clr-primary) 0%, transparent 100%);
  padding: 0 .25em 0 0;
  border-left: 3px solid var(--clr-accent);
  padding-left: .45em;
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--clr-ink);
  z-index: 200;
  border-bottom: 2px solid var(--clr-accent);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.25rem;
  gap: 1rem;
}

.brand-link {
  text-decoration: none;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: .02em;
  white-space: nowrap;
}

.site-logo {
  height: 38px;
  width: auto;
}

.primary-nav {
  flex: 1;
  overflow: hidden;
}

.primary-nav ol {
  display: flex;
  flex-wrap: nowrap;
  gap: .1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav ol::-webkit-scrollbar { display: none; }

.primary-nav ol li a {
  display: block;
  padding: .55rem .65rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  color: var(--clr-primary);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background .18s, color .18s;
}

.primary-nav ol li a:hover {
  background: rgba(153,255,204,.12);
  color: var(--clr-accent);
}

.header-ctas {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}

/* CTA buttons */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}

.cta-signup {
  background: var(--clr-accent);
  color: var(--clr-ink);
  border: 2px solid var(--clr-accent);
}

.cta-signup:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: var(--clr-ink);
}

.cta-login {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}

.cta-login:hover {
  background: var(--clr-primary);
  color: var(--clr-ink);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--clr-primary);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px;
}

.burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ============================================================
   PAGE BODY LAYOUT
   ============================================================ */
.page-body {
  display: flex;
  flex-direction: row;
  margin-top: var(--header-h);
  flex: 1;
  min-height: calc(100vh - var(--header-h) - 80px);
}

.page-body.has-sidebar {
  gap: 0;
}

/* ============================================================
   ASIDE (left of content)
   ============================================================ */
.site-aside {
  width: var(--aside-w);
  min-width: var(--aside-w);
  flex-shrink: 0;
  background: var(--clr-ink);
  border-right: 1px solid rgba(153,255,204,.2);
  padding: 2rem 1rem 2rem 1.25rem;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.aside-inner h2 {
  font-size: .95rem;
  margin-bottom: .9rem;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.aside-inner h2 > span {
  background: none;
  border-left: 2px solid var(--clr-accent);
  padding-left: .4em;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aside-links li { margin-bottom: .5rem; }

.aside-links li a {
  color: rgba(153,255,204,.85);
  font-size: .88rem;
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding: .25rem .3rem;
  border-radius: 4px;
  transition: background .15s, color .15s;
}

.aside-links li a:hover {
  background: rgba(153,255,204,.12);
  color: var(--clr-accent);
}

/* ============================================================
   MAIN COLUMN
   ============================================================ */
.main-col {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 2rem 3rem;
  max-width: calc(var(--max-prose) + 4rem);
}

/* ============================================================
   EYEBROW / STAGE LABELS
   ============================================================ */
.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: .5rem;
}

.stage-pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 20px;
  margin-bottom: .75rem;
  border: 1px solid currentColor;
}

.stage-awareness { color: #66c2ff; }
.stage-consideration { color: var(--clr-primary); }
.stage-decision { color: var(--clr-accent); }

.label-ranking { color: #ffd966; }
.label-review  { color: var(--clr-accent); }
.label-compare { color: #b8d4ff; }
.label-faq     { color: var(--clr-primary); }
.label-about   { color: #ffb3cc; }
.label-privacy { color: #b8d4ff; }
.label-data    { color: #ffd966; }

/* ============================================================
   BYLINE
   ============================================================ */
.byline {
  font-size: .88rem;
  color: var(--clr-ink-80);
  margin-bottom: 1.1rem;
  font-style: italic;
  border-left: 3px solid var(--clr-primary);
  padding-left: .75rem;
}

.byline time { font-style: normal; font-weight: 600; }

/* ============================================================
   PAGE INTRO
   ============================================================ */
.page-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--clr-ink-80);
  max-width: 640px;
  margin-bottom: 1.5rem;
}

/* ============================================================
   HERO (home page)
   ============================================================ */
.hero-section {
  margin-bottom: 2.5rem;
  position: relative;
}

.hero-inner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--clr-felt);
  border-radius: var(--radius);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,30,60,.82) 0%,
    rgba(0,30,60,.55) 50%,
    rgba(0,26,15,.7) 100%
  );
  /* Organic cellular pattern via SVG mask */
  clip-path: polygon(0 0, 100% 0, 100% 92%, 88% 100%, 0 100%);
}

/* Breathing animation on hero overlay */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.018); opacity: .92; }
}

.hero-overlay {
  animation: breathe 6s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 3rem 3rem 3rem 3.5rem;
  max-width: 680px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: #fff;
  margin-bottom: 1rem;
}

.hero-copy .eyebrow {
  margin-bottom: .75rem;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--clr-primary);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .65rem 1.6rem;
  background: var(--clr-accent);
  color: var(--clr-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid var(--clr-accent);
  transition: background .18s, color .18s;
}

.btn-primary:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: var(--clr-ink);
}

/* ============================================================
   CONTENT SECTION / PROSE
   ============================================================ */
.content-section {
  margin-bottom: 2.5rem;
}

.prose {
  max-width: var(--max-prose);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-ink);
}

.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }

.prose a {
  color: #006622;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--clr-ink); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .93rem;
}

.prose table th,
.prose table td {
  padding: .55rem .75rem;
  border: 1px solid var(--clr-card-border);
  text-align: left;
}

.prose table th {
  background: var(--clr-ink);
  color: var(--clr-primary);
  font-weight: 700;
}

.prose table tr:nth-child(even) td {
  background: rgba(153,255,204,.08);
}

.prose blockquote {
  border-left: 4px solid var(--clr-accent);
  margin: 1.25rem 0;
  padding: .75rem 1.25rem;
  background: rgba(153,255,204,.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--clr-ink-80);
}

/* ============================================================
   CHILD PAGES TABLE (home / category)
   ============================================================ */
.child-pages-section {
  margin-top: 2.5rem;
}

.child-pages-section h2 {
  margin-bottom: 1.25rem;
}

.child-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.child-table tbody tr {
  border-bottom: 1px solid rgba(153,255,204,.2);
}

.card-cell {
  padding: .75rem 0;
}

.child-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  border: 1.5px solid var(--clr-card-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--clr-surface);
  transition: border-color .18s, box-shadow .18s;
}

.child-card:hover {
  border-color: var(--clr-accent);
}

.card-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.child-card-body h3 {
  font-size: 1rem;
  margin-bottom: .25rem;
}

.child-card-body h3 span {
  background: none;
  border-left: none;
  padding-left: 0;
}

.child-card-body h3 a {
  color: var(--clr-ink);
  text-decoration: none;
  font-weight: 700;
}

.child-card-body h3 a:hover { color: #006622; text-decoration: underline; }

.child-card-body p {
  font-size: .88rem;
  color: var(--clr-ink-80);
  margin-bottom: .5rem;
  line-height: 1.5;
}

.read-more {
  font-size: .83rem;
  font-weight: 700;
  color: #006622;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   RANK BADGES
   ============================================================ */
.rank-sidebar-block {
  float: right;
  width: 220px;
  margin: 0 0 1.5rem 2rem;
  background: var(--clr-felt);
  border: 1.5px solid var(--clr-card-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.rank-sidebar-block h2 {
  color: var(--clr-primary);
  font-size: .95rem;
  margin-bottom: .75rem;
}

.rank-sidebar-block h2 > span {
  background: none;
  border-left: 2px solid var(--clr-accent);
  padding-left: .4em;
}

.rank-badge {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(153,255,204,.15);
}

.rank-badge:last-child { border-bottom: none; }

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clr-accent);
  color: var(--clr-ink);
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-name {
  font-size: .85rem;
  color: var(--clr-primary);
  line-height: 1.3;
}

/* ============================================================
   REVIEW HERO IMAGE
   ============================================================ */
.review-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.review-header-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .25rem;
}

/* ============================================================
   FAQ BODY
   ============================================================ */
.faq-guide-label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--clr-card-border);
  padding-bottom: .4rem;
}

/* ============================================================
   AUTHOR SECTION
   ============================================================ */
.author-section {
  margin-top: 2.5rem;
  border-top: 2px solid var(--clr-card-border);
  padding-top: 1.75rem;
}

.author-section h2 {
  margin-bottom: 1rem;
}

.author-card {
  border: 1.5px solid var(--clr-card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(153,255,204,.06);
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--clr-ink);
  margin-bottom: .2rem;
}

.author-credentials {
  font-size: .88rem;
  font-weight: 600;
  color: #006622;
  margin-bottom: .75rem;
  letter-spacing: .02em;
}

.author-bio {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--clr-ink-80);
  margin-bottom: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-ink);
  border-top: 2px solid var(--clr-accent);
  padding: 1.1rem 1.5rem;
}

.footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand { flex-shrink: 0; }

.footer-logo {
  height: 32px;
  width: auto;
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: .03em;
}

.footer-nav {
  flex: 1;
}

.footer-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav ol li a {
  color: rgba(153,255,204,.75);
  font-size: .82rem;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .25rem 0;
  transition: color .15s;
}

.footer-nav ol li a:hover {
  color: var(--clr-accent);
}

.footer-legal {
  text-align: right;
  flex-shrink: 0;
  max-width: 360px;
}

.rg-notice {
  font-size: .77rem;
  color: rgba(153,255,204,.65);
  line-height: 1.4;
  margin-bottom: .3rem;
}

.copyright {
  font-size: .76rem;
  color: rgba(153,255,204,.45);
  margin: 0;
}

/* ============================================================
   ORGANIC / BIOMIMETIC DECORATIONS
   ============================================================ */

/* Cellular background on aside */
.site-aside {
  background-image: radial-gradient(
    ellipse at 30% 60%,
    rgba(0,255,65,.07) 0%,
    transparent 60%
  ), radial-gradient(
    ellipse at 75% 20%,
    rgba(153,255,204,.05) 0%,
    transparent 55%
  );
}

/* Pulsing green dot accent on cards */
.child-card::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-accent);
  flex-shrink: 0;
  margin-top: .35rem;
  animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.6); }
}

/* Organism grid backing for ranking pages */
.page-ranking .main-col {
  background-image:
    radial-gradient(circle at 10% 80%, rgba(0,255,65,.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(153,255,204,.04) 0%, transparent 45%);
}

/* Scroll reveal classes (set by app.js) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger siblings */
.child-table tbody tr:nth-child(1) .reveal { transition-delay: 0s; }
.child-table tbody tr:nth-child(2) .reveal { transition-delay: .08s; }
.child-table tbody tr:nth-child(3) .reveal { transition-delay: .16s; }
.child-table tbody tr:nth-child(4) .reveal { transition-delay: .24s; }
.child-table tbody tr:nth-child(5) .reveal { transition-delay: .32s; }

/* ============================================================
   COMPARE PAGE
   ============================================================ */
.compare-body .prose table {
  border: 1.5px solid var(--clr-card-border);
}

.compare-body .prose table th {
  background: var(--clr-felt);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-overlay { animation: none; }
  .child-card::before { animation: none; }
  .reveal, .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   RESPONSIVE — tablet  ≤ 960px
   ============================================================ */
@media (max-width: 960px) {
  .site-aside {
    display: none;
  }

  .primary-nav ol {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--clr-ink);
    border-bottom: 2px solid var(--clr-accent);
    padding: .75rem 1rem;
    z-index: 300;
  }

  .primary-nav.is-open ol {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .rank-sidebar-block {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem 0;
  }

  .hero-inner {
    min-height: 70vh;
  }
}

/* ============================================================
   RESPONSIVE — mobile  ≤ 600px
   ============================================================ */
@media (max-width: 600px) {
  :root { --header-h: 56px; }

  html { font-size: 17px; }

  .main-col {
    padding: 1.5rem 1rem 2rem;
  }

  .hero-copy {
    padding: 2rem 1.25rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .child-card {
    flex-direction: column;
  }

  .card-thumb {
    width: 100%;
    height: 140px;
  }

  .header-ctas {
    gap: .4rem;
  }

  .cta {
    font-size: .78rem;
    padding: .45rem .75rem;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    text-align: left;
    max-width: 100%;
  }

  .footer-nav ol {
    flex-direction: column;
    gap: .1rem;
  }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}