/* CarePath interpreter app — clinical-trust design system. * * Tokens ported from scribe/frontend/src/styles.css so the interpreter app and the * landing page share one palette. Brand hues stay fixed; semantic tokens * swap per color scheme. Safety surfaces are derived with color-mix so they * keep readable contrast in both light and dark schemes. */ :root { color-scheme: light dark; /* brand (fixed) */ --ink: #102a2e; --ivory: #f4f1e8; --teal: #0f766e; --mist: #ddeae7; --amber: #a86300; --critical: #9b1c1c; /* semantic (light) */ --bg: var(--ivory); --text: var(--ink); --muted: color-mix(in srgb, var(--ink) 72%, var(--ivory)); --faint: color-mix(in srgb, var(--ink) 60%, var(--ivory)); --line: color-mix(in srgb, var(--ink) 16%, transparent); --line-strong: color-mix(in srgb, var(--ink) 40%, transparent); --surface: color-mix(in srgb, var(--ivory), white 55%); --surface-2: var(--ivory); --input-bg: white; --nav-bg: rgb(244 241 232 / 0.92); --accent-ink: #0d6a63; --critical-text: var(--critical); --amber-text: #704300; --shadow: 0 1rem 3rem rgb(16 42 46 / 0.09); /* dark fills / primary controls */ --deep: #173f44; /* header link-button + language toggle */ --slate: #1d2733; /* neutral dark buttons */ --on-deep: #ffffff; --primary: var(--teal); --on-primary: #ffffff; /* safety surfaces (auto-adapt via color-mix on --surface) */ --teal-surface: color-mix(in srgb, var(--teal) 12%, var(--surface)); --amber-surface: color-mix(in srgb, var(--amber) 14%, var(--surface)); --critical-surface: color-mix(in srgb, var(--critical) 12%, var(--surface)); --risk-low-bg: color-mix(in srgb, var(--ink) 7%, var(--surface)); --risk-medium-bg: color-mix(in srgb, #3b6fb5 16%, var(--surface)); --risk-high-bg: color-mix(in srgb, var(--amber) 26%, var(--surface)); --risk-critical-bg: color-mix(in srgb, var(--critical) 22%, var(--surface)); /* geometry */ --r-panel: 0.75rem; --r-control: 0.5rem; --content: 1120px; } @media (prefers-color-scheme: dark) { :root { --bg: #0b2125; --text: #e9efec; --muted: rgb(233 239 236 / 0.78); --faint: rgb(233 239 236 / 0.62); --line: rgb(233 239 236 / 0.18); --line-strong: rgb(233 239 236 / 0.42); --surface: #122c31; --surface-2: #0f272c; --input-bg: #0e252a; --nav-bg: rgb(11 33 37 / 0.92); --accent-ink: #6fd8cc; --critical-text: #f2a0a0; --amber-text: #ffce8a; --shadow: 0 1rem 3rem rgb(0 0 0 / 0.4); --deep: #1d4a50; --slate: #22303c; } } body { margin: 0; font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); } .product-shell { position: sticky; top: 0; z-index: 100; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; min-height: 64px; padding: 8px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--nav-bg); backdrop-filter: blur(10px); } .product-breadcrumb ol, .product-shell__actions, .language-toggle, .product-status, .product-brand { display: flex; align-items: center; } .product-breadcrumb ol { gap: 10px; margin: 0; padding: 0; list-style: none; font-weight: 600; min-width: 0; } .product-breadcrumb li[aria-current="page"] { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .product-brand { gap: 8px; color: var(--text); font-weight: 700; text-decoration: none; } .product-brand img { width: 36px; height: auto; } .product-status { justify-self: center; gap: 8px; margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; } .product-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); } .product-shell__actions { justify-self: end; gap: 14px; } .all-products { min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.95rem; border-radius: var(--r-control); background: var(--text); color: var(--bg); font-size: 0.82rem; font-weight: 700; text-decoration: none; white-space: nowrap; } .language-toggle { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 999px; } .language-toggle button { min-width: 42px; min-height: 42px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 0.75rem; font-weight: 700; } .language-toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); } .product-brand:focus-visible, .all-products:focus-visible, .language-toggle button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; } button, input, select { font: inherit; } button { min-height: 44px; border: 1px solid var(--slate); border-radius: 6px; background: var(--slate); color: var(--on-deep); cursor: pointer; } button:disabled { cursor: not-allowed; opacity: 0.55; } /* Keep short onboarding screens within one viewport so a sticky header can * never be overlapped by page content (and full-page captures do not tile). */ .page, .workspace { min-height: calc(100vh - 96px); padding: 32px; } /* Shared onboarding frame: one centered column for quiz, consent, device. */ .onboarding-frame { display: grid; gap: 20px; width: min(100%, 40rem); margin: 0 auto; } .onboarding-frame__head { display: grid; gap: 4px; } .onboarding-kicker { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; } .onboarding-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; } .consent { display: grid; gap: 18px; } .consent-intro { display: grid; gap: 8px; color: var(--muted); line-height: 1.55; } .consent-intro > [lang] { color: var(--faint); } .consent-actions, .typed { display: grid; gap: 14px; } .consent-actions { padding-top: 4px; } .intent-quiz { display: grid; gap: 14px; } .device-check { display: grid; gap: 14px; } .device-check label { display: grid; gap: 6px; } /* Slim first-session bar so it never pushes the speaker regions below the fold. */ .session-checklist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; max-width: 1120px; margin: 0 auto 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--teal-surface); } .session-checklist > strong { font-size: 0.9rem; } .session-checklist ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 0.85rem; } .session-checklist button { margin-left: auto; min-height: 36px; padding: 0 12px; border-color: var(--line-strong); background: transparent; color: var(--text); font-size: 0.82rem; font-weight: 600; } .intent-quiz fieldset { display: grid; gap: 12px; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; } .intent-quiz legend { padding: 0 6px; font-weight: 700; } .intent-quiz label { display: flex; gap: 10px; align-items: center; } .text-button { border: 0; background: transparent; color: var(--deep); text-decoration: underline; } .consent-actions fieldset { margin: 0; padding: 0; border: 0; } .consent-actions legend { margin-bottom: 10px; font-weight: 600; } .onboarding-stepper ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; } .onboarding-step { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; gap: 6px; text-align: center; } .onboarding-step__marker { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 0.85rem; font-weight: 700; } .onboarding-step__label { color: var(--muted); font-size: 0.78rem; font-weight: 600; line-height: 1.2; } .onboarding-step--current .onboarding-step__marker { border-color: var(--teal); background: var(--teal); color: var(--on-primary); } .onboarding-step--current .onboarding-step__label { color: var(--text); } .onboarding-step--complete .onboarding-step__marker { border-color: var(--accent-ink); color: var(--accent-ink); } .onboarding-step--complete .onboarding-step__label { color: var(--text); } /* Collapse labels to markers on narrow widths; keep the current step's label * visible and every label available to assistive tech. */ @media (max-width: 560px) { .onboarding-step:not([aria-current]) .onboarding-step__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; } } .consent-reminder { margin: 18px 0 0; padding: 12px 14px; border-left: 3px solid var(--teal); background: var(--teal-surface); line-height: 1.5; } .demo-preview { display: grid; gap: 10px; align-content: start; } .demo-preview .consent-reminder { margin: 0; } .demo-preview__turn { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); } .demo-preview__turn.lowConfidence { border-color: var(--amber); background: var(--amber-surface); } .demo-preview__turn.blocked { border-color: var(--critical); background: var(--critical-surface); } .consent-actions fieldset, .consent-actions label, .typed label, .admin-filters label { display: grid; gap: 6px; } .consent-actions label { grid-template-columns: 24px 1fr; align-items: start; } .consent-choice-copy { display: grid; gap: 4px; min-width: 0; } .consent-choice-copy > [lang] { color: var(--muted); } .eyebrow, .meta { margin: 0 0 8px; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; } h1, h2, p { margin-top: 0; } .error, .status strong { color: var(--critical-text); } .topbar, .lifecycle-actions, .input-regions, .typed, .status, .confirmations, .transcript { max-width: 1120px; margin: 0 auto 18px; } /* Right-aligned session toolbar in normal flow — no overlap with the checklist. */ .lifecycle-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; } .lifecycle-actions > button { min-height: 38px; padding: 0 14px; border-color: var(--line-strong); background: transparent; color: var(--text); font-size: 0.85rem; font-weight: 600; } .lifecycle-actions > .error { flex-basis: 100%; margin: 0; text-align: right; } .topbar, .transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; } .escalate { border-color: var(--line-strong); background: var(--surface); color: var(--text); } .input-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .input-region { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); } .input-region h2 { margin: 0; font-size: 1.1rem; } .region-select { width: 100%; min-height: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; } .region-select[aria-pressed="true"] { color: var(--accent-ink); } .talk { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 132px; border-radius: var(--r-panel); font-size: 1.05rem; font-weight: 700; } .talk__icon { display: inline-grid; place-items: center; } .talk--ready { border-color: var(--primary); background: var(--primary); color: var(--on-primary); } .talk--recording { position: relative; border-color: var(--teal); background: color-mix(in srgb, var(--teal) 78%, black); color: var(--on-primary); } .talk--recording::after { content: ""; position: absolute; inset: -5px; border: 3px solid var(--teal); border-radius: inherit; animation: talk-pulse 1.4s ease-out infinite; pointer-events: none; } .talk--processing { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 55%, var(--surface)); color: var(--on-primary); } .talk--disabled { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); } .talk__spinner { width: 1.5rem; height: 1.5rem; border: 3px solid color-mix(in srgb, var(--on-primary) 40%, transparent); border-top-color: var(--on-primary); border-radius: 50%; animation: talk-spin 0.8s linear infinite; } @keyframes talk-pulse { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(1.06); } } @keyframes talk-spin { to { transform: rotate(360deg); } } .typed { grid-template-columns: 1fr auto; align-items: end; } .typed input, .typed select, .admin-filters input, .admin-filters select, textarea { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: var(--input-bg); color: var(--text); } textarea { min-height: 78px; padding: 10px; resize: vertical; } .status { display: flex; gap: 16px; min-height: 24px; } .confirmations, .low-confidence { display: grid; gap: 12px; } .confirmation { display: grid; grid-template-columns: 1fr 160px; gap: 16px; align-items: start; border: 2px solid var(--critical); border-radius: 6px; background: var(--critical-surface); padding: 14px; } .confirmation-actions { display: grid; gap: 10px; } .readback, .low-confidence { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 12px; } .low-confidence { border-color: var(--amber); background: var(--amber-surface); } .edit-translation { display: grid; gap: 6px; margin-top: 12px; } .feedback { display: grid; gap: 8px; margin-top: 12px; } .feedback form { display: grid; gap: 8px; } table { width: 100%; border-collapse: collapse; font-size: 0.9rem; } th, td { border-top: 1px solid var(--line); padding: 6px; text-align: left; } .risk-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; } .risk-badge { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 0.78rem; } .risk-mark { border-radius: 3px; padding: 0 3px; } .risk-mark.low, .risk-badge.low { background: var(--risk-low-bg); } .risk-mark.medium, .risk-badge.medium { background: var(--risk-medium-bg); } .risk-mark.high, .risk-badge.high { background: var(--risk-high-bg); border-color: var(--amber); } .risk-mark.critical, .risk-badge.critical { background: var(--risk-critical-bg); border-color: var(--critical); } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } .escalation-card { max-width: 1120px; margin: 0 auto 18px; border: 3px solid var(--critical); border-radius: 6px; background: var(--critical-surface); padding: 18px; } .transcript { border-top: 1px solid var(--line); padding-top: 18px; } .admin-filters, .admin-table { max-width: 1120px; margin: 0 auto 18px; } .admin-filters { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) repeat(3, auto) 130px; gap: 12px; align-items: end; } .turn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); } .empty { color: var(--muted); } .region-empty { margin: 0; padding: 6px 0; font-size: 0.9rem; } /* ---- shared buttons ---- */ .primary { border-color: var(--primary); background: var(--primary); color: var(--on-primary); font-weight: 700; } .secondary-outline { border-color: var(--line-strong); background: transparent; color: var(--text); font-weight: 600; } /* ---- intent quiz option cards ---- */ .option-cards { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; } .option-card { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); } .option-card__label { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; cursor: pointer; } .option-card__label input { width: 1.15rem; height: 1.15rem; flex-shrink: 0; } .option-card__text { font-size: 1rem; font-weight: 600; } .option-card--selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: var(--teal-surface); } .option-card__badge { position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 999px; background: var(--teal); color: var(--on-primary); font-size: 0.7rem; font-weight: 700; pointer-events: none; } .option-card:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; } /* ---- consent ---- */ .consent-start { display: grid; gap: 8px; } .consent-start > .primary { width: 100%; } .consent-start__hint { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.4; } .consent-start__hint > [lang] { display: block; color: var(--faint); } .consent-start__hint--ready { color: var(--accent-ink); } .demo-preview { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); } /* ---- device-check green room ---- */ .green-room { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); } .green-room__intro { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); line-height: 1.5; } .green-room__icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex-shrink: 0; border-radius: 50%; background: var(--teal-surface); color: var(--teal); } .green-room__picker { display: grid; gap: 6px; } .green-room__picker select { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: var(--input-bg); color: var(--text); } .level-meter { display: grid; gap: 6px; } .level-meter meter { width: 100%; height: 0.9rem; } .level-meter__scale { display: flex; justify-content: space-between; color: var(--faint); font-size: 0.75rem; } .green-room__state { margin: 0; font-weight: 600; } .green-room__state--ready { color: var(--accent-ink); } .green-room__state--idle { color: var(--muted); } .green-room__state--blocked { color: var(--critical-text); } .green-room__actions { display: flex; flex-wrap: wrap; gap: 10px; } .green-room__actions > button { flex: 1 1 12rem; } @media (prefers-reduced-motion: reduce) { .talk--recording::after { animation: none; opacity: 1; } .talk__spinner { animation: none; } } @media (forced-colors: active) { .option-card--selected { outline: 2px solid Highlight; outline-offset: -2px; } .talk--ready, .talk--recording, .talk--processing { border: 2px solid ButtonText; } .onboarding-step--current .onboarding-step__marker { outline: 2px solid Highlight; } } @media (max-width: 760px) { .product-shell { position: static; grid-template-columns: 1fr; gap: 8px 16px; padding: 10px 16px; } .product-status { justify-self: start; } .product-shell__actions { justify-self: stretch; justify-content: space-between; gap: 10px; } .all-products { max-width: 7rem; line-height: 1.15; } .consent, .input-regions, .typed, .admin-filters, .confirmation, .turn { grid-template-columns: 1fr; } .topbar, .transcript-head, .status { align-items: flex-start; flex-direction: column; } }