:root{--blue:#163d78;--deep:#102951;--mid:#2f65b4;--bg:#f5f7fb;--card:#fff;--line:#e0e7f0;--ink:#192941;--muted:#617086;--green:#206e52;--red:#b13d3a;--shadow:0 3px 15px #0a31540c}
*{box-sizing:border-box}html{background:var(--bg);-webkit-text-size-adjust:100%}body{margin:0;color:var(--ink);font:15px/1.48 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;max-width:100%;min-height:43px}button:disabled{opacity:.55;cursor:wait}h1{font-size:23px;letter-spacing:-.025em;margin:2px 0 0}h2{font-size:16px;margin:0 0 13px}h3{font-size:15px;margin:0 0 6px}p{margin:7px 0}.subtle,.muted{color:var(--muted);font-size:12px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.075em;color:var(--mid);margin:0}.topbar{position:sticky;top:0;z-index:5;padding:8px 12px;padding-top:max(9px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.98);border-bottom:1px solid var(--line)}.branding{display:flex;align-items:center;gap:7px;min-width:0}.branding img{width:36px;height:36px;object-fit:contain}.branding img:nth-child(2){width:30px;height:30px}.branding div{min-width:0}.branding small{display:block;color:var(--muted);font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.branding strong{font-size:13px;color:var(--blue);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.settings-button{background:#edf3fa;color:var(--blue);border-radius:11px;min-width:42px;height:42px;font-size:24px}.content{max-width:780px;margin:auto;padding:18px 13px calc(90px + env(safe-area-inset-bottom))}.screen{display:none}.screen.active{display:block}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:1px 0 17px}.tag{color:var(--green);border-radius:30px;background:#e6f4ec;font-size:11px;font-weight:750;padding:5px 9px}.panel,.record-card{background:var(--card);border:1px solid var(--line);border-radius:15px;padding:14px;margin:11px 0;box-shadow:var(--shadow)}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:15px 13px;background:#fff;border:1px solid var(--line);border-radius:14px;min-width:0}.stat strong{display:block;color:var(--blue);font-size:25px;font-variant-numeric:tabular-nums;line-height:1.2}.stat span{display:block;margin-top:6px;color:var(--muted);font-size:12px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.section-head h2{margin:0}.text-btn{background:none;font-size:13px;color:var(--mid);font-weight:750;padding:4px;min-height:33px}.primary{color:white;background:var(--blue);font-weight:750;border-radius:11px;padding:11px 14px}.outline{background:white;border:1px solid #b8cae3;color:var(--blue);font-weight:750;border-radius:11px;padding:11px 14px}.full{width:100%;margin-top:11px}.small-btn{color:var(--blue);background:#eaf1fa;padding:9px 12px;font-size:12px;font-weight:700;border-radius:10px;min-height:37px}.empty{border:1px dashed #c6d2df;border-radius:12px;background:#fff;padding:23px 15px;text-align:center;color:var(--muted);font-size:13px}.record-top{display:flex;justify-content:space-between;gap:7px;align-items:start}.record-top strong{font-size:14px;overflow-wrap:anywhere}.record-top .pill{flex:0 1 auto;max-width:49%}.pill{font-size:11px;color:var(--blue);background:#eaf1ff;padding:4px 9px;border-radius:30px;font-weight:700;text-align:center}.pill.high{color:var(--red);background:#fff0ee}.pill.medium{color:#986112;background:#fff6e8}.line{font-size:12px;color:var(--muted);margin-top:3px}.record-card p{font-size:13px;overflow-wrap:anywhere}.image-row{display:flex;gap:8px;overflow-x:auto;margin:9px 0}.image-row img{width:83px;height:83px;border-radius:9px;object-fit:cover;border:1px solid var(--line);background:#f3f3f3}.feedback-box{border:1px solid #cde4d3;background:#f0f8f2;border-radius:11px;padding:10px;margin-top:10px;font-size:13px}.feedback-box strong{color:var(--green)}.feedback-box p{margin:4px 0}.action-row{display:flex;gap:8px;margin-top:11px}.action-row button{flex:1;min-width:0}.priority{border-left:3px solid #cf6541}.record-card .report-lines{margin-top:7px}label{display:block;color:#374b65;font-size:13px;font-weight:650;margin:11px 0 6px}input:not([type="checkbox"],[type="file"]),select,textarea{display:block;width:100%;margin-top:5px;min-height:44px;border:1px solid #ced9e7;border-radius:10px;background:#fff;color:var(--ink);padding:9px 11px;outline-offset:2px;font-size:16px;max-width:100%}textarea{resize:vertical;min-height:95px}input[type=file]{font-size:13px;max-width:100%;display:block;margin-top:7px}.checkbox{display:flex;gap:9px;align-items:center;font-size:13px;font-weight:500}.checkbox input{accent-color:var(--blue);width:18px;height:18px;flex:none}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.two-col label{min-width:0}.date-range{max-width:356px}.date-range input[type="date"]{max-width:168px;min-width:0;font-size:13px;padding:7px 5px}.result-count{font-size:12px;color:var(--muted);margin:10px 2px}.report-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:9px 0;border-bottom:1px solid var(--line)}.report-row:last-child{border-bottom:0}.report-row strong{text-align:right}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:7;border-top:1px solid var(--line);background:#fff;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding-bottom:max(7px,env(safe-area-inset-bottom))}.bottom-nav button{background:transparent;color:#7b8ba1;font-size:10px;font-weight:650;min-height:58px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;padding:4px 1px}.bottom-nav button span{font-size:21px;line-height:23px}.bottom-nav button.active{color:var(--blue)}#toast{position:fixed;left:50%;bottom:93px;transform:translateX(-50%);background:#172e4d;color:white;border-radius:12px;padding:11px 15px;max-width:90vw;min-width:170px;text-align:center;font-size:13px;z-index:35;display:none;box-shadow:0 6px 30px #0003}#toast.show{display:block}dialog{border:0;max-width:min(94vw,520px);width:100%;border-radius:17px;padding:0;max-height:calc(100dvh - 32px);box-shadow:0 16px 80px #15234255}dialog::backdrop{background:#0b1a32aa}.dialog-body{padding:17px;overflow:auto;max-height:calc(100dvh - 40px)}.close-btn{background:#eef3fa;border-radius:9px;font-size:25px;color:#345;min-width:37px;min-height:37px}.file-label{border:1px dashed #a4b7d3;padding:12px;border-radius:10px;background:#f8faff}.safety-note{font-size:12px;color:var(--muted);margin:12px 4px}.profile-summary{padding:12px;border-radius:12px;background:#f0f4fb}.profile-summary strong{font-size:15px}code{font-size:12px}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #2676c8;outline-offset:2px}@media(min-width:620px){.content{padding:25px 20px 125px}.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.branding small{font-size:10px}.branding strong{font-size:16px}}@media(max-width:360px){.branding img{width:29px;height:30px}.branding img:nth-child(2){width:23px;height:24px}.branding small{font-size:7px}.branding strong{font-size:12px}.bottom-nav button{font-size:9px}.pill{font-size:10px}}

.photo-dialog{background:#111;color:#fff;width:96vw;max-width:96vw;max-height:96dvh;box-shadow:0 20px 80px #0009}.photo-dialog-body{padding:6px;display:flex;flex-direction:column;align-items:center}.photo-dialog-body button{align-self:flex-end;color:white;background:#354052;padding:7px 12px;border-radius:7px;min-height:38px}.photo-dialog-body img{max-height:83dvh;max-width:100%;object-fit:contain;margin-top:5px}

/* Hybrid sync settings; no overlay or fixed-height buttons. */
.sync-panel{margin-top:16px}.sync-panel label{display:block;margin:11px 0;min-width:0}
.sync-panel input{width:100%;max-width:100%;box-sizing:border-box;font-size:16px;min-height:43px}
.sync-panel button{max-width:100%;width:100%;margin:6px 0;min-height:44px}
.sync-note,#sync-status,#sync-pending{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#sync-status{font-weight:650}.sync-conflict{padding:10px;margin-top:10px;border:1px solid #ce8e8e;border-radius:10px}
.sync-conflict button{font-size:13px}


/* Academic-week reporting, responsive phone controls */
.week-widget{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.week-label{font-size:14px;font-weight:750;margin:0}
.week-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;max-width:375px}
.week-nav .week-arrow{height:44px;min-height:44px;padding:0;border-radius:11px;background:#ecf2fa;border:1px solid #d0dcec;color:var(--blue);font-size:27px;font-weight:600}
.week-nav .week-arrow:disabled{opacity:.33}
.week-nav select{margin:0;min-height:44px;height:44px;font-size:16px;font-weight:700;text-align:center;text-align-last:center;border-color:#a9bfdf;color:var(--blue);min-width:0}
.week-subtitle{font-size:12px;color:var(--muted);line-height:1.5;margin:1px 0;overflow-wrap:anywhere}
.week-today{background:none;color:var(--mid);font-size:13px;font-weight:750;min-height:35px;align-self:flex-start;padding:4px 2px}
.report-advanced{margin:11px 0 13px;border-top:1px solid var(--line);padding-top:9px}
.report-advanced summary{cursor:pointer;font-size:13px;color:var(--blue);font-weight:700;min-height:35px;padding:7px 3px}
.report-advanced .date-range{margin-top:10px}.report-advanced .week1-label{max-width:180px;font-size:12px}
.report-advanced #report-week1{max-width:175px;height:42px;font-size:13px;padding:7px}
.week-help{color:var(--muted);font-size:11px;line-height:1.45}
@media(max-width:350px){.week-nav{grid-template-columns:40px minmax(0,1fr) 40px;gap:6px}.week-nav .week-arrow{width:40px;height:42px;min-height:42px}.week-nav select{font-size:15px}}

/* v3: four focus tabs, accessible chat + first-run classroom setup */
[hidden]{display:none!important}
.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
.details-title{font-size:14px;font-weight:750;color:var(--blue);cursor:pointer;min-height:38px}
.lookup-inner{padding-top:10px}
.chat-thread{min-height:165px;max-height:46vh;overflow:auto;background:#f7f9fd;border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:9px}
.chat-bubble{max-width:91%;padding:10px 12px;border:1px solid #d8e2ed;background:#fff;border-radius:12px;align-self:flex-start;overflow-wrap:anywhere}
.chat-bubble.mine{align-self:flex-end;background:#e9f1fc;border-color:#bfd4ed}
.chat-author{font-size:11px;font-weight:750;color:#506584}.chat-text{font-size:14px;white-space:pre-wrap;margin:5px 0}.chat-state,.chat-bubble small{display:block;color:#637992;font-size:10px;margin-top:5px}
#chat-form textarea{min-height:85px}#chat-class-label{font-size:12px}
#roster-class-container{margin-top:10px}#roster-description{overflow-wrap:anywhere}
#day-controls input,#month-controls input{max-width:210px;width:100%;min-width:0}


/* GVCN v4: charts derived strictly from the selected reporting period. */
.chart-pair{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;margin:12px 0}
.chart-panel{margin:0;min-width:0;overflow:hidden}
.chart-panel h3{margin:0 0 4px;color:var(--blue);font-size:15px}
.chart-caption{font-size:12px;color:var(--muted);margin:0 0 15px}
.chart-empty{border:1px dashed #cad6e8;border-radius:12px;padding:20px 12px;text-align:center;color:var(--muted);font-size:13px;background:#fff;margin:12px 0}
.trend-scroll{max-width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:2px}
.trend-grid{display:flex;align-items:end;gap:8px;min-width:max-content;padding:4px 2px 0}
.trend-col{width:47px;min-width:47px;display:flex;align-items:center;flex-direction:column;gap:5px}
.trend-count{font-size:11px;font-weight:700;color:var(--blue);height:16px;line-height:16px}
.trend-track{width:29px;height:110px;display:flex;align-items:end;justify-content:center;border-bottom:1px solid #acbed6}
.trend-bar{width:25px;min-height:0;background:#3267b7;border-radius:5px 5px 0 0}
.trend-label{display:block;min-height:26px;font-size:10px;line-height:1.2;text-align:center;color:#556981;max-width:47px;overflow-wrap:anywhere}
.donut-layout{display:flex;flex-direction:column;align-items:center;gap:15px}
.donut-plot{width:160px;aspect-ratio:1;flex:0 0 160px;border-radius:50%;display:grid;place-items:center}
.donut-center{width:104px;height:104px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 0 0 1px #f1f4f8}
.donut-center strong{font-size:28px;line-height:1.1;color:var(--blue)}
.donut-center small{font-size:12px;color:var(--muted)}
.donut-legend{width:100%;min-width:0;display:flex;flex-direction:column;gap:8px}
.donut-legend-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:7px;font-size:12px;color:#304459}
.donut-legend-row strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.donut-legend-row small{font-weight:400;color:var(--muted)}
.donut-dot{display:block;width:10px;height:10px;border-radius:3px}
@media(min-width:700px){.chart-pair{grid-template-columns:repeat(2,minmax(0,1fr))}.donut-layout{flex-direction:column}.chart-panel{min-height:245px}}
