/* PassReady: "A2 Clear, refined" design. Calm navy and white with soft
   blue gradients in a few key places. */

:root {
  --ink: #0B2545;
  --muted: #475569;
  --line: #DDE5F5;
  --line-strong: #D3DEF5;
  --navy: #172A6E;
  --blue: #2448C9;
  --blue-bright: #4566F0;
  --blue-soft: #6E9BFF;
  --green: #0F7B4F;
  --green-soft: #34C38A;
  --red: #B42318;
  --red-bg: #FDECEA;
  --peach-ink: #8A3B00;
  --radius: 16px;
  --hero: linear-gradient(135deg, #172A6E 0%, #2448C9 50%, #4566F0 100%);
  --card: linear-gradient(180deg, #FFFFFF 0%, #F6F8FF 100%);
  --bar-blue: linear-gradient(90deg, #2448C9 0%, #6E9BFF 100%);
  --bar-green: linear-gradient(90deg, #0F7B4F 0%, #34C38A 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #F5F8FD linear-gradient(180deg, #DCE6FF 0px, #ECF1FF 300px, #F5F8FD 620px) no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
a:hover { color: #1B3596; }

button { font-family: inherit; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Header ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -0.2px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #1B2F7A, #3563E9); display: flex; align-items: center; justify-content: center; }
.icon-btn {
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.85);
  border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink);
}

.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
h1.title { margin: 2px 0 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.5px; }

/* ---- Home layout ---- */
.home-grid { display: grid; gap: 18px; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

@media (min-width: 900px) {
  .wrap { padding: 32px 32px 40px; gap: 24px; }
  .home-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px; align-items: start; }
  h1.title { font-size: 32px; }
}

/* ---- Readiness hero ---- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 20px;
  background: var(--hero); color: #FFFFFF;
  box-shadow: 0 12px 28px -12px rgba(36, 72, 201, 0.55);
  display: flex; flex-direction: column; gap: 14px;
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,180,255,0.45) 0%, rgba(140,180,255,0) 70%);
}
.hero > * { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-label { font-size: 13px; font-weight: 500; color: #DCE6FF; }
.hero-score { font-size: 44px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.05; }
.pill-glass { font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.hero-bar { height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; }
.hero-bar > div { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #A9C4FF, #FFFFFF); }
.hero-note { font-size: 13px; color: #E4ECFF; line-height: 1.45; margin: 0; }

/* ---- Cards and buttons ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

.start-btn {
  width: 100%;
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF3FF 100%);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 16px 18px; text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  box-shadow: 0 6px 18px -10px rgba(11, 37, 69, 0.25);
  text-decoration: none; color: var(--ink);
}
.start-btn strong { display: block; font-size: 16px; font-weight: 600; }
.start-btn span.sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.go-chip { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: linear-gradient(135deg, #2448C9, #3563E9); display: flex; align-items: center; justify-content: center; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile {
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F7FF 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  text-decoration: none; color: var(--ink);
}
.tile small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tile-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tint-peach { background: linear-gradient(135deg, #FFE4C7, #FFF3E6); }
.tint-blue { background: linear-gradient(135deg, #D9E4FF, #EEF3FF); }
.tint-green { background: linear-gradient(135deg, #D4F2E3, #ECF9F2); }

.topic-row { display: block; width: 100%; background: none; border: none; padding: 8px 0; text-align: left; cursor: pointer; text-decoration: none; color: var(--ink); }
.topic-row + .topic-row { border-top: 1px solid #EEF2FA; }
.topic-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.topic-head span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: #EAF0F8; border-radius: 3px; }
.bar > div { height: 6px; border-radius: 3px; background: var(--bar-blue); }
.bar > div.good { background: var(--bar-green); }

.footnote { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; margin: 8px 0 0; }

.primary {
  border: none; border-radius: 14px; padding: 14px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
  color: #FFFFFF; background: linear-gradient(135deg, #172A6E 0%, #2448C9 55%, #4566F0 100%);
  box-shadow: 0 10px 22px -12px rgba(36, 72, 201, 0.6); text-decoration: none; text-align: center;
}
.primary:disabled { opacity: 0.5; cursor: default; }
.secondary {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: #FFFFFF; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}

/* ---- Question screen ---- */
.test { max-width: 640px; width: 100%; margin: 0 auto; }
.test-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.counter { font-size: 14px; font-weight: 600; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; background: rgba(255,255,255,0.85); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.timer.low { color: var(--red); border-color: #F3B8B2; }
.progress { height: 6px; background: var(--line); border-radius: 3px; }
.progress > div { height: 6px; border-radius: 3px; background: var(--bar-blue); transition: width 0.2s ease; }

.q-card { background: linear-gradient(180deg, #F3F6FF 0%, #FFFFFF 55%); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 24px -14px rgba(11, 37, 69, 0.25); }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 6px 12px; }
.badge.values { color: var(--peach-ink); background: linear-gradient(135deg, #FFE4C7, #FFF3E6); }
.badge.topic { color: var(--blue); background: linear-gradient(135deg, #D9E4FF, #EEF3FF); }
.q-text { margin: 0; font-size: 21px; line-height: 1.38; font-weight: 600; letter-spacing: -0.2px; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  text-align: left; font-size: 15px; line-height: 1.4; cursor: pointer;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FF 100%);
  border: 1px solid #D6E0F5; border-radius: 14px; padding: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.option:hover:not(:disabled) { border-color: var(--blue-soft); }
.option.selected {
  font-weight: 600; padding: 15px; border: 2px solid transparent;
  background: linear-gradient(135deg, #EEF3FF 0%, #F6F8FF 100%) padding-box, linear-gradient(135deg, #2448C9 0%, #6E9BFF 100%) border-box;
}
.option.correct { padding: 15px; border: 2px solid var(--green); background: #EAF7F0; font-weight: 600; }
.option.wrong { padding: 15px; border: 2px solid var(--red); background: var(--red-bg); }
.option:disabled { cursor: default; }
.tick { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2448C9, #3563E9); }
.tick.green { background: var(--green); }
.tick.red { background: var(--red); }

.feedback { border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.feedback.ok { background: #EAF7F0; border: 1px solid #BFE6D1; }
.feedback.no { background: var(--red-bg); border: 1px solid #F3B8B2; }
.feedback strong { display: block; margin-bottom: 4px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .primary { flex: 1 1 200px; }

/* ---- Results ---- */
.result-hero { text-align: center; }
.result-hero.fail { background: linear-gradient(135deg, #3A2A6E 0%, #5B3FD1 60%, #7B6CF0 100%); }
.result-hero .big { font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.review-item { padding: 12px 0; font-size: 14px; line-height: 1.5; }
.review-item + .review-item { border-top: 1px solid #EEF2FA; }
.review-item .q { font-weight: 600; margin-bottom: 4px; }
.review-item .yours { color: var(--red); }
.review-item .right { color: var(--green); font-weight: 600; }
.review-item .why { color: var(--muted); margin-top: 4px; }

.listen-stage { min-height: 160px; }
.listen-phase { font-size: 12px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: 0.8px; }

.empty-note { font-size: 14px; color: var(--muted); }
