/* ============================================================
   Lightman Streams - site.css
   Design tokens locked in reference/design_tokens.md.
   ============================================================ */

/* --- Self-hosted fonts --- */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter.ttf') format('truetype-variations'),
       url('/assets/fonts/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Vermin';
  src: url('/assets/fonts/Vermin.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans JP';
  src: url('/assets/fonts/NotoSansJP-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans JP';
  src: url('/assets/fonts/NotoSansJP-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* --- Tokens --- */

:root {
  --bg-base:     #0A1220;
  --bg-surface:  #131C2E;
  --bg-elevated: #1B2540;
  --accent:      #1FB6FF;
  --accent-hi:   #4FC8FF;
  --accent-dim:  rgba(31, 182, 255, 0.15);
  --border:      #243049;
  --text-pri:    #E8EEF7;
  --text-mut:    #8A95AA;
  --text-dim:    #5A6478;
  --exclude:     #B45A5A;
  --exclude-hi:  #D26E6E;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;
  --sp-10: 4rem;

  --content-max: 1280px;

  /* Display font: Vermin Vibes 2 Soft is the brand display font. Its glyph
     coverage is basic ASCII (U+0020-U+007D), so per-character fallback to
     Inter handles diacritics automatically. The per-surface override block
     below switches to full Inter on surfaces where the locale RELIABLY
     carries diacritics, to avoid mid-word font mixing. JP extends this
     cascade by inserting Noto Sans JP after Inter so kana/kanji render in
     Noto rather than falling through to the system UI font. */
  --font-display: 'Vermin', 'Inter', sans-serif;
  --font-display-weight: 400;
}

/* JP locale: extend both display and body cascades with Noto Sans JP so
   kana and kanji render in a proper CJK font rather than the system default.
   Inter is kept ahead of Noto for Latin characters embedded in JP text
   (e.g. "MIXXXの設定" - the MIXXX in Inter, の設定 in Noto). */
html[lang="ja"] {
  --font-display: 'Vermin', 'Inter', 'Noto Sans JP', sans-serif;
}
html[lang="ja"] body {
  font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
}

/* === Language font fallback (per-surface scoping) ============================
   Vermin Vibes 2 Soft is the display font. Its glyph coverage is basic ASCII
   only (U+0020-U+007D), so it can't render most non-English diacritics.
   The cascade `--font-display: 'Vermin', 'Inter', sans-serif` lets the browser
   fall back per-character automatically when Vermin lacks a glyph: ASCII letters
   stay Vermin, diacritics fall to Inter. That keeps strings displayable in any
   language without explicit overrides.

   The trade-off: when a heading mixes ASCII + diacritics (e.g. "Klangqualität"),
   the per-character fallback produces a visible Vermin/Inter mix mid-word. That
   looks awkward. So below, we ONLY override to full Inter on surfaces where the
   locale's copy RELIABLY carries diacritics. Surfaces whose strings are
   diacritic-free across all locales (e.g. .plan-hero__title which renders just
   "PLAN S/M/L" or "AUTO-DJ", .live-radio h3, etc.) stay in Vermin everywhere.

   Adding a new locale: build the site, run the diacritic census (see Phase 5
   notes), and add the locale to the appropriate selector groups below. Then
   delete this comment line. */

/* Group A: surfaces where PT, DE, ES, and FR ALL reliably carry diacritics.
   Override to Inter universally for those four locales. */
html[lang="pt"] :is(.legal-page__inner h1, .doc-tail__title),
html[lang="de"] :is(.legal-page__inner h1, .doc-tail__title),
html[lang="es"] :is(.legal-page__inner h1, .doc-tail__title),
html[lang="fr"] :is(.legal-page__inner h1, .doc-tail__title),
/* Group B: surfaces where PT, ES, and FR reliably carry diacritics, but DE does
   NOT (German copy on these surfaces is ASCII in practice). */
html[lang="pt"] :is(
  .section-title,
  .legal-page__inner h2,
  .plan-prose h2,
  .plan-bottom-cta__title,
  .doc-hero__title, .doc-prose h2,
  .docs-group__title, .docs-index__title
),
html[lang="es"] :is(
  .section-title,
  .legal-page__inner h2,
  .plan-prose h2,
  .plan-bottom-cta__title,
  .doc-hero__title, .doc-prose h2,
  .docs-group__title, .docs-index__title
),
html[lang="fr"] :is(
  .section-title,
  .legal-page__inner h2,
  .plan-prose h2,
  .plan-bottom-cta__title,
  .doc-hero__title, .doc-prose h2,
  .docs-group__title, .docs-index__title
) {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

/* Font-size compensation: Inter at the same px size reads visually larger than
   Vermin, so each overridden surface gets a ~85% scaled font-size to keep the
   visual rhythm consistent with the EN/DE pages that use Vermin.
   Each rule lists only the locales that override to Inter for that surface. */

/* Group A surfaces (compensated for all four locales) */
html[lang="pt"] .legal-page__inner h1,
html[lang="de"] .legal-page__inner h1,
html[lang="es"] .legal-page__inner h1,
html[lang="fr"] .legal-page__inner h1   { font-size: clamp(31px, 4.25vw, 48px); }

html[lang="pt"] .doc-tail__title,
html[lang="de"] .doc-tail__title,
html[lang="es"] .doc-tail__title,
html[lang="fr"] .doc-tail__title        { font-size: 24px; }

/* Group B surfaces (compensated for PT, ES, FR only - DE keeps Vermin sizing) */
html[lang="pt"] .section-title,
html[lang="es"] .section-title,
html[lang="fr"] .section-title          { font-size: clamp(31px, 4.25vw, 54px); }

html[lang="pt"] .legal-page__inner h2,
html[lang="es"] .legal-page__inner h2,
html[lang="fr"] .legal-page__inner h2   { font-size: 19px; }

html[lang="pt"] .plan-prose h2,
html[lang="es"] .plan-prose h2,
html[lang="fr"] .plan-prose h2          { font-size: clamp(24px, 3.40vw, 34px); }

html[lang="pt"] .plan-bottom-cta__title,
html[lang="es"] .plan-bottom-cta__title,
html[lang="fr"] .plan-bottom-cta__title { font-size: clamp(19px, 2.55vw, 26px); }

html[lang="pt"] .doc-hero__title,
html[lang="es"] .doc-hero__title,
html[lang="fr"] .doc-hero__title        { font-size: clamp(31px, 4.25vw, 48px); }

html[lang="pt"] .doc-prose h2,
html[lang="es"] .doc-prose h2,
html[lang="fr"] .doc-prose h2           { font-size: 19px; }

html[lang="pt"] .docs-group__title,
html[lang="es"] .docs-group__title,
html[lang="fr"] .docs-group__title      { font-size: 20px; }

html[lang="pt"] .docs-index__title,
html[lang="es"] .docs-index__title,
html[lang="fr"] .docs-index__title      { font-size: 22px; }

/* --- Reset / base --- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-pri);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(180deg, rgba(10,18,32,0.92) 0%, rgba(10,18,32,0.97) 100%),
    url('/assets/images/swirl_background.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(31,182,255,0.06), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(31,182,255,0.04), transparent 50%);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover, a:focus { color: var(--accent-hi); }

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

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-pri);
  line-height: 1.1;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  position: relative;
  z-index: 1;
  .container--wide {
  max-width: 1400px;
}
}

main { min-height: 60vh; }

/* Tighter section rhythm. Was 96px; now 72px. */
section {
  padding: 48px 0;
  position: relative;
}

/* --- Section headers --- */

.section-head {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: 2px;
  margin-bottom: var(--sp-4);
}

.section-lead {
  font-size: 17px;
  color: var(--text-mut);
  max-width: 640px;
  margin: 0 auto;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0 auto var(--sp-5);
  max-width: 480px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider svg {
  width: 16px;
  height: 22px;
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(31,182,255,0.6));
}

/* --- Site nav --- */

.site-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
}

.site-nav__brand {
  opacity: 1;
  visibility: visible;
  transition: opacity 250ms ease, visibility 250ms ease;
}

/* On the home page only, hide the nav wordmark at the top
   (we have the big hero wordmark instead) and fade it in on scroll. */
body.is-home .site-nav__brand {
  opacity: 0;
  visibility: hidden;
}

body.is-home.scrolled .site-nav__brand {
  opacity: 1;
  visibility: visible;
}
.site-nav__brand img { height: 32px; width: auto; }

body.scrolled .site-nav__brand {
  opacity: 1;
  visibility: visible;
}

.site-nav__links {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
  margin-left: auto;
}

.site-nav__links a {
  color: var(--text-mut);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.site-nav__links a:hover { color: var(--accent); }

/* --- Language switcher (desktop dropdown) ---
   Trigger button shows the active language code + a caret. Click opens
   a vertical menu of the other languages, anchored below the trigger.
   The mobile drawer's language section is styled separately further down
   (.drawer__lang). */

.lang-switcher {
  position: relative;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 10px 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-mut);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.lang-switcher__trigger:hover,
.lang-switcher__trigger:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.lang-switcher[data-open="true"] .lang-switcher__trigger {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.lang-switcher__trigger-code {
  font-weight: 600;
  letter-spacing: inherit;
}

.lang-switcher__caret {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.lang-switcher[data-open="true"] .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  /* Default closed state: hidden, but kept in flow with opacity/visibility
     so the caret rotation and the menu reveal feel paired. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
  z-index: 100;
}

.lang-switcher[data-open="true"] .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 0s;
}

.lang-switcher__item {
  display: block;
  padding: 6px 12px;
  border-radius: 3px;
  color: var(--text-mut);
  text-decoration: none;
  text-align: center;
  transition: color 120ms ease, background 120ms ease;
}

.lang-switcher__item:hover,
.lang-switcher__item:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}

/* --- Mobile hamburger button (shown ≤600px, hidden on desktop) --- */

.site-nav__hamburger {
  display: none; /* default; mobile breakpoint sets to inline-flex */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background 150ms ease;
}

.site-nav__hamburger:hover,
.site-nav__hamburger:focus-visible {
  background: var(--accent-dim);
  outline: none;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto;
  transition: transform 200ms ease, opacity 150ms ease;
  transform-origin: center;
}

/* Open state: morph bars into an X */
body.drawer-open .site-nav__hamburger .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.drawer-open .site-nav__hamburger .hamburger-bar:nth-child(2) {
  opacity: 0;
}
body.drawer-open .site-nav__hamburger .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Drawer backdrop --- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 32, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
  z-index: 99;
  backdrop-filter: blur(2px);
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

/* --- Drawer panel --- */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80%;
  max-width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 250ms ease-out, visibility 0s linear 250ms;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  /* subtle cyan glow at the leading edge */
  box-shadow: -1px 0 0 rgba(31, 182, 255, 0.16), -8px 0 32px rgba(0, 0, 0, 0.5);
}

body.drawer-open .drawer {
  transform: translateX(0);
  visibility: visible;
  transition: transform 250ms ease-out, visibility 0s linear 0s;
}

/* Body scroll lock when drawer is open */
body.drawer-open {
  overflow: hidden;
}

.drawer__close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-mut);
  cursor: pointer;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
}

.drawer__close:hover,
.drawer__close:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}

.drawer__close svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.drawer__nav {
  margin-top: var(--sp-3);
}

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

.drawer__links li {
  border-bottom: 1px solid var(--border);
}

.drawer__links li:last-child {
  border-bottom: none;
}

.drawer__links a {
  display: block;
  padding: var(--sp-4) 0;
  color: var(--text-pri);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 150ms ease;
}

.drawer__links a:hover,
.drawer__links a:focus-visible {
  color: var(--accent);
  outline: none;
}

.drawer__section {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.drawer__heading {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-mut);
  margin-bottom: var(--sp-3);
}

.drawer__lang {
  position: relative;
}

/* Full-width trigger, mirrors the desktop dropdown pattern but sized to the
   drawer's stacked column. Active code on the left, caret on the right. */
.drawer__lang-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-4);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-pri);
  font: inherit;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.drawer__lang-trigger:hover,
.drawer__lang-trigger:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.drawer__lang[data-open="true"] .drawer__lang-trigger {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drawer__lang-trigger-code {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.drawer__lang-caret {
  width: 11px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.drawer__lang[data-open="true"] .drawer__lang-caret {
  transform: rotate(180deg);
}

/* Collapsible menu: hidden by default, revealed inline below the trigger.
   The codes lay out as a wrapped grid so they read tidily at any count. */
.drawer__lang-menu {
  display: none;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.drawer__lang[data-open="true"] .drawer__lang-menu {
  display: flex;
}

.drawer__lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 var(--sp-3);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
  border: 1px solid var(--border);
}

.drawer__lang-code--inactive {
  color: var(--text-mut);
}

.drawer__lang-code--inactive:hover,
.drawer__lang-code--inactive:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.drawer__contact-icons {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.drawer__contact-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-mut);
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.drawer__contact-icons a:hover,
.drawer__contact-icons a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}

.drawer__contact-icons svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* --- Back-to-top floating button --- */

.back-to-top {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(10, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, background 150ms ease, color 150ms ease;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(31, 182, 255, 0.25);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--accent);
  color: var(--bg-base);
  outline: none;
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* On mobile, tuck the button slightly more out of the way */
@media (max-width: 600px) {
  .back-to-top {
    right: var(--sp-4);
    bottom: var(--sp-4);
  }
}

/* --- Hero --- Tighter top/bottom padding */

.hero {
  text-align: center;
  padding: 90px 0 40px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 100%);
  height: 400px;
  background: radial-gradient(ellipse, rgba(31,182,255,0.25), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.hero__wordmark {
  max-width: 100%;
  width: 720px;
  height: auto;
  margin: 0 auto var(--sp-5);
  filter: drop-shadow(0 0 30px rgba(31,182,255,0.3));
}

.hero__tagline {
  font-size: 18px;
  color: var(--text-mut);
  max-width: 600px;
  margin: 0 auto;
}

/* --- About section --- */

.about {
  padding: 40px 0 56px;
}

.about__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.about__inner p {
  color: var(--text-mut);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.about__inner p:last-child { margin-bottom: 0; }

.about__inner p:first-child {
  color: var(--text-pri);
  font-size: 17px;
}

/* --- Plan grid --- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(31,182,255,0.15);
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 40px rgba(31,182,255,0.2);
}

.plan-card.featured::before {
  content: 'RECOMMENDED';
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--bg-base);
  border-radius: 2px;
  z-index: 2;
}

.plan-card img {
  width: 100%;
  height: auto;
  display: block;
}

.plan-card__desc {
  padding: 18px 20px 22px;
  flex: 1;
}

.plan-card__lead {
  color: var(--text-pri);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  margin: 0 0 var(--sp-2) 0;
}

.plan-card__tail {
  color: var(--text-mut);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

/* --- Where to Buy --- */

.stores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  max-width: 900px;
  margin: var(--sp-5) auto 0;
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 40px 32px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.store-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(31,182,255,0.15);
}

.store-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.store-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--text-pri);
  margin-bottom: var(--sp-3);
}

.store-card p {
  color: var(--text-mut);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}

.store-card .visit {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: auto;
}

.store-card:hover .visit { color: var(--accent-hi); }

@media (max-width: 700px) {
  .stores { grid-template-columns: 1fr; }
}

/* --- Live Radio block (matches placeholder) --- */

.live-radio {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px;
  max-width: 640px;
  margin: var(--sp-5) auto 0;
  text-align: center;
  position: relative;
}

.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.live-pulse::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

.live-radio h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.live-radio__sub {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
}

.player-frame {
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

.player-frame iframe {
  width: 100%;
  height: 140px;
  border: 0;
  display: block;
  background: transparent;
}

/* --- Reach Us (icon row) --- */

.reach-icons {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  margin-top: var(--sp-5);
  flex-wrap: wrap;
}

.reach-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 50%;
  transition: all 0.2s ease;
  position: relative;
}

.reach-icons a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(31,182,255,0.35);
  transform: translateY(-2px);
}

.reach-icons svg {
  width: 32px;
  height: 32px;
  fill: var(--text-mut);
  transition: fill 0.2s ease;
}

.reach-icons a:hover svg { fill: var(--accent-hi); }

.reach-icons a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-mut);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.reach-icons a:hover::after { opacity: 1; }

/* --- Footer --- */

.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  margin-top: 40px;
}

.site-footer__wordmark {
  width: 220px;
  opacity: 0.45;
  margin: 0 auto var(--sp-5);
}

.footer-nav {
  margin-bottom: var(--sp-5);
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  color: var(--text-mut);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.footer-nav a:hover { color: var(--accent-hi); }

.footer-nav .sep { color: var(--text-dim); font-size: 13px; }

.site-footer p {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.cookie-notice {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: var(--sp-4);
  padding: 0 var(--sp-5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.5px;
}

.disclaimer {
  margin-top: var(--sp-4);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* --- Mobile --- */

@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-5); }
  section { padding: 36px 0; }
  .hero { padding: 48px 0 24px; }
  .hero__wordmark { width: 90%; }
  .about { padding: 24px 0 32px; }
  .about__inner p:first-child { font-size: 16px; }
  .site-nav__links { gap: var(--sp-4); }
  .site-nav__links a { font-size: 11px; letter-spacing: 1px; }
  .reach-icons { gap: var(--sp-5); }
  .live-radio { padding: 24px 16px; }
}

/* --- Legal / long-form prose pages (TOS, Privacy, future docs) --- */

.legal-page {
  padding: 56px 0 80px;
}

.legal-page__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.legal-page__inner h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 2px;
  color: var(--text-pri);
  margin-bottom: var(--sp-3);
  text-align: center;
}

.legal-page__inner h2 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.legal-page__inner h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-pri);
  letter-spacing: 0.5px;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  scroll-margin-top: 80px;
}

.legal-page__inner p {
  color: var(--text-pri);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.legal-page__inner p strong {
  color: var(--text-pri);
}

.legal-page__inner ul,
.legal-page__inner ol {
  color: var(--text-pri);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-5);
}

.legal-page__inner li {
  margin-bottom: var(--sp-2);
}

.legal-page__inner li strong {
  color: var(--accent);
}

.legal-page__inner a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(31, 182, 255, 0.4);
  text-underline-offset: 3px;
}

.legal-page__inner a:hover {
  color: var(--accent-hi);
  text-decoration-color: var(--accent-hi);
}

/* Date/metadata line right under the h1 */
.legal-page__inner h1 + p {
  text-align: center;
  color: var(--text-mut);
  font-size: 14px;
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 600px) {
  .legal-page { padding: 32px 0 56px; }
  .legal-page__inner h2 { font-size: 18px; margin-top: var(--sp-6); }
  .legal-page__inner p,
  .legal-page__inner li { font-size: 14px; }
}

/* Mobile nav: at ≤600px we swap the inline nav + lang switcher for a
   hamburger button that opens a slide-in drawer from the right. Brand
   wordmark stays visible at full size. Drawer markup is in base.njk;
   drawer styles further below. */
@media (max-width: 600px) {
  /* Hide desktop-only nav surfaces */
  .site-nav__desktop { display: none; }
  .lang-switcher { display: none; }
  /* Show hamburger button */
  .site-nav__hamburger { display: inline-flex; }
  /* Brand stays visible at its normal size */
  .site-nav .container { justify-content: space-between; }
}

@media (min-width: 601px) {
  .nav-short { display: none; }
  /* Hide mobile-only surfaces on desktop */
  .site-nav__hamburger { display: none; }
  .drawer, .drawer-backdrop { display: none; }
}

@media (max-width: 600px) {
  .plans { grid-template-columns: 1fr; gap: 32px; }
  .plan-card { max-width: 400px; margin: 0 auto; }
  .reach-icons a { width: 60px; height: 60px; }
  .reach-icons svg { width: 28px; height: 28px; }
}

/* ============================================================
   Plan detail page (Phase 2)
   Append to site.css. All tokens already declared in :root above.
   ============================================================ */

/* --- Buttons (introduced for plan-page CTAs) --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-pri);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover, .btn:focus {
  border-color: var(--accent);
  color: var(--accent-hi);
  box-shadow: 0 0 20px rgba(31,182,255,0.2);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-hi);
}

.btn-primary:hover, .btn-primary:focus {
  background: rgba(31,182,255,0.25);
  box-shadow: 0 0 30px rgba(31,182,255,0.4);
  color: var(--accent-hi);
}

.btn-bolt {
  width: 12px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* The little "View details" link inside home-page plan cards */
.plan-card__details {
  display: inline-block;
  margin-top: var(--sp-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-elevated);
  transition: all 0.2s ease;
}

.plan-card:hover .plan-card__details {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-hi);
}

/* --- Plan detail layout --- */

.plan-detail {
  padding-bottom: var(--sp-8);
}

.plan-section {
  padding: 56px 0;
}

.plan-section--prose {
  padding-top: 40px;
  padding-bottom: 40px;
}

.plan-section--cta {
  padding-top: 40px;
}

/* --- Hero --- */

.plan-hero {
  padding: 56px 0 40px;
  position: relative;
}

.plan-hero::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 100%);
  height: 360px;
  background: radial-gradient(ellipse, rgba(31,182,255,0.18), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
  z-index: -1;
}

.plan-hero__grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-8);
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.plan-hero__card {
  position: relative;
}

.plan-hero__card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.4), 0 0 60px rgba(31,182,255,0.15);
}

.plan-hero__body {
  text-align: left;
}

.plan-hero__eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.plan-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: 2px;
  color: var(--text-pri);
  margin: 0 0 var(--sp-3);
  line-height: 1;
}

.plan-hero__body .divider {
  margin: var(--sp-4) 0;
  max-width: 280px;
}

.plan-hero__body .divider::before,
.plan-hero__body .divider::after {
  flex: 1;
}

.plan-hero__lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-mut);
  margin-bottom: var(--sp-5);
  max-width: 540px;
}

.plan-hero__price {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  display: inline-block;
}

.plan-hero__price-amount {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  color: var(--text-pri);
  line-height: 1;
}

.plan-hero__price-period {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-mut);
  margin-left: 4px;
}

.plan-hero__price-note {
  font-size: 12px;
  color: var(--text-mut);
  letter-spacing: 0.5px;
  margin-top: 6px;
}

/* CTA rows */
.plan-cta-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.plan-cta-row--center {
  justify-content: center;
  margin-top: var(--sp-5);
}

/* --- Prose block (the "What is" section) --- */

.plan-prose {
  max-width: 720px;
  margin: 0 auto;
}

.plan-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 2px;
  color: var(--text-pri);
  margin: 0 0 var(--sp-5);
  text-align: center;
}

.plan-prose p {
  color: var(--text-pri);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.plan-prose p:last-child { margin-bottom: 0; }

.plan-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(31,182,255,0.4);
  text-underline-offset: 3px;
}

.plan-prose a:hover { color: var(--accent-hi); }

.plan-prose strong { color: var(--text-pri); font-weight: 600; }

/* --- Spec table --- */

.spec-table {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.spec-row:last-child { border-bottom: 0; }

.spec-row dt {
  color: var(--text-mut);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.spec-row dd {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  font-feature-settings: "tnum";
}

/* --- Feature list (Included) --- */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-5);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-pri);
  font-size: 14px;
  line-height: 1.5;
}

.feature-list__bolt {
  width: 12px;
  height: 16px;
  fill: var(--accent);
  filter: drop-shadow(0 0 4px rgba(31,182,255,0.5));
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Exclude list (Not included) --- */

.exclude-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-5);
}

.exclude-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-mut);
  font-size: 14px;
}

.exclude-list__mark {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--exclude-hi);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

/* --- Screenshot grid --- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  max-width: 980px;
  margin: 0 auto;
}

.shot {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.shot:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.shot__link { display: block; }

.shot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg-elevated);
}

/* Placeholder appearance when an <img> fails to load */
.shot img[alt]:not([src*=".png"]):not([src*=".jpg"]):not([src*=".webp"]),
.shot img:not([src]) {
  min-height: 200px;
}

.shot figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-mut);
  border-top: 1px solid var(--border);
  text-align: center;
  line-height: 1.5;
}

/* --- Bottom CTA block --- */

.plan-bottom-cta {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
}

.plan-bottom-cta::before,
.plan-bottom-cta::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent);
  opacity: 0.7;
}

.plan-bottom-cta::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.plan-bottom-cta::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

.plan-bottom-cta__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 2px;
  color: var(--text-pri);
  margin: 0 0 var(--sp-2);
}

.plan-bottom-cta__note {
  color: var(--text-mut);
  font-size: 14px;
  margin: 0;
}

.plan-bottom-cta__back {
  margin-top: var(--sp-5);
  font-size: 13px;
  color: var(--text-mut);
}

.plan-bottom-cta__back a {
  color: var(--text-mut);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.plan-bottom-cta__back a:hover { color: var(--accent-hi); }

/* --- Responsive --- */

@media (max-width: 860px) {
  .plan-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
    max-width: 480px;
  }

  .plan-hero__card {
    max-width: 280px;
    margin: 0 auto;
  }

  .plan-hero__body {
    text-align: center;
  }

  .plan-hero__body .divider {
    margin-left: auto;
    margin-right: auto;
  }

  .plan-hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .plan-cta-row {
    justify-content: center;
  }

  .feature-list,
  .exclude-list {
    grid-template-columns: 1fr;
  }

  .shot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .plan-section { padding: 36px 0; }
  .plan-hero { padding: 32px 0 24px; }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 16px;
  }

  .spec-row dd { text-align: left; }

  .plan-hero__price { width: 100%; text-align: left; }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ============================================================
   Lightbox - inline image viewer for plan screenshots
   Append to site.css (or to plan-detail.css if you kept that separate).
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: rgba(5, 10, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.18s ease, visibility 0s linear 0s;
}

.lightbox__inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
  background: var(--bg-elevated);
  cursor: default;
}

.lightbox__caption {
  color: var(--text-pri);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 720px;
  padding: 0 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-pri);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
}

.lightbox__close:hover,
.lightbox__close:focus {
  border-color: var(--accent);
  color: var(--accent-hi);
  background: var(--accent-dim);
}

/* Lock background scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

/* Mobile: smaller padding */
@media (max-width: 600px) {
  .lightbox { padding: 20px; }
  .lightbox__img { max-height: calc(100vh - 120px); }
  .lightbox__close { top: 10px; right: 10px; }
}

/* ============================================================
   DOC PAGES (Phase 3, added 2026-05-24)
   Used by:
     - src/_includes/layouts/doc.njk        (each doc page)
     - src/en/docs/index.njk                (docs landing)
   Extends the legal-page typography rhythm with doc-specific
   bits: TOC, callout blockquotes, warn aside, doc tables.
   ============================================================ */

/* --- Doc hero --- */

.doc-hero {
  padding: 56px 0 24px;
  text-align: center;
  position: relative;
}

.doc-hero::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 100%);
  height: 240px;
  background: radial-gradient(ellipse, rgba(31,182,255,0.18), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.doc-hero__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.doc-hero__eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.doc-hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 2px;
  color: var(--text-pri);
  margin-bottom: var(--sp-3);
}

.doc-hero__lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-mut);
  max-width: 640px;
  margin: 0 auto var(--sp-5);
}

.doc-meta {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-4);
}

.doc-meta__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 2px;
}

.doc-meta__bolt {
  width: 10px;
  height: 14px;
  fill: currentColor;
}

/* --- Section spacing inside doc pages --- */

.doc-section {
  padding: 24px 0 40px;
}

.doc-section--toc {
  padding-top: 0;
  padding-bottom: 24px;
}

.doc-section--prose {
  padding-top: 8px;
}

.doc-section--tail {
  padding-top: 40px;
  padding-bottom: 80px;
}

/* --- Inline TOC --- */

.doc-toc {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
}

.doc-toc__title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-mut);
  margin-bottom: var(--sp-3);
}

.doc-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}

.doc-toc__list li {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.doc-toc__list a {
  color: var(--text-pri);
  text-decoration: none;
}

.doc-toc__list a:hover {
  color: var(--accent-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .doc-toc__list { grid-template-columns: 1fr; }
}

/* --- Prose body --- */

.doc-prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-pri);
  font-size: 15px;
  line-height: 1.75;
}

.doc-prose h2 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.doc-prose h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-pri);
  letter-spacing: 0.5px;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  scroll-margin-top: 80px;
}

.doc-prose p {
  margin-bottom: var(--sp-4);
}

.doc-prose p strong,
.doc-prose li strong {
  color: var(--text-pri);
  font-weight: 600;
}

.doc-prose ul,
.doc-prose ol {
  margin: 0 0 var(--sp-4) var(--sp-5);
  padding: 0;
}

.doc-prose li {
  margin-bottom: var(--sp-2);
}

.doc-prose ul ul,
.doc-prose ol ol,
.doc-prose ul ol,
.doc-prose ol ul {
  margin-top: var(--sp-2);
  margin-bottom: 0;
}

.doc-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(31, 182, 255, 0.4);
  text-underline-offset: 3px;
}

.doc-prose a:hover {
  color: var(--accent-hi);
  text-decoration-color: var(--accent-hi);
}

.doc-prose code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--accent-hi);
  word-break: break-word;
}

/* --- Info callout (blockquotes inside doc-prose) --- */

.doc-prose blockquote {
  margin: 0 0 var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  color: var(--text-pri);
  font-size: 15px;
  line-height: 1.7;
}

.doc-prose blockquote > *:last-child {
  margin-bottom: 0;
}

.doc-prose blockquote strong {
  color: var(--accent-hi);
}

/* --- Warning callout (paired shortcode {% warn %}) --- */

.doc-warn {
  margin: var(--sp-5) auto;
  max-width: 760px;
  padding: var(--sp-4) var(--sp-5);
  background: rgba(180, 90, 90, 0.10);
  border: 1px solid var(--exclude);
  border-left: 3px solid var(--exclude-hi);
  border-radius: 2px;
  color: var(--text-pri);
  font-size: 15px;
  line-height: 1.7;
  position: relative;
}

.doc-warn::before {
  content: '!';
  position: absolute;
  top: var(--sp-4);
  left: -14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--exclude-hi);
  color: var(--bg-base);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
}

.doc-warn__title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--exclude-hi);
  margin-bottom: var(--sp-2);
}

.doc-warn__body p,
.doc-warn__body ul {
  margin-bottom: var(--sp-3);
}

.doc-warn__body > *:last-child {
  margin-bottom: 0;
}

.doc-warn__body ul {
  margin-left: var(--sp-5);
  padding: 0;
}

.doc-warn__body li {
  margin-bottom: var(--sp-2);
}

.doc-warn__body code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(210, 110, 110, 0.3);
  border-radius: 2px;
  color: var(--exclude-hi);
}

/* --- Doc tables --- */

.doc-table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--sp-5) 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.doc-table thead {
  background: var(--bg-elevated);
}

.doc-table th {
  padding: 10px 14px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-mut);
  border-bottom: 1px solid var(--border);
}

.doc-table td {
  padding: 10px 14px;
  color: var(--text-pri);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.doc-table tbody tr:last-child td {
  border-bottom: 0;
}

.doc-table td code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent-hi);
  background: transparent;
  border: 0;
  padding: 0;
  word-break: break-all;
}

/* --- Inline screenshot ({% shot %} shortcode output) --- */

.doc-shot {
  margin: var(--sp-5) auto;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.doc-shot:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.doc-shot .shot__link {
  display: block;
  cursor: zoom-in;
}

.doc-shot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg-elevated);
}

/* Placeholder appearance when a doc shot image fails to load */
.doc-shot img:not([src]),
.doc-shot img[src=""] {
  min-height: 200px;
}

.doc-shot figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-mut);
  border-top: 1px solid var(--border);
  text-align: center;
  line-height: 1.5;
}

/* --- Step badge inside doc shot captions --- */

.shot__step {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border-radius: 2px;
}

/* --- Doc tail (Still stuck?) --- */

.doc-tail {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.doc-tail__title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1.5px;
  color: var(--text-pri);
  margin-bottom: var(--sp-2);
}

.doc-tail__note {
  font-size: 14px;
  color: var(--text-mut);
  margin-bottom: var(--sp-4);
}

.doc-tail__links {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--sp-4);
  justify-content: center;
}

.doc-tail__links li {
  margin: 0;
  font-size: 14px;
}

.doc-tail__links a {
  color: var(--accent);
}

.doc-tail__links a:hover {
  color: var(--accent-hi);
}

.doc-tail__back {
  font-size: 13px;
  color: var(--text-mut);
  margin-top: var(--sp-3);
}

.doc-tail__back a {
  color: var(--text-mut);
}

.doc-tail__back a:hover {
  color: var(--accent-hi);
}

/* --- Docs landing index --- */

.docs-group {
  padding-top: 16px;
  padding-bottom: 32px;
}

.docs-group + .docs-group {
  padding-top: 0;
}

.docs-group__head {
  max-width: 880px;
  margin: 0 auto var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.docs-group__title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1.5px;
  color: var(--text-pri);
  margin: 0 0 var(--sp-2);
}

.docs-group__intro {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mut);
  margin: 0;
}

.docs-index {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 880px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--sp-5);
  justify-content: center;
}

/* Two-column docs landing: Setup guides on the left, Troubleshooting on the
   right. Each column is a single-column stack of cards, so users can scan
   either category without scrolling past the other. */
.docs-columns {
  padding-top: 16px;
  padding-bottom: 32px;
}

.docs-columns__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  max-width: 1200px;
  margin: 0 auto;
}

/* Inside the columns the docs-index becomes a vertical stack, not a grid */
.docs-index--stacked {
  display: flex;
  flex-direction: column;
  max-width: none;
  gap: var(--sp-4);
}

@media (max-width: 900px) {
  .docs-columns__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
}

.docs-index__card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.docs-index__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.docs-index__link {
  display: block;
  padding: var(--sp-5);
  color: var(--text-pri);
  text-decoration: none;
  height: 100%;
}

/* Card head: program icon + eyebrow/title text, side by side. */
.docs-index__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.docs-index__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-index__icon img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.docs-index__head-text {
  flex: 1;
  min-width: 0;
}

.docs-index__eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.docs-index__title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 1.5px;
  color: var(--text-pri);
  margin-bottom: 0;
}

.docs-index__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mut);
  margin-bottom: var(--sp-4);
}

.docs-index__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.docs-index__applies {
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.docs-index__read {
  color: var(--accent-hi);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .docs-index { grid-template-columns: 1fr; }
}

/* --- Mobile doc adjustments --- */

@media (max-width: 600px) {
  .doc-hero { padding: 32px 0 16px; }
  .doc-hero__lead { font-size: 15px; }

  .doc-section--prose { padding-top: 0; }
  .doc-section--tail { padding-bottom: 56px; }

  .doc-toc { padding: var(--sp-3) var(--sp-4); }

  .doc-prose {
    font-size: 14px;
  }
  .doc-prose h2 { font-size: 18px; margin-top: var(--sp-6); }
  .doc-prose h3 { font-size: 15px; }

  .doc-warn {
    margin-left: 0;
    margin-right: 0;
    padding: var(--sp-4);
  }
  .doc-warn::before {
    left: -10px;
    width: 22px;
    height: 22px;
    font-size: 14px;
  }

  .doc-shot {
    margin: var(--sp-4) auto;
    max-width: 100%;
  }
  .doc-shot figcaption {
    padding: 8px 12px;
    font-size: 12px;
  }

  .doc-table { font-size: 13px; }
  .doc-table th, .doc-table td { padding: 8px 10px; }

  .doc-tail { padding: var(--sp-5) var(--sp-4); }
  .doc-tail__title { font-size: 22px; }

  .docs-index__link { padding: var(--sp-4); }
  .docs-index__title { font-size: 22px; }
  .docs-index__icon { width: 52px; height: 52px; }
  .docs-index__head { gap: var(--sp-3); }

  .docs-group__title { font-size: 20px; }
}