/* Shared type scale taken from the approved Cestino reference.
   This layer changes typography only. Message documents, editable mail bodies,
   signatures, PDF pages and icon fonts keep their own formatting. */
:root,.fc {
  --medicare-type-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --medicare-type-base:13px;
  --medicare-type-text:13px;
  --medicare-type-heading:18px;
  --medicare-type-metric:23px;
  --medicare-type-helper:11px;
  --medicare-type-meta:10px;
  --medicare-type-ink:#203247;
  --medicare-type-heading-ink:#22364c;
  --medicare-type-muted:#7893a1;
  --medicare-type-meta-ink:#8394a9;
  --medicare-type-nav:#334552;
  --medicare-type-active:#005879;
  --ui-font:var(--medicare-type-font);
  --ui-ink:var(--medicare-type-ink);
  --ui-muted:var(--medicare-type-muted);
}
body,body.portal-shell,body.portal-shell:has(.mail-split) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-base);
  color:var(--medicare-type-ink);
  --ui-ink:var(--medicare-type-ink);
  --ui-muted:var(--medicare-type-muted);
}

/* Text-bearing interface elements; no universal font or icon reset. */
:is(.portal-shell,.login-main) :is(p,li,dt,dd,label,th,td,input,select,textarea,option,summary):not(:where(.composer-editor,.composer-editor *,.signature-preview-canvas,.signature-preview-canvas *,.message-html,.message-html *,.message-text,.message-text *,.message-body,.message-body *)) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
:is(.portal-shell,.login-main) :is(input,select,textarea,label,th,td):not(:where(.composer-editor,.composer-editor *,.signature-preview-canvas,.signature-preview-canvas *,.message-html *,.message-body *)) {
  color:var(--medicare-type-ink);
}
:is(.portal-shell,.login-main) :is(button,.button-link):not(:where(.window-controls button,.window-grip,.delete-icon-button,.read-icon,.eye,.nav-icon,.global-search button,.command-search button,.composer-header button,.composer-format button,.recipient-chip button,.chat-dock-head button,.chat-dock-head a,.route-dialog-head button)) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
:is(.portal-shell,.login-main) :is(h1,h2,h3,h4):not(:where(.composer-editor *,.signature-preview-canvas *,.message-html *,.message-body *)) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-heading)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink);
  letter-spacing:normal!important;
}
.portal-shell :is(.page-head h1,.mail-reader h2,.reader-empty h2,.chat-head h2,.route-dialog-head strong,.composer-header strong),
.portal-shell .mail-split>.mail-reader>h2,
.portal-shell .command-dashboard .command-welcome h1 {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-heading)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink)!important;
  letter-spacing:normal!important;
}
.portal-shell :is(.metric strong,.dashboard-summary strong,.command-dashboard .command-value) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-metric)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink);
  letter-spacing:normal!important;
}
.portal-shell :is(.command-column-title,.command-dashboard .command-welcome>p,.command-dashboard .command-column>p,.command-dashboard .command-links a,.command-dashboard .command-links b,.command-topbar a,.command-topbar summary,.metric-label,.user-main strong,.recipient-chip,.recipient-suggestions [role=option],.chat-msg strong,.chat-msg p) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
.portal-shell :is(.command-dashboard .command-column>p,.command-dashboard .command-links a,.command-dashboard .command-links b,.user-main strong,.chat-msg p) {
  color:var(--medicare-type-ink);
}
.portal-shell :is(.contact-row,.contact-row strong,.draft-row strong,.draft-row strong a,.protocol-number strong,.protocol-core strong,.protocol-owner>span:not(.owner-badge),.mail-settings-card strong) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-ink)!important;
}
.portal-shell :is(.contact-row>div>span,.draft-row>div>span,.protocol-core>span,.protocol-info>span,.mail-settings-card p) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted)!important;
}
.portal-shell :is(.contact-row>span,.draft-row>time,.protocol-info>span:first-child) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-meta)!important;
  color:var(--medicare-type-meta-ink)!important;
}

/* The teal application rail retains white text and its existing active state. */
.portal-shell .portal-sidebar {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:white;
}
.portal-shell .portal-sidebar .portal-link,
body.portal-shell:has(.command-dashboard) .portal-sidebar .portal-link {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
.portal-shell :is(.portal-group,.side-title) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
}
.portal-shell :is(.mail-sidebar .side-item,.mail-sidebar>.filter-chip,.command-topbar a,.command-topbar summary,.nav-dropdown a,.chat-room) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-nav)!important;
}
.portal-shell :is(.mail-sidebar .side-item.active,.mail-sidebar>.filter-chip.active,.command-topbar a.active,.chat-room.active) {
  color:var(--medicare-type-active)!important;
}
body.portal-shell .chat-room {font-size:var(--medicare-type-text)!important;}
.portal-shell :is(.mail-main,.mail-sender,.mail-subject,.mail-unified .sent-row-main,.mail-unified .sent-recipient,.mail-unified .sent-subject,.reader-sender,.conversation-info strong) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-ink)!important;
}
.portal-shell :is(.mail-row.unread .mail-sender,.mail-row.unread .mail-subject) {font-weight:600;}
.portal-shell :is(.muted,.mailbox-address,.reader-empty p,.inbox-search-help,.trash-search-help,.trash-reader-state,.section-back,.composer-template,.autosave-status,.chat-head small,.conversation-preview,.conversation-people,.user-main span) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted)!important;
}
body.portal-shell .section-back {font-size:var(--medicare-type-text)!important;color:var(--medicare-type-active)!important;}
.portal-shell :is(small,.eyebrow,.pagination,.mail-line time,.reader-sender time,.mail-unified .sent-row time,.mail-meta>span,.sent-row-meta,.mail-unified .sent-row-meta .sent-mailbox,.trash-message-dates,.chat-msg time,.conversation-summary time,.conversation-tag,.nav-count,.side-count):not(:where(.composer-editor *,.composer-signature *,.signature-preview-canvas *,.message-html *,.message-body *,.message-text *)) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-meta)!important;
}
.portal-shell :is(.mail-line time,.reader-sender time,.mail-unified .sent-row time,.pagination,.sent-row-meta,.trash-message-dates,.chat-msg time,.conversation-summary time,.conversation-tag) {
  color:var(--medicare-type-meta-ink)!important;
}
.portal-shell :is(.trash-labeled-action.delete-icon-button,.trash-selection .select-all,.trash-selection #trash-selected-count,.attachment-dialog .attachment-pdf-toolbar button,.attachment-dialog .attachment-pdf-toolbar select,.attachment-dialog .attachment-pdf-page-number,.window-dock button,.chat-compose textarea) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
.portal-shell .attachment-dialog .attachment-preview-status:not(.attachment-preview-error) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted);
}
.login-main :is(.muted,small),body>footer {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted);
}

/* Training screens and dialogs are served by the existing Streamlit runtime.
   Baseweb popovers live outside stAppViewContainer, so they share this scale. */
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-base)!important;
  color:var(--medicare-type-ink);
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(p,li,label,input,textarea,select,option,th,td,[data-testid=stWidgetLabel],[data-testid=stMetricLabel],[data-testid=stCaptionContainer]) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(input,textarea,select,label,[data-testid=stWidgetLabel],[data-testid=stWidgetLabel] p) {
  color:var(--medicare-type-ink)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is([data-testid=stButton],[data-testid=stDownloadButton],[data-testid=stFormSubmitButton])>button,
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is([data-testid=stButton],[data-testid=stDownloadButton],[data-testid=stFormSubmitButton])>button p {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  font-weight:600!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(h1,h2,h3,h4,.page-title,.login-title,.section-head,.updates-title,.hse-section-title) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-heading)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink)!important;
  letter-spacing:normal!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) [data-testid=stMetricValue] {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-metric)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(.breadcrumbs,.nav-user,.left-nav-title,.calendar-legend,.hse-agent-status,.hse-controlled-title,.hse-current-title,.hse-drop-title,.hse-selected-file,.hse-status-line,.hse-release-title,.hse-verified,.hse-percent) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-ink);
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) .status-card>div {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-ink)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) .status-card>div:first-child[style] {
  font-size:var(--medicare-type-heading)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(.page-subtitle,.section-copy,.login-copy,.updates-subtitle,.hse-section-copy,.hse-empty,.hse-release-desc,[data-testid=stCaptionContainer],[data-testid=stCaptionContainer] p) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(.updates-eyebrow,.hse-kicker,.hse-meta,.hse-drop-sub,.hse-status-footer,.hse-release-meta,.hse-status-pill,.hse-type-pill) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-meta)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog])
:is(.hse-kicker,.hse-meta,.hse-drop-sub,.hse-status-footer,.hse-release-meta) {color:var(--medicare-type-meta-ink)!important;}
body :is([data-baseweb=popover],[data-baseweb=menu],[data-baseweb=select],[role=listbox],[role=option],[role=tab]) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
body :is([data-baseweb=popover],[data-baseweb=menu],[role=listbox]) {color:var(--medicare-type-ink);}
body [data-baseweb=select]>div {font-size:var(--medicare-type-text)!important;}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) input::placeholder,
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) textarea::placeholder {color:var(--medicare-type-muted)!important;}

/* FullCalendar runs in its own component document. The same sheet is appended
   to custom_css there, leaving event status colors and the fc-icon font intact. */
.fc {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
  color:var(--medicare-type-ink)!important;
}
.fc :is(.fc-event-title,.fc-event-time,.fc-daygrid-day-number,.fc-list-event-title,.fc-list-event-time) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
.fc :is(.fc-toolbar-title,.fc-popover-title) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-heading)!important;
  font-weight:600!important;
  color:var(--medicare-type-heading-ink)!important;
}
.fc :is(.fc-col-header-cell-cushion,.fc-timegrid-slot-label,.fc-daygrid-week-number,.fc-list-day-text,.fc-list-day-side-text) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-helper)!important;
  color:var(--medicare-type-muted)!important;
}
.fc .fc-button:not(:has(.fc-icon)) {
  font-family:var(--medicare-type-font)!important;
  font-size:var(--medicare-type-text)!important;
}
.fc :is(.fc-event-title,.fc-event-time,.fc-event-main,.fc-list-event-title,.fc-list-event-time,.fc-more-link),
.fc .fc-day:not(.fc-day-today) .fc-daygrid-day-number {color:var(--medicare-type-ink)!important;}
.fc .fc-button-primary {color:var(--medicare-type-nav)!important;}
.fc .fc-button-primary:not(:disabled).fc-button-active {color:var(--medicare-type-active)!important;}
/* Native course tables and neutral controls share the reference ink. */
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) table th {
 color:var(--medicare-type-nav)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) [data-testid=stBaseButton-secondary]:not(:where([class*="st-key-delete_"] button,[class*="st-key-danger_"] button)) {
 color:var(--medicare-type-ink)!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) :is([data-testid=stBaseButton-secondary],[data-testid=stBaseButton-primary]) p {
 color:inherit!important;
}
/* Streamlit renders heading text in an inner Markdown paragraph. */
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) :is(h1,h2,h3,h4) [data-testid=stMarkdownContainer],
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) :is(h1,h2,h3,h4) p {
 font-size:inherit!important;
 font-weight:inherit!important;
 color:inherit!important;
}
body :is([data-testid=stAppViewContainer],[data-testid=stDialog]) :is(h1,h2,h3,h4) [data-testid=stMarkdownContainer] p {
 font-size:inherit!important;
 font-weight:inherit!important;
 color:inherit!important;
}
.portal-shell .command-dashboard .command-column-title {
 color:var(--medicare-type-heading-ink)!important;
}

/* The signature upload label is a filled action with white lettering. */
:is(.portal-shell,.login-main) label.file-button {color:white!important}
