/* =========================================================
 * session.css — unified daily-drill UI (Phase E6)
 * Drill-mode-only for v1. Test-modes (E7) layer on top.
 *
 * Layout principles:
 *   - Math problem: single-column ss-question-single
 *   - R&W problem: 2-col split (passage | question) ss-question-split
 *   - JS toggles .ss-screen.active and .ss-question-* hidden/visible
 * ========================================================= */

.ss-body {
  background: #f7f8fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  margin: 0;
}

/* ── Top bar ────────────────────────────────────────────── */
.ss-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid #e5e8ec;
  position: sticky;
  top: 0;
  z-index: 10;
}
.ss-back {
  font-size: 14px;
  color: #2169d6;
  text-decoration: none;
  font-weight: 600;
}
.ss-back:hover { text-decoration: underline; }
.ss-date-label {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.ss-spacer { flex: 1; }

/* ── Screen switching ──────────────────────────────────── */
.ss-screen { display: none; }
.ss-screen.active { display: block; }

/* ── Card (intro / done / empty) ───────────────────────── */
.ss-card {
  max-width: 720px;
  margin: 32px auto;
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 14px;
  padding: 32px;
}
.ss-h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}
.ss-sub {
  font-size: 15px;
  color: #555;
  line-height: 1.55;
  margin: 0 0 22px;
}

/* ── Progress bar (session) ────────────────────────────── */
.ss-progress-bar {
  max-width: 1100px;
  margin: 18px auto 14px;
  padding: 0 24px;
}
.ss-progress-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #555;
}
.ss-progress-text { font-weight: 600; color: #1a1a1a; }
.ss-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #dbeafe;
  color: #1e40af;
}
.ss-tag.review { background: #fef3c7; color: #92400e; }
.ss-section-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
}
.ss-section-tag.rw { background: #ccfbf1; color: #115e59; }
.ss-skill-name {
  font-size: 13px;
  color: #767676;
  font-weight: 500;
}
.ss-timer {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #767676;
}
.ss-progress-track {
  height: 5px;
  background: #e5e8ec;
  border-radius: 6px;
  overflow: hidden;
}
.ss-progress-fill {
  height: 100%;
  background: #1a1a1a;
  transition: width 0.25s ease;
  width: 0%;
}

/* ── Math layout: single-column ────────────────────────── */
.ss-question-single {
  max-width: 720px;
  margin: 0 auto 24px;
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 14px;
  padding: 28px;
  display: none;
}
.ss-question-single.active { display: block; }
.ss-stem {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.ss-gridin {
  width: 100%;
  padding: 12px 14px;
  font-size: 17px;
  border: 2px solid #d0d4d9;
  border-radius: 10px;
  font-family: inherit;
  margin-bottom: 12px;
}
.ss-gridin.correct { border-color: #16a34a; background: #f0fdf4; }
.ss-gridin.wrong   { border-color: #dc2626; background: #fef2f2; }

/* ── R&W layout: Bluebook 2-pane (passage | question) ──────────
   Matches the canonical rw-practice / diagnostic / mock-exam layout:
   full-height FLAT panes with a solid vertical divider — NOT floating rounded
   cards. (Was rounded cards in a centered grid, which didn't read as Bluebook.)
   The DOM mirrors rw-practice's .rw-* panes, so we restyle .ss-* to the same
   Bluebook frame. Session-only classes — no other surface is affected. */
.ss-question-split {
  display: none;
  width: 100%;
  margin: 0;
  background: white;
  /* Bluebook horizontal dashed frame, top + bottom */
  border-top: 1.5px dashed #c0c4cc;
  border-bottom: 1.5px dashed #c0c4cc;
}
.ss-question-split.active {
  display: flex;
  flex-direction: row;
  /* Fill from just below the dsat header (~83px) to above the footer (48px),
     so each pane scrolls independently like real Bluebook. */
  height: calc(100vh - 131px);
  overflow: hidden;
}
.ss-passage-panel {
  flex: 0 0 50%;
  min-width: 320px;
  max-width: 70vw;
  background: white;
  overflow-y: auto;
  /* Solid vertical column divider (Bluebook style) */
  border-right: 1.5px solid #b8bcc4;
  padding: 16px 36px 24px 44px;
}
.ss-q-panel {
  flex: 1 1 auto;
  min-width: 360px;
  background: white;
  overflow-y: auto;
  padding: 16px 44px 24px 36px;
}
/* The passage panel's border-right IS the divider now; drop the standalone bar. */
.ss-split-divider { display: none; }
.ss-passage {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
}
/* Strip the .rw-passage "highlight box" (grey bg + blue left bar) so the passage
   reads as plain Bluebook text. rw-practice does this via .rw-passage-body
   .rw-passage; session's passage lives in .ss-passage, so mirror it here. */
.ss-passage .rw-passage {
  background: transparent !important;
  border-left: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ss-q-body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 18px;
  font-weight: 500;
}
@media (max-width: 900px) {
  /* Stack to a single column on phones. */
  .ss-question-split.active { flex-direction: column; height: auto; overflow: visible; }
  .ss-passage-panel {
    flex: 0 0 auto; max-width: none; max-height: 42vh;
    border-right: none; border-bottom: 1.5px solid #b8bcc4;
  }
  .ss-q-panel { flex: 1 1 auto; }
}

/* ── Choices (shared) ──────────────────────────────────── */
.ss-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.ss-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #d0d4d9;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  font-size: 15px;
}
.ss-choice:hover { border-color: #1a1a1a; }
.ss-choice.selected { border-color: #1a1a1a; background: #f5f7fa; }
.ss-choice.correct-reveal { border-color: #16a34a; background: #f0fdf4; }
.ss-choice.wrong { border-color: #dc2626; background: #fef2f2; }
.ss-choice .key {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.2px solid currentColor;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
}
.ss-choice .text { flex: 1; }

/* ── Feedback ──────────────────────────────────────────── */
.ss-feedback {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}
.ss-feedback:not(:empty) { display: block; background: #f1f3f6; }
.ss-feedback.correct { background: #dcfce7; color: #14532d; }
.ss-feedback.wrong { background: #fee2e2; color: #7f1d1d; }

/* ── Show solution toggle + panel ──────────────────────── */
.ss-solution-container:not(:empty) { margin-top: 10px; }
.ss-solution-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #2169d6;
  border: 1.5px solid #2169d6;
  border-radius: 999px;
  padding: 6px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ss-solution-toggle:hover { background: #eef4fd; }
.ss-solution-toggle.open { background: #2169d6; color: white; }
.ss-solution-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #d6dde6;
  border-left: 3px solid #2169d6;
  border-radius: 6px;
  background: #fafbfd;
  font-size: 14px;
  line-height: 1.55;
}
.ss-solution-panel[hidden] { display: none; }
.ss-solution-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6470;
  margin-bottom: 8px;
}
.ss-solution-body p { margin: 0 0 8px; }
.ss-solution-body p:last-child { margin-bottom: 0; }

/* ── Footer ────────────────────────────────────────────── */
.ss-footer {
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.ss-btn {
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: #1a1a1a;
  color: white;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.ss-btn:hover:not(:disabled) { background: #333; }
.ss-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.ss-btn-secondary {
  background: white;
  color: #1a1a1a;
  border: 1.5px solid #d0d4d9;
}
.ss-btn-secondary:hover { background: #f5f7fa; }

/* ── Intro body ────────────────────────────────────────── */
.ss-intro-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.ss-intro-cell {
  background: #f7f8fa;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.ss-intro-cell .num {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
}
.ss-intro-cell .label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.ss-intro-focus {
  background: #fafbfc;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 14px;
}
.ss-intro-focus b { font-weight: 700; color: #1a1a1a; }

/* "What you'll cover" — topic breakdown of today's session (E32) */
.ss-cover { margin-bottom: 16px; }
.ss-cover-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px;
}
.ss-cover-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-top: 1px solid #f0f2f5; font-size: 14px;
}
.ss-cover-row:first-of-type { border-top: none; }
.ss-cover-name { color: #1a1a1a; }
.ss-cover-focus {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: #475569;
  background: #f1f5f9; border-radius: 4px; padding: 1px 6px; vertical-align: middle;
}
.ss-cover-tags { color: #64748b; font-size: 13px; white-space: nowrap; }
.ss-cover-more { font-size: 13px; color: #94a3b8; padding-top: 8px; }

/* ── Done screen ───────────────────────────────────────── */
.ss-done-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 14px;
}
.ss-done-stat {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.ss-done-stat .num { font-size: 24px; font-weight: 700; }
.ss-done-stat .label { font-size: 11.5px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.ss-done-forecast {
  background: #f7f8fa;
  border: 1px solid #e5e8ec;
  border-left: 3px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #334155;
  margin-bottom: 16px;
}
/* Suppress the box entirely when there's no forecast (all-skipped session, or
   before the async estimate loads) — an empty bordered pill reads as a glitch. */
.ss-done-forecast:empty { display: none; }
.ss-done-note {
  font-size: 14px;
  color: #475569;
  line-height: 1.55;
  margin: 8px 0 0;
}
/* ── Session analysis card (glanceable one-liners) ───────── */
.ss-analysis { margin: 0 0 18px; }
.ss-analysis:empty { display: none; }
.ss-an-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: #64748b; margin: 0 0 8px;
}
.ss-an-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 14px; background: #f7f8fa; border-left: 3px solid #334155;
  border-radius: 0 8px 8px 0; margin-bottom: 6px; font-size: 14px;
}
.ss-an-row:last-child { margin-bottom: 0; }
.ss-an-label {
  flex: 0 0 84px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #64748b; padding-top: 1px;
}
.ss-an-value { flex: 1; min-width: 0; color: #0f172a; line-height: 1.45; }
.ss-an-value .muted { color: #64748b; }
.ss-an-link {
  flex-shrink: 0; font-size: 12px; font-weight: 600; color: #334155;
  text-decoration: none; white-space: nowrap; border-bottom: 1px solid #cbd5e1;
}
.ss-an-link:hover { color: #0f172a; border-color: #334155; }
/* skipped review item accent */
.ss-review-answers .skip-tag { color: #b45309; font-weight: 600; }
.ss-done-review-h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
}
.ss-done-review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ss-review-item {
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 14px 16px;
}
.ss-review-item-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  flex-wrap: wrap;
}
.ss-review-q { font-weight: 700; }
.ss-review-stat { color: #6b7280; }
.ss-review-skill { color: #475569; }
.ss-review-stem-preview { font-size: 13.5px; color: #444; margin: 8px 0; line-height: 1.5; max-height: 40px; overflow: hidden; }
/* Full problem in the review list — no clipping; show the WHOLE question/passage. */
.ss-review-stem-full { font-size: 14px; color: #1a1a1a; margin: 10px 0 12px; line-height: 1.55; }
.ss-review-stem-full .rw-passage { margin: 0 0 12px; }
.ss-review-stem-full img, .ss-review-stem-full svg, .ss-review-stem-full table { max-width: 100%; }
/* All answer choices listed: correct = green, your wrong pick = red, rest neutral. */
.ss-rev-choices { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ss-rev-choice { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13.5px; line-height: 1.5; color: #334155; }
.ss-rev-choice.is-correct { border-color: #86efac; background: #f0fdf4; }
.ss-rev-choice.is-wrong { border-color: #fecaca; background: #fef2f2; }
.ss-rev-key { font-weight: 700; color: #475569; min-width: 16px; }
.ss-rev-choice.is-correct .ss-rev-key { color: #15803d; }
.ss-rev-choice.is-wrong .ss-rev-key { color: #b91c1c; }
.ss-rev-text { flex: 1; min-width: 0; }
.ss-rev-tag { flex-shrink: 0; align-self: center; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.ss-rev-tag.t-correct { background: #dcfce7; color: #15803d; }
.ss-rev-tag.t-wrong { background: #fee2e2; color: #b91c1c; }
.ss-review-answers { font-size: 13px; color: #475569; margin-bottom: 8px; }
.ss-review-answers .wrong { color: #b91c1c; font-weight: 600; }
.ss-review-answers .correct { color: #15803d; font-weight: 600; }
.ss-done-next {
  margin: 18px 0;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 10px;
  font-size: 14px;
}
.ss-done-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* ── Rule pills (in solution body — for R&W solutions) ── */
.ss-rule-pill {
  display: inline-block;
  padding: 1px 8px;
  background: #e0ecff;
  color: #1e40af;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ss-rule-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  white-space: nowrap;
}
