/* Product UI: shared tokens and components. site.css retains feature-specific layout
   contracts (calendar, course map, messaging); this file owns the visual language. */
:root {
  --ink:#34443f; --ink-soft:#45554e; --muted:#627169;
  --paper:#f7f7f2; --surface:#fffefa; --surface-soft:#f2f5ee;
  --line:#dde4d9; --sage:#4d7563; --sage-dark:#3d604f;
  --sage-light:#eaf0e5; --mint:#6f9580; --sand:#f3eddf;
  --radius:22px; --radius-lg:28px;
  --shadow:0 5px 24px #46583e08; --shadow-sm:0 2px 10px #46583e05;
  --font-sans:Inter,Aptos,"Segoe UI",system-ui,sans-serif;
  --font-serif:var(--font-sans); --ui-focus:#4d7563;
}
html { font-size:15px; }
body { color:var(--ink); background:var(--paper); font-family:var(--font-sans); line-height:1.55; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font-family:inherit; }
h1,h2,h3,h4,.metric-card strong,.dashboard-empty strong,.patient-empty-state strong,
.patient-message-card strong,.patient-appointment time strong,.message-avatar,
.conversation-avatar,.form-section legend,.brand-mark { font-family:var(--font-sans); }
h1,h2,h3,h4 { letter-spacing:-.035em; line-height:1.2; }
h1 { font-size:clamp(1.8rem,3vw,2.65rem); }
h2 { font-size:1.4rem; }
p { color:var(--muted); }
a { text-underline-offset:3px; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--ui-focus); outline-offset:3px; }
.app-sidebar :focus-visible,.app-mobile-drawer :focus-visible { outline-color:#a8e1ba; }
.skip-link { z-index:11000; }
.btn { display:inline-flex; justify-content:center; align-items:center; gap:.5rem; min-height:44px; padding:.65rem 1rem; border-radius:24px; font-size:.9rem; line-height:1.35; font-weight:650; box-shadow:none; transition:background .15s,border-color .15s; }
.btn-primary { color:#fff; background:var(--sage); border-color:var(--sage); }
.btn-primary:hover,.btn-primary:focus { color:#fff; background:var(--sage-dark); border-color:var(--sage-dark); }
.btn-quiet,.btn-soft { color:var(--ink); background:#fff; border:1px solid #ced9d0; }
.btn-quiet:hover,.btn-soft:hover { color:var(--sage-dark); background:var(--sage-light); border-color:#9cbaa6; }
.btn-lg { min-height:48px; padding:.8rem 1.25rem; font-size:.95rem; }
.eyebrow { color:var(--sage-dark); font-size:.7rem; font-weight:650; letter-spacing:.12em; }
.eyebrow.light { color:#c3e7ce; }
/* Shared mark for the public header, workspace, mobile menu and footer. */
.brand-symbol { display:block; width:34px; height:56px; flex:0 0 34px; object-fit:contain; }
.app-mobile-brand .brand-symbol { width:30px; height:48px; flex-basis:30px; }
.brand-copy strong,.app-sidebar-brand strong,.app-mobile-brand strong,.footer-brand strong { white-space:nowrap; }
/* One continuous workspace instead of nested floating canvases. */
body.app-mode { background:var(--paper); }
.app-shell { grid-template-columns:244px minmax(0,1fr); }
.app-sidebar-frame { z-index:1030; padding:0; }
.app-mode .app-sidebar { top:0; height:100dvh; border:0; border-right:1px solid #d8e1d3; border-radius:0 28px 28px 0; background:#e7ede1; box-shadow:none; }
.app-sidebar-content { padding:1.5rem .85rem 1rem; }
.app-sidebar-brand { margin:0 .5rem 2rem; gap:.75rem; }
.app-sidebar-brand strong { font-size:1.1rem; }
.app-sidebar-brand small { color:#586c5e; font-size:.7rem; }
.app-navigation { padding-bottom:1.25rem; }
.app-nav-label { color:#596d5c; font-size:.66rem; padding:.25rem .8rem .6rem; letter-spacing:.11em; }
.app-nav-group { gap:.25rem; }
.app-nav-link { grid-template-columns:24px minmax(0,1fr); min-height:44px; gap:.8rem; padding:.65rem .85rem; border-radius:22px; color:#435c4c; font-size:.88rem; font-weight:550; }
.app-nav-link:hover { color:#344e3f; background:#dbe5d6; transform:none; }
.app-nav-link.active { color:#344e3f; background:#cdddc9; border-color:transparent; box-shadow:none; }
.app-nav-icon,.app-nav-link.active .app-nav-icon { width:24px; height:24px; border-radius:0; color:inherit; background:transparent; }
.app-nav-icon svg { width:19px; height:19px; }
.practice-toggle { grid-template-columns:24px minmax(0,1fr) auto; cursor:pointer; list-style:none; }
.practice-toggle::-webkit-details-marker { display:none; }
.practice-navigation[open] .app-nav-chevron { transform:rotate(90deg); }
.practice-subnav { display:grid; gap:.15rem; margin:.35rem .5rem .6rem 1.6rem; padding-left:.65rem; border-left:1px solid #bdceba; }
.practice-subnav .app-nav-link { display:flex; min-height:40px; padding:.5rem .7rem; font-size:.82rem; }
.app-account-card { padding:.6rem .4rem; gap:.5rem; border:0; border-radius:22px; background:transparent; grid-template-columns:32px minmax(0,1fr); }
.app-account-avatar { width:32px; height:32px; border-radius:50%; color:#395342; background:#cfddc7; }
.app-account-copy strong { font-size:.78rem; }
.app-account-copy small { color:#586c5e; font-size:.68rem; }
.app-account-logout { border:0; border-radius:22px; background:transparent; color:#526b59; min-height:44px; }
.app-workspace { padding:0; }
.workspace-header { display:flex; justify-content:space-between; align-items:center; gap:1rem; min-height:72px; padding:1rem 2.5rem; border-bottom:1px solid var(--line); background:#fff; }
.workspace-location { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; color:var(--muted); font-size:.85rem; }
.workspace-location strong { color:var(--ink); font-weight:650; }
.workspace-help { color:var(--muted); font-size:.8rem; text-decoration:none; white-space:nowrap; }
.workspace-help:hover { color:var(--sage); }
.app-main { flex:1; min-height:0; overflow:visible; border:0; border-radius:0; background:none; box-shadow:none; }
body.app-mode .app-main > .page-shell { padding:2rem 2.5rem 2.5rem; }
body.app-mode .app-main > .page-shell > .container { max-width:1480px; }
.app-footer { min-height:50px; padding:1rem 2.5rem; border-top:1px solid var(--line); font-size:.73rem; }
.app-alerts { position:static; width:auto; margin:1rem 2.5rem 0; }
.app-alerts .alert { margin:0; box-shadow:none; }
/* Headings and actions are part of the page, not promotional banners. */
.dashboard-hero,.patient-dashboard-header,.staff-dashboard-header { padding:0; margin:0 0 1.75rem; align-items:center; color:var(--ink); border-radius:0; background:none; box-shadow:none; overflow:visible; }
.dashboard-hero::after,.patient-dashboard-header::after,.staff-dashboard-header::after { display:none; }
.dashboard-hero h1,.patient-dashboard-header h1,.staff-dashboard-header h1 { color:var(--ink); font-size:clamp(1.8rem,2.8vw,2.5rem); margin:.4rem 0 .55rem; }
.dashboard-hero p,.patient-dashboard-header p,.staff-dashboard-header p { max-width:680px; color:var(--muted); font-size:.95rem; }
.dashboard-hero .eyebrow,.patient-dashboard-header .eyebrow,.staff-dashboard-header .eyebrow { color:var(--sage-dark); }
.dashboard-hero .btn,.patient-dashboard-header .btn,.staff-dashboard-header .btn { background:#fff; color:var(--ink); border:1px solid #ced9d0; backdrop-filter:none; }
.dashboard-hero .btn-primary,.patient-dashboard-header .btn-primary,.staff-dashboard-header .btn-primary { background:var(--sage); border-color:var(--sage); color:#fff; }
.dashboard-hero .btn-primary:hover,.patient-dashboard-header .btn-primary:hover,.staff-dashboard-header .btn-primary:hover { background:var(--sage-dark); }
.staff-actions,.patient-actions { flex-shrink:0; }
.page-heading { margin-bottom:1.5rem; gap:1.5rem; align-items:center; }
.page-heading h1,.editor-heading h1,.editor-heading h2,.course-discovery-hero h1 { font-size:clamp(1.8rem,2.8vw,2.5rem); }
.page-heading p { font-size:.95rem; }
.page-shell,.auth-page { padding-block:2.5rem; }
.metric-grid,.admin-metric-grid { gap:1rem; margin-bottom:2rem; }
.metric-card { position:relative; display:flex; flex-direction:column; gap:.5rem; padding:1.25rem; min-height:168px; border-radius:20px; box-shadow:var(--shadow-sm); }
.metric-card::before,.metric-card::after { display:none; }
.metric-label { min-height:0; font-size:.85rem; color:var(--muted); }
.metric-card strong { font-size:2.4rem; font-weight:650; line-height:1.1; font-variant-numeric:tabular-nums; }
.metric-detail { min-height:1.3rem; font-size:.75rem; }
.metric-detail span { background:transparent; padding:0; color:var(--muted); }
.metric-card a { margin-top:auto; font-size:.8rem; text-decoration:none; }
.metric-card a:hover { text-decoration:underline; }
.metric-card a::after { content:' →'; }
.workspace-metrics .metric-card:nth-child(2) { background:#eff3e9; border-color:#d4e5d8; }
.dashboard-section-heading { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin:0 0 1rem; }
.dashboard-section-heading h2 { margin:.25rem 0 0; font-size:1.25rem; }
.dashboard-section-heading > span { color:var(--muted); font-size:.78rem; }
.dashboard-content-grid { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:1rem; }
.dashboard-panel { border-radius:20px; box-shadow:var(--shadow-sm); padding:0; }
.dashboard-panel > header { padding:1.1rem 1.25rem; margin:0; }
.dashboard-panel h2 { font-size:1.15rem; }
.dashboard-panel .text-link { font-size:.8rem; }
.dashboard-empty { min-height:220px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:.5rem; padding:1.5rem; margin:0; border:0; border-radius:0; background:none; }
.dashboard-empty strong,.patient-empty-state strong { font-size:1rem; font-weight:650; }
.dashboard-empty p { font-size:.88rem; margin:0 0 .5rem; }
.empty-state-icon { display:grid; place-items:center; width:40px; height:40px; margin-bottom:.3rem; border-radius:20px; background:var(--sage-light); color:var(--sage); font-size:1.3rem; }
.workspace-shortcuts { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1.25rem; align-items:center; padding:1.5rem 0 0; margin-top:1.5rem; border-top:1px solid var(--line); }
.workspace-shortcuts h2 { font-size:1.1rem; margin:.3rem 0 0; }
.workspace-shortcuts a { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem; border:1px solid var(--line); border-radius:24px; background:#fff; color:var(--ink); text-decoration:none; }
.workspace-shortcuts a:hover { border-color:#9cbaa6; background:var(--sage-light); }
.workspace-shortcuts strong,.workspace-shortcuts small { display:block; }
.workspace-shortcuts strong { font-size:.88rem; }
.workspace-shortcuts small { color:var(--muted); font-size:.78rem; margin-top:.25rem; }
/* Patient, administration and shared data surfaces. */
.workspace-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:0; border-radius:0; background:none; box-shadow:none; }
.patient-summary-item { min-height:100px; border-radius:20px; padding:1.1rem 1.25rem; box-shadow:var(--shadow-sm); }
.patient-summary-item strong { white-space:normal; }
.patient-focus-card,.patient-section-card,.patient-message-card,.admin-command-card,
.feature-card,.data-card,.editor-card,.booking-card,.detail-main,.course-card,.patient-access-card,
.course-result-card,.course-search-panel,.course-map-panel { border-radius:var(--radius); border-color:var(--line); box-shadow:var(--shadow-sm); }
.patient-focus-card { border-top:3px solid var(--sage); }
.patient-focus-card h2,.patient-section-card h2 { font-size:1.2rem; }
.patient-message-card { background:#eff3e9; }
.patient-message-card strong { font-size:1.35rem; }
.patient-empty-state { min-height:180px; padding:1.5rem; }
.patient-empty-state.compact { min-height:0; }
.admin-metric-grid article { border-radius:20px; box-shadow:var(--shadow-sm); padding:1.25rem; }
.admin-metric-grid strong { font-variant-numeric:tabular-nums; }
.admin-command-card h2 { font-size:1.35rem; }
.demo-command-card { background:#f9faf8; }
.responsive-table th,.responsive-table td { padding:.9rem 1rem; }
.responsive-table th { font-size:.7rem; background:#f7f9f7; }
.responsive-table tr:hover td { background:#f7faf7; }
.table-responsive { overflow-x:auto; }
.status-pill { font-size:.75rem; font-weight:650; }
.form-group label,.code-display-label { font-size:.85rem; }
.form-group input,.form-group select,.form-group textarea,.generated-code,
input:not([type="checkbox"]):not([type="radio"]),select,textarea { min-height:44px; border-color:#cbd7ce; border-radius:22px; padding:.65rem .8rem; font-size:.94rem; }
.form-group textarea { min-height:120px; }
.form-group input:focus,.form-group select:focus,.form-group textarea:focus { outline:2px solid var(--sage); outline-offset:1px; box-shadow:none; }
.editor-card { padding:1.75rem; }
.form-section { border-radius:24px; }
.alert { border-radius:24px; }
.conversation-card,.timeline-item { box-shadow:var(--shadow-sm); }
.course-search-panel { padding:1.25rem; }
.course-search-panel label { font-size:.8rem; }
.course-result-card h2 { font-size:1.3rem; }
.course-result-practice,.course-result-description { font-size:.88rem; }
.course-result-facts strong { font-size:.8rem; }
.course-result-facts small,.category-chip,.visibility-chip,.course-search-privacy,.map-attribution { font-size:.75rem; }
.course-map-controls button { width:44px; height:44px; }
.view-switch button { min-height:40px; font-size:.85rem; }
.compact-check span,.choice-card strong { font-size:.85rem; }
.choice-card small,.location-coordinate-status,.booking-login-copy { font-size:.8rem; }
/* Public site: clear entry paths and a calmer, readable product preview. */
.site-header { border-bottom:1px solid var(--line); background:#fff; backdrop-filter:none; }
.navbar { min-height:76px; }
.nav-link { font-size:.9rem; border-radius:22px; }
.nav-link.active { color:var(--sage-dark); background:var(--sage-light); }
.marketing-hero { padding:4.5rem 0; background:linear-gradient(110deg,#faf9f3,#edf2e7); }
.marketing-hero::before { display:none; }
.marketing-hero-grid { grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:4rem; }
.marketing-hero h1 { font-size:clamp(2.5rem,4.8vw,4.5rem); line-height:1.08; letter-spacing:-.035em; }
.marketing-hero h1 > span { color:var(--sage); }
.marketing-hero .lead { font-size:1.08rem; line-height:1.7; }
.trust-chip { color:var(--sage-dark); background:#e5efe6; border:1px solid #cedfce; border-radius:20px; font-size:.73rem; }
.hero-assurance { gap:1rem; }
.hero-assurance span { font-size:.78rem; }
.portal-preview { min-height:410px; padding-top:2rem; }
.preview-caption { position:absolute; top:0; left:0; right:0; text-align:center; font-size:.61rem; letter-spacing:.1em; color:var(--muted); }
.portal-window { transform:none; border-radius:24px; border:1px solid #d4dfd4; box-shadow:0 16px 40px #273d2412; }
.portal-preview-glow { display:none; }
.preview-float-card { border-radius:24px; box-shadow:var(--shadow); right:-1rem; bottom:0; }
.preview-welcome > strong { font-size:1.65rem; }
.preview-focus-card { border-radius:24px; }
.preview-tile { border-radius:24px; }
.trust-band { background:#fff; border-block:1px solid var(--line); }
.trust-band-grid { gap:2rem; padding-block:1.2rem; }
.journey-section { padding:4rem 0; }
.section-heading.centered { text-align:left; margin-inline:0; max-width:720px; }
.section-heading h2 { font-size:clamp(1.7rem,3vw,2.3rem); }
.journey-card { min-height:270px; border-radius:22px; padding:1.5rem; box-shadow:none; }
.journey-card h3 { font-size:1.3rem; }
.journey-icon { width:42px; height:42px; border-radius:24px; }
.entry-section { padding:0 0 4rem; }
.entry-grid { display:grid; grid-template-columns:1fr 1.25fr; gap:.75rem 3rem; }
.entry-grid > div { grid-row:span 3; align-self:center; }
.entry-grid h2 { margin:.5rem 0 1rem; font-size:2rem; }
.entry-option { display:flex; align-items:center; gap:1rem; padding:1.25rem; background:#fff; border:1px solid var(--line); border-radius:20px; color:var(--ink); text-decoration:none; }
.entry-option:hover { background:var(--sage-light); border-color:#9cbaa6; color:var(--ink); }
.entry-number { font-size:.8rem; color:var(--sage); font-weight:650; }
.entry-option strong,.entry-option small { display:block; }
.entry-option small { color:var(--muted); margin-top:.25rem; }
.entry-option > span:last-child { margin-left:auto; }
.auth-stage { padding:3rem 0; background:var(--paper); }
.auth-stage-grid { border:1px solid var(--line); border-radius:24px; overflow:hidden; background:#fff; box-shadow:var(--shadow); }
.auth-visual-panel { background:#e7ede1; border-radius:0; }
.auth-visual-copy h2 { font-size:clamp(2rem,3.5vw,3rem); color:white; margin:.75rem 0 1rem; }
.auth-form-heading h1 { font-size:2rem; margin:.6rem 0; }
.auth-form-panel { padding:2.5rem; }
.site-footer { background:#edf2ec; }
@media(min-width:992px) and (max-width:1250px) {
  .app-shell { grid-template-columns:220px minmax(0,1fr); }
  .staff-dashboard-header,.patient-dashboard-header { align-items:flex-start; flex-direction:column; gap:1rem; }
  .staff-actions,.patient-actions { justify-content:flex-start; }
  body.app-mode .app-main > .page-shell { padding-inline:1.5rem; }
  .workspace-header { padding-inline:1.5rem; }
}
@media(max-width:991.98px) {
  .app-shell { display:block; }
  .app-workspace { padding:0; }
  .app-mobile-header { top:0; min-height:64px; padding:.65rem 1rem; margin:0; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; background:#fff; backdrop-filter:none; }
  .app-mobile-brand strong { font-size:.95rem; }
  .app-menu-button { font-size:.85rem; border-radius:22px; }
  .workspace-header { padding:.75rem 1rem; min-height:48px; }
  .workspace-help { display:none; }
  .app-mode .app-main { min-height:0; border-radius:0; }
  body.app-mode .app-main > .page-shell { padding:1.5rem 1rem 2rem; }
  .app-mobile-drawer { color:var(--ink); background:#e7ede1; border-radius:0 28px 28px 0; }
  .app-mobile-drawer .app-sidebar-content { min-height:100%; height:100%; }
  .app-mobile-drawer .app-sidebar-brand { margin-right:2rem; }
  .app-alerts { margin:1rem 1rem 0; }
  .app-footer { padding:1rem; }
  .dashboard-content-grid { grid-template-columns:1fr 1fr; }
  .workspace-shortcuts { grid-template-columns:1fr 1fr; }
  .workspace-shortcuts > div { grid-column:1/-1; }
  .marketing-hero-grid { grid-template-columns:1fr; gap:2.5rem; }
  .marketing-hero-copy { text-align:left; }
  .marketing-hero-copy .lead { margin-left:0; }
  .hero-actions,.hero-assurance { justify-content:flex-start; }
  .portal-preview { max-width:560px; width:100%; margin:auto; }
  .entry-grid { gap:1rem; }
}
@media(max-width:767.98px) {
  .staff-dashboard-header,.patient-dashboard-header,.dashboard-hero { flex-direction:column; align-items:flex-start; gap:1rem; }
  .staff-actions,.patient-actions { width:100%; justify-content:flex-start; }
  .staff-actions .btn,.patient-actions .btn { flex:1; }
  .metric-grid,.admin-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
  .metric-card { min-height:155px; padding:1rem; }
  .metric-card strong { font-size:2rem; }
  .dashboard-content-grid,.patient-main-grid,.admin-work-grid { grid-template-columns:1fr; }
  .workspace-summary { grid-template-columns:1fr; gap:.5rem; }
  .patient-summary-item { min-height:76px; }
  .dashboard-section-heading > span { display:none; }
  .dashboard-panel > header { align-items:center; padding:1rem; }
  .dashboard-empty { min-height:210px; }
  .dashboard-list-item .status-pill { display:inline-flex; }
  .dashboard-list-item { grid-template-columns:auto minmax(0,1fr); }
  .dashboard-list-item .status-pill { grid-column:2; justify-self:start; }
  .marketing-hero { padding:2.5rem 0; }
  .marketing-hero h1 { font-size:clamp(2.5rem,9vw,3.5rem); }
  .journey-section { padding:2.5rem 0; }
  .journey-grid,.entry-grid { grid-template-columns:1fr; }
  .entry-grid > div { grid-row:auto; }
  .journey-card { min-height:0; }
  .entry-section { padding-bottom:2.5rem; }
  .auth-stage { padding:1.25rem 0; }
  .auth-form-panel { padding:1.5rem; }
  .auth-visual-panel { min-height:0; padding:1.5rem; }
  .auth-visual-copy h2 { font-size:1.7rem; }
  .auth-promise-list { display:none; }
  .page-heading { align-items:flex-start; }
  .course-result-facts { grid-template-columns:1fr 1fr; }
}
@media(max-width:480px) {
  .workspace-shortcuts { grid-template-columns:1fr; }
  .workspace-shortcuts > div { grid-column:auto; }
  .metric-label { font-size:.78rem; }
  .metric-card a { font-size:.75rem; }
  .metric-card { min-height:164px; }
  .staff-actions .btn,.patient-actions .btn { flex-basis:100%; }
  .admin-metric-grid article { flex-direction:column; align-items:flex-start; min-height:150px; }
  .portal-preview { min-height:365px; }
  .preview-float-card { display:none; }
  .footer-grid { grid-template-columns:1fr; }
  .security-note { justify-self:start; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}

/* Low-stimulus presentation: quiet surfaces, readable contrast and stable cards. */
.app-sidebar-brand,.app-sidebar-brand:hover,.app-sidebar-brand strong,
.app-account-card,.app-account-card:hover,.app-account-copy strong { color:var(--ink); }
.app-sidebar-brand small,.app-account-copy small { color:#586c5e; }
.app-nav-group + .app-nav-group,.app-sidebar-account { border-top-color:#cdd8c6; }
.app-account-card:hover,.app-account-logout:hover { color:#344e3f; background:#dbe5d6; border-color:transparent; transform:none; }
.app-nav-chevron { color:#62785f; }
.app-sidebar :focus-visible,.app-mobile-drawer :focus-visible { outline-color:#4d7563; }
.app-mobile-drawer .btn-close-white { filter:none; }
.workspace-header,.site-header,.app-mobile-header { background:#fffefa; }
.metric-card,.dashboard-panel,.patient-summary-item,.patient-focus-card,
.patient-section-card,.admin-command-card,.course-result-card { background:#fffefa; }
.workspace-metrics .metric-card:nth-child(2) { background:#f1f4eb; border-color:var(--line); }
.metric-card strong { font-size:2.15rem; }
.dashboard-panel > header { padding:1.25rem 1.5rem; }
.dashboard-empty { min-height:230px; gap:.65rem; }
.dashboard-empty .empty-state-icon { background:#eff3e9; color:#56745f; }
.patient-focus-card { border-top:1px solid var(--line); }
.patient-summary-item.has-update,.patient-message-card.has-update { background:#edf3e8; }
.auth-visual-panel,.auth-visual-copy h2 { color:var(--ink); }
.auth-visual-panel .eyebrow.light,.auth-visual-panel .auth-brand-chip,
.auth-visual-copy p,.auth-promise-list strong,.auth-promise-list small { color:#455e4c; }
.auth-brand-chip { background:#d9e5d1; border-color:#c8d8c0; }
.auth-visual-orb { display:none; }
.hero-assurance i,.preview-secure { color:#45644e; background:#e8efdf; }
.preview-tile.mint,.preview-tile.sand { background:#edf2e5; }
.journey-card.accent-mint,.journey-card.accent-sand,.journey-card.accent-coral { background:#fffefa; }
.journey-card .journey-icon { color:#526e59; background:#edf2e5; }
.journey-number { color:#66795f; }
.status-pill.active { color:#45644e; background:#e8efdf; }
/* Keep important warnings recognizable; do not replace semantic danger colors. */
.course-result-card:hover,.course-card:hover,.patient-summary-item:hover,
.entry-option:hover,.journey-card:hover,.preview-float-card { transform:none; }
.portal-preview-glow,.status-signal { animation:none; }
.btn,.app-nav-link,.course-result-card,.course-card,.patient-summary-item,
.entry-option,.journey-card { transition:none; }

/* Everyday workflows: content before decoration, compact summaries and explicit groups. */
body.app-mode h1,.course-discovery-hero h1,.messages-header h1,.detail-main h1 {
  font-size:clamp(1.65rem,2.2vw,2rem); line-height:1.25; letter-spacing:-.02em;
}
body.app-mode h2 { font-size:1.2rem; line-height:1.35; }
.page-heading,.staff-dashboard-header,.patient-dashboard-header,.messages-header,.course-discovery-hero { margin-bottom:1.25rem; }
.quiet-summary { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem 1.5rem; padding:.85rem 0; margin-bottom:.4rem; border-block:1px solid var(--line); color:var(--muted); font-size:.9rem; }
.quiet-summary strong { font-size:inherit; color:var(--ink); }
.quiet-summary a { color:var(--muted); text-decoration:underline; text-underline-offset:3px; }
.quiet-summary .has-update { color:var(--sage-dark); font-weight:650; }
.scope-note { color:var(--muted); font-size:.85rem; line-height:1.5; margin:.5rem 0 1.5rem; max-width:90ch; }
.dashboard-panel > header { padding:1rem 1.25rem; }
.dashboard-empty { min-height:0; padding:1.25rem; align-items:flex-start; text-align:left; gap:.4rem; }
.dashboard-empty p { margin:0; }
.dashboard-panel { align-self:start; }
.patient-empty-state,.messages-empty { min-height:0; padding:1.5rem; text-align:left; }
.messages-empty h2 { margin:0 0 .5rem; }
.messages-empty p { margin:0; max-width:70ch; }
.messages-empty .eyebrow { display:none; }
.patient-list-columns,.patient-access-row { display:grid; grid-template-columns:minmax(220px,1.2fr) minmax(200px,1fr) auto; gap:1.25rem; align-items:center; }
.patient-list-columns { padding:.85rem 1rem; background:#f0f3ed; color:var(--muted); font-size:.8rem; border-radius:20px 20px 0 0; }
.patient-access-row { padding:.9rem 1rem; }
.care-person .message-avatar { color:#fffefa; flex-shrink:0; width:36px; height:36px; font-size:.9rem; }
.patient-access-row[hidden] { display:none; }
.patient-access-sources .status-pill { font-weight:500; }
.filter-empty { padding:1rem; color:var(--muted); }
.work-filters { padding:1rem 0; border-block:1px solid var(--line); margin-bottom:1.25rem; }
.work-filters .form-row { display:flex; flex-wrap:wrap; align-items:end; gap:1rem; }
.work-filters .form-group { flex:1 1 200px; margin-bottom:0; }
.work-filters .btn { min-height:44px; }
.work-filters .form-row > a { align-self:center; }
.secondary-filters { margin-top:.8rem; }
.secondary-filters > summary,.schedule-history > summary,.add-session > summary { cursor:pointer; color:var(--sage-dark); font-weight:600; padding:.75rem 0; min-height:44px; }
.secondary-filters[open] .form-row { margin:.5rem 0; }
.result-count { color:var(--muted); font-size:.85rem; }
.management-table { border:1px solid var(--line); border-radius:16px; background:#fffefa; }
.management-table table { width:100%; margin:0; }
.management-table td { vertical-align:middle; }
.management-table td small { display:block; color:var(--muted); margin-top:.35rem; font-size:.8rem; }
.management-table th { white-space:nowrap; }
.management-table td:first-child { min-width:220px; }
.management-table .row-actions { flex-wrap:nowrap; }
.management-table .btn { white-space:nowrap; }
.calendar-overview { padding:.65rem 0; border:0; box-shadow:none; background:none; }
.calendar-overview-copy > span { background:none; color:var(--ink); width:auto; height:auto; font-size:1rem; }
.calendar-month { margin-bottom:1.5rem; }
.timeline-item { padding:.85rem 1rem; border-radius:16px; }
.timeline-day { grid-template-columns:115px minmax(0,1fr); }
.timeline-item h2 { margin:.15rem 0; }
.timeline-item p { margin:.15rem 0; }
.timeline-item .kind-label { font-size:.72rem; }
.timeline-item .time-block { background:none; padding:.25rem; }
.detail-main { padding:1.75rem; }
.detail-main h1 { margin:1rem 0 .5rem; }
.course-detail-grid { align-items:start; }
.schedule-section { margin-top:1.5rem; padding-top:1.25rem; }
.public-session-list li { padding:.75rem 0; }
.schedule-history { border-top:1px solid var(--line); margin-top:1rem; }
.capacity-summary { font-size:1rem; margin:1rem 0; color:var(--ink); }
.booking-card h2 { margin:0 0 1rem; }
.course-location-block { background:none; border-top:1px solid var(--line); border-radius:0; padding:1rem 0; }
.course-location-block .eyebrow { display:none; }
.course-editor-workspace { max-width:980px!important; }
.course-editor-workspace > .editor-card { margin-bottom:1.5rem; }
.section-links { display:flex; gap:1.5rem; margin-bottom:1rem; }
.section-links a { display:block; padding:.65rem 0; color:var(--sage-dark); }
.course-editor-workspace section { scroll-margin-top:1rem; }
.sticky-save { position:sticky; bottom:0; z-index:2; background:#fffefa; padding:1rem 0; border-top:1px solid var(--line); }
.add-session { margin-bottom:1rem; }
.session-list li { padding:.85rem 0; border:0; border-bottom:1px solid var(--line); border-radius:0; }
.session-list li > div > span { display:block; }
.session-list li > div > span > span { display:inline; }
.form-group textarea { border-radius:14px; }
.danger-zone { display:block; padding:1rem; }
.danger-zone > summary { cursor:pointer; }
.admin-work-grid { grid-template-columns:1fr; gap:1rem; margin-top:1.5rem; }
.demo-command-card { padding:1rem 1.25rem; border-top:1px solid var(--line); }
.demo-command-card > summary { cursor:pointer; font-weight:600; }
.demo-command-card[open] > summary { margin-bottom:1rem; }
.admin-command-foot { margin-top:1rem; padding-top:.75rem; }
@media(max-width:767.98px) {
  .quiet-summary { gap:.6rem 1rem; }
  .patient-list-columns { display:none; }
  .patient-access-row { grid-template-columns:1fr; gap:.6rem; }
  .patient-access-row .row-actions { justify-content:flex-start; }
  .timeline-day { grid-template-columns:1fr; gap:.5rem; }
  .timeline-item { grid-template-columns:70px minmax(0,1fr); }
  .timeline-item .item-actions { grid-column:2; }
  .detail-main,.editor-card { padding:1rem; }
  .sticky-save { flex-wrap:wrap; }
  .session-list li { flex-direction:column; align-items:flex-start; }
  .management-table td,.management-table th { padding:.7rem; }
}

.practice-code-entry { padding:1.25rem; margin-bottom:1.5rem; border:1px solid var(--line); border-radius:18px; background:#fffefa; }
.practice-code-entry h3 { font-size:1.1rem; }
.practice-code { font-family:ui-monospace,monospace; font-size:1.2rem; overflow-wrap:anywhere; letter-spacing:.06em; }
.practice-code-entry .scope-note { margin:1rem 0; }

/* Keep registration in reading order, with optional practice lookup before personal data. */
.registration-grid.registration-focused { display:block; max-width:760px; }
.registration-focused .registration-form-panel { width:100%; }
.registration-focused .auth-form-heading h1 { font-size:1.7rem; }
.registration-focused .practice-code-entry { padding:0 0 1.5rem; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.registration-focused h2.registration-section-title,.registration-focused .practice-code-entry h2 { font-size:1.15rem; margin-bottom:.75rem; }
.optional-label { font-size:.85rem; font-weight:400; color:var(--muted); margin-left:.4rem; }
.practice-code-form { display:grid; gap:.4rem; margin-bottom:1rem; }
.practice-code-form > label { margin:0; font-size:.85rem; font-weight:600; }
.practice-code-controls { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
.practice-code-controls input.practice-code-input { box-sizing:border-box; flex:0 1 24ch; width:24ch; max-width:100%; min-width:0; height:44px; min-height:44px; margin:0; padding:0 .8rem; font-family:ui-monospace,monospace; font-size:1rem; line-height:1.25; }
.practice-code-controls > .btn { box-sizing:border-box; flex:0 0 auto; width:auto; height:44px; min-height:44px; margin:0; padding:0 1rem; display:inline-flex; align-items:center; justify-content:center; line-height:1.25; }
.practice-code-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem 2rem; margin-bottom:1.5rem; }
.practice-code-panel h2 { font-size:1.2rem; }
.practice-code-panel p { max-width:65ch; }
.practice-code-display { display:flex; flex-direction:column; justify-content:center; gap:.5rem; background:#f2f5ef; border-radius:16px; padding:1.25rem; }
.practice-code-display > span { font-size:.85rem; color:var(--muted); }
.practice-code-display .practice-code { user-select:all; }
.practice-code-next { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:.5rem 1rem; border-top:1px solid var(--line); padding-top:1rem; }
@media(max-width:767.98px) {
 .practice-code-panel { grid-template-columns:minmax(0,1fr); }
 .practice-code-display .practice-code { font-size:1rem; letter-spacing:.02em; }
}

/* Consistent forms and navigation across the complete portal. */
.practice-navigation { display:block; }
.practice-navigation > .practice-toggle { display:grid; grid-template-columns:24px minmax(0,1fr) 18px; align-items:center; width:100%; list-style:none; }
.practice-toggle::marker { content:""; }
.practice-toggle::-webkit-details-marker { display:none; }
.practice-toggle::before,.practice-toggle::after { content:none; }
.practice-toggle > .app-nav-chevron { display:block; width:18px; height:18px; margin:0; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transform:rotate(0); transition:none; }
.practice-navigation[open] > .practice-toggle > .app-nav-chevron { transform:rotate(90deg); }
.practice-navigation:not([open]) > .practice-subnav { display:none; }
.app-sidebar-content { min-height:0; }
.app-navigation { min-height:0; overflow-y:auto; scrollbar-width:thin; }
.app-sidebar-account { flex-shrink:0; }
.app-mode .container.narrow-container { max-width:1000px; margin-inline:auto; }
.app-mode .container.narrow-container.messages-container { max-width:1160px; }
.form-group input[type=number] { max-width:10rem; }
.form-group input[type=datetime-local] { max-width:21rem; }
.form-group input[type=date] { max-width:15rem; }
.form-group { min-width:0; }
.form-actions,.editor-actions { display:flex; flex-wrap:wrap; gap:.75rem; justify-content:flex-end; align-items:center; }
.form-actions .btn,.editor-actions .btn { width:auto; }
.work-filters .form-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:1rem; }
.work-filters .form-group { flex:1 1 15rem; max-width:27rem; margin:0; }
.work-filters .btn { align-self:flex-end; }
.heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; }
.search-field { display:flex; align-items:center; gap:.6rem; min-width:min(100%,20rem); flex:1 1 20rem; border:1px solid var(--line); border-radius:14px; padding:0 .9rem; background:var(--surface); }
.search-field input[type=search] { width:100%; min-width:0; border:0; box-shadow:none; background:transparent; padding:.7rem 0; }
.search-field:focus-within { outline:3px solid var(--ui-focus); outline-offset:2px; }
.search-field input:focus { outline:none; }
.access-management-list { display:grid; gap:1rem; }
.access-management-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:1.5rem; padding:1.4rem; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.access-card-main { min-width:0; }
.access-alias-form { max-width:35rem; }
.access-alias-form label { display:block; font-weight:600; font-size:.9rem; margin-bottom:.4rem; }
.access-alias-form > div { display:flex; align-items:center; gap:.6rem; }
.access-alias-form input { min-width:0; flex:1; border:1px solid var(--line); border-radius:12px; padding:.65rem .8rem; min-height:44px; }
.access-card-meta { display:flex; flex-wrap:wrap; gap:.4rem 1.5rem; margin-top:.85rem; color:var(--muted); font-size:.85rem; }
.access-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:.6rem; }
.access-card-actions form { margin:0; }
.access-create-form { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
.access-create-form select { border:1px solid var(--line); border-radius:12px; min-height:44px; padding:.5rem; max-width:20rem; }
.practice-code-panel { padding:1.5rem; grid-template-columns:minmax(0,1fr) auto; gap:1.25rem 2rem; align-items:center; }
.practice-code-panel p { max-width:65ch; }
.practice-code-display { gap:.6rem; align-items:flex-start; }
.practice-code-next { padding-top:1rem; }
.practice-members-heading,.data-card > .section-heading-row { padding:1.25rem 1.5rem; }
.care-access-row > .status-pill,.care-access-row > .btn { justify-self:start; width:auto; }
.admin-section .care-access-row { grid-template-columns:minmax(0,1fr) auto auto; }
.admin-action.form-row { display:flex; flex-wrap:wrap; gap:.75rem; align-items:flex-end; }
.admin-action.form-row .form-group { flex:1 1 17rem; margin-bottom:0; }
.admin-action.form-row > .btn { flex:0 0 auto; width:auto; }
.role-list { display:flex; flex-wrap:wrap; gap:.75rem; }
.role-list form { display:flex; align-items:center; gap:.75rem; padding:.65rem .85rem; border:1px solid var(--line); border-radius:14px; }
.role-list .btn { width:auto; }
.account-facts { display:flex; flex-wrap:wrap; gap:1rem 2rem; }
.account-facts dd { margin:0; }
.care-management-card > .patient-empty-state { border:0; padding:1rem 0; background:none; }
.care-management-card + .info-banner { margin-top:1rem; }
.license-work-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(16rem,.7fr); gap:1.5rem; margin-bottom:1.5rem; }
.license-work-grid .admin-command-card { padding:1.5rem; }
.profile-hero,.contact-hero { color:var(--ink); background:none; box-shadow:none; border:0; border-radius:0; padding:0 0 1.5rem; min-height:0; }
.profile-hero::before,.profile-hero::after,.contact-hero::before,.contact-hero::after { content:none; }
.profile-hero p,.contact-hero p { color:var(--muted); }
.profile-hero h1,.contact-hero h1 { color:var(--ink); }
.contact-shell { max-width:1000px; margin-inline:auto; }
.contact-directions { grid-template-columns:1fr; gap:.8rem; }
.contact-directions h3 { font-size:1.1rem; margin-top:1.25rem; }
.contact-directions h3:first-child { margin-top:0; }
.legal-page .container { max-width:900px; }
.legal-page p { max-width:75ch; }
.password-field { display:flex; align-items:center; position:relative; }
.password-field input { padding-right:6rem; min-width:0; }
.password-field .password-toggle { position:absolute; right:.35rem; width:auto; min-height:36px; padding:.3rem .65rem; border:0; border-radius:10px; color:var(--sage-dark); background:var(--sage-light); font-size:.8rem; }
.portal-config-note { margin-top:1rem; padding:1rem; border:1px solid var(--line); border-radius:14px; }
@media(max-width:800px) {
  .access-management-card,.license-work-grid,.practice-code-panel { grid-template-columns:1fr; }
  .access-card-actions { justify-content:flex-start; }
  .admin-section .care-access-row { grid-template-columns:1fr auto; }
  .admin-section .care-access-row .care-person { grid-column:1/-1; }
  .practice-code { overflow-wrap:anywhere; }
  .heading-actions,.search-field { width:100%; }
}

.staff-dashboard-header { display:flex; justify-content:space-between; width:100%; }
.account-shell .btn-secondary { color:var(--sage-dark); background:var(--surface); border:1px solid var(--line); }
.account-shell .btn-secondary:hover { background:var(--sage-light); }
.practice-code-display { display:flex; flex-direction:column; }
.practice-code-display [role=status] { font-size:.85rem; color:var(--muted); }

/* Staff course management keeps both the table and geographic overview. */
.course-management .view-switch button { min-height:44px; font-size:.9rem; }
.course-management .staff-course-map-view { display:none; }
.course-management[data-active-view="map"] .staff-course-map-view { display:block; }
.course-management[data-active-view="map"] .management-table { display:none; }
.staff-course-map-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(18rem,1fr); gap:1.25rem; align-items:start; }
.course-management .course-map-panel { display:block; position:static; }
.staff-map-course-list { display:grid; gap:.8rem; }
.staff-map-course-card { padding:1.2rem; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.staff-map-course-card h2 { display:flex; align-items:baseline; gap:.6rem; margin:0 0 .5rem; }
.map-course-number { color:var(--sage-dark); font-size:.9rem; }
.course-management .course-map-controls button:disabled { opacity:.45; cursor:default; }
@media(max-width:900px) { .staff-course-map-grid { grid-template-columns:1fr; } }

/* List and map are distinct views at every viewport width. */
.course-discovery .course-search-layout { grid-template-columns:minmax(0,1fr); }
.course-discovery .course-map-panel { display:none; position:relative; top:auto; }
.course-discovery[data-active-view="map"] .course-result-list { display:none; }
.course-discovery[data-active-view="map"] .course-map-panel { display:block; }
