/* =============================================================
   KAYAN — BASE & COMPONENT STYLES
   All values reference tokens from tokens.css
   ============================================================= */

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--color-bg); color: var(--color-ink); }
body {
  font-family: var(--font-body);
  font-size: var(--fs-3);
  font-weight: var(--weight-body);
  line-height: var(--lh-body);
  background: var(--color-bg);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  margin: 0;
  color: var(--color-ink);
}
p { margin: 0; }
::selection { background: var(--color-primary); color: var(--color-primary-ink); }

/* ---------- Layout helpers ---------- */
.container { max-width: 1240px; margin-inline: auto; padding-inline: var(--s-6); }
.row { display: flex; gap: var(--s-4); align-items: center; }
.col { display: flex; flex-direction: column; gap: var(--s-4); }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--color-line); width: 100%; }
.muted { color: var(--color-mute); }
.eyebrow {
  font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .14em;
  font-weight: 600; color: var(--color-primary);
}
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--color-primary-soft); color: var(--color-primary);
  font-size: var(--fs-1); font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--color-primary);
  --fg: var(--color-primary-ink);
  --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-2);
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bd);
  font-weight: 600; font-size: var(--fs-3);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.btn--ghost {
  --bg: transparent; --fg: var(--color-ink); --bd: var(--color-line-2);
}
.btn--ghost:hover { background: var(--color-surface-2); }

.btn--quiet {
  --bg: var(--color-surface-2); --fg: var(--color-ink); --bd: transparent;
}
.btn--soft {
  --bg: var(--color-primary-soft); --fg: var(--color-primary); --bd: transparent;
}
.btn--lg { padding: 14px 22px; font-size: var(--fs-4); border-radius: var(--r-3); }
.btn--sm { padding: 6px 12px; font-size: var(--fs-2); border-radius: var(--r-1); }
.btn--icon { padding: 8px; aspect-ratio: 1/1; border-radius: var(--r-2); }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.card--interactive { cursor: pointer; }
.card--interactive:hover {
  border-color: var(--color-line-2); transform: translateY(-2px); box-shadow: var(--sh-2);
}
.card--flush { padding: 0; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--fs-2); font-weight: 600; color: var(--color-ink-2); }
.field__hint  { font-size: var(--fs-1); color: var(--color-mute); }
.input, .select, .textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-line-2);
  border-radius: var(--r-2);
  padding: 11px 14px;
  font-size: var(--fs-3);
  color: var(--color-ink);
  font-family: var(--font-body);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--color-focus);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-focus) 18%, transparent);
}
.input::placeholder { color: var(--color-mute); }

/* ---------- Badges & Chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--color-surface-2);
  color: var(--color-ink-2);
  font-size: var(--fs-1);
  font-weight: 600;
  border: 1px solid var(--color-line);
}
.badge--primary { background: var(--color-primary-soft); color: var(--color-primary); border-color: transparent; }
.badge--success { background: color-mix(in oklab, var(--color-accent) 16%, transparent); color: var(--color-accent); border-color: transparent; }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Switcher pills ---------- */
.seg {
  display: inline-flex;
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.seg__btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: var(--fs-2); font-weight: 600;
  color: var(--color-mute);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--dur-1) var(--ease);
}
.seg__btn--active {
  background: var(--color-surface); color: var(--color-ink);
  box-shadow: var(--sh-1);
}
[data-mode="dark"] .seg__btn--active { background: var(--color-line); color: var(--color-ink); }

/* ---------- Top bar (used by marketing + dashboards) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--color-surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--color-line);
}
.topbar__inner {
  display: flex; align-items: center; gap: var(--s-4);
  padding-block: 14px;
}
.topbar nav { display: flex; gap: var(--s-5); }
.topbar nav a {
  color: var(--color-ink-2); font-size: var(--fs-3); font-weight: 500;
  padding: 6px 0; border-radius: 4px;
}
.topbar nav a:hover { color: var(--color-ink); }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-4); letter-spacing: -0.01em;
  color: var(--color-ink);
}
.logo svg { width: 28px; height: 28px; }

/* ---------- Sidebar (dashboard) ---------- */
.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
  background: var(--color-bg);
}
.sidebar {
  background: var(--color-surface);
  border-inline-end: 1px solid var(--color-line);
  padding: var(--s-6) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-5);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__section { display: flex; flex-direction: column; gap: 2px; }
.sidebar__heading {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--color-mute); font-weight: 700; padding: 8px 12px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-2);
  color: var(--color-ink-2);
  font-size: var(--fs-3); font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  border: 0; background: transparent; width: 100%; text-align: start;
  font-family: var(--font-body);
}
.nav-item__icon {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--color-mute);
}
.nav-item:hover { background: var(--color-surface-2); color: var(--color-ink); }
.nav-item:hover .nav-item__icon { color: var(--color-ink); }
.nav-item--active {
  background: var(--color-primary-soft); color: var(--color-primary);
}
.nav-item--active .nav-item__icon { color: var(--color-primary); }
.nav-item__badge {
  margin-inline-start: auto; font-size: var(--fs-1);
  background: var(--color-surface-2); color: var(--color-ink-2);
  padding: 1px 7px; border-radius: var(--r-pill); font-weight: 600;
}

.main { display: flex; flex-direction: column; min-width: 0; }
.dashtop {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 14px var(--s-7);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}
.search {
  flex: 1; max-width: 420px;
  position: relative;
}
.search input {
  background: var(--color-surface-2); border: 1px solid transparent;
  padding-inline-start: 38px;
}
.search svg {
  position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--color-mute);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), color-mix(in oklab, var(--color-primary) 60%, var(--color-accent)));
  color: var(--color-primary-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-2);
}
.content { padding: var(--s-7); flex: 1; }

/* ---------- Hero / marketing ---------- */
.hero {
  padding-block: var(--s-10) var(--s-9);
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-primary);
  position: relative;
}
.hero h1 em::after {
  content: "";
  position: absolute; inset: auto 0 4%; height: 14%;
  background: var(--brand-accent); opacity: 0.35; z-index: -1;
  border-radius: 2px;
}
.hero p.lead {
  font-size: var(--fs-5);
  color: var(--color-ink-2); max-width: 58ch;
  line-height: 1.5;
}

/* Section utility */
.section { padding-block: var(--s-10); }
.section--alt { background: var(--color-surface-2); }
.section h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
}

/* Grid utilities */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* Feature card */
.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  padding: var(--s-6);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.feature:hover { transform: translateY(-3px); border-color: var(--color-line-2); }
.feature__icon {
  width: 44px; height: 44px;
  border-radius: var(--r-2);
  background: var(--color-primary-soft); color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature h3 { font-size: var(--fs-5); }
.feature p { color: var(--color-mute); font-size: var(--fs-3); }

/* Role card */
.rolecard {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  padding: var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-4);
  transition: all var(--dur-2) var(--ease);
  position: relative; overflow: hidden;
}
.rolecard::after {
  content: ""; position: absolute; inset: auto -20% -40% auto;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--role-tint, var(--color-primary)); opacity: .07;
  transition: opacity var(--dur-2) var(--ease);
}
.rolecard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.rolecard:hover::after { opacity: .14; }
.rolecard__mark {
  width: 52px; height: 52px;
  border-radius: var(--r-3);
  background: var(--role-tint-soft, var(--color-primary-soft));
  color: var(--role-tint, var(--color-primary));
  display: inline-flex; align-items: center; justify-content: center;
}
.rolecard h3 { font-size: var(--fs-5); }
.rolecard ul { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rolecard li { font-size: var(--fs-2); color: var(--color-ink-2); display: flex; gap: 8px; align-items: center; }
.rolecard li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--role-tint, var(--color-primary)); flex-shrink: 0;
}

/* Pricing */
.tier {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  padding: var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-4);
  position: relative;
}
.tier--featured {
  border-color: var(--color-primary);
  box-shadow: var(--sh-2);
}
.tier--featured::before {
  content: attr(data-flag);
  position: absolute; inset-block-start: -10px; inset-inline-start: var(--s-6);
  background: var(--color-primary); color: var(--color-primary-ink);
  font-size: var(--fs-1); font-weight: 700; padding: 4px 10px;
  border-radius: var(--r-pill); letter-spacing: 0.04em;
}
.tier h3 { font-size: var(--fs-5); }
.tier .price { font-family: var(--font-display); font-size: var(--fs-8); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.tier .price small { font-size: var(--fs-3); color: var(--color-mute); font-weight: 500; letter-spacing: 0; }
.tier ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tier li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-3); }
.tier li svg { color: var(--color-accent); flex-shrink: 0; margin-top: 2px; }

/* Footer */
.footer {
  border-top: 1px solid var(--color-line);
  padding-block: var(--s-9) var(--s-7);
  background: var(--color-surface);
}
.footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--s-7); }
.footer__grid h4 { font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .12em; color: var(--color-mute); font-weight: 700; margin-bottom: var(--s-3); }
.footer__grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__grid a { color: var(--color-ink-2); font-size: var(--fs-3); }
.footer__grid a:hover { color: var(--color-ink); }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* Theme preview tile (settings strip on landing & login) */
.themetile {
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  padding: 14px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--color-surface);
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.themetile:hover { transform: translateY(-2px); }
.themetile--active { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.themetile__swatches { display: flex; gap: 4px; }
.themetile__sw { width: 100%; height: 18px; border-radius: 4px; }
.themetile__label { font-weight: 600; font-size: var(--fs-2); display: flex; justify-content: space-between; align-items: center; }
.themetile__type { font-size: var(--fs-1); color: var(--color-mute); }

/* Progress bar */
.progress { height: 6px; background: var(--color-surface-2); border-radius: var(--r-pill); overflow: hidden; width: 100%; }
.progress > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--color-primary); transition: width var(--dur-2) var(--ease); }

/* KG tile (kindergarten dashboards) */
.kgtile {
  position: relative; border: none; cursor: pointer; text-align: center;
  border-radius: var(--r-4); padding: var(--s-6) var(--s-4);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-5);
  box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: transform var(--dur-1) var(--ease);
}
.kgtile:hover { transform: translateY(-3px); }
.kgtile__glyph { font-size: 64px; line-height: 1; }
.kgtile__ribbon {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px;
  background: rgba(255,255,255,.95); color: var(--color-ink);
  border-radius: var(--r-pill); padding: 2px 10px; font-size: var(--fs-1); font-weight: 800;
}

/* Stat card */
.stat {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--r-3); padding: var(--s-5);
  display: flex; flex-direction: column; gap: 6px;
}
.stat__label { font-size: var(--fs-1); color: var(--color-mute); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.stat__value { font-family: var(--font-display); font-size: var(--fs-7); font-weight: 700; letter-spacing: -0.03em; }
.stat__delta { font-size: var(--fs-2); color: var(--color-accent); font-weight: 600; }
.stat__delta--down { color: var(--color-danger); }

/* Auth */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-bg);
}
.auth__form {
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--s-9) var(--s-10);
  gap: var(--s-5);
}
.auth__art {
  background: var(--color-surface-2);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-9);
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .auth__form { padding: var(--s-7) var(--s-6); }
}

/* Floating helper button (settings switcher) */
.floatbtn {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px;
  z-index: 100;
  background: var(--color-surface); color: var(--color-ink);
  border: 1px solid var(--color-line);
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-3); cursor: pointer;
  transition: transform var(--dur-1) var(--ease);
}
.floatbtn:hover { transform: scale(1.06); }

.settings-panel {
  position: fixed; inset-block-end: 80px; inset-inline-end: 20px;
  width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  box-shadow: var(--sh-pop);
  padding: var(--s-5);
  z-index: 100;
  display: flex; flex-direction: column; gap: var(--s-4);
  animation: pop var(--dur-2) var(--ease);
}
/* Respect the [hidden] attribute — the display:flex above otherwise overrides
   the UA [hidden]{display:none} rule, leaving the panel always visible.
   !important guards against any cached/override rule keeping it on (esp. mobile). */
.settings-panel[hidden] { display: none !important; }
/* On phones, render the panel as a dismissable bottom sheet (never full-screen). */
@media (max-width: 560px) {
  .settings-panel {
    inset-inline: 12px; inset-block-end: 84px;
    width: auto; max-height: 70vh; overflow-y: auto;
  }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile menu */
.mobile-toggle { display: none; }
.app-scrim { display: none; }
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-block-start: 0; inset-inline-start: 0;
    width: 280px; z-index: 60;
    transform: translateX(-100%);
    transition: transform var(--dur-2) var(--ease);
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar--open { transform: translateX(0) !important; }
  .app-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(15,26,46,.45); backdrop-filter: blur(1px);
    animation: fade var(--dur-2) var(--ease);
  }
  .app-scrim[hidden] { display: none; }
  .hero { padding-block: var(--s-9) var(--s-7); }
  .auth__form { padding: var(--s-7) var(--s-5); }
  .content { padding: var(--s-5); }
  .dashtop { padding: var(--s-3) var(--s-5); }
}

/* Animated background blobs for hero */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .35;
  pointer-events: none;
}
.blob--a { width: 360px; height: 360px; background: var(--brand-primary); top: -120px; inset-inline-end: -60px; }
.blob--b { width: 300px; height: 300px; background: var(--brand-accent); bottom: -100px; inset-inline-start: 10%; opacity: .3; }
[data-mode="dark"] .blob { opacity: .55; }

/* Marketing tweaks: vibrant headline in dark mode */
[data-mode="dark"] .hero h1 em { color: color-mix(in oklab, var(--brand-accent) 80%, white); }

/* Skeleton */
.skel {
  background: linear-gradient(90deg, var(--color-surface-2), var(--color-line), var(--color-surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-2);
}
@keyframes shimmer { from { background-position: 200% 0;} to { background-position: -200% 0;} }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,26,46,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: var(--s-5);
  animation: fade var(--dur-2) var(--ease);
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 }}
.modal {
  background: var(--color-surface); border-radius: var(--r-4);
  padding: var(--s-7); max-width: 520px; width: 100%;
  box-shadow: var(--sh-pop); border: 1px solid var(--color-line);
  display: flex; flex-direction: column; gap: var(--s-5);
}

/* tiny utility */
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }
.hide-mobile { }
@media (max-width: 700px) { .hide-mobile { display: none !important; } }

/* ============================================================
   RESPONSIVE — applies across all role apps (teacher, owner, etc.)
   ============================================================ */

/* Tables: enable horizontal scroll on small screens so they never break */
.responsive-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.responsive-table table { min-width: 520px; }

/* Grids tagged [data-collapse-mobile] flatten to a single column under 1024px */
@media (max-width: 1024px) {
  [data-collapse-mobile] { grid-template-columns: 1fr !important; }
}

/* Tablet/phone tweaks for the role shell */
@media (max-width: 700px) {
  .content { padding: var(--s-5) var(--s-4); gap: var(--s-5); }
  .dashtop { padding: 12px var(--s-4); gap: var(--s-3); }
  .dashtop h2 { display: none; }
  .search { display: none; }
  .stat__value { font-size: var(--fs-6); }
  h1 { font-size: clamp(22px, 5.4vw, 32px) !important; }
}

/* Touch targets: ensure buttons meet 44px hit area on small screens */
@media (max-width: 700px) {
  .btn { min-height: 40px; }
  .btn--icon { min-width: 40px; min-height: 40px; }
  .btn--sm { min-height: 32px; }
  .nav-item { min-height: 44px; }
}

/* Phone: stack the topbar's right-side switcher buttons into a row */
@media (max-width: 480px) {
  .dashtop .seg { padding: 2px; }
  .dashtop .seg__btn { padding: 4px 8px; font-size: 11px; }
}

/* Marquee scroll for institution logos */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: var(--s-9); width: max-content; animation: marquee 32s linear infinite; }
@keyframes marquee { from { transform: translateX(0)} to { transform: translateX(-50%)}}
[dir="rtl"] .marquee__track { animation-direction: reverse; }

/* KG-only flourish */
[data-theme="kindergarten"] .feature__icon { transform: rotate(-3deg); }
[data-theme="kindergarten"] .btn { box-shadow: 0 3px 0 color-mix(in oklab, var(--color-primary) 60%, black); }
[data-theme="kindergarten"] .btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 color-mix(in oklab, var(--color-primary) 60%, black); }
[data-theme="kindergarten"] .btn--ghost { box-shadow: 0 3px 0 var(--color-line-2); }

/* University flourish */
[data-theme="university"] h1, [data-theme="university"] h2, [data-theme="university"] h3 { font-style: normal; }
[data-theme="university"] .hero h1 em { font-style: italic; }
[data-theme="university"] .btn { letter-spacing: .02em; text-transform: none; }
[data-theme="university"] .topbar { border-bottom-width: 2px; }
