/* ── QEDspace landing page ─────────────────────────────────────────────────
   "The problem is the page": a rotating qualifying-exam problem set in huge
   Source Serif 4 IS the hero — no card, no border, pure typography on paper.
   Shares the warm textbook tokens from src/index.css. No App.css here —
   the landing page is vanilla DOM, so it carries its own component styles,
   written in the same visual language as the app (serif body, Inter UI
   chrome, ink-brown primary, 1px var(--border) hairlines). */

.landing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Paper-grain overlay: inline SVG feTurbulence tile, fixed over the whole
   page, pointer-events none. Blend/opacity are keyed per theme so the grain
   reads as paper tooth on the light palette and as faint luminance texture
   (not dirt) on the dark/blueprint palettes. */
.landing-body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.055;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .landing-body::after {
    mix-blend-mode: soft-light;
    opacity: 0.07;
  }
}
:root.dark .landing-body::after,
:root.blueprint .landing-body::after {
  mix-blend-mode: soft-light;
  opacity: 0.07;
}

.landing-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* The hidden attribute must beat our own display rules on toggled views. */
.landing-cta-row[hidden],
.landing-signedin[hidden],
.landing-login-btn[hidden],
.landing-field[hidden],
.landing-mode-line[hidden],
.landing-auth-form[hidden],
.landing-auth-confirm[hidden] {
  display: none !important;
}

/* Screen-reader-only page title. */
.landing-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Top bar ── */
.landing-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 16px;
}

.landing-logo {
  height: 38px;
  width: auto;
  display: block;
}

/* Black-on-transparent logo needs inverting when the OS dark palette from
   index.css kicks in — same treatment the app header uses. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) .landing-logo { filter: invert(1); }
}
:root.dark .landing-logo { filter: invert(1); }
:root.blueprint .landing-logo { filter: invert(1); }

.landing-login-btn {
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font: 500 16px/1 var(--sans);
  letter-spacing: 0.03em;
  color: var(--surface);
  padding: 12px 23px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing-login-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Fine double hairline under the letterhead — two 1px rules, 2px apart
   (border-box: the 4px height includes both borders). */
.landing-rule-double {
  height: 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Hero: the rotating problem ── */
.landing-main {
  flex: 1;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px 8px;
}

/* All four slides share one grid cell; the tallest sets the height, so
   crossfades never reflow the pitch/CTA below. Inactive slides keep their
   layout (opacity only — never display:none, MathJax metrics must survive).
   The rotator is a card: the box gives the problem visual separation, and
   shorter problems center vertically inside it instead of leaving a hole. */
.landing-rotator {
  display: grid;
  align-items: start;
  justify-items: center;
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 4.5vw, 52px) clamp(22px, 4vw, 56px);
}

.landing-slide {
  grid-area: 1 / 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* vertical centering inside the box */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.landing-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.landing-kicker {
  font: 600 11.5px/1.5 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* Difficulty word in the kicker, tinted with the app's difficulty tokens. */
.landing-kicker-diff.landing-diff-medium { color: var(--medium); }
.landing-kicker-diff.landing-diff-hard { color: var(--hard); }

/* Softer than the survey draft: a step smaller, more leading, on the card
   surface — reads like a set exam page, not a display headline. */
.landing-problem {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 2.7vw, 29px); /* 20% down from clamp(23px, 3.4vw, 36px) */
  line-height: 1.58;
  color: var(--text-soft);
  max-width: 740px;
}

.landing-pitch {
  margin-top: 26px;
  font: 400 15px/1.75 var(--sans);
  color: var(--text-muted);
  max-width: 540px;
}

/* ── CTA row / signed-in state ── */
.landing-cta-row {
  margin-top: 30px;
}

.landing-cta {
  display: inline-block;
  background: var(--primary);
  color: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 6px;
  font: 500 15.5px/1 var(--sans);
  letter-spacing: 0.01em;
  padding: 17px 40px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.landing-cta:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.landing-signedin {
  margin-top: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.landing-signedin-line {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text-soft);
}

.landing-signedin-email {
  font-weight: 600;
  color: var(--text);
}

.landing-signout {
  border: none;
  background: none;
  padding: 0;
  font: 400 13px/1 var(--sans);
  color: var(--text-muted);
  cursor: pointer;
}

.landing-signout:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Inline auth panel (slides open under the CTA) ─────────────────────────
   0fr → 1fr grid collapse for the height animation; visibility is delayed
   past the collapse so the closed panel's inputs are out of the tab order
   and out of the accessibility tree without ever using display:none. */
.landing-auth {
  width: 100%;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 0.5s cubic-bezier(0.33, 0, 0.15, 1),
    opacity 0.45s ease,
    visibility 0s linear 0.5s;
}

.landing-auth.open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition:
    grid-template-rows 0.5s cubic-bezier(0.33, 0, 0.15, 1),
    opacity 0.45s ease,
    visibility 0s;
}

.landing-auth-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  justify-content: center;
}

.landing-auth-col {
  width: min(340px, 100%);
  padding: 54px 4px 8px;
}

.landing-auth-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 28px;
}

.landing-field {
  display: block;
  text-align: left;
  margin-bottom: 24px;
}

.landing-field-label {
  display: block;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 7px;
}

.landing-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  font: 400 16px/1.4 var(--sans);
  color: var(--text);
  padding: 6px 1px 9px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.landing-input:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 1px 0 0 color-mix(in srgb, var(--primary) 45%, transparent);
}

/* Reserved line — cleared via textContent, never display:none, so the
   role="alert" region always exists for assistive tech. */
.landing-auth-error {
  font: 400 13.5px/1.55 var(--sans);
  color: var(--wrong);
  text-align: left;
  /* Match one rendered line (line-height 1.55) so a one-line error causes
     zero layout shift against the empty reserved line. */
  min-height: 1.55em;
  margin: -8px 0 16px;
}

.landing-submit {
  width: 100%;
  background: var(--primary);
  color: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 6px;
  font: 500 14.5px/1 var(--sans);
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.15s ease;
}

.landing-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.landing-submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.landing-mode-line {
  margin-top: 20px;
  text-align: center;
  font: 400 13.5px/1.6 var(--sans);
  color: var(--text-muted);
}

.landing-mode-toggle,
.landing-confirm-login {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-mode-toggle:hover,
.landing-confirm-login:hover {
  color: var(--primary-hover);
}

.landing-auth-confirm {
  text-align: center;
}

.landing-confirm-text {
  font: 400 14.5px/1.75 var(--sans);
  color: var(--text-muted);
  margin-bottom: 22px;
}

.landing-confirm-login {
  font: 500 14px/1 var(--sans);
}

/* ── Middle panel: blurb + Preview (vignette) on a faint surface band ── */
.landing-middle {
  margin-top: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 72px;
}

.landing-middle-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.landing-blurb {
  text-align: left;
  /* Optical alignment with the preview column's card top. */
  padding-top: 6px;
}

.landing-blurb-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
  max-width: 46ch;
}

.landing-blurb-text + .landing-blurb-text {
  margin-top: 1em;
}

.landing-preview {
  text-align: center;
  max-width: 720px;
  justify-self: center;
  width: 100%;
}

/* The vignette card sits on the surface band — lift it onto bg-colored paper
   so it stays distinct. */
.landing-middle .vignette-card {
  background: var(--bg);
}

.landing-section-kicker {
  margin-bottom: 26px;
}

/* ── Bottom panel: plans & pricing ── */
.landing-pricing {
  text-align: center;
  padding: 72px 0 88px;
}

.landing-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: stretch;
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.landing-plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.4rem;
}

.landing-plan-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--text);
}

.landing-plan-price {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
  color: var(--text);
  margin: 10px 0 14px;
}

.landing-plan-per {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.landing-plan-incl {
  font: 500 12.5px/1.5 var(--sans);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.landing-plan-features {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  flex: 1;
}

.landing-plan-features li {
  font: 400 13.5px/1.55 var(--sans);
  color: var(--text-soft);
  padding: 7px 0;
  border-top: 1px solid var(--border);
}

.landing-plan-features li:first-child {
  border-top: none;
}

.landing-plan-cta {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font: 500 14px/1 var(--sans);
  color: var(--text);
  padding: 12px 0;
  width: 100%;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.landing-plan-cta:hover {
  border-color: var(--primary);
  color: var(--primary);
}


/* ── The Vignette ──────────────────────────────────────────────────────────
   A mini problem card acting out one study loop. Every element is present in
   the DOM at full size from load (math already typeset); animation reveals
   via opacity/transform only, so the card's height never jumps. */

/* Vignette card + mini reference panel side by side, echoing the app's
   problem-area / reference-panel layout. */
.vg-duo {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.vignette-card {
  flex: 1;
  min-width: 0; /* lets the card shrink inside the flex row */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.6rem;
  text-align: left;
}

/* ── Mini reference panel (cards only — the Reveal Gate in miniature) ── */
.vg-refpanel {
  width: 200px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 0.85rem;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.vg-refpanel.on {
  opacity: 1;
  transform: none;
}

.vg-refpanel.fading {
  opacity: 0;
}

.vg-refpanel-head {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.65rem;
}

.vg-refcard {
  padding: 0.55rem 0.1rem;
  transition: filter 0.6s ease;
}

.vg-refcard + .vg-refcard {
  border-top: 1px solid var(--border);
}

/* The Reveal Gate: gated cards blur until the proof reveals. */
.vg-refcard.vg-blurred {
  filter: blur(3.5px);
  user-select: none;
}

.vg-refcard-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.vg-refcard-name {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.vg-refbadge {
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
}

.vg-refcard-text {
  font-family: var(--serif);
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.vg-stage {
  transition: opacity 0.6s ease;
}

.vg-stage.fading {
  opacity: 0;
}

.vg-step {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.vg-step.on {
  opacity: 1;
  transform: none;
}

/* Loop reset: while the stage is fully faded out, the steps snap back to
   their hidden start state with transitions off — otherwise the previous
   cycle ghosts through the fade-in. */
.vg-stage.resetting .vg-step {
  transition: none !important;
}

/* Reduced-motion / static rendering: complete final state, no movement.
   The grading transient stays hidden — it is not part of the finished
   picture; the preview segments are all revealed. */
.vg-stage.static .vg-step,
.vg-stage.static .vg-seg {
  opacity: 1;
  transform: none;
  transition: none;
}

.vg-stage.static .vg-grading {
  opacity: 0;
}

.vg-meta {
  margin-bottom: 0.6rem;
}

.vg-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.14rem 0.65rem;
  border-radius: 999px;
  color: var(--medium);
  border: 1px solid var(--medium);
  background: transparent;
}

.vg-question {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

/* Easy pill variant for the vignette's demo problem. */
.vg-pill-easy {
  color: var(--easy);
  border-color: var(--easy);
}

.vg-answer {
  margin-top: 1rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem 0.9rem;
}

.vg-answer-label,
.vg-preview-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* The raw LaTeX source line — monospace, code-like, types itself. Reserved
   height: the 108-char source wraps to ~2 lines at desktop widths; the
   narrow-viewport block below reserves more. */
.vg-source {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-soft);
  /* ~140-char source wraps to ~3 lines beside the reference rail. */
  min-height: 5.2em;
  word-break: break-word;
}

/* Rendered preview under the source — the segments fade in as the typed
   source crosses their boundaries (the live-rendering illusion). */
.vg-preview {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
}

.vg-preview-text {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 5.1em; /* reserve the rendered lines so reveals never reflow */
}

.vg-seg {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.vg-seg.on {
  opacity: 1;
}

.vg-caret {
  display: none;
  border-right: 2px solid var(--text-muted);
  margin-left: 1px;
}

.vg-answer.typing .vg-caret {
  display: inline;
  animation: vg-blink 1s steps(1) infinite;
}

@keyframes vg-blink {
  50% { opacity: 0; }
}

.vg-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.vg-submit-btn {
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--surface);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: default;
  pointer-events: none; /* decorative — the vignette presses it, not the user */
  transition: all 0.2s ease;
}

.vg-submit-btn.pressed {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(1px);
}

.vg-grading {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vg-grading.show {
  opacity: 1;
}

.vg-grade-box {
  margin-top: 0.9rem;
}

.vg-grade-line {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--correct); /* the app's correct-grading green (#4f7a3a in the light palette) */
}

.vg-grade-note {
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-soft);
}

/* Formal Proof — shown in full (the study loop's final beat). */
.vg-proofcard {
  margin: 1rem 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1.2rem 1.1rem;
}

.vg-proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.vg-proof-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.vg-qed {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text-soft);
}

.vg-proof-text {
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-soft);
}

/* ── Whisper footer ── */
.landing-footer {
  text-align: center;
  padding: 0 20px 30px;
  font-family: var(--sans);
  color: var(--text-light);
}

.landing-footer-rule {
  width: 72px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 22px;
}

.landing-footer-line {
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.landing-footer-copy {
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ── Keyboard focus (color-mix halo — no hardcoded rgba browns) ── */
.landing-login-btn:focus-visible,
.landing-cta:focus-visible,
.landing-submit:focus-visible,
.landing-mode-toggle:focus-visible,
.landing-confirm-login:focus-visible,
.landing-signout:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .landing-topbar-row {
    padding: 16px 0 12px;
  }

  .landing-hero {
    padding: 44px 18px 4px;
  }

  .landing-kicker {
    letter-spacing: 0.18em;
    margin-bottom: 32px;
  }

  .landing-problem {
    line-height: 1.5;
  }

  .landing-pitch {
    margin-top: 28px;
  }

  .landing-cta-row,
  .landing-signedin {
    margin-top: 36px;
  }

  .landing-cta {
    padding: 15px 32px;
  }
}

/* The mini reference rail needs real width beside the card; below this it
   comes off (the app itself collapses the reference panel on small screens). */
@media (max-width: 640px) {
  .vg-refpanel {
    display: none;
  }
}

/* Middle panel and pricing stack to one column on narrow screens. */
@media (max-width: 800px) {
  .landing-middle-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .landing-blurb {
    text-align: center;
    padding-top: 0;
  }

  .landing-blurb-text {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-plans {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
}

@media (max-width: 420px) {
  .landing-wrap {
    padding: 0 1rem;
  }

  .landing-middle {
    margin-top: 44px;
    padding: 48px 0 56px;
  }

  .landing-pricing {
    padding: 56px 0 72px;
  }

  .vignette-card {
    padding: 1.2rem 1.1rem;
  }

  /* At this width the 108-char LaTeX source and its rendered preview each
     wrap to ~4 lines — reserve them so the card never jumps mid-typing. */
  .vg-source,
  .vg-preview-text {
    min-height: 7em;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .landing-slide,
  .landing-auth,
  .vg-stage,
  .vg-step,
  .vg-seg,
  .vg-submit-btn,
  .vg-grading,
  .vg-refpanel,
  .vg-refcard,
  .landing-cta,
  .landing-submit {
    transition: none !important;
    animation: none !important;
  }

  .vg-caret {
    display: none !important;
  }
}
