:root {
  color-scheme: light;
  font: 15px/1.5 "Segoe UI", system-ui, sans-serif;
  --ink: #172c2c;
  --muted: #52635d;
  --canvas: #f8f7f2;
  --line: #dedfd6;
  --forest: #172c2c;
  --green: #22553d;
  --lime: #d9edb5;
  --gold: #efc82c;
  --sage: #e5e9df;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--green); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #699759; outline-offset: 3px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
.icon { width: 19px; height: 19px; flex: none; vertical-align: middle; }
.skip { position: fixed; top: -100px; z-index: 10; padding: 10px; background: white; }
.skip:focus { top: 0; }
.loading { padding: 4rem 2rem; text-align: center; }
.layout { min-height: 100vh; }
.school-masthead { background: var(--forest); color: #eff6ed; }
.brand { display: flex; gap: 10px; align-items: center; }
.top .brand { flex: none; }
.brand strong { display: block; font-size: 21px; line-height: 1.15; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 4px; font-size: 9px; font-weight: 700; letter-spacing: .24em; }
.mark { width: 39px; height: 39px; border-radius: 8px; background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.mark .icon { width: 22px; height: 22px; }
.workspace { padding-left: 16px; border-left: 1px solid #527160; min-width: 0; }
.workspace strong, .identity strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.workspace small, .identity small { display: block; font-size: 11px; }
.workspace small,.top .identity small { color: #c4d3c6; }
.top,.school-nav-bar nav { max-width: 1440px; margin: auto; padding-inline: clamp(16px,4vw,56px); }
.top { min-height: 74px; display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.school-nav-bar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.school-nav-bar nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.nav-group { position: relative; }
.school-nav-bar nav > button,.nav-group summary { display: flex; align-items: center; gap: 7px; padding: 13px 10px 11px; background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 680; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '▾'; color: var(--green); }
.nav-group summary:hover,.school-nav-bar nav > button:hover { background: #eff5ec; }
.nav-group summary.current-group,.school-nav-bar nav > button[aria-current] { border-bottom-color: #a58208; color: var(--green); }
.nav-links { position: absolute; z-index: 4; top: calc(100% + 4px); left: 0; min-width: 190px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 22px #14271f19; }
.nav-links button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 5px; text-align: left; background: white; color: var(--ink); font-size: 13px; }
.nav-links button:hover,.nav-links button[aria-current] { background: #e6f1df; color: var(--green); }
.nav-group:last-child .nav-links { left: auto; right: 0; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #e8f1e2; display: grid; place-items: center; font-size: 12px; font-weight: 750; color: #2a5238; }
.identity small { color: var(--muted); }
.icon-button { display: inline-grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.icon-button:hover { background: #edf4eb; }
#main { margin: 0 auto; max-width: 1440px; padding: 28px clamp(16px,4vw,56px) 40px; }
.overview-top, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.page-heading p { color: var(--muted); margin-top: 4px; }
.eyebrow { color: #4b6857; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1 { font-size: clamp(28px,3vw,38px); font-weight: 740; letter-spacing: -.045em; line-height: 1.16; }
.overview-top h1,.page-heading h1,.auth-content h1,.auth-content h2,.hero h2 { font-family: Georgia,serif; font-weight: 500; letter-spacing: -.035em; }
.date-pill { padding: 7px 11px; background: white; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.date-pill .icon { width: 16px; height: 16px; }
.hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--sage); color: var(--forest); min-height: 219px; display: grid; align-items: center; }
.hero-content { z-index: 1; padding: 24px 28px; max-width: 57%; }
.hero-tag { display: inline-block; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.hero h2 { margin: 8px 0 4px; font-size: clamp(29px,4vw,47px); font-weight: 720; line-height: 1.05; letter-spacing: -.05em; }
.hero p { color: var(--muted); font-size: 14px; max-width: 420px; }
.hero-art { width: min(43%,420px); height: auto; position: absolute; right: 0; bottom: -3px; }
.hero-actions, .actions, .row-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hero-actions { margin-top: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 680; font-size: 13px; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; min-height: 34px; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.primary { color: white; background: var(--green); }
.primary:hover { background: #183e2c; }
.secondary { color: #244332; background: white; border-color: var(--line); }
.secondary:hover { background: #eef4eb; }
.hero-button { color: white; background: var(--green); }
.hero-button:hover { background: var(--forest); }
.hero-secondary { color: var(--green); border-color: #b1c4aa; background: white; }
.hero-secondary:hover { background: #f5faf2; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 13px; margin: 17px 0; }
.metric, .panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 2px 5px #15362106; }
.metric { padding: 13px; }
.metric-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 680; }
.tile { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex: none; }
.green { color: #26513a; background: #e6f1df; }
.purple { color: #57447c; background: #eee8fa; }
.amber { color: #734d0b; background: #fff1d5; }
.blue { color: #284c71; background: #e7eff8; }
.red { color: #972d2d; background: #fbe8e6; }
.metric > strong { display: block; margin-top: 6px; font-size: clamp(20px,2.15vw,30px); line-height: 1.16; letter-spacing: -.04em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric > small, .notice small, .attendance-line small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 13px; }
.panel { min-width: 0; }
.dashboard-grid .panel { padding: 17px; }
.panel header { margin-bottom: 12px; }
.panel h2 { font-size: 18px; letter-spacing: -.025em; }
.panel header p, .muted { color: var(--muted); font-size: 13px; }
.notice { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.notice p { color: var(--muted); font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.attendance-line { padding: 11px 0 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; font-size: 13px; }
meter { width: min(45%,190px); height: 14px; accent-color: #40805b; }
.shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.shortcuts button { display: flex; gap: 7px; align-items: center; background: #f8faf7; border: 1px solid var(--line); border-radius: 8px; padding: 7px; font-size: 12px; color: var(--ink); text-align: left; font-weight: 650; }
.shortcuts button:hover { background: #eef5eb; }
.shortcuts .tile { width: 27px; height: 27px; }
.shortcuts .icon { width: 15px; height: 15px; }
.shortcuts button > .icon { margin-left: auto; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f4f7f3; color: #415849; font-weight: 720; }
td { overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.table-toolbar { padding: 12px; }
.list-toolbar, #list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.table-toolbar label { font-size: 13px; }
.table-toolbar select { max-width: 190px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.selection-cell { width: 1%; text-align: center; }
input[type="checkbox"] { accent-color: var(--green); }
.weekly-grid table { min-width: 760px; table-layout: fixed; }
.weekly-grid th:first-child { width: 68px; }
.weekly-grid td { vertical-align: top; }
.lesson { background: #eaf3e5; padding: 7px; border-radius: 7px; margin-bottom: 5px; }
.lesson small { display: block; margin: 3px 0; }
.lesson .button { min-height: 24px; font-size: 11px; padding: 2px 5px; }
.student-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 2px; color: var(--green); text-align: left; font-weight: 700; }
.student-link:hover { text-decoration: underline; }
.student-link .avatar { width: 28px; height: 28px; flex: none; }
.profile-back { margin-bottom: 12px; }
.student-profile { overflow: hidden; }
.student-profile-cover { height: 82px; background: linear-gradient(115deg,#183e2c,#4a7657); }
.student-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 0 20px 16px; }
.student-portrait { width: 90px; height: 90px; border: 4px solid white; border-radius: 20px; object-fit: cover; margin-top: -25px; flex: none; }
.portrait-placeholder { display: grid; place-items: center; background: #dcebcf; color: #2d5037; font-size: 26px; font-weight: 750; }
.student-profile-heading h1 { font-size: clamp(23px,3vw,36px); overflow-wrap: anywhere; }
.student-profile-heading p { color: var(--muted); margin-top: 4px; }
.student-profile-heading .actions { margin-left: auto; }
.profile-tabs { display: flex; overflow-x: auto; gap: 6px; padding: 0 15px; border-top: 1px solid var(--line); }
.profile-tabs button { background: white; color: var(--muted); border: 0; border-bottom: 3px solid transparent; font-weight: 650; padding: 11px 10px; white-space: nowrap; }
.profile-tabs button[aria-pressed="true"] { color: var(--green); border-bottom-color: var(--green); }
.profile-content { display: grid; gap: 13px; margin-top: 13px; }
.profile-content .metrics { margin: 0; }
.profile-content .panel > header { padding: 14px 14px 0; }
.assessment-group { padding: 0 12px 12px; }
.assessment-group h2 { font-size: 16px; margin-bottom: 8px; }
.assessment-card { border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; margin-bottom: 8px; }
.assessment-card summary { cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px; font-weight: 680; }
.assessment-card summary::before { content: '▸'; color: var(--green); }
.assessment-card[open] summary::before { content: '▾'; }
.assessment-card summary strong { margin-left: auto; color: var(--green); font-size: 18px; }
.assessment-card summary small { color: var(--muted); font-weight: 500; }
.assessment-note { padding: 0 13px 8px; }
.search { display: flex; align-items: center; gap: 8px; width: min(100%,340px); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--muted); }
.search input { width: 100%; border: none; background: transparent; color: var(--ink); }
.empty { color: var(--muted); padding: 18px; }
.auth { min-height: 100dvh; }
.landing-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 73px; padding: 14px max(5vw,calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); }
.landing-header a { color: var(--ink); text-decoration: none; }
.landing-header > span { color: var(--muted); font-size: 12px; text-align: right; }
.landing-main { width: min(90%,1240px); margin: auto; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); column-gap: clamp(24px,7vw,100px); row-gap: 34px; align-items: center; padding-block: clamp(26px,5vw,64px) 36px; }
.landing-story .eyebrow { display: flex; align-items: center; gap: 8px; }
.landing-story .eyebrow i { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; }
.landing-story h1 { font: 500 clamp(38px,6vw,82px)/.99 Georgia,serif; letter-spacing: -.065em; margin: 12px 0 16px; }
.landing-story p { max-width: 41ch; color: var(--muted); }
.landing-illustration { max-width: 520px; margin-top: 10px; }
.landing-illustration svg { display: block; width: 100%; height: auto; }
.auth-main { display: grid; place-items: center; padding: clamp(20px,5vw,75px); }
.auth-content { width: min(100%,510px); }
.landing-main .auth-content { padding: clamp(20px,4vw,38px); border: 1px solid var(--line); border-top: 4px solid var(--green); background: #fff; border-radius: 10px; box-shadow: 0 12px 35px #193e2d12; }
.landing-main .auth-content h2 { font-size: clamp(27px,3vw,39px); line-height: 1.12; margin: 6px 0 9px; }
.landing-areas { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; border-top: 1px solid var(--line); padding-top: 17px; }
.landing-areas > div { display: flex; gap: 9px; align-items: center; padding: 12px; background: var(--sage); border-radius: 6px; }
.landing-areas .icon { color: var(--green); }
.landing-areas strong,.landing-areas small { display: block; }
.landing-areas small { color: var(--muted); }
.auth-submit { background: var(--gold); color: #302c17; border-color: #dabb36; min-height: 44px; }
.auth-submit:hover { background: #f7da61; }
.auth-content .field input { min-height: 42px; }
.auth-content h1 { margin: 5px 0 7px; }
.auth-content > p { color: var(--muted); margin-bottom: 18px; }
.auth-content > .setup-note { margin: 16px 0 0; padding: 10px 12px; background: var(--sage); border-radius: 6px; font-size: 13px; }
.role-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.role { min-height: 50px; display: flex; align-items: center; gap: 7px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font-size: 13px; font-weight: 660; }
.role:hover { background: #e9f3e5; }
.role .icon:last-child { margin-left: auto; }
.peer { display: inline-flex; gap: 5px; align-items: center; margin-top: 16px; font-size: 13px; font-weight: 700; }
.full { width: 100%; }
.field { display: grid; gap: 4px; font-size: 13px; font-weight: 670; margin-bottom: 11px; }
.field input,.field select,.field textarea { min-width: 0; width: 100%; border: 1px solid #bacdc0; color: var(--ink); background: #fff; padding: 8px 9px; border-radius: 7px; font-weight: 450; }
.field textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 7px; margin: 0; padding: 8px 11px; }
.check-option { display: flex; gap: 8px; padding: 4px; }
dialog { width: min(calc(100% - 24px),540px); padding: 19px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); max-height: 90dvh; }
dialog::backdrop { background: #0a211ac0; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.dialog-head h2 { letter-spacing: -.03em; }
.dialog-actions { justify-content: end; margin-top: 12px; }
.form-error { color: #8d2424; font-size: 13px; }
.form-error:not(:empty) { padding: 6px 0; }
#toast { display: none; position: fixed; z-index: 12; bottom: 16px; right: 16px; background: #183e2c; color: white; border-radius: 8px; padding: 10px 14px; max-width: calc(100% - 32px); box-shadow: 0 5px 20px #193e2d38; }
#toast.shown { display: block; }
#paper { display: none; }
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .identity { display: none; }
  .top { flex-wrap: wrap; gap: 8px; }
  .top-right > .avatar { display: none; }
  .workspace { border: 0; padding: 0; order: 3; flex-basis: 100%; }
  .workspace strong,.workspace small { display: inline; }
  .workspace small { margin-left: 5px; }
  .school-nav-bar nav { gap: 0 3px; position: relative; }
  .nav-group { position: static; }
  .nav-group .nav-links,.nav-group:last-child .nav-links { left: 16px; right: 16px; }
  .school-nav-bar nav > button,.nav-group summary { padding-inline: 6px; }
  .page-heading { align-items: start; flex-direction: column; }
  .hero-content { max-width: 100%; padding: 19px; }
  .hero-art { opacity: .17; width: 56%; }
  .auth-main { place-items: start center; }
  .landing-main { grid-template-columns: 1fr; row-gap: 20px; }
  .landing-story h1 { margin: 8px 0; }
  .landing-story h1 br { display: none; }
  .landing-illustration { display: none; }
  .landing-main .auth-content { width: 100%; }
  .landing-areas { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .date-pill { font-size: 10px; }
}
@page { size: A4 portrait; margin: 14mm; }
@media print {
  :root { color: #111; background: white; font: 10pt/1.4 "Segoe UI", sans-serif; }
  body > :not(#paper) { display: none !important; }
  #paper { display: block; }
  .paper-header { display: flex; justify-content: space-between; gap: 5mm; align-items: end; border-bottom: 1pt solid #222; padding-bottom: 4mm; margin-bottom: 5mm; }
  .paper-header h1 { font-size: 19pt; margin-top: 4mm; }
  #paper h2 { font-size: 15pt; margin: 3mm 0; }
  #paper h3, #paper p { margin: 3mm 0; }
  #paper .table-scroll { overflow: visible; }
  #paper table { font-size: 9pt; table-layout: fixed; }
  #paper .weekly-grid table { min-width: 0; }
  #paper .weekly-grid th:first-child { width: 12mm; }
  #paper th, #paper td { padding: 2mm; border-bottom: .5pt solid #aaa; }
  #paper thead { display: table-header-group; }
  #paper tr { break-inside: avoid; }
  #paper footer { color: #333; border-top: .5pt solid #aaa; margin-top: 5mm; padding-top: 2mm; }
}
