/* Plabity - flat design system.
   Principles: solid colours only, zero shadows, zero gradients, sharp edges,
   colour-coded state through solid fills. Visual hierarchy comes from typography
   weight and colour block contrast, not depth. */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;

  /* Ink */
  --ink: #0a1224;
  --ink-2: #2d3748;
  --ink-3: #64748b;
  --ink-4: #94a3b8;

  --rule: #e2e8f0;
  --rule-strong: #cbd5e1;

  /* Brand */
  --accent: #1e3a8a;
  --accent-2: #1e40af;
  --accent-deep: #0c1d4d;
  --accent-ink: #ffffff;

  /* State */
  --good: #166534;
  --warn: #b45309;
  --bad:  #991b1b;

  /* Geometry */
  --container: 1200px;
  --container-narrow: 920px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* Sticky-footer: on short pages (paywall, simple confirmations) the body grows
   to fill the viewport so the footer sits at the bottom instead of floating
   halfway up the screen with whitespace below it. */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: none; }

p { margin: 0 0 12px; }

/* ---------- Header ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--ink); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-nav {
  display: flex;
  gap: 28px;
  margin-left: 16px;
  flex: 1;
}

.primary-nav a {
  position: relative;
  display: inline-block;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 2px;
}

/* Oxford-style slide-in underline */
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.primary-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.primary-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .primary-nav { display: none; }
  .header-inner { padding: 12px 16px; gap: 12px; }
  .header-actions .btn-ghost { display: none; }
}

/* ---------- Main / layout ----------
   Default: 1120px container with vertical padding - for internal pages.
   Marketing pages (body.marketing) bypass this so sections can full-bleed. */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 96px;
  background: var(--bg);
}

body.marketing main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--container-narrow); }

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}

h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 24px 0 12px;
}

/* ---------- Scenario picker ---------- */

.scenario-intro {
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 14px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
  background: var(--rule);
  padding: 2px;
}

.scenario-card {
  background: var(--bg);
  padding: 20px 22px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.1s;
}

.scenario-card:hover {
  background: var(--ink);
  color: white;
}

.scenario-card:hover .number,
.scenario-card:hover .meta { color: var(--ink-4); }

.scenario-card:hover .tag { background: white; color: var(--ink); }

.scenario-card .row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.scenario-card .tag {
  font-size: 11px;
  background: var(--bg-2);
  color: var(--ink-2);
  padding: 3px 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.scenario-card .number {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scenario-card .title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
}

.scenario-card .meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  letter-spacing: 0.01em;
  transition: background 0.1s;
}

.btn:hover { background: var(--accent-2); color: var(--accent-ink); }

.btn:focus-visible {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.btn:disabled {
  background: var(--bg-3);
  color: var(--ink-4);
  cursor: not-allowed;
}

.btn.danger {
  background: var(--bad);
  color: white;
}

.btn.danger:hover { background: #7f1d1d; color: white; }

.btn.ghost {
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 9px 20px;
}

.btn.ghost:hover { background: var(--ink); color: white; }

/* ---------- Station page ---------- */

.station-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2px;
  background: var(--rule);
  padding: 0;
  margin-top: 8px;
}

/* Right column now stacks Patient card on top of Live transcript. The 2px
   flex gap reveals the parent's rule background, matching the hairline
   between the left and right grid columns. */
.station-right-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.patient-card { padding: 20px 28px; }
.patient-card h3 { margin-top: 0; }
.patient-body-language {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

@media (max-width: 980px) {
  .station-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg);
  padding: 26px 28px;
}

.task-card .field {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-2);
}

.task-card .field:first-child { padding-top: 0; }
.task-card .field:last-child { border-bottom: none; padding-bottom: 0; }

.task-card .field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
}

.task-card .field-value {
  font-size: 15px;
  color: var(--ink);
}

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.timer {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.timer.warning { color: var(--warn); }
.timer.critical { color: var(--bad); }

.station-hint {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 16px;
  line-height: 1.5;
}

/* ---------- Status indicator ---------- */

.status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--ink-3);
}

.status .dot {
  width: 8px; height: 8px;
  background: white;
  flex-shrink: 0;
}

.status.connecting { background: var(--warn); }
.status.live       { background: var(--good); }
.status.error      { background: var(--bad); }

/* ---------- Transcript ---------- */

.transcript {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 60vh;
  overflow-y: auto;
}

.turn {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  background: var(--bg-2);
}

.turn.candidate { background: var(--accent); color: white; }
.turn.candidate .role { color: rgba(255,255,255,0.7); }

.turn.patient { background: var(--bg-2); color: var(--ink); }
.turn.patient .role { color: var(--ink-3); }

.turn.examiner { background: var(--ink); color: white; }
.turn.examiner .role { color: var(--ink-4); }

/* Synthetic transcript line emitted when the findings panel is shown. */
.turn.system {
  background: transparent;
  color: var(--ink-3);
  text-align: center;
  font-size: 12px;
  font-style: italic;
  padding: 8px 14px;
  letter-spacing: 0.02em;
}
.turn.system .role { display: none; }

.turn .role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  font-weight: 600;
}

.transcript:empty::after,
.transcript.empty::after {
  content: "Waiting for first turn.";
  color: var(--ink-4);
  font-size: 13px;
  padding: 28px 4px;
  display: block;
  text-align: center;
}

/* ---------- Feedback page ---------- */

.feedback-loading, .feedback-error {
  text-align: center;
  padding: 80px 0;
  color: var(--ink-3);
  font-size: 14px;
}

.feedback-loading::after {
  content: "";
  display: block;
  margin: 16px auto 0;
  width: 32px; height: 32px;
  border: 4px solid var(--bg-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.overall-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 8px 0 24px;
  background: var(--rule);
  padding: 0;
}

.overall-bar .domain {
  padding: 22px 22px;
  background: var(--bg);
}

.overall-bar .domain h4 {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.overall-bar .domain .band {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.overall-bar .domain .pct {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.overall-bar .domain.band-4 { background: var(--good); }
.overall-bar .domain.band-4 h4,
.overall-bar .domain.band-4 .band,
.overall-bar .domain.band-4 .pct { color: white; }

.overall-bar .domain.band-3 { background: var(--bg); }
.overall-bar .domain.band-3 .band { color: var(--good); }

.overall-bar .domain.band-2 { background: var(--warn); }
.overall-bar .domain.band-2 h4,
.overall-bar .domain.band-2 .band,
.overall-bar .domain.band-2 .pct { color: white; }

.overall-bar .domain.band-1 { background: var(--bad); }
.overall-bar .domain.band-1 h4,
.overall-bar .domain.band-1 .band,
.overall-bar .domain.band-1 .pct { color: white; }

.global-rating {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
}

.global-rating.Pass       { background: var(--good); }
.global-rating.Borderline { background: var(--warn); }
.global-rating.Fail       { background: var(--bad); }

.feedback-section {
  background: var(--bg);
  padding: 24px 28px;
  margin-bottom: 2px;
}

.feedback-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}

.feedback-section ul { padding-left: 20px; margin: 0; }
.feedback-section li { margin-bottom: 6px; }
.feedback-section li:last-child { margin-bottom: 0; }

.rubric-domain {
  background: var(--bg);
  margin-bottom: 2px;
}

.rubric-domain summary {
  cursor: pointer;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rubric-domain summary::-webkit-details-marker { display: none; }
.rubric-domain summary::after {
  content: "+";
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
}
.rubric-domain[open] summary::after { content: "−"; }

.rubric-domain .summary-text {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.rubric-domain .summary-text .pct {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rubric-item {
  padding: 12px 20px;
  font-size: 13px;
  position: relative;
  padding-left: 44px;
  border-bottom: 1px solid var(--bg-2);
}

.rubric-item:last-child { border-bottom: none; }

/* Solid colour block on the left for state */
.rubric-item::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 14px;
  width: 14px;
  height: 14px;
}

.rubric-item.full::before    { background: var(--good); }
.rubric-item.partial::before { background: var(--warn); }
.rubric-item.missed::before  { background: var(--bad); }

.rubric-item .criterion {
  font-weight: 500;
  color: var(--ink);
}

.rubric-item .criterion .weight {
  color: var(--ink-4);
  font-weight: 500;
  font-size: 11px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rubric-item .evidence {
  color: var(--ink-2);
  font-style: italic;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  padding-left: 10px;
  border-left: 3px solid var(--bg-3);
}

.rubric-item .note {
  color: var(--ink-3);
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.safety-alert {
  background: var(--bad);
  color: white;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.safety-alert strong { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; display: block; margin-bottom: 4px; }

.feedback-actions {
  margin-top: 28px;
  display: flex;
  gap: 2px;
}

/* ============================================================
   BUTTON SIZE + VARIANT EXTENSIONS
   ============================================================ */

.btn.sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn.lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn.ghost.sm { padding: 6px 12px; border-width: 1px; }

/* ============================================================
   MARKETING - hero
   ============================================================ */

.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 96px 24px 80px;
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-3);
  padding: 6px 12px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 14ch;
}

.hero-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-stats span { white-space: nowrap; }
.hero-stats .sep { color: var(--ink-4); }

.hero-stats strong {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   MARKETING - section primitives
   ============================================================ */

.section {
  padding: 96px 24px;
  border-bottom: 1px solid var(--rule);
}
.section.tinted { background: var(--bg-2); }
.section-inner { max-width: var(--container); margin: 0 auto; }

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 56px;
}

/* ============================================================
   MARKETING - features grid
   ============================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 760px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature {
  background: var(--bg);
  padding: 40px 36px;
}

.feature-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
  text-transform: none;
}

.feature p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   MARKETING - how it works
   ============================================================ */

.how-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.how-list li {
  background: var(--bg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.how-list h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 6px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.how-list p {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   MARKETING - CTA strip (dark)
   ============================================================ */

.cta-strip {
  background: var(--ink);
  color: white;
  padding: 80px 24px;
  text-align: center;
}

.cta-strip h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
  margin: 0 0 12px;
}

.cta-strip p {
  color: var(--ink-4);
  font-size: 17px;
  max-width: 52ch;
  margin: 0 auto 32px;
}

.cta-strip .btn {
  background: white;
  color: var(--ink);
}
.cta-strip .btn:hover { background: var(--bg-3); color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--accent-deep);
  color: #cbd5e1;
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-brand-col { grid-column: 1 / -1; }
}

.footer-brand {
  display: inline-block;
  color: white;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.footer-brand:hover { text-decoration: none; color: white; }

.footer-tagline {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
  max-width: 28ch;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 400;
}
.footer-col a:hover { color: white; text-decoration: none; }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-copy {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.footer-disclaimer {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  white-space: nowrap;
  overflow-x: auto;
}

@media (max-width: 1100px) {
  .footer-disclaimer {
    white-space: normal;
    overflow-x: visible;
  }
}

/* ============================================================
   PROSE / SECTION LEAD
   ============================================================ */

.section-lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-2);
  margin: -32px 0 56px;
  max-width: 80ch;
  line-height: 1.6;
}

.prose {
  max-width: 64ch;
}
.prose p { color: var(--ink-2); margin: 0 0 18px; font-size: 16px; line-height: 1.7; }
.prose .lead-text { font-size: 19px; color: var(--ink); line-height: 1.55; }

/* ============================================================
   STATION LIBRARY GRID
   ============================================================ */

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 32px;
}

@media (max-width: 960px) {
  .library-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .library-grid { grid-template-columns: 1fr; }
}

.library-card {
  background: var(--bg);
  padding: 28px 28px 24px;
}

.library-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.library-count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.library-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.library-card li {
  font-size: 14px;
  color: var(--ink-2);
  padding-left: 14px;
  position: relative;
}

.library-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 1px;
  background: var(--ink-4);
}

.library-cta {
  text-align: center;
  margin: 32px 0 0;
}

/* ============================================================
   MARK SCHEME GRID
   ============================================================ */

.mark-scheme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (max-width: 760px) {
  .mark-scheme-grid { grid-template-columns: 1fr; }
}

.mark-domain {
  background: var(--bg);
  padding: 32px;
}

.mark-domain h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.mark-domain p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.safety-callout {
  margin-top: 24px;
  padding: 24px 28px;
  background: var(--ink);
  color: white;
}

.safety-callout h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fca5a5;
  margin: 0 0 10px;
}

.safety-callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #e2e8f0;
}

.safety-callout strong { color: white; }

.band-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 32px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (max-width: 760px) {
  .band-row { grid-template-columns: repeat(2, 1fr); }
}

.band-row .band {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  background: var(--bg);
}

.band-row .band.band-4 { background: #166534; color: white; }
.band-row .band.band-3 { background: #15803d; color: white; }
.band-row .band.band-2 { background: #b45309; color: white; }
.band-row .band.band-1 { background: #991b1b; color: white; }

/* ============================================================
   COMPARISON TABLE
   ============================================================ */

.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  font-size: 14px;
  min-width: 720px;
}

.compare th,
.compare td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.compare th:last-child,
.compare td:last-child { border-right: none; }

.compare thead th {
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--rule-strong);
}

.compare thead th.self {
  background: var(--ink);
  color: white;
}

.compare tbody th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-2);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.compare td {
  color: var(--ink-3);
}

.compare td.self {
  background: var(--bg-3);
  color: var(--ink);
  font-weight: 600;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }

/* Mobile: stack each table row as a card so the comparison is readable on
   phones. The desktop 5-column layout forces a horizontal swipe at 375px
   that most users never discover; this turns each row into a labelled
   "row title + 4 named values" block. Column labels are hardcoded by
   nth-of-type so the template stays unchanged. */
@media (max-width: 720px) {
  .compare-wrap { border: 0; overflow: visible; }
  .compare { min-width: 0; display: block; background: transparent; }
  .compare thead { display: none; }
  .compare tbody, .compare tbody tr { display: block; }
  .compare tbody tr {
    background: var(--bg);
    border: 1px solid var(--rule);
    margin-bottom: 12px;
    padding: 14px 16px 8px;
  }
  .compare tbody tr:last-child { margin-bottom: 0; }
  .compare tbody th[scope="row"] {
    display: block;
    background: transparent;
    padding: 0 0 10px;
    color: var(--ink);
    font-size: 15px;
    border: 0;
  }
  .compare tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border: 0;
    color: var(--ink);
    font-size: 14px;
  }
  .compare tbody td.self { background: transparent; color: var(--ink); font-weight: 600; }
  .compare tbody td::before {
    color: var(--ink-3);
    font-size: 13px;
    margin-right: 12px;
    flex: 0 0 auto;
  }
  .compare tbody td:nth-of-type(1)::before { content: "Plabity"; color: var(--ink); font-weight: 700; }
  .compare tbody td:nth-of-type(2)::before { content: "Mock course"; }
  .compare tbody td:nth-of-type(3)::before { content: "Question banks"; }
  .compare tbody td:nth-of-type(4)::before { content: "Textbooks"; }
}

/* ============================================================
   FAQ - native <details>
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: var(--rule);
  gap: 1px;
}

.faq-list details {
  background: var(--bg);
  padding: 0;
}

.faq-list summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  padding: 22px 28px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::marker { display: none; content: ""; }

.faq-list summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1;
  flex-shrink: 0;
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list summary:hover { background: var(--bg-2); }

.faq-list details p {
  margin: 0;
  padding: 0 28px 24px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}

/* ============================================================
   SPLIT GRID - text left, media right (used in problem section)
   ============================================================ */

.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .split-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
}

.split-text .section-title { margin-bottom: 32px; }

.split-media {
  position: relative;
  background: var(--rule);
  overflow: hidden;
  min-height: 360px;
}

@media (max-width: 920px) {
  .split-media { aspect-ratio: 4 / 3; min-height: 0; }
}

.split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   ASIDE / EDITORIAL CALLOUT — replaces the heavy safety-callout block
   ============================================================ */

.aside {
  border-left: 3px solid var(--ink);
  padding: 6px 0 6px 22px;
  margin: 36px 0 0;
}

.aside p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.aside strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   BANDS LIST — quiet definition list replacing coloured rectangles
   ============================================================ */

.bands-list {
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 32px;
  row-gap: 10px;
  max-width: 420px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.bands-list dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}

.bands-list dd {
  margin: 0;
  color: var(--ink-3);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* Band-scale info as flowing prose, spans full container width.
   Padding-left matches the aside (3px border + 22px pad) so text x-positions align. */
.band-prose {
  margin: 36px 0 0;
  padding: 0 0 0 25px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}
.band-prose strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   BAND-SCALE — clinical-axis style scoring illustration
   Inspired by lab reference range / VAS scale diagrams
   ============================================================ */

.band-scale {
  margin: 40px 0 0;
  padding: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .band-scale-labels { font-size: 11px; }
  .band-scale-axis  { font-size: 10px; }
}

@media (max-width: 420px) {
  .band-scale-labels { font-size: 10px; }
  .band-scale-axis  { font-size: 9px; }
}

.band-scale-labels {
  position: relative;
  height: 18px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.band-scale-labels span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.band-scale-line {
  position: relative;
  height: 1px;
  background: var(--ink);
}

.band-scale-line .tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 6px;
  background: var(--ink);
  transform: translateX(-50%);
}

.band-scale-line .tick.major { height: 9px; }

.band-scale-axis {
  position: relative;
  height: 18px;
  margin-top: 12px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.band-scale-axis span {
  position: absolute;
  transform: translateX(-50%);
}

/* The "%" suffix on the first/last labels reads as a percent scale */
.band-scale-axis span:first-child::after,
.band-scale-axis span:last-child::after {
  content: "%";
  margin-left: 1px;
}

/* ============================================================
   RESPONSIVE FIXES — page-wide mobile improvements
   ============================================================ */

/* Alpine x-cloak: hide elements until Alpine is initialised */
[x-cloak] { display: none !important; }

/* Mobile menu toggle button (hidden on desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 6px 10px;
  font-family: inherit;
}
.menu-toggle:hover { color: var(--accent); }
.menu-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.mobile-nav a {
  padding: 16px 24px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--bg-2); color: var(--ink); }

/* Mobile breakpoints */
@media (max-width: 720px) {
  /* Header: hide desktop nav + all action buttons; show hamburger only.
     Sign-in and Start-free move into the mobile-nav drawer. */
  .primary-nav { display: none; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-inner { padding: 12px 16px; gap: 12px; }
  .header-actions { margin-left: auto; }
  .mobile-nav { display: flex; }

  /* Hero: cut vertical padding roughly in half */
  .hero { padding: 56px 20px 48px; }
  .hero-cta .btn { width: auto; }

  /* Sections: tighter vertical padding */
  .section { padding: 56px 20px; }
  .section-title { margin-bottom: 32px; }
  .section-lead  { margin-bottom: 36px; }

  /* CTA strip */
  .cta-strip { padding: 56px 20px; }

  /* Container side padding tighter on mobile */
  .container          { padding: 0 20px; }
  .header-inner       { max-width: none; }
  .section-inner      { padding: 0; }
  .footer-inner       { padding: 0; }
  .site-footer        { padding: 48px 20px 28px; }

  /* Hero stats: stack as one-per-line on phones for readability */
  .hero-stats { gap: 8px; row-gap: 4px; }

  /* Library cards: tighter padding */
  .library-card { padding: 22px 20px 18px; }

  /* Features: tighter padding */
  .feature { padding: 28px 22px; }

  /* How-it-works: tighter step layout */
  .how-list li { padding: 22px 20px; gap: 16px; grid-template-columns: 40px 1fr; }
  .step-num { width: 32px; height: 32px; font-size: 14px; }

  /* FAQ: tighter padding */
  .faq-list summary { padding: 18px 20px; font-size: 16px; }
  .faq-list details p { padding: 0 20px 20px; }

  /* Mark scheme cells: tighter padding */
  .mark-domain { padding: 24px 22px; }
  .aside { margin-top: 28px; padding: 4px 0 4px 18px; }

  /* Split-grid stays single column (already in media query above);
     ensure media height is sensible. */
  .split-grid { gap: 28px; }
}

@media (max-width: 480px) {
  /* Very small phones: even tighter */
  .header-inner       { padding: 10px 14px; gap: 8px; }
  .hero               { padding: 44px 16px 40px; }
  .section            { padding: 44px 16px; }
  .cta-strip          { padding: 44px 16px; }
  .site-footer        { padding: 40px 16px 24px; }
  .container          { padding: 0 16px; }

  /* Hero CTAs full-width on smallest screens */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; text-align: center; }
}

/* Mobile-nav drawer CTA — last item, styled as a prominent button */
.mobile-nav .mobile-nav-cta {
  background: var(--accent);
  color: white;
  font-weight: 600;
  padding: 18px 24px;
  border-bottom: none;
}
.mobile-nav .mobile-nav-cta:hover { background: var(--accent-2); color: white; }

/* ============================================================
   STATION LIBRARY — magazine TOC layout (replaces the card grid)
   ============================================================ */

.library-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.library-entry {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  column-gap: 24px;
  row-gap: 6px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.library-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.library-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  text-transform: none;
}

.library-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.library-list {
  grid-column: 2 / 4;
  margin: 2px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .library-entry {
    grid-template-columns: 36px 1fr;
    column-gap: 16px;
    padding: 22px 0;
  }
  .library-name { font-size: 18px; }
  .library-count {
    grid-column: 2;
    margin-top: -4px;
    font-size: 11px;
  }
  .library-list {
    grid-column: 2;
    font-size: 14px;
  }
}

/* ============================================================
   LIBRARY TOC — accordion variant (overrides earlier list rules)
   ============================================================ */

.library-toc {
  border-top: 1px solid var(--ink);
}

.library-entry {
  border-bottom: 1px solid var(--rule);
  padding: 0;
  display: block;
}

.library-entry summary {
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  column-gap: 24px;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.library-entry summary::-webkit-details-marker { display: none; }
.library-entry summary::marker { display: none; content: ""; }

.library-entry summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1;
  justify-self: end;
  transition: transform 0.15s ease;
}

.library-entry[open] summary::after { content: "−"; }

.library-entry summary:hover .library-name { color: var(--accent); }
.library-entry summary:hover::after { color: var(--ink); }

.library-entry .library-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
  transition: color 0.1s;
}

.library-expand {
  padding: 0 32px 24px 72px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}
.library-expand p { margin: 0; max-width: 80ch; }

@media (max-width: 720px) {
  .library-entry summary {
    grid-template-columns: 36px 1fr 28px;
    column-gap: 14px;
    padding: 18px 0;
  }
  .library-entry .library-name { font-size: 17px; }
  .library-entry summary::after { font-size: 20px; }
  .library-expand { padding: 0 0 18px 50px; font-size: 14px; }
}

/* ============================================================
   PRICING PAGE
   ============================================================ */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (max-width: 920px) {
  .plans-grid { grid-template-columns: 1fr; }
}

.plan-card {
  position: relative;
  background: var(--bg);
  padding: 40px 32px 36px;
  display: flex;
  flex-direction: column;
}

.plan-card.popular {
  background: var(--bg-2);
  border: 2px solid var(--ink);
  margin: -1px;
  z-index: 1;
}

.plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
}

.plan-head { margin-bottom: 24px; }

.plan-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  text-transform: none;
}

.plan-tagline {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 14px;
}

.plan-amount {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.plan-period {
  font-size: 15px;
  color: var(--ink-3);
  font-weight: 500;
}

.plan-allowance {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--ink-2);
}
.plan-allowance strong { color: var(--ink); font-weight: 700; }

.plan-allowance-note {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.plan-cta { text-align: center; width: 100%; margin-bottom: 28px; }

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  font-size: 14px;
  color: var(--ink-2);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 1px;
  background: var(--ink);
}

/* --- Annual strip --- */

.annual-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 48px;
  align-items: center;
}

@media (max-width: 820px) {
  .annual-strip { grid-template-columns: 1fr; gap: 32px; padding: 32px 28px; }
}

.annual-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.annual-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.1;
}

.annual-lead {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 56ch;
}

.annual-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.annual-points li {
  font-size: 14px;
  color: var(--ink-2);
  padding-left: 18px;
  position: relative;
}

.annual-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink);
  font-weight: 700;
}

.annual-pricebox {
  background: var(--ink);
  color: white;
  padding: 32px 28px;
  text-align: center;
}

.annual-vs {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 14px;
}

.annual-compare {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

.annual-old {
  font-size: 20px;
  color: #64748b;
  text-decoration: line-through;
  font-weight: 500;
}

.annual-new {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1;
}

.annual-pricebox .btn {
  width: 100%;
  background: white;
  color: var(--ink);
}
.annual-pricebox .btn:hover { background: var(--bg-3); color: var(--ink); }

.annual-fine {
  font-size: 12px;
  color: #94a3b8;
  margin: 16px 0 0;
  line-height: 1.5;
}

/* --- Included list --- */

.included-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
  row-gap: 18px;
}

@media (max-width: 720px) {
  .included-list { grid-template-columns: 1fr; column-gap: 0; row-gap: 14px; }
}

.included-list li {
  font-size: 15px;
  color: var(--ink-2);
  padding-left: 22px;
  position: relative;
  line-height: 1.6;
}

.included-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 1px;
  background: var(--ink);
}

.included-list li strong { color: var(--ink); font-weight: 600; }

/* Mobile tightening for plans */
@media (max-width: 720px) {
  .plan-card { padding: 32px 24px 28px; }
  .plan-card.popular { margin: -1px 0; }
  .plan-amount { font-size: 40px; }
  .annual-title { font-size: clamp(24px, 5vw, 32px); }
  .annual-new { font-size: 36px; }
}

/* ============================================================
   STATIONS INDEX — redesigned to match marketing pages
   Overrides the older .scenario-card flip-on-hover styling.
   ============================================================ */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  padding: 0;
}

.scenario-card {
  background: var(--bg);
  padding: 32px 28px 28px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 14px;
  align-items: start;
  position: relative;
  min-height: 200px;
  transition: background 0.15s;
}

.scenario-card:hover {
  background: var(--bg-2);
  color: inherit;
}

.scenario-card-num {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-4);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  align-self: center;
}

.scenario-card-arrow {
  grid-column: 2;
  grid-row: 1;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-4);
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s;
  align-self: center;
}

.scenario-card:hover .scenario-card-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

.scenario-card-title {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-transform: none;
  transition: color 0.15s;
}

.scenario-card:hover .scenario-card-title {
  color: var(--accent);
}

.scenario-card-meta {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  align-self: end;
}

.scenario-card .tag {
  font-size: 11px;
  background: var(--bg-3);
  color: var(--ink-2);
  padding: 4px 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.scenario-card:hover .tag {
  background: var(--bg);
  color: var(--ink);
}

.scenario-empty {
  padding: 40px 28px;
  background: var(--bg);
  color: var(--ink-3);
  font-size: 14px;
}
.scenario-empty code {
  background: var(--bg-3);
  padding: 2px 6px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Station browse: compact page header + filter bar + grouped grid */
.station-browse .is-hidden { display: none !important; }

.page-header {
  background: var(--bg);
  padding: 48px 24px 28px;
}
.page-header-title {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
}
.page-header-lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
  max-width: 70ch;
}

.station-filterbar {
  padding-top: 20px;
  padding-bottom: 24px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.filterbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filterbar-search {
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--rule);
  transition: border-color 120ms ease;
}
.filterbar-search:focus-within { border-color: var(--ink); }
.filterbar-search-icon { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.filterbar-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.filterbar-search input::placeholder { color: var(--ink-3); }
.filterbar-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.filterbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.filterbar-count strong { color: var(--ink); font-weight: 700; }
.filterbar-clear {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filterbar-clear:hover { color: var(--ink); }

.filterbar-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
}
.filterbar-row + .filterbar-row { border-top: 1px dashed var(--rule); }
.filterbar-row-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 4px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.station-empty {
  padding: 80px 0;
  text-align: center;
}
.station-empty h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.station-empty p {
  color: var(--ink-3);
  margin: 0 0 20px;
}

/* Grouped-by-category station index */
.station-category { padding-top: 40px; padding-bottom: 40px; }
.station-category + .station-category { padding-top: 0; }
.station-browse > .station-category:first-of-type { padding-top: 32px; }

.station-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.station-category-name {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.station-category-count {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .scenario-card { padding: 24px 22px 22px; min-height: 0; }
  .scenario-card-title { font-size: 18px; }
  .station-category { padding-top: 40px; padding-bottom: 40px; }
  .station-category-name { font-size: 22px; }
  .page-header { padding: 32px 20px 18px; }
  .station-filterbar { padding-top: 16px; padding-bottom: 20px; }
  .filterbar { gap: 12px; }
  .filterbar-search { flex-basis: 100%; padding: 10px 14px; }
  .filterbar-meta { width: 100%; justify-content: space-between; }
  .filterbar-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
  .filterbar-row-label { width: auto; padding-top: 0; }
  .chip { padding: 6px 12px; font-size: 12px; }
}

/* ============================================================
   STATIONS INDEX — tinted/lift redesign overrides
   ============================================================ */

.scenario-grid {
  background: var(--rule);
  border: 1px solid var(--rule);
}

.scenario-card {
  background: var(--bg-2);
  padding: 28px 26px 24px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  row-gap: 16px;
  min-height: 220px;
  position: relative;
  transition: background 0.18s ease;
}

.scenario-card:hover {
  background: var(--bg);
}

/* Top row: number + duration on opposite ends */
.scenario-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.scenario-card-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--ink-4);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-transform: none;
  transition: color 0.18s ease;
}

.scenario-card:hover .scenario-card-num {
  color: var(--ink);
}

.scenario-card-duration {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--bg);
  padding: 4px 10px;
  font-variant-numeric: tabular-nums;
  transition: background 0.18s, color 0.18s;
}

.scenario-card:hover .scenario-card-duration {
  background: var(--ink);
  color: white;
}

/* Title in the middle row, top-aligned */
.scenario-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-transform: none;
  align-self: start;
  transition: color 0.15s;
}

.scenario-card:hover .scenario-card-title {
  color: var(--accent);
}

/* Bottom row: tags */
.scenario-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.scenario-card .tag {
  font-size: 11px;
  background: var(--bg);
  color: var(--ink-2);
  padding: 5px 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 1px solid var(--rule);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.scenario-card:hover .tag {
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--rule-strong);
}

/* Arrow positioned absolutely so it doesn't interfere with grid layout */
.scenario-card-arrow {
  position: absolute;
  bottom: 24px;
  right: 26px;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-4);
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.scenario-card:hover .scenario-card-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .scenario-card { padding: 22px 20px 20px; min-height: 180px; row-gap: 14px; }
  .scenario-card-num { font-size: 30px; }
  .scenario-card-title { font-size: 18px; }
  .scenario-card-arrow { bottom: 20px; right: 20px; font-size: 20px; }
}

/* ============================================================
   AUTH - login, signup, password reset, email verify
   Single column card on a tinted bg, flat to match the rest.
   ============================================================ */

body.auth main { background: var(--bg-2, #f8fafc); }

.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 64px 24px 96px;
  min-height: calc(100vh - 200px);
}

.auth-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 460px;
  padding: 44px 44px 36px;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.15;
}
.auth-lead {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.field-label-opt {
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
}
.field input[type="email"],
.field input[type="text"],
.field input[type="password"] {
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease;
}
.field input:focus { border-color: var(--ink); }
.field-error {
  font-size: 12px;
  color: var(--bad, #991b1b);
  margin-top: 2px;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.field-inline input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ink);
  margin: 0;
}

.btn.block { display: flex; justify-content: center; width: 100%; }

.auth-error {
  padding: 12px 14px;
  border-left: 3px solid var(--bad, #991b1b);
  background: #fef2f2;
  color: var(--bad, #991b1b);
  font-size: 14px;
  margin-bottom: 20px;
}

.auth-fineprint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 4px 0 0;
}

.auth-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}
.auth-foot a { color: var(--ink); font-weight: 600; }
.auth-foot a:hover { color: var(--accent); }
.auth-foot-sep { margin: 0 8px; color: var(--ink-3); }

/* Header auth state */
.header-greeting {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 10px;
}
.header-greeting:hover { color: var(--ink); }
.logout-form {
  display: inline-flex;
  margin: 0;
}
.logout-form button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 720px) {
  .auth-wrap { padding: 32px 16px 56px; }
  .auth-card { padding: 32px 24px 28px; max-width: none; }
  .auth-title { font-size: 24px; }
}

/* ============================================================
   ABOUT PAGE - station-flow process diagram + principles grid
   ============================================================ */

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.flow-step {
  background: var(--bg);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.flow-step-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 22px;
  display: block;
}
.flow-step-icon svg { width: 100%; height: 100%; display: block; }
.flow-step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.flow-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0 0 10px;
  line-height: 1.3;
}
.flow-step p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 880px) {
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .flow-steps { grid-template-columns: 1fr; }
  .flow-step { padding: 24px 22px 26px; }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 36px;
}
.principle {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}
.principle h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.25;
}
.principle p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 880px) {
  .principles { grid-template-columns: 1fr; gap: 28px; }
}

/* ============================================================
   DASHBOARD - candidate's logged-in landing page
   Status strip with plan/credit info + recent attempts list.
   Reuses page-header + section from the marketing system.
   ============================================================ */

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.status-strip-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.status-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.status-note {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.status-strip-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Tint the strip by status category */
.status-strip.status-trial_open    { background: #f8fafc; }
.status-strip.status-trial_used    { background: #fef2f2; border-color: #fecaca; }
.status-strip.status-trial_used .status-label { color: #991b1b; }
.status-strip.status-paid_quota    { background: var(--bg); }
.status-strip.status-paid_unlimited,
.status-strip.status-internal      { background: var(--ink); border-color: var(--ink); }
.status-strip.status-paid_unlimited .status-label,
.status-strip.status-internal .status-label { color: rgba(255,255,255,0.6); }
.status-strip.status-paid_unlimited .status-note,
.status-strip.status-internal .status-note  { color: #fff; }
.status-strip.status-paid_unlimited .btn.ghost,
.status-strip.status-internal .btn.ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.status-strip.status-paid_unlimited .btn.ghost:hover,
.status-strip.status-internal .btn.ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

/* Attempts list */
.attempts-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.attempts-count {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.attempts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.attempt {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--rule);
}
.attempt-when {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.attempt-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.attempt-time {
  font-size: 12px;
  color: var(--ink-3);
}
.attempt-station { min-width: 0; }
.attempt-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.attempt-meta {
  font-size: 12px;
  color: var(--ink-3);
}

.attempt-bands {
  display: flex;
  gap: 4px;
}
.attempt-band {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--bg-3, #f1f5f9);
  color: var(--ink-3);
  cursor: help;
}
.attempt-band.band-4 { background: #166534; color: #fff; }
.attempt-band.band-3 { background: #15803d; color: #fff; }
.attempt-band.band-2 { background: #b45309; color: #fff; }
.attempt-band.band-1 { background: #991b1b; color: #fff; }

.attempt-status {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  background: var(--bg-3, #f1f5f9);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.attempt-status-failed { background: #fef2f2; color: #991b1b; }

.attempt-rating {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--bg-3, #f1f5f9);
  color: var(--ink-2);
  white-space: nowrap;
}
.attempt-rating-pass       { background: #166534; color: #fff; }
.attempt-rating-borderline { background: #b45309; color: #fff; }
.attempt-rating-fail       { background: #991b1b; color: #fff; }

.attempt-actions a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.attempt-actions a:hover { color: var(--accent); }

.attempts-empty {
  padding: 60px 28px;
  text-align: center;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.attempts-empty h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}
.attempts-empty p {
  max-width: 56ch;
  margin: 0 auto 24px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 880px) {
  .status-strip { flex-direction: column; align-items: stretch; gap: 16px; }
  .status-strip-actions { width: 100%; }
  .status-strip-actions .btn { flex: 1; justify-content: center; }
  .attempt {
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
  }
  .attempt-when { flex-direction: row; gap: 6px; align-items: baseline; grid-column: 1 / 3; }
  .attempt-station { grid-column: 1 / 3; }
  .attempt-bands { grid-column: 1; }
  .attempt-overall, .attempt-actions { grid-column: 2; justify-self: end; }
}

/* ============================================================
   ATTEMPT-TAG OVERLAYS on station cards (dashboard catalog)
   ============================================================ */
.scenario-card.has-attempt {
  /* Slight visual hint that this card has been attempted before */
  border-color: var(--ink-3);
}
.tag.attempt-tag {
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tag.attempt-tag-pass       { background: #166534; color: #fff; border-color: #166534; }
.tag.attempt-tag-borderline { background: #b45309; color: #fff; border-color: #b45309; }
.tag.attempt-tag-fail       { background: #991b1b; color: #fff; border-color: #991b1b; }
.scenario-card:hover .tag.attempt-tag       { background: #fff; color: var(--ink); border-color: var(--ink); }
.scenario-card:hover .tag.attempt-tag-pass       { background: #fff; color: #166534; border-color: #166534; }
.scenario-card:hover .tag.attempt-tag-borderline { background: #fff; color: #b45309; border-color: #b45309; }
.scenario-card:hover .tag.attempt-tag-fail       { background: #fff; color: #991b1b; border-color: #991b1b; }

/* ============================================================
   /account/ - profile + email + password + plan + danger zone
   Two-column card grid on desktop, single column on phone.
   ============================================================ */

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.account-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 28px 28px 28px;
  display: flex;
  flex-direction: column;
}
.account-card-head { margin-bottom: 18px; }
.account-card-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.account-card-head p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}
.account-card .auth-form { gap: 14px; }
.account-card .btn { align-self: flex-start; }
.account-card .field input[type="text"] { padding: 9px 12px; font-size: 14px; }

/* Profile section spans both columns (more fields) */
.account-card:first-child { grid-column: 1 / -1; }

.account-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  margin-bottom: 16px;
}
.account-row-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.account-row-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #166534;
}

.account-card-danger {
  border-color: #fecaca;
  background: #fef2f2;
}
.account-card-danger .account-card-head h2 { color: #991b1b; }
.account-card-danger .account-card-head p { color: #7f1d1d; }

.account-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn.danger {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
.btn.danger:hover {
  background: #7f1d1d;
  border-color: #7f1d1d;
  color: #fff;
}

.account-flash {
  padding: 14px 18px;
  border-left: 3px solid var(--ink);
  background: var(--bg-2, #f8fafc);
  font-size: 14px;
  margin-bottom: 16px;
}
.account-flash-success { border-left-color: #166534; }
.account-flash-error   { border-left-color: #991b1b; background: #fef2f2; }
.account-flash-info    { border-left-color: var(--ink); }

.field-help {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

@media (max-width: 880px) {
  .account-grid { grid-template-columns: 1fr; gap: 16px; }
  .account-card:first-child { grid-column: 1; }
  .account-card { padding: 22px 22px; }
}

/* ---------- Condition SEO article pages (/plab-2/conditions/<slug>/) ---------- */

.condition-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}

.condition-breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.condition-breadcrumb a { color: var(--ink-3); text-decoration: none; }
.condition-breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.condition-breadcrumb .sep { margin: 0 6px; color: var(--ink-4); }

.condition-header { margin-bottom: 40px; }
.condition-header h1 {
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.condition-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.condition-meta {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0;
}

.condition-block { margin: 48px 0; }
.condition-block h2 {
  font-size: 24px;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
}
.condition-block > p { margin: 0 0 16px; }

.differential-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}
.differential-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.dx-name { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.dx-summary { color: var(--ink-2); font-size: 15px; }

.approach-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.approach-step {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
}
.approach-step h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
}
.approach-detail {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0 0 12px;
}
.approach-bullets { margin: 0; padding-left: 22px; }
.approach-bullets li { margin-bottom: 6px; }
.approach-bullets li strong { color: var(--ink); }

.condition-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: var(--ink);
  color: #fff;
  margin: 48px 0;
}
.condition-cta h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
}
.condition-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.55;
  max-width: 440px;
}
.condition-cta .btn {
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}
.condition-cta .btn:hover { background: rgba(255, 255, 255, 0.85); }

.pitfall-list { margin: 16px 0 0; padding-left: 22px; }
.pitfall-list li { margin-bottom: 10px; }

.faq-list { margin-top: 16px; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  padding-right: 26px;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-3);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.condition-related ul {
  margin: 16px 0 0;
  padding-left: 22px;
}
.condition-related li { margin-bottom: 6px; }

.condition-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-4);
}
.condition-footer p { margin: 0; }

@media (max-width: 720px) {
  .condition-article { padding: 24px 18px 48px; }
  .condition-header h1 { font-size: 28px; }
  .condition-lede { font-size: 16px; }
  .condition-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
}

/* ---------- Examination findings panel (station live view) ---------- */

.findings-panel {
  position: fixed;
  top: 80px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 36px rgba(10, 18, 36, 0.16);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateX(calc(100% + 48px));
  transition: transform 220ms ease-out;
}
.findings-panel.is-open { transform: translateX(0); }

.findings-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink);
  color: #fff;
}
.findings-panel-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.findings-panel-close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.findings-panel-close:hover { color: #fff; }

.findings-panel-body {
  overflow-y: auto;
  padding: 4px 20px 18px;
}

.findings-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.findings-group:last-child { border-bottom: 0; }
.findings-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.findings-group-value {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.findings-empty {
  padding: 18px 0;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

@media (max-width: 720px) {
  .findings-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(100%);
  }
  .findings-panel.is-open { transform: translateY(0); }
}
