:root { --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; --text: "Lora", Georgia, serif; }
.hub-page {
  --current-lens: linear-gradient(135deg, color-mix(in srgb, var(--brand-orange) 68%, white), var(--brand-orange));
  --control-tint: color-mix(in srgb, var(--brand-blue) 30%, var(--paper));
  --orb-fallback: radial-gradient(circle at 33% 23%, #fff, var(--accent-wash) 26%, var(--brand-blue) 70%, var(--accent-deep));
  --roster-width: 316px; --roster-inset: 12px; --ease-glide: cubic-bezier(0.22, 1, 0.36, 1); }
.notify-menu { width: 280px; }
.switch-row { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; cursor: pointer; }
.switch-row input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch-row i { position: relative; width: 36px; height: 22px; border-radius: 999px; background: var(--line-strong); transition: background-color 200ms ease; }
.switch-row i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgb(from var(--ink) r g b / 0.3); transition: transform 220ms var(--ease-out); }
.switch-row input:checked + i { background: var(--accent); }
.switch-row input:checked + i::after { transform: translateX(14px); }
.switch-row input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.hub { display: grid; grid-template-columns: calc(var(--roster-width) + var(--roster-inset)) minmax(0, 1fr); align-items: start; }

.side {
  position: sticky; top: var(--roster-inset); display: flex; flex-direction: column; gap: 10px;
  height: calc(100dvh - var(--roster-inset) * 2); margin: var(--roster-inset) 0 var(--roster-inset) var(--roster-inset);
}
.side-brand { padding: 13px 14px 13px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.roster {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; flex: 1; min-height: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--paper);
}
.roster-top { padding: 16px 16px 10px; }
.roster-brand { display: flex; align-items: center; justify-content: space-between; }
.roster-brand .icon-button { width: 34px; height: 34px; border-color: transparent; border-radius: 50%; background: none; }
.roster-home {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none;
  color: var(--ink); font-weight: 600; text-align: left; transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.roster-nav { display: flex; }
.roster-nav .roster-home { flex: 1 1 auto; justify-content: center; gap: 7px; height: 38px; padding: 0 10px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; }
.roster-nav [data-icon], .roster-nav .nav-total { display: none; }
.roster-nav .roster-home[aria-current="page"] { z-index: 4; color: var(--ink); }
.roster-nav .roster-home[aria-current="page"] .nav-count { background: var(--ink); color: var(--paper); }
.roster-nav .roster-home .nav-count, .roster-nav .nav-total { margin-left: 0; padding-right: 0; }
.roster-home .nav-count, .nav-total { margin-left: auto; }
.nav-total { padding-right: 6px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.roster-home:active, .roster-row:active { transform: scale(0.985); }
.roster-search {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); color: var(--ink-quiet);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.roster-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.roster-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 0.875rem; }
.roster-search input::-webkit-search-cancel-button { display: none; }
.roster-list { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 20px; }
.roster-list .glass-lens { inset: 0 14px auto 14px; border-radius: 14px; }
.roster-foot { padding: 8px 14px 16px; }
.schedule-only-admin :is(#home-button, #orders-button, #calls-button, .roster-top, .roster-list, #assistant-orb) { display: none; }
.schedule-only-admin .roster-foot { grid-row: 3; }
.roster-profile { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--ink-quiet); text-align: left; transition: background-color 160ms ease; }
.roster-who { display: grid; min-width: 0; }
.roster-who strong { color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.roster-who small { color: var(--ink-quiet); font-size: 0.75rem; }
#profile-menu { inset: auto auto 86px 26px; width: 312px; }
.surface-row + .surface-row { margin-top: 8px; }
#notify-menu { inset: 66px auto auto 26px; }
.surface-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 0; }
.profile-menu .pill-switch button { display: inline-block; width: auto; text-align: center; }

.roster-group + .roster-group { margin-top: 18px; }
.roster-group h2 { display: flex; justify-content: space-between; padding: 6px 12px; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; }
.roster-group h2 span { font-weight: 500; }
.roster-row {
  display: grid; grid-template-columns: 11px minmax(0, 1fr); column-gap: 13px; align-items: start; width: 100%; padding: 10px 12px;
  border: 0; border-radius: 12px; background: none; text-align: left; transition: background-color 140ms ease, transform 140ms var(--ease-out);
}
.node { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--ink-quiet); background: var(--paper); flex: none; }
.node[data-tone="handled"] { width: 7px; height: 7px; margin: 7px 2px 0; border: 0; background: var(--line-strong); }
.node[data-tone="decide"] { border-color: var(--accent); }
.node[data-tone="blocked"] { border-color: var(--waiting); background: var(--waiting-wash); }
.node[data-tone="urgent"] { border-color: var(--failed); background: var(--failed); box-shadow: 0 0 0 3px rgb(from var(--failed) r g b / 0.16); }
.roster-name { display: block; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-line { display: block; color: var(--ink-quiet); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-line[data-tone="decide"] { color: var(--accent-deep); font-weight: 500; }
.roster-line[data-tone="blocked"] { color: var(--waiting); font-weight: 500; }
.roster-line[data-tone="urgent"] { color: var(--failed); font-weight: 600; }
.roster-empty { padding: 28px 12px; color: var(--ink-quiet); font-size: 0.875rem; text-align: center; }

.stage { min-width: 0; max-width: none; margin: 0; padding: var(--roster-inset) clamp(20px, 2.4vw, 40px) 120px; container-type: inline-size; }
#stage { outline: 0; }
.stage-inner { max-width: 1480px; margin: 0 auto; }
.stage-title { font: 400 2.75rem/1.05 var(--display); letter-spacing: -0.015em; text-wrap: balance; }

.home-grid, .case-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 26cqw, 380px); gap: 24px; align-items: start; }
.case-main, .case-side, .home-side { display: grid; gap: 16px; min-width: 0; }
.pane { padding: 24px 26px; border-radius: var(--radius-paper); background: var(--paper); box-shadow: var(--shadow-rest); }
.pane-title { font: 400 1.5rem/1.15 var(--display); letter-spacing: -0.01em; }
.pane-sub { margin-top: 4px; color: var(--ink-quiet); font-size: 0.875rem; }
.queue-head { padding: 22px 24px 14px; background: linear-gradient(105deg, rgb(from var(--brand-blue) r g b / 0.1), transparent 55%, rgb(from var(--brand-orange) r g b / 0.14)); }
.head-counts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; color: var(--ink-soft); font-size: 0.9375rem; }
.head-counts:empty { display: none; }
.head-counts b { margin-left: 7px; color: var(--ink); font-weight: 600; }
.queue-list { position: relative; padding: 0 8px 8px; }
.queue-lens { border-radius: 13px; opacity: 0; }
.queue-row:is(:hover, :focus-visible) { z-index: 4; }
.queue { border-radius: var(--radius-paper); background: var(--paper); box-shadow: var(--shadow-raised); overflow: hidden; }
.queue-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 16px; align-items: start; width: 100%; padding: 15px 16px;
  position: relative; z-index: 2; border: 0; border-radius: 13px; background: none; text-align: left;
}
.kind-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(2px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.2), inset 0 0 0 2.5px rgb(255 255 255 / 0.9), inset 0 0 0 7px rgb(255 255 255 / 0.1); color: var(--ink-soft);
}
.kind-mark .icon { width: 21px; height: 21px; }
.kind-mark[data-tone="urgent"] { background: rgb(from var(--failed) r g b / 0.14); box-shadow: inset 0 0 0 1.5px rgb(from var(--failed) r g b / 0.62), inset 0 0 0 3px rgb(255 255 255 / 0.82); }
.kind-mark[data-tone="urgent"] .icon .icon-two-tone path { fill: var(--failed); }
.queue-kind { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-quiet); }
.queue-kind[data-tone="decide"] { color: var(--accent-deep); }
.queue-kind[data-tone="blocked"] { color: var(--waiting); }
.queue-kind[data-tone="urgent"] { color: var(--failed); }
.queue-row h3 { margin-top: 1px; font-size: 1rem; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.queue-row p { margin-top: 2px; color: var(--ink-soft); font-size: 0.875rem; }
.queue-row p b { color: var(--ink); font-weight: 600; }
.queue-side { display: grid; justify-items: end; gap: 6px; padding-top: 2px; white-space: nowrap; }
.due { color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.due[data-tone="urgent"] { color: var(--failed); font-weight: 600; }
.due[data-tone="blocked"], .due[data-tone="decide"] { color: var(--waiting); }
.queue-open { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-deep); font-size: 0.875rem; font-weight: 500; }
.queue-open .icon { width: 0.95rem; height: 0.95rem; transition: transform 200ms var(--ease-out); }
.queue-owner { color: var(--ink-quiet); font-size: 0.8125rem; }
.queue-clear { display: grid; justify-items: center; gap: 6px; padding: 56px 24px; text-align: center; color: var(--ink-quiet); }
.queue-clear h3 { font: 400 1.75rem/1.2 var(--display); color: var(--ink); }

.flow-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 52px 0 18px; }
.flow-heading h2 { font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; }
.flow-heading p { color: var(--ink-quiet); font-size: 0.875rem; }
.flow { display: grid; margin: 14px -10px -6px; }
.flow-step {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 10px; background: none; text-align: left; transition: background-color 140ms ease;
}
.flow-step .icon { align-self: center; width: 0.875rem; height: 0.875rem; color: var(--ink-quiet); transition: transform 220ms var(--ease-out); }
.flow-step[aria-expanded="true"] .icon { transform: rotate(90deg); }
.flow-step:disabled .icon { visibility: hidden; }
.flow-count { font: 400 1.5rem/1 var(--display); font-variant-numeric: lining-nums; }
.flow-step:disabled .flow-count { color: var(--ink-quiet); }
.flow-label { color: var(--ink); font-size: 0.9375rem; font-weight: 500; }
.flow-people { display: grid; padding: 0 0 8px 12px; }
.flow-people .roster-row, .ask-people .roster-row { padding: 7px 10px; }
.done-list { margin-bottom: 4px; }
.done-list b { display: block; color: var(--ink); font-weight: 600; }
.thread-event b { color: var(--ink-soft); font-weight: 600; }
.done-entry { padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: inherit; text-align: left; }
.done-list li > span { color: var(--ink-soft); }
.done-toggle, .contact-more { margin-top: 14px; }

.day { max-width: 1040px; }
.day:is([data-range="week"], [data-range="month"]) { max-width: 1240px; }
.week-steps { display: flex; gap: 4px; }
.week-steps .icon-button { width: 36px; height: 36px; border-color: transparent; border-radius: 50%; background: rgb(255 255 255 / 0.7); box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.08); }
.week-steps .icon-button:disabled { opacity: 0.4; }
.week-steps .icon { width: 1rem; height: 1rem; }
.week-scroll { overflow-x: auto; padding: 4px 16px 18px 8px; }
.week { --hour: 60px; min-width: 720px; }
.week-head, .week-body { display: grid; grid-template-columns: 52px var(--day-columns); }
.week-day { display: flex; align-items: center; gap: 7px; margin: 0 4px 6px 2px; padding: 4px 8px 4px 6px; border: 0; border-radius: 999px; background: none; justify-self: start; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; transition: background-color 140ms ease; }
.week-day b { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; color: var(--ink); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.week-day[data-today] { color: var(--accent-deep); }
.week-day[data-today] b { background: var(--brand-orange); color: var(--ink); }
.week-hours { display: grid; grid-auto-rows: var(--hour); }
.week-hours span { padding-right: 10px; color: var(--ink-quiet); font-size: 0.6875rem; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; translate: 0 -0.5em; }
.week-column {
  position: relative; height: calc(var(--hours) * var(--hour)); border-left: 1px solid rgb(from var(--ink) r g b / 0.08);
  background: linear-gradient(rgb(from var(--ink) r g b / 0.08) 1px, transparent 1px) 0 0 / 100% var(--hour);
}
.week-column[data-today] { background-color: rgb(from var(--brand-blue) r g b / 0.045); }
.visit-block {
  position: absolute; left: 4px; right: 4px; display: grid; grid-template-columns: 8px minmax(0, 1fr); column-gap: 6px; align-content: start; padding: 4px 8px;
  border: 0; border-radius: 9px; background: rgb(255 255 255 / 0.86); box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.09), 0 1px 2px rgb(from var(--ink) r g b / 0.06);
  text-align: left; overflow: hidden; transition: transform 140ms var(--ease-out), box-shadow 180ms ease;
}
.visit-block:active { transform: scale(0.98); }
.visit-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 2; }
.visit-block .node, .visit-chip .node { width: 8px; height: 8px; margin: 5px 0 0; border-width: 2px; }
.visit-chip .node { margin: 0; }
.node[data-tone="ready"] { border-color: var(--confirmed); background: var(--confirmed-wash); }
.node[data-tone="live"] { border-color: var(--accent); background: var(--accent); }
:is(.visit-block, .visit-chip) .node:is([data-tone="handled"], [data-tone="held"]) { border: 0; background: var(--line-strong); }
.visit-block-name { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-block-line { grid-column: 2; color: var(--ink-soft); font-size: 0.75rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-block[data-tone="blocked"] { background: var(--waiting-wash); }
.visit-block:is([data-tone="decide"], [data-tone="live"]) { background: var(--accent-wash); }
.visit-block[data-tone="urgent"] { background: #fbe7e4; }
.visit-block[data-tone="held"] { background: rgb(from var(--ink) r g b / 0.05); box-shadow: none; }
.visit-block[data-tone="held"] .visit-block-name { color: var(--ink-quiet); font-weight: 500; }
.month { min-width: 720px; }
.month-head, .month-week { display: grid; grid-template-columns: repeat(var(--days,5), minmax(0, 1fr)); }
.month-head span { padding: 0 0 8px 12px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.month-week { border-top: 1px solid rgb(from var(--ink) r g b / 0.08); }
.month-day { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 138px; padding: 6px 6px 10px; border-left: 1px solid rgb(from var(--ink) r g b / 0.08); }
.month-day:first-child { border-left-color: transparent; }
.month-day[data-today] { background: rgb(from var(--brand-blue) r g b / 0.05); }
.month-date {
  justify-self: start; display: grid; place-items: center; min-width: 26px; height: 26px; margin-bottom: 2px; padding: 0 6px; border: 0; border-radius: 999px; background: none;
  font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color 140ms ease;
}
.month-day[data-today] .month-date { background: var(--brand-orange); color: var(--ink); }
.month-day[data-outside] .month-date { color: var(--ink-quiet); font-weight: 500; }
.visit-chip {
  display: grid; grid-template-columns: 8px auto minmax(0, 1fr); align-items: center; column-gap: 6px; min-width: 0; height: 25px; padding: 0 8px;
  border: 0; border-radius: 8px; background: rgb(255 255 255 / 0.86); box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.09); font-size: 0.75rem; text-align: left;
  transition: transform 140ms var(--ease-out), box-shadow 180ms ease;
}
.visit-chip:active { transform: scale(0.98); }
.visit-chip time { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.visit-chip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-chip[data-tone="blocked"] { background: var(--waiting-wash); }
.visit-chip:is([data-tone="decide"], [data-tone="live"]) { background: var(--accent-wash); }
.visit-chip[data-tone="urgent"] { background: #fbe7e4; }
.visit-chip[data-tone="held"] { background: rgb(from var(--ink) r g b / 0.05); box-shadow: none; }
.visit-chip[data-tone="held"] b { color: var(--ink-quiet); font-weight: 500; }
.month-more { justify-self: start; padding: 2px 8px; border: 0; background: none; color: var(--accent-deep); font-size: 0.75rem; font-weight: 500; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.62);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 -5px 7px -7px rgb(from var(--ink) r g b / 0.16), 0 0 0 1px rgb(from var(--ink) r g b / 0.08), 0 4px 8px -6px rgb(from var(--ink) r g b / 0.3);
  color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500; transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.filter-chip:active { transform: scale(0.97); }
.filter-count { color: var(--ink-quiet); }
.filter-count:empty { display: none; }
.filter-chip .icon { width: 0.875rem; height: 0.875rem; margin-right: -3px; }
.filter-chip[aria-pressed="true"] {
  background: rgb(from var(--control-tint) r g b / 0.6); color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), inset 0 -5px 7px -7px rgb(from var(--accent-deep) r g b / 0.3), 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.42), 0 5px 10px -6px rgb(from var(--accent-deep) r g b / 0.5);
}
.filter-chip[aria-pressed="true"] .filter-count { color: var(--accent-deep); }
.filter-kinds { position: relative; }
.filter-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 12; display: grid; width: 272px; max-height: min(440px, 62dvh); overflow-y: auto; overscroll-behavior: contain; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow-overlay); transform-origin: top left; animation: menu-in 180ms var(--ease-out);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.filter-menu button { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 0.875rem; text-align: left; }
.filter-menu .node { margin: 0; }
.filter-menu .icon { width: 1rem; height: 1rem; color: var(--accent); opacity: 0; }
.filter-menu [data-empty]:not([aria-checked="true"]) { color: var(--ink-quiet); }
.filter-menu [aria-checked="true"] { font-weight: 600; }
.filter-menu [aria-checked="true"] .icon { opacity: 1; }
.filter-shown { margin-top: 8px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.filter-shown:empty { display: none; }
@media (min-width: 901px) {
  .stage:has(.thread-pane) { padding-bottom: var(--roster-inset); }
  .thread-pane { grid-template-rows: auto minmax(0, 1fr) auto; height: calc(100dvh - var(--pane-top, 200px) - var(--roster-inset)); min-height: 380px; }
  .thread-pane .thread { overflow-y: auto; overscroll-behavior: contain; margin-right: -12px; padding-right: 12px; }
  .stage:has(.home-grid, .orders-pane) { padding-bottom: var(--roster-inset); }
  :is(.home-grid .queue, .orders-pane) { position: sticky; top: var(--roster-inset); display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - var(--roster-inset) * 2 - 56px); }
  :is(.home-grid, .orders-pane) .queue-list { overflow-y: auto; overscroll-behavior: contain; }
}

.week-now { position: absolute; left: 0; right: 0; z-index: 1; height: 1.5px; background: var(--accent); pointer-events: none; }
.week-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.visit-row { grid-template-columns: 74px minmax(0, 1fr) auto; }
.visit-time { padding-top: 1px; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.visit-time small { margin-left: 4px; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 500; }
.visit-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 9px; color: var(--ink-soft); font-size: 0.8125rem; }
.visit-checks span { display: inline-flex; align-items: center; gap: 5px; }
.visit-checks .icon { width: 0.9rem; height: 0.9rem; color: var(--confirmed); }
.visit-checks [data-state="needs"] { color: var(--waiting); font-weight: 600; }
.visit-checks [data-state="needs"] .icon { color: var(--waiting); }
.visit-status { color: var(--ink-quiet); font-size: 0.875rem; font-weight: 500; }
.visit-status[data-tone="ready"] { color: var(--confirmed); }
.visit-status[data-tone="live"], .visit-status[data-tone="decide"] { color: var(--accent-deep); }
.visit-status[data-tone="blocked"] { color: var(--waiting); }
.visit-status[data-tone="urgent"] { color: var(--failed); font-weight: 600; }
.visit-row[data-status="held"] :is(h3, .visit-time) { color: var(--ink-quiet); }
.now-line { display: flex; align-items: center; gap: 12px; padding: 8px 16px; color: var(--accent-deep); font-size: 0.75rem; font-weight: 600; }
.now-line::after { content: ""; flex: 1; height: 1px; background: var(--brand-orange); }

.case-hero-brief { margin-bottom: 16px; }
.orders-pane { max-width: 1240px; }
.order-search { width: min(300px, 100%); height: 42px; border-radius: 999px; }
.order-group-row { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 16px; }
.order-patient { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.order-patient b { font-size: 1rem; font-weight: 600; }
.order-patient span { color: var(--ink-quiet); font-size: 0.875rem; }
.order-patient .queue-open { margin-left: auto; color: var(--accent-deep); }
.order-rows { display: grid; gap: 8px; }
.intake-section .order-rows { margin-top: 12px; }
.order-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 18px; align-items: center; font-size: 0.875rem; }
.intake-section .order-row { grid-template-columns: 110px minmax(0, 1fr); }
.intake-section .order-note { grid-column: 2; }
@container (max-width: 1000px) {
  .order-row { grid-template-columns: 110px minmax(0, 1fr); }
  .order-note { grid-column: 2; }
}
.order-test { font-weight: 600; }
.order-track { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.05fr) minmax(0, 1.85fr) minmax(0, 1.85fr); border-radius: 999px; background: rgb(from var(--ink) r g b / 0.05); box-shadow: inset 0 1px 2px rgb(from var(--ink) r g b / 0.1); }
.order-fill { grid-row: 1; grid-column: 1 / span var(--reached); border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-rest); }
.order-track i { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 4px; color: var(--ink-quiet); font-size: 0.75rem; font-style: normal; font-weight: 500; white-space: nowrap; }
.order-track i { grid-row: 1; }
.order-track i:nth-of-type(1) { grid-column: 1; }
.order-track i:nth-of-type(2) { grid-column: 2; }
.order-track i:nth-of-type(3) { grid-column: 3; }
.order-track i:nth-of-type(4) { grid-column: 4; }
.order-track .icon { flex: none; width: 0.8rem; height: 0.8rem; }
.order-track i[data-cell="reached"] { color: var(--confirmed); font-weight: 600; }
.order-track i[data-cell="stuck"] { color: var(--waiting); font-weight: 600; }
.order-note { grid-column: 2; color: var(--ink-soft); text-wrap: pretty; }
.order-note b { display: block; color: var(--waiting); font-weight: 600; }
.order-failure { display: flex; align-items: flex-start; gap: 8px; color: var(--waiting); font-size: 0.875rem; font-weight: 600; text-align: left; text-wrap: pretty; }
.order-failure .icon { flex: none; width: 1rem; height: 1rem; margin-top: 2px; }
.tests-pane .test-orders > :first-child { margin-top: 14px; }
.test-orders > * + * { margin-top: 18px; }
.test-orders > .order-rows { gap: 18px; }
.test-order { display: grid; gap: 6px; }
.test-order-detail { padding-left: 128px; }
.test-order-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-quiet); font-size: 0.8125rem; }
.test-order-detail > .need-actions { margin-top: 10px; }
.test-order-detail > .need-actions .secondary { height: 32px; padding: 0 12px; font-size: 0.8125rem; }
.test-order-form .room-heading { font-size: 1.25rem; }
.test-order-form .brief-note { margin-top: 0; font-size: 0.875rem; }
.test-order-form .need-actions { margin-top: 0; }
.test-reports { margin-top: 0; }
.test-reports .meta-detail { margin-top: 2px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 400; }
.test-followup-line { margin-top: 14px; }
.test-followup-line .order-note { font-size: 0.875rem; }
.test-followup-line .need-actions { margin-top: 10px; }
.test-followup-line.step-state { display: flex; white-space: normal; }
.note-pane { min-height: calc(100dvh - var(--roster-inset) * 2 - 60px); }
.note-text { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid rgb(from var(--ink) r g b / 0.14); border-radius: 12px; outline: 0; background: rgb(255 255 255 / 0.72); color: var(--ink); font: inherit; font-size: 0.9375rem; line-height: 1.55; resize: vertical; field-sizing: content; min-height: 5.5em; transition: border-color 160ms ease, box-shadow 160ms ease; }
.note-text:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.note-text[readonly] { border-color: transparent; background: rgb(from var(--ink) r g b / 0.04); }
.note-list { display: grid; gap: 6px; margin-top: 10px; padding-left: 18px; list-style: disc; color: var(--ink); font-size: 0.9375rem; }
.note-actions { margin-top: 28px; }
.after-side { grid-template-rows: auto minmax(0, 1fr); gap: 4px; }
.after-heading { margin-top: 18px; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 600; }
.sent-text { display: grid; gap: 4px; justify-items: end; margin-top: 10px; }
.sent-text p { max-width: 100%; padding: 11px 14px; border-radius: 18px 18px 6px 18px; background: var(--accent-wash); font-size: 0.875rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.sent-states { display: flex; justify-content: flex-end; gap: 14px; margin-top: 8px; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 500; }
.sent-states span { display: inline-flex; align-items: center; gap: 4px; transition: color 240ms ease; }
.sent-states span[data-reached] { color: var(--confirmed); font-weight: 600; }
.sent-states .icon { width: 0.8rem; height: 0.8rem; }
.brief-note { margin-top: 8px; max-width: 62ch; color: var(--ink-soft); font-size: 0.9375rem; text-wrap: pretty; }
.brief-prompts { margin-top: 14px; }
.intake-section .step-detail { margin-top: 12px; }
.thread-needs li { display: grid; gap: 2px; font-size: 0.875rem; font-weight: 500; }
.ask-lines { display: grid; gap: 6px; padding-left: 16px; list-style: disc; font-size: 0.875rem; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 30cqw, 430px); gap: 16px; align-items: start; }
.room-stage { min-width: 0; }
.room-video {
  position: relative; height: calc(100dvh - var(--roster-inset) * 2 - 60px); min-height: 440px; border-radius: 24px; background: var(--ink); color: #fff;
  overflow: hidden; box-shadow: 0 2px 6px rgb(from var(--ink) r g b / 0.2), 0 30px 60px -26px rgb(from var(--ink) r g b / 0.7);
}
.room-video { display: grid; place-items: center; }
.room-remote { display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.room-avatar { display: grid; place-items: center; width: 132px; height: 132px; margin-bottom: 6px; border-radius: 50%; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24); font: 400 3rem/1 var(--display); }
.room-remote p { font-size: 1.125rem; font-weight: 500; }
.room-remote small { color: rgb(255 255 255 / 0.62); font-size: 0.8125rem; }
.room-top { position: absolute; top: 18px; left: 18px; }
.room-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: rgb(255 255 255 / 0.13); backdrop-filter: blur(10px); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.room-chip i { width: 8px; height: 8px; border-radius: 50%; background: #ff8a7d; animation: live-pulse 1.4s ease-in-out infinite; }
.room-self {
  position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: clamp(140px, 19%, 230px); aspect-ratio: 4 / 3; border-radius: 16px; background: var(--ink-soft);
  overflow: hidden; box-shadow: 0 0 0 1px var(--brand-orange), 0 14px 26px -10px rgb(0 0 0 / 0.6); font-weight: 600;
}
.room-self video { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.room-self[data-live] video { display: block; }
.room-controls {
  position: absolute; left: 50%; bottom: 20px; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgb(255 255 255 / 0.1); translate: -50% 0;
  backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.34), inset 0 0 0 2.5px rgb(255 255 255 / 0.07);
}
.room-controls button { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 14px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 0.875rem; font-weight: 600; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.room-controls button:active { transform: scale(0.95); }
.room-controls button[aria-pressed="false"] { background: #fff; color: var(--ink); }
.room-controls .room-end { padding: 0 22px; background: #d2382f; }
.room-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.room-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; height: calc(100dvh - var(--roster-inset) * 2 - 60px); min-height: 440px; }
.room-side .pill-switch, .order-other .pill-switch { justify-self: start; }
.room-panel { overflow-y: auto; overscroll-behavior: contain; margin-right: -12px; padding-right: 12px; }
.room-panel > .intake-summary:first-child { margin-top: 0; font-size: 1rem; }
.room-heading { font: 400 1.5rem/1.15 var(--display); letter-spacing: -0.01em; }
.room-panel .step-detail { margin-top: 14px; }
.room-panel > .primary, .room-panel > .secondary { margin-top: 16px; }
.room-panel .order-row { grid-template-columns: minmax(0, 1fr); }
.room-panel .order-note { grid-column: 1; }
.room-panel .test-order-detail { padding-left: 0; }
.room-panel .order-track { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 0.85fr); border-radius: 14px; }
.room-panel .order-track i { flex-direction: column; min-width: 0; height: auto; min-height: 62px; padding: 6px 2px; gap: 2px; white-space: normal; text-align: center; font-size: 0.6875rem; }
.room-panel .order-track .order-fill { border-radius: 14px; }
.primary:disabled { opacity: 0.45; box-shadow: none; }
.order-form { display: grid; gap: 12px; margin-top: 16px; }
.order-form .primary { justify-self: start; margin-top: 4px; }
.order-form .need-actions .primary { margin-top: 0; }
.order-check { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgb(255 255 255 / 0.66); box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.1); font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.order-check input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.order-check i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px rgb(from var(--ink) r g b / 0.3); color: transparent; transition: background-color 180ms ease, box-shadow 180ms ease; }
.order-check .icon { width: 14px; height: 14px; }
.order-check input:checked + i { background: var(--accent); box-shadow: none; color: #fff; }
.order-check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.order-other { display: grid; gap: 6px; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500; }
.order-other input { height: 42px; padding: 0 12px; border: 1px solid rgb(from var(--ink) r g b / 0.16); border-radius: 12px; outline: 0; background: rgb(255 255 255 / 0.74); color: var(--ink); font-size: 0.9375rem; font-weight: 400; transition: border-color 160ms ease, box-shadow 160ms ease; }
.order-other input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.slot-list { display: grid; gap: 8px; margin: 16px 0 0; }
.slot-list button { padding: 12px 14px; border: 0; border-radius: 12px; background: rgb(255 255 255 / 0.66); box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.1); font-size: 0.9375rem; font-weight: 500; text-align: left; transition: background-color 160ms ease, box-shadow 160ms ease; }
.slot-list button[aria-pressed="true"] { background: var(--accent-wash); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-deep); }
.live-state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: 0.35; transform: scale(0.8); } }
.live-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.live-talk, .live-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: calc(100dvh - var(--roster-inset) * 2 - 60px); min-height: 440px; }
.live-form { grid-template-rows: auto minmax(0, 1fr); }
.live-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.live-state { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: rgb(from var(--ink) r g b / 0.06); color: var(--ink-soft); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-state[data-state="live"], .live-state[data-state="ringing"] { background: #fbe7e4; color: var(--failed); }
.live-thread { overflow-y: auto; overscroll-behavior: contain; margin-right: -12px; padding: 4px 12px 8px 0; }
.live-thread > :first-child { margin-top: auto; }
.live-thread .message { animation: message-in 260ms var(--ease-out) both; }
.live-thread .message[data-speaking] p::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.15em; background: currentColor; animation: live-caret 900ms steps(1) infinite; }
@keyframes live-caret { 50% { opacity: 0; } }
.live-saved { display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; color: var(--confirmed); font-size: 0.75rem; font-weight: 600; animation: glass-arrive 300ms ease both; }
.live-saved .icon { flex: none; width: 0.85rem; height: 0.85rem; }
.live-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.live-dots { display: inline-flex; gap: 3px; margin-right: 2px; }
.live-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-quiet); animation: ask-think 900ms ease-in-out infinite; }
.live-dots i:nth-child(2) { animation-delay: 150ms; }
.live-dots i:nth-child(3) { animation-delay: 300ms; }
.live-form-body { overflow: hidden auto; overscroll-behavior: contain; margin: 0 -12px; padding: 0 12px 4px; isolation: isolate; container-type: inline-size; }
@container (max-width: 470px) {
  .live-field { grid-template-columns: minmax(0, 1fr); }
}
.live-section + .live-section { margin-top: 30px; }
.live-section h3 { padding-bottom: 8px; font: 400 1.375rem/1.2 var(--display); letter-spacing: -0.01em; }
.live-field { position: relative; display: grid; grid-template-columns: minmax(130px, 230px) minmax(0, 1fr); gap: 6px 24px; align-items: start; padding: 12px 0; border-top: 1px solid rgb(from var(--ink) r g b / 0.08); }
.live-field::before { content: ""; position: absolute; inset: 3px -8px; z-index: -1; border-radius: 12px; background: rgb(from var(--brand-blue) r g b / 0.1); opacity: 0; transition: opacity 1400ms ease; }
.live-field[data-fresh]::before { opacity: 1; transition-duration: 160ms; }
.live-field[data-fresh], .live-field[data-fresh] + .live-field { border-top-color: transparent; }
.live-label { color: var(--ink-quiet); font-size: 0.875rem; line-height: 1.45; text-wrap: pretty; }
.live-note { margin-left: 8px; color: var(--waiting); font-size: 0.75rem; font-style: normal; font-weight: 600; white-space: nowrap; }
.live-value { min-height: 1.45em; color: var(--ink); font-size: 0.9375rem; font-weight: 500; line-height: 1.45; }
.live-field[data-state="empty"] .live-value::before { content: "Not asked yet"; color: rgb(from var(--ink) r g b / 0.3); font-weight: 400; }
.live-options { display: flex; flex-wrap: wrap; gap: 6px; }
.live-options i { padding: 3px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.12); color: var(--ink-quiet); font-size: 0.8125rem; font-style: normal; transition: background-color 260ms ease, color 260ms ease, box-shadow 260ms ease; }
.live-options i[data-chosen] { background: var(--accent); box-shadow: none; color: #fff; font-weight: 500; }
.live-checks { display: grid; gap: 8px; padding-top: 1px; }
.live-checks i { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--ink-quiet); font-size: 0.875rem; font-style: normal; line-height: 1.45; }
.live-checks .icon { width: 16px; height: 16px; margin-top: 2px; padding: 2px; border-radius: 5px; box-shadow: inset 0 0 0 1.25px rgb(from var(--ink) r g b / 0.2); color: transparent; transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease, scale 260ms var(--ease-glide); }
.live-checks i[data-chosen] { color: var(--ink); font-weight: 500; }
.live-checks i[data-chosen] .icon { background: var(--accent); box-shadow: none; color: #fff; }
.live-field[data-fresh] :is(.live-checks, .live-options) i[data-chosen] .icon { scale: 1.18; }
.live-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.live-table th { padding: 0 10px 5px 0; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 500; text-align: left; }
.live-table td { padding: 6px 10px 6px 0; border-top: 1px solid rgb(from var(--ink) r g b / 0.08); color: var(--ink); font-weight: 500; }
.live-table tbody:empty::after { content: "Not asked yet"; color: rgb(from var(--ink) r g b / 0.3); font-size: 0.875rem; }
.live-tag { cursor: default; }
.call-list .call-live { background: #fbe7e4; box-shadow: inset 0 0 0 1px rgb(from var(--failed) r g b / 0.22); }
.call-list .call-live b { color: var(--failed); }
.intake-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.billing-card-photo { margin-top: 10px; }
.billing-card-photo > summary { color: var(--ink); cursor: pointer; font-weight: 600; }
.billing-card-photo > img { display: block; width: auto; max-width: min(100%, 40rem); max-height: 65vh; margin-top: 8px; }
.intake-summary { margin-top: 16px; max-width: 68ch; color: var(--ink); font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; }
.brief-appointment { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.brief-appointment select { max-width: 100%; padding: 4px 6px; font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink); }
.visit-brief { overflow-wrap: anywhere; }
.visit-brief small { color: var(--ink-quiet); }
.visit-brief .intake-row dd > span { white-space: pre-line; }
@media (min-width: 901px) {
  .visit-brief .intake-row { grid-template-columns: minmax(6rem, 20%) minmax(0, 1fr); }
  .visit-brief .intake-row dd { grid-column: 2; }
}
.visit-brief + .inline-button { margin-top: 16px; }
.intake-confirm { margin-top: 20px; padding: 14px 18px 16px; border-radius: 14px; background: var(--accent-wash); }
.intake-confirm h3 { color: var(--accent-deep); font-size: 0.8125rem; font-weight: 600; }
.intake-confirm li { margin-top: 6px; font-size: 0.9375rem; text-wrap: pretty; }
.intake-section { margin-top: 30px; }
.intake-section h3, .transcript-title { font: 400 1.375rem/1.2 var(--display); letter-spacing: -0.01em; }
.intake-rows { margin-top: 10px; }
.intake-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 6px 24px; padding: 11px 0; border-top: 1px solid rgb(from var(--ink) r g b / 0.08); }
.case-side [data-consents] .intake-row { grid-template-columns: minmax(0, 1fr); overflow-wrap: anywhere; }
.intake-row dt { color: var(--ink-quiet); font-size: 0.875rem; text-wrap: pretty; }
.intake-row dd { display: grid; gap: 7px; margin: 0; font-size: 0.9375rem; }
.intake-answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.source-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 0; border-radius: 999px; background: rgb(from var(--ink) r g b / 0.06); color: var(--ink-soft); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
button.source-chip { background: var(--accent-wash); color: var(--accent-deep); transition: background-color 160ms ease; }
.source-chip .icon { width: 0.75rem; height: 0.75rem; }
.intake-flag { display: inline-flex; align-items: center; gap: 5px; justify-self: start; color: var(--waiting); font-size: 0.75rem; font-weight: 600; }
.intake-flag .icon { width: 0.85rem; height: 0.85rem; }
[data-flag="unsure"] .intake-flag { color: var(--accent-deep); }
[data-flag="safety"] .intake-flag { color: var(--failed); }
.chart-status { margin-top: 10px; color: var(--ink-soft); font-size: 0.9375rem; text-wrap: pretty; }
.call-facts { margin-top: 14px; }
.transcript-title { margin-top: 30px; }
.transcript-missing { margin-top: 24px; }
.transcript { display: grid; gap: 2px; margin: 12px -10px 0; }
.transcript li { display: grid; grid-template-columns: 44px 84px minmax(0, 1fr); gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: 0.9375rem; scroll-margin: 120px; }
.transcript time { padding-top: 2px; color: var(--ink-quiet); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.transcript b { font-size: 0.875rem; font-weight: 600; }
.transcript li[data-who="thema"] b { color: var(--accent-deep); }
.transcript p { text-wrap: pretty; }
.transcript .intake-flag { display: flex; margin-top: 4px; }
.transcript li[data-flag] { background: var(--waiting-wash); }
.transcript li[data-flag="safety"] { background: #fbe7e4; }
.transcript li[data-cited] { background: var(--accent-wash); box-shadow: inset 0 0 0 1.5px var(--accent); }
.call-list { display: grid; gap: 2px; margin: 12px -8px -6px; }
.call-list button { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font-size: 0.875rem; text-align: left; transition: background-color 140ms ease; }
.call-list b { font-weight: 600; }
.call-list time { color: var(--ink-quiet); font-size: 0.8125rem; }
.call-list, .flow-pane, .ask-prompts, .ask-people { position: relative; }
:is(.call-list, .flow-pane, .filter-menu, .ask-prompts, .ask-people) button { position: relative; z-index: 2; }
:is(.call-list, .flow-pane, .filter-menu, .ask-prompts, .ask-people) button:is(:hover, :focus-visible, [aria-current="true"]) { z-index: 4; }
.list-lens { border-radius: 12px; list-style: none; }
.view-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.view-row .case-back { margin-bottom: 0; }
.needs-pane .needs { margin-top: 0; }
.case-grid.navigation-arrival { --navigation-y: 0px; }
.case-actions { align-items: center; flex-wrap: wrap; }
.thread-pane { display: grid; gap: 22px; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread-day { align-self: center; margin-top: 10px; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 600; }
.thread-day:first-child { margin-top: auto; }
.thread-event { display: flex; gap: 8px; align-self: center; max-width: 54ch; color: var(--ink-quiet); font-size: 0.8125rem; }
.thread-event .icon { flex: none; width: 0.95rem; height: 0.95rem; margin-top: 2px; }
.thread-event time { }
.message { display: grid; gap: 3px; max-width: min(76%, 58ch); }
.message p { padding: 9px 14px; border-radius: 18px; font-size: 0.9375rem; text-wrap: pretty; overflow-wrap: anywhere; white-space: pre-line; }
.message-meta { padding: 0 6px; color: var(--ink-quiet); font-size: 0.75rem; font-weight: 500; }
.message[data-from="them"] { align-self: flex-start; }
.message[data-from="them"] p { border-bottom-left-radius: 6px; background: var(--wash); }
.message:is([data-from="thema"], [data-from="you"]) { align-self: flex-end; }
.message:is([data-from="thema"], [data-from="you"]) .message-meta { justify-self: end; }
.message:is([data-from="thema"], [data-from="you"]) p { border-bottom-right-radius: 6px; }
.message[data-from="thema"] p { background: var(--accent-wash); }
.message[data-from="you"] p { background: var(--accent); color: #fff; }
.message[data-new] { animation: message-in 280ms var(--ease-out) both; }
@keyframes message-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.thread-reply { display: grid; gap: 10px; }
.thread-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--ink-quiet); font-size: 0.8125rem; }
.thread-status .brain-mark { width: 1.15rem; height: 1rem; color: var(--ink-soft); }
.thread-needs { display: grid; gap: 14px; margin-top: 14px; }
.thread-needs button { display: grid; gap: 2px; padding: 0; border: 0; background: none; font-size: 0.875rem; font-weight: 500; text-align: left; }
.contact-list b { font-weight: 600; }

.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 14px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.composer textarea { flex: 1; min-width: 0; min-height: 32px; max-height: 148px; padding: 5px 0; border: 0; outline: 0; background: none; resize: none; field-sizing: content; font-size: 0.9375rem; line-height: 1.45; caret-color: var(--accent); }
.composer .send-button { flex: none; }
.composer .send-button .icon { width: 1.05rem; height: 1.05rem; }
::selection { background: rgb(from var(--brand-blue) r g b / 0.22); }

.ask {
  --ask-width: min(404px, calc(100vw - 24px)); --ask-height: min(620px, calc(100dvh - 44px)); --ask-rim: 0px;
  position: fixed; right: 22px; bottom: 22px; z-index: 29; width: var(--ask-width); height: var(--ask-height);
  border-radius: 24px; color: var(--ink); box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.08), var(--shadow-overlay);
  transform-origin: calc(100% - 52px) calc(100% - 52px); animation: ask-open 300ms var(--ease-out) both;
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1), height 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ask[data-size="wide"] { --ask-width: min(820px, calc(100vw - 44px)); --ask-height: min(660px, calc(100dvh - 44px)); }
.ask[data-size="screen"] { --ask-width: calc(100vw - 44px); --ask-height: calc(100dvh - 44px); }
.ask[data-leaving] { pointer-events: none; animation: ask-leave 170ms ease-in both; }
@keyframes ask-open { from { opacity: 0; transform: scale(0.9); } }
@keyframes ask-leave { to { opacity: 0; transform: scale(0.94); } }
.ask-sheet { position: absolute; inset: var(--ask-rim); overflow: hidden; border-radius: calc(24px - var(--ask-rim)); background: var(--paper); }
.ask-inner { position: absolute; right: 0; bottom: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); width: calc(var(--ask-width) - 2 * var(--ask-rim)); height: calc(var(--ask-height) - 2 * var(--ask-rim)); padding: 10px; }
body[data-surface="glass"] .ask[data-size="pane"] { --ask-width: min(422px, calc(100vw - 24px)); }
body[data-surface="glass"] .ask { --ask-rim: 9px; border-radius: 28px; box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.06), 0 3px 8px rgb(from var(--ink) r g b / 0.05), 0 30px 64px -20px rgb(from var(--ink) r g b / 0.42); }
body[data-surface="glass"] .ask::before {
  content: ""; position: absolute; inset: 0; 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);
}
.ask-ground { display: none; }
body[data-surface="glass"] .ask-ground { display: block; position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0.56; filter: blur(14px) saturate(1.2); }
body[data-surface="glass"] .ask-sheet { border-radius: 19px; 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); }
body[data-surface="glass"] .ask[data-size="wide"] { --ask-width: min(838px, calc(100vw - 44px)); }
body.hub-page[data-surface="glass"] #ask :is(.icon-button:not(.composer-mic), .ask-identity, .secondary) { border: 0; background: var(--button-glass); box-shadow: var(--button-rim); }
body.hub-page[data-surface="glass"] #ask :is(.primary, .send-button) { background: var(--primary-glass); box-shadow: var(--primary-rim); }
body.hub-page[data-surface="glass"] #ask .composer { border: 0; background: rgb(255 255 255 / 0.52); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] #ask .composer:focus-within { background: rgb(255 255 255 / 0.74); box-shadow: var(--rim-on); }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 6px 12px 8px; }
.ask-identity { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px 0 6px; border-radius: 999px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-rest); }
.ask-identity strong { font: 400 1.375rem/1 var(--display); letter-spacing: -0.01em; }
.ask-orb { display: block; width: 36px; height: 36px; }
.ask-orb.is-plain { border-radius: 50%; background: var(--orb-fallback); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.4); }
.ask-orb.is-plain canvas { display: none; }
.ask-state { margin-left: 6px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.ask[data-size="pane"] .ask-state { display: none; }
.ask-scope { min-width: 0; max-width: 45%; margin-left: auto; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; }
.ask-chart-answer { display: grid; gap: 12px; overflow-wrap: anywhere; }
.ask-chart-answer details { color: var(--ink-soft); font-size: .875rem; }
.ask-chart-answer summary { cursor: pointer; }
.ask-chart-answer p, .ask-chart-answer blockquote { white-space: pre-wrap; }
.ask-chart-passage { padding-block: 4px; }
.ask-actions { display: flex; gap: 6px; }
.ask-body { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.ask-rail { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.ask-board { display: none; }
.ask[data-size="wide"] .ask-feed { padding: 10px 40px 18px; }
.ask[data-size="wide"] .composer { margin: 0 34px 22px; }
.ask[data-size="screen"] .ask-body { grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px); gap: 0 36px; padding: 6px 26px 18px 34px; }
.ask[data-size="screen"] .ask-board { display: block; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 12px 0; }
.ask[data-size="screen"] .ask-feed :is(.ask-greeting, .ask-prompts, .ask-people, .ask-lines) { display: none; }
.ask[data-size="screen"] .ask-rail { padding-left: 30px; border-left: 1px solid var(--line); }
.ask-welcome { margin: clamp(40px, 16dvh, 150px) 0 30px; }
.ask-welcome h2 { font: 400 clamp(2.75rem, 5vw, 4rem)/1 var(--display); letter-spacing: -0.02em; }
.ask-welcome p { margin-top: 12px; color: var(--ink-soft); font-size: 1.25rem; }
.ask-line { max-width: 26ch; margin: clamp(40px, 15dvh, 140px) 0 26px; font: 400 clamp(2rem, 3.4vw, 3rem)/1.06 var(--display); letter-spacing: -0.018em; text-wrap: balance; }
.ask-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); column-gap: 40px; }
.ask-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 2px 14px; padding: 16px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font-size: 0.9375rem; text-align: left; }
.ask-block > * { grid-column: 1; }
.ask-block > .icon { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 1.05rem; height: 1.05rem; color: var(--ink-quiet); transition: transform 200ms var(--ease-out), color 160ms ease; }
.ask-block b { font-size: 1rem; font-weight: 600; text-wrap: pretty; }
.ask-block p { text-wrap: pretty; }
.ask-block-name { display: flex; align-items: baseline; gap: 10px; }
.ask-block .node { flex: none; margin-top: 0; translate: 0 1px; }
.ask-block small { margin-top: 4px; color: var(--ink-quiet); font-size: 0.8125rem; }
.ask-feed { display: flex; flex-direction: column; gap: 16px; padding: 8px 12px 16px; overflow-y: auto; overscroll-behavior: contain; }
.ask-greeting { margin-top: auto; font: 400 2rem/1.08 var(--display); letter-spacing: -0.015em; }
.ask-prompts { display: grid; }
.ask-prompts button { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font-size: 0.9375rem; font-weight: 500; text-align: left; }
.ask-prompts .icon { flex: none; width: 1rem; height: 1rem; color: var(--ink-quiet); transition: transform 200ms var(--ease-out), color 160ms ease; }
.ask-feed .message { align-self: flex-end; max-width: 86%; }
.ask-answer { display: grid; gap: 6px; font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.ask-answer > p, .ask-answer > .assistant-markdown { max-width: 62ch; }
.assistant-markdown > * + * { margin-top: 0.7em; }
.assistant-markdown strong { color: var(--accent-deep); font-weight: 700; }
.assistant-markdown :is(ul, ol) { padding-left: 1.4em; }
.assistant-markdown ul { list-style: disc; }
.assistant-markdown ol { list-style: decimal; }
.assistant-markdown li + li { margin-top: 0.3em; }
.ask-people, .ask-lines { display: grid; margin: 6px 0 0; padding: 0; list-style: none; }
.ask-people .roster-row { padding: 12px 2px; border-top: 1px solid var(--line); border-radius: 0; }
.ask-lines li { padding: 11px 2px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.ask-answer .need-actions { margin-top: 10px; }
.ask-outcome { color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 500; }
.ask-thinking { display: flex; gap: 5px; padding: 6px 2px; }
.ask-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-quiet); animation: ask-think 900ms ease-in-out infinite; }
.ask-thinking i:nth-child(2) { animation-delay: 150ms; }
.ask-thinking i:nth-child(3) { animation-delay: 300ms; }
@keyframes ask-think { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.ask .composer { margin: 0 4px 4px; }
.composer-mic { flex: none; width: 34px; height: 34px; border-radius: 50%; }
.composer-mic .icon { width: 1.05rem; height: 1.05rem; }
#ask .icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-soft); backdrop-filter: none; }
#ask .composer-mic { width: 34px; height: 34px; background: none; box-shadow: none; }
#ask .composer { border: 1px solid var(--line-strong); border-radius: 18px; background: var(--paper); box-shadow: none; }
#ask .composer:focus-within { border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 3px var(--accent-wash); }
#ask .send-button { background: var(--accent); box-shadow: none; }
#ask .primary { border: 0; border-radius: 999px; background: var(--accent); box-shadow: none; color: #fff; }
#ask .secondary { border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); box-shadow: none; backdrop-filter: none; }
#ask .message[data-from="you"] p { padding: 9px 15px; border-radius: 18px 18px 6px 18px; background: var(--accent-wash); box-shadow: none; color: var(--accent-deep); font-weight: 500; }

.case-back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-rest); color: var(--ink-soft); font-size: 0.875rem; font-weight: 500; transition: transform 140ms var(--ease-out); margin-bottom: 14px; }
.case-back:active { transform: scale(0.97); }
.case-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.case-header h1 { font: 400 2.5rem/1.05 var(--display); letter-spacing: -0.015em; }
.case-meta { margin-top: 8px; color: var(--ink-quiet); }
.case-actions { display: flex; gap: 8px; }

.needs { display: grid; gap: 22px; margin-top: 26px; }
.need { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 16px; }
.need h2 { margin-top: 1px; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.need-detail { margin-top: 6px; max-width: 62ch; color: var(--ink-soft); text-wrap: pretty; }
.need-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; color: var(--ink-quiet); font-size: 0.8125rem; }
.need-facts b { color: var(--ink-soft); font-weight: 600; }
.need-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.need.is-done { padding: 14px 16px; border-radius: 12px; background: var(--confirmed-wash); }
.need.is-done .kind-mark { color: var(--confirmed); }
.need.is-done h2 { color: var(--ink); }

.handled-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.handled-heading h2 { font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; }
.handled-heading .brain-mark { width: 1.6rem; height: 1.4rem; color: var(--ink-soft); }
.handled-sub { max-width: 60ch; color: var(--ink-soft); }
.journey { display: grid; grid-template-columns: minmax(180px, 232px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 18px; }
.journey-list { position: relative; display: grid; gap: 2px; }
.journey-lens { border-radius: 11px; }
.journey-step {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; min-width: 0; height: 40px; padding: 0 12px;
  border: 0; border-radius: 11px; background: none; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; text-align: left; white-space: nowrap;
  transition: color 180ms ease, transform 140ms var(--ease-out);
}
.journey-step span:last-child { overflow: hidden; text-overflow: ellipsis; }
.journey-step .icon, .journey-gap { width: 1rem; height: 1rem; flex: none; }
.journey-step:active { transform: scale(0.98); }
.journey-step[aria-pressed="true"] { z-index: 4; color: var(--ink); font-weight: 600; }
.journey-step[data-state="done"] .icon { color: var(--confirmed); }
.journey-step[data-state="now"] .icon { color: var(--accent); }
.journey-step[data-state="needs"] { color: var(--waiting); }
.journey-step[data-state="later"] { color: var(--ink-quiet); }
.step-panel { padding: 6px 4px 2px; min-height: 148px; }
.step-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.step-panel-head h3 { font: 400 1.5rem/1.15 var(--display); letter-spacing: -0.01em; }
.step-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-quiet); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.step-state .icon { width: 0.9rem; height: 0.9rem; }
.step-state[data-state="done"] { color: var(--confirmed); }
.step-state[data-state="now"] { color: var(--accent-deep); }
.step-state[data-state="needs"] { color: var(--waiting); }
.step-summary { margin-top: 6px; max-width: 62ch; color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; }
.step-detail { display: grid; gap: 10px; margin-top: 18px; }
.step-detail li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; color: var(--ink); font-size: 0.9375rem; }
.step-detail .icon { width: 1.05rem; height: 1.05rem; margin-top: 2px; color: var(--confirmed); }
.step-detail li[data-state="open"] .icon { color: var(--ink-quiet); }
.step-detail li[data-state="needs"] .icon { color: var(--waiting); }
.step-detail li[data-state="needs"] { color: var(--waiting); font-weight: 500; }

.contact-list { display: grid; gap: 16px; margin-top: 16px; }
.contact-list li { display: grid; gap: 2px; font-size: 0.875rem; }
.contact-list time { color: var(--ink-quiet); }

@media (hover: hover) and (pointer: fine) {
  .roster-row:not([aria-current="true"]):hover, .roster-home:not([aria-current="page"]):hover { background: rgb(from var(--ink) r g b / 0.04); }
  :is(.flow-pane, .ask-people) .roster-row:hover { background: none; }
  .queue-row:hover .queue-open .icon { transform: translateX(3px); }
  .case-back:hover { color: var(--ink); }
  .roster-profile:hover { background: rgb(from var(--ink) r g b / 0.05); }
  .roster-brand .icon-button:hover { background: rgb(from var(--ink) r g b / 0.07); border-color: transparent; }
  .journey-step:not([aria-pressed="true"]):hover { color: var(--ink); }
  #ask .icon-button:hover { background: var(--wash); }
  #ask .primary:hover { background: var(--accent-deep); }
  #ask .secondary:hover { border-color: var(--line-strong); background: var(--wash); }
  #ask :is(.ask-prompts button, button.ask-block):hover { color: var(--accent-deep); }
  #ask :is(.ask-prompts button, button.ask-block):hover .icon { color: var(--accent-deep); transform: translateX(3px); }
  button.source-chip:hover { background: rgb(from var(--brand-blue) r g b / 0.2); }
  .visit-chip:hover { box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.16), 0 6px 12px -7px rgb(from var(--ink) r g b / 0.4); }
  .month-date:hover { background: rgb(from var(--ink) r g b / 0.07); }
  .week-day:hover { background: rgb(from var(--ink) r g b / 0.07); }
  .month-day[data-today] .month-date:hover { background: color-mix(in srgb, var(--brand-orange) 82%, white); }
  .month-more:hover { color: var(--ink); }
  .filter-chip:not([aria-pressed="true"]):hover { background: rgb(255 255 255 / 0.92); color: var(--ink); }
  body[data-surface="glass"] .view-row .filter-chip:not([aria-pressed="true"]):hover { background: rgb(255 255 255 / 0.3); }
  .visit-block:hover { z-index: 2; box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.14), 0 6px 14px -6px rgb(from var(--ink) r g b / 0.3); }
  body[data-surface="glass"] :is(.visit-block, .visit-chip):not([data-tone="held"]):hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 0 0 1px rgb(from var(--ink) r g b / 0.1), 0 14px 22px -12px rgb(from var(--ink) r g b / 0.5); }
  .week-steps .icon-button:not(:disabled):hover { border-color: transparent; background: #fff; }
  .done-entry:hover, .thread-needs button:hover { color: var(--ink); }
}

@media (max-width: 900px) {
  .hub { grid-template-columns: minmax(0, 1fr); }
  .side { position: relative; top: 0; height: auto; margin: var(--roster-inset); }
  #profile-menu { inset: auto auto auto 26px; }
  .roster-list { max-height: 34dvh; }
  .stage-title, .case-header h1 { font-size: 2.125rem; }
  .queue-row { grid-template-columns: 36px minmax(0, 1fr); }
  .queue-side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; gap: 14px; margin-top: 8px; }
  .visit-row { grid-template-columns: 62px minmax(0, 1fr); }
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .order-row, .intake-section .order-row { grid-template-columns: minmax(0, 1fr); }
  .order-note, .intake-section .order-note { grid-column: 1; }
  .test-order-detail { padding-left: 0; }
  .order-group-row { grid-template-columns: minmax(0, 1fr); }
  .order-track { grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 14px; }
  .order-track i { flex-direction: column; min-width: 0; height: auto; min-height: 62px; padding: 6px 2px; gap: 2px; white-space: normal; text-align: center; font-size: 0.6875rem; }
  .order-track .order-fill { border-radius: 14px; }
  .note-pane { min-height: 0; }
  .room-video { height: 58dvh; min-height: 360px; }
  .room-side { height: auto; min-height: 0; }
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .live-talk, .live-form { height: auto; min-height: 0; }
  .live-thread, .live-form-body { max-height: 56dvh; }
  .live-field { grid-template-columns: minmax(0, 1fr); }
  .intake-row { grid-template-columns: minmax(0, 1fr); }
  .transcript li { grid-template-columns: 40px minmax(0, 1fr); }
  .transcript b { grid-column: 2; }
  .transcript p { grid-column: 2; }
  body[data-surface="glass"] .float-switch button { height: 40px; padding: 0 10px; font-size: 0.8125rem; }
  body[data-surface="glass"] .view-row .filter-chip { height: 38px; padding: 0 14px; }
  .message { max-width: 88%; }
  .ask { right: 12px; bottom: 12px; --ask-width: calc(100vw - 24px); --ask-height: min(600px, calc(100dvh - 24px)); }
  .ask:is([data-size="wide"], [data-size="screen"]) { --ask-width: calc(100vw - 24px); --ask-height: calc(100dvh - 24px); }
  .ask[data-size="screen"] .ask-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; padding: 6px 14px 12px; }
  .ask[data-size="screen"] .ask-rail { padding-left: 0; border-left: 0; }
  .ask[data-size="screen"] .ask-feed { display: none; }
  .roster-search kbd { display: none; }
}

.roster-row { position: relative; z-index: 2; }
.roster-row[aria-current="true"] { z-index: 4; box-shadow: inset 3px 0 var(--brand-orange); }
.pill-switch {
  position: relative; isolation: isolate; display: inline-flex; padding: 3px; border-radius: 999px; background: rgb(from var(--ink) r g b / 0.06);
  box-shadow: inset 0 1px 2px rgb(from var(--ink) r g b / 0.16), inset 0 0 0 1px rgb(from var(--ink) r g b / 0.04), 0 1px 0 rgb(255 255 255 / 0.9);
}
.switch-lens {
  --glass-fill: var(--current-lens);
  inset: 0 auto auto 0; border-radius: 999px; transition: transform 460ms var(--ease-glide), opacity 180ms ease;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 -6px 8px -8px rgb(from var(--ink) r g b / 0.18), 0 1px 2px rgb(from var(--ink) r g b / 0.12), 0 6px 12px -6px rgb(from var(--ink) r g b / 0.32);
}
.pill-switch button {
  position: relative; z-index: 2; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500;
  transition: color 180ms ease;
}
.pill-switch button[aria-pressed="true"] { z-index: 4; color: var(--ink); }

body[data-surface="glass"] { background: #ffffff; }
.hub-opening { position: fixed; inset: 0; z-index: -1; }
.hub-opening .thema-opening { --thema-opening-text: var(--text); --thema-opening-display: var(--display); }
body[data-surface="paper"][data-stage="hub"] .hub-opening { display: none; }
body:not([data-stage="hub"]) :is(.hub, .assistant-orb, .ask) { visibility: hidden; }
body[data-surface="glass"] .glass { border-color: transparent; background: var(--glass-fill); box-shadow: var(--glass-shadow); }
body[data-surface="glass"] .slab { background: none; box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.06), 0 3px 8px rgb(from var(--ink) r g b / 0.05), 0 28px 56px -26px rgb(from var(--ink) r g b / 0.42); }
body[data-surface="glass"] .queue.slab { padding: var(--slab-bevel); }
body[data-surface="glass"] { --face: rgb(255 255 255 / 0.46); --face-frost: blur(14px) saturate(1.2); }
body[data-surface="glass"] .pane.case-hero { --face: linear-gradient(105deg, rgb(from var(--accent-wash) r g b / 0.83), rgb(255 255 255 / 0.56) 58%, rgb(from var(--current-wash) r g b / 0.88)); }
body[data-surface="glass"] :is(.roster, .side-brand, .queue, .pane).slab::after { background: var(--face); backdrop-filter: var(--face-frost); }
body[data-surface="glass"] .roster.slab { --slab-radius: 22px; border-color: transparent; }
body[data-surface="glass"] .side-brand.slab { border-color: transparent; }
body[data-surface="glass"] .switch-row i {
  width: 46px; height: 26px; background: rgb(from var(--ink) r g b / 0.03);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.22), inset 0 0 0 2.5px rgb(255 255 255 / 0.9);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}
body[data-surface="glass"] .switch-row i::after {
  top: 0; left: 0; width: 26px; height: 26px; background: rgb(255 255 255 / 0.55);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.26), inset 0 0 0 2.5px rgb(255 255 255 / 0.95);
  transition: transform 340ms var(--ease-glide), box-shadow 240ms ease;
}
body[data-surface="glass"] .switch-row input:checked + i { background: rgb(from var(--brand-blue) r g b / 0.34); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.7), inset 0 0 0 2.5px rgb(255 255 255 / 0.5); }
body[data-surface="glass"] .switch-row input:checked + i::after {
  transform: translateX(20px); background: rgb(255 255 255 / 0.5);
  box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.75), inset 0 0 0 2.5px rgb(255 255 255 / 0.95);
}
body[data-surface="glass"] .case-back.glass { --glass-frost: 7px; --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(from var(--wash) r g b / 0.36)); }
body[data-surface="glass"] .roster-search.glass { --glass-frost: 2px; --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(from var(--wash) r g b / 0.4)); }
body[data-surface="glass"] .need .secondary { border-color: rgb(from var(--ink) r g b / 0.12); background: rgb(255 255 255 / 0.7); }
body[data-surface="glass"] .secondary.glass { --glass-frost: 8px; --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.3)); }
body[data-surface="glass"] :is(.visit-block, .visit-chip) { background: rgb(255 255 255 / 0.5); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 0 0 1px rgb(from var(--ink) r g b / 0.07), 0 8px 14px -10px rgb(from var(--ink) r g b / 0.42); }
body[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="blocked"] { background: rgb(255 214 140 / 0.5); }
body[data-surface="glass"] :is(.visit-block, .visit-chip):is([data-tone="decide"], [data-tone="live"]) { background: rgb(from var(--control-tint) r g b / 0.5); }
body[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="urgent"] { background: rgb(246 162 150 / 0.52); }
body[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="held"] { background: rgb(from var(--ink) r g b / 0.05); box-shadow: none; }
body[data-surface="glass"] :is(.roster, .queue, .pane).slab::before { backdrop-filter: none; }
body[data-surface="glass"] .float-switch { padding: 0; background: none; box-shadow: none; }
body[data-surface="glass"] .float-switch::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.2), inset 0 0 0 2.5px rgb(255 255 255 / 0.9), inset 0 0 0 7px rgb(255 255 255 / 0.1);
}
body[data-surface="glass"] .float-switch[data-refracts="true"]::before { backdrop-filter: var(--lens-filter); }
body[data-surface="glass"] .float-switch .switch-lens {
  --glass-frost: 2px; --glass-fill: var(--current-lens);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.22), inset 0 0 0 2.5px rgb(255 255 255 / 0.95), inset 0 0 0 7px rgb(255 255 255 / 0.14);
}
body[data-surface="glass"] .float-switch .switch-lens::after { display: none; }
body[data-surface="glass"] .float-switch button {
  height: 46px; padding: 0 26px; color: var(--ink); font-size: 0.9375rem;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}
body[data-surface="glass"] .float-switch button:is([aria-pressed="true"], [aria-current="page"]) { color: var(--ink); text-shadow: none; }
body[data-surface="glass"] .roster-nav.float-switch .roster-home { height: 46px; padding: 0 7px; font-size: 0.875rem; font-weight: 500; }
body[data-surface="glass"] .view-row .filter-chip {
  position: relative; height: 42px; padding: 0 18px; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(5px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.55); color: var(--ink); font-size: 0.875rem; text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}
body[data-surface="glass"] .view-row .filter-chip::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgb(from var(--ink) r g b / 0.42), rgb(from var(--ink) r g b / 0.1) 32%, rgb(from var(--ink) r g b / 0.08) 66%, rgb(from var(--ink) r g b / 0.34));
  -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;
}
body[data-surface="glass"] .view-row .filter-chip .filter-count { color: var(--ink-soft); }
body[data-surface="glass"] .view-row .filter-chip[aria-pressed="true"] { background: rgb(from var(--brand-blue) r g b / 0.2); color: var(--accent-deep); }
body[data-surface="glass"] .view-row .filter-chip[aria-pressed="true"]::before {
  background: linear-gradient(150deg, rgb(from var(--brand-blue) r g b / 0.95), rgb(from var(--brand-blue) r g b / 0.3) 32%, rgb(from var(--brand-blue) r g b / 0.25) 66%, rgb(from var(--brand-blue) r g b / 0.8));
}
body[data-surface="glass"] .view-row .filter-chip[aria-pressed="true"] .filter-count { color: var(--accent-deep); }
body[data-surface="glass"][data-switches="frosted"] .float-switch::before { background: rgb(255 255 255 / 0.14); backdrop-filter: blur(2.5px) saturate(1.3); }
body[data-surface="glass"][data-switches="frosted"] .float-switch[data-refracts="true"]::before { backdrop-filter: var(--lens-filter) blur(2.5px) saturate(1.3); }
body[data-surface="glass"][data-switches="frosted"] .float-switch .switch-lens { --glass-frost: 1.5px; --glass-fill: var(--current-lens); }
body[data-surface="glass"][data-switches="frosted"] .view-row .filter-chip { background: rgb(255 255 255 / 0.16); backdrop-filter: blur(3px) saturate(1.4); }
body[data-surface="glass"][data-switches="frosted"] .view-row .filter-chip[aria-pressed="true"] { background: rgb(from var(--control-tint) r g b / 0.34); }
body[data-surface="glass"][data-switches="tinted"] .float-switch::before { background: rgb(from var(--accent-wash) r g b / 0.95); }
body[data-surface="glass"][data-switches="tinted"] .float-switch[data-refracts="true"]::before { backdrop-filter: none; }
body[data-surface="glass"][data-switches="tinted"] .float-switch .switch-lens { --glass-frost: 0px; --glass-fill: var(--current-lens); }
body[data-surface="glass"][data-switches="tinted"] .view-row .filter-chip { background: rgb(from var(--accent-wash) r g b / 0.95); backdrop-filter: none; }
body[data-surface="glass"][data-switches="tinted"] .view-row .filter-chip[aria-pressed="true"] { background: rgb(from var(--control-tint) r g b / 0.97); }
body[data-surface="glass"][data-switches="tinted"] :is(.float-switch button, .view-row .filter-chip) { text-shadow: none; }
body[data-surface="glass"] .order-search.glass { --glass-frost: 6px; }
body[data-surface="glass"] .week-steps .icon-button.glass { --glass-frost: 6px; --glass-fill: rgb(255 255 255 / 0.4); box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.16), inset 0 0 0 2px rgb(255 255 255 / 0.85); }
body[data-surface="glass"] .message[data-from="them"] p { background: rgb(255 255 255 / 0.84); box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.08), 0 1px 2px rgb(from var(--ink) r g b / 0.05); }
body[data-surface="glass"] .composer { border-color: rgb(from var(--ink) r g b / 0.14); background: rgb(255 255 255 / 0.74); }
body[data-surface="glass"] .toast { border: 1px solid rgb(255 255 255 / 0.18); background: rgb(from var(--ink) r g b / 0.62); backdrop-filter: blur(18px) saturate(1.6); }
@media (hover: hover) and (pointer: fine) {
  body[data-surface="glass"] .secondary.glass:hover { background: linear-gradient(180deg, rgb(255 255 255 / 0.72), rgb(255 255 255 / 0.46)); }
}

@media (max-width: 900px) {
  .pill-switch button { padding: 0 9px; }
}

@container (max-width: 880px) {
  .home-grid, .case-grid { grid-template-columns: minmax(0, 1fr); }
}

@container (max-width: 700px) {
  .journey { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

.assistant-orb {
  position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 104px; height: 104px; padding: 0;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  filter: drop-shadow(0 14px 16px rgb(from var(--ink) r g b / 0.22)) drop-shadow(0 1px 2px rgb(from var(--ink) r g b / 0.2));
  animation: orb-float 6s ease-in-out infinite alternate;
  transition: transform 220ms var(--ease-out);
}
.glass-orb { display: block; width: 100%; height: 100%; pointer-events: none; }
.assistant-orb.is-plain {
  background: var(--orb-fallback);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7), inset -8px -10px 16px -8px rgb(from var(--ink) r g b / 0.28);
}
.assistant-orb.is-plain .glass-orb { display: none; }
.assistant-orb:active { transform: scale(0.94); }
.assistant-orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes orb-float { from { translate: 0 0; } to { translate: 0 -5px; } }
@media (hover: hover) and (pointer: fine) {
  .assistant-orb:hover { transform: scale(1.06); }
}
@media (max-width: 900px) {
  .assistant-orb { right: 12px; bottom: 12px; width: 76px; height: 76px; }
}

.sign-in {
  --slab-radius: 24px; --arrive-delay: 0ms;
  position: fixed; left: 50%; top: 44%; z-index: 20; display: grid; gap: 14px; width: min(348px, calc(100vw - 32px)); padding: 32px 30px 30px;
  translate: -50% -50%; box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.06), 0 3px 8px rgb(from var(--ink) r g b / 0.05), 0 28px 56px -26px rgb(from var(--ink) r g b / 0.42);
  animation: slab-land 800ms var(--ease-out) both;
}
.sign-in::after { background: rgb(255 255 255 / 0.5); backdrop-filter: blur(9px) saturate(1.1); }
.sign-in > * { animation: glass-arrive 600ms ease both; }
.sign-in h1 { margin-bottom: 6px; font: 400 2.25rem/1 var(--display); letter-spacing: -0.015em; }
.sign-in label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 500; }
.sign-in input {
  height: 44px; padding: 0 12px; border: 1px solid rgb(from var(--ink) r g b / 0.14); border-radius: 12px; outline: 0; background: rgb(255 255 255 / 0.72);
  color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 400; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.sign-in input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.sign-in .primary { height: 44px; margin-top: 8px; border-radius: 12px; font-size: 0.9375rem; }
body[data-stage="entering"] .sign-in { pointer-events: none; animation: sign-in-pass 520ms cubic-bezier(0.5, 0, 0.75, 0) both; }
body[data-stage="entering"] .sign-in::before, body[data-stage="entering"] .sign-in::after, body[data-stage="entering"] .sign-in > * { animation: glass-leave 380ms ease both; }
.sign-in[hidden], body[data-stage="hub"] .sign-in { display: none; }
.arrival-note {
  position: fixed; left: 50%; top: 46%; z-index: 20; margin: 0; padding: 13px 24px; border-radius: 999px; translate: -50% -50%;
  background: rgb(255 255 255 / 0.46); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.17), inset 0 0 0 2.5px rgb(255 255 255 / 0.82), 0 18px 40px -22px rgb(from var(--ink) r g b / 0.42);
  color: var(--ink); font-size: 1rem; font-weight: 500; animation: glass-arrive 420ms ease both;
}

body[data-arriving] :is(.side-brand, .roster, .queue, .pane) { animation: slab-land 900ms var(--ease-out) var(--arrive-delay, 0ms) both; }
body[data-arriving] :is(.side-brand, .roster, .queue, .pane) > :not(.queue-list) { animation: glass-arrive 620ms ease var(--arrive-delay, 0ms) both; }
body[data-arriving] .queue-list > :not(.list-backing) { animation: glass-arrive 620ms ease var(--arrive-delay, 0ms) both; }
body[data-arriving] .queue, body[data-arriving] .case-main { --arrive-delay: 110ms; }
body[data-arriving] :is(.home-grid, .case-grid) > :nth-child(2) { --arrive-delay: 220ms; }
body[data-arriving] .assistant-orb { animation: orb-arrive 700ms var(--ease-out) 420ms both, orb-float 6s ease-in-out infinite alternate; }
@keyframes slab-land { from { transform: translateY(28px) scale(0.955); box-shadow: 0 0 0 0 transparent; } }
@keyframes glass-arrive { from { opacity: 0; } }
@keyframes glass-leave { to { opacity: 0; } }
@keyframes sign-in-pass { 60% { box-shadow: 0 0 0 0 transparent; } to { transform: scale(1.5); box-shadow: 0 0 0 0 transparent; } }
@keyframes orb-arrive { from { opacity: 0; scale: 0.6; } }

/* Glass controls: one rim, one body, no glow. */
body.hub-page[data-surface="glass"] {
  --rim: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.17), inset 0 0 0 2.5px rgb(255 255 255 / 0.82);
  --rim-on: inset 0 0 0 1.5px rgb(from var(--brand-blue) r g b / 0.62), inset 0 0 0 3px rgb(255 255 255 / 0.86);
  --rim-fine: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.2), inset 0 0 0 2px rgb(255 255 255 / 0.8);
  --glass-body: rgb(255 255 255 / 0.42);
  --glass-body-hover: rgb(255 255 255 / 0.7);
  --primary-glass: linear-gradient(145deg, color-mix(in srgb, var(--brand-blue) 60%, var(--accent)), var(--accent) 52%, var(--accent-deep));
  --primary-rim: inset 0 0 0 1px rgb(from var(--accent-deep) r g b / 0.9), inset 1.5px 2px 2px -1px rgb(255 255 255 / 0.5), inset -1.5px -2px 2px -1px rgb(from var(--ink) r g b / 0.28), 0 2px 5px -1px rgb(from var(--accent-deep) r g b / 0.36);
  --button-glass: linear-gradient(145deg, rgb(255 255 255 / 0.74), rgb(255 255 255 / 0.2) 48%, rgb(from var(--accent-wash) r g b / 0.36));
  --button-glass-hover: linear-gradient(145deg, rgb(255 255 255 / 0.94), rgb(255 255 255 / 0.52) 48%, rgb(from var(--accent-wash) r g b / 0.58));
  --button-rim: inset 0 0 0 1px rgb(255 255 255 / 0.85), inset 1.5px 2px 2px -1px #fff, inset -1.5px -2px 2px -1px rgb(from var(--ink) r g b / 0.18), 0 0 0 1px rgb(from var(--ink) r g b / 0.1), 0 2px 5px -1px rgb(from var(--ink) r g b / 0.16);
}
body.hub-page[data-surface="glass"] :is(.secondary, .icon-button, .case-back, .slot-list button, .order-check) {
  border: 0; background: var(--button-glass); box-shadow: var(--button-rim);
}
body.hub-page[data-surface="glass"] :is(.primary, .secondary, .icon-button) { border-radius: 999px; }
body.hub-page[data-surface="glass"] :is(.secondary, .icon-button, .case-back, .roster-search).glass::after { display: none; }
body.hub-page[data-surface="glass"] .view-row button[data-action="schedulePatient"] { background: var(--primary-glass); color: #fff; }
body.hub-page[data-surface="glass"] :is(.primary, .send-button) { border: 0; background: var(--primary-glass); box-shadow: var(--primary-rim); color: #fff; }
body.hub-page[data-surface="glass"] .slot-list button[aria-pressed="true"] { background: rgb(from var(--brand-blue) r g b / 0.18); box-shadow: var(--rim-on); }
body.hub-page[data-surface="glass"] .message[data-from="them"] p { background: var(--glass-body); box-shadow: var(--rim-fine); }
body.hub-page[data-surface="glass"] .message[data-from="thema"] p { background: rgb(from var(--brand-blue) r g b / 0.12); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.3), inset 0 0 0 2px rgb(255 255 255 / 0.7); }
body.hub-page[data-surface="glass"] .message[data-from="you"] p { background: rgb(from var(--brand-blue) r g b / 0.24); box-shadow: var(--rim-on); color: var(--accent-deep); font-weight: 500; }
body.hub-page[data-surface="glass"] .sent-text p { background: rgb(from var(--brand-blue) r g b / 0.12); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.3), inset 0 0 0 2px rgb(255 255 255 / 0.7); }
body.hub-page[data-surface="glass"] .week-steps .icon-button.glass { background: var(--button-glass); box-shadow: var(--button-rim); }
body.hub-page[data-surface="glass"] .view-row :is(.week-steps .icon-button, .order-search, .case-back).glass, body.hub-page[data-surface="glass"] .view-row .secondary {
  background: rgb(255 255 255 / 0.14); backdrop-filter: blur(2.5px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.2), inset 0 0 0 2.5px rgb(255 255 255 / 0.9), inset 0 0 0 7px rgb(255 255 255 / 0.1);
}
body.hub-page[data-surface="glass"] .view-row :is(.case-back, .secondary) { color: var(--ink); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
body.hub-page[data-surface="glass"] .view-row :is(.week-steps .icon-button, .order-search, .case-back).glass[data-refracts="true"] { backdrop-filter: var(--lens-filter) blur(2.5px) saturate(1.3); }
body.hub-page[data-surface="glass"] .view-row .week-steps .icon-button { width: 46px; height: 46px; color: var(--ink); }
body.hub-page[data-surface="glass"] .view-row .order-search { color: var(--ink-soft); }
body.hub-page[data-surface="glass"] .view-row .order-search input { text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
body.hub-page[data-surface="glass"] .view-row .order-search input::placeholder { color: var(--ink-soft); }
body.hub-page[data-surface="glass"] .view-row .order-search.glass:focus-within { background: rgb(255 255 255 / 0.4); box-shadow: var(--rim-on); }
body.hub-page[data-surface="glass"] .roster .roster-search { background: rgb(255 255 255 / 0.26); }
body.hub-page[data-surface="glass"] .roster .roster-search:focus-within { background: rgb(255 255 255 / 0.6); }
body.hub-page[data-surface="glass"] :is(.composer, .note-text, .order-other input, .sign-in input, .roster-search) { border: 0; background: rgb(255 255 255 / 0.52); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] :is(.composer:focus-within, .note-text:focus-visible, .order-other input:focus-visible, .sign-in input:focus-visible, .roster-search:focus-within) { background: rgb(255 255 255 / 0.74); box-shadow: var(--rim-on); }
body.hub-page[data-surface="glass"] .note-text[readonly] { background: rgb(from var(--ink) r g b / 0.04); box-shadow: none; }
body.hub-page[data-surface="glass"] .pill-switch:not(.float-switch) { padding: 0; background: rgb(255 255 255 / 0.3); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] .pill-switch:not(.float-switch) button { height: 34px; padding: 0 14px; }
body.hub-page[data-surface="glass"] .pill-switch:not(.float-switch) button[aria-pressed="true"] { color: var(--ink); }
body.hub-page[data-surface="glass"] .pill-switch:not(.float-switch) .switch-lens { --glass-fill: var(--current-lens); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] :is(#roster-lens, #queue-lens, #step-lens, .list-lens) { --glass-fill: rgb(255 255 255 / 0.5); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] :is(#roster-lens, #queue-lens, #step-lens, .list-lens, .pill-switch:not(.float-switch) .switch-lens)::after { display: none; }
body.hub-page[data-surface="glass"] :is(.order-check i, .live-checks .icon) { background: rgb(255 255 255 / 0.45); box-shadow: var(--rim-fine); }
body.hub-page[data-surface="glass"] :is(.order-check input:checked + i, .live-checks i[data-chosen] .icon, .live-options i[data-chosen]) { background: var(--primary-glass); box-shadow: inset 0 0 0 1px rgb(from var(--accent-deep) r g b / 0.9), inset 0 0 0 2px rgb(255 255 255 / 0.28); color: #fff; }
body.hub-page[data-surface="glass"] .live-options i { background: rgb(255 255 255 / 0.36); box-shadow: var(--rim-fine); }
body.hub-page[data-surface="glass"] .source-chip { background: rgb(255 255 255 / 0.4); box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.14); }
body.hub-page[data-surface="glass"] button.source-chip { background: rgb(from var(--brand-blue) r g b / 0.13); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.42); }
body.hub-page[data-surface="glass"] .order-track { background: rgb(255 255 255 / 0.16); box-shadow: var(--rim); }
body.hub-page[data-surface="glass"] .order-fill { background: rgb(from var(--brand-blue) r g b / 0.18); box-shadow: var(--rim-on); }
body.hub-page[data-surface="glass"] .queue.slab[data-windowed]::after { mask: linear-gradient(#000 0 0) 0 0 / 100% calc(var(--frost-top) - var(--slab-bevel) + 1px) no-repeat; }
body.hub-page[data-surface="glass"] .pane.slab[data-windowed]::after { mask: var(--pane-windows) 0 0 / 100% 100% no-repeat; }
.list-backing { display: none; }
body.hub-page[data-surface="glass"] .queue[data-windowed] :is(#order-rows, #queue-rows) { min-height: 100%; }
body.hub-page[data-surface="glass"] .queue[data-windowed] .list-backing {
  display: block; position: absolute; inset: 0 0 auto 0; z-index: 1; pointer-events: none; background: var(--face);
  backdrop-filter: var(--face-frost); mask: var(--list-windows) 0 0 / 100% 100% no-repeat;
}
body.hub-page[data-surface="glass"] :is(.orders-pane, .pane)[data-windowed] .order-track { background: rgb(255 255 255 / 0.08); backdrop-filter: blur(2px) saturate(1.3); }
body.hub-page[data-surface="glass"] :is(.orders-pane, .pane)[data-windowed] .order-fill { background: rgb(from var(--control-tint) r g b / 0.34); }
body.hub-page[data-surface="glass"] :is(.orders-pane, .pane)[data-windowed] .order-track i { color: var(--ink-soft); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
body.hub-page[data-surface="glass"] :is(.orders-pane, .pane)[data-windowed] .order-track i[data-cell="reached"] { color: var(--confirmed); }
body.hub-page[data-surface="glass"] :is(.orders-pane, .pane)[data-windowed] .order-track i[data-cell="stuck"] { color: var(--waiting); }
body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip) { box-shadow: var(--rim-fine); }
body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="blocked"] { box-shadow: inset 0 0 0 1px rgb(from var(--waiting) r g b / 0.42), inset 0 0 0 2px rgb(255 255 255 / 0.7); }
body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip):is([data-tone="decide"], [data-tone="live"]) { box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.5), inset 0 0 0 2px rgb(255 255 255 / 0.7); }
body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="urgent"] { box-shadow: inset 0 0 0 1px rgb(from var(--failed) r g b / 0.5), inset 0 0 0 2px rgb(255 255 255 / 0.7); }
body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip)[data-tone="held"] { box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.08); }
body.hub-page[data-surface="glass"] :is(.profile-menu, .filter-menu) { border: 0; background: rgb(255 255 255 / 0.76); backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--rim), 0 20px 40px -20px rgb(from var(--ink) r g b / 0.42); }
body.hub-page[data-surface="glass"] .room-controls .room-end { box-shadow: inset 0 0 0 1px rgb(140 24 18 / 0.9), inset 0 0 0 2.5px rgb(255 255 255 / 0.26); }
@media (hover: hover) and (pointer: fine) {
  body.hub-page[data-surface="glass"] :is(.secondary, .icon-button, .case-back, .slot-list button:not([aria-pressed="true"]), .order-check):hover { border: 0; background: var(--button-glass-hover); }
  body.hub-page[data-surface="glass"] .view-row button[data-action="schedulePatient"]:hover,
  body.hub-page[data-surface="glass"] :is(.primary, .send-button):hover { background: rgb(from var(--accent-deep) r g b / 0.96); }
  body.hub-page[data-surface="glass"] #ask :is(.icon-button:not(.composer-mic), .secondary):hover { background: var(--button-glass-hover); }
  body.hub-page[data-surface="glass"] #ask :is(.primary, .send-button):hover { background: rgb(from var(--accent-deep) r g b / 0.96); }
  body.hub-page[data-surface="glass"] :is(.visit-block, .visit-chip):not([data-tone="held"]):hover { transform: none; filter: brightness(0.97) saturate(1.2); }
}

/* Thin, trackless scrollbars darken on hover. */
@supports selector(::-webkit-scrollbar) {
  html:has(.hub-page), .hub-page, .hub-page * { scrollbar-color: auto; scrollbar-width: auto; }
  html:has(.hub-page)::-webkit-scrollbar, .hub-page ::-webkit-scrollbar { width: 12px; height: 12px; }
  html:has(.hub-page)::-webkit-scrollbar-track, .hub-page ::-webkit-scrollbar-track { background: transparent; }
  html:has(.hub-page)::-webkit-scrollbar-thumb, .hub-page ::-webkit-scrollbar-thumb { border: 4px solid transparent; border-radius: 999px; background: rgb(from var(--brand-blue) r g b / 0.42) content-box; }
  .hub-page :hover::-webkit-scrollbar-thumb { background-color: rgb(from var(--brand-blue) r g b / 0.6); }
  html:has(.hub-page)::-webkit-scrollbar-thumb:hover, .hub-page ::-webkit-scrollbar-thumb:hover { background-color: rgb(from var(--accent-deep) r g b / 0.85); }
  html:has(.hub-page)::-webkit-scrollbar-corner, .hub-page ::-webkit-scrollbar-corner { background: transparent; }
}
@supports not selector(::-webkit-scrollbar) {
  html:has(.hub-page), .hub-page * { scrollbar-color: rgb(from var(--brand-blue) r g b / 0.5) transparent; scrollbar-width: thin; }
}
@media (hover: hover) {
  body.hub-page[data-surface="glass"] .view-row :is(.week-steps .icon-button:not(:disabled), .order-search, .case-back).glass:hover, body.hub-page[data-surface="glass"] .view-row .secondary:hover { background: rgb(255 255 255 / 0.32); }
}

.calls-tools { flex-wrap: wrap; }
.calls-pane { min-height: 300px; }
.call-row .queue-side { max-width: 24ch; white-space: normal; }
.call-outcome { color: var(--ink-soft); font-size: 0.8125rem; text-align: right; }
.calls-detail { margin-top: 18px; }
.calls-detail .call-pane { max-width: 100%; }
@media (max-width: 900px) {
  .call-row .queue-side { max-width: 100%; grid-auto-flow: row; }
  .call-outcome { text-align: left; }
  .calls-tools .order-search { width: 100%; }
}

/* Group supporting facts without punctuation chains. */
.meta-parts { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.meta-detail, .patient-next, .activity-action { display: block; }
.roster-line .meta-parts { flex-wrap: nowrap; gap: 10px; }
.visit-block-line .meta-parts { gap: 2px 8px; }

.call-group-title { padding: 14px 24px 6px; color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; }
#live-purpose { white-space: pre-line; }
.live-state time, .live-thread .message-meta time { margin-left: 10px; }


@media (max-width: 700px) {
  body[data-surface="glass"] .float-switch[aria-label="View"] button { height: 40px; padding: 0 10px; font-size: 0.8125rem; }
}

/* Video media uses the existing room surface and controls. */
.visit-video .room-remote { position: absolute; inset: 0; width: 100%; padding: 0; }
.visit-video [data-video-placeholder] { z-index: 2; display: grid; justify-items: center; align-self: center; gap: 10px; padding: 24px; }
.visit-video [data-video-placeholder][hidden] { display: none; }
.visit-video [data-video-participants] { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.visit-video [data-participant] { position: relative; display: grid; place-items: center; overflow: hidden; }
.visit-video [data-participant] > span { position: absolute; bottom: 90px; z-index: 1; }
.visit-video [data-participant] video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.visit-video [data-video-track="audio"] { display: none; }
.visit-video .room-top, .visit-video .room-controls, .visit-video .room-self { z-index: 3; }
.visit-video button[hidden] { display: none; }
.visit-video .room-controls button:disabled { opacity: .5; }
@media (max-width: 700px) {
  .visit-video .room-self { bottom: 100px; width: 110px; }
  .visit-video .room-controls { gap: 4px; max-width: calc(100% - 16px); }
  .visit-video .room-controls button { min-width: 40px; padding-inline: 10px; white-space: nowrap; }
  .visit-video .room-chip { flex-wrap: wrap; max-width: calc(100vw - 80px); }
}

#ask .composer-mic[aria-pressed="true"] { color: var(--accent-deep); background: var(--accent-wash); box-shadow: var(--rim-on); }

.active-call-notice { position: fixed; top: 78px; right: 24px; z-index: 28; width: min(360px, calc(100vw - 32px)); max-height: min(480px, calc(100dvh - 110px)); overflow-y: auto; padding: 18px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-overlay); color: var(--ink); animation: call-notice-arrive 220ms var(--ease-glide); }
.active-call-notice[hidden] { display: none; }
body[data-stage="opening"] .active-call-notice, body[data-stage="sign-in"] .active-call-notice { display: none; }
body[data-surface="glass"] .active-call-notice { background: rgb(from var(--wash) r g b / 0.95); backdrop-filter: blur(18px); }
.call-notice-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.call-notice-heading svg { width: 22px; height: 22px; color: var(--accent-deep); }
.call-notice-heading h2 { margin: 0; font: 400 1.5rem/1.1 var(--display); }
.call-notice-list { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; }
.call-notice-list li { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 10px 8px; align-items: start; }
.call-notice-person { min-width: 0; }
.call-notice-person strong { display: block; overflow-wrap: anywhere; font-size: .9375rem; }
.call-notice-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 5px; color: var(--ink-soft); font-size: .75rem; }
.call-notice-open { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 12px; font-size: .8125rem; }
.call-notice-open svg { width: 16px; height: 16px; }
.call-notice-dismiss { width: 32px; height: 32px; }
.call-notice-dismiss svg { width: 14px; height: 14px; }
@keyframes call-notice-arrive { from { opacity: .5; transform: translateY(-8px); } }
.notice-stack { position: fixed; top: 78px; right: 24px; z-index: 28; display: grid; gap: 12px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.notice-stack > .active-call-notice { position: static; width: auto; pointer-events: auto; }
.active-call-notice:not([hidden]) ~ .notice-stack { top: auto; bottom: 124px; }
body[data-stage="opening"] .notice-stack, body[data-stage="sign-in"] .notice-stack { display: none; }
.room-top { display: grid; justify-items: start; gap: 8px; }
.room-controls .room-handoff-button { padding: 0 20px; background: var(--accent); }
.visit-video .room-controls button { white-space: nowrap; }
.visit-video .room-handoff, .visit-video .room-presence { font-weight: 500; }
.visit-video .room-handoff[hidden], .visit-video .room-presence[hidden] { display: none; }
@media (max-width: 700px) { .active-call-notice, .notice-stack { top: 16px; right: 16px; } }
@media (prefers-reduced-motion: reduce) { .active-call-notice { animation: none; } }

.imaging-main { min-width: 0; }
.imaging-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.imaging-heading .pane-title { margin: 0; }
.imaging-heading > span { color: var(--ink-quiet); font-size: .8125rem; }
.imaging-viewer { min-width: 0; }
.imaging-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
.imaging-toolbar > strong { font-weight: 500; }
.imaging-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.imaging-controls .secondary { min-height: 34px; padding: 6px 12px; font-size: .75rem; }
.imaging-canvas { position: relative; height: clamp(300px, 56vh, 650px); overflow: auto; border-radius: 12px; background: #090a11; color: var(--wash); }
.imaging-image-wrap { width: 100%; height: 100%; }
.imaging-image-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; }
.imaging-error { position: absolute; inset: 35% 24px auto; text-align: center; }
.imaging-error[hidden] { display: none; }
.imaging-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; font-size: .75rem; color: var(--ink-quiet); }
.imaging-footer > div { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.imaging-footer a { color: var(--accent-deep); text-underline-offset: 3px; }
.imaging-thumbnails { display: grid; gap: 12px; }
.imaging-thumbnails button { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 8px; text-align: left; border-radius: 12px; background: var(--button-glass); box-shadow: var(--button-rim); color: var(--ink); }
.imaging-thumbnails button[aria-pressed="true"] { background: var(--accent-wash); box-shadow: var(--rim-on); color: var(--accent-deep); }
.imaging-thumbnails img { width: 76px; height: 76px; border-radius: 8px; object-fit: contain; background: #090a11; }
.imaging-viewer:fullscreen { box-sizing: border-box; width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 24px; background: var(--paper, #fff); color: var(--ink); }
.imaging-viewer:fullscreen .imaging-canvas { height: 100%; }
@media (max-width: 700px) {
  .imaging-toolbar { align-items: flex-start; }
  .imaging-canvas { height: 48vh; min-height: 260px; }
  .imaging-controls .secondary { min-height: 40px; padding-inline: 9px; }
}


.staff-help-pane header, .staff-help-detail header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-help-pane .thread-needs { list-style: none; padding: 0; }
.staff-help-pane .thread-needs button { width: 100%; overflow-wrap: anywhere; }
.staff-help-pane .thread-needs button span { color: var(--ink-soft); }
.staff-help-pane .inbox-group + .inbox-group { margin-top: 1rem; }
.staff-help-pane .inbox-group h3 { margin: .65rem 0 .35rem; font: inherit; font-weight: 600; }
.staff-help-pane .request-question { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.staff-help-detail { width: min(520px, calc(100vw - 28px)); max-height: 85dvh; margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgb(from var(--ink) r g b / 0.2); }
.staff-help-detail::backdrop { background: rgb(from var(--ink) r g b / 0.25); }
.staff-help-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.staff-help-detail .request-text { grid-column: 1 / -1; }
.staff-help-detail dt { font-size: 0.85rem; color: var(--ink-soft); }
.staff-help-detail dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-help-detail .form-label { margin-top: 16px; }
.staff-help-detail .need-actions, .staff-help-pane .need-actions { flex-wrap: wrap; }
.need-note { margin-top: 12px; }
.escalation-note-input, .reminder-input, .reminder-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-control);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 0.875rem;
}
.escalation-note-input:focus-visible, .reminder-input:focus-visible, .reminder-textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.reminder-editor { display: grid; gap: 18px; }
.reminder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.reminder-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 12px; }
.reminder-card h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.reminder-field { display: grid; gap: 6px; font-size: 0.8125rem; color: var(--ink-soft); }
.reminder-field > span { font-weight: 600; color: var(--ink); }
.reminder-checks { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.reminder-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--ink); }
.reminder-error { padding: 12px 14px; border-radius: 12px; background: rgb(from var(--failed) r g b / 0.08); color: var(--failed); font-size: 0.875rem; }
.pref-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.visit-video .room-invite { position: absolute; z-index: 4; left: 50%; bottom: 96px; translate: -50% 0; display: grid; gap: 10px; width: min(360px, calc(100% - 32px)); padding: 16px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-overlay); }
.visit-video .room-invite[hidden] { display: none; }
.visit-video .room-invite label { display: grid; gap: 4px; font-size: .8125rem; }
.visit-video .room-invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.visit-video .room-invite p { margin: 0; color: var(--ink-soft); font-size: .8125rem; overflow-wrap: anywhere; }
.visit-video .room-invite p:empty { display: none; }
.notice-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.notice-actions .call-notice-open { grid-column: auto; }
.visit-video [data-participant] > [data-participant-label] { left: 16px; padding: 4px 11px; border-radius: 999px; background: rgb(from var(--ink) r g b / 0.55); backdrop-filter: blur(8px); font-size: .8125rem; }
.visit-video:not([data-connection="connected"]):not([data-connection="reconnecting"]) .room-self { display: none; }

.brief-reading { max-width: 78ch; color: var(--ink); }
.brief-reading .reading-asof { font-size: .84rem; color: var(--ink-quiet); margin: .5rem 0 1.2rem; }
.reading-section { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.reading-section h3, .reading-more > summary { margin: 0; font-size: 1.19rem; font-weight: 600; line-height: 1.3; }
.reading-section dl { margin: .35rem 0 0; }
.reading-row { display: grid; grid-template-columns: minmax(7rem, 22%) minmax(0, 1fr); gap: .8rem; padding: .55rem 0; }
.reading-row dt { color: var(--ink-soft); font-size: .92rem; }
.reading-row dd { margin: 0; }
.reading-row dd > span, .brief-source blockquote { white-space: pre-line; }
.reading-row dd > small, .reading-row .brief-source { display: block; font-size: .8rem; margin-top: .2rem; }
.brief-source summary, .brief-source a { color: var(--accent-deep); cursor: pointer; }
.brief-source > div { border-left: 2px solid var(--line-strong); margin: .45rem 0; padding: .1rem .75rem; }
.brief-source blockquote { margin: .35rem 0; font-size: .92rem; color: var(--ink); }
.brief-source a { display: inline-block; margin-block: .3rem; text-decoration: underline; }
.reading-more > summary { cursor: pointer; }
.reading-more > summary small { font-size: .8rem; font-weight: 400; margin-left: .35rem; }
@media (max-width: 650px) {
  .reading-row { grid-template-columns: 1fr; gap: .12rem; }
  .reading-row dt { font-weight: 600; }
}
.connection-list { display: grid; gap: 12px; margin-top: 18px; max-width: 640px; }
.connection-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.connection-row > :not(.connection-who, .connection-state) { grid-column: 1 / -1; }
.connection-who { display: grid; gap: 2px; }
.connection-who .muted { font-size: 0.8125rem; }
.connection-state { align-self: start; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--wash-deep); color: var(--ink-soft); }
.connection-state[data-state="connected"] { background: var(--confirmed-wash); color: var(--confirmed); }
.connection-state[data-state="attention"] { background: var(--waiting-wash); color: var(--waiting); }
.connection-detail { margin: 0; font-size: 0.875rem; }
.spinner { display: inline-block; width: 0.85em; height: 0.85em; margin-right: 6px; vertical-align: -0.1em; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spinner-turn 0.8s linear infinite; }
@keyframes spinner-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.connection-form { display: grid; gap: 12px; max-width: 360px; }
.connection-note { margin: 0; font-size: 0.75rem; }

.team-page main { max-width: 960px; padding: 32px clamp(16px, 4vw, 40px); }
.team-page .case-back { text-decoration: none; }
.team-page .secondary:disabled { opacity: 0.5; cursor: default; }
.team-page .pane { padding: clamp(20px, 4vw, 36px); }
#team-members:not(:empty), #team-retry { margin-top: 20px; }
.team-member { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.team-member:last-child { padding-bottom: 0; }
.team-identity, .team-access { display: grid; gap: 2px; overflow-wrap: anywhere; }
.team-member .muted { font-size: 0.8125rem; }
#team-editor { max-width: 420px; }
#team-editor .dialog-subtitle { overflow-wrap: anywhere; }
#team-editor fieldset { display: grid; margin: 16px 0 0; padding: 0; border: 0; }
#team-editor label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
#team-editor input { width: 18px; height: 18px; margin: 0; }
#team-editor .need-actions { margin-top: 20px; }
#editor-error:empty, #team-status:empty { display: none; }
#editor-error:not(:empty) { margin-top: 12px; color: var(--failed); }
@media (max-width: 550px) {
  .team-member { grid-template-columns: minmax(0, 1fr) auto; }
  .team-access { grid-column: 1; }
  .team-member button { grid-column: 2; grid-row: 1 / 3; }
}
