/* Assurance health records.
   Light: the marketing site's plum, sky and lavender on white.
   Dark: the same plum taken down into four layered shades, so depth reads without borders.
   Every colour below is a token; screens never name a hex value. */

:root {
    --plum: #7a68b0;
    --plum-deep: #4a3c78;
    --sky: #3f9fd6;

    --bg: #f8f5ff;
    --surface: #ffffff;
    --surface-2: #f3eefc;
    --surface-3: #e9e2f8;
    --line: #e4dcf4;
    --ink: #322a52;
    --ink-2: #6a638a;
    --accent: #6a58a6;
    --accent-ink: #ffffff;
    --accent-soft: #efeafa;
    --link: #2f7fb3;
    --rail: #3b2f66;
    --rail-ink: #e9e3fb;
    --rail-on: rgba(255, 255, 255, .14);
    --good: #1f7a55; --good-bg: #e2f4ec;
    --warn: #8a5a00; --warn-bg: #fdf0d3;
    --bad: #a8323c;  --bad-bg: #fbe4e6;
    --info: #2b6f9e; --info-bg: #e1f0fa;
    --quiet: #615b7c; --quiet-bg: #eeeaf6;
    --shadow: 0 1px 2px rgba(74, 60, 120, .06), 0 6px 20px rgba(74, 60, 120, .07);
    --shadow-lift: 0 18px 50px rgba(50, 42, 82, .25);
    --hero: linear-gradient(120deg, #4a3c78, #7a68b0 55%, #3f9fd6);
    --radius: 14px;
    --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme='dark'] {
    --bg: #15111f;
    --surface: #1e1930;
    --surface-2: #272140;
    --surface-3: #332b52;
    --line: #3a3160;
    --ink: #ece8fa;
    --ink-2: #aaa2c8;
    --accent: #a898e0;
    --accent-ink: #1a1530;
    --accent-soft: #2e2650;
    --link: #86c8f2;
    --rail: #0f0c18;
    --rail-ink: #cfc8ea;
    --rail-on: rgba(168, 152, 224, .2);
    --good: #7fd6ac; --good-bg: #173a2c;
    --warn: #f1c46a; --warn-bg: #40300f;
    --bad: #f4a0a8;  --bad-bg: #4a1c24;
    --info: #8ccbf3; --info-bg: #17344a;
    --quiet: #b0a8cc; --quiet-bg: #2c2646;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lift: 0 18px 50px rgba(0, 0, 0, .6);
    --hero: linear-gradient(120deg, #2e2650, #4a3c78 55%, #2b6f9e);
}

* { box-sizing: border-box; margin: 0; }
html { font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; line-height: 1.3; }
p { max-width: 68ch; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }

/* ── Layout ─────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.demo-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 8px 20px; background: var(--warn-bg); color: var(--warn); font-size: .9rem; }
.demo-bar label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.demo-bar select { padding: 4px 8px; border-radius: 8px; border: 1px solid currentColor; background: var(--surface); color: var(--ink); max-width: 100%; }

.rail { background: var(--rail); color: var(--rail-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; grid-row: 2; }
.main { grid-row: 2; }
.demo-bar { grid-row: 1; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; background: #fff; object-fit: contain; }
.brand b { display: block; font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; font-size: .78rem; opacity: .75; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.navitem { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; text-align: left; opacity: .82; }
.navitem:hover { background: var(--rail-on); opacity: 1; }
.navitem.on { background: var(--rail-on); opacity: 1; font-weight: 700; box-shadow: inset 3px 0 0 var(--sky); }
.rail-foot { margin-top: auto; display: grid; gap: 12px; }
.me { display: flex; gap: 10px; align-items: center; padding: 0 4px; min-width: 0; }
.me b { display: block; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { opacity: .7; }
.me > div { min-width: 0; }
.rail-tools, .top-tools { display: flex; align-items: center; gap: 8px; }
.rail .btn.ghost, .rail .iconbtn { color: var(--rail-ink); border-color: rgba(255, 255, 255, .25); background: none; }

.main { min-width: 0; padding: 28px 32px 60px; }
.page { max-width: 1080px; display: grid; gap: 18px; }
.page-wide { max-width: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.sub { color: var(--ink-2); margin-top: 2px; }
.lede { color: var(--ink-2); }
.quiet { color: var(--ink-2); font-size: .92rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

/* ── Pieces ─────────────────────────────────────────────── */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 12px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid transparent; background: var(--surface-2); color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: none; border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.white { background: #fff; color: #4a3c78; }
.btn.sm { padding: 5px 12px; font-size: .88rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--accent-soft); }
.backlink { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--link); cursor: pointer; padding: 0; justify-self: start; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; background: var(--quiet-bg); color: var(--quiet); }
.tag[data-tone='good'] { background: var(--good-bg); color: var(--good); }
.tag[data-tone='warn'] { background: var(--warn-bg); color: var(--warn); }
.tag[data-tone='bad'] { background: var(--bad-bg); color: var(--bad); }
.tag[data-tone='info'] { background: var(--info-bg); color: var(--info); }

.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.rail .avatar { background: var(--rail-on); color: var(--rail-ink); }
.avatar.big { width: 56px; height: 56px; font-size: 1.15rem; }

.rows { list-style: none; padding: 0; display: grid; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li > div:not(.avatar) { flex: 1; min-width: 0; }
.rows b { display: block; }
.rows span:not(.tag):not(.avatar) { display: block; color: var(--ink-2); font-size: .9rem; }
.rows time { flex: none; width: 92px; font-weight: 700; color: var(--accent); font-size: .92rem; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .84rem; color: var(--ink-2); font-weight: 400; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.click tbody tr { cursor: pointer; }
.table.click tbody tr:hover { background: var(--accent-soft); }
.under { display: block; color: var(--ink-2); font-size: .84rem; font-weight: 400; }
.panel.flush { overflow-x: auto; }

.empty { padding: 30px 20px; text-align: center; color: var(--ink-2); display: grid; gap: 6px; justify-items: center; }
.empty strong { color: var(--ink); font-size: 1.05rem; }
.loading { padding: 30px; color: var(--ink-2); }
.note { padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: .92rem; max-width: none; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note .icon { vertical-align: -2px; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; }
.facts dt { color: var(--ink-2); }
/* A pair may be wrapped in a <div> (to show or hide it): the wrapper drops out of the grid, so labels line up. */
.facts > div { display: contents; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 999px; }
.meter > div.low { background: var(--bad); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-3); justify-self: start; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }

.field { display: grid; gap: 5px; }
.field > span { font-size: .88rem; color: var(--ink-2); }
input:not([type='checkbox']):not([type='radio']), select, textarea { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
textarea { resize: vertical; line-height: 1.45; }
textarea[readonly] { background: var(--surface-2); }
.search { max-width: 340px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; accent-color: var(--accent); }

.modal-back { position: fixed; inset: 0; z-index: 40; background: rgba(30, 22, 56, .55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { width: min(520px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lift); padding: 22px; display: grid; gap: 14px; }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 1.25rem; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 4px; }

/* ── Calendar ───────────────────────────────────────────── */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }
.cal-move { display: flex; align-items: center; gap: 8px; }
.cal-heading { margin-left: 8px; font-size: 1.1rem; }
.cal-who { display: flex; flex-wrap: wrap; gap: 6px; }
.who { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: none; cursor: pointer; color: var(--ink-2); }
.who i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ev); }
.who.on { color: var(--ink); background: var(--surface); }
.who.on i { background: var(--ev); }

.cal-scroll { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 230px); }
.cal-grid { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(118px, 1fr)); min-width: min-content; }
.cal-corner, .cal-colhead { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-colhead { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); display: flex; gap: 6px; justify-content: center; align-items: baseline; }
.cal-colhead span { color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.cal-colhead.is-today b { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 8px; }
.cal-times div { font-size: .78rem; color: var(--ink-2); text-align: right; padding: 0 8px; transform: translateY(-.6em); }
.cal-times div:first-child { visibility: hidden; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: cell;
    background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 58px; }
.cal-col.is-today { background-color: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.cal-event { position: absolute; overflow: hidden; text-align: left; padding: 3px 7px; border: 0; border-left: 4px solid var(--ev); border-radius: 7px; cursor: pointer;
    background: color-mix(in srgb, var(--ev) 20%, var(--surface)); color: var(--ink); line-height: 1.25; }
.cal-event:hover { background: color-mix(in srgb, var(--ev) 32%, var(--surface)); z-index: 2; }
.cal-event b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event span { display: block; font-size: .76rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.is-completed { opacity: .62; }
.cal-event.is-no_show { border-left-color: var(--bad); text-decoration: line-through; }
.cal-busy { position: absolute; border-radius: 7px; padding: 3px 7px; font-size: .76rem; color: var(--ink-2); pointer-events: none;
    background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.cal-request { position: absolute; overflow: hidden; text-align: left; padding: 3px 7px; border: 2px dashed var(--accent); border-radius: 7px; cursor: pointer;
    display: flex; flex-direction: column; justify-content: flex-start; gap: 2px;
    background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); font: inherit; }
.cal-request:hover, .cal-request:focus-visible { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); z-index: 2; }
.cal-request b { display: block; font-size: .84rem; line-height: 1.25; }
.cal-request span { display: block; font-size: .74rem; color: var(--ink-2); line-height: 1.3; }
.cal-chip.is-request { border: 1px dashed var(--accent); background: none; }
.cal-anyday { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 1; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-dow { padding: 8px 10px; font-size: .84rem; color: var(--ink-2); background: var(--surface-2); }
.cal-cell { min-height: 104px; padding: 6px; border: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: none; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:hover { background: var(--accent-soft); }
.cal-cell.out { color: var(--ink-2); background: var(--surface-2); }
.cal-date { font-weight: 700; font-size: .9rem; align-self: flex-start; padding: 0 6px; border-radius: 999px; }
.cal-cell.is-today .cal-date { background: var(--accent); color: var(--accent-ink); }
.cal-chip { font-size: .74rem; padding: 1px 6px; border-radius: 5px; border-left: 3px solid var(--ev); background: color-mix(in srgb, var(--ev) 18%, var(--surface)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .74rem; color: var(--ink-2); padding-left: 6px; }

/* ── Chart, messages, permissions ───────────────────────── */
.chart-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chart-head > div:nth-child(2) { flex: 1; min-width: 200px; }

.threads { display: grid; grid-template-columns: 260px minmax(0, 1fr); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 380px; }
.thread-list { list-style: none; padding: 8px; border-right: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.thread-list button { width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.thread-list button.on, .thread-list button:hover { background: var(--accent-soft); }
.thread-list b, .thread-list span { display: block; }
.thread-list span { color: var(--ink-2); font-size: .88rem; }
.thread { padding: 18px 20px; display: grid; gap: 14px; grid-template-rows: auto 1fr auto; }
.bubbles { display: grid; gap: 10px; align-content: start; }
.bubble { max-width: 78%; justify-self: start; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--surface-2); }
.bubble.mine { justify-self: end; border-radius: 16px 4px 16px 16px; background: var(--accent-soft); }
.bubble span { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink-2); }
.compose { display: flex; gap: 10px; align-items: flex-end; }

.matrix-scroll { overflow-x: auto; }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; min-width: 108px; }
.matrix td.changed { background: var(--warn-bg); }

/* ── Sign-in ────────────────────────────────────────────── */
.signin { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; padding: 22px clamp(16px, 4vw, 48px) 48px; gap: 28px; }
.signin-top { display: flex; justify-content: space-between; align-items: center; }
.signin .brand small { color: var(--ink-2); opacity: 1; }
.signin-body { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 560px); gap: clamp(24px, 5vw, 72px); justify-content: center; align-content: center; align-items: start; }
.signin-card { display: grid; gap: 14px; padding-top: 8px; }
.signin-card h1 { font-size: 2.1rem; }
.google-slot { min-height: 44px; }
.signin-demo { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 10px; }
.signin-demo h2 { font-size: 1.2rem; }
.signin-demo > p { color: var(--ink-2); }
.signin-demo ul { list-style: none; padding: 0; display: grid; gap: 4px; margin-top: 4px; }
.signin-demo button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.signin-demo button:hover { background: var(--accent-soft); }
.signin-demo b, .signin-demo i { display: block; font-style: normal; }
.signin-demo i { color: var(--ink-2); font-size: .9rem; }

/* ── Patient and parent side: a calmer, single-column shape ─ */
.app.is-family { display: flex; flex-direction: column; }
.fam-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.fam-top .brand small { color: var(--ink-2); opacity: 1; }
.fam-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.fam-nav .navitem { width: auto; padding: 8px 12px; border-radius: 999px; }
.fam-nav .navitem:hover, .fam-nav .navitem.on { background: var(--accent-soft); box-shadow: none; color: var(--accent); }
.fam-main { padding: 26px 16px 60px; }
.fam-page { max-width: 780px; margin: 0 auto; display: grid; gap: 18px; }
.people { display: flex; gap: 8px; flex-wrap: wrap; }
.people button { display: inline-flex; align-items: center; gap: 9px; padding: 5px 16px 5px 5px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; color: var(--ink-2); }
.people button.on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.people button.on .avatar { background: var(--accent); color: var(--accent-ink); }
.next-visit { background: var(--hero); color: #fff; border-radius: 22px; padding: 28px clamp(20px, 4vw, 34px); display: grid; gap: 8px; justify-items: start; }
.next-visit h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.next-visit p { opacity: .9; }
.next-visit .btn { margin-top: 10px; }

/* ── Small screens ──────────────────────────────────────── */
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
    .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; }
    .rail .brand small, .rail .me { display: none; }
    .rail nav { flex-direction: row; order: 3; width: 100%; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
    .rail .navitem { width: auto; white-space: nowrap; padding: 8px 12px; }
    .navitem.on { box-shadow: inset 0 -3px 0 var(--sky); }
    .rail-foot { margin: 0 0 0 auto; }
    .main { padding: 18px 14px 50px; grid-row: 3; }
    .split, .signin-body, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .threads { grid-template-columns: minmax(0, 1fr); }
    .thread-list { border-right: 0; border-bottom: 1px solid var(--line); }
    .cal-scroll { max-height: none; }
    .cal-cell { min-height: 64px; }
    .cal-chip { display: none; }
    .fam-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .fam-nav .navitem { white-space: nowrap; }
    .rows time { width: 74px; }
    h1 { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .modal { animation: rise .16s ease-out; }
    @keyframes rise { from { transform: translateY(8px); opacity: 0; } }
}

/* ── Notes and documents ────────────────────────────────── */
.head-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel-head.padded { padding: 14px 16px 0; }
.panel.flush > .note { margin: 10px 16px 0; }
.note-body { display: grid; gap: 16px; max-height: min(62vh, 640px); overflow: auto; padding-right: 6px; }
.note-section { border: 0; border-top: 2px solid var(--line); padding: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.note-section legend { font-weight: 700; font-size: 1.02rem; padding-right: 10px; color: var(--accent); }
.note-field label { display: grid; gap: 5px; }
.note-field label > span { font-size: .88rem; color: var(--ink-2); }
.note-field em { font-style: normal; color: var(--warn); }
.note-field.is-textarea, .note-field.is-multi_select, .note-section > .quiet { grid-column: 1 / -1; }
.note-field.is-checkbox label { grid-template-columns: 1fr auto; align-items: center; }
.note-field.lacking label > span { color: var(--bad); font-weight: 700; }
.note-field.lacking :is(input, select, textarea) { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: none; cursor: pointer; color: var(--ink-2); }
.chips button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.dropzone { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface-2); }
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone span { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 900px) { .note-section { grid-template-columns: minmax(0, 1fr); } }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px));
    padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); box-shadow: var(--shadow-lift); }
.toast .iconbtn { width: 28px; height: 28px; color: inherit; border-color: currentColor; flex: none; }

/* ── Forms ──────────────────────────────────────────────── */
.note-section.builder { grid-template-columns: minmax(0, 1fr); }
.form-text { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto auto; gap: 8px; align-items: center; }
.q-row.two { grid-template-columns: 1fr 1fr; }
.q-row .q-options { grid-column: 1 / -1; }
.q-tools { display: flex; gap: 4px; }
.q-tools .iconbtn { width: 30px; height: 30px; }
.q-tools .iconbtn:nth-child(1) .icon { transform: rotate(90deg); }
.q-tools .iconbtn:nth-child(2) .icon { transform: rotate(90deg); }
.inline { display: flex; gap: 8px; align-items: flex-start; }
.inline input { flex: none; margin-top: 3px; }
.who-row i { display: block; font-style: normal; color: var(--ink-2); font-size: .88rem; }
.signer { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; white-space: nowrap; }
.signer .icon { color: var(--good); }
.head-tools.end { justify-content: flex-end; }
input.signature { font-size: 1.3rem; font-style: italic; padding: 12px 14px; }
@media (max-width: 900px) { .q-row { grid-template-columns: minmax(0, 1fr) auto; } }

.q-row.three { grid-template-columns: minmax(0, 1fr) 90px 150px; }
@media (max-width: 900px) { .q-row.three { grid-template-columns: minmax(0, 1fr); } }

/* ── Guide and roles ────────────────────────────────────── */
.guide { display: grid; }
.guide section { border-top: 1px solid var(--line); }
.guide-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 2px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 700; }
.guide-q .icon { transition: transform .15s; color: var(--ink-2); }
.guide section.on .guide-q .icon { transform: rotate(90deg); }
.guide section.on .guide-q { color: var(--accent); }
.guide-a { padding: 0 2px 14px; display: grid; gap: 10px; justify-items: start; }
.guide-a ol { padding-left: 1.3em; display: grid; gap: 6px; max-width: 62ch; }
.cannot { display: grid; gap: 12px; }
.cannot > div { border-top: 1px solid var(--line); padding-top: 10px; }
.cannot dt { font-weight: 700; }
.cannot ul { padding-left: 1.2em; }
.matrix th.off { opacity: .55; }
.matrix th .tag { margin-top: 4px; }

.note.alert { display: grid; gap: 10px; }

.login-tools { display: inline-flex; flex-direction: column; gap: 4px; align-items: center; }
.rows li > .head-tools { flex: none; }

/* ── Practice run ───────────────────────────────────────── */
.exercises, .session { list-style: none; padding: 0; display: grid; }
.exercises li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.exercises li > div { flex: 1; min-width: 0; }
.exercises b, .exercises span:not(.tick) { display: block; }
.exercises div span { color: var(--ink-2); font-size: .9rem; }
.tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.exercises li.done .tick { background: var(--good); border-color: var(--good); color: var(--surface); }
.exercises li.done b { color: var(--ink-2); text-decoration: line-through; }
.session li { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); justify-items: start; }
.session li > div { display: flex; gap: 10px; align-items: baseline; }
.session i { font-style: normal; color: var(--ink-2); font-size: .88rem; }
.fam-page.wide { max-width: 1080px; }
a.btn { text-decoration: none; }

/* ── Claims and patient information ─────────────────────── */
.claim-no { font-variant-numeric: tabular-nums; white-space: nowrap; }
.claim-steps { list-style: none; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.claim-steps li { position: relative; padding: 4px 0 12px 18px; }
.claim-steps li::before { content: ''; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.claim-steps b, .claim-steps span { display: block; }
.claim-steps span { color: var(--ink-2); font-size: .9rem; }
.versions li { padding: 6px 0; }

/* One login, several practices: the practice chooser on the patient side. */
.practices { display: grid; gap: 6px; margin-bottom: 14px; }
.practices .quiet { margin: 0; }

/* Sign-in page: the patient section and the reset link. */
.signin-sub { font-size: 1rem; margin: 22px 0 6px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; cursor: pointer; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.rows.logins li { flex-wrap: wrap; row-gap: 8px; }
.rows.logins li > div { flex: 1 1 100%; }

/* Family linking and small check rows. */
label.check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.rows.pick { margin: 10px 0 0; max-height: 300px; overflow: auto; }
.note > .btn { margin-left: 8px; }

/* Family screen: your family on the left, your practices on the right. */
.fam-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.fam-cols > :only-child { grid-column: 1 / -1; max-width: 780px; margin: 0 auto; width: 100%; }
.fam-cols .stack { display: grid; gap: 18px; }
@media (max-width: 860px) { .fam-cols { grid-template-columns: 1fr; } }
.avatar.ghost { background: transparent; border: 1.5px dashed var(--line); color: var(--ink-2); }
.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-lists h3 { font-size: .95rem; margin: 0 0 6px; }
.two-lists ul { margin: 0; padding-left: 18px; }
@media (max-width: 560px) { .two-lists { grid-template-columns: 1fr; } }

/* Long forms: the dialog never grows past the screen; the title and the buttons stay in view while the form scrolls. */
.modal-back { place-items: start center; }
.modal { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; margin: auto 0; }
.modal-head { position: sticky; top: -22px; z-index: 2; background: var(--surface); margin: -22px -22px 0; padding: 22px 22px 10px; border-radius: 18px 18px 0 0; }
.modal-foot { position: sticky; bottom: -22px; z-index: 2; background: var(--surface); margin: 0 -22px -22px; padding: 12px 22px 22px; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; }
.form-page { font-weight: 700; color: var(--ink-2); font-size: .85rem; margin: 0; }
.form-text + .form-text { margin-top: 12px; }
.thread-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.note-body { padding-bottom: 10px; scroll-padding-bottom: 16px; }
.note-body > :last-child { margin-bottom: 4px; }

/* Assurance staff inside a practice: always visible, never mistaken for the practice's own login. */
.support-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--ink); color: #fff; font-size: .95rem; }
.padded { padding: 14px 18px 0; }
.app:has(> .support-bar) { grid-template-rows: auto auto 1fr; }
.app:has(> .support-bar) > .support-bar { grid-row: 2; }
.app:has(> .support-bar) > .rail, .app:has(> .support-bar) > .main { grid-row: 3; }
.app:has(> .support-bar) > .rail { height: auto; min-height: 100%; }
@media (max-width: 760px) { .app:has(> .support-bar) > .main { grid-row: 4; } }

/* Provider profiles: the description keeps its width, the picker sits beside or under it. */
.rows.profile-rows li { flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.rows.profile-rows li > div { flex: 1 1 300px; min-width: 0; }
.rows.profile-rows select { flex: 0 1 290px; width: auto; }

/* Patient search and ready-made documents. */
.picked { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.patient-search { grid-column: 1 / -1; }
.draft-text { font-family: Georgia, 'Times New Roman', serif; line-height: 1.55; min-height: 280px; }
.quiet.todo { color: var(--warn); font-weight: 700; }

/* A patient's billing at a glance. */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.stat b { font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--ink-2); font-size: .9rem; }
.stat.warn b { color: var(--warn); }

.padded-note { margin: 12px 18px 0; }

/* Shortcut hint on a button, and a small heading inside a panel. */
.btn .key { margin-left: 8px; padding: 0 6px; border-radius: 6px; font-size: .75rem; line-height: 1.5; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); }
.sub-head { font-size: .95rem; margin: 16px 0 4px; color: var(--ink-2); }

/* Group sessions. */
.cal-event.is-group { border-left-width: 6px; border-left-style: double; }
.group-pick { grid-column: 1 / -1; display: grid; gap: 8px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 14px; }
.group-count { margin: 0; }
.rows.group-members li { flex-wrap: wrap; row-gap: 8px; }
.rows.group-members li > div { flex: 1 1 180px; }

/* The second look before signing. */
.confirm-body { display: grid; gap: 10px; }
.confirm-body p { margin: 0; }

.indent { margin-left: 26px; }
label.check.indent { margin-left: 26px; }

/* Today: visits that open, and the next open times. */
.rows.visits li, .rows li:has(> .visit-row) { display: block; padding: 0; }
.visit-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 4px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.visit-row:hover { background: var(--surface-2); }
.visit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visit-row > div { flex: 1; min-width: 0; display: grid; }
.visit-row > div span { color: var(--ink-2); font-size: .9rem; }
.visit-row time { font-weight: 700; color: var(--accent); min-width: 74px; }
.rows.visits li.open { background: var(--surface-2); border-radius: 12px; }
.visit-more { padding: 0 12px 14px 92px; display: grid; gap: 8px; }
.who-is { margin: 0; font-size: .95rem; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .visit-more { padding-left: 12px; } }
.open-tools { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.open-tools .field { min-width: 190px; }
.soonest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); }
.soonest b { font-size: 1.15rem; }
.open-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.open-days li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.open-days li > b { display: grid; }
.open-days li > b span { font-weight: 400; color: var(--ink-2); font-size: .88rem; }
.open-days li > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.open-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.open-chip i { font-style: normal; font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.open-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.open-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Settings → Online booking editor: one column inside its box, a card per service. */
.booking-editor { min-width: 0; }
.svc-set { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.svc-set legend { font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; padding: 0; }
.svc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.svc-row > .svc-remove { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
/* Online booking (Part S): picked time, days of open times, a visit's Cancel / Move */
.open-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.open-chip[aria-pressed="true"] i { color: var(--accent-ink); }
.fam-slots { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.slot-day { font-weight: 700; margin: 10px 0 4px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.visit-changes { display: inline-flex; gap: 6px; margin-left: auto; }
@media (max-width: 620px) { .open-days li { grid-template-columns: 1fr; } }

/* Calendar: show the hours before and after the usual day. */
.cal-hours { display: flex; gap: 6px; }
.cal-hours .who:disabled { opacity: 1; cursor: default; }
/* Show the first and the last hour of the day, so it is plain where the calendar starts and ends. */
.cal-times div:first-child { visibility: visible; transform: translateY(2px); }
.cal-times .cal-end { height: 0; transform: translateY(-1.5em); }
.cal-foot { margin: 10px 4px 0; }
.cal-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Long lists: how to look at them, and group headings inside the table. */
.list-tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin-bottom: 8px; }
.list-tools .field { min-width: 170px; margin: 0; }
.list-count { margin: 0 0 10px; }
.table .group-row th { text-align: left; background: var(--surface-2); font-size: .95rem; padding: 9px 16px; color: var(--ink); }
.table .group-row th span { margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 400; font-size: .85rem; }
.signer.waiting { font-weight: 700; }

.pay-ways { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Business hours: the one-time setup on the calendar, the editor, and the greyed-out time. */
.hours-setup { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding: 16px 20px; margin-bottom: 14px; border: 2px solid var(--accent); }
.hours-setup p { margin: 4px 0 0; }
.hours-setup-form { display: grid; gap: 10px; width: 100%; }
.hours-editor { display: grid; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 150px 130px auto 130px; gap: 10px; align-items: center; }
.hours-row .closed { grid-column: 2 / -1; }
.hours-row label.check { margin: 0; }
@media (max-width: 560px) { .hours-row { grid-template-columns: 1fr 1fr; } .hours-row label.check { grid-column: 1 / -1; } .hours-row span { display: none; } }
.hours-words { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 2px; }
.cal-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(120, 110, 150, .16) 0 8px, rgba(120, 110, 150, .08) 8px 16px); pointer-events: none; z-index: 0; }
.cal-col:has(.cal-closed) { background: var(--surface); }

/* A screen that is switched off for a while. */
.maint { max-width: 620px; margin: 40px auto; padding: 36px 32px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.maint .icon { color: var(--accent); }
.maint h1 { font-size: 1.5rem; margin: 0; }
.maint-line { font-size: 1.15rem; font-weight: 700; margin: 0; }
.maint p { margin: 0; }
.nav-off { margin-left: auto; font-style: normal; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }

/* Messages: what is new, and tools above the list. */
.thread-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.thread-list .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d1343f; margin-right: 8px; vertical-align: baseline; }
.thread-list button.unread b { font-weight: 800; }
.thread-none { display: grid; place-items: center; }
.nav-new { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d1343f; color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center; }
.fam-nav .nav-new { margin-left: 6px; }
.threads { grid-template-columns: 320px minmax(0, 1fr); }
@media (max-width: 760px) { .threads { grid-template-columns: minmax(0, 1fr); } }
.nav-new::after { content: attr(data-n); }
.nav-off::after { content: 'Paused'; }

/* Completed appointments: the patient's name opens the visit. */
.name-link { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; text-align: left; }
.name-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.notes-on-file { max-height: 260px; }
.notes-on-file li { display: block; padding: 0; }

/* Notes from the office, on Today. */
.office-notes li { align-items: flex-start; }
.office-notes li > div { display: grid; gap: 2px; }
.office-notes p { margin: 0; }
.office-notes span { color: var(--ink-2); font-size: .88rem; }
.office-notes li.fresh { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 0 -12px; }
.office-notes .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d1343f; margin-right: 8px; }
.office-notes.posted li { opacity: .92; }

.panel-head .count { margin-left: 6px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .85rem; font-weight: 700; }
.page > .panel + .panel { margin-top: 18px; }

/* Column headings that sort the list. */
.sort-head { background: none; border: 0; padding: 0; font: inherit; color: inherit; font-weight: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.sort-head i { font-style: normal; font-size: .7rem; width: 10px; color: var(--accent); }
.sort-head:hover, .sort-head.on { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sort-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* The note window: big enough to read and write in comfortably, with a text size control. */
.modal.big { width: min(1180px, 100%); min-height: min(86dvh, 900px); align-content: start; }
.modal.big .note-body { max-height: none; overflow: visible; padding-right: 0; }
.modal-tools { display: inline-flex; align-items: center; gap: 10px; }
.text-size { display: inline-flex; gap: 4px; }
.text-size .iconbtn { width: auto; min-width: 40px; padding: 0 8px; font-weight: 800; font-size: .95rem; }
.note-body.text-1 { font-size: 1.05rem; }
.note-body.text-2 { font-size: 1.22rem; }
.note-body.text-3 { font-size: 1.42rem; }
.note-body.text-1 textarea, .note-body.text-1 input, .note-body.text-1 select { font-size: 1.05rem; }
.note-body.text-2 textarea, .note-body.text-2 input, .note-body.text-2 select, .note-body.text-2 .chips button { font-size: 1.22rem; line-height: 1.5; }
.note-body.text-3 textarea, .note-body.text-3 input, .note-body.text-3 select, .note-body.text-3 .chips button { font-size: 1.42rem; line-height: 1.5; }
.note-body textarea { min-height: 5.5em; }
.note-body.text-2 legend, .note-body.text-3 legend { font-size: 1em; }
.note-body.text-2 .note-field label > span, .note-body.text-3 .note-field label > span { font-size: .82em; }
.modal.big .quiet, .modal.big .note { font-size: 1rem; }

.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
ul.plain { padding-left: 18px; margin: 8px 0 14px; }
ul.plain li { margin: 4px 0; }

/* A text-style button: asking about a note, opening an attached note. */
.linkbtn { background: none; border: 0; padding: 4px 6px; color: var(--accent, #3f6fd6); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; }
.linkbtn:hover, .linkbtn:focus-visible { text-decoration-thickness: 2px; }
.bubble .linkbtn { display: block; margin: 4px 0 0; padding-left: 0; color: inherit; }
.list-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.list-tools label, .list-sort { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }

/* ── Meetings and events: outlined, so a glance tells them from patient visits ── */
.cal-meet { position: absolute; overflow: hidden; text-align: left; padding: 3px 7px; border: 1.5px solid var(--ev); border-radius: 7px; cursor: pointer; z-index: 1;
    background: color-mix(in srgb, var(--ev) 9%, var(--surface)); color: var(--ink); line-height: 1.25; }
.cal-meet:hover { background: color-mix(in srgb, var(--ev) 20%, var(--surface)); z-index: 2; }
.cal-meet b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-meet span { display: block; font-size: .76rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-meet.is-hidden, .cal-allday-chip.is-hidden { border-style: dashed; color: var(--ink-2); background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.who.meet { --ev: var(--ink-2); }
.who.meet i { border-radius: 3px; }
.cal-allday-label { font-size: .74rem; color: var(--ink-2); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cal-allday { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-allday-chip { font: inherit; font-size: .76rem; text-align: left; padding: 2px 7px; border-radius: 6px; border: 1.5px solid var(--ev); cursor: pointer;
    background: color-mix(in srgb, var(--ev) 14%, var(--surface)); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.is-meet { border-left: 0; border: 1px solid var(--ev); background: color-mix(in srgb, var(--ev) 9%, var(--surface)); }
.cal-colhead.is-office span { font-style: italic; }
.event-who { border: 0; padding: 0; margin: 10px 0; display: grid; gap: 4px; }
.event-who legend { font-weight: 700; margin-bottom: 4px; }
.pick-people { list-style: none; margin: 2px 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; }
.facts dd.pre { white-space: pre-wrap; }
.modal .seg { margin-bottom: 12px; }

/* ── Developer screens ── */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-bottom: 8px; }
.filters .field { min-width: 180px; margin: 0; }
.filters label.check { margin-bottom: 10px; }
.fix-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.fix-form input { width: 130px; }
.fix-form .note { flex-basis: 100%; margin: 4px 0 0; text-align: left; }
.errors-table td .under, .health-table td .under { display: block; font-size: .8rem; color: var(--ink-2); max-width: 420px; overflow-wrap: anywhere; }

/* ── Review list, Nov 21 ───────────────────────────────── */
/* Long tables scroll inside their own box with the headings held at the top, and the scroll bar is always visible. */
.panel.flush { overflow: auto; max-height: min(78vh, 900px); }
.modal .panel.flush { max-height: none; }
.panel.flush .table thead th { position: sticky; top: 0; z-index: 2; }
.panel.flush, .cal-scroll, .matrix-scroll { scrollbar-width: auto; scrollbar-color: var(--accent) var(--surface-2); }
.panel.flush::-webkit-scrollbar, .cal-scroll::-webkit-scrollbar, .matrix-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.panel.flush::-webkit-scrollbar-thumb, .cal-scroll::-webkit-scrollbar-thumb, .matrix-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; border: 3px solid var(--surface-2); }
.panel.flush::-webkit-scrollbar-track, .cal-scroll::-webkit-scrollbar-track, .matrix-scroll::-webkit-scrollbar-track { background: var(--surface-2); }
/* Pages with many panels fill two balanced columns instead of one long side. */
.flow { columns: 2 400px; column-gap: 18px; }
.flow > * { break-inside: avoid; margin-bottom: 18px; width: 100%; }
.flow > .wide-row { column-span: all; }
/* Time boxes: typed or picked, always wide enough to read. */
.field > span.timebox, .timebox { display: grid; gap: 4px; font-size: inherit; color: inherit; min-width: 8.5em; }
.timebox-bad { color: var(--bad); font-size: .82rem; }
.hours-row .timebox { min-width: 7.5em; }
/* A folding panel. */
.fold { gap: 0; }
.fold-head { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.fold-head h2 { margin-right: auto; }
.fold-head .icon { transition: transform .15s; color: var(--ink-2); }
.fold.is-open .fold-head { margin-bottom: 12px; }
.fold.is-open .fold-head .icon { transform: rotate(90deg); }
/* The Assurance banner keeps its contrast in both themes. */
:root { --banner-bg: #322a52; --banner-ink: #ffffff; }
:root[data-theme='dark'] { --banner-bg: #f1c46a; --banner-ink: #1a1530; }
.support-bar { background: var(--banner-bg); color: var(--banner-ink); }
.support-bar .btn.white { background: var(--banner-ink); color: var(--banner-bg); border-color: transparent; }
/* Health records | Assurance portal. */
.place-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .1); font-size: .82rem; }
.place-switch a, .place-switch span { text-align: center; padding: 6px 4px; border-radius: 9px; color: inherit; text-decoration: none; line-height: 1.2; }
.place-switch span { background: var(--rail-on); font-weight: 700; }
.place-switch a:hover { background: rgba(255, 255, 255, .08); }
.fam-top .place-switch { display: none; }
/* Rows that open up in a table (a patient's visit, a billing request). */
.table tr.is-open > td { background: var(--accent-soft); }
.table tr.visit-more > td { background: var(--surface-2); padding: 16px 18px 20px; }
.visit-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; align-items: start; }
.visit-more-grid h3 { font-size: .95rem; margin-bottom: 8px; }
.issue-fix { display: grid; gap: 12px; max-width: 720px; }
.dropzone.small { padding: 14px; }
.dx-chosen li { flex-wrap: wrap; }
.add-answer-note { justify-self: start; font-size: .86rem; margin-top: 4px; }
.answer-note { margin-top: 6px; font-size: .95em; }
.draft-state { margin-right: auto; align-self: center; font-size: .86rem; color: var(--ink-2); }
.draft-state.is-failed { color: var(--bad); }
.list-tools.padded { padding: 12px 16px 0; }
/* Analytics: one line per measure, crosshair and tooltip on hover. */
.stat small { display: block; margin-top: 4px; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.trend { display: grid; gap: 8px; margin: 0; }
.trend figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.trend-plot { position: relative; }
.trend svg { width: 100%; height: 160px; display: block; overflow: visible; }
.trend .grid { stroke: var(--line); stroke-width: 1; }
.trend .axis { fill: var(--ink-2); font-size: 11px; }
.trend .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.trend .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.trend .cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.trend .tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); border-radius: 8px; padding: 6px 10px; font-size: .85rem; display: grid; pointer-events: none; white-space: nowrap; }
.receipt-frame { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
/* Test video visit. */
.video-room { position: relative; display: grid; border-radius: 14px; overflow: hidden; background: #15111f; min-height: 360px; }
.video-main { display: grid; place-items: center; min-height: 360px; color: #ece8fa; }
.video-wait { display: grid; gap: 8px; justify-items: center; text-align: center; max-width: 36ch; padding: 20px; }
.video-self { position: absolute; right: 14px; bottom: 14px; width: min(260px, 40%); aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #272140; border: 2px solid rgba(255, 255, 255, .25); }
.video-self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.video-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px; color: #ece8fa; font-size: .85rem; background: #272140; }
.video-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mic-level { width: 90px; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mic-level i { display: block; height: 100%; background: var(--good); }
/* Settings, Financials, and the sign-in demo. */
.table-box { overflow: auto; max-height: 420px; border: 1px solid var(--line); border-radius: 10px; }
.pager { display: flex; gap: 12px; align-items: center; }
.bars { list-style: none; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 9em 1fr 7em; gap: 10px; align-items: center; }
.bars i { display: block; height: 10px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.team-demo { margin-top: 14px; }
.team-demo summary { cursor: pointer; color: var(--ink-2); }
.check.everyone { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
/* Practice run: courses in chapters, and the guide on top of the real screen. */
.course { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.chapters { display: grid; gap: 10px; position: sticky; top: 16px; }
.chapters ol { list-style: none; padding: 0; display: grid; gap: 6px; }
.chapters button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: inherit; }
.chapters button span { font-size: .78rem; color: var(--ink-2); }
.chapters button small { color: var(--ink-2); }
.chapters button.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 760px) { .course { grid-template-columns: minmax(0, 1fr); } .chapters { position: static; } }
.guide-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.guide-ring { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--sky), 0 0 0 9999px rgba(30, 22, 56, .28); transition: all .2s ease; }
.guide-arrow { position: fixed; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; }
.guide-arrow.down { border-bottom: 12px solid var(--sky); }
.guide-arrow.up { border-top: 12px solid var(--sky); }
.guide-bubble { position: fixed; width: min(340px, calc(100vw - 24px)); pointer-events: auto; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lift); border: 2px solid var(--sky); padding: 12px 14px; display: grid; gap: 8px; transition: top .2s ease, left .2s ease; }
.guide-bubble header { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--ink-2); }
.guide-bubble footer { display: flex; justify-content: flex-end; gap: 14px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .guide-ring, .guide-bubble { transition: none; } }
tr.flagged > td { background: var(--bad-bg); }
.panel.flush > .panel-head:not(.padded) { padding: 16px 18px 10px; }
/* Video visit transcription. */
.rec-badge { position: absolute; left: 14px; top: 14px; display: inline-flex; gap: 8px; align-items: center; background: rgba(0, 0, 0, .6); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: .85rem; }
.rec-badge i { width: 10px; height: 10px; border-radius: 50%; background: #f4525e; }
@media (prefers-reduced-motion: no-preference) { .rec-badge i { animation: rec 1.2s ease-in-out infinite; } }
@keyframes rec { 50% { opacity: .35; } }
.transcribe-test { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.transcript { list-style: none; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.transcript li { display: grid; grid-template-columns: 4.5em 1fr; gap: 10px; }
.transcript time { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.notice { border-left: 4px solid var(--accent); padding: 8px 14px; background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.video-start { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
details.about summary { cursor: pointer; color: var(--link); }
.about-transcription { margin-top: 8px; }

/* Review list 2 (Nov 22): reserved holds, waitlist, group drill-down, error detail, ticket details */
.cal-meet.is-reserved { border-style: dashed; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ev) 14%, var(--surface)) 0 7px, var(--surface) 7px 14px); }
.reserve-row { align-items: end; }
.panel-pad { padding: 10px 16px 0; margin: 0; }
.group-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding-bottom: 10px; }
.group-head div { display: flex; flex-direction: column; }
.group-head b { font-size: 1.1rem; }
.table.inner { background: var(--surface-2); border-radius: 8px; }
.table.click .table.inner tbody tr { cursor: default; }
.table.click .table.inner tbody tr:hover { background: none; }
.table tr.is-muted td { color: var(--ink-2); opacity: .6; }
.facts.tech dd ul { margin: 0; }
.tech-box { margin: 6px 0 10px; }
.tech-box summary { cursor: pointer; color: var(--link); }
.work-notes li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.work-notes p { margin: 2px 0 0; }
.waitlist td .under a, a.under { display: block; }
@media (max-width: 760px) { .group-head { gap: 12px; } .waitlist { font-size: .9rem; } }

/* Changing one line of a form, a rating scale or a letter */
.one-line { list-style: none; margin: 0 0 16px; padding: 0; }
.one-line > li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--line, #e3e6ea); }
.one-line > li.is-fixed { opacity: .65; }
.one-line-text { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.one-line-edit { flex: 1; display: grid; gap: 8px; }
.one-line-edit input { width: 100%; }
.scale-q label.inline { display: block; margin: 4px 0; }

/* The payment company's card form sits in this box */
.card-box { min-height: 24px; margin: 12px 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* A bill that was paid twice: the office owes a refund */
.under.note-bad { color: var(--bad, #b42318); font-weight: 600; }

/* ── Website: the practice page editor (screens/website.js) ───────────────── */
.wb-page { max-width: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wb-start { max-width: 860px; gap: 16px; }
.wb-q { display: grid; grid-template-columns: 34px 1fr; gap: 6px 14px; align-items: start; }
.wb-q > b { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-top: 18px; }
.wb-q > .field + .field { grid-column: 2; }
.wb-addr { display: flex; align-items: center; gap: 4px; }
.wb-addr span { color: var(--ink-2); white-space: nowrap; }
.wb-themes { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 12px; }
.wb-theme { display: grid; gap: 4px; text-align: left; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; color: var(--ink); }
.wb-theme.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wb-theme small { color: var(--ink-2); }
.wb-mini { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: 14px 10px 10px 16px; gap: 5px 8px; height: 84px; padding: 10px; border-radius: 8px; background: color-mix(in srgb, var(--b) 6%, white); }
.wb-mini i { grid-row: 1 / 5; background: color-mix(in srgb, var(--b) 35%, white); }
.wb-mini i.s-rounded { border-radius: 10px; } .wb-mini i.s-blob { border-radius: 46% 54% 40% 60% / 55% 40% 60% 45%; } .wb-mini i.s-square { border-radius: 0; }
.wb-mini em { background: var(--b); border-radius: 3px; opacity: .85; } .wb-mini em + em { opacity: .35; }
.wb-mini u { background: var(--b); border-radius: 999px; width: 70%; }
.wb { display: grid; gap: 12px; }
.wb-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); padding: 10px 12px; border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 3; }
.wb-spacer { flex: 1; }
.wb-save { font-size: .88rem; color: var(--ink-2); } .wb-save.is-error { color: var(--bad); } .wb-save.is-dirty { color: var(--warn); }
.wb-switches { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; background: var(--surface); padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.wb-addr-live { flex-basis: 100%; }
.wb-switch { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.wb-switch small { display: block; color: var(--ink-2); font-size: .82rem; }
.wb-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.wb-blocks, .wb-options { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; position: sticky; top: 64px; max-height: calc(100vh - 90px); overflow: auto; }
.wb-blocks h2, .wb-options h2 { font-size: 1rem; margin: 0 0 8px; }
.wb-blocks ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wb-blocks li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; }
.wb-blocks li.on { background: var(--accent-soft); border-color: var(--accent); }
.wb-blocks li.off .wb-name { color: var(--ink-2); text-decoration: line-through; }
.wb-handle { color: var(--ink-2); cursor: grab; font-size: .8rem; letter-spacing: -2px; }
.wb-name { border: 0; background: none; text-align: left; padding: 4px 2px; cursor: pointer; color: var(--ink); font: inherit; }
.wb-moves { display: flex; } .wb-moves .iconbtn { font-size: .62rem; padding: 2px 4px; }
.wb-preview { background: var(--surface-3); border-radius: var(--radius); padding: 10px; display: flex; justify-content: center; overflow: hidden; }
.wb-preview iframe { flex: none; border: 0; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.wb-options { display: grid; gap: 12px; align-content: start; }
.wb-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wb-layout { border: 2px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px; cursor: pointer; display: grid; gap: 4px; color: var(--ink); }
.wb-layout.on { border-color: var(--accent); }
.wb-layout .pic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 34px; }
.wb-layout .pic i { background: var(--surface-3); border-radius: 2px; } .wb-layout .pic i:first-child { background: var(--accent); opacity: .55; grid-row: 1 / 3; }
.wb-layout.l-photo_right .pic i:first-child { grid-column: 2; } .wb-layout.l-photo_behind .pic i:first-child, .wb-layout.l-band .pic i:first-child, .wb-layout.l-centered .pic i:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
.wb-layout.l-list .pic, .wb-layout.l-rows .pic, .wb-layout.l-stacked .pic, .wb-layout.l-text .pic, .wb-layout.l-open .pic, .wb-layout.l-simple .pic { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
.wb-layout.l-list .pic i:first-child, .wb-layout.l-rows .pic i:first-child, .wb-layout.l-stacked .pic i:first-child, .wb-layout.l-text .pic i:first-child, .wb-layout.l-open .pic i:first-child, .wb-layout.l-simple .pic i:first-child { grid-row: auto; }
.wb-layout small { font-size: .72rem; }
.wb-bgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wb-bg { border: 2px solid var(--line); border-radius: 8px; padding: 3px; background: var(--surface); cursor: pointer; display: grid; gap: 2px; color: var(--ink); }
.wb-bg.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.wb-bg span { height: 38px; border-radius: 5px; background: var(--surface-2) center/cover; }
.wb-bg.none span { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--surface) 4px, var(--surface) 8px); }
.wb-bg small { font-size: .7rem; }
.wb-pair { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.wb-photo-row { display: flex; gap: 10px; align-items: center; }
.wb-photo-row img, .wb-photo-empty { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font-size: .75rem; color: var(--ink-2); }
.wb-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; } .wb-card summary { cursor: pointer; font-weight: 700; } .wb-card summary small { color: var(--ink-2); font-weight: 400; }
.wb-look { display: grid; gap: 18px; } .wb-look h3 { margin: 0 0 8px; }
.wb-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wb-sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; } .wb-sw.on { box-shadow: 0 0 0 3px var(--ink); }
.wb-swatches input[type=color] { width: 44px; height: 32px; border: 0; background: none; padding: 0; cursor: pointer; }
.wb-sample { display: flex; gap: 14px; align-items: center; padding: 12px; background: #fff; border-radius: 8px; border: 1px solid var(--line); margin: 8px 0; }
.wb-sample .btnlike { background: var(--b); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; } .wb-sample .linklike { color: var(--a); text-decoration: underline; }
.wb-fonts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.wb-font { text-align: left; border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); cursor: pointer; color: var(--ink); display: grid; } .wb-font.on { border-color: var(--accent); } .wb-font b { font-size: 1.15rem; } .wb-font small { color: var(--ink-2); }
.wb-check ul { margin: 0; padding-left: 1.2em; } .wb-check li.bad { color: var(--bad); font-weight: 700; } .wb-check .link { border: 0; background: none; color: var(--link); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; text-align: left; }
.wb-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .wb-side figure { margin: 0; display: grid; gap: 4px; } .wb-side figcaption { font-weight: 700; }
.wb-side iframe, .wb-nothing { width: 100%; height: 46vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; } .wb-nothing { display: grid; place-items: center; color: var(--ink-2); }
.wb-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .wb-history li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wb-own .wb-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wb-copy { display: flex; gap: 6px; align-items: flex-start; } .wb-copy input, .wb-copy textarea { flex: 1; font-family: ui-monospace, monospace; font-size: .82rem; }
.wb-btn-sample { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.wb-steps { display: grid; gap: 10px; padding-left: 1.4em; } .wb-steps li { display: flex; gap: 12px; align-items: center; }
.wb-step-pic { flex: none; width: 76px; height: 48px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); position: relative; }
.wb-step-pic::after { content: ''; position: absolute; left: 22px; top: 16px; width: 32px; height: 14px; border-radius: 999px; background: var(--accent); opacity: .3; }
.wb-step-pic.p1::after { opacity: .9; } .wb-step-pic.p2::after { width: 46px; left: 14px; background: var(--link); opacity: .6; } .wb-step-pic.p3::after { left: 46px; top: 30px; width: 24px; height: 10px; background: var(--good); opacity: .9; }
.wb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } .wb-stats div { background: var(--surface-2); border-radius: 10px; padding: 12px; display: grid; } .wb-stats b { font-size: 1.8rem; }
@media (max-width: 1180px) { .wb-grid { grid-template-columns: 200px minmax(0, 1fr); } .wb-options { grid-column: 1 / 3; position: static; max-height: none; } }
@media (max-width: 760px) { .wb-grid, .wb-own .wb-links, .wb-side, .wb-themes { grid-template-columns: 1fr; } .wb-options { grid-column: auto; } }

/* ── Home after sign-in: the practice's own page header (screens/page-home.js) ── */
.ph-hero { border-radius: var(--radius); padding: 44px 40px; background-color: color-mix(in srgb, var(--pb) 7%, white); background-size: cover; background-position: center; color: #1C1F23; box-shadow: var(--shadow); display: grid; gap: 10px; }
.ph-hero h1 { font-family: var(--ph), var(--font); color: var(--pb); font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 0; }
.ph-hero p { max-width: 62ch; margin: 0; }
.ph-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #4A5058; }
.ph-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ph-hero .btn.primary { background: var(--pb); border-color: var(--pb); color: #fff; }
.ph-hero .btn.ghost { background: #fff; color: var(--pb); border-color: var(--pb); }
.ph-hero.shape-square, .ph-hero.shape-square .btn { border-radius: 4px; }
.checks-row { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; padding: 0; } .checks-row legend { font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; }
.signin-practice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border-left: 6px solid var(--pb); background: var(--surface-2); }
.signin-practice img { height: 44px; width: auto; } .signin-practice small { display: block; color: var(--ink-2); } .signin-practice b { font-size: 1.2rem; }

/* W2: own domain */
.wb-dns code { word-break: break-all; }
.wb-dns td { vertical-align: top; }
.wb-domain .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
