/* Reading Speed Test: photo hero, reading stage (left) + readout panel (right). */

.calc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.ghost-btn {
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.ghost-btn:hover { background: rgba(59, 130, 246, 0.22); border-color: rgba(96, 165, 250, 0.6); }

/* ── Hero ── */
.rst-hero { position: relative; overflow: hidden; background: #05070a; border-bottom: 1px solid rgba(96, 165, 250, 0.1); }
.rst-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 40%; }
.rst-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 9, 18, 0.96) 0%, rgba(5, 9, 18, 0.82) 42%, rgba(5, 9, 18, 0.2) 75%, rgba(5, 9, 18, 0.05) 100%);
}
.rst-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--page-pad-inline, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.95rem;
}
.rst-hero__copy > * { max-width: 38rem; }
.rst-hero__title {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.rst-hero__title span { display: block; margin-top: 0.4rem; font-size: 0.5em; letter-spacing: -0.01em; color: var(--accent-bright, #60a5fa); }
.rst-hero__lead { margin: 0; font-size: 1.05rem; line-height: 1.6; color: #cbd5e1; }
.rst-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.rst-chips li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.rst-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.rst-hero__note { margin: 0; font-size: 0.875rem; color: #94a3b8; }

/* ── Tool ── */
.rst-tool {
  background: #05070a;
  padding: clamp(1.25rem, 3vw, 2rem) var(--page-pad-inline, 1.25rem) clamp(2rem, 5vw, 3.5rem);
  scroll-margin-top: 80px;
}
.rst-grid { display: grid; gap: 1rem; max-width: 1200px; margin: 0 auto; }
@media (min-width: 960px) {
  .rst-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: start; }
  .rst-panel { position: sticky; top: 88px; }
}
.rst-stage, .rst-panel {
  min-width: 0;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  background: #111a2e;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  scroll-margin-top: 90px;
}
.rst-pick__head { margin-bottom: 1rem; }
.rst-pick__title { margin: 0 0 0.35rem; font-family: var(--font-display, "Sora", sans-serif); font-size: clamp(1.25rem, 2.4vw, 1.5rem); color: #f1f5f9; }
.rst-pick__lead { margin: 0; color: #94a3b8; line-height: 1.6; }
.rst-cards { display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.rst-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1rem;
  text-align: start;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: #0c1426;
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rst-card:hover { border-color: rgba(96, 165, 250, 0.5); }
.rst-card.is-picked { border-color: #3b82f6; background: rgba(37, 99, 235, 0.16); box-shadow: inset 0 0 0 1px #3b82f6; }
.rst-card__level { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #60a5fa; }
.rst-card__title { font-family: var(--font-display, "Sora", sans-serif); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.rst-card__meta { font-size: 0.82rem; color: #94a3b8; }
.rst-go, .rst-done { margin-top: 1.1rem; border: none; cursor: pointer; font-size: 0.95rem; padding: 0.8rem 1.5rem; }
.rst-done { display: block; width: 100%; }
.rst-note { margin: 0.75rem 0 0; font-size: 0.85rem; color: #64748b; line-height: 1.55; }

.rst-stage.is-reading { background: #f8f5ee; border-color: #e7e0d0; }
.rst-passage { max-width: 40rem; margin: 0 auto; color: #1f2430; font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: clamp(1.08rem, 1.5vw, 1.2rem); line-height: 1.75; }
.rst-passage__title { margin: 0 0 1rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.35rem; color: #111827; }
.rst-passage p { margin: 0 0 1rem; }
.rst-stage.is-reading .rst-done { max-width: 40rem; margin-inline: auto; }
.rst-stage.is-reading .rst-note { color: #6b7280; text-align: center; }

.rst-quiz { display: grid; gap: 1rem; }
.rst-q { margin: 0; padding: 1rem; border-radius: 14px; border: 1px solid rgba(96, 165, 250, 0.14); background: #0c1426; }
.rst-q legend { padding: 0 0.3rem; font-weight: 600; color: #f1f5f9; line-height: 1.5; }
.rst-opt { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0.6rem; margin-top: 0.35rem; border-radius: 10px; color: #cbd5e1; cursor: pointer; line-height: 1.45; }
.rst-opt:hover { background: rgba(59, 130, 246, 0.08); }
.rst-opt input { margin-top: 0.2rem; accent-color: #3b82f6; }
.rst-opt.is-right { background: rgba(34, 197, 94, 0.14); color: #dcfce7; }
.rst-opt.is-wrong { background: rgba(239, 68, 68, 0.14); color: #fecaca; }
.rst-again { margin-top: 1.25rem; padding: 1rem; border-radius: 14px; background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(96, 165, 250, 0.25); }
.rst-again__score { margin: 0 0 0.75rem; color: #e2e8f0; font-weight: 600; line-height: 1.5; }

/* Readout panel */
.rst-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.rst-panel__title { margin: 0; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.1rem; color: #f1f5f9; }
.rst-status { margin: 0; font-size: 0.85rem; color: #94a3b8; display: inline-flex; align-items: center; gap: 0.4rem; }
.rst-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #475569; }
.rst-panel[data-state="reading"] .rst-status::before { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2); }
.rst-panel[data-state="done"] .rst-status::before, .rst-panel[data-state="questions"] .rst-status::before { background: #22c55e; }
.rst-timer {
  margin: 0.9rem 0 0.3rem;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.rst-timer.is-hidden { color: transparent; text-shadow: 0 0 14px rgba(248, 250, 252, 0.5); }
.rst-timer-toggle { display: inline-flex; gap: 0.45rem; align-items: center; font-size: 0.85rem; color: #94a3b8; cursor: pointer; }
.rst-timer-toggle input { accent-color: #3b82f6; }
.rst-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1rem 0 0; }
.rst-stat { padding: 0.7rem 0.8rem; border-radius: 12px; background: #0c1426; border: 1px solid rgba(96, 165, 250, 0.1); }
.rst-stat dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #64748b; }
.rst-stat dd { margin: 0.2rem 0 0; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.25rem; font-weight: 700; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.rst-stat--main dd { color: #60a5fa; font-size: 1.6rem; }
.rst-verdict { margin: 1rem 0 0; color: #cbd5e1; line-height: 1.6; font-size: 0.93rem; }
.rst-bars { display: grid; gap: 0.45rem; margin-top: 1rem; }
.rst-bar { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2.8rem; gap: 0.55rem; align-items: center; font-size: 0.8rem; color: #94a3b8; }
.rst-bar__label { line-height: 1.25; }
.rst-bar__track { height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); overflow: hidden; }
.rst-bar__fill { display: block; height: 100%; border-radius: inherit; background: #475569; }
.rst-bar__value { text-align: end; font-variant-numeric: tabular-nums; color: #cbd5e1; }
.rst-bar--you .rst-bar__label, .rst-bar--you .rst-bar__value { color: #93c5fd; font-weight: 700; }
.rst-bar--you .rst-bar__fill { background: #3b82f6; }
.rst-bar--eff .rst-bar__label, .rst-bar--eff .rst-bar__value { color: #86efac; font-weight: 700; }
.rst-bar--eff .rst-bar__fill { background: #22c55e; }
.rst-panel__actions { display: grid; gap: 0.5rem; margin-top: 1.1rem; }
.rst-panel__actions .btn-download { border: none; cursor: pointer; font-size: 0.875rem; padding: 0.7rem 1rem; text-align: center; }
.rst-privacy { margin: 0.9rem 0 0; font-size: 0.8rem; color: #64748b; line-height: 1.5; }

@media (max-width: 719px) {
  .rst-hero__img { position: relative; display: block; height: 190px; object-position: 78% 40%; }
  .rst-hero::after { inset: 0 0 auto 0; height: 190px; background: linear-gradient(180deg, rgba(5, 9, 18, 0) 40%, rgba(5, 9, 18, 1) 100%); }
  .rst-hero__copy { padding-top: 0.25rem; padding-bottom: 1.4rem; gap: 0.75rem; }
  .rst-hero__title { font-size: 2.1rem; }
  .rst-hero__lead { font-size: 0.95rem; line-height: 1.5; }
  .rst-chips li { font-size: 0.78rem; padding: 0.3rem 0.65rem; }
  .rst-stage, .rst-panel { border-radius: 16px; }
  .rst-bar { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 2.6rem; }
}

/* ── Explainers ── */
.rst-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid rgba(96, 165, 250, 0.14); background: #0f1a33; }
.rst-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.rst-table caption { padding: 0.8rem 1rem 0; text-align: start; color: #94a3b8; font-size: 0.82rem; caption-side: bottom; padding-bottom: 0.8rem; }
.rst-table th, .rst-table td { padding: 0.65rem 1rem; text-align: start; border-bottom: 1px solid rgba(96, 165, 250, 0.08); }
.rst-table th { color: #93c5fd; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(29, 78, 216, 0.15); }
.rst-table td { color: #cbd5e1; }
.rst-table td:last-child { white-space: nowrap; font-weight: 600; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.tool-row a, .tool-siblings a, .rst-tips a { color: var(--accent-bright, #60a5fa); }
.tool-steps + p { margin-top: 0.9rem; }
.rst-formula { margin: 1rem 0; padding: 0.9rem 1rem; border-radius: 12px; background: #0f1a33; border-left: 3px solid #3b82f6; color: #e2e8f0; font-weight: 600; line-height: 1.6; }
.rst-tips { display: grid; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rst-tip { padding: 1.35rem; border-radius: 16px; background: #0f1a33; border: 1px solid rgba(96, 165, 250, 0.14); }
.rst-tip h3 { margin: 0 0 0.6rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.15rem; color: #f1f5f9; }
.rst-tip p { margin: 0; color: #94a3b8; line-height: 1.65; font-size: 0.95rem; }
.rst-example { margin: 0; padding: 1.25rem; border-radius: 18px; background: #111a2e; border: 1px solid rgba(96, 165, 250, 0.16); }
.rst-example .rst-stats { margin-top: 0; }
.rst-example figcaption { margin-top: 0.85rem; color: #94a3b8; font-size: 0.875rem; }
.rst-panel [hidden], .rst-stage [hidden] { display: none !important; }
.rst-panel__actions .btn-download { white-space: normal; line-height: 1.35; }
.tool-explain .feature-row__copy, .tool-explain .feature-row__media { min-width: 0; }
@media (max-width: 560px) { .rst-table td:last-child { white-space: normal; } .rst-table th, .rst-table td { padding: 0.55rem 0.7rem; } }

/* Friend's shared result, shown above the test */
.rst-tool > .tp-friend { max-width: 1200px; margin: 0 auto 1rem; }
