/* Camelot Academy: v5 "plum" theme
   Palette from the client reference: deep plum ground, lavender + cream title blocks, sunshine-yellow actions. */

/* three fonts: Figtree (body), Bricolage Grotesque (headings), Caveat (handwritten accents). They are linked from each page head, so they load alongside this file instead of after it */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f8f5fb;        /* soft lavender-white section */
  --bg-3: #f1ecf6;
  --card: #ffffff;
  --line: rgba(43, 20, 60, .12);
  --line-strong: rgba(43, 20, 60, .26);
  --ink: #1f1830;         /* body text (≈16:1) */
  --ink-2: #463d55;       /* secondary (≈10:1) */
  --muted: #5e5470;       /* meta (≈7:1) */
  --purple: #5b1a6b;      /* Camelot purple: buttons, links, marks */
  --purple-2: #45104f;
  --sun: #f6c445;         /* Camelot gold: highlights, header CTA */
  --sun-2: #ffd666;
  --sun-ink: #2b1d00;
  --gold-text: #7a5600;   /* gold that is readable as text on white */
  --lav: #ece1fa;         /* lavender plate / secondary button */
  --lav-soft: #f3ecfd;
  --lav-ink: #3d0e4a;
  --cream: #fff4d6;
  --olive: #5a4300;
  /* legacy names used by components: "gold" is now the purple accent */
  --gold: var(--purple);
  --gold-2: var(--purple-2);
  --gold-ink: #ffffff;
  --brand: var(--purple);

  --c-closed: #e8604c;
  --c-early: #f0a020;
  --c-required: #8e5bd0;
  --c-conference: #3d8fd6;
  --c-testing: #2fa866;
  --c-xschedule: #d9559b;
  --c-milestone: #c9a227;
  --c-event: #f6c445;

  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --serif: var(--display); /* older name, now the heading font */
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --r-lg: 22px;
  --r: 16px;
  --r-sm: 10px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --space: clamp(56px, 8vw, 104px);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --m-in: 160ms;
  --shadow: 0 16px 36px rgba(43, 20, 60, .12);
  --dots: radial-gradient(rgba(61, 14, 74, .08) 1px, transparent 1.2px) 0 0 / 9px 9px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; font-weight: 750; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 .45em; text-wrap: balance; }
h3 { font-weight: 700; }
h4 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; z-index: 100; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 8px; }
.nowrap { white-space: nowrap; }
[id], input, select, textarea { scroll-margin-top: 110px; }

/* ---------- type ---------- */
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.h-xl { font-size: clamp(42px, 6.2vw, 76px); }
.h-lg { font-size: clamp(32px, 4.2vw, 52px); }
.h-md { font-size: clamp(25px, 2.8vw, 34px); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 48ch; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.serif { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; }

/* title blocks: the signature from the reference: a heading set on a dotted lavender or cream plate */
.tblock { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* links */
.link { color: var(--gold); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color var(--m-in) var(--ease), text-underline-offset var(--m-in) var(--ease); }
.link:hover { color: var(--gold-2); text-underline-offset: 6px; }
.prose a, .faq a, .legal a, p a:not(.btn):not(.link) { color: var(--gold); text-underline-offset: 3px; }

/* ---------- icons ---------- */
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(217, 196, 251, .16); color: var(--lav); flex: none; transition: transform 300ms var(--ease); }
.chip .ico { width: 24px; height: 24px; }
.chip--sage { background: rgba(126, 226, 168, .15); color: #a2efc3; }
.chip--sand { background: rgba(255, 212, 59, .15); color: var(--gold); }
.chip--sky { background: rgba(140, 200, 255, .15); color: #b3dbff; }
.chip--rose { background: rgba(255, 138, 122, .15); color: #ffb2a6; }
.card:hover .chip { transform: rotate(-6deg) scale(1.06); }

/* ---------- buttons ---------- */
.btn { --b-bg: var(--gold); --b-fg: var(--gold-ink); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 8px; border: 0; background: var(--b-bg); color: var(--b-fg); font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform var(--m-in) var(--ease), background-color var(--m-in) var(--ease), box-shadow var(--m-in) var(--ease); }
.btn .ico { width: 18px; height: 18px; transition: transform var(--m-in) var(--ease); }
.btn--lav, .btn--light { --b-bg: var(--lav); --b-fg: var(--lav-ink); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--xs { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); --b-bg: var(--gold-2); box-shadow: 0 8px 22px rgba(255, 212, 59, .22); }
  .btn--lav:hover, .btn--light:hover { --b-bg: #e8dbff; box-shadow: 0 8px 22px rgba(217, 196, 251, .2); }
  .btn--ghost:hover { --b-bg: rgba(43, 20, 60, .06); box-shadow: inset 0 0 0 1.5px var(--ink); }
  .btn:hover .ico--arrow { transform: translateX(4px); }
}
.btn:active { transform: translateY(1px) scale(.97); transition-duration: 80ms; }
/* click ripple (added by main.js) */
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; z-index: -1; animation: ripple 520ms var(--ease) forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- top progress + back-to-top ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--gold), var(--lav)); transform-origin: 0 50%; transform: scaleX(0); z-index: 80; pointer-events: none; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--lav); color: var(--lav-ink); display: grid; place-items: center; cursor: pointer; z-index: 60; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top .ico { transform: rotate(-90deg); }

/* ---------- utility bar ---------- */
.utility { background: var(--bg-3); color: var(--ink-2); font-size: 14px; }
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.utility nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.utility a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; transition: color var(--m-in) var(--ease); }
.utility a:hover, .utility a[aria-current="page"] { color: var(--gold); }
.utility .ico { width: 16px; height: 16px; }
.utility .signin { font-weight: 700; color: var(--gold); }
@media (max-width: 700px) { .utility .hide-sm { display: none; } .utility nav { gap: 14px; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(42, 33, 54, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--m-in) var(--ease), box-shadow var(--m-in) var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 26px rgba(10, 4, 18, .35); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--lav); display: grid; place-items: center; flex: none; transition: transform 400ms var(--ease); }
.brand-mark img { width: 27px; filter: brightness(0) saturate(100%) invert(9%) sepia(54%) saturate(4400%) hue-rotate(268deg) brightness(88%); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-name { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 5px; letter-spacing: .02em; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--gold); }
.header-cta { flex: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; place-items: center; }
.nav-toggle .ico { width: 24px; height: 24px; }
.nav-toggle[aria-expanded="true"] .i-open, .nav-toggle[aria-expanded="false"] .i-close { display: none; }
.mobile-only { display: none; }
@media (max-width: 1020px) {
  .site-header .wrap { gap: 10px; min-height: 68px; }
  .nav-toggle { display: grid; }
  .header-cta { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .main-nav { position: fixed; inset: 112px 0 0 0; background: var(--bg); padding: 12px var(--gutter) 32px; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s linear 200ms; }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { opacity: 0; transform: translateY(8px); transition: opacity 260ms var(--ease), transform 260ms var(--ease); }
  .main-nav.open li { opacity: 1; transform: none; }
  .main-nav.open li:nth-child(2) { transition-delay: 40ms; } .main-nav.open li:nth-child(3) { transition-delay: 80ms; } .main-nav.open li:nth-child(4) { transition-delay: 120ms; } .main-nav.open li:nth-child(5) { transition-delay: 160ms; } .main-nav.open li:nth-child(6) { transition-delay: 200ms; }
  .main-nav a { font-size: 28px; font-weight: 800; padding: 14px 0; min-height: 60px; border-bottom: 1px solid var(--line); width: 100%; }
  .main-nav a::after { display: none; }
  .mobile-only { display: grid; gap: 10px; margin-top: 24px; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) { .brand-sub { display: none; } .brand-name { font-size: 18px; } }

/* ---------- sections ---------- */
.section { padding: var(--space) 0; }
.section--surface { background: var(--bg-2); }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 54ch; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 32px; }
.facts-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 30px 0 0; color: var(--ink-2); font-size: 15.5px; }
.facts-row li { display: inline-flex; align-items: center; gap: 8px; }
.facts-row .ico { width: 18px; height: 18px; color: var(--gold); }
.collage { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: clamp(420px, 44vw, 600px); }
.collage .frame:first-child { grid-row: span 2; }
.frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--card); isolation: isolate; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .collage { height: auto; grid-template-columns: 1.3fr 1fr; grid-template-rows: 170px 170px; } }
@media (max-width: 480px) { .hero .btn-row .btn { flex: 1 1 100%; } .collage { grid-template-rows: 140px 140px; gap: 10px; } }

/* entrance: once on load */
.js [data-enter] > * { opacity: 0; transform: translateY(16px); }
.js [data-enter].is-in > * { opacity: 1; transform: none; transition: opacity 700ms var(--ease-enter), transform 700ms var(--ease-enter); }
.js [data-enter].is-in > *:nth-child(2) { transition-delay: 90ms; } .js [data-enter].is-in > *:nth-child(3) { transition-delay: 180ms; }
.js [data-enter].is-in > *:nth-child(4) { transition-delay: 270ms; } .js [data-enter].is-in > *:nth-child(5) { transition-delay: 360ms; }
.js [data-enter-photos] .frame, .js .frame[data-enter-photos] { opacity: 0; transform: scale(.96) translateY(10px); }
.js [data-enter-photos].is-in .frame, .js .frame[data-enter-photos].is-in { opacity: 1; transform: none; transition: opacity 900ms var(--ease-enter), transform 900ms var(--ease-enter); }
.js [data-enter-photos].is-in .frame:nth-child(2) { transition-delay: 140ms; } .js [data-enter-photos].is-in .frame:nth-child(3) { transition-delay: 280ms; }

/* ---------- cards ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 6px; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease); }
.card h3 { font-family: var(--display); font-weight: 650; font-size: 25px; letter-spacing: -0.01em; margin: 14px 0 6px; }
.card p { color: var(--ink-2); margin: 0; font-size: 16px; }
.card .card-links { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 2px; }
.card .card-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; text-decoration: none; font-weight: 600; border-top: 1px solid var(--line); transition: color var(--m-in) var(--ease); }
.card .card-links a:hover { color: var(--gold); }
.card .card-links a .ico { width: 18px; height: 18px; color: var(--muted); transition: transform var(--m-in) var(--ease), color var(--m-in) var(--ease); }
.card .card-links a:hover .ico { transform: translateX(4px); color: var(--gold); }
.card-link { text-decoration: none; color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (hover: hover) and (pointer: fine) {
  .card.is-linked:hover, .card:has(.card-link):hover, .card:has(.card-links):hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
  .card:has(.card-link):hover h3 { color: var(--gold); }
  .card:hover .frame img, .tile:hover img, .m-zoom:hover img { transform: scale(1.04); }
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.audience .card { padding: 28px 26px 16px; }
.pcard { padding: 0; overflow: hidden; }
.pcard .frame { border-radius: 0; aspect-ratio: 4 / 3; }
.pcard .pbody { padding: 20px 22px 24px; }
.pcard .grade { font-size: 12.5px; font-weight: 800; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.pcard h3 { margin: 6px 0 8px; font-size: 24px; }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--flip > .split-media { order: 2; }
.split-media { position: relative; }
.split-media .frame { aspect-ratio: 5 / 4; }
.split-media .frame--tall { aspect-ratio: 4 / 5; }
.split-media .stack { position: absolute; right: -14px; bottom: -22px; width: 42%; aspect-ratio: 1; border: 6px solid var(--bg); border-radius: var(--r-lg); }
.section--surface .split-media .stack { border-color: var(--bg-2); }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--ink-2); max-width: 54ch; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--flip > .split-media { order: 0; } .split-media .stack { right: 10px; bottom: -18px; width: 36%; } .split > :not(.split-media) { order: 2; } }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
.steps li:hover { border-color: var(--line-strong); transform: translateX(3px); }
.steps h3 { font-size: 17px; font-weight: 700; letter-spacing: 0; margin: 2px 0 4px; }
.steps p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.steps--row { grid-template-columns: repeat(3, 1fr); }
.steps--row li { grid-template-columns: 1fr; padding: 24px; }
.steps--row li:hover { transform: translateY(-3px); }
.steps--row .num { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 860px) { .steps--row { grid-template-columns: 1fr; } }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 18vw, 250px); gap: 14px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--card); text-decoration: none; color: #fff; isolation: isolate; border: 1px solid var(--line); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); z-index: -1; }
.tile::before { content: ""; position: absolute; inset: auto 0 0 0; height: 70%; background: linear-gradient(to top, rgba(31, 20, 44, .88), rgba(31, 20, 44, 0)); z-index: 0; pointer-events: none; }
.tile .tile-label { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; transition: transform 300ms var(--ease); }
.tile:hover .tile-label { transform: translateY(-4px); }
.tile .tile-label .ico { width: 20px; height: 20px; color: var(--gold); }
.tile--wide { grid-column: span 2; } .tile--tall { grid-row: span 2; } .tile--big { grid-column: span 2; grid-row: span 2; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; } .tile--big { grid-column: span 2; grid-row: span 1; } .tile--tall { grid-row: span 1; } }
@media (max-width: 480px) { .bento { grid-auto-rows: 160px; gap: 10px; } .tile .tile-label { font-size: 15.5px; left: 14px; bottom: 12px; } }

/* ---------- statement moment ---------- */
.moment { padding: var(--space) 0; }
.moment-inner { position: sticky; top: 28vh; }
.moment .statement { font-size: clamp(34px, 5.4vw, 68px); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; max-width: 20ch; margin: 0; }
.js .moment .statement .w { color: #5d4f70; transition: color 260ms var(--ease); }
.js .moment .statement .w.on { color: var(--ink); }
.js .moment .statement .w.on.hl { color: var(--gold); }
.moment .moment-foot { margin-top: 28px; display: flex; gap: 14px; align-items: center; color: var(--ink-2); }
.moment-track { height: 210vh; }
@media (max-width: 700px) { .moment-track { height: 170vh; } .moment-inner { top: 22vh; } }

/* ---------- quote ---------- */
.quote-card { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 0; }
.quote-card .frame { border-radius: 0; min-height: 340px; }
.quote-card .q { padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.quote-card blockquote { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -0.015em; }
.quote-card cite { margin-top: 18px; font-style: normal; color: var(--muted); display: block; }
.quote-mark { width: 40px; height: 40px; color: var(--gold); margin-bottom: 14px; }
@media (max-width: 760px) { .quote-card { grid-template-columns: 1fr; } .quote-card .frame { min-height: 240px; } }

/* ---------- stats ---------- */
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.stats b { display: block; font-size: clamp(34px, 3.6vw, 46px); font-weight: 800; line-height: 1; margin-bottom: 8px; color: var(--gold); font-variant-numeric: tabular-nums; }
.stats span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- forms ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 38px); }
.form-card h3 { font-family: var(--display); font-weight: 700; font-size: 28px; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .field legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--bg-3); font: 400 16px/1.4 var(--sans); color: var(--ink); transition: border-color var(--m-in) var(--ease), box-shadow var(--m-in) var(--ease), background-color var(--m-in) var(--ease); }
.field input::placeholder, .field textarea::placeholder { color: #9b8fab; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 212, 59, .18); }
.field[data-invalid] input, .field[data-invalid] select, .field[data-invalid] textarea { border-color: var(--c-closed); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.field .err { display: none; color: #ffb2a6; font-size: 14px; margin: 6px 0 0; }
.field[data-invalid] .err { display: block; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; min-height: 0; }
.choice span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1.5px solid var(--line-strong); font-size: 15px; font-weight: 600; transition: border-color var(--m-in) var(--ease), background-color var(--m-in) var(--ease), color var(--m-in) var(--ease); }
.choice span .ico { width: 18px; height: 18px; }
.choice input:checked + span { border-color: var(--lav); background: var(--lav); color: var(--lav-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.form-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.form-status { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-sm); background: rgba(126, 226, 168, .14); color: #c9f5da; font-size: 15px; display: none; }
.form-status.show { display: block; }
.form-status.error { background: rgba(255, 138, 122, .14); color: #ffd0c8; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-card .btn { width: 100%; } }

/* ---------- page hero ---------- */
.page-hero { padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.page-hero--text .wrap { grid-template-columns: 1fr; }
.page-hero h1 { font-size: clamp(38px, 4.8vw, 62px); }
.page-hero .frame { aspect-ratio: 4 / 3; }
.page-hero .lead { margin-bottom: 26px; }
@media (max-width: 860px) { .page-hero .wrap { grid-template-columns: 1fr; } }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; transition: border-color var(--m-in) var(--ease), color var(--m-in) var(--ease), transform var(--m-in) var(--ease); }
.jump a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ---------- lists ---------- */
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--ink-2); }
.ticks li .ico { width: 20px; height: 20px; color: var(--gold); margin-top: 3px; }
.ticks b { color: var(--ink); font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14.5px; color: var(--ink-2); transition: border-color var(--m-in) var(--ease), color var(--m-in) var(--ease); }
.pills li:hover { border-color: var(--lav); color: var(--lav); }
.price-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.price-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
.price-list li:hover { border-color: var(--line-strong); transform: translateX(4px); }
.price-list .what b { display: block; font-weight: 700; }
.price-list .what span { font-size: 14.5px; color: var(--muted); }
.price-list .amt { font-size: 24px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .price-list li { grid-template-columns: auto 1fr; } .price-list .amt { grid-column: 2; font-size: 21px; } }
.fee-table, .table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.fee-table th, .fee-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table th { font-weight: 500; color: var(--ink-2); padding-right: 16px; }
.fee-table td { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.timeline li { border-top: 2px solid var(--gold); padding-top: 18px; }
.timeline .yr { font-size: 44px; font-weight: 800; line-height: 1; display: block; margin-bottom: 10px; }
.timeline p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .timeline { grid-template-columns: 1fr; } }
.history-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.history-photos .frame { aspect-ratio: 446 / 360; border-radius: var(--r); }
.history-photos img { filter: sepia(.15); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; align-items: center; min-height: 64px; padding: 14px 0; font-weight: 700; font-size: 18px; transition: color var(--m-in) var(--ease); }
.faq summary:hover { color: var(--gold); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { width: 22px; height: 22px; color: var(--gold); transition: transform 240ms var(--ease); }
.faq details[open] summary .ico { transform: rotate(135deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); max-width: 68ch; }
.faq details[open] > div { animation: drop 260ms var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.faq details > div p:last-child { margin: 0; }
.colleges { columns: 3 210px; column-gap: 28px; list-style: none; padding: 0; margin: 0; font-size: 15px; color: var(--ink-2); }
.colleges li { break-inside: avoid; padding: 3px 0; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-lg); background: var(--card); display: block; }
.note { background: rgba(255, 212, 59, .12); border: 1px solid rgba(255, 212, 59, .35); border-radius: var(--r); padding: 16px 20px; font-size: 15.5px; display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.note .ico { color: var(--gold); margin-top: 2px; }
.video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-lg); background: #000; display: block; }
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff; min-height: 420px; display: flex; align-items: flex-end; isolation: isolate; }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.cta-band:hover img { transform: scale(1.03); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(31, 20, 44, .9) 12%, rgba(31, 20, 44, .3) 70%, rgba(31, 20, 44, .1)); z-index: -1; }
.cta-band .inner { padding: clamp(28px, 5vw, 56px); max-width: 640px; }
.cta-band p { color: var(--ink-2); font-size: 18px; }

/* ---------- announcements ---------- */
.ann-list { display: grid; gap: 14px; }
.ann { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
.ann:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ann h3 { font-size: 19px; margin: 0 0 4px; letter-spacing: -0.01em; }
.ann p { margin: 0; color: var(--ink-2); font-size: 15.5px; white-space: pre-line; }
.ann .meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.ann--urgent { border-color: rgba(255, 138, 122, .6); background: linear-gradient(90deg, rgba(255, 138, 122, .1), transparent 60%), var(--card); }
.ann--important { border-color: rgba(255, 212, 59, .5); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: rgba(217, 196, 251, .16); color: var(--lav); }
.tag .ico { width: 13px; height: 13px; }
.tag--urgent { background: rgba(255, 138, 122, .18); color: #ffb2a6; }
.tag--important { background: rgba(255, 212, 59, .16); color: var(--gold); }
.tag--ok { background: rgba(126, 226, 168, .16); color: #a2efc3; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-closed); box-shadow: 0 0 0 0 rgba(255, 138, 122, .6); animation: live 2s infinite; display: inline-block; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(255, 138, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 122, 0); } }
.ann-empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--r); text-align: center; }

/* upcoming dates strip */
.upcoming { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.upcoming li { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); transition: background-color 200ms var(--ease); }
.upcoming li:hover { background: rgba(43, 20, 60, .04); }
.datebox { width: 58px; height: 58px; border-radius: 12px; background: var(--cream); color: var(--olive); display: grid; place-content: center; text-align: center; line-height: 1; }
.datebox b { font-size: 22px; font-weight: 800; display: block; }
.datebox span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; display: block; }
.upcoming .what b { display: block; font-weight: 700; }
.upcoming .what span { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- calendar ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.cal-legend button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; transition: background-color var(--m-in) var(--ease), border-color var(--m-in) var(--ease), opacity var(--m-in) var(--ease); }
.cal-legend button[aria-pressed="false"] { opacity: .45; }
.cal-legend button:hover { border-color: var(--ink); }
.sym { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; color: #20172b; }
.sym .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.sym--closed { background: var(--c-closed); } .sym--early { background: var(--c-early); } .sym--required { background: var(--c-required); }
.sym--conference { background: var(--c-conference); } .sym--testing { background: var(--c-testing); } .sym--xschedule { background: var(--c-xschedule); }
.sym--milestone { background: var(--c-milestone); } .sym--event { background: var(--c-event); }
.cal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-top h2 { margin: 0; min-width: 9ch; }
.cal-nav { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color var(--m-in) var(--ease), background-color var(--m-in) var(--ease), transform var(--m-in) var(--ease); }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ico { width: 20px; height: 20px; }
.seg { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); position: relative; }
.seg button { position: relative; z-index: 1; min-height: 38px; padding: 0 14px; border: 0; background: transparent; color: var(--ink-2); font: 700 14px var(--sans); cursor: pointer; border-radius: 7px; transition: color 200ms var(--ease); }
.seg button[aria-pressed="true"] { color: var(--lav-ink); }
.seg .seg-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 7px; background: var(--lav); transition: transform 260ms var(--ease), width 260ms var(--ease); z-index: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 8px 4px; }
.day { position: relative; min-height: 112px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; transition: border-color 160ms var(--ease), transform 160ms var(--ease); text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.day:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.day.out { background: transparent; border-style: dashed; opacity: .4; cursor: default; }
.day.out:hover { transform: none; }
.day.weekend { background: rgba(54, 43, 71, .5); }
.day .n { font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.day.closed { background: repeating-linear-gradient(135deg, rgba(255, 138, 122, .16) 0 8px, rgba(255, 138, 122, .07) 8px 16px); border-color: rgba(255, 138, 122, .45); }
.day.closed .n::after { content: "No school"; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #ffb2a6; }
.day.today { box-shadow: 0 0 0 2px var(--gold); }
.day.today .n span { background: var(--gold); color: var(--gold-ink); border-radius: 6px; padding: 0 6px; }
.day.sel { border-color: var(--lav); }
.ev { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.25; font-weight: 600; padding: 3px 6px; border-radius: 6px; background: rgba(43, 20, 60, .06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .sym { width: 16px; height: 16px; border-radius: 4px; }
.ev .sym .ico { width: 10px; height: 10px; }
.more { font-size: 12px; color: var(--muted); padding-left: 4px; }
.cal-month { animation: monthIn 320ms var(--ease); }
.cal-month.back { animation-name: monthInBack; }
@keyframes monthIn { from { opacity: 0; transform: translateX(18px); } }
@keyframes monthInBack { from { opacity: 0; transform: translateX(-18px); } }
.cal-side { display: grid; gap: 18px; align-content: start; }
.cal-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel h3 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.day-detail .ev-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.day-detail .ev-row:first-of-type { border-top: 0; }
.day-detail .ev-row b { display: block; }
.day-detail .ev-row span { color: var(--muted); font-size: 14px; }
.countdown { display: grid; gap: 4px; }
.countdown .big { font-size: 46px; font-weight: 800; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.breaks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.breaks li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.breaks li span:last-child { color: var(--muted); text-align: right; }
.breaks li.past { opacity: .45; }
.agenda { display: grid; gap: 28px; }
.agenda h3 { font-size: 22px; margin: 0 0 10px; position: sticky; top: 76px; background: var(--bg); padding: 10px 0; z-index: 2; }
.agenda .row { display: grid; grid-template-columns: 110px auto 1fr; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid transparent; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.agenda .row:hover { background: var(--card); border-color: var(--line); }
.agenda .row .d { font-weight: 700; color: var(--ink-2); font-size: 15px; }
.agenda .row .t b { display: block; font-weight: 700; }
.agenda .row .t span { font-size: 14px; color: var(--muted); }
.agenda .row.past { opacity: .45; }
@media (max-width: 1000px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .cal-grid { gap: 3px; }
  .cal-grid .dow { padding: 0 2px 4px; font-size: 11px; text-align: center; }
  .day { min-height: 54px; padding: 5px; border-radius: 8px; align-items: center; }
  .day .n { font-size: 14px; }
  .day.closed .n::after { display: none; }
  .day .ev { display: none; }
  .day .more { display: none; }
  .cal-grid .day .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
  .agenda .row { grid-template-columns: 1fr; gap: 6px; }
}
.day .dots { display: none; }
.day .dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }

/* ---------- hub pages ---------- */
.hub-hero { padding: clamp(32px, 5vw, 64px) 0 clamp(36px, 5vw, 56px); }
.hub-hero .lead { margin-top: 18px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick a { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 132px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform 200ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease); }
.quick a:hover { transform: translateY(-3px); border-color: var(--gold); }
.quick a b { font-weight: 700; font-size: 16.5px; }
.quick a span { font-size: 14px; color: var(--muted); }
.quick a .chip { width: 42px; height: 42px; border-radius: 12px; }
.quick a:hover .chip { transform: rotate(-6deg) scale(1.06); }
@media (max-width: 1000px) { .quick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .quick { grid-template-columns: 1fr; } .quick a { min-height: 0; flex-direction: row; align-items: center; } }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.doc-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.doc-list a:hover { background: rgba(43, 20, 60, .05); color: var(--gold); }
.doc-list .ico { width: 18px; height: 18px; color: var(--lav); }

/* ---------- portal ---------- */
.portal { padding: clamp(24px, 4vw, 48px) 0 var(--space); min-height: 70vh; }
.mode-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); background: rgba(140, 200, 255, .1); border: 1px solid rgba(140, 200, 255, .35); font-size: 15px; margin-bottom: 24px; }
.mode-banner .ico { color: #b3dbff; margin-top: 2px; }
.auth { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.auth .frame { min-height: 420px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .frame { min-height: 220px; } }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.role-pick button { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); font: 700 15px var(--sans); cursor: pointer; text-align: left; transition: border-color var(--m-in) var(--ease), transform var(--m-in) var(--ease); }
.role-pick button:hover { border-color: var(--gold); transform: translateY(-2px); }
.role-pick button span small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h1 { font-size: clamp(30px, 4vw, 46px); margin: 0; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--lav); color: var(--lav-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.tabs { display: flex; gap: 4px; overflow-x: auto; position: relative; border-bottom: 1px solid var(--line); margin-bottom: 26px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 48px; padding: 0 16px; border: 0; background: transparent; color: var(--ink-2); font: 700 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: color 180ms var(--ease); }
.tabs button .ico { width: 18px; height: 18px; }
.tabs button[aria-selected="true"] { color: var(--gold); }
.tabs .tab-ink { position: absolute; bottom: -1px; left: 0; height: 3px; border-radius: 3px; background: var(--gold); transition: transform 280ms var(--ease), width 280ms var(--ease); }
.tab-panel { animation: drop 280ms var(--ease); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.kpi b { display: block; font-size: 30px; font-weight: 800; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.class-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.class-card + .class-card { margin-top: 14px; }
.class-card header { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.class-card h3 { font-family: var(--display); font-weight: 650; font-size: 22px; margin: 0; }
.class-card .teacher { color: var(--muted); font-size: 14px; }
.grade-pill { min-width: 64px; text-align: center; padding: 6px 12px; border-radius: 8px; font-weight: 800; font-size: 18px; background: var(--lav); color: var(--lav-ink); font-variant-numeric: tabular-nums; }
.grade-pill.low { background: var(--c-closed); color: #3a0d06; }
.grade-pill.none { background: var(--bg-3); color: var(--muted); font-size: 15px; }
.bar { height: 8px; border-radius: 99px; background: rgba(43, 20, 60, .08); overflow: hidden; margin: 14px 0 4px; position: relative; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lav), var(--gold)); transition: width 900ms var(--ease-enter); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .6; }
.bar-legend { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.asg { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.asg th { text-align: left; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.asg td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.asg td.num, .asg th.num { text-align: right; font-variant-numeric: tabular-nums; }
.asg tr:hover td { background: rgba(43, 20, 60, .03); }
.score-ok { color: #a2efc3; font-weight: 700; } .score-low { color: #ffb2a6; font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.gradebook { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 15px; }
.gradebook th, .gradebook td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gradebook thead th { position: sticky; top: 0; background: var(--bg-3); font-size: 13px; font-weight: 700; text-align: center; vertical-align: bottom; }
.gradebook thead th small { display: block; color: var(--muted); font-weight: 500; }
.gradebook th:first-child, .gradebook td:first-child { position: sticky; left: 0; background: var(--card); text-align: left; z-index: 1; }
.gradebook thead th:first-child { background: var(--bg-3); z-index: 2; }
.gradebook input { width: 64px; min-height: 40px; text-align: center; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); font: 600 15px var(--sans); transition: border-color 160ms var(--ease), background-color 400ms var(--ease); }
.gradebook input:focus { outline: none; border-color: var(--gold); }
.gradebook input.saved { border-color: #7ee2a8; background: rgba(126, 226, 168, .18); }
.gradebook input.bad { border-color: var(--c-closed); }
.gradebook td.avg { font-weight: 800; text-align: center; }
.inline-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin: 16px 0; }
@media (max-width: 860px) { .inline-form { grid-template-columns: 1fr 1fr; } }
.inline-form .field input, .inline-form .field select { min-height: 44px; padding: 8px 12px; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.kid-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* meals */
.week-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.week-pick button { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px 14px; min-height: 76px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color 160ms var(--ease), transform 160ms var(--ease), background-color 160ms var(--ease); }
.week-pick button:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--ink); }
.week-pick button[aria-pressed="true"] { background: var(--lav); color: var(--lav-ink); border-color: var(--lav); }
.week-pick button[disabled] { cursor: not-allowed; background: repeating-linear-gradient(135deg, rgba(255, 138, 122, .14) 0 8px, rgba(255, 138, 122, .05) 8px 16px); border-color: rgba(255, 138, 122, .4); }
.week-pick b { font-size: 15px; } .week-pick small { font-size: 12.5px; opacity: .8; }
.week-pick .badge-count { justify-self: end; margin-top: -2px; font-size: 12px; font-weight: 800; background: var(--gold); color: var(--gold-ink); border-radius: 99px; padding: 1px 8px; }
@media (max-width: 700px) { .week-pick { grid-template-columns: repeat(5, minmax(96px, 1fr)); overflow-x: auto; } }
.menu-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .menu-layout { grid-template-columns: 1fr; } }
.menu-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .menu-items { grid-template-columns: 1fr; } }
.mi { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); transition: border-color 160ms var(--ease); }
.mi:hover { border-color: var(--line-strong); }
.mi b { font-weight: 700; font-size: 15.5px; }
.mi .d { font-size: 13.5px; color: var(--muted); grid-column: 1; }
.mi .p { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.mi .row-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mi .tags { display: flex; gap: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1.5px solid var(--line-strong); border-radius: 9px; }
.stepper button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.stepper button:hover { color: var(--gold); }
.stepper button .ico { width: 16px; height: 16px; }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; }
.stepper output.bump { animation: bump 260ms var(--ease); }
@keyframes bump { 50% { transform: scale(1.45); color: var(--gold); } }
.cart { position: sticky; top: 96px; }
.cart-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 14.5px; padding-bottom: 8px; border-bottom: 1px solid var(--line); animation: drop 220ms var(--ease); }
.cart-lines li small { color: var(--muted); grid-column: 1; }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 20px; margin: 10px 0 16px; }
.order-hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.order-hist li { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.order-hist small { color: var(--muted); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(15, 8, 24, .7); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .sheet { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 26px; transform: translateY(14px) scale(.98); transition: transform 260ms var(--ease-enter); box-shadow: var(--shadow); }
.modal.open .sheet { transform: none; }
.modal h3 { font-size: 22px; margin: 0 0 6px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 95; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--cream); color: var(--olive); font-weight: 700; font-size: 15px; box-shadow: var(--shadow); animation: toastIn 320ms var(--ease-enter); }
.toast.out { animation: toastOut 220ms var(--ease) forwards; }
.toast .ico { width: 18px; height: 18px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
/* confetti */
.confetti { position: fixed; top: 0; left: 0; width: 9px; height: 13px; border-radius: 2px; pointer-events: none; z-index: 96; will-change: transform, opacity; }
/* admin */
.admin-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.user-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-row select { min-height: 40px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); font: 600 14px var(--sans); padding: 0 8px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-row label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line-strong); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.check-row input { accent-color: var(--gold); width: 18px; height: 18px; }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--card) 0%, #45395a 50%, var(--card) 100%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; min-height: 80px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-3); color: var(--ink-2); padding: 64px 0 28px; font-size: 15px; }
.site-footer a { color: var(--ink); text-decoration: none; transition: color var(--m-in) var(--ease); }
.site-footer a:hover { color: var(--gold); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.site-footer h4, .site-footer .foot-h { color: var(--gold); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-brand p { margin: 14px 0 18px; max-width: 34ch; }
.site-footer address { font-style: normal; line-height: 1.8; }
.legal { padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13.5px; color: var(--muted); }
.legal p { margin: 0; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } .site-footer ul a, .site-footer address a { min-height: 44px; } }
.section-head .link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .js [data-enter] > *, .js [data-enter-photos] .frame, .js .frame[data-enter-photos] { opacity: 1 !important; transform: none !important; }
  .js .moment .statement .w { color: var(--ink) !important; }
  .moment-track { height: auto; } .moment-inner { position: static; }
  .progress, .confetti { display: none; }
}
.grid-news { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid-news { grid-template-columns: 1fr; } }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-news > *, .panel { min-width: 0; }
.doc-list a, .ann p, .ticks span { overflow-wrap: anywhere; }

/* ================= v6: white theme with purple + gold accents ================= */
.eyebrow { color: var(--purple); }
.link { color: var(--purple); text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
.link:hover { color: var(--purple-2); }
.prose a, .faq a, .legal a, p a:not(.btn):not(.link) { color: var(--purple); }
::selection { background: var(--sun); color: var(--sun-ink); }
:focus-visible { outline-color: var(--purple); }
.skip { background: var(--purple); color: #fff; }
.btn--sun { --b-bg: var(--sun); --b-fg: var(--sun-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 8px 20px rgba(91, 26, 107, .22); }
  .btn--sun:hover { --b-bg: var(--sun-2); box-shadow: 0 8px 20px rgba(246, 196, 69, .35); }
  .btn--lav:hover, .btn--light:hover { --b-bg: var(--lav-2, #e2d3f7); box-shadow: none; }
}
/* chips & tags readable on white */
.chip { background: #f1e8fb; color: var(--purple); }
.chip--sage { background: #e3f4e8; color: #23703f; }
.chip--sand { background: #fff1c9; color: var(--gold-text); }
.chip--sky { background: #e2effb; color: #1f5a8a; }
.chip--rose { background: #fde6e2; color: #a33a26; }
.tag { background: #efe6fb; color: #4b1460; }
.tag--urgent { background: #ffe3de; color: #9b2a17; }
.tag--important { background: #fff1c7; color: #6b4d00; }
.tag--ok { background: #ddf5e6; color: #1d6b3c; }
.score-ok { color: #1d7a44; } .score-low { color: #b0301a; }
.field .err { color: #b0301a; }
.field input, .field select, .field textarea, .gradebook input, .user-row select, .role-pick button { background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #8a809a; }
.form-status { background: #e3f4e8; color: #1d5a33; }
.form-status.error { background: #fde6e2; color: #8a2414; }
.mode-banner { background: #eef5fc; border-color: #bcd8f2; } .mode-banner .ico { color: #1f5a8a; }
.note { background: #fff7df; border-color: #f1d792; } .note .ico { color: var(--gold-text); }
.facts-row .ico, .ticks li .ico, .tile .tile-label .ico { color: var(--purple); }
.tile .tile-label .ico { color: var(--sun); }
.stats b, .kpi b, .price-list .amt, .mi .p, .countdown .big { color: var(--purple); }
.timeline li { border-top-color: var(--sun); }
.pcard .grade, .steps--row .num { color: var(--purple); }
.quote-mark { color: var(--sun); }
.day.weekend { background: #faf8fc; }
.day .ev { background: #f5f0fa; }
.sym { color: #fff; } .sym--event, .sym--milestone, .sym--early { color: #2b1d00; }
.skeleton { background: linear-gradient(90deg, #f4eff8 0%, #ebe3f2 50%, #f4eff8 100%) 0 0 / 200% 100%; }
.cta-band p { color: #f1e8f6; } .cta-band h2 { color: #fff; }
.main-nav a[aria-current="page"] { color: var(--purple); }
.main-nav a::after { background: var(--sun); height: 3px; }
.toast { background: var(--purple); color: #fff; }
.progress { display: none !important; }

/* header: one bar */
.site-header { background: rgba(255, 255, 255, .94); }
.brand-mark { background: var(--purple); }
.brand-mark img { filter: none; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.signin-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--purple); font-weight: 700; text-decoration: none; transition: background-color var(--m-in) var(--ease); }
.signin-link:hover { background: #f3ecfd; }
.signin-link .ico { width: 17px; height: 17px; }
.has-sub { position: relative; }
.sub-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border: 0; background: none; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; }
.sub-toggle .ico { width: 16px; height: 16px; transition: transform 200ms var(--ease); }
.sub-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s linear 180ms; z-index: 50; display: grid !important; gap: 2px; }
.sub.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sub a { display: flex !important; gap: 10px; align-items: center; min-height: 44px; padding: 0 12px !important; border-radius: 9px; font-size: 15.5px !important; }
.sub a:hover { background: #f3ecfd; }
.sub a::after { display: none !important; }
.sub .ico { width: 18px; height: 18px; color: var(--purple); }
@media (max-width: 1020px) {
  .signin-link span { display: none; }
  .has-sub .sub-toggle { display: none; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0; min-width: 0; }
  .sub a { font-size: 22px !important; min-height: 56px; padding: 0 !important; border-bottom: 1px solid var(--line); border-radius: 0; }
  .sub .ico { display: none; }
}

/* compact hero so news is visible on the first screen */
.hero { padding: clamp(18px, 3vw, 36px) 0 clamp(26px, 3vw, 40px); }
.hero h1.h-xl { font-size: clamp(36px, 4.4vw, 58px); margin-bottom: 16px; }
.hero .lead { margin-bottom: 22px; font-size: clamp(17px, 1.4vw, 19px); }
.facts-row { margin-top: 20px; }
.collage { height: clamp(300px, 30vw, 410px); }
#news.section--tight { padding: clamp(28px, 3.5vw, 44px) 0; }
#news .section-head { margin-bottom: 18px; }
#news .ann { padding: 16px 18px; }
#news .upcoming li { padding: 6px 10px; }

/* statement now lives beside "How learning works" */
.pullquote { margin: 36px 0 0; padding: 22px 24px; border: 1px solid var(--line); background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.pullquote p { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; color: var(--ink); }
.pullquote p mark { background: linear-gradient(transparent 58%, rgba(246, 196, 69, .55) 58%); color: inherit; }
.pullquote > span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--muted); }

/* photo moments gallery */
.moments { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 210px); gap: 12px; }
.moments .frame { border-radius: var(--r); }
.moments .frame:nth-child(1) { grid-row: span 2; }
.moments .frame:nth-child(6) { grid-column: span 2; }
@media (max-width: 760px) { .moments { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } .moments .frame:nth-child(6) { grid-column: span 2; } }
@media (hover: hover) and (pointer: fine) { .moments .frame:hover img { transform: scale(1.04); } }

/* footer in Camelot purple */
.site-footer { background: var(--footer-bg, #2a1236); color: var(--footer-ink, #e6dcef); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sun); }
.site-footer h4, .site-footer .foot-h { color: var(--sun); }
.footer-top { border-bottom-color: rgba(255, 255, 255, .16); }
.legal { color: var(--footer-muted, #cdbfd9); }
.legal a { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: var(--sun); }
.site-footer .brand-mark img { filter: brightness(0) saturate(100%) invert(9%) sepia(54%) saturate(4400%) hue-rotate(268deg) brightness(88%); }
.site-footer .btn--light { --b-bg: var(--sun); --b-fg: var(--sun-ink); }

/* attendance */
.att-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.att-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.att-row .who-name b { display: block; } .att-row .who-name span { font-size: 13.5px; color: var(--muted); }
.att-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.att-opts button { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.att-opts button:hover { border-color: var(--ink); }
.att-opts button[aria-pressed="true"][data-st="present"] { background: #e3f4e8; border-color: #2fa866; color: #1d5a33; }
.att-opts button[aria-pressed="true"][data-st="tardy"] { background: #fff1c9; border-color: #f0a020; color: #6b4d00; }
.att-opts button[aria-pressed="true"][data-st="absent_excused"] { background: #e2effb; border-color: #3d8fd6; color: #1f4f7a; }
.att-opts button[aria-pressed="true"][data-st="absent_unexcused"] { background: #fde6e2; border-color: #e8604c; color: #8a2414; }
.att-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.att-badge.present { background: #e3f4e8; color: #1d5a33; } .att-badge.tardy { background: #fff1c9; color: #6b4d00; }
.att-badge.absent_excused { background: #e2effb; color: #1f4f7a; } .att-badge.absent_unexcused { background: #fde6e2; color: #8a2414; }
.att-badge.reported { background: #efe6fb; color: #4b1460; }
@media (max-width: 700px) { .att-row { grid-template-columns: 1fr; } }

/* staff lunch delivery sheet */
.sheet-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.lunch-sheet { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.lunch-sheet th, .lunch-sheet td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lunch-sheet thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lunch-sheet td.chk { width: 52px; }
.lunch-sheet input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--purple); cursor: pointer; }
.lunch-sheet tr.done td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(43, 20, 60, .35); }
.lunch-sheet tr.done td.chk { text-decoration: none; }
.vendor-row th { background: #f8f5fb; font-size: 15px !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ink) !important; }
.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .to-top, .toasts, .tabs, .dash-head, .mode-banner, .no-print, .skip { display: none !important; }
  .portal { padding: 0 !important; }
  .print-only { display: block; }
  .lunch-sheet { font-size: 11pt; }
  .lunch-sheet th, .lunch-sheet td { padding: 6pt 6pt; border-bottom: 1px solid #999; }
  .lunch-sheet tr { break-inside: avoid; }
  .lunch-sheet input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 16pt; height: 16pt; border: 1.5pt solid #000; border-radius: 3pt; }
  .lunch-sheet tr.done td { text-decoration: none; color: #000; }
  .vendor-row th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tab-panel { animation: none !important; }
}
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
.form-grid--2a { grid-template-columns: auto auto; margin: 0; }
@media (max-width: 900px) { .form-grid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .form-grid--4, .form-grid--2a { grid-template-columns: 1fr; } }
.hero .wrap { grid-template-columns: 1.15fr 1fr; }
.hero h1.h-xl { font-size: clamp(34px, 3.9vw, 52px); }
.collage { height: clamp(260px, 25vw, 350px); }
.hero .lead { margin-bottom: 18px; }
.facts-row { margin-top: 16px; }
#news.section--tight { padding: 22px 0 40px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .collage { height: auto; } }

/* ================= v7 polish: icon alignment, plate animation, new portal parts ================= */
/* icons: never inherit inline/flex text styles; always centred in their boxes */
.ico { display: inline-block; vertical-align: middle; }
.sym, .chip, .icon-btn, .avatar { display: inline-grid !important; place-items: center; place-content: center; padding: 0 !important; gap: 0 !important; line-height: 1; }
.sym > .ico, .chip > .ico, .icon-btn > .ico { display: block; margin: 0; }
.sym > .ico[href], .sym use { pointer-events: none; }
/* the flag glyph is drawn left of centre: nudge it optically */
.sym--milestone > .ico { transform: translateX(1px); }
.upcoming .what span { display: initial; }
.upcoming .what > span { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.upcoming .what > span > .sym { flex: none; margin-top: 0; }
.upcoming .what > b { line-height: 1.3; }
.day-detail .ev-row > .sym { margin-top: 2px; }
.ev > .sym { flex: none; }

/* subtle motion on symbols and chips */
.sym { transition: transform 220ms var(--ease); }
.cal-legend button:hover .sym, .upcoming li:hover .sym, .agenda .row:hover .sym { transform: scale(1.12) rotate(-6deg); }
.sym--milestone:hover > .ico { transform: translateX(1px); }

/* title plates: a smooth wipe once the font is ready, then the words fade in */
/* Title plates: one wipe that reveals the plate and its words together.
   clip-path runs on the compositor in Chrome/Firefox; the old background-size + color pair repainted every frame. */
@keyframes plateClip { from { -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0); } to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } }

/* header on small phones: keep the tour button and menu; Sign in lives in the menu */
@media (max-width: 520px) {
  .signin-link { display: none; }
  .header-cta { padding: 0 12px; font-size: 14px; min-height: 42px; }
  .site-header .wrap { gap: 8px; }
  .brand-mark { width: 40px; height: 40px; }
}
@media (max-width: 360px) { .header-cta { display: none; } }

/* portal: roster, inline name editing, request details */
.roster { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; max-height: 340px; overflow: auto; }
.roster li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); animation: drop 220ms var(--ease); }
.avatar--sm { width: 34px; height: 34px; font-size: 13px; }
.icon-btn--sm { width: 36px; height: 36px; border-radius: 9px; }
.icon-btn--sm .ico { width: 16px; height: 16px; }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.add-row .field select, .add-row .field input { min-height: 44px; }
@media (max-width: 520px) { .add-row { grid-template-columns: 1fr; } }
.name-cell { display: grid; gap: 2px; min-width: 0; }
.name-edit { font: 700 15.5px var(--sans); color: var(--ink); border: 1.5px solid transparent; background: transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; min-height: 36px; width: 100%; transition: border-color 160ms var(--ease), background-color 400ms var(--ease); }
.name-edit:hover { border-color: var(--line-strong); }
.name-edit:focus { outline: none; border-color: var(--purple); background: #fff; }
.name-edit.saved { background: #e3f4e8; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.user-row { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 640px) { .user-row { grid-template-columns: auto minmax(0, 1fr); } .user-row > div:last-child { grid-column: 1 / -1; } }
.empty .ico { width: 28px; height: 28px; color: var(--purple); }
.empty h3 { font-size: 20px; }
.sheet-head .tag { align-self: center; }
.tag .ico { width: 13px; height: 13px; }
@media (max-width: 640px) { .to-top { width: 44px; height: 44px; right: 12px; bottom: 12px; opacity: .92; } }
details.faq[open] > summary .ico { transform: rotate(135deg); }
.media-pair { position: relative; }
.split-media .pullquote { margin-top: 48px; }
.cal-layout > * { min-width: 0; }
.cal-layout > div:first-child { overflow-x: clip; }
.cal-grid > * { min-width: 0; }
/* highlight plates: the text and its plate wipe in together, and every wrapped line wipes at the same time
   (box-decoration-break: clone gives each line its own background, so each line runs its own wipe) */
/* highlight plates: a painted brush stroke behind the words (six shapes, picked per highlight), drawn in the theme's
   secondary color (or the accent for cream ones). The words and brush wipe in together, left to right, every wrapped
   line at once (the mask is cloned per line). */
@property --tb-p { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
.tblock { --tb-ink: var(--lav-ink); --tb-brush: var(--brush-1);
  background: var(--tb-brush) center / 100% 100% no-repeat; color: var(--tb-ink);
  padding: .12em .5em .16em; margin: 0 -.12em; line-height: 1.38; border-radius: 0; }
.tblock--cream { --tb-ink: var(--olive); --tb-brush: var(--brush-c1); }
.tblock.tb-b2 { --tb-brush: var(--brush-2); } .tblock.tb-b3 { --tb-brush: var(--brush-3); } .tblock.tb-b4 { --tb-brush: var(--brush-4); }
.tblock.tb-b5 { --tb-brush: var(--brush-5); } .tblock.tb-b6 { --tb-brush: var(--brush-6); }
.tblock--cream.tb-b2 { --tb-brush: var(--brush-c2); } .tblock--cream.tb-b3 { --tb-brush: var(--brush-c3); } .tblock--cream.tb-b4 { --tb-brush: var(--brush-c4); }
.tblock--cream.tb-b5 { --tb-brush: var(--brush-c5); } .tblock--cream.tb-b6 { --tb-brush: var(--brush-c6); }
.js .tblock:not(.is-done) { --tb-p: 0%; -webkit-mask-image: linear-gradient(90deg, #000 var(--tb-p), transparent calc(var(--tb-p) + 8%)); mask-image: linear-gradient(90deg, #000 var(--tb-p), transparent calc(var(--tb-p) + 8%)); }
.js .tblock.is-in { animation: tbWipe 700ms cubic-bezier(.32, .72, 0, 1) both; }
@keyframes tbWipe { from { --tb-p: -8%; } to { --tb-p: 100%; } }
@media (prefers-reduced-motion: reduce) { .js .tblock:not(.is-done) { animation: none !important; -webkit-mask-image: none; mask-image: none; } }

/* ================= v8: grading, homework tags, messages, transcripts ================= */
.letter { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--lav); color: var(--lav-ink); font: 800 13px/1 var(--sans); font-variant-numeric: tabular-nums; vertical-align: middle; }
.letter--inc { background: #ffe3de; color: #9b2a17; }
.grade-pill small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; opacity: .8; margin-top: 1px; }
.stag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; background: var(--bg-3); color: var(--ink-2); }
.stag--turned_in, .stag--ok { background: #ddf5e6; color: #1d6b3c; }
.stag--missing { background: #ffe3de; color: #9b2a17; }
.stag--late { background: #fff1c7; color: #6b4d00; }
.stag--incomplete { background: #fde7f1; color: #8f1d57; }
.stag--excused { background: #e6f0fb; color: #1f4f80; }
.stag--assigned { background: var(--bg-3); color: var(--ink-2); }
.tag--aud { background: #e6f0fb; color: #1f4f80; }
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--purple); color: #fff; font: 800 11.5px/1 var(--sans); font-variant-numeric: tabular-nums; margin-left: 2px; }
.tab-badge[hidden] { display: none; }
.kpis--gpa { margin-bottom: 0; }
.gpa-pair { display: inline-flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-weight: 600; }
.gpa-pair b { color: var(--purple); font-size: 17px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.gpa-pair--lg b { font-size: 22px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; font: 600 14px var(--sans); color: var(--muted); cursor: pointer; }
.link-btn .ico { width: 14px; height: 14px; }
.link-btn:hover { color: #9b2a17; }

/* homework list */
.form-grid--asg { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; margin-top: 0; gap: 12px; }
.form-grid--asg .btn { min-height: 48px; }
.form-grid--asg .full { grid-column: 1 / -1; }
.asg-list { list-style: none; margin: 16px 0 0; padding: 0; max-height: 360px; overflow: auto; }
.asg-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.asg-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.asg-list b { overflow-wrap: anywhere; }
.icon-btn--danger:hover { border-color: #c0392b; color: #c0392b; background: #fff5f3; }

/* grades by student */
.gb-tools { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(220px, 1.4fr); gap: 12px; align-items: end; margin-bottom: 14px; }
.stu-list { display: grid; gap: 8px; }
.stu { border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color 160ms var(--ease), box-shadow 200ms var(--ease); }
.stu[open] { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(43, 20, 60, .06); }
.stu > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; border-radius: 14px; }
.stu > summary::-webkit-details-marker { display: none; }
.stu > summary:hover { background: var(--bg-2); }
.stu > summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.stu-name { display: flex; flex-direction: column; min-width: 0; }
.stu-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stu-sum { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stu-avg { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 92px; justify-content: flex-end; }
.stu-chev { width: 18px; height: 18px; color: var(--muted); transition: transform 220ms var(--ease); }
.stu[open] .stu-chev { transform: rotate(180deg); }
.stu-body { padding: 0 14px 10px; border-top: 1px solid var(--line); animation: drop 220ms var(--ease); }
.stu-foot { margin: 6px 0 0; }
table.marks { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.marks th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 6px; font-weight: 800; }
table.marks td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
table.marks td:first-child { padding-left: 0; min-width: 160px; }
table.marks .num { text-align: right; white-space: nowrap; }
.score-in { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.score-in input { width: 64px; min-height: 38px; border-radius: 8px; border: 1.5px solid var(--line-strong); font: 700 15px var(--sans); text-align: center; font-variant-numeric: tabular-nums; background: #fff; color: var(--ink); transition: border-color 160ms var(--ease), background-color 300ms var(--ease); }
.score-in input:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
.score-in input[readonly] { background: var(--bg-3); }
.score-in input.saved { border-color: #2fa866; background: #effaf3; }
.score-in input.bad { border-color: #c0392b; background: #fff5f3; }
table.marks select { min-height: 38px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; font: 600 14px var(--sans); color: var(--ink); padding: 0 6px; }
.attempts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.att-chip { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 4px 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font: 700 12px var(--sans); color: var(--ink-2); cursor: pointer; }
.att-chip .ico { width: 12px; height: 12px; }
.att-chip:hover { border-color: #c0392b; color: #9b2a17; }

/* people */
.people-tools { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 10px; margin-bottom: 10px; }
.row-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.teaches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.teaches .tag { text-transform: none; letter-spacing: 0; font-size: 13px; padding: 3px 4px 3px 9px; }
.tag-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.tag-x:hover { background: rgba(0, 0, 0, .08); }
.tag-x .ico { width: 12px; height: 12px; }
.select-sm { min-height: 32px !important; font-size: 13px !important; border-radius: 8px; border: 1.5px dashed var(--line-strong); background: #fff; color: var(--ink-2); font: 600 13px var(--sans); padding: 0 6px; max-width: 220px; }

/* classes */
.class-list { list-style: none; margin: 0; padding: 0; }
.class-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) minmax(96px, 120px) auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.class-list .cl-name { display: flex; flex-direction: column; min-width: 0; }
.class-list select { min-height: 38px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; font: 600 13.5px var(--sans); color: var(--ink); padding: 0 6px; min-width: 0; width: 100%; }

/* sign-up class picker */
.check-row--cls { max-height: 220px; overflow: auto; padding: 2px; }
.sub-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }

/* transcripts */
.form-grid--tr { grid-template-columns: 1fr 1fr; }
.form-grid--tr .full { grid-column: 1 / -1; }
.tr-preview { min-height: 20px; margin: 10px 0 0; }

/* lunch */
.form-grid--lunch { grid-template-columns: repeat(3, auto); margin: 0; }

/* messages */
.msg-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.msg-side { align-self: start; }
.thread-list { list-style: none; margin: 14px -10px 0; padding: 0; display: grid; gap: 2px; max-height: 520px; overflow: auto; }
.thread-list button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); transition: background-color 160ms var(--ease); }
.thread-list button:hover { background: var(--bg-2); }
.thread-list button[aria-current="true"] { background: var(--lav-soft); }
.t-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.t-top { display: flex; justify-content: space-between; gap: 8px; }
.t-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-top time { font-size: 12.5px; color: var(--muted); flex: none; }
.t-snip { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-pane { display: flex; flex-direction: column; min-height: 520px; padding: 0; overflow: hidden; }
.msg-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.msg-layout .msg-back { display: none !important; }
.msg-scroll { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; max-height: 560px; background: var(--bg-2); }
.msg-empty { margin: auto; }
.bubble { max-width: min(78%, 560px); align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; animation: drop 220ms var(--ease); }
.bubble p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.bubble--me { align-self: flex-end; background: var(--purple); border-color: var(--purple); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble--me time { color: rgba(255, 255, 255, .78); }
.bubble-about { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-bottom: 2px; }
.msg-compose { padding: 14px 20px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.msg-compose select { justify-self: start; min-height: 36px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; font: 600 14px var(--sans); padding: 0 8px; }
.msg-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.msg-row textarea { min-height: 52px; max-height: 200px; resize: vertical; border-radius: 12px; border: 1.5px solid var(--line-strong); padding: 12px 14px; font: 500 15.5px/1.45 var(--sans); color: var(--ink); background: #fff; }
.msg-row textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
.msg-compose .form-note { margin: 0; }

@media (max-width: 900px) {
  .gb-tools, .people-tools { grid-template-columns: 1fr 1fr; }
  .gb-tools .add-row { grid-column: 1 / -1; }
  .people-tools .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-layout.has-thread .msg-side { display: none; }
  .msg-layout .msg-back { display: inline-grid !important; }
  .msg-pane { min-height: 440px; }
  .msg-scroll { max-height: 60vh; }
  .class-list li { grid-template-columns: 1fr 1fr auto; }
  .class-list .cl-name { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .gb-tools, .people-tools, .form-grid--tr, .form-grid--lunch { grid-template-columns: 1fr; }
  .people-tools .field:first-child { grid-column: auto; }
  .stu > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .stu-sum { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; }
  .stu-chev { grid-column: 3; grid-row: 1; }
  .stu-avg { min-width: 0; }
  .asg-list li { grid-template-columns: 1fr auto; }
  .asg-list li > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .asg-list li > button { grid-row: 1 / 3; grid-column: 2; }
  .user-row { grid-template-columns: auto minmax(0, 1fr); }
  .user-row .row-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .bubble { max-width: 88%; }
  .msg-head, .msg-compose { padding-left: 14px; padding-right: 14px; }
  .msg-scroll { padding: 14px; }
  .gpa-pair--lg b { font-size: 19px; }
}
@media print {
  .lunch-group--page + .lunch-group--page { break-before: page; }
  .lunch-group .table-wrap { border: 0; }
}
.user-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.user-row > .avatar { margin-top: 2px; }
.user-row .name-cell { min-width: 0; }
.user-row .name-cell > .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .row-tools { grid-column: 2; justify-content: flex-start; }
.user-row .row-tools .icon-btn--danger { margin-left: auto; }
.class-list li { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; row-gap: 8px; }
.class-list .cl-name { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.admin-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.stu-list { grid-template-columns: minmax(0, 1fr); }
.stu, .stu-body { min-width: 0; }
@media (max-width: 600px) {
  table.marks thead { display: none; }
  table.marks, table.marks tbody { display: block; }
  table.marks tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
  table.marks td { padding: 0; border: 0; }
  table.marks td:first-child { grid-column: 1 / -1; min-width: 0; }
  table.marks td.num { text-align: left; }
  table.marks td:last-child { text-align: right; }
  table.marks select { width: 100%; }
}

/* ===================================================================== v9: grouped tabs, schedule, math pace, chats, dark mode */
/* tabs: wrap into rows (never a hidden sideways scroll); admin tabs sit in labeled groups */
.tabnav { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabgroup { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tabgroup-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }
.tabgroup-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.tabnav button { position: relative; min-height: 42px; padding: 0 14px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2); font: 700 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease); }
.tabnav button .ico { width: 18px; height: 18px; flex: none; }
.tabnav button:hover { background: var(--bg-2); color: var(--ink); }
.tabnav button[aria-selected="true"] { background: var(--lav); color: var(--lav-ink); }
.tabnav button:focus-visible { outline: none; border-color: var(--purple); }
.tabnav--grouped { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; align-items: center; }
.tabnav--grouped .tabgroup { display: contents; }
.tabnav--grouped .tabgroup-label { padding: 0; min-width: 84px; }
@media (max-width: 760px) {
  .tabnav { gap: 10px; }
  .tabnav--grouped { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tabnav--grouped .tabgroup-label { margin-top: 6px; }
  .tabgroup-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .tabnav button { justify-content: flex-start; background: var(--bg-2); min-height: 44px; }
  .tabnav button[aria-selected="true"] { background: var(--lav); }
}
@media (max-width: 380px) { .tabgroup-btns { grid-template-columns: 1fr 1fr; } .tabnav button { font-size: 14px; padding: 0 10px; } }
.who-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.who-acts .btn .ico { width: 16px; height: 16px; }
@media (max-width: 600px) { .who { flex-wrap: wrap; } .who-acts { width: 100%; } .who-acts .btn { flex: 1; } }
.auth--narrow { max-width: 520px; grid-template-columns: 1fr; }

/* overview: student/parent cards beside "due soon" */
.ov-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 22px; }
.ov-cards { display: grid; gap: 14px; }
.ov-top { align-items: stretch; }
.ov-top > .panel { align-self: stretch; }
.ov-cards > .card:only-child { height: 100%; }
@media (max-width: 860px) { .ov-top { grid-template-columns: minmax(0, 1fr); } }
.kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi--link { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.kpi--link:hover { border-color: var(--purple); transform: translateY(-2px); }
.kpi--alert { border-color: var(--purple); background: var(--lav-soft); }
.kpi--now b { color: var(--gold-text); }

/* announcements: headline + two lines, the rest on click */
.ann-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important; }
.ann-main { min-width: 0; }
.ann-more { background: none; border: 0; padding: 4px 0 0; font: 700 14px var(--sans); color: var(--purple); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ann--long { cursor: pointer; }
.ann--long:hover { border-color: var(--line-strong); }
.ann--long:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.ann-full h3 { font-size: 22px; margin: 6px 0 10px; }
.ann-full p { white-space: pre-line; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.ann-full .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.ann-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0 64px; }
@media (max-width: 600px) { .ann-tools { margin-left: 0; } }

/* grade display switch */
.grades-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.grades-top .kid-switch { margin: 0; }
.gv-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg--sm button, .seg--tabs button { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 7px; }
.seg--sm button[aria-pressed="true"], .seg--tabs button[aria-pressed="true"] { background: var(--lav); color: var(--lav-ink); }
.seg--tabs { margin-bottom: 18px; flex-wrap: wrap; }
.seg--tabs button { min-height: 40px; font-size: 14.5px; }
.grade-pill .gv-main { display: block; }
.grade-pill small { display: block; font-size: 12px; font-weight: 700; opacity: .75; }

/* lunch deadline */
.note--deadline { margin: 0 0 14px; }
.note--closed { background: var(--bg-3); border-color: var(--line-strong); }

/* absence note upload */
.file-drop { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 1.5px dashed var(--line-strong); border-radius: 10px; cursor: pointer; font-size: 14.5px; color: var(--ink-2); background: var(--bg-2); transition: border-color 160ms var(--ease); }
.file-drop:hover, .field:focus-within .file-drop { border-color: var(--purple); }
.file-drop .ico { width: 20px; height: 20px; flex: none; color: var(--purple); }
.field[data-invalid] .file-drop { border-color: var(--c-closed); }
.field .err[data-file-err] { display: none; }
.field[data-invalid] .err[data-file-err] { display: block; }
.link-btn--file { color: var(--purple); padding: 2px 0; font-size: 13.5px; }
.link-btn--file:hover { color: var(--purple-2); text-decoration: underline; }

/* classes page */
.cls-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-bottom: 8px; }
.cls-tools .field { min-width: 200px; }
.cls-group { margin-top: 22px; }
.cls-group > h3 { font-size: 16px; margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; }
.cls-group .class-list li, .cls-body .class-list li { display: block; padding: 0; }
.cls-row > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 4px; cursor: pointer; }
.cls-row > summary::-webkit-details-marker { display: none; }
.cls-row > summary .cl-name { flex: 1; min-width: 0; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.cls-row > summary .cl-name > .muted { flex-basis: 100%; }
.cls-row[open] > summary .stu-chev { transform: rotate(180deg); }
.cls-edit { padding: 4px 4px 16px; }
.form-grid--cls { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.form-grid--cls .full { grid-column: 1 / -1; }
.form-grid--cls fieldset { grid-column: span 2; }
.form-grid--cls > .check-row { grid-column: 1 / -1; }
@media (max-width: 900px) { .form-grid--cls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .form-grid--cls { grid-template-columns: minmax(0, 1fr); } .form-grid--cls fieldset { grid-column: auto; } }
.check-row--tight label { min-height: 36px; padding: 0 10px; font-size: 14px; }
.tag--elective { background: #fff1c7; color: #6b4d00; } .tag--e { background: #e6f0fb; color: #1f4f80; } .tag--x { background: #fde7f1; color: #8f1d57; } .tag--core { background: #efe6fb; color: #4b1460; }
.btn--danger { --b-fg: #b0301a; }

/* messages: group chats */
.msg-newgroup { width: 100%; margin-top: 10px; }
.avatar--group { background: var(--cream); color: var(--olive); }
.avatar--group .ico { width: 16px; height: 16px; }
.t-snip .ico { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }
.msg-head-main { flex: 1; min-width: 0; }
.msg-head-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.msg-head-acts .ico { width: 14px; height: 14px; }
.chat-pick { max-height: 46vh; overflow: auto; margin: 6px 0; padding-right: 4px; }
.chat-pick legend { display: flex; gap: 10px; align-items: baseline; font-weight: 700; }
.chat-pick .link-btn { padding: 0; font-size: 13px; }
.check-row--list { flex-direction: column; flex-wrap: nowrap; }
.check-row--list label { justify-content: flex-start; min-height: 40px; }
.check-row--list label[hidden] { display: none; }
.check-line { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; margin: 10px 0 0; }
.member-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.member-list li { display: flex; gap: 10px; align-items: center; }
.modal .sheet:has(.chat-pick) { width: min(620px, 100%); }

/* schedule */
.sch-top { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: end; margin-bottom: 8px; }
.sch-who { min-width: 240px; }
.sch-q { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sch-title { margin: 14px 0 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.sch-table { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.sch-table th { font-size: 13px; text-align: left; color: var(--muted); font-weight: 800; padding: 4px 6px; }
.sch-table tbody th { width: 112px; vertical-align: top; }
.sch-table tbody th b { display: block; color: var(--ink); font-size: 14.5px; }
.sch-table tbody th small, .sch-when small { color: var(--muted); font-size: 12px; font-weight: 600; }
.sch-table td { vertical-align: top; padding: 0; }
.sch-class { display: block; padding: 8px 10px; border-radius: 10px; background: var(--lav-soft); border: 1px solid rgba(91, 26, 107, .18); font-size: 14px; line-height: 1.3; margin-bottom: 4px; }
.sch-class small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sch-class--elective { background: #fff7df; border-color: rgba(201, 162, 39, .35); }
.sch-class--e { background: #e9f2fc; border-color: rgba(61, 143, 214, .3); }
.sch-class--other { background: var(--bg-3); border-color: var(--line-strong); }
.sch-none { display: block; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.sch-fixed { display: block; padding: 4px 10px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.sch-break th, .sch-break td { background: transparent; }
.sch-days { display: none; }
.sch-extra { margin-top: 16px; }
@media (max-width: 760px) {
  .sch-wrap { display: none; }
  .sch-days { display: grid; gap: 12px; }
  .sch-day { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--card); }
  .sch-day h4 { margin: 0 0 6px; font-size: 16px; }
  .sch-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .sch-day li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: start; }
  .sch-day li.sch-break { opacity: .8; }
  .sch-when b { display: block; font-size: 14px; }
}

/* math pace */
.pace-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 960px) { .pace-glance { grid-template-columns: minmax(0, 1fr); } }
.pace-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pace-mini li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14.5px; line-height: 1.3; }
.pace-mini li:not(:has(.datebox)) { grid-template-columns: minmax(0, 1fr); }
.datebox--sm { width: 44px; height: 44px; border-radius: 10px; }
.datebox--sm b { font-size: 17px; }
.datebox--sm span { font-size: 10px; }
.pace-units > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.pace-units > summary::-webkit-details-marker { display: none; }
.pace-units[open] > summary .stu-chev { transform: rotate(180deg); }
.pace-units-body { margin-top: 14px; display: grid; gap: 12px; }
.unit-list { margin: 0; padding-left: 24px; display: grid; gap: 6px; }
.unit-list li { padding-left: 4px; }
.unit-list li[data-unit] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.unit-acts { display: flex; gap: 4px; }
.unit-acts .icon-btn { width: 34px; height: 34px; }
.unit-acts [data-move="-1"] .ico, .unit-acts [data-move="1"] .ico { transform: rotate(90deg); }
.pace-unplaced { display: grid; gap: 8px; }
.pace-unplaced .add-row { grid-template-columns: minmax(0, 1fr) minmax(180px, auto); align-items: center; }
.pace-course { margin-top: 16px; }
.pace-course h4 { margin: 0 0 8px; font-size: 16px; }
.pace-cur { font-size: 14px; font-weight: 600; }
.pace-place { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 10px; }
.pace-place label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.date-sm { min-height: 36px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--field, #fff); color: var(--ink); font: 600 13.5px var(--sans); padding: 0 8px; max-width: 150px; }
.att-chip--ok { border-color: #8fd3a8; }
.pace-now { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; font-size: 15px; }
.pace-now .ico { color: var(--purple); }
@media (max-width: 600px) {
  table.pace-table tr { grid-template-columns: 1fr 1fr; }
}

/* staff calendar events */
.form-grid--ev { grid-template-columns: 1fr 1fr; }
.form-grid--ev .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid--ev { grid-template-columns: minmax(0, 1fr); } }
.upcoming li .icon-btn { margin-left: auto; }

/* course requests */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.req-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); }
.req-card header { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.req-card p { margin: 0; color: var(--ink-2); }
.req-card--on { border-color: var(--purple); background: var(--lav-soft); }
.req-acts { margin-top: auto; padding-top: 6px; }
.plan-settings { margin-bottom: 18px; }
.form-grid--plan { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; margin-top: 0; }
.form-grid--plan .label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
@media (max-width: 760px) { .form-grid--plan { grid-template-columns: minmax(0, 1fr); } }
.plan-body .class-list li { grid-template-columns: minmax(0, 1fr) auto; }
.plan-body .class-list .cl-name { grid-column: auto; }
.plan-report { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.issue-list .ico { flex: none; margin-top: 3px; color: var(--c-closed); }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.req-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }

/* transcripts: current GPA table */
.gpa-all { margin-bottom: 18px; }
.gpa-all > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.gpa-all > summary::-webkit-details-marker { display: none; }
.gpa-all[open] > summary .stu-chev { transform: rotate(180deg); }
.gpa-all #gpa-all { margin-top: 12px; }
.gpa-table small { font-weight: 600; color: var(--muted); }

/* theme switch in the header */
.theme-toggle { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.theme-toggle:hover { border-color: var(--purple); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .ico { width: 19px; height: 19px; }
.theme-toggle .i-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .i-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .i-light { display: none; }

/* calendar: no-school days look the same everywhere */
.day.weekend { background: var(--bg-2); }
.day.closed { background: repeating-linear-gradient(135deg, rgba(232, 96, 76, .10) 0 8px, rgba(232, 96, 76, .04) 8px 16px), var(--card); border-color: rgba(232, 96, 76, .45); }
.day.closed .n::after { content: none; }
.day .off { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 6px; background: rgba(232, 96, 76, .14); color: #9b2a17; font-size: 11.5px; font-weight: 800; line-height: 1.2; overflow: hidden; }
.day .off small { font-size: 11px; font-weight: 600; color: inherit; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.closed.weekend { background: var(--bg-2); border-color: var(--line); }
.day.closed.weekend .off { display: none; }
.day .ev .tag-staff { font-size: 10px; margin-left: auto; opacity: .7; }
@media (max-width: 760px) { .day .off { display: none; } .day.closed .n span { color: #9b2a17; } }
.breaks li span:first-child { font-weight: 600; }

/* ---------------------------------------------------------------- dark mode */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15111c; --bg-2: #1c1625; --bg-3: #251d31; --card: #1e1828; --field: #17121f;
  --line: rgba(236, 225, 250, .12); --line-strong: rgba(236, 225, 250, .26);
  --ink: #f2edf8; --ink-2: #d5cce1; --muted: #ab9fbd;
  --purple: #c8a1e6; --purple-2: #dcc0f2; --gold: var(--purple); --gold-2: var(--purple-2); --gold-ink: #1b1024; --brand: var(--purple);
  --gold-text: #f2c75a; --lav: #3a2a4f; --lav-soft: #2a2039; --lav-ink: #f0e4ff; --cream: #3a2f17; --olive: #ffe39a;
  --shadow: 0 16px 36px rgba(0, 0, 0, .45); --dots: radial-gradient(rgba(236, 225, 250, .06) 1px, transparent 1.2px) 0 0 / 9px 9px;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .site-header { background: rgba(21, 17, 28, .92); }
:root[data-theme="dark"] .sub, :root[data-theme="dark"] .pullquote { background: var(--card); }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea, :root[data-theme="dark"] .gradebook input, :root[data-theme="dark"] .user-row select, :root[data-theme="dark"] .role-pick button,
:root[data-theme="dark"] .att-opts button, :root[data-theme="dark"] .name-edit:focus, :root[data-theme="dark"] table.marks select, :root[data-theme="dark"] .select-sm, :root[data-theme="dark"] .class-list select,
:root[data-theme="dark"] .msg-compose select, :root[data-theme="dark"] .msg-row textarea, :root[data-theme="dark"] .score-in input, :root[data-theme="dark"] .att-chip, :root[data-theme="dark"] .bubble, :root[data-theme="dark"] .lunch-sheet { background: var(--field); color: var(--ink); }
:root[data-theme="dark"] .bubble--me { background: #6e3a8c; border-color: #6e3a8c; color: #fff; }
:root[data-theme="dark"] .btn { --b-bg: var(--gold); --b-fg: var(--gold-ink); }
:root[data-theme="dark"] .btn--lav, :root[data-theme="dark"] .btn--light { --b-bg: var(--lav); --b-fg: var(--lav-ink); }
:root[data-theme="dark"] .btn--ghost { --b-bg: transparent; --b-fg: var(--ink); }
:root[data-theme="dark"] .btn--sun { --b-bg: var(--sun); --b-fg: var(--sun-ink); }
:root[data-theme="dark"] .btn--danger { --b-fg: #ff9d8c; }
:root[data-theme="dark"] .toast, :root[data-theme="dark"] .tab-badge, :root[data-theme="dark"] .skip { background: #8a4fb0; color: #fff; }
:root[data-theme="dark"] .modal .sheet { background: var(--bg-2); }
:root[data-theme="dark"] .site-footer { background: var(--footer-bg-dark, #0f0b14); color: #e6dcef; }
:root[data-theme="dark"] .legal { color: #cdbfd9; }
:root[data-theme="dark"] .chip { background: rgba(200, 161, 230, .16); color: var(--purple); }
:root[data-theme="dark"] .chip--sage, :root[data-theme="dark"] .tag--ok, :root[data-theme="dark"] .stag--ok, :root[data-theme="dark"] .stag--turned_in, :root[data-theme="dark"] .att-badge.present { background: rgba(120, 220, 160, .14); color: #9fe5bb; }
:root[data-theme="dark"] .chip--sand, :root[data-theme="dark"] .tag--important, :root[data-theme="dark"] .stag--late, :root[data-theme="dark"] .att-badge.tardy, :root[data-theme="dark"] .tag--elective { background: rgba(246, 196, 69, .15); color: #f5d27a; }
:root[data-theme="dark"] .chip--sky, :root[data-theme="dark"] .tag--aud, :root[data-theme="dark"] .stag--excused, :root[data-theme="dark"] .att-badge.absent_excused, :root[data-theme="dark"] .tag--e { background: rgba(120, 180, 240, .15); color: #a9cff5; }
:root[data-theme="dark"] .chip--rose, :root[data-theme="dark"] .tag--urgent, :root[data-theme="dark"] .stag--missing, :root[data-theme="dark"] .letter--inc, :root[data-theme="dark"] .att-badge.absent_unexcused { background: rgba(255, 138, 122, .16); color: #ffb2a6; }
:root[data-theme="dark"] .stag--incomplete, :root[data-theme="dark"] .tag--x { background: rgba(240, 120, 180, .15); color: #f5a9cd; }
:root[data-theme="dark"] .tag, :root[data-theme="dark"] .att-badge.reported, :root[data-theme="dark"] .tag--core { background: rgba(200, 161, 230, .15); color: #dcc0f2; }
:root[data-theme="dark"] .score-ok { color: #8fdcae; } :root[data-theme="dark"] .score-low { color: #ff9d8c; }
:root[data-theme="dark"] .mode-banner { background: rgba(120, 180, 240, .1); border-color: rgba(120, 180, 240, .3); } :root[data-theme="dark"] .mode-banner .ico { color: #a9cff5; }
:root[data-theme="dark"] .note { background: rgba(246, 196, 69, .08); border-color: rgba(246, 196, 69, .28); }
:root[data-theme="dark"] .note--closed { background: var(--bg-3); border-color: var(--line-strong); }
:root[data-theme="dark"] .sym--event, :root[data-theme="dark"] .sym--milestone, :root[data-theme="dark"] .sym--early { color: #2b1d00; }
:root[data-theme="dark"] .ev { background: rgba(236, 225, 250, .07); }
:root[data-theme="dark"] .day .off { background: rgba(255, 138, 122, .16); color: #ffb2a6; }
:root[data-theme="dark"] .day.closed .n span { color: inherit; }
:root[data-theme="dark"] .sch-class--elective { background: rgba(246, 196, 69, .1); }
:root[data-theme="dark"] .sch-class--e { background: rgba(120, 180, 240, .1); }
:root[data-theme="dark"] .tile, :root[data-theme="dark"] .cta-band { color: #fff; }
:root[data-theme="dark"] img { filter: brightness(.92); }
:root[data-theme="dark"] .brand-mark { background: #2a1236; }
@media print { :root[data-theme="dark"] { color-scheme: light; } }
.pace-table td { vertical-align: top; }
.pace-table td > select, .pace-table td > .date-sm { width: 100%; max-width: 168px; }
.pace-started { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pace-table .attempts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.field:has(> input[type="file"]) { position: relative; }
input[type="file"].sr-only { left: 0; top: 0; }
.theme-row { display: none; }
.theme-row .ico { width: 18px; height: 18px; }
.theme-row .i-dark { display: none; }
:root[data-theme="dark"] .theme-row .i-dark { display: block; }
:root[data-theme="dark"] .theme-row .i-light { display: none; }
@media (max-width: 480px) { .header-tools .theme-toggle { display: none; } .mobile-only .theme-row { display: inline-flex; } }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--card) 0%, #2d2439 50%, var(--card) 100%) 0 0 / 200% 100%; }
.cls-row .stu-chev, .pace-units .stu-chev, .gpa-all .stu-chev { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 200ms var(--ease); }

/* v10: header never wraps; print shows only the sheet */
.signin-link span, .brand-name, .brand-sub { white-space: nowrap; }
@media (max-width: 1240px) { .brand-sub { display: none; } }
@media (max-width: 1160px) { .header-tools .theme-toggle { width: 36px; height: 36px; } .main-nav ul { gap: 0; } }
@media print {
  @page { margin: 0; }
  body { padding: 12mm 14mm; }
  .tabbar, .tabnav, .who, .dash-head, #nl-badge-frame, iframe, .to-top, .note, .att-legend + .no-print { display: none !important; }
  .lunch-sheet .vendor-row th { font-size: 12pt; }
  .print-only { margin: 0 0 8pt; font-size: 15pt; }
}
/* portal tabs: one row of everyday tabs, then dropdowns (admin) */
.tabnav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tabrow { display: flex; flex-wrap: wrap; gap: 4px; }
.tabdrop { position: relative; }
.tabdrop + .tabdrop, .tabrow + .tabdrop { margin-left: 2px; }
.tabdrop-btn span b { font-weight: 800; margin-left: 6px; }
.tabdrop-btn span b::before { content: "· "; font-weight: 600; opacity: .6; }
.tabdrop.is-current > .tabdrop-btn { background: var(--lav); color: var(--lav-ink); }
.tabnav .tabdrop-btn { border: 1.5px solid var(--line); }
.tabdrop-chev { width: 16px !important; height: 16px !important; transition: transform 180ms var(--ease); }
.tabdrop-btn[aria-expanded="true"] .tabdrop-chev { transform: rotate(180deg); }
.tabdrop-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 230px; display: grid; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); animation: dropIn 160ms var(--ease); }
.tabdrop-menu[hidden] { display: none; }
.tabnav .tabdrop-menu button { width: 100%; justify-content: flex-start; background: transparent; }
.tabnav .tabdrop-menu button:hover { background: var(--bg-2); }
.tabnav .tabdrop-menu button[aria-selected="true"] { background: var(--lav); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .tabdrop-menu { animation: none; } }
@media (max-width: 760px) {
  .tabnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tabrow { display: contents; }
  .tabdrop + .tabdrop, .tabrow + .tabdrop { margin-left: 0; }
  .tabnav .tabdrop-btn { width: 100%; justify-content: flex-start; }
  .tabdrop-btn .tabdrop-chev { margin-left: auto; }
  .tabdrop:has(.tabdrop-menu:not([hidden])) { grid-column: 1 / -1; }
  .tabdrop-menu { position: static; margin-top: 6px; min-width: 0; box-shadow: none; }
}
/* student math pace: a clean step list */
.pace-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; }
.pace-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.pace-head h3 { margin: 0 0 2px; font-size: 22px; }
.pace-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.pace-stats > div { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pace-stats span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pace-stats b { display: block; font-size: 17px; margin-top: 4px; overflow-wrap: anywhere; }
.pace-stats b small { font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 600px) { .pace-stats { grid-template-columns: minmax(0, 1fr); } }
.pace-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--sans); background: var(--bg-3); color: var(--muted); }
.step-dot .ico { width: 15px; height: 15px; }
.step-main b { display: block; font-size: 15.5px; }
.step-main span { font-size: 13.5px; color: var(--muted); }
.step-score { text-align: right; }
.step-score b { display: block; font-size: 16px; }
.step-score small { font-size: 12px; color: var(--muted); }
.step--done .step-dot { background: #ddf5e6; color: #1d6b3c; }
.step--current .step-dot { background: var(--purple); color: #fff; box-shadow: 0 0 0 4px var(--lav-soft); }
.step--current .step-main b { color: var(--purple); }
.step--retest .step-dot { background: #ffe3de; color: #9b2a17; }
:root[data-theme="dark"] .step--done .step-dot { background: rgba(120, 220, 160, .16); color: #9fe5bb; }
:root[data-theme="dark"] .step--retest .step-dot { background: rgba(255, 138, 122, .16); color: #ffb2a6; }
:root[data-theme="dark"] .step--current .step-dot { background: #8a4fb0; }

/* ===================================================================== v11 */
/* every dropdown: same chevron, centered, with room on the right */
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e5470' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ab9fbd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select:not([multiple]) { -webkit-appearance: none; appearance: none; background-image: var(--chev) !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 14px 14px !important; padding-right: 32px !important; text-overflow: ellipsis; }
.select-sm { border-style: solid !important; padding-left: 10px; }

/* press feedback everywhere */
.att-opts button:active, .tabnav button:active, .kpi--link:active, .att-chip:active, .att-add:active, .ticks--links button:active { transform: scale(.96); }
.att-opts button, .att-chip, .att-add { transition: transform 90ms var(--ease), background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease); }
.is-busy { opacity: .7; pointer-events: none; }

/* overview links */
.ticks--links li { padding: 0; }
.ticks--links button { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; font: inherit; color: inherit; cursor: pointer; transition: background-color 140ms var(--ease); }
.ticks--links button:hover { background: var(--bg-2); }
.ticks--links button .ico { flex: none; margin-top: 3px; color: var(--purple); }

/* homework panel now full width */
.panel--asg .form-grid--asg { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; }
.panel--asg .form-grid--asg .full { grid-column: auto; }
@media (max-width: 900px) { .panel--asg .form-grid--asg { grid-template-columns: 1fr 1fr; } .panel--asg .form-grid--asg .full { grid-column: 1 / -1; } }

/* google classroom links */
.gc-links { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.gc-links li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.gc-links li:first-child { border-top: 0; }
@media (max-width: 600px) { .gc-links li { grid-template-columns: 1fr auto; } .gc-links .gc-pick { grid-column: 1 / -1; } }

/* math pace: one tidy row per unit */
.urows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.urow { display: grid; grid-template-columns: minmax(0, 1.5fr) 150px 140px minmax(0, 1.3fr) 76px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.urow--cur { background: var(--lav-soft); box-shadow: inset 0 0 0 1.5px rgba(91, 26, 107, .25); }
.urow-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.urow-name b { display: block; font-size: 15px; }
.urow-name small { display: block; font-size: 12px; font-weight: 700; color: var(--purple); }
.urow-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 12px var(--sans); background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.urow-n .ico { width: 13px; height: 13px; }
.urow--done .urow-n { background: #ddf5e6; color: #1d6b3c; border-color: transparent; }
.urow--cur .urow-n { background: var(--purple); color: #fff; border-color: transparent; }
.urow-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.urow-f > span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.urow-f small { font-size: 12px; color: var(--muted); }
.urow-f .date-sm, .urow-f select { width: 100%; max-width: none; }
.urow-scores .attempts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 32px; }
.att-add { width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.att-add:hover { border-color: var(--purple); color: var(--purple); }
.att-add .ico { width: 14px; height: 14px; }
.score-mini { width: 64px; min-height: 30px; border-radius: 8px; border: 1.5px solid var(--purple); padding: 0 8px; font: 700 14px var(--sans); background: var(--field, #fff); color: var(--ink); }
.score-mini.bad { border-color: var(--c-closed); }
.urow-avg { text-align: right; }
.urow-avg b { display: block; font-size: 16px; }
.urow-avg small { font-size: 11.5px; color: var(--muted); }
.pace-place { display: flex; flex-wrap: wrap; gap: 16px; margin: 2px 0 10px; }
.pace-place label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 900px) { .urow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .urow-name { grid-column: 1 / -1; } .urow-avg { text-align: left; } }
:root[data-theme="dark"] .urow--done .urow-n { background: rgba(120, 220, 160, .16); color: #9fe5bb; }
:root[data-theme="dark"] .urow--cur .urow-n { background: #8a4fb0; }

/* attendance */
.att-head { align-items: end; }
.att-pickers { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.att-pickers .field { min-width: 170px; }
.att-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 4px 0 14px; }
.att-bar .att-legend { margin: 0; }
.att-level { font-size: 16px; margin: 18px 0 8px; }
.att-list { padding: 6px 20px; }
.att-title { margin: 6px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.att-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; font-size: 13.5px; color: var(--ink-2); }
.att-key span { display: inline-flex; gap: 6px; align-items: center; }
.att-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.att-grid th, .att-grid td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.att-grid thead th { font-size: 13px; color: var(--muted); font-weight: 800; }
.att-grid thead th span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.att-grid tbody th { text-align: left; white-space: nowrap; padding-right: 12px; }
.att-grid tbody th small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.att-cell { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font: 800 12px var(--sans); font-style: normal; background: var(--bg-2); color: var(--muted); }
.att-cell--present { background: #e3f4e8; color: #1d5a33; } .att-cell--tardy { background: #fff1c9; color: #6b4d00; }
.att-cell--absent_excused { background: #e2effb; color: #1f4f7a; } .att-cell--absent_unexcused { background: #fde6e2; color: #8a2414; } .att-cell--reported { background: #efe6fb; color: #4b1460; }
:root[data-theme="dark"] .att-cell--present { background: rgba(120, 220, 160, .14); color: #9fe5bb; } :root[data-theme="dark"] .att-cell--tardy { background: rgba(246, 196, 69, .15); color: #f5d27a; }
:root[data-theme="dark"] .att-cell--absent_excused { background: rgba(120, 180, 240, .15); color: #a9cff5; } :root[data-theme="dark"] .att-cell--absent_unexcused { background: rgba(255, 138, 122, .16); color: #ffb2a6; }
:root[data-theme="dark"] .att-cell--reported { background: rgba(200, 161, 230, .15); color: #dcc0f2; }

/* messages sending state */
.bubble--sending { opacity: .7; }
.bubble--failed { opacity: 1; box-shadow: 0 0 0 2px var(--c-closed); }

/* activity log */
.log-tools { display: grid; grid-template-columns: minmax(0, 2fr) repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
@media (max-width: 1100px) { .log-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } .log-q { grid-column: 1 / -1; } }
@media (max-width: 560px) { .log-tools { grid-template-columns: 1fr 1fr; } }
.log-meta { display: flex; gap: 12px; align-items: center; margin: 14px 0 4px; }
.log-day { font-size: 14px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 6px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { display: grid; grid-template-columns: 74px 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.log-list li:first-child { border-top: 0; }
.log-list time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 5px; }
.log-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-2); color: var(--purple); }
.log-ico .ico { width: 15px; height: 15px; }
.log-what { font-size: 15px; overflow-wrap: anywhere; }
.log-what small { display: block; font-size: 12.5px; color: var(--muted); }
.log-more { text-align: center; margin-top: 12px; }
@media (max-width: 560px) { .log-list li { grid-template-columns: 30px minmax(0, 1fr); } .log-list time { grid-column: 2; padding: 0; order: 3; } }
@media (min-width: 901px) { .urow:not(:first-child) .urow-f > span { display: none; } }
.log-tools .field, .att-pickers .field { min-width: 0; }
.log-tools input, .log-tools select { width: 100%; min-width: 0; }
@media (max-width: 560px) { .att-pickers { width: 100%; } .att-pickers .field { flex: 1 1 140px; } }
.ticks--links li { display: block !important; grid-template-columns: none !important; }
.ticks--links button > span { flex: 1; min-width: 0; }

/* parent-reported absences waiting for review */
.kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.review-q { margin-bottom: 18px; border-color: rgba(91, 26, 107, .3); background: var(--lav-soft); }
.review-q h3 .tab-badge { margin-left: 2px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review-list li { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.review-main { min-width: 0; flex: 1 1 260px; }
.review-main p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.review-acts { display: flex; gap: 8px; }

/* lunch cart */
.cart-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--bg-2); border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; }
.cart-note .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--purple); }
.badge-count--cart { background: var(--cream) !important; color: var(--olive) !important; }
.cart .form-note { display: flex; gap: 6px; align-items: flex-start; }
.cart .form-note .ico { flex: none; width: 15px; height: 15px; margin-top: 3px; }

/* GPA hidden until someone presses Show GPA */
.gpa-hidden .gpa-val { color: transparent !important; background: repeating-linear-gradient(90deg, var(--line-strong) 0 10px, transparent 10px 14px); border-radius: 6px; user-select: none; }
.gpa-box h3 .muted { font-weight: 600; margin-left: auto; }
.gpa-toggle .ico { width: 17px; height: 17px; }

/* group chat picker: columns of plain checkboxes, sticky footer */
.modal .sheet:has(.chat-modal) { width: min(820px, 100%); padding: 0; display: flex; flex-direction: column; max-height: 88vh; overflow: hidden; }
.chat-modal { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px 6px; }
.chat-modal-head h3 { margin: 0; }
.chat-modal-body { padding: 8px 24px 16px; overflow: auto; display: grid; gap: 14px; min-height: 0; }
.chat-tools { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.chat-cls { display: flex; gap: 6px; align-items: center; }
.chat-cls select { flex: 1; min-width: 0; }
.chat-cls .btn { flex: none; min-height: 44px; }
@media (max-width: 640px) { .chat-tools { grid-template-columns: minmax(0, 1fr); } }
.pick-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 18px 22px; }
@media (max-width: 640px) { .pick-grid { grid-template-columns: minmax(0, 1fr); } }
.pick-col { border: 0; padding: 0; margin: 0; min-width: 0; }
.pick-col legend { padding: 0; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.pick-col legend .muted { font-weight: 600; margin-left: 4px; }
.pick-acts { display: flex; gap: 12px; margin: 2px 0 6px; }
.pick-acts .link-btn { padding: 2px 0; font-size: 13px; }
.pick-list { display: grid; gap: 2px; max-height: 300px; overflow: auto; padding-right: 4px; }
.pick-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.pick-row:hover { background: var(--bg-2); }
.pick-row[hidden] { display: none; }
.pick-row input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--purple); }
.pick-row small { display: block; font-size: 12.5px; color: var(--muted); }
.chat-modal-foot { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg-2); }
.chat-modal-btns { margin-left: auto; display: flex; gap: 8px; }
.chat-modal .check-line { margin: 0; }
.att-skel { min-height: 64px; margin-top: 12px; }
.att-skel + .att-skel { min-height: 220px; }

/* activity log toolbar */
.log-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.log-search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field, #fff); }
.log-search:focus-within { border-color: var(--purple); }
.log-search .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.log-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--sans); color: var(--ink); min-height: 44px; }
.log-bar .btn .tab-badge { margin-left: 4px; }
.log-sort { display: flex; gap: 6px; align-items: center; }
.log-sort select { min-height: 44px !important; }
.log-dir { width: 44px; height: 44px; }
.log-dir .ico { transform: rotate(90deg); transition: transform 200ms var(--ease); }
.log-dir.is-asc .ico { transform: rotate(-90deg); }
.log-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.log-chips:empty { display: none; }
.chip-f { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--lav); color: var(--lav-ink); font-size: 13.5px; font-weight: 700; }
.chip-f button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.chip-f button:hover { background: rgba(0, 0, 0, .08); }
.chip-f .ico { width: 12px; height: 12px; }
.log-count { margin: 12px 0 0; }
.pick-list--tall { max-height: none; }
.lf-dates { display: grid; gap: 4px; margin-top: 8px; }
.pick-row input[type="radio"] { accent-color: var(--purple); }
@media (max-width: 560px) { .log-sort { flex: 1; } .log-sort select { flex: 1; } }

/* date fields + the site date picker */
:root { --cal-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b1a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --cal-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8a1e6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
input[type="date"] { cursor: pointer; background-image: var(--cal-ico) !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 17px 17px !important; padding-right: 38px !important; }
input[type="date"]::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }
input[type="date"]::-webkit-inner-spin-button { display: none; }
.dp { position: fixed; z-index: 140; width: 300px; padding: 14px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 18px 44px rgba(43, 20, 60, .2); opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top left; transition: opacity 140ms var(--ease), transform 140ms var(--ease); }
.dp.open { opacity: 1; transform: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-size: 16px; }
.dp-nav { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.dp-nav:hover { background: var(--bg-2); }
.dp-nav .ico { width: 18px; height: 18px; }
.dp-dow, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow span { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.dp-day { position: relative; aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; transition: background-color 100ms var(--ease), transform 90ms var(--ease); }
.dp-day:hover { background: var(--bg-2); }
.dp-day:active { transform: scale(.92); }
.dp-day:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.dp-out { color: var(--muted); opacity: .5; }
.dp-wk { color: var(--muted); }
.dp-today { box-shadow: inset 0 0 0 1.5px var(--purple); }
.dp-off::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--c-closed); }
.dp-day[aria-pressed="true"] { background: var(--purple); color: #fff; box-shadow: none; }
.dp-day[disabled] { opacity: .3; cursor: not-allowed; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-link { border: 0; background: none; padding: 6px 8px; border-radius: 8px; font: 700 14px var(--sans); color: var(--muted); cursor: pointer; }
.dp-link:hover { background: var(--bg-2); color: var(--ink); }
.dp-link--strong { color: var(--purple); }
.dp--sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(16px); }
.dp--sheet .dp-day { font-size: 16px; }
:root[data-theme="dark"] .dp-day[aria-pressed="true"] { background: #8a4fb0; }
:root[data-theme="dark"] .dp { box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) { .dp { transition: none; } }

/* mobile menu: a full-screen sheet under the header; the page behind can't scroll */
@media (max-width: 1020px) {
  body.menu-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); box-shadow: none; }
  .main-nav { inset: 0; top: var(--menu-top, 68px); bottom: 0; height: auto; z-index: 39; padding-bottom: calc(32px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  html:has(body.menu-open), body.menu-open { overflow: hidden; touch-action: none; }
  body.menu-open .main-nav { touch-action: pan-y; }
}
/* page heroes: the highlight wipe is the entrance, so the heading itself doesn't also slide in */
.js [data-enter] > h1:has(.tblock) { opacity: 1 !important; transform: none !important; transition: none !important; }

/* site map page */
.sitemap { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 36px; }
.sitemap h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sitemap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sitemap a { font-weight: 800; font-size: 18px; color: var(--purple); text-decoration: none; }
.sitemap a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sitemap span { display: block; font-size: 14.5px; color: var(--muted); }

/* mobile menu v3: a full-screen sheet over everything, with its own brand + close bar at the top */
.menu-bar { display: none; }
@media (max-width: 1020px) {
  .main-nav { position: fixed; inset: 0 !important; top: 0 !important; height: 100%; height: 100dvh; z-index: 80; background: var(--bg); padding: 0 var(--gutter) calc(110px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .menu-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 2; min-height: 68px; padding-top: env(safe-area-inset-top); margin: 0 calc(var(--gutter) * -1) 8px; padding-left: var(--gutter); padding-right: var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
  .menu-bar .brand { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
  .menu-bar .brand-name { font-size: 18px; }
  .main-nav .menu-bar a { font-size: inherit; font-weight: inherit; padding: 0; min-height: 0; border: 0; width: auto; }
  .menu-close { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
  .menu-close .ico { width: 24px; height: 24px; }
  .menu-close:active { transform: scale(.94); }
  body.menu-open #nl-badge-frame, body.menu-open .to-top { display: none !important; }
}

/* ===================== batch E: math planner, notices, planner, overview boxes, skeletons ===================== */
/* skeletons: shaped like the content, light gray */
.sk-wrap { display: grid; gap: 18px; }
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, #ececef 0%, #f6f6f8 45%, #ececef 90%) 0 0 / 220% 100%; animation: shimmer 1.3s linear infinite; }
:root[data-theme="dark"] .sk { background: linear-gradient(90deg, #2a2533 0%, #342e3f 45%, #2a2533 90%) 0 0 / 220% 100%; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.sk-panel { display: grid; gap: 16px; }
.sk-rows { display: grid; gap: 14px; }
.sk-row { display: flex; align-items: center; gap: 12px; }
.sk-col { flex: 1; display: grid; gap: 7px; min-width: 0; }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; }
.sk-head { display: flex; align-items: center; gap: 12px; }
.sk-tr { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.sk-grid { display: grid; grid-template-columns: repeat(var(--c), minmax(0, 1fr)); gap: 10px; }
.sk-colbox { display: grid; gap: 10px; align-content: start; }
@media (max-width: 640px) { .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att-skel { margin-top: 14px; }

/* activity log: results fade while new ones load */
.log-results { transition: opacity 180ms var(--ease); }
.log-results.is-loading { opacity: .45; pointer-events: none; }
.log-dir .ico { transition: transform 200ms var(--ease); }
.log-prune { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.log-prune > span { display: inline-flex; align-items: center; gap: 6px; }
.log-prune .ico { width: 14px; height: 14px; }
.log-prune input { min-height: 36px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); padding: 0 8px; font: 600 14px var(--sans); }

/* overview boxes */
.ov-bar { display: flex; justify-content: flex-end; margin: -6px 0 12px; }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; grid-auto-flow: row; }
.ov-w { min-width: 0; animation: ov-in 260ms var(--ease) both; }
.ov-w--full { grid-column: 1 / -1; }
.ov-w > .panel { height: 100%; }
@keyframes ov-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 760px) { .ov-grid { grid-template-columns: 1fr; } }
.ov-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ov-alert { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); background: #fff6e0; border: 1px solid #f0d48a; color: #5a4300; margin-bottom: 14px; }
.ov-alert > .ico { width: 22px; height: 22px; flex: none; }
.ov-alert > div { flex: 1 1 240px; display: grid; gap: 2px; }
.ov-alert span { font-size: 14px; }
.ov-grid .ov-alert { margin: 0; }
:root[data-theme="dark"] .ov-alert { background: rgba(240, 200, 100, .12); border-color: rgba(240, 200, 100, .3); color: #f3dc9c; }
.ov-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ov-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.ov-list li + li { border-top: 1px solid var(--line); }
.ovc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ovc-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ovc-row label { flex: 1; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.ovc-row label span { display: grid; }
.ovc-row small { color: var(--muted); font-size: 12.5px; }
.ovc-row input { width: 18px; height: 18px; accent-color: var(--purple); }

/* notices */
.nt-list { list-style: none; margin: 0; padding: 0; display: grid; }
.nt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; }
.nt-row + .nt-row { border-top: 1px solid var(--line); }
.nt-row--new .nt-main b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d4483b; margin-left: 8px; vertical-align: middle; }
.nt-main p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.nt-kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--lav-soft); color: var(--purple); }
.nt-kind .ico { width: 16px; height: 16px; }
.nt-kind--behavior { background: #ffe9e5; color: #9b2a17; }
.nt-kind--homework { background: #fff3d6; color: #7a5600; }
:root[data-theme="dark"] .nt-kind--behavior { background: rgba(255, 138, 122, .14); color: #ffb2a6; }
:root[data-theme="dark"] .nt-kind--homework { background: rgba(240, 200, 100, .14); color: #f3dc9c; }
.nt-acts { display: flex; gap: 6px; }
.nt-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.nt-rule { margin-bottom: 18px; }
.nt-rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.nt-done { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 10px 0; }
.nt-done > .ico { width: 34px; height: 34px; color: #1d6b3c; }
.nt-done h3 { margin: 0; }
.notice-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); background: #fff6e0; border-radius: 10px; padding: 8px 12px; }
.notice-line .ico { width: 15px; height: 15px; color: #9b6a00; }
.notice-line span { flex: 1 1 200px; }
:root[data-theme="dark"] .notice-line { background: rgba(240, 200, 100, .1); }
@media (max-width: 640px) { .nt-row { grid-template-columns: auto minmax(0, 1fr); } .nt-status, .nt-acts { grid-column: 2; } }
.seg-field { border: 0; padding: 0; margin: 0; }
.seg-field legend { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.seg-field .seg { flex-wrap: wrap; }
.seg-field .seg label { position: relative; cursor: pointer; }
.seg-field .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-field .seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 7px; font: 700 14px var(--sans); color: var(--ink-2); transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.seg-field .seg input:checked + span { background: var(--lav); color: var(--lav-ink); }
.seg-field .seg input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.num-sm { width: 64px; min-height: 34px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); padding: 0 8px; font: 700 14px var(--sans); }

/* planner */
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.pl-head .seg button { display: inline-flex; align-items: center; }
.pl-head .seg button[aria-pressed="true"] { background: var(--lav); }
.pl-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .pl-week { grid-template-columns: 1fr; } }
.pl-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; align-content: start; min-height: 150px; }
.pl-day--today { border-color: var(--purple); box-shadow: 0 0 0 3px var(--lav-soft); }
.pl-day h4, .pl-day .pl-h { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pl-day h4 b, .pl-day .pl-h b { font-size: 20px; color: var(--ink); letter-spacing: 0; }
.pl-day h4 small, .pl-day .pl-h small { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-radius: 8px; font-size: 14.5px; animation: drop 200ms var(--ease); }
.pl-item:hover { background: var(--bg-2); }
.pl-item input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--purple); flex: none; }
.pl-body { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.pl-body small { font-size: 12px; color: var(--purple); font-weight: 700; }
.pl-item--done .pl-body { color: var(--muted); text-decoration: line-through; }
.pl-item .icon-btn { width: 28px; height: 28px; border: 0; opacity: 0; }
.pl-item:hover .icon-btn, .pl-item .icon-btn:focus-visible { opacity: 1; }
@media (hover: none) { .pl-item .icon-btn { opacity: .6; } }
.pl-tick { width: 17px; height: 17px; border-radius: 4px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; margin-top: 2px; }
.pl-tick .ico { width: 12px; height: 12px; color: #1d6b3c; }
.pl-add { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-add input { flex: 1 1 120px; min-width: 0; min-height: 36px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg-3); color: var(--ink); padding: 0 10px; font: 500 14px var(--sans); }
.pl-add input:focus { border-color: var(--purple); outline: none; }
.pl-add select { min-height: 36px; max-width: 100%; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg-3); color: var(--ink); font: 600 13px var(--sans); padding: 0 6px; }
.pl-add .icon-btn { width: 36px; height: 36px; }
.pl-empty { margin: 0; }

/* math planner */
.pace-course-block { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-top: 12px; background: var(--card); }
.pace-course-block:first-child { margin-top: 0; }
.pcb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pcb-head b { font-size: 16px; }
.pcb-acts { display: flex; gap: 6px; align-items: center; }
.pcb-tools { display: grid; gap: 8px; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.pcb-tool { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.pcb-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 140px; }
.pcb-label .ico { width: 14px; height: 14px; }
.pcb-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pcb-add { margin-top: 12px; flex-wrap: wrap; }
.chip-btn { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: 700 13px var(--sans); cursor: pointer; transition: border-color 120ms var(--ease), background-color 120ms var(--ease), transform 90ms var(--ease); }
.chip-btn:hover { border-color: var(--purple); }
.chip-btn:active { transform: scale(.96); }
.chip-btn--go { background: var(--lav); border-color: transparent; color: var(--lav-ink); }
.urow-pick { display: flex; gap: 10px; align-items: center; min-width: 0; cursor: pointer; }
.urow-pick input { width: 17px; height: 17px; accent-color: var(--purple); flex: none; }
.urow-title { min-width: 0; }
.urow-title b { display: block; font-size: 15px; }
.urow-title small { display: block; font-size: 12px; font-weight: 700; color: var(--purple); }
.urow--off { grid-template-columns: minmax(0, 1fr) auto; background: transparent; border: 1px dashed var(--line); padding: 6px 12px; }
.urow--off .urow-title { color: var(--muted); font-size: 14.5px; }
.att-chip small { font-weight: 600; color: var(--muted); margin-left: 4px; }
.try-box { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.try-box .date-sm { width: 140px; min-height: 30px; }
.book-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--purple); text-decoration: none; }
.book-link .ico { width: 15px; height: 15px; }
.book-link:hover { text-decoration: underline; }
.unit-list li[data-unit] { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.name-edit--url { font-weight: 500; font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) { .unit-list li[data-unit] { grid-template-columns: 1fr auto; } .name-edit--url { grid-column: 1; grid-row: 2; } }
/* family view: each test opens for its days and tries */
.step { display: block; padding: 0; }
.step-d > summary { list-style: none; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; }
.step-d > summary::-webkit-details-marker { display: none; }
.step-chev { width: 16px; height: 16px; color: var(--muted); transition: transform 200ms var(--ease); }
.step-d[open] .step-chev { transform: rotate(180deg); }
.step-more { margin: 0 0 12px 46px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); display: grid; gap: 10px; animation: drop 200ms var(--ease); }
.step-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.step-facts dt { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.step-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14.5px; }
.try-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.try-table th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.try-table td { padding: 6px 0; border-top: 1px solid var(--line); }
.try-table .num { text-align: right; }
@media (max-width: 560px) { .step-more { margin-left: 0; } .step-facts { grid-template-columns: 1fr 1fr; } }

/* grade categories */
.h3-act { margin-left: auto; }
.panel--asg h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weights-line { margin: -4px 0 12px; }
.w-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.w-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; }
.w-row input { min-height: 42px; border-radius: 9px; border: 1.5px solid var(--line-strong); background: var(--bg-3); color: var(--ink); padding: 0 10px; font: 600 15px var(--sans); width: 100%; }
.w-pct { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.w-total { margin: 10px 0 0; font-weight: 700; }

/* announcements: scheduled */
.tag--sched { background: rgba(91, 26, 107, .1); color: var(--purple); }
.ann--sched { border-style: dashed; }
.p-sched[hidden] { display: none; }

/* lunch, calendar, chats */
.lunch-vendor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 15px; }
.lunch-vendor .ico { width: 18px; height: 18px; color: var(--purple); }
.ev-cal { padding: clamp(14px, 3vw, 22px); }
.cal-in-portal .cal-layout { margin-top: 10px; }
.mode-cycle { width: 12px; height: 12px; opacity: .6; }
/* header between the phone menu and wide screens: keep everything on one line */
@media (min-width: 1021px) and (max-width: 1200px) {
  .signin-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .signin-link { padding-inline: 10px; }
  .main-nav > ul > li > a, .main-nav > ul > li > button { padding-inline: 9px; }
  .header-tools { gap: 6px; }
}
@media (max-width: 900px) { .urow-pick { grid-column: 1 / -1; } .urow--off .urow-pick { grid-column: auto; } }
@media (min-width: 901px) { .urow--off + .urow:not(.urow--off) .urow-f > span { display: block; } }
@media (max-width: 560px) {
  .pcb-label { width: 100%; min-width: 0; }
  .urow-f:has([data-f="planned_date"]) { grid-column: 1 / -1; }
}

/* ================= Batch F ================= */
/* count badges: the digit sits in the optical centre of the circle */
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; line-height: 1; }
.tab-badge > span, .tab-badge { font: 800 11.5px/1 var(--sans); font-variant-numeric: tabular-nums lining-nums; }
.tab-badge > span { display: block; text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) { .tab-badge > span { transform: translateY(.04em); } }
.tab-dot { width: 9px; height: 9px; border-radius: 50%; background: #e8604c; box-shadow: 0 0 0 2px var(--bg); flex: none; margin-left: 2px; animation: dotIn 320ms var(--ease-enter, ease) both; }
.tabdrop-btn .tab-dot { margin-left: 4px; }
@keyframes dotIn { from { transform: scale(0); } 60% { transform: scale(1.3); } }
.tabnav .tab-edit { min-height: 42px; width: 42px; padding: 0; justify-content: center; color: var(--muted); align-self: center; }
.tabnav .tab-edit .ico { width: 16px; height: 16px; }
@media (max-width: 760px) { .tabnav .tab-edit { background: transparent; width: auto; padding: 0 12px; } }

/* account menu */
.who { position: relative; }
.who-btn { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.who-btn:hover { border-color: var(--line-strong); background: var(--bg-2); }
.who-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.who-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-txt .small { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-chev { width: 16px; height: 16px; color: var(--muted); transition: transform 180ms var(--ease); }
.who-btn[aria-expanded="true"] .who-chev { transform: rotate(180deg); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px; display: grid; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); }
.acct-menu[hidden] { display: none; }
.acct-menu button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 650 14.5px var(--sans); cursor: pointer; text-align: left; }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--bg-2); outline: none; }
.acct-menu .ico { width: 17px; height: 17px; color: var(--purple); flex: none; }
.acct-menu .i-dark, :root[data-theme="dark"] .acct-menu .i-light { display: none; }
:root[data-theme="dark"] .acct-menu .i-dark { display: inline; }
.acct-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.pop-in { animation: popIn 180ms cubic-bezier(.2, .8, .2, 1) both; transform-origin: top right; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@media (max-width: 600px) { .who, .who-btn { width: 100%; } .who-txt { flex: 1; } .acct-menu { left: 0; right: 0; } }

/* drag to reorder */
.drag-handle { display: grid; place-items: center; width: 28px; height: 34px; flex: none; border-radius: 8px; color: var(--muted); cursor: grab; touch-action: none; }
.drag-handle .ico { width: 18px; height: 18px; }
.drag-handle:hover { background: var(--bg-3); color: var(--ink); }
.drag-handle:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.is-sorting, .is-sorting * { cursor: grabbing !important; user-select: none; }
li.is-dragging { position: relative; z-index: 5; box-shadow: 0 14px 30px rgba(43, 20, 60, .22); border-color: var(--purple) !important; background: var(--card); scale: 1.02; transition: scale 140ms var(--ease), box-shadow 140ms var(--ease); }
.ovc-row { padding: 8px 12px 8px 6px; }

/* customize tabs */
.modal .sheet.sheet--tabs { width: min(640px, 100%); }
.tc-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tc-group { padding: 10px; border-radius: 14px; background: var(--bg-3); border: 1px solid var(--line); display: flex; flex-direction: column; }
.tc-group--drop { background: transparent; border-style: dashed; border-width: 1.5px; border-color: var(--line-strong); }
.tc-group h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tc-group h4 .ico { width: 14px; height: 14px; }
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-height: 44px; flex: 1; align-content: start; }
.tc-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14.5px; }
.tc-item > .ico { width: 16px; height: 16px; color: var(--purple); flex: none; }
.tc-item .drag-handle { height: 30px; }
.tc-empty { display: none; margin: -40px 0 0; min-height: 40px; place-items: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.tc-list:not(:has(> li:not([hidden]))) + .tc-empty { display: grid; }

/* searchable dropdowns */
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; }
.ss { position: relative; }
.ss .ss-input { width: 100%; padding-right: 38px; cursor: text; text-overflow: ellipsis; }
.ss-chev { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); pointer-events: none; transition: transform 160ms var(--ease); }
.ss.is-open .ss-chev { transform: rotate(180deg); }
.ss-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 290px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); animation: dropIn 140ms var(--ease); }
.ss-list[hidden] { display: none; }
.ss-list [role="option"] { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.ss-list [role="option"][aria-selected="true"] { background: var(--lav); color: var(--lav-ink); }
.ss-list [role="option"]:hover { background: var(--bg-2); }
.ss-list [role="option"][aria-selected="true"]:hover { background: var(--lav); }
.ss-list mark { background: var(--cream); color: inherit; border-radius: 3px; padding: 0 1px; }
.ss-list .ss-blank { color: var(--muted); font-style: italic; }
.ss-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ss-none { padding: 10px; color: var(--muted); font-size: 14px; }

/* sign in / out */
.hello { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(248, 245, 251, .72); backdrop-filter: blur(10px); opacity: 0; transition: opacity 260ms var(--ease); }
:root[data-theme="dark"] .hello { background: rgba(30, 29, 34, .74); }
.hello.on { opacity: 1; } .hello.off { opacity: 0; transition-duration: 380ms; }
.hello-card { display: grid; justify-items: center; gap: 6px; padding: 30px 40px 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; transform: translateY(16px) scale(.94); transition: transform 520ms cubic-bezier(.2, 1.4, .4, 1); }
.hello.on .hello-card { transform: none; } .hello.off .hello-card { transform: translateY(-10px) scale(.97); transition: transform 380ms var(--ease); }
.hello--out.off .hello-card { transform: translateY(18px) scale(.95); }
.hello-card b { font-size: 22px; margin-top: 8px; }
.hello-sub { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.hello-av { position: relative; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--purple); color: #fff; font-weight: 800; font-size: 24px; animation: helloPop 640ms cubic-bezier(.2, 1.5, .4, 1) both 80ms; }
.hello-av::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--purple); opacity: 0; animation: helloRing 900ms var(--ease) 260ms both; }
.hello--out .hello-av > span { display: inline-block; animation: helloWave 900ms ease-in-out 200ms both; transform-origin: 50% 80%; }
@keyframes helloPop { from { transform: scale(.4); opacity: 0; } }
@keyframes helloRing { 0% { opacity: .7; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes helloWave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(6deg); } }
.hello-bar { width: 140px; height: 4px; border-radius: 99px; background: var(--bg-3); overflow: hidden; margin-top: 10px; }
.hello-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--purple); transform-origin: left; animation: helloBar 1000ms cubic-bezier(.4, 0, .2, 1) both 120ms; }
@keyframes helloBar { from { transform: scaleX(0); } }
#portal-root.is-arriving .tabnav, #portal-root.is-arriving #panel { animation: arrive 520ms var(--ease) both 900ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }

/* overview: packed two columns */
.ov-grid.ov-grid--packed { grid-auto-rows: 4px; row-gap: 0; column-gap: 20px; align-items: start; }
.ov-grid--packed > .ov-w > .panel { height: auto; }
.nb .nb-count { display: flex; align-items: center; gap: 16px; }
.nb-num { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; border-radius: 16px; background: var(--cream); color: var(--olive); font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.nb-num .ico { width: 28px; height: 28px; }
.nb--now .nb-num { background: var(--lav); color: var(--lav-ink); }
.nb-count > span { display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.nb-count small { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.nb-then { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }

/* switches */
.switch-line { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 650; }
.switch-line input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-line small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 2px; }
.switch { flex: none; position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); transition: background-color 180ms var(--ease); margin-top: 1px; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform 200ms cubic-bezier(.3, 1.4, .5, 1); }
.switch-line input:checked + .switch { background: var(--purple); }
.switch-line input:checked + .switch::after { transform: translateX(16px); }
.switch-line input:focus-visible + .switch { outline: 2px solid var(--purple); outline-offset: 2px; }
.switch-line--box { min-height: 48px; align-items: center; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--card); }
.lbl { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--ink); }

/* GPA what-if */
.gpa-what { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.gpa-inc { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--ink-2); }
.gpa-inc .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--gold-text); }
.gpa-inc--ok .ico { color: #1d6b3c; }
.gpa-flash { animation: gpaFlash 420ms var(--ease); }
@keyframes gpaFlash { 0% { transform: scale(.92); opacity: .4; } }

/* misc */
.rcpt { color: var(--muted); } .rcpt--read { color: inherit; }
.bubble--me .rcpt { color: inherit; opacity: .75; }
.nt-num { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--bg-3); color: var(--ink-2); font-size: 12px; font-weight: 800; vertical-align: 1px; }
.pcb-hint { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.doc-list a > .ico { box-sizing: content-box; width: 18px; height: 18px; padding: 8px; border-radius: 10px; background: var(--lav); color: var(--purple); flex: none; }
.doc-list a:hover > .ico { background: var(--purple); color: #fff; }
:root[data-theme="dark"] .doc-list a:hover > .ico { color: #1b1024; }
.foot-theme { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid currentColor; background: transparent; color: inherit; font: 650 14px var(--sans); cursor: pointer; opacity: .85; }
.foot-theme:hover { opacity: 1; }
.foot-theme .ico { width: 16px; height: 16px; }
.foot-theme .i-dark, :root[data-theme="dark"] .foot-theme .i-light { display: none; }
:root[data-theme="dark"] .foot-theme .i-dark { display: inline; }
html.theme-snap, html.theme-snap *, html.theme-snap *::before, html.theme-snap *::after { transition: none !important; }

/* attendance: report form, history, files */
.att-fam { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; margin-top: 22px; }
.att-fam--one { grid-template-columns: 1fr; }
@media (max-width: 900px) { .att-fam { grid-template-columns: 1fr; } }
.ra-form h3 { display: flex; align-items: center; gap: 8px; }
.ra-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.ra-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.file-drop { cursor: pointer; padding: 16px; gap: 14px; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.file-drop:hover { background: var(--bg-2); }
.fd-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lav); color: var(--purple); flex: none; }
.fd-ic .ico { width: 20px; height: 20px; }
.fd-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.fd-text u { color: var(--purple); text-underline-offset: 3px; }
.fd-text small { color: var(--muted); font-size: 13px; }
.file-picked { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 1.5px solid var(--purple); background: var(--lav-soft); }
.file-picked[hidden] { display: none; }
.fp-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--card); color: var(--purple); flex: none; }
.fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-info small { color: var(--muted); }
.fp-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.att-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.att-hist li { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.ah-main { flex: 1; min-width: 0; }
.ah-main p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.att-hist .att-badge { flex: none; }
@media (max-width: 560px) { .att-hist li { flex-wrap: wrap; } .att-hist .att-badge { margin-left: 56px; } }
.file-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 4px 4px 8px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); max-width: 100%; }
.file-ic .ico { width: 16px; height: 16px; color: var(--purple); }
.file-nm { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.modal .sheet.sheet--file { width: min(880px, 100%); padding: 0; display: flex; flex-direction: column; max-height: 92vh; overflow: hidden; }
.fp { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.fp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fp-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-head > .ico { width: 18px; height: 18px; color: var(--purple); }
.fp-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: var(--bg-3); display: grid; place-items: center; }
.fp-load { width: 100%; }
.fp-img { max-width: 100%; max-height: 72vh; border-radius: 10px; box-shadow: var(--shadow); animation: ov-in 240ms var(--ease) both; }
.fp-pdf { width: 100%; height: 72vh; border: 0; border-radius: 10px; background: #fff; }
.fp-empty { border: 0; background: transparent; }
.fp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.drop-layer { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px; background: rgba(91, 26, 107, .18); backdrop-filter: blur(4px); opacity: 0; transition: opacity 180ms var(--ease); pointer-events: none; }
.drop-layer.on { opacity: 1; }
.drop-card { display: grid; justify-items: center; gap: 8px; width: min(520px, 100%); padding: 48px 28px; border-radius: 24px; border: 3px dashed var(--purple); background: var(--card); text-align: center; transform: scale(.94); transition: transform 320ms cubic-bezier(.2, 1.4, .4, 1); box-shadow: var(--shadow); }
.drop-layer.on .drop-card { transform: none; }
.drop-card b { font-size: 22px; }
.drop-card > span:last-child { color: var(--muted); font-weight: 600; }
.drop-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--lav); color: var(--purple); animation: dropBob 1.1s ease-in-out infinite; }
.drop-ic .ico { width: 30px; height: 30px; }
@keyframes dropBob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .drop-ic, .hello-av, .hello-av::after, .hello-bar i { animation: none; } }

/* classes page */
.cls-bar { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(5, minmax(120px, 1fr)); gap: 12px; align-items: end; margin-top: 18px; }
@media (max-width: 1100px) { .cls-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cls-find { grid-column: 1 / -1; } }
@media (max-width: 560px) { .cls-bar { grid-template-columns: 1fr 1fr; } }
.cls-bar .field { min-width: 0; }
.cls-sum { display: flex; align-items: center; gap: 14px; margin: 10px 0 0; }
.cls-sum p { margin: 0; }
.cls-results { transition: opacity 120ms var(--ease); }
.cls-results.is-loading { opacity: .35; }
.cls-group > h3 { margin-bottom: 6px; }
.cls-results .class-list { display: grid; gap: 8px; }
.cls-results .class-list > li { border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.cls-results .class-list > li:hover { border-color: var(--line-strong); }
.cls-results .class-list > li:has(details[open]) { border-color: var(--purple); box-shadow: var(--shadow); }
.cls-results .cls-row > summary { padding: 12px 14px; gap: 14px; }
.cl-when { display: grid; place-items: center; align-content: center; width: 62px; height: 52px; flex: none; border-radius: 12px; background: var(--lav-soft); color: var(--lav-ink); line-height: 1.1; text-align: center; }
.cl-when b { font-size: 15px; } .cl-when small { font-size: 11.5px; font-weight: 700; opacity: .8; }
.cl-when--alt { background: var(--cream); color: var(--olive); }
.cls-results .cl-name { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.cl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cl-title b { font-size: 16px; }
.cl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.cl-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.cl-meta .ico { width: 14px; height: 14px; }
.cl-div { padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--bg-3); color: var(--ink-2); }
.cl-div--purple { background: #efe3f7; color: #5b1a6b; } .cl-div--gold { background: var(--cream); color: var(--olive); }
:root[data-theme="dark"] .cl-div--purple { background: #3a2a4f; color: #e6d2f5; }
.cls-results .cls-edit { padding: 2px 16px 16px; border-top: 1px solid var(--line); }
.cls-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cls-foot .btn--danger { margin-left: auto; }
.form-grid--cls { gap: 14px 16px; }
.form-grid--cls .check-row--tight { flex-wrap: wrap; }
@media (max-width: 560px) { .cl-when { width: 52px; } .cls-foot .btn--danger { margin-left: 0; } }
.en-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr) minmax(0, 1fr); }
@media (max-width: 700px) { .en-grid { grid-template-columns: 1fr; } }
.en-count { margin: 12px 0 0; }

/* activity log clean-up */
.lp-title { font-weight: 700; }
.lp-seg { flex-wrap: wrap; }
.lp-seg label { position: relative; display: inline-flex; }
.lp-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lp-seg span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.lp-seg input:checked + span { background: var(--card); color: var(--lav-ink); box-shadow: 0 1px 3px rgba(43, 20, 60, .15); }
.lp-seg input:focus-visible + span { outline: 2px solid var(--purple); }
.log-prune input[type="date"][hidden] { display: none; }
.gc-links li { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr) auto; }
.tc-item[hidden] { display: none; }
/* tabs, dropdowns and the pencil wrap together as one row */
.tabnav { gap: 4px; }
.tabnav > .tabrow { display: contents; }
.tabnav > .tabdrop { margin-left: 0; }
.field .switch-line, .switch-line { display: flex; margin: 0; font-weight: 650; font-size: 15px; }
.field .switch-line--box { min-height: 46px; }
.field .switch-line input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.file-drop[hidden] { display: none; }
.att-fam { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.att-fam--one { grid-template-columns: 1fr; }
@media (max-width: 900px) { .att-fam { grid-template-columns: 1fr; } }
.file-picked { flex-wrap: wrap; }
.fp-acts { flex-basis: 100%; justify-content: flex-start; padding-left: 60px; }
@media (min-width: 1200px) { .fp-acts { flex-basis: auto; padding-left: 0; } }
@media (max-width: 760px) { .tabnav .tab-edit { display: none; } }

/* ================= Batch G ================= */
/* sliding highlight in toggle rows */
.seg .seg-pill { top: 0; bottom: auto; left: 0; width: 0; height: 0; background: var(--lav); border-radius: 7px; box-shadow: 0 1px 2px rgba(43, 20, 60, .12);
  transition: transform 320ms cubic-bezier(.3, 1.25, .5, 1), width 320ms cubic-bezier(.3, 1.25, .5, 1), height 320ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease), opacity 200ms var(--ease); pointer-events: none; }
.seg.has-pill > button[aria-pressed="true"] { background: transparent; }
.seg .seg-pill.no-anim, .tab-pill.no-anim { transition: none !important; }
.seg > button[aria-pressed="true"] { cursor: grab; }
/* while held: clear "liquid glass" you can read through, lifted above the labels */
.seg-pill.is-grabbing, .tab-pill.is-grabbing { transition: width 160ms var(--ease), height 160ms var(--ease) !important; z-index: 3 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .08) 55%, rgba(255, 255, 255, .18)) !important;
  -webkit-backdrop-filter: saturate(1.9) brightness(1.04); backdrop-filter: saturate(1.9) brightness(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(43, 20, 60, .10), inset 0 0 0 1px rgba(255, 255, 255, .55),
    inset 0 0 12px rgba(150, 110, 200, .18), 0 6px 18px rgba(43, 20, 60, .16), 0 1px 3px rgba(43, 20, 60, .14) !important; }
:root[data-theme="dark"] .seg-pill.is-grabbing, :root[data-theme="dark"] .tab-pill.is-grabbing { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .08)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .45) !important; }
.is-pill-drag button, .is-seg-drag > button { transition: color 120ms var(--ease); }
/* toggle rows: every option the same width, so the highlight is one size */
.seg:not(.seg--tabs) { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 100%; }
.seg:not(.seg--tabs) > button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-seg-drag, .is-seg-drag *, .is-pill-drag, .is-pill-drag * { cursor: grabbing !important; user-select: none; }
.seg > button.pill-over, .tabnav .pill-over { color: var(--lav-ink); }

/* sliding highlight behind the portal tabs */
.tabnav { position: relative; }
.tab-pill { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 10px; background: var(--lav); z-index: 0; pointer-events: none;
  transition: transform 360ms cubic-bezier(.3, 1.2, .5, 1), width 360ms cubic-bezier(.3, 1.2, .5, 1), height 300ms var(--ease); }
.tabnav.has-pill button { z-index: 1; }
.tabnav.has-pill .tabrow > button[aria-selected="true"], .tabnav.has-pill .tabdrop.is-current > .tabdrop-btn { background: transparent; }
.tabnav.has-pill .tabrow > button[aria-selected="true"] { cursor: grab; }
.tabnav.has-pill .tabrow > button[aria-selected="true"]:hover { background: transparent; }
@media (max-width: 760px) { .tab-pill { display: none; } .tabnav.has-pill .tabrow > button[aria-selected="true"] { background: var(--lav); } .tabnav.has-pill .tabdrop.is-current > .tabdrop-btn { background: var(--lav); } }

/* overview: boxes in a row share one height, buttons sit at the bottom */
.ov-grid { align-items: stretch; gap: 20px; }
.ov-w { position: relative; display: flex; flex-direction: column; }
.ov-w > .panel, .ov-w > .ov-cards, .ov-w > .kpis { flex: 1; }
.ov-w > .panel { display: flex; flex-direction: column; height: auto; margin: 0; }
.ov-foot { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.ov-foot .btn .ico--arrow { width: 15px; height: 15px; }
.ov-w--go { cursor: pointer; }
.ov-w--go > .panel { transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease); }
.ov-w--go:hover > .panel { border-color: var(--line-strong); box-shadow: 0 10px 26px rgba(43, 20, 60, .10); transform: translateY(-2px); }
.ov-w--go:active > .panel { transform: translateY(0) scale(.995); }
.ov-ctl { display: none; }
.ov-editing .ov-w { cursor: grab; touch-action: none; }
.ov-editing .ov-w > .panel, .ov-editing .ov-w > .ov-cards, .ov-editing .ov-w > .kpis, .ov-editing .ov-w > .ov-alert { pointer-events: none; outline: 2px dashed var(--line-strong); outline-offset: 4px; border-radius: var(--r); }
.ov-editing .ov-ctl { display: block; }
.ov-editing .ov-w { animation: none; }
.ov-grip { position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 3; display: grid; place-items: center; width: 44px; height: 22px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-strong); color: var(--muted); box-shadow: 0 2px 6px rgba(43, 20, 60, .12); }
.ov-grip .ico { width: 16px; height: 16px; rotate: 90deg; }
.ov-x { position: absolute; top: -10px; right: -10px; z-index: 4; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card); background: #c0392b; color: #fff; cursor: pointer; box-shadow: 0 3px 10px rgba(192, 57, 43, .35); transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.ov-x .ico { width: 14px; height: 14px; stroke-width: 3; }
.ov-x:hover { transform: scale(1.1); background: #a93226; }
.ov-x:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.ov-w.is-dragging { z-index: 6; cursor: grabbing; }
.ov-w.is-dragging > * { box-shadow: 0 22px 44px rgba(43, 20, 60, .25) !important; }
.ov-w.ov-out { transition: opacity 220ms var(--ease), transform 220ms var(--ease); opacity: 0; transform: scale(.94); }
.ov-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-bottom: 14px; }
.ov-hint { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.ov-hint .ico { width: 14px; height: 14px; }
.ov-add-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ov-add-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.ov-add-list small { display: block; color: var(--muted); font-size: 13px; }
.ticks--links button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 100%; text-align: left; padding: 8px 10px; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.ticks--links button:hover { border-color: var(--purple); background: var(--lav-soft); }
.ticks--links li + li { margin-top: 6px; }

/* buttons */
.btn--remove:hover, .btn--remove:focus-visible { --b-fg: #b0301a; border-color: #e3a397 !important; background: #fff1ee !important; }
:root[data-theme="dark"] .btn--remove:hover { --b-fg: #ff9d8c; background: rgba(255, 157, 140, .1) !important; border-color: rgba(255, 157, 140, .4) !important; }
.btn--danger-solid { --b-bg: #c0392b; --b-fg: #fff; }
.btn--danger-solid:hover { --b-bg: #a93226; }
.stu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.stu-foot .btn .ico { width: 14px; height: 14px; }
.rm-wait { display: inline-flex; align-items: center; gap: 5px; }
.rm-wait .ico { width: 13px; height: 13px; }
.review-list li.is-leaving { transition: opacity 240ms var(--ease), transform 240ms var(--ease); opacity: 0; transform: translateX(12px); }
.rr-q { margin-bottom: 20px; }

/* notices rule */
.nt-rule-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; flex: 1; min-width: min(100%, 520px); }
.nrc-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.nrc-step b { display: block; font-size: 14.5px; }
.nrc-step small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.nrc-ic { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--lav); color: var(--purple); }
.nrc-ic .ico { width: 15px; height: 15px; }
.nrc-ic--ok { background: #ddf5e6; color: #1d6b3c; } .nrc-ic--bad { background: #fde6e1; color: #b0301a; }
:root[data-theme="dark"] .nrc-ic--ok { background: rgba(126, 226, 168, .15); color: #a2efc3; } :root[data-theme="dark"] .nrc-ic--bad { background: rgba(255, 157, 140, .14); color: #ff9d8c; }
.nt-head { align-items: flex-start; }
@media (max-width: 760px) { .nt-rule-card { grid-template-columns: 1fr; } }
.modal .nt-rule-card { grid-template-columns: 1fr; min-width: 0; }

/* lunch: restaurant order + print */
.lunch-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.lunch-top .lunch-vendor { margin: 0; }
.rest-order { margin-bottom: 18px; }
.rest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; }
.rest-list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rest-list b { min-width: 34px; font-variant-numeric: tabular-nums; color: var(--purple); font-size: 16px; }
.rest-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.pop-down { animation: popDown 220ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes popDown { from { opacity: 0; transform: translateY(-6px); } }
.lunch-group { margin-bottom: 16px; }
@media print {
  .lunch-group--page + .lunch-group--page { break-before: auto; }
  .lunch-print-title { display: block; font-size: 13pt !important; margin: 0 0 6pt !important; }
  .lunch-group { margin: 0 0 6pt; break-inside: auto; }
  .lunch-sheet { font-size: 9pt !important; }
  .lunch-sheet th, .lunch-sheet td { padding: 2pt 4pt !important; }
  .lunch-sheet .vendor-row th { font-size: 10pt !important; padding: 3pt 4pt !important; }
  .lunch-sheet input[type="checkbox"] { width: 10pt !important; height: 10pt !important; }
  .lunch-sheet thead tr:not(.vendor-row) { display: none; }
  @page { margin: 12mm; }
}

/* calendar: countdown + school days + list */
.cd-pick { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; font-weight: 700; }
.cd-pick select { flex: 1; min-width: 0; min-height: 38px; border-radius: 9px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: 650 14px var(--sans); padding: 0 8px; }
.cd-now { color: var(--purple); font-size: 18px; }
.sy-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.sy-nums b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--purple); }
.sy-nums span { font-size: 13px; color: var(--muted); font-weight: 600; }
.sy-bar { height: 8px; border-radius: 99px; background: var(--bg-3); overflow: hidden; margin-bottom: 6px; }
.sy-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--purple), #8e5bd0); transform-origin: left; animation: syGrow 900ms cubic-bezier(.2, .8, .2, 1) both 200ms; }
@keyframes syGrow { from { transform: scaleX(0); } }
.agenda-past-btn { margin: 0 0 14px; }
.agenda-past-btn .ico { width: 15px; height: 15px; }
.agenda-today { position: relative; margin: 4px 0 16px; text-align: center; }
.agenda-today::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--purple); opacity: .5; }
.agenda-today .at-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--purple); color: #fff; font-size: 13px; font-weight: 800; }
:root[data-theme="dark"] .agenda-today .at-pill { color: #1b1024; }
.agenda-today .ico { width: 14px; height: 14px; }
.agenda .row.now { background: var(--lav-soft); border-radius: 10px; }

/* home page quote highlight */
.pullquote p .tblock { padding: .08em .4em .12em; }

/* messages: smooth send and receive */
.bubble--out { animation: bubOut 320ms cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: bottom right; }
.bubble--in { animation: bubIn 380ms cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: bottom left; }
@keyframes bubOut { from { opacity: 0; transform: translateY(14px) scale(.92); } }
@keyframes bubIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }
.bubble--sending { opacity: .75; transition: opacity 200ms var(--ease); }

/* loading and reveals */
.tab-panel { animation: panelIn 300ms cubic-bezier(.2, .8, .2, 1) both; }
.tab-panel--fast { animation-duration: 160ms; }
.tab-panel--skel { animation: skelIn 200ms ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes skelIn { from { opacity: 0; } }
#panel.is-fresh { animation: none; }
.sk { background: linear-gradient(90deg, #ececf0 0%, #f6f6f8 40%, #ececf0 80%); background-size: 300% 100%; animation: skShine 1.4s ease-in-out infinite; }
:root[data-theme="dark"] .sk { background: linear-gradient(90deg, #2a2335 0%, #342b42 40%, #2a2335 80%); background-size: 300% 100%; }
@keyframes skShine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sr { opacity: 0; transform: translateY(12px); }
.sr.sr-in { opacity: 1; transform: none; transition: opacity 420ms cubic-bezier(.32, .72, 0, 1), transform 480ms cubic-bezier(.32, .72, 0, 1) !important; }
@media (prefers-reduced-motion: reduce) { .sr { opacity: 1; transform: none; } .tab-panel, .bubble--in, .bubble--out { animation: none; } .sk { animation: none; } }

/* math units: drag dots */
.unit-list li[data-unit] { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; }
@media (max-width: 760px) { .unit-list li[data-unit] { grid-template-columns: auto minmax(0, 1fr) auto; } .unit-list .name-edit--url { grid-column: 2 / -1; grid-row: 2; } }

/* ================= Batch H ================= */
/* tab customizer: named dropdowns you can add and remove */
.tc-group h4 { min-height: 30px; }
.tc-name { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: 800 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tc-name:hover { border-color: var(--line); }
.tc-name:focus { outline: none; border-color: var(--purple); background: var(--card); text-transform: none; letter-spacing: 0; font-size: 14px; }
.tc-del { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.tc-del:hover { background: var(--rose, #fde2e2); color: #b42318; }
.tc-del .ico { width: 14px; height: 14px; }
.tc-add { min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: transparent; color: var(--purple); font: 700 14px var(--sans); cursor: pointer; transition: background-color 160ms var(--ease); }
.tc-add:hover { background: var(--bg-3); }
.tc-add .ico { width: 20px; height: 20px; }
.tc-item > span:last-child { min-width: 0; white-space: normal; overflow-wrap: break-word; }

/* tab bar: nothing spills out of its box */
.tabnav button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabdrop-btn > span { max-width: 24ch; }
.tabdrop-menu { width: max-content; min-width: 220px; max-width: min(340px, calc(100vw - 32px)); }
.tabdrop-menu.is-right { left: auto; right: 0; }
.tabnav .tabdrop-menu button { min-width: 0; }
@media (max-width: 760px) { .tabdrop-btn > span { max-width: none; } .tabdrop-menu { width: auto; max-width: none; } }
/* lunch: vendor heading above both columns so "Your order" lines up with the first menu item; one row per item */
.menu-vendor { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.cart { max-height: calc(100vh - 116px); overflow: auto; }
.item-rows { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 14.5px; color: var(--ink-2); }
.item-rows b { display: inline-block; min-width: 2.4ch; font-variant-numeric: tabular-nums; color: var(--ink); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.item-rows--sheet { margin: 0; font-size: inherit; color: inherit; }
.dot-sep { color: var(--muted); margin: 0 4px; }
.rest-split { margin: 0 0 12px; }
.rest-schools { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.rest-schools h4 { margin: 0 0 6px; font-size: 14px; }
@media print { .item-rows--sheet { gap: 1px; } .item-rows--sheet li { line-height: 1.25; } }
/* admin: add a class from a student's schedule */
.sch-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--purple); font: 700 13px var(--sans); cursor: pointer; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.sch-add:hover { background: var(--lav-soft); border-color: var(--purple); }
.sch-add .ico { width: 14px; height: 14px; }
.sch-class + .sch-add { min-height: 28px; margin-top: 2px; border-color: transparent; font-size: 12px; }
.sch-class + .sch-add:hover { border-color: var(--purple); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pick-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.pick-row:hover:not(:disabled) { border-color: var(--purple); background: var(--lav-soft); }
.pick-row:disabled { cursor: default; opacity: .75; }
.pick-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.pick-row small { color: var(--muted); font-size: 13px; }
.pick-row > .ico { width: 18px; height: 18px; color: var(--purple); flex: none; }
/* week picker (attendance history): the whole row lights up */
.dp--week .dp-days { row-gap: 4px; }
.dp--week .dp-day { border-radius: 0; }
.dp--week .dp-day.dp-hw { background: var(--bg-2); }
.dp--week .dp-day.dp-inweek { background: var(--lav); color: var(--lav-ink); }
.dp--week .dp-day.dp-inweek.dp-wk, .dp--week .dp-day.dp-hw.dp-wk { background: color-mix(in srgb, var(--lav) 45%, transparent); }
.dp--week .dp-days > .dp-day:nth-child(7n + 1) { border-radius: 10px 0 0 10px; }
.dp--week .dp-days > .dp-day:nth-child(7n) { border-radius: 0 10px 10px 0; }
.wk-field { display: flex; align-items: center; gap: 6px; }
.wk-in { position: relative; flex: 1; min-width: 150px; }
.wk-in input { width: 100%; color: transparent; caret-color: transparent; cursor: pointer; }
.wk-in input::-webkit-datetime-edit { color: transparent; }
.wk-text { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; font-weight: 700; color: var(--ink); white-space: nowrap; }
.att-cell--auto { opacity: .55; }
.att-cell--off { background: transparent; color: var(--muted); }
.att-auto { align-self: center; }
/* file boxes never stretch the form, however long the file name */
.ra-file, .file-picked, .file-chip { min-width: 0; max-width: 100%; }
.file-picked { flex-wrap: nowrap; overflow: hidden; }
.file-picked .fp-info { flex: 1; min-width: 0; display: grid; }
.file-picked .fp-info b, .file-chip .file-nm { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picked .fp-acts { flex: none; display: flex; gap: 4px; align-items: center; }
.file-chip .file-nm { max-width: 22ch; }
@media (max-width: 560px) { .file-picked { flex-wrap: wrap; } .file-picked .fp-acts { width: 100%; justify-content: flex-end; } }
.file-drop.is-checking { opacity: .7; pointer-events: none; }
.file-drop.is-checking .fd-ic { animation: spin 900ms linear infinite; }
.ra-grid, .ra-grid > .field { min-width: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
/* profile pictures */
.avatar { position: relative; overflow: hidden; }
.avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; animation: fadeIn 260ms var(--ease) both; }
.avatar--xl { width: 96px; height: 96px; font-size: 32px; flex: none; }
.pic-row { display: flex; align-items: center; gap: 18px; }
.pic-side { flex: 1; min-width: 0; }
.file-drop--pic { min-height: 96px; }
@media (max-width: 480px) { .pic-row { flex-direction: column; align-items: stretch; } .pic-row .avatar--xl { align-self: center; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* visit form: the three choices share one line; hidden spam trap */
.form-card .choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-card .choice-row .choice span { width: 100%; justify-content: center; padding: 0 10px; white-space: nowrap; }
@media (max-width: 420px) { .form-card .choice-row .choice span { font-size: 13.5px; gap: 5px; padding: 0 6px; } .form-card .choice-row .choice span .ico { width: 15px; height: 15px; } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* visit requests */
.vf-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.vf-search { flex: 1 1 260px; margin: 0; }
.vf-sort { margin: 0; }
.vf-wrap { position: relative; }
.vf-btn .tab-badge { margin-left: 2px; }
.vf-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: min(760px, calc(100vw - 32px)); padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.vf-pop h4 { margin: 0 0 2px; font-size: 17px; }
.vf-pop > p { margin: 0 0 14px; }
.vf-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 22px; }
.vf-groups fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; align-content: start; }
.vf-groups legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.vf-opt { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; min-height: 30px; }
.vf-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); flex: none; }
.vf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.vf-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; }
.vf-chip .ico { width: 12px; height: 12px; color: var(--muted); }
.vf-chip:hover { border-color: var(--purple); }
.vf-count { margin: 4px 0 10px; }
.vr-table { width: 100%; border-collapse: collapse; }
.vr-table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vr-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14.5px; }
.vr-table td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.vr-table td small a { color: inherit; }
.vr-table tr.is-open > td { border-bottom-color: transparent; background: var(--bg-3); }
.vr-type { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.vr-type .ico { width: 15px; height: 15px; color: var(--purple); }
.vr-labels { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.vl { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.vl button { display: grid; place-items: center; width: 16px; height: 16px; margin-right: -4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .6; }
.vl button:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.vl button .ico { width: 10px; height: 10px; }
.vl--lav { background: var(--lav); color: var(--lav-ink); } .vl--sage { background: #dff1e4; color: #1d5a33; } .vl--sky { background: #e0eefb; color: #1f4f7a; }
.vl--sand { background: #fbefd6; color: #6b4d00; } .vl--rose { background: #fde4e0; color: #8a2414; } .vl--gray { background: var(--bg-2); color: var(--ink-2); }
:root[data-theme="dark"] .vl--sage { background: rgba(120, 220, 160, .14); color: #a6dfbb; } :root[data-theme="dark"] .vl--sky { background: rgba(120, 180, 240, .15); color: #a9cff5; }
:root[data-theme="dark"] .vl--sand { background: rgba(246, 196, 69, .15); color: #f0d48a; } :root[data-theme="dark"] .vl--rose { background: rgba(255, 138, 122, .15); color: #f5b2a8; }
.vl-add { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; }
.vl-add:hover { border-color: var(--purple); color: var(--purple); }
.vl-add .ico { width: 12px; height: 12px; }
.vl-menu { position: absolute; z-index: 60; min-width: 220px; padding: 10px; display: grid; gap: 2px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.vl-new { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.vl-new input { flex: 1; min-width: 0; height: 34px; }
.vr-det { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 0 6px; }
.vr-det h5 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.vr-det p { margin: 0; white-space: pre-wrap; }
.vr-note { width: 100%; min-height: 64px; }
.vr-det-acts { grid-column: 1 / -1; }
.vr-detail > td { background: var(--bg-3); }
.vr-more { width: 44px; }
.vr-table tr.is-open .vr-more .ico { transform: rotate(180deg); }
.vr-more .ico { transition: transform 200ms var(--ease); }
.vl-manage { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.vl-manage li { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 10px; border-radius: 10px; border: 1px solid var(--line); }
.vl-addform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vl-addform .field { flex: 1 1 180px; margin: 0; }
.vl-colors { display: flex; gap: 6px; border: 0; padding: 0; margin: 0 0 6px; }
.vl-dot { width: 26px; height: 26px; border-radius: 50%; display: block; cursor: pointer; position: relative; border: 2px solid transparent; padding: 0; }
.vl-dot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vl-dot:has(input:checked) { border-color: var(--ink); }
.btn--danger:hover { color: #b42318; border-color: #b42318; }
@media (max-width: 760px) {
  .vr-table thead { display: none; }
  .vr-table, .vr-table tbody, .vr-table tr, .vr-table td { display: block; width: 100%; }
  .vr-table tr[data-vid] { position: relative; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; background: var(--card); }
  .vr-table tr.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; }
  .vr-table td { border: 0; padding: 4px 0; }
  .vr-table td[data-label="Grade"]::before { content: "Grade: "; color: var(--muted); }
  .vr-more { position: absolute; top: 10px; right: 10px; width: auto !important; }
  .vr-detail > td { padding: 0 14px 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; margin-bottom: 8px; }
  .vr-det { grid-template-columns: 1fr; }
  .vf-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 75vh; overflow: auto; }
}
/* 404 */
.nf-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.nf-art { display: flex; align-items: center; justify-content: center; gap: 8px; font: 800 clamp(96px, 16vw, 200px)/1 var(--serif, var(--sans)); color: var(--purple); }
.nf-o { display: grid; place-items: center; width: .82em; height: .82em; border-radius: 50%; background: var(--lav); color: var(--purple); }
.nf-o .ico { width: .5em; height: .5em; animation: nfSpin 6s var(--ease) infinite; }
@keyframes nfSpin { 0%, 15% { transform: rotate(0); } 45% { transform: rotate(200deg); } 60% { transform: rotate(160deg); } 85%, 100% { transform: rotate(360deg); } }
.nf-links { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.nf-links a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.nf-links a:hover { border-color: var(--purple); transform: translateY(-2px); }
.nf-links .ico { width: 22px; height: 22px; color: var(--purple); flex: none; }
.nf-links span span { display: block; color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) { .nf-wrap { grid-template-columns: 1fr; } .nf-art { order: -1; justify-content: flex-start; font-size: 96px; } }
@media (prefers-reduced-motion: reduce) { .nf-o .ico { animation: none; } }


/* calendar countdown: short picker in the heading, one big number */
.countdown .cd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.countdown .cd-head h3 { margin: 0; }
.cd-pick { position: relative; margin: 0; flex: 0 1 auto; min-width: 0; }
.cd-pick select { appearance: none; -webkit-appearance: none; max-width: 100%; min-height: 34px; padding: 0 30px 0 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: 700 13.5px var(--sans); cursor: pointer; text-overflow: ellipsis; }
.cd-pick select:hover, .cd-pick select:focus-visible { border-color: var(--purple); outline: none; }
.cd-pick .cd-chev { position: absolute; right: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.cd-line { margin: 12px 0 4px; display: grid; gap: 2px; }
.cd-pre { font-size: 14px; font-weight: 650; color: var(--muted); }
.cd-line .big { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.cd-line .big small { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.cd-what { display: grid; gap: 1px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.cd-what span { color: var(--muted); font-size: 14px; }
.cd-done { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--ink-2); font-size: 14.5px; }
.cd-done .ico { width: 18px; height: 18px; color: var(--purple); flex: none; margin-top: 1px; }
/* list view: a clear "Today" divider */
.agenda-today { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; text-align: left; }
.agenda-today::before { display: none; }
.agenda-today::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--purple), transparent); opacity: .45; }
.agenda-today .at-pill { flex: none; }
.agenda-today .at-pill .ico { width: 14px; height: 14px; }
.agenda-today .at-date { flex: none; font-weight: 750; color: var(--ink); font-size: 15px; }
/* event details: labelled, so it's clear what the description is */
.agenda .row .t .meta { display: block; }
.agenda .row .t .desc { display: block; margin-top: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-3); color: var(--ink-2); font-size: 14px; }
.ev-desc { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.ev-desc-l { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.day-detail.flash { animation: ddFlash 900ms var(--ease); }
@keyframes ddFlash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--purple) 40%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
/* calendar: month grid and list ease in */
.cal-grid > .day { animation: dayIn 360ms var(--ease) both; }
.cal-grid > .day:nth-child(7n + 1) { animation-delay: 0ms; } .cal-grid > .day:nth-child(7n + 2) { animation-delay: 20ms; } .cal-grid > .day:nth-child(7n + 3) { animation-delay: 40ms; }
.cal-grid > .day:nth-child(7n + 4) { animation-delay: 60ms; } .cal-grid > .day:nth-child(7n + 5) { animation-delay: 80ms; } .cal-grid > .day:nth-child(7n + 6) { animation-delay: 100ms; } .cal-grid > .day:nth-child(7n) { animation-delay: 120ms; }
@keyframes dayIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.agenda > section, .agenda > .agenda-today { animation: dayIn 380ms var(--ease) both; }
.agenda > section:nth-of-type(2) { animation-delay: 60ms; } .agenda > section:nth-of-type(3) { animation-delay: 110ms; } .agenda > section:nth-of-type(n + 4) { animation-delay: 150ms; }
.cal-side > .panel { animation: dayIn 420ms var(--ease) both; } .cal-side > .panel:nth-child(2) { animation-delay: 70ms; } .cal-side > .panel:nth-child(3) { animation-delay: 140ms; } .cal-side > .panel:nth-child(4) { animation-delay: 210ms; }
@media (prefers-reduced-motion: reduce) { .cal-grid > .day, .agenda > *, .cal-side > .panel { animation: none; } }
.cal-legend button, .cal-grid .day, .cal-nav button { touch-action: manipulation; }
.book-btn { gap: 6px; text-decoration: none; white-space: nowrap; }
.book-btn .ico--ext { width: 12px; height: 12px; transform: rotate(-45deg); opacity: .7; }
/* messages: no re-animating old bubbles (that was the jitter); only new ones move, and clearly */
.bubble { animation: none; }
.bubble time { white-space: nowrap; }
.bubble .rcpt { display: inline-block; min-width: 4.6em; }
.bubble--out { animation: bubOut2 420ms cubic-bezier(.2, 1.25, .4, 1) both; transform-origin: bottom right; }
.bubble--in { animation: bubIn2 460ms cubic-bezier(.2, 1.25, .4, 1) both, bubGlow 1400ms var(--ease) 200ms; transform-origin: bottom left; }
@keyframes bubOut2 { 0% { opacity: 0; transform: translateY(26px) scale(.86); } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes bubIn2 { 0% { opacity: 0; transform: translateX(-18px) scale(.88); } 100% { opacity: 1; transform: none; } }
@keyframes bubGlow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--purple) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.bubble--sent .rcpt { animation: rcptIn 300ms var(--ease); }
@keyframes rcptIn { from { opacity: 0; } }
.msg-scroll { overflow-anchor: none; }
@media (prefers-reduced-motion: reduce) { .bubble--out, .bubble--in { animation: none; } }

/* welcome / goodbye: a solid screen (nothing half-loaded shows through), then it lifts away and the portal settles in */
.hello { background: radial-gradient(120% 90% at 50% 40%, var(--bg-2), var(--bg)) !important; -webkit-backdrop-filter: none; backdrop-filter: none; transition: opacity 200ms var(--ease); }
:root[data-theme="dark"] .hello { background: radial-gradient(120% 90% at 50% 40%, var(--bg-2), var(--bg)) !important; }
.hello.off { opacity: 0; transition: opacity 460ms cubic-bezier(.4, 0, .2, 1) 140ms; pointer-events: none; }
.hello.off .hello-card { transform: translateY(-14px) scale(.96); opacity: 0; transition: transform 420ms cubic-bezier(.4, 0, .2, 1), opacity 300ms var(--ease); }
.hello--out.off .hello-card { transform: translateY(14px) scale(.96); }
html.hello-lock, html.hello-lock body { overflow: hidden; }
#portal-root.is-landing > .dash-head, #portal-root.is-landing > .tabbar, #portal-root.is-landing > #panel { animation: landIn 620ms cubic-bezier(.2, .8, .2, 1) both; }
#portal-root.is-landing > .tabbar { animation-delay: 70ms; } #portal-root.is-landing > #panel { animation-delay: 140ms; }
@keyframes landIn { from { opacity: 0; transform: translateY(14px) scale(.995); } to { opacity: 1; transform: none; } }
#portal-root.is-arriving .tabnav, #portal-root.is-arriving #panel { animation: none; }
@media (prefers-reduced-motion: reduce) { #portal-root.is-landing > * { animation: none !important; } }
/* GPA hidden: a soft frosted chip instead of striped lines */
.gpa-hidden .gpa-val { position: relative; display: inline-block; min-width: 3.2ch; color: transparent !important; background: none !important; user-select: none; }
.gpa-hidden .gpa-val::after { content: "•••"; position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; color: var(--muted); letter-spacing: .12em; font-size: .62em;
  background: linear-gradient(135deg, var(--bg-3), color-mix(in srgb, var(--lav) 50%, var(--bg-3))); box-shadow: inset 0 0 0 1px var(--line); animation: fadeIn 240ms var(--ease); }
.gpa-val { transition: color 240ms var(--ease); }
.gpa-hint { display: inline-flex; align-items: center; gap: 5px; }
.gpa-hint .ico { width: 14px; height: 14px; }
.gpa-notes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.gpa-notes b { color: var(--ink-2); font-weight: 700; }
.gpa-inc:empty { display: none; }
/* grade bars: dotted track like the site's highlight plates; fills with a little spring when it comes into view */
.bar { height: 12px; border-radius: 99px; margin: 16px 0 6px; overflow: visible; background: radial-gradient(rgba(61, 14, 74, .10) 1px, transparent 1.2px) 0 0 / 7px 7px, var(--bg-3); box-shadow: inset 0 0 0 1px var(--line); }
.bar i { position: relative; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--purple) 55%, var(--lav)), var(--purple)); transition: width 1100ms cubic-bezier(.22, 1.2, .36, 1); box-shadow: 0 1px 3px color-mix(in srgb, var(--purple) 35%, transparent); }
.bar--low i { background: linear-gradient(90deg, #f6d27a, var(--gold)); box-shadow: 0 1px 3px rgba(180, 130, 0, .3); }
.bar i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); background-size: 200% 100%; opacity: 0; }
.bar.is-filled i::after { animation: barShine 1200ms var(--ease) 700ms 1 both; }
@keyframes barShine { 0% { opacity: 1; background-position: 150% 0; } 100% { opacity: 0; background-position: -50% 0; } }
.bar .mark { top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); opacity: .5; }
:root[data-theme="dark"] .bar { background: radial-gradient(rgba(236, 225, 250, .07) 1px, transparent 1.2px) 0 0 / 7px 7px, var(--bg-3); }
/* "On this page" links: one tidy row when they fit, otherwise even rows (never one link left alone) */
.jump { gap: 6px; }
.jump a { justify-content: center; padding: 0 13px; font-size: 14.5px; white-space: nowrap; }
@media (max-width: 760px) { .jump { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .jump a { padding: 0 6px; font-size: 13.5px; } }
@media (max-width: 380px) { .jump { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ================= dark mode, calmer =================
   Neutral graphite instead of deep purple, warm off-white text instead of pure white, a soft muted accent.
   Easier on the eyes for long reading; every pair still meets WCAG AA. */
:root[data-theme="dark"] {
  --bg: #1e1d22; --bg-2: #242329; --bg-3: #2c2b32; --card: #28272d; --field: #222127;
  --line: rgba(255, 255, 255, .11); --line-strong: rgba(255, 255, 255, .22);
  --ink: #f1eee9; --ink-2: #d4cfc8; --muted: #aea89f;
  --purple: #c4b2dc; --purple-2: #d5c9e8; --gold-ink: #1e1d22;
  --lav: #36323f; --lav-2: #403b4a; --lav-soft: #2d2a34; --lav-ink: #efe8f8;
  --cream: #35301f; --olive: #f0dc9f; --gold-text: #ecca70;
  --footer-bg-dark: #17161a;
  --shadow: 0 14px 32px rgba(0, 0, 0, .42); --dots: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.2px) 0 0 / 9px 9px;
}
:root[data-theme="dark"] body { color: var(--ink); -webkit-font-smoothing: antialiased; }
:root[data-theme="dark"] .site-header { background: rgba(30, 29, 34, .92); }
:root[data-theme="dark"] .bubble--me { background: var(--lav); border-color: var(--line-strong); color: var(--lav-ink); }
:root[data-theme="dark"] .bubble--me time { color: var(--muted); }
:root[data-theme="dark"] .btn:not(.btn--ghost):not(.btn--lav):not(.btn--light):not(.btn--sun) { color: var(--gold-ink); }
:root[data-theme="dark"] p, :root[data-theme="dark"] li { line-height: 1.65; }
:root[data-theme="dark"] body { letter-spacing: .005em; }
/* color picker */
.sheet--colors { max-width: 600px; }
.cp-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; }
.cp-h { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.cp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; margin-bottom: 18px; }
.cp-preset { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; text-align: left; transition: border-color 140ms var(--ease); }
.cp-preset i { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cp-preset span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-preset:hover { border-color: var(--line-strong); }
.cp-preset[aria-pressed="true"] { border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 25%, transparent); }
.cp-custom { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.cp-wheel-wrap { position: relative; width: 220px; height: 220px; }
.cp-wheel { width: 220px; height: 220px; border-radius: 50%; cursor: crosshair; touch-action: none; display: block; box-shadow: 0 0 0 1px var(--line); }
.cp-wheel:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.cp-dot { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); pointer-events: none; }
.cp-side { display: grid; gap: 6px; }
.cp-lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.cp-v { width: 100%; height: 14px; -webkit-appearance: none; appearance: none; border-radius: 99px; background: linear-gradient(90deg, #000, var(--hue, #5b1a6b)); box-shadow: inset 0 0 0 1px var(--line); }
.cp-v::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 26px; border-radius: 6px; background: #ddd; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); cursor: grab; }
.cp-v::-moz-range-thumb { width: 18px; height: 26px; border-radius: 6px; background: #ddd; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); cursor: grab; }
.cp-hexrow { display: flex; align-items: center; gap: 8px; }
.cp-sw { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cp-hex { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: lowercase; }
.cp-hex.bad { border-color: var(--c-closed); }
.cp-eye { justify-self: start; margin-top: 4px; }
.cp-common { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cp-common button { aspect-ratio: 1; border-radius: 8px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cp-common button[aria-pressed="true"] { border-color: var(--ink); }
@media (max-width: 560px) { .cp-custom { grid-template-columns: 1fr; justify-items: center; } .cp-side { width: 100%; } }
/* overview: dragging boxes */
.ov-w.is-dragging { z-index: 20; transition: none; }
.ov-w.is-dragging > * { box-shadow: 0 24px 50px rgba(43, 20, 60, .26) !important; }
.ov-ghost { position: absolute; z-index: 5; border-radius: 18px; border: 2px dashed color-mix(in srgb, var(--purple) 55%, transparent); background: color-mix(in srgb, var(--lav) 35%, transparent); pointer-events: none; transition: left 200ms cubic-bezier(.2,.8,.2,1), top 200ms cubic-bezier(.2,.8,.2,1), width 200ms var(--ease), height 200ms var(--ease); }
.ov-w.ov-in { animation: ovIn 420ms cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes ovIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
/* new widgets */
.ov-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.ov-mini > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg-3); }
.ov-mini b { font-size: 26px; line-height: 1.1; color: var(--purple); font-variant-numeric: tabular-nums; }
.ov-mini span { font-size: 13px; color: var(--muted); }
.ov-lunch-txt { display: grid; min-width: 0; }
.ov-lunch-txt .ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13.5px; }
.ov-lunch-none { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ink-2); }
.ov-lunch-none .ico { width: 18px; height: 18px; color: var(--purple); flex: none; }
.ov-lunch-dl { margin: 8px 0 0; }
.ov-list li { min-width: 0; }
.ov-time { display: grid; justify-items: center; min-width: 52px; padding: 4px 6px; border-radius: 10px; background: var(--bg-3); font-size: 12px; color: var(--muted); }
.ov-time b { font-size: 14px; color: var(--ink); }
.ov-today li.is-now .ov-time { background: var(--lav); color: var(--lav-ink); }
.ov-today li.is-done { opacity: .55; }
@media (hover: hover) { .sch-class + .sch-add { opacity: 0; transition: opacity 140ms var(--ease); } td:hover > .sch-class + .sch-add, li:hover .sch-class + .sch-add, .sch-class + .sch-add:focus-visible { opacity: 1; } }
.file-picked { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px; }
.file-picked[hidden] { display: none; }
.file-picked .fp-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-picked .fp-acts { grid-column: 1 / -1; justify-content: flex-end; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--purple) 18%, transparent); }
/* long "On this page" lists wrap into even rows (4 + 3), never one link alone */
.jump:has(> a:nth-child(6)) { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; }
@media (max-width: 380px) { .jump:has(> a:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; } }
.form-card .choice-row .choice span { font-size: 14px; gap: 6px; padding: 0 8px; }
.form-card .choice-row .choice span .ico { width: 16px; height: 16px; }
.gpa-hidden .gpa-val { display: block; width: 3.4em; min-width: 0; }
.gpa-pair.gpa-hidden .gpa-val { display: inline-block; width: 2.6em; vertical-align: middle; height: 1.3em; }
.cp-hex { height: 36px; padding: 0 10px; border-radius: 9px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 14px; }
.cp-hex:focus { outline: none; border-color: var(--purple); }
.vr-note { font: inherit; font-size: 14.5px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); resize: vertical; }

/* ===== Batch I: tab bar layouts ===== */
/* customizer: long tab names wrap onto a second line instead of running out of the box */
.tc-group { min-width: 0; }
.tc-list { grid-template-columns: minmax(0, 1fr); }
.tc-item { min-width: 0; min-height: 40px; }
.tc-item > span:not(.drag-handle) { min-width: 0; overflow-wrap: break-word; line-height: 1.25; padding: 3px 0; }
.tc-layout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.tc-layout-l { font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* one line that scrolls sideways (default) */
.tabnav.tabnav--scroll { display: flex; flex-wrap: nowrap; align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 6px 0 12px; scroll-padding-inline: 48px; }
.tabnav--scroll::-webkit-scrollbar { display: none; }
.tabnav--scroll > *, .tabnav--scroll > .tabrow > * { flex: none; }
.tabnav--scroll button > span { overflow: visible; }
/* a list down the side, next to the page */
@media (min-width: 761px) {
  #portal-root.tabs-side { display: grid; grid-template-columns: 216px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #portal-root.tabs-side > * { grid-column: 1 / -1; }
  #portal-root.tabs-side > .tabbar { grid-column: 1; }
  #portal-root.tabs-side > #panel { grid-column: 2; min-width: 0; }
  .tabbar--side { flex-direction: column; align-items: stretch; gap: 6px; position: sticky; top: 88px; max-height: calc(100vh - 110px); margin: 0;
    padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
  .tabnav.tabnav--side { display: flex; flex-direction: column; align-items: stretch; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    padding: 0; margin: 0; border: 0; scrollbar-width: thin; }
  .tabnav--side > .tabrow { display: contents; }
  .tabnav--side button { width: 100%; justify-content: flex-start; text-align: left; }
  .tabnav--side button > span { white-space: normal; overflow: visible; line-height: 1.25; padding: 4px 0; }
  .tabnav--side .tabdrop { width: 100%; margin: 4px 0 0; }
  .tabnav--side .tabdrop-btn { border-color: transparent !important; background: transparent; }
  .tabnav--side .tabdrop-btn > span { display: grid; }
  .tabnav--side .tabdrop-btn span b { margin-left: 0; font-size: 13px; }
  .tabnav--side .tabdrop-btn span b::before { content: none; }
  .tabnav--side .tabdrop-chev { margin-left: auto; }
  .tabnav--side .tabdrop-menu { position: static; min-width: 0; margin: 2px 0 4px; padding: 0; gap: 2px; border: 0; border-radius: 0; box-shadow: none; background: transparent; animation: none; }
  .tabnav--side .tabdrop-menu button { padding-left: 30px; }
  .tabnav--side.has-pill .tabdrop-menu button[aria-selected="true"] { background: transparent; }
  .tabbar--side .tab-edit { width: 100%; height: auto; min-height: 42px; justify-content: flex-start; gap: 10px; padding: 0 14px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
  .tabbar--side .tab-edit::after { content: "Customize tabs"; font-size: 14px; font-weight: 650; }
}
/* phones: the side list and several lines both become the two-column grid */
@media (max-width: 760px) {
  .tabnav.tabnav--scroll { display: flex; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; gap: 6px; }
  .tabnav--scroll button { background: var(--bg-2); }
  .tabnav--scroll .tab-arrow { display: none; }
  .tabnav--scroll .tabdrop-btn { width: auto; }
  .tabnav--scroll .tabdrop-btn .tabdrop-chev { margin-left: 0; }
}

/* the highlight: size changes ease instead of springing; moving to another line glides */
.tab-pill { transition: transform 360ms cubic-bezier(.3, 1.15, .5, 1), width 300ms cubic-bezier(.22, 1, .36, 1), height 300ms cubic-bezier(.22, 1, .36, 1); }
.seg .seg-pill { transition: transform 320ms cubic-bezier(.3, 1.15, .5, 1), width 280ms cubic-bezier(.22, 1, .36, 1), height 280ms cubic-bezier(.22, 1, .36, 1), background-color 200ms var(--ease), box-shadow 200ms var(--ease), opacity 200ms var(--ease); }
.seg-pill.is-grabbing, .tab-pill.is-grabbing { transition: width 240ms cubic-bezier(.22, 1, .36, 1), height 240ms cubic-bezier(.22, 1, .36, 1) !important; }
.modal .sheet.sheet--tabs { width: min(740px, 100%); }
.tc-groups { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tc-item { gap: 6px; font-size: 14px; }
.tabnav .tab-badge, .tabnav .tab-dot { flex: none; }
@media (min-width: 761px) { .tabnav--side [data-tab] .tab-badge, .tabnav--side [data-tab] .tab-dot { margin-left: auto; } }
.gpa-hidden .gpa-flash { animation: none; }

/* colors: the samples are the buttons that choose what to color */
.cp-preview { background: var(--bg); cursor: pointer; margin-bottom: 10px; }
.cp-t { position: relative; cursor: pointer; border: 0; font-family: inherit; transition: box-shadow 140ms var(--ease), transform 140ms var(--ease); }
.cp-t[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink) !important; }
.cp-t:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.cp-preview .btn:hover { transform: none; }
.cp-editing { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 16px; font-size: 14px; }
.cp-editing p { margin: 0; display: grid; gap: 2px; }
.cp-editing .link-btn { font-size: 14px; }
.site-footer .legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* site policy pages (privacy, terms, cookies, accessibility) */
.doc-hero { padding-bottom: clamp(20px, 3vw, 36px); }
.doc-date { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.doc-section { padding-top: 8px; }
.doc-wrap { display: grid; grid-template-columns: 200px minmax(0, 68ch); gap: clamp(24px, 5vw, 64px); align-items: start; }
.doc-nav { position: sticky; top: 96px; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 9px; color: var(--ink-2); font-weight: 650; font-size: 15px; text-decoration: none; }
.doc-nav a:hover { background: var(--bg-2); color: var(--ink); }
.doc-nav a[aria-current="page"] { background: var(--lav); color: var(--lav-ink); }
.doc { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.doc h2 { font-size: clamp(22px, 2.4vw, 26px); color: var(--ink); margin: 40px 0 10px; scroll-margin-top: 96px; }
.doc > h2:first-child { margin-top: 0; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.doc li::marker { color: var(--purple); }
.doc b { color: var(--ink); }
.doc a { color: var(--purple); text-underline-offset: 3px; }
.doc-summary { padding: 20px 22px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.doc-summary h2 { margin: 0 0 10px; font-size: 18px; }
.doc-summary ul { margin: 0; }
.doc-summary--badge { display: flex; gap: 18px; align-items: center; }
.doc-summary--badge p { margin: 0; }
.wcag-badge { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; background: var(--lav); color: var(--lav-ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-align: center; line-height: 1.2; }
.wcag-badge b { font-size: 17px; letter-spacing: 0; }
.doc-table { margin: 6px 0 20px; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-table th, .doc-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc-table th { font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.doc-table td:first-child { font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
  .doc-wrap { grid-template-columns: 1fr; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .doc-nav a { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .doc-table td:nth-child(3), .doc-table th:nth-child(3) { white-space: nowrap; }
}
@media (max-width: 520px) { .doc-table td:nth-child(3), .doc-table th:nth-child(3) { white-space: normal; } }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 32px; }
.legal-note { width: 100%; }
/* footer: buttons keep their own text color, and links in the small print stay light on the dark footer */
.site-footer a.btn { color: var(--b-fg); }
.site-footer a.btn:hover { color: var(--b-fg); }
.site-footer .legal a, .site-footer .legal p a:not(.btn):not(.link) { color: var(--footer-ink, #fff); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.site-footer .legal a:hover { color: var(--sun); }
:root[data-theme="dark"] .site-footer .legal a { color: #f2edf8; }
:root[data-theme="dark"] .site-footer .btn--light { --b-bg: var(--sun); --b-fg: var(--sun-ink); }

/* WCAG 2.2 target size: small remove buttons and links are at least 24 by 24 pixels */
.tag-x { width: 24px; height: 24px; }
.att-chip { height: 24px; }
.ann-more { min-height: 24px; }
.vl button { width: 24px; height: 24px; margin: -4px -8px -4px -2px; }
/* dark mode: things that had a light color baked in */
.vendor-row th { background: var(--bg-2); }
@media print { .vendor-row th { background: #eee !important; } }
:root[data-theme] .cal-grid .day.today .n span, .cal-grid .day.today .n span { color: var(--gold-ink); }
.pl-day .pl-h { font-weight: 800; line-height: 1.3; }
.acct-menu button:focus-visible, .tabdrop-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--purple); }

/* colors, batch J: every sample is the same shape. Radii nest: outer = inner + padding (8 + 12 = 20). */
.cp-preview { --cp-r: 8px; --cp-pad: 12px; padding: var(--cp-pad); border-radius: calc(var(--cp-r) + var(--cp-pad)); gap: 8px; }
.cp-t { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--cp-r);
  font: 700 14px/1 var(--sans); letter-spacing: 0; text-decoration: none; }
.cp-all { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cp-all .ico { width: 16px; height: 16px; }
.cp-btn { background: var(--gold); color: var(--gold-ink); }
.cp-soft { background: var(--lav); color: var(--lav-ink); }
.cp-hl { --tb-bg: var(--lav-soft); --tb-ink: var(--lav-ink); background: var(--tb-bg); color: var(--tb-ink); font-family: var(--serif); font-size: 16px; font-weight: 600; }
.cp-tab { background: var(--lav); color: var(--lav-ink); }
.cp-sun { background: var(--sun); color: var(--sun-ink); }
.cp-bg { background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); padding-left: 10px; }
.cp-bg i { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cp-t:active { transform: scale(.96); }
.cp-v:disabled { opacity: .4; filter: grayscale(1); cursor: not-allowed; }
.cp-v:disabled::-webkit-slider-thumb { cursor: not-allowed; }
.cp-auto { font-weight: 600; }
.cp-editing [data-cp-part-reset] { flex: none; }
.cp-custom { padding-right: 4px; }

/* tab bar, batch J: the strip scrolls; the arrows and the pencil sit outside it so they never move or vanish */
.tabbar { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tabbar > .tabnav { flex: 1 1 auto; min-width: 0; margin: 0; padding: 4px 0; border: 0; }
.tabbar--side { padding-bottom: 8px; }
.tabbar .tab-edit, .tabbar .tab-arrow { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; cursor: pointer; font: inherit; }
.tabbar .tab-edit { width: 42px; height: 42px; border-radius: 10px; background: transparent; color: var(--muted); transition: background-color 150ms ease, color 150ms ease; }
.tabbar .tab-edit:hover { background: var(--bg-2); color: var(--ink); }
.tabbar .tab-edit .ico { width: 16px; height: 16px; }
.tabbar .tab-arrow { z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease; }
.tabbar .tab-arrow .ico { width: 16px; height: 16px; }
.tabbar .tab-arrow:not(:disabled):hover { background: var(--bg-2); color: var(--ink); }
.tabbar .tab-arrow:not(:disabled):active { transform: scale(.94); }
.tabbar .tab-arrow:disabled { opacity: .35; cursor: default; }
.tabbar:not(.has-more) .tab-arrow { display: none; }
/* soft fades over the strip's ends show it carries on */
.tabbar .tab-arrow::after { content: ""; position: absolute; top: -6px; bottom: -6px; width: 28px; pointer-events: none; opacity: 0; transition: opacity 150ms ease; }
.tabbar .tab-arrow--l::after { left: calc(100% + 6px); background: linear-gradient(90deg, var(--bg), transparent); }
.tabbar .tab-arrow--r::after { right: calc(100% + 6px); background: linear-gradient(270deg, var(--bg), transparent); }
.tabbar:has(.tabnav.can-l) .tab-arrow--l::after, .tabbar:has(.tabnav.can-r) .tab-arrow--r::after { opacity: 1; }
.tabnav--scroll { scroll-padding-inline: 32px; }
@media (max-width: 760px) {
  .tabbar { padding-bottom: 6px; }
  .tabbar .tab-arrow { display: none; }
  .tabbar .tab-edit { display: none; }
  .tabbar > .tabnav.tabnav--scroll { margin: 0 -16px; padding: 4px 16px; }
}
/* springs: a little give at the end of a move, for things that are thrown or dragged (generated from a damped spring) */
:root { --spring: linear(0, 0.0224, 0.0795, 0.1587, 0.2501, 0.3463, 0.4417, 0.5325, 0.6163, 0.6916, 0.7577, 0.8145, 0.8624, 0.9019, 0.934, 0.9593, 0.9789, 0.9936, 1.0043, 1.0116, 1.0162, 1.0188, 1.0199, 1.0197, 1.0188, 1.0174, 1.0156, 1.0137, 1.0118, 1.01, 1.0082, 1.0067, 1.0053, 1.0041, 1.0031, 1.0022, 1.0015, 1.001, 1.0006, 1.0002, 1); --spring-d: 560ms; }
.tab-pill { transition: transform var(--spring-d) var(--spring), width 280ms cubic-bezier(.32, .72, 0, 1), height 280ms cubic-bezier(.32, .72, 0, 1); }
.seg .seg-pill { transition: transform var(--spring-d) var(--spring), width 260ms cubic-bezier(.32, .72, 0, 1), height 260ms cubic-bezier(.32, .72, 0, 1), background-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease; }
.seg-pill.is-grabbing, .tab-pill.is-grabbing { transition: width 200ms cubic-bezier(.32, .72, 0, 1), height 200ms cubic-bezier(.32, .72, 0, 1) !important; }

/* overview, batch J: boxes keep the order you put them in (no dense back-filling, so a drop lands where it shows) */
.ov-grid { position: relative; grid-auto-flow: row; }
.ov-editing .ov-w > .kpis { pointer-events: auto; }
/* "At a glance" numbers: number on top, label under it, every card the same shape so the numbers line up */
.kpis--pick { position: relative; display: grid; grid-template-columns: repeat(min(var(--n, 6), 6), minmax(0, 1fr)); gap: 14px; margin: 0; }
@media (max-width: 1100px) { .kpis--pick { grid-template-columns: repeat(min(var(--n, 3), 3), minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis--pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-w { position: relative; display: flex; min-width: 0; }
.kpi-w > .kpi { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 18px; min-height: 108px; border-radius: 16px; }
.kpis--pick .kpi b { font-size: 32px; line-height: 1; letter-spacing: -.01em; }
.kpis--pick .kpi span { display: block; font-size: 14.5px; line-height: 1.35; color: var(--muted); font-weight: 600; text-wrap: balance; }
.kpi-add { display: none; }
.ov-editing .kpi-add:not([hidden]) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 108px; border-radius: 16px; border: 2px dashed var(--line-strong); background: transparent; color: var(--ink-2); font: 700 14px var(--sans); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.ov-editing .kpi-add:hover { background: var(--bg-2); border-color: var(--purple); }
.kpi-add .ico { width: 18px; height: 18px; }
.kpi-ctl { display: none; }
.ov-editing .kpi-ctl { display: flex; gap: 6px; position: absolute; top: -10px; right: -8px; z-index: 4; }
.kpi-ctl button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--card); cursor: pointer; transition: transform 150ms ease, background-color 150ms ease; }
.kpi-ctl button .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.kpi-swap { background: var(--ink-2); color: var(--card); }
.kpi-x { background: #c0392b; color: #fff; }
.kpi-ctl button:hover { transform: scale(1.08); }
.kpi-ctl button:active { transform: scale(.94); }
.ov-editing .kpi-w { cursor: grab; touch-action: none; }
.ov-editing .kpi-w > .kpi { pointer-events: none; }
.kpi-w.is-dragging { z-index: 6; cursor: grabbing; }
.kpi-w.is-dragging > .kpi { box-shadow: 0 14px 30px rgba(43, 20, 60, .18); }
.ov-ghost--in { border-radius: 16px; }
.kpi-w.ov-in { animation: ovIn 420ms var(--spring) both; }

/* messages, batch J: bubbles rise in softly from the side they belong to (no overshoot), files ride along */
.bubble--out { animation: bubOut3 320ms cubic-bezier(.32, .72, 0, 1) both; transform-origin: 100% 100%; }
.bubble--in { animation: bubIn3 360ms cubic-bezier(.32, .72, 0, 1) both; transform-origin: 0 100%; }
@keyframes bubOut3 { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bubIn3 { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.bubble--sending { opacity: .72; transition: opacity 200ms ease; }
.bubble--sent { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bubble--out, .bubble--in { animation: none; } }
.msg-scroll { scroll-behavior: auto; }
.msg-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; }
.msg-attach { width: 44px; height: 52px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); background: var(--bg-2); border: 1.5px solid var(--line); transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.msg-attach:hover { color: var(--purple); border-color: var(--purple); }
.msg-attach:active { transform: scale(.96); }
.msg-attach .ico { width: 19px; height: 19px; }
#msg-file:focus-visible + textarea, .msg-row:has(#msg-file:focus-visible) .msg-attach { outline: 3px solid var(--purple); outline-offset: 2px; }
.msg-picked[hidden] { display: none; }
.msg-pick { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.msg-pick > .ico { width: 16px; height: 16px; color: var(--purple); flex: none; }
.msg-pick-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; max-width: 32ch; }
.msg-pick small { color: var(--muted); white-space: nowrap; }
.msg-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 650 14px var(--sans); cursor: pointer; text-align: left; transition: background-color 150ms ease; }
.msg-file:first-child { margin-top: 0; }
.msg-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file .ico { width: 16px; height: 16px; flex: none; color: var(--purple); }
.msg-file:hover { background: var(--bg-3); }
.bubble--me .msg-file { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); color: inherit; }
.bubble--me .msg-file .ico { color: inherit; }
:root[data-theme="dark"] .bubble--me .msg-file { background: rgba(255, 255, 255, .08); border-color: var(--line-strong); }
.msg-note { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.msg-count { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-count.is-near { color: #b3261e; }
:root[data-theme="dark"] .msg-count.is-near { color: #ff9d8c; }

/* attendance, batch J: history rows stay inside their box; the file drop reads as one row */
.att-hist { grid-template-columns: minmax(0, 1fr); }
.att-hist li { min-width: 0; }
.att-hist .file-chip { display: flex; width: fit-content; max-width: 100%; }
.att-hist .file-chip .btn { flex: none; }
.field .file-drop { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; font-weight: 500; text-align: left; }
.field .file-drop[hidden] { display: none; }
.file-drop .fd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.file-drop .fd-text > span { color: var(--ink); }
.file-drop .fd-text b { font-weight: 700; }

/* opening and closing: sections that fold open (FAQ answers, student rows, any <details>) ease their height
   open instead of jumping (browsers without interpolate-size just open at once) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details::details-content { block-size: 0; overflow: clip; transition: block-size 280ms cubic-bezier(.77, 0, .175, 1), content-visibility 280ms allow-discrete; }
  details[open]::details-content { block-size: auto; }
  .faq details[open] > div { animation: none; }
}
@media (prefers-reduced-motion: reduce) { details::details-content { transition: none; } }
.bar i { transform-origin: 0 50%; transition: transform 900ms cubic-bezier(.32, .72, 0, 1); }
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }
@media (min-width: 761px) { .tabbar.tabbar--side { position: sticky; top: 88px; margin: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 760px) { .tabbar.tabbar--side { position: relative; top: auto; } }
@media (min-width: 761px) { .tabbar.tabbar--side .tab-edit { width: 100%; height: auto; min-height: 42px; justify-content: flex-start; gap: 10px; padding: 0 14px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; } }
.cp-editing [data-cp-part-reset][hidden] { display: none; }
@media (min-width: 761px) { .tabnav--side button > .tab-badge { min-width: 20px; height: 20px; padding: 0 6px; line-height: 1; white-space: nowrap; flex: none; } }
.ah-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.ah-top .att-badge { flex: none; }
.att-hist .file-chip .file-nm { flex: 1 1 auto; max-width: 28ch; }
@media (max-width: 560px) { .att-hist .att-badge { margin-left: 0; } }

/* colors, batch K: five samples with a live color dot and an icon; the chosen color always shows a ring and a check */
.sheet--colors { max-width: 620px; }
.cp-preview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cp-preview .cp-t { flex-direction: column; gap: 6px; min-height: 76px; padding: 10px 6px; background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13px; }
.cp-preview .cp-t .ico { width: 16px; height: 16px; position: absolute; top: 8px; right: 8px; color: var(--muted); }
.cp-sw-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); background: var(--purple); }
.cp-sw-dot--accent { background: conic-gradient(var(--purple) 0 50%, var(--lav) 0 75%, var(--sun) 0) !important; }
.cp-preview .cp-t[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 2px var(--purple) !important; background: var(--bg-2); }
.cp-editing { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin: 10px 0 14px; min-height: 32px; }
.cp-editing p { margin: 0; font-size: 14px; color: var(--muted); }
.cp-incl { align-items: center; font-size: 14px; }
.cp-incl[hidden] { display: none; }
.cp-presets { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.cp-preset { position: relative; }
.cp-preset[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.cp-preset[aria-pressed="true"] i::after, .cp-common button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px;
  background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.cp-preset i { position: relative; }
.cp-common button { position: relative; background: var(--c); border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform 150ms ease, box-shadow 150ms ease; }
.cp-common button:hover { transform: scale(1.06); }
.cp-common button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.cp-hexrow .cp-eye { flex: none; width: 40px; height: 40px; }
.cp-side { gap: 8px; }
@media (max-width: 560px) { .cp-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* menu bar: slides away while reading down, back on a short scroll up */
.site-header { transition: transform 260ms cubic-bezier(.32, .72, 0, 1), box-shadow 200ms ease, border-color 200ms ease; will-change: transform; }
html.hdr-hidden .site-header { transform: translateY(-100%); box-shadow: none; }
@media (min-width: 761px) { html.hdr-hidden .tabbar.tabbar--side { top: 16px; } }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
/* signed in: the lock goes away */
.signin-link .ico-in { display: none; }
.signin-link.is-in .ico-out { display: none; }
.signin-link.is-in .ico-in { display: block; }
.att-badge.off { background: var(--bg-3); color: var(--muted); }
.att-hist li.ah-off { background: var(--bg-2); }
.att-hist li.ah-off .ah-main p { color: var(--muted); }
.empty.att-off { padding: 40px 20px; }
.empty.att-off h3 { margin: 10px 0 4px; }

/* ================= hand-drawn touches (batch K) =================
   Marker underlines and circles, doodle arrows and stars, and short handwritten notes in Caveat. All decorative
   (aria-hidden), drawn as masks so they take any color. */
.dd { display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--dd) center / contain no-repeat; mask: var(--dd) center / contain no-repeat; vertical-align: middle; }
.dd-arrow { --dd: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 64 40%22 stroke-width=%223%22%3E%3Cpath d=%22M4 34C10 18 26 8 52 10%22/%3E%3Cpath d=%22M44 3l9 7-8 8%22/%3E%3C/svg%3E"); width: 44px; height: 28px; }
.dd-arrow-down { --dd: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 48 56%22 stroke-width=%223%22%3E%3Cpath d=%22M10 4c18 6 28 20 26 42%22/%3E%3Cpath d=%22M28 40l8 9 8-10%22/%3E%3C/svg%3E"); width: 30px; height: 36px; }
.dd-star { --dd: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 40 40%22 stroke-width=%222.6%22%3E%3Cpath d=%22M20 4l4.2 11.4L36 16l-9.3 7.4L30 35l-10-6.6L10 35l3.3-11.6L4 16l11.8-.6z%22/%3E%3C/svg%3E"); width: 28px; height: 28px; }
.dd-spark { --dd: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 40 40%22 stroke-width=%222.6%22%3E%3Cpath d=%22M20 4v10%22/%3E%3Cpath d=%22M20 26v10%22/%3E%3Cpath d=%22M4 20h10%22/%3E%3Cpath d=%22M26 20h10%22/%3E%3Cpath d=%22M9 9l5 5%22/%3E%3Cpath d=%22M26 26l5 5%22/%3E%3C/svg%3E"); width: 26px; height: 26px; }
.hand-note { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-family: var(--hand); font-weight: 600; font-size: 25px; line-height: 1.1; color: var(--purple); transform: rotate(-2.5deg); transform-origin: left center; }
.hand-note--flip { flex-direction: row-reverse; }
.hand-note .dd { color: var(--sun); }
:root[data-theme="dark"] .hand-note { color: var(--purple); }
/* a word underlined in marker, or circled by hand */
.mark-ul, .mark-circle { position: relative; white-space: nowrap; isolation: isolate; }
.mark-ul::after { content: ""; position: absolute; z-index: -1; left: -.06em; right: -.06em; bottom: -.08em; height: .3em; background: var(--sun); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 14%22 preserveAspectRatio=%22none%22 stroke-width=%224%22%3E%3Cpath d=%22M3 9C40 3 90 2 138 6c10 1 16 2 19 4%22/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 14%22 preserveAspectRatio=%22none%22 stroke-width=%224%22%3E%3Cpath d=%22M3 9C40 3 90 2 138 6c10 1 16 2 19 4%22/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.mark-ul--double::after { height: .42em; bottom: -.2em; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 18%22 preserveAspectRatio=%22none%22 stroke-width=%223.5%22%3E%3Cpath d=%22M3 7C50 3 110 2 156 5%22/%3E%3Cpath d=%22M14 14c40-4 90-5 130-3%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 18%22 preserveAspectRatio=%22none%22 stroke-width=%223.5%22%3E%3Cpath d=%22M3 7C50 3 110 2 156 5%22/%3E%3Cpath d=%22M14 14c40-4 90-5 130-3%22/%3E%3C/svg%3E"); }
.mark-circle::after { content: ""; position: absolute; z-index: -1; inset: -.32em -.42em -.26em; background: var(--sun); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 50%22 preserveAspectRatio=%22none%22 stroke-width=%223%22%3E%3Cpath d=%22M24 8C60 1 130 2 150 18c12 12-14 26-70 28C30 48 4 38 8 24 11 14 40 6 70 5%22/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 160 50%22 preserveAspectRatio=%22none%22 stroke-width=%223%22%3E%3Cpath d=%22M24 8C60 1 130 2 150 18c12 12-14 26-70 28C30 48 4 38 8 24 11 14 40 6 70 5%22/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
/* underlines draw themselves in once, the first time they're seen */
.js .mark-ul::after, .js .mark-circle::after { clip-path: inset(0 100% 0 0); transition: clip-path 700ms cubic-bezier(.32, .72, 0, 1) 250ms; }
.js .is-drawn.mark-ul::after, .js .is-drawn.mark-circle::after { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .js .mark-ul::after, .js .mark-circle::after { clip-path: none; transition: none; } }
/* a little hand-drawn squiggle in front of section labels */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; flex: none; width: 22px; height: 8px; background: var(--sun); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 40 12%22 stroke-width=%222.6%22%3E%3Cpath d=%22M2 8c4-6 8-6 12 0s8 6 12 0 8-6 12 0%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 viewBox=%220 0 40 12%22 stroke-width=%222.6%22%3E%3Cpath d=%22M2 8c4-6 8-6 12 0s8 6 12 0 8-6 12 0%22/%3E%3C/svg%3E") center / contain no-repeat; }
.site-footer .eyebrow::before { background: currentColor; }
/* doodles that sit beside a heading */
.doodle { position: absolute; color: var(--sun); pointer-events: none; }
.has-doodle { position: relative; }
.doodle.doodle--tr { position: relative; top: -.75em; margin-left: .08em; width: .46em; height: .46em; transform: rotate(12deg); }
@media (max-width: 760px) { .hand-note { font-size: 22px; } }
.hero-note { margin-top: 18px; }
.hero-note-arrow { transform: scaleY(-1) rotate(-8deg); }

/* college guidance page */
.plan-year { border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin: 0 0 10px; }
.plan-year > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; border-radius: 16px; transition: background-color 150ms ease; }
.plan-year > summary::-webkit-details-marker { display: none; }
.plan-year > summary:hover { background: var(--bg-2); }
.plan-year > summary::after { content: ""; margin-left: auto; width: 18px; height: 18px; flex: none; background: var(--muted); -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat; transition: transform 200ms cubic-bezier(.32, .72, 0, 1); }
.plan-year[open] > summary::after { transform: rotate(180deg); }
.plan-year > summary > span:last-of-type { display: grid; gap: 1px; }
.plan-year > summary b { font-family: var(--display); font-size: 19px; font-weight: 700; }
.plan-year > summary small { color: var(--muted); font-size: 14px; }
.plan-grade { display: grid; place-items: center; width: 52px; height: 44px; flex: none; font-family: var(--hand); font-size: 26px; font-weight: 700; color: var(--olive); background: var(--brush-c4) center / 100% 100% no-repeat; }
.plan-list, .plan-intro, .plan-months { margin: 0; padding: 4px 18px 16px; }
.plan-list { padding-left: 38px; }
.plan-list li { margin: 0 0 6px; }
.plan-intro { color: var(--ink-2); padding-bottom: 6px; }
.plan-months { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px 14px; }
.plan-months dt { font-family: var(--hand); font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--purple); }
.plan-months dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .plan-months { grid-template-columns: 1fr; gap: 2px; } .plan-months dd { margin-bottom: 8px; } }
.test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 6px; }
@media (max-width: 640px) { .test-grid { grid-template-columns: 1fr; } }
.test-card { display: grid; gap: 4px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.test-card b { font-family: var(--display); font-size: 18px; }
.test-card > span { font-size: 13.5px; font-weight: 700; color: var(--purple); }
.test-card p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.link-list { padding-left: 20px; }
.link-list li { margin: 0 0 6px; }
.intl-steps { padding-left: 20px; margin: 0 0 10px; }
.intl-steps li { margin: 0 0 4px; }
html.hdr-hidden .doc-nav { top: 16px; }
.modal .sheet.sheet--colors { width: min(620px, 100%); }
.cp-side { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.cp-side > * { min-width: 0; }
.cp-hex { width: 100%; }
.cp-preview .cp-t { display: grid; grid-template-columns: auto; justify-items: center; align-content: center; }
.cp-preview .cp-t .ico { position: static; width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.cp-preview .cp-t > span { display: inline-flex; align-items: center; }

/* Pictures and PDFs in messages: the picture itself in the bubble, a PDF as a card */
.msg-img { display: block; position: relative; margin: 2px 0 6px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; max-width: min(260px, 100%); color: var(--muted); transition: transform 150ms var(--ease); }
.msg-img:last-child { margin-bottom: 2px; }
.msg-img:active { transform: scale(.98); }
.msg-img img { display: block; max-width: min(260px, 64vw); max-height: 320px; min-width: 96px; min-height: 72px; width: auto; height: auto; object-fit: contain; animation: skelIn 220ms var(--ease); }
.msg-img-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 220px; max-width: 100%; aspect-ratio: 4 / 3; padding: 12px; font: 600 13px var(--sans); }
.msg-img-ph span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-img-ph .ico { width: 26px; height: 26px; }
.msg-img:not(.is-failed):not(.is-loaded) .msg-img-ph { background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) 0 0 / 200% 100%; animation: skShine 1.4s linear infinite; }
.msg-img:not(.is-failed):not(.is-loaded) .msg-img-ph > span { visibility: hidden; }
.bubble--me .msg-img { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .85); }
.msg-file--doc { display: flex; gap: 10px; padding: 8px 12px 8px 8px; margin: 2px 0 6px; width: min(280px, 100%); }
.msg-file--doc:last-child { margin-bottom: 2px; }
.msg-doc-ic { display: grid; place-items: center; width: 38px; height: 44px; flex: none; border-radius: 8px; background: var(--lav); }
.msg-file .msg-doc-ic .ico { width: 20px; height: 20px; }
.msg-doc-tx { display: grid; min-width: 0; }
.msg-doc-tx small { font: 500 12px var(--sans); color: var(--muted); }
.bubble--me .msg-doc-ic { background: rgba(255, 255, 255, .2); }
.bubble--me .msg-doc-tx small { color: inherit; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .msg-img:not(.is-loaded) .msg-img-ph { animation: none; } }

/* The office's view of everyone's messages */
.msg-scope { display: flex; width: 100%; margin-bottom: 12px; }
.msg-scope button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.msg-scope .ico { width: 16px; height: 16px; }
.msg-find { margin: 0; }
.msg-nofind { margin: 14px 0 0; }
.avatar-pair { position: relative; display: inline-block; width: 40px; height: 36px; flex: none; }
.avatar-pair .avatar { position: absolute; width: 26px; height: 26px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--bg); }
.avatar-pair .avatar:first-child { left: 0; top: 0; }
.avatar-pair .avatar:last-child { right: 0; bottom: 0; background: var(--cream); color: var(--olive); }
.bubble--right { align-self: flex-end; background: var(--lav-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg-ro { margin: 14px 0 0; }
