/* ==========================================================================
   Common Competitive Course — stylesheet
   --------------------------------------------------------------------------
   1.  Design tokens (colour, type, space, radius, shadow, motion)
   2.  Base & typography
   3.  Layout helpers
   4.  Buttons, icons, chips
   5.  Header & navigation
   6.  Hero (incl. the sample mock-test window)
   7.  Exam categories
   8.  Features (bento)
   9.  Learning modules
   10. Study material explorer
   11. How it works
   12. Dashboard preview
   13. About & statistics
   14. Call to action
   15. Footer
   16. Login / auth page
   17. Support page
   18. Motion, reveal, reduced-motion, print
   ========================================================================== */

/* 1. TOKENS ================================================================ */

@font-face {
  font-family: "CCC Sans";
  src: url("../fonts/ccc-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback so the swap to CCC Sans does not shift the layout */
@font-face {
  font-family: "CCC Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104%;
  ascent-override: 104.8%;
  descent-override: 30.8%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* Ink (navy) */
  --ink-950: #060f24;
  --ink-900: #0b1b3d;
  --ink-800: #12285a;
  --ink-700: #1b3678;
  --ink-600: #264a9e;

  /* Brand blue — links, focus, charts */
  --blue-700: #2347ae;
  --blue-600: #2b53c5;
  --blue-500: #4a6fd8;
  --blue-300: #9db3ec;
  --blue-200: #c7d4f5;
  --blue-100: #e3eafb;
  --blue-50:  #f0f4fd;

  /* Marigold — the accent: marked answers, highlights, CTA on dark */
  --gold-700: #8a5a00;
  --gold-600: #d98a0f;
  --gold-500: #f2a93b;
  --gold-400: #f7be62;
  --gold-100: #fdf1da;

  /* Exam-state colours (also used for success / error feedback) */
  --mint-700: #0f7a5c;
  --mint-500: #1f9d7a;
  --mint-100: #e1f5ee;
  --coral-700: #b8352b;
  --coral-500: #d8493e;
  --coral-100: #fce8e6;
  --violet-700: #5a3db8;
  --violet-500: #6e4fd1;
  --violet-100: #eee9fb;

  /* Surfaces & text */
  --paper: #f5f7fb;
  --paper-2: #ecf0f8;
  --white: #ffffff;
  --line: #e1e6f0;
  --line-strong: #cbd3e3;
  --text: var(--ink-900);
  --text-2: #3b4a66;
  --text-3: #5b6987;
  --on-dark: #ffffff;
  --on-dark-2: #b9c4de;
  --focus: var(--blue-600);

  /* Typography */
  --font: "CCC Sans", "CCC Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h2: clamp(1.95rem, 1.25rem + 2.7vw, 3.1rem);
  --fs-h1: clamp(2.2rem, 0.9rem + 6vw, 4.5rem);

  /* Layout */
  --container: 75rem;
  --gutter: clamp(1rem, 4.2vw, 1.5rem);
  --header-h: 4rem;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  /* Radius — by hierarchy, not one size for everything */
  --r-xs: 0.375rem;
  --r-sm: 0.625rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;
  --r-2xl: 2.25rem;

  /* Elevation — tinted with the ink colour, never neutral grey */
  --sh-1: 0 1px 2px rgba(11, 27, 61, 0.05), 0 1px 1px rgba(11, 27, 61, 0.03);
  --sh-2: 0 1px 2px rgba(11, 27, 61, 0.04), 0 10px 28px -10px rgba(11, 27, 61, 0.14);
  --sh-3: 0 2px 4px rgba(11, 27, 61, 0.04), 0 26px 52px -18px rgba(11, 27, 61, 0.22);
  --sh-4: 0 4px 8px rgba(11, 27, 61, 0.05), 0 44px 88px -28px rgba(11, 27, 61, 0.34);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 1040px) {
  :root { --header-h: 4.5rem; }
}

/* 2. BASE & TYPOGRAPHY ===================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  accent-color: var(--blue-600);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-600); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { color: var(--blue-700); }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
[hidden] { display: none !important; }

::selection { background: var(--gold-400); color: var(--ink-900); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
.on-dark :focus-visible { outline-color: var(--gold-400); }
/* Sections receive focus after an in-page jump; a ring around a whole section would only add noise */
[tabindex="-1"]:focus-visible { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink-900);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

/* Section titles share one scale so every block reads as part of the same page */
.section-title {
  font-size: var(--fs-h2);
  font-weight: 720;
  font-stretch: 110%;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.section-lead {
  margin-top: 1.1rem;
  max-width: 38rem;
  font-size: var(--fs-lead);
  color: var(--text-2);
}

/* 3. LAYOUT ================================================================ */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-y); }
.section--white { background: var(--white); }
.section--paper { background: var(--paper); }
.section--tint  { background: var(--paper-2); }
.section--dark  { background: var(--ink-900); color: var(--on-dark-2); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4.5vw, 3.75rem); }
.section-head--split {
  max-width: none;
  display: grid;
  gap: 1.5rem;
  align-items: end;
}
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
}

/* 4. BUTTONS, ICONS, CHIPS ================================================= */

.i {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i--brand { fill: currentColor; stroke: none; }
.i--sm { width: 1rem; height: 1rem; }
.i--lg { width: 1.5rem; height: 1.5rem; }
.i--xl { width: 1.75rem; height: 1.75rem; }

.btn {
  --btn-h: 3rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: var(--btn-h);
  padding: 0 1.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.975); transition-duration: 0.08s; }
.btn--lg { --btn-h: 3.5rem; padding: 0 1.75rem; font-size: 1.0625rem; }
/* Full-width buttons may wrap their label on very narrow screens instead of forcing the page wider */
.btn--block { width: 100%; padding-block: 0.5rem; white-space: normal; line-height: 1.2; }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #16306f 0%, var(--ink-900) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(11, 27, 61, 0.35),
              0 12px 24px -12px rgba(11, 27, 61, 0.6);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(11, 27, 61, 0.35),
              0 16px 30px -12px rgba(11, 27, 61, 0.7);
}

.btn--ghost {
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line-strong);
}
.btn--ghost:hover { color: var(--ink-900); background: #fff; border-color: var(--ink-900); box-shadow: var(--sh-2); }

.btn--gold {
  color: var(--ink-900);
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-500) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 26px -12px rgba(242, 169, 59, 0.75);
}
.btn--gold:hover { color: var(--ink-900); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 16px 32px -12px rgba(242, 169, 59, 0.9); }

.btn--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--glass:hover { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }

/* Round gold arrow inside primary buttons */
.btn__go {
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  margin-right: -0.75rem;
  border-radius: 50%;
  color: var(--ink-900);
  background: var(--gold-500);
  transition: transform 0.3s var(--ease-spring);
}
.btn--lg .btn__go { width: 2.2rem; height: 2.2rem; margin-right: -0.9rem; }
.btn:hover .btn__go { transform: translateX(3px); }

/* Text link with a trailing arrow icon */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--blue-600);
  text-decoration: none;
}
.link-arrow .i { transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--blue-700); }
.link-arrow:hover .i { transform: translate(2px, -2px); }

/* Small pill labels */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-900);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
a.chip:hover { color: var(--ink-900); border-color: var(--ink-900); background: #fff; transform: translateY(-1px); }

/* The OMR-style "marked answer" bubble used throughout as a quiet brand motif */
.bubble {
  display: inline-block;
  flex: none;
  width: 0.75em; height: 0.75em;
  border: 0.14em solid var(--gold-500);
  border-radius: 50%;
  background: var(--gold-500);
}

/* 5. HEADER & NAVIGATION =================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled,
.site-header.nav-open {
  background: rgba(245, 247, 251, 0.82);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(11, 27, 61, 0.4);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.is-scrolled,
  .site-header.nav-open {
    background: rgba(245, 247, 251, 0.7);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: var(--header-h);
}
@media (min-width: 640px) { .site-header__inner { gap: 1rem; } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--ink-900);
  text-decoration: none;
}
.brand:hover { color: var(--ink-900); }
.brand__mark { width: 2.25rem; height: 2.25rem; flex: none; }
.brand__name {
  font-size: 0.8125rem;
  font-weight: 700;
  font-stretch: 102%;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.brand__tail { display: block; }
@media (min-width: 640px) {
  .brand__mark { width: 2.5rem; height: 2.5rem; }
  .brand__name { font-size: 1.0625rem; font-stretch: 108%; white-space: nowrap; }
  .brand__tail { display: inline; }
}

.header-actions { display: flex; align-items: center; gap: 0.4rem; flex: none; }

/* Login button — uppercase on purpose, as specified in the brief */
.btn-login {
  --btn-h: 2.5rem;
  padding: 0 0.85rem 0 0.4rem;
  gap: 0.45rem;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn-login__ico {
  display: grid;
  place-items: center;
  width: 1.65rem; height: 1.65rem;
  border-radius: 50%;
  color: var(--ink-900);
  background: var(--gold-500);
  transition: transform 0.3s var(--ease-spring);
}
.btn-login:hover .btn-login__ico { transform: scale(1.1) rotate(-6deg); }
@media (min-width: 1040px) {
  .btn-login { --btn-h: 2.75rem; padding: 0 1.2rem 0 0.5rem; }
  .btn-login__ico { width: 1.85rem; height: 1.85rem; }
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-900);
  transition: background-color 0.2s, border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--ink-900); background: #fff; }
.nav-toggle__bars { position: relative; width: 1.1rem; height: 0.75rem; }
.nav-toggle__bars::before, .nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s, top 0.3s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: calc(50% - 1px); }
.nav-toggle__bars::after { top: calc(100% - 2px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: calc(50% - 1px); transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: calc(50% - 1px); transform: rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; transform: scaleX(0); }

/* Mobile navigation sheet */
.nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 0.5rem var(--gutter) 1.75rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--sh-4);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s;
}
.nav__list { display: grid; }
.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.1875rem;
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-decoration: none;
}
.nav__link::after {
  content: "";
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--gold-500);
  transform: scale(0);
  transition: transform 0.3s var(--ease-spring);
}
.nav__link[aria-current="location"]::after { transform: scale(1); }
.nav__cta { margin-top: 1.25rem; }

/* Staggered entrance of the sheet's links — answers the tap that opened it */
.nav.is-open .nav__list li { animation: nav-in 0.4s var(--ease) both; }
.nav.is-open .nav__list li:nth-child(2) { animation-delay: 0.04s; }
.nav.is-open .nav__list li:nth-child(3) { animation-delay: 0.08s; }
.nav.is-open .nav__list li:nth-child(4) { animation-delay: 0.12s; }
.nav.is-open .nav__list li:nth-child(5) { animation-delay: 0.16s; }
.nav.is-open .nav__list li:nth-child(6) { animation-delay: 0.2s; }
@keyframes nav-in { from { opacity: 0; transform: translateY(8px); } }

@media (min-width: 1040px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    margin-left: auto;
    margin-right: 0.75rem;
  }
  .nav__list { display: flex; align-items: center; gap: 0.15rem; }
  .nav__link {
    padding: 0.6rem 0.9rem;
    border: 0;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: -0.005em;
    color: var(--text-2);
    transition: color 0.2s, background-color 0.2s;
  }
  .nav__link:hover { color: var(--ink-900); background: rgba(11, 27, 61, 0.05); }
  .nav__link[aria-current="location"] { color: var(--ink-900); font-weight: 600; }
  .nav__link::after {
    position: absolute;
    left: 50%; bottom: 0.1rem;
    width: 0.375rem; height: 0.375rem;
    margin-left: -0.1875rem;
  }
  .nav__cta { display: none; }
  .nav.is-open li { animation: none; }
}

/* 6. HERO ================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3.5rem, 7vw, 6.5rem);
  background: var(--paper);
  overflow: clip;
}
/* Squared-paper texture, faded out towards the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(11, 27, 61, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 27, 61, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 68% 38%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 75% at 68% 38%, #000 10%, transparent 72%);
}
/* One soft pool of colour behind the mock-test window */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -8%; right: -12%;
  width: min(62rem, 120vw);
  aspect-ratio: 1;
  background:
    radial-gradient(closest-side at 55% 45%, rgba(74, 111, 216, 0.17), transparent 70%),
    radial-gradient(closest-side at 30% 70%, rgba(242, 169, 59, 0.14), transparent 70%);
  pointer-events: none;
}

.hero__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 640px) { .hero__grid { gap: 3rem; } }
@media (min-width: 1040px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 3.5rem; }
}

.hero__title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.05rem, 10.4vw, 3.5rem);
  font-weight: 760;
  font-stretch: 104%;
  line-height: 1;
  letter-spacing: -0.045em;
}
@media (min-width: 640px) { .hero__title { font-stretch: 112%; } }
@media (min-width: 1040px) { .hero__title { font-size: clamp(3rem, 4.35vw, 4.2rem); } }
.hero__line { display: block; white-space: nowrap; }
.hero__line .bubble {
  width: 0.19em; height: 0.19em;
  margin-left: 0.07em;
  border-width: 0.045em;
  vertical-align: baseline;
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-size: var(--fs-lead);
  color: var(--text-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.25rem; }

.hero__exams { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.75rem; }
.hero__exams-label { font-size: var(--fs-sm); color: var(--text-3); }
.hero__exams ul { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* --- Sample mock-test window (the one memorable thing on the page) -------- */

.hero__visual { position: relative; padding: 4rem 0 2.75rem; }
@media (min-width: 640px) { .hero__visual { padding: 2.25rem 1.25rem 3.25rem; } }

.cbt {
  position: relative;
  z-index: 1;
  max-width: 35rem;
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(11, 27, 61, 0.1);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-4);
}
.cbt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  color: #fff;
  background: var(--ink-900);
}
.cbt__id { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.cbt__tag {
  flex: none;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
}
.cbt__name {
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 479.98px) { .cbt__name-more { display: none; } }
.cbt__timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cbt__timer small { margin-left: auto; font-size: 0.6875rem; font-weight: 500; color: var(--on-dark-2); }

.cbt__body { display: grid; gap: 1rem; padding: 1rem; }
@media (min-width: 520px) { .cbt__body { grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 1.1rem; padding: 1.1rem; } }

.cbt__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  color: var(--text-3);
}
.cbt__meta b { color: var(--ink-900); font-weight: 700; }
.cbt__q {
  min-height: 4.4em;
  margin-bottom: 0.9rem;
  font-size: 0.9688rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-900);
}

.cbt__opts { display: grid; gap: 0.45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.opt:hover { border-color: var(--ink-900); background: var(--blue-50); }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; }
.opt__bubble {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.6rem; height: 1.6rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease-spring);
}
.opt input:focus-visible + .opt__bubble { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt input:checked + .opt__bubble { background: var(--ink-900); border-color: var(--ink-900); color: #fff; transform: scale(1.06); }
.opt__text { flex: 1; min-width: 0; }
.opt__mark { display: none; width: 1.1rem; height: 1.1rem; }

.opt.is-correct { border-color: var(--mint-500); background: var(--mint-100); cursor: default; }
.opt.is-correct .opt__bubble { background: var(--mint-700); border-color: var(--mint-700); color: #fff; }
.opt.is-correct .opt__mark--ok { display: block; color: var(--mint-700); }
.opt.is-wrong { border-color: var(--coral-500); background: var(--coral-100); cursor: default; }
.opt.is-wrong .opt__bubble { background: var(--coral-700); border-color: var(--coral-700); color: #fff; }
.opt.is-wrong .opt__mark--no { display: block; color: var(--coral-700); }
/* The :checked rule above is more specific, so a graded choice needs its own selectors to win */
.opt.is-correct input + .opt__bubble { background: var(--mint-700); border-color: var(--mint-700); color: #fff; }
.opt.is-wrong input + .opt__bubble { background: var(--coral-700); border-color: var(--coral-700); color: #fff; }
.cbt__opts.is-locked .opt { cursor: default; }
.cbt__opts.is-locked .opt:not(.is-correct):not(.is-wrong):hover { border-color: var(--line-strong); background: #fff; }

.cbt__feedback {
  min-height: 2.9em;
  margin: 0.7rem 0 0.2rem;
  font-size: 0.78125rem;
  line-height: 1.45;
  color: var(--text-2);
}
.cbt__feedback strong { font-weight: 700; }
.cbt__feedback.is-ok strong { color: var(--mint-700); }
.cbt__feedback.is-no strong { color: var(--coral-700); }

.cbt__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn--sm { --btn-h: 2.25rem; padding: 0 0.95rem; font-size: 0.8125rem; gap: 0.45rem; }
.btn--sm.is-on { background: var(--violet-100); border-color: var(--violet-500); color: var(--violet-700); }

/* Side panel: candidate + question palette */
.cbt__side {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.85rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--paper);
}
.pal-legend { margin-top: auto; }
@media (max-width: 519.98px) {
  .pal { grid-template-columns: repeat(10, 1fr); }
  .pal-legend { grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
}
.cand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.cand__avatar {
  display: grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--blue-200);
  color: var(--ink-700);
}
.cand__avatar svg { width: 1.55rem; height: 1.55rem; margin-top: 0.5rem; fill: currentColor; }
.cand__name { font-size: 0.78125rem; font-weight: 700; line-height: 1.2; color: var(--ink-900); }
.cand__role { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--text-3); }

.pal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.3rem; margin-bottom: 0.8rem; }
.pal li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, border-radius 0.25s;
}
.pal li[data-s="answered"] { background: var(--mint-700); border-color: var(--mint-700); color: #fff; }
.pal li[data-s="notanswered"] { background: var(--coral-100); border-color: #f0b4ae; color: var(--coral-700); }
.pal li[data-s="marked"] { background: var(--violet-500); border-color: var(--violet-500); color: #fff; border-radius: 50%; }
.pal li[aria-current="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink-900); }

.pal-legend { display: grid; gap: 0.3rem; font-size: 0.6875rem; line-height: 1.2; color: var(--text-2); }
.pal-legend li { display: flex; align-items: center; gap: 0.45rem; }
.pal-legend b { margin-left: auto; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.key {
  flex: none;
  width: 0.8rem; height: 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.2rem;
  background: #fff;
}
.key--answered { background: var(--mint-700); border-color: var(--mint-700); }
.key--notanswered { background: var(--coral-100); border-color: #f0b4ae; }
.key--marked { background: var(--violet-500); border-color: var(--violet-500); border-radius: 50%; }

/* Floating glass chips and illustrations around the window */
.float { position: absolute; z-index: 2; }
.glass {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass { -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); background: rgba(255, 255, 255, 0.9); }
}

.float--ring {
  top: 0; right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  border-radius: var(--r-lg);
}
@media (min-width: 640px) { .float--ring { top: 0.25rem; right: -0.5rem; } }
.ring { position: relative; width: 3rem; height: 3rem; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring__track { stroke: var(--blue-100); }
.ring__fill { stroke: var(--blue-600); stroke-linecap: round; stroke-dasharray: 125.66; stroke-dashoffset: 17.6; }
.ring__val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-900);
}
.float__label { font-size: 0.8125rem; font-weight: 700; line-height: 1.2; color: var(--ink-900); }
.float__label small { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--text-2); }

.float--omr {
  bottom: -0.25rem; right: 0.5rem;
  padding: 0.7rem 0.85rem 0.8rem;
  border-radius: var(--r-md);
}
@media (min-width: 640px) { .float--omr { bottom: -3.25rem; right: 1.5rem; } }
.omr { display: grid; grid-template-columns: repeat(4, 0.9rem); gap: 0.32rem; margin-top: 0.5rem; }
.omr i {
  width: 0.9rem; height: 0.9rem;
  border: 1.5px solid var(--ink-700);
  border-radius: 50%;
  opacity: 0.55;
}
.omr i.on { background: var(--ink-900); border-color: var(--ink-900); opacity: 1; }

.float--books { bottom: -0.5rem; left: 0; width: 6.75rem; filter: drop-shadow(0 14px 14px rgba(11, 27, 61, 0.22)); }
@media (min-width: 640px) { .float--books { bottom: -2.25rem; left: -0.25rem; width: 7.75rem; } }
.float--books svg { width: 100%; height: auto; }

/* Hero load sequence — the single orchestrated moment on the page */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes fill-bubble {
  from { background-color: transparent; transform: scale(0.7); }
  60% { transform: scale(1.25); }
  to { background-color: var(--gold-500); transform: scale(1); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.hero__line { animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--n, 0) * 90ms); }
.hero__line .bubble { animation: fill-bubble 0.6s var(--ease) both; animation-delay: calc(0.45s + var(--n, 0) * 0.2s); }
.hero__lead { animation: rise 0.7s var(--ease) 0.3s both; }
.hero__cta { animation: rise 0.7s var(--ease) 0.4s both; }
.hero__exams { animation: rise 0.7s var(--ease) 0.5s both; }
.cbt { animation: rise 0.9s var(--ease) 0.25s both; }
.float--ring { animation: rise 0.8s var(--ease) 0.9s both, bob 7s ease-in-out 1.8s infinite; }
.float--omr { animation: rise 0.8s var(--ease) 1.05s both, bob 8s ease-in-out 2.1s infinite reverse; }
.float--books { animation: rise 0.8s var(--ease) 1.2s both, bob 9s ease-in-out 2.4s infinite; }
.is-paused .float { animation-play-state: paused; }

/* 7. EXAM CATEGORIES ======================================================= */

/* Eight hues share one lightness and chroma, so the set reads as a family.
   The .tone--* aliases reuse the same hues for icon chips outside the exam cards (support page). */
.exam--ssc, .tone--blue { --tint: #eef7ff; --chip: #d7ebff; --accent: #275eae; --edge: #a4c6f8; }
.exam--banking, .tone--teal { --tint: #e7fafa; --chip: #c8f4f3; --accent: #00767a; --edge: #83d5d5; }
.exam--railway, .tone--amber { --tint: #fff3e8; --chip: #ffe4cc; --accent: #964800; --edge: #eab98f; }
.exam--upsc, .tone--violet { --tint: #f8f3ff; --chip: #eee3ff; --accent: #6e49a3; --edge: #ccb9f1; }
.exam--state, .tone--green { --tint: #ecfaef; --chip: #d4f3db; --accent: #007635; --edge: #9dd4ab; }
.exam--defence  { --tint: #f5f8e8; --chip: #e9edcc; --accent: #616700; --edge: #c3ca8e; }
.exam--military { --tint: #edf4ff; --chip: #dfeeff; --accent: #1a4d8f; --edge: #b2c8ee; }
.exam--sainik   { --tint: #ecfaf3; --chip: #d9f3e8; --accent: #0b7a62; --edge: #a7d9c2; }
.exam--navodaya { --tint: #fff7e8; --chip: #ffeec7; --accent: #a85d00; --edge: #f0c77e; }
.exam--teaching, .tone--rose { --tint: #fff1f7; --chip: #ffdeed; --accent: #983769; --edge: #eeafc9; }
.exam--other    { --tint: #f0f6fe; --chip: #e1ebf7; --accent: #556272; --edge: #b7c6d8; }

.exam-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .exam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; } }
@media (min-width: 1040px) { .exam-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }

.exam-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease);
}
/* Soft spotlight that follows the pointer (position set from app.js) */
.exam-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), var(--tint), transparent 62%);
  transition: opacity 0.3s;
}
@media (hover: hover) {
  .exam-card:hover { transform: translateY(-4px); border-color: var(--edge); box-shadow: var(--sh-3); }
  .exam-card:hover::before { opacity: 1; }
  .exam-card:hover .exam-card__icon { transform: rotate(-6deg) scale(1.07); }
  .exam-card:hover .exam-card__cta { color: #fff; background: var(--ink-900); border-color: var(--ink-900); }
  .exam-card:hover .exam-card__cta .i { transform: translate(2px, -2px); }
}
.exam-card:focus-within { border-color: var(--accent); }
.exam-card:target { animation: target-pulse 1.8s var(--ease); }
@keyframes target-pulse {
  0% { box-shadow: 0 0 0 0 var(--edge); }
  35% { box-shadow: 0 0 0 7px var(--chip); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.exam-card__icon {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  margin-bottom: 1.25rem;
  border-radius: var(--r-md);
  background: var(--chip);
  color: var(--accent);
  transition: transform 0.45s var(--ease-spring);
}
.exam-card__title { margin-bottom: 0.45rem; font-size: var(--fs-h3); letter-spacing: -0.025em; }
.exam-card__text { flex: 1; margin-bottom: 1.25rem; font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2); }
.exam-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-900);
}
.exam-card__meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.exam-card__meta .i { color: var(--accent); }

.exam-card__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-900);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.exam-card__cta .i { transition: transform 0.25s var(--ease); }
/* Whole card is the click target */
.exam-card__cta::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.exam-card__cta:focus-visible { outline: none; }
/* The card clips overflow, so the focus ring is drawn just inside its edge */
.exam-card__cta:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--r-lg); }

@media (max-width: 559.98px) {
  .exam-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; padding: 1.15rem; }
  .exam-card__icon { grid-row: 1 / span 2; width: 2.75rem; height: 2.75rem; margin: 0; }
  .exam-card__title { margin-bottom: 0.2rem; align-self: end; }
  .exam-card__text { margin-bottom: 1rem; }
  .exam-card__meta, .exam-card__cta { grid-column: 1 / -1; }
}

/* 8. FEATURES (BENTO) ====================================================== */

.bento { display: grid; gap: 1rem; }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1040px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tile--5 { grid-column: span 5; }
  .tile--6 { grid-column: span 6; }
  .tile--7 { grid-column: span 7; }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--white);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}
@media (hover: hover) {
  .tile:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-strong); }
}
.tile--tint { background: var(--blue-50); border-color: var(--blue-100); }
.tile--dark { background: var(--ink-900); border-color: transparent; color: var(--on-dark-2); }
.tile--gold { background: var(--gold-100); border-color: #f4dcae; }

.tile__top { display: flex; align-items: flex-start; gap: 1rem; }
.tile__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 3rem; height: 3rem;
  border-radius: var(--r-md);
  background: var(--blue-100);
  color: var(--blue-600);
}
.tile--tint .tile__icon { background: #fff; }
.tile--dark .tile__icon { background: rgba(255, 255, 255, 0.1); color: var(--gold-400); }
.tile--gold .tile__icon { background: #fff; color: var(--gold-700); }
.tile__title { margin-bottom: 0.3rem; font-size: var(--fs-h3); letter-spacing: -0.025em; }
.tile--dark .tile__title { color: #fff; }
.tile__text { max-width: 27rem; font-size: var(--fs-sm); line-height: 1.55; }
.tile--dark .tile__text { color: var(--on-dark-2); }
.tile__vis { margin-top: auto; }

/* Small illustrations inside the tiles */
.vis-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-1);
}
.tile--gold .vis-card { border-color: #f1dca9; }

.syl { display: grid; gap: 0.7rem; }
.syl li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 4.5rem 2.4rem;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-900);
}
.syl__dot {
  display: grid;
  place-items: center;
  width: 1.25rem; height: 1.25rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: #fff;
}
.syl__dot .i { width: 0.75rem; height: 0.75rem; stroke-width: 3; }
.syl .done .syl__dot { background: var(--mint-700); border-color: var(--mint-700); }
.syl__bar { height: 0.375rem; overflow: hidden; border-radius: 99px; background: var(--blue-100); }
.syl__bar i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--blue-600); }
.syl__pct { text-align: right; font-size: 0.75rem; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }

.vis-mock__name { margin-bottom: 0.8rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-900); }
.vis-mock__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0; }
.vis-mock__stats div { padding: 0.6rem 0.7rem; border-radius: var(--r-sm); background: var(--paper); }
.vis-mock__stats dt { font-size: 0.6875rem; color: var(--text-3); }
.vis-mock__stats dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-stretch: 106%; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink-900); }

.vis-spark { position: relative; height: 4.5rem; margin-bottom: 1rem; }
.vis-spark svg { width: 100%; height: 100%; }
.vis-spark__dot {
  position: absolute;
  top: 19.4%; right: 0.8%;
  width: 0.625rem; height: 0.625rem;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 2px var(--ink-900);
  transform: translate(50%, -50%);
}
.vis-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0; }
.vis-metrics div { padding: 0.65rem 0.75rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.07); }
.vis-metrics dt { font-size: 0.6875rem; color: var(--on-dark-2); }
.vis-metrics dd { margin: 0; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }

.papers { display: grid; gap: 0.6rem; }
.papers li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-900); }
.papers__ico { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--r-xs); background: var(--blue-50); color: var(--blue-600); }
.badge { margin-left: auto; padding: 0.15rem 0.55rem; border-radius: 99px; background: var(--mint-100); color: var(--mint-700); font-size: 0.6875rem; font-weight: 700; }

.solution__q { margin-bottom: 0.7rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-900); }
.solution ol { display: grid; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-2); }
.solution li { display: flex; align-items: flex-start; gap: 0.6rem; }
.solution li span {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.25rem; height: 1.25rem;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}
.solution b { color: var(--mint-700); }

.vis-devices { width: 100%; max-width: 20rem; height: auto; }

/* 9. LEARNING MODULES ====================================================== */

.module-grid { display: grid; gap: 0.9rem; }
@media (min-width: 760px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; } }

.module {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1.25rem;
  height: 100%;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--paper);
  transition: background-color 0.25s, border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.module::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(24rem circle at var(--mx, 50%) var(--my, 0%), rgba(43, 83, 197, 0.08), transparent 60%);
  transition: opacity 0.3s;
}
.module__icon {
  display: grid;
  place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: var(--r-md);
  background: var(--ink-900);
  color: var(--gold-400);
  transition: transform 0.45s var(--ease-spring);
}
.module__title { margin-bottom: 0.35rem; font-size: var(--fs-h3); letter-spacing: -0.025em; }
.module__text { margin-bottom: 1rem; font-size: var(--fs-sm); line-height: 1.55; }
.module__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}
.module__link .i { transition: transform 0.25s var(--ease); }
/* Whole card is the click target */
.module__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.module__link:focus-visible { outline: none; }
.module__link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; }
@media (hover: hover) {
  .module:hover { background: #fff; border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
  .module:hover::before { opacity: 1; }
  .module:hover .module__icon { transform: rotate(-6deg) scale(1.06); }
  .module:hover .module__link .i { transform: translate(2px, -2px); }
}

/* 10. STUDY MATERIAL EXPLORER ============================================== */

.study { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .study { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; } }

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 2rem; }
@media (min-width: 960px) { .tabs { grid-template-columns: 1fr; } }
.tab {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.9rem 1rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-900);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.25;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.tab small { display: block; margin-top: 0.15rem; font-size: 0.75rem; font-weight: 500; color: var(--text-3); }
.tab:hover { border-color: var(--ink-900); }
.tab__bubble {
  flex: none;
  width: 1.15rem; height: 1.15rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease-spring);
}
.tab[aria-selected="true"] { background: var(--ink-900); border-color: var(--ink-900); color: #fff; box-shadow: var(--sh-3); }
.tab[aria-selected="true"] small { color: var(--on-dark-2); }
.tab[aria-selected="true"] .tab__bubble { background: var(--gold-500); border-color: var(--gold-500); transform: scale(1.1); }

.spanel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--sh-2);
}
.spanel:not([hidden]) { animation: panel-in 0.45s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
.spanel__head { display: grid; gap: 1rem; margin-bottom: 0.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .spanel__head { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.spanel__title { margin-bottom: 0.35rem; font-size: 1.375rem; letter-spacing: -0.03em; }
.spanel__text { max-width: 28rem; font-size: var(--fs-sm); }
.formats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.format {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}
.format .i { color: var(--blue-600); }
.topics { display: grid; gap: 0 2rem; }
@media (min-width: 640px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.topic {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9688rem;
  font-weight: 600;
  color: var(--ink-900);
}
.topic:first-child { border-top: 0; }
@media (min-width: 640px) { .topic:nth-child(2) { border-top: 0; } }
.topic__bubble {
  flex: none;
  width: 0.9rem; height: 0.9rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease-spring);
}
@media (hover: hover) {
  .topic:hover .topic__bubble { background: var(--gold-500); border-color: var(--gold-500); transform: scale(1.15); }
}

/* 11. HOW IT WORKS ========================================================= */

.steps { display: grid; gap: 2rem; }
.step { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 1.25rem; }
.step__bubble {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.25rem; height: 3.25rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-900);
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 106%;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.5s var(--ease) 0.2s, border-color 0.5s var(--ease) 0.2s;
}
.step.is-in .step__bubble,
html:not(.js) .step__bubble { background: var(--gold-500); border-color: var(--gold-500); }

/* Connector between bubbles — vertical on phones, horizontal from 900px */
.step__line {
  position: absolute;
  left: 1.5625rem; top: 3.5rem; bottom: -1.7rem;
  width: 2px;
  overflow: hidden;
  background: var(--line);
}
.step__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-500);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.9s var(--ease) 0.35s;
}
.step.is-in .step__line::after,
html:not(.js) .step__line::after { transform: scale(1); }
.step:last-child .step__line { display: none; }

.step__title { margin-bottom: 0.4rem; font-size: var(--fs-h3); letter-spacing: -0.025em; }
.step__text { max-width: 20rem; font-size: var(--fs-sm); }

.vig {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 5.5rem;
  margin-bottom: 1.1rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.vig--account { flex-direction: column; align-items: stretch; justify-content: center; gap: 0.45rem; }
.vig__input { height: 1.1rem; border: 1px solid var(--line-strong); border-radius: 0.35rem; background: #fff; }
.vig__input--short { width: 70%; }
.vig__btn { width: 45%; height: 1.2rem; border-radius: 99px; background: var(--ink-900); }
.vig--exam { flex-wrap: wrap; align-content: center; }
.vig__chip {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-900);
}
.vig__chip.is-on { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.vig--learn { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.4rem; }
.vig__bar { width: 80%; height: 0.4rem; border-radius: 99px; background: var(--blue-200); }
.vig__bar--short { width: 55%; }
.vig__bubbles { display: flex; gap: 0.45rem; margin-top: 0.2rem; }
.vig__bubbles i { width: 1.1rem; height: 1.1rem; border: 1.5px solid var(--ink-700); border-radius: 50%; opacity: 0.6; }
.vig__bubbles i.on { background: var(--ink-900); border-color: var(--ink-900); opacity: 1; }
.vig--track { padding-block: 0.9rem; }
.vig__bars { display: flex; align-items: flex-end; gap: 0.45rem; width: 100%; height: 100%; }
.vig__bars i { flex: 1; height: var(--h); border-radius: 0.3rem 0.3rem 0.1rem 0.1rem; background: var(--blue-200); }
.vig__bars i:last-child { background: var(--blue-600); }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
  .step { display: block; }
  .step__head { position: relative; margin-bottom: 1.5rem; }
  .step__line {
    left: 3.85rem; right: -0.65rem; top: 1.5rem; bottom: auto;
    width: auto; height: 2px;
  }
  .step__line::after { transform: scaleX(0); transform-origin: left; }
  .step.is-in .step__line::after,
  html:not(.js) .step__line::after { transform: scale(1); }
}

/* 12. DASHBOARD PREVIEW ==================================================== */

.dash {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--sh-4);
}
@media (min-width: 900px) { .dash { grid-template-columns: 4.5rem minmax(0, 1fr); } }

.dash__side { display: none; }
@media (min-width: 900px) {
  .dash__side { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: 1.25rem 0; background: var(--ink-900); }
  .dash__side ul { display: grid; gap: 0.4rem; }
}
.dash__mark { width: 2.25rem; height: 2.25rem; }
.dash__side li {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--r-md);
  color: var(--on-dark-2);
}
.dash__side li.is-active { background: rgba(255, 255, 255, 0.12); color: #fff; }

.dash__main { min-width: 0; padding: clamp(1rem, 2.6vw, 1.75rem); background: var(--paper); }
.dash__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; }
.dash__hello { font-size: 1.25rem; font-weight: 700; font-stretch: 106%; letter-spacing: -0.025em; color: var(--ink-900); line-height: 1.2; }
.dash__sub { font-size: var(--fs-sm); color: var(--text-3); }

/* Five tiles: 2+2+1 on phones, 3+2 on tablets, one row on desktop. No orphan cell at any width. */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-bottom: 0.9rem; }
.kpis .kpi:last-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpis .kpi { grid-column: span 2; }
  .kpis .kpi:nth-child(n + 4) { grid-column: span 3; }
}
@media (min-width: 1040px) {
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
  .kpis .kpi, .kpis .kpi:nth-child(n + 4) { grid-column: auto; }
}
.kpi { padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.kpi__label { display: block; font-size: 0.8125rem; color: var(--text-3); }
.kpi__value {
  display: block;
  margin: 0.2rem 0 0.15rem;
  font-size: 1.75rem;
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--ink-900);
}
.kpi__note { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; line-height: 1.3; color: var(--text-3); }
.kpi__note--up { font-weight: 600; color: var(--mint-700); }

.dash__grid { display: grid; gap: 0.75rem; }
@media (min-width: 900px) {
  .dash__grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .panel--recent { grid-column: 1 / -1; }
}
.panel { min-width: 0; padding: 1.1rem 1.25rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel__title { font-size: 1rem; letter-spacing: -0.02em; }
.panel__sub { font-size: 0.8125rem; color: var(--text-3); }

.seg { display: inline-flex; flex: none; padding: 0.2rem; border-radius: 99px; background: var(--paper-2); }
.seg button {
  min-height: 1.75rem;
  padding: 0 0.8rem;
  border: 0;
  border-radius: 99px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink-900); box-shadow: var(--sh-1); }

/* Chart — drawn by app.js from the table below it, so the table is the single source of data */
.chart { position: relative; height: 14.5rem; }
.js .chart-table[hidden] { display: none; }
.chart:empty { display: none; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.chart__grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart__axis text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart__axis .axis-title { font-size: 11px; }
.chart__target line { stroke: var(--gold-600); stroke-width: 1; shape-rendering: crispEdges; }
.chart__target text { fill: var(--gold-700); font-size: 11px; font-weight: 600; }
.chart__area { fill: var(--blue-600); opacity: 0.1; }
.chart__line { fill: none; stroke: var(--blue-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart__dot { fill: var(--blue-600); stroke: #fff; stroke-width: 2; }
.chart__end { fill: var(--ink-900); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart__cross { stroke: var(--line-strong); stroke-width: 1; opacity: 0; transition: opacity 0.15s; }
.chart__cross.is-on { opacity: 1; }
.chart__hit { fill: transparent; cursor: crosshair; }
.chart__hit:focus-visible { outline: none; }
.chart__focus { fill: none; stroke: var(--focus); stroke-width: 2; opacity: 0; }
.chart__hit:focus-visible + .chart__focus { opacity: 1; }
.chart__tip {
  position: absolute;
  z-index: 3;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--sh-3);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--text-2);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.15s;
}
.chart__tip.is-on { opacity: 1; }
.chart__tip b { display: block; font-size: 0.875rem; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.chart__tip span { display: block; }

/* Draw-in: app.js arms the chart, then plays it once when the card scrolls into view */
.chart.is-armed .chart__line { stroke-dasharray: 1 1; stroke-dashoffset: 1.02; }
.chart.is-armed .chart__area,
.chart.is-armed .chart__dot,
.chart.is-armed .chart__end { opacity: 0; }
.chart.is-drawn .chart__line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--ease) 0.1s; }
.chart.is-drawn .chart__area { opacity: 0.1; transition: opacity 0.9s ease 0.8s; }
.chart.is-drawn .chart__dot,
.chart.is-drawn .chart__end { opacity: 1; transition: opacity 0.4s ease calc(0.4s + var(--k, 0) * 110ms); }
html:not(.js) .seg { display: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th, .tbl td { padding: 0.7rem 0.75rem; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl thead th { padding-block: 0.45rem; font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
.tbl tbody th { font-weight: 600; color: var(--ink-900); }
.tbl td { color: var(--ink-900); }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem 0.2rem 0.45rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill--good { background: var(--mint-100); color: var(--mint-700); }
.pill--warn { background: var(--gold-100); color: var(--gold-700); }
@media (max-width: 639.98px) {
  .tbl--recent .col-taken, .tbl--recent .col-acc { display: none; }
  .tbl th, .tbl td { padding-inline: 0.5rem; }
}

.meters { display: grid; gap: 1.1rem; }
.meter__row { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; font-size: 0.8125rem; color: var(--text-2); }
.meter__row b { font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.meter__track { height: 0.5rem; overflow: hidden; border-radius: 99px; background: var(--blue-100); }
.meter__fill { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--blue-600); transform-origin: left; }
.js .meter__fill { transform: scaleX(0); transition: transform 1.1s var(--ease) 0.3s; }
.js .is-in .meter__fill { transform: scaleX(1); }

/* 13. ABOUT & STATISTICS =================================================== */

.about { isolation: isolate; overflow: clip; }
/* Faint answer-sheet rings in the corner */
.about::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle at center, transparent 6px, rgba(255, 255, 255, 0.1) 6.5px, rgba(255, 255, 255, 0.1) 8px, transparent 8.5px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 55% 90% at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 90% at 100% 0%, #000 0%, transparent 70%);
}
.section--dark .section-lead { color: var(--on-dark-2); }
.about__grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4.5rem; align-items: center; } }
.about__list { display: grid; gap: 0.9rem; margin-top: 2rem; }
.about__list li { display: flex; align-items: flex-start; gap: 0.8rem; color: #fff; font-weight: 500; }
.about__list .bubble { width: 0.8rem; height: 0.8rem; margin-top: 0.5rem; border-width: 2px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.14);
}
.stat { padding: clamp(1.25rem, 3.2vw, 2.25rem); background: var(--ink-900); }
.stat__icon { margin-bottom: clamp(1.25rem, 3vw, 2.25rem); color: var(--gold-400); }
.stat__value {
  display: block;
  font-size: clamp(1.5rem, 0.5rem + 3vw, 3.2rem); /* fallback for browsers without container units */
  font-weight: 760;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
  white-space: nowrap;
}
/* The figure is sized from the width of its own cell, so "50,000+" can never spill out of it at any screen width.
   (The widest figure is about 4.06em wide, so 23% of the cell leaves a little room to spare.) */
@supports (width: 1cqw) {
  .stat { container-type: inline-size; }
  .stat__value { font-size: clamp(1.4rem, 23cqw, 3.9rem); }
}
.stat__suffix { color: var(--gold-400); }
.stat__label { display: block; margin-top: 0.7rem; font-size: var(--fs-sm); color: var(--on-dark-2); }

/* 14. CALL TO ACTION ======================================================= */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.75rem);
  border-radius: var(--r-2xl);
  color: var(--on-dark-2);
  background: linear-gradient(125deg, var(--ink-900) 0%, #13307d 58%, var(--ink-600) 130%);
  box-shadow: var(--sh-4);
}
.cta__copy { position: relative; z-index: 1; max-width: 38rem; }
.cta__title {
  margin-bottom: 1.1rem;
  color: #fff;
  font-size: clamp(2rem, 1.1rem + 3.4vw, 3.5rem);
  font-weight: 740;
  font-stretch: 110%;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.cta__text { max-width: 30rem; margin-bottom: 2rem; font-size: var(--fs-lead); color: #dbe3f6; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn--gold .btn__go { background: var(--ink-900); color: var(--gold-400); }

.cta__art { display: none; }
@media (min-width: 900px) {
  .cta__art {
    position: absolute;
    top: 50%; right: -1.5rem;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(6, 3rem);
    gap: 1.1rem;
    transform: translateY(-50%) rotate(-6deg);
  }
  .cta__art i { width: 3rem; height: 3rem; border: 2px solid rgba(255, 255, 255, 0.22); border-radius: 50%; }
  .cta__art i.on { background: var(--gold-500); border-color: var(--gold-500); box-shadow: 0 10px 28px -8px rgba(242, 169, 59, 0.6); }
}
@media (min-width: 1100px) { .cta__art { right: 1rem; } }

/* 15. FOOTER =============================================================== */

.site-footer { padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem; color: var(--on-dark-2); background: var(--ink-950); }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }
.site-footer .brand__mark rect { fill: #1b3678; }
.footer-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 1040px) {
  .footer-grid { grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 3rem; }
  .footer-brand { grid-column: auto; }
}
.footer-brand p { max-width: 26rem; margin-block: 1.25rem 1.5rem; font-size: var(--fs-sm); line-height: 1.6; }
.footer-title { margin-bottom: 1.1rem; color: #fff; font-size: 0.9375rem; font-weight: 700; font-stretch: 100%; letter-spacing: -0.01em; }
.footer-links { display: grid; gap: 0.7rem; }
.footer-links a { color: var(--on-dark-2); font-size: var(--fs-sm); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.25em; }
.social { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social a {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--on-dark-2);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease-spring);
}
.social a:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--ink-900); transform: translateY(-2px); }
.social .i { width: 1.2rem; height: 1.2rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}
.footer-note { color: #8f9dc0; }
.to-top { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; color: var(--on-dark-2); font-weight: 600; text-decoration: none; }
.to-top:hover { color: #fff; }

/* 16. LOGIN / AUTH PAGE ==================================================== */

.auth-page {
  --field-line: #8693ae; /* 3:1 against white, so the edge of every field is easy to see */
  background: var(--paper);
}
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the page can never grow wider than the screen */
  grid-template-rows: auto 1fr;
}
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto; }
}

/* Compact bar on phones and tablets */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
}
@media (min-width: 960px) { .auth-top { display: none; } }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}
.auth-back:hover { color: var(--ink-900); }
.auth-back .i { transition: transform 0.25s var(--ease); }
.auth-back:hover .i { transform: translateX(-3px); }
.auth-back--desk { display: none; }
@media (min-width: 960px) {
  .auth-back--desk { position: absolute; top: 1.5rem; left: clamp(1.5rem, 4vw, 3.5rem); display: inline-flex; }
}
.auth-back--inline { margin: -0.4rem 0 0.85rem -0.25rem; }

/* Brand panel */
.auth-brand {
  position: relative;
  isolation: isolate;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.5rem);
  color: var(--on-dark-2);
  background: linear-gradient(160deg, var(--ink-900) 0%, #10286a 68%, var(--ink-700) 150%);
}
@media (min-width: 960px) {
  .auth-brand { display: flex; position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; }
}
.auth-brand > :not(.auth-art) { position: relative; z-index: 1; }
.auth-brand .brand { align-self: flex-start; color: #fff; }
.auth-brand .brand:hover { color: #fff; }
.auth-brand .brand__mark rect { fill: #1b3678; }
.auth-brand__body { margin-block: auto; padding-block: 2.5rem; max-width: 29rem; }
.auth-brand__title {
  margin-bottom: 2rem;
  color: #fff;
  font-size: clamp(2.2rem, 1rem + 2.7vw, 3.35rem);
  font-weight: 740;
  font-stretch: 110%;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}
.auth-brand__title .bubble { width: 0.19em; height: 0.19em; margin-left: 0.07em; border-width: 0.045em; }
.auth-points { display: grid; gap: 1rem; }
.auth-points li { display: flex; align-items: flex-start; gap: 0.8rem; color: #fff; font-weight: 500; }
.auth-points .bubble { width: 0.8rem; height: 0.8rem; margin-top: 0.5rem; border-width: 2px; }
.auth-brand__foot { font-size: 0.8125rem; color: #8f9dc0; }

.auth-art {
  position: absolute;
  right: -1.25rem;
  bottom: 4.25rem;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(5, 2.6rem);
  gap: 0.9rem;
  transform: rotate(-6deg);
}
.auth-art i { width: 2.6rem; height: 2.6rem; border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 50%; }
.auth-art i.on { background: var(--gold-500); border-color: var(--gold-500); box-shadow: 0 10px 28px -8px rgba(242, 169, 59, 0.55); }

/* Form column */
.auth-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem var(--gutter) 2rem;
}
@media (min-width: 960px) { .auth-main { min-height: 100vh; min-height: 100dvh; padding: 4.25rem clamp(1.5rem, 4vw, 3.5rem) 0.75rem; } }

.auth-card {
  width: 100%;
  max-width: 28rem;
  padding: clamp(1.35rem, 5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--sh-3);
  animation: auth-in 0.75s var(--ease) both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }

.auth-brand .brand,
.auth-brand__title,
.auth-points li,
.auth-brand__foot { animation: rise 0.8s var(--ease) both; }
.auth-brand__title { animation-delay: 0.1s; }
.auth-points li:nth-child(1) { animation-delay: 0.3s; }
.auth-points li:nth-child(2) { animation-delay: 0.38s; }
.auth-points li:nth-child(3) { animation-delay: 0.46s; }
.auth-brand__foot { animation-delay: 0.6s; }
.auth-art { animation: fade-in 1.2s ease 0.5s both; }
@keyframes fade-in { from { opacity: 0; } }

/* Login / Create account switch */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--paper-2);
}
.auth-tabs__ind {
  position: absolute;
  top: 0.25rem; bottom: 0.25rem; left: 0.25rem;
  width: calc(50% - 0.25rem);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--sh-1), 0 0 0 1px var(--line);
  transition: transform 0.38s var(--ease);
}
.auth-tabs[data-active="1"] .auth-tabs__ind { transform: translateX(100%); }
.auth-tabs__tab {
  position: relative;
  z-index: 1;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.2s;
}
.auth-tabs__tab[aria-selected="true"] { color: var(--ink-900); }
.auth-tabs__tab:not([aria-selected="true"]):hover { color: var(--ink-900); }
.auth-tabs__tab:focus-visible { outline-offset: -3px; border-radius: 999px; }

.auth-context {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: -0.2rem 0 1.4rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-sm);
  background: var(--gold-100);
  color: var(--ink-900);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}
.auth-context .bubble { width: 0.7rem; height: 0.7rem; margin-top: 0.4rem; border-width: 2px; }

.auth-view:not([hidden]) { animation: view-in 0.45s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

.auth-head { margin-bottom: 1.25rem; }
.auth-title {
  font-size: clamp(1.65rem, 1.3rem + 1.4vw, 2.05rem);
  font-weight: 740;
  font-stretch: 108%;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.auth-sub { margin-top: 0.55rem; font-size: var(--fs-sm); color: var(--text-3); }

/* Fields */
.auth-form { display: grid; gap: 1.1rem; }
.field__label { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; font-weight: 600; color: var(--ink-900); }
.field__opt { font-weight: 500; color: var(--text-3); }
.field__hint { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--text-3); }
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--coral-700);
}
.field__error::before {
  content: "";
  flex: none;
  width: 0.95rem; height: 0.95rem;
  margin-top: 0.1rem;
  background: currentColor;
  -webkit-mask: var(--icon-alert) center / contain no-repeat;
  mask: var(--icon-alert) center / contain no-repeat;
  --icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}

.input {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  border: 1px solid var(--field-line);
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:hover { border-color: var(--text-3); }
.input:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(43, 83, 197, 0.16); }
.field.is-invalid .input { border-color: var(--coral-500); }
.field.is-invalid .input:focus-within { box-shadow: 0 0 0 4px rgba(216, 73, 62, 0.16); }
.input input, .input select {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 3.15rem;
  padding: 0 1rem 0 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  font-size: 1rem;
  color: var(--ink-900);
  outline: none;
}
.input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: var(--ink-900); }

.input__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  color: var(--text-3);
}
.input__icon .i { grid-area: 1 / 1; transition: opacity 0.2s, transform 0.35s var(--ease-spring); }
.input:focus-within .input__icon { color: var(--blue-600); }
/* The leading icon follows what is being typed: person, mail or phone */
[data-kind] .input__icon .i { opacity: 0; transform: scale(0.55); }
[data-kind="user"] .input__icon .i--k-user,
[data-kind="mail"] .input__icon .i--k-mail,
[data-kind="phone"] .input__icon .i--k-phone { opacity: 1; transform: none; }

.input__prefix {
  align-self: stretch;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0 0.85rem 0 1rem;
  margin-right: 0.9rem;
  border-right: 1px solid var(--line-strong);
  font-weight: 600;
  color: var(--ink-900);
}
.input--prefix input { padding-left: 0; }

.input__toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem; height: 3.15rem;
  border: 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: transparent;
  color: var(--text-3);
  transition: color 0.2s;
}
.input__toggle:hover { color: var(--ink-900); }
.input__toggle:focus-visible { outline-offset: -4px; border-radius: var(--r-md); }
.input__toggle .i { grid-area: 1 / 1; }
.input__toggle .i--eye-off, .input__toggle[aria-pressed="true"] .i--eye { display: none; }
.input__toggle[aria-pressed="true"] .i--eye-off { display: block; }

.input--select select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer; }
.input--select select:invalid { color: var(--text-3); }
.input--select option { color: var(--ink-900); }
.input__chev { position: absolute; right: 1rem; color: var(--text-3); pointer-events: none; }

/* Checkbox */
.check { position: relative; display: inline-flex; align-items: flex-start; gap: 0.65rem; font-size: 0.9375rem; line-height: 1.45; color: var(--text-2); cursor: pointer; }
.check input { position: absolute; top: 0.05rem; left: 0; z-index: 1; width: 1.4rem; height: 1.4rem; margin: 0; opacity: 0; cursor: pointer; }
/* The decorative box must never swallow the click: the real input sits above it. */
.check__box, .check__box * { pointer-events: none; }
.check__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.4rem; height: 1.4rem;
  margin-top: 0.05rem;
  border: 1.5px solid var(--field-line);
  border-radius: 0.4rem;
  background: #fff;
  color: #fff;
  transition: background-color 0.2s, border-color 0.2s;
}
.check__box .i { width: 0.95rem; height: 0.95rem; stroke-width: 3; opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.3s var(--ease-spring); }
.check:hover .check__box { border-color: var(--ink-900); }
.check input:checked + .check__box { background: var(--ink-900); border-color: var(--ink-900); }
.check input:checked + .check__box .i { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.is-invalid .check__box { border-color: var(--coral-500); }
.check a { font-weight: 600; }

.auth-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.auth-link { font-size: 0.9375rem; font-weight: 600; color: var(--blue-600); text-decoration: none; }
.auth-link:hover { color: var(--blue-700); text-decoration: underline; text-underline-offset: 0.25em; }
.auth-link--button { padding: 0; border: 0; background: none; font-size: inherit; cursor: pointer; }

/* Submit button with a built-in loading state */
.auth-submit { margin-top: 0.25rem; }
.auth-submit__go {
  display: grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  margin-right: -0.9rem;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--ink-900);
  transition: transform 0.3s var(--ease-spring);
}
.auth-submit__go .i { grid-area: 1 / 1; }
.btn:hover .auth-submit__go { transform: translateX(3px); }
.auth-submit .i--spin { display: none; }
.auth-submit.is-loading { pointer-events: none; }
.auth-submit.is-loading .i--go { display: none; }
.auth-submit.is-loading .i--spin { display: block; animation: spin 0.8s linear infinite; }
.auth-submit.is-loading .auth-submit__go { transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-or { display: flex; align-items: center; gap: 1rem; margin: 1.2rem 0; font-size: 0.8125rem; color: var(--text-3); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-hint { margin-top: 0.7rem; font-size: 0.8125rem; line-height: 1.5; text-align: center; color: var(--text-3); }
.auth-switch { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 0.9375rem; text-align: center; color: var(--text-2); }

/* Password strength */
.strength { margin-top: 0.65rem; }
.strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; }
.strength__bars i { height: 0.3rem; border-radius: 99px; background: var(--line); transition: background-color 0.25s; }
.strength[data-level="1"] .strength__bars i:nth-child(-n + 1) { background: var(--coral-500); }
.strength[data-level="2"] .strength__bars i:nth-child(-n + 2) { background: var(--gold-600); }
.strength[data-level="3"] .strength__bars i:nth-child(-n + 3) { background: var(--blue-600); }
.strength[data-level="4"] .strength__bars i:nth-child(-n + 4) { background: var(--mint-500); }
.strength__text { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--text-3); }
.strength[data-level="1"] .strength__text { color: var(--coral-700); }
.strength[data-level="4"] .strength__text { color: var(--mint-700); }

/* Messages */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  padding: 0.8rem 1rem;
  border: 1px solid;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}
.alert .i { margin-top: 0.12rem; }
.alert code { padding: 0.05rem 0.3rem; border-radius: 0.3rem; background: rgba(11, 27, 61, 0.07); font-size: 0.85em; }
.alert--error { border-color: #f0b4ae; background: var(--coral-100); color: var(--coral-700); }
.alert--info { border-color: var(--blue-200); background: var(--blue-50); color: var(--ink-800); }

/* Result screen */
.auth-done { text-align: center; }
.auth-done__ring {
  display: grid;
  place-items: center;
  width: 4.25rem; height: 4.25rem;
  margin: 0.4rem auto 1.25rem;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-700);
  animation: pop 0.6s var(--ease-spring) both;
}
.auth-done__ring .i { width: 2rem; height: 2rem; stroke-width: 2.4; }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } }
.auth-done .alert { margin: 1.25rem 0 0; text-align: left; }
.auth-done__actions { display: grid; gap: 0.75rem; margin-top: 1.5rem; }

.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.25rem; font-size: 0.8125rem; }
.auth-foot a { display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--text-3); text-decoration: none; }
.auth-foot a:hover { color: var(--ink-900); text-decoration: underline; text-underline-offset: 0.25em; }

/* 17. SUPPORT PAGE ========================================================= */

/* Page intro: the home hero's squared-paper texture, smaller and quieter */
.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2rem, 5vw, 3.75rem) clamp(2.25rem, 5vw, 3.75rem);
  overflow: clip;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(11, 27, 61, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 27, 61, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 78% 30%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 90% at 78% 30%, #000 5%, transparent 72%);
}
.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%; right: -10%;
  width: min(46rem, 110vw);
  aspect-ratio: 1;
  background:
    radial-gradient(closest-side at 60% 45%, rgba(74, 111, 216, 0.14), transparent 70%),
    radial-gradient(closest-side at 30% 70%, rgba(242, 169, 59, 0.12), transparent 70%);
  pointer-events: none;
}

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 1.25rem; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 1.75rem; color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink-900); text-decoration: underline; text-underline-offset: 0.25em; }

.page-title {
  font-size: clamp(2.3rem, 1rem + 6.4vw, 4rem);
  font-weight: 760;
  font-stretch: 106%;
  line-height: 1;
  letter-spacing: -0.045em;
}
@media (min-width: 640px) { .page-title { font-stretch: 112%; } }
.page-title .bubble { width: 0.19em; height: 0.19em; margin-left: 0.07em; border-width: 0.045em; vertical-align: baseline; }
.page-lead { max-width: 34rem; margin-top: 1.25rem; font-size: var(--fs-lead); }
.page-hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

/* --- Page frame: "on this page" navigation + content ---------------------- */

.doc { position: relative; padding-bottom: clamp(3.5rem, 8vw, 6rem); }

/* Phones and tablets: a sticky strip of pills under the header. Desktop: a sidebar. */
.doc__toc {
  position: sticky;
  top: calc(var(--header-h) - 1px);
  z-index: 40;
  margin-inline: calc(var(--gutter) * -1);
  padding: 0.6rem var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: rgba(245, 247, 251, 0.96);
  border-block: 1px solid var(--line);
}
.doc__toc::-webkit-scrollbar { display: none; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .doc__toc {
    background: rgba(245, 247, 251, 0.8);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
  }
}
.doc__toc-inner { display: flex; align-items: center; gap: 0.4rem; width: max-content; min-width: 100%; }
.doc__toc ul { display: flex; gap: 0.4rem; }
.doc__toc-title { display: none; }
.doc__toc a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.doc__toc a .i { display: none; }
.doc__toc a:hover { color: var(--ink-900); border-color: var(--ink-900); }
.doc__toc a[aria-current="location"] { color: #fff; background: var(--ink-900); border-color: var(--ink-900); }

@media (min-width: 1040px) {
  .doc { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
  .doc__toc {
    top: calc(var(--header-h) + 1.5rem);
    margin: 1.5rem 0 0;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .doc__toc-inner { display: block; width: auto; min-width: 0; }
  .doc__toc-title { display: block; margin: 0 0 0.45rem 0.75rem; font-size: 0.75rem; font-weight: 700; font-stretch: 100%; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
  .doc__toc ul { display: grid; gap: 0.15rem; margin-bottom: 1.6rem; }
  .doc__toc a { min-height: 2.75rem; padding: 0 0.75rem; border: 1px solid transparent; border-radius: var(--r-sm); background: none; font-weight: 500; color: var(--text-2); }
  .doc__toc a .i { display: block; color: var(--text-3); transition: color 0.2s; }
  .doc__toc a::after { content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-left: auto; border-radius: 50%; background: var(--gold-500); transform: scale(0); transition: transform 0.3s var(--ease-spring); }
  .doc__toc a:hover { color: var(--ink-900); border-color: transparent; background: rgba(11, 27, 61, 0.05); }
  .doc__toc a[aria-current="location"] { color: var(--ink-900); font-weight: 600; background: #fff; border-color: var(--line); box-shadow: var(--sh-1); }
  .doc__toc a[aria-current="location"] .i { color: var(--ink-900); }
  .doc__toc a[aria-current="location"]::after { transform: scale(1); }
}

.doc__main { min-width: 0; }

.doc-block { padding-block: clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 3.5rem; }
.doc-block:first-child { padding-top: clamp(1.75rem, 4vw, 2.5rem); }
.doc-block + .doc-block { border-top: 1px solid var(--line); }
@media (min-width: 1040px) { .doc-block { scroll-margin-top: 0; } .doc-block:first-child { padding-top: 1.5rem; } }
.doc-block__head { max-width: 40rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.doc-block__title { font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.6rem); font-weight: 720; font-stretch: 108%; letter-spacing: -0.035em; line-height: 1.08; }
.doc-block__lead { margin-top: 0.85rem; font-size: var(--fs-lead); }

/* --- Contact ------------------------------------------------------------- */

.contact-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.contact-card {
  position: relative;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease);
}
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  margin-bottom: 1.1rem;
  border-radius: var(--r-md);
  background: var(--chip);
  color: var(--accent);
}
.contact-card__title { margin-bottom: 0.25rem; font-size: var(--fs-sm); font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--text-3); }
.contact-card__value { display: block; font-size: 1.125rem; font-weight: 650; line-height: 1.35; color: var(--ink-900); text-decoration: none; overflow-wrap: anywhere; }
.contact-card__note { margin-top: 0.6rem; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
/* The whole card is the tap target for email and phone */
.contact-card--link .contact-card__value::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.contact-card--link .contact-card__value:focus-visible { outline: none; }
.contact-card--link .contact-card__value:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) {
  .contact-card--link:hover { transform: translateY(-3px); border-color: var(--edge); box-shadow: var(--sh-2); }
  .contact-card--link:hover .contact-card__value { color: var(--accent); text-decoration: underline; text-underline-offset: 0.25em; }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0.3rem 0.75rem 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-900);
}
.status::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--text-3); }
.status--open { background: var(--mint-100); color: var(--mint-700); }
.status--open::before { background: var(--mint-500); animation: status-pulse 2.4s ease-out infinite; }
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 122, 0.5); }
  70%, 100% { box-shadow: 0 0 0 0.5rem rgba(31, 157, 122, 0); }
}

.tip {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--gold-100);
  color: var(--ink-900);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.tip .i { margin-top: 0.1rem; color: var(--gold-700); }

/* --- Help centre guides -------------------------------------------------- */

.guide-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
.guide {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
}
.guide__head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.1rem; }
.guide__icon { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--chip); color: var(--accent); }
.guide__title { font-size: var(--fs-h3); letter-spacing: -0.025em; }
.guide__steps { counter-reset: step; display: grid; gap: 0.7rem; margin-bottom: 1.35rem; font-size: var(--fs-sm); line-height: 1.5; }
.guide__steps li { position: relative; padding-left: 2.1rem; }
.guide__steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0.02rem;
  display: grid;
  place-items: center;
  width: 1.45rem; height: 1.45rem;
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}
.guide .link-arrow { margin-top: auto; align-self: flex-start; }

/* --- FAQs ---------------------------------------------------------------- */

.faq-search { position: relative; display: flex; align-items: center; max-width: 34rem; margin-bottom: 1.75rem; }
.faq-search__icon { position: absolute; left: 1.1rem; color: var(--text-3); pointer-events: none; }
.faq-search input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 3rem;
  border: 1px solid var(--field-line, var(--line-strong));
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  color: var(--ink-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-search input::placeholder { color: var(--text-3); opacity: 1; }
.faq-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.faq-search input:hover { border-color: var(--ink-900); }
.faq-search input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(43, 83, 197, 0.18); }
.faq-search__clear {
  position: absolute;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 2.4rem; height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-3);
  transition: background-color 0.2s, color 0.2s;
}
.faq-search__clear:hover { background: var(--paper-2); color: var(--ink-900); }

.faq-group + .faq-group { margin-top: 2rem; }
.faq-group__title { margin-bottom: 0.8rem; font-size: 0.8125rem; font-weight: 700; font-stretch: 100%; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }

.faq { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); transition: border-color 0.2s, box-shadow 0.3s var(--ease); }
.faq + .faq { margin-top: 0.6rem; }
.faq[open] { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border-radius: inherit;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-900);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  color: var(--ink-900);
  background-color: var(--paper-2);
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: 0.75rem 2px, 2px 0.75rem;
  transition: background-size 0.3s var(--ease), background-color 0.2s;
}
.faq summary:hover::after { background-color: var(--blue-100); }
.faq[open] summary::after { background-size: 0.75rem 2px, 2px 0; }
.faq__body { padding: 0 1.15rem 1.2rem; max-width: 42rem; font-size: var(--fs-sm); line-height: 1.7; }
.faq__body p + p { margin-top: 0.75rem; }

/* Smooth open and close where the browser supports animating <details> (progressive enhancement) */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size 0.35s var(--ease), opacity 0.25s, content-visibility 0.35s allow-discrete;
  }
  .faq[open]::details-content { block-size: auto; opacity: 1; }
}

.faq-empty { padding: 1.25rem 1.35rem; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.6); text-align: center; }
.faq-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--ink-900);
  color: var(--on-dark-2);
}
.faq-help strong { display: block; color: #fff; font-size: 1.0625rem; }
.faq-help .btn { flex: none; }

/* --- Policies ------------------------------------------------------------ */

.legal + .legal { padding-top: 0; border-top: 0; }
.legal__sheet { padding: clamp(1.4rem, 4vw, 2.75rem); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--white); box-shadow: var(--sh-1); }
.legal__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.legal__icon { display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: var(--r-md); background: var(--chip); color: var(--accent); }
.legal__meta { margin-top: 0.4rem; font-size: var(--fs-xs); color: var(--text-3); }
.legal__summary {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--blue-100);
  border-radius: var(--r-md);
  background: var(--blue-50);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-900);
}
.legal__summary .i { margin-top: 0.1rem; color: var(--blue-700); }

.prose { --indent: 0rem; max-width: 46rem; counter-reset: clause; font-size: 1rem; line-height: 1.7; }
@media (min-width: 640px) { .prose { --indent: 2.6rem; } }
.prose h3 {
  counter-increment: clause;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 2rem 0 0.6rem;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.prose h3:first-child { margin-top: 0; }
.prose h3::before {
  content: counter(clause, decimal-leading-zero);
  flex: none;
  min-width: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold-700);
}
.prose p, .prose ul { margin-left: var(--indent); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 0.75rem; }
.prose ul { display: grid; gap: 0.55rem; }
.prose li { position: relative; padding-left: 1.4rem; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--gold-500); }
.prose strong { color: var(--ink-900); }

@media print {
  .doc__toc, .faq-search, .faq-help, .page-hero__cta, .status { display: none !important; }
  .doc { display: block; }
  .doc-block { padding-block: 1.25rem; break-inside: auto; }
  .legal__sheet, .faq, .contact-card, .guide { box-shadow: none; }
  .faq::details-content { block-size: auto !important; opacity: 1 !important; content-visibility: visible !important; }
}

/* 18. MOTION, REVEAL, REDUCED MOTION, PRINT ================================ */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Scroll reveal. Content is only hidden while scripts run (html.js), so it can never get stuck invisible. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Mobile menu open: the page behind it does not scroll */
html.nav-locked { overflow: hidden; }
@media (min-width: 1040px) { html.nav-locked { overflow: visible; } }

/* Fallback page transition for browsers without cross-document view transitions (set by app.js) */
html.is-leaving body { opacity: 0; transition: opacity 0.18s ease; }

/* Soft cross-fade between pages (Chromium and Safari); other browsers navigate normally */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.2s ease both; }
::view-transition-new(root) { animation: vt-in 0.35s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .meter__fill { transform: none; }
}

@media print {
  .site-header, .nav-toggle, .float, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
}
