:root {
  --ink: #05080d;
  --deep: #080d14;
  --panel: #0b1119;
  --panel2: #101823;
  --hair: rgba(150, 180, 210, .13);
  --hair2: rgba(150, 180, 210, .24);
  --text: #e7eff6;
  --dim: #8496a9;
  --faint: #566676;
  --ok: #5df2b6;
  --warn: #ffb340;
  --bad: #ff4d5e;
  --blue: #6ea0ff;
  --blue2: #2f6bff;
  --cyan: #4fd8f5;
  --gold: #f4d27a;
  --wide: 'Archivo', system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 15px/1.55 var(--wide); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
b { font-weight: 600; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
canvas { display: block; width: 100%; height: 100%; }
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mono { font-family: var(--mono); font-stretch: 85%; letter-spacing: -.02em; }
.dim { color: var(--dim); }
.sm { font-size: 12px; }
.sub { color: var(--dim); font-size: 14px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--dim); font: 500 11px/1 var(--mono); font-stretch: 90%; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ECG paper: the fine and the heavy grid of a real strip */
.paper { position: absolute; inset: 0; pointer-events: none; opacity: .75;
  background-image:
    linear-gradient(rgba(93, 242, 182, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 242, 182, .05) 1px, transparent 1px),
    linear-gradient(rgba(93, 242, 182, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 242, 182, .018) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
}

/* the top */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; height: 62px; padding: 0 28px; background: rgba(5, 8, 13, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 800; font-stretch: 120%; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand span { color: var(--text); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--dim); font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(150, 180, 210, .07); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.net { font: 500 10px/1 var(--mono); letter-spacing: .08em; color: var(--warn); border: 1px solid rgba(255, 179, 64, .4); padding: 6px 8px; border-radius: 6px; }
.bal { font: 400 12px var(--mono); font-stretch: 85%; color: var(--dim); white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--dim); border: 1px solid var(--hair); transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--hair2); }
.icon-btn[aria-pressed=true] { color: var(--ok); border-color: rgba(93, 242, 182, .45); }
.icon-btn[aria-pressed=false] #soundWave { opacity: .25; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, box-shadow .2s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--ok); color: #04130d; box-shadow: 0 0 0 1px rgba(93, 242, 182, .4), 0 8px 28px -10px rgba(93, 242, 182, .6); }
.btn.primary:hover { background: #7ff7c8; }
.btn.ghost { border: 1px solid var(--hair2); color: var(--text); }
.btn.ghost:hover { border-color: rgba(150, 180, 210, .45); background: rgba(150, 180, 210, .05); }

/* the alarm */
.alarm { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 9px 28px; background: var(--blue2); color: #fff; animation: alarm 1.1s steps(2, jump-none) infinite; }
.alarm-mark { display: inline-block; font: 700 11px/1 var(--mono); letter-spacing: .08em; padding: 5px 7px; border-radius: 5px; background: #fff; color: var(--blue2); white-space: nowrap; }
.alarm-text { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alarm-clock { font: 500 13px var(--mono); }
@keyframes alarm { from { background: var(--blue2); } to { background: #1b47bd; } }

/* the hero */
.hero { position: relative; display: grid; grid-template-columns: 1fr; align-content: end; min-height: min(780px, calc(100vh - 62px)); padding: 60px 28px 28px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--hair); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 70% at 80% 30%, rgba(47, 107, 255, .13), transparent 70%), linear-gradient(transparent 55%, var(--ink)); }
.hero .paper { z-index: -2; }
.hero-trace { position: absolute; left: 0; right: 0; top: 4%; height: 50%; z-index: -1; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.2) 0, rgba(0,0,0,.2) 40%, #000 62%); mask-image: linear-gradient(90deg, rgba(0,0,0,.2) 0, rgba(0,0,0,.2) 40%, #000 62%); }
.hero-copy { max-width: 780px; position: relative; }
.hero h1 { font-weight: 800; font-stretch: 125%; font-size: clamp(54px, 10.5vw, 158px); line-height: .9; letter-spacing: -.035em; margin-bottom: 26px; }
.lede { max-width: 560px; color: #b9c6d3; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.5; margin-bottom: 26px; }
.hero-do { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.7); } 25% { transform: scale(1.25); } 100% { transform: scale(.7); } }
.station { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--hair); border-radius: var(--r); background: rgba(8, 13, 20, .78); backdrop-filter: blur(8px); overflow: hidden; }
.st { padding: 16px 20px; border-left: 1px solid var(--hair); }
.st:first-child { border-left: 0; }
.st dt { color: var(--dim); font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 11px; }
.st dd { font: 500 clamp(22px, 2.5vw, 34px)/1 var(--mono); font-stretch: 85%; letter-spacing: -.04em; }
.st.good dd { color: var(--ok); } .st.warn dd { color: var(--warn); } .st.bad dd { color: var(--bad); } .st.blue dd { color: var(--blue); } .st.gold dd { color: var(--gold); }

/* sections */
.band { padding: 72px 28px; max-width: 1560px; margin: 0 auto; }
.band.ruled { border-top: 1px solid var(--hair); }
.band-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 30px; }
h2 { font-weight: 700; font-stretch: 112%; font-size: clamp(27px, 3.3vw, 46px); line-height: 1.04; letter-spacing: -.025em; }
h3 { font-weight: 650; font-size: 17px; line-height: 1.25; margin-bottom: 8px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--hair); border-radius: 10px; }
.tabs button { padding: 6px 11px; border-radius: 7px; color: var(--dim); font-size: 13px; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }
.search input { width: 220px; height: 38px; padding: 0 13px; background: var(--panel); border: 1px solid var(--hair); border-radius: 10px; outline: 0; font-size: 14px; }
.search input:focus { border-color: var(--hair2); }

/* the bed monitors */
.beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.bed { position: relative; display: block; border: 1px solid var(--hair); border-radius: var(--r); background: var(--deep); overflow: hidden; transition: border-color .2s, transform .15s, box-shadow .25s; }
.bed:hover { border-color: var(--hair2); transform: translateY(-2px); }
.bed-top { display: flex; align-items: center; gap: 11px; padding: 12px 13px 9px; }
.bed-img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--panel2); flex: none; }
.bed-name { min-width: 0; flex: 1; }
.bed-name strong { display: block; font-weight: 650; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bed-name span { color: var(--dim); font: 400 11px var(--mono); font-stretch: 85%; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font: 500 10px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; }
.pill.stable { color: var(--ok); } .pill.critical { color: var(--warn); } .pill.flat { color: var(--bad); } .pill.morgue { color: var(--faint); } .pill.code, .pill.blue { color: var(--blue); } .pill.discharged, .pill.discharging, .pill.gold { color: var(--gold); }
.bed-trace { position: relative; height: 88px; border-block: 1px solid var(--hair); background: #04070b; }
.bed-trace .paper { background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px; }
.bed-vitals { display: grid; grid-template-columns: repeat(4, 1fr); }
.bv { padding: 9px 13px; }
.bv + .bv { border-left: 1px solid var(--hair); }
.bv i { display: block; font: 400 9px/1 var(--mono); font-style: normal; color: var(--faint); letter-spacing: .06em; margin-bottom: 6px; }
.bv b { font: 500 14px/1 var(--mono); font-stretch: 80%; letter-spacing: -.03em; }
.bv.hr b { color: var(--ok); } .bv.bp b { color: var(--text); } .bv.so b { color: var(--cyan); } .bv.tm b { color: var(--warn); }
.bed-foot { height: 3px; background: rgba(150, 180, 210, .08); }
.bed-foot i { display: block; height: 100%; background: var(--ok); transition: width .5s; }
.bed.flat { border-color: rgba(255, 77, 94, .35); }
.bed.flat .bed-foot i { background: var(--bad); }
.bed.critical .bed-foot i { background: var(--warn); }
.bed.code { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 0 34px -8px var(--blue2); animation: codeglow 1.1s ease-in-out infinite alternate; }
.bed.code .bed-foot i { background: var(--blue); }
@keyframes codeglow { from { box-shadow: 0 0 0 1px var(--blue), 0 0 18px -8px var(--blue2); } to { box-shadow: 0 0 0 1px var(--blue), 0 0 44px -6px var(--blue2); } }
.bed.morgue { opacity: .55; }
.bed.room { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(244, 210, 122, .55), 0 0 40px -14px var(--gold); }
.bed-life { position: absolute; right: 9px; top: 7px; font: 500 11px var(--mono); font-stretch: 85%; color: var(--dim); background: rgba(4, 7, 11, .7); padding: 2px 5px; border-radius: 4px; }
.bed.critical .bed-life { color: var(--warn); }
.bed.flat .bed-life { color: var(--bad); }
.bed.code .bed-life { color: var(--blue); }
.empty { position: relative; display: grid; place-items: center; height: 240px; border: 1px dashed var(--hair2); border-radius: var(--r); overflow: hidden; }
.empty canvas { position: absolute; inset: 0; opacity: .5; }
.empty p { position: relative; color: var(--dim); background: var(--ink); padding: 6px 14px; border-radius: 8px; text-align: center; }

/* the protocol */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.step { position: relative; padding: 24px; border: 1px solid var(--hair); border-radius: var(--r); background: linear-gradient(160deg, var(--panel), var(--deep)); }
.step-no { display: block; font: 500 11px var(--mono); color: var(--ok); margin-bottom: 42px; }
.step p { color: var(--dim); }
.panel { padding: 22px; border: 1px solid var(--hair); border-radius: var(--r); background: var(--deep); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fee { width: 100%; height: auto; margin-top: 14px; }
.fee text { fill: var(--dim); font: 400 11px var(--mono); }
.split { display: flex; height: 34px; gap: 2px; margin: 16px 0 14px; border-radius: 8px; overflow: hidden; }
.split i { display: block; min-width: 2px; }
.split-key { display: grid; gap: 6px; }
.split-key li { display: grid; grid-template-columns: 11px 1fr auto; gap: 10px; align-items: center; font-size: 14px; color: var(--dim); }
.split-key i { width: 11px; height: 11px; border-radius: 3px; }
.split-key b { font: 500 13px var(--mono); }
.honest { border-color: rgba(255, 179, 64, .28); background: linear-gradient(120deg, rgba(255, 179, 64, .05), var(--deep) 60%); }
.honest p { color: #bcc8d4; max-width: 880px; }

/* the prizes */
.funds { display: flex; flex-wrap: wrap; gap: 8px; }
.funds div { padding: 11px 15px; border: 1px solid var(--hair); border-radius: 10px; min-width: 134px; }
.funds dt { color: var(--dim); font: 400 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.funds dd { font: 500 16px/1 var(--mono); font-stretch: 85%; }
.noms { display: grid; grid-template-columns: 5fr 3fr 2fr; gap: 12px; margin-bottom: 12px; }
.nom { padding: 24px; border-radius: var(--r); border: 1px solid rgba(244, 210, 122, .22); background: linear-gradient(170deg, rgba(244, 210, 122, .06), var(--deep) 65%); }
.nom-share { display: block; font: 500 clamp(32px, 4vw, 52px)/1 var(--mono); font-stretch: 80%; letter-spacing: -.05em; color: var(--gold); margin-bottom: 20px; }
.nom p { color: var(--dim); font-size: 14px; }
.plain { display: grid; gap: 9px; margin-bottom: 14px; color: var(--dim); }
.plain li { padding-left: 15px; position: relative; }
.plain li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 1.5px; background: var(--gold); }
.winners { display: grid; gap: 2px; }
.winners a { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 8px; border-radius: 9px; transition: background .15s; }
.winners a:hover { background: var(--panel2); }
.winners img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.winners strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.2; }
.winners em { font-style: normal; color: var(--dim); font-size: 12px; }
.winners b { font: 500 12px var(--mono); color: var(--gold); }

/* the doctors */
.table-wrap { border: 1px solid var(--hair); border-radius: var(--r); overflow-x: auto; margin-bottom: 14px; background: var(--deep); }
.tbl { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.tbl th { text-align: left; color: var(--dim); font: 400 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 13px 16px; border-bottom: 1px solid var(--hair); }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--hair); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-family: var(--mono); font-stretch: 85%; font-size: 13px; }
.tbl a { font-family: var(--mono); font-stretch: 85%; font-size: 13px; }
.tbl a:hover { color: var(--ok); }
.pad { padding: 18px; }

/* a patient */
.patient { max-width: 1560px; margin: 0 auto; padding: 18px 28px 60px; }
.crumbs { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 14px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); }
.bed-no { font: 400 12px var(--mono); }
.pt-head { display: flex; gap: 17px; align-items: flex-start; margin-bottom: 18px; }
.pt-img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; background: var(--panel2); }
.pt-id { min-width: 0; flex: 1; }
.pt-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 11px; margin-bottom: 5px; }
.pt-line h1 { font-weight: 800; font-stretch: 112%; font-size: clamp(24px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.025em; overflow-wrap: anywhere; }
.sym { font: 500 13px var(--mono); color: var(--dim); }
#pAbout { max-width: 760px; margin-bottom: 9px; overflow-wrap: anywhere; }
.pt-links, .pt-social { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 10px; border: 1px solid var(--hair); border-radius: 8px; font-size: 13px; color: var(--dim); transition: color .15s, border-color .15s; }
.chip:hover { color: var(--text); border-color: var(--hair2); }
.chip.mono { font-size: 11px; }
.surgeon { padding: 10px 14px; margin-bottom: 14px; border: 1px solid rgba(255, 77, 94, .4); border-radius: 10px; color: #ffb6bd; background: rgba(255, 77, 94, .07); font-size: 14px; }
.monitor { display: grid; grid-template-columns: minmax(0, 1fr) 256px; border: 1px solid var(--hair2); border-radius: 18px; overflow: hidden; margin-bottom: 14px; background: #04070b; box-shadow: 0 30px 80px -50px rgba(93, 242, 182, .35); }
.screen { position: relative; height: clamp(250px, 34vw, 410px); }
.screen canvas { position: absolute; inset: 0; }
.screen-top { position: absolute; left: 18px; right: 18px; top: 14px; display: flex; gap: 14px; font: 500 11px/1 var(--mono); font-stretch: 90%; color: var(--dim); z-index: 1; }
.screen-status { color: var(--ok); }
.grow { flex: 1; }
.screen-life { color: var(--text); }
.flat-text { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font: 700 clamp(22px, 4vw, 54px)/1 var(--mono); letter-spacing: .1em; color: var(--bad); animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { from { opacity: 1; } to { opacity: .25; } }
.vitals { display: grid; grid-auto-rows: 1fr; border-left: 1px solid var(--hair); }
.v { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 16px; }
.v + .v { border-top: 1px solid var(--hair); }
.v-k { font: 500 11px/1.3 var(--mono); font-stretch: 90%; }
.v-k em { display: block; font-style: normal; font-weight: 400; color: var(--faint); font-size: 9px; }
.v-n { font: 500 clamp(34px, 3.4vw, 50px)/1 var(--mono); font-stretch: 78%; letter-spacing: -.05em; text-align: right; }
.v-n.sm { font-size: clamp(19px, 1.9vw, 27px); letter-spacing: -.04em; padding-block: 9px; }
.v.hr, .v.hr .v-n { color: var(--ok); } .v.bp, .v.bp .v-n { color: #f1f5f9; } .v.spo, .v.spo .v-n { color: var(--cyan); } .v.tmp, .v.tmp .v-n { color: var(--warn); }
.codebox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px; margin-bottom: 14px; border: 1px solid var(--blue); border-radius: var(--r); background: linear-gradient(110deg, rgba(47, 107, 255, .2), var(--deep) 70%); }
.codebox h2 { font-size: clamp(21px, 2.2vw, 30px); margin: 10px 0 5px; }
.code-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.code-stats div { padding: 10px 13px; border: 1px solid var(--hair2); border-radius: 9px; background: rgba(5, 8, 13, .5); min-width: 102px; }
.code-stats dt { color: var(--dim); font: 400 9px/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 7px; }
.code-stats dd { font: 500 16px/1 var(--mono); font-stretch: 85%; }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 14px; align-items: start; }
.pt-col, .pt-side { display: grid; gap: 14px; min-width: 0; }
.curve { height: 8px; border-radius: 5px; background: rgba(150, 180, 210, .1); overflow: hidden; margin-bottom: 18px; }
.curve i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--cyan)); border-radius: 5px; transition: width .5s; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.facts dt { color: var(--dim); font-size: 12px; margin-bottom: 2px; }
.facts dd { font: 500 14px var(--mono); font-stretch: 85%; }
.wide-facts { grid-template-columns: repeat(5, 1fr); margin: 20px 0; }
.log { max-height: 520px; overflow: auto; }
.log li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 11px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.log li:last-child { border-bottom: 0; }
.log i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transform: translateY(-1px); }
.log .buy i { background: var(--ok); } .log .sell i { background: var(--bad); } .log .flat i { background: var(--bad); box-shadow: 0 0 7px var(--bad); } .log .shock i, .log .join i, .log .outcome i { background: var(--blue); box-shadow: 0 0 7px var(--blue); } .log .moved i, .log .full i, .log .discharge i { background: var(--gold); }
.log .what { min-width: 0; overflow-wrap: anywhere; color: var(--dim); }
.log .what b { font-weight: 600; }
.log time { color: var(--faint); font: 400 11px var(--mono); font-stretch: 85%; white-space: nowrap; }
.log a:hover { color: var(--ok); }
.trade { display: grid; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; border: 1px solid var(--hair); }
.seg button { height: 34px; border-radius: 7px; color: var(--dim); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }
#buyPane, #sellPane { display: grid; gap: 11px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.field em { font-style: normal; color: var(--faint); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; background: var(--ink); border: 1px solid var(--hair); border-radius: 9px; color: var(--text); font-size: 14px; outline: 0; resize: vertical; transition: border-color .15s; }
.field input:focus, .field textarea:focus { border-color: var(--hair2); }
.field.slim { grid-template-columns: 1fr 90px; align-items: center; }
.field select { padding: 6px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { flex: 1; text-align: center; }
.warn-text { color: var(--warn); font-size: 13px; }
.people { display: grid; gap: 7px; }
.people li { display: flex; justify-content: space-between; gap: 10px; font: 400 12px var(--mono); font-stretch: 85%; color: var(--dim); }
.people a:hover { color: var(--ok); }
.people .sold { text-decoration: line-through; }
.doc-card { padding: 28px; margin-bottom: 14px; border: 1px solid var(--hair2); border-radius: 18px; background: linear-gradient(130deg, rgba(47, 107, 255, .13), var(--deep) 60%); }
.doc-card h1 { font-size: clamp(14px, 2vw, 22px); margin-bottom: 10px; overflow-wrap: anywhere; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 30px 28px 40px; border-top: 1px solid var(--hair); color: var(--dim); font-size: 13px; }
.foot-mark { display: grid; gap: 3px; }
.foot-mark strong { color: var(--text); font-stretch: 120%; font-weight: 800; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.foot-links a:hover { color: var(--text); }

/* the admission form */
.dlg { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; background: var(--deep); color: var(--text); border: 1px solid var(--hair2); border-radius: 18px; }
.dlg::backdrop { background: rgba(2, 4, 7, .78); backdrop-filter: blur(5px); }
#launchForm { display: grid; gap: 14px; padding: 24px; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dlg-head h2 { font-size: 27px; }
.dlg-head .eyebrow { margin-bottom: 9px; }
.gate { padding: 10px 13px; border-radius: 9px; border: 1px solid rgba(255, 179, 64, .4); color: var(--warn); font-size: 13px; }
.dlg-grid { display: grid; grid-template-columns: 124px 1fr; gap: 14px; }
.dlg-fields { display: grid; gap: 11px; }
.drop { position: relative; display: grid; place-items: center; height: 124px; border: 1px dashed var(--hair2); border-radius: 12px; text-align: center; font-size: 13px; color: var(--dim); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.drop:hover { border-color: var(--ok); }
.drop em { font-style: normal; color: var(--faint); font-size: 12px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dlg-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dlg-terms { display: grid; gap: 5px; color: var(--dim); font-size: 13px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; width: max-content; max-width: min(620px, calc(100vw - 24px)); padding: 11px 16px; border-radius: 11px; background: var(--panel2); color: var(--text); border: 1px solid var(--hair2); box-shadow: 0 24px 50px -18px #000; font-size: 14px; }
.toast a { margin-left: 10px; color: var(--ok); }

.prose { max-width: 820px; }
.prose h2 { margin-bottom: 24px; }
.prose h3 { margin: 28px 0 8px; font-size: 18px; }
.prose p, .prose li { color: #b4c1ce; }
.prose ul { display: grid; gap: 8px; list-style: disc; padding-left: 20px; }
.prose a { color: var(--ok); }

@media (max-width: 1180px) {
  .nav { display: none; }
  .pt-grid { grid-template-columns: 1fr; }
  .noms { grid-template-columns: 1fr 1fr; }
  .nom:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .top { padding: 0 16px; gap: 12px; }
  .brand span { display: none; }
  .bal, #sound { display: none; }
  .band { padding: 52px 16px; }
  .hero { padding: 40px 16px 16px; min-height: 0; }
  .hero-trace { top: 2%; height: 34%; }
  .station { grid-template-columns: repeat(3, 1fr); }
  .st { padding: 12px 13px; }
  .st:nth-child(4) { border-left: 0; }
  .st:nth-child(n+4) { border-top: 1px solid var(--hair); }
  .steps, .grid2 { grid-template-columns: 1fr; }
  .beds { grid-template-columns: 1fr; }
  .search, .search input { width: 100%; }
  .tools { width: 100%; }
  .patient { padding: 14px 16px 48px; }
  .monitor { grid-template-columns: 1fr; }
  .vitals { grid-template-columns: repeat(4, 1fr); border-left: 0; border-top: 1px solid var(--hair); }
  .v { padding: 10px; gap: 8px; }
  .v + .v { border-top: 0; border-left: 1px solid var(--hair); }
  .v-k em { display: none; }
  .v-n { font-size: 25px; text-align: left; }
  .v-n.sm { font-size: 13px; padding: 6px 0; }
  .codebox { grid-template-columns: 1fr; }
  .code-stats { justify-content: flex-start; }
  .code-stats div { flex: 1; min-width: 88px; }
  .facts, .wide-facts { grid-template-columns: repeat(2, 1fr); }
  .alarm { padding: 8px 16px; }
  .pt-head { gap: 12px; }
  .pt-img { width: 62px; height: 62px; }
  .dlg-three { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  #connect { padding: 0 10px; font-size: 13px; }
  #launchBtn { padding: 0 10px; font-size: 13px; }
  .noms { grid-template-columns: 1fr; }
  .funds div { flex: 1; min-width: 118px; }
  .dlg-grid { grid-template-columns: 96px 1fr; }
  .drop { height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* the information, in the ward's own forms */
.k { display: block; color: var(--dim); font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.head-note { max-width: 420px; color: var(--dim); font-size: 15px; }
.fine { color: var(--faint); font-size: 13px; margin: 12px 0 16px; max-width: 900px; }
.fine span { color: var(--dim); }

/* the practice patient */
.sim { border: 1px solid var(--hair2); border-radius: 18px; overflow: hidden; background: #04070b; box-shadow: 0 30px 80px -55px rgba(93, 242, 182, .5); }
.rail { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--hair); }
.rail li { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: var(--faint); font: 500 11px/1.1 var(--mono); font-stretch: 88%; border-left: 1px solid var(--hair); transition: color .2s, background .2s; }
.rail li:first-child { border-left: 0; }
.rail i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; opacity: .45; }
.rail li.done { color: var(--dim); }
.rail li.on { color: var(--text); background: rgba(150, 180, 210, .06); }
.rail li.on i { opacity: 1; box-shadow: 0 0 9px currentColor; }
.rail li.on[data-p=stable] { color: var(--ok); } .rail li.on[data-p=critical] { color: var(--warn); } .rail li.on[data-p=flat] { color: var(--bad); } .rail li.on[data-p=crew], .rail li.on[data-p=watch] { color: var(--blue); } .rail li.on[data-p=end] { color: var(--gold); }
.sim-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; }
.sim-screen { position: relative; height: 320px; }
.sim-screen canvas { position: absolute; inset: 0; }
.sim-life { position: absolute; left: 18px; right: 18px; bottom: 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; font: 500 11px/1 var(--mono); color: var(--dim); z-index: 1; }
.sim-life b { color: var(--text); font-weight: 500; font-size: 13px; min-width: 38px; text-align: right; }
.sim-bar { height: 5px; border-radius: 3px; background: rgba(150, 180, 210, .12); overflow: hidden; }
.sim-bar i { display: block; height: 100%; background: var(--ok); transition: width .25s linear, background .2s; }
.sim-side { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-left: 1px solid var(--hair); background: var(--deep); }
.sim-side h3 { font-size: 21px; font-stretch: 108%; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.sim-side .sub { min-height: 66px; }
.sim-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sim-counts div { padding: 9px 10px; border: 1px solid var(--hair); border-radius: 8px; }
.sim-counts dt { color: var(--faint); font: 400 9px/1.2 var(--mono); margin-bottom: 7px; }
.sim-counts dd { font: 500 15px/1 var(--mono); font-stretch: 85%; color: var(--blue); }
.sim-do { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sim-do .btn { flex: 1; }

.dose { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 12px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; }
.dose div { padding: 12px 14px; background: var(--deep); }
.dose dt { color: var(--faint); font-size: 12px; line-height: 1.25; margin-bottom: 7px; }
.dose dd { font: 500 13px/1.1 var(--mono); font-stretch: 85%; }

/* anti-snipe */
.sedate, .lab { padding: 24px; border: 1px solid var(--hair); border-radius: var(--r); background: var(--deep); }
.sedate .eyebrow, .lab .eyebrow, .consent .eyebrow, .recov .eyebrow, .criteria .eyebrow { margin-bottom: 9px; }
.sedate h3, .lab h3, .consent h3 { font-size: 21px; font-stretch: 108%; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.sedate-main { display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: end; margin: 20px 0 16px; }
.sedate-read b { display: block; font: 500 58px/1 var(--mono); font-stretch: 76%; letter-spacing: -.06em; color: var(--blue); transition: color .3s; }
.sedate-read span { color: var(--dim); font: 400 11px var(--mono); font-stretch: 88%; }
.sedate-cols { display: flex; align-items: flex-end; gap: 3px; height: 112px; }
.sedate-cols i { flex: 1; min-height: 4px; border-radius: 2px 2px 0 0; background: rgba(110, 160, 255, .2); transition: background .25s; }
.sedate-cols i.past { background: rgba(110, 160, 255, .42); }
.sedate-cols i.on { background: var(--blue); box-shadow: 0 0 16px var(--blue); }
.sedate-cols i.done { background: rgba(93, 242, 182, .25); }
.sedate-cols i.done.on { background: var(--ok); box-shadow: 0 0 16px var(--ok); }

/* the lab form */
.lab-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.lab-vol { display: grid; gap: 5px; color: var(--faint); font: 400 10px var(--mono); }
.lab-vol input { width: 112px; padding: 7px 9px; background: var(--ink); border: 1px solid var(--hair2); border-radius: 7px; font: 500 13px var(--mono); text-align: right; outline: 0; }
.lab-vol input:focus { border-color: var(--ok); }
.lab-tbl { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 14px; }
.lab-tbl th { padding: 0 0 8px; color: var(--faint); font: 400 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--hair2); }
.lab-tbl td { padding: 10px 0; border-bottom: 1px dashed var(--hair); }
.lab-tbl .num { text-align: right; font: 500 13px var(--mono); font-stretch: 85%; white-space: nowrap; }
.lab-tbl td:first-child { color: #c3cfda; }
.lab-tbl .gauge { width: 42%; padding-inline: 16px; }
.lab-tbl .gauge div { height: 6px; background: rgba(150, 180, 210, .09); border-radius: 3px; }
.lab-tbl .gauge i { display: block; height: 100%; border-radius: 3px; }

/* consent */
.consent { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; padding: 24px; border: 1px solid rgba(255, 179, 64, .28); border-radius: var(--r); background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(255, 179, 64, .035) 31px 32px), var(--deep); }
.consent ol { counter-reset: c; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.consent li { counter-increment: c; position: relative; padding-left: 28px; color: #bcc8d4; font-size: 14px; }
.consent li::before { content: counter(c); position: absolute; left: 0; top: 1px; width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid rgba(255, 179, 64, .55); border-radius: 4px; color: var(--warn); font: 500 10px var(--mono); }
.consent a { color: var(--warn); text-decoration: underline; text-underline-offset: 2px; }

/* rounds */
.rounds { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px; margin-bottom: 12px; }
.rounds-clock, .drip { padding: 22px 24px; border: 1px solid var(--hair); border-radius: var(--r); background: var(--deep); }
.rounds-clock b { display: block; margin-top: 12px; font: 500 clamp(44px, 6.4vw, 92px)/1 var(--mono); font-stretch: 76%; letter-spacing: -.06em; color: var(--gold); }
.drip { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.drip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.drip-head b { font: 500 24px/1 var(--mono); font-stretch: 80%; letter-spacing: -.04em; color: var(--ok); }
.drip-tube { position: relative; height: 22px; border: 1px solid var(--hair2); border-radius: 11px; overflow: hidden; }
.drip-tube i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(93, 242, 182, .28), var(--ok)); transition: width .6s; }
.drip-mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--gold); }
.noms { grid-template-columns: 5fr 3fr 2fr; }
.nom h3 { font-size: 19px; font-weight: 700; font-stretch: 105%; }
.index { display: flex; gap: 3px; margin-top: 18px; }
.index span:nth-child(1) { flex-grow: 40; } .index span:nth-child(2) { flex-grow: 30; } .index span:nth-child(3) { flex-grow: 20; } .index span:nth-child(4) { flex-grow: 10; }
.index span { flex-basis: 0; flex-shrink: 1; min-width: 0; padding-top: 8px; border-top: 3px solid var(--gold); color: var(--dim); font-size: 12px; line-height: 1.25; }
.index span:nth-child(2) { border-color: rgba(244, 210, 122, .72); } .index span:nth-child(3) { border-color: rgba(244, 210, 122, .46); } .index span:nth-child(4) { border-color: rgba(244, 210, 122, .26); }
.index b { display: block; color: var(--gold); font: 500 13px var(--mono); }
.grid3 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); gap: 12px; }
.rx, .criteria, .recov { padding: 24px; border: 1px solid var(--hair); border-radius: var(--r); background: var(--deep); }
.rx { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
.rx-mark { font: 500 46px/1 Georgia, 'Times New Roman', serif; color: var(--gold); }
.rx ul { display: grid; gap: 13px; }
.rx li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--hair); }
.rx li:last-child { border-bottom: 0; padding-bottom: 0; }
.rx li > b { font: 500 15px var(--mono); font-stretch: 85%; color: var(--gold); }
.rx em { display: block; font-style: normal; color: var(--dim); font-size: 13px; }
.rx i { font-style: normal; font-weight: 600; }
.criteria ul { display: grid; gap: 9px; margin-bottom: 14px; }
.criteria li { position: relative; padding-left: 25px; font-size: 14px; color: #c3cfda; }
.criteria li::before { content: ''; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border: 1px solid var(--hair2); border-radius: 3px; }
.criteria li::after { content: ''; position: absolute; left: 5px; top: 4px; width: 5px; height: 9px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(42deg); }

/* doctors */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; position: relative; }
.ladder::before { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: linear-gradient(90deg, var(--hair2), var(--blue)); }
.ladder li { position: relative; padding: 20px 14px 0 0; }
.ladder li::before { content: ''; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--blue); }
.ladder li:last-child::before { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.ladder b { display: block; font-size: 16px; font-weight: 700; font-stretch: 105%; }
.ladder span { color: var(--dim); font-size: 13px; }
.badge { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 16px 20px; margin-bottom: 12px; border: 1px solid rgba(110, 160, 255, .45); border-radius: var(--r); background: linear-gradient(100deg, rgba(47, 107, 255, .16), var(--deep) 70%); }
.badge-id b { display: block; margin: 8px 0 3px; font-size: 20px; font-weight: 700; font-stretch: 108%; }
.badge-id .mono { font-size: 12px; }
.badge-nums { display: flex; gap: 22px; }
.badge-nums dt { color: var(--dim); font-size: 12px; margin-bottom: 3px; }
.badge-nums dd { font: 500 18px/1 var(--mono); font-stretch: 85%; }
.sign { display: block; width: 104px; height: 22px; }
.sign.big { width: 100%; height: 44px; }
.sign path { fill: none; stroke: var(--ok); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.roster { min-width: 780px; }
.roster td:nth-child(4) { color: var(--dim); }

@media (max-width: 1180px) {
  .sim-body { grid-template-columns: 1fr; }
  .sim-side { border-left: 0; border-top: 1px solid var(--hair); }
  .sim-side .sub { min-height: 0; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .rx { grid-column: 1 / -1; }
  .consent { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 860px) {
  .rail { grid-template-columns: repeat(6, minmax(92px, 1fr)); overflow-x: auto; }
  .rail li { padding: 10px; }
  .sim-screen { height: 230px; }
  .rounds, .grid3, .consent ol { grid-template-columns: 1fr; }
  .sedate-main { grid-template-columns: 1fr; }
  .badge { grid-template-columns: 1fr; gap: 12px; }
  .ladder li { padding-right: 6px; }
  .ladder b { font-size: 14px; }
  .index { flex-wrap: wrap; }
  .index span { flex: 1 1 42%; }
  .lab-tbl .gauge { display: none; }
  .lab-tbl th:nth-child(3) { display: none; }
}
.tbl th.num { font: 400 10px var(--mono); }
@media (max-width: 1180px) { .dose { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .dose { grid-template-columns: repeat(2, 1fr); } }
