:root{
  --navy:#103d69;--navy-dark:#092d4e;--blue:#2d79a7;--text:#263d52;
  --muted:#65788b;--line:#dbe4ec;--soft:#f5f8fa;--white:#fff;--radius:10px;
  --content:1120px;
}
*{box-sizing:border-box}
html{font-family:"Segoe UI",Arial,Helvetica,sans-serif;color:var(--text);-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--white);min-width:320px;font-size:14px;line-height:1.45}
button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #70b8e5;outline-offset:3px}
button:disabled{opacity:.55;cursor:not-allowed}[hidden]{display:none!important}
.top-line{height:4px;background:var(--navy)}
.header{border-bottom:1px solid var(--line);background:#fff}
/* Header: access selector left of one-line primary navigation */
.header-main{max-width:1280px;margin:0 auto;display:grid;grid-template-columns:max-content max-content minmax(0,1fr) max-content;align-items:center;gap:clamp(12px,1.4vw,22px);min-height:76px;padding:12px 24px}
.identity{display:flex;align-items:center;gap:12px;white-space:nowrap;min-width:0}
.mark{display:grid;place-items:center;width:40px;height:40px;border:1.5px solid var(--navy);border-radius:7px;color:var(--navy);flex:none}
.mark svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.brand-name{display:flex;flex-direction:column;line-height:1.15;white-space:nowrap}
.brand-name strong{font-size:14px;letter-spacing:.015em;color:var(--navy)}
.brand-name span{font-size:10px;color:var(--muted);margin-top:5px;letter-spacing:.08em}
.access-menu{position:relative;z-index:25;min-width:128px}
.access-menu>summary{list-style:none;display:flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid var(--line);border-radius:7px;padding:10px 11px;color:var(--navy);font-size:12px;background:var(--white);cursor:pointer;min-height:40px}
.access-menu>summary::-webkit-details-marker{display:none}
.access-menu>summary:hover,.access-menu[open]>summary{border-color:#98b7cc;background:#f5f9fb}
.access-word{font-weight:400;color:var(--muted)}
.access-menu strong{font-size:12.5px;font-weight:700}
.access-menu .chevron{margin-left:auto;font-size:16px;line-height:1;color:var(--muted);transition:transform .15s}
.access-menu[open] .chevron{transform:rotate(180deg)}
.access-options{position:absolute;left:0;top:calc(100% + 7px);width:190px;padding:5px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 25px #0f34541c;z-index:30}
.access-options a{display:flex;align-items:center;justify-content:space-between;padding:11px 10px;border-radius:5px;font-size:12.5px;color:var(--text);font-weight:600}
.access-options a:hover,.access-options a[aria-current]{background:#eef5f9;color:var(--navy)}
.access-current-note{font-size:10px;font-weight:500;color:var(--muted)}
.main-nav{display:flex;align-items:center;justify-content:center;gap:2px;min-width:0;white-space:nowrap}
.main-nav a{display:flex;align-items:center;justify-content:center;min-height:41px;padding:9px 10px;color:#52677a;border-radius:6px;font-size:12.7px;font-weight:600;white-space:nowrap}
.main-nav a:hover{background:var(--soft);color:var(--navy)}
.main-nav a.active{color:var(--navy);background:#eaf2f7}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}
.signout,.nav-button{border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:6px;padding:9px 12px;font-size:12.5px;font-weight:600;white-space:nowrap}
.signout:hover,.nav-button:hover{border-color:#86a6c0;background:#f7fafc}
.portal-link{font-size:12px;color:#54748d;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.menu-toggle{display:none;align-items:center;justify-content:center;width:41px;height:41px;border-radius:7px;border:1px solid var(--line);background:#fff;color:var(--navy)}
.menu-toggle svg{height:22px;width:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.sr-only{position:absolute!important;clip-path:inset(50%);height:1px;width:1px;overflow:hidden;white-space:nowrap}
.login-header{grid-template-columns:1fr auto}
.login-header .header-actions{grid-column:2}
.page{max-width:var(--content);margin:0 auto;padding:43px 24px 78px;min-height:calc(100dvh - 153px)}
.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:0 0 22px;border-bottom:1px solid var(--line);margin:0 0 28px}
.eyebrow{font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--blue);margin:0 0 9px}
.page-intro h1{font-size:clamp(27px,3vw,34px);letter-spacing:-.025em;line-height:1.18;font-weight:700;color:var(--navy-dark);margin:0}
.page-intro p:not(.eyebrow){font-size:13px;color:var(--muted);margin:7px 0 0;line-height:1.5}
.count{font-size:12.5px;color:var(--muted);white-space:nowrap;padding-bottom:5px}
/* Homepage: category panels are the only resource links. No duplicate Quick Links area. */
.hub-section-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;align-items:stretch}
.hub-section-grid.two-up{grid-template-columns:repeat(2,minmax(0,1fr))}
.hub-panel{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);background:#fff;border-radius:9px;overflow:hidden}
.hub-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--soft);padding:18px 18px 16px;border-bottom:1px solid var(--line)}
.hub-panel-head h2{font-size:17px;font-weight:700;color:var(--navy-dark);letter-spacing:-.015em;margin:0}
.hub-panel-head a{color:var(--navy);font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.hub-panel-links{display:flex;flex-direction:column;flex:1}
.panel-resource{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:77px;padding:15px 17px;border-bottom:1px solid #e9eef2;transition:background .15s}
.panel-resource:last-child{border-bottom:0}
.panel-resource:hover{background:#f7fafc}
.panel-resource-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.panel-resource-copy strong{color:var(--navy-dark);font-size:13.4px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.panel-resource-copy small{font-size:11.5px;color:var(--muted);line-height:1.4}
.panel-arrow{font-size:17px;color:var(--blue);flex:none;font-weight:400}
.empty-panel{margin:0;padding:20px;color:var(--muted)}
/* Searchable category and full library pages */
.search-row{display:flex;align-items:center;gap:11px;margin:0 0 18px;flex-wrap:wrap}
.search{height:44px;border:1px solid #c8d6e2;background:#fff;border-radius:7px;padding:0 14px;min-width:220px;flex:1;color:var(--text)}
.filter{height:44px;border:1px solid #c8d6e2;border-radius:7px;color:var(--text);background:#fff;padding:0 12px;min-width:142px}
.resource-list{border:1px solid var(--line);border-radius:var(--radius);background:#fff;overflow:hidden}
.resource-row{display:flex;align-items:center;gap:16px;padding:16px 19px;border-bottom:1px solid #e6ebf0;min-height:73px}
.resource-row:last-child{border-bottom:0}.resource-row:hover{background:#f9fbfd}
.resource-details{min-width:0;flex:1}
.resource-details a,.resource-details .resource-name{font-size:14px;font-weight:700;color:var(--navy-dark);line-height:1.4}
.resource-details a:hover{text-decoration:underline;text-underline-offset:3px}
.resource-meta{margin-top:5px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);line-height:1.4}
.mini-bullet{color:#a7b3be}.open-link{font-size:17px;color:var(--blue);padding:7px 2px 7px 9px;flex:none}
.empty{border:1px dashed #c8d6e2;padding:24px;border-radius:var(--radius);color:var(--muted);font-size:13px}
/* Andrea admin resource editor */
.primary{background:var(--navy);border:1px solid var(--navy);color:#fff;border-radius:7px;padding:10px 15px;font-weight:600}
.primary:hover{background:var(--navy-dark)}
.outline{background:#fff;border:1px solid #b9cbd9;color:var(--navy);border-radius:7px;padding:10px 15px;font-weight:600}
.outline:hover{background:#f1f7fa}
.mini-btn{border:1px solid var(--line);background:#fff;border-radius:6px;padding:7px 10px;color:var(--navy);font-size:12px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 18px}
.toolbar .buttons{display:flex;gap:8px;flex-wrap:wrap}
.select-row{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--muted)}
.edit-row{display:flex;align-items:center;gap:16px;padding:14px 17px;border-bottom:1px solid var(--line)}.edit-row:last-child{border-bottom:0}
.edit-row .edit-actions{display:flex;gap:7px}
.edit-row strong{color:var(--navy-dark);font-size:13px}
.note{font-size:12.5px;color:var(--muted);line-height:1.5;margin:10px 0 18px}
.status-msg{font-size:12.5px;color:var(--navy);margin:0 0 12px}
.status-msg:empty{display:none}.status-msg:not(:empty){border-left:3px solid var(--blue);background:var(--soft);padding:11px 12px;border-radius:4px}
.editor{background:var(--soft);border:1px solid var(--line);border-radius:9px;padding:22px;margin:18px 0}
.editor h2{font-size:17px;color:var(--navy-dark);margin:0 0 17px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}.field label{font-size:12.5px;font-weight:700;color:var(--text)}
.field input,.field select{min-height:42px;width:100%;border:1px solid #bfcfdd;border-radius:6px;padding:10px;background:#fff}
.field .field-help{font-size:11.5px;color:var(--muted)}
.form-actions{display:flex;gap:8px;margin-top:19px}
/* Login */
.login-page{background:#f7f9fb;min-height:100dvh}
.login-page .page{min-height:calc(100dvh - 150px);display:flex;align-items:center;justify-content:center;padding:48px 20px}
.login-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:32px 34px;width:min(100%,470px);box-shadow:0 10px 30px #0f34540d}
.login-card h1{margin:0;font-size:27px;letter-spacing:-.03em;color:var(--navy-dark)}
.login-card .subtext{color:var(--muted);font-size:13px;margin:9px 0 23px}
.login-role{display:block;width:100%;height:44px;padding:0 12px;margin:0 0 20px;background:#fff;color:var(--navy-dark);border:1px solid #bdccd9;border-radius:7px;font-weight:600}
.login-card label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}
.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1;min-width:0;height:43px;border:1px solid #bdccd9;border-radius:7px;padding:0 12px}
.password-wrap button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:0 12px;color:var(--navy)}
.login-submit{width:100%;margin-top:15px;min-height:43px}
.login-error{font-size:12.5px;color:#a12828;margin:12px 0 0;min-height:18px}
.login-note{font-size:11.5px;color:var(--muted);line-height:1.6;margin:12px 0 0}
/* Footer and preview */
.footer{border-top:1px solid var(--line);padding:19px 24px;font-size:11.5px;color:#71808d}
.footer-inner{max-width:calc(var(--content) - 48px);margin:0 auto;display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between}
.footer a{text-decoration:underline;text-underline-offset:3px}
.preview-banner{max-width:1280px;margin:0 auto;padding:7px 24px;font-size:11px;color:var(--muted);text-align:right}
.noscript{max-width:1000px;margin:40px auto;font-weight:700}
@media(max-width:1120px){
 .header-main{grid-template-columns:minmax(0,1fr) max-content max-content max-content;gap:10px;padding:12px 20px}
 .main-nav{display:none;grid-row:2;grid-column:1/-1;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:2px;padding:12px 0 2px;border-top:1px solid var(--line)}
 .main-nav.is-open{display:flex}
 .main-nav a{justify-content:flex-start;width:100%;padding:11px 12px;font-size:13.5px}
 .menu-toggle{display:flex}
 .login-header{grid-template-columns:1fr auto}
}
@media(max-width:800px){
 .hub-section-grid{grid-template-columns:1fr 1fr}
 .hub-section-grid .hub-panel:last-child:nth-child(odd){grid-column:1/-1}
}
@media(max-width:680px){
 .header-main{grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;padding:12px 16px}
 .identity{grid-column:1;grid-row:1}
 .menu-toggle{grid-column:2;grid-row:1;justify-self:end}
 .access-menu{grid-column:1;grid-row:2;min-width:140px;max-width:170px}
 .header-actions{grid-column:2;grid-row:2;justify-self:end}
 .main-nav{grid-column:1/-1;grid-row:3}
 .login-header{grid-template-columns:1fr auto}
 .login-header .header-actions{grid-column:2;grid-row:1}
 .page{padding:28px 16px 64px}
 .page-intro{padding-bottom:18px;margin-bottom:22px}
 .page-intro h1{font-size:28px}
 .hub-section-grid,.hub-section-grid.two-up{grid-template-columns:1fr;gap:14px}
 .hub-section-grid .hub-panel:last-child:nth-child(odd){grid-column:auto}
 .hub-panel-head{padding:14px 16px}.panel-resource{padding:13px 16px;min-height:67px}
 .portal-link{display:none}.search{min-width:160px}
 .resource-row{padding:14px 15px}.form-grid{grid-template-columns:1fr}.editor{padding:17px}
 .footer{padding:19px 16px}.login-card{padding:27px 22px}
 .preview-banner{padding:5px 16px;text-align:left}
}
@media(max-width:425px){
 .brand-name strong{font-size:12px}.brand-name span{font-size:10px}
 .mark{width:35px;height:35px}.mark svg{width:20px;height:20px}
 .signout{font-size:12px;padding:8px 11px}
 .search{flex-basis:100%}.filter{flex:1}
 .edit-row{align-items:flex-start;flex-wrap:wrap}.edit-row .edit-actions{width:100%}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}

/* Version 5.5 — light/dark theme and restored school links */
:root{color-scheme:light}
body{transition:background-color .15s ease,color .15s ease}
.themeToggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--blue);font-size:12px;font-weight:700;padding:10px 11px;min-height:40px;white-space:nowrap}
.themeToggle:hover{background:var(--soft);border-color:#aac0d1}
.themeGlyph{font-size:18px;line-height:1}
.schoolLinkBar{display:flex;align-items:center;gap:16px;margin:-8px 0 20px;padding:11px 14px;background:#f4f8fb;border:1px solid var(--line);border-radius:8px;font-size:12px;flex-wrap:wrap}
.schoolLinkBar span{font-size:11px;font-weight:700;color:var(--muted);margin-right:3px}
.schoolLinkBar a{color:var(--blue);font-weight:650;text-decoration:none;text-underline-offset:3px}
.schoolLinkBar a:hover,.footerLinks a:hover{text-decoration:underline}
.calHeaderLinks,.footerLinks{display:flex;align-items:center;gap:17px;flex-wrap:wrap}
.footerLinks a{color:var(--blue);font-weight:600}
.embedBoxLive{padding:0;height:475px}
.embedBoxLive iframe{min-height:475px}
@media(max-width:1150px){.headrow{gap:12px}.nav button{padding:10px 7px;font-size:11.8px}}
@media(max-width:800px){.themeToggle{margin-left:auto}.schoolLinkBar{gap:11px}.embedBoxLive,.embedBoxLive iframe{height:390px;min-height:390px}}
@media(max-width:470px){.themeLabel{font-size:11px}.schoolLinkBar{padding:10px 12px}.calHeaderLinks{gap:8px}}
html[data-theme="dark"]{
 color-scheme:dark;--blue:#8acafa;--dark:#e6f0fa;--accent:#86c6f1;--line:#34475b;--muted:#b5c5d5;--bg:#0d1623;--soft:#172738;--white:#172435;--green:#85d7b4;color:#e8f0f8;
}
html[data-theme="dark"] body{background:var(--bg);color:#e8f0f8}
html[data-theme="dark"] .header,html[data-theme="dark"] .foot{background:#101d2c;border-color:var(--line)}
html[data-theme="dark"] .banner{background:#1d354a;border-color:#36516a;color:#d2e9fa}
html[data-theme="dark"] .brand small,html[data-theme="dark"] .foot{color:#b2c5d8}
html[data-theme="dark"] .nav button{color:#bbccdc}
html[data-theme="dark"] .nav button.on,html[data-theme="dark"] .nav button:hover{background:#21405a;color:#dbf0ff}
html[data-theme="dark"] .access,html[data-theme="dark"] .themeToggle,html[data-theme="dark"] .btn,html[data-theme="dark"] .tinyBtn,html[data-theme="dark"] .select,html[data-theme="dark"] .search,html[data-theme="dark"] .form input,html[data-theme="dark"] .form select,html[data-theme="dark"] .form textarea{background:#1b2b3e;color:#eaf3ff;border-color:#455d75}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9bacc0}
html[data-theme="dark"] .panel,html[data-theme="dark"] .list,html[data-theme="dark"] .form,html[data-theme="dark"] .homeTile,html[data-theme="dark"] .shortcutTile,html[data-theme="dark"] .homeCalBody,html[data-theme="dark"] .homeUseful,html[data-theme="dark"] .embedShell,html[data-theme="dark"] .videoCard,html[data-theme="dark"] .tipTile,html[data-theme="dark"] .tipList,html[data-theme="dark"] .howCard,html[data-theme="dark"] .modal,html[data-theme="dark"] .tabbar button{background:#172435;color:#eaf3ff;border-color:var(--line)}
html[data-theme="dark"] .panelHead,html[data-theme="dark"] .embedHeader,html[data-theme="dark"] .calNotice,html[data-theme="dark"] .notice,html[data-theme="dark"] .uploadBox,html[data-theme="dark"] .schoolLinkBar{background:#213247;border-color:var(--line);color:#d1e2f4}
html[data-theme="dark"] .homeTile:hover,html[data-theme="dark"] .homeTile:focus-visible,html[data-theme="dark"] .resource:hover,html[data-theme="dark"] .tipRow:hover,html[data-theme="dark"] .btn:hover{background:#21374e}
html[data-theme="dark"] .resource,html[data-theme="dark"] .tipRow,html[data-theme="dark"] .listRow,html[data-theme="dark"] .homeUseful .listRow{border-color:var(--line)}
html[data-theme="dark"] .tag,html[data-theme="dark"] .pill,html[data-theme="dark"] .tabbar button.on{border-color:#496680;background:#28445e;color:#c9e9ff}
html[data-theme="dark"] .keys kbd{background:#24384c;color:#d8f0ff;border-color:#4f6981}
html[data-theme="dark"] .shortcutGameTile,html[data-theme="dark"] .shortcutGameTile:hover{background:#1e3a51;border-color:#416685}
html[data-theme="dark"] .calDay{background:#22364a;color:#e7f3ff}
html[data-theme="dark"] .calToday{background:#3c6583!important;color:#fff;outline-color:#6996bc}
html[data-theme="dark"] .embedBox{background:#172435}
html[data-theme="dark"] .modalbg{background:#030913bb}
html[data-theme="dark"] .modal textarea,html[data-theme="dark"] .modal code{background:#1b2b3e;color:#eaf3ff;border-color:var(--line)}
html[data-theme="dark"] .homeTile .tileDesc,html[data-theme="dark"] .shortcutTile span:last-child,html[data-theme="dark"] .resource small,html[data-theme="dark"] .tipRow small{color:#b6c8da}
html[data-theme="dark"] .btn.primary{background:#2f76a9;color:#fff;border-color:#2f76a9}
html[data-theme="dark"] .btn.primary:hover{background:#225e8c}
html[data-theme="dark"] :focus-visible{outline-color:#80c9ff}

/* Keep an attractive, accurate local month view even if Outlook blocks the embed. */
.liveCalDetails{border-top:1px solid var(--line)}
.liveCalDetails summary{cursor:pointer;padding:13px 20px;color:var(--blue);font-size:12px;font-weight:700;list-style:none}
.liveCalDetails summary::-webkit-details-marker{display:none}
.liveCalDetails[open] summary{border-bottom:1px solid var(--line)}
.homeLiveCal{height:400px}.homeLiveCal iframe{width:100%;height:100%;border:0;background:#f3f7fa}
html[data-theme="dark"] .homeLiveCal iframe{background:#18283b}

html[data-theme="dark"] .login-card{background:#172435;color:#eaf3ff;border-color:var(--line)}
html[data-theme="dark"] .login-note,html[data-theme="dark"] .subtext{color:#b5c5d5}
html[data-theme="dark"] .login-role,html[data-theme="dark"] .password-wrap input{background:#1b2b3e;color:#eaf3ff;border-color:#455d75}
html[data-theme="dark"] .login-card label{color:#d8e9fa}
html[data-theme="dark"] .password-wrap button{background:#1b2b3e;color:#eaf3ff;border-color:#455d75}
html[data-theme="dark"] .primary{background:#2f76a9;color:#fff}
html[data-theme="dark"] .portal-link{color:#8acafa}
.login-header .header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
@media(max-width:720px){.login-header .header-actions{justify-content:flex-start;grid-column:1/-1}}

/* Supplied school logo: no upscaling. */
.mark{border:0;border-radius:0;width:40px;height:40px}
.mark img.schoolLogo{display:block;width:36px;height:36px;object-fit:contain}

html[data-theme="dark"] .mark{background:#fff;border-radius:7px}

/* Version 5.6.1: uncluttered sign-in bar. */
.login-header{gap:12px}
.login-header .mark{width:36px;height:36px;flex:0 0 36px}
.login-header .mark img.schoolLogo{width:32px;height:32px;object-fit:contain}
.login-header .themeToggle .themeLabel{display:none}
.login-header .themeToggle{min-width:38px;min-height:38px;padding:8px 10px}
