/* Extra styles for the English pages. Base layout, .tool-card, .tool-btn and the
   result tiles come from ../style.css; this file only adds what the test and the
   RSVP trainer need. */

.en-passage { margin: 14px 0 6px; }
.en-passage h3 { margin: 0 0 12px; font-size: 20px; }
.en-passage p {
  max-width: 68ch;
  margin: 0 0 1em;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}

.en-meta { font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.en-status { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }

.en-quiz { margin: 14px 0 0; }
.en-q { margin: 0 0 18px; padding: 0; border: 0; }
.en-q legend { padding: 0; margin: 0 0 8px; font-weight: 600; line-height: 1.5; }
.en-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  margin: 0 0 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-bg);
  cursor: pointer;
  line-height: 1.5;
}
.en-opt:hover { border-color: var(--accent); }
.en-opt input { margin-top: 4px; accent-color: var(--accent); }
.en-opt:has(input:checked) { border-color: var(--accent); }
.en-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

.en-review { margin: 14px 0 0; padding: 0; list-style: none; }
.en-review li { margin: 0 0 10px; padding: 10px 12px; border-left: 3px solid var(--border); border-radius: 4px; background: var(--panel-bg); line-height: 1.55; }
.en-review li.right { border-left-color: var(--accent); }
.en-review li.wrong { border-left-color: var(--mark); }
.en-review .a { display: block; margin-top: 4px; font-size: 14px; color: var(--text-muted); }

.en-history { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.en-history th, .en-history td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.en-history th { color: var(--text-muted); font-weight: 600; font-size: 12px; }

/* ---- RSVP trainer ---- */
.rsvp-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 150px;
  padding: 28px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-bg);
  font-size: clamp(30px, 7vw, 54px);
  line-height: 1.2;
  user-select: none;
}
.rsvp-stage::before,
.rsvp-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  background: var(--accent);
  opacity: 0.55;
}
.rsvp-stage::before { top: 8px; }
.rsvp-stage::after { bottom: 8px; }
.rsvp-stage .b { text-align: right; white-space: pre; }
.rsvp-stage .p { color: var(--accent); font-weight: 700; }
.rsvp-stage .a { text-align: left; white-space: pre; }
.rsvp-stage.idle { display: flex; justify-content: center; font-size: 18px; color: var(--text-muted); text-align: center; }

.rsvp-bar { height: 6px; margin: 12px 0 0; border-radius: 3px; background: var(--border); overflow: hidden; }
.rsvp-bar > i { display: block; height: 100%; width: 0; background: var(--accent); }

.rsvp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.rsvp-speed { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.rsvp-speed input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.rsvp-speed output { min-width: 5.5em; font-variant-numeric: tabular-nums; font-weight: 700; }

.en-note { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 600px) {
  .en-passage p { font-size: 17px; }
  .rsvp-stage { padding: 24px 6px; min-height: 130px; }
}

/* English labels are longer than the Korean ones, so on a phone the five menu items do not fit
   in one row with icons. Drop the icons there; the labels are enough. */
@media (max-width: 430px) {
  .site-rail .rail-nav a svg { display: none; }
}

/* ---- Dot tracking ---- */
.eye-stage {
  position: relative;
  height: clamp(240px, 46vh, 420px);
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-bg);
  overflow: hidden;
  touch-action: none;
}
.eye-stage:fullscreen { height: 100vh; border-radius: 0; border: 0; }
.eye-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 14px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.eye-hint[hidden] { display: none; }
.eye-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.en-eye-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Menu labels: full name on wide screens, a short one on phones so that six items fit in one row. */
.site-rail .rail-nav a .s { display: none; }
@media (max-width: 430px) {
  .site-rail .rail-nav a .l { display: none; }
  .site-rail .rail-nav a .s { display: inline; }
}
