:root {
  color-scheme: light;
  --ink: #16201d;
  --muted: #5d6b66;
  --paper: #f7f8f3;
  --surface: #fff;
  --brand: #146b52;
  --brand-dark: #0c4d3a;
  --brand-soft: #e8f4ef;
  --line: #dce3dc;
  --sidebar: #102f27;
  --sidebar-muted: #a8c2b9;
  --focus: #8b5700;
  --danger: #a62a20;
  --danger-soft: #fff0ee;
  --warning: #775600;
  --warning-soft: #fff2ce;
  --success: #145c43;
  --success-soft: #e5f4ec;
  --shadow: 0 16px 45px rgb(22 32 29 / .12);
  --shadow-soft: 0 8px 24px rgb(22 32 29 / .07);
  --control-height: 2.75rem;
  --content-gap: 1.5rem;
}

* { box-sizing: border-box; }
html { min-width: 0; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--brand-dark); text-underline-offset: .16em; text-decoration-thickness: .08em; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; transform: translateY(-160%); padding: .65rem .85rem; border-radius: .35rem; background: var(--ink); color: white; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid white; outline-offset: 2px; box-shadow: 0 0 0 5px var(--focus); }
.site-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; padding: .75rem max(1rem, calc((100% - 72rem) / 2)); background: rgb(255 255 255 / .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.site-header nav { display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: auto; height: 3rem; }
.container { width: min(72rem, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 5rem; }
.hero { max-width: 44rem; padding: 5rem 0; }
h1 { margin: .25rem 0 1rem; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; }
h2, h3 { line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.eyebrow { color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.button { display: inline-flex; min-height: var(--control-height); align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .55rem; background: var(--brand); color: white; font: inherit; font-weight: 750; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.button:hover { background: var(--brand-dark); box-shadow: 0 5px 14px rgb(12 77 58 / .16); }
.button:active { transform: translateY(1px); }
.button.small { min-height: 2.5rem; padding: .4rem .7rem; }
.button.secondary { border-color: #bdc9c2; background: var(--surface); color: var(--brand-dark); }
.button.secondary:hover { border-color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.card { display: grid; gap: .75rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; color: inherit; text-decoration: none; }
.card[href] { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card[href]:hover { border-color: #9fbcb0; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0; }
.card > p:last-child { margin-bottom: 0; }
.card span { color: var(--muted); }
.muted, .lede { color: var(--muted); }
.plain-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.plain-list li { display: flex; gap: .5rem; align-items: baseline; }
.plain-list li::first-letter { color: var(--brand); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.stat-card { display: grid; gap: .25rem; min-height: 6.5rem; align-content: center; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.stat-card span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.stat-card strong { color: var(--brand-dark); font-size: 2rem; line-height: 1; }
.configuration-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.configuration-group { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .6rem; background: #fbfcfa; }
.configuration-group h3 { margin: 0 0 .5rem; font-size: 1rem; }
.configuration-group ul { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.configuration-group a { display: flex; min-height: var(--control-height); align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem .55rem; border-radius: .35rem; color: var(--brand-dark); text-decoration: none; }
.configuration-group a:hover { background: var(--brand-soft); text-decoration: underline; }
.configuration-group a span { flex: none; color: var(--brand); font-size: 1.1rem; }
.app-main > * { min-width: 0; }
.reporting-periods-card { gap: 1rem; }
.reporting-periods-card > summary, .curriculum-package-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; }
.reporting-periods-card > summary::-webkit-details-marker, .curriculum-package-card > summary::-webkit-details-marker { display: none; }
.reporting-periods-card > summary::after, .curriculum-package-card > summary::after { content: "+"; color: var(--brand-dark); font-size: 1.2rem; }
.reporting-periods-card[open] > summary::after, .curriculum-package-card[open] > summary::after { content: "−"; }
.reporting-periods-card > summary > div { min-width: 0; }
.reporting-periods-card > summary h2 { margin: 0; }
.reporting-periods-card > summary p { margin: .2rem 0 0; color: var(--muted); }
.reporting-periods-link { display: inline-flex; margin-bottom: .5rem; font-weight: 700; }
.curriculum-package-wrap { position: relative; margin-bottom: 1rem; }
.curriculum-package-card { margin-bottom: 0; }
.curriculum-package-card > summary strong { font-size: 1.05rem; }
.curriculum-package-card > summary span { margin-left: auto; color: var(--muted); }
.curriculum-package-card > p { margin: .75rem 0; }
.curriculum-package-action { display: inline-flex; margin: .6rem 1.25rem 0; font-weight: 700; }
.reporting-period-matrix + .reporting-period-matrix { margin-top: .5rem; }
.reporting-period-matrix, .reporting-period-table-wrap { min-width: 0; max-width: 100%; }
.reporting-period-matrix h3 { margin: 0 0 .65rem; font-size: 1.05rem; }
.reporting-period-table-wrap { margin-bottom: 0; overflow-x: auto; }
.reporting-period-table { min-width: 42rem; }
.reporting-period-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 12rem; background: var(--surface); }
.reporting-period-table thead th:first-child { z-index: 2; background: #f1f4f0; }
.reporting-period-table td { min-width: 9rem; vertical-align: middle; }
.reporting-period-cell { display: grid; gap: .15rem; color: var(--brand-dark); text-decoration: none; }
.reporting-period-cell:hover strong { text-decoration: underline; }
.reporting-period-cell span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.reporting-period-missing { color: var(--muted); font-style: italic; }
.reporting-period-empty { margin: 0; }
.notice { margin: 1rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--brand); border-radius: .45rem; background: #eef7f4; }
.alert { margin: 1rem 0; padding: 1rem 1.25rem; border-radius: .45rem; background: var(--warning-soft); color: var(--warning); }
.alert.error { border-left: 4px solid var(--danger); background: var(--danger-soft); color: var(--danger); }
.badge { display: inline-flex; align-items: center; min-height: 2rem; padding: .25rem .65rem; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: .85rem; font-weight: 750; }
.empty-state, .narrow { max-width: 34rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; }
.auth-card { margin-inline: auto; }
.auth-card h1 { font-size: clamp(2rem, 5vw, 3rem); }
.auth-intro { margin-top: -.35rem; color: var(--muted); }
.auth-form { display: grid; gap: 1.25rem; margin: 1.25rem 0; }
.auth-form > .button { justify-self: start; }
.stacked-form p { display: grid; gap: .35rem; }
input, select, textarea { max-width: 100%; padding: .65rem; border: 1px solid #9eada6; border-radius: .45rem; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input, select { min-height: var(--control-height); }
input:hover, select:hover, textarea:hover { border-color: #72867d; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; transform: none; }
.helptext { color: var(--muted); font-size: .875rem; }
.scheduling-options-status { margin-top: .35rem; }
.scheduling-options-error { color: var(--danger); }
.errorlist { color: #9d2016; }
.message { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid #bad9ca; border-left: 4px solid var(--success); border-radius: .5rem; background: var(--success-soft); color: #104c38; }
.message-region:empty { display: none; }
.inline-form { display: inline; }
.link-button { display: inline-flex; min-height: var(--control-height); align-items: center; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; text-decoration: underline; cursor: pointer; }
.icon-button { display: inline-grid; width: var(--control-height); height: var(--control-height); place-items: center; padding: 0; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.25rem; cursor: pointer; }
.button.danger { background: var(--danger); }
.button.danger:hover { background: #801f18; }
.table-wrap { overflow-x: auto; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; }
tbody tr:last-child > * { border-bottom: 0; }
.data-table thead { background: #f1f4f0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.invitation-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.directory-toolbar { display: flex; align-items: end; gap: .75rem; margin-bottom: 1rem; }
.directory-toolbar label { display: grid; gap: .25rem; }
.directory-toolbar .search-field { flex: 1; }
.status-badge { display: inline-block; padding: .2rem .5rem; border-radius: 999px; background: #edf0ed; color: var(--muted); font-size: .8rem; font-weight: 700; }
.status-active { background: #e5f4ec; color: #145c43; }
.status-inactive { background: #fff2ce; color: #775600; }
.status-archived { background: #ececec; color: #555; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.pagination a { display: inline-flex; min-height: var(--control-height); align-items: center; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; }
.detail-list dt { color: var(--muted); font-weight: 700; }
.detail-list dd { margin: 0; }

.marketing-body { background: #f8f9f5; }
.marketing-body .container { width: min(72rem, calc(100% - 2rem)); padding-top: 0; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(25rem, .95fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: center; min-height: calc(100vh - 4.5rem); padding: 5rem 0; }
.landing-hero-copy { max-width: 38rem; }
.landing-hero h1 { max-width: 12ch; font-size: clamp(2.75rem, 6vw, 5.4rem); }
.landing-lede { max-width: 38rem; margin: 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.65; }
.landing-actions { margin: 1.75rem 0 1.5rem; }
.landing-proof { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin: 0; padding: 0; color: var(--muted); font-size: .9rem; list-style: none; }
.landing-proof li { display: inline-flex; align-items: center; gap: .4rem; }
.landing-proof li::before { display: inline-grid; width: 1.15rem; height: 1.15rem; place-items: center; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); content: "✓"; font-size: .72rem; font-weight: 900; }
.product-preview { overflow: hidden; border: 1px solid #b9c9c1; border-radius: 1.1rem; background: white; box-shadow: 0 28px 70px rgb(16 47 39 / .16); transform: rotate(1deg); }
.preview-topbar { display: flex; gap: .35rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line); background: #f4f6f2; }
.preview-topbar span { width: .55rem; height: .55rem; border-radius: 999px; background: #bfcbc5; }
.preview-shell { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); min-height: 25rem; }
.preview-nav { display: flex; flex-direction: column; gap: .75rem; padding: 1.15rem .9rem; background: var(--sidebar); color: white; }
.preview-nav strong { margin-bottom: .9rem; font-size: .85rem; }
.preview-nav i { display: block; width: 80%; height: .45rem; border-radius: 999px; background: rgb(255 255 255 / .18); }
.preview-nav i:nth-of-type(1) { width: 100%; height: 1.8rem; border-radius: .35rem; background: rgb(255 255 255 / .14); }
.preview-content { padding: 2rem 1.5rem; background: var(--paper); }
.preview-heading { display: grid; gap: .5rem; margin-bottom: 1.5rem; }
.preview-heading span { width: 4rem; height: .4rem; border-radius: 999px; background: #82a89a; }
.preview-heading strong { font-size: 1.65rem; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.preview-stats i { height: 5.5rem; border: 1px solid var(--line); border-radius: .65rem; background: white; box-shadow: 0 4px 12px rgb(22 32 29 / .04); }
.preview-panel { display: grid; gap: .7rem; margin-top: .8rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: .65rem; background: white; }
.product-preview .preview-panel strong { font-size: .85rem; }
.product-preview .preview-panel span { height: .55rem; border-radius: 999px; background: #e2e8e3; }
.product-preview .preview-panel span:nth-of-type(1) { width: 85%; }
.product-preview .preview-panel span:nth-of-type(2) { width: 68%; }
.product-preview .preview-panel span:nth-of-type(3) { width: 76%; }
.landing-section { padding: 5rem 0 2rem; border-top: 1px solid var(--line); }
.landing-section-heading { max-width: 44rem; margin-bottom: 2rem; }
.landing-section-heading h2 { margin: .35rem 0 .75rem; font-size: clamp(2rem, 4vw, 3rem); }
.landing-section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
.feature-card h3 { margin: 1.2rem 0 .6rem; font-size: 1.2rem; }
.feature-card p { margin: 0; color: var(--muted); }
.feature-number { display: inline-grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .6rem; background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; font-weight: 850; }

.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: 2rem; align-items: start; }
.account-workspaces { min-width: 0; }
.account-workspaces .content-section:last-child { margin-bottom: 0; }
.workspace-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.workspace-card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 6rem; }
.workspace-card > span:nth-child(2) { display: grid; gap: .15rem; min-width: 0; color: inherit; }
.workspace-card strong, .workspace-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card small { color: var(--muted); }
.workspace-card-icon, .join-card-icon { display: inline-grid; width: 2.75rem; height: 2.75rem; place-items: center; border-radius: .7rem; background: var(--brand-soft); color: var(--brand-dark) !important; font-weight: 850; }
.workspace-card-arrow { color: var(--brand-dark) !important; font-size: 1.25rem; transition: transform .15s; }
.workspace-card:hover .workspace-card-arrow { transform: translateX(3px); }
.join-card { position: sticky; top: 1rem; padding: 1rem 1.25rem; border: 1px solid #b9d4c8; border-radius: .85rem; background: #eff7f3; }
.join-card summary { display: flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 800; list-style: none; }
.join-card summary::-webkit-details-marker { display: none; }
.join-card summary::after { margin-left: auto; content: "+"; color: var(--brand-dark); font-size: 1.25rem; }
.join-card[open] summary::after { content: "−"; }
.join-card h2 { margin: 1rem 0 .4rem; font-size: 1.3rem; }
.join-card > p { margin: 0; color: var(--muted); }
.join-card .auth-form { margin-bottom: 0; }
.join-card .button { width: 100%; }
.account-empty { max-width: none; }

.tenant-body { min-width: 0; overflow-x: hidden; }
.platform-body .tenant-sidebar { background: #17243a; }
.platform-body .tenant-identity { border-color: rgb(255 255 255 / .18); }
.tenant-body h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.tenant-shell { min-height: 100vh; }
.tenant-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 16rem; overflow-y: auto; padding: 1rem; background: var(--sidebar); color: white; }
.tenant-sidebar a { color: inherit; }
.tenant-sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.tenant-sidebar .brand { padding: .05rem .35rem; border-radius: .55rem; background: white; }
.tenant-sidebar .brand-logo { height: 2.75rem; }
.tenant-nav-close { display: none; border-color: rgb(255 255 255 / .2); background: transparent; color: white; }
.tenant-identity { display: grid; gap: .15rem; padding: 1rem; border: 1px solid rgb(255 255 255 / .12); border-radius: .65rem; background: rgb(255 255 255 / .06); }
.tenant-identity span, .tenant-sidebar-footer span { color: var(--sidebar-muted); font-size: .85rem; }
.tenant-nav { margin: 1rem 0; }
.tenant-nav-group { margin-bottom: .65rem; }
.tenant-nav-group h2 { margin: 0 0 .3rem; color: var(--sidebar-muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.tenant-nav-group ul { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.tenant-nav-group a { display: flex; min-height: var(--control-height); align-items: center; padding: .55rem .7rem; border-radius: .45rem; color: #eaf2ef; text-decoration: none; }
.tenant-nav-group a:hover, .tenant-nav-group a.is-active { background: rgb(255 255 255 / .12); color: white; }
.tenant-nav-group a.is-active { font-weight: 750; }

@media print {
  .tenant-sidebar, .tenant-topbar, .no-print, .message-region, .skip-link { display: none !important; }
  .tenant-workspace, .app-main { display: block; width: 100%; margin: 0; padding: 0; }
  body { background: white; color: black; }
  .detail-card, .table-card { box-shadow: none; break-inside: avoid; }
}
.tenant-sidebar-footer { display: grid; gap: .15rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / .12); }
.tenant-sidebar-footer a, .tenant-sidebar-footer .link-button { display: inline-flex; min-height: var(--control-height); align-items: center; }
.tenant-workspace { min-width: 0; margin-left: 16rem; }
.tenant-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; min-height: 4rem; padding: .65rem max(1rem, calc((100% - 74rem) / 2)); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .96); backdrop-filter: blur(8px); }
.tenant-nav-open { display: none; }
.tenant-topbar-tenant { min-width: 0; overflow: hidden; font-weight: 750; text-overflow: ellipsis; text-decoration: none; white-space: nowrap; }
.tenant-topbar-actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.tenant-topbar-tenant, .tenant-topbar-actions > a { display: inline-flex; min-height: var(--control-height); align-items: center; }
.app-main { width: min(74rem, calc(100% - 3rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.tenant-nav-backdrop { display: none; }
.confirmation-dialog { width: min(30rem, calc(100% - 2rem)); padding: 1.5rem; border: 0; border-radius: .75rem; box-shadow: var(--shadow); }
.confirmation-dialog::backdrop { background: rgb(8 25 21 / .6); }
.confirmation-dialog h2 { margin-top: 0; }
.actions-end { justify-content: flex-end; }
.breadcrumbs { margin-bottom: 1.25rem; color: var(--muted); font-size: .9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { margin-right: .35rem; content: "/"; color: #96a39e; }
.breadcrumbs a { display: inline-flex; min-height: 1.5rem; align-items: center; }
.form-page { max-width: 48rem; }
conditional-fields { display: block; }
conditional-fields [hidden] { display: none; }
guided-form { display: block; }
guided-form [data-guided-only] { display: none; }
guided-form[data-connected="true"] [data-guided-only] { display: flex; }
guided-form[data-connected="true"] .guided-steps[data-guided-only] { display: grid; }
.guided-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.guided-steps li { padding: .6rem; border-bottom: 3px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 750; text-align: center; }
.guided-steps li[aria-current="step"] { border-color: var(--brand); color: var(--brand-dark); }
.guided-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.guided-step > legend { width: 100%; margin-bottom: 1rem; font-size: 1.2rem; font-weight: 800; }
.guided-review { display: grid; gap: .75rem; margin: 0; }
.guided-review > div { display: grid; grid-template-columns: minmax(9rem, .45fr) minmax(0, 1fr) auto; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.guided-review dt { font-weight: 750; }
.guided-review dd { margin: 0; }
.form-heading { margin-bottom: 1.5rem; }
.form-heading h1 { margin-bottom: .65rem; }
.form-heading > p:last-child { max-width: 40rem; margin: 0; color: var(--muted); }
.form-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.form-guidance { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.form-sections { display: grid; gap: 1.25rem; }
.form-section { min-width: 0; }
.form-section > h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.form-section-collapsible { padding-top: 1rem; border-top: 1px solid var(--line); }
.form-section-collapsible > summary { color: var(--brand-dark); font-weight: 750; cursor: pointer; }
.form-section-collapsible[open] > summary { margin-bottom: 1rem; }
.form-fields { display: grid; gap: 1.15rem; }
.form-field { display: grid; gap: .35rem; }
.form-field > label { font-weight: 750; }
.form-field-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-field-choice > legend { margin-bottom: .35rem; padding: 0; font-weight: 750; }
.form-field-choice > div[id^="id_"] { display: grid; gap: .35rem; margin: 0; }
.form-field-choice > div[id^="id_"] > div { margin: 0; }
.form-field-choice > div[id^="id_"] label { display: flex; gap: .55rem; align-items: center; padding: .65rem; border: 1px solid var(--line); border-radius: .45rem; cursor: pointer; }
.form-field-choice > div[id^="id_"] input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; }
.required-mark { margin-left: .2rem; color: var(--danger); }
.optional-mark { margin-left: .35rem; color: var(--muted); font-size: .85rem; font-weight: 500; }
.form-field input:not([type="checkbox"]):not([type="radio"]), .form-field select, .form-field textarea { width: 100%; padding: .7rem .75rem; border: 1px solid #9caaa4; border-radius: .4rem; background: white; color: var(--ink); font: inherit; }
.form-field textarea { min-height: 7rem; resize: vertical; }
.form-field select[multiple] { min-height: 8rem; }
.form-field-checkbox { grid-template-columns: auto 1fr; align-items: center; }
.form-field-checkbox > label { grid-column: 2; grid-row: 1; }
.form-field-checkbox > input { grid-column: 1; grid-row: 1; width: 1.15rem; height: 1.15rem; margin: 0; }
.form-field-checkbox .helptext, .form-field-checkbox .field-errors { grid-column: 2; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); }
.field-errors, .error-summary { color: #7e1d17; }
.field-errors .errorlist { margin: 0; padding-left: 1.2rem; }
.error-summary { margin-bottom: 1.25rem; padding: 1rem; border-left: 4px solid var(--danger); border-radius: .35rem; background: #fff0ee; }
.error-summary h2 { margin: 0 0 .35rem; font-size: 1rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: inherit; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.teacher-create-fields { display: grid; gap: 1.25rem; }
.teacher-invitation-section { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.teacher-invitation-fields { display: grid; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid #b9d9cd; border-radius: .65rem; background: #f4faf7; }
.teacher-invitation-confirmation { margin: 0; color: var(--muted); }
.staff-access-fields { display: grid; gap: 1.25rem; }
.staff-access-fields > .form-section + .form-section { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.staff-access-fields .form-section > h2 { margin: 0 0 .45rem; }
.form-section-intro { margin: 0 0 1rem; color: var(--muted); }
.staff-access-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.staff-access-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: start; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .6rem; background: #fbfcfa; cursor: pointer; }
.staff-access-option:has(input:checked) { border-color: #6ca08d; background: var(--brand-soft); box-shadow: 0 0 0 2px rgb(20 107 82 / .08); }
.staff-access-option input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; }
.staff-access-option span { display: grid; gap: .2rem; min-width: 0; }
.staff-access-option strong { color: var(--brand-dark); }
.staff-access-option small { color: var(--muted); line-height: 1.4; }
.staff-access-summary { margin: 0; padding: .7rem .85rem; border-radius: .45rem; background: #f1f4f0; color: var(--brand-dark); font-weight: 750; }
.staff-additional-access { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.staff-additional-access > summary { cursor: pointer; color: var(--brand-dark); font-weight: 750; }
.staff-additional-access > summary::after { margin-left: .4rem; content: "+"; }
.staff-additional-access[open] > summary::after { content: "−"; }
.staff-role-panel { margin-top: .9rem; padding: 1rem; border: 1px solid #c8d8d0; border-radius: .6rem; background: #fbfcfa; }
.staff-role-heading { margin-bottom: .85rem; }
.staff-role-heading h3 { margin: 0; font-size: 1.05rem; }
.staff-role-heading p { margin: .25rem 0 0; color: var(--muted); }
.staff-role-panel .form-field-choice > legend { font-size: .95rem; }
.staff-primary-section, .staff-teacher-section { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.staff-teacher-choice { margin-top: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .6rem; background: #fbfcfa; }
.staff-permissions-reference { margin-top: 1.25rem; }
.staff-permissions-reference > summary, .staff-permission-role > summary { cursor: pointer; color: var(--brand-dark); font-weight: 750; }
.staff-permissions-reference > summary { display: flex; align-items: center; justify-content: space-between; }
.staff-permissions-reference > summary::after { content: "+"; font-size: 1.2rem; }
.staff-permissions-reference[open] > summary::after { content: "−"; }
.staff-permissions-reference > p, .staff-permission-role > p { margin: .5rem 0 0; color: var(--muted); }
.staff-permission-role { padding-top: .75rem; border-top: 1px solid var(--line); }
.staff-permission-role > ul { margin-bottom: 0; }
.page-intro { max-width: 42rem; margin: -.4rem 0 0; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.summary-card { display: flex; min-height: 9rem; flex-direction: column; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.summary-card:hover { border-color: #aac3b9; box-shadow: 0 8px 24px rgb(22 32 29 / .08); }
.summary-card:active { transform: translateY(1px); }
.summary-card > span:first-child { color: var(--muted); font-size: .9rem; font-weight: 700; }
.summary-card strong { margin: .25rem 0; font-size: 2.2rem; line-height: 1; }
.summary-card-link { margin-top: auto; color: var(--brand-dark); font-size: .85rem; font-weight: 700; }
.dashboard-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(9rem, auto)); }
.dashboard-quick-actions .button { white-space: nowrap; }
.setup-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .8fr); gap: 2rem; align-items: start; margin-bottom: 2rem; padding: 1.5rem; border: 1px solid #b9d9cd; border-radius: .75rem; background: #eaf6f1; }
.setup-panel h2, .dashboard-panel h2 { margin: 0; font-size: 1.25rem; }
.setup-panel p { margin: .35rem 0 0; color: var(--muted); }
.setup-panel ul { display: grid; gap: .5rem; margin: 0; padding-left: 1.2rem; }
.subscription-panel { display: block; padding: 0; }
.subscription-panel-wrap { position: relative; margin-bottom: 2rem; }
.subscription-panel-wrap .subscription-panel { margin-bottom: 0; }
.subscription-panel > summary { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; cursor: pointer; list-style: none; }
.subscription-panel > summary::-webkit-details-marker { display: none; }
.subscription-panel > summary::after { margin-left: auto; content: "+"; color: var(--brand-dark); font-size: 1.25rem; }
.subscription-panel[open] > summary { border-bottom: 1px solid #b9d9cd; }
.subscription-panel[open] > summary::after { content: "−"; }
.subscription-panel > summary strong { font-size: 1rem; }
.subscription-panel > summary > span:last-of-type { color: var(--muted); }
.subscription-details { padding: 0 1.25rem 1.25rem; }
.subscription-admin-link { position: absolute; top: 1rem; right: 3rem; display: inline-flex; font-size: .85rem; font-weight: 700; }
.subscription-details > p { margin: .75rem 0; color: var(--muted); }
.subscription-panel-intro { margin-bottom: 1.25rem; }
.subscription-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 0; }
.subscription-metrics .summary-card { min-height: 6.75rem; padding: .85rem; }
.subscription-metrics .summary-card strong { font-size: 1.85rem; }
.onboarding-banner { align-items: center; }
.onboarding-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 1.5rem; padding: 0; counter-reset: onboarding-step; list-style: none; }
.onboarding-progress li { padding: .65rem; border-bottom: 3px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 750; text-align: center; }
.onboarding-progress li[aria-current="step"] { border-color: var(--brand); color: var(--brand-dark); }
.onboarding-page .form-field > div[id^="id_"] { display: grid; grid-column: 1 / -1; gap: .35rem; margin: 0; }
.onboarding-page .form-field > div[id^="id_"] > div { margin: 0; }
.onboarding-page .form-field > div[id^="id_"] label { display: flex; gap: .55rem; align-items: center; padding: .65rem; border: 1px solid var(--line); border-radius: .45rem; cursor: pointer; }
.onboarding-page .form-field > div[id^="id_"] input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; }
.notice-panel { margin: 1rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--brand); border-radius: .45rem; background: #eef7f4; }
.notice-panel p { margin: .35rem 0 0; color: var(--muted); }
.activation-panel ul { margin: .75rem 0; padding-left: 1.25rem; color: var(--muted); }
.activation-panel small { display: block; margin-top: .5rem; color: var(--muted); }
.setup-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin: 0; padding: 0; list-style: none; }
.setup-list li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .65rem; align-items: start; min-width: 0; }
.setup-list li > span:first-child { display: inline-grid; width: 1.25rem; place-items: center; color: var(--brand-dark); font-weight: 800; }
.setup-list li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.onboarding-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .8fr); gap: 2rem; align-items: center; margin-bottom: 1.5rem; padding: 1.5rem; border: 1px solid #b9d9cd; border-radius: .75rem; background: #eaf6f1; }
.onboarding-summary h2 { margin: .2rem 0; font-size: 1.4rem; }
.onboarding-summary p { margin: .25rem 0 0; }
.progress-meter { height: .8rem; overflow: hidden; border-radius: 999px; background: #cbdad4; }
.progress-meter span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.setup-groups { display: grid; gap: 1.25rem; }
.setup-group { padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.setup-group > h2 { margin: 0 0 .75rem; font-size: 1.2rem; }
.setup-task-list { display: grid; gap: 0; }
.setup-task { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); }
.setup-task h3 { margin: 0; font-size: 1rem; }
.setup-task p { margin: .25rem 0 0; color: var(--muted); }
.setup-task-completed { opacity: .78; }
.setup-task-unavailable { background: #fafafa; }
.status-required { background: var(--warning-soft); color: var(--warning); }
.status-recommended { background: #e7efff; color: #274d8b; }
.status-skipped, .status-unavailable { background: #ececec; color: #555; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dashboard-panel { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.dashboard-panel-compact { align-self: start; }
.panel-heading { display: flex; gap: 1rem; align-items: start; justify-content: space-between; margin-bottom: 1rem; }
.panel-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.panel-heading > a { flex: none; }
.task-list, .activity-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.task-list li + li, .activity-list li + li { border-top: 1px solid var(--line); }
.task-list a, .activity-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; color: inherit; text-decoration: none; }
.task-list a:hover strong { color: var(--brand-dark); text-decoration: underline; }
.task-list span, .activity-list span { display: grid; min-width: 0; }
.task-list small, .activity-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.task-list time, .activity-list time { flex: none; color: var(--muted); font-size: .85rem; }
.activity-panel { margin-top: 1rem; }
.dashboard-empty { margin-top: 1rem; }

.content-section { margin-bottom: 2.25rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading p { margin: .2rem 0 0; color: var(--muted); }
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
.record-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.record-card h2, .record-card h3 { margin: .35rem 0 .5rem; font-size: 1.2rem; }
.record-card p { color: var(--muted); }
.record-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.record-card-empty { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.linked-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.linked-card:hover { border-color: #aac3b9; box-shadow: 0 8px 24px rgb(22 32 29 / .08); transform: translateY(-2px); }
.linked-card > span:last-child { color: var(--brand-dark); font-weight: 750; }
.admin-grid { max-width: 58rem; }
.admin-grid .linked-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; }
.admin-grid .linked-card h2, .admin-grid .linked-card p { grid-column: 1; }
.admin-grid .linked-card h2 { grid-row: 1; }
.admin-grid .linked-card p { grid-row: 2; }
.admin-grid .record-card-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--brand-dark); font-size: 1.35rem; font-weight: 750; }
.compact-page-heading { margin-bottom: 1rem; }
.compact-page-heading h1 { margin-bottom: 0; }
.campus-heading-actions { align-items: center; }
.quota-inline { color: var(--muted); font-size: .85rem; }
.admin-grid .record-card { padding: 1rem 1.1rem; }
.admin-grid .record-card p { margin: .35rem 0 .65rem; }
.detail-page-heading { align-items: center; margin-bottom: 1rem; }
.detail-page-heading h1 { margin-bottom: 0; }
.detail-page-heading .actions { justify-content: flex-end; }
.teacher-links .section-heading { margin-bottom: 0; align-items: center; }
.teacher-links .section-heading a { font-weight: 700; }
.row-actions-menu { position: relative; }
.row-actions-menu summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; list-style: none; }
.row-actions-menu summary::-webkit-details-marker { display: none; }
.row-actions-menu summary::after { margin-left: .25rem; content: "⌄"; }
.row-actions-menu[open] summary::after { content: "⌃"; }
.row-actions-menu > div { position: absolute; z-index: 2; right: 0; display: grid; gap: .35rem; min-width: 9rem; margin-top: .35rem; padding: .5rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); box-shadow: var(--shadow-soft); }
.row-actions-menu > div a, .row-actions-menu > div button { display: inline-flex; min-height: 2.25rem; align-items: center; padding: .25rem .35rem; }
.empty-invitations { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.empty-invitations summary { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; cursor: pointer; font-weight: 750; list-style: none; }
.empty-invitations summary::-webkit-details-marker { display: none; }
.empty-invitations summary small { color: var(--muted); font-weight: 400; }
.empty-invitations p { margin: 0 0 1rem; color: var(--muted); }
.preparation-card { margin-bottom: 1rem; }
.preparation-card > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.preparation-card > summary::-webkit-details-marker { display: none; }
.preparation-card > summary h2 { margin: 0; font-size: 1.2rem; }
.preparation-card > summary span { color: var(--brand-dark); font-weight: 700; }
.preparation-card[open] > summary { margin-bottom: 1rem; }
.compact-notice { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: .75rem 0; padding: .65rem .85rem; }

.data-table th { color: #42504b; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; }
.data-table td { vertical-align: top; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.danger-link { color: var(--danger); }
.message-warning { background: var(--warning-soft); color: var(--warning); }
.preview-panel { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.preview-panel h2 { margin-top: 0; }
.assessment-review { padding: 1rem 0; border-top: 1px solid var(--line); }
.assessment-review:first-of-type { border-top: 0; }
.assessment-review p { margin: .25rem 0; color: var(--muted); }
.assessment-review ul { margin: .65rem 0; }
.curriculum-revision-picker form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.curriculum-revision-picker label { display: grid; gap: .25rem; color: var(--muted); font-size: .85rem; font-weight: 700; }
.curriculum-revision-picker select { min-width: 14rem; }
.curriculum-filter-form { margin-top: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
.curriculum-filter-actions { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.curriculum-filter-summary { margin: .75rem 0; }
.curriculum-content-note { display: grid; gap: .25rem; }
.curriculum-content-note p { margin: 0; color: var(--muted); }
.curriculum-publication-gate { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.curriculum-publication-gate p { margin: .25rem 0 0; color: var(--muted); }
.curriculum-page-heading, .curriculum-section-heading { align-items: start; }
.curriculum-page-heading .button { margin-top: .25rem; }
.curriculum-level { margin-top: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.curriculum-level > summary { list-style: none; }
.curriculum-level > summary::-webkit-details-marker { display: none; }
.curriculum-level-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; cursor: pointer; }
.curriculum-level-summary > span:first-of-type { display: grid; min-width: 0; }
.curriculum-level-summary small { color: var(--muted); font-weight: 400; }
.curriculum-level-summary > span:last-child { flex: none; color: var(--brand-dark); font-size: 1.25rem; font-weight: 700; }
.curriculum-level[open] > .curriculum-level-summary { border-bottom: 1px solid var(--line); }
.curriculum-level[open] > .curriculum-level-summary > span:last-child { font-size: 0; }
.curriculum-level[open] > .curriculum-level-summary > span:last-child::after { content: "−"; font-size: 1.25rem; }
.curriculum-level-body { padding: 0 1.15rem 1.15rem; }
.curriculum-grade { margin-top: 1.5rem; }
.curriculum-grade + .curriculum-grade { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.curriculum-subject-list { display: grid; gap: .75rem; }
.curriculum-subject-card { border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
.curriculum-subject-card > summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem .9rem 2.1rem; cursor: pointer; list-style: none; text-align: left; }
.curriculum-subject-card > summary::-webkit-details-marker { display: none; }
.curriculum-subject-card > summary::before { position: absolute; top: 50%; left: .85rem; width: auto; color: var(--brand-dark); content: "+"; font-size: 1.05rem; font-weight: 700; line-height: 1; transform: translateY(-50%); }
.curriculum-subject-card[open] > summary::before { content: "−"; }
.curriculum-subject-card > summary > span:first-of-type { display: grid; flex: 1 1 16rem; min-width: 0; text-align: left; }
.curriculum-subject-card > summary > span:first-of-type strong, .curriculum-subject-card > summary > span:first-of-type small { text-align: left; }
.curriculum-subject-card > summary small { color: var(--muted); }
.curriculum-subject-counts { color: var(--muted); font-size: .85rem; text-align: right; }
.curriculum-subject-body { padding: 0 1rem 1rem 3.2rem; border-top: 1px solid var(--line); }
.curriculum-content-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.curriculum-content-block h4 { margin-bottom: .75rem; }
.curriculum-content-block article { padding: .75rem 0; border-top: 1px solid var(--line); }
.curriculum-content-block article:first-of-type { border-top: 0; }
.curriculum-content-block h5 { margin: 0; }
.curriculum-content-block p { margin: .3rem 0; color: var(--muted); }
.curriculum-item-list { margin: .5rem 0 0; padding-left: 1.2rem; }
.curriculum-item-list li + li { margin-top: .4rem; }
.curriculum-edit-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.curriculum-edit-panel > summary { color: var(--brand-dark); cursor: pointer; font-weight: 750; }
.inline-revision-form { margin-top: .75rem; }
.inline-revision-form .form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }

.settings-panel, .filter-panel { margin-top: 2rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.settings-panel > summary, .filter-panel > summary { display: flex; align-items: center; min-height: 3.25rem; padding: .85rem 1rem; cursor: pointer; font-weight: 750; }
.settings-panel > summary span { display: grid; }
.settings-panel > summary small { color: var(--muted); font-weight: 400; }
.settings-panel[open] > summary, .filter-panel[open] > summary { border-bottom: 1px solid var(--line); }
.settings-panel-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 1.25rem; }
.settings-panel-single { grid-template-columns: 1fr; }
.settings-list, .version-list, .waitlist-list, .alert-list, .timeline { margin: 0; padding: 0; list-style: none; }
.settings-list > li, .waitlist-list > li, .alert-list > li, .timeline > li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.settings-list > li:last-child, .waitlist-list > li:last-child, .alert-list > li:last-child, .timeline > li:last-child { border-bottom: 0; }
.settings-list span, .waitlist-list span, .alert-list span, .timeline span { display: grid; min-width: 0; }
.settings-list small, .waitlist-list small, .alert-list small, .timeline small { color: var(--muted); }
.version-list > li { padding: .8rem 0; border-top: 1px solid var(--line); }
.version-list > li > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.version-list ul { color: var(--muted); }

.status-tabs, .segmented-control { display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .25rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.status-tabs { margin-bottom: 1.5rem; }
.status-tabs a, .segmented-control a { padding: .45rem .7rem; border-radius: .35rem; color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.status-tabs a:hover, .segmented-control a:hover, .status-tabs a.is-active, .segmented-control a.is-active { background: #eaf6f1; color: var(--brand-dark); }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.calendar-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding: 1rem; }
.filters label { display: grid; flex: 1 1 10rem; gap: .25rem; color: var(--muted); font-size: .85rem; font-weight: 700; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.filters-grid > * { min-width: 0; }
.filters-grid input, .filters-grid select { width: 100%; min-width: 0; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail-card { margin-bottom: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.detail-card h2 { margin-top: 0; font-size: 1.2rem; }
.detail-actions, .workflow-actions { margin: -1rem 0 1.5rem; }
.timeline time { flex: none; color: var(--muted); font-size: .9rem; }

.status-draft, .status-pending, .status-planned, .status-open, .status-under_review { background: var(--warning-soft); color: var(--warning); }
.status-submitted, .status-active, .status-admitted, .status-delivered, .status-acknowledged, .status-published { background: var(--success-soft); color: var(--success); }
.status-cancelled, .status-rejected, .status-withdrawn, .status-closed, .status-retired { background: var(--danger-soft); color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 56rem) {
  .landing-hero { grid-template-columns: 1fr; min-height: auto; padding: 4rem 0; }
  .landing-hero-copy { max-width: 43rem; }
  .landing-hero h1 { max-width: 14ch; }
  .product-preview { width: min(100%, 38rem); transform: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
  .feature-card .feature-number { grid-row: 1 / 3; }
  .feature-card h3 { margin: .1rem 0 .4rem; }
  .feature-card p { grid-column: 2; }
  .account-layout { grid-template-columns: 1fr; }
  .join-card { position: static; }
  .tenant-sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .tenant-workspace { margin-left: 0; }
  .tenant-nav-visible .tenant-sidebar { transform: translateX(0); }
  .tenant-nav-visible .tenant-nav-backdrop { position: fixed; z-index: 25; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgb(8 25 21 / .55); }
  .tenant-nav-close, .tenant-nav-open { display: inline-grid; }
  .tenant-topbar { gap: .75rem; }
  .app-main { width: min(74rem, calc(100% - 2rem)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-grid, .settings-panel-content { grid-template-columns: 1fr; }
  .onboarding-summary { grid-template-columns: 1fr; }
  .configuration-nav { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .page-heading, .directory-toolbar { align-items: stretch; flex-direction: column; }
  .tenant-topbar-actions > a { display: none; }
  .hero { padding: 2rem 0; }
  .container { padding: 2rem 0 4rem; }
  .marketing-body .container { padding-top: 0; }
  .landing-hero { gap: 3rem; padding: 3.5rem 0; }
  .landing-hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .landing-actions { flex-direction: column; }
  .landing-actions .button { width: 100%; }
  .landing-proof { display: grid; }
  .preview-shell { grid-template-columns: 4.5rem minmax(0, 1fr); min-height: 18rem; }
  .preview-nav { padding-inline: .65rem; }
  .preview-nav strong { overflow: hidden; font-size: .68rem; }
  .preview-content { padding: 1.25rem .8rem; }
  .preview-heading strong { font-size: 1.25rem; }
  .preview-stats { gap: .4rem; }
  .preview-stats i { height: 4rem; }
  .landing-section { padding-top: 3.5rem; }
  .feature-card { padding: 1.25rem; }
  .workspace-card { min-height: 5.5rem; padding: 1rem; }
  .dashboard-heading, .dashboard-quick-actions, .setup-panel { display: flex; flex-direction: column; align-items: stretch; }
  .subscription-panel { display: block; }
  .subscription-admin-link { position: static; display: flex; padding: .5rem 1.25rem 0; }
  .dashboard-quick-actions .button { text-align: center; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-card { min-height: 8rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-heading { align-items: start; }
  .task-list a, .activity-list li { align-items: start; flex-direction: column; gap: .25rem; }
  .page-heading .actions, .page-heading .button { width: 100%; text-align: center; }
  .calendar-toolbar, .calendar-pagination { align-items: stretch; flex-direction: column; }
  .segmented-control { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
  .table-wrap:has(.responsive-table) { border: 0; border-radius: 0; background: transparent; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table { background: transparent; }
  .responsive-table tbody { display: grid; gap: .75rem; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .responsive-table tr { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
  .responsive-table td { display: grid; grid-template-columns: minmax(6.5rem, .45fr) minmax(0, 1fr); gap: .75rem; padding: .45rem 0; border: 0; overflow-wrap: anywhere; }
  .responsive-table td::before { color: var(--muted); content: attr(data-label); font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
  .responsive-table td[colspan] { display: block; }
  .responsive-table td[colspan]::before { content: none; }
  .responsive-table td a { display: inline-flex; min-height: var(--control-height); align-items: center; }
  .page-heading .actions > a:not(.button) { display: inline-flex; min-height: var(--control-height); align-items: center; }
  .settings-list > li, .waitlist-list > li, .alert-list > li, .timeline > li, .invitation-row { align-items: start; flex-direction: column; }
  .button-row { flex-direction: column; }
  .button-row .button { width: 100%; text-align: center; }
  .staff-access-options { grid-template-columns: 1fr; }
  .stat-card { min-height: 5.5rem; }
  .setup-task { grid-template-columns: 1fr; gap: .5rem; }
  .detail-list { grid-template-columns: 1fr; gap: .15rem; }
  .detail-list dd { margin-bottom: .65rem; overflow-wrap: anywhere; }
  .curriculum-revision-picker form { align-items: stretch; flex-direction: column; }
  .curriculum-revision-picker select, .curriculum-revision-picker button { width: 100%; }
  .curriculum-level-summary { align-items: start; }
  .curriculum-level-body { padding-inline: .75rem; }
  .curriculum-subject-card > summary { align-items: start; flex-direction: column; }
  .curriculum-subject-card > summary > span:first-of-type { flex: none; width: 100%; }
  .curriculum-subject-counts { width: 100%; }
  .curriculum-subject-counts { text-align: left; }
  .curriculum-subject-body { padding-left: 1rem; }
  .curriculum-content-columns { grid-template-columns: 1fr; }
  .inline-revision-form .form-fields { grid-template-columns: 1fr; }
  .curriculum-filter-actions { align-items: stretch; }
  .curriculum-filter-actions .button { flex: 1 1 12rem; text-align: center; }
  .curriculum-publication-gate { align-items: stretch; flex-direction: column; }
}

@media (max-width: 24rem) {
  .site-header nav { gap: .65rem; }
  .site-header nav > a:not(.button) { display: none; }
  .summary-grid, .stat-grid { grid-template-columns: 1fr; }
  .subscription-metrics { grid-template-columns: 1fr; }
  .responsive-table td { grid-template-columns: 1fr; gap: .1rem; }
}
