:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #20332f; background: #f3f6f4; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
.page-header, main, footer { max-width: 1320px; margin: auto; padding: 24px 32px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1 { font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.25; margin: 8px 0; }
h2 { font-size: 1.2rem; margin: 0; }
p { margin: 10px 0; }
.eyebrow { letter-spacing: .13em; font-size: .75rem; font-weight: 700; color: #46665a; }
main { padding-top: 0; }
.session-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 16px 20px; border: 1px solid #cbd8d1; border-radius: 12px; background: #e8efeb; }
.session-bar small { flex-basis: 100%; }
code { overflow-wrap: anywhere; }
.workspace { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(440px, 1.15fr); gap: 24px; align-items: start; }
.request-column { display: grid; gap: 24px; }
.card { background: #fff; border: 1px solid #d5ded8; border-radius: 14px; padding: 24px; box-shadow: 0 3px 12px #20332f05; min-width: 0; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step { display: grid; place-items: center; background: #e7f0eb; color: #275441; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; }
.notice { background: #fff6df; border-left: 3px solid #b5821f; padding: 12px; font-size: .9rem; }
.feedback { min-height: 30px; padding: 8px 0; overflow-wrap: anywhere; white-space: pre-line; }
.feedback.error { color: #942d29; background: #fbecea; padding: 12px; border-radius: 8px; }
.feedback.success, .success { color: #236344; }
.muted, small { color: #53645c; font-size: .875rem; }
button, input, select, textarea { font: inherit; }
button { padding: 10px 16px; background: #285b45; color: #fff; border: 1px solid #285b45; border-radius: 8px; font-weight: 600; cursor: pointer; }
button:hover:enabled { background: #1b4532; }
button.secondary { background: #f5f8f6; color: #285b45; }
button:disabled { background: #edf0ed; color: #6b756f; border-color: #d6ddd7; cursor: default; }
:focus-visible { outline: 3px solid #bd7912; outline-offset: 3px; }
label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.field-error { display: block; color: #942d29; margin-top: 6px; }
[aria-invalid="true"] { border-color: #942d29; }
input, select, textarea { display: block; width: 100%; padding: 10px 12px; color: #20332f; background: #fff; border: 1px solid #b5c5bc; border-radius: 8px; }
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled, fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: #f5f7f5; color: #657069; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wide { grid-column: 1 / -1; }
.form-footer, .actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.form-footer small { max-width: 260px; }
.draft-state { border-top: 1px solid #e0e6e1; margin-top: 20px; padding-top: 8px; font-size: .9rem; }
.draft-state ul { padding-left: 20px; color: #8a431a; }
.conflict-comparison { overflow-x: auto; margin: 16px 0; }
.conflict-comparison table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.conflict-comparison caption { text-align: left; margin-bottom: 8px; }
.conflict-comparison th, .conflict-comparison td { text-align: left; vertical-align: top; border: 1px solid #c9c1ab; padding: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.conflict-comparison select { min-width: 150px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .9rem; background: #f3f6f4; border-radius: 8px; padding: 16px; }
.messages { height: clamp(280px, 44vh, 520px); overflow-y: auto; padding: 12px 4px; margin: 12px 0 20px; border-top: 1px solid #e0e6e1; border-bottom: 1px solid #e0e6e1; }
.message { max-width: 94%; margin: 12px 0; padding: 12px 16px; border-radius: 12px; background: #f0f4f1; overflow-wrap: anywhere; }
.message.user { margin-left: auto; background: #e2efe6; }
.message .speaker { display: block; font-size: .8rem; color: #466354; font-weight: 700; }
.message p { white-space: pre-wrap; margin: 6px 0 0; }
.speech-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.speech-controls button { padding: 5px 10px; font-size: .85rem; }
.speech-controls [role="status"] { font-size: .85rem; color: #466354; }
.recording-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.recording-controls button { padding: 7px 12px; }
.silence-settings { margin-top: 12px; padding: 10px; }
.silence-settings input[type="checkbox"] { width: auto; }
.silence-settings input[type="number"] { max-width: 130px; }
.voice-mode { border: 1px solid #b5c5bc; border-radius: 8px; padding: 12px; margin: 12px 0; }
.demo-export { border: 1px solid #b5c5bc; border-radius: 8px; padding: 12px; }
.demo-export input[type="checkbox"] { width: auto; }
.voice-mode label { display: flex; align-items: center; gap: 8px; }
.voice-mode input[type="checkbox"] { width: auto; }
#voice-metrics { font-size: .8rem; font-variant-numeric: tabular-nums; }
#microphone-state[data-active="true"] { color: #942d29; font-weight: 700; }
#record-time { font-variant-numeric: tabular-nums; color: #942d29; }
#transcript-panel { padding: 12px; margin-top: 12px; border: 1px solid #b5c5bc; border-radius: 8px; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: .9rem; }
dt { font-weight: 600; } dd { margin: 0; overflow-wrap: anywhere; }
details { margin-top: 16px; } summary { cursor: pointer; }
footer { font-size: .8rem; color: #53645c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } .page-header { align-items: start; flex-direction: column; } .page-header, main, footer { padding: 20px; } }
@media (max-width: 480px) { .card { padding: 18px; } .field-grid { grid-template-columns: 1fr; } .form-footer button { width: 100%; } dl { grid-template-columns: 1fr; } }
/* Prescription rows stay inside the existing responsive draft column. */
.prescription-item { margin: 1rem 0; padding: .8rem; min-width: 0; border: 1px solid #c9d8d2; border-radius: .6rem; }
.prescription-item legend { overflow-wrap: anywhere; font-weight: 600; }
.prescription-clarification label { display: inline-flex; align-items: center; gap: .4rem; margin: .3rem .8rem .3rem 0; }
.prescription-clarification input { width: auto; }
#prescription-preview { overflow-wrap: anywhere; }
#prescription-preview li { margin-bottom: .6rem; }
