/* One title scale for clinic, patient, platform, and account pages. */
:root { --page-title-font: "Kaya Record Serif", "DM Serif Display", Georgia, serif; --page-title-size: 2rem; --page-header-surface: var(--lilac-soft); }
body .page-shell h1.app-page-title { max-width: 100%; margin: 0 0 1.5rem; color: var(--page-title-color, var(--ink)); font: 400 var(--page-title-size)/1.2 var(--page-title-font); letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere; }
body .page-shell :is(header, .page-heading, .scheduling-heading, .assistant-heading, .intake-heading-title) h1.app-page-title { margin: 0; }
body .page-shell .app-page-header:not(.visually-hidden) { --page-title-color: var(--ink); display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; min-width: 0; text-align: left; min-height: 80px; margin: 0 0 1.5rem; padding: 1.125rem 1.75rem; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: var(--page-header-surface); color: var(--ink); }
body .page-shell .messages-clinic > .app-page-header { margin-bottom: 0; flex-shrink: 0; }
body .page-shell .app-page-header > .app-page-title { margin: 0; flex: 1 1 15rem; }
.app-page-header > div { min-width: 0; }
.app-page-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; flex: 1 1 20rem; min-width: 0; }
.app-page-metadata, .app-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.app-page-header .button { min-height: 44px; margin: 0; font-size: .875rem; }
.page-record-context { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0 0 1.5rem; color: var(--muted); font: 400 .875rem/1.5 "Kaya Record Sans", var(--font-sans); }
.page-header-date { flex-shrink: 0; color: var(--muted); font: 400 .875rem/1.5 "Kaya Record Sans", var(--font-sans); }
.care-dashboard-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; }
.app-page-actions { margin-left: auto; justify-content: flex-end; }
@media (max-width: 650px) {
  :root { --page-title-size: 1.75rem; }
  .app-page-actions { width: 100%; justify-content: flex-start; }
  body .page-shell .app-page-header:not(.visually-hidden) { gap: .75rem; padding: 1rem; }
}
.page-record-status { display: inline-block; margin-top: .5rem; color: var(--muted); font: 400 .875rem/1.5 "Kaya Record Sans", var(--font-sans); }

.app-page-actions :is(.back-link, .text-link, .text-button, .template-back) { display: inline-flex; align-items: center; min-height: 44px; margin: 0; font: 600 .875rem/1.5 "Kaya Record Sans", var(--font-sans); color: var(--ink); text-underline-offset: .2em; }
.app-page-header .illustrated-article-title { flex: 1 1 24rem; }
body .page-shell .patient-sidebar-header.app-page-header { gap: .5rem; margin-bottom: .75rem; padding: 1.125rem 1.2rem; }

/* Overview and Agenda keep their content gutters below an edge-to-edge header. */
body.team-directory-page .page-shell { width: 100%; padding-top: 0; }
body.team-directory-page .page-shell > .app-page-header { margin-bottom: 0; }
.team-directory-content { width: min(1180px, calc(100% - 3.5rem)); margin: 1.5rem auto 0; }
body.workspace-header-page .page-shell { width: 100%; padding-top: 0; }
.workspace-header-page .page-shell > :is(.care-dashboard, .scheduling-week-workspace) { grid-template-columns: minmax(1.5rem, 1fr) minmax(0, 1180px) minmax(1.5rem, 1fr); column-gap: 0; }
.workspace-header-page .page-shell > :is(.care-dashboard, .scheduling-week-workspace) > * { grid-column: 2; min-width: 0; }
body.workspace-header-page .page-shell > :is(.care-dashboard, .scheduling-week-workspace) > .app-page-header { grid-column: 1 / -1; margin-bottom: 0; }
@media (max-width: 650px) {
  .team-directory-content { width: calc(100% - 2rem); }
  .workspace-header-page .page-shell > :is(.care-dashboard, .scheduling-week-workspace) { grid-template-columns: 1rem minmax(0, 1fr) 1rem; }
}
