.portal {
  --radius-button: 10px;
  --radius-input: 9px;
  --radius-surface: 12px;
  --radius-small: 6px;
  --radius-icon: 8px;
  --radius-marker: 2px;
  /* Bound inherited brand styles to the same scale without changing brand assets. */
  --radius-xs: var(--radius-icon);
  --radius-sm: var(--radius-surface);
  --radius-md: var(--radius-surface);
  --radius-lg: var(--radius-surface);
  --radius-xl: var(--radius-surface);
  --radius-2xl: var(--radius-surface);
  --radius-pill: var(--radius-small);
  --radius-circle: var(--radius-icon);
}
.portal { --font-display: "Plus Jakarta Sans", "Avenir Next", Avenir, system-ui, sans-serif; --font-body: Inter, "Avenir Next", system-ui, sans-serif; --font-mono: "Space Mono", "SFMono-Regular", Consolas, monospace; background: #f6f8fb; color: var(--ink-700); font-size: 14px; }
.portal *, .portal *::before, .portal *::after { box-sizing: border-box; }
.portal button, .portal input, .portal select, .portal textarea { font: inherit; }
.portal :where(button, .text-link, summary) { border-radius: var(--radius-button); }
.portal :where(input, select, textarea) { border-radius: var(--radius-input); }
.portal button { cursor: pointer; }
.portal button:disabled { cursor: not-allowed; opacity: 1; transform: none; }
.portal :focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; }
.portal main { overflow: visible; }
.portal h1, .portal h2, .portal h3, .portal p { margin: 0; }
.portal h1 { font-size: clamp(26px, 2.6vw, 37px); letter-spacing: -.045em; line-height: 1.15; }
.portal h2 { font-size: 19px; letter-spacing: -.025em; line-height: 1.3; }
.portal h3 { font-size: 14px; letter-spacing: -.01em; line-height: 1.4; }
.portal svg { width: 20px; height: 20px; flex: none; }
/* The first body child stays clipped until focused, including in full-page captures. */
.portal > .skip-link { position: fixed; top: 10px; left: 20px; z-index: 200; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: #fff; color: #204d9c; }
.portal > .skip-link:focus { width: auto; height: auto; padding: 10px 14px; clip-path: none; outline: 2px solid #2857a5; outline-offset: 3px; }
.demo-banner { min-height: 42px; padding: 10px 25px; display: flex; align-items: center; gap: 11px; background: #142342; color: #d9e5ff; font-size: 11px; position: relative; z-index: 10; }
.demo-banner strong { color: #fff; white-space: nowrap; font-size: 11px; }
.demo-indicator { width: 6px; height: 6px; background: #9dbbff; border-radius: var(--radius-marker); box-shadow: 0 0 0 4px #ffffff0d; flex: none; }
.local-chip { margin-left: auto; font: 9px var(--font-mono); letter-spacing: .09em; white-space: nowrap; border: 1px solid #ffffff24; border-radius: var(--radius-small); padding: 3px 7px; }
.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid #e5eaf2; display: flex; flex-direction: column; padding: 32px 20px 22px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; padding: 0 9px; margin-bottom: 43px; }
.brand-symbol { width: 36px; height: 36px; border-radius: var(--radius-icon); display: grid; place-items: center; color: #fff; background: #3772ff; box-shadow: 0 5px 12px #3772ff24; }
.brand-symbol svg { width: 25px; height: 25px; }
.brand-word { font: 750 23px var(--font-display); letter-spacing: -.055em; color: #243151; }
.brand-word small { display: block; margin-top: 0; font: 8px var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: #617087; }
.nav-label, .overline { font: 600 9px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #617087; }
.nav-label { margin: 0 13px 12px; }
.nav-item { border: 0; display: flex; width: 100%; align-items: center; gap: 9px; padding: 11px; min-height: 44px; font-size: 13px; border-radius: var(--radius-icon); background: #edf3ff; color: #2a5be0; font-weight: 650; text-align: left; }
.nav-item .nav-count { margin-left: auto; background: #dbe7ff; font-size: 10px; padding: 2px 6px; border-radius: var(--radius-small); }
.sidebar-note { margin: 24px 13px; color: #617087; font-size: 11px; line-height: 1.7; }
.sidebar-bottom { margin-top: auto; padding-top: 50px; }
.identity-box { border: 1px solid #e4eaf3; border-radius: var(--radius-surface); padding: 14px; background: #fafbfd; }
.identity-box label { display: block; color: #53617a; font-size: 10px; font-weight: 650; margin-bottom: 9px; }
.identity-box select { width: 100%; padding: 9px 6px; background: #fff; border: 1px solid #dbe3ef; border-radius: var(--radius-input); font-size: 11px; color: #243151; }
.identity-box p { font-size: 10px; line-height: 1.6; margin-top: 10px; color: #6a7890; }
.sidebar-foot { display: flex; align-items: center; gap: 7px; margin: 17px 10px 0; font-size: 10px; color: #617087; }
.sidebar-foot .dot { width: 5px; height: 5px; background: #18b26b; }
.main-area { min-width: 0; }
.topbar { height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 36px; border-bottom: 1px solid #e5eaf2; background: #fff; }
.breadcrumb { display: flex; align-items: center; gap: 12px; color: #617087; font-size: 11px; }
.breadcrumb strong { color: #53617b; font-weight: 500; }
.profile-pill { display: flex; align-items: center; gap: 10px; }
.profile-pill .initials { display: grid; place-items: center; width: 29px; height: 29px; border-radius: var(--radius-icon); font-size: 10px; font-weight: 700; background: #e8effc; color: #4166ac; }
.profile-pill .profile-name { font-size: 11px; font-weight: 600; }
.profile-pill .profile-role { font-size: 10px; color: #617087; text-transform: capitalize; }
.workspace { padding: 33px 36px 48px; max-width: 1900px; margin: 0 auto; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.workspace-heading .overline { display: block; color: var(--blue-700); margin-bottom: 11px; }
.workspace-heading p { margin-top: 11px; color: #6c7a91; font-size: 12px; line-height: 1.6; max-width: 630px; }
.portal .btn { font-size: 11px; font-weight: 600; min-height: 36px; padding: 8px 12px; border: 1px solid transparent; border-radius: var(--radius-button); gap: 7px; box-shadow: none; white-space: nowrap; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.portal .btn:hover, .portal .btn:active { transform: none; }
.portal .btn svg { width: 14px; height: 14px; }
.portal .btn--primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: 0 1px 2px #15234214, 0 3px 6px #2a5be018; }
.portal .btn--primary:hover:not(:disabled) { background: var(--blue-700); border-color: var(--blue-700); box-shadow: 0 2px 5px #15234222; }
.portal .btn--primary:active:not(:disabled) { background: var(--blue-800); box-shadow: inset 0 1px 2px #15234230; }
.portal .btn--secondary { background: #fff; border-color: #cbd5e3; color: #344767; box-shadow: 0 1px 2px #15234208; }
.portal .btn--secondary:hover:not(:disabled) { background: #f5f8fd; border-color: #a8bad3; box-shadow: 0 2px 4px #1523420c; }
.portal .btn--secondary:active:not(:disabled) { background: #edf2fa; box-shadow: inset 0 1px 2px #1523420c; }
.portal .btn--quiet { background: transparent; color: #52647f; border: 1px solid transparent; }
.portal .btn--quiet:hover:not(:disabled) { background: #edf2fa; color: #243151; border-color: #e1e8f2; }
.portal .btn:disabled { background: #edf1f6; color: #68758a; border-color: #d6deea; box-shadow: none; pointer-events: auto; }
.button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 26px; }
.metric { border: 1px solid #e0e6ef; border-radius: var(--radius-surface); box-shadow: 0 1px 3px #15234205; padding: 18px 20px; background: #fff; display: flex; align-items: center; gap: 15px; }
.metric-icon { display: grid; place-items: center; background: #edf3ff; color: #5480dc; width: 38px; height: 38px; border-radius: var(--radius-icon); }
.metric:nth-child(2) .metric-icon { background: transparent; color: #2857a5; }
.metric:nth-child(3) .metric-icon { background: #eaf7f1; color: #4b9b7d; }
.metric-value { font: 650 25px var(--font-display); letter-spacing: -.04em; color: #243151; }
.metric-label { color: #617087; font-size: 10px; margin-top: 3px; }
.board { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { border: 1px solid #dce3ed; border-radius: var(--radius-surface); background: #fff; overflow: hidden; box-shadow: 0 2px 4px #15234204, 0 10px 24px -16px #15234224; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 19px 20px; border-bottom: 1px solid #edf0f5; gap: 10px; }
.panel-header h2 { font-size: 14px; }
.panel-header .muted { font-size: 10px; }
.queue-tools { padding: 14px; border-bottom: 1px solid #edf0f5; }
.queue-tools select { width: 100%; height: 33px; padding: 0 9px; background: #fafbfd; border: 1px solid #e2e8f2; border-radius: var(--radius-input); color: #65738b; font-size: 11px; }
.queue-list { max-height: 660px; overflow-y: auto; padding: 6px; }
.case-row { width: 100%; display: block; padding: 16px 13px; border: 1px solid transparent; border-bottom: 1px solid #edf0f5; background: #fff; text-align: left; border-radius: var(--radius-surface); margin-bottom: 3px; }
.case-row { transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.case-row:hover { background: #f6f8fc; border-color: #dce4ef; }
.case-row.selected { border-color: #c2d2f1; background: #eef3ff; box-shadow: inset 3px 0 0 var(--blue-600); }
.case-row.selected:hover { background: #e7efff; border-color: #adc3eb; }
.case-row-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 10px; }
.case-row strong { font-size: 12px; font-weight: 650; color: #243151; }
.case-row p { color: #6c7b94; font-size: 10px; line-height: 1.6; }
.case-row .case-date { font-size: 9px; margin-top: 11px; color: #617087; display: flex; gap: 5px; align-items: center; }
.case-row .case-date svg { width: 12px; height: 12px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: var(--radius-small); font-size: 9px; font-weight: 600; white-space: nowrap; background: #eff2f6; color: #69778d; }
.status::before { content: ''; width: 4px; height: 4px; border-radius: var(--radius-marker); background: currentColor; }
.status-submitted, .status-assigned { color: #3466c1; background: #eaf1ff; }
.status-in_review { color: #946d28; background: #fff4df; }
.status-signed, .status-handed_back, .status-closed, .status-accepted { color: #297d5b; background: #eaf7f0; }
.status-rejected { color: #b3484d; background: #fcecee; }
.case-detail { min-width: 0; border-radius: var(--radius-surface); }
.detail-title { padding: 22px 24px; border-bottom: 1px solid #e8edf4; }
.detail-title-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.detail-title h2 { margin: 6px 0 9px; font-size: 23px; }
.detail-title .overline { color: #617087; font-size: 8px; }
.case-meta { display: flex; gap: 13px; flex-wrap: wrap; font-size: 10px; color: #6c7b93; }
.case-meta span { display: inline-flex; align-items: center; gap: 5px; }
.case-meta svg { width: 12px; height: 12px; }
.workflow { display: flex; padding: 16px 24px; gap: 0; background: #fafbfd; border-bottom: 1px solid #e9eef6; }
.workflow-step { flex: 1; font-size: 8px; color: #617087; display: flex; align-items: center; gap: 5px; }
.workflow-step:not(:last-child)::after { content: ''; height: 1px; background: #e0e7f1; flex: 1; margin: 0 8px; }
.workflow-step b { font: 600 8px var(--font-mono); border: 1px solid #dce4f0; width: 17px; height: 17px; border-radius: var(--radius-small); display: grid; place-items: center; flex: none; background: #fff; }
.workflow-step.done { color: var(--blue-700); }
.workflow-step.done b { background: #e9f0ff; border-color: #d3dffc; }
.workflow-step.current { color: #2a5be0; font-weight: 700; }
.workflow-step.current b { color: #fff; background: #3772ff; border-color: #3772ff; }
.detail-section { padding: 24px; border-bottom: 1px solid #edf0f5; }
.section-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.section-label h3 { color: #3a4b68; font-size: 12px; }
.section-label svg { width: 15px; height: 15px; }
.question { color: #66758d; font-size: 12px; line-height: 1.8; }
.muted { color: #617087; }
.context-note { border: 1px solid #dce7fb; padding: 12px 14px; border-radius: var(--radius-surface); background: #f3f7ff; color: #577198; font-size: 10px; line-height: 1.7; }
.context-note.warning { background: transparent; color: #52647f; border-color: #dce3ed; }
.context-note + .button-row { margin-top: 13px; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.document-box, .summary-box { border: 1px solid #dbe3ee; border-radius: var(--radius-surface); overflow: hidden; min-width: 0; background: #fff; }
.document-heading { padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8edf4; gap: 8px; background: #fafbfd; }
.document-heading h3 { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 650; }
.document-heading svg { width: 13px; height: 13px; color: #7992be; }
.tiny-label { color: #617087; font: 8px var(--font-mono); letter-spacing: .05em; }
.source-document { padding: 12px 0; font: 11px/1.8 var(--font-mono); max-height: 360px; overflow-y: auto; scroll-behavior: smooth; }
.source-document .document-name { font: 9px var(--font-body); padding: 0 12px 12px; color: #617087; overflow-wrap: anywhere; }
.source-line { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 6px; padding: 4px 12px 4px 0; scroll-margin-top: 20px; }
.line-number { color: #617087; text-align: right; user-select: none; }
.line-text { color: #596b85; overflow-wrap: anywhere; white-space: pre-wrap; }
.source-line.highlighted { background: #e8f0ff; outline: 1px solid #9eb9e7; }
.source-line:first-of-type .line-text { color: #596b85; }
.summary-content { padding: 15px 13px; }
.summary-item { padding: 0 0 15px; margin-bottom: 14px; border-bottom: 1px solid #edf0f5; font-size: 12px; line-height: 1.8; color: #60718a; }
.summary-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.source-citation { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; border: 0; border-radius: var(--radius-button); color: #2857a5; background: transparent; padding: 6px 0; font-size: 10px; margin-top: 4px; text-decoration: underline; text-underline-offset: 3px; }
.source-citation:hover { color: #173f80; text-decoration-thickness: 2px; }
.source-citation svg { width: 11px; height: 11px; }
.review-note { margin-top: 12px; font-size: 9px; color: #617087; line-height: 1.6; }
.portal .textarea, .portal .input, .portal .select { border: 1px solid #cbd5e3; border-radius: var(--radius-input); min-height: 40px; padding: 10px 12px; background: #fff; font-size: 12px; color: #364b6c; width: 100%; }
.portal .textarea { min-height: 136px; line-height: 1.8; resize: vertical; }
.portal .label { font-size: 11px; color: #536681; }
.portal .hint { font-size: 10px; line-height: 1.6; color: #617087; }
.portal .field { gap: 7px; }
.response-text { font-size: 12px; line-height: 1.9; color: #526782; white-space: pre-wrap; overflow-wrap: anywhere; padding: 15px; border: 1px solid #e0e9e5; border-radius: var(--radius-surface); background: #f8fcfa; }
.response-meta { margin-top: 9px; font-size: 9px; color: #526f60; display: flex; align-items: center; gap: 5px; }
.response-meta svg { width: 12px; height: 12px; }
.action-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.action-footer p { font-size: 9px; color: #617087; }
.assignment-form { display: flex; gap: 9px; align-items: end; }
.assignment-form .field { flex: 1; min-width: 0; }
.audit-list { list-style: none; padding: 0; margin: 0; }
.audit-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 9px; position: relative; padding: 0 0 18px; }
.audit-item::before { content: ''; background: #dce6f4; width: 1px; position: absolute; top: 12px; bottom: 0; left: 4px; }
.audit-item:last-child { padding-bottom: 0; }
.audit-item:last-child::before { display: none; }
.audit-dot { width: 9px; height: 9px; border: 2px solid #cbdcf9; border-radius: var(--radius-marker); background: #fff; margin-top: 3px; z-index: 1; }
.audit-item strong { display: block; font-size: 10px; font-weight: 600; color: #536681; }
.audit-item p { font-size: 10px; color: #617087; margin-top: 3px; line-height: 1.6; overflow-wrap: anywhere; }
.audit-item time { font-size: 9px; color: #68758a; white-space: nowrap; padding-top: 3px; }
.audit-toggle { border: 1px solid transparent; border-radius: var(--radius-button); padding: 6px 8px; background: transparent; color: #365b8c; font-size: 11px; }
.audit-toggle:hover { background: #f1f5fb; border-color: #dce5f1; }
.empty-queue { padding: 35px 20px; color: #617087; text-align: center; font-size: 11px; line-height: 1.7; }
.empty-detail { border-radius: var(--radius-surface); min-height: 430px; padding: 55px 34px; display: flex; align-items: center; justify-content: center; text-align: center; flex-direction: column; background: #fff; }
.empty-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: var(--radius-icon); background: #eaf1ff; color: #4b7bd2; margin-bottom: 22px; }
.empty-icon svg { width: 29px; height: 29px; }
.empty-detail h2 { margin-bottom: 12px; font-size: 22px; }
.empty-detail > p { max-width: 350px; color: #7a889e; font-size: 12px; line-height: 1.8; margin-bottom: 21px; }
.journey { display: flex; gap: 8px; margin-top: 33px; color: #617087; font-size: 9px; align-items: center; flex-wrap: wrap; justify-content: center; }
.journey span { padding: 7px 0; }
.login-page { padding: 65px 35px; max-width: 730px; margin: 0 auto; }
.login-page h1 { font-size: 36px; margin-bottom: 16px; }
.login-page > p { font-size: 14px; line-height: 1.8; color: #71829c; margin-bottom: 27px; }
.login-card { padding: 28px; background: #fff; border: 1px solid #dce3ed; border-radius: var(--radius-surface); box-shadow: 0 2px 4px #15234204, 0 12px 32px -18px #15234226; }
.login-card .field { margin-bottom: 20px; }
.login-card .context-note { margin-top: 22px; }
.portal dialog { margin: auto; width: min(540px, calc(100% - 32px)); max-height: calc(100vh - 50px); border: 1px solid #dbe4f0; border-radius: var(--radius-surface); padding: 0; box-shadow: 0 30px 100px #10244e33; background: #fff; color: #243151; }
.portal dialog::backdrop { background: #15234266; }
.dialog-header { padding: 24px 27px 19px; border-bottom: 1px solid #edf0f5; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.dialog-header h2 { font-size: 22px; margin-top: 7px; }
.icon-close { border: 1px solid #e1e7f0; background: #f5f7fb; color: #536681; width: 34px; height: 34px; border-radius: var(--radius-icon); display: grid; place-items: center; }
.icon-close svg { width: 15px; height: 15px; }
.dialog-body { padding: 23px 27px; display: grid; gap: 18px; }
.dialog-footer { padding: 17px 27px; border-top: 1px solid #edf0f5; display: flex; justify-content: flex-end; gap: 9px; background: #fafbfd; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-area { padding: 16px; border: 1px dashed #c9d9f0; border-radius: var(--radius-surface); background: #f8faff; }
.upload-area label { display: block; font-size: 11px; color: #506785; margin-bottom: 9px; font-weight: 600; }
.upload-area input { max-width: 100%; font-size: 10px; color: #6f829c; }
.upload-area input::file-selector-button { border: 1px solid #cedcf0; color: #4a6d9f; background: #fff; padding: 8px 10px; border-radius: var(--radius-button); margin-right: 7px; cursor: pointer; }
.sample-downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.text-link { border: 0; padding: 3px 0; background: transparent; font-size: 11px; color: #2857a5; text-decoration: underline; text-underline-offset: 3px; }
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: 11px; line-height: 1.8; color: #6a7c96; }
.consent input { margin-top: 4px; accent-color: #3772ff; flex: none; }
.notice { position: fixed; bottom: 22px; left: max(24px, calc(50% - 270px)); width: min(540px, calc(100% - 48px)); padding: 16px 45px 16px 19px; z-index: 100; background: #243151; color: #fff; border: 1px solid #46628e; border-radius: var(--radius-surface); box-shadow: 0 12px 40px #13224125; font-size: 12px; line-height: 1.6; }
.notice[data-error="true"] { background: #fff5f3; border-color: #e7c2bc; color: #8d403d; }
.notice button { position: absolute; right: 10px; top: 12px; background: none; border: 0; color: inherit; padding: 5px; }
.notice button svg { width: 15px; height: 15px; }
.notice[hidden] { display: none; }
.loading-state { display: grid; min-height: 50vh; place-items: center; color: #788ba9; font-size: 13px; }
.inline-error { color: #b3484d; font-size: 11px; line-height: 1.7; padding: 10px 12px; border-radius: var(--radius-surface); background: #fff2f2; }
.billing-status { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px; border: 1px solid #e2e9f3; border-radius: var(--radius-surface); margin-bottom: 13px; }
.billing-status strong { display: block; font-size: 11px; margin-bottom: 6px; }
.billing-status p { font: 9px var(--font-mono); color: #617087; overflow-wrap: anywhere; }
.lock-note { display: flex; gap: 8px; align-items: center; color: var(--blue-700); font-size: 10px; background: #edf4ff; border: 1px solid #dce9fc; padding: 12px 14px; border-radius: var(--radius-surface); margin-bottom: 20px; line-height: 1.6; }
.lock-note svg { width: 15px; height: 15px; }
/* Shared control states keep the dense workflow calm and keyboard-visible. */
.portal .input, .portal .select, .portal .textarea, .identity-box select, .queue-tools select, .mobile-role { transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
.portal .input:hover:not(:disabled), .portal .select:hover:not(:disabled), .portal .textarea:hover:not(:disabled), .identity-box select:hover, .queue-tools select:hover, .mobile-role:hover { border-color: #a8bad3; }
.portal .input:focus, .portal .select:focus, .portal .textarea:focus, .identity-box select:focus-visible, .queue-tools select:focus-visible, .mobile-role:focus-visible { border-color: var(--blue-600); background: #fff; box-shadow: 0 0 0 3px #3772ff12; }
.portal input:disabled, .portal select:disabled, .portal textarea:disabled { color: #68758a; background: #edf1f6; border-color: #d6deea; cursor: not-allowed; }
.portal input::placeholder, .portal textarea::placeholder { color: #6b7b93; opacity: 1; }
.icon-close:hover { color: #243151; background: #eaf0f8; border-color: #c5d2e4; }
.nav-item:hover { background: #e3edff; }
.text-link:hover { color: var(--blue-800); text-decoration-thickness: 2px; }
.upload-area input::file-selector-button:hover { color: #243151; background: #eef3ff; border-color: #a8bad3; }
.case-row:focus-visible { outline-offset: -3px; }
@media (min-width: 1550px) { .board { grid-template-columns: 325px minmax(0, 1fr); } .workspace { padding-inline: 45px; } }
@media (max-width: 1250px) { .shell { grid-template-columns: 205px minmax(0,1fr); } .sidebar { padding-inline: 13px; } .workspace { padding-inline: 25px; } .topbar { padding-inline: 25px; } .board { grid-template-columns: 235px minmax(0,1fr); gap: 15px; } .review-grid { grid-template-columns: 1fr; } .document-box { max-height: 300px; overflow: auto; } .workflow { padding-inline: 16px; } .workflow-step:not(:last-child)::after { margin-inline: 4px; } }
@media (max-width: 980px) { .shell { grid-template-columns: 180px minmax(0,1fr); } .brand-word { font-size: 20px; } .brand-symbol { width: 30px; height: 30px; } .brand-lockup { gap: 7px; padding-inline: 4px; } .board { grid-template-columns: 1fr; } .queue-list { display: flex; max-height: none; overflow-x: auto; padding: 8px; } .case-row { width: 215px; flex: none; border: 1px solid #e6ebf3; margin: 0 6px 0 0; } .queue-tools { max-width: none; padding: 9px 14px; } .queue-tools select { max-width: 260px; } .metric { padding: 14px 12px; gap: 10px; } .metric-icon { width: 31px; height: 31px; } .metric-icon svg { width: 17px; height: 17px; } .metric-label { font-size: 9px; } .metric-value { font-size: 22px; } .workspace-heading { align-items: start; } .workspace-heading .button-row { flex-direction: column-reverse; align-items: stretch; } .review-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 740px) { .portal .btn { min-height: 44px; } .icon-close { width: 40px; height: 40px; } .source-citation { min-height: 44px; } .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .topbar { height: auto; min-height: 60px; padding: 14px 20px; flex-wrap: wrap; } .mobile-role { display: block !important; width: 100%; padding: 8px; border: 1px solid #dce5f2; border-radius: var(--radius-input); font-size: 11px; color: #52647f; background: #fff; } .workspace { padding: 25px 18px; } .demo-banner { flex-wrap: wrap; padding: 10px 17px; gap: 7px; } .demo-banner > span:not(.demo-indicator):not(.local-chip) { order: 4; font-size: 9px; width: 100%; margin-left: 13px; } .demo-banner .local-chip { font-size: 7px; } .metrics { gap: 8px; margin-bottom: 19px; } .metric { padding: 12px 9px; display: block; } .metric-icon { display: none; } .workspace-heading h1 { font-size: 27px; } .workspace-heading p { font-size: 11px; } .workspace-heading .overline { font-size: 8px; } .workspace-heading .btn { padding: 8px 10px; font-size: 10px; } .review-grid { grid-template-columns: 1fr; } .detail-title, .detail-section { padding: 20px 17px; } .workflow { padding-inline: 14px; } .workflow-step { font-size: 7px; } .workflow-step b { width: 14px; height: 14px; font-size: 7px; } .workflow-step:not(:last-child)::after { margin-inline: 3px; } .audit-item { grid-template-columns: 14px 1fr; } .audit-item time { grid-column: 2; margin-top: -5px; } .dialog-body, .dialog-header { padding: 20px; } .dialog-footer { padding: 15px 20px; } .two-fields { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .portal *, .portal *::before, .portal *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.mobile-role { display: none; }
.login-overline { margin-bottom: 18px; color: #3772ff; }
.portal .upload-hint { margin-top: 10px; }
.portal .small-empty { font-size: 11px; }
.portal .response-hint { display: block; margin-bottom: 9px; }
.portal .sign-footer { border-top: 1px solid #edf0f5; padding-top: 15px; }
.portal .billing-intro { margin-bottom: 12px; }
.portal .audit-section { border-bottom: 0; }

.sample-shortcuts { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e0e9f7; }
.portal .sample-shortcuts .btn { white-space: normal; text-align: left; font-size: 10px; min-height: 34px; }

.portal .brand-lockup { flex-direction: column; align-items: flex-start; gap: 6px; }
.portal-wordmark { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.portal-wordmark .brand__word { font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -.02em; color: var(--ink-800); }
.portal-wordmark .brand__pulse { width: 30px; height: 17px; color: var(--blue-500); }
.brand-caption { color: #617087; font-size: 8px; letter-spacing: .18em; text-transform: uppercase; }

/* The signed-out view is separate from the practitioner workspace. */
.portal.signed-out { background: #fff; }
.signed-out .demo-banner { display: none; }
.sign-in-page { min-height: 100vh; min-height: 100svh; padding: 48px 24px; display: grid; place-items: center; }
.sign-in-panel { width: 100%; max-width: 344px; text-align: center; }
.sign-in-brand { display: flex; justify-content: center; margin-bottom: 38px; }
.sign-in-brand .brand__word { font-size: 35px; }
.sign-in-brand .brand__pulse { width: 42px; height: 24px; }
.portal .sign-in-panel h1 { font-size: 22px; line-height: 1.4; letter-spacing: -.025em; }
.sign-in-intro { color: #617087; font-size: 13px; line-height: 1.6; margin-top: 7px !important; }
.sign-in-form { margin-top: 30px; text-align: left; }
.sign-in-form .field { display: grid; gap: 9px; }
.sign-in-form .label { font-size: 12px; font-weight: 600; }
.sign-in-form .select { min-height: 46px; font-size: 13px; }
.portal .sign-in-form .btn { display: flex; justify-content: center; width: 100%; min-height: 44px; margin-top: 20px; font-size: 12px; }
.sign-in-note { color: #617087; font-size: 11px; line-height: 1.8; margin-top: 26px !important; }
.sign-in-error { color: #963e3e; font-size: 12px; line-height: 1.6; }
.sign-in-error[hidden] { display: none; }
.sign-in-form [aria-invalid="true"] { border-color: #b3484d; }
@media (max-width: 420px) { .sign-in-page { padding: 36px 24px; } .sign-in-brand { margin-bottom: 32px; } }

/* Clinic context, departments and account access retain the shared Anodyne palette. */
.department-nav { display: grid; gap: 5px; }
.department-nav .nav-item, .mobile-departments .nav-item { background: transparent; color: #52647f; }
.department-nav .nav-item:hover, .mobile-departments .nav-item:hover { background: #f2f5fa; }
.department-nav .nav-item.is-active, .mobile-departments .nav-item.is-active { background: #edf2ff; color: var(--blue-700); }
.clinic-context { min-width: 0; display: grid; gap: 3px; }
.clinic-context label { color: #52647f; font-size: 10px; }
.clinic-context select { max-width: 300px; width: 100%; border: 0; border-radius: var(--radius-input); background: transparent; color: #243151; font-size: 12px; font-weight: 600; padding: 5px 20px 5px 0; min-height: 36px; }
.portal .clinic-context select:focus { outline: 1px solid #2857a5; outline-offset: 3px; box-shadow: none; }
.clinic-context option { color: #243151; background: #fff; }
/* Supporting browsers render a light native picker; others keep their system list. */
@supports (appearance: base-select) {
  .clinic-context select, .clinic-context select::picker(select) { appearance: base-select; }
  .clinic-context select { display: flex; align-items: center; gap: 16px; padding-right: 0; }
  .clinic-context select::picker-icon { color: #52647f; }
  .clinic-context select::picker(select) { border: 1px solid #dce3ed; border-radius: var(--radius-input); padding: 4px; background: #fff; box-shadow: 0 4px 12px #1b2c4b12; }
  .clinic-context option { min-height: 44px; padding: 8px 12px; border-radius: var(--radius-surface); font-size: 12px; }
  .clinic-context option:checked, .clinic-context option:hover { background: #edf3ff; color: #204d9c; }
  .clinic-context option:focus-visible { outline: 1px solid #2857a5; outline-offset: -1px; box-shadow: none; }
  .clinic-context option::checkmark { display: none; }
}
.clinic-name { color: #344767; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.clinic-context .btn { justify-content: flex-start; padding-inline: 0; min-height: 44px; }
.account-menu { position: relative; margin-left: auto; }
.profile-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #dce3ed; border-radius: var(--radius-icon); background: #fff; color: #344767; }
.profile-button svg { width: 18px; height: 18px; }
.profile-button:hover, .profile-button[aria-expanded="true"] { background: #edf3ff; border-color: #b9cbea; }
.profile-button:focus-visible, .account-popover .btn:focus-visible { outline: 1px solid #2857a5; outline-offset: 3px; box-shadow: none; }
.account-popover { position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); width: min(248px, calc(100vw - 36px)); padding: 16px; background: #fff; border: 1px solid #dce3ed; border-radius: var(--radius-input); box-shadow: 0 8px 24px #1b2c4b18; display: grid; gap: 4px; }
.account-popover[hidden] { display: none; }
.account-popover > strong { font-size: 13px; overflow-wrap: anywhere; }
.account-popover > span { font-size: 11px; color: #52647f; margin-bottom: 8px; }
.portal .account-popover .btn { justify-content: flex-start; min-height: 44px; padding: 8px; border: 0; background: transparent; color: #344767; border-radius: var(--radius-button); }
.portal .account-popover .btn:hover { background: #edf3ff; color: #204d9c; }
.mobile-departments { display: none; }
.account-page, .access-page { max-width: 1200px; }
.account-section { padding: 24px; margin-bottom: 20px; }
.account-section > h2 { margin-bottom: 12px; }
.account-context { color: #617087; font-size: 12px; line-height: 1.6; }
.account-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 24px 0; }
.account-facts dt { font-size: 11px; color: #617087; margin-bottom: 7px; }
.account-facts dd { margin: 0; color: #243151; font-size: 13px; }
.access-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid #e7ecf3; }
.access-row:last-child { border-bottom: 0; padding-bottom: 0; }
.access-row p { font-size: 12px; line-height: 1.7; color: #617087; margin-top: 5px; }
.access-state { color: #344767; font-size: 12px; font-weight: 600; }
.access-row .button-row { flex-shrink: 0; }
.empty-access { padding: 14px 0 4px; color: #617087; font-size: 13px; line-height: 1.7; max-width: 650px; }
.access-policy { margin-bottom: 22px; }
.invite-form { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) auto; gap: 14px; align-items: end; margin-top: 22px; }
.invite-form .field { margin: 0; min-width: 0; }
.invite-form .select { width: 100%; }
.invite-form .btn { min-height: 44px; }
.access-history { margin-top: 10px; color: #617087; font-size: 11px; }
.access-history summary { cursor: pointer; padding: 4px 0; }
.access-history ol { padding-left: 18px; }
.access-history li { margin: 9px 0; }
.access-history time { display: block; margin-top: 3px; }
@media (max-width: 740px) {
  .mobile-departments { display: flex; gap: 6px; overflow-x: auto; padding: 12px 18px; background: #fff; border-bottom: 1px solid #e5eaf2; }
  .mobile-departments .nav-item { width: auto; flex: 0 0 auto; font-size: 11px; padding: 8px 10px; min-height: 44px; }
  .mobile-departments .nav-item svg { width: 16px; height: 16px; }
  .clinic-context { max-width: calc(100% - 60px); }
  .clinic-context select { min-height: 44px; }
  .topbar { height: auto; min-height: 75px; flex-wrap: wrap; padding: 12px 18px; gap: 10px; }
  .topbar .mobile-role { flex-basis: 100%; max-width: none; width: 100%; }
  .account-facts { grid-template-columns: 1fr; gap: 18px; }
  .invite-form { grid-template-columns: 1fr; }
  .account-section { padding: 20px; }
  .access-row { align-items: flex-start; flex-direction: column; }
  .access-row .button-row { width: 100%; }
}

@media (max-width: 740px) { .notice { position: relative; inset: auto; width: auto; margin: 8px 18px; } }

/* Keep the document and draft together during an active review. */
.case-detail { overflow: visible; }
#case-title { scroll-margin-top: 16px; }
.review-grid--active { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.review-grid--active .document-box { max-height: none; overflow: visible; }
.review-grid--active .source-document { max-height: 480px; }
.review-grid--active .summary-box { grid-column: 1 / -1; }
.review-grid--active .summary-content { display: flex; flex-wrap: wrap; gap: 14px; }
.review-grid--active .summary-item { flex: 1 1 190px; margin: 0; padding: 0; border: 0; }
.response-editor { min-width: 0; border: 1px solid #dce5f2; border-radius: var(--radius-surface); padding: 15px; background: var(--white, #fff); }
.response-editor .textarea { min-height: 280px; }
.review-actions { position: static; bottom: 0; z-index: 5; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #dce5f2; border-radius: var(--radius-surface); background: #fff; box-shadow: 0 -4px 18px #15234214; }
.review-actions > span { color: var(--ink-700); font-size: 11px; }
.review-error { flex-basis: 100%; padding-left: 10px; border-left: 2px solid var(--danger-700); color: var(--danger-700); font-size: 12px; line-height: 1.6; }
.review-error[hidden] { display: none; }
.review-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 741px) {
  /* Reserve the measured bar height before its sticky position can overlap the review. */
  .review-grid--active { --review-actions-height: 66px; }
  .review-grid--active .review-actions { margin-top: var(--review-actions-height); }
  .review-grid--active .review-actions.is-sticky { position: sticky; }
  .review-grid--active .source-line, .review-grid--active .document-box,
  .review-grid--active .response-editor, .review-grid--active .textarea {
    scroll-margin-bottom: calc(var(--review-actions-height) + 24px);
  }
}
@media (max-width: 740px) {
  .topbar { min-height: 0; padding: 8px 18px; }
  .topbar .mobile-role { flex-basis: auto; width: 100%; min-height: 36px; }
  .clinic-context label { font-size: 9px; }
  .mobile-departments { padding-block: 6px; }
  .workspace { padding-top: 18px; }
  .workspace-heading p { margin-top: 6px; }
  .review-grid--active { grid-template-columns: 1fr; }
  .review-grid--active .summary-box, .review-actions { grid-column: auto; }
  .review-grid--active .source-document { max-height: 260px; }
  .response-editor .textarea { min-height: 180px; }
  .review-actions { position: static; padding: 8px; box-shadow: none; }
  .review-actions > span { display: none; }
  .review-action-buttons { width: 100%; }
  .review-action-buttons .btn { flex: 1 1 auto; font-size: 10px; padding-inline: 8px; }
}

/* Shared status and selection treatments. */
.metric:nth-child(2) .metric-icon { background: #edf3ff; color: #315eac; }
.status { display: inline; padding: 0; background: none; border: 0; border-radius: var(--radius-small); color: #526178; font-weight: 700; }
.status::before { content: none; }
.status-submitted, .status-assigned, .status-in_review, .status-invited { color: #2857a5; background: none; }
.status-signed, .status-handed_back, .status-closed, .status-accepted, .status-active, .status-approved { color: #206c4c; background: none; }
.status-rejected, .status-revoked { color: #a2343d; background: none; }
.case-row.selected { border: 1px solid #9cb8e9; background: #edf3ff; box-shadow: none; }
.case-row.selected strong { color: #204d9c; font-weight: 750; }
.case-row:focus-visible { outline: 3px solid #244fa8; outline-offset: -3px; }
.workflow-step b, .workflow-step.done b, .workflow-step.current b { display: inline; width: auto; height: auto; border: 0; border-radius: var(--radius-small); background: none; color: inherit; }
.audit-item { grid-template-columns: 1fr auto; }
.audit-item::before { content: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

@media (max-width: 740px) {
  .review-action-buttons { flex-wrap: nowrap; }
  .review-action-buttons .btn { flex: 1 1 0; min-width: 0; padding-inline: 5px; }
}

.workspace-heading .overline, .detail-title .overline { text-transform: none; }

/* Verified identity screens share the brand without development identity controls. */
.verified-auth .shell { min-height: 100vh; min-height: 100svh; }
.verified-auth .sign-in-panel { max-width: 368px; }
.verified-auth .sign-in-panel h1 { font-size: 25px; }
.verified-auth .sign-in-intro { color: #52647f; line-height: 1.8; }
.verified-auth .sign-in-form .input { min-height: 48px; font-size: 16px; }
.verified-auth .sign-in-form .btn { min-height: 44px; }
.verified-auth .sign-in-error { color: var(--danger-700); text-align: left; margin-top: 16px; }
.verified-auth .sign-in-error:not([hidden]) { border-left: 2px solid var(--danger-700); padding-left: 12px; }
.verified-auth .sign-in-signout { margin-top: 16px; min-height: 44px; }
.verified-auth .account-context, .verified-auth .account-facts dt { color: #52647f; }
.verified-auth .account-page .workspace-heading p, .verified-auth .access-page .workspace-heading p { color: #52647f; }
.verified-auth .account-page .overline, .verified-auth .access-page .overline { color: var(--blue-700); }
.verified-auth .account-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.verified-auth .account-facts dd { overflow-wrap: anywhere; line-height: 1.6; }
.verified-auth .access-history ol { list-style: none; padding-left: 0; }
.verified-auth .access-history li { border-left: 1px solid #dce3ed; padding-left: 12px; }
.verified-auth .access-policy { background: transparent; border: 0; border-left: 2px solid var(--blue-700); border-radius: var(--radius-surface); }
.verified-auth #sign-in-code-dialog { border-radius: var(--radius-surface); }
.verified-auth #sign-in-code-dialog .dialog-header h2 { margin-top: 0; }
.code-warning { color: var(--ink-700); font-size: 13px; font-weight: 600; line-height: 1.7; }
.portal .issued-code { font-family: var(--font-mono); font-size: 16px; min-height: 50px; letter-spacing: .025em; }
.verified-auth .code-facts { grid-template-columns: 1fr; margin-block: 18px; }
#code-copy-status:empty { display: none; }
@media (max-width: 740px) {
  .verified-auth .account-facts { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .verified-auth .sign-in-page { padding-inline: 24px; }
  .portal .issued-code { font-size: 13px; letter-spacing: 0; padding-inline: 10px; }
  .verified-auth .access-row .btn { white-space: normal; }
}

/* Organization onboarding: plain status text, generous reading space and full-border selection. */
.onboarding { --on-ink: #243151; --on-muted: #52647f; --on-line: #dce3ed; color: var(--on-ink); background: #f6f8fb; min-height: 100svh; font-size: 14px; }
.onboarding-join { background: #fff; }
.on-topbar { min-height: 96px; padding: 24px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--on-line); background: #fff; }
.on-brand { display: flex; align-items: center; gap: 24px; }
.on-brand > span { padding-left: 24px; border-left: 1px solid var(--on-line); color: var(--on-muted); font-size: 12px; }
.on-brand .brand__word { font-size: 28px; }
.on-identity { display: flex; gap: 24px; align-items: center; font-size: 12px; color: var(--on-muted); }
.on-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100svh - 140px); }
.on-sidebar { padding: 38px 22px; background: #fff; border-right: 1px solid var(--on-line); }
.on-eyebrow { display: block; font-size: 11px; font-weight: 650; letter-spacing: .08em; color: #2857a5; margin-bottom: 12px !important; }
.on-sidebar h2 { font-size: 19px; margin-bottom: 30px; overflow-wrap: anywhere; }
.on-nav { display: grid; gap: 6px; }
.on-nav button { text-align: left; min-height: 44px; padding: 10px; border-radius: var(--radius-icon); border: 1px solid transparent; background: transparent; color: var(--on-muted); font-size: 12px; font-weight: 600; }
.on-nav button:hover { background: #f2f5fa; }
.on-nav button[aria-current="page"] { background: #edf3ff; border-color: #c5d5f0; color: #204d9c; }
.on-sidebar-footer { display: grid; gap: 12px; border-top: 1px solid var(--on-line); padding-top: 24px; margin-top: 36px; }
.on-main { padding: 44px 48px 64px; max-width: 1400px; min-width: 0; }
.on-main > h1 { margin-bottom: 16px; }
.on-main > p { margin-bottom: 20px; }
.on-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.on-heading h1 { font-size: 30px; line-height: 1.35; }
.on-heading p { margin-top: 9px; }
.onboarding p, #onboarding-dialog p { color: #52647f; font-size: 13px; line-height: 1.8; }
.onboarding .btn, #onboarding-dialog .btn { min-height: 44px; font-size: 11px; padding: 8px 12px; }
.onboarding .btn:disabled { color: #526178; }
.onboarding .icon-close, #onboarding-dialog .icon-close { width: 44px; height: 44px; }
.on-card { padding: 28px; border: 1px solid var(--on-line); border-radius: var(--radius-surface); background: #fff; }
.on-card h2 { font-size: 18px; margin-bottom: 12px; }
.on-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.on-code-line { display: grid; gap: 9px; margin: 26px 0 20px !important; }
.on-code-line strong { font: 700 27px var(--font-mono); letter-spacing: .06em; color: #243151; }
.on-help { margin-top: 18px !important; font-size: 12px !important; }
.on-form { display: grid; gap: 22px; }
.on-form .field, .on-request-form .field { margin: 0; display: grid; gap: 9px; min-width: 0; }
.on-form .label, .on-request-form .label { color: #243151; font-size: 13px; font-weight: 600; }
.on-form .input, .on-form .select, .on-request-form .select { width: 100%; min-height: 48px; font-size: 16px; color: #243151; }
.on-form .btn { justify-self: start; }
.on-form .on-help { margin-top: -8px !important; }
.on-form [aria-invalid="true"] { border-color: #a2343d; }
.on-checkbox { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: #243151; line-height: 1.6; }
.on-checkbox input { width: 20px; height: 20px; accent-color: #2857a5; flex: none; margin-top: 0; }
.on-card > .on-form { margin-top: 24px; }
.on-counts dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 24px 0 0; }
.on-counts dt { color: #52647f; font-size: 12px; line-height: 1.7; }
.on-counts dd { font: 700 30px var(--font-display); margin: 8px 0 0; color: #243151; }
.on-list { padding: 0 28px; }
.on-record { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--on-line); }
.on-record:last-child { border-bottom: 0; }
.on-record h2 { font-size: 16px; margin-bottom: 9px; }
.on-record p { font-size: 12px; }
.on-record-main { min-width: 0; }
.on-record .button-row { flex-shrink: 0; }
.on-status { font-weight: 750; color: #526178; }
.on-status-invited, .on-status-pending, .on-status-awaiting_approval { color: #2857a5; }
.on-status-active, .on-status-accepted, .on-status-approved, .on-status-sent, .on-status-redeemed { color: #206c4c; }
.on-status-denied, .on-status-revoked, .on-status-suspended, .on-status-expired, .on-status-withdrawn { color: #a2343d; }
.on-expiry { display: block; }
.onboarding .on-delivery { color: #a2343d; margin-top: 14px; max-width: 440px; }
.onboarding .on-error, #onboarding-dialog .on-error { color: #a2343d; font-size: 13px; line-height: 1.7; padding: 16px; border: 1px solid #dfb9bf; background: #fff; border-radius: var(--radius-surface); margin: 0 0 22px; }
/* Address refusals are account guidance, with one borderless sign-out action. */
.on-refusal .on-eyebrow { margin-top: 28px; }
.onboarding .on-refusal .on-error { padding: 0; border: 0; border-radius: var(--radius-surface); background: transparent; color: var(--on-muted); font-size: 14px; margin-bottom: 0; }
.onboarding .on-refusal .btn--quiet { min-height: 44px; margin-top: 14px; margin-inline-start: -8px; padding-inline: 8px; border: 0; background: transparent; color: #2857a5; text-decoration: underline; text-underline-offset: 4px; }
.on-refusal .btn--quiet:focus { outline: 1px solid #2857a5; outline-offset: 2px; border-radius: var(--radius-button); }
.onboarding .on-refusal .btn--quiet:hover { color: #173f80; }
.on-refusal .on-form { padding-top: 26px; border-top: 1px solid var(--on-line); }
.on-refusal .input[readonly] { background: #f5f7fb; color: #243151; }
.on-error[hidden] { display: none; }
.on-form .on-error { margin: 0 !important; }
.on-request-form { display: grid; gap: 12px; min-width: 240px; }
.on-org-record { display: block; }
.on-org-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.on-admins { margin-top: 24px; padding: 0 20px; background: #f6f8fb; border: 1px solid var(--on-line); border-radius: var(--radius-surface); }
.on-admin { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--on-line); }
.on-admin:last-child { border-bottom: 0; }
.on-admins > p { padding: 16px 0; }
.on-activity { list-style: none; margin: 0; padding: 0; }
.on-activity li { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--on-line); }
.on-activity li:is(:focus-visible, .on-activity-keyboard-focus:focus) { outline: none; box-shadow: none; border-radius: var(--radius-surface); }
.on-activity li:is(:focus-visible, .on-activity-keyboard-focus:focus)::before { content: ''; position: absolute; inset: 6px -12px; z-index: -1; background: #f3f6fc; outline: 1px solid #2857a5; pointer-events: none; }
.on-activity li:last-child { border-bottom-color: transparent; }
#on-activity-controls { overflow-anchor: none; }
.on-activity-more { display: block; min-height: 44px; padding: 10px 8px; border: 0; background: transparent; color: #204d9c; font-weight: 650; text-align: left; }
.on-activity-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.on-activity-more:disabled { color: #52647f; text-decoration: none; }
.on-activity-more:focus-visible { outline: 2px solid #2857a5; outline-offset: 2px; box-shadow: none; border-radius: var(--radius-button); }
.onboarding .on-activity-message { margin: 0; color: #52647f; }
.onboarding .on-activity-message:not(:empty) { margin-bottom: 12px; }
.on-activity h2 { font-size: 14px; margin-bottom: 8px; }
.on-activity p { margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.on-empty { padding: 36px 0; }
.on-join-main { min-height: calc(100svh - 156px); padding: 72px 24px 90px; display: grid; place-items: center; }
.on-join-panel { width: 100%; max-width: 500px; border-radius: var(--radius-surface); }
.on-join-panel h1 { font-size: 34px; line-height: 1.35; margin: 12px 0 18px; }
.on-join-panel > p { margin-bottom: 28px; font-size: 14px; }
.on-join-panel .on-form { margin-top: 30px; }
.on-choices, .on-picker { display: grid; gap: 14px; margin-top: 30px; }
.on-choice { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 18px; text-align: left; background: #fff; border: 1px solid #cbd5e3; border-radius: var(--radius-button); color: #243151; }
.on-choice:hover:not(:disabled) { background: #f5f8fd; border-color: #96add0; }
.on-choice strong { display: block; font-size: 13px; line-height: 1.6; }
.on-choice small { display: block; font-size: 12px; color: #52647f; line-height: 1.8; margin-top: 6px; }
.on-choice small strong { display: inline; font-size: 12px; }
.on-choice svg { color: #2857a5; width: 20px; height: 20px; }
.on-choice.on-selected { background: #edf3ff; border-color: #9cb8e9; }
.on-choice:disabled { background: #f6f8fb; }
.on-selected-word { color: #204d9c; margin-left: 14px; }
.on-waiting-list { margin: 20px 0 28px; }
.on-waiting-list .on-record { display: block; }
.on-waiting-list .on-record .btn { margin-top: 16px; }
.on-success { color: #206c4c; font-size: 13px; font-weight: 750; }
.on-footer { padding: 20px 48px; color: #52647f; font-size: 11px; border-top: 1px solid var(--on-line); background: #fff; }
#onboarding-dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid #cbd5e3; border-radius: var(--radius-surface); color: #243151; }
#onboarding-dialog .dialog-header { align-items: center; }
#onboarding-dialog .dialog-header h2 { margin: 0; font-size: 21px; }
#onboarding-dialog .dialog-body { padding-block: 24px; }
#onboarding-dialog .dialog-footer .btn { white-space: normal; }
@media (max-width: 1100px) {
  .on-topbar { padding-inline: 28px; }
  .on-main { padding: 32px 28px 48px; }
  .on-settings-grid { grid-template-columns: 1fr; }
  .on-heading, .on-org-heading { flex-direction: column; }
  .on-record { flex-wrap: wrap; }
}
@media (max-width: 740px) {
  .on-topbar { padding: 20px; gap: 20px; flex-wrap: nowrap; }
  .on-brand { flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
  .on-brand > span { padding: 0; border: 0; font-size: 11px; }
  .on-brand .brand__word { font-size: 25px; }
  .on-identity { flex: none; gap: 12px; }
  .on-identity > span { display: none; }
  .onboarding-join .on-identity:has(> .btn:only-child) { width: auto; }
  .on-layout { grid-template-columns: minmax(0, 1fr); }
  .on-sidebar { padding: 20px 18px; border-right: 0; border-bottom: 1px solid var(--on-line); }
  .on-sidebar .on-eyebrow { display: none; }
  .on-sidebar h2 { font-size: 16px; margin-bottom: 18px; }
  .on-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .on-nav button { font-size: 12px; min-height: 44px; padding: 10px; }
  .on-sidebar-footer { display: flex; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; gap: 8px; }
  .on-main { padding: 28px 18px 40px; }
  .on-heading { gap: 18px; margin-bottom: 24px; }
  .on-heading h1 { font-size: 27px; }
  .on-heading p { font-size: 13px; }
  .on-card { padding: 22px; }
  .on-list { padding: 0 20px; }
  .on-counts dl { grid-template-columns: 1fr; gap: 20px; }
  .on-counts dl > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .on-counts dd { margin: 0; font-size: 24px; }
  .on-record { gap: 18px; padding-block: 24px; align-items: flex-start; }
  .on-request-form { min-width: 0; width: 100%; }
  .on-org-heading .button-row { flex-shrink: 1; }
  .onboarding .btn { white-space: normal; }
  .on-admin { flex-wrap: wrap; }
  .on-admins { padding-inline: 16px; }
  .on-activity li { grid-template-columns: 1fr; gap: 10px; }
  .on-join-main { padding: 44px 24px 60px; min-height: calc(100svh - 160px); }
  .on-join-panel h1 { font-size: 29px; }
  .on-choice { padding: 20px 18px; }
  .on-footer { padding: 20px 24px; }
  .on-record h2, .on-record p, .on-brand, .on-identity span, .on-choice { overflow-wrap: anywhere; }
}

.on-picker-refresh { margin-top: 24px; }

/* Compact controls retain comfortable touch targets and plain actions in notices. */
.portal .sample-shortcuts .btn { min-height: 44px; padding: 8px; border: 0; border-radius: var(--radius-button); background: transparent; color: #204d9c; box-shadow: none; }
.portal .sample-shortcuts .btn:hover { background: #edf3ff; border: 0; box-shadow: none; }
.notice button { width: 44px; height: 44px; top: 4px; right: 4px; display: grid; place-items: center; padding: 0; }
@media (max-width: 740px) {
  .icon-close { width: 44px; height: 44px; }
  .source-citation, .text-link, .audit-toggle { min-height: 44px; }
}

/* Role pages and their shared, scoped case lists. */
.page-context { margin: 0 0 12px !important; color: #2857a5 !important; font-size: 11px !important; font-weight: 650; }
.overview-page { padding-top: 44px; }
.overview-page .workspace-heading { margin-bottom: 36px; }
.metrics { align-items: stretch; gap: 20px; }
.metric { display: flex; flex-direction: column; align-items: stretch; gap: 0; text-align: left; padding: 24px; border: 1px solid #dce3ed; border-top: 3px solid #2857a5; border-radius: var(--radius-surface); color: #243151; box-shadow: none; min-width: 0; }
.metric:hover { background: #f4f7fc; border-color: #91a9ce; }
.metric:focus-visible { outline: 3px solid #244fa8; outline-offset: 4px; }
.metric--attention { border-top-color: #d8aa30; }
.metric--completed { border-top-color: #206c4c; }
.metric-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.metric .metric-icon { display: grid; width: 42px; height: 42px; border-radius: var(--radius-icon); background: #edf3ff; color: #2857a5; }
.metric--attention .metric-icon { background: #fff0ba; color: #725113; }
.metric--completed .metric-icon { background: #eaf7f1; color: #206c4c; }
.metric-open { color: #52647f; }
.metric-label { color: #243151; font-size: 14px; font-weight: 650; margin: 0; }
.metric-value { display: block; font-size: 42px; line-height: 1.3; margin: 12px 0; }
.metric-description { display: block; color: #52647f; font-size: 12px; line-height: 1.8; margin-bottom: 24px; }
.metric-link { display: flex; align-items: center; gap: 8px; color: #204d9c; font-size: 12px; font-weight: 650; margin-top: auto; }
.metric-link svg { width: 16px; height: 16px; }
.overview-guide { margin-top: 42px; padding-top: 30px; border-top: 1px solid #dce3ed; max-width: 780px; }
.overview-guide h2 { margin: 12px 0; font-size: 22px; }
.overview-guide > p:not(.overline) { color: #52647f; line-height: 1.9; font-size: 13px; max-width: 650px; }
.overview-guide .btn { margin-top: 14px; margin-left: -12px; }
.case-reader { min-width: 0; }
.case-navigation { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: #52647f; font-size: 12px; }
.case-navigation .btn { min-height: 44px; border: 0; background: transparent; color: #204d9c; }
.case-navigation .btn:disabled { color: #52647f; background: transparent; border: 0; box-shadow: none; }
.board--list { display: block; }
.board--list .queue-list { max-height: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.board--list .case-row { min-height: 130px; border: 1px solid #e1e7f0; }
.board--list .queue-tools { max-width: 300px; border: 0; }
.board--list .empty-queue { grid-column: 1 / -1; text-align: left; }
.case-row p, .case-row .case-date, .case-meta, .detail-title .overline, .workspace-heading p, .metric-description, .muted, .queue-tools select { color: #52647f; }
.referral-form { max-width: 780px; }
.referral-form .dialog-header { border-bottom: 1px solid #e1e7f0; }
.referral-form .context-note { margin-bottom: 24px; }
.billing-limits { color: #52647f; font-size: 12px; line-height: 1.8; margin-bottom: 24px !important; }
.billing-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.billing-group { border-top: 2px solid #c8d5e9; min-width: 0; }
.billing-group .panel-header { padding-inline: 0; }
.billing-group .panel-header span { color: #52647f; font-size: 11px; }
.billing-row { width: 100%; padding: 20px 12px; display: grid; gap: 10px; text-align: left; background: transparent; border: 1px solid transparent; border-bottom-color: #dce3ed; border-radius: var(--radius-surface); color: #243151; }
.billing-row span { color: #52647f; font-size: 11px; overflow-wrap: anywhere; }
.billing-row:hover { background: #f0f4fb; }
.billing-row.selected { background: #edf3ff; border-color: #9cb8e9; }
.billing-empty { color: #52647f; font-size: 12px; padding-block: 24px; }
.billing-detail { margin-top: 32px; }
.billing-detail .case-navigation { margin: 0; padding: 8px 16px; border-bottom: 1px solid #dce3ed; }
.access-attention { color: #243151; margin-block: 24px !important; font-size: 13px; line-height: 1.8; }
.admin-section-title { margin: 28px 0 16px !important; }
.admin-utilities { border-top: 1px solid #dce3ed; margin-top: 30px; padding-top: 20px; }
.portal :is(.context-note, .lock-note) + .button-row .btn { border: 0; background: transparent; min-height: 44px; color: #204d9c; box-shadow: none; }
@media (max-width: 1100px) and (min-width: 741px) {
  .metric { padding: 18px; }
  .metric-label { font-size: 12px; }
  .metrics { gap: 12px; }
}
@media (max-width: 740px) {
  .overview-page { padding-top: 26px; }
  .metrics { grid-template-columns: 1fr; gap: 14px; }
  .metric { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 16px; padding: 18px; }
  .metric-top { grid-row: 1 / 4; margin: 0; align-self: start; }
  .metric-open { display: none; }
  .metric-label { grid-column: 2; font-size: 13px; align-self: center; }
  .metric-value { grid-column: 3; grid-row: 1; margin: 0; font-size: 28px; }
  .metric-description { grid-column: 2 / 4; margin: 7px 0 12px; font-size: 11px; }
  .metric-link { grid-column: 2 / 4; font-size: 11px; }
  .overview-guide { margin-top: 28px; padding-top: 24px; }
  .board--list .queue-list, .billing-groups { grid-template-columns: 1fr; }
  .board--list .case-row { min-height: 0; }
  .billing-groups { gap: 24px; }
  .referral-form .dialog-body { padding: 20px; }
  .referral-form .dialog-header, .referral-form .dialog-footer { padding: 18px 20px; }
  .case-navigation { margin-top: 12px; }
  .case-row-top { flex-wrap: wrap; }
}
.metrics .metric--completed .metric-icon { background: #eaf7f1; color: #206c4c; }
.overview-guide .btn { background: transparent; border: 0; box-shadow: none; color: #204d9c; min-height: 44px; }
.access-attention .btn { border: 0; background: transparent; min-height: 44px; color: #204d9c; }

.billing-row .status-submitted { color: #2857a5; }
.billing-row .status-accepted { color: #206c4c; }
.billing-row .status-rejected { color: #a2343d; }
@media (max-width: 980px) {
  .queue-list { display: grid; grid-template-columns: 1fr; overflow-x: hidden; overflow-y: auto; max-height: 360px; gap: 6px; }
  .case-row { width: 100%; margin: 0; }
}

/* A case has its own reading surface; lists keep a short, quiet preview. */
.status { font-size: inherit; }
.case-row-top > span { font-size: 11px; }
.board:has(.case-preview) { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; }
.case-preview .detail-title { padding: 24px; }
.case-preview h2 { margin-block: 12px; }
.case-preview .case-status { margin-bottom: 12px; font-size: 12px; }
.case-preview .detail-section h3 { margin-bottom: 12px; }
.case-preview .question, .preview-next p { font-size: 13px; line-height: 1.8; color: #52647f; }
.preview-next { border-bottom: 0; }
.preview-next .btn { margin: 12px 0 0 -12px; color: #204d9c; min-height: 44px; border: 0; background: transparent; }
.billing-preview { margin-top: 32px; max-width: 660px; }
.case-page { max-width: 1380px; padding-top: 22px; }
.case-page-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #dce3ed; }
.case-page-toolbar > .btn { min-height: 44px; border: 0; color: #204d9c; }
.case-page-toolbar .case-navigation { margin: 0; gap: 28px; }
.case-page .case-detail { background: #fff; margin-top: 28px; }
.case-page .detail-title { padding: 32px; }
.case-page .detail-title .overline { font-size: 10px; margin-bottom: 14px; }
.case-page .detail-title-top { align-items: center; gap: 22px; }
.case-page .case-status { font-size: 13px; white-space: nowrap; }
.case-page-intro { color: #52647f; font-size: 13px; line-height: 1.8; margin-top: 14px !important; }
.case-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 28px 0 0; }
.case-facts div { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; font-size: 12px; line-height: 1.8; }
.case-facts dt { color: #52647f; }
.case-facts dd { margin: 0; color: #243151; overflow-wrap: anywhere; }
.case-page .workflow { background: #fff; padding: 22px 32px; }
.case-page .workflow-step { font-size: 11px; }
.case-page .detail-section { padding: 30px 32px; }
.case-page .section-label h2, .case-page .detail-section > h2 { font-size: 19px; color: #243151; }
.case-page .question-section .overline { color: #52647f; margin-bottom: 12px; }
.case-page .question { font-size: 14px; line-height: 1.9; margin-top: 14px; max-width: 800px; color: #344767; }
.case-page .section-label { margin-bottom: 22px; }
.case-page .review-grid { gap: 24px; }
.case-page .document-heading { padding: 16px; background: #f6f8fb; }
.case-page .document-heading h3 { font-size: 12px; }
.case-page .tiny-label { font-size: 10px; color: #52647f; }
.case-page .document-box { max-height: none; overflow: hidden; }
.case-page .source-document { max-height: none; font-size: 12px; padding-block: 16px; }
.case-page .source-document .document-name { font-size: 11px; color: #52647f; padding: 8px 16px 16px; }
.case-page .source-document .document-name:not(:first-child) { margin-top: 24px; border-top: 1px solid #dce3ed; padding-top: 24px; }
.case-page .source-line { padding-right: 16px; }
.case-page .line-text, .case-page .line-number { color: #52647f; }
.case-page .summary-content { padding: 16px; }
.case-page .summary-item { color: #344767; font-size: 13px; }
.case-page .source-citation { font-size: 11px; }
.case-page .review-note { font-size: 11px; color: #52647f; margin-top: 18px; }
.case-page .review-grid--active .summary-box { grid-column: auto; }
.case-page .review-grid--active .summary-content { display: block; }
.case-page .review-grid--active .summary-item { margin-bottom: 16px; }
.case-page .response-editor { grid-column: 1 / -1; padding: 24px 0 0; border: 0; border-radius: var(--radius-surface); background: transparent; }
.case-page .response-editor h2 { font-size: 19px; }
.case-page .response-editor .textarea { min-height: 220px; font-size: 14px; }
.case-page .response-text { border: 0; border-radius: var(--radius-surface); border-top: 2px solid #206c4c; padding: 22px 0; background: transparent; font-size: 14px; color: #344767; }
.case-page .response-meta { font-size: 12px; }
.case-page .sign-off { margin-top: 12px; font-size: 12px; color: #52647f; line-height: 1.9; overflow-wrap: anywhere; }
.case-page .billing-status { border: 0; border-radius: var(--radius-surface); background: transparent; padding: 0; font-size: 13px; justify-content: start; gap: 36px; }
.case-page .billing-status strong { font-weight: 400; color: #52647f; }
.case-page .billing-status div { display: flex; flex-wrap: wrap; gap: 6px; }
.billing-submitted { font-size: 12px; color: #52647f; margin-block: 18px !important; }
.activity-intro { color: #52647f; font-size: 12px; line-height: 1.9; margin-top: 10px !important; }
.case-page .audit-list { margin-top: 24px; }
.case-page .audit-item { gap: 32px; border-top: 1px solid #e4eaf2; padding: 22px 0; }
.case-page .audit-item strong { color: #243151; font-size: 13px; }
.case-page .audit-item p, .case-page .audit-item time { color: #52647f; font-size: 12px; line-height: 1.9; }
.case-page .context-note, .case-page .hint { color: #52647f; font-size: 12px; }
.case-refusal { margin-top: 24px !important; color: #a2343d; }
@media (max-width: 980px) {
  .board:has(.case-preview) { grid-template-columns: minmax(0, 1fr); }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .case-page-toolbar { flex-wrap: wrap; gap: 8px; padding-bottom: 12px; }
  .case-page-toolbar .case-navigation { order: 3; width: 100%; }
  .case-page .case-detail { margin-top: 16px; }
  .case-page .detail-title, .case-page .detail-section { padding: 24px 18px; }
  .case-page .detail-title-top { display: block; }
  .case-page .case-status { margin-top: 16px; }
  .case-facts { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .case-page .workflow { flex-wrap: wrap; gap: 10px; padding: 18px; }
  .case-page .workflow-step { flex: 0 1 auto; font-size: 10px; }
  .case-page .workflow-step:not(:last-child)::after { width: 12px; flex: none; }
  .case-page .review-grid { grid-template-columns: minmax(0, 1fr); }
  .case-page .document-heading { flex-wrap: wrap; }
  .case-page .source-document { font-size: 11px; }
  .case-page .audit-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .case-page .audit-item time { grid-column: auto; margin: 0; }
  .case-page .section-label { flex-wrap: wrap; }
}
.case-page .review-actions { border: 0; border-top: 1px solid #dce3ed; border-radius: var(--radius-surface); box-shadow: none; padding: 16px 0; }
.case-page .text-link { min-height: 44px; }

/* Account follows the case reading surface: quiet panels and inline facts. */
.account-page { max-width: 1040px; }
.account-page .account-section { padding: 30px 32px; border-radius: var(--radius-surface); box-shadow: none; }
.account-page .account-section > h2 { font-size: 19px; margin-bottom: 14px; }
.account-page .account-context, .account-page .empty-access { color: #52647f; font-size: 13px; line-height: 1.9; }
.account-page :is(.account-facts, .account-clinic-facts) { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 22px 0; }
.account-page :is(.account-facts, .account-clinic-facts) > div { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 1.8; }
.account-page :is(.account-facts, .account-clinic-facts) dt { margin: 0; font-size: inherit; color: #52647f; }
.account-page :is(.account-facts, .account-clinic-facts) dd { font-size: inherit; overflow-wrap: anywhere; }
.account-clinic { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid #dce3ed; }
.account-clinic:last-child { padding-bottom: 0; border-bottom: 0; }
.account-clinic h3 { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.account-clinic .account-clinic-facts { gap: 6px; margin: 12px 0 0; }
.account-current { color: #204d9c !important; font-weight: 650; }
.status-awaiting-approval { color: #2857a5; }
.portal .account-page .btn, .portal .account-signout .btn { min-height: 44px; border: 0; background: transparent; box-shadow: none; color: #204d9c; }
.portal .account-page .btn:hover { border: 0; background: #edf3ff; }
.account-page .access-row p, .account-page .hint { color: #52647f; }
.account-page .access-row { align-items: flex-start; }
.account-signout { padding: 0 0 12px; }
.portal .account-page .btn:focus-visible { outline: 2px solid #2857a5; outline-offset: 3px; box-shadow: none; }
.on-main:has(> .account-page) { max-width: 1040px; }
.on-main:has(> .account-page) .account-page { padding: 0; }
@media (max-width: 740px) {
  .account-page .account-section { padding: 24px 18px; }
  .account-clinic { flex-direction: column; align-items: flex-start; gap: 10px; }
  .account-clinic > .btn { margin-left: -12px; }
}

/* Delivery advice offers a text action within its framed invitation or administrator row. */
.portal .on-record .btn { min-height: 44px; border: 0; background: transparent; color: #204d9c; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }
.portal .on-record .btn:hover:not(:disabled) { background: transparent; color: #173f80; box-shadow: none; }

/* Platform organizations are a flat list with compact actions. */
.on-organizations { background: #fff; }
.on-organizations .on-org-record { padding-block: 24px; }
.on-organizations .on-admins { padding: 0; border: 0; border-radius: var(--radius-surface); background: transparent; }
.on-organizations .btn, #on-organizations-controls .on-activity-more { border-radius: var(--radius-button); font-size: 11px; padding: 8px; min-height: 44px; }
.on-organizations .on-org-record:is(:focus-visible, .on-organization-keyboard-focus:focus) { outline: 2px solid #2857a5; outline-offset: 2px; border-radius: var(--radius-surface); box-shadow: none; }
#on-organizations-controls [role="status"]:not(:empty) { padding-block: 12px; color: #52647f; }

.onboarding-organizations .account-popover { border-radius: var(--radius-input); }
/* Owner visual rules: full selections and compact controls. */
.portal .case-row.selected, .portal .nav-item.is-active { box-shadow: none; border-left-width: 1px; }
.portal .context-note.warning { background: #f3f7ff; border-color: #dce7fb; color: #344767; }
.metric--attention { background: #fff8e2; border-color: #ddc578; }
.metric--review { background: #edf3ff; border-color: #b5caed; }
.metric--completed { background: #edf7f1; border-color: #b5d7c4; }
.portal .btn { padding: 7px 10px; }
.records-section { scroll-margin-top: 24px; }
.records-section .section-label { align-items: flex-start; }
.records-section .overline { color: #52647f; margin-bottom: 12px; }
.record-intro, .record-context, .record-refresh p, .record-empty p, .record-ack p, .record-sign-warning p, .record-signoff, .record-capacity { color: #52647f; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.record-intro { max-width: 680px; margin-bottom: 20px; }
.record-context { margin: 12px 0; }
.record-outstanding { color: #243151; font-size: 13px; font-weight: 650; margin: 20px 0; }
.record-refresh { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-block: 1px solid #dce3ed; }
.portal :is(.records-section, .record-sign-review) .btn { min-height: 44px; border: 0; background: transparent; box-shadow: none; color: #204d9c; text-decoration: underline; text-underline-offset: 4px; white-space: normal; }
.portal .records-section .btn:disabled { color: #52647f; text-decoration: none; }
.record-pull { padding: 28px 0; border-bottom: 1px solid #dce3ed; }
.record-pull:last-child { border-bottom: 0; padding-bottom: 0; }
.record-pull-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.record-pull-heading h3, .record-empty h3, .record-sign-review h3 { font-size: 16px; color: #243151; }
.record-pull-heading > span { font-size: 12px; color: #344767; }
.record-differences { margin: 24px 0; }
.record-columns, .record-difference { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(70px, .5fr) repeat(2, minmax(0, 1fr)); gap: 18px; }
.record-columns { color: #52647f; font-size: 11px; padding-bottom: 12px; border-bottom: 1px solid #b5c6de; }
.record-difference { padding: 18px 0; border-bottom: 1px solid #e4eaf2; font-size: 13px; line-height: 1.8; color: #344767; }
.record-difference > div { min-width: 0; overflow-wrap: anywhere; }
.record-difference strong { font-weight: 600; color: #243151; }
.record-identity, .record-typed { display: block; font-size: 10px; color: #52647f; margin-top: 4px; overflow-wrap: anywhere; }
.record-mobile-label { display: none; }
.record-ack { margin-top: 22px; }
.record-ack--done p { color: #206c4c; }
.record-change-summary { grid-column: span 3; }
.record-disclosure summary { min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12px; color: #204d9c; list-style: none; }
.record-disclosure summary::-webkit-details-marker { display: none; }
.record-disclosure summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); flex: 0 0 auto; margin-right: 2px; }
.record-disclosure[open] > summary::before { transform: rotate(45deg); }
.record-fields dl > div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid #e4eaf2; font-size: 12px; color: #344767; line-height: 1.8; }
.record-fields dd { margin: 0; overflow-wrap: anywhere; }
.record-empty { padding-top: 28px; }
.record-empty p { margin-top: 12px; }
.record-error { color: #a2343d; font-size: 12px; line-height: 1.9; margin: 18px 0; }
.record-capacity { margin-block: 18px; font-weight: 600; }
.record-signoff { margin: 20px 0; color: #206c4c; }
#confirm-dialog.record-sign-dialog { width: min(850px, calc(100vw - 32px)); }
.record-sign-review { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #dce3ed; }
.record-sign-review > .overline { margin-bottom: 14px; color: #52647f; }
.record-sign-warning { padding: 18px 0; margin: 18px 0; border-block: 1px solid #b5c6de; }
.record-sign-warning strong { font-size: 14px; color: #243151; }
.record-sign-warning p { margin-top: 10px; }
@media (max-width: 740px) {
  .record-refresh, .record-pull-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .record-refresh .btn { margin-left: -10px; }
  .record-columns { display: none; }
  .record-difference { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; padding-block: 22px; }
  .record-mobile-label { display: block; color: #52647f; font-size: 10px; margin-bottom: 5px; }
  .record-difference > div:first-child { grid-column: auto; }
  .record-change-summary { grid-column: auto; }
  .record-fields dl > div { grid-template-columns: 1fr; gap: 8px; }
}
.metrics .metric--review .metric-icon { background: #e2ebfc; color: #2857a5; }

/* Conversation is part of the case's single reading surface. */
.conversation-section { scroll-margin-top: 24px; }
.conversation-section .section-label { align-items: baseline; }
.conversation-intro, .conversation-empty, .conversation-closed { font-size: 13px; line-height: 1.9; color: #52647f; }
.conversation-thread { list-style: none; padding: 0; margin: 26px 0; }
.conversation-message { border-top: 1px solid #dce3ed; padding: 24px 0; scroll-margin-top: 24px; }
.conversation-message-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.conversation-message h3 { color: #243151; font-size: 14px; line-height: 1.8; }
.conversation-number { color: #52647f; font-weight: 400; margin-left: 6px; }
.conversation-message time, .conversation-by { color: #52647f; font-size: 12px; line-height: 1.9; }
.conversation-by { margin-top: 4px !important; }
.conversation-text, .conversation-context { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; color: #344767; margin-top: 14px !important; max-width: 800px; }
.conversation-reply { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: #204d9c; text-underline-offset: 4px; }
.conversation-state { font-size: 12px; line-height: 1.9; color: #52647f; margin-top: 14px !important; }
.conversation-state--waiting, .conversation-attention { color: #204d9c; font-weight: 650; }
.conversation-state--answered { color: #206c4c; }
.conversation-state--closed { color: #52647f; }
.conversation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.conversation-actions .btn { margin-left: -10px; }
.conversation-section .btn { min-height: 44px; border: 0; background: transparent; box-shadow: none; color: #204d9c; }
.conversation-section .btn:hover:not(:disabled) { background: #edf3ff; }
.conversation-section .btn[aria-pressed="true"] { background: #edf3ff; color: #173f80; }
.conversation-section .btn:focus-visible, .conversation-reply:focus-visible { outline: 2px solid #2857a5; outline-offset: 3px; box-shadow: none; }
.conversation-composer { border-top: 1px solid #dce3ed; padding-top: 20px; }
.conversation-composer .label { display: block; margin: 18px 0 10px; }
.conversation-composer .textarea { min-height: 130px; width: 100%; font-size: 14px; }
.conversation-composer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 10px 0; }
.conversation-composer-meta p, .conversation-feedback { color: #52647f; font-size: 12px; line-height: 1.9; }
.conversation-context { border: 0; padding: 12px 0; font-size: 13px; }
.conversation-error { color: #a2343d; font-size: 13px; line-height: 1.9; margin-top: 12px !important; }
.conversation-feedback:empty { display: none; }
.conversation-sign-warning { color: #a2343d; font-size: 14px; line-height: 1.8; margin: 18px 0; }
.sign-guidance { max-width: 620px; font-size: 12px; line-height: 1.8; color: #52647f; }
.sign-guidance p + p { margin-top: 8px; }
@media (max-width: 740px) {
  .conversation-message-header { flex-direction: column; gap: 4px; }
  .conversation-section .section-label { display: block; }
  .conversation-section .tiny-label { display: block; margin-top: 10px; line-height: 1.8; }
  .conversation-actions { gap: 4px 14px; }
}

/* Owner presentation rules apply throughout the shell, including dialogs and account pages. */

.portal :is(.badge, .chip, .tag) { border-radius: var(--radius-small); }
.portal .dot { border-radius: var(--radius-marker); }
.portal dialog { overflow: auto; }
.on-activity li:is(:focus-visible, .on-activity-keyboard-focus:focus)::before { border-radius: var(--radius-surface); }
.portal :is(.demo-banner, .demo-indicator, .local-chip, .audit-dot, .sidebar-foot .dot) { display: none; }
.portal .identity-box { border: 0; padding: 0; background: transparent; }
.portal :is(.document-box, .summary-box, .on-admins) { border: 0; background: transparent; }
.portal :is(.context-note, .lock-note, .access-policy) { border: 0; padding-inline: 0; background: transparent; }
.portal .board--list .queue-list { gap: 0 20px; }
.portal .board--list .case-row { border: 0; border-bottom: 1px solid #dce3ed; }
.portal .board--list .case-row.selected { outline: 1px solid #9cb8e9; outline-offset: -1px; }
.portal .metric { background: #edf3ff; border-color: #c5d5f0; border-top-color: #2857a5; }
.portal .metric--attention { background: #fff8df; border-color: #e5d39a; border-top-color: #b18419; }
.portal .metric--completed { background: #eaf7f1; border-color: #b9daca; border-top-color: #206c4c; }
.portal .metric .metric-icon { background: transparent; }
.portal .metric:hover { background: #e2ecff; }
.portal .metric--attention:hover { background: #fff0ba; }
.portal .metric--completed:hover { background: #dcf0e6; }
.portal .btn { padding: 6px 10px; }
/* Small desktop actions keep the existing touch targets on phones. */
@media (min-width: 741px) {
  .portal .btn { min-height: 36px; }
}

/* Remove WebKit's native bevel so selects follow the portal corner scale. */
.portal select { appearance: none; -webkit-appearance: none; }
.portal select:not([multiple]) { background-image: linear-gradient(45deg, transparent 50%, #52647f 50%), linear-gradient(135deg, #52647f 50%, transparent 50%); background-position: right 12px center, right 8px center; background-size: 4px 4px; background-repeat: no-repeat; padding-inline-end: 28px; }

/* Document uploads share the case's reading surface and use text actions. */
.pdf-picker { border: 0; border-top: 1px solid #dce3ed; padding: 22px 0 8px; background: transparent; }
.pdf-picker label { display: block; font-size: 14px; font-weight: 650; color: #243151; margin-bottom: 14px; }
.pdf-picker input[type="file"] { width: 100%; max-width: 100%; font-size: 13px; color: #52647f; }
.pdf-picker input::file-selector-button { min-height: 44px; margin-right: 12px; padding: 8px 12px; border: 0; border-radius: var(--radius-button); background: #edf3ff; color: #204d9c; font: inherit; cursor: pointer; }
.pdf-picker .upload-hint { max-width: 650px; margin-top: 12px; line-height: 1.9; }
.sample-disclosure { margin: 8px 0 20px; }
.sample-disclosure summary { display: list-item; width: fit-content; min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 13px; color: #204d9c; }
.sample-disclosure summary:focus-visible { outline: 2px solid #2857a5; outline-offset: 3px; }
.sample-disclosure .hint { margin: 4px 0 8px; }
.sample-choice { display: flex; align-items: center; flex-wrap: wrap; column-gap: 24px; }
.portal .sample-choice .btn { min-height: 44px; padding: 8px 0; border: 0; border-radius: var(--radius-button); box-shadow: none; background: transparent; color: #204d9c; }
.sample-choice .text-link { min-height: 44px; }
.document-upload-feedback:empty { display: none; }
.document-upload-feedback { margin: 20px 0; max-width: 650px; color: #204d9c; font-size: 13px; line-height: 1.9; }
.document-upload-feedback[data-error="true"], .document-state--rejected, .document-state--quarantined, .document-poll-error { color: #a2343d; }
.document-upload-feedback progress { display: block; appearance: none; width: 100%; height: 6px; margin-top: 16px; border: 0; border-radius: var(--radius-marker); background: #e3eaf4; color: #2857a5; }
.document-upload-feedback progress::-webkit-progress-bar { border-radius: var(--radius-marker); background: #e3eaf4; }
.document-upload-feedback progress::-webkit-progress-value { border-radius: var(--radius-marker); background: #2857a5; }
.document-upload-feedback progress::-moz-progress-bar { border-radius: var(--radius-marker); background: #2857a5; }
.upload-percentage { margin-top: 8px; font-variant-numeric: tabular-nums; }
.pdf-document { padding: 20px 0; border-top: 1px solid #dce3ed; }
.pdf-document-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pdf-document h4 { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; min-width: 0; }
.document-state { font-size: 12px; font-weight: 650; white-space: nowrap; }
.document-state--checking { color: #204d9c; }
.document-state--ready { color: #206c4c; }
.pdf-document-meta { font-size: 12px; line-height: 1.9; color: #52647f; margin-top: 6px; }
.pdf-document-message, .document-poll-error { font-size: 13px; line-height: 1.9; margin-top: 12px; max-width: 620px; }
.pdf-download { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #204d9c; text-underline-offset: 4px; }
.pdf-download:focus-visible { outline: 2px solid #2857a5; outline-offset: 3px; }
@media (max-width: 740px) { .pdf-document-heading { flex-wrap: wrap; } }
.review-grid--pdf { grid-template-columns: 1fr; }
.pdf-documents:empty { display: none; }
.pdf-documents + .review-grid:empty { display: none; }
