/* ==========================================================================
   THE GERMAN ALGORITHM · LANDING PAGE & TASTE TEST WORKBENCH
   Velang Calm UI & Balanced Rich Stationery Design System
   Authority: AGENTS.md, .agents/skills/velang-calm-ui/SKILL.md
   ========================================================================== */

:root {
  /* Dark Mode (Balanced Rich) - Default. Canonical: theme-system ACCEPTANCE 2026-09-02 + Hub tokens.primitives.json */
  --bg-page: #141F23;
  --bg-surface: #1D2A2E;
  --bg-surface-elevated: #243438;
  --bg-surface-recessed: #0E171A;
  --border-main: #34474C;
  --border-subtle: #2A3A3E;
  --border-focus: #71BD88;

  --text-main: #F3F5F2;
  --text-muted: #AAB7B8;
  --text-dim: #718083;

  --brand-green: #56C97A;
  --brand-green-hover: #71BD88;
  --brand-green-dark: #3F9E5F;
  --on-accent: #0E171A;

  --accent-honey: #D6BE82;
  --accent-honey-bg: #2A261B;
  --accent-honey-border: #988047;

  --accent-sage: #A8C4A5;
  --accent-sage-bg: #1A281E;
  --accent-sage-border: #749770;

  --accent-coral: #EDB3AE;
  --accent-coral-bg: #2B1B1B;

  --shadow-card: 0 4px 0 #0E171A;
  --shadow-modal: 0 8px 0 #0E171A;
  --lip-btn-primary: 0 4px 0 #0D4726;
  --lip-btn-card: 0 3px 0 #0E171A;

  --radius-pill: 9999px;
  --radius-card: 20px;
  --radius-box: 14px;
  --radius-btn: 12px;

  --font-serif: "Lora", "Newsreader", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --container-max: 1140px;
  --preview-phone-width: 370px;
  --preview-phone-height: 490px;
  --preview-phone-shell: 12px;
  --preview-phone-radius: 44px;
  --preview-screen-radius: 34px;
  --preview-notch-width: 72px;
  --preview-notch-height: 18px;
  --preview-action-control: 48px;
  --preview-nav-control: 40px;
  --preview-phone-compact-width: 330px;
  --preview-phone-compact-height: 460px;

  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme (Studio Paper). Canonical: canvas #FFFFFD, paper #FFFEFA, action #197944. */
[data-theme="light"] {
  --bg-page: #FFFFFD;
  --bg-surface: #FFFEFA;
  --bg-surface-elevated: #F5F8F2;
  --bg-surface-recessed: #EEF1E8;
  --border-main: #D7DECE;
  --border-subtle: #E6EAE2;
  --border-focus: #197944;

  --text-main: #222326;
  --text-muted: #606262;
  --text-dim: #7E8580;

  --brand-green: #197944;
  --brand-green-hover: #13703D;
  --brand-green-dark: #105C32;
  --on-accent: #FFFFFD;

  --accent-honey: #B88E28;
  --accent-honey-bg: #FDF7E7;
  --accent-honey-border: #D6BE82;

  --accent-sage: #2C6B43;
  --accent-sage-bg: #EDF7F0;
  --accent-sage-border: #A8C4A5;

  --accent-coral: #B83B32;
  --accent-coral-bg: #FDF2F0;

  --shadow-card: 0 4px 0 #D5CFC4;
  --shadow-modal: 0 8px 0 #D5CFC4;
  --lip-btn-primary: 0 4px 0 #0D4726;
  --lip-btn-card: 0 3px 0 #D5CFC4;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
  overflow-x: hidden;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation Bar */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--dur-fast) ease-out;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-green);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 2px 0 var(--brand-green-dark);
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-name span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.site-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.site-language-switch:hover,
.site-language-switch:focus-visible {
  color: var(--text-main);
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.site-language-switch__mark {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 3px;
  border-radius: 4px;
  background: var(--bg-surface-soft);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle-btn {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-main);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--border-focus);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-green);
  color: var(--on-accent);
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  box-shadow: var(--lip-btn-primary);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.btn-primary:hover {
  background: var(--brand-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--brand-green-dark);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand-green-dark);
}

/* Same tactile material as .btn-primary, white face for the free-demo CTA.
   Explicit colors hold in both themes by request. */
.btn-primary.btn-white {
  background: #fff;
  color: #14532d;
  box-shadow: var(--lip-btn-primary);
}

.btn-primary.btn-white:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--brand-green-dark);
}

.btn-primary.btn-white:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand-green-dark);
}

.btn-primary.btn-white::after {
  content: "↗";
  margin-inline-start: 8px;
  font-size: 0.95em;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-main);
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  box-shadow: var(--lip-btn-card);
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(2px);
}

/* Hero Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.hero-grid .hero-ctas {
  justify-content: flex-start;
}

.hero-photo {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  background: var(--bg-surface);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  background: var(--bg-surface-recessed);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-pill-badge {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 54px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .highlight {
  color: var(--brand-green);
  font-style: italic;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  max-width: 840px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Learner pains */
.pains-section {
  padding: 72px 0;
}

.narrow-pains {
  max-width: 720px;
}

.pains-list {
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.pain-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.pain-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  margin: 0;
}

/* Taste Test Demo Section */
.taste-section {
  padding: 80px 0;
  background: var(--bg-surface-recessed);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-green);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Taste Test Simulator Container */
.taste-stage-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.taste-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.taste-tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}

.taste-tab-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.taste-tab-btn.active {
  background: var(--brand-green);
  color: var(--on-accent);
  border-color: var(--brand-green);
  box-shadow: 0 2px 0 var(--brand-green-dark);
}

/* Flashcard Box in Simulator: Authentic Course Workbench Lesson UI */
.phone-frame {
  max-width: 400px;
  margin: 36px auto 0;
  background: #101413;
  border-radius: 48px;
  padding: 12px;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-card);
}

.phone-notch {
  width: 110px;
  height: 24px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: #000;
  position: relative;
}

.phone-notch::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #1f2a2e;
}

.phone-screen {
  background: var(--bg-surface);
  border-radius: 38px;
  overflow: hidden;
  padding: 22px 16px 26px;
  height: min(700px, 78vh);
  display: flex;
  flex-direction: column;
}


/* Instruction lives in one consistent place: directly above the action. */






.phone-screen #tasteFlipBtn {
  min-height: 54px;
}

.phone-screen #tastePrevBtn,
.phone-screen #tasteNextBtn {
  min-height: 44px;
}

/* Authentic Anki card rendering inside the phone */
.anki-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 2px 2px 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.anki-deck {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.anki-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.anki-step {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.anki-card {
  background: var(--bg-surface-recessed);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-box);
  padding: 24px 18px;
  text-align: center;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.anki-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.anki-usage {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.anki-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-green);
  font-family: var(--font-mono);
}

.anki-prompt {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 700;
  line-height: 1.3;
}

.anki-example {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

.anki-audio {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #C7A94E;
  border-radius: 13px;
  background: #EDCF73;
  box-shadow: 0 3px 0 #B99B43;
  color: #30312C;
  font-size: 16px;
  cursor: pointer;
  margin-top: 16px;
  padding: 0;
}

[data-theme="dark"] .anki-audio {
  background: #C9A43E;
  border-color: #997A26;
  color: #241804;
  box-shadow: 0 3px 0 #7A6223;
}

.anki-audio.is-playing {
  transform: translateY(2px);
  box-shadow: none;
}

.anki-answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.anki-back {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.3;
}

.anki-back .cloze {
  font-weight: 700;
  color: #1B150A;
  background-color: #D6BE82;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #988047;
  display: inline-block;
}

[data-theme="light"] .anki-back .cloze {
  color: #5A440D;
  background-color: #FDF7E7;
  border-color: #D6BE82;
}

.anki-meaning {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 10px;
}

.anki-examplebox {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-box);
  padding: 14px 16px;
  margin-top: 14px;
}

.anki-examplebox .anki-example {
  margin-top: 0;
  color: var(--text-main);
}

.anki-examplemean {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.anki-rulebox {
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-box);
  padding: 14px 16px;
  margin-top: 14px;
}

.anki-rulelabel {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.anki-rulebox p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.anki-show {
  margin-top: 14px;
  flex: none;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--brand-green);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.anki-show[hidden] {
  display: none;
}

.anki-grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  flex: none;
}

.anki-grades[hidden] {
  display: none;
}

.anki-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 58px;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-main);
  border-radius: 12px;
  cursor: pointer;
  padding: 8px 4px;
}

.anki-grade b {
  font-size: 14px;
}

.anki-grade.rating-again b { color: #D0453E; }
.anki-grade.rating-hard b { color: var(--accent-honey); }
.anki-grade.rating-good b { color: var(--brand-green); }
.anki-grade.rating-easy b { color: #4A90D9; }

.anki-grade.rating-pressed {
  transform: translateY(2px);
}

.anki-grade i {
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Cloze Styling: Solid Honey Paper Cardstock */
.cloze {
  background: #D6BE82;
  color: #1B150A;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #988047;
  box-shadow: 0 2px 0 #0E171A;
  font-family: var(--font-sans);
  display: inline-block;
}

[data-theme="light"] .cloze {
  background: #FDF7E7;
  color: #5A440D;
  border: 1px solid #D6BE82;
  box-shadow: 0 2px 0 #D5CFC4;
}






/* Rating Buttons Bar: Tactile Solid Plates */



.rating-again {
  color: var(--accent-coral);
  border-color: #B05750;
  background: #2B1B1B;
}

[data-theme="light"] .rating-again {
  background: #FDF2F0;
  border-color: #EDB3AE;
  color: #B83B32;
}

.rating-hard {
  color: var(--accent-honey);
  border-color: #988047;
  background: #2A261B;
}

[data-theme="light"] .rating-hard {
  background: #FDF7E7;
  border-color: #D6BE82;
  color: #B88E28;
}

.rating-good {
  color: var(--brand-green);
  border-color: #749770;
  background: #1A281E;
}

[data-theme="light"] .rating-good {
  background: #EDF7F0;
  border-color: #A8C4A5;
  color: #2C6B43;
}

.rating-easy {
  color: #71BD88;
  border-color: #4E9463;
  background: #152A1C;
}

[data-theme="light"] .rating-easy {
  background: #E8F5E9;
  border-color: #81C784;
  color: #2E7D32;
}



/* Controls Bar */

.taste-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* Paywall Teaser Banner */
.taste-paywall-teaser {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
}

.teaser-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.teaser-text small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* The 3 Pillars Section */
.pillars-section {
  padding: 80px 0;
}

.pillars-rail {
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.rail-row {
  display: grid;
  grid-template-columns: 88px 180px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}

.rail-thumb {
  margin: 0;
  border-radius: var(--radius-box);
  overflow: hidden;
  border: 1px solid var(--border-main);
  aspect-ratio: 4 / 3;
  background: var(--bg-surface);
}

.rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-thumb.is-missing {
  display: none;
}

.hero-photo.is-missing {
  display: none;
}

.hero-grid:has(.hero-photo.is-missing) {
  grid-template-columns: 1fr;
}

.rail-row:has(.rail-thumb.is-missing) {
  grid-template-columns: 88px 1fr;
}

.rail-num {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 800;
  color: var(--brand-green);
  line-height: 1;
}

.rail-body {
  min-width: 0;
}

.pillar-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pillar-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.pillar-features {
  list-style: none;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.pillar-features li {
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-features li::before {
  content: "✓";
  color: var(--brand-green);
  font-weight: 800;
}

/* Comparison Table */
.comparison-section {
  padding: 80px 0;
  background: var(--bg-surface-recessed);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Comparison verdict list */
.compare-list {
  margin-top: 36px;
  border-top: 1px solid var(--border-subtle);
}

.compare-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-feature {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.compare-us {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.compare-us .check-icon {
  color: var(--brand-green);
  font-weight: 800;
}

.compare-them {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

/* Pricing & Paywall Section */
.pricing-section {
  padding: 90px 0;
  text-align: center;
}

.pricing-card-wrapper {
  max-width: 680px;
  margin: 40px auto 0;
}

.pricing-card {
  background: var(--bg-surface);
  border: 2px solid var(--brand-green);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 48px 40px;
  position: relative;
  text-align: left;
}

.pricing-badge-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-green);
  color: var(--on-accent);
  padding: 4px 18px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  box-shadow: 0 2px 0 var(--brand-green-dark);
}

.pricing-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.pricing-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 0 8px;
}

.price-val {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  color: var(--brand-green);
}

.price-currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.price-sub {
  font-size: 13.5px;
  color: var(--text-muted);
}

.pricing-features-list {
  list-style: none;
  margin-bottom: 36px;
}

.pricing-features-list li {
  font-size: 15.5px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-features-list li:last-child {
  border-bottom: none;
}

.check-icon {
  color: var(--brand-green);
  font-weight: 800;
}

.payment-rails-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.rail-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.rail-badge svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.exam-marks {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.rail-logo {
  height: 18px;
  width: auto;
  display: block;
}

/* SlickPay ships its mark on a white tile; keep the tile, don't recolor it. */
.rail-logo--card {
  background: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  height: 20px;
}

.pricing-pain-close {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Free Demo Download Card */
.demo-line {
  margin-top: 28px;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-muted);
}

.demo-line a {
  font-weight: 700;
  color: var(--brand-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tutorial Section */
.tutorial-section {
  padding: 80px 0;
  background: var(--bg-surface-recessed);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.platform-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.platform-tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--lip-btn-card);
  transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}

.platform-tab-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.platform-tab-btn.active {
  background: var(--brand-green);
  color: var(--on-accent);
  border-color: var(--brand-green);
  box-shadow: 0 3px 0 var(--brand-green-dark);
}

.tutorial-steps-grid {
  max-width: 680px;
  margin: 0 auto;
}

.best-use {
  max-width: 680px;
  margin: 20px auto 0;
  text-align: center;
}

.best-use p {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.tutorial-step-card {
  position: relative;
  padding: 0 0 28px 52px;
  display: block;
}

.tutorial-step-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.tutorial-step-card:last-child {
  padding-bottom: 0;
}

.tutorial-step-card:last-child::before {
  display: none;
}

.step-badge {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--brand-green);
  color: var(--brand-green);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.step-action-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-green);
  margin-bottom: 10px;
}

.step-tip {
  background: var(--bg-surface-recessed);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.step-visual {
  margin: 14px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-main);
  background: var(--bg-surface);
  max-width: 100%;
}

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

.step-visual figcaption {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 12px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

/* FAQ Accordion */
.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 760px;
  margin: 40px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.faq-item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  padding: 18px 4px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
}

.faq-icon {
  font-size: 18px;
  transition: transform var(--dur-med) var(--ease-out);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}

.faq-answer > div,
.faq-answer > p,
.faq-answer > * {
  overflow: hidden;
  min-height: 0;
}

.faq-clip {
  overflow: hidden;
  min-height: 0;
}

.faq-answer p {
  margin: 0;
}

.faq-answer-inner {
  padding: 0 4px 20px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

/* Footer */
.site-footer {
  background: var(--bg-surface-recessed);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 13, 0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.is-active {
  display: flex;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  padding: 36px 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 22px;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Form Styles */
.form-error {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--accent-coral);
  background: var(--accent-coral-bg);
  border: 1px solid var(--border-main);
  border-radius: 8px;
  padding: 10px 14px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  background: var(--bg-surface-recessed);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--brand-green);
}

/* Payment Selector inside Modal */
.payment-methods-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.payment-method-btn {
  padding: 10px 8px;
  border-radius: var(--radius-btn);
  background: var(--bg-surface-recessed);
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.payment-method-btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.payment-method-btn img {
  height: 14px;
  width: auto;
  flex: none;
}

.payment-method-btn.active {
  border-color: var(--brand-green);
  background: #182B21;
  color: var(--brand-green);
}

[data-theme="light"] .payment-method-btn.active {
  background: #EDF7F0;
}

/* RIP box */
.rip-box {
  background: var(--bg-surface-recessed);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-box);
  padding: 16px;
  margin-bottom: 20px;
}

.rip-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 6px 0;
  color: var(--brand-green);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Motion system: functional micro-motion only. Nothing moves until the user
   acts. transform/opacity exclusively; see reduced-motion guard below. */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.modal-overlay.is-active .modal-card {
  animation: cardIn var(--dur-med) var(--ease-out);
}

.projector-body:not([hidden]) {
  animation: rise var(--dur-med) var(--ease-out);
}

.anki-answer:not([hidden]) {
  animation: rise var(--dur-med) var(--ease-out);
}

.anki-grades:not([hidden]) .anki-grade {
  animation: rise var(--dur-med) var(--ease-out) both;
}

.anki-grades:not([hidden]) .anki-grade:nth-child(2) { animation-delay: 40ms; }
.anki-grades:not([hidden]) .anki-grade:nth-child(3) { animation-delay: 80ms; }
.anki-grades:not([hidden]) .anki-grade:nth-child(4) { animation-delay: 120ms; }

#verifyPanel:not([hidden]) p {
  animation: softPulse 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .rail-row {
    grid-template-columns: 56px 1fr;
    gap: 16px;
  }
  .rail-num {
    font-size: 30px;
  }
  .rail-thumb {
    grid-column: 1 / -1;
    order: -1;
    max-height: 220px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-grid .hero-ctas {
    justify-content: center;
  }
  .hero-photo.is-missing {
    min-height: 220px;
  }
  .hero-title {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 32px;
  }
  .pricing-card {
    padding: 32px 20px;
  }
  .modal-card {
    padding: 28px 18px;
  }
}

/* Founder story */
.story-section {
  padding: 72px 0;
}

.narrow-story {
  max-width: 680px;
}

.story-text {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.65;
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.story-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
}

.story-stats span {
  font-size: 13px;
  color: var(--text-muted);
}

/* Image slots: evidence */
.evidence-fig {
  margin: 28px auto 0;
  max-width: 560px;
  border-radius: var(--radius-box);
  overflow: hidden;
  border: 1px solid var(--border-main);
  background: var(--bg-surface);
}

.evidence-fig img {
  width: 100%;
  display: block;
}

.evidence-fig figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

/* A forged-looking result slip is worse than no photo: the evidence frame
   stays hidden until the owner drops in the real redacted Goethe B1 proof
   (assets/img/goethe-b1-proof.png). The figure auto-appears once the file
   exists, via the onerror/is-missing handler. */
.evidence-fig.is-missing {
  display: none;
}

/* ================= Mobile optimization =================
   Primary audience buys and studies on phones.
   Targets: 360px phones first, 320px small phones hold up. */

body {
  overflow-x: clip;
}

/* Tablet and below: calm nav, tighter sections */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-container {
    height: 64px;
  }
  .brand-name {
    font-size: 15px;
  }
  .site-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.site-language-switch:hover,
.site-language-switch:focus-visible {
  color: var(--text-main);
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.site-language-switch__mark {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 3px;
  border-radius: 4px;
  background: var(--bg-surface-soft);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  line-height: 1;
}

.nav-actions {
    gap: 8px;
  }
  .nav-actions .btn-primary {
    padding: 9px 14px;
    font-size: 13px;
  }
  .hero-section {
    padding: 48px 0 40px;
  }
  .taste-section,
  .pillars-section,
  .comparison-section,
  .tutorial-section,
  .pricing-section,
  .faq-section,
  .story-section,
  .pains-section {
    padding: 56px 0;
  }
  .section-title {
    font-size: 30px;
  }
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }
}

/* Phones */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .taste-section,
  .pillars-section,
  .comparison-section,
  .tutorial-section,
  .pricing-section,
  .faq-section,
  .story-section,
  .pains-section {
    padding: 44px 0;
  }
  .section-header {
    margin-bottom: 28px;
  }
  .hero-title {
    font-size: 30px;
  }
  .hero-subtitle {
    font-size: 17px;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    width: 100%;
  }
  .hero-stats-row {
    gap: 20px 24px;
  }
  .hero-stats-row .stat-item:nth-child(2),
  .hero-stats-row .stat-item:nth-child(4) {
    display: none;
  }
  .stat-num {
    font-size: 22px;
  }
  .pillar-card {
    padding: 28px 20px;
  }
  #themeToggleLabel {
    display: none;
  }
  .theme-toggle-btn {
    padding: 7px 10px;
  }
  .taste-paywall-teaser {
    flex-direction: column;
    text-align: center;
  }
  .tl-row {
    grid-template-columns: 72px 1fr;
  }
  .tl-date {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .story-stats strong {
    font-size: 20px;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .pain-name {
    font-size: 19px;
  }
  .price-val {
    font-size: 40px;
  }
  .rip-val {
    font-size: 14px;
    word-break: break-all;
  }
  .faq-question {
    font-size: 15px;
    padding: 18px;
  }
}

/* Touch comfort on coarse pointers */
@media (pointer: coarse) {
  .btn-primary,
  .btn-secondary,
  .platform-tab-btn,
  .taste-tab-btn,
  button {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Sticky mobile buy bar */
.buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-surface);
  border-top: 1px solid var(--border-main);
}

.buy-bar.is-on {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.buy-bar-info strong {
  display: block;
  font-size: 14px;
}

.buy-bar-info span {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

@media (max-width: 860px) {
  .taste-tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: thin;
  }

  .site-footer {
    padding-bottom: 96px;
  }
}

/* Levels + projector */
.levels-section {
  padding: 80px 0;
}

.levels-list {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.level-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.level-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--bg-surface);
  background: var(--brand-green);
  border-radius: 8px;
  padding: 5px 10px;
  flex: none;
}

.level-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.level-body strong {
  font-size: 15px;
}

.level-body span {
  font-size: 13.5px;
  color: var(--text-muted);
}

.level-cards {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

.projector {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.projector-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  color: inherit;
  font-size: 19px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
  text-align: start;
}

.projector-body {
  margin-top: 18px;
}

.projector-body[hidden] {
  display: none;
}

.pace-answer {
  margin: 4px 0 0;
}

.pace-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.pace-date {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-green);
  margin: 6px 0 2px;
  line-height: 1.1;
}

.pace-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.projector-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 18px;
}

.projector-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.projector-field input[type="range"] {
  width: 100%;
  accent-color: var(--brand-green);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-main);
  background: var(--bg-surface-recessed);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}

.chip[aria-pressed="true"] {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
}

.projector-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0 0;
}

.target-language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.target-language__flag,
[data-target-language-flag],
[data-target-language-flag] img,
.target-language img {
  width: 20px !important;
  height: 14px !important;
  max-width: 20px !important;
  max-height: 14px !important;
  display: inline-block !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

@media (max-width: 860px) {
  .nav-actions [data-open-checkout] { display: none; }
  .level-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .nav-actions [data-open-checkout] { display: none; }
}

/* ==========================================================================
   Interactive Study Plan Setter & Onboarding Calculator (Velang Calm UI)
   ========================================================================== */
.plan-setter-section {
  padding: 72px 0;
  background: var(--bg-main);
  position: relative;
}

.plan-card {
  max-width: 660px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.plan-group {
  margin-bottom: 22px;
}

.plan-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 9px;
}

.plan-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-pill {
  appearance: none;
  border: 1px solid var(--border-main);
  background: var(--bg-surface-recessed);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plan-pill:hover {
  border-color: var(--text-muted);
  color: var(--text-bright);
}

.plan-pill.is-selected {
  background: var(--color-brand-primary, #197944);
  border-color: var(--color-brand-primary, #197944);
  color: #ffffff;
  font-weight: 600;
}

.plan-custom-date-wrap {
  display: none;
  margin-top: 10px;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-custom-date-wrap.is-active {
  display: flex;
}

.plan-custom-date-wrap span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.plan-date-input {
  appearance: none;
  background: var(--bg-surface-recessed);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.plan-date-input:focus {
  border-color: var(--color-brand-primary, #197944);
}

/* Roadmap Stationery Card */
.plan-roadmap-card {
  background: #FFFEFA;
  border: 1px solid #D7DECE;
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 28px;
  color: #222326;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.roadmap-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #197944;
  margin-bottom: 6px;
}

.roadmap-headline {
  font-size: 18px;
  font-weight: 700;
  color: #222326;
  margin: 0 0 4px;
  line-height: 1.35;
}

.roadmap-headline span.highlight {
  color: #197944;
}

.roadmap-days-note {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 12px;
}

.roadmap-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 18px;
}

.roadmap-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F4F7F2;
  border: 1px solid #E2E9DC;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #222326;
  font-weight: 500;
}

.roadmap-stat-pill strong {
  color: #197944;
  font-weight: 700;
}

/* Milestones Track */
.milestones-track {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  margin: 16px 0 20px;
}

.milestone-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.milestone-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CBD5E1;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.milestone-item.is-target .milestone-dot {
  background: #197944;
  box-shadow: 0 0 0 3px rgba(25, 121, 68, 0.2);
  transform: scale(1.15);
}

.milestone-lvl {
  font-size: 12px;
  font-weight: 700;
  color: #222326;
}

.milestone-date {
  font-size: 11px;
  color: #4B5563;
  margin-top: 2px;
}

.milestone-days {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 1px;
}

.plan-pace-warning {
  font-size: 12px;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

/* Actions */
.roadmap-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-plan-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #197944;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 2px 8px rgba(25, 121, 68, 0.25);
}

.btn-plan-download:hover {
  background: #136035;
  color: #ffffff;
}

.plan-alt-presets {
  font-size: 12px;
  color: #4B5563;
  text-align: center;
}

.plan-alt-presets a {
  color: #197944;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plan-cta-footer {
  margin-top: 20px;
  text-align: center;
}

.plan-cta-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.plan-cta-link:hover {
  color: var(--color-brand-primary, #197944);
}

@media (max-width: 640px) {
  .plan-card {
    padding: 24px 18px;
    border-radius: 12px;
  }
  .plan-roadmap-card {
    padding: 18px 16px;
  }
  .plan-pills {
    gap: 6px;
  }
  .plan-pill {
    padding: 7px 11px;
    font-size: 12.5px;
  }
  .milestones-track {
    gap: 2px;
  }
  .milestone-lvl {
    font-size: 11px;
  }
  .milestone-date {
    font-size: 10px;
  }
  .milestone-days {
    font-size: 9.5px;
  }
}


/* Compact language chooser and demo handoff */
.demo-download-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-green, #55cb76);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
.demo-language-modal { z-index: 120; }
.demo-language-card { max-width: 420px; }
.demo-language-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.demo-language-actions button { min-height: 46px; }
.target-language { gap: 8px; }
.target-language__flag { flex: 0 0 auto; }
@media (max-width: 560px) {
  .demo-language-actions { grid-template-columns: 1fr; }
}

/* ── Demo Setup Modal ──────────────────────────────────────────────── */
.demo-setup-card { max-width: 480px; }
.demo-setup-card [hidden] { display: none !important; }

/* Step dots */
.demo-step-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-main);
  transition: background 0.2s, transform 0.2s;
}
.demo-dot.is-active {
  background: var(--brand-green);
  transform: scale(1.4);
}

/* Step label */
.demo-step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Level tiles — step 1 (3 tiles) */
.demo-level-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}
.demo-level-grid--4 {
  grid-template-columns: 1fr 1fr;
}
.demo-level-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border-main);
  border-radius: 10px;
  background: var(--bg-surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.demo-level-tile:hover {
  border-color: var(--brand-green);
  background: var(--bg-surface-recessed);
}
.demo-level-badge {
  font-family: var(--font-mono, monospace);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}
.demo-level-desc {
  font-size: 12px;
  color: var(--text-muted);
}
.demo-level-tile--featured {
  border-color: var(--brand-green);
}
.demo-level-tile--featured .demo-level-badge {
  color: var(--brand-green);
}
.demo-level-tile--featured .demo-level-desc {
  color: var(--brand-green);
  font-weight: 600;
}

/* Time tiles — 2×2 grid */
.demo-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.demo-time-tile {
  padding: 16px 12px;
  border: 1px solid var(--border-main);
  border-radius: 10px;
  background: var(--bg-surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.demo-time-tile:hover {
  border-color: var(--brand-green);
  background: var(--bg-surface-recessed);
}

/* Result screen */
.demo-result-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 20px;
}
.demo-stat-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
  padding: 16px 0;
  margin-bottom: 20px;
}
.demo-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.demo-stat strong {
  font-family: var(--font-mono, monospace);
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-green);
  line-height: 1;
}
.demo-stat span {
  font-size: 11px;
  color: var(--text-muted);
}
.demo-stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border-main);
  flex-shrink: 0;
}
.demo-primary-download {
  width: 100%;
  margin-bottom: 16px;
}
.demo-secondary-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-main);
}
.demo-action-link {
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.demo-action-link:hover { color: var(--text-main); }
.demo-copy-status {
  font-size: 12px;
  color: var(--brand-green);
  width: 100%;
  margin: 0;
}
.demo-tutorial-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding-top: 14px;
  transition: color 0.15s;
}
.demo-tutorial-link:hover { color: var(--text-main); }


/* Progressive planner overrides */
.progressive-planner{padding:clamp(28px,5vw,44px)}
.planner-choice{background:var(--bg-surface-recessed);border-radius:10px;box-shadow:none}
.planner-stat-row{border-block:1px solid var(--border-main);padding:18px 0;gap:24px}
.planner-stat-row>div{padding:0;border:0;background:transparent}
.planner-stat-row strong{font-family:var(--font-mono,monospace);font-size:24px}
.planner-actions .btn-secondary{background:transparent}

