/* Content-driven layouts: shared structure for light and dark themes. */
html:not([data-theme="dark"]){--text-muted:#536575;--muted:var(--text-muted)}
/* Secondary content remains readable on white and softly tinted surfaces. */
html:not([data-theme="dark"]) :is(
  .breadcrumb,.breadcrumb span,.campus-clock small,.page-subtitle,
  .lesson-time>span,.lesson-time small,.lesson-tag,.lesson-detail p,
  .schedule-footnote,.date-note,.week-empty,.week-column-head,
  .message-meta,.message-meta strong,.message-header,.message p,
  .detail-item label,.detail-list dt,.profile-fields dt,
  .request-row-main small,.event-meta,.event-preview small,
  .academic-filter-panel label,.field label,.search-page-label,
  .notification-mark,.notification-meta,.notification-date,
  .notification-item-meta,.notification-copy p,
  .quick-service small,.empty-state p,.mentor-card small,
  .announcement-meta,.announcement-footer>span,.announcement-card p,
  .profile-cover p,.profile-mini span,.search-start p,
  .week-time,.week-lesson p,.week-lesson small,.upload-field small,
  .course-meta,.clinic-slot span,.invoice-meta p,.stat-card>span,.employee-row small,
  .field>small,.doctor-search>label,.btn-ghost,
  .login-note,.doctor-filter-count,.housing-request-row small
){color:var(--text-muted)}
html:not([data-theme="dark"]) :is(
  .filter-chip:not(.active),.segmented button:not(.active),
  .content-scope-tabs button:not(.active),.date-button:not(.active),
  .academic-status:not(.active),.academic-courses>summary,.academic-courses>summary span,
  .count-label,.academic-status:not(.active) .academic-status-count,
  .badge.status-gray,.badge.status-pending
){color:var(--text-muted)}
html:not([data-theme="dark"]) :is(.step-number,.onboarding-step.completed>.step-number){color:#315c73}
html:not([data-theme="dark"]) .lesson-detail .change-copy{color:#766026}
html:not([data-theme="dark"]) .week-edit{color:#766026!important}
html:not([data-theme="dark"]) .topbar .search-button span{color:var(--text-muted)}
html:not([data-theme="dark"]) .search-page-result small{color:var(--text-muted)}
html:not([data-theme="dark"]) .search-page-result .search-result-category{color:#426c68}
html:not([data-theme="dark"]) .map-floor-overview button.active{color:#435d70}
html:not([data-theme="dark"]) :is(.main-content,.modal,.login-form-panel) .eyebrow{color:var(--text-muted)}
html:not([data-theme="dark"]) .mobile-nav :is(a,button):not(.active){color:var(--text-muted)}
html:not([data-theme="dark"]) .onboarding-card :is(.progress-caption,.next-step){color:#715d48}
html:not([data-theme="dark"]) .profile-mini strong{color:var(--text-main)}
.page-heading{margin-bottom:24px;align-items:center}
.page-title{margin:0}
.page-subtitle{margin:9px 0 0}
.card-header{margin-bottom:18px}
.main-column,.side-column{gap:20px}
.hero-card.hero-empty{min-height:0;padding:26px 28px}
.hero-empty .hero-title{margin:14px 0 20px;font-size:28px}
.hero-empty .btn{position:relative;z-index:1}
.dashboard-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;grid-column:1/-1}
.dashboard-shortcuts .quick-service{padding:14px 12px;gap:10px;align-items:flex-start;min-width:0}
.dashboard-shortcuts .quick-service>span:not(.action-icon){min-width:0;flex:1}
.dashboard-shortcuts .quick-service .action-icon{width:30px;height:30px;border-radius:9px;flex:none}
.dashboard-shortcuts .quick-service .action-icon svg{width:17px;height:17px}
.dashboard-shortcuts .quick-service>svg{display:none}
.dashboard-shortcuts .quick-service strong{line-height:1.5}
.dashboard-shortcuts .quick-service small{line-height:1.5;margin-top:4px}
.registration-link{margin-top:16px}
.login-form-wrap>.login-about{display:block;margin:24px auto 0}

/* Service cards do not reserve a description row. */
.request-grid{gap:16px;margin-bottom:24px}
.request-grid .service-card{display:flex;flex-direction:row;gap:14px;align-items:center;min-height:104px;padding:20px;text-align:left}
.request-grid .service-card .service-icon{width:40px;height:40px;flex:none;margin:0}
.request-grid .service-card-copy{flex:1;min-width:0;display:grid;gap:5px}
.request-grid .service-card h3{margin:0;font-size:15px;line-height:1.5}
.request-grid .service-scope{font-size:11px;line-height:1.5;color:var(--text-muted)}
.service-card-arrow{display:flex;flex:none;color:var(--text-muted)}
.service-card-arrow svg{width:17px;height:17px}
.request-status-event{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:12px 0;border-bottom:1px solid var(--border-subtle);font-size:12px}
.request-status-event>span{color:var(--text-muted);display:flex}
.request-status-event svg{width:16px;height:16px}
.request-status-event>strong{font-size:12px;font-weight:600;color:var(--text-main)}
.request-status-event>small{margin-left:auto;font-size:11px;color:var(--text-muted)}

/* Facts stay together; equal card edges do not spread individual rows apart. */
.housing-layout{gap:20px}
.housing-layout .residence-summary>.detail-list{flex:none;display:grid;align-content:start;gap:12px;margin:16px 0 0}
.housing-layout .residence-summary h2{font-size:22px;line-height:1.4;margin:10px 0 0}
.housing-layout .housing-service-button{min-height:56px;padding:9px 2px;gap:12px}
.housing-layout .housing-service-button .housing-service-icon{width:34px;height:34px;border-radius:10px}
.housing-layout .housing-service-copy strong{line-height:1.5}
.housing-layout .card-header{margin-bottom:8px}
.housing-layout .residence-summary>.btn{align-self:flex-start;margin-top:20px}
.housing-layout .housing-steps{margin:12px 0 0}
.detail-list{gap:14px;margin:20px 0}

.clinic-grid{gap:18px}
.clinic-grid .doctor-card{display:flex;flex-direction:column;align-items:stretch;padding:22px}
.doctor-card-heading{display:flex;gap:12px;align-items:center;margin-bottom:16px;min-height:62px}
.doctor-card-heading>div{min-width:0;flex:1}
.doctor-card-heading .doctor-avatar{width:38px;height:38px;border-radius:12px;margin:0;flex:none}
.doctor-card-heading .doctor-avatar svg{width:21px;height:21px}
.clinic-grid .doctor-card h2{font-size:17px;line-height:1.45;margin:5px 0 0}
.doctor-card-heading .lesson-tag{font-size:9px;line-height:1.5}
.clinic-grid .doctor-card .doctor-meta{width:100%;gap:8px;margin:0 0 16px}
.doctor-requirements{padding-left:18px;font-size:12px;line-height:1.6;color:var(--text-muted);margin:0 0 14px}
.doctor-next{width:100%;display:grid;gap:4px;padding-top:14px;border-top:1px solid var(--border-subtle);margin:auto 0 0}
.doctor-next>span{font-size:11px;color:var(--text-muted)}
.doctor-next>strong{font-size:13px;color:var(--text-main);font-weight:600}
.clinic-grid .doctor-card>.btn{margin-top:12px}
html:not([data-theme="dark"]) .doctor-card .doctor-meta span,html:not([data-theme="dark"]) .housing-service-copy small{color:var(--text-muted)}
.clinic-date-filter{max-width:280px;margin:18px 0}
.clinic-slot-days{display:grid;gap:22px}
.clinic-slot-day[hidden]{display:none}
.clinic-slot-day h3{display:flex;align-items:baseline;gap:12px;margin:0 0 12px;font-size:15px}
.clinic-slot-day h3 span{font-size:12px;font-weight:400;color:var(--text-muted)}
.clinic-slot-day .clinic-slot-grid{max-height:none;overflow:visible;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;padding:0}
.clinic-slot-day .clinic-slot{min-height:58px;padding:10px;display:flex;gap:4px;align-items:center;justify-content:center}
.clinic-slot-day .clinic-slot span{font-size:11px}

.sports-section-grid{gap:18px}
.sport-section-card{padding:22px}
.sport-section-card .card-header{justify-content:flex-start;align-items:center;gap:12px;margin:0 0 12px;min-height:52px}
.sport-section-card .section-sport-icon{width:38px;height:38px;flex:none;border-radius:12px}
.sport-section-heading{min-width:0;flex:1}
.sport-section-card h2{font-size:19px;line-height:1.35;margin:0}
.sport-level{display:block;font-size:11px;line-height:1.5;color:var(--text-muted);margin-top:4px}
.sport-section-card .section-status{align-self:flex-start;margin-bottom:16px}
.sport-section-card .sport-section-details{margin:0 0 10px;gap:9px}
.sport-section-card .section-contact{background:transparent;padding:0;border:0;gap:0;margin:0 0 16px;line-height:1.5}
.sport-section-card .section-enrollment{margin-top:auto;gap:9px}
.sport-section-card .section-enrollment .btn{min-height:42px}

.events-grid{gap:18px;margin-top:20px}
.event-card{padding:22px}
.event-card-top{align-items:center;flex-wrap:wrap;gap:8px 14px}
.event-card h2{font-size:19px;line-height:1.4;margin:14px 0 12px}
.event-card .event-meta{margin:0 0 18px;gap:8px}
.event-card .event-footer{padding-top:14px;gap:12px}
.event-footer>span{font-size:11px;line-height:1.5}
.course-card{padding:22px}
.course-card h2{font-size:18px;line-height:1.4;margin:12px 0}
.course-card .course-meta{margin:0 0 16px}
.course-card>.text-link{margin-top:auto}

/* Small empty states and consistent controls without phantom paragraphs. */
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:26px 18px}
.empty-state .empty-icon{width:40px;height:40px;margin:0 0 3px}
.empty-state h3{font-size:15px;line-height:1.5;margin:0}
.empty-state p{font-size:12px;line-height:1.7;max-width:400px;margin:0 auto}
.empty-state .btn{margin-top:7px}
.schedule-list .empty-state{padding:28px 14px}
.main-content:has(.clinic-grid)>.card .empty-state{padding:14px 0 4px}
.main-content:has(.clinic-grid)>.card .empty-state h3{margin:0}
.main-content:has(.clinic-grid)>.card .empty-state p{margin:0 auto}
.employee-agenda .empty-state,.employee-queue .empty-state{padding:18px 4px}
.employee-dashboard .stat-card{padding:20px}
.stat-card>span{margin-bottom:9px}
.stat-card>strong:last-child{margin-bottom:0}
.notification-center{grid-template-columns:minmax(0,1fr);gap:14px}
.notification-settings-link{justify-self:end;margin:0 4px}
.notification-feed>.filter-row{margin-bottom:0}
.onboarding-card .card-header{margin-bottom:12px}
.onboarding-card h2{margin:0;line-height:1.4}
.onboarding-card .progress-caption{margin-top:18px}
.onboarding-step{padding:18px 0}

.settings-layout{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"appearance notifications" "device notifications" "tour notifications";gap:20px;align-items:start}
.settings-appearance{grid-area:appearance}
.settings-notifications{grid-area:notifications}
.settings-device{grid-area:device}
.settings-layout>.settings-app-tour{grid-area:tour}
.settings-section .card-header{margin-bottom:16px}
.settings-section .card-header h2{margin:0;font-size:18px}
.settings-options{margin:0 0 18px}
.settings-row{padding:16px 0}
.settings-row:last-child{padding-bottom:0}
.settings-section .settings-help:last-child{margin-bottom:0}
.settings-device>p{margin:0 0 12px}
.settings-device>.settings-help{margin-bottom:16px}

@media(max-width:1100px){
 .dashboard-shortcuts{grid-template-columns:1fr}
 .settings-layout{grid-template-columns:1fr;grid-template-areas:"appearance" "notifications" "device" "tour"}
 .settings-options{max-width:none}
}
@media(max-width:900px){.dashboard-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .page-heading{margin-bottom:20px;gap:14px}
 .page-title{margin:0}
 .card-header{margin-bottom:16px}
 .main-column,.side-column{gap:16px}
 .hero-card.hero-empty{padding:22px 20px}
 .hero-empty .hero-title{font-size:24px;margin:12px 0 18px}
 .dashboard-shortcuts{gap:10px}
 .dashboard-shortcuts .quick-service{padding:12px 10px;gap:8px;flex-direction:column}
 .dashboard-shortcuts .quick-service strong{font-size:12px}
 .request-grid{gap:12px;margin-bottom:20px}
 .request-grid .service-card{min-height:84px;padding:16px;gap:12px}
 .request-grid .service-card h3{font-size:14px}
 .request-grid .service-card .service-icon{width:36px;height:36px}
 .housing-layout{gap:16px}
 .housing-layout .residence-summary>.detail-list{gap:12px}
 .housing-layout .residence-summary h2{font-size:20px}
 .housing-layout .housing-service-button{min-height:54px}
 .clinic-grid,.sports-section-grid,.events-grid{gap:14px}
 .clinic-grid .doctor-card,.sport-section-card,.event-card,.course-card{padding:20px}
 .doctor-card-heading{min-height:0;margin-bottom:14px}
 .clinic-grid .doctor-card h2{font-size:16px}
 .clinic-date-filter{max-width:none}
 .clinic-slot-day h3{flex-wrap:wrap;gap:5px 10px}
 .sport-section-card .card-header{min-height:0}
 .sport-section-card h2,.event-card h2{font-size:18px}
 .empty-state{padding:22px 10px}
 .empty-state h3{font-size:14px}
 .schedule-list .empty-state{padding:24px 8px}
 .notification-settings-link{justify-self:start}
 .settings-layout{gap:16px}
 .settings-section{padding:20px}
 .settings-options{margin-bottom:16px}
 .setting-choice{min-height:78px}
 .settings-row{padding:14px 0}
 .settings-row.settings-switch small{margin-top:3px}
 .grade-total{display:flex;align-items:center;gap:16px}
 .grade-total>div:first-child{flex:0 0 auto;margin:0}
 .grade-total>div:first-child>strong{font-size:28px}
 .grade-total h3{font-size:14px}
 .grade-total .badge{font-size:10px}
 .grade-total .eyebrow{max-width:100px;font-size:8px}
}

.help-layout{align-items:start;gap:20px}
.profile-card>:last-child{margin-bottom:0}
/* A student without a residence sees one compact application panel. */
.housing-layout:has(.housing-steps){gap:0;background:var(--surface);border:1px solid var(--border-subtle);border-radius:var(--radius);overflow:hidden}
.housing-layout:has(.housing-steps)>.card{border:0;border-radius:0;background:transparent;box-shadow:none;height:auto}
.housing-layout:has(.housing-steps)>.residence-summary{border-right:1px solid var(--border-subtle)}
.housing-layout:has(.housing-steps) .housing-steps{margin-top:8px}
.housing-layout:has(.housing-steps) .housing-steps li{padding-block:4px;margin-bottom:10px}
.housing-layout:has(.housing-steps) .housing-steps li:last-child{margin-bottom:0}
@supports(grid-template-rows:subgrid){
 @media(min-width:701px){
  .sports-section-grid{row-gap:18px}
  .sport-section-card{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:0}
  .sport-section-card .card-header{min-height:0}
  .sport-section-card .section-status{justify-self:start}
  .sport-section-card .section-enrollment{align-self:end;margin:0}
 }
}
@media(max-width:850px){
 .housing-layout:has(.housing-steps)>.residence-summary{border-right:0;border-bottom:1px solid var(--border-subtle)}
}
@media(max-width:600px){.help-layout{gap:16px}}

/* Compact campus actions, private bookmarks and actual timetable gaps. */
.place-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;flex-wrap:wrap}.place-map-button{padding:8px 10px;min-height:36px;font-size:12px;white-space:nowrap}.place-map-button svg{width:15px;height:15px}.favorite-button{flex:0 0 36px;width:36px;height:36px;border-radius:10px;color:var(--text-muted);border:1px solid var(--border-subtle);background:var(--surface)}.favorite-button[aria-pressed="true"]{color:var(--text-main);background:var(--surface-soft)}.favorite-button[aria-pressed="true"] svg{fill:currentColor;fill-opacity:.22}.event-card-top{flex-wrap:wrap}.event-card-top>.favorite-button{margin-left:auto}.event-card-top>.badge{max-width:100%}.schedule-break{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;margin:2px 0;border-top:1px dashed var(--border-subtle);color:var(--text-muted);font-size:11px;line-height:1.45}.week-break{flex-wrap:wrap;padding:6px 2px;font-size:10px}.announcement-meta>.favorite-button{margin-left:auto}

.sports-date-picker{display:flex;align-items:center;gap:12px;margin-bottom:20px}.sports-date-picker .field{margin:0;flex:1;min-width:0}.sports-date-picker>.icon-button{flex:0 0 40px;margin-top:22px}.sports-venue-filter{margin-bottom:20px}.sports-venue-group{padding-top:16px;border-top:1px solid var(--border-subtle)}.sports-venue-group+.sports-venue-group{margin-top:22px}.sports-venue-group>h3{display:flex;align-items:center;gap:8px;font-size:15px;color:var(--text-muted);margin:0 0 12px}.sports-venue-group h4{margin:0 0 6px;font-size:16px;line-height:1.4}.sports-venue-group .slot-time span{font-size:13px}.sports-venue-filter .filter-chip{white-space:normal;text-align:left}

.center-departments .filter-chip{white-space:normal;text-align:left}.center-service-groups{display:grid;gap:24px;margin-bottom:28px}.center-service-group>h2{font-size:17px;margin:0 0 12px;line-height:1.4}.center-service-group .request-grid{margin:0}.center-request-meta{background:var(--surface-soft);border-radius:12px;padding:14px;margin:0 0 18px}.center-request-meta p{font-size:13px;line-height:1.5;margin:0 0 8px}.center-request-meta p:last-child{margin:0}.request-type-hint{color:var(--text-muted)}.request-file-list{display:grid;gap:12px}.request-file{display:flex;gap:12px;padding:12px;border:1px solid var(--border-subtle);border-radius:12px}.request-file-copy{min-width:0;flex:1}.request-file-copy>strong{display:block;overflow-wrap:anywhere;font-size:14px}.request-file-copy>small{display:block;color:var(--text-muted);margin:6px 0;font-size:12px}.request-file-actions{display:flex;flex-wrap:wrap;gap:14px}.request-file-disclosure{margin:16px 0}.request-file-disclosure>summary{cursor:pointer;font-weight:600;padding:10px 0}.request-file-disclosure form{padding:12px 0}.request-file-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;background:var(--surface-soft);padding:16px;border-radius:12px}.request-documents{margin:20px 0}.request-department-label{color:var(--text-muted)}

.sports-schedule .slot-time span{color:var(--text-muted)}.sports-schedule .conflict-label{color:var(--warning-text)}

.today-dashboard {grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);align-items:start}
.today-dashboard-single {grid-template-columns:minmax(0,1fr)}
.today-hero.hero-card {min-height:0;padding:26px 28px}
.today-hero-top {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.today-hero .hero-title button {display:inline-flex;align-items:center;gap:8px;padding:0;background:none;color:inherit;font:inherit;text-align:left}
.today-hero .hero-title .icon {flex:none;width:18px;height:18px}
.today-hero-change {margin:14px 0 0;font-size:13px;line-height:1.5}
.today-hero.hero-empty .hero-title {margin-bottom:0}
.today-priorities .card-header {margin-bottom:12px}
.today-priorities .event-preview:last-child {margin-bottom:0}
.profile-onboarding-link {display:flex;align-items:center;gap:10px;margin:18px 0 0;padding:12px 14px;border:1px solid var(--border-subtle);border-radius:12px;color:var(--accent);font-size:13px}
.profile-onboarding-link strong {flex:1}
.profile-onboarding-link .icon {flex:none}
html[data-theme="dark"] .mobile-nav .nav-item:not(.active):hover {background:var(--surface-soft);color:var(--text-main)}

.grades-overview {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px;margin-bottom:22px}
.grades-overview .card {min-width:0}
.grades-average {border-top:3px solid var(--accent)}
.grades-average>span,.grades-average p {color:var(--text-muted);font-size:13px}
.grades-average p {margin:8px 0 0;line-height:1.5}
.grades-average-value {margin-top:10px;font-size:clamp(34px,4vw,54px);line-height:1;font-weight:750;letter-spacing:-.04em}
.grades-average-value small {color:var(--text-muted);font-size:.38em;font-weight:600;letter-spacing:0}
.grades-overview-detail h2 {font-size:15px;margin:0 0 14px}
.grades-next {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:100%;padding:0;background:none;text-align:left;color:var(--text-main)}
.grades-next>span,.grades-next>strong {grid-column:1}
.grades-next-date {font-weight:700;color:var(--accent);font-size:19px}
.grades-next>.icon {grid-column:2;grid-row:1/4;align-self:center;color:var(--accent)}
.grades-distribution {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.grade-distribution-item {display:inline-flex;gap:7px;align-items:center;padding:7px 10px;border-radius:8px;background:var(--surface-soft);color:var(--text-muted)}
.grade-distribution-item strong {color:var(--text-main)}
.grade-record {display:grid;grid-template-columns:minmax(0,1.8fr) minmax(160px,1fr);align-items:center;gap:20px;padding:16px 0;border-top:1px solid var(--border-subtle)}
.grade-record h3 {margin:0 0 5px;font-size:15px;line-height:1.5}
.grade-subject-link {display:inline-flex;align-items:center;gap:5px;padding:0;text-align:left;color:var(--accent);background:none;font:inherit}
.grade-subject-link .icon {flex:none;width:15px;height:15px}
.grade-record-meta {display:flex;flex-wrap:wrap;gap:5px 12px;margin-top:6px;color:var(--text-muted);font-size:12px}
.grade-record-score {display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;font-size:13px}
.grade-score-label {display:flex;justify-content:space-between;gap:8px;width:100%;color:var(--text-muted)}
.grade-score-label strong {color:var(--text-main);white-space:nowrap}
.grade-record-track {width:100%;height:6px;border-radius:99px;background:var(--surface-soft);overflow:hidden}
.grade-record-track span {display:block;height:100%;border-radius:99px;background:var(--accent)}

.place-card .place-icon[data-place-group="library"] {background:#eee6f6;color:#654486}
.place-card .place-icon[data-place-group="food"] {background:#f8eadb;color:#8b521b}
.place-card .place-icon[data-place-group="shop"] {background:#dff1e9;color:#246b55}
.place-card .place-icon[data-place-group="services"] {background:#e1eef7;color:#325e80}
html[data-theme="dark"] .place-card .place-icon[data-place-group="library"] {background:#403451;color:#e0c9f7}
html[data-theme="dark"] .place-card .place-icon[data-place-group="food"] {background:#493c2d;color:#f0c394}
html[data-theme="dark"] .place-card .place-icon[data-place-group="shop"] {background:#223f3c;color:#b2e3d2}
html[data-theme="dark"] .place-card .place-icon[data-place-group="services"] {background:#283f55;color:#b7dcf7}

@media(max-width:1000px) {
  .today-dashboard {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px) {
  .today-hero.hero-card {padding:22px 20px}
  .grades-overview {grid-template-columns:minmax(0,1fr);gap:12px}
  .grade-record {grid-template-columns:minmax(0,1fr);gap:10px}
  .grade-record-score {padding:9px 11px;border-radius:9px;background:var(--surface-soft)}
  .grade-record-track {background:var(--surface)}
}
