* { box-sizing: border-box; }
[hidden], .phone-copy, .menu-toggle { display: none !important; }
:root { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ink);
  color: var(--text);
  font: var(--body)/1.55 var(--font-text);
}
h1, h2, p, figure { margin: 0; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: .98;
}
h1 { font-size: var(--h1); letter-spacing: -.035em; }
h2 { font-size: var(--h2); letter-spacing: -.025em; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { color: inherit; background: none; border: 0; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link {
  position: fixed;
  z-index: 5;
  inset: 8px auto auto 8px;
  padding: 10px 16px;
  background: var(--panel);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(16px);
}
.banner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  padding: 2px var(--gap);
  background: var(--accent-soft);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-size: var(--small);
}
.banner a { color: var(--accent); }
.banner button {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  font-size: 20px;
  line-height: 1;
}
.top-bar, .menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 9px var(--gap);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 500 36px/.95 var(--font-display);
  letter-spacing: -.055em;
  text-decoration: none;
}
.desktop-nav { display: flex; align-items: center; gap: var(--gap); }
.desktop-nav a {
  color: var(--muted);
  font-size: 16.5px;
  font-weight: 500;
  text-decoration: none;
}
.desktop-nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
/* The maker link: set apart from the sections so the credit is easy to find. */
.desktop-nav .maker-link { color: var(--text); padding-left: var(--gap); border-left: 1px solid var(--line-strong); }
.desktop-nav .maker-link:hover, .desktop-nav .maker-link[aria-current="page"] { color: var(--accent); }
.nav-short { display: none; }
@media (max-width: 1179px) { .nav-long { display: none; } .nav-short { display: inline; } }
#phone-menu .nav-short { display: none; }
#phone-menu .nav-long { display: inline; }
.btn, .desktop-nav .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.btn:hover, .desktop-nav .btn:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 28px;
  line-height: 1;
}
#phone-menu {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: var(--ink);
}
#phone-menu nav { display: grid; justify-items: start; gap: 20px; padding: 28px var(--gap); }
#phone-menu nav > a { display: inline-flex; align-items: center; min-height: 44px; }
#main { min-width: 0; display: flex; flex-direction: column; }
.intro, .about, .privacy, .lab-section {
  width: min(var(--page-max), 100%);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.legal p, .legal ul, .legal ol { max-width: 88ch; }
.legal table { max-width: min(100%, 1050px); }
.hero { padding-block: clamp(50px, 11vh, 130px); }
.eyebrow { color: var(--accent); font-size: var(--small); font-weight: 500; }
.hero h1, .about h1 { margin-block: 14px 24px; }
.hero > p:not(.eyebrow), .about p:not(.eyebrow) { color: var(--muted); max-width: 58ch; }
.hero-counts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px var(--gap);
  margin: 28px 0;
  padding: 0;
  color: var(--muted);
  font-size: var(--small);
}
.hero-counts strong { color: var(--text); font-weight: 500; }
.legal {
  width: min(100%, calc(70ch + 2 * var(--gap)));
  padding-block: clamp(40px, 7vw, 96px);
  line-height: 1.65;
}
.legal h1 { font-size: clamp(50px, 7vw, 80px); }
.legal h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.legal h3 { font-size: 1.05em; margin: 1.5rem 0 .4rem; }
.legal p { margin-top: .85rem; }
.legal-meta { color: var(--muted); font-size: var(--small); margin-bottom: 1.75rem; }
.legal section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal ul { padding-inline-start: 1.4em; margin-block: .65rem 0; }
.legal li + li { margin-top: .45rem; }
.legal-table { margin-block: 1rem; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.legal table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: .95em; }
.legal th, .legal td { padding: .65rem .8rem; text-align: start; vertical-align: top; }
.legal th { background: var(--panel-2); }
.legal td { border-top: 1px solid var(--line-strong); }
.about {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 100px);
  align-content: center;
  padding-block: clamp(32px, 7vh, 90px);
}
.about-intro h1 { font-size: clamp(52px, 6.6vw, 96px); }
.about-portrait {
  display: block;
  width: clamp(160px, 20vw, 260px);
  max-width: 100%;
  height: auto;
  margin-top: 24px;
  border-radius: var(--radius);
}
[data-signin-enabled] .about-portrait {
  width: min(100%, 420px);
  margin: 26px auto 0;
}
.about h2 { font-size: clamp(30px, 3vw, 46px); }
.about-sections section + section { margin-top: 26px; }
.about-sections p { margin-top: 10px; }
.about .contact { border-top: 1px solid var(--line); padding-top: 24px; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 14px; }
.contact-links > span { color: var(--muted); font-size: var(--small); }
.contact-links > a:last-child { flex-basis: 100%; font-size: var(--small); }
.lab-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  min-width: 0;
}
.section-header {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
}
.section-heading h1 { width: fit-content; font-size: var(--h2); }
.section-heading p { margin-top: 8px; color: var(--muted); max-width: 78ch; }
.ecg-module {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 500;
}
.ecg-module select {
  min-height: 44px;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.ecg figcaption {
  color: var(--muted);
  font: 400 var(--small)/1.25 var(--font-text);
}
.ecg svg { display: block; width: 100%; height: auto; overflow: visible; }
.ecg path {
  fill: none;
  stroke: var(--topic);
  stroke-width: 1.6px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--topic) 35%, transparent));
}
.ecg.sweep-ready path {
  animation: ecg-sweep calc(3s / var(--ecg-speed) / .88) linear infinite;
  animation-delay: var(--sweep-delay, 0s);
  animation-play-state: paused;
}
.ecg.in-view path { animation-play-state: running; }
@keyframes ecg-sweep {
  0% { clip-path: inset(-8px 100% -8px -8px); opacity: 1; }
  88% { clip-path: inset(-8px); opacity: 1; }
  96%, 100% { clip-path: inset(-8px); opacity: 0; }
}
.pill--brady { --topic: var(--brady); }
.pill--narrow { --topic: var(--narrow); }
.pill--wide { --topic: var(--wide); }
.pill--mi { --topic: var(--mi); }
.pill--sinus { --topic: color-mix(in srgb, var(--text) 70%, transparent); }
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--topic) 50%, transparent);
  background: color-mix(in srgb, var(--topic) 10%, transparent);
  color: var(--topic);
  font-size: var(--small);
  font-weight: 500;
  text-decoration: none;
}
.pill:hover { color: var(--topic); background: color-mix(in srgb, var(--topic) 18%, transparent); }
.pill[aria-selected="true"] { box-shadow: inset 0 -2px var(--topic); }
.lab-stage, .lab-panel { min-width: 0; }
.lab-panel iframe { display: block; border: 0; width: 100%; height: 440px; background: var(--ink); }
.site-footer {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 12px var(--gap);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--small);
}
.site-footer p { margin-right: auto; }
.site-footer small { font-size: inherit; }
@media (max-width: 950px) {
  [data-signin-enabled] .desktop-nav { display: none !important; }
  [data-signin-enabled] .menu-toggle { display: grid !important; }
}
@media (max-width: 700px) {
  .desktop-copy, .desktop-nav { display: none !important; }
  .phone-copy { display: inline !important; }
  .menu-toggle { display: grid !important; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .lab-section { padding: 0; }
  .section-header { padding-inline: var(--gap); }
  .section-heading p { font-size: var(--small); }
  .site-footer { position: static; }
}
@media (max-width: 440px) {
  .banner { padding-inline: 5px; gap: 0 7px; font-size: 14px; }
  .top-bar { padding-block: 6px; }
  .pill { flex: 1; min-width: 0; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ecg.sweep-ready path { animation: none; }
  .btn:hover svg { transform: none; }
}
