/* Shared visual vocabulary; each workspace keeps its established accent. */
:root { --ink: var(--color-ink); --paper: var(--color-canvas); --line: var(--color-line); --white: var(--color-surface); --muted: var(--color-slate); }
:is(.prism-workspace, .portal-content, .auth-card) { line-height: 1.5; }
:is(.prism-workspace, .portal-content, .auth-card) :is(input, select, textarea) { border-radius: var(--radius-sm); }
:is(.prism-workspace, .portal-content, .auth-card) :is(button, .button) { min-height: 2.75rem; border-radius: var(--radius-sm); }
:is(.prism-workspace, .portal-content) h1 { overflow-wrap: anywhere; }
.auth-page .auth-shell { padding: 2rem 0; gap: 1.25rem; }
.auth-card { border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 2rem); }
.auth-card form { margin: 1.5rem 0; }
.auth-card label { font-size: .875rem; font-weight: 650; }
.auth-card :is(input, textarea, select):focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.auth-card .form-help { color: #475569; font-size: .8125rem; font-weight: 400; margin: 0; line-height: 1.5; }
.auth-card .auth-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .75rem; }
.auth-card .auth-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.auth-card .form-error { border-radius: var(--radius-sm); line-height: 1.6; }
.auth-page .auth-meta { line-height: 1.6; margin: 0; }
.auth-page .auth-meta a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.prism-workspace-footer a, .portal-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.portal-footer, .portal-footer nav { flex-wrap: wrap; align-items: center; }
:is(.prism-workspace, .portal-content, .auth-card) input[type="file"] { width: 100%; min-width: 0; max-width: 100%; padding: .25rem; background: var(--color-canvas); }
:is(.prism-workspace, .portal-content, .auth-card) input[type="file"]::file-selector-button { min-height: 2.75rem; margin-right: .75rem; padding: .625rem .875rem; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font: inherit; font-weight: 600; cursor: pointer; }
:is(.prism-workspace, .portal-content, .auth-card) input[type="file"]:disabled::file-selector-button { cursor: not-allowed; opacity: .58; }
.auth-card input[autocomplete="one-time-code"] { font-size: 1.25rem; letter-spacing: .15em; }
.auth-card .recovery-codes { padding: 1rem; border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.portal-panel { box-shadow: none; }
.portal-content .portal-section-heading { gap: 1rem; flex-wrap: wrap; }
.portal-content .portal-description { max-width: 70ch; }
.portal-content :is(.form-error, [role="status"]) { line-height: 1.6; }
.signature-page .contract-text { max-width: 75ch; line-height: 1.8; }

.auth-card h1 { font-size: clamp(1.75rem, 3vw, 2.1rem); line-height: 1.15; }
.ui-disclosure { margin: 1rem 0; border: 1px solid var(--color-line-soft); border-radius: var(--radius-md); background: var(--color-surface); }
.ui-disclosure > summary { min-height: 2.75rem; padding: 1rem; font-weight: 600; cursor: pointer; color: var(--color-ink); }
.ui-disclosure[open] > summary { border-bottom: 1px solid var(--color-line-soft); }
.ui-disclosure > :not(summary) { margin: 1rem; }
.ui-disclosure form { margin: 1rem; }
.portal-heading { margin-bottom: 1rem; }
.portal-breadcrumb { margin-bottom: 1.25rem; }
.portal-description { margin-block: .75rem 1rem; }
.portal-sections { margin: 1rem 0; gap: .75rem 1.5rem; }
.portal-project-layout { align-items: start; }
.portal-project-layout .portal-panel--requests { grid-column: 1 / -1; }
.portal-panel--request-form { grid-column: 1 / -1; }
.portal-panel--request-form form { max-width: 42rem; }
.portal-content .portal-panel h2 { font-size: 1.2rem; }
.portal-request-list { margin-bottom: .5rem; }
.portal-content [id] { scroll-margin-top: 1rem; }
.portal-topbar button { min-height: 2.75rem; }
.prism-workspace .lead { font-size: 1rem; max-width: 58ch; }
.prism-workspace .prism-detail-tabs a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.prism-workspace label.checkbox { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; }
.prism-workspace input:is([type="checkbox"], [type="radio"]) { width: 1.1rem; height: 1.1rem; min-height: 1.1rem; padding: 0; margin: 0; flex: 0 0 auto; accent-color: #b57908; }
@media (max-width: 47.99rem) {
  :is(.prism-workspace, .portal-content, .auth-card) :is(input, select, textarea) { font-size: 1rem; }
  .portal-topbar { min-height: 0; padding: .75rem 1rem; gap: .5rem 1rem; }
  .portal-topbar nav a { min-height: 2.75rem; display: inline-flex; align-items: center; }
  .portal-content { width: calc(100% - 2rem); padding-top: 1rem; }
  .portal-heading { gap: .75rem; }
  .portal-heading h1 { margin-top: .25rem; margin-bottom: .5rem; font-size: 1.65rem; }
  .portal-heading p { font-size: .875rem; }
  .portal-description { line-height: 1.5; }
  .portal-sections { gap: .25rem 1rem; }
  .portal-sections a { min-height: 2.75rem; padding: .6rem 0; }
  .portal-panel { padding: 1rem; }
  .portal-content--access { padding-top: 1.5rem; }
  .portal-content .auth-card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Contract reading needs room for long text and exact document fingerprints. */
.signature-page .auth-shell { width: min(100% - 2rem, 56rem); max-width: 56rem; }
.signature-page .contract-text, .signature-page .signature-footer { white-space: pre-wrap; overflow-wrap: anywhere; }
.signature-page code, .signature-page h1, .signature-page li { overflow-wrap: anywhere; }

.quote-document-page .document-shell { margin: 2rem auto; padding: 1rem; max-width: 56rem; }
.quote-document-page .contract-text { white-space: pre-wrap; }
.quote-document-page .document-shell { overflow-wrap: anywhere; }
.document-lines { list-style: none; padding: 0; }
.document-lines li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-block: 1rem; }
.quote-document-page dl { border-block: 1px solid var(--line); padding-block: 1rem; }
.quote-document-page dl div { display: flex; justify-content: space-between; gap: 1rem; }

.signature-page .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.signature-page .auth-card .check { display: flex; align-items: flex-start; gap: .75rem; font-weight: 400; line-height: 1.55; }
.signature-page .auth-card .check input { flex: 0 0 1.25rem; width: 1.25rem; height: 1.25rem; min-width: 1.25rem; min-height: 1.25rem; margin: .2rem 0 0; }
.signature-page .auth-card dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .3rem; }
.signature-page .auth-card dd { margin: 0; }
.signature-page .auth-card h1 { font-size: clamp(1.5rem, 4vw, 2rem); }

.prism-treatment-health > :is(p, h3), .prism-treatment-health .operation-columns :is(h4, p) { margin: 0; }
.prism-treatment-health .metric-grid { margin: 0; gap: var(--space-3); border: 0; background: transparent; }
.prism-treatment-health .metric-grid > div { padding: var(--space-4); border: 1px solid var(--color-line-soft); }
.prism-treatment-health .metric-grid dt { font-size: .8rem; color: var(--color-slate); }
.prism-treatment-health .metric-grid dd { font-variant-numeric: tabular-nums; }
.prism-treatment-health .operation-columns { margin: 0; }
.prism-treatment-health .operation-columns article { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-4); border-radius: var(--radius-sm); background: var(--color-canvas); }
.prism-treatment-health > p:last-child { color: var(--color-slate); font-size: .85rem; }
.prism-workspace .audit-list { min-width: 0; }
.prism-workspace .audit-list article { min-width: 0; overflow-wrap: anywhere; }
.prism-workspace .audit-list article > div { flex-wrap: wrap; }
