/* ==========================================================================
   Teacher EXA — main stylesheet
   Palette: grape, bubblegum, sunshine, mint, sky, tangerine on indigo ink.
   Type: Bricolage Grotesque (display) + Atkinson Hyperlegible (body).
   ========================================================================== */

:root {
	--ink: #1A1446;
	--ink-2: #2B2466;
	--muted: #545070;
	--line: #E3E1F0;
	--paper: #FFFFFF;
	--tint: #F3F4FF;

	--grape: #5B3DF5;
	--bubblegum: #FF5FA2;
	--sunshine: #FFD23F;
	--mint: #2ED3A2;
	--sky: #3BA7FF;
	--tangerine: #FF8A3D;

	--f-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
	--f-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

	--r-xl: 28px;
	--r-lg: 20px;
	--r-md: 14px;
	--wrap: 1200px;
	--gap: clamp(1rem, 2.5vw, 1.75rem);
	--section: clamp(3.5rem, 8vw, 6.5rem);
	--press: 0 4px 0 var(--ink);
}

/* Tones: each sets --tone (fill), --soft (tint) and --on (text on fill). */
.tone-grape     { --tone: var(--grape);     --soft: #ECE8FF; --on: #fff; }
.tone-bubblegum { --tone: var(--bubblegum); --soft: #FFE5F0; --on: var(--ink); }
.tone-sunshine  { --tone: var(--sunshine);  --soft: #FFF4C7; --on: var(--ink); }
.tone-mint      { --tone: var(--mint);      --soft: #DAF7EE; --on: var(--ink); }
.tone-sky       { --tone: var(--sky);       --soft: #DFF0FF; --on: var(--ink); }
.tone-tangerine { --tone: var(--tangerine); --soft: #FFE9DA; --on: var(--ink); }
.tone-ink       { --tone: var(--ink);       --soft: #E7E5F2; --on: #fff; }

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--grape); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 999; background: var(--sunshine); color: var(--ink); padding: .6rem 1rem; border-radius: var(--r-md); font-weight: 700; }
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* Buttons ------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: var(--f-display); font-weight: 700; font-size: 1rem; line-height: 1;
	padding: .85rem 1.25rem; border-radius: var(--r-md);
	border: 2px solid var(--ink); text-decoration: none; cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn--lg { padding: 1.05rem 1.5rem; font-size: 1.075rem; }
.btn--primary { background: var(--grape); color: #fff; box-shadow: var(--press); }
.btn--primary:hover { color: #fff; background: #4A2EE0; }
.btn--sun { background: var(--sunshine); color: var(--ink); box-shadow: var(--press); }
.btn--sun:hover { color: var(--ink); background: #FFC800; }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: var(--press); }
.btn--ghost:hover { color: var(--ink); background: var(--tint); }
.btn--outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn--outline-light:hover { color: var(--ink); background: #fff; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }

/* Header -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 2px solid transparent; transition: border-color .2s; }
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu inside it. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.96); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
body.menu-open .site-header::before { background: #fff; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand__word { font-family: var(--f-display); font-size: 1.45rem; line-height: 1; letter-spacing: -0.02em; display: flex; gap: .2rem; }
.brand__teacher { font-weight: 700; }
.brand__exa { font-weight: 800; color: var(--grape); }
.custom-logo-link img { max-height: 52px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.site-nav .menu { display: flex; align-items: center; gap: 0; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a { display: block; padding: .6rem .6rem; border-radius: 10px; font-weight: 700; font-size: .98rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { background: var(--tint); color: var(--grape); }
.site-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.site-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 200px; padding: .5rem; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: 0 6px 0 var(--ink); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; }
.site-nav .menu > li:hover > .sub-menu, .site-nav .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav__actions { display: flex; gap: .5rem; }
.site-nav__actions .btn, .header-cta { white-space: nowrap; }
.header-cta { display: none; }
.nav-toggle { display: none; margin-left: auto; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: .45rem; color: var(--ink); cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
.nav-toggle svg { display: block; }

@media (max-width: 1240px) {
	.nav-toggle { display: block; }
	.site-nav { position: fixed; inset: 76px 0 0 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); background: #fff; overflow-y: auto; overscroll-behavior: contain; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
	.admin-bar .site-nav { top: 122px; }
	.site-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
	.header-cta { display: inline-flex; margin-left: auto; padding: .65rem .9rem; font-size: .92rem; min-height: 44px; }
	.brand { min-height: 44px; }
	.nav-toggle { margin-left: 0; min-width: 44px; min-height: 44px; }
	.site-nav .menu { flex-direction: column; align-items: stretch; }
	.site-nav .menu a { font-size: 1.15rem; padding: .8rem; }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 1rem; display: grid; grid-template-columns: 1fr 1fr; }
	.site-nav .menu-item-has-children > a::after { display: none; }
	.site-nav__actions { flex-direction: column; }
	.site-nav__actions .btn { width: 100%; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Hero ---------------------------------------------------------------- */
.hero {
	position: relative;
	color: #fff;
	background-color: var(--grape);
	background-image:
		linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
	background-size: 32px 32px;
	padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.5rem);
	overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__tag { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .7rem; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 700; margin-bottom: 1.5rem; }
.hero__title { color: #fff; font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: 1.0; letter-spacing: -0.03em; max-width: 13ch; margin-bottom: 1.25rem; }
.hero__text { font-size: 1.2rem; max-width: 46ch; color: rgba(255,255,255,.9); }
.hero .btn--ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.hero .btn--ghost:hover { background: #fff; color: var(--ink); }
.hero .btn--primary { background: var(--sunshine); color: var(--ink); }
.hero .btn--primary:hover { background: #FFC800; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 2px solid rgba(255,255,255,.22); }
.hero__stats div { max-width: 13rem; }
.hero__stats dt { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.hero__stats dd { margin: .3rem 0 0; color: rgba(255,255,255,.82); font-size: .95rem; }

.live-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(46,211,162,.7); animation: pulse 1.8s infinite; flex-shrink: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,211,162,0); } 100% { box-shadow: 0 0 0 0 rgba(46,211,162,0); } }

/* Timetable board — the signature element */
.board {
	background: #fff; color: var(--ink);
	border: 3px solid var(--ink); border-radius: var(--r-xl);
	box-shadow: 10px 12px 0 var(--ink);
	padding: 1.25rem;
	transform: rotate(1.25deg);
}
.board__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .25rem .35rem 1rem; font-family: var(--f-display); font-size: 1.15rem; }
.board__live { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--f-body); font-size: .9rem; font-weight: 700; color: #0E7A5C; }
.board__list { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.slot {
	position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .75rem;
	padding: .85rem .95rem; border-radius: var(--r-md);
	background: var(--soft); border: 2px solid var(--tone);
	animation: drop .55s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 90ms + 150ms);
}
.slot.is-live { background: var(--tone); color: var(--on); border-color: var(--ink); }
.slot__time { grid-row: 1 / 3; font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; align-self: center; min-width: 2.7rem; }
.slot__name { font-weight: 700; line-height: 1.2; }
.slot__grade { font-size: .85rem; opacity: .8; }
.slot__badge { position: absolute; top: -.6rem; right: .6rem; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
	.hero__grid { grid-template-columns: 1fr; }
	.board { transform: none; box-shadow: 6px 8px 0 var(--ink); }
}
@media (max-width: 480px) { .board__list { grid-template-columns: 1fr; } }

/* Sections -------------------------------------------------------------- */
.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * .6) 0; }
.section--tint { background: var(--tint); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink .section-title { color: #fff; }
.section--ink .lead { color: rgba(255,255,255,.82); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.section-head p { max-width: 44ch; color: var(--muted); margin: 0; }
.section-head .section-title { margin: 0; }
.section-title { max-width: 22ch; }
.section-title--sm { font-size: 1.5rem; }
.section > .wrap > .section-title { margin-bottom: 2rem; }

/* Grade tabs (binder dividers) */
.grade-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.9rem .85rem; padding-top: 16px; }
.grade-tab a {
	position: relative; display: flex; flex-direction: column; height: 100%;
	padding: 1.1rem 1.1rem 1.25rem; padding-top: 1.6rem;
	background: var(--tone); color: var(--on); text-decoration: none;
	border: 2px solid var(--ink); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg);
	box-shadow: 0 5px 0 var(--ink);
	transition: transform .15s ease, box-shadow .15s ease;
}
.grade-tab a::before { /* the tab ear */
	content: ""; position: absolute; left: -2px; top: -16px; width: 56%; height: 18px;
	background: var(--tone); border: 2px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0;
}
.grade-tab a:hover { transform: translateY(-4px); box-shadow: 0 9px 0 var(--ink); color: var(--on); }
.grade-tab.is-current a { outline: 3px dashed var(--ink); outline-offset: 4px; }
.grade-tab__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 5vw, 4rem); line-height: .9; letter-spacing: -0.04em; }
.grade-tab__label { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; margin-top: .5rem; }
.grade-tab__sub { font-size: .85rem; opacity: .82; margin-top: .25rem; line-height: 1.35; }
.section--grades { padding-top: calc(var(--section) + .5rem); }
.section--grades .grade-tabs { margin-top: 1rem; }
.level-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; font-weight: 700; }

/* Steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: step; }
.step { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-lg); padding: 1.75rem 1.5rem 1.5rem; counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: -1.1rem; right: 1.25rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--f-display); font-weight: 800; }
.step__icon { display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 14px; background: var(--tone); color: var(--on); margin-bottom: 1rem; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* Subjects */
.subjects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.subject { display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem 0 0; border-top: 4px solid var(--tone); }
.subject__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--soft); color: var(--ink); }
.subject h3, .subject h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.subject p { color: var(--muted); margin: 0 0 .4rem; font-size: .98rem; }
.subject small { font-weight: 700; font-size: .85rem; }
.subjects--wide { grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; }
.subjects--wide .subject { flex-direction: row; align-items: flex-start; gap: 1.25rem; }
.subjects--wide .subject__icon { width: 3.75rem; height: 3.75rem; flex-shrink: 0; background: var(--tone); color: var(--on); }
@media (max-width: 1000px) { .subjects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .subjects, .subjects--wide { grid-template-columns: 1fr; } }

/* Platform + dashboard mock */
.section--platform { background: var(--tint); }
.platform { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.platform__copy .btn { margin-top: 1.5rem; }
.ticks { display: grid; gap: 1rem; margin-top: 1.5rem; }
.ticks li { display: flex; gap: .85rem; align-items: flex-start; }
.ticks svg { flex-shrink: 0; color: var(--grape); margin-top: .15rem; }
.ticks--plain li span { color: var(--ink); }
@media (max-width: 900px) { .platform { grid-template-columns: 1fr; } }

.dash { background: #fff; border: 3px solid var(--ink); border-radius: var(--r-xl); padding: 1.25rem; box-shadow: -10px 12px 0 var(--sunshine), -10px 12px 0 3px var(--ink); font-size: .95rem; }
.dash__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dash__hello { display: flex; gap: .7rem; align-items: center; }
.dash__hello small { display: block; color: var(--muted); }
.dash__avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--bubblegum); color: var(--ink); font-family: var(--f-display); font-weight: 800; border: 2px solid var(--ink); }
.dash__streak { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; background: #FFE9DA; color: #B4470C; font-weight: 700; font-size: .85rem; }
.dash__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.dash__card { border-radius: var(--r-md); padding: .9rem; background: var(--tint); }
.dash__card small { display: block; color: var(--muted); font-size: .8rem; }
.dash__card strong { display: block; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.15; margin: .2rem 0 .5rem; }
.dash__card--xp { grid-column: span 3; background: var(--grape); color: #fff; }
.dash__card--xp small { color: rgba(255,255,255,.82); }
.dash__bar { height: .55rem; border-radius: 999px; background: rgba(255,255,255,.25); margin-bottom: .5rem; overflow: hidden; }
.dash__bar span { display: block; height: 100%; background: var(--sunshine); border-radius: inherit; }
.dash__card--next { grid-column: span 3; background: #DAF7EE; }
.dash__pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; }
.dash__card--grades { grid-column: span 4; background: #fff; border: 2px solid var(--line); }
.dash__card--grades ul { display: grid; gap: .45rem; margin-top: .5rem; }
.dash__card--grades li { display: grid; grid-template-columns: 4.5rem 1fr 2rem; align-items: center; gap: .6rem; font-size: .85rem; }
.dash__card--grades i { display: block; height: .5rem; border-radius: 999px; background: linear-gradient(90deg, var(--tone) var(--w), var(--line) var(--w)); }
.dash__card--grades b { text-align: right; }
.dash__card--todo { grid-column: span 2; background: #FFF4C7; }
.dash__card--todo ul { display: grid; gap: .35rem; margin-top: .4rem; font-size: .82rem; line-height: 1.3; }
.dash__card--todo li::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border: 2px solid var(--ink); border-radius: 4px; margin-right: .4rem; vertical-align: -1px; }
.dash__card--todo li.done { text-decoration: line-through; opacity: .6; }
.dash__card--todo li.done::before { background: var(--ink); }
.dash__card--badges { grid-column: span 6; display: flex; align-items: center; justify-content: space-between; background: #fff; border: 2px solid var(--line); }
.dash__badges { display: flex; gap: .5rem; }
.dash__badges span { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: var(--on); border: 2px solid var(--ink); }
@media (max-width: 520px) { .dash__grid > * { grid-column: span 6 !important; } .dash { box-shadow: -6px 8px 0 var(--sunshine), -6px 8px 0 3px var(--ink); } }

/* Parents band */
.parents { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.parents .btn { margin-top: 1rem; }
.parents__list { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.parents__list li { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; border-radius: var(--r-lg); background: var(--ink-2); font-weight: 700; line-height: 1.3; }
.parents__list svg { color: var(--sunshine); }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.quote { margin: 0; padding: 1.75rem; border-radius: var(--r-lg); background: var(--soft); border: 2px solid var(--ink); display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem; }
.quote blockquote { margin: 0; font-size: 1.1rem; }
.quote blockquote p:last-child { margin: 0; }
.quote figcaption strong { display: block; font-family: var(--f-display); }
.quote figcaption span { color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq { border-top: 2px solid var(--ink); }
.faq__item { border-bottom: 2px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 0; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__toggle { position: relative; width: 1.9rem; height: 1.9rem; flex-shrink: 0; border-radius: 50%; background: var(--tint); transition: background-color .15s, transform .2s; }
.faq__toggle::before, .faq__toggle::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: .8rem; height: 2px; background: var(--ink); transform: translate(-50%, -50%); }
.faq__toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s; }
.faq__item[open] .faq__toggle { background: var(--sunshine); }
.faq__item[open] .faq__toggle::after { transform: translate(-50%, -50%) rotate(0); }
.faq__a p { color: var(--muted); margin: 0 0 1.25rem; max-width: 62ch; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band {
	background-color: var(--grape);
	background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
	background-size: 32px 32px;
	color: #fff; padding: clamp(3rem, 7vw, 5rem) 0;
}
.cta-band__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem 3rem; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: rgba(255,255,255,.88); margin: 0; max-width: 50ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta-band__blocks { display: grid; gap: .4rem; }
.cta-band__blocks span { display: block; height: .85rem; border-radius: 99px; background: var(--tone); border: 2px solid var(--ink); }
.cta-band__blocks span:nth-child(1) { width: 4.5rem; }
.cta-band__blocks span:nth-child(2) { width: 3.2rem; }
.cta-band__blocks span:nth-child(3) { width: 4.5rem; }
.cta-band__blocks span:nth-child(4) { width: 2.4rem; }
@media (max-width: 900px) { .cta-band__inner { grid-template-columns: 1fr; } }

/* Inner page hero -------------------------------------------------------- */
.page-hero {
	background-color: var(--soft);
	background-image: linear-gradient(rgba(26,20,70,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(26,20,70,.05) 1px, transparent 1px);
	background-size: 28px 28px;
	padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 4.5rem);
	border-bottom: 3px solid var(--ink);
}
.page-hero__row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { color: var(--ink); opacity: .82; }
.page-hero__badge {
	flex-shrink: 0; display: grid; place-items: center;
	min-width: clamp(8rem, 18vw, 13rem); aspect-ratio: 1; padding: 1rem;
	font-family: var(--f-display); font-weight: 800; font-size: clamp(4rem, 10vw, 7.5rem); line-height: 1; letter-spacing: -0.05em;
	background: var(--tone); color: var(--on);
	border: 3px solid var(--ink); border-radius: var(--r-xl);
	box-shadow: 8px 10px 0 var(--ink); transform: rotate(-3deg);
}
.post-meta { color: var(--muted); }
@media (max-width: 700px) { .page-hero__row { flex-direction: column-reverse; align-items: flex-start; } .page-hero__badge { min-width: 6rem; font-size: 3.5rem; box-shadow: 5px 6px 0 var(--ink); } }

.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .92rem; margin-bottom: 1.5rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; opacity: .45; }
.crumbs a { color: var(--ink); text-decoration: none; font-weight: 700; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--muted); }

/* Grade page */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split--form { grid-template-columns: 1.2fr .8fr; }
@media (max-width: 900px) { .split, .split--form { grid-template-columns: 1fr; } }
.week { background: var(--soft); border: 2px solid var(--ink); border-radius: var(--r-xl); padding: 1.75rem; box-shadow: 0 6px 0 var(--ink); }
.week h3 { font-size: 1.4rem; }
.week dl { margin: 1rem 0 0; display: grid; gap: .1rem; }
.week dl div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 2px dashed rgba(26,20,70,.15); }
.week dt { font-weight: 700; }
.week dd { margin: 0; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.course { background: #fff; border-radius: var(--r-lg); padding: 1.5rem; border: 2px solid var(--ink); border-top: 12px solid var(--tone); }
.course p { color: var(--muted); margin: 0; font-size: .98rem; }
@media (max-width: 900px) { .course-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .course-grid { grid-template-columns: 1fr; } }

/* Features (level, parents pages) */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.feature { padding: 1.5rem; background: #fff; border-radius: var(--r-lg); border: 2px solid var(--line); }
.feature__icon { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 14px; background: var(--tone); color: var(--on); margin-bottom: 1rem; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 1000px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Course table */
.table-scroll { overflow-x: auto; }
.course-table { width: 100%; border-collapse: separate; border-spacing: 0 .6rem; }
.course-table th, .course-table td { text-align: left; padding: 1rem 1.25rem; background: #fff; }
.course-table thead th { background: none; font-family: var(--f-display); padding-bottom: 0; }
.course-table tbody th { border-radius: var(--r-md) 0 0 var(--r-md); border-left: 8px solid var(--tone); white-space: nowrap; }
.course-table tbody td { border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--muted); }
.course-table a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-weight: 700; }
.chip { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .6rem; border-radius: 999px; background: var(--tone); color: var(--on); font-weight: 700; text-decoration: none; }
a.chip:hover { color: var(--on); filter: brightness(.95); }
.mini-grades { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: stretch; margin-bottom: 2rem; }
.plan { position: relative; display: flex; flex-direction: column; padding: 2rem 1.75rem; border-radius: var(--r-xl); background: #fff; border: 2px solid var(--ink); }
.plan h2 { font-size: 1.5rem; }
.plan .plan__price { color: var(--ink); display: flex; align-items: baseline; gap: .5rem; margin-bottom: .75rem; }
.plan__price strong { font-family: var(--f-display); font-size: 3rem; line-height: 1; letter-spacing: -0.03em; }
.plan__price span { color: var(--muted); }
.plan > p { color: var(--muted); }
.plan .ticks { margin: .5rem 0 2rem; flex: 1; }
.plan .ticks svg { color: var(--tone); }
.plan .btn { align-self: flex-start; }
.plan--pick { background: var(--soft); box-shadow: 0 8px 0 var(--ink); transform: translateY(-8px); }
.plan__flag { position: absolute; top: -1rem; left: 1.5rem; background: var(--sunshine); border: 2px solid var(--ink); border-radius: 999px; padding: .25rem .8rem; font-weight: 700; font-size: .88rem; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan--pick { transform: none; } }

/* About values */
.values ul { display: grid; gap: 1rem; }
.values li { padding: 1.1rem 1.25rem; border-radius: var(--r-md); background: var(--soft); border-left: 6px solid var(--tone); }

/* Forms */
.panel { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-xl); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: 0 8px 0 var(--ink); }
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; font-weight: 700; min-width: 0; }
.field input, .field select, .field textarea, .search-form input {
	width: 100%; font: inherit; font-weight: 400; color: var(--ink);
	padding: .85rem 1rem; border-radius: 12px; border: 2px solid #C9C6DE; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-form input:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 4px #ECE8FF; }
.form .btn { justify-self: start; margin-top: .25rem; }
.form__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.notice { padding: 1rem 1.25rem; border-radius: var(--r-md); margin-bottom: 1.25rem; border: 2px solid var(--ink); }
.notice--ok { background: #DAF7EE; }
.notice--err { background: #FFE5F0; }
.contact-side .ticks { margin-bottom: 1.5rem; }
.mini-steps { counter-reset: ms; display: grid; gap: 1rem; }
.mini-steps li { counter-increment: ms; display: grid; grid-template-columns: 2.2rem 1fr; gap: .75rem; }
.mini-steps li::before { content: counter(ms); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sunshine); border: 2px solid var(--ink); font-family: var(--f-display); font-weight: 800; }
.search-form { display: flex; gap: .6rem; max-width: 520px; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem var(--gap); }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 2px solid var(--ink); }
.post-card__media { display: block; aspect-ratio: 3/2; background: var(--soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__ph { display: grid; place-items: center; height: 100%; color: var(--tone); }
.post-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.post-card__meta { font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.post-card h2 { font-size: 1.3rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--grape); }
.post-card p { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .55rem .9rem; border-radius: 10px; border: 2px solid var(--ink); text-decoration: none; color: var(--ink); font-weight: 700; }
.pagination .current { background: var(--ink); color: #fff; }
.empty { text-align: center; max-width: 560px; margin: 0 auto; }
.empty .search-form { margin: 1.5rem auto 0; }

/* Prose (editor content) */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.5em 0; padding: 1rem 1.25rem; border-left: 6px solid var(--sunshine); background: var(--tint); border-radius: 0 var(--r-md) var(--r-md) 0; }
.prose img { border-radius: var(--r-lg); }
.prose .alignwide { max-width: 1000px; }
.post-hero-img { margin-top: 2rem; }
.post-hero-img img { border-radius: var(--r-xl); border: 2px solid var(--ink); }
.post-navigation { margin: 2rem 0; display: grid; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation a { display: block; padding: 1rem 1.25rem; border: 2px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); font-weight: 700; }
.post-navigation small { display: block; color: var(--muted); font-weight: 400; }
.post-navigation .nav-next { text-align: right; }
.comments { margin: 3rem 0; }
.comments input, .comments textarea { width: 100%; font: inherit; padding: .75rem; border: 2px solid #C9C6DE; border-radius: 12px; }
.comments .submit { width: auto; background: var(--grape); color: #fff; border: 2px solid var(--ink); font-weight: 700; padding: .75rem 1.25rem; border-radius: 12px; cursor: pointer; }

/* 404 */
.notfound { text-align: center; }
.notfound .lead { margin-inline: auto; }
.notfound__code { font-family: var(--f-display); font-weight: 800; font-size: clamp(6rem, 18vw, 11rem); line-height: 1; letter-spacing: -0.05em; color: var(--grape); margin: 0 0 .5rem; -webkit-text-stroke: 3px var(--ink); }
.notfound .grade-tabs { margin: 3rem 0 2rem; text-align: left; }
.notfound__search .search-form { margin: 0 auto; }

/* Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sunshine); }
.site-footer .brand__teacher { color: #fff; }
.site-footer .brand__exa { color: var(--sunshine); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2.5rem; }
.site-footer__brand p { margin: 1rem 0 1.25rem; max-width: 36ch; }
.site-footer__title { font-size: 1.05rem; color: #fff; margin-bottom: 1rem; }
.site-footer ul { display: grid; gap: .55rem; }
.site-footer__contact li { display: flex; gap: .6rem; align-items: center; }
.site-footer__contact svg { color: var(--sunshine); }
.site-footer__base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .92rem; }
.site-footer__base p { margin: 0; }
.social { display: flex !important; gap: 1.25rem !important; }
@media (max-width: 1000px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .9rem; color: var(--muted); }
.sticky, .bypostauthor, .gallery-caption { }

/* Phones -------------------------------------------------------------- */
@media (max-width: 600px) {
	body { font-size: 1rem; }
	.wrap { width: min(100% - 2rem, var(--wrap)); }
	.site-header__inner { min-height: 64px; gap: .75rem; }
	.site-nav { inset: 64px 0 0 0; }
	.admin-bar .site-nav { top: 110px; }
	.brand__word { font-size: 1.2rem; }
	.exa-mark { width: 36px; height: 36px; }
	.actions { flex-direction: column; align-items: stretch; }
	.actions .btn, .cta-band__actions .btn { width: 100%; }
	.cta-band__actions { flex-direction: column; }
	.hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
	.hero__stats div:last-child { grid-column: 1 / -1; }
	.board { padding: 1rem; }
	.grade-tabs { grid-template-columns: 1fr 1fr; }
	.grade-tab__num { font-size: 2.75rem; }
	.parents__list { grid-template-columns: 1fr; }
	.parents__list li { flex-direction: row; align-items: center; }
	.week dl div { grid-template-columns: 1fr; gap: .15rem; }
	.page-hero__badge { min-width: 5rem; font-size: 2.75rem; border-radius: var(--r-lg); }
	.course-table, .course-table tbody, .course-table tr, .course-table th, .course-table td { display: block; }
	.course-table thead { display: none; }
	.course-table tr { margin-bottom: .75rem; border-left: 8px solid var(--tone); border-radius: var(--r-md); background: #fff; overflow: hidden; }
	.course-table tbody th, .course-table tbody td { border: 0; border-radius: 0; padding: .75rem 1rem; }
	.course-table tbody td { padding-top: 0; }
	.search-form { flex-direction: column; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
	.faq__item summary { font-size: 1.05rem; }
	.panel { box-shadow: 0 5px 0 var(--ink); }
}
@media (max-width: 359px) { .header-cta { display: none; } .nav-toggle { margin-left: auto; } }

/* Comfortable tap targets on touch screens */
@media (pointer: coarse) {
	.level-links a, .crumbs a, .site-footer li a, .contact-side a, .course-table a, .social a { display: inline-flex; align-items: center; min-height: 44px; }
	.chip { min-height: 44px; min-width: 44px; }
	.mini-grades { gap: .6rem; }
	.site-footer ul { gap: 0; }
	.site-nav .menu a { min-height: 48px; display: flex; align-items: center; }
}


/* ==========================================================================
   Study tools
   ========================================================================== */
.btn--sm { padding: .55rem .85rem; font-size: .92rem; box-shadow: 0 3px 0 var(--ink); }
.linkish { background: none; border: 0; padding: .35rem .2rem; font: inherit; font-weight: 700; color: var(--grape); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.linkish--danger { color: #C2185B; }
.chip-btn {
	display: inline-flex; align-items: center; min-height: 40px; padding: .45rem .9rem;
	border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
	font: inherit; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer;
}
.chip-btn:hover { background: var(--tint); color: var(--ink); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tool-nojs { margin-bottom: 1rem; }

.section--tool { padding-top: clamp(2rem, 5vw, 3.5rem); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.tool-side { position: sticky; top: 100px; }
.tool-side__more { margin-top: 1.5rem; font-weight: 700; }
@media (max-width: 960px) { .tool-layout { grid-template-columns: 1fr; } .tool-side { position: static; } }

/* Tiles (tools + formula sheets) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.35rem; border-radius: var(--r-lg); background: #fff; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; box-shadow: 0 5px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.tile a:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); color: var(--ink); }
.tile__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--tone); color: var(--on); border: 2px solid var(--ink); margin-bottom: .35rem; }
.tile__title { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; line-height: 1.15; }
.tile__desc { color: var(--muted); font-size: .95rem; line-height: 1.45; }
@media (max-width: 1000px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } .tile a { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: .9rem; } .tile__icon { margin: 0; } .tile__title { flex: 1; } .tile__desc { flex-basis: 100%; } }
.section--tools { background: #FFFBEA; }

/* Scientific calculator */
.calc { max-width: 560px; background: var(--ink); border-radius: var(--r-xl); padding: clamp(.9rem, 3vw, 1.35rem); box-shadow: 10px 12px 0 var(--grape); }
.calc__screen { background: #fff; border-radius: var(--r-lg); padding: .9rem 1rem; margin-bottom: 1rem; }
.calc__input { width: 100%; min-height: 44px; border: 0; background: transparent; font: 700 1.35rem/1.3 var(--f-body); color: var(--ink); padding: .2rem 0; caret-color: var(--grape); }
.calc__input:focus { outline: none; }
.calc__screen:focus-within { box-shadow: 0 0 0 3px var(--sunshine); }
.calc__result { display: block; min-height: 2.6rem; text-align: right; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.7rem, 6vw, 2.3rem); color: var(--grape); overflow-wrap: anywhere; }
.calc__result.is-error { font-family: var(--f-body); font-size: 1rem; font-weight: 700; color: #C2185B; }
.calc__keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.key { min-height: 52px; border-radius: 14px; border: 0; font: 700 1.05rem var(--f-body); cursor: pointer; color: var(--ink); background: #E7E5F2; box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .06s ease, filter .1s; touch-action: manipulation; }
.key:hover { filter: brightness(1.06); }
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.key--num { background: #fff; font-size: 1.25rem; }
.key--op { background: var(--grape); color: #fff; font-size: 1.3rem; }
.key--eq { background: var(--sunshine); font-size: 1.4rem; }
.key--fn { background: #3A3270; color: #fff; font-size: .95rem; }
.key--clear { background: var(--bubblegum); color: var(--ink); }
.key[aria-pressed="true"] { background: var(--mint); color: var(--ink); }
.key--sci { font-size: .98rem; }
.calc__hist { margin-top: 1rem; background: rgba(255,255,255,.08); border-radius: var(--r-md); padding: .75rem .9rem; color: #fff; }
.calc__hist-head { display: flex; justify-content: space-between; align-items: center; }
.calc__hist-head h2 { color: #fff; font-size: 1rem; margin: 0; }
.calc__hist .linkish { color: var(--sunshine); }
.calc__history { display: grid; gap: .25rem; margin-top: .4rem; }
.calc__hist-item { width: 100%; display: flex; justify-content: space-between; gap: 1rem; background: none; border: 0; color: rgba(255,255,255,.85); font: inherit; padding: .45rem .3rem; border-radius: 8px; cursor: pointer; text-align: left; }
.calc__hist-item:hover { background: rgba(255,255,255,.08); }
.calc__hist-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc__hist-item strong { color: var(--sunshine); white-space: nowrap; }
@media (max-width: 380px) { .calc__keys { gap: .35rem; } .key { min-height: 46px; font-size: .92rem; } .key--num { font-size: 1.1rem; } }

/* Algebra calculator */
.tool.alg, .tool.conv, .tool.tr { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-xl); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: 0 8px 0 var(--ink); }
.alg__tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem; background: var(--tint); border-radius: 16px; margin-bottom: 1.25rem; }
.alg__tabs [role="tab"] { flex: 1 1 auto; min-height: 44px; padding: .55rem .9rem; border: 0; border-radius: 12px; background: transparent; font: 700 .98rem var(--f-body); color: var(--ink); cursor: pointer; }
.alg__tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.alg__form { display: grid; gap: .9rem; }
.alg__form .field input { font-size: 1.2rem; font-weight: 700; }
.alg__pad { display: grid; grid-template-columns: repeat(10, 1fr); gap: .35rem; }
.alg__pad .key { min-height: 44px; padding: 0; background: var(--tint); box-shadow: 0 2px 0 #C9C6DE; }
.alg__form .btn { justify-self: start; }
.alg__examples { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1.1rem 0 0; color: var(--muted); font-weight: 700; }
.alg__examples .chip-btn { font-weight: 400; font-size: .9rem; min-height: 36px; border-color: #C9C6DE; }
.alg__result { margin-top: 1.5rem; padding: 1.25rem 1.35rem; border-radius: var(--r-lg); background: #FFE5F0; border: 2px solid var(--ink); }
.alg__result:focus { outline: none; }
.alg__result.is-error { background: #FFF4C7; }
.alg__title { font-size: 1rem; margin-bottom: .5rem; }
.alg__sols { display: grid; gap: .35rem; }
.alg__sols li { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.25rem, 4vw, 1.6rem); overflow-wrap: anywhere; }
.alg__result.is-error .alg__sols li { font-family: var(--f-body); font-weight: 700; font-size: 1.05rem; }
.alg__steps { margin-top: 1rem; border-top: 2px dashed rgba(26,20,70,.2); padding-top: .75rem; }
.alg__steps summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.alg__steps ol { list-style: decimal; padding-left: 1.4rem; display: grid; gap: .7rem; margin-top: .4rem; }
.alg__step-label { display: block; }
.alg__step-math { display: inline-block; margin-top: .25rem; padding: .25rem .6rem; background: #fff; border-radius: 8px; font: 700 1.02rem/1.5 var(--f-body); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .alg__pad { grid-template-columns: repeat(5, 1fr); } .alg__tabs [role="tab"] { flex: 1 1 100%; } }

/* Unit converter */
.conv__cats { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem; }
.conv__row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) auto minmax(0, 1fr); gap: .75rem; align-items: end; }
.conv__swap { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 2px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sunshine); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.conv__swap:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.conv__result { display: block; margin: 1.5rem 0 1rem; padding: 1.1rem 1.25rem; border-radius: var(--r-lg); background: #FFF4C7; border: 2px solid var(--ink); font-family: var(--f-display); font-weight: 800; font-size: clamp(1.3rem, 4vw, 1.8rem); overflow-wrap: anywhere; }
.conv__result.is-error { font-family: var(--f-body); font-size: 1rem; background: #FFE5F0; }
.conv__all summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.conv__table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.conv__table th, .conv__table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
.conv__table th { font-weight: 400; color: var(--muted); }
.conv__table td { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 640px) { .conv__row { grid-template-columns: 1fr auto; } .conv__val { grid-column: 1 / -1; } .conv__row > label:nth-of-type(2), .conv__row > label:nth-of-type(3) { grid-column: 1; } .conv__row .conv__swap { grid-column: 2; grid-row: 2 / 4; align-self: center; } }

/* Translator */
.tr__langs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .75rem; align-items: end; margin-bottom: 1rem; }
.tr__boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tr__box { display: flex; flex-direction: column; border: 2px solid #C9C6DE; border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.tr__box:focus-within { border-color: var(--grape); }
.tr__src { flex: 1; width: 100%; min-height: 180px; border: 0; padding: 1rem; font: 1.1rem/1.5 var(--f-body); color: var(--ink); resize: vertical; }
.tr__src:focus { outline: none; }
.tr__box--out { background: #DAF7EE; border-color: var(--ink); }
.tr__dst { flex: 1; min-height: 180px; padding: 1rem; font-size: 1.1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.tr__bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem .75rem; border-top: 1px solid rgba(26,20,70,.12); }
.tr__box--out .tr__bar { justify-content: flex-end; }
.tr__count { color: var(--muted); font-size: .9rem; }
.tr__status { min-height: 1.5em; margin: .75rem 0 0; font-weight: 700; }
.tr__status.is-error { color: #C2185B; }
.tr__credit { color: var(--muted); font-size: .88rem; margin: .25rem 0 0; }
@media (max-width: 480px) { .tr__langs { grid-template-columns: minmax(0, 1fr) auto; } .tr__langs .tr__swap { grid-column: 2; grid-row: 1 / 3; align-self: center; } .tr__langs > label:last-of-type { grid-column: 1; } }
@media (max-width: 700px) { .tr__boxes { grid-template-columns: 1fr; } .tr__src, .tr__dst { min-height: 130px; } }

/* Formula library */
.save-hint { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: var(--r-md); background: var(--tint); font-weight: 700; margin-bottom: 1.25rem; }
.save-hint svg { color: var(--grape); flex-shrink: 0; }
.fx__tools { display: flex; gap: .75rem; margin-bottom: 1rem; }
.fx__search-wrap { flex: 1; }
.fx__search { width: 100%; font: inherit; font-size: 1.05rem; padding: .85rem 1rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: #fff; }
.fx__search:focus { outline: none; box-shadow: 0 0 0 4px #ECE8FF; }
.fx__toc { display: flex; gap: .45rem; overflow-x: auto; padding: .25rem .1rem .75rem; margin-bottom: 1rem; scrollbar-width: thin; }
.fx__toc .chip-btn { flex-shrink: 0; white-space: nowrap; }
.fx-group { padding-top: 1.5rem; scroll-margin-top: 90px; }
.fx-group h2 { font-size: 1.6rem; padding-bottom: .5rem; border-bottom: 4px solid var(--tone); display: inline-block; }
.fx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--gap); margin-top: 1rem; }
.fx { position: relative; min-width: 0; display: flex; flex-direction: column; gap: .6rem; padding: 1.2rem 1.25rem 1rem; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-lg); }
.fx__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.fx__head h3 { font-size: 1.08rem; margin: 0; }
.fx__grade { flex-shrink: 0; font-size: .78rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--soft); }
.fx__math {
	font-family: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", serif;
	font-size: 1.35rem; line-height: 1.7; padding: .75rem .9rem; border-radius: var(--r-md); background: var(--soft);
	overflow-x: auto; white-space: nowrap;
}
.fx__math--sm { font-size: 1.05rem; padding: .4rem .6rem; margin: .35rem 0; }
.fx__vars { margin: 0; color: var(--muted); font-size: .95rem; }
.fx__save { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .7rem; border: 2px solid #C9C6DE; border-radius: 999px; background: #fff; font: 700 .85rem var(--f-body); color: var(--ink); cursor: pointer; }
.fx__save[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fx__save[aria-pressed="true"] svg { fill: currentColor; }
.fx__empty { padding: 2rem; text-align: center; color: var(--muted); font-weight: 700; }
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .15em; font-size: .88em; line-height: 1.15; }
.fr__n { padding: 0 .2em .1em; border-bottom: 1.5px solid currentColor; }
.fr__d { padding: .1em .2em 0; }
.rt { display: inline-flex; align-items: stretch; vertical-align: middle; white-space: nowrap; margin: 0 .05em; }
/* The radical is drawn as a stretchable SVG so it always meets the bar, however tall the content. */
.rt__sym {
	flex-shrink: 0; width: .62em; font-size: 1em; color: transparent; overflow: hidden;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 20' preserveAspectRatio='none'%3E%3Cpath d='M0.5 12.5 L2.6 11 L5.2 19.4 L9.8 0.75' fill='none' stroke='%231A1446' stroke-width='1.5' vector-effect='non-scaling-stroke' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.rt__in { display: inline-block; border-top: 1.5px solid currentColor; padding: .14em .14em 0 .06em; line-height: 1.35; }
.rt__n { font-size: .55em; align-self: flex-start; margin: .1em -.5em 0 0; position: relative; z-index: 1; }
@media (max-width: 520px) { .fx-list { grid-template-columns: 1fr; } .fx__math { font-size: 1.2rem; } .fx__tools { flex-direction: column; } }

/* ==========================================================================
   Accounts
   ========================================================================== */
fieldset { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; }
legend { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; padding: 0; margin-bottom: .75rem; }
.form fieldset + fieldset { padding-top: 1.25rem; border-top: 2px dashed var(--line); }
.field-help { color: var(--muted); font-size: .92rem; margin: -.25rem 0 .75rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; cursor: pointer; line-height: 1.45; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .1rem; flex-shrink: 0; accent-color: var(--grape); }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check--pill { align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .85rem .4rem .6rem; border: 2px solid #C9C6DE; border-radius: 999px; background: #fff; font-weight: 700; font-size: .95rem; }
.check--pill:has(input:checked) { border-color: var(--ink); background: #ECE8FF; }
.check--pill input { margin: 0; }
.pw { display: flex; position: relative; }
.pw input { padding-right: 4.5rem; }
.pw__toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 .7rem; border: 0; border-radius: 8px; background: var(--tint); font: 700 .85rem var(--f-body); color: var(--ink); cursor: pointer; }
.auth__links { margin: 1rem 0 0; }
.auth__alt { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 2px dashed var(--line); }
.auth__alt p { margin: .35rem 0; }
.dash-guest h2 { margin-bottom: 1.25rem; }
.dash-guest { max-width: 560px; }

/* Dashboard */
.section--dash { padding-top: clamp(1.5rem, 4vw, 2.5rem); background: var(--tint); }
.dashboard > .notice { margin-bottom: 1.25rem; }
.dhead { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--r-xl); background: var(--tone); color: var(--on); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 28px 28px; }
.dhead__avatar { width: 3.75rem; height: 3.75rem; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); border: 2px solid var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; flex-shrink: 0; }
.dhead__text { flex: 1; min-width: 12rem; }
.dhead h1 { color: inherit; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0; }
.dhead p { margin: .2rem 0 0; opacity: .9; font-weight: 700; }
.dhead__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.dhead.tone-sunshine .btn--outline-light, .dhead.tone-mint .btn--outline-light, .dhead.tone-sky .btn--outline-light, .dhead.tone-bubblegum .btn--outline-light, .dhead.tone-tangerine .btn--outline-light { color: var(--ink); border-color: var(--ink); }
.dtabs { display: flex; gap: .4rem; overflow-x: auto; padding: 1.1rem .1rem .6rem; scrollbar-width: thin; }
.dtabs a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; background: #fff; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.dtabs a:hover { background: var(--ink); color: #fff; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: .75rem; }
.dcard { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-xl); padding: clamp(1.1rem, 3vw, 1.6rem); scroll-margin-top: 90px; min-width: 0; }
.dcard--wide { grid-column: 1 / -1; }
.dcard > h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.dcard .tiles { grid-template-columns: repeat(4, 1fr); }
.dnote { color: var(--muted); font-size: .9rem; margin: .75rem 0 0; }
.empty-state { color: var(--muted); padding: 1rem 1.1rem; background: var(--tint); border-radius: var(--r-md); margin: 0; }
@media (max-width: 900px) { .dgrid { grid-template-columns: 1fr; } .dcard .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .dcard .tiles { grid-template-columns: 1fr; } .dhead__actions { width: 100%; flex-direction: column; } .dhead__actions .btn { width: 100%; } }

.cls-list { display: grid; gap: .6rem; }
.cls { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 1rem; align-items: center; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--tint); border-left: 6px solid #C9C6DE; }
.cls.is-today { background: #ECE8FF; border-left-color: var(--grape); }
.cls__time strong { display: block; font-family: var(--f-display); font-size: 1.1rem; }
.cls__time span { color: var(--muted); font-size: .85rem; }
.cls__body h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.cls__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; color: var(--muted); font-size: .9rem; }
.cls__act { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill--today { background: var(--mint); color: var(--ink); }
.inline-form { display: inline; margin: 0; }
@media (max-width: 600px) { .cls { grid-template-columns: 1fr; gap: .4rem; } .cls__time { display: flex; gap: .6rem; align-items: baseline; } .cls__act { justify-content: flex-start; } }

.notes { display: grid; gap: .9rem; }
.note { padding: 1rem 1.1rem; border-radius: var(--r-md); background: #FFFBEA; border: 2px solid #FFE6A0; }
.note__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.note__head h3 { font-size: 1.05rem; margin: 0; }
.note__meta { color: var(--muted); font-size: .85rem; }
.note__body p { margin: .5rem 0 0; }
.note__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }

.saved { display: grid; gap: .6rem; }
.saved li { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .8rem 1rem; background: var(--tint); border-radius: var(--r-md); min-width: 0; }
.saved li > div { min-width: 0; }
.saved a { font-size: .88rem; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-top: .5rem; }
.stat { padding: 1rem 1.1rem; border-radius: var(--r-lg); background: var(--soft); border: 2px solid var(--ink); }
.stat strong { display: block; font-family: var(--f-display); font-size: 2rem; line-height: 1; }
.stat span { font-size: .9rem; font-weight: 700; }

.addbox { margin-top: 1.25rem; border: 2px dashed #C9C6DE; border-radius: var(--r-lg); padding: .25rem 1.1rem; }
.addbox[open] { border-style: solid; border-color: var(--ink); padding-bottom: 1.1rem; }
.addbox summary { cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; min-height: 48px; display: flex; align-items: center; }
.addbox .form { margin-top: .5rem; }
.addbox + .notes { margin-top: 1.25rem; }

.track { display: grid; gap: .6rem; counter-reset: tr; margin-top: 1rem; }
.track li { counter-increment: tr; display: flex; align-items: center; gap: .75rem; font-weight: 700; color: var(--muted); }
.track li::before { content: counter(tr); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid #C9C6DE; background: #fff; font-family: var(--f-display); }
.track li.is-done, .track li.is-now { color: var(--ink); }
.track li.is-done::before { content: "✓"; background: var(--mint); border-color: var(--ink); }
.track li.is-now::before { background: var(--sunshine); border-color: var(--ink); }
.facts { margin: 0; display: grid; gap: .5rem; }
.facts div { display: grid; grid-template-columns: 6rem 1fr; gap: .75rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.mini-steps--lg li { font-size: 1.08rem; }


/* ==========================================================================
   Planner
   ========================================================================== */
.planner__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.planner__head h2 { margin: 0; font-size: 1.4rem; }
.planner__nav { display: flex; align-items: center; gap: .4rem; }
.planner__arrow { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.planner__arrow:hover { background: var(--tint); }
.planner__range { min-width: 11.5rem; text-align: center; font-family: var(--f-display); font-weight: 700; }
.planner__today:disabled { opacity: .45; cursor: default; }
.planner__progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.planner__bar { flex: 1; max-width: 320px; height: .7rem; border-radius: 999px; background: var(--tint); border: 2px solid var(--ink); overflow: hidden; }
.planner__bar span { display: block; height: 100%; background: var(--mint); transition: width .3s ease; }
.planner__count { margin: 0; font-weight: 700; font-size: .95rem; }

.planner__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.pday { display: flex; flex-direction: column; min-height: 11rem; padding: .6rem; border-radius: var(--r-md); background: var(--tint); border: 2px solid transparent; min-width: 0; }
.pday.is-today { background: #fff; border-color: var(--grape); box-shadow: 0 4px 0 var(--grape); }
.pday.is-past { opacity: .72; }
.pday__head { display: flex; align-items: baseline; gap: .35rem; margin-bottom: .5rem; }
.pday__dow { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: none; }
.pday__num { font-family: var(--f-display); font-size: 1.35rem; line-height: 1; }
.pday__badge { font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 999px; background: var(--grape); color: #fff; }
.pday__add { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #C9C6DE; background: #fff; color: var(--ink); font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.pday__add:hover { border-color: var(--ink); background: var(--sunshine); }
.pday__items { display: grid; gap: .35rem; align-content: start; }
.pday__free { color: var(--muted); font-size: .85rem; padding: .2rem .1rem; }

.pi { position: relative; border-radius: 10px; padding: .45rem .55rem; font-size: .88rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.pi--class { background: var(--grape); color: #fff; display: grid; gap: .05rem; }
.pi--class .pi__time { font-size: .75rem; font-weight: 700; opacity: .85; }
.pi--class .pi__title { color: #fff; font-weight: 700; text-decoration: none; }
.pi--class a.pi__title:hover { text-decoration: underline; color: #fff; }
.pi--class a.pi__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole block is tappable */
.pi--class a.pi__title:focus-visible { outline: none; }
.pi--class:focus-within { outline: 3px solid var(--sunshine); outline-offset: 2px; }
.pi--task, .pi--assign { background: #fff; border: 1.5px solid #DAD7EA; border-left: 5px solid var(--sky); }
.pi--assign { background: #FFF8DB; border-color: #F2DE8E; }
.pi.type-homework { border-left-color: var(--sky); }
.pi.type-test { border-left-color: var(--bubblegum); }
.pi.type-project { border-left-color: var(--tangerine); }
.pi.type-study { border-left-color: var(--mint); }
.pi.type-other { border-left-color: var(--sunshine); }
.pi__row { display: flex; align-items: flex-start; gap: .4rem; }
.pi__check { display: flex; align-items: flex-start; gap: .45rem; cursor: pointer; font-weight: 700; min-width: 0; }
.pi__check input { width: 1.1rem; height: 1.1rem; margin: .05rem 0 0; flex-shrink: 0; accent-color: var(--mint); cursor: pointer; }
.pi__title { font-weight: 700; }
.pi.is-done { opacity: .6; }
.pi.is-done .pi__title { text-decoration: line-through; }
.pi__meta { display: flex; flex-wrap: wrap; gap: .1rem .6rem; margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.pi__meta:empty { display: none; }
.pday .pi__meta { padding-left: 1.55rem; }
.pi__due { font-weight: 700; color: var(--ink); }
.pi__due.is-late { color: #C2185B; }
.pi__from { font-weight: 700; color: #8A6A00; }
.pi__notes { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; }

.planner__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: .9rem 0 0; font-size: .82rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: .4rem; }
.lg::before { content: ""; width: .9rem; height: .9rem; border-radius: 4px; }
.lg--class::before { background: var(--grape); }
.lg--assign::before { background: #FFF8DB; border: 1.5px solid #F2DE8E; border-left: 4px solid var(--sky); }
.lg--task::before { background: #fff; border: 1.5px solid #DAD7EA; border-left: 4px solid var(--sky); }

.planner__cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); margin-top: 1.5rem; padding-top: 1.5rem; border-top: 2px dashed var(--line); }
.planner__list-title { font-size: 1.05rem; margin: 0 0 .6rem; }
.planner__list-title--late { color: #C2185B; }
.ptasks { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.ptasks .pi { padding: .7rem .8rem; font-size: .98rem; }
.ptasks .pi__check input { width: 1.3rem; height: 1.3rem; }
.ptasks .pi__meta { padding-left: 1.75rem; font-size: .85rem; }
.ptasks .pi__notes { padding-left: 1.75rem; }
.ptasks .pi__del { position: absolute; top: .2rem; right: .25rem; font-size: .85rem; min-height: 44px; min-width: 44px; padding: 0 .5rem; }
.ptasks .pi--task .pi__row { padding-right: 3.75rem; }
.planner__side .addbox { margin-top: 0; }
.planner__status { margin: 0; min-height: 1.4em; font-weight: 700; }
.planner__msg { margin: -.25rem 0 .75rem; font-weight: 700; color: #0E7A5C; }
.planner__msg:empty { display: none; }
.planner__msg.is-error { color: #C2185B; }
.planner__list-title:focus { outline: none; }
.planner__status.is-error { color: #C2185B; }
.planner__export { margin-top: 1.25rem; }
.planner__export .btn { width: 100%; }
.planner__export .field-help { margin: .6rem 0 0; }
.planner__empty { margin-bottom: 1rem; }

/* Teacher: homework list */
.alist { display: grid; gap: .6rem; margin-top: 1.25rem; }
.alist__item { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1rem; align-items: center; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--tint); border-left: 6px solid var(--sky); }
.alist__item.type-test { border-left-color: var(--bubblegum); }
.alist__item.type-project { border-left-color: var(--tangerine); }
.alist__due strong { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.alist__due span { font-size: .82rem; color: var(--muted); }
.alist__body h3 { font-size: 1.02rem; margin: 0 0 .15rem; }
.form__row--tight { gap: .75rem; }

@media (max-width: 1100px) {
	.planner__week { grid-template-columns: 1fr; gap: .4rem; }
	.pday { min-height: 0; display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: .75rem; align-items: start; }
	.pday__head { flex-direction: column; align-items: flex-start; gap: .15rem; margin: 0; position: relative; }
	.pday__add { margin: .25rem 0 0; width: 36px; height: 36px; }
	.pday.is-empty { align-items: center; padding: .4rem .6rem; }
	.pday.is-empty .pday__head { flex-direction: row; align-items: center; gap: .4rem; }
	.pday.is-empty .pday__add { margin: 0 0 0 .2rem; }
	.pday__items { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
	.pday .pi__meta { padding-left: 1.55rem; }
}
@media (max-width: 900px) { .planner__cols { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
	.planner__nav { width: 100%; }
	.planner__range { flex: 1; min-width: 0; font-size: .95rem; }
	.planner__today { padding: .4rem .7rem; }
	.alist__item { grid-template-columns: 1fr; gap: .3rem; }
	.alist__due { display: flex; gap: .5rem; align-items: baseline; }
	.pday { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .5rem; }
}

/* Print: formula sheets print cleanly */
@media print {
	.site-header, .site-footer, .cta-band, .fx__tools, .fx__toc, .fx__save, .save-hint, .section--tint, .crumbs, .skip-link { display: none !important; }
	.page-hero { background: none; border: 0; padding: 0 0 1rem; }
	.page-hero__badge, .page-hero .actions { display: none; }
	.fx-list { grid-template-columns: 1fr 1fr; gap: .5rem; }
	.fx { break-inside: avoid; border-width: 1px; padding: .6rem .75rem; }
	.fx__math { background: none; padding: .2rem 0; font-size: 1.1rem; }
	body { font-size: 11pt; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.board { transform: none; }
}

/* About and Contact */
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--gap); }
.help-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem; background: #fff; border-radius: var(--r-lg); border: 2px solid var(--line); border-top: 6px solid var(--tone); min-width: 0; }
.help-card h3 { margin: .3rem 0 0; font-size: 1.15rem; }
.help-card p { margin: 0; color: var(--muted); flex: 1; }
.help-card a { font-weight: 700; margin-top: .4rem; }
.section--help { padding-bottom: 0; }
.contact-note { padding: 1.1rem 1.25rem; border-radius: var(--r-md); background: var(--tint, #F3F4FF); margin: 0 0 1.5rem; }
.contact-note h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.contact-note ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.contact-social { display: flex; flex-wrap: wrap; gap: .5rem; }
.about-grades { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.about-teach .btn { margin-top: .5rem; }
@media (max-width: 860px) { .about-grades { grid-template-columns: minmax(0, 1fr); } }
.split > .prose > h2:first-child { margin-top: 0; }
.contact-note ol { list-style: decimal; }

/* Enquiry pages: who-are-you switch */
.enq-switch { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: .35rem; background: var(--tint); border: 2px solid var(--ink); border-radius: 999px; }
.enq-switch a { flex: 1 1 auto; text-align: center; padding: .6rem 1rem; border-radius: 999px; font-weight: 700; color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.enq-switch a:hover { background: #fff; }
.enq-switch a[aria-current="page"] { background: var(--ink); color: #fff; }
.enq-switch a:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
@media (max-width: 600px) { .enq-switch { border-radius: var(--r-md); } .enq-switch a { flex-basis: 100%; } }
.form__note { margin: .25rem 0 0; font-size: .9rem; color: var(--muted, #5b5878); }
::selection { background: var(--sunshine); color: var(--ink); }
