/* website-components.css — Sirah Quest shared tokens + component classes (redesign v2, Wave 1).
 * Linked render-blocking AFTER website-ui-critical.css on every shared-look page.
 * This file is the home for ALL new styling (do NOT extend the injected styles in
 * website-ui.js — see the CLS mirror rule in tasks/website-redesign-v2-brief.md).
 * Tokens reuse the --sq-* custom properties defined in website-ui-critical.css and
 * add component-level ones below. All colors AA-checked against cream backgrounds.
 */

/* ══════════ Self-hosted Nunito (wave 4) ══════════
 * Variable Nunito (wght 300–900), latin + latin-ext, served from our own origin.
 * Replaces the Google Fonts <link> + 2 preconnects that used to sit in every <head>.
 * Files came straight from fonts.gstatic.com (Nunito v32, SIL OFL 1.1) — unmodified.
 */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/nunito-latin-ext-var.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/nunito-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* extends the --sq-* set from website-ui-critical.css */
  --sq-rust: #A85638;        /* logo QUEST + secondary-button border */
  --sq-rust-deep: #7A3F2A;   /* AA text-on-cream companion to rust */
  --sq-cream-2: #F7EFE2;     /* alternate section background */
  --sq-radius-card: 16px;
  --sq-radius-pill: 999px;
  --sq-shadow-pop: 0 18px 34px rgba(61, 43, 31, 0.14);
  /* v3.1: was clamp(3.5rem, 8vw, 5.5rem) → 56–88px. At desktop that put 176px of empty
     paper between two content blocks (plus a ~72px .sq-path-rule), which read as a void
     rather than breathing room. 48–72px still separates cleanly. */
  --sq-space-section: clamp(3rem, 5.5vw, 4.5rem);
  --sq-measure: 42rem;

  /* ── v3 surfaces (owner-approved concept) ──
   * The page is paper; cards are pure white with a hairline + a warm shadow, so a card
   * always reads as a separate object. --sq-cream / --sq-card are REDEFINED here (they
   * are declared in website-ui-critical.css, which is linked before this file).
   */
  --sq-paper: #F5EDE0;
  --sq-paper-deep: #EDE0CC;
  --sq-sand-light: #F5E6D0;
  --sq-hairline: #E7DCCB;
  /* NOTE: --sq-cream / --sq-card canNOT be overridden here. website-ui.js injects its own
     :root block at runtime, appended after this stylesheet, so it always wins. Card surfaces
     therefore use --sq-surface, a name the injected block does not declare. */
  --sq-surface: #FFFFFF;
  --sq-ink-deep: #2D2118;
  /* Body/secondary prose on paper. --sq-muted (#7A5C4F) only just clears AA on the
     deepest paper (4.65:1 on #EDE0CC) and reads washed out at body size; this is the
     same hue two steps down — 7.16:1 on paper, 6.40:1 on paper-deep, 8.32:1 on white.
     --sq-muted stays as-is for small meta/labels where lighter is the right weight. */
  --sq-ink-body: #63483C;
  --sq-orange: #E8884A;
  --sq-terracotta-ink: #9A4A2E;   /* small text on paper */
  --sq-teal-ink: #1B6E64;         /* small teal text */

  --sq-shadow-card: 0 8px 32px rgba(61, 43, 31, 0.15), 0 2px 8px rgba(0, 0, 0, 0.05);
  --sq-shadow-card-hi: 0 16px 48px rgba(61, 43, 31, 0.18), 0 4px 14px rgba(0, 0, 0, 0.08);
  --sq-shadow-soft: 0 4px 18px rgba(61, 43, 31, 0.10);
  --sq-shadow-cta: 0 8px 32px rgba(232, 136, 74, 0.40), 0 2px 8px rgba(0, 0, 0, 0.14);
  --sq-shadow-cta-hi: 0 12px 40px rgba(232, 136, 74, 0.50), 0 4px 12px rgba(0, 0, 0, 0.20);

  /* ── Fluid type + spacing scale (OWNER-APPROVED 2026-07-26) ── */
  --sq-fs-hero:  clamp(2rem,    1.10rem + 4.40vw, 3.75rem);  /*  32 → 60 */
  --sq-fs-h2:    clamp(1.65rem, 1.15rem + 2.20vw, 2.50rem);  /*  26 → 40 */
  --sq-fs-h3:    clamp(1.15rem, 1.00rem + 0.80vw, 1.50rem);  /*  18 → 24 */
  --sq-fs-lead:  clamp(1.05rem, 0.98rem + 0.40vw, 1.25rem);  /*  17 → 20 */
  --sq-fs-body:  clamp(1rem,    0.97rem + 0.15vw, 1.0625rem);
  --sq-gutter:   clamp(1rem,    0.50rem + 2.50vw, 2rem);
  --sq-space-block: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  --sq-container: min(100% - (2 * var(--sq-gutter)), 1120px);
}

/* Arabic renders larger at the same px in Thmanyah — pull the fluid scale back a notch
 * for the whole locale rather than per element. */
[lang="ar"] {
  --sq-fs-hero: clamp(1.85rem, 1.05rem + 3.95vw, 3.35rem);
  --sq-fs-h2:   clamp(1.5rem,  1.05rem + 2.00vw, 2.25rem);
  --sq-fs-h3:   clamp(1.08rem, 0.95rem + 0.72vw, 1.4rem);
}

/* ── Type scale (opt-in classes; line-height stays a unitless ratio so it scales) ── */
.sq-fs-hero { font-size: var(--sq-fs-hero); line-height: 1.08; letter-spacing: -0.022em; }
.sq-fs-h2   { font-size: var(--sq-fs-h2);   line-height: 1.16; letter-spacing: -0.012em; }
.sq-fs-h3   { font-size: var(--sq-fs-h3);   line-height: 1.28; }
.sq-fs-lead { font-size: var(--sq-fs-lead); line-height: 1.6; }
.sq-fs-body { font-size: var(--sq-fs-body); line-height: 1.65; }
.sq-h2 { font-size: var(--sq-fs-h2); font-weight: 800; line-height: 1.16; color: var(--sq-ink); letter-spacing: -0.012em; }
.sq-h3 { font-size: var(--sq-fs-h3); font-weight: 800; line-height: 1.28; color: var(--sq-ink); }
.sq-body { font-size: var(--sq-fs-body); line-height: 1.65; color: var(--sq-ink-body); }
.sq-measure { max-width: var(--sq-measure); }

/* ﷺ is U+FDFA — a strong-RTL character. Without isolation the bidi algorithm pulls the
 * following neutrals/numbers into its run ("the Prophet ,ﷺ the prophets"). */
.saws { font-family: 'SirahSAWS', 'Nunito', serif; unicode-bidi: isolate; }

/* ── Section rhythm ── */
.sq-section { padding-block: var(--sq-space-section); }
.sq-section--alt { background: var(--sq-cream-2); }
/* A deeper paper band. Used to break up runs of same-surface sections — without it,
   two adjacent paper sections separated only by a 1px hairline read as one long field. */
.sq-band-deep { background-color: var(--sq-paper-deep); }

/* ── Buttons (≥44px targets) ── */
.sq-btn-primary,
.sq-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.68rem 1.35rem;
  border-radius: var(--sq-radius-pill);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.sq-btn-primary {
  background: var(--sq-ink);      /* #3D2B1F on cream — AA */
  color: var(--sq-cream);         /* cream text on dark ink — AA */
  border: 2px solid var(--sq-ink);
}
.sq-btn-primary:hover { opacity: 0.9; }
.sq-btn-secondary {
  background: transparent;
  border: 2px solid var(--sq-rust);   /* #A85638 */
  color: var(--sq-rust-deep);         /* #7A3F2A on cream — AA */
}
.sq-btn-secondary:hover { background: rgba(168, 86, 56, 0.08); }

/* ── Header chrome ── */
.sq-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 237, 224, 0.90);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--sq-hairline);
}
.sq-header-bar {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sq-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  min-height: 44px;
  text-decoration: none;
  user-select: none;
}
.sq-logo img { border-radius: 8px; box-shadow: 0 1px 3px rgba(61, 43, 31, 0.15); }
.sq-logo-sirah { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--sq-ink); }
.sq-logo-quest { font-size: 1.25rem; font-weight: 300; letter-spacing: -0.01em; color: var(--sq-rust); }
.sq-nav { display: flex; align-items: center; }
.sq-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sq-muted);          /* #7A5C4F on cream — AA for bold nav text */
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}
.sq-nav-link:hover,
.sq-nav-link[aria-current="page"] { color: var(--sq-ink); }
.sq-nav-more-tray .sq-nav-link { min-height: 40px; }
.sq-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}
/* ≥44px hamburger (overrides the 42px injected default without touching it) */
button.sq-mobile-menu-toggle { height: 44px; width: 44px; }

/* ── Locale selector popover ── */
.sq-locale { position: relative; }
.sq-locale > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--sq-sand);
  border-radius: var(--sq-radius-pill);
  background: rgba(254, 252, 249, 0.78);
  color: var(--sq-ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.sq-locale > summary::-webkit-details-marker { display: none; }
.sq-locale > summary::after { content: "\25BE"; font-size: 0.7em; }
.sq-locale[open] > summary::after { content: "\25B4"; }
.sq-locale-tray {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.5rem);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 10.5rem;
  background: var(--sq-surface);
  border: 1px solid var(--sq-sand);
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: var(--sq-shadow-pop);
  z-index: 55;
}
.sq-locale[open] > .sq-locale-tray { display: flex; }
.sq-locale-tray a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--sq-ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sq-locale-tray a:hover { background: rgba(196, 112, 75, 0.08); }
.sq-locale-tray a[aria-current="page"] { color: var(--sq-rust-deep); }

@media (max-width: 479px) {
  /* mirror the previous header behavior: tuck the CTA behind the menu on tiny screens */
  .sq-header-cta { display: none; }
  .sq-locale > summary { padding-inline: 0.6rem; }
}

/* ── Card ── */
.sq-card {
  background: var(--sq-surface);
  border: 1px solid var(--sq-hairline);
  border-radius: var(--sq-radius-card);
  box-shadow: var(--sq-shadow-card);
}

/* ── Feature story (Wave 2 homepage app-experience section; re-densified v3.1) ──
 * v3.1: the media used to render the WHOLE 585×1266 portrait screenshot next to one
 * sentence, so every row was ~865px tall around ~60px of text. The shot is now a
 * FIXED-HEIGHT framed window onto the meaningful part of the screen, and the text
 * column carries a lede + supporting points and is TOP-aligned to the frame.
 */
.sq-feature-story {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
@media (min-width: 768px) {
  .sq-feature-story { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
  .sq-feature-story--flip .sq-feature-story-media { order: 2; }
}
.sq-feature-story-media { margin: 0; }

/* the trigger IS the device frame: white bezel + hairline + warm shadow, so all three
   screens read as one family on paper (and the dark capture is at least contained). */
.sq-feature-story-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 18px 9px 9px;
  border: 1px solid var(--sq-hairline);
  border-radius: 26px;
  background: var(--sq-surface);
  box-shadow: var(--sq-shadow-card);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.sq-feature-story-open::before {          /* speaker slot — reads as a device, not a rectangle */
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  translate: -50% 0;
  width: 46px;
  height: 4px;
  border-radius: 99px;
  background: var(--sq-hairline);
}
.sq-feature-story-open img {
  display: block;
  width: 100%;
  /* capped window onto the screen — the full shot is one click away in the lightbox */
  height: clamp(290px, 29vw, 370px);
  object-fit: cover;
  object-position: 50% 0%;
  border-radius: 17px;
  background: var(--sq-sand-light);
}
/* the "answer + feedback" shot earns its story lower down the screen */
/* 87% lands the window on question → chosen answer → "Correct!" → Continue, with a clean
   top edge (82% sliced the "Quick check" pill in half). */
.sq-feature-story-open img.sq-shot--focus-low { object-position: 50% 87%; }
/* soft bottom shade so a crop that lands mid-paragraph reads as "the screen continues",
   not as a truncation bug. Neutral dark, so it works over the light AND dark captures. */
.sq-feature-story-open::after {
  content: '';
  position: absolute;
  inset-inline: 9px;
  bottom: 9px;
  height: 46px;
  border-radius: 0 0 17px 17px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(45, 33, 24, 0) 0%, rgba(45, 33, 24, 0.16) 100%);
}
.sq-feature-story-open:hover { transform: translateY(-2px); box-shadow: var(--sq-shadow-card-hi); }

/* ── Lightbox (extends the sirah-modal dialog pattern) ── */
.sq-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(61, 43, 31, 0.82);
}
.sq-lightbox[data-open="true"] { display: flex; }
.sq-lightbox-panel {
  background: var(--sq-cream);
  border: 1px solid var(--sq-sand);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  max-height: min(92vh, 58rem);
  max-width: min(96vw, 64rem);
  width: auto;
  overflow: auto;
  padding: 1rem;
}
.sq-lightbox-panel img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin-inline: auto; }
.sq-lightbox-close {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid rgba(168, 86, 56, 0.35);
  border-radius: var(--sq-radius-pill);
  background: var(--sq-surface);
  color: var(--sq-ink);
  font-weight: 800;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
}

/* ── Accessible expander (lesson "Continue", testimonials "Show more") ── */
.sq-expander-body[data-expanded="false"] { display: none; }
.sq-expander-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--sq-rust);
  border-radius: var(--sq-radius-pill);
  background: transparent;
  color: var(--sq-rust-deep);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.sq-expander-toggle::after { content: "\25BE"; font-size: 0.75em; }
.sq-expander-toggle[aria-expanded="true"]::after { content: "\25B4"; }
.sq-expander-toggle:hover { background: rgba(168, 86, 56, 0.08); }

/* ══════════ Wave 2 — homepage body (hero, stories, expanders, merged CTA, signup) ══════════ */

/* ── Hero ── */
.sq-hero-pad { padding-block: 2rem 3rem; }
@media (min-width: 640px) { .sq-hero-pad { padding-block: 3rem 4rem; } }
@media (min-width: 1024px) { .sq-hero-pad { padding-block: 3.5rem 5rem; } }

.sq-hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}
@media (min-width: 1024px) {
  .sq-hero-grid { flex-direction: row; gap: clamp(2rem, 5vw, 4rem); }
}
.sq-hero-copy { flex: 1 1 auto; text-align: center; max-width: 42rem; }
@media (min-width: 1024px) { .sq-hero-copy { text-align: start; } }
.sq-hero-media { flex: 0 0 auto; display: flex; justify-content: center; width: 100%; }
@media (min-width: 1024px) { .sq-hero-media { width: auto; } }

.sq-hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .sq-hero-ctas { flex-direction: row; align-items: center; justify-content: center; }
}
@media (min-width: 1024px) { .sq-hero-ctas { justify-content: flex-start; } }

.sq-hero-cta-primary,
.sq-hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--sq-radius-pill);
  text-decoration: none;
  text-align: center;
  transition: opacity 160ms ease, background-color 160ms ease;
}
.sq-hero-cta-primary {
  min-height: 52px;
  padding: 0.9rem 2rem;
  background: var(--sq-ink);          /* #3D2B1F */
  border: 2px solid var(--sq-ink);
  color: #fff;                        /* AA on ink */
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(61, 43, 31, 0.3);
}
.sq-hero-cta-primary:hover { opacity: 0.9; }
.sq-hero-cta-secondary {
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 2px solid var(--sq-rust);   /* #A85638 */
  color: var(--sq-rust-deep);         /* #7A3F2A on cream — AA */
  font-weight: 600;
  font-size: 0.92rem;
}
.sq-hero-cta-secondary:hover { background: rgba(168, 86, 56, 0.08); }
.sq-hero-proof {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sq-muted);
}

/* Large, legible product shot (cropped journey screen) */
.sq-hero-shot {
  display: block;
  width: min(100%, 440px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--sq-sand);
  background: var(--sq-surface);
  box-shadow: 0 26px 60px rgba(61, 43, 31, 0.28);
}
.sq-hero-shot img { display: block; width: 100%; height: auto; }

/* ── Feature stories (app experience) ── */
.sq-stories { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.sq-story-media { max-width: 320px; margin-inline: auto; width: 100%; }
.sq-story-text { text-align: center; }
@media (min-width: 768px) {
  .sq-story-text { text-align: start; }
  /* optical top-align: the h3 cap-height meets the top of the framed screen */
  .sq-story-text { padding-block-start: 0.35rem; }
}
.sq-story-text .sq-h3 { margin-bottom: 0.45rem; }
.sq-story-text .sq-body { max-width: 29rem; margin-inline: auto; }
@media (min-width: 768px) { .sq-story-text .sq-body { margin-inline: 0; } }

/* supporting points — what the screen actually buys you, three facts deep */
.sq-story-points {
  list-style: none;
  margin: 1.05rem auto 0;
  padding: 0;
  display: grid;
  gap: 0.62rem;
  max-width: 29rem;      /* short measure: each point wraps to ~2 lines, which balances the frame */
  text-align: start;
}
@media (min-width: 768px) { .sq-story-points { margin-inline: 0; } }
/* NOTE: marker is an absolutely-positioned ::before, NOT a grid/flex child — the li's
   trailing text node would otherwise become its own anonymous grid item and wrap one
   character per line inside the marker column. */
.sq-story-points li {
  position: relative;
  padding-inline-start: 1.6rem;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--sq-ink-body);
}
.sq-story-points li::before {         /* diamond waypoint — the journey motif, at list scale */
  content: '';
  position: absolute;
  inset-inline-start: 1px;
  top: 0.42em;
  width: 9px;
  height: 9px;
  rotate: 45deg;
  border-radius: 2px;
  background: var(--sq-surface);
  border: 2px solid var(--sq-terracotta);
}
.sq-story-points strong { color: var(--sq-ink); font-weight: 800; }

/* ── CTA continuity: something to act on between the hero and the trial section ── */
.sq-stories-cta {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.sq-btn-primary--cta {
  min-height: 52px;
  padding: 0.85rem 2rem;
  font-size: 1.02rem;
  box-shadow: 0 4px 20px rgba(61, 43, 31, 0.28);
}
.sq-stories-cta-note {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sq-ink-body);
}

/* ── Compact "How it works" strip (nav anchor #how-it-works) ── */
.sq-howstrip {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  background: var(--sq-surface);
  border: 1px solid var(--sq-sand);
  border-radius: var(--sq-radius-card);
  box-shadow: var(--sq-shadow-card);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  scroll-margin-top: 5rem;
}
.sq-howstrip-title {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* --sq-rust measures 4.46:1 on --sq-paper at this size; rust-deep = 7.03:1 */
  font-weight: 800;
  color: var(--sq-rust-deep);
  margin-bottom: 1rem;
  text-align: center;
}
.sq-howstrip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 900px) { .sq-howstrip-list { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; } }
.sq-howstrip-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--sq-muted);
}
.sq-howstrip-list strong { color: var(--sq-ink); }
.sq-howstrip-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: var(--sq-rust);
  color: #fff;                        /* AA on #A85638 */
  font-weight: 800;
  font-size: 0.82rem;
}

/* ── Lightbox chrome (panel header) ── */
.sq-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.sq-lightbox-title { font-size: 0.95rem; font-weight: 800; color: var(--sq-ink); margin: 0; }

/* ── Expander wrappers ── */
.sq-lesson-more { margin-top: 0.4rem; }
.sq-reviews-more { margin-top: 1.6rem; text-align: center; }

/* ── "Who it's for" line ── */
.sq-whofor {
  max-width: 44rem;
  margin: 1rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--sq-muted);
}
.sq-whofor a { color: var(--sq-rust-deep); font-weight: 700; text-decoration: underline; }

/* ── Free vs Scholar tier comparison (inside the final CTA) ── */
.sq-tiers {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  text-align: start;
}
@media (min-width: 640px) {
  .sq-tiers { flex-direction: row; align-items: center; }
  .sq-tiers-rule { width: 1px; height: 2rem; background: rgba(255, 255, 255, 0.2); }
}
.sq-tiers-rule { display: none; }
@media (min-width: 640px) { .sq-tiers-rule { display: block; } }

/* ── Compact email signup row (above the footer) ── */
.sq-signup {
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--sq-sand);
  background: var(--sq-cream-2);
}
.sq-signup-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
@media (min-width: 900px) {
  .sq-signup-row { flex-direction: row; align-items: center; text-align: start; gap: 2rem; }
}
.sq-signup-cover {
  width: 88px;
  height: auto;
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(61, 43, 31, 0.25);
}
.sq-signup-copy { flex: 1 1 auto; max-width: 32rem; }
.sq-signup-title { font-size: 1.15rem; font-weight: 800; color: var(--sq-ink); margin-bottom: 0.35rem; }
.sq-signup-note { font-size: 0.82rem; line-height: 1.6; color: var(--sq-muted); }
.sq-signup-form { flex: 1 1 auto; width: 100%; max-width: 26rem; }

/* ── Focus visibility ────────────────────────────────────────────────────────
 * DUAL-TONE ring (wave 4 a11y fix). A single gold ring is ~1.2:1 against cream and
 * therefore invisible on light surfaces; a single ink ring disappears on the dark
 * footer/final-CTA. So: gold hugs the control (box-shadow fills the 3px offset gap)
 * and ink sits outside it (the outline), which is what touches the page background.
 * One of the two always clears 3:1, on every surface we ship.
 * MIRRORED VERBATIM in website-ui.js (injected) + website-ui-critical.css — change all three.
 */
.sq-btn-primary:focus-visible,
.sq-btn-secondary:focus-visible,
.sq-btn-store:focus-visible,
.sq-nav-link:focus-visible,
.sq-locale > summary:focus-visible,
.sq-expander-toggle:focus-visible,
.sq-lightbox-close:focus-visible,
.sq-feature-story-open:focus-visible,
.sq-hero-cta-primary:focus-visible,
.sq-hero-cta-secondary:focus-visible,
.sq-hero-shot:focus-visible,
.sq-whofor a:focus-visible {
  outline: 3px solid var(--sq-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.95);
}

/* The Kit (ConvertKit) embed injects its own stylesheet at runtime containing
 * `.formkit-form[data-uid="…"] .formkit-input:focus { outline: none }`, which strips the
 * keyboard focus indicator from the email field (WCAG 2.4.7). Restore our ring at higher
 * specificity than Kit's rule; :focus-visible only, so pointer clicks stay ring-free. */
body .formkit-form[data-uid] .formkit-input:focus-visible {
  outline: 3px solid var(--sq-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.95);
}

/* Kit also renders its submit button with INLINE colours from the dashboard config
   (#f6eedd on #c0683b = 3.44:1, under AA). Only !important can beat an inline style.
   These are the same values .sq-btn-store already ships — white on --sq-rust = 5.18:1 —
   so the signup button now matches the site's own filled-rust button. */
body .formkit-form[data-uid] [data-element="submit"] {
  background-color: var(--sq-rust) !important;
  color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
  .sq-btn-primary,
  .sq-btn-secondary,
  .sq-nav-link,
  .sq-feature-story-open,
  .sq-expander-toggle,
  .sq-hero-cta-primary,
  .sq-hero-cta-secondary {
    transition: none;
  }
  .sq-feature-story-open:hover { transform: none; }
  /* NOTE: .sq-btn-store is declared further down (wave 4 block) and would win on source
     order from here — its reduced-motion override lives next to that declaration. */
}

/* ══════════ Wave 3 — "try a chapter" interactive trial (homepage #sample-lesson) ══════════
 * Extends the base .sl-* rules that live in the page's inline <style>. Because that block is
 * parsed AFTER this file, any rule here that overrides one of those is scoped with .sl-card
 * to win on specificity rather than order.
 */

/* Screen-reader-only text (no such utility exists in the static tailwind.css snapshot) */
.sq-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Chapter map (the app's journey metaphor, compacted to one track) ── */
.sl-mapbar {
  padding: 1rem 1.1rem 1.15rem;
  background: var(--sq-cream-2);
  border-bottom: 1px solid var(--sq-sand);
}
.sl-mapbar-title {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--sq-rust-deep);
}
.sl-map-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}
.sl-map-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.sl-map-item + .sl-map-item::before {   /* connector to the previous node */
  content: "";
  position: absolute;
  top: 21px;
  inset-inline-start: -50%;
  inset-inline-end: 50%;
  height: 2px;
  background: var(--sq-sand);
  z-index: 0;
}
.sl-map-node {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  border: 2px dashed var(--sq-sand);
  background: var(--sq-surface);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.sl-map-node:hover { border-color: var(--sq-rust); }
.sl-map-num { font-size: 0.95rem; font-weight: 800; line-height: 1; color: var(--sq-muted); }
.sl-map-node[data-state="current"] {
  border-style: solid;
  border-width: 3px;
  border-color: var(--sq-rust);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(168, 86, 56, 0.14);
}
.sl-map-node[data-state="current"] .sl-map-num { color: var(--sq-ink); }
.sl-map-node[data-state="done"] {
  border-style: solid;
  border-color: #2D9B8E;
  background: #2D9B8E;
}
.sl-map-node[data-state="done"] .sl-map-num { font-size: 0; }
.sl-map-node[data-state="done"] .sl-map-num::after {
  content: "\2713";           /* ✓ — state is never signalled by colour alone */
  font-size: 1.05rem;
  color: #fff;
}
.sl-map-name {
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
  color: var(--sq-muted);
  max-width: 9rem;
}
.sl-map-node[data-state="current"] + .sl-map-name { color: var(--sq-ink); font-weight: 800; }
@media (max-width: 559px) { .sl-map-name { display: none; } }

/* ── Lesson panels ── */
.sl-lesson[hidden],
.sl-q[hidden],
.sl-lessonnav[hidden] { display: none; }

.sl-objective {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--sq-cream-2);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--sq-muted);
}
.sl-objective-key {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--sq-rust);
}
.sl-sec {
  margin: 1.15rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--sq-ink);
}
.sl-read > .sl-sec:first-child { margin-top: 0; }
.sq-expander-body > .sl-sec:first-child { margin-top: 0.2rem; }

/* ── Narration player ── */
.sl-audio { margin: 0 0 1.1rem; }
.sl-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 2px solid var(--sq-rust);
  border-radius: var(--sq-radius-pill);
  background: transparent;
  color: var(--sq-rust-deep);      /* #7A3F2A on cream — AA */
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.sl-audio-btn:hover:not(:disabled) { background: rgba(168, 86, 56, 0.08); }
.sl-audio-btn:disabled { opacity: 0.65; cursor: default; }
.sl-audio-icon { display: inline-flex; align-items: center; }

/* ── Questions ── */
.sl-card .sl-q-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sl-q-count { color: var(--sq-muted); letter-spacing: 0.08em; }
.sl-qs .sl-q + .sl-q {
  margin-top: 1.7rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--sq-sand);
}
.sl-q-kind {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--sq-muted);
}
.sl-blank {
  display: inline-block;
  width: 5.5rem;
  height: 0.95em;
  margin-inline: 0.15rem;
  border-bottom: 2px solid var(--sq-rust);
  vertical-align: baseline;
}

/* ── Advance to the next micro-lesson ── */
.sl-lessonnav {
  margin-top: 1.7rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--sq-sand);
  text-align: center;
}
.sl-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--sq-ink);
  border-radius: var(--sq-radius-pill);
  background: var(--sq-ink);
  color: var(--sq-cream);          /* cream on #3D2B1F — AA */
  font-family: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
  cursor: pointer;
  transition: opacity 160ms ease;
}
.sl-next:hover { opacity: 0.9; }

/* ── Chapter completion card (now a sibling of the lesson panels) ── */
.sl-card > .sl-complete--chapter {
  margin-top: 0;
  padding: 1.4rem 1.4rem 1.7rem;
}

/* ── Focus visibility for the new controls (dual-tone — see the note above) ── */
.sl-map-node:focus-visible,
.sl-next:focus-visible,
.sl-audio-btn:focus-visible,
.sl-title:focus-visible {
  outline: 3px solid var(--sq-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .sl-map-node,
  .sl-next,
  .sl-audio-btn { transition: none; }
  .sl-card .sl-progress-bar { transition: none; }   /* .sl-card wins over the inline block */
}

/* ══════════════════════════════════════════════════════════════════════════════
   WAVE 4 — approved v3 visual system
   Paper page + white cards + dotted journey path + device hero + a11y fixes.
   Wave 5 note: these colour/utility overrides used to be scoped to html[lang="en"]
   while the AR/FR pages still carried the old look. The mirror wave restyled those
   pages deliberately, so the scoping is gone and the v3 surfaces are site-wide.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── The page is paper, not a screen ── */
body { background-color: var(--sq-paper); }

/* parchment grain over the whole page (the EN pages already own body::before for
   the star tile, so the grain rides on ::after).
   NOTE: deliberately NOT mix-blend-mode — a viewport-sized fixed element with a blend
   mode drops Chrome out of composited scrolling and blanks the page mid-scroll
   (reproduced at 1440x900 in this browser). Plain alpha gives the same texture. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

/* Re-tint the existing utilities rather than minting new arbitrary ones
   (tailwind.css is a static snapshot — new arbitrary values render transparent).
   These win because website-components.css is linked after tailwind.css. */
.bg-\[\#FBF6EE\] { background-color: var(--sq-paper); }
.bg-\[\#FEFCF9\] { background-color: var(--sq-surface); }
.bg-\[\#F0E6D5\] { background-color: var(--sq-paper-deep); }
.border-\[\#E8D5B7\] { border-color: var(--sq-hairline); }
/* v3.1: the muted body/lede utility. #7A5C4F is only 4.65:1 on the deepest paper
   (#EDE0CC) and reads washed out at prose size; --sq-ink-body is 6.40:1 there and
   7.16:1 on paper. Retinted here rather than per page so every page moves together. */
.text-\[\#7A5C4F\] { color: var(--sq-ink-body); }
.bg-white { background-color: var(--sq-surface); }

/* ── Store button (a11y: white on #A85638 = 5.18:1; #C4704B was 3.4:1) ── */
.sq-btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--sq-radius-pill);
  background: var(--sq-rust);
  color: #fff;
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(168, 86, 56, 0.28);
  transition: opacity 160ms ease, transform 160ms ease;
}
.sq-btn-store:hover { opacity: 0.92; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .sq-btn-store { transition: none; }
  .sq-btn-store:hover { transform: none; }
}

/* ── Mobile-menu panel: 44px targets ──
 * Must out-specify the injected `body > header a[data-analytics-language-switch] { min-height: 40px }`
 * (0,1,3) — two classes + an attribute gives (0,2,2), which wins on class count. */
.sq-mobile-menu-panel nav a,
.sq-mobile-menu-panel .sq-mobile-menu-nav a[href] {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.25rem;
}

/* ── Dotted journey path — the connective tissue between sections ── */
.sq-path-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(14px, 2.2vw, 22px) 0;
  background: var(--sq-paper);
}
.sq-path-rule i {
  height: 2px;
  flex: 1;
  max-width: 190px;
  background-image: repeating-linear-gradient(90deg, var(--sq-terracotta) 0 4px, transparent 4px 13px);
  opacity: 0.45;
}
.sq-path-rule span {
  width: 12px;
  height: 12px;
  flex: none;
  rotate: 45deg;
  border-radius: 3px;
  background: var(--sq-sand);
  border: 2px solid var(--sq-terracotta);
  opacity: 0.7;
}

/* ── Hero: device presentation + float chips ── */
/* the inner box hugs the device so the arc + chips are anchored to it, not to the column */
.sq-hero-media-inner { position: relative; display: flex; justify-content: center; width: min(100%, 420px); }
.sq-hero-arc {
  position: absolute;
  inset: -6% -4% -2%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.36;
}
/* .sq-hero-shot is the real CTA anchor from wave 2 — re-skinned as a device */
.sq-hero-shot {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 9px;
  border-radius: 36px;
  border: 0;
  background: linear-gradient(160deg, #4A3527 0%, #2D2118 48%, #4A3527 100%);
  box-shadow: 0 26px 60px rgba(61, 43, 31, 0.32), 0 6px 18px rgba(0, 0, 0, 0.16),
              inset 0 0 0 1px rgba(240, 199, 94, 0.18);
  overflow: visible;
}
.sq-hero-shot::after {                   /* speaker slot */
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  translate: -50% 0;
  width: 64px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 2;
}
.sq-hero-shot img { border-radius: 28px; background: var(--sq-sand-light); }

.sq-float-chip {
  position: absolute;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 0.5em;
  background: var(--sq-surface);
  border: 1px solid var(--sq-hairline);
  border-radius: var(--sq-radius-pill);
  padding: 0.5em 0.9em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sq-ink);
  box-shadow: var(--sq-shadow-soft);
  white-space: nowrap;
}
.sq-float-chip .sq-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sq-float-chip--a { top: 22%; inset-inline-start: 0; translate: -72% 0; }
.sq-float-chip--b { bottom: 15%; inset-inline-end: 0; translate: 46% 0; }
/* `translate` is physical: on the RTL page the same values push both chips INTO the
   device screen instead of hanging them off its outer edge. Mirror them. */
[dir="rtl"] .sq-float-chip--a { translate: 72% 0; }
[dir="rtl"] .sq-float-chip--b { translate: -46% 0; }
/* Below 1200px the media column is barely wider than the device, so a chip would
   land on live app UI. Both facts are restated in the credibility strip below. */
@media (min-width: 1200px) { .sq-float-chip { display: inline-flex; } }

/* hero wash — warm light behind the device, matching the concept */
.sq-hero-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 78% at 78% 4%, rgba(240, 199, 94, 0.30) 0%, transparent 58%),
    radial-gradient(88% 60% at 6% 96%, rgba(196, 112, 75, 0.16) 0%, transparent 62%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.42), rgba(237, 224, 204, 0.55));
}

/* primary CTA — orange → gold gradient pill */
.sq-hero-cta-primary {
  background: linear-gradient(135deg, var(--sq-orange) 0%, var(--sq-gold) 100%);
  border: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(120, 60, 20, 0.35);
  box-shadow: var(--sq-shadow-cta);
}
.sq-hero-cta-primary:hover { opacity: 1; transform: translateY(-3px) scale(1.02); box-shadow: var(--sq-shadow-cta-hi); }
.sq-hero-cta-primary:active { transform: translateY(0) scale(0.985); }
.sq-hero-cta-secondary { min-height: 52px; border-width: 2px; font-weight: 700; font-size: 0.98rem; }
.sq-hero-cta-secondary:hover { transform: translateY(-2px); }

/* ── Eyebrow pill (concept's "chip" treatment for the section kickers) ── */
.cv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--sq-surface);
  border: 1px solid var(--sq-hairline);
  color: var(--sq-rust);
  /* logical, so the dot keeps its tighter gutter on the RTL pages */
  padding-block: 0.45em;
  padding-inline: 0.7em 1em;
  border-radius: var(--sq-radius-pill);
  box-shadow: 0 2px 8px rgba(61, 43, 31, 0.07);
}
.cv-eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sq-orange), var(--sq-gold));
  box-shadow: 0 0 0 3px rgba(232, 136, 74, 0.16);
}

/* ── Cards get the warm shadow + hairline everywhere they already exist ── */
.sl-card,
.cmp,
.art-card,
.sq-howstrip {
  border-color: var(--sq-hairline);
  box-shadow: var(--sq-shadow-card);
}
.sl-card { background: var(--sq-surface); }
.cmp { background: var(--sq-surface); }
.art-card { background: var(--sq-surface); }
.sq-howstrip { background: var(--sq-surface); position: relative; overflow: hidden; }
.sq-howstrip::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--sq-teal), var(--sq-gold), var(--sq-orange));
}
.sq-howstrip-num { background: linear-gradient(135deg, var(--sq-orange), #D9752F); }

/* ── Review stars (v3.1 contrast) ──
 * Star Gold #F0C75E measures 1.61:1 on a white card / 1.39:1 on paper — the glyphs read
 * as a pale smudge, and WCAG 1.4.11 wants 3:1 for a meaningful graphic. Going dark enough
 * to pass on fill alone (#B5871E) stops reading as gold, so the fill stays brand-gold and
 * a deeper ochre outline carries the contrast (#9A6E15 = 4.6:1 on white).
 * Scoped to #reviews so gold on the dark final-CTA / footer is untouched.
 */
#reviews .text-\[\#F0C75E\] {
  -webkit-text-stroke: 0.6px #9A6E15;
  paint-order: stroke fill;
}

/* trust strip pills sit on paper — give them the white-chip treatment */
.trust-strip li {
  background: var(--sq-surface);
  border-color: var(--sq-hairline);
  box-shadow: 0 2px 8px rgba(61, 43, 31, 0.06);
}

/* ══════════════════════════════════════════════════════════════════════════════
   WAVE 4 — "Try a chapter" desktop app frame
   ≥1024px the card becomes a two-column application frame: a left rail (chapter
   map + lesson meta/objective/audio) and a right stage (art + passage + question),
   so the section reads as "the app, embedded" and fits one screen.
   Only ONE .sl-lesson is ever visible, so display:contents + explicit grid
   placement gives the rail its per-lesson content without duplicating markup.
   Every sl-* selector, event hook and aria attribute is untouched.
   ══════════════════════════════════════════════════════════════════════════════ */

/* mobile/tablet: the aside + main wrappers are transparent, flow is unchanged */
.sl-lesson-aside, .sl-lesson-main { display: block; }
.sl-lesson-aside { padding: 1.5rem 1.4rem 0; }
.sl-lesson-main  { padding: 0 1.4rem 1.7rem; }
.sl-lesson-aside > :last-child { margin-bottom: 0; }

@media (min-width: 1024px) {
  /* [data-sl-chapter] raises specificity over the page's inline `.sl-card { max-width: 42rem }` */
  .sl-card[data-sl-chapter] {
    display: grid;
    grid-template-columns: minmax(240px, 288px) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: stretch;
    max-width: 62rem;
  }
  .sl-lessons, .sl-lesson { display: contents; }
  .sl-lesson[hidden] { display: none; }

  .sl-card > [data-sl-live] { grid-area: 1 / 1; }

  .sl-mapbar {
    grid-column: 1;
    grid-row: 1;
    border-bottom: 0;
    border-inline-end: 1px solid var(--sq-hairline);
    padding: 1.1rem 1.1rem 1rem;
  }
  .sl-lesson-aside {
    grid-column: 1;
    grid-row: 2;
    border-inline-end: 1px solid var(--sq-hairline);
    background: var(--sq-cream-2);
    padding: 1.1rem;
  }
  .sl-figure { grid-column: 2; grid-row: 1; align-self: stretch; overflow: hidden; }
  /* .sl-card wins over the page's inline `.sl-figure img { aspect-ratio: 16/9 }` */
  .sl-card .sl-figure img { height: 100%; aspect-ratio: 21 / 6; object-fit: cover; object-position: center 42%; }
  .sl-card .cv-lede, #sample-lesson .cv-lede { font-size: 1.02rem; }
  .sl-lesson-main { grid-column: 2; grid-row: 2; padding: 1.2rem 1.5rem 1.4rem; }
  .sl-card > .sl-complete--chapter { grid-column: 1 / -1; grid-row: 3; }

  /* vertical waypoints in the rail — compact, so the frame stays near one screen */
  .sl-map-track { grid-template-columns: 1fr; gap: 0.3rem; }
  .sl-map-item {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
  }
  .sl-card .sl-map-node { width: 36px; height: 36px; min-width: 36px; }
  /* visual circle stays 36px; transparent overlay restores the 44px hit area */
  .sl-card .sl-map-node::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
  .sl-map-item + .sl-map-item::before {
    top: auto;
    bottom: 100%;
    inset-inline-start: 17px;
    inset-inline-end: auto;
    width: 2px;
    height: 0.3rem;
  }
  .sl-map-name {
    display: block;
    text-align: start;
    max-width: none;
    font-size: 0.76rem;
  }
  .sl-mapbar-title { text-align: start; margin-bottom: 0.6rem; }
  .sl-progress-wrap { margin: 0.85rem 0 0; }

  /* the rail's own rhythm */
  .sl-lesson-aside .sl-meta { margin-bottom: 0.4rem; }
  .sl-lesson-aside .sl-title { font-size: 1.15rem; margin-bottom: 0.6rem; }
  .sl-lesson-aside .sl-objective { margin-bottom: 0.85rem; background: var(--sq-surface); }
  .sl-lesson-aside .sl-audio { margin-bottom: 0; }
  .sl-lesson-aside .sl-audio-btn { width: 100%; }
  .sl-read > .sl-sec:first-child { margin-top: 0; }

  /* tighter stage rhythm — no content removed, just less air */
  .sl-card .sl-opt { padding: 0.6rem 0.9rem; }
  .sl-card .sl-options { gap: 0.45rem; }
  .sl-card .sl-q { margin-top: 1rem; }
  .sl-card .sl-q-text { margin-bottom: 0.7rem; }
  .sl-card .sl-read p { margin-bottom: 0.6rem; }
  .sl-card .sq-lesson-more { margin-top: 0.2rem; }
  .sl-card .sl-lessonnav { margin-top: 1.1rem; padding-top: 0.9rem; }

  /* the section itself does not need full-page rhythm around an app frame */
  #sample-lesson { padding-block: clamp(2.5rem, 4vw, 3.25rem); }
}

/* ── Paper surfaces expressed as component classes ──
 * (Replaces bg-[#FBF6EE] / bg-gradient-to-b from-…to-… arbitrary utilities: the new
 * paper hex is not in the static tailwind.css snapshot and would render transparent.) */
.sq-paper { background-color: var(--sq-paper); }
.sq-paper-fade { background-image: linear-gradient(to bottom, var(--sq-paper), var(--sq-paper-deep)); }
.sq-hover-paper { transition: background-color 160ms ease; }
.sq-hover-paper:hover { background-color: rgba(245, 237, 224, 0.8); }
@media (prefers-reduced-motion: reduce) { .sq-hover-paper { transition: none; } }

/* ── Locale tray: secondary "coming soon" entries for the ES/DE waitlist pages ── */
.sq-locale-sep {
  display: block;
  height: 1px;
  margin: 0.35rem 0.2rem;
  background: var(--sq-hairline);
}
.sq-locale-tray a.sq-locale-soon { color: var(--sq-muted); font-weight: 700; gap: 0.35rem; }
.sq-locale-tray a.sq-locale-soon em {
  font-style: normal;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--sq-muted);
  opacity: 0.85;
}
.sq-more-langs a { color: rgba(255, 255, 255, 0.75); }

/* the app frame is wider than the reading column it sits in */
@media (min-width: 1024px) { .cv-wrap--frame { width: min(100% - 2rem, 64rem); } }


/* ══════════════════════════════════════════════════════════════════════════════
 * INNER-PAGE SHARED COMPONENTS (v3.1 — merged in from website-pages.css, wave 7)
 * ------------------------------------------------------------------------------
 * These rules were written into a temporary website-pages.css only to avoid a
 * concurrent write to this file during the v3.1 CTA pass. They are moved here
 * verbatim; website-pages.css is deleted and its <link> removed from every page.
 *
 *   1. .sq-cta-band  — the one closing call-to-action band shared by every
 *                      content page. This is the ONLY place on an inner page
 *                      where store badges are allowed to appear.
 *   2. .sq-ink-*     — AA-safe accent inks for light surfaces.
 * ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Closing CTA band ─────────────────────────────────────────────────────
 * Dark ink surface so it reads as the page's terminal beat, echoing the
 * homepage #final-cta. Contrast on the #3D2B1F end of the gradient:
 *   title      #FFFFFF                 → 13.4:1
 *   lede       rgba(255,255,255,.82)   →  9.6:1
 *   eyebrow    #F0C75E                 →  8.3:1
 *   proof      rgba(255,255,255,.72)   →  7.7:1
 *   primary    #3D2B1F on #F5EDE0      → 11.6:1
 *   store      #FFFFFF on transparent  → 13.4:1 (border 5.2:1, clears 3:1)
 */
.sq-cta-band {
  position: relative;
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, #3D2B1F 0%, #5C3D22 50%, #3D2B1F 100%);
  isolation: isolate;
}

/* Same star wallpaper as the rest of the site, but dialled to the homepage's
   final-CTA weight (0.08) rather than the heavier inner-page 0.11. */
.sq-cta-band__pattern {
  position: absolute;
  inset: 0;
  background-image: url('/assets/islamic-star.svg');
  background-size: 62px 62px;
  background-repeat: repeat;
  opacity: 0.08;
  pointer-events: none;
}

.sq-cta-band__inner {
  position: relative;
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
  text-align: center;
}

/* The pill is dark-tinted, not gold-tinted: a gold wash behind gold text measured
   4.15:1 at the gradient's light midpoint (#5C3D22). Dark tint + gold hairline = 7.9:1. */
.sq-cta-band__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(240, 199, 94, 0.45);
  color: #F0C75E;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sq-cta-band__title {
  color: #FFFFFF;
  font-size: var(--sq-fs-h2);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.sq-cta-band__lede {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--sq-fs-lead);
  line-height: 1.6;
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.sq-cta-band__actions {
  display: flex;
  justify-content: center;
}

/* Primary consumer CTA — paper pill on ink, the inverse of .sq-btn-primary so
   it stays the single loudest element on a dark surface. */
.sq-cta-band__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 2rem;
  border-radius: var(--sq-radius-pill, 999px);
  border: 2px solid var(--sq-paper, #F5EDE0);
  background: var(--sq-paper, #F5EDE0);
  color: var(--sq-ink, #3D2B1F);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: opacity 160ms ease, transform 160ms ease;
}
.sq-cta-band__primary:hover { opacity: 0.92; transform: translateY(-1px); }

.sq-cta-band__stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Store badges. Deliberately quieter than the primary: outline, not fill. */
.sq-cta-band__store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--sq-radius-pill, 999px);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.sq-cta-band__store:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.85);
}
.sq-cta-band__store svg { flex: 0 0 auto; }

.sq-cta-band__proof {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* The dual-tone focus ring from website-components.css: gold hugs the control,
   ink sits outside it. On this dark band the gold is what carries the 3:1. */
.sq-cta-band__primary:focus-visible,
.sq-cta-band__store:focus-visible {
  outline: 3px solid var(--sq-ink, #3D2B1F);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .sq-cta-band__primary,
  .sq-cta-band__store { transition: none; }
  .sq-cta-band__primary:hover { transform: none; }
}

/* The band sits inside <main> on most pages and directly before <footer>; the
   footer already carries its own top margin, so cancel the doubling. */
.sq-cta-band + footer,
main:has(.sq-cta-band:last-child) + footer { margin-top: 0; }


/* ── 2. AA-safe accent inks for light surfaces ───────────────────────────────
 * Measured on --sq-paper (#F5EDE0) / white cards. The bright accent hues are for
 * fills, badges and dark surfaces; on paper they need their deep companions:
 *
 *   rust     #A85638 → 4.46:1  ✗   .sq-ink-rust #7A3F2A → 7.03:1  ✓
 *   terracotta #C4704B → 3.13:1 ✗   .sq-ink-rust                  ✓
 *   teal     #2D9B8E → 3.39:1  ✗   .sq-ink-teal #1B6E64 → 6.07:1  ✓
 *   gold     #C4A030 → 2.49:1  ✗   .sq-ink-gold #8A6A18 → 5.05:1  ✓
 *
 * (Star Gold #F0C75E is never text on a light surface — design-system rule.)
 */
.sq-ink-rust { color: var(--sq-rust-deep, #7A3F2A); }
.sq-ink-teal { color: var(--sq-teal-ink, #1B6E64); }
.sq-ink-gold { color: #8A6A18; }
