:root {
    color-scheme: light;
    --paper: #fff;
    --ink: #111;
    --muted: #5e5e5e;
    --rule: #292929;
    --rule-strong: #000;
    --primary-accent: #527365;
    --primary-pale: #edf3ef;
    --secondary-accent: #765361;
    --secondary-pale: #f5eef1;
    --week-previous-pale: #fff3bd;
    --week-next-pale: #f3dfe3;
    --week-next-ink: #6d1426;
    --class-code: #174f3a;
    --room-code: #6d2635;
    --corner: .28rem;
    --interactive-shadow: 0 2px 8px rgb(0 0 0 / 10%);
    --space-1: .35rem;
    --space-2: .6rem;
    --space-3: .9rem;
    --space-4: 1.25rem;
    --space-5: 1.8rem;
    --technical: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --class-tone-0: #d9a5b3;
    --class-tone-1: #9bbfd6;
    --class-tone-2: #9fc7a8;
    --class-tone-3: #d6b78f;
    --class-tone-4: #b8a5cf;
    --class-tone-5: #d4cc8a;
    --class-tone-6: #9fcfd1;
    --class-tone-7: #d3a3c0;
    --class-border-0: #c28a00;
    --class-border-1: #1769aa;
    --class-border-2: #287a3d;
    --class-border-3: #7042a5;
    --class-border-4: #c45b12;
    --class-border-5: #b72b35;
    --class-border-6: #008c95;
    --class-border-7: #a62975;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .button {
    display: inline-block;
    border: 1px solid var(--primary-accent);
    border-radius: var(--corner);
    background: var(--primary-accent);
    color: #fff;
    cursor: pointer;
    padding: .55rem .85rem;
    text-decoration: none;
    box-shadow: var(--interactive-shadow);
}
button:hover, .button:hover { background: var(--secondary-accent); border-color: var(--secondary-accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
button.secondary, .button.secondary {
    border-color: var(--rule);
    background: var(--paper);
    color: var(--ink);
    box-shadow: none;
}
button.secondary:hover, .button.secondary:hover { background: var(--secondary-pale); border-color: var(--secondary-accent); color: var(--ink); }
input, select, textarea {
    width: 100%;
    border: 1px solid #707070;
    border-radius: var(--corner);
    background: var(--paper);
    color: var(--ink);
    padding: .55rem .65rem;
}
textarea { min-height: 7rem; resize: vertical; }
label { display: block; margin: var(--space-3) 0; font-weight: 650; }
label input, label select, label textarea { display: block; margin-top: var(--space-1); font-weight: 400; }
.checkbox-label { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
.checkbox-label input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--rule); margin: var(--space-4) 0; padding: var(--space-3); }
legend { padding: 0 var(--space-1); font-weight: 700; }
small { font-size: .82rem; }

.site-shell { min-height: 100vh; display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); }
.site-nav { border-right: 1px solid var(--rule); padding: var(--space-4) var(--space-3); background: var(--paper); }
.wordmark { display: inline-block; margin-bottom: var(--space-5); font-size: 1.65rem; font-weight: 750; letter-spacing: -.04em; text-decoration: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: .2rem 0; }
.site-nav li.nav-divider { border-top: 1px solid #d0d0d0; margin-top: var(--space-3); padding-top: var(--space-3); }
.site-nav li.nav-separator { border-top: 1px solid var(--rule-strong); margin: var(--space-3) 0; padding: 0; }
.site-nav li a { display: block; border-radius: var(--corner); padding: .38rem .5rem; text-decoration: none; }
.site-nav li a:hover, .site-nav li a:focus-visible { background: var(--secondary-pale); }
.site-nav .nav-disabled { display: block; border-radius: var(--corner); padding: .38rem .5rem; color: var(--muted); cursor: not-allowed; }
.site-nav li a.active, .selected-state { background: var(--primary-pale); box-shadow: 0 1px 3px rgb(0 0 0 / 6%); font-weight: 700; color: var(--ink); }
.site-nav li.nav-subitem { padding-left: .65rem; font-size: .92rem; }
.staff-identifier { width: 5rem; max-width: 5rem; text-transform: uppercase; }
.site-main { width: min(100%, 78rem); padding: var(--space-5) clamp(1rem, 4vw, 4rem); }
.beta-banner { margin: 0 0 var(--space-4); border: 1px solid #8a5a00; border-radius: var(--corner); background: #fff3cd; color: #4a3200; padding: .8rem 1rem; font-weight: 700; line-height: 1.4; }
.beta-banner a { color: #4a3200; font-weight: 800; text-decoration: underline; text-underline-offset: .12em; }
.tenant-name { margin: -.8rem 0 var(--space-4); color: var(--muted); font-size: .95rem; font-weight: 650; }
.content-narrow { max-width: 38rem; }
.content-wide { max-width: 68rem; }
.public-copy, .about-page { margin: 0 auto; }
.public-copy h1 { margin-top: 0; }
.public-copy { line-height: 1.55; }
.beta-page h1 { margin-top: 0; }
.beta-page h2 { margin: 2.25rem 0 .75rem; }
.beta-page h3 { margin: 1.5rem 0 .5rem; font-size: 1.05rem; }
.demo-page ol { padding-left: 1.5rem; }
.demo-page li { margin: .75rem 0; padding-left: .25rem; }
.showcase { max-width: 68rem; margin: 0 auto; }
.showcase-intro { max-width: 42rem; margin: 0 auto 3rem; text-align: center; }
.showcase-intro h1 { margin: 0 0 .75rem; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.04em; }
.showcase-intro > p:last-child { color: var(--muted); font-size: 1.12rem; }
.showcase-section { border-top: 2px solid var(--rule-strong); margin-top: 3.5rem; padding-top: 2rem; }
.showcase-section-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.showcase-feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(15rem, .8fr); gap: 2rem; align-items: center; margin-top: 1.5rem; }
.showcase-feature > div { max-width: 28rem; }
.showcase-feature h3, .showcase-secondary-grid h3, .showcase-people h3 { margin-top: 0; }
.showcase-steps { padding-left: 1.35rem; }
.showcase-steps li { margin: .55rem 0; }
.demo-figure, .how-to-figure { margin: 0; border: 1px solid var(--rule); background: #fff; padding: .45rem; }
.demo-figure img, .how-to-figure img { display: block; width: 100%; height: auto; }
.showcase-secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.showcase-secondary-grid > div, .showcase-people > div { min-width: 0; }
.showcase-secondary-grid .demo-figure { margin-top: .8rem; }
.showcase-note { border-left: 3px solid var(--primary-accent); margin-top: 1.5rem; padding-left: .8rem; color: var(--muted); }
.showcase-admin-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.showcase-people { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; align-items: center; margin-top: 2rem; }
.how-to-sections { border: 1px solid var(--rule); margin: 0 auto 2.5rem; padding: .8rem 1rem; max-width: 42rem; }
.how-to-sections p { margin: 0 0 .35rem; font-weight: 700; }
.how-to-sections ul { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; list-style: none; margin: 0; padding: 0; }
.how-to-sections li { margin: 0; }
.how-to-section { max-width: 56rem; margin: 0 auto; }
.how-to-section h2 { border-top: 1px solid var(--rule); margin: 2.5rem 0 1rem; padding-top: 1.5rem; }
.how-to-section h2:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.how-to-section .how-to-figure { margin: 1.25rem 0; }
.how-to-steps { padding-left: 1.4rem; }
.how-to-steps li { margin: .6rem 0; }
.how-to-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.how-to-overview { max-width: 42rem; margin: 0 auto; text-align: center; }
.about-page { max-width: 44rem; text-align: left; font-size: 1.08rem; }
.about-wordmark { margin: 0 0 2rem; text-align: center; font-size: clamp(2.4rem, 7.5vw, 4.5rem); font-weight: 780; letter-spacing: -.07em; line-height: 1; }
.about-page p { margin: 1.25rem 0; }
.about-principles { margin-top: 3.5rem; border-top: 1px solid var(--rule); padding-top: 2.5rem; }
.about-principles h2 { margin: 0 0 2rem; font-size: clamp(1.6rem, 3vw, 2rem); }
.about-principles h3 { margin: 2.25rem 0 0; font-size: 1.15rem; }
.donation-section { margin: 1.5rem 0 2rem; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--secondary-pale); padding: .85rem 1rem; }
.donation-section > h4 { margin: 0; font-size: 1.15rem; }
.donation-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.donation-method { min-width: 0; border: 1px solid var(--rule); border-radius: var(--corner); background: #fff; padding: .85rem; }
.donation-method h5 { margin: 0 0 .65rem; font-size: 1rem; }
.donation-qr { display: block; width: min(100%, 13rem); height: auto; margin: 0 auto .8rem; image-rendering: pixelated; }
.donation-destination-label { margin: .5rem 0 .2rem; font-size: .85rem; font-weight: 700; }
.donation-destination { display: block; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.45; }
.donation-copy-status { color: var(--muted); font-size: .85rem; }
.public-landing { min-height: calc(100vh - 3.6rem); display: grid; place-content: center; justify-items: center; padding: clamp(2rem, 6vh, 5rem) 1rem; text-align: center; }
.public-landing h1 { margin: 0; font-size: clamp(3.2rem, 10vw, 7rem); font-weight: 780; letter-spacing: -.07em; line-height: 1; }
.public-landing-tagline { margin: 1rem 0 2rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); }
.public-landing-guidance { max-width: 24rem; margin: 1.25rem 0 0; color: var(--muted); font-size: .78rem; }
.public-landing-warning { max-width: 42rem; margin: 3rem 0 0; border-top: 1px solid var(--rule); padding-top: .8rem; color: var(--muted); font-size: .78rem; letter-spacing: .01em; }
.public-landing-warning a { font-weight: 700; }
.not-found-page { margin: 8vh auto 0; text-align: center; }
.not-found-page h1 { margin: 0 0 1rem; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.04em; }
.not-found-page p { margin: 1rem auto; max-width: 34rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.technical, .timetable, .lesson-block, .week-grid, .admin-week-grid { font-family: var(--technical); }
.notice, .message { border: 1px solid var(--rule); padding: .75rem; margin: var(--space-4) 0; }
.warning { background: #fffbe8; border-color: #b7a34a; }
.error { background: #fff3f3; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .25rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.page-header { border-bottom: 2px solid var(--rule-strong); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); }
.page-header h1 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.week-arrow { border-radius: var(--corner); font-size: 2rem; line-height: 1; padding: .25rem .6rem; text-decoration: none; }
.week-arrow:hover, .week-arrow:focus-visible { background: var(--primary-pale); }
.week-navigation-heading { flex: 1 1 auto; min-width: 12rem; }
.week-navigation-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.go-to-today { display: inline-block; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--paper); color: var(--ink); padding: .35rem .6rem; font-size: .78rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.go-to-today:hover, .go-to-today:focus-visible { border-color: var(--secondary-accent); background: var(--secondary-pale); }
.week-context-label { display: inline-block; border-radius: var(--corner); margin: .25rem .35rem 0 0; padding: .2rem .5rem; color: var(--ink); font-size: .9rem; font-weight: 700; text-align: center; }
.week-context-current { background: var(--primary-pale); }
.week-context-previous { background: var(--week-previous-pale); }
.week-context-next { background: var(--week-next-pale); color: var(--week-next-ink); }
.temporary { border-left: 3px solid var(--secondary-accent); color: var(--muted); padding-left: .65rem; font-size: .85rem; }

.timetable-scroll { max-width: 100%; overflow-x: auto; }
.week-grid, .admin-week-grid { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.week-grid th, .week-grid td, .admin-week-grid th, .admin-week-grid td { border: 1px solid var(--rule); }
.week-grid thead th, .admin-week-grid thead th { height: 2.5rem; border-bottom: 2px solid var(--rule-strong); padding: .35rem; }
.week-grid thead th:first-child { width: 7rem; min-width: max-content; }
.week-grid thead .day-label { min-width: 9rem; }
.separator-axis, .separator-cell { background: #f7f7f7; color: var(--muted); font-size: .75rem; }
.period-label { width: 7rem; min-width: max-content; padding: .6rem .75rem; text-align: center; vertical-align: middle; white-space: nowrap; }
.today-heading { background: var(--primary-pale); }
.day-label { padding: .6rem; text-align: center; vertical-align: middle; white-space: nowrap; font-family: var(--sans); }
.day-label a { color: inherit; text-decoration: none; }
.day-label a:hover, .day-label a:focus-visible { text-decoration: underline; }
.today-row .day-label { background: var(--primary-pale); font-weight: 750; }
.week-grid td { height: 7rem; padding: .3rem; vertical-align: top; }
.week-grid td.past-date-cell, .week-grid td.past-lesson-cell, .teacher-day-table tr.past-lesson-row > th, .teacher-day-table tr.past-lesson-row > td { background: #edf7ed; }
.week-grid tr.separator-row th, .week-grid tr.separator-row td { height: 1.5rem; padding-top: .12rem; padding-bottom: .12rem; }
.day-view-heading { margin: .25rem 0 0; font-size: 1rem; font-weight: 500; }
.day-picker { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem; margin: var(--space-4) 0; }
.day-picker label { margin: 0; }
.date-display { color: var(--muted); font-family: var(--technical); font-size: .9rem; padding-bottom: .45rem; }
.teacher-day-table-wrap { max-width: 100%; overflow-x: auto; }
.teacher-day-table { width: 100%; min-width: 48rem; border-collapse: collapse; table-layout: fixed; font-family: var(--technical); }
.teacher-day-table th, .teacher-day-table td { border: 1px solid var(--rule); padding: .35rem .45rem; text-align: left; vertical-align: top; }
.teacher-day-table thead th { background: #f7f7f7; font-family: var(--sans); font-weight: 750; }
.teacher-day-table thead th:first-child, .teacher-day-table tbody th { width: 5.6rem; }
.teacher-day-table thead th:nth-child(2) { width: 5.5rem; }
.teacher-day-table tbody th { white-space: normal; }
.teacher-day-table td a { font-family: var(--sans); white-space: nowrap; }
.lesson-date-box { display: inline-flex; flex-direction: column; gap: .12rem; line-height: 1.15; white-space: nowrap; }
.lesson-date-box span:last-child { color: var(--muted); font-size: .88em; }
.lesson-context-cell { min-width: 0; font-family: var(--sans); overflow-wrap: anywhere; word-break: break-word; }
.lesson-context-cell strong, .lesson-context-cell span { display: block; }
.lesson-context-cell strong { color: var(--class-code); }
.lesson-context-cell span { color: var(--room-code); font-size: .9em; }
.day-lesson-section { min-width: 0; font-family: var(--sans); }
.day-lesson-section[data-section] { cursor: text; outline-offset: -2px; }
.day-lesson-section[data-section]:focus-visible { outline: 2px solid var(--primary-accent); }
.day-lesson-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: .78rem; font-weight: 750; }
.day-lesson-value { margin-top: .3rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.inline-lesson-form { margin-top: .35rem; }
.inline-lesson-form textarea { box-sizing: border-box; width: 100%; min-height: 5rem; max-width: 100%; resize: none; overflow-y: hidden; }
.inline-lesson-form .form-actions { flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.inline-save-status { margin-left: .4rem; color: var(--muted); font-size: .85rem; }
.inline-lesson-form .requisition-editor { min-height: 5rem; }
.template-summary-row { margin: .35rem 0; }
.empty-cell { background: #fff; }
.account-identity { display: grid; grid-template-columns: minmax(11rem, 1fr) minmax(0, 2fr); gap: .45rem 1rem; }
.account-identity dt { font-weight: 700; }
.account-identity dd { margin: 0; }
.recovery-key textarea { min-height: 4.5rem; font-family: var(--technical); overflow-wrap: anywhere; resize: none; }

.lesson-block {
    display: flex;
    min-height: 6.35rem;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid var(--class-border, var(--rule));
    border-radius: var(--corner);
    background: color-mix(in srgb, var(--lesson-accent, #fff) 24%, #fff);
    box-shadow: 0 0 0 1px var(--lesson-accent, transparent), 0 2px 5px rgb(0 0 0 / 9%);
    color: inherit;
    text-decoration: none;
}
.week-grid .lesson-block {
    touch-action: pan-x pan-y;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}
.lesson-block:hover, .lesson-block:focus-visible { box-shadow: 0 0 0 2px var(--lesson-accent, var(--ink)), var(--interactive-shadow); }
.lesson-block.copy-target { outline: 2px dashed var(--primary-accent); outline-offset: -5px; }
.lesson-block.copy-source { opacity: .72; cursor: grabbing; }
.lesson-block.copy-over { outline: 4px solid var(--week-next-ink); outline-offset: -5px; box-shadow: 0 0 0 3px var(--week-next-pale); }
.lesson-copy-ghost { position: fixed; z-index: 1000; max-width: 13rem; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--paper); box-shadow: var(--interactive-shadow); padding: .4rem .6rem; font-family: var(--sans); font-size: .82rem; font-weight: 700; pointer-events: none; }
.lesson-copy-active, .lesson-copy-active * { cursor: grabbing !important; }
.lesson-copy-saving .lesson-block { pointer-events: none; }
.lesson-header { display: flex; justify-content: space-between; gap: .4rem; min-width: 0; border-bottom: 1px solid var(--rule); padding: .28rem .4rem; font-size: .8rem; line-height: 1.2; }
.lesson-header strong { min-width: 0; overflow: hidden; color: var(--class-code); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.lesson-header > span { flex: 0 0 auto; color: var(--room-code); white-space: nowrap; }
.lesson-body { overflow: hidden; padding: .45rem; color: var(--ink); font-size: .82rem; line-height: 1.3; font-family: Arial, Helvetica, sans-serif; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lesson-body .muted { color: var(--muted); font-family: var(--sans); font-style: italic; }
.lesson-body[data-week-requisition] { position: relative; }
.week-requisition-text { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
.lesson-body.is-editing { display: block; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; }
.week-requisition-editor { box-sizing: border-box; display: block; width: 100%; min-height: 1.3rem; padding: 0; border: 0; outline: 1px solid var(--primary-accent); background: transparent; color: inherit; font: inherit; line-height: inherit; resize: none; overflow: hidden; user-select: text; -webkit-user-select: text; }
.week-save-error { display: block; margin-top: .2rem; color: #8c1d2c; font-family: var(--sans); font-size: .68rem; }
.week-save-retry { margin: .15rem 0 0; border: 0; padding: 0; background: transparent; color: #8c1d2c; font-family: var(--sans); font-size: .68rem; text-decoration: underline; }
.class-tone-0 { --lesson-accent: var(--class-tone-0); --class-border: var(--class-border-0); }
.class-tone-1 { --lesson-accent: var(--class-tone-1); --class-border: var(--class-border-1); }
.class-tone-2 { --lesson-accent: var(--class-tone-2); --class-border: var(--class-border-2); }
.class-tone-3 { --lesson-accent: var(--class-tone-3); --class-border: var(--class-border-3); }
.class-tone-4 { --lesson-accent: var(--class-tone-4); --class-border: var(--class-border-4); }
.class-tone-5 { --lesson-accent: var(--class-tone-5); --class-border: var(--class-border-5); }
.class-tone-6 { --lesson-accent: var(--class-tone-6); --class-border: var(--class-border-6); }
.class-tone-7 { --lesson-accent: var(--class-tone-7); --class-border: var(--class-border-7); }

dialog { width: min(55rem, calc(100% - 2rem)); max-width: none; max-height: calc(100vh - 3rem); margin: 1.5rem auto; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--paper); box-shadow: 0 10px 35px rgb(0 0 0 / 18%); padding: var(--space-5); }
dialog::backdrop { background: rgb(0 0 0 / 35%); }
dialog:not([open]) { display: none; }
dialog h2 { margin: 0 0 .35rem; }
dialog .close { float: right; }
.compact-dialog { width: min(32rem, calc(100% - 2rem)); }
.copy-status { min-height: 1.5rem; margin-top: .65rem; color: #176b3a; font-size: .9rem; font-weight: 650; }
.copy-status.error { border: 0; background: transparent; color: #8c1d2c; padding: 0; }
.lesson-context { border-left: 3px solid var(--primary-accent); margin: 0 0 var(--space-4); padding: .55rem .7rem; font-family: var(--technical); }
#lesson-editor .field-outline textarea { min-height: 7rem; }
#lesson-editor .field-requisitions textarea { min-height: 12rem; }
#lesson-editor .field-risk textarea { min-height: 5.5rem; }
.check-label { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
.check-label input { width: auto; margin: 0; }

.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.contextual-resource-actions { display: inline-flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.contextual-resource-actions form { display: inline-flex; align-items: center; gap: .4rem; }
.contextual-resource-actions button { margin: 0; }
.resource-added { color: #176b3a; font-weight: 700; white-space: nowrap; }
.resource-error { color: #8c1d2c; font-size: .9rem; }
.validate-again-form { margin-top: 1.25rem; }
.people-table-toolbar { display: flex; justify-content: flex-end; margin: var(--space-3) 0 var(--space-2); }
.people-table-wrap { overflow-x: auto; border: 1px solid var(--rule); }
.people-table { width: 100%; min-width: 40rem; border-collapse: collapse; }
.people-table th, .people-table td { border: 1px solid var(--rule); padding: .65rem .7rem; text-align: left; vertical-align: top; }
.people-table thead th { background: #f7f7f7; font-weight: 750; }
.people-table tbody th { font-weight: 650; }
.person-dialog { width: min(38rem, calc(100% - 2rem)); }
.settings-section, .editor-section { border-top: 1px solid var(--rule); margin-top: var(--space-5); padding-top: var(--space-3); }
.day-options, .room-list, .separator-list { display: grid; gap: .5rem; }
.day-options { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.blocking-state { min-height: 70vh; display: grid; place-content: center; text-align: center; }
.blocking-state h1 { margin: 0; font-size: clamp(2rem, 6vw, 4rem); }
.context { border-left: 3px solid var(--ink); padding: .65rem .8rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; border-bottom: 1px solid var(--rule); padding: .9rem 0; }
.toolbar label { min-width: 13rem; margin: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.section-heading h2 { margin: 0; }
.admin-week-grid thead th:first-child { width: 1%; font-family: var(--sans); }
.admin-week-grid th, .admin-week-grid td { padding: .35rem; vertical-align: top; }
.admin-week-grid td { height: 6.4rem; }
.admin-week-grid .day-label { font-family: var(--sans); font-weight: 750; }
.admin-week-grid .separator-column, .admin-week-grid .separator-cell { background: #f7f7f7; color: var(--muted); font-size: .75rem; }
.admin-week-grid .separator-column { width: 2.8rem; }
.empty-period { display: flex; min-height: 5.5rem; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: .25rem; color: var(--muted); text-decoration: none; }
.empty-period span { font: 1.5rem/1 var(--sans); }
.empty-period small { font-family: var(--sans); }
.empty-period:hover, .empty-period:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--primary-pale); color: var(--ink); }
.admin-lesson { display: flex; min-height: 100%; height: 100%; box-sizing: border-box; flex-direction: column; gap: .2rem; border: 3px solid var(--class-border, var(--rule)); border-radius: var(--corner); padding: .45rem; color: inherit; background: color-mix(in srgb, var(--lesson-accent, #fff) 24%, #fff); box-shadow: 0 2px 5px rgb(0 0 0 / 9%); text-decoration: none; }
.admin-lesson:hover, .admin-lesson:focus-visible { box-shadow: 0 0 0 2px var(--lesson-accent, var(--ink)), var(--interactive-shadow); }
.admin-lesson strong { color: var(--class-code); font-size: 1rem; font-weight: 600; }
.admin-lesson span { color: var(--room-code); font-size: .9rem; }
.admin-lesson small { margin-top: auto; color: var(--muted); font-family: var(--sans); }
.admin-lesson strong { color: var(--class-code); font-size: 1rem; font-weight: 600; }
.admin-lesson span { color: var(--room-code); font-size: .9rem; }
.admin-lesson small { margin-top: auto; color: var(--muted); font-family: var(--sans); }
.lesson-dialog { display: block; }
.lesson-dialog form:first-child, .delete-form { max-width: 42rem; margin: 0 auto; }
.delete-form { margin-top: 1rem; }
.danger { border-color: #8b2635; background: #fff; color: #8b2635; box-shadow: none; }
.danger:hover { background: #fff3f3; border-color: #8b2635; color: #8b2635; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; }
.inline-form label { flex: 1 1 10rem; margin: 0; }
.timetable-toolbar { margin-top: var(--space-4); border: 1px solid var(--rule); background: #fff; padding: .8rem; }
.timetable-toolbar form { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.timetable-toolbar label { flex: 1 1 10rem; margin: 0; }
.timetable-toolbar select { min-width: 9rem; }
.resource-create { max-width: 34rem; margin: var(--space-5) 0; border-top: 1px solid var(--rule); padding-top: var(--space-4); }
.admin-resource-grid table { width: 100%; min-width: 52rem; border-collapse: collapse; table-layout: fixed; }
.admin-resource-grid th, .admin-resource-grid td { min-width: 9rem; height: 6.4rem; border: 1px solid var(--rule); padding: .35rem; vertical-align: top; }
.admin-resource-grid th:first-child { min-width: 6rem; width: 6rem; }
.admin-resource-grid .timetable-separator th, .admin-resource-grid .timetable-separator td { height: 2.1rem; background: #f7f7f7; color: var(--muted); font-size: .78rem; }
.admin-resource-grid .admin-lesson { height: 5.45rem; }
.admin-resource-grid .empty-cell { background: #fff; }
.admin-resource-grid .empty-period { min-height: 5.2rem; }
.fixed-resource { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--primary-pale); padding: .55rem .7rem; }
.fixed-resource span { color: var(--muted); font-size: .82rem; }
.assignment-dialog, .resource-dialog { position: fixed; top: 50%; left: calc(10.5rem + 1rem); right: 1rem; width: auto; max-width: 38rem; max-height: calc(100vh - 3rem); margin: 0 auto; transform: translateY(-50%); }
.room-free { display: grid; min-height: 4rem; place-items: center; color: var(--muted); font-size: .75rem; letter-spacing: .04em; }
.technician-cell-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .35rem; font-size: .9em; }
.technician-cell-heading > :last-child { text-align: right; }
.technician-cell-heading span { font-weight: 700; }
.technician-prepped { color: #176b35; font-size: 1.15rem; line-height: 1; text-align: center; }
.technician-prepped-empty { display: block; min-width: 1rem; }
.technician-requisition { display: -webkit-box; overflow: hidden; margin-top: .25rem; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; }
.technician-cell { font-family: Arial, Helvetica, sans-serif; border: 3px solid var(--class-border, var(--rule)); border-radius: var(--corner); cursor: pointer; }
.technician-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.technician-cell summary { font-size: 12px; line-height: 1.25; }
.technician-cell { overflow: visible; }
.technician-requisition-control { position: relative; display: block; margin-top: .25rem; cursor: pointer; outline-offset: 2px; }
.technician-requisition-control:focus-visible { outline: 2px solid var(--ink); }
.technician-requisition-popout { position: absolute; z-index: 10; top: calc(100% + .3rem); left: 0; width: min(28rem, calc(100vw - 2rem)); max-height: min(70vh, 24rem); box-sizing: border-box; overflow: auto; padding: .65rem; border: 1px solid var(--rule-strong); border-radius: var(--corner); background: #fff; color: var(--ink); box-shadow: var(--interactive-shadow); white-space: pre-wrap; overflow-wrap: anywhere; opacity: 0; pointer-events: none; }
.technician-requisition-control:hover .technician-requisition-popout, .technician-requisition-control:focus-within .technician-requisition-popout, .technician-requisition-control.is-open .technician-requisition-popout { opacity: 1; pointer-events: auto; }
.technician-week-print .technician-sheet { break-after: page; break-inside: avoid; }
@media print { .technician-week-print .technician-sheet { min-height: 0; break-after: page; break-inside: avoid; } .technician-week-print .technician-sheet:last-child { break-after: auto; } .site-nav, .page-header, .technician-controls, .technician-room-controls, .technician-secondary { display: none !important; } }
.assignment-dialog form, .resource-dialog form { max-width: none; margin: 0; }
.assignment-dialog .lesson-context { margin-top: .9rem; }
.technician-placeholder { padding-top: var(--space-5); }
.technician-controls { display: flex; align-items: center; gap: .7rem; margin: var(--space-4) 0; }
.technician-date { min-width: 16rem; text-align: center; font-family: var(--technical); }
.technician-room-controls { display: flex; flex-wrap: wrap; gap: 1rem; border: 1px solid var(--rule); padding: .8rem; margin-bottom: var(--space-4); }
.technician-room-controls form { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem; }
.technician-room-controls label { margin: 0; }
.technician-room-controls .check-label { align-items: center; }
.technician-room-controls fieldset { display: contents; border: 0; margin: 0; padding: 0; }
.technician-room-controls legend { font-weight: 700; padding: 0; }
.technician-room-actions, .technician-room-list { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; }
.technician-printer-logic { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; border: 0; margin: .7rem 0 0; padding: 0; }
.technician-printer-logic legend { font-weight: 700; padding: 0; }
.technician-printer-logic .check-label { align-items: center; }
.printer-logic-summary { flex-basis: 100%; margin: 0; }
.technician-sheet { font-family: var(--technical); }
.print-date { margin: 0 0 .7rem; font-size: 1rem; text-align: center; }
.technician-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.technician-grid th, .technician-grid td { border: 1px solid var(--rule); padding: .3rem; vertical-align: top; }
.technician-grid th:first-child { width: 3.25rem; min-width: 3.25rem; text-align: center; vertical-align: middle; white-space: nowrap; }
.technician-grid td { height: 4.2rem; }
.technician-separator th, .technician-separator td { height: 1.5rem; background: #eee; color: var(--muted); }
.technician-cell { height: 100%; overflow: hidden; }
.technician-cell summary { display: block; overflow: hidden; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; }
.technician-detail { position: relative; z-index: 2; margin-top: .4rem; padding: .55rem; border: 1px solid var(--rule); background: #fff; font-family: var(--sans); font-size: .82rem; }
.technician-detail p { margin: .45rem 0; }
.technician-prep-form { margin: .65rem 0; }
.technician-prep-form button { font-size: .8rem; }
.technician-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: .65rem 0; }
.technician-actions .technician-prep-form { margin: 0 .35rem 0 0; }
.technician-highlight-form { margin: 0; }
.technician-highlight-control, .technician-highlight-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; box-sizing: border-box; border: 2px solid #555; border-radius: 50%; padding: 0; }
.technician-highlight-control { cursor: pointer; }
.technician-highlight-control.is-active { outline: 2px solid var(--ink); outline-offset: 2px; }
.technician-highlight-setting { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; }
.technician-highlight-1 { --highlight-bg: #fff0b8; background: #fff0b8; color: #4d3b00; }
.technician-highlight-2 { --highlight-bg: #d9f2df; background: #d9f2df; color: #174d29; }
.technician-highlight-3 { --highlight-bg: #dcecff; background: #dcecff; color: #163d68; }
.technician-highlight-4 { --highlight-bg: #f5dded; background: #f5dded; color: #642143; }
.technician-highlight-5 { --highlight-bg: #eadfff; background: #eadfff; color: #3e2866; }
.technician-cell[class*="technician-highlight-"] { background: var(--highlight-bg); }
.technician-secondary { margin-top: var(--space-4); }
.technician-sheet[data-print-layout="vertical"] .technician-grid td, .technician-sheet[data-print-layout="vertical"] .technician-cell,
.technician-sheet[data-print-layout="vertical-horizontal"] .technician-grid td, .technician-sheet[data-print-layout="vertical-horizontal"] .technician-cell { height: auto; overflow: visible; }
.technician-sheet[data-print-layout="vertical"] .technician-requisition, .technician-sheet[data-print-layout="vertical-horizontal"] .technician-requisition { -webkit-line-clamp: unset; }

@media (max-width: 48rem) {
    .site-shell { display: block; }
    .site-nav { border-right: 0; border-bottom: 1px solid var(--rule); padding: .8rem 1rem; }
    .wordmark { margin: 0 1.2rem 0 0; }
    .site-nav ul { display: inline-flex; gap: .25rem .5rem; flex-wrap: wrap; }
    .site-nav li { margin: 0; }
    .site-nav li.nav-divider { border-top: 0; margin-top: 0; padding-top: 0; }
    .site-nav li.nav-separator { border-top: 1px solid var(--rule-strong); margin: .55rem 0; flex-basis: 100%; }
    .site-main { padding: 1.2rem 1rem; }
    .week-navigation { flex-wrap: wrap; }
    .week-navigation-heading { order: 2; flex-basis: calc(100% - 4rem); }
    .week-navigation-actions { order: 3; }
    .section-heading { display: block; }
    .toolbar label { flex: 1 1 100%; }
    .timetable-toolbar form { display: grid; grid-template-columns: 1fr; }
    .timetable-toolbar label, .timetable-toolbar .button { width: 100%; box-sizing: border-box; }
    dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); margin: .5rem auto; padding: 1rem; }
    .assignment-dialog, .resource-dialog { top: .5rem; left: .5rem; right: .5rem; width: auto; max-width: none; max-height: calc(100vh - 1rem); transform: none; }
    .donation-methods { grid-template-columns: 1fr; }
    .showcase-feature, .showcase-people { grid-template-columns: 1fr; gap: 1rem; }
    .showcase-secondary-grid, .showcase-admin-images, .how-to-image-grid { grid-template-columns: 1fr; }
}

@media print {
    :root { --ink: #000; --rule: #000; --rule-strong: #000; }
    body { background: #fff; color: #000; }
    .site-nav, .beta-banner, .page-header a, dialog, .temporary, .button, button { display: none !important; }
    .tenant-name { display: none !important; }
    .site-shell { display: block; }
    .site-main { width: 100%; padding: 0; }
    .lesson-block, .admin-lesson, .week-grid th, .week-grid td, .admin-week-grid th, .admin-week-grid td, .teacher-day-table tr.past-lesson-row > th, .teacher-day-table tr.past-lesson-row > td { background: #fff !important; color: #000 !important; box-shadow: none !important; }
    .lesson-block, .admin-lesson { border-color: #000 !important; }
    .lesson-header strong, .lesson-header > span { color: #000 !important; }
    @page { size: A4 landscape; margin: 4mm; }
    .technician-controls, .technician-room-controls, .technician-secondary, .technician-sheet .technician-detail, .technician-requisition-popout, .technician-cell summary::marker { display: none !important; }
    .technician-sheet { display: block; zoom: var(--technician-print-scale, 1); }
    .technician-sheet + .technician-sheet { break-before: page; page-break-before: always; }
    .technician-sheet[data-print-layout="vertical"], .technician-sheet[data-print-layout="vertical-horizontal"] { break-inside: auto !important; page-break-inside: auto !important; }
    .technician-sheet[data-print-layout="vertical"] .technician-grid, .technician-sheet[data-print-layout="vertical-horizontal"] .technician-grid { break-inside: auto; page-break-inside: auto; }
    .technician-grid thead { display: table-header-group; }
    .technician-grid tr { break-inside: avoid; page-break-inside: avoid; }
    .technician-grid { font-size: 8pt; }
    .technician-grid th, .technician-grid td { height: auto; padding: .7mm; }
    .technician-grid th:first-child { width: 8mm; min-width: 8mm; }
    .technician-grid th { font-size: 7pt; line-height: 1.1; }
    .technician-cell { display: block; border-color: #000 !important; }
    .technician-cell summary { display: block; white-space: normal; }
    .technician-requisition, .technician-requisition-control { display: block; max-height: none; overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
    .technician-requisition { line-height: 1.15; }
    .print-date { margin: 0 0 1.5mm; font-size: 9pt; line-height: 1.1; }
    .technician-prepped { color: #000 !important; }
}

/* Chromium uses this compact print geometry while the load-time measurement
   pass calculates a fit scale for the one-page and horizontal layouts. */
.technician-print-measuring .site-main { width: 1092px; padding: 0; }
.technician-print-measuring .site-nav,
.technician-print-measuring .beta-banner,
.technician-print-measuring .tenant-name,
.technician-print-measuring .technician-controls,
.technician-print-measuring .technician-room-controls,
.technician-print-measuring .technician-secondary,
.technician-print-measuring .technician-sheet .technician-detail,
.technician-print-measuring .technician-requisition-popout { display: none !important; }
.technician-print-measuring .technician-sheet { width: 1092px; font-family: var(--technical); }
.technician-print-measuring .technician-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8pt; }
.technician-print-measuring .technician-grid th,
.technician-print-measuring .technician-grid td { height: auto; padding: .7mm; vertical-align: top; }
.technician-print-measuring .technician-grid th:first-child { width: 8mm; min-width: 8mm; }
.technician-print-measuring .technician-cell { display: block; overflow: visible; }
.technician-print-measuring .technician-cell summary { display: block; white-space: normal; }
.technician-print-measuring .technician-requisition,
.technician-print-measuring .technician-requisition-control { display: block; max-height: none; overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
.technician-print-measuring .technician-requisition { line-height: 1.15; }
.technician-print-measuring .print-date { margin: 0 0 1.5mm; font-size: 9pt; line-height: 1.1; }
