/* Shared portal scale, sampled from the approved dashboard.
   The overview dashboard itself deliberately receives no overrides here.
   m3-polish.css applies the later requested compact counts and 44px fields. */
:root{
 --portal-font-page:26px;
 --portal-font-heading:20px;
 --portal-font-item:20px;
 --portal-font-label:16px;
 --portal-font-body:14px;
 --portal-font-support:12px;
 --portal-font-meta:11px;
 --portal-font-field:16px;
 --portal-font-action:14px;
 --portal-font-compact:12px;
 --portal-font-metric:36px;
 --portal-font-counter:28px;
 --portal-pad-card:20px;
 --portal-pad-item:16px;
 --portal-gap-layout:16px;
 --portal-gap-content:12px;
 --portal-gap-inline:8px;
 --portal-gap-section:20px;
}
@media(min-width:1351px){
 :root{--portal-pad-item:14px;--portal-gap-layout:14px}
}
@media(max-width:700px){
 :root{--portal-font-page:24px}
}

/* Primary containers and columns use the same density as dashboard cards. */
.app-page:not([data-app-page="home"]) .ui-card.m3e-card,
.view-panel:not([data-view-panel="overview"]) .ui-card.m3e-card{
 padding:var(--portal-pad-card);
 font-size:var(--portal-font-body);
 line-height:1.5;
}
.app-page:not([data-app-page="home"]) .ui-card.m3e-card.catalog-card{padding:0}
.course-detail-grid,.service-booking-layout,.services-grid,.settings-grid,
.calendar-layout,.content-library,.course-catalog,.courses-dashboard,.course-overview-column{
 gap:var(--portal-gap-layout);
}
.catalog-heading,.content-heading,.services-heading,.calendar-heading,.settings-heading{
 margin:var(--portal-gap-section) 0;
}
.catalog-heading h2,.content-heading h2,.services-heading h2,
.calendar-heading h2,.settings-heading h2,
.view-panel:not([data-view-panel="overview"]) .ui-card h2,
.course-registration-heading h2,.course-description-card h2,.course-practical-card h2,
.service-section-heading h2,.settings-card-head h2,.calendar-agenda-heading h2{
 font-size:var(--portal-font-heading);
 line-height:1.25;
 font-weight:550;
}
.services-reservations-heading h3,.staff-reservations-heading h2{
 font-size:var(--portal-font-heading);line-height:1.25;font-weight:550;
}
.course-detail-intro h2,.service-overview-copy h2,.public-intro-copy h2{
 font-size:var(--portal-font-page);
 line-height:1.25;
 font-weight:550;
 margin:8px 0 var(--portal-gap-content);
}
.catalog-heading p,.content-heading p,.services-heading p,
.calendar-heading p,.settings-heading p,
.year-progress-heading p,.completed-courses-heading p,.communication-heading p,
.calendar-agenda-heading p,.public-section-heading p{
 font-size:var(--portal-font-support);
 line-height:1.6;
 margin-top:var(--portal-gap-inline);
}
.course-detail-intro p,.service-overview-copy p,
.course-description-card p,.course-practical-copy p,.course-registration-message,
.course-form-status,.settings-card-copy,.course-profile-summary p{
 font-size:var(--portal-font-body);
 line-height:1.6;
}

/* Titles, summaries and metadata have stable roles across all card collections. */
.catalog-card :is(h2,h3),.content-course-card :is(h2,h3),
.service-card :is(h2,h3),.service-card-copy>strong,.announcement-copy h3,.notification-title,
.completed-grid .event h3{
 font-size:var(--portal-font-item);
 line-height:1.25;
 font-weight:550;
}
.catalog-card-body{padding:var(--portal-pad-card);gap:var(--portal-gap-content)}
.catalog-card p,.service-card p,.service-card-copy>span:not(.subcard-kicker),.content-course-card p{
 font-size:var(--portal-font-support);
 line-height:1.6;
}
.service-card-meta>b{font-size:var(--portal-font-compact);line-height:1.5}
.catalog-card-footer,.service-card-meta,.course-detail-meta,
.content-course-meta,.announcement-meta,.notification-meta,.notification-meta time,
.completed-grid .event p,.catalog-tags .tag,.course-detail-tags .tag{
 font-size:var(--portal-font-meta);
 line-height:1.6;
}
.announcement-copy p,.notification-description{
 font-size:var(--portal-font-body);
 line-height:1.6;
}
.announcement-item,.notification-item,.completed-grid .event{
 padding:var(--portal-pad-item);
 gap:var(--portal-gap-content);
}
.announcement-copy,.notification-copy{gap:var(--portal-gap-inline)}
.completed-grid,.announcement-list,.notification-list{gap:var(--portal-gap-content)}
.completed-courses-card,.communication-card,.year-progress-card{gap:var(--portal-gap-layout)}
.content-course-card{gap:var(--portal-gap-layout)}
.content-card-heading{gap:var(--portal-gap-content)}
.course-practical-facts>div,.course-profile-summary,.course-profile-save-prompt,
.settings-action-row{padding:var(--portal-pad-item)}
.settings-action-row strong,.settings-data-row strong,
.settings-identity-copy strong,.settings-provider strong,.service-booking-selection strong{
 font-size:var(--portal-font-label);
 line-height:1.4;
}
.accommodation-options legend{font-size:var(--portal-font-body);line-height:1.5}
.course-practical-facts dt{font-size:var(--portal-font-meta);line-height:1.5}
.app-page:not([data-app-page="home"]) .ui-data-state,
.view-panel:not([data-view-panel="overview"]) .ui-data-state{
 padding:var(--portal-pad-card);gap:var(--portal-gap-content);font-size:var(--portal-font-body);
}
.app-page:not([data-app-page="home"]) .ui-data-state strong,
.view-panel:not([data-view-panel="overview"]) .ui-data-state strong{
 font-size:var(--portal-font-heading);line-height:1.25;
}
.settings-action-row small,.settings-data-row small,.settings-identity-copy small,
.settings-field-note,.settings-provider-copy small,.settings-inline-status,
.course-practical-facts dd,.course-registration-context-copy{
 font-size:var(--portal-font-support);
 line-height:1.6;
}
.settings-card-head,.course-registration-heading,.service-section-heading,
.calendar-card-head,.calendar-agenda-heading{margin-bottom:var(--portal-gap-layout)}
.settings-card-copy{margin-bottom:var(--portal-gap-layout)}
.settings-action-list{gap:var(--portal-gap-content)}
.course-detail-hero,.service-overview-card{gap:var(--portal-gap-section)}
.course-detail-grid,.service-booking-layout{margin-top:var(--portal-gap-layout)}
.course-practical-copy{gap:var(--portal-gap-layout)}

/* Counters match the dashboard metrics; context never changes their type size. */
.course-summary-card .total strong{font-size:var(--portal-font-metric)}
.courses-dashboard .metric-box strong,.communication-card .metric-box strong{
 font-size:var(--portal-font-counter);
 line-height:1.5;
}
.courses-dashboard .metric-box small,.communication-card .metric-box small{
 font-size:var(--portal-font-meta);
 line-height:1.5;
}
.courses-dashboard .metric-box,.communication-card .metric-box{padding:8px 12px}

/* Ordinary actions, compact toggles and editable fields are three shared sizes. */
.app-page:not([data-app-page="home"]) .m3e-button:not(.m3e-compact-toggle),
.view-panel:not([data-view-panel="overview"]) .m3e-button:not(.m3e-compact-toggle){
 font-size:var(--portal-font-action);
 line-height:1.25;
 font-weight:500;
 min-height:40px;
}
.app-page:not([data-app-page="home"]) .m3e-compact-toggle,
.view-panel:not([data-view-panel="overview"]) .m3e-compact-toggle{
 font-size:var(--portal-font-compact);
}
.app-page .ui-select .ui-select-toggle.m3e-button,.account-dialog .ui-select-toggle.m3e-button{
 font-size:var(--portal-font-field);
 font-weight:400;
 min-height:52px;
 line-height:1.5;
}
.app-page .m3e-text-field__input,.account-dialog .m3e-text-field__input{
 font-size:var(--portal-font-field);
}
.app-page .ui-form,.app-page .form-grid{gap:var(--portal-gap-layout)}
.app-page .ui-form label:not(.m3-choice-row,.settings-toggle-row),.app-page .form-field{
 font-size:var(--portal-font-body);
}
.mark-all-read.m3e-button{font-size:var(--portal-font-action);min-height:40px}

/* The same scale continues into dialogs and local account destinations. */
.account-dialog-panel.m3e-dialog__container{padding:var(--portal-pad-card)}
.account-dialog.m3e-dialog .account-dialog-head h2{font-size:var(--portal-font-heading);line-height:1.25}
.account-dialog .ui-form{gap:var(--portal-gap-layout)}
.demo-native article{padding:var(--portal-pad-card);font-size:var(--portal-font-body)}
.demo-native h1{font-size:var(--portal-font-page)}
.demo-native h2{font-size:var(--portal-font-heading)}
.public-section-heading h2{font-size:var(--portal-font-heading)}
.public-intro-card{gap:var(--portal-gap-section)}

@media(max-width:700px){
 .announcement-item{grid-template-columns:40px minmax(0,1fr)}
 .year-progress-heading,.completed-courses-heading,.communication-heading{
  gap:var(--portal-gap-content);
 }
 .content-course-card{padding:var(--portal-pad-card)}
 .completed-grid .event{min-height:190px}
}
