/* MediCare HMS - ECG chart paper, ID badges, triage colours.
   Fonts: Bricolage Grotesque (headings), Public Sans (text). */
:root {
  --paper: #f6f8fa; --surface: #ffffff; --surface-2: #eef2f6;
  --ink: #0f1f2e; --muted: #566677; --line: #d9e0e7; --line-soft: #e8edf2;
  --navy: #10263a;
  --signal: #d6303e; --signal-ink: #ffffff;
  --blue: #1f6fb2; --green: #168a57; --amber: #b86e00;
  --blue-bg: #e3f0fb; --green-bg: #dff3e9; --amber-bg: #fbeed6; --red-bg: #fbe3e5; --slate-bg: #e8edf2;
  --grid-minor: rgba(214, 48, 62, .075); --grid-major: rgba(214, 48, 62, .17);
  --shadow: 0 1px 2px rgba(15, 31, 46, .06), 0 14px 30px -18px rgba(15, 31, 46, .35);
  --r-s: 6px; --r-m: 10px; --r-l: 18px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #0a1520; --surface: #112130; --surface-2: #162a3b;
  --ink: #e8eff6; --muted: #8fa3b6; --line: #223a50; --line-soft: #1a3043;
  --signal: #ff5a66; --signal-ink: #1a0508;
  --blue: #5aa9ec; --green: #4cc789; --amber: #f0a73a;
  --blue-bg: #14324b; --green-bg: #12362a; --amber-bg: #3a2b0e; --red-bg: #3d1a20; --slate-bg: #1b2f42;
  --grid-minor: rgba(255, 90, 102, .07); --grid-major: rgba(255, 90, 102, .15);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 30px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: .88rem; }
.nowrap { white-space: nowrap; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.icon { flex: none; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--signal); color: var(--signal-ink); }
.brand-name { font: 800 1.3rem var(--display); letter-spacing: -.03em; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { position: relative; padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .94rem; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 3px; background: var(--signal); border-radius: 3px 3px 0 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.menu-btn { display: none; }
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: inline-flex; }
[data-theme="dark"] .only-light { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 9px; border: 1px solid transparent; font: 700 .95rem var(--body); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--signal); color: var(--signal-ink); box-shadow: 0 8px 20px -10px var(--signal); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--navy); color: #fff; }
.btn-signal { background: var(--signal); color: var(--signal-ink); }
.btn-signal:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
[data-theme="dark"] .btn-primary { background: var(--signal); color: var(--signal-ink); }
[data-theme="dark"] .btn-primary:hover { background: #fff; color: var(--navy); }
.tlink { background: none; border: 0; padding: 0; color: var(--blue); font: 600 .88rem var(--body); cursor: pointer; text-decoration: none; }
.tlink:hover { color: var(--signal); text-decoration: underline; }
.tlink.danger { color: var(--signal); }
.tlink.danger:hover { text-decoration: underline; }

/* ---------- hero (ECG chart paper) ---------- */
.hero { position: relative; overflow: hidden; padding-top: 64px; border-bottom: 1px solid var(--line); background: var(--paper); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px), linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 19.2px 19.2px, 19.2px 19.2px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(#000 55%, rgba(0,0,0,.35)); mask-image: linear-gradient(#000 55%, rgba(0,0,0,.35)); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(2.7rem, 6.2vw, 5rem); font-weight: 800; line-height: .98; letter-spacing: -.045em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 120ms + 120ms); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; margin-top: 22px; }
.hero-in { opacity: 0; animation: fade .7s ease forwards; animation-delay: calc(var(--i) * 120ms + 200ms); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 38px 0 0; }
.hero-facts > div { display: flex; flex-direction: column-reverse; }
.hero-facts dt { color: var(--muted); font-size: .86rem; }
.hero-facts dd { margin: 0; font: 800 1.9rem/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-visual { display: flex; justify-content: center; padding: 8px 0 24px; }
.hero-visual .idcard { transform-origin: 50% 0; animation: swing 1.6s cubic-bezier(.2, .7, .2, 1) .5s both; }
.ecg { position: relative; height: 150px; margin-top: 8px; }
.ecg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ecg path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ecg-base { opacity: .16; }
.ecg-pulse { stroke: var(--signal) !important; stroke-width: 3 !important; stroke-dasharray: 38 62; stroke-dashoffset: 38; animation: sweep 3.8s linear infinite; filter: drop-shadow(0 0 5px var(--signal)); }
.ecg-flat { height: 40px; margin-bottom: 24px; }
.book-ecg { height: 90px; margin-top: 28px; position: relative; }
.book-ecg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.book-ecg path { fill: none; stroke: var(--signal); stroke-width: 2.6; stroke-dasharray: 38 62; stroke-dashoffset: 38; animation: sweep 3.8s linear infinite; }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes swing { 0% { transform: rotate(-7deg) translateY(-14px); opacity: 0; } 35% { opacity: 1; } 55% { transform: rotate(3deg); } 75% { transform: rotate(-1.4deg); } 100% { transform: rotate(0); opacity: 1; } }
@keyframes sweep { from { stroke-dashoffset: 38; } to { stroke-dashoffset: -100; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- ID badge (doctor card) ---------- */
.idcard { width: 100%; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.idcard-head { position: relative; background: var(--navy); color: #fff; padding: 26px 16px 10px; text-align: center; }
.idslot { position: absolute; top: 9px; left: 50%; width: 52px; height: 8px; margin-left: -26px; border-radius: 8px; background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45); }
.idbrand { font: 700 .82rem var(--display); letter-spacing: .02em; opacity: .9; }
.idphoto { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; display: block; background: var(--surface-2); }
.idphoto-empty { display: grid; place-items: center; font: 800 5rem var(--display); color: var(--signal); }
.idbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.idbody h3 { font-size: 1.35rem; letter-spacing: -.03em; }
.idrole { color: var(--signal); font-weight: 700; font-size: .95rem; }
.idfacts { margin: 0; display: grid; gap: 6px; }
.idfacts > div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.idfacts dt { color: var(--muted); }
.idfacts dd { margin: 0; font-weight: 600; text-align: right; }
.idbio { font-size: .9rem; color: var(--muted); }
.idcode { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.barcode { flex: 1; height: 28px; opacity: .8; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 15px); }
.idnum { font: 700 .8rem var(--body); color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.idactions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.idactions form { margin: 0; }
.idgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 300px)); gap: 28px; margin-top: 8px; }

/* ---------- landing sections ---------- */
.section { padding: 84px 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 60ch; }
.section-head p { color: var(--muted); margin-top: 10px; }
.section-head.row-between { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.caps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.cap { display: flex; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.cap-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--red-bg); color: var(--signal); }
.cap h3 { margin-bottom: 6px; }
.cap p { color: var(--muted); max-width: 46ch; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; counter-reset: none; }
.flow::before { content: ""; position: absolute; top: 21px; left: 44px; right: 44px; border-top: 2px dashed var(--line); }
.flow li { position: relative; }
.flow-n { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 1.1rem var(--display); margin-bottom: 18px; box-shadow: 0 0 0 6px var(--surface); }
.flow h3 { margin-bottom: 8px; }
.flow p { color: var(--muted); max-width: 34ch; }
.roster { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.roster li { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.roster img, .roster-initial { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2); }
.roster-initial { display: grid; place-items: center; font: 800 1.5rem var(--display); color: var(--signal); }
.roster-text { display: flex; flex-direction: column; margin-right: auto; }
.roster-text strong { font: 700 1.1rem var(--display); letter-spacing: -.02em; }
.roster-text span { color: var(--muted); font-size: .92rem; }
.roster-empty { color: var(--muted); }
.cta-band { background: var(--navy); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band p { color: #b6c6d6; margin-top: 8px; }

/* ---------- inner pages ---------- */
.page { padding-top: 40px; padding-bottom: 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-sub { color: var(--muted); margin-top: 8px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 1.1rem; letter-spacing: -.01em; }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.panel .table-wrap { margin: 0 -22px -10px; }
.table-panel .table-wrap { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .82rem; font-weight: 700; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: .94rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty-block { grid-column: 1 / -1; color: var(--muted); padding: 30px 0; }
.row-actions { display: flex; gap: 16px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.row-actions form { margin: 0; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; max-width: 520px; }
.toolbar input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; background: var(--surface); }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
[data-theme="dark"] .chip.on { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; background: var(--slate-bg); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-scheduled, .b-outpatient { background: var(--blue-bg); color: var(--blue); }
.b-completed, .b-discharged, .b-paid { background: var(--green-bg); color: var(--green); }
.b-admitted { background: var(--red-bg); color: var(--signal); }
.b-pending { background: var(--amber-bg); color: var(--amber); }
.b-cancelled { background: var(--slate-bg); color: var(--muted); }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 20px; overflow: hidden; }
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi-icon { color: var(--muted); margin-bottom: 8px; }
.kpi-value { font: 800 1.9rem/1.1 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--muted); font-size: .86rem; }
.kpi-signal .kpi-value, .kpi-signal .kpi-icon { color: var(--signal); }
.kpi-amber .kpi-value, .kpi-amber .kpi-icon { color: var(--amber); }
.kpi-green .kpi-value { color: var(--green); }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-grid-wide { grid-template-columns: 1.6fr 1fr; }
.dash-grid-even { grid-template-columns: 1fr 1fr; margin-top: 20px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: end; height: 230px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; height: 100%; text-align: center; }
.bar-count { font: 700 .95rem var(--display); font-variant-numeric: tabular-nums; }
.bar-track { display: flex; align-items: flex-end; justify-content: center; background: repeating-linear-gradient(0deg, transparent 0 24px, var(--line-soft) 24px 25px); border-radius: 6px; }
.bar-fill { display: block; width: 100%; min-height: 4px; background: var(--navy); border-radius: 6px 6px 0 0; transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
[data-theme="dark"] .bar-fill { background: var(--blue); }
.bar-today .bar-fill { background: var(--signal); }
.bar-label { font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.bar-label small { display: block; font-weight: 500; opacity: .8; }
.stack { display: flex; gap: 3px; height: 16px; border-radius: 8px; overflow: hidden; margin: 8px 0 20px; background: var(--surface-2); }
.seg { display: block; min-width: 8px; }
.seg-outpatient, .dot-outpatient { background: var(--blue); }
.seg-admitted, .dot-admitted { background: var(--signal); }
.seg-discharged, .dot-discharged { background: var(--green); }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.legend strong { margin-left: auto; font: 800 1.1rem var(--display); }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.people li:first-child { border-top: 0; padding-top: 0; }
.people li > div { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.people a { text-decoration: none; }
.avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red-bg); color: var(--signal); font: 800 1rem var(--display); }
.avatar-lg { width: 72px; height: 72px; font-size: 1.9rem; }
.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-main { margin-right: auto; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 28px; margin: 0; }
.facts dt { color: var(--muted); font-size: .84rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.facts-wide { grid-column: 1 / -1; }

/* forms */
.form { display: grid; gap: 26px; max-width: 760px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
legend { padding: 0; margin-bottom: 12px; font: 700 1.05rem var(--display); letter-spacing: -.01em; float: left; width: 100%; }
legend + * { clear: both; }
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted); align-content: start; }
.span-2 { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 11px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: 400 .96rem var(--body); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-note { color: var(--muted); font-size: .9rem; }
.flashes { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); font-weight: 600; margin-bottom: 8px; transition: opacity .4s ease, transform .4s ease; animation: fade .3s ease both; }
.flash.success { border-left-color: var(--green); }
.flash.error { border-left-color: var(--signal); background: var(--red-bg); }
.flash.hide { opacity: 0; transform: translateY(-6px); }

/* booking page */
.book { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
.book-aside { position: sticky; top: 100px; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .35em; width: 7px; height: 12px; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.notfound { max-width: 640px; padding-top: 80px; }
.notfound .lead { margin-top: 14px; }

/* footer */
.footer { background: var(--navy); color: #b6c6d6; padding: 40px 0 32px; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 48px; align-items: start; }
.footer .brand-name { color: #fff; }
.footer p { margin-top: 8px; max-width: 44ch; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.footer a { color: #d7e3ee; text-decoration: none; font-weight: 600; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-note { grid-column: 1 / -1; font-size: .86rem; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 18px; max-width: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { justify-content: flex-start; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(3n) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .dash-grid, .dash-grid-wide, .dash-grid-even { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; gap: 28px; }
  .book-aside { position: static; }
  .caps { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow::before { display: none; }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav-cta { display: none; }
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; margin: 0; }
  .nav-links.open { display: flex; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--surface-2); }
  .nav-inner { justify-content: space-between; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .section { padding: 60px 0; }
  fieldset { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .kpis, .kpis-3 { grid-template-columns: 1fr 1fr; }
  .kpi { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
  .roster li { flex-wrap: wrap; }
  .bars { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-title .line > span { transform: none; }
  .hero-in { opacity: 1; }
  .ecg-pulse, .book-ecg path { stroke-dasharray: none; }
}
