/* ============================================================
   KIWISONIC — style.css
   Vanilla CSS, no framework
   ============================================================ */

/* ── 1. Custom Properties ── */
:root {
  --green:        #7CC241;
  --green-dark:   #4E7B1A;
  --green-darker: #2E5010;
  --green-light:  #B0D86A;
  --green-faint:  #F2FAE8;
  --brown:        #7B4F2D;
  --brown-light:  #C4956A;
  --text:         #1C2B0A;
  --text-muted:   #5A7040;
  --text-light:   #8AAC60;
  --bg:           #FAFDF5;
  --white:        #FFFFFF;
  --border:       #D4E8B0;
  --shadow:       0 2px 16px rgba(78, 123, 26, 0.10);
  --shadow-lg:    0 8px 40px rgba(78, 123, 26, 0.14);

  --radius:       10px;
  --radius-lg:    18px;
  --radius-pill:  100px;

  --nav-h:        68px;
  --max-w:        1140px;
  --section-pad:  80px;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── 2. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }
ul { list-style: none; }

/* ── 3. Typography ── */
h1, h2, h3, h4 {
  color: var(--green-dark);
  line-height: 1.2;
  font-weight: 800;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p  { color: var(--text); }
p + p { margin-top: 0.8em; }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(124, 194, 65, 0.12);
  border: 1px solid rgba(124, 194, 65, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.usp-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green-dark);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  margin-left: 6px;
  position: relative;
  top: -2px;
}

/* ── 4. Layout Utilities ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-pad) 0; }
.section-alt { background: var(--green-faint); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

/* ── 5. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 13px 28px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-outline:hover {
  background: var(--green-faint);
  color: var(--green-dark);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  color: var(--white);
}

.btn-lg { font-size: 1.1rem; padding: 16px 36px; }
.btn-sm { font-size: 0.875rem; padding: 9px 20px; }

/* ── 6. Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.feature-card .icon {
  width: 48px;
  height: 48px;
  background: var(--green-faint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--green-dark);
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { font-size: 0.93rem; color: var(--text-muted); }
.feature-card img {
  width: calc(100% + 48px);
  height: 180px;
  margin: -28px -24px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  object-fit: contain;
  background: var(--bg-dark, #1a1a1a);
}

/* ── 6b. Feature Screenshot (features page) ── */
.feature-screenshot {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: var(--bg-dark, #1a1a1a);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
a:has(.feature-screenshot) { display: block; }
.feature-screenshot:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
/* ── Lightbox (features page) ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.feature-card a { display: contents; }
.feature-card img:hover { opacity: 0.9; }

/* ── 7. Placeholder Screenshot ── */
.placeholder-screen {
  background: linear-gradient(135deg, #e8f5d0 0%, #c8e8a0 40%, #a8d070 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 240px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.placeholder-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 22px,
      rgba(78,123,26,0.06) 22px,
      rgba(78,123,26,0.06) 23px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 36px,
      rgba(78,123,26,0.04) 36px,
      rgba(78,123,26,0.04) 37px
    );
}
.placeholder-screen .ps-icon {
  width: 56px;
  height: 56px;
  background: rgba(78,123,26,0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  position: relative;
  z-index: 1;
}
.placeholder-screen span { position: relative; z-index: 1; opacity: 0.8; }

/* ── 7b. Preview Banner ── */
.preview-banner {
  background: var(--brown);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 10px 24px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.preview-banner strong {
  color: #fff;
  letter-spacing: 0.04em;
}
.preview-banner a {
  color: inherit;
}
.early-bird-teaser {
  white-space: nowrap;
}

/* ── 7c. Early Bird Components ── */
.early-bird-badge {
  display: inline-block;
  background: var(--brown);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.early-bird-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}
.price-original {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: line-through;
}
.price-earlybird {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
}
.early-bird-counter {
  background: var(--green-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0 24px;
  font-size: 0.93rem;
  color: var(--text-muted);
  text-align: center;
}
.early-bird-counter strong {
  color: var(--brown);
}

/* ── 8. Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--green-dark);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo-text { color: var(--green-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--green-dark); background: var(--green-faint); }
.nav-links a.active { color: var(--green-dark); background: var(--green-faint); }

.nav-cta { margin-left: 8px; }

/* ── Two-row nav: product tabs (row 1), the active product's section menu (row 2) ──
   Highlight and the row-2 reveal are driven entirely by data-active on .nav, set per
   page from front-matter (the product id). No JS, no conditionals. The site is
   organised by product; skill level is an in-page concern, not a nav axis, so the only
   level page left (kiwisonic-beginner) is reached from row 2 and from the product page. */
.nav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

.nav[data-active^="kiwisonic"] .tab-kiwisonic,
.nav[data-active^="kiwisynth"] .tab-kiwisynth,
.nav[data-active^="kiwipulse"] .tab-kiwipulse,
.nav[data-active^="kiwibass"] .tab-kiwibass {
  color: var(--green-dark);
  background: var(--green-faint);
}

.nav-secondary {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--green-faint);
}
.nav[data-active^="kiwisonic"] .nav-secondary,
.nav[data-active^="kiwisynth"] .nav-secondary,
.nav[data-active^="kiwipulse"] .nav-secondary,
.nav[data-active^="kiwibass"] .nav-secondary { display: block; }
.nav-sub-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 44px;
  display: flex;
  align-items: center;
}
.nav-sub { display: none; align-items: center; gap: 4px; }
.nav[data-active^="kiwisonic"] .nav-sub-kiwisonic { display: flex; }
.nav[data-active^="kiwisynth"] .nav-sub-kiwisynth { display: flex; }
.nav[data-active^="kiwipulse"] .nav-sub-kiwipulse { display: flex; }
.nav[data-active^="kiwibass"] .nav-sub-kiwibass { display: flex; }
/* Row 2 holds this page's section anchors on the left. The links that leave the page,
   the manual and Kiwisonic's beginner on-ramp, sit apart from them on the right. */
.nav-sub a:not(.nav-sub-away) + a.nav-sub-away { margin-left: auto; }
.nav-sub a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-sub a:hover { color: var(--green-dark); background: rgba(255,255,255,0.7); }

/* Anchor jumps from row 2 should clear the sticky two-row nav. */
.feature-section[id], section[id] { scroll-margin-top: 124px; }

.nav-mobile-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 12px 0 2px;
}

/* Row 1 carries more items now, so collapse to the hamburger earlier. */
@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-secondary { display: none !important; }
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius);
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}
.nav-mobile a:hover { background: var(--green-faint); color: var(--green-dark); }
.nav-mobile .btn { margin-top: 8px; justify-content: center; }

/* ── 9. Hero ── */
.hero {
  background: linear-gradient(160deg, var(--green-dark) 0%, #2E5A10 50%, #1A3806 100%);
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124,194,65,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 80%, rgba(176,216,106,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-split {
  display: flex;
  align-items: center;
  gap: 56px;
}
.hero-logo {
  height: 40vh;
  min-height: 180px;
  max-height: 320px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.3));
}
.hero-content {
  text-align: left;
}
.hero h1 {
  color: var(--white);
  max-width: 720px;
  margin: 0 0 20px;
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 0 40px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Page hero (sub-pages) */
.page-hero {
  background: linear-gradient(160deg, var(--green-dark) 0%, #2E5A10 100%);
  padding: 72px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124,194,65,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 { color: var(--white); }
.page-hero .tagline {
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 1.1rem;
}

/* Hero/page-hero content sits above the decorative ::before layer. */
.hero > .container,
.page-hero > .container { position: relative; z-index: 1; }

/* Page-hero eyebrow: light, for contrast on the dark green gradient. */
.page-hero .section-label {
  color: var(--green-light);
  border-color: rgba(176,216,106,0.4);
  background: rgba(176,216,106,0.1);
}

/* Home hero is centered (the default split hero is left-aligned). */
.hero-home .hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.hero-home .tagline { margin-left: auto; margin-right: auto; }
.hero-home .hero-actions { justify-content: center; }

/* ── Content layout helpers (used in place of inline styles) ── */
.section-intro { max-width: 600px; margin: 12px auto 0; }   /* centered muted lead under a heading */
.section-grid { margin-top: 40px; }                          /* grid or action row after a heading */
.hero-actions.center { justify-content: center; }
.link-inherit { color: inherit; text-decoration: underline; }
.measure { max-width: 880px; margin: 0 auto; }               /* constrained centered block */
.img-pad-dark { background: #1a1f1a; padding: 8px; }         /* dark backing for a UI panel shot */

/* Card content defaults + helpers. */
.card h3 { margin: 0 0 8px; }
.card p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }
.card-title { margin: 6px 0 8px; }                           /* card title that follows an eyebrow */
.card-accent h3 { color: var(--green-dark); }
.card .hero-actions { margin-top: 16px; }
.persona-card .hero-actions { margin-top: 14px; }
.card-media {                                                /* screenshot at the top of a card */
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── Kiwisynth spec table (was a page <style> block) ── */
.ks-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ks-spec-table th,
.ks-spec-table td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  vertical-align: top;
}
.ks-spec-table tr:last-child td { border-bottom: none; }
.ks-spec-table th {
  background: var(--green-faint);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ks-spec-table td:first-child { font-weight: 600; white-space: nowrap; width: 30%; color: var(--text); }
.ks-spec-table td:last-child { color: var(--text-muted); }

/* ── 10. Why Kiwisonic (comparison) ── */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.comparison-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
}
.comparison-card.highlight {
  border-color: var(--green);
  background: var(--green-faint);
  box-shadow: 0 0 0 2px var(--green);
}
.comparison-card.highlight::after {
  content: 'Kiwisonic';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
}
.comparison-card h3 {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comparison-card ul { display: flex; flex-direction: column; gap: 8px; }
.comparison-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.comparison-card li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #C0392B;
  font-weight: 700;
}
.comparison-card.highlight li::before { content: '✓'; color: var(--green-dark); }

/* ── 11. Feature Grid (home highlights) ── */
.feature-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

/* ── 12. Persona Cards ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
/* Two levels (beginner | regular): keep the pair centred rather than stretched. */
.persona-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin-inline: auto;
}
.persona-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}
.persona-card .persona-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.persona-card h3 { margin-bottom: 8px; }
.persona-card p { font-size: 0.92rem; color: var(--text-muted); }

/* ── 13. CTA Strip ── */
.cta-strip {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2E5010 100%);
  padding: 72px 0;
  text-align: center;
}
.cta-strip h2 { color: var(--white); margin-bottom: 12px; }
.cta-strip p  { color: rgba(255,255,255,0.7); margin-bottom: 32px; font-size: 1.05rem; }
.cta-strip .hero-actions { justify-content: center; }

/* ── 14. Features Page — Feature Sections ── */
.feature-section {
  padding: 72px 0;
}
.feature-section:nth-child(even) { background: var(--green-faint); }
.feature-content h2 { margin-bottom: 16px; }
.feature-content p  { color: var(--text-muted); margin-bottom: 20px; }
.feature-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.feature-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.feature-detail-list li::before {
  content: '→';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── 15. Download Page ── */
.download-hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 540px;
  margin: -40px auto 0;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
}
.version-badge {
  display: inline-block;
  background: var(--green-faint);
  border: 1px solid var(--border);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.download-hero-card .btn-primary { font-size: 1.1rem; padding: 16px 40px; margin: 20px 0 12px; }
.download-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.requirement-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.requirement-item .req-icon {
  width: 36px;
  height: 36px;
  background: var(--green-faint);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green-dark);
}
.requirement-item h4 { margin-bottom: 4px; color: var(--green-dark); }
.requirement-item p  { font-size: 0.88rem; color: var(--text-muted); }

.install-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.install-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.step-num {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.install-step p { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* ── 16. About Page ── */
.origin-section { max-width: 740px; margin: 0 auto; }
.origin-section p { font-size: 1.05rem; color: var(--text-muted); }

.intro-personal {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: center;
}
.intro-portrait {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green);
  background: var(--green-faint);
}
.intro-personal-text { flex: 1 1 auto; }
.intro-personal-text .intro-lede {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.intro-personal-text p { color: var(--text-muted); margin: 0; }
.intro-personal-text p + p { margin-top: 10px; }

@media (max-width: 600px) {
  .intro-personal { flex-direction: column; text-align: center; gap: 20px; }
  .intro-portrait { width: 140px; height: 140px; }
}

.pull-quote {
  border-left: 4px solid var(--green);
  background: var(--green-faint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 40px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-dark);
  font-style: italic;
}

.persona-table-wrap { margin-top: 40px; overflow-x: auto; }
.persona-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.persona-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
.persona-table th:first-child { border-radius: var(--radius) 0 0 0; }
.persona-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.persona-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.persona-table tr:nth-child(even) td { background: var(--green-faint); }
.persona-table tr:last-child td { border-bottom: none; }

.limits-table-wrap { margin-top: 40px; overflow-x: auto; }
.limits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.limits-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
.limits-table th:first-child { border-radius: var(--radius) 0 0 0; }
.limits-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.limits-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.limits-table td:first-child { font-weight: 600; color: var(--text); }
.limits-table tr:nth-child(even) td { background: var(--green-faint); }
.limits-table tr:last-child td { border-bottom: none; }

/* ── 17. Footer ── */
.footer {
  background: var(--green-darker);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
}
.footer-logo img { height: 30px; width: auto; }
.footer-brand p { font-size: 0.88rem; max-width: 240px; }
.footer-col h4 { color: var(--white); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: color 0.15s;
}
.footer-col li a:hover { color: var(--green-light); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: var(--green-light); }

/* ── 18. Documentation Pages ── */
.doc-section { padding: 0 0 var(--section-pad); }

.doc-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
}

/* ── Manual nav sidebar (persistent, from manual-nav.json) ── */
.doc-nav {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  padding: 20px 0;
}
.doc-nav > summary {
  display: none; /* desktop: tree is always shown; summary is the mobile toggle */
}
.doc-nav-group { margin-bottom: 20px; }
.doc-nav-group h4 {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}
.doc-nav-group ul { display: flex; flex-direction: column; gap: 2px; }
.doc-nav-group li { list-style: none; margin: 0; }
.doc-nav-group li a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 5px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  text-decoration: none;
  line-height: 1.35;
}
.doc-nav-group li a:hover {
  color: var(--green-dark);
  border-left-color: var(--green);
  background: var(--green-faint);
}
.doc-nav-group li a.active {
  color: var(--green-dark);
  font-weight: 700;
  border-left-color: var(--green);
  background: var(--green-faint);
}

/* ── Prev / next pager ── */
.doc-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.doc-prevnext a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  max-width: 48%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.doc-prevnext a:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.doc-prevnext .doc-next { text-align: right; align-items: flex-end; }
.doc-prevnext span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.doc-prevnext strong { color: var(--green-dark); font-size: 0.95rem; }
.doc-prevnext-spacer { flex: 1; max-width: 48%; }

/* ── TOC sidebar ── */
.doc-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 20px 0;
}
.doc-toc h3 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}
.doc-toc ul { display: flex; flex-direction: column; gap: 4px; }
.doc-toc li a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.doc-toc li a:hover {
  color: var(--green-dark);
  border-left-color: var(--green);
  background: var(--green-faint);
}
.doc-toc li.toc-sub a {
  padding-left: 24px;
  font-size: 0.82rem;
}

/* ── Doc article content ── */
.doc-content { max-width: 780px; padding-top: 32px; }
.doc-content h1 { margin-bottom: 16px; }
.doc-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.doc-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.doc-content h3 { margin-top: 32px; margin-bottom: 12px; }
.doc-content p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.97rem; }
.doc-content ul, .doc-content ol { margin-bottom: 16px; padding-left: 24px; }
.doc-content li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 6px; list-style: disc; }
.doc-content ol li { list-style: decimal; }
.doc-content strong { color: var(--text); }
.doc-content img {
  margin: 8px 0;
  background: var(--bg-dark, #1a1a1a);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: zoom-in;
}
.doc-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.doc-content pre {
  background: #1C2B0A;
  color: #D4E8B0;
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.doc-content code {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.88em;
}
.doc-content p code, .doc-content li code {
  background: var(--green-faint);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--green-dark);
}

/* Doc blockquote / note */
.doc-note {
  border-left: 4px solid var(--green);
  background: var(--green-faint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.doc-note p { margin-bottom: 8px; }
.doc-note p:last-child { margin-bottom: 0; }

/* Doc tables */
.doc-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.doc-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
}
.doc-table th:first-child { border-radius: var(--radius) 0 0 0; }
.doc-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.doc-table tr:nth-child(even) td { background: var(--green-faint); }
.doc-table tr:last-child td { border-bottom: none; }

/* ── Doc index grid ── */
.doc-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.doc-index-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.doc-index-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.doc-index-card h3 { margin-bottom: 8px; color: var(--green-dark); }
.doc-index-card p { color: var(--text-muted); font-size: 0.93rem; flex: 1; }
.doc-index-card .doc-index-link {
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
}

/* ── Doc index: grouped manual ── */
.doc-index-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 32px;
}
.doc-index-jump a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  text-decoration: none;
}
.doc-index-jump a:hover { background: var(--green); color: var(--white); }
.doc-index-section {
  margin: 32px 0 16px;
  font-size: 1.05rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ── 20. Purchase Page ── */
.purchase-card {
  max-width: 520px;
  margin: -32px auto 0;
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(124, 194, 65, 0.15);
}
.form-group input::placeholder { color: var(--text-light); }

.price-summary {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--green-faint);
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.93rem;
  color: var(--text-muted);
  padding: 4px 0;
}
.price-row.price-total {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  border-top: 1.5px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
}

.dropin-wrap { margin: 24px 0 8px; min-height: 52px; }

.purchase-btn {
  width: 100%;
  margin-top: 16px;
  font-size: 1rem;
}
.purchase-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.purchase-success,
.purchase-error {
  text-align: center;
  max-width: 520px;
  margin: -32px auto 0;
}
.success-icon { margin-bottom: 16px; }
.success-icon svg { margin: 0 auto; }

.purchase-error h2 { color: #c0392b; }

@media (max-width: 640px) {
  .purchase-card { padding: 28px 18px; margin-top: -24px; }
}

/* ── 21. Suggestions & Roadmap ── */

.auth-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.auth-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.auth-bar-text {
  font-size: 0.93rem;
  color: var(--text-muted);
}
.auth-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}
.auth-bar-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.auth-bar-form input {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  width: 240px;
}
.auth-bar-form input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(124, 194, 65, 0.15);
}
.auth-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.suggestions-section { padding: 48px 0; }
.suggestions-heading { margin-bottom: 8px; }

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-card {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}
.suggestion-card:hover {
  box-shadow: var(--shadow);
}

.suggestion-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
  min-width: 52px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.suggestion-vote:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.suggestion-vote.voted {
  background: var(--green-faint);
  border-color: var(--green);
  color: var(--green-dark);
}
.suggestion-vote:disabled {
  cursor: default;
  opacity: 0.6;
}
.suggestion-vote:disabled:hover {
  border-color: var(--border);
  color: var(--text-muted);
}
.vote-count { font-size: 0.95rem; }

.suggestion-body { flex: 1; min-width: 0; }

.suggestion-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.suggestion-title-row h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0;
}

.suggestion-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.suggestion-status--open {
  background: rgba(124, 194, 65, 0.12);
  color: var(--green-dark);
}
.suggestion-status--planned {
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
}
.suggestion-status--in_development {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}
.suggestion-status--done {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}
.suggestion-status--declined {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.suggestion-version {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--green-faint);
  border: 1px solid var(--border);
  color: var(--green-dark);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}

/* Product tag: which product an idea targets. */
.suggestion-product {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.suggestion-product--kiwisonic {
  background: rgba(124, 194, 65, 0.12);
  border-color: rgba(124, 194, 65, 0.3);
  color: var(--green-dark);
}
.suggestion-product--kiwisynth {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  color: #5b21b6;
}

/* Product filter bar above the roadmap and suggestions lists. */
.suggestion-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.suggestion-filter-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.suggestion-filter-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.suggestion-filter-btn.is-active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.suggestion-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

/* Rendered Markdown inside a suggestion description. Kept compact so cards
   stay tidy while still showing structure (lists, code, light emphasis). */
.suggestion-desc > :first-child { margin-top: 0; }
.suggestion-desc > :last-child { margin-bottom: 0; }
.suggestion-desc p { margin: 0 0 8px; }
.suggestion-desc h3,
.suggestion-desc h4,
.suggestion-desc h5,
.suggestion-desc h6 {
  margin: 12px 0 6px;
  font-size: 0.95rem;
  color: var(--text);
}
.suggestion-desc ul,
.suggestion-desc ol { margin: 0 0 8px; padding-left: 1.3em; }
.suggestion-desc li { margin: 2px 0; }
.suggestion-desc a { color: var(--green-dark); }
.suggestion-desc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--green-faint);
  padding: 1px 5px;
  border-radius: 4px;
}
.suggestion-desc pre {
  background: var(--green-faint);
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 8px;
}
.suggestion-desc pre code { background: none; padding: 0; font-size: 0.82rem; }
.suggestion-desc blockquote {
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--border);
  color: var(--text-light);
}

.suggestion-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-light);
}

.suggestion-admin {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.suggestion-status-select {
  font-size: 0.82rem;
  font-family: var(--font);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.suggestion-delete-btn {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #c0392b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius);
  line-height: 1;
  transition: background 0.15s;
}
.suggestion-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 { margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.15s;
}
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(124, 194, 65, 0.15);
}

/* ── 22. Responsive ── */
@media (max-width: 900px) {
  :root { --section-pad: 56px; }

  .two-col          { grid-template-columns: 1fr; gap: 36px; }
  .two-col.reverse  { direction: ltr; }
  .comparison-grid          { grid-template-columns: 1fr; }
  .feature-highlights-grid  { grid-template-columns: repeat(2, 1fr); }
  .persona-grid             { grid-template-columns: 1fr; }
  .card-grid-3              { grid-template-columns: repeat(2, 1fr); }
  .requirements-grid        { grid-template-columns: 1fr; }
  .footer-inner             { grid-template-columns: 1fr 1fr; }

  .auth-bar-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .auth-bar-form { justify-content: center; }

  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  /* Stack order: nav, on-this-page, then article. */
  .doc-nav     { order: 1; }
  .doc-toc     { order: 2; }
  .doc-content { order: 3; }

  .doc-nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .doc-nav > summary {
    display: block;
    cursor: pointer;
    padding: 14px 20px;
    font-weight: 700;
    color: var(--green-dark);
    list-style: none;
  }
  .doc-nav > summary::-webkit-details-marker { display: none; }
  .doc-nav > summary::after { content: " ▾"; color: var(--text-muted); }
  .doc-nav[open] > summary { border-bottom: 1px solid var(--border); }
  .doc-nav[open] > summary::after { content: " ▴"; }
  .doc-nav-inner { max-height: 320px; overflow-y: auto; padding: 16px 20px; }
  .doc-nav-group:last-child { margin-bottom: 0; }

  .doc-toc { position: static; padding: 24px; background: var(--green-faint); border-radius: var(--radius); margin-bottom: 24px; }
  .doc-toc ul { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .doc-toc li a { border-left: none; padding: 4px 8px; }
  .doc-toc li.toc-sub a { padding-left: 8px; }

  .doc-prevnext { flex-direction: column; }
  .doc-prevnext a, .doc-prevnext-spacer { max-width: 100%; }
  .doc-prevnext .doc-next { text-align: left; align-items: flex-start; }
}

@media (max-width: 640px) {
  :root { --section-pad: 40px; }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .feature-highlights-grid  { grid-template-columns: 1fr; }
  .card-grid-3              { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .hero-split { flex-direction: column; gap: 24px; }
  .hero-logo { height: 88px; min-height: auto; }
  .hero-content { text-align: center; }
  .hero h1 { margin: 0 auto 20px; }
  .hero .tagline { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }

  .download-hero-card { padding: 32px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .doc-index-grid { grid-template-columns: 1fr; }

  .auth-bar-form { flex-direction: column; }
  .auth-bar-form input { width: 100%; }
  .suggestion-card { flex-direction: column; }
  .suggestion-vote { flex-direction: row; align-self: flex-start; }
  .modal-card { padding: 24px 18px; }
}
