/* Accessible type, navigation and management layouts. */
[hidden]{display:none!important}
:root{--faint:#9aa69c}
html[data-theme=light]{--faint:#536553}
body{font-size:14px}
.nav-item,.topbar-title,.global-search input,.button,.tab,.breadcrumb,.resource-info h3,.course-counts,.profile strong{font-size:14px}
.stack label,.form-grid label,.filename,.helper,.minor-link,.resource-course,.resource-size,.pagination,.file-extension{font-size:13px}
.micro,.count-label,.nav-caption,.card-bottom,.term-card p,.course-card p,.footer,.list-footnote,.auth-card>.micro,.resource-meta,.status,table small,thead th{font-size:12px}
.eyebrow,.term-index,.brand small{font-size:11px}
.button,.button.small,.icon-button,.search-submit{min-height:44px}
.button.small{font-size:12px;padding:9px 12px}
.icon-button,.search-submit{min-width:44px}
.filename{line-height:1.65;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.filename-expanded{display:block;-webkit-line-clamp:unset}
.filename-toggle{border:0;background:none;padding:3px 0;color:var(--green);font-size:12px;min-height:44px;text-align:start}
.filename-toggle[hidden]{display:none}
.sidebar{height:100dvh;overflow:hidden;padding-top:24px;gap:0}
.sidebar>.brand,.sidebar-bottom{flex-shrink:0}
.sidebar nav{min-height:0;flex:1;overflow-y:auto;margin-top:24px;padding-bottom:18px;scrollbar-width:thin}
.nav-item{min-height:44px}
.sidebar-bottom{margin-top:0;background:var(--sidebar)}
.sidebar-bottom .profile{padding:16px 0}
.profile>div{min-width:0}
.profile strong{overflow-wrap:anywhere}
.navigation-toggle{display:none}
.password-input{position:relative;display:block}
.password-input input{width:100%;padding-right:68px}
.password-visibility{position:absolute;right:4px;top:0;height:44px;padding:0 9px;background:transparent;border:0;color:var(--green);font-size:12px}
.field-error{color:var(--danger);font-size:13px;line-height:1.5}
input[aria-invalid=true]{border-color:var(--danger)}
.notice[tabindex="-1"]:focus{outline:2px solid var(--green);outline-offset:3px}
.form-help{font-size:13px;color:var(--muted);line-height:1.7}
.form-help summary{color:var(--green);cursor:pointer;min-height:44px}
.form-help p{margin-top:10px}
.account-editor{margin:20px 0}
.account-editor>summary{font-size:14px;color:var(--green);cursor:pointer;min-height:44px;display:flex;align-items:center;gap:10px}
.account-editor .panel{margin-top:12px}
.list-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin:20px 0}
.list-filters label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--muted);flex:1;min-width:150px}
.list-filters input,.list-filters select{width:100%}
.list-filters .filter-search{flex:2}
.management-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}
.management-tabs [aria-current=page]{border-color:var(--green);color:var(--green);background:var(--green-dim)}
.danger-confirm{max-width:300px;color:var(--muted);font-size:13px}
.danger-confirm summary{color:var(--danger);min-height:44px;cursor:pointer;display:flex;align-items:center}
.danger-confirm p{margin:8px 0 12px;line-height:1.6}
.danger-confirm .button{color:var(--danger)}
.sync-live-status{line-height:1.7}
.sync-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:16px}
.sync-actions form{margin:0}
.sync-action-message{font-size:13px;color:var(--muted);margin-top:10px}
.sync-metrics{font-variant-numeric:tabular-nums}
@media(max-width:900px){
 .sidebar{height:auto;overflow:visible;flex-direction:row;flex-wrap:wrap;padding:18px 20px;gap:12px}
 .sidebar>.brand{flex:1;min-width:0}
 .sidebar-bottom{margin:0}.sidebar-bottom .profile{padding:0}
 .sidebar nav{order:4;flex-basis:100%;margin:0;max-height:50dvh;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;overflow:auto;padding:10px 0;scrollbar-width:thin}
 .sidebar .nav-caption{display:block;margin:15px 12px 5px}
 .sidebar .nav-item,.sidebar .term-nav{display:flex;padding:10px 12px;font-size:14px;white-space:normal}
 .sidebar .nav-item .icon{width:18px;height:18px}
 .js .navigation-toggle{display:inline-flex}
 .js .sidebar nav:not(.is-open){display:none}
 .topbar-title{font-size:12px}
}
@media(max-width:600px){
 .sidebar{padding:14px 16px;gap:8px}
 .sidebar .brand{font-size:16px}.sidebar .brand-mark{width:32px;height:32px}
 .navigation-toggle{padding:8px 10px;font-size:13px}
 .sidebar .profile .avatar,.sidebar .profile>div{display:none}
 .topbar{padding:0 16px;gap:8px;min-height:70px}
 .global-search{min-width:0;flex:1}.global-search input{font-size:14px}
 .main-content{padding:26px 16px}
 .auth-card>p,.auth-card .muted{font-size:14px;line-height:1.65}
 .auth-card h2{font-size:24px}.auth-intro .eyebrow{font-size:10px}
 .section-heading .count-label,.section-heading .muted{font-size:12px}
 .resource-row{grid-template-columns:30px minmax(0,1fr)44px;gap:9px;padding:16px 12px}
 .resource-info h3{font-size:14px}.filename{font-size:13px}
 .resource-row>.download-button{width:44px;height:44px}
 .resource-meta{font-size:12px}.resource-course{font-size:12px}
 .tabs{gap:4px}.tab{padding:12px 5px;font-size:13px;gap:5px}.tab .icon{width:16px;height:16px}
 .breadcrumb{font-size:12px;line-height:1.7;flex-wrap:wrap}
 .users-table,.resources-table{overflow:visible;border:0}
 .users-table table,.resources-table table,.users-table tbody,.resources-table tbody{display:block;width:100%}
 .users-table thead,.resources-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .users-table tr,.resources-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:18px;background:var(--panel);border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
 .users-table td,.resources-table td{padding:0;border:0;min-width:0;overflow-wrap:anywhere;font-size:14px}
 .users-table td:before,.resources-table td:before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
 .users-table td:first-child,.users-table td:last-child,.resources-table td:first-child,.resources-table td:last-child{grid-column:1/-1}
 .users-table .inline-actions,.resources-table .inline-actions{gap:10px}
 .users-table .danger-confirm,.resources-table .danger-confirm{grid-column:1/-1}
 .list-filters{gap:10px}.list-filters label{min-width:100%;flex:1}
 .page-heading{flex-direction:column;align-items:flex-start;gap:16px}
 .page-heading .button{font-size:13px}
}

/* Task-first navigation and direct resource access. */
.sidebar>.brand{white-space:normal}.brand small{font-size:9px;letter-spacing:.08em}
.sidebar .private-note{display:none}.sidebar nav{margin-top:16px}
.nav-caption{margin-top:14px;margin-bottom:5px;letter-spacing:.1em}
.nav-group{margin:6px 0;color:var(--muted)}
.nav-group>summary{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 13px;cursor:pointer;border-radius:6px;list-style:none}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary:after{content:'›';margin-left:auto;font-size:20px;transform:rotate(90deg)}
.nav-group[open]>summary:after{transform:rotate(-90deg)}
.nav-group>summary:hover{color:var(--text);background:var(--panel-hover)}
.nav-group .nav-item{margin-left:12px;font-size:13px}
.nav-group .term-nav.current-term{color:var(--green);background:var(--green-dim);font-weight:600;box-shadow:inset 3px 0 0 var(--green)}
.term-nav>.icon{margin-left:auto}
.term-nav:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.nav-group .term-upcoming,.nav-group .term-upcoming:hover{color:var(--muted);background:transparent;cursor:default}
.term-upcoming>span{min-width:0}
.term-upcoming small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:2px}
.term-upcoming>.icon{width:14px;height:14px;color:var(--faint)}
.course-card{display:block;padding:20px;min-width:0}
.course-title{display:flex;align-items:center;gap:10px;min-height:44px}
.course-title h2{margin:0;flex:1;min-width:0;min-height:0;font-size:18px;overflow-wrap:anywhere}
.course-title>.icon:last-child{width:17px}
.course-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:18px}
.course-shortcuts>a,.course-shortcuts>.category-empty{display:flex;align-items:center;justify-content:center;gap:7px;min-height:52px;padding:8px 4px;border:1px solid var(--line);border-radius:6px;font-size:13px}
.course-shortcuts>a:hover{border-color:var(--green-line);background:var(--green-dim);color:var(--green)}
.course-shortcuts small{display:block;color:var(--muted);font-size:12px}
.category-empty{color:var(--faint);background:var(--bg)}
.course-shortcuts .icon{width:17px;height:17px}
.quick-courses .course-card{padding:16px}.quick-courses .course-title h2{font-size:16px}
.quick-courses .course-shortcuts{margin-top:12px}
.archive-heading{margin-bottom:16px}.archive-heading h1{font-size:30px}.archive-heading p{font-size:14px}
.term-browser{scroll-margin-top:24px}.empty-terms{margin:18px 0;border:1px solid var(--line);border-radius:8px;padding:8px 16px}
.empty-terms summary,.catalogue-editor>summary,.advanced-tools>summary,.manual-import>summary{cursor:pointer;min-height:44px;color:var(--text);font-size:15px;line-height:1.6;display:list-item;list-style-position:inside}
.empty-terms .tiny-list a{display:inline-flex;align-items:center;min-height:44px;color:var(--green)}
.archive-summary{margin-top:30px;margin-bottom:0}
.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-action{min-width:0}.admin-action p{font-size:14px}
.catalogue-editor[open]>summary,.manual-import[open]>summary{margin-bottom:16px}
.catalogue-editor .stack{margin-top:12px}.manual-import>.panel{margin-top:20px}
.advanced-tools .button{margin-top:14px}.mobile-shortcuts{display:none}
@media(max-width:900px){
 .sidebar .nav-group .nav-item{margin-left:12px}.sidebar nav{margin:0}
 .sidebar .nav-group>summary .icon{width:18px;height:18px}
}
@media(max-width:600px){
 .mobile-shortcuts{position:fixed;bottom:0;left:0;right:0;z-index:5;display:flex;justify-content:space-around;background:var(--sidebar);border-top:1px solid var(--line);padding:5px 8px calc(5px + env(safe-area-inset-bottom))}
 .mobile-shortcuts>a,.mobile-shortcuts>button{flex:1;min-height:52px;border:0;background:none;color:var(--muted);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;font-size:12px}
 .mobile-shortcuts [aria-current=page],.mobile-shortcuts [aria-expanded=true]{color:var(--green);background:var(--green-dim);border-radius:6px}
 .mobile-shortcuts>.navigation-toggle{display:none}.js .mobile-shortcuts>.navigation-toggle{display:flex}
 .workspace{padding-bottom:76px}.footer{padding-bottom:18px}
 .main-content{padding-top:20px}.archive-heading h1{font-size:27px}.archive-heading p{font-size:13px}
 .archive-heading{margin-bottom:12px}.quick-courses{gap:10px}
 .quick-courses .course-card{padding:12px}.quick-courses .course-title{min-height:38px}
 .course-shortcuts{gap:5px}.course-shortcuts>a,.course-shortcuts>.category-empty{font-size:12px;gap:5px}
 .quick-courses .course-shortcuts{margin-top:8px}.course-shortcuts small{display:inline;margin-left:5px}
 .quick-courses .course-shortcuts .icon{display:none}
 .admin-grid{grid-template-columns:1fr}
 .term-card .pill{font-size:10px;white-space:normal}.term-card p{font-size:12px}
 .section-heading .minor-link{font-size:12px;min-height:44px;display:flex;align-items:center;gap:6px}
 .manual-import{padding:16px}.manual-import>.panel{padding:14px}
 .empty-terms .tiny-list li{align-items:flex-start;flex-wrap:wrap;gap:4px}
 .empty-terms .tiny-list span{font-size:12px}
}

/* Location only in the toolbar; search and appearance have dedicated access. */
.location-bar{justify-content:flex-start;min-width:0}
.location-trail{min-width:0;width:100%;font-size:14px}
.location-trail ol{display:flex;flex-wrap:wrap;align-items:center;gap:0;list-style:none;margin:0;padding:0}
.location-trail li{display:flex;align-items:baseline;min-width:0;max-width:100%;line-height:1.6;overflow-wrap:anywhere}
.location-trail a{color:var(--muted);display:inline-flex;align-items:center;min-height:44px}
.location-trail a:hover{color:var(--green);text-decoration:underline}
.location-trail [aria-current=page]{color:var(--text)}
.location-separator{color:var(--faint);padding:0 12px}
.sidebar .theme-menu-control{width:100%;border:0;background:transparent;text-align:left;font:inherit;min-height:44px}
.sidebar .theme-menu-control:hover{background:var(--panel-hover);color:var(--text)}
.archive-search-form{margin:20px 0 28px}
.archive-search-form label{display:block;color:var(--muted);margin-bottom:8px;font-size:14px}
.archive-search-form>div{display:flex;align-items:stretch;gap:10px}
.archive-search-form input{flex:1;min-width:0;width:100%}
.archive-search-form #archive-search-help{font-size:13px;line-height:1.6;margin:10px 0 0}
#archive-search-status{min-height:1.6em;font-size:14px;line-height:1.6}
#archive-search-results[aria-busy="true"]{min-height:100px}
.resource-info h3.search-filename{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
@media(max-width:600px){
 .location-bar{height:auto;min-height:56px;padding:6px 16px}
 .location-trail{font-size:13px}.location-separator{padding:0 7px}
 .location-trail a{min-height:36px}
 .sidebar .theme-menu-control{width:100%;height:auto;padding:10px 12px;min-height:44px}
 .archive-search-form>div{flex-wrap:wrap}.archive-search-form .button{min-height:44px}
}

/* Brand, appearance, then navigation. Home is reached through the location trail. */
.sidebar>.theme-menu-control{flex-shrink:0;width:100%;margin:12px 0 0;text-align:left}
.sidebar nav{margin-top:14px}
.location-trail a[aria-current=page]{color:var(--text)}
@media(max-width:900px){.sidebar>.theme-menu-control{order:3;flex-basis:100%;margin:0}.sidebar nav{margin-top:0}}

/* The margin reserves the reduced height so scrolling does not shift the page. */
.location-bar{position:sticky;top:0;z-index:4;background:var(--bg);height:auto;min-height:83px;padding-top:19px;padding-bottom:19px;margin-bottom:0;transition:padding 180ms ease,min-height 180ms ease,margin-bottom 180ms ease,box-shadow 180ms ease}
.location-bar.is-compact{min-height:62px;padding-top:8.5px;padding-bottom:8.5px;margin-bottom:21px;box-shadow:0 4px 12px #0000000a}
.location-trail a{min-height:44px}
@media(max-width:600px){.location-bar{min-height:56px;padding-top:5.5px;padding-bottom:5.5px}.location-bar.is-compact{min-height:48px;padding-top:1.5px;padding-bottom:1.5px;margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){.location-bar{transition:none}}
