/* Fonts (stored on this site, nothing loaded from Google) */
@font-face{font-family:Lexend;font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/08328e320c8f68d1-s.0k8kxrcfbaq1s.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Lexend;font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/ce5b45ab00236ec9-s.17thoc14mwfyx.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Lexend;font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/ca31d6821328a4e9-s.p.2svk7cnw5x6df.woff2)format("woff2");unicode-range:U+0000-00FF,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Lexend Fallback;src:local(Arial);ascent-override:90.98%;descent-override:22.74%;line-gap-override:0.0%;size-adjust:109.91%}
@font-face{font-family:Fredoka;font-style:normal;font-weight:500;font-stretch:100%;font-display:swap;src:url(fonts/b6df7c92285ebcd2-s.0y4xxz2y19qqs.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Fredoka;font-style:normal;font-weight:500;font-stretch:100%;font-display:swap;src:url(fonts/eeba9b1ad34c1404-s.0yczt4r3j28ff.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Fredoka;font-style:normal;font-weight:500;font-stretch:100%;font-display:swap;src:url(fonts/5d52bd6c4cb3f315-s.p.0ez3bnoxb63ra.woff2)format("woff2");unicode-range:U+0000-00FF,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Fredoka;font-style:normal;font-weight:600;font-stretch:100%;font-display:swap;src:url(fonts/b6df7c92285ebcd2-s.0y4xxz2y19qqs.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Fredoka;font-style:normal;font-weight:600;font-stretch:100%;font-display:swap;src:url(fonts/eeba9b1ad34c1404-s.0yczt4r3j28ff.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Fredoka;font-style:normal;font-weight:600;font-stretch:100%;font-display:swap;src:url(fonts/5d52bd6c4cb3f315-s.p.0ez3bnoxb63ra.woff2)format("woff2");unicode-range:U+0000-00FF,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Fredoka;font-style:normal;font-weight:700;font-stretch:100%;font-display:swap;src:url(fonts/b6df7c92285ebcd2-s.0y4xxz2y19qqs.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:Fredoka;font-style:normal;font-weight:700;font-stretch:100%;font-display:swap;src:url(fonts/eeba9b1ad34c1404-s.0yczt4r3j28ff.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Fredoka;font-style:normal;font-weight:700;font-stretch:100%;font-display:swap;src:url(fonts/5d52bd6c4cb3f315-s.p.0ez3bnoxb63ra.woff2)format("woff2");unicode-range:U+0000-00FF,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Fredoka Fallback;src:local(Arial);ascent-override:95.64%;descent-override:23.17%;line-gap-override:0.0%;size-adjust:101.84%}
:root{--font-lexend:Lexend,"Lexend Fallback";--font-fredoka:Fredoka,"Fredoka Fallback"}

/* Daniya Alam: website + portal styles.
   Palette "little learners": new eraser #FCC4DC, cheerful pink #E63F7A,
   school bus #FEA816, aqua crayon #2BC2BD, blue sneakers #5D96D0.
   All colours live in the variables below; dark mode swaps them. */

:root {
  --eraser: #fcc4dc;
  --pink: #e63f7a;
  --bus: #fea816;
  --aqua: #2bc2bd;
  --sneakers: #5d96d0;

  /* Slightly deeper versions, used where text must stay easy to read. */
  --pink-ink: #c42662;
  --aqua-ink: #11807c;
  --blue-ink: #2f6dae;
  --bus-ink: #8a5400;

  --bg: #fff8f3;
  --surface: #ffffff;
  --surface-2: #fff2f7;
  --tint-aqua: #e3f7f6;
  --tint-blue: #e8f0fa;
  --tint-bus: #fff3dc;
  --text: #1f2340;
  --muted: #5f6380;
  --border: #f1e1e9;
  --primary: #d6336f;
  --primary-hover: #c42662;
  --primary-ink: #ffffff;
  --focus: #5d96d0;
  --success: #11807c;
  --success-bg: #e3f7f6;
  --danger: #c42662;
  --danger-bg: #fde8f0;
  --warning-bg: #fff3dc;
  --card-yellow: #fea816;
  --ink-on-yellow: #2b1a00;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 35, 64, 0.05), 0 8px 24px rgba(230, 63, 122, 0.07);
  --gutter: 16px;
  --font-body: var(--font-lexend), system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-fredoka), var(--font-lexend), system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17141f;
    --surface: #211d2c;
    --surface-2: #2a2438;
    --tint-aqua: #163232;
    --tint-blue: #1b2638;
    --tint-bus: #33270f;
    --text: #f6f1f5;
    --muted: #b6adc3;
    --border: #393148;
    --primary: #f06a9a;
    --primary-hover: #ff8db5;
    --primary-ink: #1d0d15;
    --pink-ink: #ff8db5;
    --aqua-ink: #5fe0da;
    --blue-ink: #92bdf0;
    --bus-ink: #ffc75c;
    --success: #5fe0da;
    --success-bg: #163232;
    --danger: #ff8db5;
    --danger-bg: #3a1c29;
    --warning-bg: #33270f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #17141f;
  --surface: #211d2c;
  --surface-2: #2a2438;
  --tint-aqua: #163232;
  --tint-blue: #1b2638;
  --tint-bus: #33270f;
  --text: #f6f1f5;
  --muted: #b6adc3;
  --border: #393148;
  --primary: #f06a9a;
  --primary-hover: #ff8db5;
  --primary-ink: #1d0d15;
  --pink-ink: #ff8db5;
  --aqua-ink: #5fe0da;
  --blue-ink: #92bdf0;
  --bus-ink: #ffc75c;
  --success: #5fe0da;
  --success-bg: #163232;
  --danger: #ff8db5;
  --danger-bg: #3a1c29;
  --warning-bg: #33270f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: var(--pink-ink);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.4em;
  font-weight: 600;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 0.8em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 8px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex: none;
  transform: rotate(-4deg);
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bus);
  border: 2px solid var(--bg);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.1;
  white-space: nowrap;
}

.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Headers (website and portal) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 64px;
}

.header-spacer {
  flex: 1;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--surface-2);
}

@media (min-width: 1140px) {
  .site-nav {
    display: flex;
  }
  .mobile-menu {
    display: none;
  }
}

.btn.header-cta {
  display: none;
}

@media (min-width: 640px) {
  .btn.header-cta {
    display: inline-flex;
  }
}

.mobile-menu {
  position: relative;
}

.mobile-menu > summary {
  list-style: none;
}

.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
}

.mobile-menu__panel a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.mobile-menu__panel a:hover {
  background: var(--surface-2);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.header-user__name {
  color: var(--muted);
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn,
.header-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  min-width: 40px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.icon-btn {
  padding: 0;
  display: grid;
  place-items: center;
}

.icon-btn:hover,
.header-btn:hover {
  background: var(--surface-2);
}

@media (max-width: 480px) {
  .header-user__name,
  .brand__sub {
    display: none;
  }
}

/* Portal tabs under the header */
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter) 10px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.94rem;
  border: 1px solid transparent;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--pink-ink);
  background: var(--surface-2);
  border-color: var(--eraser);
  font-weight: 500;
}

/* ---------- Playful background with maths symbols ---------- */

.doodles {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.doodles::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='180' viewBox='0 0 220 180'%3E%3Cg font-family='Arial' font-weight='700' font-size='22'%3E%3Ctext x='14' y='34' fill='%23E63F7A' fill-opacity='.16'%3E%2B%3C/text%3E%3Ctext x='92' y='70' fill='%232BC2BD' fill-opacity='.2'%3E%C3%B7%3C/text%3E%3Ctext x='170' y='30' fill='%23FEA816' fill-opacity='.22'%3E%CF%80%3C/text%3E%3Ctext x='42' y='132' fill='%235D96D0' fill-opacity='.2'%3E%C3%97%3C/text%3E%3Ctext x='132' y='150' fill='%23E63F7A' fill-opacity='.14'%3EA%3C/text%3E%3Ctext x='190' y='104' fill='%232BC2BD' fill-opacity='.18'%3E%3D%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 180px;
}

/* ---------- Page layout (portal) ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.page-head p {
  color: var(--muted);
  margin: 0;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.breadcrumb a {
  text-decoration: none;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page {
    padding-top: 32px;
  }
  h1 {
    font-size: 2.1rem;
  }
}

.stack {
  display: grid;
  gap: 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.row--between {
  justify-content: space-between;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.88rem;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card--flat {
  box-shadow: none;
  background: var(--surface-2);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-title h2,
.card-title h3 {
  margin: 0;
}

.next-class {
  background: var(--card-yellow);
  color: var(--ink-on-yellow);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.next-class::after {
  content: "+ ÷ ×";
  position: absolute;
  right: 16px;
  bottom: -14px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  opacity: 0.35;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.next-class__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.next-class h2 {
  margin: 4px 0 6px;
  font-size: 1.4rem;
}

.next-class p {
  margin: 0;
}

.stat {
  display: grid;
  gap: 2px;
  align-content: start;
  border-top: 5px solid var(--accent, var(--pink));
}

.list-link.stat {
  display: grid;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
}

.stat__label {
  color: var(--muted);
  font-size: 0.9rem;
}

.accent-pink {
  --accent: var(--pink);
}

.accent-aqua {
  --accent: var(--aqua);
}

.accent-blue {
  --accent: var(--sneakers);
}

.accent-bus {
  --accent: var(--bus);
}

.child-card,
.list-link.child-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--accent, var(--sneakers));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list > li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.list > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.list > li:last-child {
  padding-bottom: 0;
}

.list-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
}

.list-link:hover .list-link__title {
  color: var(--pink-ink);
  text-decoration: underline;
}

.list-link__title {
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--tint-blue);
  color: var(--blue-ink);
  white-space: nowrap;
}

.badge--ok {
  background: var(--tint-aqua);
  color: var(--aqua-ink);
}

.badge--off {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge--warn {
  background: var(--tint-bus);
  color: var(--bus-ink);
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}

dl.facts dt {
  color: var(--muted);
}

dl.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label,
.field legend {
  font-weight: 500;
  font-size: 0.94rem;
}

.field__hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.field__error {
  color: var(--danger);
  font-size: 0.86rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px stops iPhones zooming in */
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-height: 48px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sneakers);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--surface-2);
}

.btn--danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--border);
}

.btn--danger:hover {
  background: var(--danger-bg);
}

.btn--small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.btn--block {
  width: 100%;
}

.btn--large {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.94rem;
}

.alert--error {
  background: var(--danger-bg);
  color: var(--danger);
}

.alert--ok {
  background: var(--success-bg);
  color: var(--success);
}

.alert--info {
  background: var(--warning-bg);
  color: var(--text);
}

.secret {
  border: 2px dashed var(--aqua);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--tint-aqua);
  display: grid;
  gap: 10px;
}

.secret code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  overflow-wrap: anywhere;
}

details.disclosure {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

details.disclosure > summary {
  cursor: pointer;
  color: var(--pink-ink);
  font-weight: 500;
  list-style: none;
  min-height: 32px;
  display: flex;
  align-items: center;
}

details.disclosure > summary::-webkit-details-marker {
  display: none;
}

details.disclosure > summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  font-weight: 700;
}

details.disclosure[open] > summary::before {
  content: "−";
}

details.disclosure[open] > summary {
  margin-bottom: 12px;
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid var(--border);
  min-height: 120px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

.empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.toolbar .field {
  flex: 1 1 200px;
}

.toolbar select {
  min-width: 140px;
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: calc(100dvh - 65px);
  display: grid;
  align-items: start;
  padding: 28px var(--gutter) 56px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 4px;
}

.login-card .lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 20px;
}

/* The Student / Parent sliding switch */
.role-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 20px;
}

.role-switch__thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--thumb, var(--aqua));
  box-shadow: 0 2px 8px rgba(31, 35, 64, 0.15);
  transition: transform 0.25s cubic-bezier(0.3, 0.7, 0.4, 1), background 0.25s ease;
}

.role-switch[data-role="parent"] .role-switch__thumb {
  transform: translateX(100%);
  --thumb: var(--pink);
}

@media (prefers-reduced-motion: reduce) {
  .role-switch__thumb {
    transition: none;
  }
}

.role-switch button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  min-height: 46px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.role-switch button[aria-selected="true"],
.role-switch a[aria-selected="true"] {
  color: #fff;
}

.role-switch a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}

/* ---------- Booking ---------- */

.booking-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.slot-btn {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--tint-aqua);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.slot-btn:hover {
  border-color: var(--aqua);
}

.slot-btn:disabled {
  opacity: 0.6;
}

.slot-btn__time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.slot-btn__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.join-btn {
  background: #fff;
  color: var(--pink-ink);
}

.join-btn:hover {
  background: var(--eraser);
}

.lesson-row {
  display: grid;
  gap: 8px;
}

@media (min-width: 720px) {
  .lesson-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.lesson-row--cancelled {
  opacity: 0.6;
}

.attendance {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.attendance button {
  appearance: none;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  padding: 6px 12px;
  min-height: 36px;
  cursor: pointer;
}

.attendance button + button {
  border-left: 1px solid var(--border);
}

.attendance button[aria-pressed="true"][data-kind="PRESENT"] {
  background: var(--tint-aqua);
  color: var(--aqua-ink);
  font-weight: 600;
}

.attendance button[aria-pressed="true"][data-kind="LATE"] {
  background: var(--tint-bus);
  color: var(--bus-ink);
  font-weight: 600;
}

.attendance button[aria-pressed="true"][data-kind="ABSENT"] {
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 600;
}

.day-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 8px 0;
}

.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.login-illustration {
  display: none;
}

@media (min-width: 900px) {
  .login-wrap {
    align-items: center;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1120px;
    margin: 0 auto;
  }
  .login-illustration {
    display: block;
  }
}

/* ---------- Website ---------- */

.hero {
  padding: 48px 0 56px;
}

.hero__grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 72px 0 88px;
  }
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.eyebrow__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--aqua);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hl-pink {
  color: var(--pink);
}

.hl-aqua {
  color: var(--aqua-ink);
}

.hl-underline {
  background-image: linear-gradient(transparent 62%, var(--eraser) 62%, var(--eraser) 92%, transparent 92%);
}

:root[data-theme="dark"] .hl-underline {
  background-image: linear-gradient(transparent 62%, rgba(230, 63, 122, 0.45) 62%, rgba(230, 63, 122, 0.45) 92%, transparent 92%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hl-underline {
    background-image: linear-gradient(transparent 62%, rgba(230, 63, 122, 0.45) 62%, rgba(230, 63, 122, 0.45) 92%, transparent 92%);
  }
}

.hero__lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34em;
  margin: 18px 0 26px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__art {
  position: relative;
  min-height: 320px;
}

.blob {
  position: absolute;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(31, 35, 64, 0.12);
}

.blob--1 {
  width: 58%;
  height: 58%;
  left: 4%;
  top: 6%;
  background: var(--eraser);
  color: var(--pink-ink);
  font-size: clamp(3rem, 9vw, 5rem);
  transform: rotate(-6deg);
}

.blob--2 {
  width: 34%;
  aspect-ratio: 1;
  right: 6%;
  top: 0;
  background: var(--aqua);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  transform: rotate(8deg);
  border-radius: 50%;
}

.blob--3 {
  width: 40%;
  height: 34%;
  right: 2%;
  bottom: 6%;
  background: var(--bus);
  color: var(--ink-on-yellow);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  transform: rotate(-3deg);
}

.blob--4 {
  width: 36%;
  height: 30%;
  left: 14%;
  bottom: 0;
  background: var(--sneakers);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  transform: rotate(4deg);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.trust li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tint-aqua);
  color: var(--aqua-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.section {
  padding: 56px 0;
}

.section--tint {
  background: var(--surface-2);
}

.section__head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section__head p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section__kicker {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pink-ink);
  margin-bottom: 6px;
}

@media (min-width: 900px) {
  .section {
    padding: 80px 0;
  }
  .section h2 {
    font-size: 2.1rem;
  }
}

.feature {
  border-top: 6px solid var(--accent, var(--pink));
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent, var(--pink));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.feature ul {
  margin: 10px 0 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 58px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bus);
  color: var(--ink-on-yellow);
  font-family: var(--font-display);
  font-weight: 700;
}

.plan__price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--pink-ink);
  margin: 4px 0 8px;
}

.about {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.about__photo {
  aspect-ratio: 4 / 5;
  border-radius: 32px;
  background: linear-gradient(160deg, var(--eraser), var(--sneakers));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  transform: rotate(-2deg);
}

.cta-band {
  background: var(--pink);
  color: #fff;
  border-radius: 32px;
  padding: 36px 24px;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  opacity: 0.92;
  max-width: 36em;
  margin: 0 auto 20px;
}

.cta-band .btn {
  background: #fff;
  color: var(--pink-ink);
}

.cta-band .btn:hover {
  background: var(--eraser);
}

.placeholder-note {
  border: 2px dashed var(--bus);
  background: var(--tint-bus);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  font-size: 0.94rem;
}

.page-hero {
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  max-width: 22ch;
}

.page-hero__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 40em;
  margin: 12px 0 0;
}

.prose {
  max-width: 720px;
  font-size: 1.04rem;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose h3 {
  margin-top: 1.3em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin: 0.3em 0;
}

.prose .tip {
  background: var(--tint-aqua);
  border-left: 5px solid var(--aqua);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 1.2em 0;
}

.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  float: right;
  color: var(--pink-ink);
  font-weight: 700;
}

.faq__item[open] summary::after {
  content: "−";
}

.faq__item p {
  margin: 10px 0 0;
  color: var(--muted);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

.card-link:hover {
  transform: translateY(-2px);
}

.card-link:hover h3 {
  color: var(--pink-ink);
}

.tool-box {
  background: var(--surface);
  border: 2px solid var(--eraser);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.big-question {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 700;
  text-align: center;
  margin: 10px 0;
}

.answer-input {
  font-family: var(--font-display) !important;
  font-size: 2rem !important;
  text-align: center;
  max-width: 220px;
  margin: 0 auto;
  display: block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  min-width: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

.score-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.score-row strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.feedback {
  text-align: center;
  font-weight: 600;
  min-height: 1.6em;
}

.feedback--right {
  color: var(--aqua-ink);
}

.feedback--wrong {
  color: var(--danger);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.result-table th,
.result-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Portal shell: side menu (computers) and bottom bar (phones) ---------- */

.sidebar {
  display: none;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.bottom-bar__link {
  appearance: none;
  flex: 1 1 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 2px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.bottom-bar__link[aria-current="page"],
.bottom-bar__link[aria-expanded="true"] {
  color: var(--pink-ink);
  background: var(--surface-2);
  font-weight: 600;
}

.portal-main {
  padding-bottom: 110px;
}

.more-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.more-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
}

.more-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
}

.sidebar__group {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.sidebar__title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 12px 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.97rem;
}

.sidebar__link svg {
  color: var(--muted);
  flex: none;
}

.sidebar__link:hover {
  background: var(--surface-2);
}

.sidebar__link[aria-current="page"] {
  background: var(--surface-2);
  color: var(--pink-ink);
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--pink);
}

.sidebar__link[aria-current="page"] svg {
  color: var(--pink-ink);
}

@media (min-width: 900px) {
  .sidebar {
    display: block;
    position: fixed;
    top: 65px;
    bottom: 0;
    left: 0;
    width: 240px;
    overflow-y: auto;
    padding: 20px 12px;
    border-right: 1px solid var(--border);
    background: var(--bg);
  }
  .bottom-bar,
  .more-sheet {
    display: none;
  }
  .portal-main {
    margin-left: 240px;
    max-width: 1100px;
    padding-bottom: 64px;
  }
  .portal .site-header__bar {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hide-small {
    display: none;
  }
}

/* ---------- Welcome guide ---------- */

.guide {
  border: 2px solid var(--eraser);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.guide__steps {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .guide__steps {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.guide__step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 12px 12px 14px;
}

.guide__step > svg {
  color: var(--pink-ink);
  margin-top: 2px;
}

.guide__num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bus);
  color: var(--ink-on-yellow);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Page intro, child switcher, action tiles ---------- */

.page-intro {
  color: var(--muted);
  margin: -4px 0 0;
  max-width: 46em;
}

.child-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.child-switch a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.child-switch a[aria-current="true"] {
  border-color: var(--pink);
  background: var(--surface-2);
  color: var(--pink-ink);
}

.child-switch .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.85rem;
}

.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tile {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent, var(--pink));
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  min-height: 110px;
}

.tile:hover {
  transform: translateY(-2px);
}

.tile svg {
  color: var(--accent, var(--pink));
}

.tile__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.tile__note {
  font-size: 0.85rem;
  color: var(--muted);
}

.tile--big {
  min-height: 150px;
  font-size: 1.1rem;
}

.tile--big svg {
  width: 36px;
  height: 36px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.todo-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.todo-list a:hover {
  outline: 2px solid var(--eraser);
}

.todo-count {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
}

.todo-list a > svg:last-child {
  margin-left: auto;
  color: var(--muted);
}

/* ---------- Charts (colours checked for colour-blind readability, light and dark) ---------- */

:root {
  --chart-bar: #5d96d0;
  --att-present: #0f9c96;
  --att-late: #e08a00;
  --att-absent: #c42662;
}

:root[data-theme="dark"] {
  --chart-bar: #6fa4dc;
  --att-present: #24aaa4;
  --att-late: #c98208;
  --att-absent: #e04c84;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chart-bar: #6fa4dc;
    --att-present: #24aaa4;
    --att-late: #c98208;
    --att-absent: #e04c84;
  }
}

.chart__svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart__grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart__axis {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--font-body);
}

.chart__label {
  fill: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
}

.chart__bar {
  fill: var(--chart-bar);
}

.chart__hit:hover .chart__bar,
.chart__hit:focus .chart__bar {
  fill: var(--blue-ink);
}

.att-bar {
  display: flex;
  gap: 2px;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
}

.att-bar__seg {
  min-width: 6px;
}

.att-bar__seg--present {
  background: var(--att-present);
}

.att-bar__seg--late {
  background: var(--att-late);
}

.att-bar__seg--absent {
  background: var(--att-absent);
}

.chart-legend {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend strong {
  color: var(--text);
}

.chart-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.meter {
  height: 14px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--att-present);
}

.big-stat {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.trend-up {
  color: var(--success);
  font-weight: 600;
}

.trend-down {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- Tests ---------- */

.question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.question-dot {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.question-dot[data-done="true"] {
  background: var(--tint-aqua);
  border-color: var(--aqua);
  color: var(--aqua-ink);
}

.question-dot[aria-current="step"] {
  border-color: var(--pink);
  border-width: 3px;
  color: var(--text);
  font-weight: 700;
}

.question-prompt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  white-space: pre-wrap;
  margin: 0;
}

.question-image {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius-sm);
  background: #fff;
  justify-self: start;
}

.answer-options {
  display: grid;
  gap: 10px;
}

.answer-option {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
}

.answer-option:hover {
  border-color: var(--sneakers);
}

.answer-option[aria-checked="true"] {
  border-color: var(--pink);
  background: var(--surface-2);
}

.answer-option__letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint-blue);
  color: var(--blue-ink);
  font-weight: 700;
}

.answer-option[aria-checked="true"] .answer-option__letter {
  background: var(--pink);
  color: #fff;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.review-item--right {
  border-left: 6px solid var(--aqua);
}

.review-item--wrong {
  border-left: 6px solid var(--pink);
}

.check-list {
  display: grid;
  gap: 4px 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  min-width: 80px;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--aqua);
}

.consent-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 16px 18px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--pink-ink);
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer h3 {
  font-size: 1rem;
  color: var(--text);
}

/* Parent dashboard: keep the three numbers side by side, even on phones */
.perf-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 600px) {
  .perf-stats .stat {
    padding: 12px 10px;
  }
  .perf-stats .big-stat {
    font-size: 1.6rem;
  }
  .perf-stats .stat__label {
    font-size: 0.78rem;
  }
}
/* the chart shrinks on phones, so draw its text larger to stay readable */
@media (max-width: 600px) {
  .chart__axis {
    font-size: 17px;
  }
  .chart__label {
    font-size: 19px;
  }
}

/* ---------- PHP version additions ---------- */
a.header-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* Portal pages without the side menu (e.g. "choose your own password") sit in the middle */
.portal--no-menu .portal-main {
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 64px;
}
/* Anything marked hidden stays hidden, whatever its other styles say */
[hidden] {
  display: none !important;
}
/* Forms never grow wider than the screen: long button labels wrap onto two lines */
.form {
  grid-template-columns: minmax(0, 1fr);
}
.form .btn {
  white-space: normal;
  text-align: center;
  max-width: 100%;
}
/* Wide tables scroll sideways inside their card instead of widening the page */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.stack {
  grid-template-columns: minmax(0, 1fr);
}
/* Phone menu: five items always fit; long names wrap onto two lines */
.bottom-bar__link {
  min-width: 0;
}
.bottom-bar__link span {
  text-align: center;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
/* Hidden screen-reader tables take no room (tables ignore width:1px otherwise) */
table.sr-only {
  display: block;
  max-width: 1px;
}

/* ---------- Monthly reports ---------- */
.rating-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rating-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.rating { display: inline-flex; align-items: center; gap: 5px; }
.rating__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.rating__dot--on { background: var(--aqua); border-color: var(--aqua); }
.rating .small { margin-left: 6px; color: var(--muted); }
.rating-pick { display: grid; gap: 6px; }
.rating-pick__name { font-weight: 600; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.88rem; }
.chip-radio input:checked + span { background: var(--pink); border-color: var(--pink); color: #fff; font-weight: 600; }
.chip-radio input:focus-visible + span { outline: 3px solid var(--focus, var(--blue)); outline-offset: 2px; }

/* Printing a report or invoice: just the page content */
@media print {
  .site-header, .sidebar, .bottom-bar, .more-sheet, .breadcrumb, [data-print], .guide { display: none !important; }
  .portal-main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { box-shadow: none !important; break-inside: avoid; }
}

/* ---------- Invoices ---------- */
.invoice-line { display: grid; grid-template-columns: minmax(0, 1fr) 64px 110px; gap: 8px; }
@media (max-width: 520px) {
  .invoice-line { grid-template-columns: minmax(0, 1fr) 54px 84px; }
}
.invoice tfoot th { font-size: 1.05rem; }
@media print {
  [data-print-hide] { display: none !important; }
}

/* Homework files: photo previews and file links */
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.file-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 160px; }
.file-thumb { display: block; width: 140px; height: 105px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-doc { display: flex; align-items: center; gap: 8px; width: 140px; min-height: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; }
.file-doc__ext { font-weight: 700; font-size: .75rem; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.file-doc__name { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.upload-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; }
.upload-form .row { flex-wrap: wrap; gap: 8px; }
.upload-form input[type=file] { max-width: 100%; min-width: 0; flex: 1 1 200px; font-size: .9rem; }

/* Media page */
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; min-width: 0; }
.media-card__tick { position: absolute; top: 18px; left: 18px; z-index: 1; background: var(--surface); border-radius: 6px; padding: 2px 4px; line-height: 1; }
.media-card__preview { display: flex; align-items: center; justify-content: center; height: 150px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; }
.media-card__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card__preview--doc .file-doc__ext { font-size: 1.1rem; padding: 6px 12px; background: var(--surface); }
.media-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.media-card__name { overflow-wrap: anywhere; }

/* Home page extras */
.section--tight { padding-top: 0; }
.home-stats { list-style: none; margin: -24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.home-stats .stat__value { font-size: 1.6rem; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--pink-ink); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.portal-preview { display: grid; gap: 10px; padding: 18px; max-width: 360px; width: 100%; justify-self: center; }
.portal-preview__bar { display: flex; gap: 6px; margin-bottom: 4px; }
.portal-preview__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.portal-preview__row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 5px solid var(--accent, var(--pink)); font-size: .92rem; }
.portal-preview__row span { color: var(--muted); }

