:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #15202b;
  --muted: #56636f;
  --line: #dde3e9;
  --accent: #0a7a57;
  --accent-ink: #ffffff;
  --mon: #0b0f14;
  --hr: #1f9e33;
  --spo2: #138a96;
  --abp: #d23b3b;
  --rr: #a3870c;
  --co2: #3c4752;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --card: #151c24;
    --text: #e5eaef;
    --muted: #9aa7b3;
    --line: #26313c;
    --accent: #23a77b;
    --hr: #3ddc4c;
    --spo2: #2fd1e0;
    --abp: #ff6060;
    --rr: #f4d13d;
    --co2: #eef2f6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

.preview-banner { background: #f4d13d; color: #1a1a1a; text-align: center; font-size: 13px; padding: 4px 16px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 50%; }
.site-head nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--text); }
.site-head nav .nav-cta { color: var(--accent-ink); background: var(--accent); padding: 7px 14px; border-radius: 8px; font-weight: 600; }
.site-head nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 12px 20px; border-radius: 10px; font-weight: 650; }
.btn:hover { filter: brightness(1.08); }
button.btn { font: inherit; font-weight: 650; cursor: pointer; }
.btn-quiet { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 22px 0 6px; }
.cta-note { color: var(--muted); font-size: 14px; }

/* Home hero */
.hero { padding: 44px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero .lede { font-size: 19px; color: var(--muted); margin: 0; }
.devices { position: relative; padding-bottom: 8%; }
.tablet { border: 12px solid #1c232b; border-radius: 22px; background: var(--mon); box-shadow: 0 18px 50px rgba(10, 20, 30, 0.28); overflow: hidden; }
.tablet img { display: block; width: 100%; }
.phone { position: absolute; right: -2%; bottom: 0; width: 27%; border: 6px solid #1c232b; border-radius: 20px; background: var(--mon); box-shadow: 0 14px 34px rgba(10, 20, 30, 0.35); overflow: hidden; }
.phone img { display: block; width: 100%; }

/* Sections */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
.section > .wrap > p.intro { color: var(--muted); max-width: 720px; margin: 0 0 24px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; color: var(--text); text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .tag { display: inline-block; font-size: 12.5px; color: var(--accent); font-weight: 650; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 32px; padding: 0; margin: 0; list-style: none; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.video { position: relative; display: block; max-width: 760px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 0; padding: 0; cursor: pointer; width: 100%; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video span { position: absolute; inset: 0; display: grid; place-items: center; }
.video span::before { content: ""; width: 74px; height: 52px; border-radius: 14px; background: rgba(0, 0, 0, 0.72); }
.video span::after { content: ""; position: absolute; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { color: var(--muted); margin: 8px 0 0; }

/* Article pages: one column width for text, tables and cards alike */
.page { padding: 36px 0 48px; }
.page > .wrap, .page .wrap { max-width: 860px; }
.page .narrow:not(.wrap) { max-width: none; }
.crumbs { font-size: 14px; margin: 0 0 6px; }
.page h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.015em; }
.page .lede { font-size: 19px; color: var(--muted); }
.page h2 { font-size: 25px; margin: 36px 0 10px; line-height: 1.25; }
.page h3 { font-size: 19px; margin: 24px 0 6px; }
.page li { margin: 4px 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 20px 0; }
.box h2, .box h3 { margin-top: 0; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.brief dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.brief dt { font-weight: 650; }
.brief dd { margin: 0; color: var(--muted); }

.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.vitals { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15.5px; }
.vitals th, .vitals td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.vitals tr:last-child td { border-bottom: 0; }
.vitals thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.vitals td.n { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.vitals .c-hr { color: var(--hr); }
.vitals .c-spo2 { color: var(--spo2); }
.vitals .c-abp { color: var(--abp); }
.vitals .c-rr { color: var(--rr); }
.vitals .c-co2 { color: var(--co2); }
.vitals th[scope="row"] { min-width: 150px; }
.vitals small { display: block; font-weight: 400; color: var(--muted); }
.table-note { font-size: 14px; color: var(--muted); margin-top: -6px; }

/* Comparison table */
.compare { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
.compare th, .compare td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.compare th[scope="row"] { min-width: 170px; }
.compare tr.us { background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* Rhythm library */
.rhythm-group h2 { margin-top: 40px; }
.rhythm { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rhythm img { width: 100%; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.rhythm h3 { margin: 0 0 4px; font-size: 19px; }
.rhythm p { margin: 0; color: var(--muted); font-size: 15.5px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 16px 0 0; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: 14.5px; color: var(--text); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 44px; color: var(--muted); font-size: 14.5px; background: var(--card); }
.site-foot p { margin: 4px 0; }
.foot-links a { color: var(--muted); }
.updated { font-weight: 600; color: var(--text); }
.disclaimer { font-size: 13px; }

@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .rhythm { grid-template-columns: 1fr; gap: 10px; }
  .tablet { border-width: 8px; border-radius: 16px; }
  .phone { border-width: 4px; border-radius: 14px; }
}
@media (max-width: 640px) {
  /* The vitals table becomes one card per phase. */
  .table-scroll { overflow: visible; border: 0; background: none; }
  .vitals { min-width: 0; }
  .vitals thead { display: none; }
  .vitals, .vitals tbody, .vitals tr { display: block; }
  .vitals tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 6px; }
  .vitals th, .vitals td { border: 0; padding: 0; }
  .vitals th[scope="row"] { grid-column: 1 / -1; min-width: 0; font-size: 16.5px; }
  .vitals td[data-label="Rhythm"], .vitals td[data-label="Change over"] { grid-column: 1 / -1; font-size: 15px; }
  .vitals td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  .vitals td.n { font-size: 19px; }
  .table-note { margin-top: 4px; }
  .compare { min-width: 0; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr { display: block; }
  .compare tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .compare tr.us { border-color: var(--accent); background: var(--card); }
  .compare th, .compare td { border: 0; padding: 0; }
  .compare th[scope="row"] { grid-column: 1 / -1; min-width: 0; font-size: 17px; }
  .compare td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
}
@media (max-width: 560px) {
  .site-head nav { gap: 14px; font-size: 14.5px; width: 100%; }
  .site-head nav .nav-cta { margin-left: auto; padding: 6px 12px; }
  .brief dl { grid-template-columns: 1fr; }
  .brief dd { margin-bottom: 6px; }
}

/* Printing a scenario: the facilitator's copy, without site chrome. */
@media print {
  .preview-banner, .site-head, .site-foot, .cta-row, .crumbs, .faq { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; }
  .box, .table-scroll { border-color: #999; }
  .vitals td.n { color: #000 !important; }
  h2 { break-after: avoid; }
  tr, .box { break-inside: avoid; }
}

/* Rhythm strip practice */
.method ol { margin: 0; padding-left: 22px; }
.method li { margin: 6px 0; }
.quiz-score { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 0; margin-top: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.quiz-score .btn { padding: 6px 12px; font-size: 14px; }
.quiz-item { padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.quiz-item h2 { font-size: 19px; margin: 0 0 10px; }
.quiz-item img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 8px; }
.quiz-options button { font: inherit; font-size: 15.5px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.quiz-options button:hover:not(:disabled) { border-color: var(--accent); }
.quiz-options button:disabled { cursor: default; opacity: 0.6; }
.quiz-options button.right { opacity: 1; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.quiz-options button.right::after { content: "  ✓"; color: var(--accent); font-weight: 700; }
.quiz-options button.wrong { opacity: 1; border-color: var(--abp); box-shadow: inset 0 0 0 1px var(--abp); }
.quiz-answer summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; }
.quiz-answer dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 8px 0; font-size: 15.5px; }
.quiz-answer dt { font-weight: 650; }
.quiz-answer dd { margin: 0; color: var(--muted); }
.quiz-verdict { margin: 8px 0 0; }
@media (max-width: 560px) {
  .quiz-options { grid-template-columns: 1fr; }
}
@media print {
  .quiz-options, .quiz-answer, .quiz-score { display: none !important; }
  .quiz-item { break-inside: avoid; padding: 8px 0; }
}
