body.school {
  min-width: 320px;
  --emerald-deep: #132e26;
  --gold: #eab949;
  --glass-fill: rgb(246 251 245 / .88);
  --glass-rim: #d8e3d8;
  --glass-sheen: linear-gradient(148deg, rgb(255 255 255 / .95), rgb(229 242 231 / .48));
}
.school-header { background: var(--emerald-deep); border-bottom: 1px solid #2b5446; color: #f8f6ee; }
.school-header > div { max-width: 1120px; margin: auto; padding: .65rem 1rem; display: flex; align-items: center; gap: .6rem 1.1rem; flex-wrap: wrap; }
.school-brand { display: inline-flex; align-items: center; gap: .55rem; color: #f8f6ee; font-weight: 800; text-decoration: none; }
.school-brand small { display: block; font-weight: 700; color: #e8cf8e; line-height: 1.15; }
.school-header nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.school-header nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; border-radius: 8px; padding: .45rem .75rem; font-size: .875rem; font-weight: 800; color: #eef4ee; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.school-header nav a:hover { background: rgb(255 255 255 / .12); color: #ffffff; }
.school-header nav a.is-active { background: var(--gold); color: var(--emerald-deep); }
.school-header .sign-out .button { background: rgb(255 255 255 / .12); color: #f8f6ee; border-color: rgb(234 185 73 / .45); }
.school-header .sign-out .button:hover { background: rgb(255 255 255 / .2); }
.school .button { box-shadow: 0 1px 2px rgb(24 52 45 / .12); transition: background-color 150ms ease, border-color 150ms ease, transform 80ms ease; }
.school .button:active { transform: translateY(1px); }
.school .secondary { border-color: #b8c9bc; }
.sign-out { margin-left: auto; }
.school-content, .school-footer { max-width: 1050px; padding: 0 1rem; margin: 1.65rem auto; }
.school-footer { text-align: end; color: var(--pine); }
.school-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 800; }
.school-intro { margin: .55rem 0 1.25rem; color: var(--muted); }
.school-panel, .login-panel { padding: 1.1rem; }
.school .stacked { margin-top: 1.15rem; }
.school-panel h2 + p, .school-panel p + p, .school-panel p + .button { margin-top: .65rem; }
.school-panel h3 { margin: .75rem 0 .35rem; }
.school-panel :is(ul,form) { margin-top: .75rem; }
.login-panel { margin: 3rem auto; max-width: 420px; }
.login-panel p { color: var(--muted); margin: .6rem 0 1rem; text-wrap: pretty; }
.login-panel form { display: grid; gap: 1rem; }
.password-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem; align-items: end; }
.password-control .button { min-width: 4rem; }
.sign-in-help { margin-top: .85rem; border-top: 1px solid var(--line); padding-top: .2rem; }
.sign-in-help summary { color: var(--pine); }
.offline-mark { display: block; border-radius: 8px; margin-bottom: .75rem; }
.feedback { border: 1px solid #c0d7c3; background: var(--mint); color: var(--pine); padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 800; }
.feedback.error { background: #fff1ef; border-color: #edc6c8; color: var(--danger); }
.register-list, .student-register { list-style: none; padding: 0; margin: 0; }
.register-section-title { padding: .85rem 1rem; background: var(--canvas); border-block: 1px solid var(--line); }
.register-section-title:first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.register-list li, .student-register li { display: grid; align-items: center; padding: .72rem 1rem; gap: .45rem 1rem; }
.register-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.register-list li:not(:last-child), .student-register li:not(:last-child) { border-bottom: 1px solid var(--line); }
.register-list small, .student-name small { color: var(--muted); display: block; margin-top: .1rem; }
.register-list .status { justify-self: start; }
.register-picker { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; padding: .9rem 1rem; }
.register-picker .control:first-child { min-width: min(210px,100%); }
.register-state { padding: .55rem 1rem; color: var(--muted); }
.register-state .status { margin-right: .35rem; }
.register-tools { margin: .1rem 1rem .3rem; }
.register-tools .task-actions { margin-bottom: .7rem; }
.register-tools .register-picker { padding: .35rem 0 .65rem; }
.student-register { border-top: 1px solid var(--line); margin-top: .45rem; }
.student-register li { grid-template-columns: minmax(0, 1fr) auto; transition: background-color 140ms ease; }
.student-register li:has(input[value="Absent"]:checked) { background: #fff4f3; }
.student-register li:has(input[value="Late"]:checked) { background: #fff9ec; }
.student-register li:has(input[value="Excused"]:checked) { background: #f7f4fb; }
.student-name { overflow-wrap: anywhere; }
.mark-options { display: flex; flex-wrap: wrap; border: 0; margin: 0; padding: 0; min-width: 0; gap: .3rem; }
.mark-options label { position: relative; cursor: pointer; }
.mark-options span:not(.sr-only) { min-height: 44px; min-width: 68px; padding: .46rem .55rem; background: var(--white); border: 1px solid var(--line); border-radius: 8px; display: grid; place-content: center; font-size: .875rem; font-weight: 800; }
.mark-options input { position: absolute; width: 1px; min-height: 0; height: 1px; padding: 0; opacity: 0; }
.mark-options input:hover + span { background: var(--canvas); }
.mark-options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.mark-options input:checked + span { background: var(--mint); border-color: #76a888; color: var(--pine); }
.mark-options input[value="Absent"]:checked + span { background: #f9e9e8; border-color: #bf8284; color: var(--danger); }
.mark-options input[value="Late"]:checked + span { background: var(--sand); border-color: #ba984f; color: #624412; }
.mark-options input[value="Excused"]:checked + span { background: var(--lilac); border-color: #a798b9; color: #53416a; }
.paper-status { display: none; }
.register-save { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--line); background: var(--white); border-radius: 0 0 var(--radius) var(--radius); }
.register-save span { margin-right: auto; font-size: .875rem; font-weight: 800; color: var(--muted); }
.school-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem 1rem; margin-bottom: .75rem; }
.class-preview { columns: 2; }
.file-control { max-width: 500px; margin-bottom: .65rem; }
.file-control input { min-height: 47px; }
.school-lookup { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.school-lookup .control:has(input[type="search"]) { width: min(330px, 100%); }
.teacher-periods { margin: .35rem 0 .8rem; }
.teacher-periods > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .7rem; align-items: baseline; padding: .5rem 0; border-top: 1px solid var(--line); }
.teacher-periods dt { color: var(--muted); font-weight: 700; }
.teacher-periods dd { margin: 0; overflow-wrap: anywhere; }
.teacher-periods .status { margin-right: .4rem; }
.timetable-list { list-style: none; padding: 0; }
.timetable-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.timetable-list li form { margin: 0; }
.timetable-list small { display: block; color: var(--muted); }
.timetable-list p { margin-top: .25rem; }
.student-matches small { display: block; color: var(--muted); }
.student-details { margin-top: 1rem; }
.student-details dt { font-weight: 800; }
.student-details dd { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.install-help h2:not(:first-child) { margin-top: 1rem; }
#install-app { margin-top: .65rem; }
[hidden] { display: none !important; }
@media (max-width: 650px) {
  .student-register li { grid-template-columns: 1fr; }
  .mark-options { display: grid; grid-template-columns: repeat(4, minmax(44px, 1fr)); }
  .mark-options span:not(.sr-only) { min-width: 0; padding-inline: .25rem; font-size: .8125rem; }
  .school-header > div { row-gap: .35rem; }
  .school-header nav { order: 3; width: 100%; }
  .school-header nav a { min-width: 44px; justify-content: center; padding-inline: .4rem; }
  .register-list li { grid-template-columns: 1fr auto; }
  .register-list li .button { grid-column: 1 / -1; justify-self: start; }
  .school-form-grid, .class-preview { display: block; columns: auto; }
  .school-form-grid .control + .control { margin-top: .6rem; }
}
@media print {
  body.print-register { background: white; }
  .print-register :is(.school-header,.school-footer,.register-picker,.register-state,.register-save,.register-tools,.student-mark,.feedback,.skip) { display: none !important; }
  .print-register .school-content { max-width: none; padding: 0; margin: 0; }
  .print-register .student-register li { grid-template-columns: minmax(0,1fr) 45%; padding: .32rem .65rem; break-inside: avoid; }
  .print-register .paper-status { display: block; border-bottom: 1px solid #999; height: 1.1rem; }
}
.register-find { padding: .65rem 1rem; display: flex; gap: .7rem; align-items: end; flex-wrap: wrap; }
.register-find .control { width: min(300px,100%); }
.register-find p { color: var(--muted); margin-bottom: .45rem; }
.register-save > div { margin-right: auto; }
.register-save > div small { display: block; color: #624412; font-weight: 800; }
.school-content :is(h1,h2,h3) { overflow-wrap: anywhere; }
.school-content > p + h1, .school-content > h1 + .panel { margin-top: .8rem; }
.saved-answer-status { color: var(--muted); font-size: .875rem; font-weight: 800; }
.saved-answer-status.is-saved { color: var(--pine); }
.school-content > p + p { margin-top: .65rem; }
.task-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.dashboard-tools { margin: 1rem 0; }
.attendance-dashboard { display: grid; align-items: start; gap: 1rem; }
.attendance-dashboard > section { min-width: 0; }
.attendance-chart p { color: var(--muted); }
.school-chart { margin: .85rem 0; padding: 0; list-style: none; }
.school-chart li + li { margin-top: .75rem; }
.chart-label { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .875rem; }
.chart-label strong { color: var(--forest); text-align: end; }
.school-chart meter { display: block; width: 100%; height: .7rem; margin-top: .25rem; accent-color: var(--pine); }
.school-chart meter::-webkit-meter-bar { background: var(--sage); border: 0; border-radius: 99px; }
.school-chart meter::-webkit-meter-optimum-value { background: var(--pine); border-radius: 99px; }
.school-chart meter::-moz-meter-bar { background: var(--pine); border-radius: 99px; }
.today-checks, .family-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1rem; }
.today-checks a, .family-actions a { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; padding: .5rem .7rem; color: var(--pine); background: var(--white); border: 1px solid var(--line); border-radius: 8px; font-weight: 800; }
.today-checks a:hover, .family-actions a:hover { background: var(--sage); }
.today-checks strong { font-size: 1rem; }
.task-form { display: grid; gap: .8rem; overflow-wrap: anywhere; align-items: start; }
.task-form > .button { justify-self: start; }
.task-form details > .control { margin-top: .6rem; }
.task-list { padding: 0; list-style: none; overflow-wrap: anywhere; }
.task-list > li { padding: .6rem 0; border-top: 1px solid var(--line); }
.task-list :is(small,strong) { display: block; }
.task-list small { color: var(--muted); }
.task-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.family-test a.button { margin-top: .45rem; text-decoration: none; }
.task-list .student-details { margin-top: .3rem; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.school summary { min-height: 44px; padding: .55rem 0; cursor: pointer; font-weight: 800; }
.school summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.question { min-width: 0; }
.question fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.class-access { border: 1px solid var(--line); min-width: 0; border-radius: 8px; padding: .55rem .8rem; }
.class-access legend { font-weight: 800; }
.question legend { font-weight: 800; padding: 0; overflow-wrap: anywhere; }
.question-marks { margin: .25rem 0 .65rem; font-size: .875rem; color: var(--muted); }
.answer-choice { display: flex; gap: .7rem; align-items: center; min-height: 46px; cursor: pointer; }
.question .answer-choice { margin-top: .4rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; }
.question .answer-choice:has(input:checked) { border-color: #76a888; background: var(--mint); }
.question .answer-blank { margin-top: .3rem; padding-block: .25rem; border-color: transparent; color: var(--muted); }
.answer-choice input { accent-color: var(--pine); width: 1.2rem; height: 1.2rem; min-height: auto; flex: none; }
.test-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--pine); }
.question-import { max-width: 46rem; }
.question-review { padding: 0; list-style: none; }
.question-review > li { border-top: 1px solid var(--line); padding-block: .9rem; }
.question-review > li > h3 { margin-top: 0; }
.review-options { padding-inline-start: 1.65rem; margin: .45rem 0 0; overflow-wrap: anywhere; }
.review-options li + li { margin-top: .3rem; }
.review-options strong { color: var(--pine); }
.question-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .7rem; }
.question-actions form { margin: 0; }
.paste-example { white-space: pre-wrap; overflow-wrap: anywhere; padding: .65rem; background: var(--canvas); border-radius: 8px; }
.question-paste { min-height: 13rem; }
.drafting-prompt { min-height: 10rem; }
.copy-prompt { margin-top: .6rem; }
.temporary-password { font-family: ui-monospace, monospace; }
.test-feedback { font-weight: 800; }
@media (min-width: 950px) {
  .attendance-dashboard { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .school :is(.register-save, .login-panel) {
    background-color: var(--glass-fill);
    background-image: var(--glass-sheen);
    border-color: var(--glass-rim);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
  }
  .school .school-header {
    background-color: rgb(19 46 38 / .93);
    border-bottom-color: #2b5446;
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
  }
  .school :is(.today-checks, .family-actions) a {
    background: var(--glass-sheen), var(--glass-fill);
    border-color: var(--glass-rim);
  }
  .school :is(.today-checks, .family-actions) a:hover { background: var(--sage); }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .school :is(.register-save, .login-panel, .today-checks a, .family-actions a) {
    background: var(--white);
    border-color: var(--line);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .school .school-header {
    background: var(--emerald-deep);
    border-color: #2b5446;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (max-width: 550px) {
  .school-content, .school-footer { margin-block: 1.1rem; }
  .school-content h1 { font-size: 1.68rem; }
  .task-actions > .button, .task-form > .button { width: 100%; }
  .today-checks a { flex: 1 0 100%; justify-content: space-between; }
  .register-save > .primary { width: 100%; }
  .question-actions > :is(.button,form), .question-actions form > .button { width: 100%; }
}
@media print {
  .print-register .register-find, .print-register .step-guide { display: none !important; }
  .print-register .student-register li[hidden] { display: grid !important; }
  body.print-slips { background: white; }
  .print-slips :is(.school-header,.school-footer,.task-actions,.feedback,.skip) { display: none !important; }
  .print-slips .school-content { max-width: none; padding: 0; margin: 0; }
  .print-slips .login-slip { padding: .85rem; margin: .65rem 0; border: 1px dashed #66786e; border-radius: 8px; break-inside: avoid; }
}
.step-guide { display: flex; flex-wrap: wrap; gap: .5rem .9rem; list-style: none; margin: .5rem .9rem .75rem; padding: .65rem .85rem; background: #eef4e9; border: 0; border-radius: 10px; font-size: .875rem; font-weight: 700; color: var(--forest); }
.step-guide-compact { margin: .65rem 0 .25rem; }
.school-panel > .step-guide-compact { margin: .6rem 0 .85rem; }
.school-tasks-section h2 { margin-bottom: .15rem; }
.step-guide li { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; }
.step-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); color: #f3f8ec; font-size: .75rem; font-weight: 800; }
.today-checks a.is-alert { border-color: #c9a75c; background: #fff9ec; color: #5b3f10; }
.today-checks a.is-clear { border-color: #b7d2bf; background: #f2f8f3; color: var(--pine); }
.quick-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .75rem; }
.quick-task-card { display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: .75rem .85rem; border: 1px solid #c9d6ca; border-radius: 10px; background: var(--white); text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgb(24 52 45 / .08); transition: background-color 140ms ease, border-color 140ms ease; }
.quick-task-card:hover { background: var(--sage); border-color: #9cb6a1; }
.quick-task-card strong { display: block; font-size: .9375rem; color: var(--pine); }
.quick-task-card small { display: block; color: var(--muted); font-size: .8125rem; font-weight: 600; margin-top: .12rem; }
.quick-task-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; background: var(--sage); color: var(--pine); }
.family-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: .85rem 0 1rem; }
.family-summary > div { padding: .75rem .9rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.family-summary small { display: block; color: var(--muted); font-weight: 700; }
.family-summary strong { display: block; margin-top: .2rem; font-size: 1.05rem; color: var(--forest); }
.slip-note { margin-top: .35rem; color: var(--muted); font-size: .8125rem; }
.login-branded { padding: 0; overflow: hidden; }
.login-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: .9rem; padding: 1.25rem 1.25rem 1.15rem; background: linear-gradient(135deg, #132e26 0%, #1d4a3b 100%); color: #f8f6ee; }
.login-hero h1 { font-size: 1.65rem; color: #f8f6ee; margin: 0; }
.login-hero p { color: #e6ebd9; margin: .25rem 0 0; font-size: .875rem; text-wrap: pretty; }
.login-body { padding: 1.1rem 1.25rem 1.25rem; }
.school-hero, .family-hero { position: relative; overflow: hidden; isolation: isolate; padding: 1.3rem 1.4rem; margin-bottom: 1.15rem; border-radius: var(--radius); background: linear-gradient(135deg, #132e26 0%, #1c4739 65%, #255a48 100%); color: #f8f6ee; border: 1px solid #2a5646; }
.school-hero-compact { padding: 1.05rem 1.3rem; }
.school-hero-copy, .family-hero-inner { position: relative; z-index: 1; }
.school-hero h1, .family-hero h1 { color: #f8f6ee; margin: 0; }
.school-hero-sub { color: #f2d98d; font-weight: 700; margin: .32rem 0 0; font-size: .9375rem; }
.school-hero .today-checks { margin: .95rem 0 0; }
.school-hero .today-checks a { border: 1px solid rgb(255 255 255 / .22); }
.family-hero-inner { display: flex; align-items: center; gap: .95rem; }
.horizon-crest-art { position: absolute; width: 42%; min-width: 240px; height: 100%; right: 0; bottom: 0; z-index: 0; pointer-events: none; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 35%); }
.horizon-crest-art span { position: absolute; width: 320px; height: 240px; right: -30px; bottom: -170px; border: 1.5px solid rgb(234 185 73 / .34); border-radius: 50% 50% 0 0; }
.horizon-crest-art span:nth-child(2) { transform: translate(12px, -14px); }
.horizon-crest-art span:nth-child(3) { transform: translate(24px, -28px); }
.horizon-crest-art span:nth-child(4) { transform: translate(36px, -42px); }
.student-person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.person-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; font-size: .8125rem; font-weight: 800; letter-spacing: .02em; }
.person-avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; border: 2px solid rgb(234 185 73 / .7); }
.person-avatar.tone-0 { background: #dff1e5; color: #174932; }
.person-avatar.tone-1 { background: #fbf0d3; color: #694910; }
.person-avatar.tone-2 { background: #dff1f3; color: #164f57; }
.person-avatar.tone-3 { background: #fbe8e6; color: #8b2b30; }
.person-avatar.tone-4 { background: #ede7f7; color: #4f3a70; }
.attendance-ring-summary { display: flex; align-items: center; gap: .95rem; padding: .75rem .9rem; margin: .7rem 0 .85rem; background: #f6f9f4; border-radius: 10px; }
.attendance-ring-summary strong { display: block; color: var(--forest); font-size: .9375rem; }
.attendance-ring-summary small { display: block; color: var(--muted); font-weight: 600; margin-top: .15rem; }
.attendance-ring { position: relative; flex: 0 0 auto; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#1f6548 calc(var(--pct) * 1%), #dce6dc 0); }
.attendance-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--white); }
.attendance-ring span { position: relative; font-size: .9375rem; font-weight: 800; color: var(--forest); }
.quick-task-icon.tone-0 { background: #dff1e5; color: #174932; }
.quick-task-icon.tone-1 { background: #fbf0d3; color: #755110; }
.quick-task-icon.tone-2 { background: #dff1f3; color: #164f57; }
.quick-task-icon.tone-3 { background: #ede7f7; color: #4f3a70; }
.quick-task-arrow { margin-left: auto; color: var(--muted); flex: 0 0 auto; }
.quick-task-card:hover { transform: translateY(-2px); background: var(--sage); border-color: #9cb6a1; }
.family-summary > div { display: flex; align-items: center; gap: .75rem; }
@media (max-width: 600px) {
  .quick-task-grid, .family-summary { grid-template-columns: 1fr; }
}
