﻿/* =============================================================
   Rankri landing v8 - styles.css
   STRUCTURE-ONLY skeleton. Design tokens + layout + placeholder
   styling + motion rules. Real per-section visuals come later.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #060D0A;
  --surface: #0B1712;
  --card: #101F18;

  --border: rgba(255, 255, 255, .08);

  --text: #F2F7F4;
  --muted: #93A79C;

  --brand: #1ED760;
  --brand-deep: #169C46;

  --accent-coral: #FF6B5E;
  --accent-cyan: #38BDF8;
  --accent-amber: #F59E0B;
  --accent-violet: #8B5CF6;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 150ms;
  --dur-ui: 300ms;
  --dur-reveal: 600ms;

  --radius-s: 16px;
  --radius-m: 24px;
  --radius-l: 32px;

  --container: 1120px;

  --header-h: 92px;

  /* Shared "frame" treatment so screenshots + videos read as one family */
  --shadow-frame: 0 24px 60px -24px rgba(0, 0, 0, .65);

  /* Phone frame size caps (DeviceDuo bug fix) */
  --phone-front-h: min(58vh, 520px);
  --phone-peek-h: min(34vh, 300px);
}

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

html { scroll-behavior: smooth; }

::selection {
  background: var(--brand);
  color: #04140a;
  text-shadow: none;
}
::-moz-selection {
  background: var(--brand);
  color: #04140a;
  text-shadow: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; }

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 900; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.lead,
.problem-copy p:not(.eyebrow),
.revise-copy p:not(.eyebrow) { max-width: 60ch; }

.muted { color: var(--muted); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: .75rem;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--brand);
  color: #04140A;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  transition: top var(--dur-ui) var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: 72px 24px;
  background: var(--bg);
}
.section--surface { background: var(--surface); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease),
              opacity var(--dur-micro) var(--ease),
              background-color var(--dur-micro) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand);
  color: #04140A;
}
.btn-primary:hover { background: var(--brand-deep); }

.btn-lg { padding: 16px 32px; font-size: 1.125rem; }

/* ---------- Placeholder boxes ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  background: rgba(255, 255, 255, .015);
  color: var(--muted);
}
.placeholder-label {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  padding: 14px 24px;
  background: transparent;
  transition: padding var(--dur-ui) var(--ease);
}
.site-header.is-scrolled {
  background: transparent;
}

.scroll-progress {
  display: none;
}

.header-inner {
  height: 100%;
  max-width: 1240px;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(8, 18, 13, .34);
  border: 1px solid rgba(242, 247, 244, .13);
  border-radius: 22px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  transition:
    background-color var(--dur-ui) var(--ease),
    border-color var(--dur-ui) var(--ease),
    box-shadow var(--dur-ui) var(--ease);
}
.site-header.is-scrolled .header-inner {
  background: rgba(8, 18, 13, .5);
  border-color: rgba(242, 247, 244, .17);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 29px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-list a {
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  transition: color var(--dur-micro) var(--ease);
}
.nav-list a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-actions > .btn {
  padding: 10px 18px;
  font-size: .9375rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform var(--dur-ui) var(--ease),
              opacity var(--dur-ui) var(--ease);
}

/* ---------- Hero (S1) "The Rank Engine" ---------- */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 48px;
  overflow: hidden;
}
.hero-grid {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 40px;
  align-items: center;
}

/* Copy column (the accessible content) */
.hero-copy { max-width: 60ch; }
.hero-title { margin-bottom: 20px; }
.hero-sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card); }
.replay-glyph { font-size: 1.1em; line-height: 1; }
.hero-trust { font-size: 0.875rem; margin: 0; }

/* Engine visualization */
.hero-engine {
  position: relative;
  min-height: 560px;
  height: 62vh;
  max-height: 640px;
}
.engine-atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .12;
  pointer-events: none;
}
.engine-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.engine-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  transition: stroke-dashoffset var(--dur-reveal) var(--ease),
              opacity var(--dur-ui) var(--ease);
}
.hero-engine.is-landed .engine-line,
.engine-line.is-drawn { stroke-dashoffset: 0; opacity: 1; }

/* Core: rank readout + Today's Plan cluster */
.engine-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(38%, 264px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  z-index: 5;
}
.rank-readout {
  font-weight: 900;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
  color: var(--brand);
  transition: color var(--dur-ui) var(--ease),
              transform var(--dur-micro) var(--ease);
}
.rank-readout.is-live { color: var(--accent-coral); }
.rank-readout.is-nudge { transform: translateY(-6px); }
.rank-readout.is-pulse { transform: scale(1.04); }
.plan-cluster {
  display: grid;
  gap: 8px;
  width: 100%;
}
.plan-mini {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 46px;
  background: var(--card);
}
.engine-landing-line {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease);
}
.hero-engine.is-landed .engine-landing-line,
.engine-landing-line.is-shown { opacity: 1; }

/* Orbit + module nodes */
.module-orbit { position: absolute; inset: 0; z-index: 4; }
.module-node {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--node-scale, 1));
  width: min(20vw, 164px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--text);
  opacity: .5;
  transition: opacity var(--dur-ui) var(--ease),
              border-color var(--dur-ui) var(--ease),
              transform var(--dur-ui) var(--ease);
}
.hero-engine.is-landed .module-node,
.module-node.is-fired { opacity: 1; border-color: var(--node-accent, var(--brand)); }
.module-node.is-pop { --node-scale: 1.06; }
.module-label { font-size: 12px; font-weight: 700; }
.module-crop { display: block; height: 40px; border-radius: 10px; overflow: hidden; }
.module-crop .placeholder-label { font-size: 10px; }

/* Node accents + elliptical placement (matches the SVG line endpoints) */
.node-0 { --node-accent: var(--accent-amber);  left: 18%; top: 20%; }
.node-1 { --node-accent: var(--accent-coral);  left: 50%; top: 12%; }
.node-2 { --node-accent: var(--accent-coral);  left: 82%; top: 20%; }
.node-3 { --node-accent: var(--accent-cyan);   left: 92%; top: 50%; }
.node-4 { --node-accent: var(--accent-amber);  left: 82%; top: 80%; }
.node-5 { --node-accent: var(--accent-violet); left: 50%; top: 88%; }
.node-6 { --node-accent: var(--accent-cyan);   left: 18%; top: 80%; }
.node-7 { --node-accent: var(--accent-violet); left: 8%;  top: 50%; }

/* Transient event cards (pooled) */
.engine-events { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.event-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.9);
  max-width: 190px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  opacity: 0;
  white-space: nowrap;
  transition: transform var(--dur-ui) var(--ease),
              opacity var(--dur-ui) var(--ease);
}

/* Header dock chip */
.rank-dock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--brand);
  font-family: inherit;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transform: scale(.8);
  opacity: 0;
  transition: transform var(--dur-ui) var(--ease),
              opacity var(--dur-ui) var(--ease);
}
.rank-dock.is-shown { transform: scale(1); opacity: 1; }
.rank-dock[hidden] { display: none; }
.rank-dock-arrow { color: var(--brand); font-weight: 900; }

/* ---------- Daily Briefing hero ---------- */
.section--hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-h) + 54px) 0 72px;
  background-color: var(--bg);
  background-image: url("assets/hero/learning-network.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 960px) {
  .nav-list {
    position: fixed;
    inset: var(--header-h) 24px auto 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 20px 24px;
    background: rgba(8, 18, 13, .96);
    border: 1px solid rgba(242, 247, 244, .13);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-ui) var(--ease),
                transform var(--dur-ui) var(--ease);
  }
  .nav-list a {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 1.05rem;
  }
  .site-header.nav-open .nav-list {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: inline-flex; }
}
.section--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      rgba(2, 9, 5, .18) 0%,
      rgba(2, 9, 5, .30) 42%,
      rgba(2, 9, 5, .08) 75%
    ),
    linear-gradient(
      to bottom,
      rgba(2, 8, 5, .05),
      rgba(2, 8, 5, .12) 60%,
      rgba(2, 8, 5, .48) 100%
    );
}
.hero-briefing {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
  text-align: center;
}
.hero-copy {
  max-width: 880px;
  margin-inline: auto;
}
.hero-copy .eyebrow {
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.hero-title {
  max-width: 18ch;
  margin: 0 auto 18px;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  text-shadow:
    0 3px 18px rgba(0, 0, 0, .9),
    0 1px 2px rgba(0, 0, 0, .95);
}
.hero-sub {
  max-width: 66ch;
  margin: 0 auto 24px;
  color: rgba(229, 238, 232, .72);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.55;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, .92),
    0 1px 2px rgba(0, 0, 0, .95);
}
.hero-actions {
  justify-content: center;
  margin-bottom: 26px;
}
#hero .hero-actions .btn-primary {
  padding: 13px 24px;
  font-size: 1rem;
}
#hero .hero-actions .btn {
  border-radius: 999px;
}
.hero-secondary-cta {
  padding: 13px 24px;
  border-color: rgba(242, 247, 244, .28);
}
/* ---------- Exams strip / marquee (S2) ---------- */
.section--strip {
  padding: 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
  overflow: hidden;
}
.marquee {
  padding: 20px 0;
  white-space: nowrap;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
  will-change: transform;
}
.marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--text);
}
.marquee-dot { color: var(--brand); }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Problem (S3) ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.problem-visual { width: 100%; }
.problem-visual .placeholder { height: 100%; }

/* ---------- Solves scrollytelling (S4) ---------- */
.solves-head { margin-bottom: 56px; }
.solves-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.solves-rail {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 72px);
  overflow: hidden;
  scroll-behavior: smooth;
}
.pain-list { display: flex; flex-direction: column; gap: 18px; }
.pain-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--muted);
  opacity: .55;
  transition: opacity var(--dur-ui) var(--ease),
              border-color var(--dur-ui) var(--ease),
              color var(--dur-ui) var(--ease);
}
.pain-item.is-active {
  opacity: 1;
  color: var(--text);
  border-color: var(--brand);
}
.pain-text { font-weight: 700; }

.pain-tick {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  transition: border-color var(--dur-ui) var(--ease),
              background-color var(--dur-ui) var(--ease);
}
.pain-item.is-active .pain-tick,
.solve-panel.is-active .pain-tick--inline {
  border-color: var(--brand);
  background: var(--brand);
}
.pain-tick::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #04140A;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-ui) var(--ease);
}
.pain-item.is-active .pain-tick::after,
.solve-panel.is-active .pain-tick--inline::after { transform: rotate(45deg) scale(1); }

.solves-panels { display: flex; flex-direction: column; gap: 40px; }
.solve-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
  padding: 28px;
}
.solve-fix { font-weight: 700; font-size: 1.125rem; margin-bottom: 18px; }
.pain-tick--inline { display: none; }

/* ---------- Revise (S5) ---------- */
.revise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* The preceding selective-review proof ends close to this practical follow-up. */
#revise { padding-top: 32px; }

/* Keep the full 16:9 review screen while matching the rating card's visual height. */
@media (min-width: 1025px) {
  #revise .revise-visual {
    width: 118%;
    max-width: none;
    /* Align the product frame with the interactive star card, not the heading. */
    margin-top: 220px;
  }
}

/* Reused V7 rating interaction, condensed for V8's two-column revision story. */
.revise-rating-demo {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid rgba(255, 184, 55, .25);
  border-radius: var(--radius-m);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 184, 55, .12), transparent 34%),
    var(--card);
  box-shadow: var(--shadow-frame);
}
.revise-demo-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.revise-demo-topline strong { color: var(--brand); font-size: .72rem; }
.revise-demo-question {
  padding: 16px;
  border: 1px solid rgba(242, 247, 244, .1);
  border-radius: 10px;
  background: rgba(4, 13, 18, .42);
}
.revise-demo-question small { color: #ffba32; font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.revise-demo-question b { display: block; margin-top: 7px; color: var(--text); font-size: 1.05rem; line-height: 1.25; }
.revise-demo-question p { margin: 10px 0 0; color: var(--muted); font-size: .84rem; }
.revise-rating-stars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.revise-rating-stars button {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease), transform var(--dur-micro) var(--ease), background-color var(--dur-micro) var(--ease);
}
.revise-rating-stars button:hover { transform: translateY(-2px); color: var(--rating-color, #ffba32); }
.revise-rating-stars button.is-active {
  border-color: var(--rating-color, #ffba32);
  background: color-mix(in srgb, var(--rating-color, #ffba32) 13%, var(--surface));
  color: var(--rating-color, #ffba32);
}
.revise-demo-result {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid #ffba32;
  border-radius: 10px;
  background: rgba(255, 186, 50, .06);
}
.revise-demo-result > strong { grid-row: span 2; color: #ffba32; font-size: 1.45rem; }
.revise-demo-result span { color: var(--text); font-size: .88rem; font-weight: 800; }
.revise-demo-result small { margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.35; }

/* ---------- DeviceDuo (shared, S5 + S7) ---------- */
.device-duo {
  position: relative;
  width: 100%;
  padding-bottom: 8%;
}
.duo-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-frame);
  transition: transform var(--dur-ui) var(--ease),
              opacity var(--dur-ui) var(--ease),
              height var(--dur-ui) var(--ease);
}
.duo-desktop {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  z-index: 2;
}
/* Phone is HEIGHT-driven and viewport-capped; width comes from the
   9:19.5 aspect-ratio so it can never grow taller than the cap.
   The box is laid out at FRONT size and shown scaled down; promoting it
   is a pure transform (scale in place from the corner), so it never
   moves out from under the cursor and never swaps anchors. */
.duo-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  height: var(--phone-front-h);
  width: auto;
  aspect-ratio: 9 / 19.5;
  transform: rotate(-4deg) scale(.6);
  transform-origin: 100% 100%;
  z-index: 3;
  border-radius: var(--radius-l);
}
.screen-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, .02),
      rgba(255, 255, 255, .02) 12px,
      rgba(255, 255, 255, .04) 12px,
      rgba(255, 255, 255, .04) 24px
    );
  color: var(--muted);
}

/* State: phone brought to front (≥1024px handled in JS via class).
   The phone grows IN PLACE from its bottom-right anchor up to
   --phone-front-h (its layout size) and straightens; the desktop frame
   dims + scales DOWN so the section height never grows and the whole
   phone stays visible without scrolling. Transform-only = no jitter. */
.device-duo.duo-phone-front .duo-desktop {
  opacity: .5;
  transform: scale(.92);
}
.device-duo.duo-phone-front .duo-phone {
  transform: rotate(0deg) scale(1);
  z-index: 4;
}

.duo-toggle {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  z-index: 10;
}
.duo-toggle-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease),
              color var(--dur-micro) var(--ease);
}
.duo-toggle-btn.is-active {
  background: var(--brand);
  color: #04140A;
}

/* ---------- Tabs utility (shared, keyboard-accessible; reusable) ---------- */
.tablist {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 32px;
}
.tab {
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease),
              color var(--dur-micro) var(--ease);
}
.tab.is-active {
  background: var(--brand);
  color: #04140A;
}
.tabpanel[hidden] { display: none; }

/* ---------- Mock Rescue (S6a) - flagship, extra vertical room ---------- */
.section--flagship {
  padding-block: 160px;
  border-top: 2px solid var(--brand); /* the only section with the brand top-accent */
}
.mock-import-head { margin-bottom: 40px; }
/* One step up from the h2 scale, sitting between h2 and h1. */
.flagship-title { font-size: clamp(2.5rem, 4.5vw, 3.5rem); }
.lead--flagship {
  font-size: 1.2rem;
  color: var(--text);
  max-width: 60ch;
  margin-bottom: 8px;
}
.mock-import-clip { margin-bottom: 24px; }

/* Mechanics strip: SPEED + CHOICE. Lighter than the beats: dividers, no cards. */
.mechanics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 48px;
}
.mechanic-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 28px;
  border-left: 1px solid var(--border);
}
.mechanic-tile:first-child { border-left: none; padding-left: 0; }
.mechanic-figure {
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  color: var(--brand);
}
.mechanic-caption {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 32ch;
}

/* Mode picker: real 2x2 option grid styled like the importer extension UI. */
.mode-picker { display: flex; flex-direction: column; gap: 16px; }
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mode-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font-family: inherit;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease),
              background-color var(--dur-micro) var(--ease),
              transform var(--dur-micro) var(--ease);
}
.mode-card:hover { transform: translateY(-2px); }
.mode-card.is-active {
  border-color: var(--brand);
  background: rgba(30, 215, 96, .08);
}
.mode-name { font-weight: 700; font-size: 1rem; }
.mode-desc { font-size: 0.875rem; color: var(--muted); }
.mode-summary { font-size: 0.9375rem; color: var(--muted); margin: 0; }
.mode-summary strong { color: var(--text); font-weight: 700; }

.beats {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 40px;
}
.beat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.beat-visual { flex: 1; }
.beat--feature .beat-visual { border-color: var(--brand); }
.logo-slot { min-height: 64px; }

.mock-import-sim { margin-bottom: 40px; }

.section-punch {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 8px 0 12px;
}
.section-footnote {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* V7's live mock importer, carried across as the complete centrepiece. */
.import-demo {
  display: grid;
  grid-template-columns: .94fr .7fr .88fr;
  gap: 14px;
  margin: 0 0 40px;
}
.import-demo-source, .import-demo-transfer, .import-demo-media {
  min-height: 476px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
  box-shadow: var(--shadow-frame);
}
.import-demo-source { display: flex; flex-direction: column; }
.import-demo-browser { display: flex; align-items: center; gap: 6px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.import-demo-browser i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.import-demo-browser strong { margin-left: 8px; color: var(--muted); font-size: .75rem; }
.import-demo-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.import-demo-score span { padding: 10px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: .64rem; text-transform: uppercase; }
.import-demo-score b { display: block; margin-top: 5px; color: var(--text); font-size: 1.2rem; }
.import-demo-score .is-correct, .import-demo-result > span, .import-demo-result b { color: var(--brand); }
.import-demo-score .is-wrong, .import-demo-questions .is-wrong { color: #35110e; background: #ff8076; }
.import-demo-palette { flex: 1; min-height: 0; padding: 14px; border: 1px solid rgba(242, 247, 244, .1); border-radius: 12px; background: rgba(242, 247, 244, .025); }
.import-demo-palette-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.import-demo-palette-head strong { font-size: .82rem; }
.import-demo-palette-head span { color: var(--muted); font-size: .58rem; font-weight: 700; }
.import-demo-palette-head i { display: inline-block; width: 7px; height: 7px; margin: 0 3px; border-radius: 2px; vertical-align: middle; }
.import-demo-palette-head .is-correct { background: var(--brand); }.import-demo-palette-head .is-wrong { background: #ff8076; }
.import-demo-questions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 12px; }
.import-demo-questions span { display: grid; height: 37px; place-items: center; border-radius: 8px; font-size: .68rem; font-weight: 800; transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease; }
.import-demo-questions .is-correct { color: #05200e; background: var(--brand); }
.import-demo-palette p { margin: 11px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.import-demo-button { width: 100%; margin-top: 13px; padding: 12px; border: 0; border-radius: 10px; background: var(--brand); color: #04140a; font: inherit; font-size: .84rem; font-weight: 900; cursor: pointer; }
.import-demo-button:disabled { cursor: wait; opacity: .7; }
.import-demo-button span { margin-left: 5px; }
.import-demo-transfer { padding: 22px; }
.import-demo-clock { display: grid; width: 108px; height: 108px; margin: 0 auto 16px; place-content: center; border: 6px solid rgba(30, 215, 96, .18); outline: 2px solid var(--brand); outline-offset: -5px; border-radius: 50%; text-align: center; }
.import-demo-clock strong { display: block; font-size: 2.25rem; line-height: 1; }.import-demo-clock span { margin-top: 4px; color: var(--muted); font-size: .6rem; text-transform: uppercase; }
.import-demo-transfer ol { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.import-demo-transfer li { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 9px; color: var(--muted); font-size: .72rem; transition: color .25s ease, background .25s ease; }
.import-demo-transfer li i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--border); border-radius: 50%; font-size: .62rem; font-style: normal; }
.import-demo-transfer li.is-active { color: var(--text); background: rgba(30, 215, 96, .08); }.import-demo-transfer li.is-active i { border-color: var(--brand); background: var(--brand); color: #04140a; }.import-demo-transfer li.is-done { color: var(--brand); }
.import-demo-result {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.import-demo-result > span { font-size: .65rem; font-weight: 900; letter-spacing: .12em; }.import-demo-result h3 { margin: 18px 0; font-size: 1.25rem; line-height: 1.18; }.import-demo-result h3 strong { font-size: 3rem; }
.import-demo-result > div { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(242, 247, 244, .08); font-size: .78rem; }.import-demo-result small { padding: 4px 6px; border-radius: 6px; background: rgba(30, 215, 96, .1); color: var(--brand); font-size: .56rem; font-weight: 800; text-transform: uppercase; }.import-demo-result p { margin: 17px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.import-demo.is-scanning .import-demo-questions .is-wrong { animation: import-demo-pulse .65s ease infinite alternate; }.import-demo.is-extracting .import-demo-questions .is-wrong { transform: translateX(24px) scale(.82); opacity: .18; box-shadow: 0 0 24px #ff8076; }
@keyframes import-demo-pulse { to { transform: scale(1.1); box-shadow: 0 0 18px rgba(255, 128, 118, .75); } }

/* Result block now lives inside the transfer column - compact layout so
   the middle column stays close to the height of its neighbours. */
.import-demo-transfer .import-demo-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
  margin-top: 14px;
  padding-top: 13px;
}
.import-demo-transfer .import-demo-result > span,
.import-demo-transfer .import-demo-result h3,
.import-demo-transfer .import-demo-result p { grid-column: 1 / -1; }
.import-demo-transfer .import-demo-result h3 { margin: 0; font-size: .92rem; line-height: 1.25; }
.import-demo-transfer .import-demo-result h3 strong { font-size: 1.6rem; }
.import-demo-transfer .import-demo-result > div {
  grid-template-columns: 1fr auto auto;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 0;
  border-radius: 8px;
  background: var(--surface);
  font-size: .68rem;
}
.import-demo-transfer .import-demo-result > div small { padding: 3px 5px; font-size: .5rem; }
.import-demo-transfer .import-demo-result p { margin-top: 6px; font-size: .68rem; }

/* Tighter clock + steps in the middle column */
.import-demo-transfer { padding: 18px; }
.import-demo-transfer .import-demo-clock {
  width: 74px;
  height: 74px;
  margin-bottom: 12px;
  border-width: 4px;
}
.import-demo-transfer .import-demo-clock strong { font-size: 1.5rem; }
.import-demo-transfer ol { gap: 5px; }
.import-demo-transfer li { padding: 7px 8px; font-size: .7rem; }
.import-demo-transfer li i { width: 19px; height: 19px; }

/* Third column: static image slot */
.import-demo-media { display: grid; place-items: center; overflow: hidden; }
.import-demo-media .screen-placeholder { height: 100%; min-height: 240px; border-radius: 14px; }
.import-demo-media-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: contain;
  object-position: top center;
  border-radius: 14px;
}

/* Tap-to-start affordance on the import button */
.import-demo-cta { position: relative; }
.import-demo-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  text-align: center;
  transition: opacity var(--dur-ui) var(--ease);
}
.import-demo-tap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: 34px;
  pointer-events: none;
  color: var(--text);
}
.import-demo-tap .tap-ring {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text);
  border-radius: 50%;
  opacity: 0;
  animation: import-tap-ring 1.8s var(--ease) infinite;
}
.import-demo-tap .tap-hand {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
  animation: import-tap-hand 1.8s var(--ease) infinite;
}
@keyframes import-tap-hand {
  0%, 100% { transform: translate(0, 0); }
  38% { transform: translate(-4px, -7px); }
  52% { transform: translate(0, 0); }
}
@keyframes import-tap-ring {
  0%, 45% { transform: scale(.4); opacity: 0; }
  58% { opacity: .8; }
  85%, 100% { transform: scale(2.1); opacity: 0; }
}
/* Once the user has tapped, drop the affordance for good */
.import-demo.is-started .import-demo-tap,
.import-demo.is-started .import-demo-hint { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .import-demo-tap .tap-hand,
  .import-demo-tap .tap-ring { animation: none; }
  .import-demo-tap .tap-ring { opacity: .5; }
}

/* ---------- Mock Progress (S6b) ---------- */
.mock-progress-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.mock-progress-copy { max-width: 70ch; }
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.bullet-slot {
  position: relative;
  padding-left: 26px;
  font-weight: 700;
  color: var(--muted);
}
.bullet-slot::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}
.mock-progress-showcase {
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: radial-gradient(circle at 84% 0%, rgba(30, 215, 96, .1), transparent 34%), var(--card);
  box-shadow: var(--shadow-frame);
}
.mock-progress-showcase-copy { max-width: 78ch; margin-bottom: 22px; }
.mock-progress-showcase-copy p { margin-bottom: 8px; color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mock-progress-showcase-copy h3 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.32; }
.mock-analysis-slider { position: relative; }
.mock-analysis-track { display: flex; width: 100%; aspect-ratio: 16 / 9; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border: 1px solid var(--border); border-radius: 10px; background: #07130f; -webkit-overflow-scrolling: touch; }
.mock-analysis-track::-webkit-scrollbar { display: none; }
.mock-analysis-slide { position: relative; flex: 0 0 100%; margin: 0; min-width: 0; scroll-snap-align: start; background: #07130f; }
.mock-analysis-slide img { width: 100%; height: 100%; object-fit: contain; background: #07130f; }
.mock-analysis-slide figcaption { position: absolute; right: 14px; bottom: 14px; max-width: min(42ch, calc(100% - 28px)); padding: 9px 12px; border: 1px solid rgba(242, 247, 244, .16); border-radius: 8px; background: rgba(3, 13, 9, .86); box-shadow: 0 8px 24px rgba(0, 0, 0, .26); }
.mock-analysis-slide figcaption strong, .mock-analysis-slide figcaption span { display: block; }.mock-analysis-slide figcaption strong { font-size: .82rem; }.mock-analysis-slide figcaption span { margin-top: 2px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.mock-analysis-slider-arrow { position: absolute; z-index: 1; top: 50%; width: 44px; height: 44px; padding: 0; border: 1px solid var(--brand); border-radius: 50%; background: var(--brand); color: #04140a; font: inherit; font-size: 1.3rem; font-weight: 900; cursor: pointer; transform: translateY(-50%); box-shadow: 0 8px 20px rgba(30, 215, 96, .25); }.mock-analysis-slider-arrow:hover { background: #3aef7a; }.mock-analysis-slider-arrow--prev { left: 14px; }.mock-analysis-slider-arrow--next { right: 14px; }
.mock-analysis-slider-count { margin: 10px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }.mock-analysis-slider-count strong { color: var(--brand); }

/* ---------- Topic Room (S7) ---------- */
.topic-room-head {
  max-width: 820px;
  margin-bottom: 40px;
}
.topic-room-head h2 { max-width: 18ch; }
.topic-room-head .lead { max-width: 68ch; margin-top: 18px; }
.topic-room-control {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
  padding: 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 5% 0%, rgba(56, 189, 248, .12), transparent 42%),
    var(--card);
  box-shadow: var(--shadow-frame);
}
.topic-room-kicker,
.topic-room-mode-label {
  display: block;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.topic-room-control-copy h3,
.topic-room-mode h3 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}
.topic-room-control-copy p,
.topic-room-mode p {
  margin: 0;
  color: var(--muted);
}
.topic-room-checks {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.topic-room-checks li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.45;
}
.topic-room-checks li:last-child { border-bottom: 0; }
.topic-room-checks span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 50%;
  color: var(--accent-cyan);
  font-size: .65rem;
  font-weight: 900;
}
.topic-room-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.topic-room-mode {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.topic-room-mode--manual { border-color: rgba(139, 92, 246, .25); }
.topic-room-mode--auto { border-color: rgba(30, 215, 96, .25); }
.topic-room-mode-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
}
.topic-room-mode--manual .topic-room-mode-label { color: #b79afc; }
.topic-room-mode p { max-width: 48ch; }
.topic-room-duo-wrap { max-width: 900px; margin-inline: auto; }
.topic-room-desktop-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow-frame);
}
.topic-room-duo-wrap + .section-punch { margin-top: 56px; }

/* ---------- Content Library (S7b) ---------- */
.content-head { margin-bottom: 40px; }
.content-head .lead { max-width: 62ch; }
.content-tabs .tablist {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
}
.content-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: start;
}
.content-panel[hidden] { display: none; }
.content-copy h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  margin-bottom: 14px;
}
.content-copy p { color: var(--muted); max-width: 58ch; }
.content-copy p + p { margin-top: 12px; }
.content-list-title {
  color: var(--text) !important;
  font-weight: 700;
  margin-top: 18px;
}
.content-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
}
.content-list li {
  position: relative;
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--muted);
  line-height: 1.55;
}
.content-list li::before {
  content: "\2713";
  position: absolute;
  left: 15px;
  top: 12px;
  color: var(--brand);
  font-weight: 900;
}
.content-list-steps { counter-reset: content-step; }
.content-list-steps li { counter-increment: content-step; }
.content-list-steps li::before {
  content: counter(content-step);
  font-family: inherit;
  font-weight: 900;
  color: var(--brand);
}
.content-punch {
  margin-top: 18px !important;
  color: var(--text) !important;
  font-weight: 700;
  border-left: 3px solid var(--brand);
  padding-left: 14px;
}
.content-visual {
  min-height: 460px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
@media (max-width: 1024px) {
  .content-panel { grid-template-columns: 1fr; gap: 28px; }
  .content-visual { position: static; min-height: 320px; }
}
@media (max-width: 640px) {
  .content-tabs .tablist { border-radius: var(--radius-s); }
  .content-tabs .tab { padding: 9px 14px; font-size: .875rem; }
}

/* ---------- Proof teaser (S10b, landing) - sells the click to science.html ---------- */
.proof-teaser-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr);
  gap: 48px;
  align-items: center;
}
.proof-teaser-copy .lead { max-width: 60ch; }
.proof-teaser-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.proof-teaser-note { color: var(--muted); font-size: .85rem; }
@media (max-width: 1024px) {
  .proof-teaser-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Shared research-paper atoms (used on science.html) ---------- */
.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #04140A;
  font-size: .78rem;
  font-weight: 900;
}
.rank-label {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.paper-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.paper-type {
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.paper-year { color: var(--muted); font-size: .8rem; }
.paper h3 {
  margin: 12px 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
}
.paper-authors { color: var(--muted); font-size: .8rem; margin: 0; }
.paper-finding {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(30, 215, 96, .18);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(30, 215, 96, .06);
  color: var(--muted);
  font-size: .92rem;
}
.paper-meaning { margin: 12px 0 0; color: var(--muted); font-size: .9rem; }
.paper-finding strong, .paper-meaning strong { color: var(--text); }
.paper-meta {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.paper-tag {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: .7rem;
}
.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: .84rem;
  text-decoration: none;
}
.paper-link:hover { text-decoration: underline; }

/* ================================================================
   SCIENCE PAGE (science.html) - own nav, editorial article layout
   ================================================================ */
.page-science { background: var(--bg); }

/* Own header, deliberately different from the landing nav */
.sci-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 13, 10, .88);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.sci-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}
.sci-brand { display: inline-flex; align-items: center; gap: 10px; }
.sci-badge {
  padding: 3px 10px;
  border: 1px solid rgba(30, 215, 96, .35);
  border-radius: 999px;
  background: rgba(30, 215, 96, .1);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sci-nav { display: flex; gap: 22px; }
.sci-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.sci-nav a:hover { color: var(--text); }
.sci-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) {
  .sci-nav { display: none; }
  .sci-back { display: none; }
}

/* Hero */
.sci-hero { padding-top: 88px; }
.sci-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
}
.sci-hero-copy h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 18px;
}
.sci-assure {
  margin: 16px 0 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--brand);
  background: rgba(30, 215, 96, .06);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--text);
  font-weight: 700;
  max-width: 58ch;
}

/* Curve panel */
.sci-curve-panel {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
}
.sci-curve-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.sci-curve-label {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
}
.sci-curve { color: var(--text); }
.sci-curve svg { width: 100%; height: auto; overflow: visible; }
.sci-axis-label { font-size: 11px; fill: var(--muted); }
.sci-curve-mark { font-size: 11px; fill: var(--brand); font-weight: 700; }
.sci-curve-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.sci-curve-chips span {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .74rem;
}
.sci-note { margin: 12px 0 0; color: var(--muted); font-size: .76rem; }

/* Typographic statement strip */
.sci-statement {
  border-block: 1px solid var(--border);
  padding: 40px 0;
  background: var(--surface);
}
.sci-statement p {
  margin: 0;
  max-width: 900px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  color: var(--muted);
  font-weight: 700;
}
.sci-statement strong { color: var(--brand); font-weight: 900; }

/* Editorial prose sections */
.sci-prose h2 { max-width: 24ch; }
.sci-prose .lead { max-width: 62ch; }
.sci-argument { max-width: 68ch; display: grid; gap: 18px; margin-top: 24px; }
.sci-argument p { color: var(--muted); line-height: 1.65; }
.sci-argument strong { color: var(--text); }

.sci-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.sci-compare-col {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
}
.sci-compare-col h3 { margin-bottom: 12px; font-size: 1.05rem; }
.sci-compare-col ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.sci-compare-col li { color: var(--muted); font-size: .93rem; }

/* Selective revision: a concrete, scan-first Modern History example. */
.sci-selective-review {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(29, 216, 107, .07), transparent 42%),
    var(--surface);
}
.sci-selective-head {
  max-width: none;
}
.sci-selective-head h2 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  letter-spacing: -.03em;
}
@media (min-width: 1100px) {
  .sci-selective-head h2 {
    font-size: clamp(2.4rem, 4.2vw, 3.8rem);
    white-space: nowrap;
  }
}
.sci-selective-head .lead {
  margin-bottom: 0;
}
.sci-history-example {
  margin-top: 38px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 25, 18, .88);
  box-shadow: var(--shadow-frame);
}
.sci-example-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.sci-example-head h3 {
  max-width: 34ch;
  margin: 6px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}
.sci-example-kicker,
.sci-example-note,
.sci-path-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.sci-example-note {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.sci-memory-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.sci-memory-state {
  display: grid;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
}
.sci-memory-state strong {
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1;
}
.sci-memory-state span {
  margin-top: 8px;
  color: var(--text);
  font-weight: 900;
}
.sci-memory-state small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}
.sci-revision-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 24px;
}
.sci-revision-path {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.sci-revision-path--rankri {
  background: rgba(29, 216, 107, .055);
}
.sci-revision-path h3 {
  margin: 7px 0 14px;
  font-size: 1.15rem;
}
.sci-path-number {
  color: var(--text);
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
}
.sci-revision-path--rankri .sci-path-number {
  color: var(--brand);
}
.sci-path-number small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.3;
}
.sci-revision-path p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.sci-revision-arrow {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 1.6rem;
  font-weight: 900;
}
.sci-selective-punch {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 8px;
  background: #06140d;
  color: var(--muted);
  text-align: center;
}
.sci-selective-punch strong {
  color: var(--text);
}

/* Steps */
.sci-steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  max-width: 760px;
  display: grid;
  gap: 14px;
}
.sci-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
}
.sci-step-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #04140A;
  font-weight: 900;
  font-size: 1.05rem;
}
.sci-steps div { color: var(--muted); line-height: 1.6; }
.sci-steps strong { color: var(--text); }

/* Papers as a numbered editorial reading list */
.sci-papers { margin-top: 40px; display: grid; gap: 14px; }
.sci-paper {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
}
.sci-paper--featured {
  border-color: rgba(30, 215, 96, .32);
  background:
    radial-gradient(circle at 92% 0%, rgba(30, 215, 96, .09), transparent 20rem),
    var(--card);
}
.sci-paper-rail { padding-top: 4px; }
.sci-paper-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.sci-paper-body h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 6px; }
.sci-paper--featured .sci-paper-body h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
@media (max-width: 640px) {
  .sci-paper { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
}

/* Timeline */
.sci-timeline {
  margin-top: 36px;
  position: relative;
  display: grid;
  gap: 6px;
  max-width: 760px;
}
.sci-time-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.sci-time-item:last-child { border-bottom: 0; }
.sci-time-year { color: var(--brand); font-weight: 900; }
.sci-time-item div { color: var(--muted); line-height: 1.6; font-size: .95rem; }
.sci-time-item strong { color: var(--text); }

/* FAQ */
.sci-faq { margin-top: 32px; max-width: 760px; display: grid; gap: 10px; }
.sci-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
  overflow: hidden;
}
.sci-faq summary {
  list-style: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  font-weight: 700;
}
.sci-faq summary::-webkit-details-marker { display: none; }
.sci-faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; font-weight: 500; }
.sci-faq details[open] summary::after { content: "\2212"; }
.sci-faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.6; }

/* Honesty box */
.sci-honesty {
  margin-top: 32px;
  max-width: 760px;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: var(--radius-m);
  background: rgba(245, 158, 11, .05);
}
.sci-honesty h3 { margin-bottom: 8px; }
.sci-honesty p { margin: 0; color: var(--muted); line-height: 1.65; font-size: .95rem; }

/* Science CTA + footer */
.sci-cta { text-align: center; }
.sci-cta-inner { display: grid; justify-items: center; gap: 16px; }
.sci-cta .lead { max-width: 56ch; }
.sci-cta .hero-actions { justify-content: center; }
.sci-cta .btn-lg { padding: 13px 24px; font-size: 1rem; }
.sci-footer { text-align: left; }
.sci-footer-inner { display: grid; gap: 10px; padding-block: 28px; }
.sci-footer-inner a { color: var(--muted); }
.sci-footer-inner a:hover { color: var(--text); }

@media (max-width: 1024px) {
  .sci-hero { padding-top: 64px; }
  .sci-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .sci-compare { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sci-history-example {
    padding: 18px;
  }
  .sci-example-head {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }
  .sci-memory-split {
    grid-template-columns: 1fr;
  }
  .sci-memory-state {
    grid-template-columns: 64px 1fr;
    align-items: center;
    column-gap: 12px;
  }
  .sci-memory-state strong {
    grid-row: span 2;
  }
  .sci-memory-state span,
  .sci-memory-state small {
    margin-top: 0;
  }
  .sci-revision-choice {
    grid-template-columns: 1fr;
  }
  .sci-revision-arrow {
    transform: rotate(90deg);
  }
}

/* ---------- Plan (S8) ---------- */
.plan-head { margin-bottom: 48px; }
.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
  padding: 28px;
}

/* ---------- Enjoy (S9) ---------- */
.enjoy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* ---------- Everything pointers (S10) ---------- */
.everything-head { margin-bottom: 36px; }
.everything-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  max-width: 960px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.everything-points li {
  position: relative;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  line-height: 1.45;
}
.everything-points li::before {
  position: absolute;
  top: 19px;
  left: 0;
  color: var(--brand);
  content: "\2713";
  font-size: 1rem;
  font-weight: 900;
}

/* ---------- CTA (S12) ---------- */
.section--cta { background: var(--surface); text-align: center; }
.section--cta .btn-lg { padding: 13px 24px; font-size: 1rem; }
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.trust-line { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 24px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h4 { color: var(--text); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted); transition: color var(--dur-micro) var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- VideoLoop (shared component) ----------
   Same frame family as screenshots/DeviceDuo: 1px border, radius-m, shadow.
   Degrades to a dashed .video-placeholder until a real clip loads. */
.video-loop {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-frame);
  cursor: default;
}
.video-loop video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-loop-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

/* Placeholder / fallback state - shown until JS confirms a playable clip. */
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  background: rgba(255, 255, 255, .015);
  color: var(--muted);
}
.video-loop.is-loaded .video-placeholder { display: none; }

/* Reduced-motion: circular play button overlay on the poster. */
.video-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 3;
  transition: transform var(--dur-micro) var(--ease),
              background-color var(--dur-micro) var(--ease);
}
.video-play-btn:hover { transform: translate(-50%, -50%) scale(1.06); }

/* ---------- Reveal system (JS-driven via .is-visible) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Motion rules: only transforms/opacity animate.
   No infinite animation besides the S2 marquee. Nothing pulses. ---------- */

/* ---------- Breakpoint: 1024px ---------- */
@media (max-width: 1024px) {
  .solves-layout { grid-template-columns: 1fr; gap: 32px; }
  .solves-rail { display: none; }
  /* collapse to stacked cards: pain, crop, tick - inline tick shown */
  .solve-panel { position: relative; }
  .pain-tick--inline {
    display: inline-flex;
    position: absolute;
    top: 24px;
    right: 24px;
  }

  /* Mock Rescue beats + Topic Room controls stack below 1024px */
  .beats { grid-template-columns: 1fr; }
  .topic-room-control,
  .topic-room-modes { grid-template-columns: 1fr; }
  .topic-room-mode { min-height: 0; }
  .mock-progress-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Daily Briefing hero stays centered and fills the first screen. */
  .section--hero {
    padding-top: calc(var(--header-h) + 48px);
  }
  .hero-copy {
    max-width: 720px;
  }
  .hero-title {
    max-width: 18ch;
  }
  .hero-engine {
    height: auto;
    min-height: auto;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .engine-lines { display: none; }
  .engine-core {
    position: static;
    transform: none;
    width: 100%;
  }
  .module-orbit {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .module-node {
    position: static;
    transform: none;
    width: auto;
    opacity: 1;
    border-color: var(--node-accent, var(--brand));
  }
  .module-node.is-pop { --node-scale: 1; }
  /* On mobile the transient event cards slide in over the static core */
  .engine-events { z-index: 6; }

  /* DeviceDuo: phone is front (height-capped), desktop peeks behind.
     Phone height caps at --phone-front-h so the whole screen fits within
     100dvh minus header; width is derived from the 9:19.5 ratio. */
  .device-duo { padding-bottom: 0; }
  .device-duo .duo-desktop {
    position: absolute;
    top: 0;
    right: 0;
    width: 82%;
    opacity: .45;
    z-index: 1;
  }
  .device-duo .duo-phone {
    position: relative;
    height: var(--phone-front-h);
    width: calc(var(--phone-front-h) * 9 / 19.5);
    max-width: 100%;
    margin-inline: auto;
    transform: rotate(0deg);
    z-index: 2;
  }
  .device-duo.duo-desktop-front .duo-desktop { opacity: 1; z-index: 3; }
  .device-duo.duo-desktop-front .duo-phone { opacity: .5; z-index: 1; }
}

/* ---------- Breakpoint: 640px ---------- */
@media (max-width: 640px) {
  :root { --header-h: 78px; }
  .site-header { padding: 8px 12px; }
  .site-header .header-inner {
    padding-inline: 14px;
    border-radius: 18px;
  }
  .site-header .brand { gap: 7px; }
  .site-header .brand-mark { width: 26px; height: 25px; }
  .section { padding: 48px 20px; }
  .section--strip { padding: 0; }
  .section--flagship { padding-block: 88px; }
  .container { padding-inline: 20px; }
  .section--hero {
    padding: calc(var(--header-h) + 34px) 0 56px;
  }
  .hero-briefing {
    padding-inline: 20px;
  }
  .hero-title {
    max-width: 16ch;
    margin-bottom: 16px;
    font-size: clamp(2.45rem, 11.5vw, 3.1rem);
  }
  .hero-sub {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.55;
  }
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .nav-list { inset: var(--header-h) 12px auto 12px; }
  .header-actions > .btn {
    padding: 9px 13px;
    font-size: .825rem;
  }

  .problem-grid,
  .revise-grid,
  .enjoy-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Mechanics strip stacks; dividers move to the top edge */
  .mechanics-strip { grid-template-columns: 1fr; }
  .mechanic-tile {
    padding: 20px 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .mechanic-tile:first-child { border-top: none; padding-top: 0; }

  /* Mode picker single column on phones */
  .mode-grid { grid-template-columns: 1fr; }

  .plan-cards { grid-template-columns: 1fr; }
  .everything-points { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: span 2; }

}

/* ---------- prefers-reduced-motion: kill transitions + marquee ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; transform: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Product-image demo pass ----------
   Owner-supplied captures fill unfinished media slots while the final
   screenshot set is assembled. */
.placeholder,
.screen-placeholder,
.video-placeholder {
  position: relative;
  overflow: hidden;
  border-style: solid;
  border-color: rgba(151, 171, 184, .26);
  background-image:
    linear-gradient(180deg, rgba(4, 13, 18, .02), rgba(4, 13, 18, .18)),
    url("assets/screens/desktop/dashboard.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
  border-radius: 8px;
}

.placeholder-label {
  display: none;
}

/* Memory and card-review surfaces. */
#problem .placeholder,
#revise .placeholder,
#revise .screen-placeholder,
#revise .video-placeholder,
#content .content-visual {
  background-image:
    linear-gradient(180deg, rgba(18, 12, 28, .02), rgba(18, 12, 28, .18)),
    url("assets/screens/desktop/vocabulary-review.webp");
  background-position: center 30%;
}

/* Give each pain-point panel a believable temporary product crop. */
#solves [data-solve-panel="0"] .placeholder {
  background-image:
    linear-gradient(180deg, rgba(18, 12, 28, .02), rgba(18, 12, 28, .18)),
    url("assets/screens/desktop/vocabulary-review.webp");
}

#solves [data-solve-panel="2"] .placeholder {
  background-image:
    linear-gradient(180deg, rgba(4, 13, 18, .02), rgba(4, 13, 18, .16)),
    url("assets/screens/desktop/leagues.webp");
}

#solves [data-solve-panel="6"] .placeholder {
  background-image:
    linear-gradient(180deg, rgba(4, 13, 18, .02), rgba(4, 13, 18, .16)),
    url("assets/screens/desktop/notebook-weak-areas.webp");
}

/* The large proof screenshots are full product frames, not decorative crops.
   Keep their native 16:9 ratio so the header and lower rows both remain visible. */
#solves .solve-panel {
  border-radius: 10px;
}

#solves .solve-panel > .placeholder {
  width: 100%;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  padding: 0;
  background-color: #07130f;
  background-size: contain;
  background-position: center;
}

/* Notebook proof panel: three full desktop views in a swipeable 16:9 slider. */
.notebook-slider {
  position: relative;
  width: 100%;
}
.notebook-slider-track {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #07130f;
  -webkit-overflow-scrolling: touch;
}
.notebook-slider-track::-webkit-scrollbar { display: none; }
.notebook-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}
.notebook-slide-screen {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.notebook-slide-screen--library { background-image: url("assets/screens/desktop/notebook-library.webp"); }
.notebook-slide-screen--chapters { background-image: url("assets/screens/desktop/notebook-chapters.webp"); }
.notebook-slide-screen--weak-areas { background-image: url("assets/screens/desktop/notebook-weak-areas.webp"); }
.notebook-slide-screen--book { background-image: url("assets/screens/desktop/notebook-book-view.webp"); }
.notebook-slide figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(242, 247, 244, .16);
  border-radius: 999px;
  background: rgba(3, 13, 9, .78);
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
}
.notebook-slider-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--brand);
  border-radius: 50%;
  background: var(--brand);
  color: #04140a;
  font-size: 1.05rem;
  cursor: pointer;
  transform: translateY(-50%);
}
.notebook-slider-arrow:hover { background: #3aef7a; }
.notebook-slider-arrow--prev { left: 12px; }
.notebook-slider-arrow--next { right: 12px; }
.notebook-slider-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}
.notebook-slider-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}
.notebook-slider-dots button[aria-pressed="true"] {
  width: 22px;
  border-radius: 999px;
  background: var(--brand);
}

/* Topic Room: the matching unlock/sub-topic capture. */
#topic-room .placeholder,
#topic-room .screen-placeholder {
  background-image:
    linear-gradient(180deg, rgba(4, 13, 18, .02), rgba(4, 13, 18, .16)),
    url("assets/screens/desktop/topic-room.webp");
  background-position: center 28%;
}

/* Leagues and motivation: the matching Crystal League capture. */
#enjoy .placeholder,
#enjoy .video-placeholder {
  background-image:
    linear-gradient(180deg, rgba(4, 13, 18, .02), rgba(4, 13, 18, .14)),
    url("assets/screens/desktop/leagues.webp");
  background-position: center 22%;
}

/* The hero nodes become small, varied glimpses instead of wireframe boxes. */
#hero .node-0 .screen-placeholder,
#hero .node-4 .screen-placeholder {
  background-image: url("assets/screens/desktop/vocabulary-review.webp");
}

#hero .node-3 .screen-placeholder,
#hero .node-5 .screen-placeholder {
  background-image: url("assets/screens/desktop/topic-room.webp");
}

#hero .node-2 .screen-placeholder,
#hero .node-7 .screen-placeholder {
  background-image: url("assets/screens/desktop/leagues.webp");
}

/* Planner and Notebook cards use their matching product views. Keep the full
   16:9 frame visible so navigation and lower controls are never cropped. */
#plan .plan-card .placeholder {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  background-color: #07130f;
  background-size: contain;
  background-position: center;
}

#plan .plan-card:nth-child(1) .placeholder {
  background-image: url("assets/screens/desktop/planner-roadmap.webp");
}

#plan .plan-card:nth-child(2) .placeholder {
  background-image: url("assets/screens/desktop/notebook-chapters.webp");
}

#plan .plan-card:nth-child(3) .placeholder {
  background-image: url("assets/screens/desktop/planner-days.webp");
}

@media (max-width: 1024px) {
  .import-demo { grid-template-columns: 1fr; }
  .import-demo-source, .import-demo-transfer, .import-demo-media { min-height: 0; }
  .import-demo-transfer ol { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .import-demo { gap: 12px; }
  .import-demo-source, .import-demo-transfer, .import-demo-media { padding: 14px; }
  .import-demo-transfer ol { grid-template-columns: 1fr; }
  .import-demo-questions span { height: 32px; }
  .import-demo-score span { padding: 8px; }
  .mock-analysis-slider-arrow { width: 38px; height: 38px; }
  .mock-analysis-slider-arrow--prev { left: 9px; }
  .mock-analysis-slider-arrow--next { right: 9px; }
  .mock-analysis-slide figcaption { right: 9px; bottom: 9px; padding: 7px 9px; }
}
