/* =========================================================
   KeyStart Academy — education theme (navy + golden yellow)
   assets/css/style.css  (all custom CSS)

   1. Variables
   2. Base and typography
   3. Layout and spacing system
   4. Components
   5. Page-specific
   6. Animations
   7. Reduced motion
   8. Print
   ========================================================= */

/* =========================================================
   1. VARIABLES
   ========================================================= */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  /* Colours — light theme */
  --bg: #FFFFFF;
  --bg-grid: rgba(12, 30, 60, 0.035);
  --surface: #FFFFFF;
  --surface-2: #F4F7FC;
  --surface-3: #E9EFF8;
  --cream: #FFF6E3;
  --line: #E3E9F2;
  --line-strong: #C9D3E2;
  --key-top: #FFFFFF;
  --key-hover: #F4F7FC;
  --key-edge: rgba(12, 30, 60, 0.08);
  --key-border: #DCE3EE;
  --ink: #0C1E3C;
  --ink-2: #3A4A66;
  --muted: #5B687F;
  --faint: #6B7890;
  --navy: #0C1E3C;
  --navy-2: #13294F;
  --brand: #FFB400;
  --brand-hover: #FFC533;
  --brand-ink: #0C1E3C;
  --brand-soft: #FFF1CC;
  --accent: #2347C8;
  --accent-hover: #1A36A0;
  --accent-edge: #172F8C;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF0FF;
  --accent-soft-2: #D3DEFF;
  --ok: #15803D;   --ok-soft: #E6F4EA;
  --few: #A16207;  --few-soft: #FDF3D7;
  --bad: #B91C1C;  --bad-soft: #FDECEC;
  --closed: #4B5563; --closed-soft: #EEF0F3;
  --t-typing: #2347C8; --t-office: #15803D; --t-basics: #B45309; --t-advanced: #7C3AED;
  --overlay: rgba(8, 18, 38, 0.55);
  --shadow-sm: 0 2px 8px -2px rgba(12, 30, 60, 0.08);
  --shadow-md: 0 18px 40px -18px rgba(12, 30, 60, 0.28);
  --shadow-lg: 0 30px 70px -20px rgba(12, 30, 60, 0.4);
  --lit: #FFB400;
  --lit-ink: #0C1E3C;

  /* Type */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --tamil: 'Noto Sans Tamil', 'Latha', 'Vijaya', sans-serif;

  /* Shape + motion */
  --r-key: 50px;
  --r-sheet: 16px;
  --r-card: 18px;
  --edge: 0px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 150ms;
  --t-ui: 220ms;
  --t-press: 90ms;

  /* Spacing system */
  --gutter: 16px;
  --sec-pad: 56px;
  --gap: 16px;
  --pad: 16px;
  --container: 1280px;
  --container-wide: 1440px;
  --header-h: 68px;
  --tray-h: 0px;
  --tabbar-h: 0px;
  --scrollbar-comp: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 390px) { :root { --gutter: 20px; } }
@media (min-width: 768px) { :root { --gutter: 32px; --sec-pad: 72px; --gap: 20px; --pad: 20px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; --sec-pad: 96px; --gap: 24px; --pad: 24px; } }
@media (min-width: 1200px) { :root { --header-h: 84px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }
@media (min-width: 1440px) { :root { --sec-pad: 120px; } }

/* =========================================================
   2. BASE AND TYPOGRAPHY
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; animation: focus-ring 0.3s var(--ease); }
::selection { background: var(--brand-soft); color: var(--ink); }
[hidden] { display: none !important; }
section[id], [id].acc-item { scroll-margin-top: calc(var(--header-h) + 16px); }
:lang(ta), .tamil-text { font-family: var(--tamil); }

.h1, .h2, .h3, .h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); }
.h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); letter-spacing: -0.02em; }
.h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); }
.h3 { font-size: clamp(1.25rem, 1.08rem + 0.6vw, 1.5rem); }
.h4 { font-size: 1.15rem; font-weight: 600; }
.lead { font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.15rem); color: var(--ink-2); max-width: 60ch; }
.lead-sm { font-size: 1rem; max-width: 64ch; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; }
.strong { font-weight: 700; }
.mini-label { display: block; font: 700 0.72rem/1.3 var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--ink); }
.req { color: var(--bad); }
.text-center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 200; padding: 0.6rem 1rem; background: var(--navy); color: #fff; border-radius: 8px; transform: translateY(-160%); transition: transform var(--t-ui) var(--ease); }
.skip-link:focus { transform: translateY(0); color: #fff; }
kbd, .kbd { font: 600 0.75rem/1 var(--mono); }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em; height: 1.7em; padding: 0 0.4em; border: 1px solid var(--key-border); border-radius: 6px; background: var(--surface-2); color: var(--ink); vertical-align: 0.1em; }
.noscript-note { position: fixed; bottom: 0; inset-inline: 0; z-index: 300; margin: 0; padding: 0.75rem var(--gutter); background: var(--few-soft); color: var(--ink); font-size: 0.9rem; border-top: 1px solid var(--line); }
/* Decorative shapes (pens, books, caps, rings) */
.deco { position: absolute; pointer-events: none; z-index: 0; user-select: none; animation: deco-float 6s ease-in-out infinite; }
@media (max-width: 767.98px) { .deco { display: none; } }

/* =========================================================
   3. LAYOUT AND SPACING SYSTEM
   ========================================================= */
.container { position: relative; z-index: 1; width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container.wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container.narrow { max-width: calc(880px + var(--gutter) * 2); }
.section { position: relative; padding-block: var(--sec-pad); }
.section-tight { padding-block: calc(var(--sec-pad) * 0.7); }
.section-top-0 { padding-top: clamp(28px, 4vw, 48px); }
.section-soft, .section-grid-bg { background: var(--surface-2); }
.section-cream { position: relative; background: var(--cream); overflow: hidden; }
.sec-head { margin-bottom: clamp(28px, 3.5vw, 48px); max-width: 760px; }
.sec-head .h2 { margin-top: 0.8rem; }
.sec-head .lead-sm { margin-top: 0.8rem; }
.sec-head-center { margin-inline: auto; text-align: center; }
.sec-head-center .f-label { justify-content: center; }
.sec-head-center .lead-sm { margin-inline: auto; }
.card-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 1023.98px) { .card-grid-4 > :last-child:nth-child(odd), .card-grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.two-col { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 1fr; } }
.grid-2 { display: grid; gap: 0 var(--gap); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.flex-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.stack-btns { display: grid; gap: 10px; }
/* Grid children may shrink below their content width (prevents overflow on 320px screens) */
.hero-grid > *, .two-col > *, .finder-grid > *, .ph-grid > *, .cd-layout > *, .cd-hero > *, .demo-grid > *, .test-grid > *, .auth-grid > *, .nf-grid > *, .skills-grid > *, .courses-layout > *, .map-box > *, .reviews-grid > *, .profile-grid > *, .trainer-row > *, .sb-grid > *, .adm-grid > * { min-width: 0; }

/* Small utility set (same names as Tailwind so markup also works if the CDN is offline) */
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.text-xs { font-size: 0.78rem; line-height: 1.45; } .text-sm { font-size: 0.875rem; line-height: 1.55; }
.w-full { width: 100%; } .block { display: block; } .inline-block { display: inline-block; } .justify-center { justify-content: center; }

/* =========================================================
   4. COMPONENTS
   ========================================================= */

/* ---------- 4.1 Buttons (class name "keycap" kept for the JS hooks) ---------- */
.keycap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.55rem 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-key);
  background: var(--surface);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--font);
  text-decoration: none; text-align: center;
  transition: transform var(--t-press) var(--ease), background-color var(--t-ui), border-color var(--t-ui), color var(--t-ui), box-shadow var(--t-ui);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}
@media (max-width: 479.98px) { .keycap { white-space: normal; max-width: 100%; } }
.keycap:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.keycap:active, .keycap.is-pressed { transform: translateY(1px) scale(0.98); }
.keycap:disabled, .keycap[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.keycap:disabled:hover { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.keycap .kc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kc-hint { display: none; }
.kc-sub { display: block; font: 500 0.78rem/1.35 var(--font); color: var(--muted); }
.btn-arrow { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-end: -0.7rem; border-radius: 50%; background: var(--navy); color: var(--brand); font-size: 0.9rem; transition: transform var(--t-ui) var(--ease), background-color var(--t-ui), color var(--t-ui); }
.keycap:hover .btn-arrow { transform: translateX(3px); background: var(--brand); color: var(--navy); }
.keycap-accent { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 24px -12px rgba(255, 180, 0, 0.8); }
.keycap-accent:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.keycap-accent .kc-sub { color: rgba(12, 30, 60, 0.75); }
.keycap-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.keycap-dark:hover { background: var(--accent); border-color: var(--accent); }
.keycap-light { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.keycap-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.keycap-ghost { background: transparent; }
.keycap-sm { min-height: 44px; padding: 0.45rem 1.15rem; font-size: 0.88rem; }
.keycap-xs { min-height: 36px; padding: 0.3rem 0.9rem; font-size: 0.8rem; }
@media (pointer: coarse) { .keycap-xs { min-height: 44px; } }
.keycap-lg { min-height: 56px; padding: 0.75rem 1.9rem; font-size: 1rem; }
.keycap-xl { min-height: 62px; padding: 0.9rem 2.2rem; font-size: 1.06rem; }
.keycap-sq { width: 48px; min-width: 48px; height: 48px; padding: 0; }
.keycap-sq svg { width: 20px; height: 20px; }
/* Tall "card" keys (finder path, learning steps) */
.keycap-tall { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.25rem; min-height: 92px; min-width: 150px; padding: 0.9rem 1rem; border-radius: 14px; white-space: normal; text-align: start; }
.keycap-tall .kc-hint { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 0.35rem; border-radius: 50%; background: var(--brand); color: var(--navy); font: 700 0.8rem/1 var(--font-head); border: 0; opacity: 1; }
.keycap-tall .kc-label { font-weight: 700; font-size: 0.95rem; line-height: 1.25; white-space: normal; }
.keycap-tall:hover .kc-sub { color: rgba(255, 255, 255, 0.8); }
.keycap-static { cursor: default; pointer-events: none; }
.keycap[aria-pressed="true"], .tab-key[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.keycap-accent[aria-pressed="true"] { background: var(--brand); color: var(--navy); }
.kc-mini {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem; margin-inline-end: 0.45rem;
  border-radius: 6px; background: var(--brand-soft); color: var(--navy);
  font: 700 0.72rem/1 var(--font-head); vertical-align: middle;
}
/* Sub-title above headings */
.f-label { display: inline-flex; align-items: center; gap: 0.55rem; font: 700 0.85rem/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.st-ico { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--navy); font-size: 0.85rem; }
.st-ico svg { width: 17px; height: 17px; }
.f-label .kc-mini { margin: 0; }

/* Radio "pills" (finder, forms, pay modes) */
.keycap-radio { position: relative; display: inline-flex; }
.keycap-radio input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.keycap-radio input:checked + .keycap { background: var(--navy); border-color: var(--navy); color: #fff; }
.keycap-radio input:checked + .keycap .kc-sub { color: rgba(255, 255, 255, 0.8); }
.keycap-radio input:focus-visible + .keycap { outline: 2px solid var(--accent); outline-offset: 3px; }
.keycap-radio:hover .keycap { border-color: var(--navy); }
.keycap-radio:hover input:not(:checked) + .keycap { background: var(--surface-2); color: var(--ink); }
.keycap-radio.is-disabled .keycap { opacity: 0.45; text-decoration: line-through; }
.keycap-radio input:disabled { cursor: not-allowed; }
.radio-keys { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-keys.has-error .keycap { border-color: var(--bad); }

/* Round icon buttons (header actions, socials) */
.icon-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  transition: background-color var(--t-ui), color var(--t-ui), border-color var(--t-ui), transform var(--t-press);
  position: relative; text-decoration: none;
}
.icon-key:hover { background: var(--brand); border-color: var(--brand); color: var(--navy); }
.icon-key:active { transform: scale(0.95); }
.icon-key svg { width: 19px; height: 19px; }
.icon-key-text { font: 800 0.66rem/1 var(--font); letter-spacing: 0.02em; }
.icon-key[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.icon-key-sm { width: 42px; height: 42px; }
.icon-key .ico-sun { display: none; }
.dark .icon-key .ico-sun { display: block; }
.dark .icon-key .ico-moon { display: none; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row-center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 38px;
  padding: 0.3rem 0.95rem; border: 1px solid var(--line); border-radius: 50px;
  background: var(--surface); color: var(--ink-2); font-size: 0.85rem; font-weight: 500; text-decoration: none;
  transition: background-color var(--t-ui), color var(--t-ui), border-color var(--t-ui);
}
@media (pointer: coarse) { .chip { min-height: 44px; } }
button.chip:hover, a.chip:hover { border-color: var(--navy); color: var(--ink); }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-static { background: var(--surface-2); }
.chip-ghost { background: transparent; border-style: dashed; }
.chip-remove span { font-size: 1.1em; line-height: 1; }
.chip-x { border: 0; background: none; padding: 0 0.2rem; font-size: 1.05rem; line-height: 1; color: var(--muted); min-width: 28px; min-height: 28px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-check span { display: inline-flex; min-height: 40px; align-items: center; padding: 0.35rem 0.95rem; border: 1px solid var(--line-strong); border-radius: 50px; background: var(--surface); font-size: 0.85rem; transition: all var(--t-ui) var(--ease); }
.chip-check input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge-cell { display: inline-flex; align-items: center; padding: 0.6rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0.9rem; font-weight: 500; }

/* Status pills (always text + icon, never colour alone) */
.status { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.16rem 0.6rem; border-radius: 999px; font: 600 0.75rem/1.4 var(--font); white-space: nowrap; border: 1px solid transparent; }
.status-ico::before { font: 700 0.72rem/1 var(--font); }
.status-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.status-ok .status-ico::before { content: '✓'; }
.status-few { background: var(--few-soft); color: var(--few); border-color: color-mix(in srgb, var(--few) 25%, transparent); }
.status-few .status-ico::before { content: '◐'; }
.status-full, .status-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.status-full .status-ico::before, .status-bad .status-ico::before { content: '✕'; }
.status-closed { background: var(--closed-soft); color: var(--closed); border-color: var(--line); }
.status-closed .status-ico::before { content: '●'; font-size: 0.55rem; }
.seat { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.seat-bar { display: inline-block; width: 64px; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.seat-bar > span { display: block; height: 100%; background: var(--brand); transform-origin: left; border-radius: inherit; transition: transform 0.6s var(--ease); }
.rating { color: #E0A100; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.rating .num { color: var(--ink); }

/* Track label */
.track-key { display: inline-flex; align-items: center; gap: 0.4rem; font: 700 0.74rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.track-key .kc-mini { background: var(--tc, var(--accent)); color: #fff; margin: 0; min-width: 1.35rem; height: 1.35rem; border-radius: 50%; font-size: 0.66rem; }
[data-track="typing"] { --tc: var(--t-typing); } [data-track="office"] { --tc: var(--t-office); } [data-track="basics"] { --tc: var(--t-basics); } [data-track="advanced"] { --tc: var(--t-advanced); }
/* Spreadsheet-era reference tags are hidden in this theme, except where they carry content */
.cell-ref { display: none; }
.bc-head .cell-ref, .req-list .cell-ref, .search-results .cell-ref { display: inline-block; font: 700 0.72rem/1 var(--font); color: var(--navy); padding: 0.3rem 0.6rem; border-radius: 50px; background: var(--brand-soft); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.dir-arrow { display: inline-block; }

/* ---------- 4.2 Header, top bar, dropdowns ---------- */
.top-strip { display: none; background: var(--navy); color: #C9D3E6; font-size: 0.84rem; }
@media (min-width: 1024px) { .top-strip { display: block; } }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 46px; }
.strip-group { display: flex; align-items: center; gap: 22px; }
.strip-item { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.strip-item svg { width: 16px; height: 16px; color: var(--brand); }
a.strip-item:hover { color: var(--brand); }
.strip-note { color: var(--brand); font-weight: 600; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-ui), background-color var(--t-ui);
}
.is-scrolled .site-header { box-shadow: 0 10px 30px -18px rgba(12, 30, 60, 0.45); }
.header-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.logo-key { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand); }
.logo-key-top { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--brand); font: 800 1.25rem/1 var(--font-head); transform: translate(-3px, -3px); }
.logo-bump { position: absolute; bottom: 8px; left: 50%; width: 10px; height: 2px; margin-left: -5px; border-radius: 2px; background: var(--brand); }
.logo-word { display: flex; flex-direction: column; line-height: 1.05; }
.logo-word strong { font: 800 1.3rem/1 var(--font-head); letter-spacing: -0.02em; color: var(--ink); }
.logo-word span { font: 600 0.68rem/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted); margin-top: 4px; }
.logo-sm .logo-key { width: 38px; height: 38px; }
.logo-sm .logo-key-top { font-size: 1.05rem; }
.logo-sm .logo-word strong { font-size: 1.1rem; }

.primary-nav { display: none; margin-inline-start: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 44px; padding: 0.45rem 0.6rem; border: 0; border-radius: 8px; background: none;
  color: var(--ink); font: 600 0.92rem/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: color var(--t-ui);
}
.nav-link:hover { color: var(--accent); }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after { content: ''; position: absolute; inset-inline: 0.6rem; bottom: 4px; height: 3px; border-radius: 3px; background: var(--brand); }
.chev { width: 12px; height: 12px; transition: transform var(--t-ui) var(--ease); }
.dd.open > .dd-btn .chev, .mp-acc-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
@media (min-width: 1200px) { .primary-nav + .header-actions { margin-inline-start: 12px; } }
.header-actions [data-toggle-theme], .header-actions [data-toggle-rtl], .account-slot, .cta-demo { display: none; }
.account-slot { align-items: center; gap: 8px; }
.nav-login { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.4rem 0.95rem; font-size: 0.86rem; white-space: nowrap; }
.nav-acct-ic { width: 16px; height: 16px; flex: 0 0 auto; }
@media (min-width: 1200px) {
  .primary-nav { display: block; }
  .header-actions [data-toggle-theme], .header-actions [data-toggle-rtl], .account-slot, .cta-demo { display: inline-flex; }
  .menu-btn { display: none; }
  .nav-full { display: none; }
  .cta-demo { padding: 0.5rem 1.1rem; font-size: 0.88rem; }
  .cta-demo .btn-arrow { display: none; }
  .header-actions [data-toggle-rtl] { display: none; }
  .nav-link { padding-inline: 0.5rem; font-size: 0.9rem; }
}
@media (min-width: 1440px) {
  .nav-full { display: list-item; }
  .nav-more { display: none; }
  .cta-demo .btn-arrow { display: inline-grid; }
  .header-actions [data-toggle-rtl] { display: inline-flex; }
  .nav-link { padding-inline: 0.75rem; font-size: 0.95rem; }
  .header-inner { gap: 18px; }
}

.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 70;
  min-width: 240px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s linear 180ms;
}
.dd.open > .dd-menu { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.dd-menu-end { inset-inline-start: auto; inset-inline-end: 0; }
.dd-menu a, .dd-menu button { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0.6rem 0.8rem; border: 0; border-radius: 8px; background: none; color: var(--ink); text-decoration: none; text-align: start; font-size: 0.92rem; font-weight: 600; min-height: 44px; justify-content: center; transition: background-color var(--t-fast), padding var(--t-ui) var(--ease); }
.dd-menu a small { font: 500 0.76rem/1.3 var(--font); color: var(--muted); }
.dd-menu a:hover, .dd-menu button:hover, .dd-menu a:focus-visible, .dd-menu button:focus-visible { background: var(--surface-2); padding-inline-start: 1.05rem; outline-offset: -2px; }
.dd-menu a[aria-current="page"] { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.dd-note { padding: 0.5rem 0.8rem 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; font-size: 0.88rem; }
.dd-note .num { font-size: 0.78rem; color: var(--muted); }
.avatar-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); min-height: 44px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--brand); font: 700 0.8rem/1 var(--font-head); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 4.3 Mobile side panel ---------- */
.mp-overlay, .filter-overlay, .dash-overlay { position: fixed; inset: 0; z-index: 80; background: var(--overlay); opacity: 0; transition: opacity var(--t-ui) var(--ease); }
.mp-overlay.open, .filter-overlay.open, .dash-overlay.open { opacity: 1; }
.mobile-panel {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 90;
  width: min(88vw, 380px); display: flex; flex-direction: column;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform 260ms var(--ease);
  padding-bottom: var(--safe-b);
}
.mobile-panel.open { transform: translateX(0); }
.mp-head { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.mp-nav { flex: 1; overflow-y: auto; padding: 10px var(--gutter); }
.mp-nav > ul > li { border-bottom: 1px solid var(--line); }
.mp-nav a, .mp-acc-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0.6rem 0.25rem; border: 0; background: none; color: var(--ink); font-size: 1.02rem; font-weight: 600; text-decoration: none; text-align: start; }
.mp-nav a[aria-current="page"], .mp-nav a.is-active, .mp-acc-btn.is-active { color: var(--accent); }
.mp-sub { padding: 0 0 0.6rem 0.75rem; border-inline-start: 3px solid var(--brand); margin-inline-start: 0.25rem; margin-bottom: 0.5rem; }
.mp-sub a { min-height: 44px; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); }
.mp-foot { display: grid; gap: 10px; padding: 14px var(--gutter) 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mp-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-toggles .keycap { padding-inline: 0.6rem; }
.mp-account { display: grid; gap: 8px; }
.mobile-panel.open .mp-nav > ul > li { animation: rise-in 0.32s var(--ease) both; animation-delay: calc(var(--i) * 40ms + 60ms); }

/* ---------- 4.4 On-screen keyboard ---------- */
.kb-wrap { container-type: inline-size; width: 100%; }
.okb {
  --kg: clamp(3px, 0.7cqi, 6px);
  --kh: clamp(24px, 6.4cqi, 46px);
  display: flex; flex-direction: column; gap: var(--kg);
  padding: clamp(6px, 1.4cqi, 14px); border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-2); user-select: none;
}
.okb-row { display: flex; gap: var(--kg); }
.key {
  position: relative; flex: 1 0 0; min-width: 0; height: var(--kh);
  display: grid; place-items: center;
  border: 1px solid var(--key-border); border-radius: clamp(4px, 1cqi, 9px);
  background: var(--surface); color: var(--ink-2);
  font: 600 clamp(0.55rem, 1.9cqi, 0.82rem)/1 var(--font);
  box-shadow: 0 2px 0 var(--line-strong);
  transition: transform 80ms var(--ease), box-shadow 80ms var(--ease), background-color 120ms, color 120ms;
}
.key-top { pointer-events: none; overflow: hidden; white-space: nowrap; }
.key.w15 { flex-grow: 1.5; } .key.w18 { flex-grow: 1.8; } .key.w2 { flex-grow: 2; } .key.w22 { flex-grow: 2.2; } .key.w25 { flex-grow: 2.5; }
.key.space { flex: 0 0 42%; margin-inline: auto; }
.okb-row:last-child { justify-content: center; }
.key.home { background: var(--accent-soft); }
.key.bump::after { content: ''; position: absolute; bottom: 18%; left: 50%; width: 26%; height: 2px; margin-left: -13%; border-radius: 2px; background: var(--navy); opacity: 0.6; }
.key.next { box-shadow: 0 2px 0 var(--line-strong), inset 0 0 0 2px var(--accent); color: var(--accent); }
.key.lit { transform: translateY(2px); background: var(--lit); color: var(--lit-ink); border-color: #E09E00; box-shadow: 0 0 0 transparent; }
.key.lit.bump::after { background: var(--navy); }
.okb.show-fingers .key[data-f="lp"] { background: #FDE2E4; } .okb.show-fingers .key[data-f="lr"] { background: #FFE8CC; }
.okb.show-fingers .key[data-f="lm"] { background: #FFF6BF; } .okb.show-fingers .key[data-f="li"] { background: #D3F9D8; }
.okb.show-fingers .key[data-f="ri"] { background: #C5F6FA; } .okb.show-fingers .key[data-f="rm"] { background: #D0EBFF; }
.okb.show-fingers .key[data-f="rr"] { background: #E5DBFF; } .okb.show-fingers .key[data-f="rp"] { background: #FCE4F5; }
.okb.show-fingers .key[data-f="th"] { background: #EEF0F3; }
.okb.show-fingers .key { color: #1F2937; }
.okb.show-fingers .key.lit { background: var(--lit); color: var(--lit-ink); }
.key[data-heat="1"] { background: color-mix(in srgb, var(--bad) 14%, var(--key-top)); }
.key[data-heat="2"] { background: color-mix(in srgb, var(--bad) 32%, var(--key-top)); }
.key[data-heat="3"] { background: color-mix(in srgb, var(--bad) 58%, var(--key-top)); color: #fff; }
.key[data-heat="4"] { background: color-mix(in srgb, var(--bad) 85%, var(--key-top)); color: #fff; font-weight: 700; }
.key[data-heat]:not([data-heat="0"]) { transition: background-color 0.5s var(--ease); }
.heat-sw { display: inline-block; width: 18px; height: 14px; border-radius: 3px; border: 1px solid var(--line); vertical-align: middle; }
.heat-sw[data-heat="1"] { background: color-mix(in srgb, var(--bad) 14%, var(--key-top)); } .heat-sw[data-heat="2"] { background: color-mix(in srgb, var(--bad) 32%, var(--key-top)); }
.heat-sw[data-heat="3"] { background: color-mix(in srgb, var(--bad) 58%, var(--key-top)); } .heat-sw[data-heat="4"] { background: color-mix(in srgb, var(--bad) 85%, var(--key-top)); }
.key-missing { background: transparent; border: 2px dashed var(--brand); box-shadow: none; color: var(--navy); font-weight: 800; }
.okb-sm { --kh: clamp(20px, 6cqi, 34px); }
.finger-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 0.82rem; }
.finger-legend li { display: inline-flex; align-items: center; gap: 6px; }
.fswatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line-strong); }
.fswatch[data-f="lp"] { background: #FDE2E4; } .fswatch[data-f="lr"] { background: #FFE8CC; } .fswatch[data-f="lm"] { background: #FFF6BF; } .fswatch[data-f="li"] { background: #D3F9D8; }
.fswatch[data-f="ri"] { background: #C5F6FA; } .fswatch[data-f="rm"] { background: #D0EBFF; } .fswatch[data-f="rr"] { background: #E5DBFF; } .fswatch[data-f="rp"] { background: #FCE4F5; } .fswatch[data-f="th"] { background: #EEF0F3; }

/* ---------- 4.5 Sheets, formula bar, mini tables ---------- */
.sheet { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-sm); overflow: hidden; }
.formula-bar { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.55rem 1rem; background: var(--brand-soft); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.formula-bar::before { content: 'i'; display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--brand); font: 700 0.8rem/1 Georgia, serif; }
.fx, .fx-ref, .sheet-table .col-letters, .sheet-table .rn { display: none !important; }
.formula-static { border: 1px solid var(--line); border-radius: 12px; }
.fx-ref { flex: 0 0 auto; min-width: 3.4rem; padding: 0.22rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-weight: 600; font-size: 0.78rem; text-align: center; color: var(--ink); }
.fx { flex: 0 0 auto; font: italic 600 0.92rem/1 Georgia, 'Times New Roman', serif; color: var(--muted); padding-inline: 0.2rem; border-inline-end: 1px solid var(--line); padding-inline-end: 0.6rem; }
.fx-text { flex: 1; min-width: 0; color: var(--ink-2); line-height: 1.45; }
.fx-open { flex: 0 0 auto; }
.sheet-scroll { position: relative; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.batch-view .sheet-scroll { max-height: min(72svh, 760px); }
.sheet-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.sheet-table th, .sheet-table td { padding: 0.62rem 0.8rem; text-align: start; vertical-align: middle; background: var(--surface); border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); transition: background-color var(--t-fast), box-shadow var(--t-fast); }
.sheet-table thead { position: sticky; top: 0; z-index: 3; }
.sheet-table .col-letters td { padding: 0.2rem 0.5rem; background: var(--surface-3); color: var(--muted); font: 500 0.7rem/1.4 var(--mono); text-align: center; }
.sheet-table .col-names th { background: var(--navy); font-weight: 700; font-size: 0.82rem; color: #fff; white-space: nowrap; border-inline-end-color: rgba(255,255,255,0.08); }
.sheet-table .rn { width: 2.6rem; min-width: 2.6rem; padding-inline: 0.3rem; text-align: center; background: var(--surface-3); color: var(--muted); font: 500 0.7rem/1 var(--mono); position: sticky; inset-inline-start: 0; z-index: 2; }
.sheet-table thead .rn { z-index: 4; }
.sheet-table tbody td[data-col="0"], .sheet-table .col-names th[data-col="0"] { position: sticky; inset-inline-start: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--line-strong); }
.sheet-table .col-names th[data-col="0"] { z-index: 4; }
.sheet-table tr > :last-child { border-inline-end: 0; }
.sheet-table tbody tr:last-child > * { border-bottom: 0; }
.sheet-table tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.sheet-table tbody td { cursor: cell; }
.sheet-table tbody tr:hover td { background: var(--surface-2); }
.sheet-table tbody td.active { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); animation: cell-in 0.18s var(--ease); }
.sheet-table tbody tr.row-active td { background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.sheet-table .is-num { text-align: end; }
.sheet-table td a { font-weight: 500; }
.sheet-table .empty-row td { text-align: center; color: var(--muted); padding: 1.6rem; cursor: default; }
.sort-btn { display: inline-flex; align-items: center; gap: 0.35rem; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; min-height: 28px; }
.sort-ind::after { content: '↕'; font-size: 0.75rem; color: rgba(255,255,255,0.6); }
[aria-sort="ascending"] .sort-ind::after { content: '▲'; color: var(--brand); }
[aria-sort="descending"] .sort-ind::after { content: '▼'; color: var(--brand); }
.cell-link { padding: 0.25rem 0.75rem; border: 0; border-radius: 50px; background: var(--brand-soft); font-weight: 700; font-size: 0.82rem; color: var(--navy); min-height: 32px; transition: transform var(--t-press) var(--ease), box-shadow var(--t-press); }
.cell-link:active { transform: translateY(2px); box-shadow: none; }
.cell-check { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.fx-total-label { color: var(--muted); font-weight: 500 !important; }
.mini-sheet { width: 100%; border-collapse: collapse; font-size: 0.88rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-sheet th, .mini-sheet td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); text-align: start; }
.mini-sheet th { background: var(--navy); color: #fff !important; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); }
.mini-sheet .is-num { text-align: end; }
.mini-sheet tr:last-child td { border-bottom: 0; }
.sheet-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--pad); box-shadow: var(--shadow-sm); }
.cell-box { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.cell-box-accent { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.big-num { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); font-weight: 600; line-height: 1.1; }
.split-cells { display: grid; gap: 12px; }
@media (min-width: 480px) { .split-cells { grid-template-columns: 1fr 1fr; } }

/* Mobile: sheets become stacked cards (labels from data-label) */
@media (max-width: 767.98px) {
  .sheet-table .col-letters, .sheet-table thead { display: none; }
  .sheet-table, .sheet-table tbody, .sheet-table tfoot, .sheet-table tr, .sheet-table tbody td, .sheet-table tfoot td { display: block; width: 100%; }
  .sheet-table tbody tr { position: relative; padding: 0.7rem 0.9rem 0.7rem; border-bottom: 1px solid var(--line); }
  .sheet-table tbody tr:last-child { border-bottom: 0; }
  .sheet-table tbody td, .sheet-table tbody td[data-col="0"] { position: static; display: grid; grid-template-columns: minmax(6.5rem, 38%) 1fr; gap: 0.6rem; align-items: center; padding: 0.28rem 0; border: 0; box-shadow: none; background: transparent; text-align: start; }
  .sheet-table tbody td > * { justify-self: start; max-width: 100%; }
  .sheet-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 0.76rem; font-weight: 500; }
  .sheet-table tbody td[data-label=""]::before { content: none; }
  .sheet-table tbody td[data-label=""] { grid-template-columns: 1fr; }
  .sheet-table tbody td.active { box-shadow: none; background: transparent; }
  .sheet-table tbody tr.row-active { box-shadow: inset 3px 0 0 var(--brand); background: var(--brand-soft); }
  .sheet-table tbody tr:hover td { background: transparent; }
  .sheet-table tbody .rn { position: absolute; top: 0.6rem; inset-inline-end: 0.6rem; width: auto; min-width: 0; padding: 0.15rem 0.4rem; border-radius: 4px; display: inline-block; }
  .sheet-table tbody td.is-num { text-align: start; }
  .sheet-table tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 0.7rem 0.9rem; gap: 0.5rem; background: var(--surface-2); }
  .sheet-table tfoot td { border: 0; padding: 0; width: auto; background: none; }
  .sheet-table tfoot .rn { display: none; }
  .sheet-table .empty-row td { grid-template-columns: 1fr; text-align: center; }
  .sheet-table .empty-row td::before { content: none; }
  .formula-bar { flex-wrap: wrap; }
  .fx { display: none; }
}

/* ---------- 4.6 Document ruler (reading progress) ---------- */
.doc-ruler { position: sticky; top: var(--header-h); z-index: 55; height: 6px; background: var(--surface-3); overflow: hidden; }
.ruler-ticks { display: none; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 50px); background-size: 100% 5px, 100% 9px; background-position: 0 100%, 0 100%; background-repeat: no-repeat; opacity: 0.7; }
.ruler-fill { position: absolute; inset: 0; background: var(--brand); transform-origin: left; transform: scaleX(var(--p)); }
.ruler-marker { display: none; position: absolute; top: 0; left: 0; width: 12px; height: 9px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); transform: translateX(calc(var(--p) * (100vw - 12px - var(--scrollbar-comp)))); }
.ruler-marker::after { content: ''; position: absolute; left: 5px; top: 9px; width: 2px; height: 9px; background: var(--accent); }
.doc-ruler.sda-ruler { animation: ruler-p linear both; animation-timeline: scroll(root block); }

/* ---------- 4.7 Cards ---------- */
.course-card, .outcome-card, .trainer-card, .story-card, .batch-card, .role-card, .type-card, .dcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  transition: transform var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease), border-color var(--t-ui);
}
.course-card::before, .outcome-card::before, .trainer-card::before, .batch-card::before, .role-card::before, .type-card::before {
  content: ''; position: absolute; inset: auto -1px -1px; height: 4px; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease); z-index: 1;
}
.course-card:hover, .outcome-card:hover, .trainer-card:hover, .batch-card:hover, .role-card:hover, .type-card:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-4px); }
.course-card:hover::before, .outcome-card:hover::before, .trainer-card:hover::before, .batch-card:hover::before, .role-card:hover::before, .type-card:hover::before, .course-card:focus-within::before { transform: scaleX(1); }
.course-card { overflow: hidden; }
.cc-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); margin: 10px 10px 0; border-radius: 12px; }
.cc-tag { position: absolute; top: 12px; inset-inline-start: 12px; padding: 0.4rem 0.75rem; border-radius: 50px; background: var(--surface); box-shadow: var(--shadow-sm); }
.cc-level { display: inline-flex; padding: 0.15rem 0.6rem; border-radius: 50px; background: var(--brand-soft); color: var(--navy); font-size: 0.75rem; font-weight: 700; margin-inline-end: auto; }
.cc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.course-card:hover .cc-media img { transform: scale(1.06); }
.cc-body { display: flex; flex-direction: column; gap: 0.7rem; padding: var(--pad); flex: 1; }
.cc-top { display: flex; align-items: center; gap: 6px; }
.cc-title { font: 700 1.15rem/1.3 var(--font-head); }
.cc-title a { color: var(--ink); text-decoration: none; }
.cc-title a:hover { color: var(--accent); text-decoration: underline; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 0.8rem; color: var(--muted); }
.cc-meta li { display: inline-flex; align-items: center; gap: 0.3rem; }
.cc-meta li + li::before { content: '•'; color: var(--brand); margin-inline-end: 0.3rem; }
.cc-fee { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 0.88rem; }
.cc-fee strong { font: 800 1.3rem/1 var(--font-head); color: var(--accent); }
.cc-batch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; font-size: 0.82rem; padding-top: 0.7rem; border-top: 1px dashed var(--line); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 0.3rem; }
.cc-actions .keycap { flex: 1 1 auto; }
.compare-check { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--muted); cursor: pointer; min-height: 36px; align-self: flex-start; }
.compare-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.compare-check.on { color: var(--accent); font-weight: 600; }
/* List view = sheet rows */
.course-grid.is-list { grid-template-columns: 1fr !important; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; background: var(--surface); }
.course-grid.is-list .course-card { flex-direction: row; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.course-grid.is-list .course-card:last-child { border-bottom: 0; }
.course-grid.is-list .course-card::before { inset: 0 auto 0 0; width: 3px; height: auto; border-radius: 0; transform: scaleY(0); }
.course-grid.is-list .course-card:hover::before { transform: scaleY(1); }
.course-grid.is-list .cc-media { flex: 0 0 140px; aspect-ratio: auto; margin: 10px; }
.course-grid.is-list .cc-body { padding: 0.9rem 1rem; gap: 0.45rem; }
@media (min-width: 1024px) {
  .course-grid.is-list .cc-body { display: grid; grid-template-columns: 1.5fr 1.1fr 0.9fr auto; grid-template-areas: 'top fee batch actions' 'title meta batch actions'; align-items: center; column-gap: 1rem; }
  .course-grid.is-list .cc-top { grid-area: top; } .course-grid.is-list .cc-title { grid-area: title; }
  .course-grid.is-list .cc-meta { grid-area: meta; } .course-grid.is-list .cc-fee { grid-area: fee; }
  .course-grid.is-list .cc-batch { grid-area: batch; border: 0; padding: 0; flex-direction: column; align-items: flex-start; }
  .course-grid.is-list .cc-actions { grid-area: actions; margin: 0; flex-direction: column; }
  .course-grid.is-list .compare-check { grid-column: 4; }
}
@media (max-width: 639.98px) { .course-grid.is-list .cc-media { display: none; } }

/* Outcome cards with before/after toggle */
.outcome-card { padding: var(--pad); gap: 0.9rem; cursor: pointer; }
.oc-head { display: flex; align-items: center; gap: 0.75rem; }
.oc-head .h3, .oc-head h3 { font: 700 1.2rem/1.2 var(--font-head); color: var(--ink); }
.oc-head .keycap-sq { width: 52px; height: 52px; min-width: 52px; border-radius: 14px; background: var(--brand-soft); border-color: transparent; font: 800 1.1rem/1 var(--font-head); color: var(--navy); }
.ba-switch { display: inline-flex; gap: 4px; align-self: flex-start; padding: 4px; border: 1px solid var(--line); border-radius: 50px; background: var(--surface-2); }
.ba-view { min-height: 4.6em; }
.ba-view p { font-size: 1rem; line-height: 1.45; animation: rise-in 0.28s var(--ease); }
.ba-view .mini-label { margin-bottom: 0.25rem; }
.ba-before { display: none; color: var(--ink-2); }
.ba-after { font-weight: 500; }
.outcome-card.show-before .ba-before { display: block; }
.outcome-card.show-before .ba-after { display: none; }
.oc-more { margin-top: auto; align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 500; font-size: 0.9rem; min-height: 36px; }
.oc-more:hover { text-decoration: underline; }

.trainer-card { overflow: hidden; }
.trainer-card img { width: calc(100% - 20px); margin: 10px 10px 0; border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-3); }
.tc-body { padding: var(--pad); display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.tc-body h3 { font: 700 1.2rem/1.2 var(--font-head); color: var(--ink); }
.tc-cells { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: auto; }
.tc-cells div { padding: 0.45rem 0.55rem; border-inline-end: 1px solid var(--line); }
.tc-cells div:last-child { border-inline-end: 0; }
.tc-cells dt { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tc-cells dd { font-weight: 600; font-size: 0.88rem; }
.trainer-row { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 640px) { .trainer-row { grid-template-columns: minmax(0, 300px) 1fr; } }
.trainer-pop { display: grid; gap: 1rem; grid-template-columns: 96px 1fr; align-items: start; margin-bottom: 1rem; }
.trainer-pop img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }

.story-card { padding: var(--pad); gap: 0.9rem; scroll-snap-align: start; flex: 0 0 min(86%, 380px); }
.sc-head { display: flex; align-items: center; gap: 0.8rem; }
.sc-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand-soft); }
.sc-head h3 { font-size: 1rem; font-weight: 600; }
.speed-delta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.55rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 0.95rem; }
.speed-delta .mini-label { display: inline; }
.speed-delta .strong { color: var(--accent); font: 800 1.2rem/1 var(--font-head); }
.story-card blockquote { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.story-card::after { content: '\201D'; position: absolute; top: 8px; inset-inline-end: 18px; font: 800 4.5rem/1 var(--font-head); color: var(--brand); opacity: 0.6; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.batch-card { padding: var(--pad); gap: 0.6rem; }
.bc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.batch-card h3 { font-size: 1.02rem; font-weight: 600; }
.batch-card h3 a { color: var(--ink); text-decoration: none; }
.kv { display: grid; gap: 0.3rem; font-size: 0.88rem; }
.kv > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.6rem; }
.kv dt { color: var(--muted); }
.kv-sheet { gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 1rem; }
.kv-sheet > div { grid-template-columns: minmax(7.5rem, 36%) 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.kv-sheet > div:last-child { border-bottom: 0; }
.kv-sheet dt { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.7rem; background: var(--surface-2); border-inline-end: 1px solid var(--line); font-size: 0.82rem; }
.kv-sheet dd { padding: 0.55rem 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.role-card, .type-card { padding: var(--pad); }
.role-courses li { padding: 0.35rem 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.role-courses li:last-child { border-bottom: 0; }
.dcard { padding: var(--pad); gap: 0.4rem; }

/* Lists */
.tick-list { display: grid; gap: 0.45rem; }
.tick-list li { position: relative; padding-inline-start: 1.7rem; }
.tick-list li::before { content: '✓'; position: absolute; inset-inline-start: 0; top: 0.1em; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 4px; background: var(--brand); color: var(--navy); border-radius: 50%; font: 800 0.66rem/1 var(--font); }
.tick-list.sm li { font-size: 0.86rem; }
.tip-list { display: grid; gap: 0.3rem; margin-top: 0.5rem; padding-inline-start: 1rem; list-style: disc; }
.outline-mini { display: grid; gap: 0.3rem; font-size: 0.92rem; }
.pop-h3 { font-size: 0.98rem; font-weight: 600; margin: 1.2rem 0 0.6rem; }

/* ---------- 4.8 Tabs + accordion ---------- */
.tab-list { position: relative; display: flex; gap: 10px; padding: 4px 2px 10px; overflow-x: auto; scrollbar-width: none; margin-bottom: 1.6rem; }
.tab-list-center { justify-content: safe center; }
.tab-list::-webkit-scrollbar { display: none; }
.tab-key { flex: 0 0 auto; }
.tab-ind { display: none; position: absolute; left: 0; bottom: 2px; height: 4px; width: 0; border-radius: 3px; background: var(--accent); box-shadow: 0 2px 0 var(--accent-edge); transition: transform 260ms var(--ease), width 260ms var(--ease); pointer-events: none; }
.tab-panel { animation: rise-in 0.3s var(--ease); }
.accordion { display: grid; gap: 12px; }
.acc-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; transition: box-shadow var(--t-ui), border-color var(--t-ui); }
.acc-item.open { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.acc-h { font-size: 1rem; font-weight: 500; }
.acc-btn { font-weight: 700 !important; display: flex; align-items: center; gap: 0.9rem; width: 100%; min-height: 60px; padding: 0.95rem 1.2rem; border: 0; background: none; text-align: start; font: 500 1rem/1.4 var(--font); color: var(--ink); }
.acc-btn:hover { color: var(--accent); }
.acc-ref { display: none; flex: 0 0 auto; min-width: 2.4rem; text-align: center; font-size: 0.7rem; padding: 0.25rem 0.3rem; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.acc-btn > span:nth-child(2) { flex: 1; }
.acc-ico { position: relative; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); transition: background-color var(--t-ui); }
.acc-item.open .acc-ico { background: var(--brand); }
.acc-ico::before, .acc-ico::after { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: var(--ink-2); border-radius: 1px; transition: transform var(--t-ui) var(--ease); }
.acc-ico::after { transform: rotate(90deg); }
.acc-item.open .acc-ico::after { transform: rotate(0deg); }
.acc-item.open .acc-ref { background: var(--accent); color: #fff; border-color: var(--accent); }
.acc-inner { padding: 0 1.2rem 1.2rem; color: var(--ink-2); }
.js .acc-panel { display: none; }
.js .acc-item.open .acc-panel { display: block; animation: rise-in 0.26s var(--ease); }
@media (max-width: 479.98px) { .acc-inner { padding-inline-start: 0.2rem; } }
details.outline-mod { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 8px; overflow: hidden; }
details.outline-mod summary { display: flex; align-items: center; gap: 0.6rem; min-height: 54px; padding: 0.75rem 1rem; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; background: var(--surface-2); }
details.outline-mod[open] summary { background: var(--brand-soft); }
details.outline-mod summary::-webkit-details-marker { display: none; }
details.outline-mod summary::after { content: '+'; margin-inline-start: 0.4rem; font: 600 1rem/1 var(--mono); color: var(--muted); }
details.outline-mod[open] summary::after { content: '−'; }
details.outline-mod summary .muted { margin-inline-start: auto; font-weight: 500; font-size: 0.82rem; }
details.outline-mod ol { padding: 0.4rem 0.9rem 0.7rem; }
details.outline-mod li { display: flex; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
details.outline-mod li:last-child { border-bottom: 0; }
details.outline-mod li .muted { margin-inline-start: auto; font-size: 0.82rem; }
details.outline-mod[open] ol { animation: rise-in 0.25s var(--ease); }

/* ---------- 4.9 Forms ---------- */
.form-grid { display: grid; gap: 1rem; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field > label, .field > .label, .field > legend { font-weight: 500; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--ink); }
.input {
  width: 100%; min-height: 46px; padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink);
  font-size: 1rem; line-height: 1.4;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea.input { min-height: 96px; resize: vertical; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--muted); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); outline: none; }
select.input { appearance: none; -webkit-appearance: none; padding-inline-end: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%235B6472' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 14px; background-position: right 0.8rem center; }
.input-sm { min-height: 42px; padding-block: 0.4rem; font-size: 0.92rem; }
.input-cell { min-height: 40px; border-radius: 6px; font-size: 0.92rem; }
@media (max-width: 767.98px) { .input, .input-sm, .input-cell { font-size: 16px; } }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .input { flex: 1; min-width: 0; }
.input-row .keycap { flex: 0 0 auto; }
.hint { margin-top: 0.3rem; font-size: 0.78rem; color: var(--muted); }
.field-error { margin: 0; font-size: 0.82rem; color: var(--bad); font-weight: 500; }
.field-error:not(:empty) { margin-top: 0.35rem; animation: err-in 0.22s var(--ease); }
.field-error:not(:empty)::before { content: '⚠ '; }
.has-error .input, .input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.shake { animation: shake 0.32s var(--ease); }
.check-row { display: inline-flex; align-items: flex-start; gap: 0.55rem; font-size: 0.9rem; cursor: pointer; min-height: 32px; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.range { width: 100%; accent-color: var(--accent); min-height: 32px; }
.range-scale { display: flex; justify-content: space-between; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 0.92rem; }
.switch-row:last-child { border-bottom: 0; }
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto; width: 46px; height: 26px; margin: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background-color var(--t-ui); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform var(--t-ui) var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* OTP inputs (keycap style) */
.otp-row { display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); gap: 8px; justify-content: start; }
.otp-box { width: 100%; height: 56px; text-align: center; font-size: 1.35rem; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: none; color: var(--ink); transition: transform var(--t-press) var(--ease), box-shadow var(--t-press), border-color var(--t-fast); }
.otp-box:focus { border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-soft-2), 0 0 0 3px var(--accent-soft-2); outline: none; }
.otp-box.filled { border-color: var(--brand); background: var(--brand-soft); }
/* Password strength meter */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 0.5rem; }
.pw-meter span { height: 6px; border-radius: 3px; background: var(--surface-3); transform-origin: left; transition: background-color var(--t-ui); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: var(--few); }
.pw-meter[data-level="3"] span:nth-child(-n+3) { background: var(--ok); }
.pw-meter[data-level="4"] span { background: var(--ok); }

/* Step indicator keys (multi-step forms) */
.step-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.4rem; }
.step-key .keycap { gap: 0.4rem; }
.step-key .kc-hint { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--navy); font: 700 0.72rem/1 var(--font); }
.step-key.is-current .keycap { background: var(--navy); color: #fff; border-color: var(--navy); }
.step-key.is-current .kc-hint { background: var(--brand); }
.step-key.is-done .keycap { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step-key.is-done .kc-hint { background: var(--ok); color: #fff; }
.step-key.is-done .kc-hint::after { content: '✓'; margin-inline-start: 2px; }
.form-step { animation: rise-in 0.28s var(--ease); }
.form-step h3:focus { outline: none; }
.demo-note { padding: 0.7rem 0.9rem; border: 1px dashed var(--few); border-radius: 10px; background: var(--few-soft); font-size: 0.88rem; }

/* ---------- 4.10 Popups and bottom sheets ---------- */
#popup-root { position: relative; z-index: 120; }
.pop-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: var(--overlay); opacity: 0; transition: opacity var(--t-ui) var(--ease); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.pop-overlay.open { opacity: 1; }
.pop {
  position: relative; display: flex; flex-direction: column; width: 100%; max-height: 85svh;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-lg);
  transform: scale(0.94); opacity: 0; transition: transform var(--t-ui) var(--ease), opacity var(--t-ui) var(--ease);
}
.pop:focus { outline: none; }
.pop-overlay.open .pop { transform: scale(1); opacity: 1; }
.pop-overlay.closing .pop { transform: scale(0.97); opacity: 0; }
.pop-sm { max-width: 460px; } .pop-md { max-width: 620px; } .pop-lg { max-width: 800px; } .pop-xl { max-width: 1040px; }
.pop-handle { display: none; }
.pop-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem 0.65rem 1.2rem; background: var(--surface-2); border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.pop-cell { display: none; padding: 0.28rem 0.55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 0.72rem; font-weight: 600; color: var(--muted); white-space: nowrap; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.pop-title { flex: 1 1 auto; font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.3; min-width: 0; margin: 0; }
.pop-close.keycap { flex: 0 0 auto; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; justify-content: center; box-shadow: none; }
@media (pointer: coarse) { .pop-close.keycap { width: 44px; height: 44px; min-height: 44px; } }
.pop-search { max-width: 520px; }
.pop-search .pop-body { padding: 1rem 1.2rem 1.1rem; }
.pop-body { padding: var(--pad); overflow-y: auto; overscroll-behavior: contain; }
.qv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
@media (max-width: 767.98px) {
  .pop-overlay { place-items: end center; padding: 0; }
  .pop { max-width: none !important; border-radius: 18px 18px 0 0; max-height: 88svh; transform: translateY(100%); opacity: 1; padding-bottom: var(--safe-b); border-bottom: 0; }
  .pop-overlay.open .pop { transform: translateY(0); }
  .pop-overlay.closing .pop { transform: translateY(100%); opacity: 1; }
  .pop-handle { display: grid; place-items: center; height: 20px; cursor: grab; touch-action: none; }
  .pop-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); }
  .pop-head { border-radius: 0; touch-action: none; }
  .pop-cell { max-width: 8rem; }
}
.success-cell { display: grid; place-items: center; text-align: center; gap: 0.3rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.success-cell.big { padding: 2rem 1rem; }
.success-key { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 0.5rem; border-radius: 12px; background: var(--ok); color: #fff; font: 700 1.6rem/1 var(--mono); box-shadow: 0 4px 0 color-mix(in srgb, var(--ok) 60%, #000); animation: key-pop 0.4s var(--ease); }
.ref-id { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.zoom-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 0.8rem; }
.zoom-wrap { overflow: auto; max-height: 64svh; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); padding: 16px; }
.zoom-inner { transform-origin: top left; transition: transform var(--t-ui) var(--ease); max-width: 760px; margin-inline: auto; }
.pop-lightbox .pop-body { padding: 12px; }
.lb-fig img { width: 100%; max-height: 64svh; object-fit: contain; border-radius: 8px; background: var(--surface-3); }
.lb-fig figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-2); }
.lb-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.8rem; }
.search-field { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.3rem 0.3rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 10px; }
.search-field .fx { border: 0; }
.search-field .input { border: 0; box-shadow: none; padding-inline: 0; }
.search-field .input { min-height: 42px; font-size: 0.95rem; }
.search-recent { margin-top: 0.7rem; }
.search-recent .text-sm { margin: 0; font-size: 0.85rem; }
.search-recent .mini-label, .search-results .mini-label { margin: 1rem 0 0.4rem; }
.result-list { display: grid; gap: 2px; }
.result-list a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem; min-height: 44px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.result-list a:hover, .result-list a:focus-visible { background: var(--accent-soft); outline-offset: -2px; }
.result-list a .muted { margin-inline-start: auto; font-size: 0.82rem; }
.kc-mini.kc-mini { flex: 0 0 auto; }
.cell-msg { padding: 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); }
.cell-msg .num { color: var(--bad); font-weight: 700; }
.stat-cells { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; background: var(--surface); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-cells-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 560px) { .stat-cells-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stat-cells-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-cell { position: relative; display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.stat-cell .cell-ref { align-self: flex-start; margin-bottom: 0.2rem; }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.stat-val { font-family: var(--font-head); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-val small { font-size: 0.5em; font-weight: 500; color: var(--muted); }
.stat-val.sm { font-size: 1.1rem; }
/* Typing-test result: size by the card's width, not the window */
#tt-result { container-type: inline-size; }
#tt-result .stat-cells-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tt-result .stat-cell { padding: 0.85rem 1rem; }
#tt-result .stat-cell:nth-child(2n) { border-inline-end: 0; }
#tt-result .stat-cell:nth-child(n+3) { border-bottom: 0; }
#tt-result .stat-val { font-size: clamp(1.5rem, 8cqi, 2.2rem); white-space: nowrap; }
@container (min-width: 520px) {
  #tt-result .stat-cells-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #tt-result .stat-cell:nth-child(2n) { border-inline-end: 1px solid var(--line); }
  #tt-result .stat-cell:last-child { border-inline-end: 0; }
  #tt-result .stat-cell { border-bottom: 0; }
  #tt-result .stat-val { font-size: clamp(1.5rem, 5cqi, 2.2rem); }
}
.sparkline { margin-top: 0.4rem; overflow: visible; }
.sparkline path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.js .stat-cell:not(.drawn) .sparkline path { stroke-dashoffset: 100; }
.stat-cell.drawn .sparkline path { transition: stroke-dashoffset 1.1s var(--ease); }
.sparkline circle { fill: var(--accent); }
.rec-cell { padding: 0.9rem 1rem; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.rec-cell strong { display: block; font-size: 1.05rem; margin: 0.2rem 0; }

/* ---------- 4.11 Notifications (toasts) ---------- */
.toast-stack { position: fixed; z-index: 140; inset-inline-end: 16px; bottom: calc(16px + 60px + var(--tray-h) + var(--tabbar-h) + var(--safe-b)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 0.7rem; padding: 0.8rem 0.8rem 0.95rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; pointer-events: auto; opacity: 0; transform: translateX(24px); transition: opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); font-size: 0.9rem; }
.toast.in { opacity: 1; transform: translateX(0); }
.toast.out { opacity: 0; transform: translateX(24px); }
.toast p { margin: 0; line-height: 1.45; }
.toast-key { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; font: 700 0.85rem/1 var(--mono); background: var(--accent-soft); color: var(--accent); box-shadow: 0 2px 0 var(--accent-soft-2); }
.toast-ok .toast-key { background: var(--ok-soft); color: var(--ok); box-shadow: 0 2px 0 color-mix(in srgb, var(--ok) 30%, transparent); }
.toast-warn .toast-key { background: var(--few-soft); color: var(--few); }
.toast-bad .toast-key { background: var(--bad-soft); color: var(--bad); }
.toast-x { width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 1.2rem; border-radius: 6px; }
.toast-x:hover { background: var(--surface-3); }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left; animation: toast-bar linear forwards; }
.toast-ok .toast-bar { background: var(--ok); }

/* ---------- 4.12 Compare tray, back to top ---------- */
.compare-tray { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(17, 24, 39, 0.4); transform: translateY(110%); transition: transform 260ms var(--ease); }
.compare-tray:not(.open) { visibility: hidden; transition: transform 260ms var(--ease), visibility 0s linear 260ms; }
.compare-tray.open { transform: translateY(0); visibility: visible; }
body.has-tray { --tray-h: 76px; }
.ct-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 72px; padding-block: 10px; }
.ct-list { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-items: center; }
@media (max-width: 639.98px) { body.has-tray { --tray-h: 128px; } .ct-list { order: 3; flex-basis: 100%; } }
.back-top { position: fixed; z-index: 65; inset-inline-end: 16px; bottom: calc(16px + var(--tray-h) + var(--tabbar-h) + var(--safe-b)); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease), bottom var(--t-ui) var(--ease); }
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.chart-tip { position: absolute; z-index: 150; padding: 0.35rem 0.6rem; border-radius: 6px; background: var(--ink); color: #fff; font: 500 0.78rem/1.3 var(--mono); transform: translate(-50%, -100%) translateY(4px); opacity: 0; pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast); white-space: nowrap; }
.chart-tip.show { opacity: 1; transform: translate(-50%, -100%); }

/* ---------- 4.13 Breadcrumb, page banner, CTA band ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-inline-start: 0.45rem; color: var(--brand); display: inline-block; font-weight: 700; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
/* Inner-page banner: navy with a soft photo layer */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 76px); background: var(--navy); color: #C9D3E6; }
.ph-bg { position: absolute; inset: 0; background: linear-gradient(110deg, rgba(12, 30, 60, 0.97) 35%, rgba(12, 30, 60, 0.82)), url("../images/lab-1.webp") center / cover no-repeat; }
.page-hero .h1, .page-hero .h2, .page-hero .h3, .page-hero strong { color: #fff; }
.page-hero .lead, .page-hero .lead-sm, .page-hero .muted { color: #C9D3E6; }
.page-hero .f-label { color: var(--brand); }
.page-hero .breadcrumb { margin-bottom: 1.6rem; }
.page-hero .breadcrumb ol, .page-hero .breadcrumb a { color: #AEBBD3; }
.page-hero .breadcrumb [aria-current] { color: var(--brand); }
.page-hero .verify-box, .page-hero .stat-cells { color: var(--ink-2); }
.page-hero .verify-box strong, .page-hero .stat-cells strong { color: var(--ink); }
.deco-ph1 { width: 110px; top: 18%; inset-inline-end: 5%; opacity: 0.9; }
.deco-ph2 { width: 220px; bottom: -70px; inset-inline-start: -60px; opacity: 0.45; }
.ph-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 1024px) { .ph-grid { grid-template-columns: 1.1fr 0.9fr; } .ph-compact .ph-grid { grid-template-columns: 1fr; } }
.ph-compact .ph-grid > div { max-width: 780px; }
.ph-media img { width: 100%; border-radius: 22px; border: 6px solid rgba(255, 255, 255, 0.1); aspect-ratio: 10 / 7; object-fit: cover; }
.ph-media figcaption { margin-top: 0.5rem; color: #AEBBD3; }
.cta-band { padding-block: var(--sec-pad); }
.cta-sheet { position: relative; border-radius: 26px; overflow: hidden; background: linear-gradient(110deg, rgba(12, 30, 60, 0.96) 40%, rgba(12, 30, 60, 0.8)), url("../images/lab-6.webp") center / cover no-repeat; color: #C9D3E6; box-shadow: var(--shadow-lg); }
.cta-sheet .h2 { color: #fff; }
.cta-sheet .f-label { color: var(--brand); }
.deco-cta { width: 120px; top: -20px; inset-inline-end: 22%; opacity: 0.9; }
.cta-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 5vw, 64px); }

/* ---------- 4.14 Footer ---------- */
.site-footer { position: relative; padding-block: 0 24px; margin-top: 110px; background: var(--navy); color: #AEBBD3; }
.news-band { position: relative; display: grid; gap: 18px; align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: 24px; background: var(--brand); color: var(--navy); margin-top: -70px; margin-bottom: 24px; box-shadow: var(--shadow-md); }
@media (min-width: 900px) { .news-band { grid-template-columns: 1fr 1fr; } }
.news-band .h3 { color: var(--navy); margin-top: 0.4rem; }
.news-band .f-label { color: var(--navy); }
.news-band .st-ico { background: var(--navy); color: var(--brand); }
.news-band .input { border-color: transparent; background: #fff; min-height: 54px; border-radius: 50px; padding-inline: 1.3rem; }
.news-band .field-error { color: #7A1010; }
.news-band .keycap { min-height: 54px; }
.deco-news { width: 110px; top: -42px; inset-inline-end: 34px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-block: 24px 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.3fr 0.9fr 1.1fr 1.2fr 1.1fr; } }
.fs-cell { min-width: 0; }
.site-footer .logo-word strong { color: #fff; }
.site-footer .logo-word span { color: #AEBBD3; }
.fs-h { position: relative; font: 700 1.2rem/1.2 var(--font-head); color: #fff; margin-bottom: 1.3rem; padding-bottom: 0.7rem; }
.fs-h::after { content: ''; position: absolute; inset-inline-start: 0; bottom: 0; width: 42px; height: 3px; border-radius: 3px; background: var(--brand); }
.fs-links { display: grid; gap: 0.1rem; }
.fs-links a, .fs-contact a { display: inline-flex; min-height: 34px; align-items: center; color: #C9D3E6; text-decoration: none; font-size: 0.92rem; transition: color var(--t-ui), padding var(--t-ui) var(--ease); }
.fs-links a:hover, .fs-contact a:hover { color: var(--brand); padding-inline-start: 6px; }
.fs-branches { display: grid; gap: 0.8rem; font-size: 0.9rem; }
.fs-branches li { display: flex; flex-direction: column; gap: 0.15rem; align-items: flex-start; }
.fs-branches strong { color: #fff; }
.fs-contact li { display: flex; align-items: center; gap: 0.6rem; }
.fs-contact svg { width: 18px; height: 18px; color: var(--brand); flex: 0 0 auto; }
.fs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fs-thumb { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--navy-2); }
.fs-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease), opacity var(--t-ui); }
.fs-thumb:hover img { transform: scale(1.1); opacity: 0.85; }
.social-row { display: flex; gap: 8px; margin-top: 1.2rem; }
.site-footer .icon-key { background: rgba(255, 255, 255, 0.08); border-color: transparent; color: #fff; }
.site-footer .icon-key:hover { background: var(--brand); color: var(--navy); }
.news-form { display: grid; gap: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; color: #AEBBD3; }
.fb-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; }
.fb-links a, .site-footer .link-btn { color: #C9D3E6; }
.fb-links a:hover { color: var(--brand); }
.fb-links li { display: flex; align-items: center; }
.site-footer .fb-links .link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 0; font-weight: 400; line-height: inherit; text-underline-offset: 3px; }
.site-footer .fb-links .link-btn:hover { color: var(--brand); }
.site-footer .fb-links .kbd { height: 1.5em; min-width: 1.5em; border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #C9D3E6; text-decoration: none; vertical-align: 0; }
.site-footer :focus-visible { outline-color: var(--brand); }
@media (min-width: 768px) { .footer-bottom { padding-inline-end: 64px; } }

/* =========================================================
   5. PAGE-SPECIFIC
   ========================================================= */
/* ---------- 5.1 Home: hero, features, about, stats banner, admission, partners ---------- */
.ed-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 110px) clamp(110px, 12vw, 170px); background: var(--navy); color: #C9D3E6; }
.ed-hero-bg { position: absolute; inset: 0; }
.ed-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.22; }
.ed-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(12, 30, 60, 0.98) 30%, rgba(12, 30, 60, 0.7)); }
.ed-hero .h1 { color: #fff; }
.ed-hero .lead { color: #C9D3E6; }
.ed-hero .f-label { color: var(--brand); }
.deco-h1 { width: 260px; top: 8%; inset-inline-start: -90px; opacity: 0.35; }
.deco-h2 { width: 120px; top: 12%; inset-inline-start: 46%; }
.deco-h3 { width: 200px; bottom: 90px; inset-inline-start: 6%; opacity: 0.8; }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero-h { margin-top: 1.1rem; }
.hero-copy .lead { margin-top: 1.2rem; }
.hl-cell { position: relative; display: inline-block; color: var(--brand); white-space: nowrap; }
.hl-cell::after { content: ''; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.28em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 14C50 2 150 2 198 12' fill='none' stroke='%23FFB400' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.trust-row { display: grid; gap: 0.6rem; margin-top: 1.8rem; font-size: 0.92rem; color: #E2E8F3; }
@media (min-width: 640px) { .trust-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1.6rem; } }
.trust-row li, .check-list li { display: flex; align-items: center; gap: 0.55rem; }
.trust-row svg, .check-list svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--brand); }
.check-list { display: grid; gap: 0.65rem; margin-top: 1.4rem; font-weight: 500; color: var(--ink); }
.check-list svg { color: var(--accent); }
.tt-card { padding: 0; overflow: hidden; border-radius: 22px; border: 0; box-shadow: var(--shadow-lg); }
.tt-card-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--line); }
.tt-card-head .h4 { flex: 1; font-size: 1.1rem; }
.tt-badge { font: 700 0.72rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); padding: 0.45rem 0.75rem; background: var(--brand); border-radius: 50px; }
.tt-card .tt-box { padding: 1.1rem 1.2rem; }
.tt-card .hero-kb { padding: 0 1.2rem 1.2rem; }
.mobile-note { display: none; padding: 0 1.2rem 1rem; color: var(--ink-2); }
/* Feature cards overlapping the hero */
.features-wrap { position: relative; z-index: 2; margin-top: clamp(-120px, -9vw, -70px); }
.feature-row { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .feature-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature-card { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 28px 24px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; transition: transform var(--t-ui) var(--ease), background-color var(--t-ui); }
.feature-card::before { content: ''; position: absolute; inset: auto 0 0; height: 4px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.feature-card:hover { transform: translateY(-6px); }
.feature-card:hover::before { transform: scaleX(1); }
.fc-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand-soft); color: var(--navy); transition: background-color var(--t-ui), transform 0.4s var(--ease); }
.fc-ico svg { width: 30px; height: 30px; }
.feature-card:hover .fc-ico { background: var(--brand); transform: rotateY(180deg); }
.feature-card .h4 { margin-top: 0.4rem; }
.fc-link { margin-top: auto; font-weight: 700; font-size: 0.9rem; color: var(--ink); text-decoration: none; }
.fc-link:hover { color: var(--accent); }
/* About intro collage */
.about-collage { position: relative; min-height: 420px; }
.ac-main { width: 78%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-md); }
.ac-sub { position: absolute; inset-inline-end: 0; bottom: 0; width: 52%; aspect-ratio: 1; object-fit: cover; border-radius: 24px; border: 8px solid var(--surface); box-shadow: var(--shadow-md); }
.ac-counter { position: absolute; top: 24px; inset-inline-end: 4%; display: grid; gap: 0.6rem; padding: 16px 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-md); }
.ac-counter p { display: flex; flex-direction: column; }
.ac-counter strong { font: 800 1.8rem/1 var(--font-head); color: var(--ink); }
.ac-counter span { font-size: 0.85rem; color: var(--muted); }
.avatar-row { display: flex; }
.avatar-row img { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); margin-inline-start: -10px; object-fit: cover; }
.avatar-row img:first-child { margin-inline-start: 0; }
.deco-a1 { width: 90px; bottom: 30px; inset-inline-start: -20px; z-index: 2; }
.mini-cards { display: grid; gap: 14px; margin-top: 1.4rem; }
@media (min-width: 560px) { .mini-cards { grid-template-columns: 1fr 1fr; } }
.mini-card { display: flex; align-items: center; gap: 0.85rem; padding: 16px; border-radius: 16px; background: var(--surface-2); }
.mini-card > div { display: flex; flex-direction: column; }
.mini-card strong { font: 700 1.05rem/1.2 var(--font-head); color: var(--ink); }
.mini-card .fc-ico { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 14px; background: var(--brand); }
.mini-card .fc-ico svg { width: 24px; height: 24px; }
@media (max-width: 639.98px) { .about-collage { min-height: 0; } .ac-main { width: 100%; } .ac-sub { display: none; } .ac-counter { position: static; margin-top: -40px; margin-inline: 16px; } }
/* Stats banner (dark, with counters) */
.stats-banner { position: relative; overflow: hidden; padding-block: var(--sec-pad) 40px; background: var(--navy); color: #C9D3E6; }
.sb-bg { position: absolute; inset: 0; }
.sb-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.18; }
.stats-banner .h2 { color: #fff; margin-top: 0.8rem; }
.stats-banner .f-label { color: var(--brand); }
.deco-s1 { width: 220px; top: 30px; inset-inline-end: 4%; opacity: 0.7; }
.sb-grid { position: relative; z-index: 1; display: grid; gap: 36px; align-items: center; }
.sb-bg, .deco-s1 { pointer-events: none; }
@media (max-width: 1023.98px) { .deco-s1 { display: none; } .sb-bg img { opacity: 0.1; } }
@media (min-width: 1024px) { .sb-grid { grid-template-columns: 0.9fr 1.1fr; } }
.stats-banner .stat-cells { background: transparent; border: 0; gap: 14px; }
.stats-banner .stat-cell { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px; background: #16284A; }
@media (max-width: 380px) { .stats-banner .stat-cell { padding: 0.85rem; } .stats-banner .sparkline { width: 100%; max-width: 120px; } }
.stats-banner .stat-val { color: var(--brand); }
.stats-banner .stat-label { color: #E2E8F3; }
.stats-banner .sparkline path { stroke: var(--brand); }
.stats-banner .sparkline circle { fill: var(--brand); }
.sb-note { position: relative; z-index: 1; margin-top: 28px; color: #8FA0BF; }
.stats-banner .stat-cells-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Planner: remove-row icon button */
.p-remove-cell { width: 1%; text-align: center; }
.row-remove { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background-color var(--t-ui), color var(--t-ui), border-color var(--t-ui); }
.row-remove:hover:not(:disabled) { background: var(--bad); border-color: var(--bad); color: #fff; }
.row-remove:disabled { opacity: 0.4; cursor: not-allowed; }
@media (pointer: coarse) { .row-remove { width: 44px; height: 44px; } }
/* Testimonials head */
.stories-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.stories-head .sec-head { margin-bottom: 0; }
.happy-box { display: flex; align-items: center; gap: 0.9rem; padding: 12px 18px; border-radius: 50px; background: var(--surface); box-shadow: var(--shadow-sm); }
.happy-box p { display: flex; flex-direction: column; line-height: 1.2; }
.happy-box strong { font: 800 1.2rem/1 var(--font-head); color: var(--ink); }
/* Admission form with flanking photos */
.adm-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 1100px) { .adm-grid { grid-template-columns: 0.75fr 1.5fr 0.75fr; } }
.adm-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-md); }
.adm-img-1 { transform: rotate(-3deg); }
.adm-img-2 { transform: rotate(3deg); }
@media (max-width: 1099.98px) { .adm-img { display: none; } }
.adm-form { padding: clamp(22px, 4vw, 40px); border-radius: 24px; box-shadow: var(--shadow-lg); border: 0; }
.adm-form .h2 { margin-top: 0.6rem; }
/* Software "logo" tiles */
.logo-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .logo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .logo-row { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.logo-tile { display: grid; place-items: center; min-height: 76px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font: 700 1rem/1.2 var(--font-head); color: var(--ink-2); text-align: center; transition: background-color var(--t-ui), color var(--t-ui), transform var(--t-ui) var(--ease); }
.logo-tile:hover { background: var(--navy); color: var(--brand); transform: translateY(-3px); }
/* Generic key tiles (about method etc.) */
.fee-toggle-center { display: flex; width: max-content; max-width: 100%; margin-inline: auto; }
.kt-ico { display: inline-grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: var(--navy); font: 800 1rem/1 var(--font-head); }
.tt-box { display: grid; gap: 0.75rem; }
.tt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.tt-stat { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.45rem 0.65rem; border-inline-end: 1px solid var(--line); min-width: 0; }
.tt-stat:last-child { border-inline-end: 0; }
.tt-stat .num { color: var(--ink); font-family: var(--font-head); font-weight: 700; }
.tt-stat .num { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.tt-stat .mini-label { font-size: 0.62rem; }
.tt-progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.tt-progress > span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.2s linear; }
.tt-area { position: relative; }
.tt-text {
  --lh: 1.9;
  height: calc(1.12rem * var(--lh) * 3 + 1.6rem);
  overflow: hidden; padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2);
  font: 500 1.12rem/var(--lh) var(--mono); color: var(--faint); cursor: text;
  white-space: pre-wrap; word-break: break-word; text-align: left;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.tt-full .tt-text { height: calc(1.2rem * var(--lh) * 4 + 1.6rem); font-size: 1.2rem; }
.tt-text.is-tamil { font-family: var(--tamil); }
.tt-box.is-focused .tt-text { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.tt-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; resize: none; border: 0; padding: 0; color: transparent; background: transparent; caret-color: transparent; font-size: 16px; z-index: 1; cursor: text; }
.ch { position: relative; border-radius: 2px; }
.ch.ok { color: var(--ink); }
.ch.bad { color: var(--bad); background: var(--bad-soft); text-decoration: underline wavy var(--bad); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.ch.sp.bad { box-shadow: inset 0 -3px 0 var(--bad); }
.ch.demo { color: var(--accent); }
.ch.cur::before { content: ''; position: absolute; left: -1px; top: 12%; bottom: 12%; width: 2px; border-radius: 1px; background: var(--accent); animation: caret-blink 1s steps(1) infinite; }
.tt-box.is-done .ch.cur::before, .tt-box.is-paused .ch.cur::before { animation: none; opacity: 0.4; }
.tt-box.is-paused .tt-text { opacity: 0.6; }
.tt-prompt { min-height: 1.4em; }
.tt-box.is-running .tt-prompt { visibility: hidden; }
.tt-buttons { justify-content: flex-start; }
.hero-tiles { display: grid; gap: 12px; margin-top: clamp(28px, 4vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 560px) { .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hero-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.key-tile { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-sm); }
.key-tile > div { display: flex; flex-direction: column; min-width: 0; }
.key-tile strong { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.key-tile .keycap-sq { flex: 0 0 auto; width: 48px; height: 48px; font: 700 0.85rem/1 var(--mono); color: var(--accent); }
@media (max-width: 767.98px) {
  .hero-kb .okb-row:not(:nth-child(3)) { display: none; }
  .hero-kb .okb { --kh: 40px; }
  .mobile-note { display: block; }
  .test-kb { display: none; }
  .tt-stat .num { font-size: 1.05rem; }
  .tt-text { font-size: 1rem; height: calc(1rem * var(--lh) * 3 + 1.6rem); }
  .tt-full .tt-text { font-size: 1.02rem; height: calc(1.02rem * var(--lh) * 4 + 1.6rem); }
}
@media (min-width: 768px) { .test-main .mobile-note { display: none; } }

/* ---------- 5.2 Finder, path keys, gallery, certificates ---------- */
.finder-grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (min-width: 1024px) { .finder-grid { grid-template-columns: 1.05fr 0.95fr; } .finder-out { position: sticky; top: calc(var(--header-h) + 24px); } }
.finder { display: grid; gap: 1.2rem; }
.finder legend { font-weight: 600; margin-bottom: 0.6rem; font-size: 0.95rem; }
.path-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 0.6rem; }
.path-keys .keycap-tall { min-width: 150px; background: var(--surface-2); border-color: transparent; }
.path-arrow { color: var(--muted); font: 600 1.1rem/1 var(--mono); }
.path-row { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .path-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .path-row { grid-template-columns: repeat(7, minmax(0, 1fr)); } .path-row::before { content: ''; position: absolute; top: 36px; inset-inline: 6%; border-top: 2px dashed var(--line-strong); } }
.path-step { position: relative; }
.path-step .keycap { width: 100%; min-width: 0; min-height: 150px; align-items: center; text-align: center; padding: 1rem 0.8rem; border-radius: 18px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); transition: background-color 0.35s var(--ease), color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s; }
.path-step .keycap-tall .kc-hint { width: 46px; height: 46px; font-size: 1rem; background: var(--surface-2); color: var(--navy); box-shadow: 0 0 0 6px var(--surface); transition: background-color 0.35s var(--ease); }
.path-step .kc-sub { margin-top: 0.15rem; }
.path-row.is-lit .path-step .keycap { transition-delay: calc(var(--i) * 140ms); background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.path-row.is-lit .path-step .kc-hint { background: var(--brand); transition-delay: calc(var(--i) * 140ms); }
.path-row.is-lit .path-step .kc-sub { color: #C9D3E6; transition: color 0.3s calc(var(--i) * 140ms); }
.deco-p1 { width: 150px; top: 40px; inset-inline-end: 5%; }
.path-row { view-timeline-name: --path; view-timeline-axis: block; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gal-big { grid-column: span 2; grid-row: span 2; } }
.gal-item { position: relative; display: block; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--surface-3); cursor: zoom-in; aspect-ratio: 4 / 3; }
.gal-big { aspect-ratio: auto; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gal-item:hover img { transform: scale(1.04); }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 0.75rem 0.55rem; background: linear-gradient(transparent, rgba(17, 24, 39, 0.75)); color: #fff; font-size: 0.8rem; text-align: start; opacity: 0; transform: translateY(6px); transition: opacity var(--t-ui), transform var(--t-ui) var(--ease); }
.gal-item:hover .gal-cap, .gal-item:focus-visible .gal-cap { opacity: 1; transform: translateY(0); }
@media (hover: none) { .gal-cap { opacity: 1; transform: none; } }
.cert-card { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: inherit; transition: transform var(--t-ui) var(--ease); }
.cert-card:hover { transform: translateY(-3px) rotate(-0.4deg); }
.cert-zoom { position: absolute; top: 12px; inset-inline-end: 12px; padding: 0.4rem 0.75rem; border-radius: 50px; background: var(--brand); color: var(--navy); font: 700 0.75rem/1 var(--font); }
.cert-doc { --paper: #FFFEFA; --paper-ink: #111827; --paper-line: #E5E0D3; container-type: inline-size; position: relative; aspect-ratio: 1.414 / 1; padding: 3cqi; background: var(--paper); color: var(--paper-ink); border-radius: 10px; box-shadow: var(--shadow-md); border: 1px solid var(--paper-line); overflow: hidden; }
.cert-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 3.4cqi 4cqi; border: 0.5cqi double #1D4ED8; border-radius: 6px; background-image: repeating-linear-gradient(45deg, rgba(29, 78, 216, 0.025) 0 2px, transparent 2px 10px); }
.cert-top { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.cert-top .logo { pointer-events: none; color: var(--paper-ink); }
.cert-top .logo-key { width: 6cqi; height: 6cqi; } .cert-top .logo-key-top { font-size: 3cqi; } .cert-top .logo-word strong { font-size: 2.7cqi; } .cert-top .logo-word span { font-size: 1.4cqi; color: #5B6472; }
.cert-no { font-size: 1.8cqi; color: #374151; border: 1px solid var(--paper-line); padding: 0.4cqi 1cqi; border-radius: 4px; }
.cert-kicker { font: 600 2cqi/1 var(--mono); text-transform: uppercase; letter-spacing: 0.3em; color: #1D4ED8; }
.cert-small { font-size: 1.9cqi; color: #5B6472; }
.cert-name { font-size: 5.4cqi; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; border-bottom: 1px solid var(--paper-line); padding: 0 4cqi 0.6cqi; }
.cert-course { font-size: 2.9cqi; font-weight: 600; }
.cert-cells { display: flex; border: 1px solid var(--paper-line); border-radius: 6px; overflow: hidden; }
.cert-cells div { display: flex; flex-direction: column; padding: 0.8cqi 2.2cqi; border-inline-end: 1px solid var(--paper-line); }
.cert-cells div:last-child { border-inline-end: 0; }
.cert-cells span { font-size: 1.4cqi; color: #5B6472; text-transform: uppercase; letter-spacing: 0.1em; }
.cert-cells strong { font-size: 2.3cqi; }
.cert-sign { width: 100%; display: flex; align-items: flex-end; justify-content: space-between; font-size: 1.6cqi; color: #5B6472; }
.cert-sign > span:not(.cert-seal) { border-top: 1px solid #9CA3AF; padding-top: 0.6cqi; min-width: 20cqi; }
.cert-seal { display: grid; place-items: center; width: 8cqi; height: 8cqi; border-radius: 1.2cqi; background: #1D4ED8; color: #fff; font: 700 3.6cqi/1 var(--mono); box-shadow: 0 0.6cqi 0 #1E3A8A; }
.cert-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font: 700 14cqi/1 var(--mono); color: rgba(185, 28, 28, 0.1); letter-spacing: 0.1em; pointer-events: none; }
.verify-box { display: grid; gap: 0.6rem; margin-top: 1.5rem; padding: var(--pad); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.verify-ok, .verify-bad { margin-top: 0.4rem; animation: rise-in 0.3s var(--ease); }
.verify-bad .formula-bar { border-color: var(--bad); background: var(--bad-soft); }
.verify-ok .formula-bar { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.cert-card-lg { max-width: 640px; justify-self: center; }
.cert-mini .cert-thumb { pointer-events: none; margin-bottom: 0.6rem; }

/* ---------- 5.3 Carousel ---------- */
.carousel { position: relative; }
.car-controls { display: flex; justify-content: flex-end; gap: 8px; margin: 18px 0 14px; }
@media (max-width: 639.98px) { .car-controls { margin-top: 0; } }
.car-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding: 4px 2px 18px; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline-offset: 2px; }

/* ---------- 5.4 Courses page ---------- */
.courses-layout { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 1024px) { .courses-layout { grid-template-columns: 270px minmax(0, 1fr); } }
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--pad); }
@media (min-width: 1024px) { .filter-panel { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100svh - var(--header-h) - 32px); overflow-y: auto; } .fp-head .keycap, .filters-btn { display: none; } .filter-overlay { display: none !important; } }
@media (max-width: 1023.98px) {
  .filter-panel { position: fixed; z-index: 90; top: 0; bottom: 0; inset-inline-start: 0; width: min(88vw, 360px); border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: transform 260ms var(--ease); box-shadow: var(--shadow-lg); padding-bottom: calc(var(--pad) + var(--safe-b)); }
  .filter-panel.open { transform: translateX(0); }
}
.fp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.filter-group { padding-block: 0.9rem; border-top: 1px solid var(--line); display: grid; gap: 0.15rem; }
.filter-group legend { font: 600 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; padding-top: 0.9rem; float: left; width: 100%; }
.check-key { display: flex; align-items: center; gap: 0.6rem; min-height: 38px; font-size: 0.92rem; cursor: pointer; }
.check-key input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 0.8rem; }
.toolbar-search { flex: 1 1 220px; }
.view-toggle { display: flex; gap: 6px; }
.active-chips { margin-bottom: 1rem; min-height: 36px; align-items: center; }
.empty-cell { grid-column: 1 / -1; display: grid; justify-items: center; gap: 0.6rem; padding: clamp(32px, 6vw, 64px) 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-card); background: var(--surface); }
.empty-cell.sm { padding: 2rem 1rem; }
.empty-sheet { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--brand-soft); color: var(--navy); font: 800 2rem/1 var(--font-head); }
.empty-sheet .num { color: var(--navy); }

/* ---------- 5.5 Course details ---------- */
.cd-wrap { padding-block: clamp(20px, 3vw, 40px) var(--sec-pad); }
.cd-hero { position: relative; overflow: hidden; display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 1.4rem; padding: clamp(24px, 4vw, 52px); border-radius: 26px; background: linear-gradient(110deg, rgba(12, 30, 60, 0.98) 40%, rgba(12, 30, 60, 0.85)), url("../images/lab-2.webp") center / cover no-repeat; color: #C9D3E6; }
.cd-hero .h1 { color: #fff; }
.cd-hero .lead, .cd-hero .muted { color: #C9D3E6; }
.cd-hero .track-key { color: var(--brand); }
.cd-hero .cd-facts { color: var(--ink-2); }
.cd-hero > div > p strong { color: #fff; }
.cd-hero .keycap-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.cd-hero .keycap-ghost:hover { background: #fff; color: var(--navy); }
@media (min-width: 1024px) { .cd-hero { grid-template-columns: 1.2fr 0.8fr; } }
.cd-hero-media img { width: 100%; border-radius: 20px; border: 6px solid rgba(255,255,255,0.1); aspect-ratio: 16 / 10; object-fit: cover; }
.cd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.4rem; border: 0; border-radius: 16px; overflow: hidden; background: var(--surface); }
@media (min-width: 640px) { .cd-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-facts > div { padding: 0.6rem 0.75rem; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cd-facts dt { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.cd-facts dd { font-weight: 600; margin-top: 0.15rem; font-size: 0.95rem; }
.cd-layout { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (min-width: 1100px) { .cd-layout { grid-template-columns: minmax(0, 1fr) 300px; } .sticky-aside { position: sticky; top: calc(var(--header-h) + 36px); } }
.cd-sec { padding-top: clamp(36px, 5vw, 60px); }
.cd-sec .h2 { margin: 0.7rem 0 1.3rem; }
.ba-wide { display: grid; gap: 12px; align-items: center; }
@media (min-width: 640px) { .ba-wide { grid-template-columns: 1fr auto 1fr; } }
.ba-arrow { font: 600 1.5rem/1 var(--mono); color: var(--accent); justify-self: center; }
.fee-toggle { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.fee-display { margin: 1rem 0; }
.rolling { animation: roll 0.28s var(--ease); display: inline-block; }
.reviews-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: 240px 1fr; } }
.rating-box { padding: var(--pad); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.rating-bars { display: grid; gap: 0.35rem; margin-top: 0.8rem; font-size: 0.8rem; }
.rating-bars li { display: grid; grid-template-columns: 2rem 1fr 2.6rem; gap: 0.5rem; align-items: center; }
.rating-bars .bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: var(--few); transform-origin: left; }
.review-list { display: grid; gap: 10px; }
.review { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.review-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 0.3rem; }
.ref-error { display: grid; gap: 1rem; justify-items: start; max-width: 640px; padding-block: var(--sec-pad); }
.ref-cell { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.4rem; background: var(--brand-soft); color: var(--navy); font-weight: 700; font-size: 1.1rem; border-radius: 50px; }
.ref-cell .num { font: 800 1.6rem/1 var(--font-head); }

/* ---------- 5.6 Batch timings + timetable ---------- */
.batch-filters { display: grid; gap: 10px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
@media (min-width: 768px) { .batch-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .batch-filters { grid-template-columns: repeat(7, minmax(0, 1fr)) auto; } }
.batch-filters .field label { font-size: 0.78rem; color: var(--muted); }
.bf-reset { justify-self: start; }
.view-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 1.2rem 0 1rem; }
.view-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.timetable-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-sm); background: var(--surface); }
.timetable { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.timetable.dense { min-width: 640px; }
.timetable th, .timetable td { border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.45rem; vertical-align: top; }
.timetable thead th { position: sticky; top: 0; background: var(--navy); color: #fff; font: 700 0.8rem/1 var(--font); padding: 0.6rem; text-align: center; }
.timetable tbody th { position: sticky; inset-inline-start: 0; z-index: 1; width: 104px; background: var(--surface-2); font-size: 0.82rem; text-align: start; }
.timetable .tt-corner { width: 104px; text-align: start; }
.timetable tr > :last-child { border-inline-end: 0; }
.timetable tbody tr:last-child > * { border-bottom: 0; }
.tt-block { position: relative; display: block; width: 100%; margin-bottom: 4px; padding: 0.35rem 0.45rem; border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--line)); border-inline-start: 3px solid var(--tc); border-radius: 6px; background: color-mix(in srgb, var(--tc) 8%, var(--surface)); color: var(--ink); font-size: 0.72rem; line-height: 1.3; text-align: start; transition: transform var(--t-press) var(--ease), box-shadow var(--t-fast); box-shadow: 0 2px 0 color-mix(in srgb, var(--tc) 22%, transparent); }
.tt-block:hover { box-shadow: 0 2px 0 var(--tc); }
.tt-block:active { transform: translateY(2px); box-shadow: none; }
.tt-kc { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 4px; background: var(--tc); color: #fff; font: 700 0.62rem/1 var(--mono); }
.tt-empty { display: block; text-align: center; color: var(--line-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: var(--ink-2); align-items: center; }
.tt-block-legend { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ---------- 5.7 Typing test page ---------- */
.test-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; }
.opt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.opt-group .mini-label { width: 100%; }
.opt-lang { min-width: 200px; }
.test-grid { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 1100px) { .test-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.test-main .tt-box { padding: var(--pad); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-sm); }
.tamil-text { font-size: 1.15rem; line-height: 2; }

/* ---------- 5.8 Contact ---------- */
.contact-cells { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; background: var(--surface); }
@media (min-width: 640px) { .contact-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .contact-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.c-cell { position: relative; display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; padding: 1.1rem 1.1rem 1.2rem; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.c-cell > svg { width: 22px; height: 22px; color: var(--accent); }
.c-cell > .cell-ref { position: absolute; top: 0.6rem; inset-inline-end: 0.6rem; }
.c-cell a { font-weight: 600; }
.demo-grid { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 1024px) { .demo-grid { grid-template-columns: minmax(0, 1fr) 320px; } .summary-cell { position: sticky; top: calc(var(--header-h) + 20px); } }
.demo-form .form-step { display: grid; gap: 1rem; }
.sum-sheet { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 0.6rem; }
.sum-row { display: grid; grid-template-columns: auto 5.5rem 1fr; gap: 0.5rem; align-items: center; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); font-size: 0.86rem; transition: background-color 0.3s; }
.sum-row:last-child { border-bottom: 0; }
.sum-row .sum-k { color: var(--muted); }
.sum-row .sum-v { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sum-row.empty .sum-v { color: var(--faint); font-weight: 400; }
.sum-row:not(.empty) .cell-ref { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.enquiry-form { max-width: 760px; }
.map-box { display: grid; gap: var(--gap); }
@media (min-width: 1024px) { .map-box { grid-template-columns: 1.4fr 1fr; } }
.map-svg { width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); }
.map-grid { stroke: var(--line); stroke-width: 0.25; }
.map-road { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-linecap: round; }
.map-sea { fill: none; stroke: color-mix(in srgb, var(--accent) 30%, transparent); stroke-width: 6; }
.map-pin circle { fill: var(--accent); stroke: var(--surface); stroke-width: 1; }
.map-pin text { font: 600 3px/1 var(--font); fill: var(--ink); }
.map-list { display: grid; gap: 10px; }
.map-view { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.map-tab { min-height: 40px; padding: 0.4rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 0.88rem/1 var(--font); cursor: pointer; transition: background-color var(--t-ui), color var(--t-ui), border-color var(--t-ui); }
.map-tab:hover { border-color: var(--accent); color: var(--accent); }
.map-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.map-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 10; min-height: 300px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 639.98px) { .map-frame { aspect-ratio: 4 / 3; min-height: 260px; } }
html.dark .map-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }

/* ---------- 5.9 Login / register ---------- */
.auth-main { padding-block: clamp(24px, 5vw, 64px); }
/* Login / register: minimal header (logo + theme + RTL), no footer */
.auth-page { min-height: 100svh; display: flex; flex-direction: column; }
.auth-page .auth-main { flex: 1 0 auto; display: flex; align-items: center; padding-block: clamp(16px, 4vw, 48px) clamp(24px, 5vw, 56px); }
.auth-page .auth-main > * { width: 100%; }
.auth-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: var(--surface); }
.auth-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.auth-header-tools { display: flex; align-items: center; gap: 8px; }
.auth-grid { display: grid; gap: var(--gap); align-items: stretch; }
@media (min-width: 1024px) { .auth-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.auth-card { padding: clamp(20px, 3vw, 36px); }
.auth-card .h2 { margin: 0.5rem 0 1rem; }
.demo-acc { display: grid; gap: 0.35rem; justify-items: start; padding: 0.9rem 1.1rem; margin-bottom: 1.2rem; border: 1px dashed var(--brand); border-radius: 14px; background: var(--brand-soft); font-size: 0.9rem; }
.auth-side { border-radius: 24px; background: linear-gradient(140deg, rgba(12, 30, 60, 0.97) 40%, rgba(12, 30, 60, 0.85)), url("../images/lab-2.webp") center / cover no-repeat; color: #C9D3E6; display: flex; align-items: center; }
.auth-side .f-label { color: var(--brand); }
.auth-side .tip-text { color: #fff; }
.auth-side .muted { color: #AEBBD3; }
.auth-side-inner { display: grid; gap: 1rem; padding: clamp(20px, 3vw, 36px); width: 100%; }
.tip-text { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem); font-weight: 500; line-height: 1.4; }

/* ---------- 5.10 Student dashboard ---------- */
.dash-body { background: var(--bg); }
.dash-shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.dash-side { background: var(--navy); color: #C9D3E6; border-inline-end: 1px solid var(--navy); display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; }
.ds-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dash-side .logo-word strong { color: #fff; }
.dash-side .logo-word span { color: #AEBBD3; }
.dash-side .icon-key { background: rgba(255,255,255,0.08); border-color: transparent; color: #fff; }
.rail-toggle { display: none; }
.ds-nav { display: grid; gap: 4px; }
.ds-link { position: relative; display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: 46px; padding: 0.3rem 0.5rem; border: 0; border-radius: 12px; background: none; color: #C9D3E6; font-size: 0.92rem; font-weight: 500; text-decoration: none; text-align: start; }
.ds-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.ds-link.is-active { background: var(--brand); color: var(--navy); font-weight: 700; }
.ds-link.is-active .ds-key { background: var(--navy); color: var(--brand); border-color: var(--navy); }
.ds-key { width: 34px !important; min-width: 34px !important; height: 34px !important; min-height: 34px; padding: 0 !important; border-radius: 10px !important; background: rgba(255,255,255,0.08); border-color: transparent; color: var(--brand); font: 700 0.8rem/1 var(--font-head); }
.ds-num { display: inline-flex !important; min-width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,255,255,0.08); font: 600 0.7rem/1 var(--font); border: 0; }
.ds-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-num { opacity: 0.55; }
.ds-back { margin-top: auto; display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.6rem; color: #AEBBD3; font-size: 0.86rem; text-decoration: none; }
.dash-main-wrap { min-width: 0; display: flex; flex-direction: column; }
.dash-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px var(--gutter); background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.dt-greet { flex: 1; min-width: 0; }
.dt-greet .h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-actions { display: flex; align-items: center; gap: 8px; }
.bell-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar-link { display: inline-flex; border-radius: 50%; }
.avatar-link .avatar { width: 40px; height: 40px; }
.dash-main { flex: 1; padding: clamp(18px, 3vw, 36px) var(--gutter) calc(48px + var(--tabbar-h)); width: 100%; max-width: 1240px; }
.dash-main:focus { outline: none; }
.dash-head { margin-bottom: 1.4rem; }
.dash-head .h2 { margin-top: 0.5rem; }
.dash-head .h2:focus { outline: none; }
.dash-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dcard-wide { grid-column: span 2; } .dcard-tall { grid-row: span 2; } }
@media (min-width: 768px) and (max-width: 1199.98px) { .dcard-wide { grid-column: 1 / -1; } }
.progress-line { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(var(--p)); animation: fill-in 0.9s var(--ease) both; }
.countdown-cell { padding: 0.9rem 1rem; border-radius: 14px; background: var(--navy); color: #C9D3E6; }
.countdown-cell .mini-label { color: var(--brand); }
.countdown-cell .num { font: 800 1.5rem/1.2 var(--font-head); color: #fff; }
.countdown-cell .muted { color: #AEBBD3; }
.speed-cells { display: flex; align-items: center; gap: 6px; margin-top: 0.6rem; }
.speed-cells > div { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.speed-cells > div.is-now { border-color: var(--brand); background: var(--brand-soft); }
.speed-cells strong { font-size: 1.4rem; }
.speed-cells .cell-ref { align-self: flex-start; }
.alert-cell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); border-inline-start: 4px solid var(--few); }
.alert-bad { border-inline-start-color: var(--bad); background: var(--bad-soft); }
.alert-few { background: var(--few-soft); }
.alert-ok { border-inline-start-color: var(--ok); background: var(--ok-soft); }
.bar-chart, .line-chart { width: 100%; height: auto; overflow: visible; margin-block: 0.5rem; }
.bar-chart .grid, .line-chart .grid { stroke: var(--line); stroke-width: 1; }
.bar-chart .axis, .line-chart .axis { fill: var(--muted); font: 500 9px var(--mono); }
.bar-chart rect { fill: var(--brand); transform-box: fill-box; transform-origin: bottom; animation: bar-grow 0.6s var(--ease) both; animation-delay: var(--d); }
.bar-chart .bar:hover rect, .bar-chart .bar:focus rect { fill: var(--accent-edge); }
.bar-chart .bar:focus { outline: none; }
.bar-chart .bar:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.line-chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; animation: draw 1s var(--ease) both; }
.line-chart .pt circle { fill: var(--surface); stroke: var(--navy); stroke-width: 2.5; transition: r 0.15s; }
.line-chart .pt:hover circle, .line-chart .pt:focus circle { fill: var(--accent); }
.line-chart .pt:focus { outline: none; }
.chart-box { overflow-x: auto; }
.step-keys .step-key .keycap { white-space: nowrap; }
.enroll-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 1rem; }
.enroll-tools .input { max-width: 300px; }
.enroll-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; background: var(--surface); }
.en-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.en-row:last-child { border-bottom: 0; }
.en-row .h4 { margin-top: 0.3rem; }
.plan-pick { display: grid; gap: 12px; }
@media (min-width: 640px) { .plan-pick { grid-template-columns: 1fr 1fr; } }
.plan-opt { position: relative; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.plan-opt .cell-box { height: 100%; box-shadow: 0 3px 0 var(--key-edge); transition: transform var(--t-press) var(--ease), box-shadow var(--t-press), border-color var(--t-fast); }
.plan-opt input:checked + .cell-box { border-color: var(--accent); background: var(--accent-soft); transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-edge), inset 0 0 0 1px var(--accent); }
.plan-opt input:focus-visible + .cell-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.pay-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0; }
.sheet-pick input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); }
.review-sheet .kv-sheet { margin-top: 0; }
.cal { border: 1px solid var(--line); border-radius: var(--r-sheet); background: var(--surface); padding: var(--pad); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font: 600 0.7rem/1 var(--mono); color: var(--muted); text-align: center; padding: 0.4rem 0; }
.cal-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 0.35rem 0.45rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 0.72rem; text-align: start; transition: transform var(--t-press) var(--ease), box-shadow var(--t-fast); }
.cal-day:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day:active { transform: translateY(2px); }
.cal-num { font-weight: 600; font-size: 0.82rem; }
.cal-ico { font: 700 0.85rem/1 var(--mono); }
.cal-txt { font-size: 0.66rem; }
.cal-day.is-present { background: var(--ok-soft); color: var(--ok); }
.cal-day.is-absent { background: var(--bad-soft); color: var(--bad); }
.cal-day.is-holiday { background: var(--closed-soft); color: var(--closed); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day .cal-num { color: var(--ink); }
@media (max-width: 559.98px) { .cal-txt { display: none; } .cal-day { min-height: 48px; align-items: center; } }
.req-list, .date-list { display: grid; gap: 0.5rem; font-size: 0.88rem; }
.req-list li, .date-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.module-list { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.mod { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: 'ico name status' 'ico bar pct'; gap: 0.25rem 0.5rem; align-items: center; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; }
.mod-ico { grid-area: ico; font-size: 0.9rem; }
.mod-name { grid-area: name; font-size: 0.9rem; min-width: 0; }
.mod .status { grid-area: status; }
.mod .mod-bar { grid-area: bar; }
.mod > .num { grid-area: pct; justify-self: end; }
.mod-locked { opacity: 0.7; }
.mod-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mod-bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: fill-in 0.8s var(--ease) both; }
.req-bars { display: grid; gap: 0.6rem; margin-top: 0.8rem; }
.req-bars li { display: grid; grid-template-columns: 8rem 1fr auto; grid-template-areas: 'label bar status' 'label txt status'; gap: 0.2rem 0.6rem; align-items: center; font-size: 0.85rem; }
.req-bars li > span:first-child { grid-area: label; }
.req-bars .mod-bar { grid-area: bar; }
.req-bars li > .num, .req-bars li > .text-sm { grid-area: txt; }
.req-bars .status { grid-area: status; }
.heat-wrap { max-width: 760px; margin-top: 0.8rem; }
.remark-list { display: grid; gap: 10px; }
.note-list { display: grid; gap: 8px; }
.note { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.note-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.note.is-unread { border-inline-start: 4px solid var(--accent); }
.note.is-unread .note-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.profile-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .profile-grid { grid-template-columns: 240px 1fr; } }
.profile-photo { align-items: center; text-align: center; }
.avatar-lg { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; background: var(--navy); color: var(--brand); font: 800 2.4rem/1 var(--font-head); overflow: hidden; box-shadow: 0 0 0 6px var(--brand-soft); }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.pop-in { animation: key-pop 0.35s var(--ease); }
.practice-opts { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin-bottom: 1rem; }
.dash-sec .tt-box { padding: var(--pad); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.receipt-doc { --paper: #FFFFFF; background: var(--paper); color: #111827; border: 1px solid #E3E6EA; border-radius: 10px; padding: clamp(16px, 3vw, 28px); font-size: 0.9rem; }
.rc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid #111827; }
.rc-head .logo { color: #111827; pointer-events: none; }
.rc-inst { font-size: 0.78rem; color: #374151; text-align: end; }
.rc-title { margin: 14px 0 10px; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #E3E6EA; border-radius: 6px; overflow: hidden; }
@media (min-width: 560px) { .rc-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-meta div { display: flex; flex-direction: column; padding: 0.5rem 0.65rem; border-inline-end: 1px solid #E3E6EA; border-bottom: 1px solid #E3E6EA; min-width: 0; }
.rc-meta span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #5B6472; }
.rc-meta strong { overflow-wrap: anywhere; }
.rc-items { width: 100%; margin-top: 14px; border-collapse: collapse; }
.rc-items th, .rc-items td { padding: 0.5rem; border-bottom: 1px solid #E3E6EA; text-align: start; }
.rc-items th { background: #F4F5F7; font-size: 0.75rem; }
.rc-items .is-num { text-align: end; }
.rc-items tfoot td { border-bottom: 0; border-top: 2px solid #111827; }
.rc-words { margin-top: 10px; font-size: 0.85rem; }
.rc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: #5B6472; }
.paid-stamp { display: inline-block; padding: 0.3rem 1rem; border: 3px solid #15803D; border-radius: 6px; color: #15803D; font: 700 1.2rem/1 var(--mono); letter-spacing: 0.2em; transform: rotate(-8deg); }
.dash-tabbar { display: none; }
.cert-mini h3 { margin-top: 0.4rem; }
/* Dashboard responsive: >=1200 full sidebar, 768–1199 icon rail, <768 off-canvas + bottom tab bar */
@media (min-width: 1200px) { .dash-shell { grid-template-columns: 260px minmax(0, 1fr); } .dash-side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; } .dash-menu { display: none; } }
@media (min-width: 768px) and (max-width: 1199.98px) {
  .dash-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .dash-side { position: sticky; top: 0; height: 100dvh; overflow: visible; padding-inline: 10px; z-index: 50; transition: width 220ms var(--ease); width: 76px; }
  .rail-toggle { display: inline-flex; }
  .dash-side .logo-word, .dash-side .ds-label, .dash-side .ds-num { display: none; }
  .ds-head { flex-direction: column; }
  .ds-link { justify-content: center; padding: 0.3rem; }
  .ds-link[data-tip-label]:hover::after, .ds-link[data-tip-label]:focus-visible::after { content: attr(data-tip-label); position: absolute; inset-inline-start: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 0.35rem 0.6rem; border-radius: 6px; background: var(--ink); color: #fff; font-size: 0.78rem; white-space: nowrap; z-index: 60; pointer-events: none; }
  .rail-expanded .dash-side { width: 250px; box-shadow: var(--shadow-lg); }
  .rail-expanded .dash-side .logo-word, .rail-expanded .dash-side .ds-label, .rail-expanded .dash-side .ds-num { display: inline-flex; }
  .rail-expanded .ds-head { flex-direction: row; }
  .rail-expanded .ds-link { justify-content: flex-start; padding: 0.3rem 0.5rem; }
  .rail-expanded .ds-link::after { content: none !important; }
  .rail-expanded .rail-toggle .dir-arrow { transform: scaleX(-1); }
  .dash-menu { display: none; }
}
@media (max-width: 767.98px) {
  .dash-body { --tabbar-h: 64px; }
  .dash-side { position: fixed; z-index: 90; top: 0; bottom: 0; inset-inline-start: 0; width: min(84vw, 300px); overflow-y: auto; transform: translateX(-100%); transition: transform 260ms var(--ease); box-shadow: var(--shadow-lg); padding-bottom: calc(14px + var(--safe-b)); }
  .dash-side.open { transform: translateX(0); }
  .dash-top .icon-key-text, .dash-top [data-search-open] { display: none; }
  .dash-tabbar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(64px + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(17, 24, 39, 0.35); }
  .dash-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 0.7rem; text-decoration: none; min-height: 44px; }
  .tb-key { display: grid; place-items: center; width: 30px; height: 26px; border: 1px solid var(--key-border); border-radius: 7px; background: var(--key-top); box-shadow: 0 2px 0 var(--key-edge); font: 700 0.72rem/1 var(--mono); color: var(--ink-2); transition: transform var(--t-press); }
  .dash-tabbar a.is-active { color: var(--accent); font-weight: 600; }
  .dash-tabbar a.is-active .tb-key { background: var(--brand); color: var(--navy); border-color: var(--brand); }
  .heat-wrap .okb { --kh: 26px; }
  .note { grid-template-columns: auto 1fr; }
  .note .keycap { grid-column: 2; justify-self: start; }
}

/* ---------- 5.11 Home 2 — Workbook ---------- */
.workbook { background: var(--surface-2); }
.wb-tabs { position: sticky; top: var(--header-h); z-index: 50; background: var(--surface-3); border-bottom: 1px solid var(--line-strong); }
.wb-tabs-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; }
.wb-tabs-inner::-webkit-scrollbar { display: none; }
.wb-tab { display: inline-flex; align-items: center; gap: 0.45rem; flex: 0 0 auto; min-height: 42px; padding: 0.4rem 1rem; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--ink-2); font-size: 0.88rem; font-weight: 500; text-decoration: none; position: relative; top: 1px; transition: background-color var(--t-fast), color var(--t-fast); }
.wb-tab .num { font-size: 0.7rem; color: var(--muted); }
.wb-tab:hover { background: var(--surface); color: var(--ink); }
.wb-tab.is-active { background: var(--surface); border-color: var(--line-strong); color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--brand); }
.wb-add { display: inline-grid; place-items: center; width: 42px; color: var(--muted); font-weight: 600; }
.wb-sec { padding-block: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 60px); }
.wb-title { margin-bottom: 1.4rem; max-width: 720px; }
.wb-title .h1, .wb-title .h2 { margin: 0.5rem 0 0.5rem; }
.wb-hero { padding-top: clamp(32px, 5vw, 64px); }
.planner .sheet-scroll { overflow-x: auto; }
.planner-table { min-width: 680px; }
@media (max-width: 767.98px) {
  .planner-table { min-width: 0; }
  /* Each course row = a card: dropdowns full width, figures in a 3-up strip, remove top-right */
  .planner-table tbody { counter-reset: prow; }
  .planner-table tbody tr.plan-row { counter-increment: prow; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem 0.6rem; padding: 0.9rem 0.9rem 1rem; }
  .planner-table tbody tr.plan-row::before { content: 'Course ' counter(prow); grid-column: 1 / -1; align-self: center; min-height: 34px; display: flex; align-items: center; font: 700 0.82rem/1 var(--font-head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
  .planner-table tbody tr.plan-row td[data-label="Course"], .planner-table tbody tr.plan-row td[data-label="Plan"] { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 0.3rem; padding: 0; }
  .planner-table tbody tr.plan-row td > select { justify-self: stretch; width: 100%; min-width: 0; text-overflow: ellipsis; }
  .planner-table tbody tr.plan-row td.is-num { grid-template-columns: 1fr; gap: 0.15rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-weight: 600; }
  .planner-table tbody tr.plan-row td.is-num::before { font-size: 0.7rem; }
  .planner-table tbody tr.plan-row td.p-remove-cell { position: absolute; top: 0.75rem; inset-inline-end: 0.75rem; width: auto; padding: 0; display: block; }
  .planner-table tbody tr.plan-row td.p-remove-cell::before { content: none; }
  .planner-table tbody tr.plan-row td.p-remove-cell .row-remove { width: 36px; height: 36px; }
  .planner-table tfoot tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem 0.6rem; }
  .planner-table tfoot td[colspan] { grid-column: 1 / -1; }
  .planner-table tfoot td:empty { display: none; }
  .planner-table tfoot td.is-num::before { display: block; font-size: 0.7rem; color: var(--muted); }
  .planner-table tfoot td[data-p-total-months]::before { content: 'Months'; }
  .planner-table tfoot td[data-p-total-hours]::before { content: 'Hours'; }
  .planner-table tfoot td:nth-child(5)::before { content: 'Total fee'; }
  .planner-actions { flex-direction: column; }
  .planner-actions .keycap { width: 100%; justify-content: center; }
}
.planner-table .total-row td { background: var(--accent-soft); }
.planner-table .total-row strong.num { color: var(--accent); font-size: 1.1rem; }
.planner-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 0.8rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.wb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 1rem; }
.wb-tools .input { width: auto; min-width: 200px; }
.skills-grid { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 1100px) { .skills-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } #skills-out { position: sticky; top: calc(var(--header-h) + 72px); } }
.skills-form { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .skills-form { grid-template-columns: 1fr 1fr; } }
.skill-col { border: 1px solid var(--line); border-radius: var(--r-sheet); background: var(--surface); overflow: hidden; }
.skill-col legend { float: left; width: 100%; padding: 0.55rem 0.8rem; background: var(--surface-3); font: 600 0.78rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); }
.check-cell { display: grid; grid-template-columns: auto auto 1fr; gap: 0.6rem; align-items: center; min-height: 48px; padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 0.9rem; clear: both; }
.check-cell:last-child { border-bottom: 0; }
.check-cell input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-cell:has(input:checked) { background: var(--accent-soft); }
.big-line { font-size: 1.15rem; }
.skill-bars { display: grid; gap: 0.5rem; margin-top: 0.8rem; font-size: 0.88rem; }
.skill-bars li { display: grid; grid-template-columns: 8rem 1fr 3rem; gap: 0.6rem; align-items: center; }
.skill-bars .num { text-align: end; }
.rank { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 6px; border: 1px solid var(--key-border); background: var(--key-top); box-shadow: 0 2px 0 var(--key-edge); font-weight: 700; }
.rank-1 { background: #FDE68A; border-color: #D4A017; color: #111827; } .rank-2 { background: #E5E7EB; color: #111827; } .rank-3 { background: #F5D0B5; color: #111827; }

/* ---------- 5.12 About speed log ---------- */
.speed-log .log-bar { display: inline-block; width: min(160px, 50%); height: 8px; margin-inline-end: 0.6rem; border-radius: 4px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.speed-log .log-bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.method-tiles { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .method-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .method-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- 5.13 404 + Coming soon ---------- */
.nf-main { padding-block: clamp(32px, 6vw, 96px); }
.nf-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 1024px) { .nf-grid { grid-template-columns: 1.1fr 0.9fr; } }
.nf-copy { display: grid; gap: 1rem; justify-items: start; }
.soon-main { min-height: 100svh; display: flex; flex-direction: column; background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px); background-size: 32px 32px; }
.soon-top { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.soon-grid { flex: 1; display: grid; gap: 1.2rem; align-content: center; justify-items: center; text-align: center; padding-block: 32px 64px; max-width: 820px; }
.soon-type { display: inline-flex; align-items: center; min-height: 64px; padding: 0.9rem 1.2rem; font-size: clamp(1rem, 0.9rem + 1vw, 1.5rem); }
.caret { display: inline-block; width: 2px; height: 1.2em; margin-inline-start: 3px; background: var(--accent); animation: caret-blink 1s steps(1) infinite; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sheet); overflow: hidden; background: var(--surface); width: 100%; max-width: 560px; }
.cd-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem 0.5rem 0.9rem; border-inline-end: 1px solid var(--line); }
.cd-cell:last-child { border-inline-end: 0; }
.cd-cell .cell-ref { position: absolute; top: 0.4rem; inset-inline-start: 0.4rem; }
.cd-val { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.soon-form { width: 100%; max-width: 560px; text-align: start; }

/* =========================================================
   6. ANIMATIONS (keyframes, scroll-driven, view transitions, reveals)
   ========================================================= */
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes cell-in { from { box-shadow: inset 0 0 0 4px var(--accent-soft-2); } }
@keyframes err-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes key-pop { 0% { transform: translateY(6px) scale(0.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes roll { 0% { transform: translateY(0); opacity: 1; } 40% { transform: translateY(-35%); opacity: 0.2; } 41% { transform: translateY(35%); opacity: 0.2; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes fill-in { from { transform: scaleX(0); } }
@keyframes bar-grow { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes focus-ring { from { outline-offset: 7px; outline-color: transparent; } }
@keyframes ruler-p { from { --p: 0; } to { --p: 1; } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes key-light { 0% { background: var(--surface); color: var(--ink); transform: none; } 100% { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-4px); } }
@keyframes hint-light { to { background: var(--brand); } }
@keyframes deco-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(4px); } }

/* Reveal: IntersectionObserver fallback (.is-in) */
/* Hidden until in view; then a timed entrance. Variant chosen by class: rv-left / rv-right / rv-zoom (default: rise) */
@keyframes rv-up { from { opacity: 0; transform: translateY(48px); } }
@keyframes rv-left { from { opacity: 0; transform: translateX(-64px); } }
@keyframes rv-right { from { opacity: 0; transform: translateX(64px); } }
@keyframes rv-zoom { from { opacity: 0; transform: scale(0.88); } }
@keyframes rv-pop { 0% { opacity: 0; transform: translateY(36px) scale(0.94); } 70% { opacity: 1; transform: translateY(-4px) scale(1.01); } 100% { opacity: 1; transform: none; } }
.js .reveal:not(.is-in) .reveal-item, .js .reveal:not(.is-in):not(:has(.reveal-item)) { opacity: 0; }
.js .reveal.is-in .reveal-item, .js .reveal.is-in:not(:has(.reveal-item)) { animation: rv-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(min(var(--i, 0), 8) * 110ms); }
.js .reveal.is-in .reveal-item.rv-left, .js .reveal.is-in.rv-left:not(:has(.reveal-item)) { animation-name: rv-left; }
.js .reveal.is-in .reveal-item.rv-right, .js .reveal.is-in.rv-right:not(:has(.reveal-item)) { animation-name: rv-right; }
.js .reveal.is-in .reveal-item.rv-zoom, .js .reveal.is-in.rv-zoom:not(:has(.reveal-item)) { animation-name: rv-zoom; animation-duration: 1s; }
.js .reveal.is-in .reveal-item.rv-pop { animation-name: rv-pop; animation-duration: 0.8s; }
[dir="rtl"] .js .reveal.is-in .rv-left, [dir="rtl"] .js .reveal.is-in.rv-left { animation-name: rv-right; }
[dir="rtl"] .js .reveal.is-in .rv-right, [dir="rtl"] .js .reveal.is-in.rv-right { animation-name: rv-left; }
.course-card.is-in { opacity: 1 !important; transform: none !important; }
/* Reveal: CSS scroll-driven animations where supported */
@supports (animation-timeline: view()) {
  .js.sda .path-row .path-step .keycap { animation: key-light linear both; animation-timeline: --path; animation-range: entry calc(25% + var(--i) * 6%) cover calc(36% + var(--i) * 6%); }
  .js.sda .path-row .path-step .kc-sub { color: inherit; opacity: 0.85; }
  .js.sda .path-row .path-step .kc-hint { animation: hint-light linear both; animation-timeline: --path; animation-range: entry calc(25% + var(--i) * 6%) cover calc(36% + var(--i) * 6%); }
}
/* Speed log rows reveal one by one */
.js .speed-log:not(.is-in) .log-row td { opacity: 0; }
.js .speed-log.is-in .log-row td { animation: rv-left 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i) * 120ms); }

/* View Transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: 260ms; animation-timing-function: var(--ease); }
/* Fade fallback when View Transitions are not supported */
.vt-fade-out { opacity: 0; transform: translateY(4px); transition: opacity 110ms var(--ease), transform 110ms var(--ease); }
.vt-fade-in { animation: vt-fade-in 220ms var(--ease); }

/* =========================================================
   6b. MOTION LAYER — page-load intro, hero ambience, micro-interactions
   (fill-mode "backwards" so no transform lingers after the animation ends)
   ========================================================= */
@keyframes header-in { from { opacity: 0; transform: translateY(-100%); } }
@keyframes intro-up { from { opacity: 0; transform: translateY(40px); filter: blur(4px); } }
@keyframes intro-zoom { from { opacity: 0; transform: translateX(40px) scale(0.9); } }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(260%) skewX(-20deg); } }
@keyframes icon-spin { from { transform: rotate(-90deg) scale(0.6); opacity: 0; } }

/* Header drops in on load */
.js .site-header, .js .auth-header, .js .top-strip { animation: header-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.js .site-header { animation-delay: 80ms; }

/* Hero / first-screen content rises in, staggered (JS adds .intro-item + --i) */
.js .intro-item { animation: intro-up 1s cubic-bezier(0.16, 1, 0.3, 1) backwards; animation-delay: calc(250ms + var(--i, 0) * 130ms); }
.js .intro-item.intro-media { animation-name: intro-zoom; animation-duration: 1.2s; }
[dir="rtl"] .js .intro-item.intro-media { animation-name: rv-zoom; }

/* Slow ambient zoom on dark hero backgrounds */
.ed-hero-bg img, .sb-bg img, .ph-bg { animation: ken-burns 26s ease-in-out infinite alternate; transform-origin: 60% 40%; will-change: transform; }

/* Dashboard: each section animates in when it is shown */
.dash-sec:not([hidden]) > * { animation: intro-up 0.45s var(--ease) backwards; }
.dash-sec:not([hidden]) > :nth-child(2) { animation-delay: 60ms; }
.dash-sec:not([hidden]) > :nth-child(3) { animation-delay: 120ms; }
.dash-sec:not([hidden]) > :nth-child(4) { animation-delay: 180ms; }
.dash-sec:not([hidden]) > :nth-child(n+5) { animation-delay: 240ms; }

/* Nav links: underline grows on hover */
.nav-link:not(.is-active)::after { content: ''; position: absolute; inset-inline: 0.6rem; bottom: 4px; height: 3px; border-radius: 3px; background: var(--brand); transform: scaleX(0); transform-origin: center; transition: transform 260ms var(--ease); }
.nav-link:not(.is-active):hover::after, .nav-link:not(.is-active):focus-visible::after { transform: scaleX(1); }

/* Icon buttons: playful nudge; theme icon spins when toggled */
.icon-key svg { transition: transform 300ms var(--ease); }
.icon-key:hover svg { transform: rotate(-10deg) scale(1.1); }
.icon-key[data-search-open]:hover svg { transform: scale(1.12) rotate(8deg); }
html.dark [data-toggle-theme] .ico-sun, html:not(.dark) [data-toggle-theme] .ico-moon { animation: icon-spin 420ms var(--ease) backwards; }

/* Primary (yellow) buttons: light sweep on hover */
.keycap-accent { position: relative; isolation: isolate; overflow: hidden; }
.keycap-accent::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
.keycap-accent:hover::after { animation: shine 0.75s var(--ease); }

/* Media: gentle zoom on hover */
.ph-media { overflow: hidden; border-radius: 22px; }
.ph-media img { transition: transform 0.6s var(--ease); }
.ph-media:hover img { transform: scale(1.04); }
.sheet-card, .feature-card, .stat-cell { transition: transform var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease), border-color var(--t-ui); }
.stats-banner .stat-cell:hover { transform: translateY(-4px); border-color: rgba(255, 180, 0, 0.45); }

/* Smooth cross-page fade (Chrome/Edge 126+; ignored elsewhere) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }

/* =========================================================
   7. REDUCED MOTION — show final states directly
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal .reveal-item, .js .reveal, .js .reveal:not(.is-in) .reveal-item { opacity: 1 !important; transform: none !important; animation: none !important; }
  .js.sda .path-row .path-step .keycap { animation: none !important; }
  .path-row .path-step .keycap { background: var(--navy); color: #fff; border-color: var(--navy); }
  .path-row .path-step .kc-hint { background: var(--brand) !important; }
  .deco { animation: none !important; }
  .ed-hero-bg img, .sb-bg img, .ph-bg, .intro-item, .dash-sec > *, .site-header, .auth-header, .top-strip { animation: none !important; }
  .keycap-accent::after { display: none; }
  .js .speed-log .log-row td { opacity: 1 !important; animation: none !important; }
  .path-row .path-step .kc-sub { color: #C9D3E6; }
  .ch.cur::before, .caret { animation: none !important; opacity: 1; }
  .key, .key.lit { transition: none !important; }
  .js .stat-cell:not(.drawn) .sparkline path { stroke-dashoffset: 0; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .doc-ruler.sda-ruler { animation: none; }
}

/* =========================================================
   8. PRINT (receipts, certificates, timetable, syllabus)
   ========================================================= */
#print-area { display: none; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f6f6f6; --surface-3: #eee; --ink: #000; --ink-2: #222; --muted: #444; --line: #ccc; }
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .top-strip, .site-footer, .mobile-panel, .mp-overlay, .back-top, .toast-stack, .compare-tray, .doc-ruler, .dash-side, .dash-top, .dash-tabbar, #popup-root, .skip-link, .noscript-note, .chart-tip { display: none !important; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block !important; }
  #print-area .receipt-doc, #print-area .cert-doc { box-shadow: none; border-color: #999; break-inside: avoid; }
  #print-area .cert-doc { width: 100%; }
  .print-doc h1 { font-size: 18pt; margin-bottom: 6pt; }
  .print-doc p { margin-bottom: 10pt; }
  .print-doc details { break-inside: avoid; }
  .print-doc .sheet { box-shadow: none; }
  .print-doc .formula-bar, .print-doc .col-letters, .print-doc .rn, .print-doc .cell-link { box-shadow: none !important; }
  .print-doc .sheet-table thead { position: static; }
  .print-doc .sheet-table, .print-doc .sheet-table thead { display: table-header-group; }
  .print-doc .sheet-table { display: table; }
  .print-doc .sheet-table tbody { display: table-row-group; }
  .print-doc .sheet-table tr { display: table-row; }
  .print-doc .sheet-table td, .print-doc .sheet-table th { display: table-cell; font-size: 9pt; padding: 4pt 6pt; position: static !important; }
  .print-doc .sheet-table tbody td::before { content: none; }
  .print-doc .fx-open, .print-doc .sort-ind { display: none; }
  a { color: #000; text-decoration: none; }
  .cert-zoom, .paid-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-doc, .cert-seal, .status { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}

