/* ==========================================================================
   Raahaao — shared design system
   Aesthetic lane: amber wayfinding signage on asphalt-dark.
   Dark is the default theme; light is daylight. Tokens flip via
   [data-theme] on <html>; OS preference honored when no choice stored.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — dark (default)
   -------------------------------------------------------------------------- */
:root {
  --bg: #171008;
  --bg-raised: #211809;
  --surface: #261d0d;
  --surface-2: #2e2412;
  --border: #3a2d15;
  --border-strong: #4d3c1d;
  --text: #f2ead9;
  --muted: #b9ab8f;
  --heading: #ffffff;
  --accent: #f6a11e;
  --accent-hover: #ffb638;
  --accent-pressed: #dd8d10;
  --on-accent: #1a1206;
  --link: #f6a11e;
  --focus: #f6a11e;
  --motif: #f6a11e;          /* decorative strokes; must hit 3:1 on --bg   */
  --motif-faint: #3a2d15;    /* echo strokes behind the motif              */
  --ok: #9fdcb4;
  --err: #ffb4a8;
  --shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.55);

  /* Noto Sans Gurmukhi sits behind Space Grotesk so stray Gurmukhi glyphs
     (quiz options, inline samples) always use the loaded webfont */
  --font-latin: "Space Grotesk", "Noto Sans Gurmukhi", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  --font-gurmukhi: "Noto Sans Gurmukhi", "Space Grotesk", system-ui, sans-serif;
  --font-devanagari: "Noto Sans Devanagari", "Space Grotesk", system-ui, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-scale: dropdown < sticky header < overlay nav < toast */
  --z-dropdown: 10;
  --z-header: 20;
  --z-nav: 30;
  --z-toast: 40;

  color-scheme: dark;
}

/* Light tokens — KEEP IN SYNC with the prefers-color-scheme block below */
:root[data-theme="light"] {
  --bg: #faf4ea;
  --bg-raised: #f3ead9;
  --surface: #fffdf9;
  --surface-2: #f6eedd;
  --border: #e5d7bc;
  --border-strong: #cdb98c;
  --text: #1a1206;
  --muted: #655741;
  --heading: #1a1206;
  --link: #8d5205;
  --focus: #8d5205;
  --motif: #c47810;
  --motif-faint: #ecdec4;
  --ok: #15672e;
  --err: #a52216;
  --shadow: 0 24px 60px -40px rgba(141, 82, 5, 0.35);
  color-scheme: light;
}

/* No stored choice + OS prefers light → light. KEEP IN SYNC with block above */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #faf4ea;
    --bg-raised: #f3ead9;
    --surface: #fffdf9;
    --surface-2: #f6eedd;
    --border: #e5d7bc;
    --border-strong: #cdb98c;
    --text: #1a1206;
    --muted: #655741;
    --heading: #1a1206;
    --link: #8d5205;
    --focus: #8d5205;
    --motif: #c47810;
    --motif-faint: #ecdec4;
    --ok: #15672e;
    --err: #a52216;
    --shadow: 0 24px 60px -40px rgba(141, 82, 5, 0.35);
    color-scheme: light;
  }
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-latin);
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background-color 200ms ease, color 200ms ease;
}

:lang(pa) body,
body:lang(pa) {
  font-family: var(--font-gurmukhi);
  line-height: 1.8;
}

/* Gurmukhi fragments inside EN/IT pages */
.gurmukhi,
[lang="pa"] {
  font-family: var(--font-gurmukhi);
  line-height: 1.8;
}

/* Devanagari fragments inside EN/PA/IT pages — no dedicated hi/ site mirror yet,
   so this only ever fires on inline Hindi examples (e.g. courses.html). */
.devanagari,
[lang="hi"] {
  font-family: var(--font-devanagari);
  line-height: 1.8;
}

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

h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

:lang(pa) h1, :lang(pa) h2, :lang(pa) h3, :lang(pa) h4 { line-height: 1.35; }

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.01em; }
h4 { font-size: 1.1rem; font-weight: 500; }

p { margin: 0 0 1em; max-width: 70ch; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

strong { color: var(--heading); font-weight: 600; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.band { background: var(--bg-raised); }
.band--line {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Amber drench band — signage moment. Fixed colors in BOTH themes. */
.band--amber {
  background: var(--accent);
  color: var(--on-accent);
}
.band--amber h2, .band--amber h3, .band--amber strong { color: var(--on-accent); }
.band--amber .lead, .band--amber p { color: rgba(26, 18, 6, 0.82); }
.band--amber a:not(.btn) { color: var(--on-accent); text-decoration: underline; }

/* Asymmetric split — the default section shape (not a card grid) */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 820px) {
  .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--rev > :first-child { order: 2; }
  .split--rev > :last-child { order: 1; }
  .split--even { grid-template-columns: 1fr 1fr; }
  /* narrow lede column left, wide content right (no order swap) */
  .split--lede { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

.sticky-col { position: sticky; top: 96px; }

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; display: block; }
.wordmark {
  font-family: var(--font-latin);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--heading);
}

/* Small status pill, next to the wordmark (e.g. "Beta"). Quiet by design —
   bordered, muted text, no accent fill — this is a status note, not a CTA. */
.pill {
  display: inline-block;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  align-items: center;
}
.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}
.site-nav a:hover { color: var(--link); text-decoration: none; }
/* :not(.btn) matters — the Contact item is an amber filled button, and giving
   it the amber current-page colour makes the label vanish into its own
   background. The button already reads as current by being filled. */
.site-nav a[aria-current="page"]:not(.btn) {
  color: var(--link);
  border-bottom: 2px solid var(--accent);
}

.nav-cta { margin-left: 0.5rem; }

/* Sign-in sits between the content nav and the Contact button, so a hairline
   marks where "pages about Raahaao" ends and "your account" begins. Without it
   the link reads as one more page. */
.nav-login {
  position: relative;
  margin-inline-start: 0.4rem;
  padding-inline-start: 1rem;
}
.nav-login::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 15px;
  background: var(--border-strong);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.75rem;
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.3rem;
}
.lang-switch a,
.lang-switch span[aria-current] {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-weight: 500;
}
.lang-switch a:hover { color: var(--link); text-decoration: none; }
.lang-switch span[aria-current] {
  background: var(--accent);
  color: var(--on-accent);
}

/* Currency picker — store pages. Same segmented shape as the language switch,
   so the two read as siblings rather than as two different ideas. */
.currency-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.currency-row > span {
  font-size: 0.8125rem;
  color: var(--muted);
}
.currency-pick {
  display: inline-flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px;
}
.currency-pick button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.3125rem 0.6875rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.currency-pick button:hover { color: var(--text); }
.currency-pick button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.currency-pick select {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  max-width: 100%;
}
.currency-pick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.currency-pick option { background: var(--surface); color: var(--text); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--link); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Show the icon of the mode you'd switch TO.
   Dark (default): show sun. KEEP the two selector groups in sync. */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}
/* Toggle is a JS control — hidden until site.js flags the html element */
html:not(.js) .theme-toggle { display: none; }

/* Mobile nav: with JS off the nav simply stacks (always visible).
   With JS on, it collapses behind the hamburger below 1200px. */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 1199px) {
  .site-header .wrap { flex-wrap: wrap; padding-block: 0.6rem; }
  .site-nav { flex-basis: 100%; margin-left: 0; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding-block: 0.5rem; }
  .site-nav li { width: 100%; margin: 0; }
  .site-nav a { display: block; padding: 0.65rem 0.25rem; font-size: 1.05rem; }
  .site-nav a[aria-current="page"]:not(.btn) { border-bottom: none; }

  /* Stacked drawer: the vertical hairline would sit beside a full-width row
     and read as an accident. */
  .nav-login { margin-inline-start: 0; padding-inline-start: 0.25rem; }
  .nav-login::before { display: none; }
  .header-tools { margin-left: auto; }

  html.js .nav-toggle { display: inline-flex; }
  html.js .site-nav { display: none; }
  html.js .site-nav.is-open { display: block; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease,
              color 150ms ease, transform 150ms var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--primary:active { background: var(--accent-pressed); }

/* A product that is priced but not for sale yet. Deliberately not a link: there is nothing to
   click through to, and an amber button that does nothing reads as a broken buy button. */
.btn--soon {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  cursor: default;
}


.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--link); }

/* On the amber band, primary flips to ink */
.band--amber .btn--primary { background: var(--on-accent); color: var(--accent); }
.band--amber .btn--primary:hover { background: #2c2010; }
.band--amber .btn--ghost { border-color: rgba(26, 18, 6, 0.4); color: var(--on-accent); }
.band--amber .btn--ghost:hover { border-color: var(--on-accent); }

.btn--lg { padding: 1rem 2rem; font-size: 1.08rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.aside-link { font-weight: 500; }

/* --------------------------------------------------------------------------
   6. Hero + path motif
   -------------------------------------------------------------------------- */
.hero { padding-block: clamp(4.5rem, 11vw, 9rem) clamp(4rem, 9vw, 7rem); position: relative; overflow: clip; }

.hero .wrap {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
@media (min-width: 880px) {
  .hero .wrap { grid-template-columns: minmax(0, 13fr) minmax(0, 7fr); }
}

.hero h1 { margin-bottom: 0.4em; }
.hero .lead { margin-bottom: 1.8em; }

/* The stepped-path art: decorative, stroke-drawn, themed via --motif */
.path-art { display: block; width: 100%; }
.path-art .p-main {
  stroke: var(--motif);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.path-art .p-echo {
  stroke: var(--motif-faint);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.path-art .p-dot { fill: var(--motif); }

/* Small inline step-glyph used as list markers / section punctuation */
.step-glyph {
  width: 22px;
  height: 22px;
  color: var(--motif);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   7. Pillar ascent (homepage) — the one deliberate numbered sequence
   -------------------------------------------------------------------------- */
.ascent { list-style: none; margin: 0; padding: 0; }
.ascent li {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem);
  margin: 0;
}
.ascent li + li { border-top: 1px solid var(--border); }
.ascent .step-no {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--motif);
  line-height: 1;
  padding-top: 0.2rem;
}
.ascent h3 { margin-bottom: 0.3em; font-size: 1.45rem; font-weight: 700; }
.ascent p { margin-bottom: 0.6em; color: var(--muted); }
/* Staggered ascent on wide screens — each step shifts right, climbing */
@media (min-width: 880px) {
  .ascent li:nth-child(2) { padding-left: clamp(0px, 6vw, 72px); }
  .ascent li:nth-child(3) { padding-left: clamp(0px, 12vw, 144px); }
  .ascent li:nth-child(4) { padding-left: clamp(0px, 18vw, 216px); }
}

/* Reversed ascent (services.html Process section) — the LAST step should read
   as having arrived, not the first, so the indent shrinks toward zero instead
   of growing. Scoped modifier: .ascent's other use (homepage pillars) is
   unaffected. */
@media (min-width: 880px) {
  .ascent--reverse li:nth-child(1) { padding-left: clamp(0px, 18vw, 216px); }
  .ascent--reverse li:nth-child(2) { padding-left: clamp(0px, 12vw, 144px); }
  .ascent--reverse li:nth-child(3) { padding-left: clamp(0px, 6vw, 72px); }
  .ascent--reverse li:nth-child(4) { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   8. Workflow diagram (TMS) — nodes on the stepped path
   -------------------------------------------------------------------------- */
.diagram { margin-block: clamp(1.5rem, 4vw, 2.5rem); }
.diagram svg { display: block; width: 100%; }
/* Wide diagrams scroll inside their own container on small screens */
.diagram--scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.diagram--scroll svg { min-width: 640px; }
.diagram .d-route {
  stroke: var(--motif);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.diagram .d-node {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.diagram .d-node--accent { fill: var(--accent); stroke: none; }
.diagram .d-label {
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  fill: var(--heading);
}
.diagram .d-sub { font-size: 11px; font-weight: 400; fill: var(--muted); }
.diagram .d-label--on-accent { fill: var(--on-accent); }

.diagram-caption { color: var(--muted); font-size: 0.9rem; max-width: 60ch; }

/* Feature rows: ruled list, two columns on wide (not identical cards) */
.feature-cols {
  columns: 1;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 720px) { .feature-cols { columns: 2; } }
.feature-cols > div {
  break-inside: avoid;
  padding-block: 1.1rem;
  border-top: 1px solid var(--border);
}
.feature-cols h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.25em; }
.feature-cols p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* Checklist with step glyphs */
.check-list { list-style: none; padding: 0; }
.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding-block: 0.45rem;
}
.check-list svg { margin-top: 0.25rem; }

/* --------------------------------------------------------------------------
   9. Quiz UI
   -------------------------------------------------------------------------- */
.quiz {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 720px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.quiz-progress .qp-step {
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--motif-faint);
}
.quiz-progress .qp-step.is-done { background: var(--accent); }
.quiz-progress .qp-text {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.quiz fieldset { border: none; margin: 0; padding: 0; }
.quiz legend {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.4;
  margin-bottom: 1.1rem;
  padding: 0;
}

.quiz-option { display: block; margin-bottom: 0.6rem; }
.quiz-option label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
  font-size: 1.05rem;
}
.quiz-option label:hover { border-color: var(--border-strong); background: var(--surface-2); }
.quiz-option input[type="radio"] {
  accent-color: var(--accent);
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.quiz-option input[type="radio"]:checked + span { color: var(--heading); font-weight: 600; }
.quiz-option:has(input:checked) label {
  border-color: var(--accent);
  background: var(--surface-2);
}

.quiz-controls {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
  align-items: center;
}
.quiz-hint { color: var(--err); font-size: 0.9rem; margin: 0.6rem 0 0; }

.quiz-result h3 { font-size: 1.6rem; margin-bottom: 0.2em; }
.quiz-result .score-line { color: var(--muted); margin-bottom: 1em; }
.quiz-result .level {
  color: var(--link);
  font-weight: 700;
}

/* Static fallback block inside the mount (visible when JS is off) */
.quiz-fallback h3 { font-size: 1.2rem; }
.quiz-fallback .sample-q {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Course samples: phrase rows (Italian / transliteration / meaning) */
.phrases {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
}
.phrases .ph { padding-block: 0.9rem; }
.phrases .ph + .ph { border-top: 1px solid var(--border); }
.phrases .ph-src {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.15rem;
}
.phrases .ph-lit { margin: 0 0 0.15rem; color: var(--text); }
.phrases .ph-eng { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Gurmukhi letter row: big glyphs with names underneath */
.letter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}
.letter-row li {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  min-width: 84px;
  margin: 0;
}
.letter-row .glyph {
  display: block;
  font-size: 2.2rem;
  line-height: 1.4;
  color: var(--heading);
}
.letter-row .glyph-name {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   10. Store
   -------------------------------------------------------------------------- */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}
.product:hover { border-color: var(--border-strong); }
.product .kind {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--link);
  margin-bottom: 0.5rem;
}
.product h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.35em; }
.product p { color: var(--muted); font-size: 0.98rem; flex-grow: 1; }
.product .price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0.8rem 0;
}
.product .price data:empty::after,
.product .price .tbd { color: var(--muted); font-weight: 500; }
/* The billing interval on a subscription. Quieter and lighter than the figure so the price still
   reads first, but never hidden: everything else in this store is charged once, and a monthly
   commitment that looks like a one-off price is the one thing this card must not do. Lives in the
   markup rather than in js/store.js because it is user-facing text, and each language mirror
   carries its own. */
.product .price .price-note {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
.product .btn { align-self: flex-start; }

.plan-picker { max-width: 760px; }
.plan-picker__towers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(46%, 220px), 1fr)); gap: 0.65rem; }
.plan-picker__towers label { display: flex; align-items: flex-start; gap: 0.6rem; min-width: 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); overflow-wrap: anywhere; }
.plan-picker__towers input { flex: 0 0 auto; margin-top: 0.2rem; accent-color: var(--accent); }
.plan-picker__all { grid-column: 1 / -1; }
.plan-picker__price { font-weight: 700; color: var(--heading); }

.store-note {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  color: var(--muted);
  max-width: 680px;
}

/* Store success banner (post-Stripe redirect) */
.store-banner {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
}
html:not(.js) .store-banner,
.store-banner[hidden] { display: none; }

/* The sign-in step, explained above the cards.
   Quieter than .store-banner on purpose: the banner is news ("you have paid"),
   this is an instruction that sits on the page every time a signed-out visitor
   arrives. Same shape so they read as one family, outlined rather than filled
   so it never competes with the buy buttons it is describing. */
.store-signin {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
}
.store-signin a { text-decoration: underline; }
html:not(.js) .store-signin,
.store-signin[hidden] { display: none; }

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 560px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--heading);
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
.field textarea { min-height: 140px; resize: vertical; }
.field ::placeholder { color: var(--muted); opacity: 1; }

.form-status { font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

.or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
  margin-block: 2rem;
  max-width: 560px;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   12. Blog / prose
   -------------------------------------------------------------------------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  border-top: 1px solid var(--border);
  padding-block: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0;
}
.post-list a.post-title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
  display: inline-block;
  margin-bottom: 0.3rem;
}
.post-list a.post-title:hover { color: var(--link); text-decoration: none; }
.post-meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.post-list p { color: var(--muted); margin: 0; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; font-weight: 600; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 0.25em 0 0.25em 1.25em;
  border-left: 1px solid var(--border-strong);
  color: var(--muted);
}

.article-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-block: 2.5rem;
}
.article-cta p { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Page hero (subpages)
   -------------------------------------------------------------------------- */
.page-hero { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: 0.75rem; }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 3rem;
}
.footer-brand p { color: var(--muted); max-width: 32ch; }
.site-footer h2 {
  letter-spacing: normal;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--link); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   15. How list
   -------------------------------------------------------------------------- */
.how-list { display: grid; gap: 0.75rem; padding-left: 1.2rem; max-width: 62ch; }

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

/* Desktop nav stays on one line (the Raahaao Code link made it wrap) */
@media (min-width: 1200px) { .site-nav ul { flex-wrap: nowrap; gap: 0.25rem 0.75rem; } .site-nav a { white-space: nowrap; } .site-nav li, .nav-cta { flex-shrink: 0; } }

/* Raahaao Code tower pages: buy + account buttons (js/code-access.js) */
.code-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.code-buy .code-buy__card { display: contents; }
.code-buy__access { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.code-buy__note { flex-basis: 100%; margin: 0; }
.code-buy .code-buy__card[hidden] { display: none; }

/* Raahaao Code floor lists: lesson lists inside an ascent step are plain lists, and step 5 keeps climbing */
.ascent li li { display: list-item; padding: 0; margin: 0 0 0.25rem; border: 0; }
.ascent li ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--muted); }
@media (min-width: 880px) { .ascent > li:nth-child(5) { padding-left: clamp(0px, 24vw, 288px); } .ascent li li { padding-left: 0 !important; } }

/* certificate verify page */
.verify-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.verify-row input { flex: 1 1 14rem; font: inherit; padding: 0.6rem 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.verify-out { margin: 1.2rem 0; padding: 1rem 1.2rem; border-radius: 10px; border: 1px solid var(--border); }
.verify-out[data-tone="ok"] { border-color: #2f9e57; }
.verify-out[data-tone="error"] { border-color: #c0392b; }
.verify-out p { margin: 0 0 0.4em; }
