@font-face {
  font-family: Ward Song;
  src: url("assets/ward-serif.woff2") format("woff2");
  font-weight: 550 900;
  font-display: swap;
}
@font-face {
  font-family: Ward Latin;
  src: url("assets/ward-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f5ee;
  --ink: #25392f;
  --green: #315d49;
  --pale: #c6d8bd;
  --line: #bfc6b8;
  --red: #aa493b;
  --muted: #56685c;
  --song: "Ward Song", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --technical: "Ward Latin", "Barlow Condensed", "Arial Narrow", "Arial", sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding: 20px; }
body { margin: 0; min-width: 280px; -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
button, textarea, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { border: 0; background: none; padding: 0; }
a { text-decoration: none; color: inherit; }
p, h1, h2, figure { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #9a4a31; outline-offset: 4px; }
::selection { background: #c8deb9; color: #1e3429; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.shell { width: min(84.5%, 1190px); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: -8rem; z-index: 10; background: white; padding: .8rem; }
.skip:focus { top: 1rem; }
.tiny-cross, .brand-icon i { display: inline-block; flex-shrink: 0; background: currentColor; clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); }
.tiny-cross { width: 12px; height: 12px; }
.topbar { position: relative; border-top: 4px solid #354e3f; border-bottom: 1px solid #cbd0c3; }
.header-row { height: 77px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 8px; color: #daedc9; background: #324e3b; }
.brand-icon i { width: 23px; height: 23px; }
.brand-word { font: 600 2.15rem/.9 var(--technical); letter-spacing: -.028em; }
.brand-word span { color: #5b7e61; }
.header-divider { height: 20px; width: 1px; background: #bec6b9; }
.header-name { font-size: .88rem; font-weight: 650; letter-spacing: .12em; }
nav { margin-left: auto; display: flex; align-items: center; gap: 30px; height: 100%; font-size: .91rem; font-weight: 550; white-space: nowrap; }
nav a, nav button { position: relative; display: inline-flex; align-items: center; min-height: 42px; }
nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; bottom: 2px; background: var(--green); }
nav a:hover { color: #50815e; }
.about-btn { gap: 7px; border: 1px solid #a5b3a0; border-radius: 4px; padding: 0 13px; min-height: 35px; font-size: .875rem; }
.about-btn:hover { background: #e8eddf; }
.about-btn .icon { width: 16px; height: 16px; }
main { position: relative; isolation: isolate; overflow: clip; }
main::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#8c9d841f .7px, transparent .85px); background-size: 7px 7px; pointer-events: none; }
.hero { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: center; gap: clamp(38px,5.5vw,93px); padding-block: 69px 55px; }
.hero-intro { align-self: center; min-width: 0; padding-top: 1px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; font-size: .91rem; font-weight: 650; letter-spacing: .1em; color: #48614d; }
.kicker > span { width: 29px; height: 1.5px; background: #7d967c; position: relative; }
.kicker > span::before { content: ""; position: absolute; height: 7px; width: 7px; background: var(--red); left: 0; top: -3px; }
h1 { font: 800 clamp(3.2rem,5.32vw,5.15rem)/1.24 var(--song); letter-spacing: -.066em; }
h1 > span { display: block; white-space: nowrap; }
h1 em { font-style: normal; color: #42745a; }
h1 b { font-weight: inherit; color: var(--red); margin-left: -.07em; }
.intro-copy { margin-top: 23px; font-size: clamp(1rem,1.18vw,1.125rem); line-height: 1.95; color: #48594c; letter-spacing: .025em; }
.actions { margin-top: 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 15px 25px; }
.action-primary, .action-quiet { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; font-size: .98rem; font-weight: 650; }
.action-primary { color: #f5f7ed; background: var(--green); border: 1px solid #234a38; border-radius: 5px; padding: 0 23px; box-shadow: 0 2px 0 #183f2831; transition: background .15s, transform .15s; }
.action-primary:hover { background: #254e3b; transform: translateY(-1px); }
.action-primary:active { transform: translateY(1px); }
.action-primary .icon { width: 20px; height: 20px; }
.action-quiet { padding-inline: 2px; color: #3c5542; }
.action-quiet:hover, .write-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.rescue-response { min-height: 24px; margin-top: 9px; color: #3e6b4c; font-size: .88rem; line-height: 1.55; }
.rescue-response:empty { visibility: hidden; }
.photo-desk { width: 100%; max-width: 511px; min-width: 0; justify-self: center; position: relative; isolation: isolate; margin-block: 7px 16px; }
.photo-desk::before { content: ""; position: absolute; z-index: -2; inset: -41px -42px -34px -40px; background-image: linear-gradient(to right,#8da68a3a 1px,transparent 1px),linear-gradient(to bottom,#8da68a3a 1px,transparent 1px); background-size: 19px 19px; mask-image: radial-gradient(ellipse at center,#000 45%,transparent 77%); }
.folder { position: absolute; z-index:-1; inset: 8px -4px -3px 3px; background: #c2d2b6; border: 1px solid #aabca0; border-radius: 3px 6px 5px 5px; transform: rotate(-4.1deg); box-shadow: 1px 5px 9px #40553e12; }
.folder > span { position: absolute; top: -21px; left: -1px; height: 22px; min-width: 75px; padding: 3px 17px; background: #c2d2b6; border: 1px solid #aabca0; border-bottom: none; border-radius: 4px 10px 0 0; color: #405d43; letter-spacing: .14em; font: 600 13px/1 var(--technical); }
.case-card { position: relative; transform: rotate(2.2deg); background: #fcfbf4; padding: 0 17px; border: 1px solid #c4c8b8; border-radius: 3px; box-shadow: 0 1px 2px #253b2520, 2px 7px 11px #3b48331c, 8px 15px 27px #3b483316; }
.clip { pointer-events: none; z-index: 2; width: 14px; height: 56px; border: 2px solid #8a9385; border-radius: 9px; box-shadow: inset 1px 0 0 #fff, 1px 1px 1px #515d4d55; position: absolute; top: -14px; left: 21px; transform: rotate(-8deg); }
.clip::after { content: ""; position: absolute; top: 0; right: 1px; width: 6px; height: 38px; border: 1px solid #b9c0b2; border-bottom-right-radius: 5px; border-top: 0; border-left: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 45px; padding-left: 24px; }
.card-label { font-weight: 700; font-size: .89rem; display: inline-flex; gap: 7px; align-items: center; }
.card-label .tiny-cross { color: var(--red); height: 10px; width: 10px; }
.photo-code { color: #6d7768; font: 600 .82rem/1 var(--technical); letter-spacing: .15em; }
.photo-mount { display: block; width: 100%; position: relative; }
.photo-mount img, .photo-dialog img { display: block; width: 100%; height: auto; }
.photo-mount img { outline: 1px solid #344b3725; outline-offset: -1px; }
.expand { position: absolute; right: 8px; top: 8px; background: #fcfcf4e8; color: #263b2e; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #46624c3b; border-radius: 3px; opacity: .12; transition: opacity .18s; }
.photo-mount:hover .expand, .photo-mount:focus-visible .expand { opacity: 1; }
.expand .icon { height: 16px; width: 16px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; min-height: 64px; padding-inline: 2px 6px; }
.patient { display: flex; align-items: baseline; gap: 9px; }
.patient small { color: var(--muted); font-size: .77rem; letter-spacing: .07em; }
.patient b { font-size: .94rem; font-weight: 650; }
.patient i { font: 600 .95rem var(--technical); margin-left: 2px; color: #55705a; }
.status-stamp { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; color: #a05140; border: 2px solid currentColor; outline: .7px solid currentColor; outline-offset: -4px; font: 750 1.1rem/1.2 var(--sans); letter-spacing: .1em; padding: 4px 9px; transform: rotate(-6deg); border-radius: 3px; }
.status-stamp.recovered { color: #3e7052; }
.log-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; gap: 23px; padding-top: 7px; padding-bottom: 35px; }
.monitor { color: #daeccf; background: #213d31; padding: 19px 23px 16px; border: 1px solid #263a2e; border-radius: 7px; min-width: 0; position: relative; overflow: hidden; }
.monitor-head, .monitor-foot, .visit-top { display: flex; align-items: center; justify-content: space-between; }
.monitor-head h2 { display: flex; align-items: center; gap: 9px; color: #eef2e8; font-size: 1.05rem; font-weight: 650; letter-spacing: .06em; line-height: 1.5; }
.monitor-head h2 .icon { color: #bce6a9; width: 21px; height: 21px; }
.machine, .lead { font: 600 .8rem/1.2 var(--technical); letter-spacing: .16em; }
.machine { color: #b9d5b2; }
.machine span { margin-inline: 4px; color: #8ba58a; }
.wave-area { isolation: isolate; position: relative; height: 79px; margin-top: 12px; margin-bottom: 8px; }
.scope-grid { position: absolute; inset:0; z-index:-1; background-image: linear-gradient(to right,#9ac19818 1px,transparent 1px),linear-gradient(to bottom,#9ac19818 1px,transparent 1px),linear-gradient(to right,#9ac1980b 1px,transparent 1px),linear-gradient(to bottom,#9ac1980b 1px,transparent 1px); background-size: 32px 32px,32px 32px,8px 8px,8px 8px; mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); }
#ecg { display: block; width: 100%; height: 100%; }
.live { display: inline-flex; gap: 8px; align-items: center; color: #d6e8cd; font-size: .8rem; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #c2de9e; box-shadow: 0 0 6px #c4e1a555; }
.lead { color: #afc1aa; letter-spacing: .13em; }
.visits { position: relative; background: #f5f5e9; border: 1px solid #c3c9b7; border-radius: 6px; padding: 18px 24px 15px; min-width: 0; display: flex; flex-direction: column; scroll-margin-block-start: 20px; }
.visits::before { content: ""; width: 4px; border-radius: 6px 0 0 6px; position: absolute; inset: 0 auto 0 0; background: #b1c7a8; }
.visit-top h2 { font: 750 1.35rem/1.35 var(--song); letter-spacing: .04em; }
.local-label { background: #e8ecdd; border: 1px solid #d3dac7; padding: 2px 7px; border-radius: 3px; color: #52634e; font-size: .75rem; letter-spacing: .04em; }
.ward-counts { display: grid; grid-template-columns: 1fr 1.2fr; margin: auto 0; padding-block: 13px 1px; }
.ward-counts > div + div { border-left: 1px dashed #bfccb7; padding-left: clamp(12px, 2.3vw, 34px); }
.ward-counts dt { color: #51694f; font-size: .87rem; }
.ward-counts dd { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 0; color: var(--green); }
.ward-counts strong { font: 600 clamp(2rem, 3.2vw, 3.1rem)/1.1 var(--technical); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ward-counts dd span { font-size: .85rem; }
.action-primary:disabled { cursor: wait; opacity: .78; transform: none; }
.note-content { display: flex; align-items: flex-start; gap: 13px; margin: 17px 0 12px; }
.note-icon { color: #718769; background: #e6ecdc; border: 1px solid #d2dcc9; width: 37px; height: 39px; flex: 0 0 auto; border-radius: 4px; display: grid; place-items: center; }
.note-icon .icon { width: 21px; height: 21px; }
.entry { min-width: 0; }
#visit-text { font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
#visit-by { display: block; color: var(--muted); font-size: .835rem; line-height: 1.65; margin-top: 2px; overflow-wrap: anywhere; }
.write-link { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; min-height: 24px; gap: 7px; color: #375f45; font-size: .88rem; font-weight: 650; }
.write-link .icon { height: 14px; width: 14px; }
.footer { border-top: 1px solid #c7ccbe; color: #5b695a; padding-block: 19px 24px; display: flex; justify-content: space-between; align-items: center; font-size: .81rem; }
.footer > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.footer .tiny-cross { width: 10px; height: 10px; color: #7a9172; }
.founded time { margin-left: 4px; font-family: var(--mono); letter-spacing: .04em; }
.dialog { background: #fbfaf2; width: min(92vw, 440px); max-width: 94vw; max-height: 90vh; max-height: 90dvh; border: 1px solid #aab8a3; border-radius: 7px; padding: 0; color: var(--ink); box-shadow: 0 16px 90px #172e2852; }
.dialog::backdrop { background: #172c2599; }
.sheet { position: relative; padding: 32px; border-top: 5px solid #4f7558; }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; color: #4c6152; }
.close:hover { background: #e4eadb; }
.dialog-label { display: flex; gap: 8px; align-items: center; font: 650 .78rem/1.5 var(--sans); color: #58715a; margin: 0 22px 13px 0; letter-spacing: .07em; }
.dialog-label .tiny-cross { width: 10px; height: 10px; }
.dialog h2 { font: 750 2rem/1.4 var(--song); margin: 0 22px 16px 0; letter-spacing: -.04em; }
.dialog p + p { margin-top: 13px; }
#about-dialog .sheet > p:not(.dialog-label) { line-height: 1.85; font-size: 1rem; color: #3e5345; }
label { font-size: .92rem; font-weight: 650; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; }
#counter, .optional { font-size: .79rem; color: #61705e; font-weight: 400; }
#counter { font-family: var(--mono); }
textarea, input { width: 100%; background: #fffef8; border: 1px solid #adb9a7; border-radius: 3px; padding: 9px 11px; font-size: 1rem; line-height: 1.6; margin-top: 6px; }
textarea { display: block; resize: vertical; min-height: 97px; margin-bottom: 17px; }
.form-hint { color: #5b6b5b; font-size: .82rem; line-height: 1.65; margin: 13px 0 19px; }
.photo-dialog { width: min(94vw, 530px); }
.photo-dialog .sheet { padding: 25px; }
.photo-dialog img { background: #e4e7dc; }
.photo-caption { margin-top: 11px; display: flex; justify-content: space-between; color: #5a6858; font-size: .82rem; }
.photo-caption span:last-child { font-family: var(--mono); }
@media (min-width: 1580px) {
  .hero { padding-block: 86px 70px; }
}
@media (max-width: 1100px) {
  .shell { width: 89%; }
  .hero { gap: 5vw; padding-block: 63px 45px; }
  h1 { font-size: clamp(3.2rem,5.7vw,4.1rem); }
  .card-foot { min-height: 57px; }
  .intro-copy { font-size: 1rem; }
}
@media (max-width: 790px) {
  .shell { width: calc(100% - 52px); }
  .hero { gap: 23px; }
  h1 { font-size: 5.7vw; }
  nav { gap: 15px; }
  .header-row { height: 68px; gap: 11px; }
  .intro-copy { line-height: 1.8; }
  .wide-break { display: none; }
  .patient { gap: 5px; }
  .case-card { padding-inline: 12px; }
  .kicker { font-size: .84rem; margin-bottom: 17px; }
  .actions { gap: 11px; margin-top: 20px; }
  .action-primary { padding-inline: 15px; }
  .card-head { height: 37px; }
  .clip { height: 45px; left: 16px; }
  .clip::after { height: 30px; }
  .status-stamp { font-size: .94rem; }
  .log-grid { gap: 14px; grid-template-columns: 1.05fr 1fr; }
  .monitor, .visits { padding-inline: 16px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 40px); }
  .header-row { height: 62px; gap: 10px; }
  .brand { gap: 7px; }
  .brand-word { font-size: 1.72rem; }
  .brand-icon { width: 30px; height: 30px; border-radius: 6px; }
  .brand-icon i { width: 18px; height: 18px; }
  .header-name { font-size: .81rem; letter-spacing: .06em; }
  .header-divider { height: 16px; }
  nav { gap: 0; }
  .nav-current, .nav-log { display: none; }
  .about-btn { padding-inline: 8px; min-height: 35px; gap: 4px; font-size: .8rem; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 31px; padding-block: 33px 32px; }
  .hero-intro { width: 100%; }
  h1 { font-size: clamp(2.45rem,9.8vw,3.7rem); line-height: 1.22; letter-spacing: -.055em; }
  .kicker { margin-bottom: 14px; }
  .intro-copy { margin-top: 14px; max-width: 30em; line-height: 1.75; }
  .actions { gap: 18px; margin-top: 17px; }
  .action-primary, .action-quiet { min-height: 43px; }
  .rescue-response { min-height: 0; margin-top: 0; }
  .rescue-response:not(:empty) { margin-top: 8px; }
  .photo-desk { width: 90%; max-width: 423px; align-self: center; margin: 8px 0 8px; }
  .card-head { height: 39px; }
  .card-foot { min-height: 49px; }
  .photo-code { font-size: .75rem; }
  .expand { opacity: .75; width: 25px; height: 25px; top: 6px; right: 6px; }
  .log-grid { grid-template-columns: 1fr; gap: 14px; padding-block: 5px 23px; }
  .monitor, .visits { padding: 16px 18px; }
  .wave-area { height: 62px; margin: 7px 0; }
  .note-content { margin-block: 13px; }
  .footer { gap: 10px; padding-block: 13px 18px; flex-wrap: wrap; }
  .sheet { padding: 26px; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 30px); }
  .header-row { gap: 7px; }
  .about-btn span { display: none; }
  .about-btn { width: 36px; justify-content: center; }
  .photo-desk { width: 94%; }
  .patient i { display: none; }
  .sheet { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::after, *::before { transition: none !important; animation: none !important; }
}

