:root{--ink:#202024;--muted:#68686f;--green:#c9001b;--light:#fff0f2;--line:#e4e4e8;--paper:#f5f5f7;--orange:#e2a34b;--nav:#101012;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #de9d36;outline-offset:3px}input:focus,select:focus,textarea:focus{outline:2px solid #5a9786;outline-offset:1px}button{border:0}svg.icon{height:19px;width:19px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin:0}a{color:var(--green)}small{font-size:12px}.muted{color:var(--muted)}
.preview-banner{min-height:35px;background:#eaf0e7;color:#405c50;font-size:10px;letter-spacing:1.4px;font-weight:750;padding:7px 20px;display:flex;align-items:center;gap:17px;border-bottom:1px solid #d7e0d4}.preview-banner span{font-weight:450;letter-spacing:.1px;font-size:11px}.preview-banner button{margin-left:auto;background:transparent;color:#235a48;text-decoration:underline;font-size:11px;letter-spacing:0;text-underline-offset:3px}
.shell{display:grid;grid-template-columns:218px minmax(0,1fr);min-height:calc(100vh - 35px)}.sidebar{background:var(--nav);color:#eff4ed;padding:29px 19px;display:flex;flex-direction:column;gap:35px}.brand{display:flex;align-items:center;gap:11px}.brand-mark{border:1px solid #c4d2bd;border-radius:10px;width:42px;height:46px;display:grid;place-items:center;position:relative;color:#e6b86a}.brand-mark:before,.brand-mark:after{content:'';position:absolute;top:11px;bottom:11px;width:1px;background:currentColor;transform:rotate(17deg)}.brand-mark:before{left:12px}.brand-mark:after{right:12px;transform:rotate(-17deg)}.brand-mark b{font-size:10px;letter-spacing:1px}.brand strong{font-family:Georgia,serif;font-size:19px;line-height:1.05;font-weight:500;display:block}.brand small{font-size:9px;letter-spacing:1.7px;color:#9bb6ad;display:block;margin-top:6px}.nav-label{font-size:10px;letter-spacing:1.8px;color:#8eaaa1;margin:0 12px 13px}.nav{display:grid;gap:7px}.nav button{display:flex;align-items:center;gap:12px;padding:13px 14px;background:transparent;border-radius:7px;color:#b7cac3;text-align:left;font-size:13px}.nav button.active{background:#294640;color:white}.nav button.active:before{content:'';position:absolute;left:0;height:24px;width:3px;background:#e4b66d}.nav button:hover{background:#25423d}.nav .badge{margin-left:auto;background:#dcb477;color:#243b2c;border-radius:5px;font-size:10px;padding:2px 6px}.sidebar-note{margin-top:auto;border:1px solid #355149;border-radius:9px;padding:16px 13px;color:#b2c6bd;font-size:11px;line-height:1.7}.sidebar-note strong{display:block;color:#e3d3b0;font-size:12px;margin-bottom:6px}.account{border-top:1px solid #355149;padding-top:20px;display:flex;align-items:center;gap:10px}.avatar{width:35px;height:35px;border-radius:50%;background:#d9e8d8;color:#285a44;font-weight:650;font-size:12px;display:grid;place-items:center;flex-shrink:0}.account strong{display:block;font-size:12px}.account small{color:#99b1a6;font-size:10px}.account button{margin-left:auto;background:none;color:#b7cac3;padding:4px}
.workspace{min-width:0}.topbar{height:75px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff}.breadcrumb{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:12px}.breadcrumb b{color:var(--ink);font-weight:550}.topbar-right{display:flex;align-items:center;gap:19px}.today-label{font-size:11px;color:var(--muted)}.status-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:#36816b;margin-right:6px}.icon-button{padding:7px;background:transparent;color:var(--muted);border-radius:6px;display:inline-flex;align-items:center;justify-content:center}.icon-button:hover{background:#eef3ed}.content{padding:30px 32px 36px;max-width:1750px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:1.7px;font-weight:650;color:var(--green);margin-bottom:9px}h1{font-family:Georgia,"Times New Roman",serif;font-size:33px;font-weight:500;letter-spacing:-.8px}h1 + p{font-size:12px;color:var(--muted);margin-top:9px}.btn{border:1px solid var(--line);background:white;color:var(--ink);padding:10px 15px;font-size:12px;border-radius:7px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}.btn:hover{background:#eef4ee}.btn.primary{background:var(--green);color:white;border-color:var(--green)}.btn.primary:hover{background:#0c5243}.btn.quiet{border-color:transparent;background:transparent;color:var(--green)}.btn.danger{color:#9a3434}.button-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:white;border-radius:10px;margin-bottom:23px;overflow:hidden}.stat{padding:17px 22px;position:relative}.stat+.stat{border-left:1px solid var(--line)}.stat-label{font-size:10px;color:var(--muted);display:flex;justify-content:space-between;gap:8px}.stat-label svg{width:15px;height:15px;color:#7e9588}.stat-value{font-family:Georgia,serif;font-size:28px;line-height:1;margin-top:10px}.stat-value span{font-family:Inter,system-ui,sans-serif;font-size:10px;color:var(--muted);margin-left:7px}.stat-foot{font-size:10px;color:var(--muted);margin-top:9px}.stat-foot.positive{color:var(--green)}
.calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 233px;gap:21px;align-items:start}.card{border:1px solid var(--line);background:white;border-radius:10px;overflow:hidden}.calendar-toolbar{padding:17px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);flex-wrap:wrap}.calendar-toolbar h2{font-size:14px;font-weight:650}.calendar-controls{display:flex;gap:6px;align-items:center}.calendar-controls .btn{padding:6px 10px;font-size:10px}.calendar-controls .icon-button{padding:4px}.segmented{background:#f2f4ee;padding:3px;border:1px solid #e9ece4;border-radius:6px;display:flex;gap:1px}.segmented button{font-size:10px;padding:6px 10px;color:var(--muted);background:transparent;border-radius:4px}.segmented button.selected{background:white;color:var(--ink);box-shadow:0 1px 3px #20322814}.calendar-scroll{overflow-x:auto}.calendar{min-width:590px}.calendar.one-day{min-width:280px}.days{display:grid;grid-template-columns:46px repeat(7,minmax(0,1fr));border-bottom:1px solid var(--line)}.days.one{grid-template-columns:46px 1fr}.day-label{text-align:center;padding:13px 0 12px;border-left:1px solid #f0f1eb;color:var(--muted)}.day-label small{font-size:9px;text-transform:uppercase;letter-spacing:.7px;display:block}.day-label b{font-size:18px;display:inline-grid;place-items:center;min-width:30px;height:30px;margin-top:4px;font-weight:550}.day-label.current b{background:var(--green);border-radius:50%;color:white}.day-label.weekend{background:#fafbf8}.timeline{display:grid;grid-template-columns:46px repeat(7,minmax(0,1fr));height:960px}.timeline.one{grid-template-columns:46px 1fr}.time-axis{position:relative;color:#8b9690;font-size:9px}.time-axis span{position:absolute;left:8px;transform:translateY(-50%)}.time-axis span:first-child{transform:translateY(3px)}.day-column{position:relative;border-left:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent 0,transparent 19px,#f2f3ee 19px,#f2f3ee 20px,transparent 20px,transparent 39px,var(--line) 39px,var(--line) 40px)}.day-column.weekend{background-color:#fafbf8}.lesson{position:absolute;left:3px;right:3px;background:#e7f1ea;border:1px solid #d8e7dc;border-left:3px solid #5b8c70;border-radius:5px;padding:7px 5px;text-align:left;color:#315e45;overflow:hidden;transition:filter .15s,transform .15s}.lesson:hover{filter:brightness(.96);transform:translateY(-1px);z-index:2}.lesson.test{background:#fcf1de;border-color:#f2e2c3;border-left-color:#d5a04c;color:#8a6127}.lesson.personal{background:#f0eeea;border-color:#e7e2d9;border-left-color:#9c9380;color:#6e685c}.lesson.complete{background:#edf2f5;border-color:#dfe8ec;border-left-color:#84a0ab;color:#506975}.lesson strong{display:block;font-size:10px;line-height:1.3;margin:4px 0;overflow-wrap:anywhere}.lesson time{font-size:9px;display:block}.lesson small{font-size:8px;line-height:1.3;display:block}.legend{display:flex;gap:15px;padding:14px 17px;border-top:1px solid var(--line);font-size:9px;color:var(--muted);flex-wrap:wrap}.legend i{display:inline-block;width:7px;height:7px;background:#7ba184;border-radius:2px;margin-right:5px}.legend .amber{background:#d3a35b}.legend .grey{background:#a29c8c}.legend .blue{background:#86a1ae}
.right-rail{display:grid;gap:17px}.rail-title{font-size:10px;color:var(--muted);letter-spacing:1.5px;margin:2px 0 -5px}.next-card{background:#e9eee4;border:1px solid #dce3d4;border-radius:9px;padding:18px}.card-kicker{font-size:9px;letter-spacing:1.4px;text-transform:uppercase;color:#65775b;margin-bottom:15px}.next-card h3{font-size:16px;font-weight:600;margin:13px 0 7px}.next-card p{font-size:11px;line-height:1.7;color:#657460}.next-card .btn{margin-top:17px;width:100%;background:#f9fbf5;border-color:#d9e2cf;font-size:10px}.time-pill{background:#d6e2cc;color:#4e6b3e;font-size:10px;padding:5px 8px;border-radius:4px;display:inline-block}.rail-card{padding:17px}.rail-card h3{font-size:12px;margin-bottom:11px}.rail-card p{font-size:11px;color:var(--muted);line-height:1.7}.news-tag{font-size:8px;letter-spacing:1px;color:#9b6e2f;background:#faf0dc;border-radius:4px;padding:4px 6px;display:inline-block;margin-bottom:12px}.rail-card .text-link{padding:0;margin-top:14px;background:none;color:var(--green);font-size:10px;text-decoration:underline;text-underline-offset:3px}.week-note{font-size:10px;line-height:1.8;color:var(--muted);padding:1px 3px}.week-note strong{color:var(--green);font-weight:600}.admin-scope{padding:11px 14px;background:#edf2e8;border:1px solid #d9e2d0;border-radius:7px;font-size:11px;display:flex;align-items:center;gap:10px;margin-bottom:18px}.admin-scope select{margin-left:auto;padding:7px;border:1px solid #ccd8c6;background:white;border-radius:5px;font-size:12px;max-width:240px}
.table-toolbar{padding:18px;display:flex;align-items:center;justify-content:space-between;gap:14px}.search{padding:10px 12px;border:1px solid var(--line);border-radius:6px;font-size:12px;width:280px;max-width:100%;background:#fafbf8}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}th{background:#f8faf6;color:var(--muted);font-size:10px;font-weight:550;padding:13px 19px;border-block:1px solid var(--line);white-space:nowrap}td{padding:17px 19px;border-bottom:1px solid #edf0e9}tbody tr:last-child td{border-bottom:0}.person-cell{display:flex;align-items:center;gap:11px}.name-link{background:none;color:var(--ink);padding:0;font-weight:600;font-size:12px;text-align:left}.name-link:hover{text-decoration:underline}.person-cell small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.pill{padding:4px 7px;background:var(--light);color:var(--green);border-radius:4px;font-size:9px;display:inline-block}.pill.amber{background:#faf0dc;color:#93672d}.empty{padding:38px 22px;text-align:center;color:var(--muted);font-size:12px;line-height:1.7}.agenda-item{display:flex;align-items:center;gap:15px;padding:18px;border-bottom:1px solid var(--line)}.agenda-item:last-child{border:0}.agenda-date{min-width:77px;color:var(--muted);font-size:11px;line-height:1.8}.agenda-item h3{font-size:12px;margin-bottom:6px}.agenda-item p{font-size:11px;color:var(--muted)}.agenda-item .btn{margin-left:auto;font-size:10px;padding:8px}.news-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:24px}.news-feed{display:grid;gap:18px}.news-post{padding:25px 27px}.post-meta{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:9px;margin-bottom:18px}.news-post h2{font-family:Georgia,serif;font-size:24px;font-weight:500;margin-bottom:14px}.news-post p{font-size:13px;color:#586e66;line-height:1.9;white-space:pre-line}.post-footer{margin-top:22px;padding-top:17px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:10px;color:var(--muted)}.post-footer button{font-size:10px}.section-note{font-size:11px;line-height:1.9;padding:20px;color:var(--muted)}.section-note h3{font-size:13px;color:var(--ink);margin-bottom:10px}
dialog{border:1px solid var(--line);border-radius:13px;width:min(540px,calc(100% - 28px));padding:0;color:var(--ink);box-shadow:0 25px 100px #102e2d35;max-height:calc(100dvh - 40px);overflow:auto}dialog::backdrop{background:#0e292d70;backdrop-filter:blur(3px)}.dialog-head{padding:22px 25px 18px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}.dialog-head h2{font-family:Georgia,serif;font-size:25px;font-weight:500;margin-top:3px}.dialog-head p{color:var(--muted);font-size:11px;margin-top:7px;line-height:1.6}.dialog-body{padding:23px 25px}.field{display:grid;gap:7px;margin-bottom:17px;font-size:11px;font-weight:600}.field input,.field select,.field textarea{width:100%;padding:11px;border:1px solid #dbe3d8;border-radius:6px;background:#fbfcf9;color:var(--ink);font-size:12px;font-weight:400;min-width:0}.field textarea{resize:vertical;min-height:90px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-error{color:#a53c35;font-size:12px;margin-bottom:14px;line-height:1.6}.hint{font-size:10px;line-height:1.8;color:var(--muted);margin-bottom:16px}.dialog-footer{padding:17px 25px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}.profile-dialog{width:min(690px,calc(100% - 28px))}.profile-summary{display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:24px;background:#f5f7f0;border-radius:7px;padding:16px}.profile-summary strong{font-size:22px;font-family:Georgia,serif;font-weight:500;display:block}.profile-summary small{color:var(--muted);font-size:10px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px 24px;margin-bottom:24px}.detail-grid dt{font-size:10px;color:var(--muted);margin-bottom:6px}.detail-grid dd{font-size:12px;margin:0;overflow-wrap:anywhere}.history-title{font-size:13px;margin:24px 0 14px}.history-row{border-top:1px solid var(--line);padding:15px 0;display:flex;gap:15px}.history-row time{font-size:10px;color:var(--muted);min-width:73px;line-height:1.8}.history-row strong{font-size:12px;font-weight:600}.history-row p{font-size:11px;color:var(--muted);line-height:1.7;margin-top:5px}.history-row .pill{margin-left:auto;align-self:start;white-space:nowrap}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#173e33;color:white;border-radius:8px;padding:14px 22px;font-size:12px;box-shadow:0 4px 20px #173e3325;z-index:20;max-width:90%;display:none}.signin{min-height:calc(100vh - 42px);display:grid;place-items:center;padding:30px;background:radial-gradient(ellipse at top right,#dae5d2,transparent 60%),#f5f7ef}.signin-card{width:420px;max-width:100%;padding:36px}.signin .brand{color:var(--ink);margin-bottom:38px}.signin .brand-mark{background:var(--nav)}.signin h1{font-size:32px}.signin p{line-height:1.8;font-size:12px;margin:15px 0 25px;color:var(--muted)}.signin .btn{width:100%;margin-top:10px}.signin .hint{margin-top:22px;font-size:10px}.mobile-brand{display:none}.screen-footer{font-size:10px;color:#89968b;margin-top:23px;display:flex;justify-content:space-between;gap:15px}
@media(min-width:1650px){.calendar-layout{grid-template-columns:minmax(0,1fr) 260px}}
@media(max-width:1220px){.sidebar{padding-inline:14px}.shell{grid-template-columns:195px minmax(0,1fr)}.content{padding:25px 22px}.topbar{padding:0 22px}.calendar-layout{grid-template-columns:minmax(0,1fr)}.right-rail{grid-template-columns:1fr 1fr}.right-rail .rail-title,.week-note{display:none}.next-card{display:grid;grid-template-columns:1fr auto;column-gap:16px}.next-card .card-kicker{grid-column:1/-1}.next-card .btn{grid-column:1/-1}.next-card h3{grid-column:1/-1;margin-top:10px}.news-grid{grid-template-columns:minmax(0,1fr) 225px}.stat{padding:16px}.stat-value{font-size:26px}}
@media(max-width:760px){.preview-banner{flex-wrap:wrap;padding:8px 13px;gap:5px 10px;font-size:9px}.preview-banner span{width:100%;font-size:9px;order:3}.preview-banner button{font-size:9px}.shell{display:block}.sidebar{padding:13px 16px;gap:17px}.sidebar>.brand,.sidebar .nav-label,.sidebar-note,.account{display:none}.mobile-brand{display:flex;align-items:center;justify-content:space-between}.mobile-brand strong{font-size:13px;font-family:Georgia,serif;font-weight:500}.mobile-brand small{font-size:9px;color:#9db6ab}.nav{display:flex;gap:5px}.nav button{flex:1;padding:11px 8px;justify-content:center;font-size:11px;gap:6px}.nav button.active:before{display:none}.nav button svg{height:15px;width:15px}.nav .badge{margin-left:0}.topbar{height:55px;padding:0 17px}.topbar-right{gap:9px}.today-label{display:none}.content{padding:23px 16px}.page-heading{align-items:flex-start;gap:10px;margin-bottom:20px}h1{font-size:29px}h1+p{font-size:11px;line-height:1.7}.page-heading>.btn{padding:10px;font-size:10px;margin-top:8px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:19px}.stat:nth-child(3){border-left:0;border-top:1px solid var(--line)}.stat:nth-child(4){border-top:1px solid var(--line)}.stat-label{font-size:10px}.stat-value{font-size:26px}.right-rail{grid-template-columns:1fr}.calendar-toolbar{padding:14px 12px;gap:10px}.calendar-toolbar h2{font-size:12px}.calendar-controls{gap:3px}.segmented button{padding:6px 8px}.calendar.one-day .lesson strong{font-size:13px}.calendar.one-day .lesson small{font-size:10px}.calendar.one-day .lesson time{font-size:11px}.news-grid{grid-template-columns:1fr}.news-post{padding:21px}.news-grid>aside{order:2}.table-toolbar{padding:14px}.table-toolbar .muted{font-size:10px}.table-wrap td,.table-wrap th{padding:15px}.field-row{gap:10px}.dialog-body{padding:21px}.dialog-head{padding:21px}.dialog-footer{padding:17px 21px}.detail-grid{gap:17px}.admin-scope{flex-wrap:wrap;line-height:1.6}.admin-scope select{margin:0;width:100%;max-width:none}.screen-footer{font-size:9px}.history-row{gap:9px}.history-row .pill{font-size:8px}.profile-summary{padding:14px}.post-footer{align-items:flex-start}.signin-card{padding:27px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Live portal: no preview banner. */
.entry-time-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#length-warning:empty{display:none}@media(max-width:480px){.entry-time-row{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-time-row>.field:last-child{grid-column:1/-1}}
.whatsapp-action{margin:16px 0}.whatsapp-action .hint{margin:8px 0 0}a.btn{text-decoration:none}#whatsapp-message{min-height:150px}
/* Fixed accessible palettes: never render user-supplied CSS values. */
.entry-colour-green{--entry-bg:#e7f1ea;--entry-edge:#d0e2d5;--entry-accent:#42815b;--entry-ink:#254f36}
.entry-colour-blue{--entry-bg:#e5effa;--entry-edge:#cbdcf0;--entry-accent:#3f79b6;--entry-ink:#254e79}
.entry-colour-purple{--entry-bg:#f0e8fa;--entry-edge:#dfcef0;--entry-accent:#8b5abb;--entry-ink:#603783}
.entry-colour-amber{--entry-bg:#fcf1de;--entry-edge:#efd9b3;--entry-accent:#bd8738;--entry-ink:#79531e}
.entry-colour-rose{--entry-bg:#fbe7ed;--entry-edge:#efccd7;--entry-accent:#b95173;--entry-ink:#84344e}
.entry-colour-slate{--entry-bg:#edf0f3;--entry-edge:#d5dce3;--entry-accent:#738192;--entry-ink:#425164}
.lesson[class*="entry-colour-"]{background:var(--entry-bg);border-color:var(--entry-edge);border-left-color:var(--entry-accent);color:var(--entry-ink)}
.agenda-item[class*="entry-colour-"]{background:var(--entry-bg);border-left:4px solid var(--entry-accent)}
.entry-colour-label{display:inline-block;padding:3px 6px;border-radius:4px;font-size:10px;line-height:1.4;background:var(--entry-bg);border:1px solid var(--entry-edge);color:var(--entry-ink)}
.colour-picker{border:0;padding:0;margin:0 0 20px;min-width:0}.colour-picker legend{font-size:11px;font-weight:600;margin-bottom:8px}.colour-picker .hint{margin-bottom:10px}.colour-choices{display:flex;flex-wrap:wrap;gap:8px}.colour-choice{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:6px;padding:9px 10px;cursor:pointer;background:#fbfcf9;font-size:11px}.colour-choice input{accent-color:var(--green);margin:0}.colour-choice:has(input:checked){border-color:var(--green);box-shadow:0 0 0 1px var(--green)}.colour-choice:focus-within{outline:2px solid #de9d36;outline-offset:2px}.colour-dot{width:12px;height:12px;border-radius:50%;background:var(--entry-accent);display:inline-block;flex-shrink:0}.colour-automatic{background:conic-gradient(#42815b 0 25%,#3f79b6 25% 50%,#8b5abb 50% 75%,#bd8738 75%)}
.shell{min-height:100vh}.signin{min-height:100vh}.lesson strong{font-size:11px}.lesson time{font-size:10px}.lesson small{font-size:9px}.signin-card .field{margin-top:16px}.signin-card .form-error{color:#9a3434}

/* County Driving Academy identity. Calendar entry palettes remain independent. */
.calendar-title-short,.period-short{display:none}
.brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;width:100%}
.brand-logo{display:block;width:100%;height:auto;max-width:346px;object-fit:contain}
.brand small{margin:0;color:#bcbcc4;font-size:9px;letter-spacing:1.7px}
.sidebar{color:#f6f6f8}.sidebar .brand-logo{border-radius:4px}
.nav-label{color:#a4a4ae}.nav button{color:#ceced5}.nav button:hover{background:#252529}.nav button.active{background:#350b14;color:#fff}.nav button.active:before{background:#ed001b}.nav .badge{background:#ed001b;color:#fff}
.sidebar-note{border-color:#39393f;color:#bcbcc4}.sidebar-note strong{color:#fff}.account{border-color:#39393f}.account small{color:#bcbcc4}.account button{color:#ceced5}.avatar{background:#fff0f2;color:#a50016}
.btn:hover,.icon-button:hover{background:#f3f3f5}.btn.primary:hover{background:#a50016;border-color:#a50016}.btn.quiet:hover{background:#fff0f2}
button:focus-visible,a:focus-visible,.colour-choice:focus-within{outline-color:#c9001b}input:focus,select:focus,textarea:focus{outline-color:#c9001b}
.signin{background:#f1f1f4;border-top:5px solid #ed001b;padding:30px}.signin-card{border-top:4px solid #101012}.signin .brand{margin-bottom:30px}.signin .brand small{color:#68686f}.signin h1{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:29px;font-weight:700;letter-spacing:-.8px}
.field input,.field select,.field textarea,.search{background:#fcfcfd;border-color:#dcdce2}.segmented{background:#f2f2f5;border-color:#e4e4e8}.segmented button.selected{box-shadow:0 1px 3px #20202414}
.admin-scope{background:#fff4f5;border-color:#efd9dd}.admin-scope select{border-color:#dfcbd0}.next-card{background:#fff4f5;border-color:#efd9dd}.card-kicker{color:#8b4050}.next-card p{color:#71585d}.next-card .btn{background:#fff;border-color:#e7ccd2}.time-pill{background:#f9dfe4;color:#8b1930}
.profile-summary{background:#f4f4f6}th{background:#f8f8fa}td{border-bottom-color:#ededf0}.news-post p{color:#5f5f68}#toast{background:#202024;box-shadow:0 4px 20px #20202425}.screen-footer{color:#777780}
@media(max-width:760px){.mobile-brand{justify-content:flex-start}.mobile-brand .brand{width:190px;gap:6px}.mobile-brand .brand small{font-size:8px;color:#bcbcc4}.sidebar{gap:14px}.signin{padding:20px}.signin-card{padding:25px}.signin .brand{margin-bottom:26px}}

/* Fit the complete week to the phone width; keep normal text size in Day/List. */
@media(max-width:760px){
 .calendar-workspace .sidebar{padding:8px 12px;gap:7px}
 .calendar-workspace .mobile-brand .brand{width:120px}
 .calendar-workspace .mobile-brand .brand small{display:none}
 .calendar-workspace .nav button{min-height:40px;padding:8px 6px}
 .calendar-workspace .topbar{height:44px;padding-inline:12px}
 .calendar-page{display:flex;flex-direction:column;padding:12px 8px 22px;gap:12px}
 .calendar-page>.page-heading{order:0;margin:0;align-items:center;min-width:0}
 .calendar-page>.page-heading .eyebrow,.calendar-page>.page-heading p,.calendar-title-wide,.period-wide{display:none}
 .calendar-title-short,.period-short{display:inline}
 .calendar-page>.page-heading h1{font-family:inherit;font-size:22px;font-weight:650;letter-spacing:-.4px}
 .calendar-page>.page-heading>.btn{margin:0;min-height:40px;padding:9px 12px;font-size:12px}
 .calendar-page>.admin-scope{order:1;margin:0;display:grid;grid-template-columns:19px minmax(0,1fr) minmax(100px,44%);gap:8px;padding:8px;font-size:10px}
 .calendar-page>.admin-scope select{width:100%;max-width:none;min-width:0;margin:0;min-height:36px}
 .calendar-page>.calendar-layout{order:2;min-width:0;gap:16px}
 .calendar-page>.stats{order:3;margin:0}
 .calendar-page>.screen-footer{order:4;margin-top:0;flex-wrap:wrap}
 .calendar-page .calendar-toolbar{padding:8px;gap:6px}
 .calendar-page .calendar-controls{width:100%;min-width:0;gap:2px}
 .calendar-page .calendar-controls h2{flex:1;min-width:0;text-align:center;font-size:11px;line-height:1.4}
 .calendar-page .calendar-controls .icon-button{width:44px;min-height:44px;flex-shrink:0}
 .calendar-page .calendar-controls .btn{min-height:40px;flex-shrink:0}
 .calendar-page .segmented{width:100%}
 .calendar-page .segmented button{flex:1;min-height:34px;font-size:11px}
 .calendar-page .calendar{min-width:0;width:100%}
 .calendar-page .calendar-scroll{overflow-x:auto}
 .calendar-page .calendar:not(.one-day) .days,.calendar-page .calendar:not(.one-day) .timeline{grid-template-columns:34px repeat(7,minmax(0,1fr))}
 .calendar-page .day-label{min-width:0;padding:7px 0}
 .calendar-page .day-label small{font-size:8px;letter-spacing:0}
 .calendar-page .day-label b{font-size:15px;min-width:25px;height:25px;margin-top:2px}
 .calendar-page .time-axis{font-size:8px;font-variant-numeric:tabular-nums}
 .calendar-page .time-axis span{left:2px}
 .calendar-page .calendar:not(.one-day) .lesson{left:1px;right:1px;padding:3px 2px;border-left-width:2px;border-radius:4px;min-width:0}
 .calendar-page .calendar:not(.one-day) .lesson strong{font-size:10px;line-height:1.15;margin:3px 0;overflow-wrap:anywhere}
 .calendar-page .calendar:not(.one-day) .lesson time{font-size:8px;line-height:1.15;white-space:nowrap;letter-spacing:-.2px}
 .calendar-page .calendar:not(.one-day) .lesson small,.calendar-page .calendar:not(.one-day) .lesson-end{display:none}
 .calendar-page .legend{padding:10px;gap:8px;font-size:9px}
}
/* Expanded fixed palette and manual communication workflow. */
.entry-colour-red{--entry-bg:#ffe5e9;--entry-edge:#efc0c9;--entry-accent:#bc133d;--entry-ink:#8e0d2c}
.entry-colour-orange{--entry-bg:#fff0e0;--entry-edge:#f0d2b6;--entry-accent:#c7550a;--entry-ink:#8e3b06}
.entry-colour-yellow{--entry-bg:#fff9c9;--entry-edge:#e9dc8c;--entry-accent:#a18500;--entry-ink:#615000}
.entry-colour-violet{--entry-bg:#eee6ff;--entry-edge:#d5c6f1;--entry-accent:#8050d5;--entry-ink:#57348f}
.entry-colour-indigo{--entry-bg:#e9eaff;--entry-edge:#caccf3;--entry-accent:#5d62cc;--entry-ink:#3a4092}
.entry-colour-cyan{--entry-bg:#d9f8fc;--entry-edge:#a5e1e9;--entry-accent:#0096ae;--entry-ink:#005f70}
.entry-colour-teal{--entry-bg:#daf5ee;--entry-edge:#b0e2d5;--entry-accent:#138573;--entry-ink:#075a4c}
.entry-colour-burgundy{--entry-bg:#f3e1e3;--entry-edge:#ddbbc1;--entry-accent:#812a35;--entry-ink:#66202c}
.entry-colour-charcoal{--entry-bg:#e5e5e9;--entry-edge:#cbccd3;--entry-accent:#52535b;--entry-ink:#33343b}
.entry-colour-black{--entry-bg:#222226;--entry-edge:#55555d;--entry-accent:#0c0c0e;--entry-ink:#fff}
.lesson.unconfirmed{background:#f0f1f4;border-color:#dfe1e7;border-left-color:#8b91a1;color:#414957}
.legend .cyan{background:#0096ae}.legend .purple{background:#8b5abb}.legend .green{background:#42815b}
.availability-list{display:grid;gap:10px}.availability-pupil{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line)}.availability-pupil>div{min-width:0}.availability-pupil strong{display:block;font-size:12px;overflow-wrap:anywhere}.availability-pupil small{display:block;font-size:10px;color:var(--muted);margin-top:5px;line-height:1.5}.availability-pupil .btn{flex-shrink:0;font-size:10px}
@media(max-width:760px){.calendar-page>.page-heading{flex-wrap:wrap}.calendar-actions{margin-left:auto}.calendar-actions .btn{min-height:40px;font-size:10px;padding:8px 10px}.whatsapp-action .btn{min-height:40px;font-size:11px}.colour-choice{max-width:100%}.availability-pupil{flex-wrap:wrap}}
@media(max-width:380px){.calendar-actions{width:100%}.calendar-actions .btn{flex:1}}

/* Keep the 24:00 boundary label inside the final hour, above the legend. */
.time-axis span.day-end{transform:translateY(-100%)}
/* A scrollable 24-hour diary opens at 07:00; weekday headings stay visible. */
.calendar-page .calendar-scroll{max-height:min(760px,70vh);max-height:min(760px,70dvh);overflow:auto;overscroll-behavior-y:contain;scroll-behavior:auto}
.calendar-page .calendar-scroll:focus-visible{outline:2px solid var(--green);outline-offset:-2px}
.calendar-page .days{position:sticky;top:0;z-index:3;background:#fff}
/* Device-local light/dark preference; booking colour palettes stay intact. */
:root{color-scheme:light}.theme-toggle{width:44px;min-height:44px;flex-shrink:0}.breadcrumb-divider{display:inline-flex}
:root[data-theme="dark"]{color-scheme:dark;--ink:#f1f1f7;--muted:#b6b6c4;--green:#d90024;--light:#33232c;--line:#383840;--paper:#111115}
:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .card,:root[data-theme="dark"] .stats,:root[data-theme="dark"] dialog{background:#1c1c23}
:root[data-theme="dark"] a,:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .week-note strong,:root[data-theme="dark"] .stat-foot.positive,:root[data-theme="dark"] .rail-card .text-link{color:#ff91a3}
:root[data-theme="dark"] .btn{background:#25252e;color:var(--ink);border-color:#484853}
:root[data-theme="dark"] .btn:hover,:root[data-theme="dark"] .icon-button:hover{background:#32323e}
:root[data-theme="dark"] .btn.primary{background:#c9001b;border-color:#e2354e;color:#fff}
:root[data-theme="dark"] .btn.primary:hover{background:#a50016}
:root[data-theme="dark"] .btn.quiet{background:transparent;color:#ff91a3;border-color:transparent}
:root[data-theme="dark"] .btn.danger,:root[data-theme="dark"] .form-error,:root[data-theme="dark"] .signin-card .form-error{color:#ff9b9b}
:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .search,:root[data-theme="dark"] .admin-scope select{background:#16161d;color:var(--ink);border-color:#4a4a57}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#a5a5b4;opacity:1}
:root[data-theme="dark"] button:focus-visible,:root[data-theme="dark"] a:focus-visible,:root[data-theme="dark"] input:focus,:root[data-theme="dark"] select:focus,:root[data-theme="dark"] textarea:focus,:root[data-theme="dark"] .colour-choice:focus-within,:root[data-theme="dark"] .calendar-scroll:focus-visible{outline-color:#ff91a3}
:root[data-theme="dark"] .segmented{background:#111118;border-color:var(--line)}
:root[data-theme="dark"] .segmented button.selected{background:#363641;color:var(--ink)}
:root[data-theme="dark"] .days,:root[data-theme="dark"] .calendar-page .days{background:#202028}
:root[data-theme="dark"] .day-label{border-left-color:var(--line)}
:root[data-theme="dark"] .day-label.weekend,:root[data-theme="dark"] .day-column.weekend{background-color:#17171e}
:root[data-theme="dark"] .day-column{background:repeating-linear-gradient(to bottom,transparent 0,transparent 19px,#292930 19px,#292930 20px,transparent 20px,transparent 39px,var(--line) 39px,var(--line) 40px)}
:root[data-theme="dark"] .time-axis{color:#b6b6c4}
:root[data-theme="dark"] th{background:#24242d}
:root[data-theme="dark"] td{border-bottom-color:var(--line)}
:root[data-theme="dark"] .news-post p{color:#d0d0dc}
:root[data-theme="dark"] .next-card,:root[data-theme="dark"] .admin-scope{background:#30212a;border-color:#59404b}
:root[data-theme="dark"] .card-kicker,:root[data-theme="dark"] .next-card p{color:#e1bbc6}
:root[data-theme="dark"] .next-card .btn{background:#25252e;border-color:#70515e}
:root[data-theme="dark"] .time-pill,:root[data-theme="dark"] .pill,:root[data-theme="dark"] .avatar{background:#422631;color:#ffb7c8}
:root[data-theme="dark"] .news-tag,:root[data-theme="dark"] .pill.amber{background:#483722;color:#ffd59d}
:root[data-theme="dark"] .profile-summary{background:#2a2a35}
:root[data-theme="dark"] .colour-choice{background:#25252e}
:root[data-theme="dark"] .colour-choice:has(input:checked){border-color:#ff91a3;box-shadow:0 0 0 1px #ff91a3}
:root[data-theme="dark"] .colour-choice input{accent-color:#ff91a3}
:root[data-theme="dark"] .signin{background:#111115}
:root[data-theme="dark"] .signin-card{border-top-color:#e10028}
:root[data-theme="dark"] .signin .brand small,:root[data-theme="dark"] .screen-footer{color:var(--muted)}
:root[data-theme="dark"] dialog::backdrop{background:#030306b3}
:root[data-theme="dark"] #toast{border:1px solid #575763}
@media(max-width:480px){.breadcrumb-prefix,.breadcrumb-divider{display:none}.topbar-right{gap:6px}}
/* List entries retain their own palette ink against their coloured background. */
:root[data-theme="dark"] .agenda-item[class*="entry-colour-"]{color:var(--entry-ink)}
:root[data-theme="dark"] .agenda-item[class*="entry-colour-"] .agenda-date,:root[data-theme="dark"] .agenda-item[class*="entry-colour-"] p{color:var(--entry-ink)}

/* Subtle builder credit in the workspace footer and account actions. */
.built-by{white-space:nowrap}.account-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.account-footer .built-by{margin-left:auto}

.screen-footer a.built-by,.account-footer a.built-by{color:inherit;text-decoration:underline;text-underline-offset:2px}
/* Events have their own fixed light palette, independent of the page theme. */
.lesson.unconfirmed{--entry-bg:#f0f1f4;--entry-edge:#dfe1e7;--entry-accent:#8b91a1;--entry-ink:#414957}
.lesson.test{--entry-bg:#fcf1de;--entry-edge:#f2e2c3;--entry-accent:#d5a04c;--entry-ink:#8a6127}
.lesson.personal{--entry-bg:#f0eeea;--entry-edge:#e7e2d9;--entry-accent:#9c9380;--entry-ink:#6e685c}
.lesson.complete{--entry-bg:#edf2f5;--entry-edge:#dfe8ec;--entry-accent:#84a0ab;--entry-ink:#506975}
:root .lesson,:root[data-theme="dark"] .lesson{-webkit-appearance:none;appearance:none;color-scheme:light;color-scheme:only light;background-color:var(--entry-bg,#f0f1f4);background-image:none;border-color:var(--entry-edge,#dfe1e7);border-left-color:var(--entry-accent,#8b91a1);color:var(--entry-ink,#414957);-webkit-text-fill-color:var(--entry-ink,#414957)}
.agenda-item[class*="entry-colour-"],.entry-colour-label,.colour-dot{color-scheme:light;color-scheme:only light}
.lesson[data-movable="true"]{cursor:grab;touch-action:pan-y pinch-zoom;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.lesson.is-moving{opacity:.35}
:root .calendar-drag-ghost{z-index:9999;pointer-events:none;opacity:.95;box-shadow:0 6px 18px #0005;transition:none;transform:none;padding:3px 2px;border-left-width:2px}
.calendar-drag-ghost strong{font-size:10px;line-height:1.15;margin:3px 0}.calendar-drag-ghost time{font-size:8px}.calendar-drag-ghost small{display:none}
.calendar-move-hint{position:fixed;z-index:10000;bottom:14px;left:50%;transform:translateX(-50%);max-width:94%;padding:10px 14px;border-radius:8px;background:#202024;color:#fff;font-size:12px;box-shadow:0 3px 16px #0005;pointer-events:none;text-align:center}
/* One compact mobile header; the full desktop navigation stays in place. */
.mobile-header-logo,.mobile-page-title,.mobile-menu-toggle{display:none}
html.mobile-menu-open{overflow:hidden}
.mobile-menu{position:fixed;inset:0 0 auto auto;width:min(340px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:12px 12px 12px auto;overflow:auto;overscroll-behavior:contain}
.mobile-menu .dialog-head{padding:16px;align-items:center}.mobile-menu .dialog-head h2{font-family:inherit;font-size:18px;font-weight:650;margin:0}.mobile-menu .dialog-head .icon-button{width:44px;min-height:44px}
.mobile-menu-body{padding:12px 16px 16px}.mobile-menu .nav{display:grid;gap:6px}.mobile-menu .nav button{min-height:44px;justify-content:flex-start;padding:12px;flex:none;color:var(--ink);font-size:13px;text-align:left}.mobile-menu .nav button:hover{background:var(--light)}.mobile-menu .nav button.active{background:var(--light);color:var(--ink)}.mobile-menu .nav .badge{margin-left:auto}
.mobile-menu-account{display:grid;gap:10px;border-top:1px solid var(--line);margin-top:16px;padding-top:16px}.mobile-menu-account>.btn{min-height:44px;justify-content:flex-start;text-align:left}.mobile-menu-theme{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;font-size:13px;color:var(--muted)}.mobile-menu-account .form-error{margin:0}.mobile-menu-account .form-error:empty{display:none}
@media(max-width:760px){
 .shell .sidebar{display:none}
 .shell .topbar{height:52px;padding:4px 12px;gap:10px}
 .shell .topbar>.breadcrumb,.shell .topbar>.topbar-right{display:none}
 .mobile-header-logo{display:block;width:104px;height:41px;object-fit:contain;flex-shrink:0}
 .mobile-page-title{display:block;flex:1;min-width:0;font-size:13px;font-weight:600;color:var(--ink);line-height:1.25}
 .mobile-menu-toggle{display:inline-flex;width:44px;min-height:44px;flex-shrink:0;color:var(--ink)}
 .calendar-page{padding-top:8px;gap:10px}
 .calendar-page>.page-heading{position:relative}
 .calendar-page>.page-heading>div:not(.calendar-actions){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .calendar-page .calendar-actions{width:100%;margin:0;justify-content:space-between}
}
.mobile-menu-toggle{position:relative}.mobile-menu-badge{position:absolute;top:0;right:0;min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px;border-radius:10px;background:#c9001b;color:white;font-size:9px;font-weight:700}
/* Private noticeboard attachments and local editor previews. */
.notice-media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.notice-media-item{margin:0;min-width:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--paper)}.notice-media-item img,.notice-media-item video{display:block;width:100%;height:auto;max-height:420px;object-fit:contain;background:#111}.notice-media-item video{max-height:360px}.notice-media-item figcaption{padding:10px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:11px;line-height:1.6}.notice-media-item figcaption>span{overflow-wrap:anywhere;flex:1;min-width:0}.notice-media-item figcaption .hint{width:100%;margin:0}.notice-media-fields{border:0;padding:0;margin:20px 0;min-width:0}.notice-media-fields legend{font-size:13px;font-weight:650;margin-bottom:10px}.notice-media-fields input[type="file"]{font-size:11px}.notice-media-fields .notice-media-item img,.notice-media-fields .notice-media-item video{max-height:220px}@media(max-width:560px){.notice-media{grid-template-columns:1fr}}

/* Preserve address lines and provide a taller editing area. */
.field textarea.address-input{min-height:110px;line-height:1.5;resize:vertical}
.pupil-address{white-space:pre-line;overflow-wrap:anywhere}
.address-link{display:inline-block;padding-block:5px;text-decoration:underline;text-underline-offset:3px}
