@font-face { font-family: "Switzer"; src: url("assets/fonts/switzer-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("assets/fonts/switzer-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("assets/fonts/switzer-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("assets/fonts/lora-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/cormorant-garamond-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; size-adjust: 112%; }

:root {
  --paper: #ffffff;
  --wash: #f4f8f9;
  --wash-deep: #e7eff2;
  --line: #d9e4e8;
  --line-strong: #b5c9d0;
  --ink: #132f3b;
  --ink-soft: #3e5661;
  --ink-quiet: #576e78;
  --brand-blue: #0081a7;
  --brand-orange: #ffa721;
  --current-wash: color-mix(in srgb, var(--brand-orange) 23%, var(--paper));
  --current-edge: color-mix(in srgb, var(--brand-orange) 52%, var(--ink));
  --accent: #006b8c;
  --accent-deep: #00546e;
  --accent-wash: #e4f3f7;
  --waiting: #8f5200;
  --waiting-wash: #fff3dc;
  --confirmed: #1c7450;
  --confirmed-wash: #e6f5ed;
  --failed: #b3261e;

  --display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-paper: 16px;
  --radius-control: 10px;
  --shadow-rest: 0 1px 2px rgb(from var(--ink) r g b / 0.05), 0 8px 22px -10px rgb(from var(--ink) r g b / 0.14);
  --shadow-raised: 0 2px 4px rgb(from var(--ink) r g b / 0.06), 0 18px 40px -16px rgb(from var(--ink) r g b / 0.22);
  --shadow-overlay: 0 2px 6px rgb(from var(--ink) r g b / 0.08), 0 28px 64px -14px rgb(from var(--ink) r g b / 0.32);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-glide: cubic-bezier(0.3, 1.28, 0.42, 1);
  --glass-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.9), inset 0 -10px 14px -12px rgb(from var(--ink) r g b / 0.1), inset 0 10px 14px -12px rgb(255 255 255 / 0.9),
    0 1px 2px rgb(from var(--ink) r g b / 0.07), 0 14px 30px -14px rgb(from var(--ink) r g b / 0.3);
  --page-gutter: 40px;
  --assistant-width: 400px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 400 0.9375rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
  accent-color: var(--accent);
}
:where(a:any-link) { color: var(--accent-deep); }
::selection { background: var(--accent-wash); color: var(--ink); }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-quiet); }
.icon { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon.ph { fill: currentColor; stroke: none; }
.icon .icon-solid { display: none; }
:is(.kind-mark, .side-brand, .roster-home, .fact, .note, .help-row, .guest) .icon { overflow: visible; }
:is(.kind-mark, .side-brand, .roster-home, .fact, .note, .help-row, .guest) .icon-solid { display: inline; fill: url(#icon-glass-fill); filter: drop-shadow(0 10px 9px rgb(from var(--accent-deep) r g b / 0.34)); }
:is(.kind-mark, .side-brand, .roster-home, .fact, .note, .help-row, .guest) .icon-two-tone path { fill: var(--accent); }
:is(.kind-mark, .side-brand, .roster-home, .fact, .note, .help-row, .guest) .icon-two-tone path[opacity] { opacity: 0.3; }
.brain-mark { width: 1.75rem; height: 1.53rem; flex: none; }
.brain-mark path { fill: none; stroke: currentColor; stroke-width: 0.9; stroke-linecap: round; opacity: 0.55; }
.brain-mark circle { fill: currentColor; }
.brain-mark .spark { fill: var(--brand-orange); }

.skip-link { position: absolute; top: 8px; left: 8px; z-index: 50; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 var(--page-gutter);
  background: rgb(from var(--wash) r g b / 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--accent-deep); text-decoration: none; }
.brand .brain-mark { color: var(--brand-blue); }
.brand span { font: 400 1.625rem/1 var(--display); letter-spacing: -0.01em; }
.main-nav { display: flex; gap: 2px; margin-right: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font-weight: 500; font-size: 0.875rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav-link.current { background: var(--current-wash); color: var(--ink); box-shadow: var(--shadow-rest); }
.nav-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-deep); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px 0 12px; min-width: 200px;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); color: var(--ink-quiet); font-size: 0.875rem;
  transition: border-color 160ms ease;
}
.search-label { margin-right: auto; }
kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); color: var(--ink-quiet); font: 500 0.6875rem/1.4 var(--text); }
.header-divider { width: 1px; height: 22px; background: var(--line); }
.profile-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; border: 0; border-radius: 999px; background: none; color: var(--ink-quiet); }
.staff-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.profile-menu {
  inset: 60px var(--page-gutter) auto auto; margin: 0; width: 260px; padding: 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-overlay);
}
.profile-menu strong { display: block; font-weight: 600; }
.profile-menu .menu-link { color: inherit; text-decoration: none; }
.profile-menu hr { margin: 12px 0 6px; border: 0; border-top: 1px solid var(--line); }
.profile-menu :is(button, .menu-link) { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }

main { padding: 36px var(--page-gutter) 120px; max-width: 1560px; margin: 0 auto; transition: padding-right 320ms var(--ease-out); }
.day-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.day-title h1 { font: 400 2.75rem/1.05 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.day-title p { margin-top: 8px; color: var(--ink-quiet); }
.date-tools { display: flex; align-items: center; gap: 8px; }
.date-arrows { display: flex; }
.date-arrows .icon-button:first-child { border-radius: var(--radius-control) 0 0 var(--radius-control); }
.date-arrows .icon-button:last-child { margin-left: -1px; border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.today-button, .secondary, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); font-weight: 500; font-size: 0.875rem;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.icon-button { width: 36px; padding: 0; color: var(--ink-soft); }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px;
  border: 1px solid var(--accent); border-radius: var(--radius-control); background: var(--accent); color: #fff; font-weight: 500; font-size: 0.875rem;
  box-shadow: 0 1px 2px rgb(from var(--accent-deep) r g b / 0.3), 0 6px 14px -6px rgb(from var(--accent-deep) r g b / 0.55);
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.inline-button {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; border: 0; background: none; color: var(--accent-deep); font-weight: 500; font-size: 0.875rem;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 160ms ease;
}
.inline-button .icon { width: 0.95rem; height: 0.95rem; transition: transform 200ms var(--ease-out); }
:is(.primary, .secondary, .today-button, .icon-button, .nav-link, .appointment):active { transform: scale(0.98); }
.date-picker { position: relative; overflow: hidden; cursor: pointer; }
.date-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.desk { display: grid; grid-template-columns: 336px minmax(0, 1fr); gap: 36px; align-items: start; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2, .activity-section h2 { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.01em; }
.quiet-count { margin-left: 4px; color: var(--ink-quiet); font-weight: 500; font-variant-numeric: tabular-nums; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--wash-deep); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segmented span { display: block; padding: 4px 11px; border-radius: 999px; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500; transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.segmented input:checked + span { background: var(--current-wash); color: var(--ink); box-shadow: var(--shadow-rest); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.schedule-section { position: sticky; top: 92px; }
.schedule { --time-column: 58px; position: relative; display: grid; gap: 2px; }
.schedule::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: calc(12px + var(--time-column) + 16px + 5px); top: 26px; bottom: 26px; width: 1px; background: var(--line-strong);
}
.glass-lens, .glass {
  --glass-frost: 1.5px;
  --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.5), rgb(245 251 252 / 0.16) 50%, rgb(from var(--accent-wash) r g b / 0.38));
  background: var(--glass-fill);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: var(--glass-shadow);
}
.glass-lens:not([data-refracts]), .glass:not([data-refracts]) {
  --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.66), rgb(255 255 255 / 0.44));
}
.glass-lens[data-refracts="true"], .glass[data-refracts="true"] {
  backdrop-filter: var(--lens-filter) blur(var(--glass-frost)) saturate(1.15) brightness(1.03);
}
.glass-lens::after, .glass::after {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgb(from var(--ink) r g b / 0.2), rgb(from var(--ink) r g b / 0.07) 38%, rgb(from var(--ink) r g b / 0.05) 62%, rgb(from var(--ink) r g b / 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.glass { position: relative; }
.slab { --slab-bevel: 9px; --slab-radius: 20px; position: relative; isolation: isolate; border-radius: var(--slab-radius); }
.slab::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.08) 44%, rgb(from var(--ink) r g b / 0.07));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.8), inset 2px 2px 1px -1px rgb(255 255 255 / 0.95), inset -2px -2px 1px -1px rgb(from var(--ink) r g b / 0.14);
  backdrop-filter: blur(1px);
}
.slab[data-refracts="true"]::before { backdrop-filter: var(--lens-filter); }
.slab::after {
  content: ""; position: absolute; inset: var(--slab-bevel); z-index: -1; border-radius: calc(var(--slab-radius) - var(--slab-bevel)); pointer-events: none;
  background: rgb(255 255 255 / 0.62); backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.75), 0 0 0 1px rgb(from var(--ink) r g b / 0.06);
}
.glass-lens {
  position: absolute; inset: 0 0 auto 0; z-index: 3; pointer-events: none; border-radius: 16px;
  transition: transform 440ms var(--ease-glide), height 320ms var(--ease-out), opacity 180ms ease;
}
.glass-field { isolation: isolate; }
.appointment {
  position: relative; z-index: 2; display: grid; grid-template-columns: var(--time-column) 11px minmax(0, 1fr); column-gap: 16px; align-items: start;
  width: 100%; padding: 14px 14px 14px 12px; border: 0; border-radius: 14px; background: none; text-align: left;
  transition: transform 140ms var(--ease-out);
}
.appt-time { display: grid; justify-items: end; font-variant-numeric: tabular-nums; line-height: 1.3; }
.appt-time b { font-weight: 600; font-size: 0.9375rem; }
.appt-time i { font-style: normal; font-size: 0.75rem; color: var(--ink-quiet); }
.appt-node {
  width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--ink-quiet); background: var(--paper);
  transition: box-shadow 200ms ease, transform 240ms var(--ease-out);
}
.appointment[data-tone="ready"] .appt-node { border-color: var(--ink); background: var(--ink); }
.appointment[data-tone="review"] .appt-node { border-color: var(--accent); }
.appointment[data-tone="missing"] .appt-node { border-color: var(--waiting); background: var(--waiting-wash); }
.appointment[aria-pressed="true"] .appt-node { box-shadow: none; transform: scale(1.18); }
.appointment[aria-pressed="true"] { z-index: 4; }
.appt-body { display: grid; gap: 1px; min-width: 0; }
.patient-name { font-weight: 600; font-size: 0.9375rem; }
.patient-description { color: var(--ink-quiet); font-size: 0.8125rem; }
.readiness { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 0.8125rem; font-weight: 500; }
.readiness .icon { width: 0.9rem; height: 0.9rem; }
.readiness.ready { color: var(--ink-quiet); }
.readiness.ready .icon { color: var(--confirmed); }
.readiness.review { color: var(--accent-deep); }
.readiness.missing { color: var(--waiting); }
.schedule-break { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 6px 14px 6px 12px; color: var(--ink-quiet); font-size: 0.75rem; }
.schedule-break::before { content: ""; width: var(--time-column); }
.schedule-break span { margin-left: 27px; padding: 1px 8px; border-radius: 999px; background: var(--wash); }
.schedule-footer { display: flex; align-items: center; gap: 7px; margin-top: 14px; padding-left: 12px; color: var(--ink-quiet); font-size: 0.75rem; }
.schedule-footer .icon { width: 0.9rem; height: 0.9rem; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 32px; align-items: start; }
.context-panel { container-type: inline-size; border-radius: var(--radius-paper); background: var(--paper); box-shadow: var(--shadow-raised); }
#context-content { padding: 30px 34px 34px; }
.patient-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.patient-identity h2 { font: 400 2.5rem/1.05 var(--display); letter-spacing: -0.015em; }
.patient-identity p { margin-top: 6px; color: var(--ink-quiet); font-variant-numeric: tabular-nums; }
.patient-next-action { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.patient-visit-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 22px; padding: 12px 0; border-block: 1px solid var(--line); }
.visit-detail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 500; font-size: 0.875rem; }
.context-pagination { display: flex; gap: 6px; margin-left: auto; }
.step-line { display: flex; align-items: center; gap: 0; color: var(--ink-quiet); font-size: 0.8125rem; }
.step { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.step + .step::before { content: ""; width: 26px; height: 1px; margin: 0 9px; background: var(--line-strong); }
.step-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--paper); }
.step.done { color: var(--ink-soft); }
.step.done .step-dot { border-color: var(--ink); background: var(--ink); }
.step.done + .step::before { background: var(--ink); }
.step.current { color: var(--accent-deep); font-weight: 600; }
.step.current .step-dot { border-color: var(--current-edge); background: var(--brand-orange); box-shadow: 0 0 0 3px var(--current-wash); }

.patient-tabs { display: flex; gap: 26px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.patient-tabs [role="tab"] { position: relative; padding: 10px 0 12px; border: 0; background: none; color: var(--ink-quiet); font-weight: 500; font-size: 0.9375rem; transition: color 160ms ease; }
.patient-tabs [role="tab"]::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 2px; border-radius: 2px; background: var(--current-edge); transform: scaleX(0); transition: transform 240ms var(--ease-out); }
.patient-tabs [aria-selected="true"] { color: var(--accent-deep); }
.patient-tabs [aria-selected="true"]::after { transform: scaleX(1); }
#patient-tabpanel { padding-top: 24px; outline-offset: 6px; }

.brief-lead { display: grid; gap: 6px; padding: 18px 20px; border-radius: 12px; background: var(--wash); }
.brief-lead.review { background: var(--accent-wash); }
.brief-lead.missing { background: var(--waiting-wash); }
.brief-lead h3 { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.brief-lead p { max-width: 62ch; font-size: 1.0625rem; line-height: 1.45; text-wrap: pretty; }
.follow-up-line { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding-top: 12px; border-top: 1px solid rgb(from var(--ink) r g b / 0.09); color: var(--ink-soft); font-size: 0.875rem; }
.brief-facts { margin-top: 10px; }
.brief-section { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.brief-section:last-of-type { border-bottom: 0; }
.brief-section h3 { font-size: 0.8125rem; font-weight: 600; color: var(--ink-quiet); padding-top: 2px; }
.brief-section p, .brief-section li { max-width: 66ch; color: var(--ink); text-wrap: pretty; }
.brief-section li + li { margin-top: 4px; }
@container (max-width: 620px) {
  .brief-section { grid-template-columns: 1fr; gap: 4px; }
}

.check-list { position: relative; display: grid; }
.check-list::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 26px; width: 1px; background: var(--line-strong); }
.check-item { position: relative; display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 16px; padding: 12px 0; }
.check-item > .icon { width: 21px; height: 21px; padding: 2px; border-radius: 50%; background: var(--paper); color: var(--confirmed); box-shadow: 0 0 0 3px var(--paper); }
.check-item.missing > .icon { color: var(--waiting); }
.check-item h3 { font-size: 0.9375rem; font-weight: 600; }
.check-item p { margin-top: 2px; max-width: 66ch; color: var(--ink-soft); font-size: 0.875rem; }
.check-item .inline-button { margin-top: 6px; }

.attention-rail { display: grid; gap: 34px; padding-top: 6px; }
.attention-item { padding: 14px 0; border-top: 1px solid var(--line); }
.attention-item:last-child { border-bottom: 1px solid var(--line); }
.attention-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.attention-item h3 { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.attention-item p { margin-top: 1px; color: var(--ink-soft); font-size: 0.875rem; }
.attention-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 0.8125rem; color: var(--ink-quiet); }
.owner { display: inline-flex; align-items: center; gap: 6px; }
.owner.is-you { padding: 1px 8px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-deep); font-weight: 600; }
.deadline { color: var(--waiting); font-weight: 500; font-variant-numeric: tabular-nums; }
.activity-list { position: relative; display: grid; gap: 16px; margin-top: 14px; }
.activity-list::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 16px; width: 1px; background: var(--line-strong); }
.activity-list li { position: relative; display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 12px; }
.activity-icon { display: grid; place-items: center; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; background: var(--wash); color: var(--confirmed); box-shadow: 0 0 0 3px var(--wash); }
.activity-icon .icon { width: 0.8rem; height: 0.8rem; stroke-width: 2; }
.activity-list p { font-size: 0.875rem; color: var(--ink); }
.activity-list small { color: var(--ink-quiet); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.activity-source { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--ink-quiet); font-size: 0.8125rem; }
.activity-source .brain-mark { width: 1.25rem; height: 1.1rem; }

.empty-state { display: grid; justify-items: center; gap: 6px; padding: 56px 24px; color: var(--ink-quiet); text-align: center; }
.empty-state .icon { width: 1.75rem; height: 1.75rem; margin-bottom: 6px; color: var(--line-strong); }
.empty-state h3 { font: 400 1.5rem/1.2 var(--display); color: var(--ink); }
.empty-state p { max-width: 36ch; }

.assistant-dock { position: fixed; right: 24px; bottom: 24px; z-index: 30; }
.assistant-launcher {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-raised);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}
.assistant-launcher:active { transform: scale(0.97); }
.launcher-mic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--wash); color: var(--ink-soft); }
.assistant-panel {
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(var(--assistant-width), calc(100vw - 32px)); height: min(640px, calc(100dvh - 120px));
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-overlay); overflow: hidden;
}
.assistant-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 18px; }
.assistant-header > div { display: flex; align-items: center; gap: 10px; }
.assistant-header strong { font-weight: 600; }
.assistant-header .icon-button { border-color: transparent; }
.assistant-context { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-block: 1px solid var(--line); background: var(--wash); color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500; }
.assistant-context .icon { width: 0.95rem; height: 0.95rem; }
.assistant-feed { display: flex; flex-direction: column; gap: 16px; padding: 20px 18px; overflow-y: auto; overscroll-behavior: contain; }
.assistant-greeting { margin-top: auto; font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; }
.assistant-examples { display: grid; gap: 6px; }
.assistant-examples button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); text-align: left; font-size: 0.875rem; transition: border-color 160ms ease, background-color 160ms ease; }
.assistant-examples .icon { color: var(--accent); }
.chat-message { display: grid; gap: 6px; max-width: 100%; }
.chat-message.user { justify-self: end; align-self: flex-end; max-width: 86%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: var(--paper); }
.chat-message p { text-wrap: pretty; }
.chat-context-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 0; border: 0; background: none; color: var(--accent-deep); font-size: 0.8125rem; font-weight: 600; }
.chat-context-link .icon { width: 0.9rem; height: 0.9rem; }
.assistant-composer { margin: 0 12px 12px; padding: 10px 10px 8px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper); transition: border-color 160ms ease, box-shadow 160ms ease; }
.assistant-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.assistant-composer textarea { display: block; width: 100%; min-height: 24px; padding: 0; border: 0; outline: 0; background: none; resize: none; }
.assistant-composer textarea::placeholder, input::placeholder, textarea::placeholder { color: var(--ink-quiet); }
.composer-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.composer-tools .icon-button { width: 32px; height: 32px; border-color: transparent; }
#voice-status { margin-right: auto; color: var(--ink-quiet); font-size: 0.8125rem; }
.send-button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; transition: transform 140ms var(--ease-out); }
.send-button:active { transform: scale(0.94); }

dialog {
  width: min(580px, calc(100vw - 32px)); max-height: min(86dvh, 780px); padding: 0; overflow: auto;
  border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-overlay);
}
dialog::backdrop { background: rgb(from var(--ink) r g b / 0.34); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 22px 0 28px; }
.dialog-header h2 { font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; }
.dialog-header .icon-button { border-color: transparent; }
.dialog-body { padding: 6px 28px 26px; }
.dialog-subtitle { color: var(--ink-quiet); font-variant-numeric: tabular-nums; }
.review-copy { margin-top: 18px; }
.review-copy h3 { margin-top: 18px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-quiet); }
.review-copy h3:first-child { margin-top: 0; }
.review-copy p, p.review-copy { margin-top: 3px; max-width: 64ch; text-wrap: pretty; }
.form-label { display: grid; gap: 6px; margin-top: 20px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.form-label :is(input, select, textarea) {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--paper);
  font-weight: 400; font-size: 0.9375rem; color: var(--ink); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.form-label textarea { min-height: 104px; resize: vertical; }
.form-label :is(input, select, textarea):focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.inline-notice { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--waiting-wash); color: var(--ink); font-size: 0.875rem; }
.inline-notice strong { color: var(--waiting); font-weight: 600; }
.modal-work-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.modal-work-item:first-child { margin-top: 10px; }
.modal-work-item h3 { font-size: 0.9375rem; font-weight: 600; }
.modal-work-item p { margin-top: 2px; color: var(--ink-soft); font-size: 0.875rem; }
.message-preview { margin-top: 16px; padding: 14px 16px; border-radius: 14px 14px 14px 4px; background: var(--wash); font-size: 1rem; line-height: 1.45; }
.connection-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.connection-row:first-of-type { margin-top: 16px; }
.connection-row strong { font-weight: 500; }
.connection-row span { color: var(--ink-quiet); }
dialog.search-dialog { margin-top: 14dvh; width: min(600px, calc(100vw - 32px)); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.search-field > .icon { color: var(--ink-quiet); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 1.0625rem; }
.search-field .icon-button { border-color: transparent; }
.search-hint { padding: 10px 20px 4px; color: var(--ink-quiet); font-size: 0.75rem; }
.search-results { display: grid; gap: 2px; padding: 4px 8px 10px; max-height: 46dvh; overflow-y: auto; }
.search-result { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 10px; background: none; text-align: left; }
.search-result strong { display: block; font-weight: 600; }
.search-result small { color: var(--ink-quiet); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.search-result > .icon { color: var(--ink-quiet); opacity: 0; transition: opacity 140ms ease, transform 200ms var(--ease-out); }
.search-result.active { background: var(--accent-wash); }
.search-result.active > .icon { opacity: 1; }
.patient-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--wash-deep); color: var(--ink-soft); font-size: 0.75rem; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; display: flex; align-items: center; gap: 9px; padding: 10px 16px 10px 12px;
  max-width: calc(100vw - 32px); border-radius: 18px; background: var(--ink); color: var(--paper); font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-overlay);
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 200ms ease, transform 260ms var(--ease-out);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #8fe0b8; }

@media (hover: hover) and (pointer: fine) {
  .nav-link:not(.current):hover { background: var(--wash-deep); color: var(--ink); }
  :is(.secondary, .today-button, .icon-button, .search-trigger):hover { border-color: var(--line-strong); background: var(--wash); }
  :is(.assistant-header, .dialog-header, .search-field, .composer-tools) .icon-button:hover { border-color: transparent; background: var(--wash-deep); }
  .primary:hover { background: var(--accent-deep); }
  .inline-button:hover { text-decoration-color: currentColor; }
  .inline-button:hover .icon { transform: translateX(2px); }
  .appointment:not([aria-pressed="true"]):hover { background: rgb(from var(--ink) r g b / 0.035); }
  .profile-menu :is(button, .menu-link):hover, .search-result:hover { background: var(--wash); }
  .assistant-examples button:hover { border-color: var(--line-strong); background: var(--wash); }
  .assistant-launcher:hover { box-shadow: var(--shadow-overlay); transform: translateY(-1px); }
}

@media (min-width: 1280px) {
  body.assistant-open main { padding-right: calc(var(--assistant-width) + 24px + var(--page-gutter)); }
  body.assistant-open .workspace { grid-template-columns: minmax(0, 1fr); }
  body.assistant-open .assistant-dock { top: 84px; bottom: 24px; }
  body.assistant-open .assistant-panel { height: 100%; }
}
@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .attention-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
@media (max-width: 900px) {
  :root { --page-gutter: 20px; }
  .desk { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .schedule-section { position: static; }
  .search-trigger { min-width: 0; }
  .search-label, .search-trigger kbd { display: none; }
}
@media (max-width: 760px) {
  .app-header { gap: 12px; height: 56px; }
  .brand span { display: none; }
  .main-nav { overflow-x: auto; scrollbar-width: none; }
  .nav-link { padding: 0 10px; }
  .header-divider { display: none; }
  main { padding-top: 22px; }
  .day-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .day-title h1 { font-size: 2.125rem; }
  .schedule { display: flex; gap: 8px; margin-inline: calc(var(--page-gutter) * -1); padding: 2px var(--page-gutter) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--page-gutter); scrollbar-width: none; }
  .schedule::before, .schedule .glass-lens, .schedule-break { display: none; }
  .glass-field::before { display: none; }
  .appointment { flex: 0 0 74%; scroll-snap-align: start; grid-template-columns: auto 11px minmax(0, 1fr); column-gap: 12px; border: 1px solid var(--line); background: var(--paper); }
  .appointment[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
  #context-content { padding: 22px 20px 24px; }
  .patient-identity h2 { font-size: 2rem; }
  .step-line { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .step + .step::before { width: 14px; margin: 0 6px; }
  .attention-rail { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .assistant-dock { right: 16px; bottom: 16px; }
  .assistant-launcher kbd { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .navigation-arrival, :is(.hub-page, .patient-page) dialog[open] { animation: navigation-arrive 180ms var(--ease-out); }
  :is(.hub-page, .patient-page) dialog[open]::backdrop { animation: backdrop-arrive 140ms ease-out; }
}
@keyframes backdrop-arrive { from { opacity: 0; } }
@keyframes navigation-arrive {
  from { transform: translate(var(--navigation-x, 0px), var(--navigation-y, 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
