:root { --accent:#0F766E; --accent-dark:#0B4F4A; --accent-soft:#E6F2F1; --ink:#1B2526; --muted:#4D5B5C; --line:#D5DEDE; --bg:#FFFFFF; --warn:#8A3B12; --warn-soft:#FBEFE6; }
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size:18px; line-height:1.5; }
.banner { position:sticky; top:0; z-index:10; background:var(--accent-dark); color:#fff; text-align:center; font-size:15px; font-weight:600; padding:8px 16px; }
.top { border-bottom:1px solid var(--line); padding:10px 16px; }
.brand { background:none; border:0; min-height:44px; padding:6px 0; font:inherit; font-weight:700; color:var(--accent-dark); cursor:pointer; text-align:left; }
main { max-width:640px; margin:0 auto; padding:20px 16px 56px; }
main.wide { max-width:920px; }
h1 { font-size:28px; line-height:1.2; margin:8px 0 12px; }
h2 { font-size:22px; line-height:1.25; margin:0 0 12px; }
h3 { font-size:17px; margin:0 0 8px; color:var(--accent-dark); }
p { margin:0 0 14px; }
.muted { color:var(--muted); }
.small { font-size:15px; }
.btn { display:block; width:100%; min-height:56px; padding:14px 18px; border-radius:12px; border:2px solid var(--line); background:#fff; color:var(--ink); font:inherit; font-weight:600; text-align:left; cursor:pointer; margin:0 0 12px; }
.btn:hover, .btn:focus-visible { border-color:var(--accent); outline:none; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; text-align:center; }
.btn.primary:hover, .btn.primary:focus-visible { background:var(--accent-dark); border-color:var(--accent-dark); }
.btn[disabled] { background:#E3EAEA; border-color:#E3EAEA; color:#4D5B5C; cursor:not-allowed; }
.btn.selected { border-color:var(--accent); background:var(--accent-soft); }
.btn.quiet { text-align:center; color:var(--accent-dark); }
.btn .sub { display:block; font-weight:400; font-size:15px; color:var(--muted); }
.btn.primary .sub { color:#DDF0EE; }
.row { display:flex; gap:12px; } .row .btn { flex:1; }
.progress { height:8px; background:var(--line); border-radius:4px; overflow:hidden; margin:4px 0 6px; }
.progress > div { height:100%; background:var(--accent); }
.step { font-size:15px; color:var(--muted); margin-bottom:14px; }
.card { border:1px solid var(--line); border-radius:14px; padding:16px; margin:0 0 16px; background:#fff; }
.card.tip { background:var(--accent-soft); border-color:#BFDCD9; }
.back { background:none; border:0; font:inherit; color:var(--accent-dark); font-weight:600; padding:10px 0; cursor:pointer; }
.bodywrap { display:flex; justify-content:center; }
.bodymap { width:100%; max-width:300px; height:auto; touch-action:manipulation; }
.bodymap .shape { fill:#E3EAEA; stroke:none; } .bodymap .limb { stroke:#E3EAEA; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.bodymap .hit { fill:transparent; cursor:pointer; }
.bodymap .dot0 { fill:#fff; stroke:#7C8B8C; stroke-width:1.5; }
.bodymap .dot1 { fill:#4BA39B; stroke:none; }
.bodymap .dot2 { fill:#0B4F4A; stroke:none; }
.figure { width:100%; max-width:340px; height:auto; touch-action:manipulation; }
.zoomfig { width:100%; max-width:340px; height:auto; touch-action:manipulation; }
.figure .hit, .zoomfig .hit { fill:transparent; cursor:pointer; }
.figure .dot0, .zoomfig .dot0 { fill:#fff; stroke:var(--accent); stroke-width:1.5; }
.figure .dot1, .zoomfig .dot1 { fill:#3E9C93; }
.figure .dot2, .zoomfig .dot2 { fill:#0B4F4A; }
.figure .side { font-size:12px; fill:var(--muted); font-weight:600; }
.zone { fill:#fff; stroke:var(--accent); stroke-width:1.5; stroke-dasharray:3 3; } .zone.z1 { fill:#3E9C93; stroke-dasharray:none; } .zone.z2 { fill:#0B4F4A; stroke-dasharray:none; }
.zonetext { font-size:13px; font-weight:700; fill:var(--accent-dark); pointer-events:none; } .zonetext.z1, .zonetext.z2 { fill:#fff; }
.ztap { font-size:9px; font-weight:600; fill:var(--accent-dark); cursor:pointer; }
.legend { flex-basis:100%; display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:14px; font-weight:600; }
.legend .sw { width:14px; height:14px; border-radius:50%; display:inline-block; background:#0B4F4A; } .legend .sw.light { opacity:.3; margin-left:10px; }
.heatnote { flex-basis:100%; margin:0; color:var(--muted); }
.zlabel { font-size:14px; fill:var(--ink); font-weight:600; }
.seg { display:flex; gap:0; margin:0 0 12px; border:2px solid var(--accent); border-radius:12px; overflow:hidden; }
.segbtn { flex:1; min-height:48px; border:0; background:#fff; color:var(--accent-dark); font:inherit; font-weight:700; cursor:pointer; }
.segbtn.on { background:var(--accent); color:#fff; }
.zoomtitle { text-align:center; font-size:20px; margin:4px 0; }
.center { text-align:center; }
.marked { background:var(--accent-soft); border-radius:10px; padding:10px 14px; font-size:16px; }
.heat2 { display:grid; grid-template-columns:1fr; gap:14px; }
.figs { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; align-items:flex-start; align-content:flex-start; }
.swellbox { border-top:1px solid var(--line); padding-top:12px; }
.figs .figure { width:120px; } .figs .zoomfig { width:84px; }
.twotables { display:grid; grid-template-columns:1fr; gap:0 18px; }
.words { margin:8px 0 0; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 16px; }
.chip { min-height:44px; padding:8px 14px; border-radius:22px; border:2px solid var(--line); background:#fff; font:inherit; font-size:16px; cursor:pointer; color:var(--ink); }
.chip.l1 { border-color:var(--accent); background:var(--accent-soft); font-weight:600; }
.chip.l2 { border-color:var(--accent-dark); background:var(--accent-dark); color:#fff; font-weight:600; }
.trend { display:grid; grid-template-columns:150px 1fr; gap:10px; align-items:end; padding:12px 0; border-bottom:1px solid var(--line); }
.trend:last-of-type { border-bottom:0; }
.bars { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; align-items:end; height:64px; }
.bars span { display:block; background:var(--accent); border-radius:4px 4px 0 0; min-height:3px; }
.bars span.today { background:var(--accent-dark); }
.days { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; font-size:12px; color:var(--muted); text-align:center; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:middle; font-size:16px; }
th { font-size:14px; color:var(--muted); font-weight:600; }
.pill { display:inline-block; min-width:30px; text-align:center; padding:2px 10px; border-radius:12px; font-weight:700; font-size:15px; background:var(--accent-soft); color:var(--accent-dark); }
.pill.hot { background:var(--warn-soft); color:var(--warn); }
.patientrow { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.flags { border:1px solid #E7C9B3; background:var(--warn-soft); border-radius:14px; padding:14px 16px; margin:0 0 16px; }
.flags ul { margin:6px 0 8px; padding-left:20px; } .flags li { margin-bottom:4px; }
.flags.none { background:var(--accent-soft); border-color:#BFDCD9; }
.grid2 { display:grid; grid-template-columns:1fr; gap:16px; }
.spark { vertical-align:middle; }
.medbar { display:grid; grid-template-columns:70px 1fr 52px; gap:10px; align-items:center; margin-bottom:8px; font-size:16px; }
.medbar.wide { grid-template-columns:110px 1fr; }
.sub2 { display:block; font-weight:400; font-size:13px; color:var(--muted); }
.pretend { border:2px solid var(--accent); border-radius:10px; padding:10px 14px; font-weight:600; }
.notdx { margin:6px 0 0; }
.subhead { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.medbar .track { height:14px; background:#E3EAEA; border-radius:7px; overflow:hidden; } .medbar .track div { height:100%; background:var(--accent); }
.note { border-left:4px solid var(--accent); padding:6px 14px; margin:0; font-size:18px; }
.actions { display:flex; gap:12px; flex-wrap:wrap; margin:0 0 16px; } .actions .btn { width:auto; flex:1 1 200px; margin:0; text-align:center; }
.heat { display:grid; grid-template-columns:1fr; gap:8px; align-items:start; }
.heat .bodymap { max-width:200px; }
.chip.on { border-color:var(--accent); background:var(--accent-soft); font-weight:700; }
.chip .sub2 { font-size:12px; }
.answers td { padding:6px 8px 6px 0; vertical-align:top; } .answers td:first-child { color:var(--muted); width:46%; }
.inds { margin:6px 0 0; padding-left:20px; } .inds li { margin-bottom:4px; }
details { margin:8px 0 0; } summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-weight:700; color:var(--accent-dark); }
.legend .sw.big { width:20px; height:20px; opacity:.55; margin-left:10px; }
@media (min-width:720px) {
  .grid2 { grid-template-columns:1fr 1fr; }
  .heat2 { grid-template-columns:330px 1fr; grid-template-areas:"figs pain" "figs swell"; align-items:start; } .figs { grid-area:figs; justify-content:flex-start; } .painlist { grid-area:pain; } .swellbox { grid-area:swell; } .twotables { grid-template-columns:1fr 1fr; }
  .heat { grid-template-columns:200px 1fr; }
}
@media (max-width:420px) { .trend { grid-template-columns:104px 1fr; } th, td { padding:8px 5px; font-size:15px; } }
@media print {
  @page { size:letter; margin:9mm; }
  body { font-size:9.5pt; line-height:1.3; }
  .no-print { display:none !important; }
  .banner { position:static; background:#fff; color:#000; border:1px solid #000; font-size:9pt; padding:3px; margin-bottom:6px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  main, main.wide { max-width:none; padding:0; }
  h1 { font-size:14pt; margin:0 0 1px; } h3 { font-size:9.5pt; margin-bottom:2px; }
  .card, .flags { padding:5px 9px; margin-bottom:5px; border-radius:6px; break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  th, td { padding:1.5px 6px; font-size:8.8pt; } th { font-size:8pt; }
  .grid2 { grid-template-columns:1fr 1fr; gap:7px; } .heat { grid-template-columns:120px 1fr; } .heat .bodymap { max-width:120px; }
  .medbar { font-size:8.8pt; margin-bottom:2px; } .note { font-size:9.5pt; } p { margin-bottom:4px; } .small { font-size:8pt; } .pill { font-size:8.8pt; padding:0 8px; } .medbar .track { height:9px; }
  .subhead { margin-top:5px; padding-top:4px; }
  .flags ul { columns:2; column-gap:18px; } .flags li { break-inside:avoid; }
  .heat2 { grid-template-columns:238px 1fr; grid-template-areas:"figs pain" "figs swell"; align-items:start; gap:5px 10px; } .figs { grid-area:figs; gap:4px; justify-content:flex-start; } .painlist { grid-area:pain; } .swellbox { grid-area:swell; padding-top:4px; } .figs .figure { width:84px; } .figs .zoomfig { width:58px; } .twotables { grid-template-columns:1fr 1fr; gap:0 12px; } .words { margin:3px 0 0; }
  .legend { font-size:8pt; gap:4px; } .legend .sw { width:8px; height:8px; -webkit-print-color-adjust:exact; print-color-adjust:exact; } .heatnote { font-size:8pt; }
  .figure *, .zoomfig * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .pretend { padding:3px 8px; border-width:1px; } .sub2 { font-size:7.5pt; display:inline; margin-left:4px; } .notdx { margin:2px 0 0; }
  .spark { height:13px; width:66px; } .flags ul { margin:2px 0 3px; } .flags li { margin-bottom:1px; } .heat .bodymap { max-width:84px; } .heat { grid-template-columns:84px 1fr; }
  .bodymap *, .medbar .track div, .pill, .spark * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
