/* ================================================================
   IndianTyping.com — english-test.css
   English Typing Test (/typing-test/english/) only.

   Isolated on purpose: the legacy test.css still serves the Hindi
   test and both practice pages and is not touched by this rebuild.
   Every class here is `.et-` prefixed so the two can never collide.

   Uses ONLY design tokens from main.css. No new colours, no new
   fonts, no hard-coded hex values.
================================================================ */

.et-page {
  max-width: var(--test-max);
  margin: 0 auto;
  /* The site nav is position:fixed and #main-content is not offset for it
     (main.css), so every page clears it itself — same convention as
     tool.css and test.css. Without this the first 64px of the page sits
     underneath the nav. */
  padding: calc(var(--nav-h) + 28px) 20px 64px;
}

/* Visually hidden but still announced. main.css has no such utility, so it
   is defined here rather than added to a shared file that currently carries
   unrelated in-flight changes. */
/* .sr-only is defined globally in main.css — see the note there. */

/* The three screens. Only one is ever in the accessibility tree —
   `hidden` removes the others outright rather than hiding them
   visually, so a screen reader never walks an inactive screen. */
.et-screen[hidden] { display: none; }

/* ================================================================
   1. SETUP
================================================================ */
.et-intro { text-align: center; margin-bottom: 28px; }

.et-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-dim);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.et-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.et-title span { color: var(--brand); }

.et-sub {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 46ch;
  margin: 0 auto;
}

.et-setup {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
}

.et-field-label {
  display: block;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.et-durations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.et-dur {
  appearance: none;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 16px 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease), transform 0.15s var(--ease);
}
.et-dur:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.et-dur-num  { font-size: 22px; font-weight: 800; line-height: 1; color: var(--text-1); }
.et-dur-unit { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.et-dur[aria-pressed="true"] {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: var(--brand);
}
.et-dur[aria-pressed="true"] .et-dur-num { color: var(--brand); }

/* Difficulty — intentionally quieter than duration: smaller type, no big
   numerals, a single row. Duration stays the primary decision. */
.et-field-label-sub { margin-top: 4px; }

.et-levels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.et-level {
  appearance: none;
  font-family: inherit;
  /* 1 1 0 not 1 1 auto: sizing from content made the three buttons visibly
     unequal, which reads as a layout mistake rather than a hierarchy. */
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  font-size: 14px; font-weight: 600;
  text-align: left;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.et-level:hover { border-color: var(--border-strong); }

.et-level-hint {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-3);
}

.et-level[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--text-1);
  color: var(--text-1);
}
.et-level[aria-pressed="true"] .et-level-hint { color: var(--text-2); }

/* Which test is running — quiet, informational, sits between the live
   metrics and the timer. */
.et-test-meta {
  margin: 0;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3);
}

.et-start {
  appearance: none;
  font-family: inherit;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 24px;
  font-size: 17px; font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), filter 0.15s var(--ease);
}
.et-start:hover  { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: brightness(1.05); }
.et-start:active { transform: translateY(0); }

.et-start-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin: 12px 0 0;
}

kbd.et-key {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 1px 7px;
  color: var(--text-2);
}

/* ================================================================
   2. ACTIVE TEST
================================================================ */
.et-hud {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.et-metrics { display: flex; align-items: baseline; gap: 24px; }

.et-metric { display: flex; align-items: baseline; gap: 7px; }

.et-metric-val {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; line-height: 1;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.et-metric-lbl {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3);
}

.et-timer {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 15px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 18px; font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.et-timer.is-warning  { color: var(--amber); border-color: var(--amber); background: var(--amber-dim); }
.et-timer.is-critical { color: var(--red);   border-color: var(--red);   background: var(--red-dim); }

.et-timer-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: et-pulse 2s var(--ease) infinite;
}
.et-timer.is-warning  .et-timer-dot { background: var(--amber); }
.et-timer.is-critical .et-timer-dot { background: var(--red); animation-duration: 0.8s; }

@keyframes et-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.et-progress {
  height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.et-progress-fill {
  height: 100%; width: 100%;
  background: var(--brand);
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 0.2s linear;
}

/* --- the typing surface: the visual focus of the page --- */
.et-surface {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 30px 30px 26px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.et-surface.is-focused {
  border-color: var(--brand);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--brand-glow);
}

/* Fixed-height viewport showing a few lines; the inner block slides up
   so the active line stays put. Scrolling the passage rather than the
   page means the caret never drifts under a mobile keyboard. */
.et-viewport {
  /* The font-size lives HERE, not on .et-passage, so that `em` in the height
     below resolves against the passage's own type size. With it on the
     passage, --et-line-h measured 2 x 16px inherited = 32px while the real
     line box was 42px, and the viewport showed 2.3 lines instead of 3 —
     clipping the third line in half. */
  font-size: clamp(17px, 2.4vw, 21px);
  --et-line-h: 2em;
  height: calc(var(--et-line-h) * 3);
  overflow: hidden;
  position: relative;
}

.et-passage {
  font-family: var(--mono);
  font-size: inherit;
  line-height: 2em;
  letter-spacing: 0.01em;
  color: var(--text-3);              /* not yet typed */
  white-space: pre-wrap;
  word-break: break-word;
  transition: transform 0.18s var(--ease);
  will-change: transform;
}

/* Character states. Correct text takes the primary text colour rather
   than a green wash: over a ten-minute test a fully coloured passage
   is fatiguing, and the contrast step from --text-3 to --text-1 already
   reads unambiguously as progress. Errors stay loud. */
.et-c.is-ok    { color: var(--text-1); }
.et-c.is-bad   { color: var(--red); background: var(--red-dim); border-radius: 2px; }
/* A character typed past the end of a word/passage still has to be seen. */
.et-c.is-extra { color: var(--red); background: var(--red-dim); text-decoration: underline wavy; }

/* Caret sits before the current character. */
.et-c.is-current { position: relative; }
.et-c.is-current::before {
  content: '';
  position: absolute; left: -2px; top: 0.18em; bottom: 0.18em;
  width: 2px;
  background: var(--brand);
  border-radius: 1px;
  animation: et-blink 1.1s steps(1) infinite;
}
@keyframes et-blink { 0%,45% { opacity: 1; } 50%,95% { opacity: 0; } 100% { opacity: 1; } }

/* The real input. Invisible but present and focusable, so mobile raises
   the keyboard and the caret/selection stay where the browser expects. */
.et-input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  border: none; padding: 0; margin: 0;
  resize: none;
  font-size: 16px;         /* < 16px makes iOS zoom the page on focus */
  cursor: text;
}

/* Focus-lost affordance. Sits above the invisible input so the whole panel
   reads as "not receiving your keystrokes", but stays pointer-transparent so
   the click still lands on the input underneath and resumes immediately. */
.et-resume {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  /* Opaque fallback first: browsers without color-mix still get a legible
     panel rather than an invisible one. */
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-radius: var(--r-xl);
  pointer-events: none;
}
.et-surface.is-blurred .et-resume { display: flex; }

.et-resume-pill {
  padding: 10px 18px;
  font-size: 14px; font-weight: 700;
  color: var(--text-1);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.et-hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.et-quit {
  appearance: none; font-family: inherit;
  display: block; margin: 18px auto 0;
  padding: 9px 18px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.et-quit:hover { border-color: var(--border-strong); color: var(--text-1); }

/* ================================================================
   3. RESULTS
================================================================ */
.et-result-hero {
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 34px 24px 30px;
  margin-bottom: 16px;
}

.et-result-eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.et-score {
  font-family: var(--font-display);
  font-size: clamp(56px, 12vw, 84px);
  font-weight: 800; line-height: 1;
  color: var(--brand);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.et-score-unit {
  display: block;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
  margin-top: 6px;
}
.et-score-note { font-size: 14px; color: var(--text-2); margin: 14px 0 0; }

.et-stats {
  display: grid;
  /* auto-fit, not a fixed 4 columns: Consistency hides itself when the engine
     could not measure it, and a fixed grid left an empty fourth slot. */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.et-stat[hidden] { display: none; }

.et-stat {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 12px;
  text-align: center;
}
.et-stat-val {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800; line-height: 1;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.et-stat-lbl {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-3);
  margin-top: 7px;
}
.et-stat-val.is-good { color: var(--green); }
.et-stat-val.is-bad  { color: var(--red); }

/* Personal best line — scoped to this duration + difficulty. */
.et-pb {
  margin: 12px 0 0;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
}
.et-pb.is-best {
  display: inline-block;
  color: var(--green);
  background: var(--green-dim);
  border-radius: 999px;
  padding: 6px 14px;
}

/* Insights — at most three short lines, never a report. */
.et-insights {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.et-insight {
  position: relative;
  padding: 12px 16px 12px 38px;
  font-size: 14px; line-height: 1.55;
  color: var(--text-1);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
}
.et-insight::before {
  position: absolute; left: 14px; top: 12px;
  font-size: 13px;
}
.et-insight.is-good::before   { content: '▲'; color: var(--green); }
.et-insight.is-action::before { content: '●'; color: var(--amber); }
.et-insight.is-neutral::before{ content: '■'; color: var(--text-3); }

/* Trend — inline SVG sparklines, no chart library. */
.et-trend {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.et-trend h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px;
}
.et-trend-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.et-trend-lbl {
  flex: 0 0 74px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--text-3);
}
.et-spark {
  flex: 1 1 auto;
  height: 28px; min-width: 0;
  overflow: visible;
}
.et-spark polyline { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.et-spark.is-wpm polyline { stroke: var(--brand); }
.et-spark.is-acc polyline { stroke: var(--green); }
.et-trend-now {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  min-width: 4ch; text-align: right;
}
.et-trend-note, .et-trend-empty {
  margin: 10px 0 0;
  font-size: 13px; line-height: 1.5;
  color: var(--text-3);
}
.et-trend-empty[hidden] { display: none; }

/* Next actions — real destinations only. */
.et-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.et-next-item {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.et-next-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.et-next-title { display: block; font-size: 14px; font-weight: 700; color: var(--text-1); }
.et-next-desc  { display: block; font-size: 12px; line-height: 1.5; color: var(--text-2); margin-top: 3px; }

/* Share — deliberately quiet. */
.et-share-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.et-share {
  appearance: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.et-share:hover { border-color: var(--border-strong); color: var(--text-1); }
.et-share-note { font-size: 13px; color: var(--text-3); }

.et-breakdown {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 22px;
  margin-bottom: 16px;
}
.et-breakdown > summary {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.et-breakdown > summary::-webkit-details-marker { display: none; }
.et-breakdown > summary::before {
  content: '▸'; display: inline-block; width: 16px;
  color: var(--text-3);
  transition: transform 0.15s var(--ease);
}
.et-breakdown[open] > summary::before { transform: rotate(90deg); }
.et-breakdown[open] > summary { margin-bottom: 10px; color: var(--text-1); }
.et-rows { display: grid; gap: 2px; }
.et-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.et-row:last-child { border-bottom: none; }
.et-row dt { color: var(--text-2); }
.et-row dd {
  margin: 0;
  font-weight: 700; color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.et-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.et-actions > * { flex: 1 1 200px; }

.et-btn {
  appearance: none; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 22px;
  font-size: 15px; font-weight: 700;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.et-btn:hover { transform: translateY(-2px); }
.et-btn-primary   { background: var(--brand); color: #fff; border: none; box-shadow: var(--shadow-md); }
.et-btn-secondary { background: var(--surface); color: var(--text-1); border: 1.5px solid var(--border); }
.et-btn-secondary:hover { border-color: var(--border-strong); }

/* ================================================================
   4. DISCOVERY — what else IndianTyping does.
   Only outside an active test; never shown while typing.
================================================================ */

/* While a test is running the page is the test. Everything below the typing
   surface is removed rather than dimmed, so nothing competes for attention
   and nothing can be tabbed into mid-test. */
.et-page.is-testing .et-more,
.et-page.is-testing .et-content { display: none; }

.et-more { margin-top: 48px; }
.et-more-head { text-align: center; margin-bottom: 20px; }
.et-more-head h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text-1);
  margin: 0 0 6px;
}
.et-more-head p { font-size: 14px; color: var(--text-2); margin: 0; }

.et-loop {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  margin: 0 auto 24px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
}
.et-loop span { color: var(--brand); }
.et-loop i { font-style: normal; opacity: 0.5; }

.et-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.et-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-decoration: none;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
a.et-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.et-card-icon  { font-size: 24px; line-height: 1; margin-bottom: 10px; }
.et-card-title { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 5px; }
.et-card-desc  { font-size: 13px; line-height: 1.5; color: var(--text-2); }

/* An honest "not built yet": visibly inert, not a link, not clickable. */
.et-card.is-soon { opacity: 0.62; border-style: dashed; cursor: default; }
.et-card.is-soon .et-card-title::after {
  content: 'Coming soon';
  display: inline-block;
  margin-left: 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

/* ================================================================
   5. SEO CONTENT
================================================================ */
.et-content { margin-top: 48px; }
.et-content-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 26px;
  margin-bottom: 16px;
}
.et-content-card h2 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 800;
  color: var(--text-1);
  margin: 0 0 14px;
}
.et-content-card h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--text-1);
  margin: 26px 0 12px;
}
.et-content-card p { font-size: 15px; line-height: 1.7; color: var(--text-2); margin: 0 0 14px; }

.et-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 6px; }
.et-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.et-table-wrap th {
  text-align: left; padding: 10px 12px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1.5px solid var(--border);
}
.et-table-wrap td { padding: 11px 12px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.et-table-wrap tr:last-child td { border-bottom: none; }

.et-faq-item { border-bottom: 1px solid var(--border); }
.et-faq-item:last-child { border-bottom: none; }
.et-faq-q {
  appearance: none; font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 16px 0;
  background: none; border: none;
  font-size: 15px; font-weight: 600; text-align: left;
  color: var(--text-1);
  cursor: pointer;
}
.et-faq-chev { color: var(--text-3); transition: transform 0.2s var(--ease); flex-shrink: 0; }
.et-faq-q[aria-expanded="true"] .et-faq-chev { transform: rotate(180deg); }
.et-faq-a { font-size: 14px; line-height: 1.7; color: var(--text-2); padding: 0 0 16px; }
.et-faq-a[hidden] { display: none; }

/* ================================================================
   6. RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .et-page   { padding: calc(var(--nav-h) + 20px) 16px 48px; }
  .et-setup  { padding: 22px 18px; }
  .et-surface { padding: 22px 18px 20px; }
  .et-stats  { grid-template-columns: repeat(2, 1fr); }
  .et-content-card { padding: 22px 18px; }
  .et-trend  { padding: 16px 14px; }
  /* A long substitution string must wrap rather than push the page wide. */
  .et-insight { padding: 11px 14px 11px 34px; overflow-wrap: anywhere; }
  /* Tablets are touch devices too — the secondary Share button still needs a
     comfortable target here, not only on phones. */
  .et-share { min-height: 44px; padding: 11px 18px; }
}

@media (max-width: 560px) {
  .et-durations { grid-template-columns: repeat(2, 1fr); }
  .et-levels    { flex-direction: column; }
  .et-level     { flex-direction: row; align-items: baseline; gap: 8px; min-height: 44px; }
  /* Keep the whole HUD on one row with the label above it. Stacking metrics,
     meta and timer vertically cost 129px of a 800px phone screen before the
     passage even started — and with the keyboard up that is the difference
     between seeing two lines of text and seeing one. */
  .et-hud { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
  .et-test-meta { order: -1; flex: 1 0 100%; text-align: center; }
  .et-metrics { flex: 1 1 auto; justify-content: flex-start; gap: 16px; }
  .et-metric { flex-direction: row; align-items: baseline; gap: 5px; }
  .et-metric-val { font-size: 20px; }
  .et-timer { flex: 0 0 auto; padding: 6px 13px; font-size: 16px; }
  .et-actions > * { flex: 1 1 100%; }
  .et-next { grid-template-columns: 1fr; }
  /* Share is visually quiet but must still be comfortably tappable. */
  .et-share { min-height: 44px; padding: 11px 18px; }
  /* Stack the sparkline under its label so the line keeps usable width. */
  .et-trend-row { flex-wrap: wrap; gap: 6px 10px; }
  .et-trend-lbl { flex: 1 1 auto; }
  .et-trend-now { flex: 0 0 auto; }
  .et-spark     { flex: 1 1 100%; order: 3; }
  .et-metric { flex-direction: column; align-items: flex-start; gap: 2px; }
  .et-metric-val { font-size: 22px; }
  /* Two lines instead of three: with the keyboard up there is less room,
     and a shorter window keeps the caret comfortably above it. */
  .et-viewport { height: calc(var(--et-line-h) * 2); }
  .et-actions > * { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .et-page { padding: calc(var(--nav-h) + 16px) 12px 40px; }
  .et-dur  { padding: 13px 6px; }
  .et-dur-num { font-size: 19px; }
}

/* ================================================================
   7. MOTION / FOCUS
================================================================ */
:where(.et-page) :is(button, a, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
/* The input is invisible, so its focus has to be shown on the surface. */
.et-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .et-page *, .et-page *::before, .et-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  /* The caret must stay visible rather than freeze mid-blink. */
  .et-c.is-current::before { animation: none; opacity: 1; }
  .et-btn:hover, .et-dur:hover, a.et-card:hover, .et-start:hover { transform: none; }
}
