@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-latin-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #14303C;
  --ink-70: #4a616b;
  --ink-50: #78888f;
  --paper: #F5F8F7;
  --white: #ffffff;
  --pulse: #D9463C;
  --pulse-dark: #b8352c;
  --sage: #2F8F6B;
  --sage-light: #e6f2ed;
  --line: #dde5e4;
  --shadow: 0 1px 2px rgba(20, 48, 60, .06), 0 4px 16px rgba(20, 48, 60, .06);
  --radius: 12px;
  --wrap: 1080px;

  --c-hipotension: #3b82f6;
  --c-optima: #16a34a;
  --c-normal: #65a30d;
  --c-normal-alta: #eab308;
  --c-hta-1: #f97316;
  --c-hta-2: #dc2626;
  --c-hta-3: #991b1b;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Archivo', 'Public Sans', sans-serif;
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); margin-top: 0; }
h3 { font-size: 1.16rem; }

p { margin: 0 0 1.1em; }
a { color: var(--pulse); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--pulse-dark); }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.wrap-narrow { max-width: 760px; }

.section { padding-top: 44px; padding-bottom: 44px; }
.section-tight { padding-top: 28px; padding-bottom: 28px; }
.section-white { background: var(--white); }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand svg { color: var(--pulse); flex: none; }

.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-70);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current] { color: var(--pulse); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--ink);
}

.mini-check { display: none; gap: 6px; align-items: center; margin-left: 8px; }
.mini-check input {
  width: 62px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: .9rem;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
}
.mini-check .sep { color: var(--ink-50); font-weight: 600; }
.mini-check button {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--pulse);
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.mini-check button:hover { background: var(--pulse-dark); }

@media (min-width: 900px) {
  .mini-check { display: flex; }
}
@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 14px;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .97rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--pulse); color: #fff; }
.btn-primary:hover { background: var(--pulse-dark); color: #fff; }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-50); color: var(--ink); }
.btn-block { width: 100%; }

.bp-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-field { display: flex; flex-direction: column; gap: 5px; }
.bp-field label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-50);
}
.bp-field input {
  width: 104px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  background: var(--white);
  color: var(--ink);
}
.bp-field input:focus { outline: 2px solid var(--pulse); outline-offset: 1px; }
.bp-slash {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink-50);
  padding-bottom: 10px;
}

.hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding-top: 46px;
  padding-bottom: 46px;
}
.hero p.lead { font-size: 1.12rem; color: var(--ink-70); max-width: 62ch; }

.ecg {
  display: block;
  width: 100%;
  height: 40px;
  margin: 18px 0 4px;
  color: var(--pulse);
  opacity: .85;
}
.ecg path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ecg-draw 3.4s ease-out forwards;
}
@keyframes ecg-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ecg path { animation: none; stroke-dashoffset: 0; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
}
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }

.cat-hipotension { background: var(--c-hipotension); }
.cat-optima      { background: var(--c-optima); }
.cat-normal      { background: var(--c-normal); }
.cat-normal-alta { background: var(--c-normal-alta); color: var(--ink); }
.cat-hta-1       { background: var(--c-hta-1); }
.cat-hta-2       { background: var(--c-hta-2); }
.cat-hta-3       { background: var(--c-hta-3); }

.reading-hero { background: var(--white); border-bottom: 1px solid var(--line); padding-top: 34px; padding-bottom: 34px; }
.reading-value {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0 0 4px;
}
.reading-value .unit { font-size: .3em; font-weight: 600; color: var(--ink-50); letter-spacing: 0; }
.reading-spoken { color: var(--ink-70); margin-bottom: 14px; }

.alert {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
  border-left: 4px solid;
  font-size: .97rem;
}
.alert strong { display: block; margin-bottom: 3px; }
.alert-emergency { background: #fef2f2; border-color: var(--c-hta-3); color: #7f1d1d; }
.alert-warn { background: #fffbeb; border-color: var(--c-hta-1); color: #7c2d12; }
.alert-info { background: var(--sage-light); border-color: var(--sage); color: #14532d; }
.alert a { color: inherit; }

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.metric-label {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-50);
  margin-bottom: 6px;
}
.metric-value {
  font-family: 'Archivo', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.metric-value .unit { font-size: .5em; font-weight: 600; color: var(--ink-50); }
.metric-note { font-size: .88rem; color: var(--ink-70); margin-top: 6px; line-height: 1.45; }

.metric-highlight { border-color: var(--pulse); border-width: 2px; }

.chart {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  overflow: hidden;
}
.chart h3 { margin-bottom: 4px; }
.chart .chart-note { font-size: .89rem; color: var(--ink-70); margin: 0 0 12px; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 20px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps li strong:first-child { display: block; margin-bottom: 2px; }

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-50);
  flex: none;
}
.faq details[open] summary::after { content: '\2013'; }
.faq .faq-body { padding: 0 18px 16px; color: var(--ink-70); }
.faq .faq-body p:last-child { margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 600;
}
.chip:hover { border-color: var(--ink-50); color: var(--ink); }
.chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.table-scroll { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .95rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-weight: 700; background: var(--paper); font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }

.article-body { font-size: 1.05rem; }
.article-body h2 { margin-top: 1.9em; }
.article-body h3 { margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  background: var(--sage-light);
  border-left: 4px solid var(--sage);
  border-radius: 0 8px 8px 0;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.byline {
  font-size: .88rem;
  color: var(--ink-50);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 26px;
}
.sources {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 36px;
  font-size: .92rem;
}
.sources h2 { font-size: 1.05rem; margin-bottom: .7em; }
.sources ul { margin: 0; padding-left: 1.2em; }
.sources li { margin-bottom: .45em; color: var(--ink-70); }

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s;
}
.article-card:hover { border-color: var(--ink-50); color: var(--ink); }
.article-card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; background: var(--line); }
.article-card .body { padding: 16px 18px 18px; }
.article-card h3 { font-size: 1.04rem; margin-bottom: .35em; }
.article-card p { font-size: .9rem; color: var(--ink-70); margin: 0; }
.article-card .kicker {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--pulse);
  margin-bottom: 6px;
}

.hub-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.hub-grid a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
.hub-grid a:hover { border-color: var(--ink-50); }
.hub-grid a .d { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

.site-footer {
  background: var(--ink);
  color: #cbd7dc;
  padding-top: 44px;
  padding-bottom: 34px;
  margin-top: 0;
  font-size: .93rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 30px;
  padding-top: 20px;
  font-size: .86rem;
  color: #94a9b1;
}
.footer-disclaimer { max-width: 68ch; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--pulse);
  color: #fff;
  box-shadow: 0 6px 20px rgba(217, 70, 60, .4);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.fab-panel {
  position: fixed;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  z-index: 36;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 34px rgba(20, 48, 60, .22);
  display: none;
  width: min(300px, calc(100vw - 32px));
}
.fab-panel.is-open { display: block; }
.fab-panel h4 { margin: 0 0 12px; font-size: .95rem; }
@media (max-width: 899px) {
  .has-fab .fab { display: flex; }
}
@media print {
  .fab, .fab-panel { display: none !important; }
}

.journal-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.journal-entry .je-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  min-width: 92px;
}
.journal-entry .je-meta { font-size: .86rem; color: var(--ink-50); flex: 1 1 140px; }
.journal-entry .je-note { font-size: .88rem; color: var(--ink-70); flex-basis: 100%; }
.journal-entry .je-actions { display: flex; gap: 6px; margin-left: auto; }
.journal-entry button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9px;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  color: var(--ink-70);
}
.journal-entry button:hover { border-color: var(--ink-50); color: var(--ink); }

.transparency {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 20px;
  font-size: .93rem;
}
.transparency h3 { font-size: 1.02rem; }
.transparency ul { padding-left: 1.2em; margin-bottom: 0; }
.transparency li { margin-bottom: .45em; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-70);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btns .btn { padding: 10px 15px; font-size: .9rem; }

.muted { color: var(--ink-70); }
.small { font-size: .89rem; }
.tabnum { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }

.ad-slot { margin: 30px 0; text-align: center; min-height: 1px; }
.ad-slot ins { display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .ad-slot, .nav, .mini-check,
  main > section, .cookie-banner, .skip-link { display: none !important; }

  .print-sheet, .print-sheet[hidden] { display: block !important; }

  .print-sheet {
    padding: 0;
    color: #000;
    font-family: 'Public Sans', sans-serif;
  }
  .print-sheet h1 { font-size: 17pt; margin-bottom: 2mm; }
  .print-sheet h2 { font-size: 12pt; margin: 6mm 0 2mm; }
  .print-sheet table { min-width: 0; font-size: 9.5pt; }
  .print-sheet th, .print-sheet td { border: 1px solid #999; padding: 2mm 1.5mm; }
  .print-sheet th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 3mm; }
  .print-sheet .ps-reading { font-size: 24pt; font-weight: 800; font-family: 'Archivo', sans-serif; }
  .print-sheet .ps-grid td { height: 9mm; }
  .print-sheet .ps-foot { margin-top: 6mm; font-size: 8pt; color: #333; border-top: 1px solid #999; padding-top: 2mm; }
  .table-scroll { overflow: visible; }
  a { text-decoration: none; color: #000; }
  @page { margin: 14mm; }
}

.print-sheet { display: none; }
