/*
 * SII app: Learning Hub, Family Portal, Office.
 * Brand from the SII logo: deep ink, violet, gold. Type: Newsreader (headings), Public Sans (UI).
 * Mobile first. WCAG 2.2 AA: 4.5:1 text contrast, visible focus, 44px targets on touch.
 */

:root {
	--sa-ink: #231C3D;
	--sa-ink-2: #302448;
	--sa-violet: #6C4890;
	--sa-violet-2: #563A75;
	--sa-violet-soft: #F1ECF7;
	--sa-gold: #F0D848;
	--sa-gold-soft: #FBF4CF;
	--sa-gold-text: #7A5E00;
	--sa-paper: #F7F4EE;
	--sa-surface: #FFFFFF;
	--sa-surface-2: #FBFAF7;
	--sa-line: #E4DED2;
	--sa-line-2: #D3CBBC;
	--sa-text: #1F1B2C;
	--sa-muted: #5E586D;
	--sa-success: #1E6F47;
	--sa-success-soft: #E4F3EA;
	--sa-warning: #875400;
	--sa-warning-soft: #FDF1DA;
	--sa-danger: #AE2A1E;
	--sa-danger-soft: #FBE7E4;
	--sa-info: #28579E;
	--sa-info-soft: #E6EEF9;
	--sa-focus: #6C4890;
	--sa-radius: 12px;
	--sa-radius-sm: 8px;
	--sa-shadow: 0 1px 2px rgba(35, 28, 61, .06), 0 4px 14px rgba(35, 28, 61, .06);
	--sa-font: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sa-serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
	--sa-arabic: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
	--sa-top-h: 60px;
	--sa-nav-w: 236px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--sa-paper: #16121F;
		--sa-surface: #1F1A2B;
		--sa-surface-2: #241E32;
		--sa-line: #352D47;
		--sa-line-2: #43395A;
		--sa-text: #EFEBF6;
		--sa-muted: #B3ABC4;
		--sa-violet-soft: #2C2340;
		--sa-gold-soft: #3A3217;
		--sa-gold-text: #F0D848;
		--sa-success: #6FD19E;
		--sa-success-soft: #173326;
		--sa-warning: #F2B75B;
		--sa-warning-soft: #3A2A10;
		--sa-danger: #F28B80;
		--sa-danger-soft: #3D1C1A;
		--sa-info: #8DB5F2;
		--sa-info-soft: #172740;
		--sa-focus: #C9A8F0;
		--sa-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sa {
	margin: 0;
	background: var(--sa-paper);
	color: var(--sa-text);
	font: 16px/1.55 var(--sa-font);
	min-height: 100vh;
	text-rendering: optimizeLegibility;
}
.sa img { max-width: 100%; height: auto; }
.sa a { color: var(--sa-violet); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .sa a { color: #CBB1EE; } }
.sa a:hover { color: var(--sa-violet-2); }
/* Dark mode: the light hover violet keeps links readable on the dark surfaces (R4-137). */
@media (prefers-color-scheme: dark) { .sa a:hover { color: #E2D3F7; } }
.sa :focus-visible { outline: 3px solid var(--sa-focus); outline-offset: 2px; border-radius: 4px; }
:where(.sa) :is(h1, h2, h3, h4) { font-family: var(--sa-serif); color: inherit; line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
:where(.sa) h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.15rem); letter-spacing: -.01em; }
:where(.sa) h2 { font-size: 1.3rem; }
:where(.sa) h3 { font-size: 1.08rem; }
:where(.sa) p { margin: 0 0 1em; }
:where(.sa) ul, :where(.sa) ol { padding-left: 1.2em; }
.sa [lang="ar"], .sa .sa-ar { font-family: var(--sa-arabic); font-size: 1.35em; line-height: 2; direction: rtl; }
.sa-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sa-i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.sa-sr, .sa-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sa-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sa-ink); color: #fff !important; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.sa-skip:focus { top: 10px; }
.sa-muted { color: var(--sa-muted); }
.sa-center { text-align: center; }
.sa-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-link { font-weight: 600; }
.sa-nowrap { white-space: nowrap; }
.sa-num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- top bar */
.sa-top {
	position: sticky; top: 0; z-index: 40;
	height: var(--sa-top-h);
	display: flex; align-items: center; gap: 16px;
	padding: 0 16px;
	background: var(--sa-ink);
	color: #fff;
	border-bottom: 3px solid var(--sa-gold);
}
.sa-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; min-height: 44px; }
.sa-mark { width: 34px; height: 34px; flex: none; }
.sa-brand__name { font: 700 1.05rem/1 var(--sa-serif); letter-spacing: .02em; }
.sa-brand__area { font-size: .85rem; color: #D9D1EA; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .25); }
.sa-areas { display: none; }
.sa-areas ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.sa-areas a { display: block; padding: 8px 12px; border-radius: 999px; color: #E7E0F3 !important; text-decoration: none; font-size: .9rem; font-weight: 600; }
.sa-areas a:hover { background: rgba(255, 255, 255, .08); }
.sa-areas a[aria-current="page"] { background: rgba(240, 216, 72, .16); color: var(--sa-gold) !important; }
.sa-top__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.sa-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; color: #fff !important; }
.sa-bell:hover { background: rgba(255, 255, 255, .08); }
.sa-bell__n { position: absolute; top: 5px; right: 3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--sa-gold); color: var(--sa-ink); font: 800 .7rem/19px var(--sa-font); text-align: center; }
.sa-menu { position: relative; }
.sa-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; padding: 4px 6px; border-radius: 999px; color: #fff; }
.sa-menu summary::-webkit-details-marker { display: none; }
.sa-menu summary:hover { background: rgba(255, 255, 255, .08); }
.sa-menu__name { display: none; font-weight: 600; font-size: .92rem; }
.sa-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--sa-surface); color: var(--sa-text); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); padding: 8px; }
.sa-menu__who { margin: 4px 8px 8px; display: grid; gap: 2px; }
.sa-menu__who span { color: var(--sa-muted); font-size: .85rem; }
.sa-menu__panel ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sa-line); padding-top: 6px; }
.sa-menu__panel a { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 8px; color: var(--sa-text) !important; text-decoration: none; }
.sa-menu__panel a:hover { background: var(--sa-violet-soft); }

/* ---------------------------------------------------------------- frame */
.sa-frame { display: block; }
.sa-nav { display: none; }
.sa-main { padding: 20px 16px 110px; max-width: 1180px; margin: 0 auto; outline: none; }
.sa-nav ul { list-style: none; margin: 0; padding: 12px; }
.sa-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 10px; color: var(--sa-text) !important; text-decoration: none; font-weight: 600; font-size: .95rem; }
.sa-nav a:hover { background: var(--sa-violet-soft); }
.sa-nav a[aria-current="page"] { background: var(--sa-ink); color: #fff !important; }
.sa-nav a[aria-current="page"] .sa-i { color: var(--sa-gold); }
.sa-nav__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sa-gold); color: var(--sa-ink); font-size: .75rem; font-weight: 800; line-height: 22px; text-align: center; }

/* phone: nav becomes a sheet */
.sa-nav.is-open { display: block; position: fixed; z-index: 60; inset: auto 0 64px 0; max-height: 70vh; overflow: auto; background: var(--sa-surface); border-top: 1px solid var(--sa-line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); border-radius: 16px 16px 0 0; }

.sa-tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; background: var(--sa-surface); border-top: 1px solid var(--sa-line); padding-bottom: env(safe-area-inset-bottom); }
.sa-tabbar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.sa-tabbar a, .sa-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; width: 100%; color: var(--sa-muted) !important; text-decoration: none; font: 600 .72rem/1.1 var(--sa-font); background: none; border: 0; cursor: pointer; }
.sa-tabbar a[aria-current="page"] { color: var(--sa-violet) !important; }
.sa-tabbar a[aria-current="page"] .sa-i { color: var(--sa-violet); }
@media (prefers-color-scheme: dark) { .sa-tabbar a[aria-current="page"], .sa-tabbar a[aria-current="page"] .sa-i { color: var(--sa-gold) !important; } }

@media (min-width: 900px) {
	.sa-areas { display: block; }
	.sa-menu__name { display: inline; }
	.sa-frame { display: grid; grid-template-columns: var(--sa-nav-w) minmax(0, 1fr); min-height: calc(100vh - var(--sa-top-h)); }
	.sa-nav { display: block; position: sticky; top: var(--sa-top-h); align-self: start; height: calc(100vh - var(--sa-top-h)); overflow: auto; border-right: 1px solid var(--sa-line); background: var(--sa-surface-2); }
	.sa-nav.is-open { position: sticky; inset: auto; box-shadow: none; border-radius: 0; max-height: none; }
	.sa-main { padding: 28px 32px 60px; width: 100%; }
	.sa-tabbar { display: none; }
}

/* ---------------------------------------------------------------- page head */
.sa-crumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--sa-muted); }
.sa-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--sa-line-2); }
.sa-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.sa-head h1 { margin: 0; }
.sa-head__sub { margin: 6px 0 0; color: var(--sa-muted); max-width: 70ch; }
.sa-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-content > * + * { margin-top: 20px; }
.sa-flash { margin-bottom: 16px; display: grid; gap: 8px; }

/* ---------------------------------------------------------------- buttons */
.sa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1.5px solid transparent; font: 700 .95rem/1.1 var(--sa-font); text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.sa-btn--primary { background: var(--sa-ink); color: #fff !important; }
.sa-btn--primary:hover { background: var(--sa-violet-2); color: #fff !important; }
.sa-btn--gold { background: var(--sa-gold); color: var(--sa-ink) !important; }
.sa-btn--gold:hover { background: #E8CC2E; }
.sa-btn--secondary { background: var(--sa-surface); color: var(--sa-ink) !important; border-color: var(--sa-line-2); }
.sa-btn--secondary:hover { border-color: var(--sa-violet); color: var(--sa-violet) !important; }
.sa-btn--ghost { background: transparent; color: var(--sa-violet) !important; }
@media (prefers-color-scheme: dark) { .sa-btn--ghost { color: #CBB1EE !important; } }
.sa-btn--ghost:hover { background: var(--sa-violet-soft); }
.sa-btn--danger { background: var(--sa-surface); color: var(--sa-danger) !important; border-color: currentColor; }
.sa-btn--danger:hover { background: var(--sa-danger-soft); }
.sa-btn--sm { min-height: 36px; padding: 6px 12px; font-size: .86rem; }
.sa-btn--block { width: 100%; }
.sa-btn[disabled], .sa-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
	.sa-btn--primary { background: var(--sa-gold); color: var(--sa-ink) !important; }
	.sa-btn--primary:hover { background: #E8CC2E; color: var(--sa-ink) !important; }
	.sa-btn--secondary { color: var(--sa-text) !important; }
	/* The hover label stays readable on the dark surface (R4-150). */
	.sa-btn--secondary:hover { border-color: #CBB1EE; color: #CBB1EE !important; }
}

/* ---------------------------------------------------------------- print layout
   A print view (report card, transcript, instructional log, tuition statement) is always the
   light palette: a printed record is dark on white, and the page must stay readable when the
   device is in dark mode. The dark-mode colors above are light colors meant for a dark surface,
   so each one a print view can show is set back here (R4-136, R4-145). */
body.sa--print {
	--sa-paper: #FFFFFF; --sa-surface: #FFFFFF; --sa-surface-2: #FBFAF7; --sa-line: #E4DED2; --sa-line-2: #D3CBBC;
	--sa-text: #1F1B2C; --sa-muted: #5E586D; --sa-violet-soft: #F1ECF7; --sa-gold-soft: #FBF4CF; --sa-gold-text: #7A5E00;
	--sa-success: #1E6F47; --sa-success-soft: #E4F3EA; --sa-warning: #875400; --sa-warning-soft: #FDF1DA;
	--sa-danger: #AE2A1E; --sa-danger-soft: #FBE7E4; --sa-info: #28579E; --sa-info-soft: #E6EEF9; --sa-focus: #6C4890;
	color-scheme: light; background: #FFFFFF; color: #1F1B2C;
}
body.sa--print a, body.sa--print a:hover { color: #563A75; }
body.sa--print .sa-btn--ghost, body.sa--print .sa-btn--ghost:hover { color: #563A75 !important; }
body.sa--print .sa-btn--secondary { color: #231C3D !important; }
body.sa--print .sa-btn--secondary:hover { border-color: #563A75; color: #563A75 !important; }
body.sa--print .sa-btn--primary, body.sa--print .sa-btn--primary:hover { background: #231C3D; color: #FFFFFF !important; }
body.sa--print .sa-card__eyebrow, body.sa--print .sa-badge--violet { color: #563A75; }

/* ---------------------------------------------------------------- cards and grids */
.sa-card { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); padding: 18px; }
.sa-card__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.sa-card__titles { flex: 1; min-width: 0; }
.sa-card__title { margin: 0; font-size: 1.12rem; }
.sa-card__title a { color: inherit !important; text-decoration: none; }
.sa-card--link:hover { border-color: var(--sa-violet); }
.sa-card--link .sa-card__title a::after { content: ""; position: absolute; inset: 0; }
.sa-card--link { position: relative; }
.sa-card__eyebrow { margin: 0 0 3px; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sa-violet); }
@media (prefers-color-scheme: dark) { .sa-card__eyebrow { color: #CBB1EE; } }
.sa-card__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--sa-violet-soft); color: var(--sa-violet); flex: none; }
.sa-card__body > :last-child { margin-bottom: 0; }
.sa-card__foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sa-line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-card--gold { border-top: 4px solid var(--sa-gold); }
.sa-card--ink { background: var(--sa-ink); color: #fff; border-color: var(--sa-ink); }
.sa-card--ink a { color: var(--sa-gold) !important; }
.sa-card--soft { background: var(--sa-violet-soft); border-color: transparent; box-shadow: none; }
.sa-card--form { max-width: 640px; }
.sa-focus .sa-card--form { max-width: none; margin: 0 0 20px; }
.sa-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .sa-grid--2, .sa-grid--3, .sa-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .sa-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sa-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sa-split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.sa-split > * { min-width: 0; }
@media (min-width: 1040px) { .sa-split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.sa-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sa-section__head h2 { margin: 0; }
.sa-section__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- badges, status, notices */
.sa-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.6; background: var(--sa-surface-2); color: var(--sa-muted); border: 1px solid var(--sa-line); white-space: nowrap; }
.sa-badge--info { background: var(--sa-info-soft); color: var(--sa-info); border-color: transparent; }
.sa-badge--success { background: var(--sa-success-soft); color: var(--sa-success); border-color: transparent; }
.sa-badge--warning { background: var(--sa-warning-soft); color: var(--sa-warning); border-color: transparent; }
.sa-badge--danger { background: var(--sa-danger-soft); color: var(--sa-danger); border-color: transparent; }
.sa-badge--gold { background: var(--sa-gold-soft); color: var(--sa-gold-text); border-color: transparent; }
.sa-badge--violet { background: var(--sa-violet-soft); color: var(--sa-violet); border-color: transparent; }
@media (prefers-color-scheme: dark) { .sa-badge--violet { color: #CBB1EE; } }
.sa-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .9rem; }
.sa-status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sa-muted); }
.sa-status--success .sa-status__dot { background: var(--sa-success); }
.sa-status--warning .sa-status__dot { background: #D99100; }
.sa-status--danger .sa-status__dot { background: var(--sa-danger); }
.sa-status--info .sa-status__dot { background: var(--sa-info); }
.sa-status--gold .sa-status__dot { background: var(--sa-gold); box-shadow: 0 0 0 1px var(--sa-gold-text); }
.sa-notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 10px; background: var(--sa-info-soft); color: var(--sa-text); border-left: 4px solid var(--sa-info); }
.sa-notice > .sa-i { color: var(--sa-info); margin-top: 2px; }
.sa-notice > div > :last-child { margin-bottom: 0; }
.sa-notice--success { background: var(--sa-success-soft); border-color: var(--sa-success); }
.sa-notice--success > .sa-i { color: var(--sa-success); }
.sa-notice--warning { background: var(--sa-warning-soft); border-color: #D99100; }
.sa-notice--warning > .sa-i { color: var(--sa-warning); }
.sa-notice--danger { background: var(--sa-danger-soft); border-color: var(--sa-danger); }
.sa-notice--danger > .sa-i { color: var(--sa-danger); }
.sa-notice--gold { background: var(--sa-gold-soft); border-color: var(--sa-gold); }
.sa-notice--gold > .sa-i { color: var(--sa-gold-text); }
.sa-errsum ul { margin: 6px 0 0; }

/* ---------------------------------------------------------------- tables */
/* position: relative keeps screen-reader-only text inside the scroll box, so a wide table never widens the page (UX-4). */
.sa-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--sa-line); border-radius: var(--sa-radius); background: var(--sa-surface); }
.sa-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.sa-table th, .sa-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--sa-line); vertical-align: top; }
.sa-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sa-muted); background: var(--sa-surface-2); font-weight: 700; white-space: nowrap; }
.sa-table tbody tr:last-child > * { border-bottom: 0; }
.sa-table tbody tr:hover { background: var(--sa-surface-2); }
.sa-table .sa-r { text-align: right; }
.sa-table .sa-c { text-align: center; }
.sa-table a { font-weight: 600; }

/* ---------------------------------------------------------------- empty, stat, progress */
.sa-empty { text-align: center; padding: 36px 20px; border: 1.5px dashed var(--sa-line-2); border-radius: var(--sa-radius); background: var(--sa-surface-2); }
.sa-empty > .sa-i { width: 34px; height: 34px; color: var(--sa-violet); margin-bottom: 8px; }
.sa-empty__title { font: 600 1.12rem/1.3 var(--sa-serif); margin-bottom: 4px; }
.sa-empty__text { color: var(--sa-muted); max-width: 52ch; margin: 0 auto 12px; }
.sa-empty__action { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sa-stat { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); padding: 14px 16px; }
.sa-stat__value { font: 700 1.7rem/1.1 var(--sa-serif); margin: 0 0 2px; font-variant-numeric: tabular-nums; }
.sa-stat__label { margin: 0; font-weight: 600; color: var(--sa-muted); font-size: .9rem; }
.sa-stat__hint { margin: 4px 0 0; font-size: .82rem; color: var(--sa-muted); }
.sa-stat--gold { border-top: 4px solid var(--sa-gold); }
.sa-stat--danger .sa-stat__value { color: var(--sa-danger); }
.sa-progress { display: flex; align-items: center; gap: 10px; }
.sa-progress__track { flex: 1; height: 9px; border-radius: 999px; background: var(--sa-line); overflow: hidden; }
.sa-progress__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sa-violet), #8E6CB5); }
.sa-progress--gold .sa-progress__track span { background: linear-gradient(90deg, #D9B92A, var(--sa-gold)); }
.sa-progress--success .sa-progress__track span { background: var(--sa-success); }
.sa-progress__label { font-size: .85rem; color: var(--sa-muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sa-ring { position: relative; display: inline-flex; width: 58px; height: 58px; flex: none; }
.sa-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sa-ring__bg { fill: none; stroke: var(--sa-line); stroke-width: 5; }
.sa-ring__fg { fill: none; stroke: var(--sa-violet); stroke-width: 5; stroke-linecap: round; }
.sa-ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 .95rem/1 var(--sa-font); font-variant-numeric: tabular-nums; }
.sa-ring__num small { font-size: .6em; margin-left: 1px; }

/* ---------------------------------------------------------------- tabs, lists, dl, timeline, steps */
.sa-tabs ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--sa-line); scrollbar-width: thin; }
.sa-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 11px 14px; min-height: 44px; color: var(--sa-muted) !important; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sa-tabs a:hover { color: var(--sa-text) !important; }
.sa-tabs a[aria-current="page"] { color: var(--sa-ink) !important; border-bottom-color: var(--sa-gold); }
@media (prefers-color-scheme: dark) { .sa-tabs a[aria-current="page"] { color: var(--sa-text) !important; } }
.sa-tabs__count { font-size: .75rem; background: var(--sa-surface-2); border: 1px solid var(--sa-line); border-radius: 999px; padding: 0 7px; }
.sa-list { list-style: none; margin: 0; padding: 0; background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); }
.sa-list__item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--sa-line); }
.sa-list__item:last-child { border-bottom: 0; }
.sa-list__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sa-list__title { font-weight: 600; }
.sa-list__meta { font-size: .88rem; color: var(--sa-muted); }
.sa-list__end { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sa-dl { display: grid; gap: 0; margin: 0; }
.sa-dl > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sa-line); }
.sa-dl > div:last-child { border-bottom: 0; }
.sa-dl dt { color: var(--sa-muted); font-weight: 600; font-size: .92rem; }
.sa-dl dd { margin: 0; overflow-wrap: anywhere; }
.sa-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--sa-line); }
.sa-timeline__item { position: relative; padding: 0 0 16px 14px; }
.sa-timeline__item::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--sa-surface); border: 3px solid var(--sa-violet); }
.sa-timeline__item--gold::before { border-color: var(--sa-gold); }
.sa-timeline__item--success::before { border-color: var(--sa-success); }
.sa-timeline__when { margin: 0; font-size: .82rem; color: var(--sa-muted); }
.sa-timeline__title { margin: 0; font-weight: 600; }
.sa-timeline__text { margin: 2px 0 0; color: var(--sa-muted); font-size: .92rem; }
.sa-steps { list-style: none; margin: 0 0 22px; padding: 0; display: flex; gap: 6px; counter-reset: none; overflow-x: auto; }
.sa-steps__item { flex: 1; min-width: 92px; display: grid; gap: 6px; justify-items: start; padding-top: 10px; border-top: 4px solid var(--sa-line); color: var(--sa-muted); font-size: .84rem; font-weight: 600; }
.sa-steps__item--done { border-color: var(--sa-violet); color: var(--sa-text); }
.sa-steps__item--current { border-color: var(--sa-gold); color: var(--sa-text); }
.sa-steps__n { display: none; }

/* ---------------------------------------------------------------- avatars */
.sa-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font: 700 .9rem/1 var(--sa-font); color: #fff; background: var(--sa-violet); flex: none; letter-spacing: .02em; }
.sa-avatar--sm { width: 32px; height: 32px; font-size: .78rem; }
.sa-avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.sa-avatar--h0 { background: #6C4890; } .sa-avatar--h1 { background: #2E6F73; } .sa-avatar--h2 { background: #8A4B2A; }
.sa-avatar--h3 { background: #3D5A99; } .sa-avatar--h4 { background: #7A3D6B; } .sa-avatar--h5 { background: #4F6B2F; }

/* ---------------------------------------------------------------- forms */
.sa-form { display: grid; gap: 16px; }
.sa-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sa-field > label, .sa-field > legend { font-weight: 700; font-size: .95rem; padding: 0; }
.sa-req { color: var(--sa-danger); font-weight: 600; font-size: .82rem; }
.sa-opt { color: var(--sa-muted); font-weight: 500; font-size: .82rem; }
.sa-field__help { margin: 0; color: var(--sa-muted); font-size: .88rem; }
.sa-field__error { margin: 0; color: var(--sa-danger); font-size: .9rem; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.sa-field__error .sa-i { width: 16px; height: 16px; }
.sa input[type="text"], .sa input[type="email"], .sa input[type="tel"], .sa input[type="url"], .sa input[type="number"], .sa input[type="date"], .sa input[type="time"], .sa input[type="datetime-local"], .sa input[type="password"], .sa input[type="search"], .sa select, .sa textarea {
	width: 100%; min-height: 46px; padding: 10px 12px; font: 16px/1.4 var(--sa-font); color: var(--sa-text);
	background: var(--sa-surface); border: 1.5px solid var(--sa-line-2); border-radius: var(--sa-radius-sm);
}
.sa textarea { min-height: 110px; resize: vertical; }
.sa input:hover, .sa select:hover, .sa textarea:hover { border-color: var(--sa-muted); }
.sa input:focus, .sa select:focus, .sa textarea:focus { outline: 3px solid color-mix(in srgb, var(--sa-violet) 35%, transparent); outline-offset: 0; border-color: var(--sa-violet); }
.sa-field--error input, .sa-field--error select, .sa-field--error textarea { border-color: var(--sa-danger); }
.sa input[readonly] { background: var(--sa-surface-2); color: var(--sa-muted); }
.sa-field--sm { max-width: 220px; } .sa-field--md { max-width: 360px; } .sa-field--lg { max-width: 560px; }
.sa-choices { display: grid; gap: 8px; }
.sa-field--inline .sa-choices { grid-auto-flow: column; justify-content: start; gap: 8px 18px; flex-wrap: wrap; display: flex; }
.sa-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--sa-line); border-radius: var(--sa-radius-sm); background: var(--sa-surface); cursor: pointer; }
.sa-choice:hover { border-color: var(--sa-violet); }
.sa-choice input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sa-violet); flex: none; }
.sa-choice:has(input:checked) { border-color: var(--sa-violet); background: var(--sa-violet-soft); }
.sa-choice__text { display: grid; gap: 2px; font-weight: 600; }
.sa-choice__desc { font-weight: 400; color: var(--sa-muted); font-size: .9rem; }
.sa-field--checkbox .sa-choice { border: 0; padding: 0; background: none; }
.sa-money { display: flex; align-items: center; gap: 6px; max-width: 220px; }
.sa-money span { font-weight: 700; color: var(--sa-muted); }
.sa-form__actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 4px; }
.sa-fieldset { border: 1px solid var(--sa-line); border-radius: var(--sa-radius); padding: 16px; margin: 0; display: grid; gap: 14px; }
.sa-fieldset > legend { font: 600 1.05rem/1.2 var(--sa-serif); padding: 0 6px; }
.sa-cols { display: grid; gap: 16px; align-items: end; }
@media (min-width: 640px) { .sa-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sa-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- focus layout (apply, sign in) */
.sa-focus { min-height: 100vh; display: flex; flex-direction: column; }
.sa-focus__top { background: var(--sa-ink); border-bottom: 3px solid var(--sa-gold); padding: 12px 16px; }
.sa-focus__top .sa-brand__name { font-size: 1.1rem; }
.sa-focus__main { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; outline: none; }
.sa-focus .sa-head { display: block; text-align: left; }

/* ---------------------------------------------------------------- footer */
.sa-foot { padding: 20px 16px 90px; text-align: center; font-size: .85rem; color: var(--sa-muted); }
.sa-foot p { margin: 0; }
@media (min-width: 900px) { .sa-foot { padding-bottom: 24px; } .sa--app .sa-foot { margin-left: var(--sa-nav-w); } }

/* ---------------------------------------------------------------- print (report cards, transcripts) */
.sa-print { max-width: 780px; margin: 0 auto; padding: 32px 24px; background: #fff; color: #111; }
@media print {
	body.sa { background: #fff; }
	.sa-top, .sa-nav, .sa-tabbar, .sa-foot, .sa-skip, .sa-head__actions, .sa-noprint { display: none !important; }
	.sa-frame { display: block; }
	.sa-main { padding: 0; }
	.sa-card { box-shadow: none; break-inside: avoid; }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- toasts */
.sa-toasts { position: fixed; z-index: 90; left: 50%; bottom: 84px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 900px) { .sa-toasts { bottom: 24px; } }
.sa-toast { padding: 12px 16px; border-radius: 10px; background: var(--sa-ink); color: #fff; font-weight: 600; box-shadow: var(--sa-shadow); transition: opacity .35s, transform .35s; }
.sa-toast--danger { background: var(--sa-danger); }
.sa-toast.is-out { opacity: 0; transform: translateY(8px); }


/* ---------------------------------------------------------------- lesson prose */
.sa-prose { font-size: 1.05rem; line-height: 1.7; max-width: 72ch; }
.sa-prose > * + * { margin-top: 1em; }
.sa-prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.sa-prose h3 { font-size: 1.12rem; margin-top: 1.3em; }
.sa-prose ul, .sa-prose ol { padding-left: 1.4em; }
.sa-prose li + li { margin-top: .35em; }
.sa-prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--sa-gold); color: var(--sa-text); }
.sa-prose figure { margin: 1.2em 0; }
.sa-prose figcaption { font-size: .88rem; color: var(--sa-muted); margin-top: 6px; }
.sa-prose img { border-radius: var(--sa-radius-sm); }
.sa-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.sa-prose th, .sa-prose td { border: 1px solid var(--sa-line); padding: 8px 10px; text-align: left; }
.sa-prose .sa-card, .sa-prose .sa-notice { max-width: none; }

/* ---------------------------------------------------------------- print always light */
body.sa--print, .sa-print { --sa-paper: #fff; --sa-surface: #fff; --sa-surface-2: #f7f7f7; --sa-line: #d9d4ca; --sa-line-2: #c9c2b4; --sa-text: #111; --sa-muted: #555; color-scheme: light; background: #fff; color: #111; }
.sa-print .sa-table-wrap, .sa-print .sa-table thead th { background: #fff; }
.sa-print .sa-table { color: #111; }
@media print { .sa-table-wrap { overflow: visible; border-color: #ccc; } }
.sa-foot__help { margin: 0 0 8px !important; color: var(--sa-text); }

/* Lesson block headings (reflect, offline): a small heading inside a notice, never a section-sized one. */
.sa-notice__title,
.sa-prose .sa-notice__title { font-size: 1rem; line-height: 1.4; margin: 0 0 .5em; }
