:root {
  color-scheme: light;
  --ink: #20223a;
  --muted: #62647a;
  --paper: #fff;
  --base: #f7f7fc;
  --line: #e7e6f1;
  --primary: #553ec8;
  --primary-hover: #4731b0;
  --tint: #eeeafe;
  --green: #206755;
  --green-bg: #e4f5ed;
  --amber: #7b4a11;
  --amber-bg: #fff1d8;
  font-family: Manrope, 'Segoe UI', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--base);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #8f79f3; outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .55; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.07; }
h2 { font-size: 1.4rem; line-height: 1.25; }
h3 { font-size: 1.08rem; line-height: 1.3; }
p { line-height: 1.55; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.secondary { font-size: .81rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.37rem; font-weight: 800; letter-spacing: -.065em; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: white; background: var(--primary); }
.brand-mark .icon { width: 23px; height: 23px; }
.button { min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 10px 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primary { background: var(--primary); color: white; }
.primary:hover { background: var(--primary-hover); }
.outline { background: var(--paper); border-color: var(--line); }
.outline:hover { border-color: #a69ae1; }
.subtle { color: var(--primary); background: var(--tint); }
.subtle:hover { background: #e4ddff; }
.label { display: block; font-size: .9rem; font-weight: 750; margin-bottom: 8px; }
input, select, textarea { border: 1px solid #dad9e8; border-radius: 11px; background: var(--paper); color: var(--ink); width: 100%; min-height: 48px; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #73758a; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #62647a 50%), linear-gradient(135deg, #62647a 50%, transparent 50%); background-position: calc(100% - 16px) 20px, calc(100% - 11px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.form-error { color: #9b263a; font-size: .9rem; }
.form-error:empty { display: none; }

.entry { min-height: 100svh; display: grid; grid-template-columns: minmax(440px, 1.04fr) minmax(440px, 1fr); padding: 20px; gap: 20px; }
.entry-art { position: relative; background: #292054; border-radius: 26px; color: white; min-height: min(720px, calc(100svh - 40px)); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(27px, 4.2vw, 68px); isolation: isolate; }
.entry-art::before, .entry-art::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.entry-art::before { width: 108%; aspect-ratio: 1; right: -42%; top: -18%; background: radial-gradient(circle, #8268e6 0%, #5942af 40%, transparent 69%); opacity: .75; }
.entry-art::after { width: 105%; height: 57%; bottom: -3%; left: 0; background-image: linear-gradient(#ad9cee27 1px, transparent 1px), linear-gradient(90deg, #ad9cee27 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(transparent, #000 52%); }
.entry-art .brand-mark { background: #eee7ff; color: #5438c0; }
.entry-intro { position: relative; z-index: 1; margin-top: 42px; }
.entry-intro h2 { font-size: clamp(2.65rem, 5vw, 5.6rem); font-weight: 760; line-height: 1; max-width: 7.6em; letter-spacing: -.075em; }
.entry-intro p { font-size: 1.04rem; color: #e0d9fa; max-width: 29ch; margin-top: 18px; }
.art-reading { position: relative; width: min(100%, 375px); margin: 42px 0 18px 5%; border-radius: 23px; border: 1px solid #b7a5ff5c; background: linear-gradient(120deg, #4b397c, #38286e); box-shadow: 0 24px 54px #150c3e65; padding: 20px 23px 17px; }
.art-reading-head { display: flex; align-items: center; gap: 10px; color: #efe9ff; font-weight: 700; }
.art-reading-head .icon { color: #dbc9ff; }
.art-pulse { height: 68px; width: 100%; display: block; margin: 7px 0 2px; color: #cfbcff; }
.art-reading-values { display: flex; align-items: center; gap: 15px; font-size: .8rem; color: #dcd0f5; }
.art-reading-values span + span { border-left: 1px solid #b7a5ff5c; padding-left: 15px; }
.entry-body { display: grid; place-items: center; padding: 30px clamp(24px, 4.5vw, 82px); }
.login { max-width: 410px; width: 100%; }
.login > .brand { display: none; }
.login h1 { margin-bottom: 9px; }
.login > p { margin-bottom: 31px; }
.login form { display: grid; gap: 12px; }
.login input { height: 52px; }
.login .primary { min-height: 51px; }
.demo-access { margin-top: 27px; border-top: 1px solid var(--line); padding-top: 20px; }
.demo-access > p { margin: 4px 0 13px; }
.roles { display: grid; gap: 7px; }
.role-button { width: 100%; min-height: 45px; display: flex; align-items: center; gap: 10px; padding: 7px 11px; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: .9rem; font-weight: 700; }
.role-button:hover, .role-button[aria-pressed=true] { border-color: #b6a8ee; background: #f1edff; }
.role-button .icon { color: var(--primary); }
.role-button code { color: var(--muted); margin-left: auto; font-size: .83rem; font-weight: 500; }

.layout { min-height: 100svh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { min-height: 100svh; background: white; border-right: 1px solid var(--line); position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; padding: 25px 16px; gap: 35px; }
.sidebar > .brand { margin-left: 10px; }
.nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 11px; padding: 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: .91rem; font-weight: 700; text-align: left; min-height: 46px; }
.nav-button:hover { background: #f5f3fd; }
.nav-button[aria-current=page] { color: var(--primary); background: var(--tint); }
.sidebar-foot { margin-top: auto; padding: 0 2px; }
.sidebar-foot .nav-button { width: 100%; }
.workspace { width: 100%; max-width: 1420px; margin-inline: auto; min-width: 0; padding: 27px clamp(23px, 4.2vw, 65px) 60px; }
.topbar { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
.topbar .brand { display: none; }
.demo-pill { color: #574297; background: #eee9fa; padding: 6px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.profile { display: flex; gap: 9px; align-items: center; font-size: .9rem; font-weight: 700; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; flex: none; background: var(--tint); color: var(--primary); font-size: .83rem; }
.topbar .mobile-exit { display: none; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-radius: 24px; background: #ebe6fe; padding: clamp(23px, 3.8vw, 43px); margin-bottom: 30px; }
.hero::before { content: ''; position: absolute; z-index: -1; right: 7%; top: -90px; width: 310px; height: 310px; border: 1px solid #b8a7f74d; border-radius: 50%; box-shadow: 0 0 0 27px #c9b9ff37, 0 0 0 63px #c9b9ff26; }
.hero-kicker { display: flex; gap: 7px; align-items: center; color: #514296; font-weight: 750; font-size: .89rem; margin-bottom: 10px; }
.hero p { color: #514966; margin-top: 10px; }
.hero .button { flex: none; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.section-heading p { margin-top: 5px; }
.section-block + .section-block { margin-top: 30px; }
.overview { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(235px, 1fr); gap: 15px; }
.medication-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dialog .medication-grid { grid-template-columns: 1fr; }
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trend-card { min-width: 0; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; font-size: .83rem; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--series-color); }
.trend-plot { width: 100%; display: block; margin-top: 9px; }
.trend-plot text { fill: #635d76; font-size: 15px; }
.trend-gridline { stroke: #eeeaf2; }
.trend-axis { stroke: #bcb5ca; }
.trend-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.trend-plot circle { stroke: white; stroke-width: 1.25; }
.card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 19px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.tile-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: none; color: var(--primary); border-radius: 11px; background: var(--tint); }
.tile-icon.teal { color: #1e7766; background: #e6f5f0; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.metric { background: #f7f6fc; padding: 12px 11px; border-radius: 11px; }
.metric .metric-value { display: inline-block; font-weight: 800; font-size: clamp(1.3rem, 2.5vw, 1.85rem); letter-spacing: -.045em; line-height: 1.1; }
.metric .unit { font-size: .75rem; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.metric .metric-label { display: block; font-size: .83rem; color: var(--muted); margin-bottom: 6px; }
[data-pulse-color="red"] { --pulse-color: #8b2032; --pulse-background: #fff0f2; }
[data-pulse-color="yellow"] { --pulse-color: #75530b; --pulse-background: #fff5d4; }
[data-pulse-color="green"] { --pulse-color: #195c44; --pulse-background: #e7f6ed; }
.metric[data-pulse-color], .record-amount[data-pulse-color] { color: var(--pulse-color, inherit); }
.metric[data-pulse-color] { background: var(--pulse-background, #f7f6fc); }
.record-amount[data-pulse-color]:not([data-pulse-color="neutral"]) { background: var(--pulse-background); border-radius: 8px; padding: 4px 5px; justify-self: start; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.card-foot { margin-top: 11px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 750; border-radius: 999px; padding: 5px 9px; vertical-align: middle; line-height: 1.3; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pending { background: var(--amber-bg); color: var(--amber); }
.completed { background: var(--green-bg); color: var(--green); }
.neutral { background: #efedf8; color: #5f5376; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-box { margin-top: 12px; background: #f6f4fc; border-radius: 12px; padding: 12px 14px; }
.medication-dose { margin-top: 6px; font-size: 1.32rem; font-weight: 800; letter-spacing: -.025em; }
.medication-alert { margin-top: 10px; border-radius: 10px; padding: 9px 11px; color: var(--amber); background: var(--amber-bg); }
.aspirin-stop { border: 1px solid #ecc0c8; border-radius: 11px; background: #fff0f2; color: #8b2032; padding: 10px 12px; }
.aspirin-stop p { margin-top: 3px; }
.urgent-attention { border: 1px solid #da919f; border-radius: 16px; background: #fff0f2; color: #762033; padding: 16px 17px; }
.clinical-pressure-alert { border: 1px solid #ddbd88; border-radius: 16px; background: var(--amber-bg); color: var(--amber); padding: 16px 17px; }
.clinical-pressure-alert p { margin-top: 9px; }
.clinical-pressure-alert a { color: inherit; text-decoration: underline; }
.workspace > .clinical-pressure-alert { margin-bottom: 20px; }
.pulse-alert[data-pulse-care-action], .pressure-episode[data-pressure-episode-care-action] { border-color: #ddbd88; color: var(--amber); background: var(--amber-bg); }
.pressure-episode[data-pressure-episode-care-action="follow-up"] { border-color: var(--line); color: #514376; background: #f7f6fc; }
.pulse-alert[data-pulse-care-action="immediate-assistance"], .clinical-pressure-alert[data-clinical-pressure-care-action="immediate-assistance"], .pressure-episode[data-pressure-episode-care-action="immediate-assistance"] { border-color: #a51e37; color: #762033; background: #fff0f2; }
.immediate-referral { border: 2px solid #a51e37; border-radius: 14px; background: #a51e37; color: white; padding: 15px; }
.immediate-referral p { margin-top: 8px; }
.immediate-referral .button { color: #762033; }
.symptom-alarm-sources { display: grid; gap: 10px; margin: 14px 0 10px; padding-left: 20px; }
.symptom-alarm-sources li { padding-top: 6px; border-top: 1px solid #ffffff66; }
.symptom-alarm-sources .button { margin-top: 8px; }
.workspace > .immediate-referral { margin-bottom: 20px; }
.pressure-episode > .immediate-referral { margin-top: 14px; }
.pressure-timeline { display: grid; gap: 14px; padding-left: 22px; margin: 17px 0; }
.pressure-timeline li > p { margin-top: 4px; }
.pressure-next, .pressure-review, .pressure-escalation, .urgent-screening-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid currentColor; }
.pressure-escalation h3 { margin-bottom: 6px; }
.protocol-referral { padding: 14px; border: 1px solid #ddbd88; border-radius: 11px; color: var(--amber); background: var(--amber-bg); }
.protocol-referral p + p { margin-top: 8px; }
.pressure-priority { margin-top: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #f7f6fc; }
.pressure-priority p + p { margin-top: 5px; }
.pressure-priority[data-pressure-care-action="professional-review"], .pressure-priority[data-pressure-care-action="protocol-referral"], .pressure-priority[data-pressure-care-action="review-required"] { border-color: #ddbd88; color: var(--amber); background: var(--amber-bg); }
.pressure-priority[data-pressure-care-action="immediate-assistance"] { border-color: #a51e37; color: #762033; background: #fff0f2; }
.routine-pressure-count { margin-top: 12px; }
.routine-pressure-count strong { font-size: 1.8rem; }
.routine-pressure-plan progress { display: block; width: 100%; height: 12px; margin: 10px 0 12px; accent-color: var(--primary); }
.enalapril-result .status { margin-top: 5px; }
.recorded-annotation { margin-top: 13px; }
.prior-annotation { padding: 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #f5f4f7; }
.prior-annotation .note-box { background: transparent; padding: 0; }
.urgent-screening-summary > p { margin-top: 7px; }
.screening-options { display: grid; gap: 8px; }
.workspace > .urgent-attention { margin-bottom: 20px; }
.urgent-attention .button { margin-inline-end: 6px; }
.urgent-attention .urgent-icon { color: #8b2032; background: #f9d8df; }
.pulse-alert[data-pulse-care-action]:not([data-pulse-care-action="immediate-assistance"]) .urgent-icon, .pressure-episode[data-pressure-episode-care-action]:not([data-pressure-episode-care-action="immediate-assistance"]) .urgent-icon { color: inherit; background: #ffffff99; }
.urgent-attention .urgent-clock { margin-top: 4px; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.urgent-medication { margin-block: 12px; }
.urgent-medication .urgent-dose-check { background: white; border-color: #ecc0c8; }
.urgent-dose-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.urgent-dose-form label, .urgent-dose-form .button { margin: 0; }
.urgent-dose-form label { width: 145px; max-width: 100%; }
.urgent-dose-form .form-error { flex-basis: 100%; }
.screening-option { display: flex; align-items: center; gap: 11px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.screening-option input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--primary); }
.aspirin-result .button + .button { margin-inline-start: 6px; }
.medication-log { list-style: none; margin: 0; padding: 0; }
.medication-log li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 14px; padding: 13px 16px; }
.medication-log li + li { border-top: 1px solid var(--line); }
.medication-plan summary { cursor: pointer; font-weight: 750; }
.medication-plan p { margin-top: 9px; }
input[type=datetime-local] { min-width: 0; }
.history { border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.record { display: grid; grid-template-columns: minmax(145px, 1.35fr) minmax(82px, .62fr) minmax(70px, .55fr) minmax(130px, 1fr) auto; gap: 10px; padding: 12px 15px; min-height: 66px; align-items: center; }
.record + .record { border-top: 1px solid var(--line); }
.record-who { display: flex; align-items: center; gap: 8px; }
.record-who .tile-icon { width: 32px; height: 32px; }
.record-amount { font-weight: 780; white-space: nowrap; }
.record-amount span { font-size: .73rem; color: var(--muted); font-weight: 500; display: block; }
.record .button { min-height: 37px; padding: 7px 10px; font-size: .82rem; }
.page-head { margin-bottom: 20px; }
.page-head p { margin-top: 7px; }
.page-head .section-heading { align-items: end; }
.empty { padding: 20px; }
.rule-list { display: grid; gap: 12px; }
.rule-title { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.rule-conditions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.condition-tag { padding: 6px 9px; border-radius: 8px; background: #f1eefb; color: #514376; font-size: .83rem; }
.rule-list .card h3 { overflow-wrap: anywhere; }
.rule-list .button { flex: none; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bottom-nav { display: none; }

.dialog { width: min(100% - 26px, 545px); max-height: calc(100svh - 24px); border: 1px solid var(--line); border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 18px 70px #241c5240; }
.dialog::backdrop { background: #211a4b78; }
.dialog-head { padding: 20px 20px 13px; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.dialog-head p { margin-top: 5px; }
.icon-button { width: 39px; min-width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; background: white; border: 1px solid var(--line); padding: 0; }
.icon-button:hover { background: var(--tint); }
.dialog-body { padding: 0 20px 20px; display: grid; gap: 13px; }
.dialog-body .button.primary { justify-self: end; }
.measure-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.input-unit { display: block; font-size: .77rem; color: var(--muted); margin-top: 4px; }
.field-rule { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(55px, .7fr) 39px; align-items: end; gap: 6px; margin-bottom: 7px; }
.field-rule .icon-button { height: 48px; }
.field-rule select, .field-rule input { font-size: .9rem; }
.field-rule select { padding-left: 8px; padding-right: 24px; background-position: calc(100% - 12px) 21px, calc(100% - 7px) 21px; }
.matches { display: grid; gap: 8px; }
.match-button { text-align: left; min-height: 44px; border: 1px solid #e5dff9; border-radius: 10px; background: #f5f1ff; padding: 8px 11px; }
.match-button:hover { border-color: #b7a9ec; }
.match-button strong { display: block; }
.feedback { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 5; color: white; background: #302553; border-radius: 10px; padding: 10px 15px; box-shadow: 0 8px 25px #211a4b40; max-width: calc(100% - 24px); }
.feedback:empty { display: none; }

@media (max-width: 880px) {
  .entry { grid-template-columns: minmax(0, .94fr) minmax(340px, 1fr); gap: 12px; }
  .entry-art { padding: 24px; }
  .entry-body { padding-inline: 18px; }
  .layout { grid-template-columns: 168px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .workspace { padding-inline: 19px; }
  .record { grid-template-columns: minmax(105px, 1.15fr) minmax(57px, .56fr) minmax(43px, .42fr) minmax(105px, .92fr) auto; gap: 6px; padding-inline: 10px; }
  .record-who .tile-icon { display: none; }
  .trend-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .entry { display: block; padding: 12px; }
  .entry-art { min-height: 0; border-radius: 20px; padding: 20px; }
  .entry-intro { margin-top: 24px; }
  .entry-intro h2 { font-size: clamp(2rem, 9vw, 3.5rem); max-width: none; }
  .entry-intro p { margin-top: 8px; font-size: .9rem; max-width: none; }
  .art-reading { display: none; }
  .entry-body { padding: 25px 9px 20px; }
  .login h1 { font-size: 2rem; }
  .login > p { margin-bottom: 19px; }
  .demo-access { margin-top: 20px; padding-top: 15px; }
  .layout { display: block; }
  .sidebar { display: none; }
  .workspace { padding: 13px 13px calc(80px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 14px; }
  .topbar .brand { display: inline-flex; }
  .topbar .profile .avatar, .topbar .profile > span { display: none; }
  .topbar .mobile-exit { display: grid; }
  .topbar .demo-pill { margin-left: auto; }
  .hero { flex-direction: column; align-items: start; gap: 16px; padding: 19px; border-radius: 18px; margin-bottom: 22px; }
  .hero::before { right: -150px; }
  .hero p { margin-top: 7px; }
  .hero .button { min-height: 43px; }
  .overview { grid-template-columns: 1fr; gap: 9px; }
  .medication-grid { grid-template-columns: 1fr; gap: 9px; }
  .card { padding: 13px; border-radius: 14px; }
  .card-head { margin-bottom: 9px; }
  .section-block + .section-block { margin-top: 22px; }
  .history { border-radius: 14px; }
  .record { grid-template-columns: minmax(75px, 1fr) minmax(51px, .6fr) minmax(41px, .43fr) auto; padding: 10px 8px; min-height: 66px; }
  .record .status { grid-column: 1 / 4; grid-row: 2; justify-self: start; }
  .record .button { grid-column: 4; grid-row: 1 / 3; }
  .record-who .secondary { font-size: .74rem; }
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); z-index: 2; }
  .bottom-nav .nav-button { min-width: 0; flex: 1 1 0; max-width: 140px; flex-direction: column; justify-content: center; gap: 3px; font-size: .75rem; padding: 6px 3px; white-space: nowrap; }
  .feedback { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .page-head .section-heading { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .measure-fields { grid-template-columns: 1fr 1fr; }
  .field-rule { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(49px, .6fr) 35px; }
  .field-rule .icon-button { width: 35px; min-width: 35px; }
}

/* Shared-care authentication and device administration. */
.enrollment-fields { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.enrollment-fields summary { cursor: pointer; font-size: .9rem; font-weight: 600; }
.enrollment-fields[open] { display: grid; gap: 12px; }
.enrollment-fields label { display: block; margin-top: 12px; }
.enrollment-fields p { margin-top: 10px; }
.sync-status { font-size: .78rem; color: var(--muted); margin: -5px 0 15px; }
.sync-status.sync-error { background: #fff2dd; border: 1px solid #dfbf7a; color: #6c4712; border-radius: 10px; padding: 10px 12px; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 14px; }
.device-card h3 { overflow-wrap: anywhere; }
.device-card .section-heading { align-items: start; gap: 10px; }
.enrollment-code { background: var(--tint); padding: 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 1.05rem; user-select: all; overflow-wrap: anywhere; }
#push-status { overflow-wrap: anywhere; }

/* Weekly schedule: one form, seven days, with drafts retained in memory. */
.schedule-intro { margin: 0 0 16px; }
.schedule-days { display: grid; gap: 12px; }
.schedule-day { margin: 0; padding: 12px 15px 15px; border: 1px solid var(--line); border-radius: 14px; background: white; display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(135px, 1fr) minmax(100px, .7fr); gap: 15px; align-items: end; min-width: 0; }
.schedule-day legend { padding: 0 7px; }
.schedule-day legend span { margin-left: 10px; color: var(--muted); font-size: .85rem; }
.schedule-day input[type="time"] { min-width: 0; width: 100%; }
.schedule-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; min-height: 48px; }
.schedule-check input { flex: 0 0 auto; width: 18px; height: 18px; }
.schedule-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.schedule-success { color: #267256; font-weight: 600; margin-top: 12px; }
.schedule-status p + p { margin-top: 9px; }
.medical-card-purpose { margin-top: 10px; }
.medical-card-section { margin-top: 24px; }
.medical-card-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 9px; }
.medical-card-updated { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.medical-card-print-date { display: none; }
.medical-card-editor, .medical-card-readonly { margin-top: 20px; }
.medical-card-editor summary { cursor: pointer; font-weight: 750; }
.medical-card-editor form { display: grid; gap: 15px; margin-top: 20px; }
.medical-card-editor form .button { justify-self: start; }
.bottom-nav .nav-button[data-route="medical-card"] { min-width: 86px; }
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar .profile { flex: 1 0 100%; justify-content: space-between; }
  .topbar .profile .profile-name { display: block; font-size: .82rem; overflow-wrap: anywhere; }
  .schedule-day { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 10px 12px 12px; }
  .schedule-check { min-height: 38px; font-size: .8rem; }
  .bottom-nav { overflow-x: auto; justify-content: start; }
  .bottom-nav .nav-button { min-width: 54px; }
}

@media print {
  @page { margin: 18mm; }
  body { background: white !important; color: black !important; min-width: 0; }
  body > :not(#app), #app .sidebar, #app .bottom-nav, #app #dialog,
  #app .workspace > :not(#medical-card-page), #medical-card-page > :not(.medical-card-document) { display: none !important; }
  #app, #app .layout, #app .workspace, #medical-card-page { display: block !important; margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; min-height: 0 !important; }
  .medical-card-document { display: block !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: black !important; }
  .medical-card-document h2 { font-size: 19pt; }
  .medical-card-document h3 { break-after: avoid; font-size: 13pt; }
  .medical-card-text { font-size: 11pt; line-height: 1.45; }
  .medical-card-print-date { display: block; margin-top: 8px; }
  .medical-card-updated { color: black; }
}
