/* =========================================================
   Maths with Dino — landing page styles
   Traditional layout · original Maths with Dino fonts and colours
   ========================================================= */

/* Palette: "sky & meadow" — bright sky blue + fresh light green, sunny yellow highlights.
   Light sky / mint grounds instead of plain white. Every colour on the site comes from these tokens. */
:root {
  --navy: #13669F;        /* deep sky: headings, dark buttons, table heads */
  --navy-2: #1675B0;
  --text: #173B52;
  --muted: #4F6F82;
  --line: #C7E4F2;
  --bg: #EAF6FD;          /* light sky — main page ground */
  --bg-alt: #E0F6E7;      /* light mint — alternate sections */
  --card: #FFFFFF;
  --field: #FFFFFF;
  --field-line: #A9D3E8;
  --board: #1A8BD0;       /* bright sky blue band (LMS section) */
  --board-2: #2AA9E2;
  --chalk: #F2FAFF;
  --on-color: #FFFFFF;    /* text on coloured fills */
  --gold: #FFC933;        /* sunny yellow */
  --gold-dark: #F5B400;
  --gold-soft: #FFF1C2;
  --red: #10804A;         /* primary accent: fresh green (tagline, active nav) */
  --red-soft: #E3F7EA;
  --wa: #0F8445;
  --wa-dark: #0B6E39;
  --green-ink: #0F7A42;  /* green for text on light grounds */
  --blue: #1673B8;        /* sky blue: links, focus, info */
  --blue-soft: #E6F4FD;
  --green-soft: #E4F8EC;
  --fb: #1877F2;
  --yt: #E53935;
  --ink-soft: var(--muted);
  --ink: var(--navy);
  --paper: var(--card);

  /* gradients for the big colour bands */
  --grad-sky: linear-gradient(120deg, #0E6FAE 0%, #0C7BAA 55%, #0E806A 100%);
  --grad-board: linear-gradient(135deg, #0E78B6 0%, #0F7AA8 50%, #0D7F5E 100%);
  --grad-deep: linear-gradient(160deg, #0E5480 0%, #0E6774 100%);

  /* one colour per grade — used everywhere a grade appears */
  --g6: #D1394D;          /* coral */
  --g7: #B85A06;          /* orange */
  --g8: #11823F;          /* green */
  --g9: #0B7F8A;          /* teal */
  --g10: #1A7AC6;         /* sky blue */
  --g11: #6A52D6;         /* violet */

  --font: 'Noto Sans Sinhala', 'Iskoola Pota', 'Nirmala UI', system-ui, sans-serif;
  --display: 'Gemunu Libre', 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(19, 102, 159, .06), 0 4px 14px rgba(19, 102, 159, .08);
  --shadow-lg: 0 12px 32px rgba(19, 102, 159, .14);
  --wrap: 1180px;
  --head-h: 64px;
  --nav-space: calc(var(--head-h) + 10px); /* height the floating bar takes over the hero */
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 32px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.35; margin: 0; font-weight: 700; color: var(--navy); }
h1, h2 { font-family: var(--display); line-height: 1.25; letter-spacing: .005em; }
p { margin: 0 0 1em; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.fill { fill: currentColor; stroke: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--navy); color: var(--on-color); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: .5em 1.4em;
  border: 0; border-radius: 10px;
  font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-ink { background: var(--navy); color: var(--on-color); }
.btn-ink:hover { background: var(--navy-2); }
.btn-wa { background: var(--wa); color: var(--on-color); }
.btn-wa:hover { background: var(--wa-dark); }
.btn-paper { background: var(--card); color: var(--navy); border: 2px solid var(--line); }
.btn-paper:hover { border-color: var(--navy); }
.btn-sm { min-height: 44px; font-size: .95rem; padding: .4em 1em; }
.btn-xl { min-height: 64px; font-size: 1.25rem; padding: .6em 1.8em; }
.btn-block { width: 100%; }

/* ---------- developer / platform bar (OneLMS) ---------- */
.devbar { background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); font-size: .85rem; }
.devbar .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; min-height: 46px; padding-block: 6px; }
.devbar a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.devbar .icon { width: 16px; height: 16px; }
.db-brand { display: inline-flex; align-items: center; gap: 8px; }
.db-brand img { width: 32px; height: 32px; }
.db-brand b, .db-support b { color: var(--navy); }
.db-support { margin-right: auto; }
.db-support:hover b { color: var(--blue); text-decoration: underline; }
.db-short { display: none; }
.db-app { background: var(--red); color: var(--on-color); font-weight: 700; padding: 6px 14px; border-radius: 999px; min-height: 34px; }
.db-app:hover { background: var(--wa-dark); }

/* ---------- top contact bar ---------- */
.topbar { background: var(--navy); color: rgba(255, 255, 255, .92); font-size: .88rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar .icon { width: 16px; height: 16px; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 18px; }
.tb-news { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; }

/* ---------- header ---------- */
/* floating, see-through bar: sits a little below the page top and stays in view while scrolling */
.site-head { position: sticky; top: 0; z-index: 50; padding: 10px 16px 0; pointer-events: none; }
/* home page: the bar floats over the hero instead of taking its own strip */
.site-head.over-hero { margin-bottom: calc(-1 * var(--nav-space)); }
.site-head .wrap {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; gap: 20px; min-height: var(--head-h);
  padding-inline: 22px 12px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px rgba(19, 102, 159, .12), 0 2px 6px rgba(19, 102, 159, .06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 58px; height: auto; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; display: block; color: var(--navy); white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--red); }
.brand-sub { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .98rem; color: var(--text); transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--blue-soft); color: var(--navy); }
.nav a[aria-current="true"] { background: var(--red-soft); color: var(--green-ink); }

.menu-btn { display: none; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 700; }
.menu-btn .icon { width: 24px; height: 24px; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.menu-btn[aria-expanded="true"] .i-menu { display: none; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
/* soft sky-blue + meadow-green washes in opposite corners so light sections don't read as flat white */
.section, .sp-main {
  background:
    radial-gradient(55% 50% at 94% 6%, rgba(28, 143, 214, .10), transparent 70%),
    radial-gradient(50% 55% at 4% 96%, rgba(31, 186, 94, .09), transparent 70%),
    var(--bg);
}
#about {
  background:
    radial-gradient(50% 55% at 6% 8%, rgba(31, 186, 94, .09), transparent 70%),
    radial-gradient(55% 50% at 96% 94%, rgba(28, 143, 214, .10), transparent 70%),
    var(--bg);
}
.section-alt {
  background:
    radial-gradient(50% 50% at 6% 10%, rgba(28, 143, 214, .08), transparent 70%),
    radial-gradient(45% 50% at 95% 90%, rgba(31, 186, 94, .12), transparent 70%),
    var(--bg-alt);
}
.section-board { background: var(--grad-board); color: var(--chalk); }
.section-board .sec-head h2 { color: var(--on-color); }
.section-board .sec-head p { color: rgba(242, 250, 255, .96); }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.sec-head.center h2::after { content: ""; display: block; width: 64px; height: 4px; background: var(--gold); border-radius: 4px; margin: 14px auto 0; }
.sec-head p { margin-top: 12px; font-size: 1.08rem; color: var(--muted); }
.marker { color: var(--red); }

/* ---------- hero: full-width slider ---------- */
.hero { background: var(--navy); }
.slider { position: relative; }
.slider-frame { position: relative; overflow: hidden; aspect-ratio: 1920 / 700; min-height: calc(560px + var(--nav-space)); max-height: calc(660px + var(--nav-space)); width: 100%; background: var(--bg); touch-action: pan-y; }
.slides { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; transition: transform .6s ease; }
.slide { flex: 0 0 100%; height: 100%; }
.slide:not(.slide-hero) { padding-top: var(--nav-space); }
.slide picture, .slide img { display: block; width: 100%; height: 100%; }
.slide img { object-fit: cover; object-position: center; user-select: none; -webkit-user-drag: none; }

.s-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 54px; height: 54px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: color-mix(in srgb, var(--card) 90%, transparent); color: var(--navy);
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.s-btn:hover { background: var(--gold); }
.s-btn .icon { width: 26px; height: 26px; stroke-width: 2.6; }
.s-prev { left: 20px; }
.s-next { right: 20px; }

.slider-ui { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; justify-content: center; }
.dots { display: flex; gap: 8px; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--navy) 50%, transparent); }
.dot { width: 12px; height: 12px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .55); padding: 0; cursor: pointer; transition: width .2s, background .2s; }
.dot[aria-current="true"] { width: 32px; background: var(--gold); }

/* ---------- hero slide: teacher (slide 1 of the slider) ---------- */
.hs {
  height: 100%;
  background:
    radial-gradient(40% 60% at 6% 10%, rgba(43, 190, 170, .20), transparent 70%),
    radial-gradient(45% 60% at 38% 105%, rgba(31, 186, 94, .16), transparent 70%),
    radial-gradient(55% 75% at 76% 58%, rgba(28, 143, 214, .22), transparent 70%),
    radial-gradient(45% 60% at 96% 95%, rgba(31, 186, 94, .22), transparent 70%),
    radial-gradient(35% 50% at 58% 6%, rgba(15, 163, 177, .14), transparent 70%),
    linear-gradient(rgba(28, 143, 214, .06) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(28, 143, 214, .06) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(120deg, #EFFAF6 0%, #EAF6FC 50%, #E6F7EE 100%);
  color: var(--text);
  overflow: hidden;
}
.hs-inner { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); grid-template-rows: minmax(0, 1fr); align-items: center; padding-inline: 88px; }
.hs-copy { position: relative; z-index: 2; padding-block: calc(var(--nav-space) + 24px) 52px; max-width: 50rem; text-shadow: 0 0 14px rgba(247, 252, 255, .95), 0 0 4px rgba(247, 252, 255, .9); }
.hs-grades a, .hs-login { text-shadow: none; }
.hs-title { font-size: clamp(3rem, 5.4vw, 4.8rem); font-weight: 800; line-height: 1.1; color: var(--navy); text-wrap: balance; letter-spacing: -.005em; }
.hs-name { margin: 18px 0 26px; display: grid; gap: 2px; }
.hs-name b { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.4vw, 2.05rem); line-height: 1.2; color: var(--green-ink); }
.hs-name span { font-size: 1.15rem; color: var(--muted); line-height: 1.5; }
.hs-lms { display: grid; justify-items: start; gap: 10px; }
.hs-login { min-height: 58px; font-size: 1.2rem; box-shadow: 0 8px 20px rgba(245, 180, 0, .3); }
.hs-lbl { margin: 8px 0 0; font-size: 1.05rem; font-weight: 600; color: var(--muted); }
.hs-grades { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hs-grades a {
  --grow: 96px;
  display: flex; align-items: center; justify-content: center; gap: 0; width: 54px; height: 54px; overflow: hidden;
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1;
  color: var(--on-color); text-decoration: none;
  background: var(--c); border-radius: 12px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), 0 4px 10px rgba(19, 102, 159, .16);
  transition: width .35s cubic-bezier(.34, 1.3, .64, 1), gap .35s cubic-bezier(.34, 1.3, .64, 1), transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s;
}
/* arrow tucked away at zero width, slides in as the tile expands */
.hs-grades a .icon { width: 0; height: 22px; stroke-width: 2.6; opacity: 0; transform: translateX(-8px); transition: width .35s cubic-bezier(.34, 1.3, .64, 1), opacity .2s ease, transform .35s cubic-bezier(.34, 1.3, .64, 1); }
.hs-grades a:is(:hover, :focus-visible) { width: var(--grow); gap: 6px; transform: translateY(-3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), 0 10px 18px rgba(19, 102, 159, .22); }
.hs-grades a:is(:hover, :focus-visible) .icon { width: 22px; opacity: 1; transform: none; animation: lms-enter .9s ease-in-out .35s infinite; }

.hs-art { position: relative; align-self: end; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
/* main-img.png has transparent space above the head (the person fills the bottom 79.4%),
   so the box is scaled up by that ratio to keep the person the same size */
.slide .hs-photo { --fill: .7936; position: relative; z-index: 1; height: calc(96% / var(--fill)); width: auto; max-width: none; max-height: calc((100% - var(--nav-space) - 6px) / var(--fill)); object-fit: contain; object-position: bottom; filter: drop-shadow(0 20px 28px rgba(19, 102, 159, .22)); }

/* faint maths symbols drifting behind the teacher */
.hs-sym { position: absolute; inset: 0 -10%; z-index: 0; pointer-events: none; font-family: var(--display); font-weight: 800; line-height: 1; }
.hs-sym span { position: absolute; color: var(--blue); opacity: .16; animation: hs-float 9s ease-in-out infinite alternate; }
.hs-sym span:nth-child(1) { left: 4%;  top: 16%; font-size: 4.2rem; }
.hs-sym span:nth-child(2) { left: 86%; top: 12%; font-size: 3.4rem; color: var(--wa); animation-delay: -3s; }
.hs-sym span:nth-child(3) { left: 14%; top: 60%; font-size: 5rem; color: var(--wa); animation-delay: -6s; }
.hs-sym span:nth-child(4) { left: 92%; top: 50%; font-size: 3.8rem; animation-delay: -1.5s; }
.hs-sym span:nth-child(5) { left: 30%; top: 4%;  font-size: 3rem; color: var(--gold-dark); opacity: .28; animation-delay: -4.5s; }
.hs-sym span:nth-child(6) { left: 72%; top: 78%; font-size: 3.2rem; color: var(--gold-dark); opacity: .28; animation-delay: -7.5s; }
@keyframes hs-float { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-22px) rotate(8deg); } }

/* entrance: plays each time the hero slide comes into view */
.slide-hero.is-current .hs-photo { animation: hs-rise 1.1s cubic-bezier(.16, 1, .3, 1) both; }
.slide-hero.is-current .hs-title { animation: hs-wipe .9s cubic-bezier(.65, 0, .35, 1) .15s both; }
.slide-hero.is-current .hs-name { animation: hs-up .7s cubic-bezier(.16, 1, .3, 1) .55s both; }
.slide-hero.is-current .hs-login { animation: hs-up .7s cubic-bezier(.16, 1, .3, 1) .7s both; }
.slide-hero.is-current .hs-lbl { animation: hs-up .7s cubic-bezier(.16, 1, .3, 1) .8s both; }
.slide-hero.is-current .hs-grades li { animation: hs-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.slide-hero.is-current .hs-grades li:nth-child(1) { animation-delay: .9s; }
.slide-hero.is-current .hs-grades li:nth-child(2) { animation-delay: .97s; }
.slide-hero.is-current .hs-grades li:nth-child(3) { animation-delay: 1.04s; }
.slide-hero.is-current .hs-grades li:nth-child(4) { animation-delay: 1.11s; }
.slide-hero.is-current .hs-grades li:nth-child(5) { animation-delay: 1.18s; }
.slide-hero.is-current .hs-grades li:nth-child(6) { animation-delay: 1.25s; }
@keyframes hs-rise { from { opacity: 0; transform: translateY(60px) scale(.96); filter: blur(8px) drop-shadow(0 20px 28px rgba(19, 102, 159, 0)); } }
@keyframes hs-wipe { from { clip-path: inset(-25% 100% -25% 0); transform: translateX(-12px); } to { clip-path: inset(-25% -5% -25% 0); } }
@keyframes hs-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes hs-pop { from { opacity: 0; transform: translateY(12px) scale(.6); } }

/* posters keep their whole design visible when the frame is taller than 1920 × 700 */
@media (max-width: 1536px) {
  .slide:not(.slide-hero) img { object-fit: contain; }
}

/* ---------- welcome strip under the slider ---------- */
.intro { background: var(--grad-sky); color: var(--on-color); border-top: 4px solid var(--gold); padding: 44px 0 52px; }
.intro .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: center; }
.tagline { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 1.25rem; background: var(--red); color: var(--on-color); padding: 4px 18px 6px; border-radius: 8px; margin-bottom: 16px; }
.intro h2 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; color: var(--on-color); }
.intro h2 .hl { color: var(--gold); }
.hero-lead { font-size: 1.1rem; color: rgba(255, 255, 255, .96); margin: 0; }
.hero-news { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; background: rgba(4, 40, 66, .28); border-left: 4px solid var(--gold); border-radius: 0 var(--r) var(--r) 0; }
.hero-news .icon { width: 24px; height: 24px; color: var(--gold); margin-top: 3px; }
.hero-news b { color: var(--on-color); }
.btn-outline { background: transparent; color: var(--on-color); border: 2px solid rgba(255, 255, 255, .7); }
.btn-outline:hover { background: var(--field); color: var(--navy); }
.hero-cta { display: grid; gap: 12px; margin-top: 18px; }

/* new classes */
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.class-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.cc-top { display: flex; align-items: center; gap: 12px; padding: 18px 22px; background: var(--c, var(--navy)); color: var(--on-color); }
.cc-num { font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.cc-grade { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.cc-grade small { display: block; font-weight: 500; font-size: .85rem; opacity: .9; }
.stamp { margin-left: auto; align-self: flex-start; font-weight: 800; font-size: .75rem; letter-spacing: .06em; color: var(--navy); background: var(--gold); border-radius: 6px; padding: 1px 9px; }
.cc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.cc-body h3 { font-size: 1.12rem; margin-bottom: 12px; }
.cc-meta { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.cc-meta li { display: flex; align-items: center; gap: 10px; }
.cc-meta .icon { width: 18px; height: 18px; color: var(--c, var(--navy)); }
.cc-body .btn { margin-top: auto; }

/* grade badge */
.gbadge { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: var(--c, var(--navy)); color: var(--on-color); flex: none; font-family: var(--display); font-weight: 800; line-height: 1; }
.gbadge b { font-size: 1.6rem; }
.gbadge small { display: none; }
[data-g="6"] { --c: var(--g6); } [data-g="7"] { --c: var(--g7); } [data-g="8"] { --c: var(--g8); }
[data-g="9"] { --c: var(--g9); } [data-g="10"] { --c: var(--g10); } [data-g="11"] { --c: var(--g11); }

/* ---------- LMS grades ---------- */
.steps { list-style: none; margin: 0 auto 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 960px; counter-reset: st; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 1rem; line-height: 1.5; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r); padding: 14px 16px; }
.steps li::before { counter-increment: st; content: counter(st); width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: var(--navy); background: var(--gold); border-radius: 50%; }

.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gcard { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--card); border: 0; border-top: 6px solid var(--c, var(--navy)); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.gcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gcard-top { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.gcard .num { font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; color: var(--c, var(--navy)); min-width: 1.3em; }
.gcard .lbl { font-weight: 700; font-size: 1.3rem; line-height: 1.3; color: var(--navy); }
.gcard .lbl small { display: block; font-weight: 500; font-size: .88rem; color: var(--muted); }
.gcard .go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--c, var(--navy)); color: var(--on-color); padding: 13px 22px; font-weight: 700; font-size: 1.05rem; }
.gcard .go .icon { width: 24px; height: 24px; stroke-width: 2.5; }
.gcard .ol { position: absolute; top: 14px; right: 14px; font-size: .75rem; font-weight: 700; background: var(--bg-alt); color: var(--navy); padding: 1px 10px; border-radius: 999px; }

.board-note { display: flex; align-items: flex-start; gap: 12px; margin: 32px auto 0; max-width: 860px; padding: 16px 20px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--r); font-size: 1rem; }
.board-note .icon { width: 24px; height: 24px; color: var(--gold); margin-top: 3px; }

/* ---------- about ---------- */
/* left: photo + turning "dial" seal + fact cards; right: name, quote, philosophy */
.ab-top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.ab-side { display: grid; gap: 44px; }
.ab-photo { position: relative; margin: 0 0 0 12px; max-width: 440px; }
.ab-photo::before { content: ""; position: absolute; inset: 20px -20px -20px 20px; border: 2px solid color-mix(in srgb, var(--wa) 45%, transparent); border-radius: 26px; }
.ab-photo::after { content: ""; position: absolute; left: -34px; bottom: 36px; width: 120px; height: 150px; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 45%, transparent) 2px, transparent 2.5px) 0 0 / 16px 16px; }
.ab-arch { position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; background: var(--blue-soft); box-shadow: 0 2px 6px rgba(19, 102, 159, .08), 0 26px 50px rgba(19, 102, 159, .2); }
.ab-arch img { width: 100%; height: 100%; object-fit: cover; }

.ab-seal { position: absolute; z-index: 2; right: -44px; bottom: 44px; width: 136px; height: 136px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: var(--gold); color: var(--navy); box-shadow: 0 12px 26px rgba(214, 150, 0, .35); }
.ab-seal b { font-family: var(--display); font-size: 2.6rem; font-weight: 800; line-height: .9; }
.ab-seal span { font-size: .68rem; font-weight: 700; line-height: 1.2; }
.ab-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: ab-turn 24s linear infinite; }
.ab-ring text { font-family: var(--display); font-weight: 700; font-size: 12.5px; letter-spacing: .06em; fill: var(--navy); }
@keyframes ab-turn { to { transform: rotate(360deg); } }

.ab-hi { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--green-ink); }
.ab-name { margin-top: 2px; font-size: clamp(2.8rem, 5.2vw, 4.3rem); font-weight: 800; line-height: 1.05; color: var(--navy); text-wrap: balance; }
.ab-en { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 700; font-size: 1.05rem; color: var(--navy-2); }
.ab-en span { font-weight: 600; font-size: .92rem; color: var(--green-ink); background: var(--red-soft); padding: 3px 12px; border-radius: 999px; }

.ab-quote { position: relative; margin: 30px 0 0; padding: 22px 26px 20px 76px; background: var(--card); border-radius: 22px; box-shadow: 0 2px 4px rgba(19, 102, 159, .05), 0 14px 32px rgba(19, 102, 159, .1); }
.ab-quote::before { content: "\201C"; position: absolute; left: 20px; top: 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 4.6rem; line-height: 1; color: var(--gold); }
.ab-quote p { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.4; color: var(--navy); text-wrap: balance; }
.ab-quote cite { display: block; margin-top: 6px; font-style: normal; font-weight: 700; font-size: .92rem; color: var(--green-ink); }

.ab-text { margin-top: 26px; }
.ab-text p { color: var(--text); max-width: 64ch; }

/* fact cards under the photo */
.ab-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.ab-facts > div { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(19, 102, 159, .05), 0 6px 16px rgba(19, 102, 159, .06); }
.ab-facts dt { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--c); }
.ab-facts dt .icon { width: 18px; height: 18px; }
.ab-facts dd { margin: 4px 0 0; font-weight: 700; color: var(--navy); line-height: 1.45; }

.why-title { margin-top: 96px; text-align: center; font-family: var(--display); font-size: 1.8rem; margin-bottom: 22px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.why .why-ic { width: 50px; height: 50px; flex: none; display: grid; place-items: center; margin: 0; border-radius: 14px; background: color-mix(in srgb, var(--c, var(--navy)) 13%, var(--card)); color: var(--c, var(--navy)); }
.why-ic .icon { width: 26px; height: 26px; stroke-width: 1.9; }
.why b { display: block; font-size: 1.05rem; color: var(--navy); line-height: 1.4; }
.why div > span { display: block; font-size: .93rem; color: var(--muted); line-height: 1.55; margin-top: 2px; }

/* ---------- student letters: a pile of handwritten notes on graph paper ---------- */
.letters {
  background:
    radial-gradient(45% 60% at 80% 40%, rgba(28, 143, 214, .12), transparent 70%),
    radial-gradient(40% 55% at 10% 90%, rgba(31, 186, 94, .12), transparent 70%),
    linear-gradient(rgba(28, 143, 214, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(28, 143, 214, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
  overflow: hidden;
}
.letter-stage { position: relative; max-width: 660px; margin: 0 auto; }
.letter-stage .q { position: absolute; z-index: 0; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 13rem; line-height: 1; pointer-events: none; user-select: none; }
.q-open { left: -10px; top: -40px; color: color-mix(in srgb, var(--wa) 30%, transparent); }
.q-close { right: -10px; bottom: 30px; color: color-mix(in srgb, var(--blue) 26%, transparent); }
.letter-by { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; text-align: left; }
.by-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--green-ink); }
.by-ic .icon { width: 24px; height: 24px; }
.letter-by b { display: block; font-family: var(--display); font-size: 1.3rem; line-height: 1.2; color: var(--navy); }
.letter-by small { display: block; font-size: .9rem; color: var(--muted); line-height: 1.4; }
.letters-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.l-btn { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--navy); cursor: pointer; box-shadow: var(--shadow); transition: background-color .15s, color .15s, transform .15s; }
.l-btn:hover { background: var(--navy); color: var(--on-color); }
.l-btn:active { transform: scale(.94); }
.l-btn .icon { width: 24px; height: 24px; stroke-width: 2.4; }
/* arrows sit on either side of the pile, level with its middle */
.letter-stage .l-btn { position: absolute; z-index: 120; top: 260px; margin-top: -28px; width: 56px; height: 56px; }
.l-prev { left: -64px; }
.l-next { right: -64px; }
.l-count { margin: 0; min-width: 5.2em; text-align: center; font-family: var(--display); line-height: 1; }
.l-count b { font-size: 2.8rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.l-count span { font-size: 1.2rem; font-weight: 700; color: var(--muted); margin-left: 4px; }
.l-hint { margin: 12px auto 0; text-align: center; font-size: .92rem; color: var(--muted); }

/* classroom: two photos stacked on the left, three portrait clips beside them; the clips set the
   height and the photos crop to fill their half each, so the top and bottom edges line up */
.class-vids { margin: 40px auto 0; max-width: 980px; padding: 18px 20px 20px; background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.cv-title { margin: 0 0 16px; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: var(--navy); }
.cv-title small { display: block; font-family: var(--font); font-weight: 600; font-size: .85rem; color: var(--green-ink); }
.cv-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--green-ink); }
.cv-ic .icon { width: 24px; height: 24px; }
.cv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.cv-list > :nth-child(1) { grid-area: 1 / 1; }
.cv-list > :nth-child(2) { grid-area: 2 / 1; }
.cv-list > :nth-child(3) { grid-area: 1 / 2 / 3 / 3; }
.cv-list > :nth-child(4) { grid-area: 1 / 3 / 3 / 4; }
.cv-list > :nth-child(5) { grid-area: 1 / 4 / 3 / 5; }
.cm-li { position: relative; min-height: 0; }
.cm-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--navy); cursor: zoom-in; box-shadow: 0 4px 12px rgba(19, 102, 159, .18); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s; }
.cm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cm-photo:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(19, 102, 159, .26); }
.cm-photo:hover img { transform: scale(1.04); }
.cv { position: relative; display: block; width: 100%; aspect-ratio: 464 / 832; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--navy); cursor: pointer; box-shadow: 0 4px 12px rgba(19, 102, 159, .18); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s; isolation: isolate; }
.cv:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(19, 102, 159, .26); }
.cv video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .5s ease; position: relative; z-index: 1; }
.cv:hover video { transform: scale(1.04); }

/* Subtle expand cue on video cards */
.cv-expand-cue {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(6, 38, 60, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  transition: transform .2s ease, background-color .15s, color .15s, border-color .15s;
  pointer-events: none;
  transform: translateZ(0);
}
.cv:hover .cv-expand-cue {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  transform: scale(1.1) translateZ(0);
}
.cv-expand-cue .icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

/* Video modal viewer */
.video-view { border: 0; padding: 0; background: transparent; max-width: min(94vw, 560px); max-height: 94vh; overflow: visible; }
.video-view::backdrop { background: rgba(6, 38, 60, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.vv-container { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: center; }
.vv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 10px 8px 16px;
  background: rgba(6, 38, 60, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.vv-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.vv-ic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex: none;
}
.vv-ic .icon {
  width: 17px;
  height: 17px;
}
.vv-text {
  min-width: 0;
}
.vv-title {
  margin: 0;
  font-family: var(--display);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vv-sub {
  margin: 0;
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold);
}
.vv-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.vv-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform .2s ease, background-color .15s;
}
.vv-fs {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
}
.vv-fs:hover {
  background: var(--navy-2);
  color: #fff;
  transform: scale(1.08);
}
.vv-close {
  background: var(--gold);
  color: var(--navy);
}
.vv-close:hover {
  transform: rotate(90deg) scale(1.08);
}
.vv-btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.vv-video {
  display: block;
  max-width: 100%;
  max-height: calc(85vh - 65px);
  width: auto;
  height: auto;
  aspect-ratio: 464 / 832;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  border: 3px solid rgba(255, 255, 255, .15);
  margin: 0 auto;
}
@media (max-width: 520px) {
  .cv-expand-cue { width: 28px; height: 28px; top: 8px; right: 8px; }
  .cv-expand-cue .icon { width: 14px; height: 14px; }
  .vv-head { padding: 6px 8px 6px 12px; margin-bottom: 8px; border-radius: 12px; }
  .vv-title { font-size: .88rem; }
  .vv-sub { font-size: .7rem; }
  .vv-btn { width: 34px; height: 34px; }
  .vv-btn .icon { width: 16px; height: 16px; }
  .vv-video { max-height: calc(80vh - 55px); }
}

/* ---------- results: framed posters side by side, click to enlarge ---------- */
.results-card { margin: 0 auto; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: center; }
.results-img { display: block; width: 100%; padding: 10px; border: 0; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-lg); cursor: zoom-in; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s; }
.results-img:hover { transform: translateY(-3px); }
/* the posters differ slightly in shape; a shared 3:2 frame keeps their edges level (the zoom shows the full image) */
.results-img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.results-card figcaption { margin-top: 14px; text-align: center; font-size: .92rem; color: var(--muted); }

.letter-desk { position: relative; height: 520px; }
.letter-pile { list-style: none; margin: 0; padding: 0; position: relative; height: 100%; touch-action: pan-y; }
.letter {
  --x: 0px; --y: 0px; --r: 0deg; --s: 1; --dx: 0px; --dr: 0deg;
  position: absolute; left: 50%; top: 50%; width: 460px; max-width: 92%;
  transform: translate(-50%, -50%) translate(calc(var(--x) + var(--dx)), var(--y)) rotate(calc(var(--r) + var(--dr))) scale(var(--s));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s ease;
}
.letter.tall { width: 340px; }
.letter.is-hidden { opacity: 0; }
.letter.toss-r { --x: 120%; --y: -10%; --r: 22deg; opacity: 0; }
.letter.toss-l { --x: -120%; --y: -10%; --r: -22deg; opacity: 0; }
.letter.dragging { transition: none; }
/* coloured tape strip, one grade colour per letter */
.letter::before {
  content: ""; position: absolute; z-index: 2; top: -13px; left: 50%; width: 118px; height: 30px;
  transform: translateX(-50%) rotate(-3deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px),
    color-mix(in srgb, var(--c) 58%, transparent);
  -webkit-mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px)); mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px));
  box-shadow: 0 1px 3px rgba(19, 102, 159, .15);
}
.letter-paper {
  display: block; width: 100%; padding: 10px 10px 16px; border: 0; border-radius: 4px; cursor: zoom-in;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(19, 102, 159, .1), 0 16px 34px rgba(19, 102, 159, .18);
}
.letter-paper img { width: 100%; height: auto; border-radius: 2px; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.letter.is-top .letter-paper { cursor: grab; }
.letter.dragging .letter-paper { cursor: grabbing; box-shadow: 0 2px 4px rgba(19, 102, 159, .12), 0 26px 50px rgba(19, 102, 159, .26); }
.letter-paper:focus-visible { outline-offset: 6px; }

.letter-view { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1040px); max-height: 94vh; overflow: visible; }
.letter-view::backdrop { background: rgba(6, 38, 60, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.letter-view img { display: block; max-width: 100%; max-height: 88vh; width: auto; height: auto; border: 10px solid var(--card); border-radius: 6px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.letter-view[open] img { animation: lv-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes lv-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.lv-close { position: absolute; top: -16px; right: -16px; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--gold); color: var(--navy); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.lv-close .icon { width: 22px; height: 22px; stroke-width: 2.6; }

/* ---------- timetable ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--navy)); }
.chip[data-g="all"]::before { display: none; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-color); }

.tt-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.tt { width: 100%; border-collapse: collapse; }
.tt th, .tt td { text-align: left; padding: 13px 18px; vertical-align: middle; }
.tt thead th { background: var(--navy); color: var(--on-color); font-weight: 700; font-size: .98rem; }
.tt tbody tr + tr td { border-top: 1px solid var(--line); }
.tt tbody tr:nth-child(even) td { background: var(--bg); }
.tt .gcell { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.tt .gcell .gbadge { width: 40px; height: 40px; border-radius: 10px; }
.tt .gcell .gbadge b { font-size: 1.2rem; }
.tt .day { font-weight: 700; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; padding: 2px 12px 2px 9px; border-radius: 999px; white-space: nowrap; }
.mode .icon { width: 16px; height: 16px; }
.mode.online { color: var(--g10); background: var(--blue-soft); }
.mode.physical { color: var(--green-ink); background: var(--green-soft); }
.newtag { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 800; color: var(--on-color); background: var(--red); padding: 0 7px; border-radius: 5px; vertical-align: 2px; }
.newtag.paper { background: var(--blue); }
.tt-foot { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .95rem; }
.tt-foot .icon { color: var(--blue); margin-top: 4px; }
.tt tr[hidden] { display: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: start; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ccard { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
a.ccard:hover { border-color: var(--navy); box-shadow: var(--shadow-lg); }
.ccard .ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.ccard .ic .icon { width: 24px; height: 24px; }
.ccard small { display: block; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.ccard strong { display: block; font-size: 1.1rem; line-height: 1.35; color: var(--navy); word-break: break-word; }
.ccard.big { grid-column: span 2; }
.ic.call { background: var(--gold); color: var(--navy); } .ic.wa { background: var(--wa); color: var(--on-color); }
.ic.fb { background: var(--fb); color: var(--on-color); } .ic.yt { background: var(--yt); color: var(--on-color); }
.ic.tt { background: #111; color: #fff; }
.ic.mail { background: var(--bg-alt); color: var(--navy); } .ic.pin { background: var(--red); color: var(--on-color); }
.ic.support { background: var(--navy); color: var(--gold); }

.places { margin-top: 26px; }
.places h3 { font-size: 1.15rem; margin-bottom: 8px; }
.place { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.place + .place { border-top: 1px solid var(--line); }
.place .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.place b { display: block; color: var(--navy); }
.place span { color: var(--muted); font-size: .95rem; line-height: 1.5; display: block; }
.place a { font-weight: 700; color: var(--blue); font-size: .95rem; }

.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.form-card header { background: var(--wa); color: var(--on-color); padding: 18px 22px; display: flex; gap: 14px; align-items: center; }
.form-card header .icon { width: 36px; height: 36px; }
.form-card header h3 { font-size: 1.15rem; color: var(--on-color); }
.form-card header p { margin: 0; font-size: .9rem; opacity: .95; line-height: 1.45; }
.form-card form { padding: 22px; display: grid; gap: 16px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; font-size: .98rem; }
.field input[type="text"], .field select, .field textarea { width: 100%; min-height: 52px; padding: 10px 14px; font-size: 1.02rem; background: var(--field); border: 1px solid var(--field-line); border-radius: 10px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--blue) 25%, transparent); border-color: var(--blue); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radios { display: flex; gap: 10px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 18px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); cursor: pointer; font-weight: 500; margin: 0; }
.radios input { width: 20px; height: 20px; accent-color: var(--navy); }
.radios label:has(input:checked) { border-color: var(--navy); background: var(--bg-alt); }

/* ---------- class registration dialog ---------- */
.reg { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 30px 70px rgba(6, 38, 60, .35); overflow: auto; }
.reg::backdrop { background: rgba(6, 38, 60, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.reg[open] { animation: reg-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes reg-in { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.reg-head { position: sticky; top: 0; z-index: 1; display: flex; gap: 14px; align-items: center; padding: 18px 20px 18px 22px; background: var(--wa); color: var(--on-color); }
.reg-head > .icon { width: 34px; height: 34px; }
.reg-head h3 { font-size: 1.2rem; color: var(--on-color); }
.reg-head p { margin: 2px 0 0; font-size: .88rem; line-height: 1.45; opacity: .96; }
.reg-close { margin-left: auto; align-self: flex-start; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: var(--on-color); cursor: pointer; }
.reg-close:hover { background: rgba(255, 255, 255, .3); }
.reg-close .icon { width: 22px; height: 22px; }
.reg-form { padding: 20px 22px 24px; display: grid; gap: 16px; }
.reg-pick { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--c, var(--navy)) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c, var(--navy)) 28%, var(--card)); border-radius: 14px; }
.reg-pick .gbadge { width: 50px; height: 50px; }
.reg-pick b { display: block; color: var(--navy); line-height: 1.35; }
.reg-pick span:not(.gbadge) { display: block; font-size: .88rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.reg-row { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.reg-row .radios { gap: 8px; flex-wrap: nowrap; }
.reg-row .radios label { min-height: 52px; padding: 0 12px; gap: 8px; }
.reg-err { margin: 6px 0 0; font-size: .88rem; font-weight: 600; color: var(--g6); }
.field input[aria-invalid="true"] { border-color: var(--g6); }
@media (max-width: 520px) {
  .reg-row { grid-template-columns: 1fr; }
  .reg-head { padding: 16px; }
  .reg-form { padding: 16px 16px 20px; }
}

/* ---------- footer ---------- */
.site-foot { background: var(--grad-deep); color: rgba(255, 255, 255, .9); }
/* desktop: brand | pages | LMS grades | contact. Tablet: brand across the top, three columns below. Phone: stacked. */
.foot-grid { display: grid; grid-template-columns: 1.35fr .75fr 1fr 1.1fr; gap: 40px 48px; padding: 60px 0 44px; }
.site-foot h4 { position: relative; color: var(--on-color); font-family: var(--display); font-size: 1.2rem; margin: 0 0 18px; padding-bottom: 10px; }
.site-foot h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 3px; background: var(--gold); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot a { color: inherit; text-decoration: none; }
.foot-links a:hover, .devby a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }

.foot-brand { display: flex; width: fit-content; align-items: center; gap: 10px; margin-bottom: 14px; }
.foot-brand img { width: 62px; }
.site-foot .foot-brand .brand-name { color: var(--on-color); font-size: 1.7rem; white-space: nowrap; max-width: none; }
.foot-brand .brand-name em { color: var(--gold); }
.foot-tag { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--navy); background: var(--gold); padding: 2px 14px; border-radius: 999px; }
.foot-about p { margin: 14px 0 20px; max-width: 30em; font-size: .95rem; line-height: 1.7; color: rgba(255, 255, 255, .82); }

.foot-social { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); transition: background-color .2s, border-color .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.foot-social .icon { width: 20px; height: 20px; }
.foot-social a:hover, .foot-social a:focus-visible { transform: translateY(-3px); border-color: transparent; }
.foot-social .fb:hover, .foot-social .fb:focus-visible { background: var(--fb); }
.foot-social .yt:hover, .foot-social .yt:focus-visible { background: var(--yt); }
.foot-social .tt:hover, .foot-social .tt:focus-visible { background: #111; }
.foot-social .wa:hover, .foot-social .wa:focus-visible { background: var(--wa); }

.foot-links { display: grid; gap: 10px; }
.foot-links a { display: inline-block; color: rgba(255, 255, 255, .86); transition: color .15s, translate .2s; }
.foot-links a:hover { translate: 4px 0; }

/* grade tiles in each grade's colour */
.site-foot .foot-grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 260px; }
.foot-grades a { display: grid; place-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 10px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); font-size: .74rem; line-height: 1.2; color: rgba(255, 255, 255, .85); transition: background-color .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.foot-grades b { font-family: var(--display); font-size: 1.45rem; line-height: 1; color: var(--on-color); }
.foot-grades a:hover, .foot-grades a:focus-visible { background: var(--c); transform: translateY(-3px); }

.foot-contact { display: grid; gap: 12px; }
.foot-contact a { display: flex; align-items: center; gap: 12px; }
.fc-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--gold); transition: background-color .2s, color .2s; }
.fc-ic .icon { width: 20px; height: 20px; }
.fc-ic.wa { color: #5BE38F; }
.foot-contact b { display: block; font-size: 1.05rem; line-height: 1.3; color: var(--on-color); font-variant-numeric: tabular-nums; }
.foot-contact small { display: block; font-size: .82rem; color: rgba(255, 255, 255, .68); line-height: 1.3; }
.foot-contact a:hover .fc-ic, .foot-contact a:focus-visible .fc-ic { background: var(--gold); color: var(--navy); }
.foot-contact a:hover .fc-ic.wa, .foot-contact a:focus-visible .fc-ic.wa { background: var(--wa); color: var(--on-color); }
.foot-contact a:hover b { color: var(--gold); }

.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding: 18px 0 22px; background: rgba(0, 0, 0, .12); }
.foot-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; font-size: .88rem; color: rgba(255, 255, 255, .75); }
.devby a { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* floating WhatsApp */
.float-wa { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px 0 16px; background: var(--wa); color: var(--on-color); text-decoration: none; font-weight: 700; border-radius: 999px; box-shadow: 0 6px 20px rgba(34, 180, 94, .4); }
.float-wa .icon { width: 28px; height: 28px; }
.float-wa:hover { background: var(--wa-dark); }

/* ---------- button icon motion (on hover / keyboard focus) ---------- */
.btn .icon, .s-btn .icon, .l-btn .icon, .gcard .go .icon, .hc-item .arrow,
.reg-close .icon, .lv-close .icon, .float-wa .icon { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
/* forward arrows: nudge ahead */
.s-next:is(:hover, :focus-visible) .icon, .l-next:is(:hover, :focus-visible) .icon,
.gcard:is(:hover, :focus-visible) .go .icon, a.hc-item:is(:hover, :focus-visible) .arrow { transform: translateX(4px); }
/* back arrows: nudge back */
.btn:is(:hover, :focus-visible) .icon:has(use[href="#i-back"]),
.s-prev:is(:hover, :focus-visible) .icon, .l-prev:is(:hover, :focus-visible) .icon { transform: translateX(-4px); }
/* close: quarter turn */
.reg-close:is(:hover, :focus-visible) .icon, .lv-close:is(:hover, :focus-visible) .icon { transform: rotate(90deg); }
/* bell: little ring */
.btn:is(:hover, :focus-visible) .icon:has(use[href="#i-bell"]) { transform-origin: 50% 10%; animation: icon-ring .7s ease-in-out; }
/* WhatsApp: friendly wiggle */
.btn:is(:hover, :focus-visible) .icon:has(use[href="#i-wa"]),
.float-wa:is(:hover, :focus-visible) .icon { animation: icon-wiggle .6s ease-in-out; }
@keyframes icon-ring { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
@keyframes icon-wiggle { 25% { transform: rotate(-10deg) scale(1.1); } 50% { transform: rotate(8deg) scale(1.1); } 75% { transform: rotate(-4deg) scale(1.05); } }

/* LMS login buttons: idle shine sweep, lift + glow + "walking in" arrow on hover.
   Uses `translate` (not `transform`) so it doesn't fight the hero's hs-up entrance animation. */
.btn-lms { position: relative; overflow: hidden; isolation: isolate; transition: background-color .15s ease, border-color .15s ease, box-shadow .25s ease, translate .25s ease; }
.btn-lms::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  translate: -110% 0;
}
.btn-lms.btn-gold::after { animation: lms-shine 5s ease-in-out 2s infinite; }
.btn-lms:is(:hover, :focus-visible) { translate: 0 -2px; box-shadow: 0 10px 24px rgba(19, 102, 159, .28); }
.btn-lms.btn-gold:is(:hover, :focus-visible) { box-shadow: 0 10px 26px rgba(245, 180, 0, .5); }
.btn-lms:active { translate: 0 0; }
.btn-lms:is(:hover, :focus-visible)::after { animation: lms-shine-once .8s ease-out forwards; }
.btn-lms:is(:hover, :focus-visible) .icon { animation: lms-enter .9s ease-in-out infinite; }
@keyframes lms-shine { 0% { translate: -110% 0; } 25%, 100% { translate: 110% 0; } }
@keyframes lms-shine-once { from { translate: -110% 0; } to { translate: 110% 0; } }
@keyframes lms-enter { 50% { transform: translateX(5px); } }

/* ---------- scroll animations (classes added by main.js) ---------- */
.reveal { opacity: 0; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.r-up { transform: translateY(32px); }
.reveal.r-left { transform: translateX(-44px); }
.reveal.r-right { transform: translateX(44px); }
.reveal.r-zoom { transform: translateY(20px) scale(.94); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Support page
   ========================================================= */
.sp-main { padding: 36px 0 72px; }
.progress { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0 0 24px; padding: 0; flex-wrap: wrap; font-size: .95rem; }
.progress li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.progress li b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--field); border: 1px solid var(--line); font-size: .9rem; }
.progress li.done b { background: var(--g9); color: var(--on-color); border-color: var(--g9); }
.progress li.now { color: var(--navy); font-weight: 700; }
.progress li.now b { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.progress .sep { width: 28px; height: 2px; background: var(--line); }

.sp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: start; }
.go-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.go-card .top { display: flex; gap: 16px; align-items: center; padding: 22px 24px; background: var(--c, var(--gold)); color: var(--on-color); }
.go-card .top h1 { color: var(--on-color); font-size: clamp(1.5rem, 3vw, 2rem); }
.go-card .top.nograde { background: var(--gold); }
.go-card .top.nograde h1, .go-card .top.nograde p { color: var(--navy); }
.go-card .top .gbadge { width: 72px; height: 72px; background: var(--card); color: var(--c, var(--navy)); }
.go-card .top .gbadge b { font-size: 2.2rem; }
.go-card .top p { margin: 2px 0 0; font-size: .98rem; opacity: .95; }
.go-card .body { padding: 22px 24px 26px; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.02rem; line-height: 1.55; }
.checklist .n { width: 28px; height: 28px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--bg-alt); border-radius: 50%; }
.go-note { text-align: center; font-size: .9rem; color: var(--muted); margin: 12px 0 0; }
/* ---------- Support page grade picker ---------- */
.grade-picker { margin-bottom: 22px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.gp-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.05rem; color: var(--navy); }
.gp-label .icon { width: 18px; height: 18px; color: var(--green-ink); }
.gp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gp-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 4px; background: var(--card); border: 2px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, border-color .18s, background-color .18s, box-shadow .18s; cursor: pointer; }
.gp-btn .g-num { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--c, var(--navy)); }
.gp-btn .g-txt { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 3px; }
.gp-btn:hover { transform: translateY(-2px); border-color: var(--c, var(--navy)); box-shadow: 0 6px 14px rgba(19, 102, 159, .15); }
.gp-btn.is-active { border-color: var(--c, var(--navy)); background: color-mix(in srgb, var(--c, var(--navy)) 12%, var(--card)); box-shadow: 0 4px 14px color-mix(in srgb, var(--c, var(--navy)) 28%, transparent); }
.gp-btn.is-active .g-txt { color: var(--c, var(--navy)); font-weight: 700; }
@media (max-width: 600px) {
  .gp-grid { grid-template-columns: repeat(3, 1fr); }
}

.switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.switch p { font-weight: 700; margin-bottom: 10px; }
.switch .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.switch a { text-decoration: none; }

.help-card { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--navy); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.help-card .hc-head { padding: 22px 24px 6px; }
.help-card .brandline { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--red); }
.help-card h2 { font-size: 1.6rem; margin: 4px 0; }
.help-card .hc-head p { color: var(--muted); margin: 0; }
.hc-list { padding: 14px 18px 20px; display: grid; gap: 10px; }
.hc-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); }
a.hc-item:hover { border-color: var(--navy); }
.hc-item .ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--on-color); }
.hc-item .ic .icon { width: 24px; height: 24px; }
.hc-item small { display: block; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.hc-item strong { display: block; font-size: 1.15rem; line-height: 1.4; color: var(--navy); word-break: break-word; }
.hc-item .arrow { margin-left: auto; width: 20px; height: 20px; color: var(--muted); }
.hc-phones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.hc-phones a { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; background: var(--navy); color: var(--on-color); border-radius: 8px; font-weight: 700; font-size: 1rem; text-decoration: none; }
.hc-phones a:hover { background: var(--navy-2); }
.hc-phones .icon { width: 16px; height: 16px; }
.powered { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: .85rem; padding: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.powered a { color: var(--blue); font-weight: 700; }

.faq { margin-top: 36px; }
.faq h2 { font-size: 1.5rem; margin-bottom: 14px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 20px; font-weight: 700; display: flex; align-items: center; gap: 12px; min-height: 54px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--muted); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: .8fr 1fr 1.1fr; gap: 36px 32px; }
  /* brand row spans the top: text on the left, social icons on the right */
  .foot-about { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .foot-about .foot-brand { grid-column: 1; margin: 0; }
  .foot-about .foot-tag { grid-column: 1; justify-self: start; }
  .foot-about p { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .foot-social { grid-column: 1 / -1; margin-top: 14px; }
}

@media (max-width: 960px) {
  :root { --head-h: 60px; }
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 18px; display: none; box-shadow: 0 16px 30px rgba(19, 102, 159, .16); overflow: hidden; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px; gap: 2px; }
  .nav a { padding: 12px 16px; font-size: 1.1rem; font-weight: 600; border-radius: 12px; }
  .tb-mail, .tb-news { display: none !important; }
  .class-grid { grid-template-columns: repeat(2, 1fr); max-width: 740px; margin-inline: auto; }
  .head-cta .txt-long { display: none; }

  .intro .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-cta { grid-template-columns: 1fr 1fr; }

  .contact-grid, .sp-grid { grid-template-columns: 1fr; }
  .ab-top { grid-template-columns: 1fr; gap: 48px; }
  /* phones/tablets: photo, then name and text, then the fact cards */
  .ab-side { display: contents; }
  .ab-photo { order: 1; }
  .ab-intro { order: 2; }
  .ab-facts { order: 3; max-width: 640px; width: 100%; margin-inline: auto; }
  .ab-photo { width: calc(100% - 60px); max-width: 400px; margin-inline: auto; }
  .letter-desk { height: 470px; }
  .letter-stage .l-btn { top: 235px; }
  .l-prev { left: 0; }
  .l-next { right: 0; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 720px) {
  .class-grid { grid-template-columns: 1fr; max-width: 480px; }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 32px; }
  .foot-about { display: block; }
  .foot-about .foot-brand { margin-bottom: 14px; }
  .foot-about p { margin: 14px 0 18px; }
  .foot-social { margin-top: 0; }
  .site-foot h4 { margin-bottom: 14px; }
  /* page links wrap as a compact row instead of a tall list */
  .foot-links { display: flex; flex-wrap: wrap; gap: 8px; }
  .foot-links a { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .92rem; }
  .foot-links a:hover { translate: 0 0; }
  .site-foot .foot-grades { max-width: 320px; }
  /* leave room so the floating WhatsApp button never covers the credits */
  .site-foot:has(~ .float-wa) .foot-bottom { padding-bottom: 92px; }
  .foot-bottom .wrap { flex-direction: column; text-align: center; }
  html { font-size: 93.75%; }
  .slider-frame { aspect-ratio: 3 / 4; min-height: 0; max-height: none; }
  .s-btn { display: none; }
  .hs-inner { grid-template-columns: 1fr; padding-inline: 20px; }
  .hs-copy { align-self: start; padding-block: calc(var(--nav-space) + 18px) 0; max-width: 74%; }
  .hs-title { font-size: clamp(2rem, 8.4vw, 2.6rem); line-height: 1.12; }
  .hs-name { margin: 12px 0 16px; }
  .hs-name b { font-size: 1.3rem; }
  .hs-name span { font-size: .95rem; }
  .hs-login { min-height: 48px; font-size: 1.05rem; padding-inline: 1em; }
  .hs-lbl { font-size: .9rem; margin-top: 4px; }
  .hs-grades { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px; }
  .hs-grades a { --grow: 80px; width: 46px; height: 46px; font-size: 1.35rem; border-radius: 10px; }
  .hs-grades a:is(:hover, :focus-visible) .icon { width: 18px; }
  .hs-art { position: absolute; right: -12%; bottom: 0; width: 76%; height: 74%; }
  .slide .hs-photo { height: calc(100% / var(--fill)); }
  .hs-sym span { font-size: 2.6rem !important; }
  .intro { padding: 32px 0 40px; }
  .section { padding: 60px 0; }
  .brand-sub { display: none; }
  .brand img { width: 46px; }
  .brand-name { font-size: 1.35rem; }


  .why-grid { grid-template-columns: 1fr; }
  .letter-desk { height: 380px; }
  .letter-stage .q { font-size: 7rem; }
  .letter-stage .l-btn { top: 190px; width: 46px; height: 46px; margin-top: -23px; }
  .l-prev { left: -6px; }
  .l-next { right: -6px; }
  .q-open { left: -4px; top: -18px; }
  .q-close { right: -4px; bottom: 60px; }
  .letter { max-width: 86%; }
  .letter.tall { max-width: 64%; }
  .lv-close { top: 6px; right: 6px; }
  .cards { grid-template-columns: 1fr; }
  .ccard.big { grid-column: auto; }

  /* timetable → stacked cards */
  .tt-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .tt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tt, .tt tbody, .tt tr, .tt td { display: block; width: 100%; }
  .tt tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
  .tt tbody tr:nth-child(even) td { background: transparent; }
  .tt tbody tr + tr td { border-top: 0; }
  .tt td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line) !important; text-align: right; }
  .tt td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .9rem; text-align: left; }
  .tt td:first-child { border-top: 0 !important; background: var(--bg-alt) !important; }
  .tt td:first-child::before { display: none; }

  .float-wa .lbl { display: none; }
  .float-wa { padding: 0; width: 58px; justify-content: center; }

  /* classroom: the two photos side by side on top, the three clips in a row beneath */
  .cv-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cv-list > :nth-child(1) { grid-area: 1 / 1 / 2 / 4; }
  .cv-list > :nth-child(2) { grid-area: 1 / 4 / 2 / 7; }
  .cv-list > :nth-child(3) { grid-area: 2 / 1 / 3 / 3; }
  .cv-list > :nth-child(4) { grid-area: 2 / 3 / 3 / 5; }
  .cv-list > :nth-child(5) { grid-area: 2 / 5 / 3 / 7; }
  .cm-li { aspect-ratio: 4 / 3; }
  .results-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 520px) {
  .ab-facts { grid-template-columns: 1fr; }
  .ab-quote { padding: 18px 18px 18px 58px; }
  .ab-quote::before { left: 14px; font-size: 3.8rem; }
  .ab-seal { right: -30px; bottom: 30px; width: 112px; height: 112px; }
  .ab-seal b { font-size: 2.1rem; }
  .ab-photo::after { left: -22px; width: 80px; }
  .class-vids { margin-top: 28px; padding: 14px; }
  .cv-list { gap: 8px; }
  .results-img { padding: 6px; }
  .site-head { padding: 8px 10px 0; }
  .devbar .wrap { justify-content: center; }
  .db-support { margin-right: 0; }
  .db-long { display: none; }
  .db-short { display: inline; }
  .menu-btn { padding: 0 12px; }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .grades { grid-template-columns: 1fr; gap: 14px; }
  .hero-cta { grid-template-columns: 1fr; }
  .s-btn { width: 44px; height: 44px; }
  .s-prev { left: 10px; }
  .s-next { right: 10px; }
  .go-card .top { padding: 18px; gap: 14px; }
  .go-card .top .gbadge { width: 60px; height: 60px; }
  .go-card .top .gbadge b { font-size: 1.8rem; }
  .go-card .body { padding: 18px; }
  .btn-xl { width: 100%; font-size: 1.15rem; padding: .6em 1em; }
}

@media (max-width: 420px) {
  .site-head .wrap { gap: 8px; padding-inline: 14px 8px; }
  .brand { gap: 6px; }
  .brand img { width: 38px; }
  .brand-name { font-size: 1.15rem; white-space: normal; line-height: 1.05; max-width: 5.5em; }
  .menu-btn { padding: 0 10px; }
  .head-cta { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn-lms, .btn-lms:hover, .btn-lms:focus-visible { translate: none !important; }
}
