/* ============================================================
   cgltyping.in — Design System
   Professional education platform. Light theme.
   Fonts: Merriweather (headings) · Roboto Slab (body/UI) ·
          JetBrains Mono (typing area) · Plus Jakarta Sans (stats)
   ============================================================ */

:root {
  /* Color */
  --white: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-tint: #eef3fb;
  --ink: #10233e;
  --body: #3a4a5e;
  /* #64748b was 4.43:1 on --bg-soft — just under WCAG AA (4.5). */
  --muted: #5a6880;
  --line: #e2e8f0;
  --line-dark: #cbd5e1;
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --blue-tint: #e8effc;
  --navy: #0f2137;
  --green: #15803d;
  --green-bg: #e9f7ef;
  --red: #b91c1c;
  --red-bg: #fdecec;
  --amber: #92610c;
  --amber-bg: #fdf3e0;
  --saffron: #c2410c;
  --saffron-bg: #fef1e8;
  --teal: #0f766e;
  --teal-bg: #e6f5f3;

  /* Type */
  --font-head: "Merriweather", Georgia, serif;
  --font-body: "Roboto Slab", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --font-stat: "Plus Jakarta Sans", "Inter", sans-serif;
  --font-devanagari: "Noto Sans Devanagari", "Mangal", sans-serif;
  --font-gurmukhi: "Noto Sans Gurmukhi", "Raavi", sans-serif;
  --font-gujarati: "Noto Sans Gujarati", "Shruti", sans-serif;
  --font-tamil: "Noto Sans Tamil", "Latha", sans-serif;

  /* Shape */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(16, 35, 62, 0.07);
  --shadow-md: 0 6px 24px rgba(16, 35, 62, 0.09);

  /* Width */
  --w-page: 1120px;
  --w-text: 760px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:not(.btn):hover { text-decoration: none; color: var(--blue-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.28;
  margin: 0 0 0.55em;
  font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.13rem; }
p { margin: 0 0 1em; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.7em 0.9em; border-bottom: 1px solid var(--line); }

.wrap { max-width: var(--w-page); margin: 0 auto; padding: 0 1.4rem; }

section { padding: 4rem 0; }
.section--soft { background: var(--bg-soft); }

.kicker {
  display: inline-block; font-family: var(--font-stat); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 0.7rem;
}
.section-head { max-width: 640px; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); }

@media (max-width: 640px) {
  section { padding: 2.75rem 0; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  .section-head { margin-bottom: 1.75rem; }
}

/* ---------- Header ---------- */
.header {
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
}
.header__in {
  max-width: var(--w-page); margin: 0 auto; padding: 0.75rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: relative;
}
/* min-height keeps the logo a 44px-tall tap target even though the mark is 28px. */
.logo { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-stat); font-weight: 800; font-size: 1.22rem; color: var(--ink); flex-shrink: 0; min-height: 44px; }
.logo:hover { text-decoration: none; }
/* Brand icon carries its own colour — no chip background behind it. */
.logo__mark { width: 45px; height: 28px; object-fit: contain; flex-shrink: 0; display: block; }
.logo em { font-style: normal; color: var(--blue); }

/* Centered nav column — sits between logo and actions (desktop only) */
.nav-desktop { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav__links > li { position: relative; }
.nav__links a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav__links a:hover { color: var(--blue); text-decoration: none; }

.header__actions { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }

/* More dropdown (desktop) */
.dropdown__btn {
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
  font-weight: 500; font-size: 0.95rem; color: var(--ink); padding: 0;
  display: flex; align-items: center; gap: 0.3em;
}
.dropdown__btn::after { content: "▾"; font-size: 0.75em; color: var(--muted); }
.dropdown__btn:hover { color: var(--blue); }
/* Columns size to their longest link (max-content) rather than a fixed 640px/4.
   At a fixed width each column was ~130px while "English Typing Test" needs ~133px,
   so every long label wrapped onto two lines. */
.dropdown__menu {
  display: none; position: absolute; top: calc(100% + 14px); right: -20px; left: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 1.4rem 1.7rem;
  width: max-content; max-width: calc(100vw - 2.8rem);
  grid-template-columns: repeat(4, max-content); gap: 1.5rem 2.2rem; z-index: 70;
  align-items: start;
}
@media (max-width: 1060px) {
  .dropdown__menu { grid-template-columns: repeat(2, max-content); }
}
.dropdown.open .dropdown__menu { display: grid; }
.dropdown__menu h5 {
  margin: 0 0 0.6rem; font-family: var(--font-stat); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
.dropdown__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.dropdown__menu a { font-size: 0.88rem; font-weight: 400; color: var(--body); white-space: nowrap; display: block; }
.dropdown__menu a:hover { color: var(--blue); }
.dropdown__all { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 0.9rem; font-size: 0.88rem; font-weight: 600; }

.nav__burger {
  display: none; background: none; border: 1px solid var(--line-dark); border-radius: var(--r-sm);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink); font-size: 1.15rem; flex-shrink: 0;
  align-items: center; justify-content: center;
}

/* Mobile menu — separate, self-contained markup. Sibling of .header__in,
   so it never fights the header row's flex layout. */
.mobile-menu { display: none; }

@media (max-width: 860px) {
  .nav-desktop, .header__actions .btn { display: none; }
  .nav__burger { display: flex; }

  .header.open .mobile-menu {
    display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    max-height: calc(100vh - 62px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .mobile-menu__links { list-style: none; margin: 0; padding: 0.4rem 1.4rem 0; }
  .mobile-menu__links li { border-bottom: 1px solid var(--line); }
  .mobile-menu__links a { display: block; padding: 0.9em 0; font-weight: 600; font-size: 1rem; color: var(--ink); }
  .mobile-menu__links a:hover { color: var(--blue); text-decoration: none; }

  .mobile-menu__group { padding: 0 1.4rem; }
  .mobile-menu__label {
    display: block; font-family: var(--font-stat); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
    padding: 1rem 0 0.5rem; border-top: 6px solid var(--bg-soft); margin-top: 0;
  }
  .mobile-menu__group ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu__group li { border-bottom: 1px solid var(--line); }
  .mobile-menu__group a { display: block; padding: 0.75em 0; font-size: 0.93rem; color: var(--body); }
  .mobile-menu__group a:hover { color: var(--blue); text-decoration: none; }

  .mobile-menu__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; padding: 1.1rem 1.4rem 1.3rem; border-top: 6px solid var(--bg-soft); }
  .mobile-menu__actions .btn { flex: 1 1 130px; }
}

/* WhatsApp button */
/* #128c4a was 4.31:1 on white — under WCAG AA. */
.btn--whatsapp { background: #fff; color: #0f7a40; border-color: #0f7a40; box-shadow: 3px 3px 0 #cdeedd; }
.btn--whatsapp:hover { background: #f0fdf6; box-shadow: 5px 5px 0 #cdeedd; }
.btn--whatsapp svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Buttons — minimal, sharp-cornered, tactile ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: var(--font-body); font-weight: 500; font-size: 0.96rem;
  padding: 0.72em 1.5em; border-radius: var(--r-sm); border: 1.5px solid var(--ink);
  cursor: pointer; position: relative;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink) !important; }

.btn--primary { background: var(--blue); color: #fff; border-color: var(--navy); box-shadow: 3px 3px 0 var(--navy); }
.btn--primary:hover { background: var(--blue-dark); box-shadow: 5px 5px 0 var(--navy); }

.btn--outline { background: var(--white); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--line-dark); }
.btn--outline:hover { box-shadow: 5px 5px 0 var(--line-dark); border-color: var(--blue); color: var(--blue); }

.btn--white { background: var(--white); color: var(--navy); border-color: rgba(255,255,255,0.4); box-shadow: 3px 3px 0 rgba(255,255,255,0.28); }
.btn--white:hover { background: #f3f6fb; box-shadow: 5px 5px 0 rgba(255,255,255,0.38); }

.btn--lg { font-size: 1.04rem; padding: 0.88em 2em; }
.btn--sm { font-size: 0.85rem; padding: 0.5em 1.1em; box-shadow: 2px 2px 0 var(--ink); }
.btn--sm:hover { box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--blue-tint); padding: 1.5rem 1.75rem; margin: 0 0 2.25rem;
}
.toc__title {
  font-family: var(--font-stat); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem;
}
.toc ol {
  margin: 0; padding: 0; list-style: none; counter-reset: toc;
  columns: 2; column-gap: 2rem;
}
.toc li {
  counter-increment: toc; break-inside: avoid; margin-bottom: 0.55rem;
  display: flex; align-items: baseline; gap: 0.6rem;
}
.toc li::before {
  content: counter(toc); font-family: var(--font-stat); font-weight: 800; font-size: 0.78rem;
  color: var(--blue); background: var(--blue-tint); border-radius: var(--r-sm);
  width: 1.35em; height: 1.35em; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
}
.toc a { font-weight: 600; font-size: 0.93rem; color: var(--body); line-height: 1.4; }
.toc a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } .toc { padding: 1.25rem 1.4rem; } }

/* ---------- Hero — centered ---------- */
.hero { background: linear-gradient(180deg, var(--bg-tint) 0%, var(--white) 100%); padding: 4.5rem 0 3.5rem; text-align: center; }
.hero h1 { max-width: 780px; margin-left: auto; margin-right: auto; }
.hero__sub { max-width: 620px; font-size: 1.1rem; color: var(--body); margin: 0 auto 1.9rem; }
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 0.9rem; }

/* Stat band */
.stats {
  margin: 2.75rem auto 0; max-width: 800px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stats > div { padding: 1.3rem 1.4rem; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: none; }
.stats b { font-family: var(--font-stat); font-weight: 800; font-size: 1.55rem; color: var(--ink); display: block; line-height: 1.2; }
.stats span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 680px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { border-left: none; }
  .stats > div:nth-child(1), .stats > div:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Feature cards ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.feature__no {
  font-family: var(--font-stat); font-weight: 800; font-size: 0.82rem; color: var(--blue);
  background: var(--blue-tint); border-radius: var(--r-sm); padding: 0.25em 0.6em; display: inline-block; margin-bottom: 0.9rem;
}
.feature h3 { margin-bottom: 0.4rem; }
.feature p { font-size: 0.94rem; color: var(--muted); margin: 0; }

/* ---------- Test directory — bento ---------- */
.bento-primary {
  background: linear-gradient(135deg, var(--navy) 0%, #17324f 100%); color: #fff;
  border-radius: var(--r-lg); padding: 2.2rem; margin-bottom: 1.6rem;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.bento-primary:hover, .bento-primary:hover * { text-decoration: none; }
.bento-primary__badge {
  display: inline-block; background: rgba(255,255,255,0.15); color: #fff; font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border-radius: var(--r-sm);
  padding: 0.3em 0.85em; margin-bottom: 0.9rem;
}
.bento-primary h3 { color: #fff; font-size: 1.5rem; margin-bottom: 0.5rem; }
.bento-primary p { color: #c4d1e3; max-width: 480px; margin-bottom: 0; }
.bento-primary__stats { display: flex; gap: 1.6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.bento-primary__stats div b { font-family: var(--font-stat); font-weight: 800; display: block; font-size: 1.2rem; }
.bento-primary__stats div span { font-size: 0.78rem; color: #a9b9cf; }
.bento-primary__actions { flex-shrink: 0; }
@media (max-width: 560px) {
  .bento-primary { padding: 1.6rem; }
  .bento-primary__actions { width: 100%; }
  .bento-primary__actions .btn { width: 100%; }
}

/* Category cards with colored accent system */
.test-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.4rem; }
.test-groups--quad { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .test-groups--quad { grid-template-columns: 1fr; } }
.test-group {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.6rem 1.5rem 1.4rem; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; padding-top: 1.85rem;
}
.test-group::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--tg, var(--blue)); }
.test-group--eng { --tg: var(--blue); --tg-bg: var(--blue-tint); }
.test-group--gov { --tg: var(--amber); --tg-bg: var(--amber-bg); }
.test-group--hin { --tg: var(--saffron); --tg-bg: var(--saffron-bg); }
.test-group--tools { --tg: var(--teal); --tg-bg: var(--teal-bg); }

.test-group__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.test-group__icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--tg-bg, var(--blue-tint)); color: var(--tg, var(--blue-dark));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--font-body); font-size: 1.05rem; font-weight: 700;
}
.test-group__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.test-group h3 { font-size: 1.05rem; margin: 0; }
.test-group__count {
  margin-left: auto; font-family: var(--font-stat); font-size: 0.7rem; font-weight: 700;
  color: var(--tg, var(--blue)); background: var(--tg-bg, var(--blue-tint)); padding: 0.25em 0.6em; border-radius: var(--r-sm);
  white-space: nowrap;
}
.test-group__desc { font-size: 0.86rem; color: var(--muted); margin: 0 0 1rem; }
.test-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.test-group li { border-top: 1px solid var(--line); }
.test-group li:first-child { border-top: none; }
/* Scoped to `li a` on purpose: a bare `.test-group a` also hit buttons and
   social icons inside these cards, giving them a stray "→" and flex sizing. */
.test-group li a { display: flex; justify-content: space-between; align-items: center; padding: 0.6em 0.5em; margin: 0 -0.5em; border-radius: var(--r-sm); font-size: 0.93rem; color: var(--body); }
.test-group li a::after { content: "→"; color: var(--line-dark); transition: transform 0.12s ease, color 0.12s ease; }
.test-group li a:hover { color: var(--ink); text-decoration: none; background: var(--tg-bg, var(--blue-tint)); padding-left: 0.75em; }
.test-group li a:hover::after { color: var(--tg, var(--blue)); transform: translateX(3px); }

.soon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.soon-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6em 0.1em; font-size: 0.93rem; color: var(--body); border-top: 1px solid var(--line);
}
.soon-list li:first-child { border-top: none; }
.soon-list .tag { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line-dark); }
@media (max-width: 420px) {
  .test-group__head { flex-wrap: wrap; }
  .test-group__count { margin-left: 0; }
}

/* ---------- Guide (long-form SEO content) ---------- */
.guide-updated { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.guide-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 3rem; align-items: start; }
.guide-body h3 { margin-top: 1.8rem; }
.guide-body p { color: var(--body); }
.guide-body ul { color: var(--body); margin: 0 0 1.2rem; padding-left: 1.3rem; }
.guide-body li { margin-bottom: 0.4rem; }
.guide-aside {
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  padding: 1.6rem; position: sticky; top: 5.5rem; box-shadow: 4px 4px 0 var(--blue-tint);
}
.guide-aside h4 { font-family: var(--font-stat); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 1.1rem; }
.guide-aside__stat { display: flex; align-items: center; gap: 0.85rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.guide-aside__stat:last-of-type { border-bottom: none; }
.guide-aside__stat-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--blue-tint); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.95rem;
}
.guide-aside__stat-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.guide-aside__stat span { font-size: 0.78rem; color: var(--muted); order: 2; }
.guide-aside__stat b { font-family: var(--font-stat); font-weight: 800; color: var(--ink); font-size: 1rem; order: 1; }
.guide-aside__tip {
  margin-top: 1.1rem; background: var(--amber-bg); border: 1px solid #f0d9a8; border-radius: var(--r-sm);
  padding: 0.85rem 1rem; font-size: 0.85rem; color: var(--amber); line-height: 1.55;
}
.guide-aside .btn { margin-top: 1.2rem; width: 100%; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .guide-aside { position: static; } }

.limits-table { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 1.2rem 0 1.6rem; box-shadow: var(--shadow-sm); }
.limits-table th { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
.limits-table td { font-size: 0.93rem; }
.limits-table tr:last-child td { border-bottom: none; }

/* ---------- Comparison tables ---------- */
/* .compare-wrap is the scroll container; .compare holds the min-width so the
   table keeps its columns legible and scrolls horizontally on narrow screens. */
.compare-wrap {
  margin: 1.2rem 0 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.compare { background: var(--white); min-width: 480px; }
.compare table { width: 100%; margin: 0; }
.compare th { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); white-space: nowrap; }
.compare td { font-size: 0.93rem; }
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child, .compare th:first-child { font-weight: 600; color: var(--ink); }
@media (max-width: 560px) { .compare th, .compare td { padding: 0.6em 0.7em; font-size: 0.86rem; } }

/* ---------- Callout box (info/warning banners used across content pages) ---------- */
.callout { border-radius: var(--r-lg); padding: 1.5rem; }

/* ---------- Process steps ---------- */
.steps { display: flex; justify-content: space-between; gap: 0.5rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 23px; left: 10%; right: 10%; height: 2px; background: repeating-linear-gradient(90deg, var(--line-dark) 0 6px, transparent 6px 12px); z-index: 0; }
.step { position: relative; z-index: 1; flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; padding: 0 0.4rem; }
.step__num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-stat);
  font-weight: 800; font-size: 1.08rem; margin-bottom: 1rem; border: 5px solid var(--bg-soft);
  box-shadow: 0 0 0 1.5px var(--blue);
}
.step h4 { font-family: var(--font-stat); font-size: 0.96rem; font-weight: 700; color: var(--ink); margin: 0 0 0.35rem; }
.step p { font-size: 0.84rem; color: var(--muted); margin: 0; max-width: 150px; }
@media (max-width: 860px) {
  .steps { flex-direction: column; align-items: stretch; gap: 0; }
  .steps::before { display: none; }
  /* Vertical timeline: the number circles line up in a left column with a
     dashed connector threaded between them; heading + copy sit to the right
     instead of squeezing under a 46px circle, where they used to wrap ragged. */
  .step {
    position: relative; display: grid; grid-template-columns: 46px 1fr;
    column-gap: 1rem; row-gap: 0.3rem; text-align: left; align-items: start;
    padding: 0 0 1.75rem;
  }
  .step:last-child { padding-bottom: 0; }
  .step:not(:last-child)::after {
    content: ""; position: absolute; left: 22px; top: 46px; bottom: 0.15rem; width: 2px;
    background: repeating-linear-gradient(180deg, var(--line-dark) 0 6px, transparent 6px 12px);
  }
  .step__num { grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; }
  .step h4 { grid-column: 2; grid-row: 1; margin: 0; padding-top: 0.6rem; }
  .step p { grid-column: 2; grid-row: 2; max-width: none; }
}

/* ---------- Owner — redesigned ---------- */
.owner-wild { padding: 4.5rem 0; background: linear-gradient(180deg, var(--white) 0%, var(--bg-tint) 100%); }
.owner-grid { display: grid; grid-template-columns: 320px 1fr; gap: 3rem; align-items: center; }
.owner-photo-wrap { position: relative; }
.owner-photo-wrap picture { display: block; position: relative; z-index: 1; }
.owner-photo {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--navy);
  object-fit: cover; display: block; position: relative; z-index: 1;
  box-shadow: var(--shadow-md);
}
.owner-photo-accent {
  position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--r-lg);
  border: 3px solid var(--blue); z-index: 0;
}
.owner-body .kicker { margin-bottom: 0.5rem; }
.owner-body h2 { margin-bottom: 0.9rem; }
.owner-body p { color: var(--body); font-size: 1.02rem; max-width: 620px; }
.owner-quote {
  font-family: var(--font-head); font-style: italic; font-size: 1.1rem; color: var(--ink);
  border-left: 3px solid var(--blue); padding-left: 1rem; margin: 1.4rem 0;
}
.credentials { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0 1.6rem; }
.credentials span {
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-sm);
  padding: 0.42em 0.95em; font-size: 0.85rem; font-weight: 600; color: var(--ink);
  box-shadow: 2px 2px 0 var(--line-dark);
}
.social-row { display: flex; gap: 0.7rem; align-items: center; }
.social-row a {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--line-dark);
  display: flex; align-items: center; justify-content: center; color: var(--ink); transition: all 0.15s ease;
}
.social-row a:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.social-row a svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 780px) {
  .owner-grid { grid-template-columns: 1fr; gap: 2rem; }
  .owner-photo-wrap { width: 100%; max-width: 220px; margin: 0 auto; }
  .owner-photo-accent { inset: 10px -10px -10px 10px; }
}

/* ---------- Related tools & guides (contextual interlinking block) ---------- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.related-card {
  display: flex; flex-direction: column; gap: 0.3rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); color: var(--body);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.related-card:hover {
  text-decoration: none; border-color: var(--line-dark);
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.related-card__label {
  font-family: var(--font-stat); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue);
}
.related-card__title { font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; color: var(--ink); line-height: 1.35; }
.related-card:hover .related-card__title { color: var(--blue); }
.related-card__desc { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* ---------- Author box (E-E-A-T byline at the end of guides/posts) ---------- */
.author-box {
  display: flex; gap: 1.3rem; align-items: flex-start;
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--blue-tint); padding: 1.5rem; margin: 2.5rem 0 0;
}
.author-box picture { flex-shrink: 0; display: block; }
.author-box__photo {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  display: block; background: var(--navy); border: 2px solid var(--blue-tint);
}
.author-box__kicker {
  font-family: var(--font-stat); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.author-box__name { margin: 0.15rem 0 0.15rem; font-size: 1.05rem; }
.author-box__role { margin: 0 0 0.7rem; font-size: 0.82rem; color: var(--blue); font-weight: 600; }
.author-box__bio { margin: 0 0 0.85rem; font-size: 0.9rem; color: var(--body); }
.author-box__links { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.85rem; font-weight: 600; }
@media (max-width: 560px) {
  .author-box { flex-direction: column; gap: 1rem; padding: 1.25rem; }
}

/* ---------- Blog list ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.post-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; color: var(--body);
  padding: 1.5rem; gap: 0.55rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
/* Cards with a featured image supply their own padding via .post-card__body */
.post-card:has(.post-card__img) { padding: 0; gap: 0; }
.post-card:hover { text-decoration: none; border-color: var(--line-dark); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card:hover h3 { color: var(--blue); }
.post-card__img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--bg-tint); }
.post-card__body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; }
.post-card__meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.post-card__meta .dot { opacity: 0.6; }
.post-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.4; }
.post-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--blue-tint); color: var(--blue); border-radius: var(--r-sm); padding: 0.2em 0.6em;
}
.tag--speed { background: var(--amber-bg); color: var(--amber); }
.tag--tools { background: var(--teal-bg); color: var(--teal); }

/* Featured/pinned post — larger hero card above the regular grid */
.post-featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch;
  background: var(--white); border: 1.5px solid var(--blue); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-md); color: var(--body); margin-bottom: 1.6rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-featured:hover { text-decoration: none; transform: translateY(-3px); }
.post-featured:hover h3 { color: var(--blue); }
.post-featured__img { display: block; width: 100%; height: 100%; min-height: 220px; object-fit: cover; background: var(--bg-tint); }
.post-featured__body { padding: 1.9rem 2rem; display: flex; flex-direction: column; gap: 0.7rem; justify-content: center; }
.post-featured__badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35em;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--blue); color: #fff; border-radius: var(--r-sm); padding: 0.28em 0.7em;
}
.post-featured h3 { margin: 0; font-size: 1.55rem; line-height: 1.3; }
.post-featured p { margin: 0; font-size: 1rem; color: var(--muted); }
@media (max-width: 700px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured__img { min-height: 0; aspect-ratio: 1.91 / 1; }
  .post-featured__body { padding: 1.4rem 1.5rem 1.6rem; }
  .post-featured h3 { font-size: 1.25rem; }
}

/* Category filter pills */
.blog-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.6rem; }
.filter-pill {
  font-family: var(--font-stat); font-size: 0.86rem; font-weight: 600; color: var(--body);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.5em 1.1em; cursor: pointer; transition: all 0.15s ease;
}
.filter-pill:hover { border-color: var(--blue); color: var(--blue); }
.filter-pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 2.2rem; }
.pagination__btn {
  font-family: var(--font-stat); font-size: 0.9rem; font-weight: 600; color: var(--body);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  min-width: 38px; height: 38px; padding: 0 0.7em; cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.pagination__btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination__btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- The Difference — redesigned comparison ---------- */
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; position: relative; align-items: stretch; }
.diff-card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; position: relative; }
.diff-card--them { opacity: 0.88; }
.diff-card--us { border-color: var(--blue); box-shadow: 4px 4px 0 var(--blue-tint); background: linear-gradient(180deg, var(--blue-tint) 0%, var(--white) 130px); }
.diff-card__badge {
  position: absolute; top: -13px; left: 1.75rem; background: var(--blue); color: #fff;
  font-family: var(--font-stat); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3em 0.8em; border-radius: var(--r-sm); box-shadow: 2px 2px 0 var(--navy);
}
.diff-card h3 { margin-bottom: 1.1rem; font-size: 1.15rem; }
.diff-card--them h3 { color: var(--muted); }
.diff-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.diff-card li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.94rem; }
.diff-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; margin-top: 0.1rem; }
.diff-icon--yes { background: var(--green-bg); color: var(--green); }
.diff-icon--no { background: var(--line); color: var(--muted); }
.diff-card--them li { color: var(--muted); }
.diff-card--us li { color: var(--ink); font-weight: 500; }
.diff-vs {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-stat);
  font-weight: 800; font-size: 0.78rem; z-index: 2; box-shadow: var(--shadow-md);
}
@media (max-width: 780px) {
  .diff-grid { grid-template-columns: 1fr; }
  .diff-vs { display: none; }
}

/* ---------- Eligibility Checker ---------- */
.elig-card {
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--blue-tint); overflow: hidden;
}
.elig-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem;
  padding: 1.75rem; border-bottom: 1.5px solid var(--ink); background: var(--bg-soft);
}
/* min-width:0 stops a long <option> from forcing the grid column wider. */
.elig-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.elig-field label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
/* Match every text-entry control, not just select/date — number and text inputs
   were falling through to the browser's default 21px Arial styling. */
.elig-field select,
.elig-field input:not([type="checkbox"]):not([type="radio"]) {
  font-family: var(--font-body); font-size: 0.95rem; padding: 0.6em 0.7em;
  border: 1.5px solid var(--line-dark); border-radius: var(--r-sm); background: var(--white); color: var(--ink);
  width: 100%; max-width: 100%; min-height: 44px; -webkit-appearance: none; appearance: none;
}
/* Re-enable the native number spinners that appearance:none strips. */
.elig-field input[type="number"] { -moz-appearance: textfield; }
.elig-field select { -webkit-appearance: menulist; appearance: menulist; }
.elig-field select:focus,
.elig-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.elig-check { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; padding-top: 1.6rem; }
.elig-check input { width: 17px; height: 17px; accent-color: var(--blue); }
.elig-check label { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.elig-form__submit { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }

.elig-results { padding: 1.75rem; }
.elig-results__empty { color: var(--muted); font-size: 0.95rem; text-align: center; padding: 1.5rem 0; }
.elig-row {
  display: flex; align-items: flex-start; gap: 0.9rem; padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.elig-row:last-of-type { border-bottom: none; }
.elig-row__icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800; margin-top: 0.1rem;
}
.elig-row--yes .elig-row__icon { background: var(--green-bg); color: var(--green); }
.elig-row--no .elig-row__icon { background: var(--red-bg); color: var(--red); }
.elig-row--maybe .elig-row__icon { background: var(--amber-bg); color: var(--amber); }
.elig-row__name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.elig-row__verdict { font-family: var(--font-stat); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin-left: 0.6rem; }
.elig-row--yes .elig-row__verdict { color: var(--green); }
.elig-row--no .elig-row__verdict { color: var(--red); }
.elig-row--maybe .elig-row__verdict { color: var(--amber); }
.elig-row__note { font-size: 0.9rem; color: var(--muted); margin-top: 0.2rem; }
.elig-disclaimer {
  margin-top: 1.4rem; font-size: 0.83rem; color: var(--muted); background: var(--amber-bg);
  border: 1px solid #f0d9a8; border-radius: var(--r-sm); padding: 0.9rem 1rem; line-height: 1.55;
}
@media (max-width: 560px) {
  .elig-form, .elig-results { padding: 1.25rem; }
  .elig-check { padding-top: 0; }
}

/* ---------- FAQ — single-open accordion, centered ---------- */
#faq .section-head { max-width: var(--w-text); margin-left: auto; margin-right: auto; text-align: center; }
.faq { max-width: var(--w-text); margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 0.75rem; }
.faq-item__q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.05rem 1.25rem; font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item__q::after { content: "+"; font-size: 1.25rem; color: var(--muted); font-weight: 400; }
.faq-item.open .faq-item__q::after { content: "–"; }
.faq-item.open .faq-item__q { color: var(--blue); }
.faq-item__a { display: none; padding: 0 1.25rem; }
.faq-item.open .faq-item__a { display: block; }
.faq-item__a p { color: var(--body); padding-bottom: 1.05rem; margin: 0; }

/* ---------- Final CTA ---------- */
.cta-final { background: var(--navy); padding: 4rem 0; text-align: center; }
.cta-final h2 { color: #fff; }
.cta-final p { color: #b6c2d4; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 3rem 0 2rem; font-size: 0.92rem; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.25rem; }
.footer h4 {
  font-family: var(--font-stat); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.85rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { color: var(--body); }
.footer a:hover { color: var(--blue); }
.footer__about { color: var(--muted); max-width: 300px; font-size: 0.9rem; }
.footer__legal {
  border-top: 1px solid var(--line-dark); padding-top: 1.4rem; color: var(--muted); font-size: 0.84rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
@media (max-width: 860px) { .footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) {
  .footer__cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__legal { flex-direction: column; gap: 0.5rem; }
}

.footer__social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer__social a {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--line-dark);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.footer__social a:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.footer__social a svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Typing test shell ---------- */
.test-shell { max-width: 950px; margin: 0 auto; }
.test-shell:fullscreen, .test-shell:-webkit-full-screen {
  width: 100%; height: 100%; max-width: none; background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow-y: auto; padding: 2.5rem 1.5rem;
}
.test-shell:fullscreen > *, .test-shell:-webkit-full-screen > * { width: 100%; max-width: 900px; }
.pretest-card {
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--blue-tint); padding: 2rem;
}
.pretest-card h2 { margin-bottom: 0.6rem; }
.pretest-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.4rem 0; }
/* min-width:0 stops the grid item from being forced wider than its column by a
   long <option> label (grid/flex items default to min-width:auto). */
.pretest-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.pretest-field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.pretest-field select {
  font-family: var(--font-body); font-size: 0.95rem; padding: 0.65em 0.7em;
  border: 1.5px solid var(--line-dark); border-radius: var(--r-sm); background: var(--white); color: var(--ink);
  width: 100%; max-width: 100%;
}
.pretest-check { display: flex; align-items: center; gap: 0.55rem; margin: 0.2rem 0 1.2rem; }
.pretest-check input { width: 17px; height: 17px; accent-color: var(--blue); flex-shrink: 0; }
.pretest-check label { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.pretest-rules { list-style: none; margin: 1.2rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.pretest-rules li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.93rem; color: var(--body); }
.pretest-rules li::before { content: "•"; color: var(--blue); font-weight: 800; }
@media (max-width: 600px) { .pretest-row { grid-template-columns: 1fr; } }

/* Live stat bar during the test */
.test-stat-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 1.2rem;
  background: var(--navy); border-radius: var(--r-lg); overflow: hidden;
}
.test-stat-bar > div { padding: 1rem 1.2rem; border-left: 1px solid rgba(255,255,255,0.12); text-align: center; }
.test-stat-bar > div:first-child { border-left: none; }
.test-stat-bar b { font-family: var(--font-stat); font-weight: 800; font-size: 1.5rem; color: #fff; display: block; }
.test-stat-bar span { font-size: 0.78rem; color: #a9b9cf; }
.test-stat-bar.time-low { background: #7a1f1f; }
@media (max-width: 560px) { .test-stat-bar b { font-size: 1.15rem; } .test-stat-bar > div { padding: 0.75rem 0.5rem; } }

.test-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; gap: 1rem; flex-wrap: wrap; }
.btn--toggle-off { color: var(--red); border-color: var(--red); box-shadow: 3px 3px 0 var(--red-bg); }
.btn--toggle-off:hover { box-shadow: 5px 5px 0 var(--red-bg); }
.test-hint { font-size: 0.85rem; color: var(--muted); }

/* Results screen */
.result-verdict {
  display: flex; align-items: center; gap: 1.2rem; padding: 1.6rem; border-radius: var(--r-lg);
  margin-bottom: 1.6rem; border: 1.5px solid;
}
.result-verdict--pass { background: var(--green-bg); border-color: var(--green); }
.result-verdict--fail { background: var(--red-bg); border-color: var(--red); }
.result-verdict__icon {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; flex-shrink: 0; color: #fff;
}
.result-verdict--pass .result-verdict__icon { background: var(--green); }
.result-verdict--fail .result-verdict__icon { background: var(--red); }
.result-verdict h3 { margin-bottom: 0.2rem; }
.result-verdict--pass h3 { color: var(--green); }
.result-verdict--fail h3 { color: var(--red); }
.result-verdict p { margin: 0; font-size: 0.92rem; color: var(--body); }

.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.result-stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem; text-align: center; }
.result-stat b { font-family: var(--font-stat); font-weight: 800; font-size: 1.4rem; color: var(--ink); display: block; }
.result-stat span { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 600px) { .result-stats { grid-template-columns: repeat(2, 1fr); } }

.result-note { font-size: 0.85rem; color: var(--muted); background: var(--amber-bg); border: 1px solid #f0d9a8; border-radius: var(--r-sm); padding: 0.9rem 1rem; margin-bottom: 1.6rem; line-height: 1.55; }
.result-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Typing test area (shared) ---------- */
.passage-display {
  font-family: var(--font-mono); font-size: 1.1rem; line-height: 2;
  background: var(--white); border: 1px solid var(--line-dark); border-radius: var(--r-lg);
  padding: 1.5rem; color: var(--muted); user-select: none;
  overflow-wrap: break-word; word-break: break-word;
}
.passage-display .ok { color: var(--green); background: var(--green-bg); }
.passage-display .bad { color: var(--red); background: var(--red-bg); }
.passage-display .cur { color: var(--ink); border-bottom: 2px solid var(--blue); }
.typing-input {
  width: 100%; font-family: var(--font-mono); font-size: 1.02rem; padding: 1rem;
  border: 1px solid var(--line-dark); border-radius: var(--r-lg); background: var(--white);
  color: var(--ink); resize: none; min-height: 100px; margin-top: 0.75rem;
}
/* Indic-script combining characters need more vertical room and a font that
   actually has the glyphs — JetBrains Mono doesn't. */
.passage-display.lang-hi, .passage-display.lang-mr { font-family: var(--font-devanagari); font-size: 1.3rem; line-height: 2.3; }
.typing-input.lang-hi, .typing-input.lang-mr { font-family: var(--font-devanagari); font-size: 1.2rem; line-height: 1.9; }
.passage-display.lang-pa { font-family: var(--font-gurmukhi); font-size: 1.3rem; line-height: 2.3; }
.typing-input.lang-pa { font-family: var(--font-gurmukhi); font-size: 1.2rem; line-height: 1.9; }
.passage-display.lang-gu { font-family: var(--font-gujarati); font-size: 1.3rem; line-height: 2.3; }
.typing-input.lang-gu { font-family: var(--font-gujarati); font-size: 1.2rem; line-height: 1.9; }
.passage-display.lang-ta { font-family: var(--font-tamil); font-size: 1.25rem; line-height: 2.2; }
.typing-input.lang-ta { font-family: var(--font-tamil); font-size: 1.15rem; line-height: 1.9; }
.chunk-progress {
  font-family: var(--font-stat); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem;
}
.typing-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }

@media (max-width: 560px) {
  .passage-display { font-size: 0.92rem; line-height: 1.6; padding: 1rem; }
  .typing-input { min-height: 80px; font-size: 0.92rem; padding: 0.75rem; }
  .test-stat-bar > div { padding: 0.6rem 0.4rem; }
  .test-stat-bar b { font-size: 1.05rem; }
}

/* ---------- Hero badges ---------- */
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 1.6rem; }
.hero__badges span {
  display: inline-flex; align-items: center; gap: 0.4em; font-size: 0.82rem; font-weight: 600;
  color: var(--blue-dark); background: var(--blue-tint); border-radius: var(--r-sm); padding: 0.35em 0.85em;
}
.hero__secondary { font-size: 0.92rem; margin-top: 0.85rem; }

/* ---------- Utility ---------- */
.muted { color: var(--muted); }
.hidden { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: 0.6em 1em; z-index: 100; }
.skip:focus { left: 0; }
