/* StellarCare Portal — patient and provider portals.
   Palette: ink #1A1814, warm greys, StellarCare gold #C9A227. */

.sc-app, .sc-app * { box-sizing: border-box; }
.sc-app {
	--ink: #1A1814; --ink-2: #3E3A32; --muted: #5E594F; --line: #E7E2D6; --line-2: #D9D2C1;
	--bg: #F7F6F2; --panel: #FFFFFF; --soft: #F1EEE6; --gold: #C9A227; --gold-ink: #7A5C0E; --gold-soft: #F3EEDD;
	--ok: #1F5B2E; --ok-bg: #E3F1E6; --info: #1D3F6B; --info-bg: #DCE6F5; --warn: #7A5C0E; --warn-bg: #F6EDCF;
	--bad: #8A1C12; --bad-bg: #FDE2E0; --radius: 10px;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5;
	color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
body.sc-body { margin: 0; background: #F7F6F2; }
.sc-app a { color: var(--ink); }
.sc-app img { max-width: 100%; }
.sc-app :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sc-app [hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.sc-display { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 40px; line-height: 1.1; margin: 0 0 28px; }
.sc-h1 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 30px; line-height: 1.2; margin: 0 0 18px; }
.sc-h2 { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.sc-h2:first-child { margin-top: 0; }
.sc-muted { color: var(--muted); }
.sc-small { font-size: 13px; }
.sc-req { color: var(--bad); font-style: normal; }
.sc-ok { color: var(--ok); font-weight: 500; }
.sc-link { color: var(--gold-ink) !important; font-weight: 600; text-decoration: none; }
.sc-link:hover { text-decoration: underline; }
.sc-strong-link { font-weight: 600; text-decoration: none; }
.sc-strong-link:hover { text-decoration: underline; }
.sc-ul { margin: 8px 0; padding-left: 20px; }
.sc-ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-back { display: inline-block; margin-bottom: 12px; color: var(--muted) !important; text-decoration: none; font-size: 14px; }
.sc-back:hover { color: var(--ink) !important; }

/* Layout helpers */
.sc-row { display: flex; align-items: center; gap: 12px; }
.sc-row--wrap { flex-wrap: wrap; }
.sc-row--top { align-items: flex-start; }
.sc-row--baseline { align-items: baseline; }
.sc-grow { flex: 1 1 auto; min-width: 0; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.sc-section { margin-bottom: 34px; }
.sc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.sc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.sc-col-side .sc-card + .sc-card { margin-top: 0; }
.sc-col-side { display: grid; gap: 16px; }
.sc-center { display: grid; place-items: center; padding: 40px 16px; }
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.sc-span-full { grid-column: 1 / -1; }
.sc-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.sc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; min-height: 38px;
	border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink) !important;
	font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.sc-btn:hover { background: var(--soft); }
.sc-btn--primary { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.sc-btn--primary:hover { background: var(--ink-2); }
.sc-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink) !important; }
.sc-btn--gold:hover { background: #D8B23A; }
.sc-btn--ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff !important; }
.sc-btn--ghost:hover { background: rgba(255,255,255,.08); }
.sc-btn--sm { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.sc-btn--lg { min-height: 44px; padding: 10px 22px; font-size: 15px; }
.sc-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; text-decoration: none; font-size: 22px; color: var(--muted) !important; }
.sc-icon-btn:hover { background: var(--soft); color: var(--ink) !important; }
.sc-app form { margin: 0; }

/* Badges, chips, counts */
.sc-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--muted); vertical-align: middle; }
.sc-badge--ok { background: var(--ok-bg); color: var(--ok); }
.sc-badge--info { background: var(--info-bg); color: var(--info); }
.sc-badge--warn { background: var(--warn-bg); color: var(--warn); }
.sc-badge--bad { background: var(--bad-bg); color: var(--bad); }
.sc-chip { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
.sc-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.sc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 4px; }

/* Cards and lists */
.sc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.sc-card--list { padding: 0; overflow: hidden; }
.sc-card__head { padding: 14px 20px; font-weight: 600; border-bottom: 1px solid var(--line); background: #FBFAF7; }
.sc-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; margin-bottom: 18px; }
.sc-list-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sc-list-row:first-child { border-top: 0; }
.sc-card__head + .sc-list-row { border-top: 0; }
.sc-line { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-line__icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); flex: none; }
.sc-time { width: 72px; font-weight: 600; flex: none; }
.sc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sc-apptcard { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.sc-apptcard:hover { border-color: var(--line-2); box-shadow: 0 2px 8px rgba(26,24,20,.06); }
.sc-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 16px; overflow: hidden; }
.sc-group__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #FBFAF7; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-group .sc-table { border: 0; border-radius: 0; }

/* Callouts and notices */
.sc-callout { background: var(--gold-soft); border: 1px solid #E8DDB8; border-radius: var(--radius); padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.sc-callout--warn { background: var(--warn-bg); border-color: #EAD9A2; }
.sc-callout--bad { background: var(--bad-bg); border-color: #F4C2BD; }
.sc-notice { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.sc-notice--ok { background: var(--ok-bg); color: var(--ok); border-color: #C3E0C9; }
.sc-notice--info { background: var(--info-bg); color: var(--info); }
.sc-notice--warn { background: var(--warn-bg); color: var(--warn); border-color: #EAD9A2; }
.sc-notice--bad { background: var(--bad-bg); color: var(--bad); border-color: #F4C2BD; }
.sc-note { background: var(--soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.sc-note.is-gov { background: var(--warn-bg); color: var(--warn); }
.sc-note.is-ok { background: var(--ok-bg); color: var(--ok); }
.sc-note.is-warn { background: var(--warn-bg); color: var(--warn); }
.sc-note.is-bad { background: var(--bad-bg); color: var(--bad); }

/* Tabs */
.sc-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.sc-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted) !important; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sc-tabs a:hover { color: var(--ink) !important; }
.sc-tabs a.is-active { color: var(--ink) !important; border-bottom-color: var(--ink); font-weight: 600; }
.sc-search { margin-left: auto; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; background: var(--panel); margin-bottom: 6px; }
.sc-search input { border: 0 !important; outline: 0; background: transparent; font: inherit; font-size: 14px; padding: 4px 0 !important; min-width: 180px; box-shadow: none !important; }

/* Tables */
.sc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 18px; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sc-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #FBFAF7; white-space: nowrap; }
.sc-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sc-table tr:last-child td { border-bottom: 0; }
.sc-table--compact td, .sc-table--compact th { padding: 8px 16px; }
.sc-table__group td { background: #FBFAF7; font-weight: 600; font-size: 13px; }

/* Definition lists */
.sc-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 16px 0; font-size: 14px; }
.sc-dl dt { color: var(--muted); }
.sc-dl dd { margin: 0; overflow-wrap: anywhere; }
.sc-dl--wide { grid-template-columns: 200px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }

/* Avatars */
.sc-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); font-size: 13px; font-weight: 700; flex: none; }
.sc-avatar--gold { background: var(--gold); color: var(--ink); }
.sc-avatar--lg { width: 52px; height: 52px; font-size: 18px; background: var(--ink); color: #fff; }

/* Fields */
.sc-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sc-field > span { font-weight: 500; }
.sc-field--narrow { max-width: 420px; margin-bottom: 16px; }
.sc-app input[type="text"], .sc-app input[type="url"], .sc-app input[type="number"], .sc-app input[type="email"], .sc-app input[type="tel"], .sc-app input[type="date"], .sc-app input[type="time"], .sc-app input[type="password"], .sc-app input[type="search"], .sc-app input[type="file"], .sc-app select, .sc-app textarea {
	width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; min-height: 42px; box-shadow: none;
}
.sc-app input[type="file"] { padding: 8px; background: #FBFAF7; }
.sc-app textarea { min-height: 80px; resize: vertical; }
.sc-app input:focus, .sc-app select:focus, .sc-app textarea:focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 3px rgba(201,162,39,.25); }
.sc-app input:user-invalid, .sc-app select:user-invalid { border-color: var(--bad); }
.sc-inline select { width: auto; min-width: 220px; }
.sc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 14px 0; cursor: pointer; }
.sc-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.sc-choice { border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-choice legend { font-weight: 500; font-size: 14px; margin-bottom: 8px; padding: 0; }
.sc-choice--row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sc-choice__opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; background: #fff; font-size: 14px; }
.sc-choice__opt input { margin-top: 3px; accent-color: var(--ink); }
.sc-choice__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #FDFCF8; }
.sc-upload small { font-size: 12px; }

/* Form player */
.sc-player { padding: 28px; }
.sc-section-title { margin: 28px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.sc-section-title h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sc-section-title p { margin: 2px 0 0; }
.sc-q { border: 0; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }
.sc-q legend { font-weight: 500; padding: 0; margin-bottom: 10px; }
.sc-pills { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.sc-pill-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-pill { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; cursor: pointer; background: #fff; user-select: none; }
.sc-pill:hover { border-color: var(--ink-2); }
.sc-pill-input:checked + .sc-pill { background: var(--ink); color: #fff; border-color: var(--ink); }
.sc-pill-input:focus-visible + .sc-pill { outline: 2px solid var(--gold); outline-offset: 2px; }
.sc-toggle { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sc-toggle__row { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.sc-toggle__label { flex: 1 1 260px; font-size: 14px; }
.sc-toggle__detail { margin-top: 10px; }
.sc-agree { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-agree .sc-check { flex: 1 1 300px; }
.sc-doc { font-size: 14px; }
.sc-doc summary { cursor: pointer; color: var(--gold-ink); font-weight: 600; padding: 14px 0; list-style: none; }
.sc-doc summary::-webkit-details-marker { display: none; }
.sc-doc[open] { flex-basis: 100%; }
.sc-doc__text { background: #FBFAF7; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; max-height: 280px; overflow: auto; margin-bottom: 12px; color: var(--ink-2); }
.sc-doc--inline[open] { width: 100%; }
.sc-sign { margin-top: 18px; max-width: 420px; }
.sc-sign input { font-family: "DM Serif Display", Georgia, serif !important; font-size: 20px !important; }

/* Progress */
.sc-bar { height: 6px; border-radius: 999px; background: var(--soft); margin-top: 10px; overflow: hidden; }
.sc-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

/* Hero (patient) */
.sc-hero { background: var(--ink); color: #fff; border-radius: 14px; padding: 26px; margin-bottom: 18px; }
.sc-hero__kicker { margin: 0 0 4px; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.sc-hero__title { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0 0 8px; color: #fff; }
.sc-hero__text { margin: 0 0 14px; color: rgba(255,255,255,.8); }
.sc-hero__muted { color: rgba(255,255,255,.65); }
.sc-step { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sc-step__dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); font-size: 13px; flex: none; }
.sc-step__dot.is-done { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }

/* Patient: top bar */
.sc-topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.sc-topbar__inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 64px; }
.sc-topbar__brand { text-decoration: none; }
.sc-logo { display: inline-flex; align-items: center; gap: 8px; font-family: "DM Serif Display", Georgia, serif; font-size: 22px; color: var(--ink); }
.sc-topnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.sc-topnav a { padding: 20px 12px; text-decoration: none; color: var(--muted) !important; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.sc-topnav a:hover { color: var(--ink) !important; }
.sc-topnav a.is-active { color: var(--ink) !important; border-bottom-color: var(--gold); font-weight: 600; }
.sc-topbar__me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.sc-main { padding: 32px 36px 60px; }
.sc-main--narrow { max-width: 1080px; margin: 0 auto; padding: 32px 20px 60px; }

/* Provider: sidebar */
.sc-provider { display: flex; align-items: stretch; }
.sc-side { width: 232px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sc-side__brand { padding: 4px 10px 20px; text-decoration: none; }
.sc-side__item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2) !important; font-weight: 500; font-size: 14px; }
.sc-side__item:hover { background: var(--soft); }
.sc-side__item.is-active { background: var(--soft); color: var(--ink) !important; font-weight: 600; }
.sc-side__item .sc-icon { flex: none; }
.sc-side__spacer { flex: 1; }
.sc-side__sep { height: 1px; background: var(--line); margin: 8px 0; }
.sc-side__me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; font-size: 14px; font-weight: 500; }
.sc-provider .sc-main { flex: 1; min-width: 0; max-width: 1180px; }
.sc-icon { display: inline-block; vertical-align: middle; flex: none; }

/* Client record */
.sc-record { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.sc-record__side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 20px; }
.sc-record__name { font-family: "DM Serif Display", Georgia, serif; font-size: 22px; }
.sc-record__side .sc-callout { margin-top: 16px; }
.sc-sticky { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; }
.sc-sticky textarea { background: #FFFBEA !important; border-color: #EAD9A2 !important; font-size: 14px !important; }
.sc-sticky .sc-btn { justify-self: start; }

/* Score + answers drawer */
.sc-overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; }
.sc-overlay__bg { position: absolute; inset: 0; background: rgba(26,24,20,.45); }
.sc-drawer { position: relative; width: min(640px, 100%); height: 100%; overflow-y: auto; background: var(--panel); padding: 26px 28px 40px; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.sc-score { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius); background: #FBFAF7; border: 1px solid var(--line); margin: 14px 0; }
.sc-score__num { font-family: "DM Serif Display", Georgia, serif; font-size: 44px; line-height: 1; }
.sc-answers { border-top: 1px solid var(--line); margin-top: 10px; }
.sc-answers__head { font-weight: 600; padding: 16px 0 6px; font-size: 14px; color: var(--gold-ink); text-transform: uppercase; letter-spacing: .03em; font-size: 12px; }
.sc-answers__row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sc-answers__row.is-flag { background: var(--bad-bg); margin: 0 -12px; padding: 10px 12px; border-radius: 6px; }

/* Insurance card images */
.sc-cardimgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.sc-cardimg { display: flex; flex-direction: column; gap: 6px; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #FBFAF7; }
.sc-cardimg img { width: 100%; aspect-ratio: 1.586; object-fit: cover; border-radius: 6px; background: #eee; }
.sc-cardimg__pdf { display: grid; place-items: center; aspect-ratio: 1.586; border-radius: 6px; background: var(--soft); font-weight: 700; color: var(--muted); }

/* Sign-in */
.sc-auth { display: grid; place-items: center; padding: 40px 16px; }
.sc-auth__card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.sc-auth__brand { margin-bottom: 18px; }
.sc-auth .sc-h1 { font-size: 26px; }
.sc-auth form p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sc-auth form p.login-remember { flex-direction: row; }
.sc-auth form p.login-remember label { display: flex; gap: 8px; align-items: center; }
.sc-auth input[type="submit"] { width: 100%; min-height: 44px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sc-auth input[type="submit"]:hover { background: var(--ink-2); }
.sc-auth__links { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.sc-auth__links a { color: var(--gold-ink) !important; }

/* Responsive */
@media (max-width: 960px) {
	.sc-cols, .sc-two, .sc-record { grid-template-columns: minmax(0, 1fr); }
	.sc-record__side { position: static; }
	.sc-main { padding: 24px 16px 60px; }
}
@media (max-width: 760px) {
	.sc-provider { flex-direction: column; }
	.sc-side { width: 100%; height: auto; position: sticky; top: 0; z-index: 20; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; }
	.sc-side__brand { padding: 4px 8px; }
	.sc-side__item { white-space: nowrap; }
	.sc-side__spacer, .sc-side__sep, .sc-side__me { display: none; }
	.sc-topbar__inner { flex-wrap: wrap; gap: 0 16px; padding: 0 16px; }
	.sc-topnav { order: 3; width: 100%; flex-basis: 100%; }
	.sc-topnav a { padding: 12px 10px; }
	.sc-topbar__me span:last-child { display: none; }
	.sc-topbar__me { margin-left: auto; }
	.sc-main--narrow { padding: 24px 16px 60px; }
	.sc-grid, .sc-choice, .sc-cardimgs { grid-template-columns: 1fr; }
	.sc-dl, .sc-dl--wide { grid-template-columns: 1fr; gap: 2px 0; }
	.sc-dl dd { margin-bottom: 8px; }
	.sc-display { font-size: 32px; }
	.sc-h1 { font-size: 26px; }
	.sc-player { padding: 20px 16px; }
	.sc-search { margin-left: 0; width: 100%; }
	.sc-search input { min-width: 0; }
	.sc-drawer { padding: 20px 16px 40px; }
}

/* Print: only the answers drawer */
@media print {
	.sc-side, .sc-topbar, .sc-overlay__bg, .sc-actions, .sc-icon-btn, .sc-notice { display: none !important; }
	.sc-overlay { position: static; display: block; }
	.sc-drawer { box-shadow: none; width: 100%; height: auto; padding: 0; }
	.sc-main:has(.sc-overlay) > :not(.sc-overlay) { display: none !important; }
	.sc-app { background: #fff; }
}

/* One sign-in page */
.sc-auth__tabs { margin: 4px 0 18px; }
.sc-auth__tabs a { flex: 1; text-align: center; }
.sc-auth__form { display: grid; gap: 14px; margin-top: 8px; }
.sc-auth__form .sc-check { margin: 2px 0; }
.sc-btn--block { width: 100%; }
.sc-auth__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sc-auth__foot { margin: 20px 0 0; text-align: center; }
.sc-auth .sc-grid { gap: 14px; }
@media (max-width: 760px) { .sc-auth .sc-grid { grid-template-columns: 1fr 1fr; } }
.sc-pass { position: relative; display: block; }
.sc-pass input { padding-right: 64px !important; }
.sc-pass__show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--gold-ink); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.sc-pass__show:hover { background: var(--soft); }
.sc-money { display: flex; align-items: center; gap: 8px; }
.sc-money input { max-width: 160px; }
.sc-hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------------- Scheduling ---------------- */
.sc-btn--danger { background: var(--bad); border-color: var(--bad); color: #fff !important; }
.sc-btn--danger:hover { background: #6E150D; }
.sc-btn--attn { border-color: var(--gold); background: var(--gold-soft); }
.sc-bad { color: var(--bad); font-weight: 600; }
.sc-list-row--link { text-decoration: none; color: inherit !important; }
.sc-list-row--link:hover { background: #FBFAF7; }

/* Dropdown menu (no JS) */
.sc-menu { position: relative; }
.sc-menu > summary { list-style: none; }
.sc-menu > summary::-webkit-details-marker { display: none; }
.sc-menu__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(26,24,20,.14); padding: 6px; display: grid; }
.sc-menu__list a { padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink) !important; font-size: 14px; }
.sc-menu__list a:hover { background: var(--soft); }
.sc-menu__list a:last-child { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 11px; }

/* Calendar */
.sc-provider .sc-main:has(.sc-cal) { max-width: none; }
.sc-cal__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.sc-cal__nav { display: flex; align-items: center; gap: 4px; }
.sc-cal__title { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 26px; margin: 0 8px; flex: 1 1 auto; }
.sc-cal__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sc-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.sc-seg a { padding: 5px 12px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted) !important; }
.sc-seg a.is-on { background: var(--ink); color: #fff !important; }
.sc-cal__tz { margin: 2px 0 10px; }
.sc-cal__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sc-cal__grid { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(110px, 1fr)); min-width: calc(56px + var(--days) * 110px); }
.sc-cal[data-mode="day"] .sc-cal__grid { min-width: 0; }
.sc-cal__corner { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 3; }
.sc-cal__dayhead { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-decoration: none; color: var(--muted) !important; font-size: 12px; font-weight: 600; letter-spacing: .04em; position: sticky; top: 0; background: var(--panel); z-index: 3; }
.sc-cal__dayhead strong { font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.sc-cal__dayhead.is-today { box-shadow: inset 0 -3px 0 var(--gold); }
.sc-cal__dayhead.is-today strong { color: var(--gold-ink); font-weight: 700; }
.sc-cal__times { position: relative; }
.sc-cal__times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.sc-cal__times span:first-child { transform: none; top: 2px !important; }
.sc-cal__col { position: relative; border-left: 1px solid var(--line); background-color: #EFECE4; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px), var(--line) var(--hour)); }
.sc-cal__work { position: absolute; left: 0; right: 0; background: #fff; }
.sc-cal__col::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px), var(--line) var(--hour)); }
.sc-cal__col.is-today .sc-cal__work { background: #FFFDF6; }
.sc-cal__slot { position: absolute; left: 0; right: 0; z-index: 1; }
.sc-cal__slot:hover { background: rgba(201,162,39,.14); }
.sc-cal__slot:hover::after { content: "+"; position: absolute; left: 6px; top: 2px; font-weight: 700; color: var(--gold-ink); }
.sc-cal__off, .sc-cal__gbusy { position: absolute; left: 0; right: 0; z-index: 2; background: repeating-linear-gradient(135deg, #E4E0D6 0 6px, #EDEAE2 6px 12px); border-top: 2px solid #CFC9BA; text-decoration: none; overflow: hidden; }
.sc-cal__off span, .sc-cal__gbusy span { display: block; padding: 2px 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.sc-cal__gbusy { background: repeating-linear-gradient(135deg, #E6E9EF 0 6px, #F0F2F6 6px 12px); border-top-color: #C7CDD8; pointer-events: none; }
.sc-ev { position: absolute; z-index: 4; display: flex; flex-direction: column; gap: 1px; padding: 3px 6px; border-radius: 6px; border: 1px solid; font-size: 12px; line-height: 1.25; text-decoration: none; overflow: hidden; color: var(--ink) !important; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.sc-ev:hover, .sc-ev.is-open { box-shadow: 0 3px 10px rgba(26,24,20,.18); z-index: 5; }
.sc-ev__time { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-ev__time b { color: var(--ok); }
.sc-ev__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sc-ev__tag { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-ev.is-short { flex-direction: row; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.sc-ev.is-short .sc-ev__tag { display: none; }
.sc-ev.is-scheduled { background: #E3ECF9; border-color: #9DB7DF; }
.sc-ev.is-confirmed { background: #E5F3E8; border-color: #9CCDA7; }
.sc-ev.is-due { background: #FBF1D3; border-color: #E2C56B; }
.sc-ev.is-noshow { background: #FBE6E4; border-color: #EBB0AA; }
.sc-ev.is-cancelled { background: #F4F2EE; border-color: #D9D2C1; border-style: dashed; color: var(--muted) !important; }
.sc-ev.is-cancelled .sc-ev__name { text-decoration: line-through; }
.sc-cal__now { position: absolute; left: 0; right: 0; height: 2px; background: #C4302B; z-index: 6; pointer-events: none; }
.sc-cal__now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #C4302B; }
.sc-cal__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.sc-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid; vertical-align: -2px; margin-right: 5px; }
.sc-sw--sched { background: #E3ECF9; border-color: #9DB7DF; }
.sc-sw--conf { background: #E5F3E8; border-color: #9CCDA7; }
.sc-sw--due { background: #FBF1D3; border-color: #E2C56B; }
.sc-sw--off { background: repeating-linear-gradient(135deg, #E4E0D6 0 3px, #EDEAE2 3px 6px); border-color: #CFC9BA; }
.sc-sw--closed { background: #EFECE4; border-color: var(--line-2); }

/* Drawer extras */
.sc-drawer--narrow { width: min(480px, 100%); }
.sc-drawer__x { position: absolute; right: 14px; top: 12px; }
.sc-fold { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 4px; }
.sc-fold > summary { cursor: pointer; font-weight: 600; padding: 10px 0; color: var(--ink); }
.sc-form { display: grid; gap: 14px; padding: 6px 0 4px; }
.sc-form .sc-check { margin: 0; }
.sc-choice--one { grid-template-columns: 1fr; margin: 0; }

/* Patient booking */
.sc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.sc-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border: 1px solid var(--line-2); border-radius: var(--radius); text-decoration: none; color: var(--ink) !important; font-size: 12px; background: #fff; }
.sc-day strong { font-size: 20px; font-weight: 600; line-height: 1.1; }
.sc-day em { font-style: normal; font-size: 11px; color: var(--ok); font-weight: 600; margin-top: 2px; }
.sc-day:hover { border-color: var(--ink); }
.sc-day.is-on { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.sc-day.is-on em { color: var(--gold); }
.sc-day.is-none { color: #A9A398 !important; background: #FAF9F5; border-style: dashed; }
.sc-day.is-none em { color: #A9A398; }
.sc-times__group { font-size: 12px; font-weight: 700; color: var(--gold-ink); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 8px; }
.sc-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sc-time-btn { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink) !important; background: #fff; }
.sc-time-btn:hover { border-color: var(--ink); background: var(--gold-soft); }
.sc-book-confirm { max-width: 640px; }
.sc-book-confirm__when { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.2; margin: 4px 0 6px; }
.sc-book-confirm__when span { font-family: inherit; font-size: 20px; color: var(--ink-2); }
.sc-cancelbox { background: var(--bad-bg); align-items: flex-start; }

/* Working hours editor */
.sc-hours { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }
.sc-hours__day { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.sc-hours__day:first-child { border-top: 0; }
.sc-hours__name { margin: 8px 0 0; }
.sc-hours__ranges { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sc-hours__range { display: inline-flex; align-items: center; gap: 6px; }
.sc-hours__range select { width: auto !important; min-width: 108px; }
.sc-hours__range.is-empty { opacity: .55; }
.sc-hours__range.is-empty:focus-within, .sc-hours__range.is-empty:hover { opacity: 1; }
.sc-hours__day:has(input[type=checkbox]:not(:checked)) .sc-hours__ranges { opacity: .35; }

@media (max-width: 760px) {
	.sc-cal__title { font-size: 21px; flex-basis: 100%; order: -1; margin: 0; }
	.sc-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.sc-hours__day { grid-template-columns: 1fr; }
}

/* Encounter notes */
.sc-enc__top { margin-bottom: 8px; }
.sc-enc__head { margin-bottom: 18px; }
.sc-enc__title { font-size: 30px; margin: 0 0 6px; }
.sc-enc__meta { margin: 0; color: var(--ink-2); font-size: 14px; }
.sc-enc__h { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.sc-enc__saved { min-width: 120px; text-align: right; }
.sc-enc__saved.is-bad { color: var(--bad); font-weight: 600; }
.sc-enc__form textarea { width: 100%; min-height: 64px; resize: vertical; }
.sc-enc__form .sc-inline input[type=time] { width: auto; }
.sc-enc__log { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; }
.sc-enc__log li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sc-enc__log time { display: inline-block; min-width: 68px; color: var(--gold-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-enc__meds { display: grid; gap: 8px; }
.sc-enc__medrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) 110px 44px 32px; gap: 8px; align-items: center; }
.sc-enc__sent { display: flex; justify-content: center; }
.sc-enc__sent input { width: 18px; height: 18px; }
.sc-enc__rx { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; }
.sc-meds-card { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.sc-meds-card ul { margin: 6px 0 8px; padding-left: 18px; }
.sc-meds-card li { margin: 2px 0; }
.sc-export { margin-top: 16px; }
.sc-export summary { cursor: pointer; font-weight: 600; }
.sc-export form { display: grid; gap: 8px; margin-top: 8px; }
.sc-enc__medhead { font-size: 12px; color: var(--muted); font-weight: 600; }
.sc-enc__dxrow { margin-bottom: 8px; }
.sc-enc__addons { border: 0; padding: 0; margin: 10px 0 0; }
.sc-enc__addons .sc-check { margin: 6px 0; }
.sc-enc__todo ul { margin: 0; padding-left: 18px; color: var(--bad); }
.sc-enc__todo #sc-enc-ready { color: var(--ok, #2E6B3A); margin: 0; font-weight: 600; }
.sc-enc__signbox { border-color: var(--ink); }
.sc-enc__sec + .sc-enc__sec { margin-top: 0; }
.sc-enc__read .sc-enc__sec { padding-top: 14px; border-top: 1px solid var(--line); margin-top: 14px; }
.sc-enc__read .sc-enc__sec p { margin: 0; white-space: normal; }
.sc-dl--tight { margin: 0; grid-template-columns: 150px minmax(0, 1fr); }
.sc-enc__sig { margin: 20px 0 0; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 14px; }
.sc-enc__addendum { margin-top: 16px; padding: 12px 14px; background: var(--soft); border-radius: 8px; }
.sc-enc__hist summary { cursor: pointer; margin: 0; }
.sc-enc__hist ul { margin: 10px 0 0; padding-left: 18px; max-height: 260px; overflow: auto; }
@media (max-width: 760px) {
	.sc-enc__medrow { grid-template-columns: 1fr 1fr; }
	.sc-enc__medhead { display: none; }
}
@media print {
	.sc-noprint, .sc-enc__top, .sc-topbar, .sc-sidebar, .sc-side, .sc-enc .sc-col-side { display: none !important; }
	.sc-enc .sc-cols { display: block; }
	.sc-enc .sc-card { border: 0; padding: 0; }
}
.sc-enc-pill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 14px; background: var(--soft); border-radius: 10px; font-size: 14px; }
.sc-enc-pill form { margin: 0; }
.sc-enc__dxrow { flex-wrap: nowrap; }
.sc-enc__dxrow input { flex: 1 1 auto; width: auto; min-width: 0; }
@media (min-width: 1000px) { .sc-enc__form .sc-col-side { position: sticky; top: 16px; } }
.sc-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; margin: 8px 0 4px; }
.sc-states .sc-check { margin: 6px 0; }
.sc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Payments (1.10.0) */
.sc-pay-due { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sc-pay-due:last-child { border-bottom: 0; }
.sc-pay-amt { font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sc-pay-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.sc-pay-form .sc-field { margin: 0; }
.sc-pay-secure { display: flex; align-items: center; gap: 6px; }
.sc-inline-form { display: inline; margin: 0; }
.sc-h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }

/* Assessments (1.11.0) */
.sc-pills--stack { display: flex; flex-direction: column; align-items: stretch; }
.sc-pills--stack .sc-pill { text-align: left; }
.sc-trend { display: block; width: 100%; max-width: 560px; height: auto; margin: 4px 0 10px; }
.sc-trend__line { fill: none; stroke: var(--ink); stroke-width: 2; }
.sc-trend__band { fill: var(--warn-bg); }
.sc-trend__dot { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.sc-trend__axis { stroke: var(--line); stroke-width: 1; }
.sc-trend__txt { font-size: 11px; fill: var(--muted, #6b6760); }
.sc-plan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sc-plan-row:last-child { border-bottom: 0; }
.sc-trend-wrap { padding: 8px 16px 0; }
.sc-trend__axis[stroke-dasharray] { stroke: var(--line-2); }
.sc-table .sc-badge { white-space: normal; }
.sc-inline { max-width: 100%; flex-wrap: wrap; }
.sc-inline select, .sc-plan-row select { max-width: 100%; min-width: 0; }
