
/* ===== TOKENS ===== */
:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --ink-mid: #2a3d36;
  --ink-light: #4a6358;
  --mint-dark: #7de8be;
  --sky-dark: #7bbfd6;
  --white: #f8fffc;
  --card-bg: #eafff5;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --border: 3px solid var(--ink);
  --shadow-clay: 4px 4px 0px var(--ink), inset -2px -2px 6px rgba(23,38,32,0.12);
  --shadow-lift: 6px 6px 0px var(--ink), inset -2px -2px 8px rgba(23,38,32,0.10);
  --shadow-sm: 2px 2px 0px var(--ink-mid);
  --font-head: 'Bodoni Moda', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --max-w: 1180px;
  --col-side: 240px;
  --gap: 32px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: underline; }
a:hover { color: var(--ink-mid); }
ul, ol { list-style: none; }

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--mint);
  border-bottom: var(--border);
}

.header-brand-row {
  background: var(--ink);
  padding: 10px 0;
}

.header-brand-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mint);
  text-decoration: none;
  letter-spacing: 0.02em;
  flex: 1;
}
.brand-name:hover { color: var(--sky); }

.brand-logo img { height: 44px; width: auto; }

.header-ctas {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* CTA BUTTONS */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 200ms ease-out;
  white-space: nowrap;
  border: 3px solid transparent;
}

.cta-signup {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow-clay);
}
.cta-signup:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  text-decoration: none;
}

.cta-login {
  background: transparent;
  color: var(--mint);
  border-color: var(--mint);
  box-shadow: 2px 2px 0px rgba(180,253,225,0.3);
}
.cta-login:hover {
  background: rgba(180,253,225,0.12);
  transform: translate(-1px,-1px);
  text-decoration: none;
  color: var(--mint);
}

/* NAV TOGGLE */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: 3px solid var(--mint);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.burger, .burger::before, .burger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--mint);
  border-radius: 2px;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
  position: relative;
}
.burger::before, .burger::after {
  content: '';
  position: absolute;
  left: 0;
}
.burger::before { top: -7px; }
.burger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: rotate(-45deg) translate(5px,-5px); }

/* NAV ROW */
.header-nav-row {
  padding: 0;
  background: var(--mint);
}

#primary-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
}

#primary-nav ol li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  border-right: 2px solid rgba(23,38,32,0.15);
  transition: background 150ms ease-out;
}
#primary-nav ol li:last-child a { border-right: none; }
#primary-nav ol li a:hover { background: rgba(23,38,32,0.08); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(23,38,32,0.72) 0%, rgba(23,38,32,0.45) 60%, rgba(173,216,230,0.25) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 20px 80px;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--mint);
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 2px 3px 0px rgba(23,38,32,0.6);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--sky);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 400;
}

.hero-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--white);
  clip-path: polygon(0 60px, 100% 0, 100% 60px);
  z-index: 3;
}

/* GUIDE HERO */
.guide-hero {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--ink);
}
.guide-hero .hero-media { position: absolute; inset: 0; }
.guide-hero .hero-media .hero-img { width: 100%; height: 100%; object-fit: cover; }
.guide-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(23,38,32,0.5), rgba(23,38,32,0.8));
}
.guide-hero-spacer { height: 8px; background: var(--ink); }

/* ===== INNER PAGE BANNER ===== */
.inner-page-banner {
  background: var(--ink);
  padding: 48px 0 40px;
}
.inner-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--mint);
  line-height: 1.25;
}
.faq-banner .byline,
.changelog-banner .byline { color: var(--sky); margin-top: 10px; }

/* ===== LAYOUTS (sidebar + content) ===== */
.home-layout,
.inner-layout,
.guide-layout {
  display: grid;
  grid-template-columns: var(--col-side) 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: 120px;
}

.sidebar-card {
  background: var(--mint);
  border: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-clay);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-heading {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
}

.sidebar-links li { border-bottom: 1px solid rgba(23,38,32,0.12); }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms ease;
}
.sidebar-links a:hover { color: var(--ink-light); text-decoration: underline; }

/* ===== CONTENT COLUMN ===== */
.content-column { min-width: 0; }

.content-figure {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-clay);
  padding: 36px 40px;
  margin: 0;
}

/* ===== GUIDE TITLE BLOCK ===== */
.guide-title-block { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--mint); }

.guide-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 12px;
}

/* ===== BYLINE ===== */
.byline {
  font-size: 0.9rem;
  color: var(--ink-light);
  font-weight: 400;
}
.byline-author { font-weight: 600; color: var(--ink); }
.byline time { color: var(--ink-mid); }

/* ===== STAGE LABEL ===== */
.stage-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 2px solid currentColor;
}
.stage-awareness { background: var(--sky); color: var(--ink); }
.stage-consideration { background: var(--mint); color: var(--ink); }
.stage-decision { background: var(--mint-dark); color: var(--ink); }

/* ===== BODY CONTENT ===== */
.body-content h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 14px;
  line-height: 1.3;
}
.body-content h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin: 26px 0 10px;
}
.body-content h2 > span,
.body-content h3 > span {
  display: inline;
}
.body-content p { margin-bottom: 18px; }
.body-content ul, .body-content ol {
  margin: 0 0 18px 24px;
  list-style: disc;
}
.body-content ol { list-style: decimal; }
.body-content li { margin-bottom: 6px; }
.body-content a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.body-content a:hover { color: var(--ink-light); }
.body-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.body-content th {
  background: var(--ink);
  color: var(--mint);
  font-family: var(--font-head);
  font-size: 0.95rem;
  padding: 12px 16px;
  text-align: left;
}
.body-content td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(23,38,32,0.1);
}
.body-content tr:last-child td { border-bottom: none; }
.body-content tr:nth-child(even) td { background: rgba(180,253,225,0.2); }
.body-content blockquote {
  border-left: 4px solid var(--mint);
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-style: italic;
}

/* ===== SECTIONS ===== */
.home-body-section,
.guide-body-section,
.inner-body-section,
.faq-body-section,
.changelog-body-section { padding: 48px 0 60px; }

/* ===== CHILD PAGES SECTION ===== */
.child-pages-section {
  padding: 40px 0 60px;
  background: linear-gradient(135deg, rgba(180,253,225,0.25) 0%, rgba(173,216,230,0.2) 100%);
  border-top: var(--border);
}

.section-heading {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 28px;
  text-align: center;
}

/* CHILD CARDS ROW — sibling <a> blocks with <strong> direct child */
.child-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

a.child-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 240px;
  background: var(--mint);
  border: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-clay);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 200ms ease-out;
}
a.child-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
  color: var(--ink);
}
a.child-card > strong {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  display: block;
}
a.child-card > .child-card-desc {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.4;
}

/* ===== AUTHOR CARD ===== */
.author-card {
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-clay);
  padding: 28px 32px;
  margin-top: 36px;
}
.author-card-heading {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
}
.author-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.author-credentials {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.author-bio {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* ===== CHANGELOG ===== */
.cl-list .cl-date {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-light);
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: auto;
  border-top: var(--border);
}

.footer-cta-block {
  background: var(--ink);
  padding: 52px 20px;
  text-align: center;
}
.footer-cta-headline {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 24px;
}
.footer-cta-btn {
  font-size: 1rem;
  padding: 14px 32px;
  min-height: 52px;
}

.footer-main {
  background: var(--card-bg);
  padding: 48px 0 36px;
  border-top: 2px solid rgba(23,38,32,0.15);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-col address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.55;
}

.footer-col-heading {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  border-bottom: 2px solid var(--mint-dark);
  padding-bottom: 6px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { border-bottom: 1px solid rgba(23,38,32,0.08); }
.footer-col ul li:last-child { border-bottom: none; }
.footer-col ul li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 150ms ease;
}
.footer-col ul li a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  background: var(--ink);
  padding: 20px 0;
  border-top: 2px solid rgba(180,253,225,0.2);
}
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.rg-notice {
  font-size: 0.82rem;
  color: var(--sky);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.copyright {
  font-size: 0.8rem;
  color: rgba(173,216,230,0.6);
}

/* ===== MOTION ===== */
@media (prefers-reduced-motion: no-preference) {
  .child-card {
    animation: none;
  }
  .child-cards-row a.child-card {
    opacity: 0;
    transform: translateY(16px);
    animation: stagger-in 400ms cubic-bezier(0.34,1.56,0.64,1) forwards;
  }
  .child-cards-row a.child-card:nth-child(1) { animation-delay: 60ms; }
  .child-cards-row a.child-card:nth-child(2) { animation-delay: 120ms; }
  .child-cards-row a.child-card:nth-child(3) { animation-delay: 180ms; }
  .child-cards-row a.child-card:nth-child(4) { animation-delay: 240ms; }
  .child-cards-row a.child-card:nth-child(5) { animation-delay: 300ms; }
  .child-cards-row a.child-card:nth-child(6) { animation-delay: 360ms; }
  .child-cards-row a.child-card:nth-child(n+7) { animation-delay: 420ms; }

  @keyframes stagger-in {
    to { opacity: 1; transform: translateY(0); }
  }

  .sidebar-card {
    transition: transform 200ms cubic-bezier(0.34,1.56,0.64,1);
  }
  .sidebar-card:hover { transform: translate(-1px,-1px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --col-side: 200px; }

  /* Hide nav links behind toggle */
  .nav-toggle { display: flex; }

  .header-nav-row { overflow: hidden; }
  #primary-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease-out;
  }
  #primary-nav.is-open { max-height: 600px; }

  #primary-nav ol {
    flex-direction: column;
    padding: 8px 0;
  }
  #primary-nav ol li a {
    border-right: none;
    border-bottom: 1px solid rgba(23,38,32,0.12);
    padding: 14px 20px;
    font-size: 1rem;
  }

  .home-layout,
  .inner-layout,
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    order: 2;
  }
  .content-column { order: 1; }

  .content-figure { padding: 24px 20px; }

  .hero { min-height: 60vh; }

  .child-cards-row { gap: 12px; }
  a.child-card { flex: 1 1 calc(50% - 6px); }
}

@media (max-width: 480px) {
  body { font-size: 16px; }

  .brand-name { font-size: 1rem; }

  .cta { padding: 8px 12px; font-size: 0.82rem; }

  a.child-card { flex: 1 1 100%; }

  .footer-cols { grid-template-columns: 1fr; }

  .content-figure { padding: 20px 16px; border-radius: var(--radius-md); }

  .hero-copy { padding: 40px 16px 60px; }
}

/* ===== HEADING DECORATION (contract: h2/h3 > span) ===== */
.body-content h2 > span,
.body-content h3 > span,
.sidebar-heading > span,
.section-heading > span,
.footer-col-heading > span,
.author-card-heading > span {
  display: inline;
  background: linear-gradient(90deg, transparent 0%, rgba(180,253,225,0.35) 100%);
  border-radius: 4px;
  padding: 0 2px;
}

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