/* Life in the UK Test Prep: one stylesheet for every page. */

/* Colours. Light is the default: white and #f5f5f7 pages, near-black type
   and buttons, the app's navy and blue for accents. The sun/moon button in
   the nav switches to dark (data-theme="dark" on <html>, remembered in
   localStorage by site.js): black pages, white type and buttons, with the
   light blue of the app's dark theme for accents. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --glow: #e9effa;
  --surface: #ffffff;
  --card-bg: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.1);
  --brand: #1b3b6f;
  --accent: #2456a6;
  --button: #1d1d1f;
  --on-button: #ffffff;
  --correct: #1b7f4b;
  --correct-soft: #e3f4ea;
  --wrong: #b3261e;
  --wrong-soft: #fbe6e4;
  --selected-soft: #e6edf8;
  --letter-bg: #eef1f6;
  --result-bg: #f5f5f7;
  --shadow: 0 30px 60px -20px rgba(16, 24, 40, 0.3), 0 12px 24px -12px rgba(16, 24, 40, 0.18);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --sun: none;
  --moon: block;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #111113;
  --glow: #1a1f2b;
  --surface: rgba(255, 255, 255, 0.07);
  --card-bg: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --hairline: rgba(255, 255, 255, 0.16);
  --brand: #a9c6f5;
  --accent: #a9c6f5;
  --button: #ffffff;
  --on-button: #000000;
  --correct: #7be0a5;
  --correct-soft: rgba(123, 224, 165, 0.16);
  --wrong: #ffb4ab;
  --wrong-soft: rgba(255, 180, 171, 0.16);
  --selected-soft: rgba(169, 198, 245, 0.2);
  --letter-bg: rgba(255, 255, 255, 0.12);
  --result-bg: rgba(255, 255, 255, 0.08);
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(0, 0, 0, 0.8);
  --sun: block;
  --moon: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.012em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.07;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.eyebrow {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand);
  margin-bottom: 10px;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text); opacity: 0.8; font-size: 13px; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-cta {
  font-size: 13px; font-weight: 500; white-space: nowrap;
  padding: 5px 13px; border-radius: 980px;
  background: var(--button); color: var(--on-button);
}
.nav-cta:hover { text-decoration: none; opacity: 0.88; }
.theme-toggle {
  display: grid; place-items: center; width: 32px; height: 32px; margin-left: -12px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text);
  opacity: 0.8; cursor: pointer;
}
.theme-toggle:hover { opacity: 1; background: var(--letter-bg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: var(--sun); }
.theme-toggle .icon-moon { display: var(--moon); }

/* Buttons */

.stores { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.store {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 168px; height: 54px; padding: 0 22px; border-radius: 14px;
  background: var(--button); color: var(--on-button); line-height: 1.1;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store:hover { text-decoration: none; opacity: 0.86; }
.store:active { transform: scale(0.98); }
.store small { font-size: 11px; font-weight: 500; letter-spacing: 0; opacity: 0.8; }
.store strong { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.fine { font-size: 14px; color: var(--muted); }

/* Phones */

.phone {
  --w: 300px;
  width: var(--w);
  flex: none;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.155);
  background: linear-gradient(145deg, #3a3a3c, #1c1c1e 40%, #0b0b0c);
  box-shadow: var(--shadow);
}
.phone img { width: 100%; aspect-ratio: 1320 / 2868; border-radius: calc(var(--w) * 0.125); background: #f2f3f7; }

/* Hero */

.hero {
  padding: 76px 0 0; text-align: center; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, var(--glow) 0%, transparent 60%), var(--bg);
}
.hero h1 { font-size: clamp(42px, 7.4vw, 80px); margin: 0 auto 18px; max-width: 13ch; }
.hero h1 .eyebrow { font-family: var(--font); font-size: 17px; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 14px; }
.hero .lead { font-size: clamp(19px, 2.3vw, 24px); line-height: 1.38; color: var(--muted); max-width: 32em; margin: 0 auto 32px; letter-spacing: -0.016em; }
.hero .fine { margin-top: 16px; }
.hero-phones {
  display: flex; justify-content: center; align-items: flex-start;
  margin-top: 64px; height: 560px; position: relative;
}
.hero-phones .phone:nth-child(1),
.hero-phones .phone:nth-child(3) { --w: 250px; margin-top: 70px; opacity: 0.98; }
.hero-phones .phone:nth-child(1) { margin-right: -36px; transform: rotate(-4deg); }
.hero-phones .phone:nth-child(3) { margin-left: -36px; transform: rotate(4deg); }
.hero-phones .phone:nth-child(2) { --w: 290px; position: relative; z-index: 1; }
.hero-phones::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* Test facts */

.facts { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 34px 12px; text-align: center; }
.facts li + li { border-left: 1px solid var(--hairline); }
.facts strong { display: block; font-family: var(--font-display); font-size: clamp(40px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.facts span { display: block; margin-top: 6px; font-size: 15px; color: var(--muted); }
.facts-note { text-align: center; padding: 18px 22px 22px; }

/* Sections */

.section { padding: 112px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 16px; }
.section-head p { font-size: 21px; line-height: 1.42; color: var(--muted); }

.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; }
.feature.flip .feature-text { order: 2; }
.feature-text h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 20px; }
.feature-text > p { font-size: 19px; line-height: 1.47; color: var(--muted); }
.feature-text > p strong { color: var(--text); font-weight: 600; }
.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.points li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; }
.points li::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); transform: translateY(-2px);
}
.feature-visual { display: flex; justify-content: center; align-items: flex-start; gap: 22px; }
.feature-visual .phone { --w: 268px; }
.feature-visual .phone + .phone { margin-top: 64px; }

/* Try a question */

.quiz {
  max-width: 640px; margin: 0 auto;
  background: var(--surface); border-radius: 28px; padding: 36px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px -16px rgba(16, 24, 40, 0.16);
}
.section.alt .quiz { box-shadow: none; }
.quiz, .plan { border: 1px solid var(--hairline); }
.quiz-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.quiz h3 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 6px; }
.quiz-hint { font-size: 15px; color: var(--muted); margin-bottom: 22px; }
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.option {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--hairline); background: transparent;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.option:hover:not(:disabled) { border-color: var(--accent); }
.option:disabled { cursor: default; }
.letter {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; font-weight: 600; background: var(--letter-bg); color: var(--muted);
}
.option[aria-pressed="true"] { background: var(--selected-soft); border-color: var(--accent); }
.option[aria-pressed="true"] .letter { background: var(--accent); color: var(--bg); }
.option.is-correct { background: var(--correct-soft); border-color: var(--correct); }
.option.is-correct .letter { background: var(--correct); color: var(--bg); }
.option.is-wrong { background: var(--wrong-soft); border-color: var(--wrong); }
.option.is-wrong .letter { background: var(--wrong); color: var(--bg); }
.quiz-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.check {
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 11px 26px; border-radius: 980px; border: 0; cursor: pointer;
  background: var(--button); color: var(--on-button);
}
.check:disabled { opacity: 0.35; cursor: default; }
.quiz-status { font-size: 15px; color: var(--muted); }
.quiz-result { margin-top: 22px; padding: 18px 20px; border-radius: 16px; background: var(--result-bg); }
.quiz-result strong { display: block; margin-bottom: 4px; }
.quiz-result.good strong { color: var(--correct); }
.quiz-result.bad strong { color: var(--wrong); }
.quiz-result p { font-size: 16px; color: var(--muted); }
.quiz-more { text-align: center; margin-top: 28px; font-size: 17px; }
.js .quiz-fallback { display: none; }
.quiz-fallback { margin-top: 18px; }
.quiz-fallback summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.quiz-fallback p { margin-top: 10px; }

/* Pricing */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.plan { background: var(--card-bg); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; }
.plan.featured { box-shadow: inset 0 0 0 2px var(--accent); border-color: transparent; }
.plan h3 { font-size: 28px; margin-bottom: 6px; }
.plan .price { font-size: 17px; color: var(--muted); margin-bottom: 24px; }
.plan .points { margin: 0 0 8px; }
.plan-foot { margin-top: auto; padding-top: 24px; font-size: 15px; color: var(--muted); }

/* FAQ */

.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.016em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 40px 24px 0; font-size: 17px; color: var(--muted); }

/* Closing call to action */

.closing { padding: 120px 0 128px; text-align: center; }
.closing h2 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 16px; }
.closing p.lead { font-size: 21px; color: var(--muted); margin-bottom: 32px; }
.closing .fine { margin-top: 16px; }

/* Text pages */

.page { padding: 72px 0 104px; }
.page h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 16px; }
.page .intro { font-size: 21px; line-height: 1.42; color: var(--muted); margin-bottom: 48px; }
.page h2 { font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 12px; }
.page p + p { margin-top: 14px; }
.page p { color: var(--text); }
.card-list { display: grid; gap: 14px; margin-top: 8px; }
.help-card { background: var(--card-bg); border-radius: var(--radius); padding: 24px 26px; }
.help-card h2 { margin: 0 0 8px; font-size: 20px; }
.help-card p { color: var(--muted); }
.page ul, .page ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.page li::marker { color: var(--muted); }
.page ul + p, .page ol + p, .page table + p { margin-top: 14px; }
.page .updated { margin-top: 48px; font-size: 14px; color: var(--muted); }
.page table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 16px; }
.page th, .page td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.page th { color: var(--muted); font-weight: 500; }

/* Breadcrumbs, chapter and guide pages */

.crumbs { padding-top: 28px; font-size: 13px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs + .page { padding-top: 40px; }

.topics { display: grid; gap: 0; border-top: 1px solid var(--hairline); margin-top: 8px; }
.topic { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.topic h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 4px; }
.page .topic p { color: var(--muted); }
.page .topic p + p { margin-top: 6px; }
.topic-count { font-size: 13px; }

.quiz-stack { display: grid; gap: 20px; margin-top: 24px; }
.quiz-stack .quiz { max-width: none; margin: 0; box-shadow: none; }
.quiz-stack .quiz h3 { font-size: 21px; }

.cta-card { margin-top: 56px; padding: 36px; border-radius: 28px; background: var(--card-bg); text-align: center; }
.page .cta-card h2 { margin: 0 0 10px; font-size: 26px; }
.page .cta-card p { color: var(--muted); max-width: 34em; margin: 0 auto 24px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pager a, .link-card {
  display: block; padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--hairline); color: var(--text); font-weight: 600;
}
.pager a:hover, .link-card:hover { text-decoration: none; border-color: var(--accent); }
.pager small, .link-card small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.pager .next { grid-column: 2; text-align: right; }
.link-card strong { display: block; font-size: 19px; letter-spacing: -0.01em; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 960px; margin: 0 auto; }
@media (max-width: 860px) { .chapter-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .chapter-grid { grid-template-columns: 1fr; } }
.link-card span { display: block; margin-top: 6px; font-weight: 400; color: var(--muted); }

/* Footer */

.foot { background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1.5; }
.foot .wrap { padding-top: 22px; padding-bottom: 34px; }
.foot p { padding: 12px 0; }
.foot p + p { border-top: 1px solid var(--hairline); }
.foot a { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Small screens */

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .feature.flip .feature-text { order: 0; }
  .feature .points { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
  .points li { text-align: left; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .nav-cta { margin-left: -16px; }
  .hero { padding-top: 52px; }
  .hero-phones { height: 440px; margin-top: 48px; }
  .hero-phones .phone:nth-child(1),
  .hero-phones .phone:nth-child(3) { display: none; }
  .hero-phones .phone:nth-child(2) { --w: 250px; }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
  .facts li { padding: 26px 8px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head p { font-size: 19px; }
  .feature-visual .phone { --w: 200px; }
  .feature-visual .phone + .phone { margin-top: 40px; }
  .feature-visual { gap: 14px; }
  .quiz, .plan { padding: 26px 20px; border-radius: 24px; }
  .quiz h3 { font-size: 21px; }
  .faq summary { font-size: 17px; padding: 20px 0; }
  .closing { padding: 88px 0 96px; }
  .page { padding: 48px 0 80px; }
  .crumbs + .page { padding-top: 28px; }
  .cta-card { padding: 28px 20px; border-radius: 24px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

@media (max-width: 370px) {
  .brand span { display: none; }
}

@media (max-width: 420px) {
  .feature-visual .phone { --w: 160px; }
  .store { min-width: 0; flex: 1 1 150px; }
}

