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

/* Colours: dark by default, light when chosen or when the device is set to light and no choice was made */
:root {
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --red: #c0392b;
  --red-dim: #7a1f17;
  --red-bright: #e74c3c;
  --bg: #0d0a09;
  --fg: #f5f0e8;
  --surface: #120d0b;
  --text-muted: #8f7d77;
  --text-body: #cbbdb6;
  --text-soft: #b6a7a0;
  --line: rgba(192,57,43,0.15);
  --line-strong: rgba(192,57,43,0.25);
  --row-line: rgba(245,240,232,0.05);
  --grid: rgba(192,57,43,0.04);
  --glow: rgba(192,57,43,0.12);
  --header-bg: rgba(13,10,9,0.88);
  --shadow: rgba(0,0,0,0.45);
  --last-year: #3a2a26;
  --last-year-line: #5a4440;
  --chart-grid: rgba(245,240,232,0.06);
  --up: #6fbf8a;
  --corner-opacity: 0.04;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  --red: #b03024;
  --red-dim: #dcaaa2;
  --red-bright: #c0392b;
  --bg: #faf6f0;
  --fg: #1d1412;
  --surface: #fffdf9;
  --text-muted: #6f5d57;
  --text-body: #42332e;
  --text-soft: #54443e;
  --line: rgba(176,48,36,0.18);
  --line-strong: rgba(176,48,36,0.25);
  --row-line: rgba(29,20,18,0.08);
  --grid: rgba(192,57,43,0.06);
  --glow: rgba(192,57,43,0.08);
  --header-bg: rgba(250,246,240,0.9);
  --shadow: rgba(60,30,20,0.12);
  --last-year: #e2d3cd;
  --last-year-line: #b9a49c;
  --chart-grid: rgba(29,20,18,0.08);
  --up: #2f7d4c;
  --corner-opacity: 0.08;
  color-scheme: light;
  }
}

:root[data-theme="light"] {
  --red: #b03024;
  --red-dim: #dcaaa2;
  --red-bright: #c0392b;
  --bg: #faf6f0;
  --fg: #1d1412;
  --surface: #fffdf9;
  --text-muted: #6f5d57;
  --text-body: #42332e;
  --text-soft: #54443e;
  --line: rgba(176,48,36,0.18);
  --line-strong: rgba(176,48,36,0.25);
  --row-line: rgba(29,20,18,0.08);
  --grid: rgba(192,57,43,0.06);
  --glow: rgba(192,57,43,0.08);
  --header-bg: rgba(250,246,240,0.9);
  --shadow: rgba(60,30,20,0.12);
  --last-year: #e2d3cd;
  --last-year-line: #b9a49c;
  --chart-grid: rgba(29,20,18,0.08);
  --up: #2f7d4c;
  --corner-opacity: 0.08;
  color-scheme: light;
}

html { scroll-behavior: smooth; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Mono', monospace;
  overflow-x: clip;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* Radial glow */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  z-index: 0;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

/* Main layout */
.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  --gutter: clamp(24px, 6vw, 80px);
  padding: 0 var(--gutter) 48px;
}

/* Header */
/* Header stays at the top: it slides away while scrolling down and comes back on any scroll up */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 32px var(--gutter) 20px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  animation: fadeDown 1s 0.2s forwards;
  transition: translate 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom-color: var(--line);
}

header.tucked:not(:focus-within) {
  translate: 0 -100%;
}

section[id] {
  scroll-margin-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  header { transition: none; }
}

/* Logo: the same wordmark as the ArteryData apps, with the website's red heartbeat */
.logo-mark {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Heartbeat SVG icon */
.heart-icon {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
}

.heart-pulse {
  stroke: var(--red);
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 2s 1s ease forwards, beatPulse 3s 3s ease-in-out infinite;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes beatPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.logo-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.8px;
  white-space: nowrap;
  color: var(--fg);
}

.logo-text span {
  font-weight: 400;
  color: var(--text-soft);
}

.header-url {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: lowercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.login-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--red-dim);
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.login-btn:hover,
.login-btn:focus-visible {
  border-color: var(--red-bright);
  background: rgba(192,57,43,0.12);
  color: var(--red-bright);
  outline: none;
}

@media (max-width: 600px) {
  .header-url { display: none; }
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 800px;
  padding: 80px 0 60px;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2.75rem, 7.5vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--fg);
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

h1 em {
  font-style: italic;
  color: var(--red-bright);
}

.tagline {
  margin-top: 36px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 460px;
  opacity: 0;
  animation: fadeUp 0.8s 1.0s forwards;
  border-left: 1px solid var(--red-dim);
  padding-left: 20px;
}

/* Divider pulse line */
.pulse-line {
  width: 100%;
  max-width: 500px;
  margin-top: 52px;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.pulse-line svg {
  width: 100%;
  height: 40px;
  overflow: visible;
}

.ecg-path {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.5;
  opacity: 0.7;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: drawEcg 2s 1.8s ease forwards;
}

@keyframes drawEcg {
  to { stroke-dashoffset: 0; }
}

/* CTA section */
.cta {
  margin-top: 52px;
  opacity: 0;
  animation: fadeUp 0.8s 1.4s forwards;
}

.cta p {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  position: relative;
}

.email-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--red-bright);
  transition: width 0.4s ease;
}

.email-link:hover {
  color: var(--red-bright);
}

.email-link:hover::after {
  width: 100%;
}

.email-arrow {
  font-size: 1rem;
  transition: transform 0.3s;
}

.email-link:hover .email-arrow {
  transform: translateX(4px);
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.8s 1.6s forwards;
}

.footer-left {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  line-height: 1.8;
  text-transform: uppercase;
}

.footer-right {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
}

.footer-right em {
  color: var(--red);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Decorative corner accent */
.corner-accent {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 280px;
  height: 280px;
  opacity: var(--corner-opacity);
  pointer-events: none;
  z-index: 0;
}

/* Header navigation */
.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--fg);
  outline: none;
}

@media (max-width: 760px) {
  .header-actions { display: contents; }
  .header-url { display: none; }
  /* Phone and tablet: logo and Sign in on top, sections and theme switch underneath */
  .header-nav {
    order: 3;
    flex: 1 1 calc(100% - 130px);
    gap: 22px;
  }
  .theme-switch { order: 4; margin-left: auto; }
  .header-nav a {
    letter-spacing: 0.15em;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  header { column-gap: 12px; }
  .logo-text { font-size: 19px; }
  .login-btn { padding: 8px 14px; letter-spacing: 0.15em; }
  .header-nav { gap: 16px; }
  .header-nav a { letter-spacing: 0.12em; }
  header.scrolled { padding-top: 12px; padding-bottom: 12px; }
  section[id] { scroll-margin-top: 110px; }
}

/* Theme switch: Dark / Light / System */
.theme-switch {
  display: flex;
  border: 1px solid var(--line-strong);
}

.theme-switch button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}

.theme-switch button + button { border-left: 1px solid var(--line-strong); }

.theme-switch button:hover,
.theme-switch button:focus-visible {
  color: var(--fg);
  outline: none;
}

.theme-switch button[aria-checked="true"] {
  color: var(--red-bright);
  background: var(--line);
}

.theme-switch svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 480px) {
  .theme-switch button { width: 28px; height: 28px; }
}

/* Product name stays lowercase inside uppercase labels */
.brand,
.header-nav a.brand { text-transform: none; }

/* Content sections */
.section {
  padding: 96px 0 24px;
  border-top: 1px solid var(--line);
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--red);
}

h2 {
  font-family: var(--sans);
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 760px;
}

h2 em {
  font-style: italic;
  color: var(--red-bright);
}

.section-intro {
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 620px;
}

/* Services */
.services {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .services { grid-template-columns: minmax(0, 1fr); }
}

.service {
  background: var(--bg);
  padding: 32px 28px 36px;
}

.service-num {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--red);
}

.service h3 {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service p {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-body);
}

.service .plan-note {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-bright);
}

/* Devices strip */
.devices {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.devices span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}

.devices svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--red-bright);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.devices p {
  flex-basis: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--text-body);
}

/* Report mock screens */
.mock-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.mock-wide { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .mock-grid { grid-template-columns: minmax(0, 1fr); }
}

.mock {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px var(--shadow);
  min-width: 0;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mock-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--last-year);
}

.mock-bar span { margin-left: 10px; }

.mock-body { padding: 22px 22px 24px; }

.mock-title {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.mock-sub {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.kpis {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.kpi {
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.kpi-label {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-value {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.up { color: var(--up); }
.down { color: var(--red-bright); }

.kpi .up, .kpi .down { font-family: var(--sans); font-size: 0.8rem; margin-top: 2px; }

.chart {
  margin-top: 20px;
  width: 100%;
  height: auto;
  display: block;
}

.chart text {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  fill: var(--text-muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend span::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--swatch);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.mock table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
}

.mock th {
  text-align: right;
  font-weight: 400;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.mock td {
  text-align: right;
  padding: 9px 8px;
  border-bottom: 1px solid var(--row-line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mock th:first-child,
.mock td:first-child { text-align: left; padding-left: 0; }

.mock tr.total td { color: var(--fg); border-bottom: none; padding-top: 12px; }

.bars { margin-top: 18px; display: grid; gap: 12px; }

.bar-row {
  display: grid;
  grid-template-columns: 40px 1fr 64px;
  gap: 12px;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.bar-track { position: relative; height: 14px; }

.bar-ly, .bar-ty {
  position: absolute;
  left: 0;
  height: 6px;
}

.bar-ly { top: 0; background: var(--last-year); }
.bar-ty { bottom: 0; background: var(--red); }

.bar-row .up, .bar-row .down { text-align: right; }

.mock-note {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.disclaimer {
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* How it works */
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 40px;
}

.step-num {
  font-family: var(--sans);
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  font-weight: 300;
  color: var(--red);
  line-height: 1;
}

.step h3 {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.step p {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-body);
}

.section .cta {
  opacity: 1;
  animation: none;
  margin: 64px 0 72px;
}

/* Replaces former inline style attributes (the CSP forbids inline styles) */
.s-stroke-var-chart-grid { stroke: var(--chart-grid); }
.s-stroke-var-last-year-line { stroke: var(--last-year-line); }
.s-stroke-var-red-bright { stroke: var(--red-bright); }
.s-fill-var-red-bright { fill: var(--red-bright); }
.s-swatch-var-red-bright { --swatch:var(--red-bright); }
.s-swatch-var-last-year-line { --swatch:var(--last-year-line); }
.s-width-88-8 { width:88.8%; }
.s-width-98-8 { width:98.8%; }
.s-width-68-8 { width:68.8%; }
.s-width-77-6 { width:77.6%; }
.s-width-45-3 { width:45.3%; }
.s-width-49-4 { width:49.4%; }
.s-width-29-4 { width:29.4%; }
.s-width-35-9 { width:35.9%; }
.s-width-17-6 { width:17.6%; }
.s-width-16-5 { width:16.5%; }
.s-width-5-9 { width:5.9%; }
.s-width-7-1 { width:7.1%; }
.s-swatch-var-red { --swatch:var(--red); }
.s-swatch-var-last-year { --swatch:var(--last-year); }

/* "Find out more" contact button and form */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}
.contact-btn:hover,
.contact-btn:focus-visible {
  background: var(--red-bright);
  border-color: var(--red-bright);
  outline: none;
}
.contact-btn:focus-visible { box-shadow: 0 0 0 3px var(--glow), 0 0 0 1px var(--fg); }
.contact-btn:hover .email-arrow { transform: translateX(4px); }
.contact-btn:disabled { opacity: 0.6; cursor: wait; }
.contact-btn-lg { font-size: 0.75rem; padding: 14px 26px; }

.cta-or {
  display: block;
  margin: 22px 0 10px;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cta .email-link { font-size: 1rem; }

@media (max-width: 760px) {
  .header-contact { display: none; }
}

.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 40px clamp(20px, 5vw, 44px) 32px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px var(--shadow);
  overflow-y: auto;
}
.contact-dialog::backdrop {
  background: rgba(13,10,9,0.72);
  backdrop-filter: blur(3px);
}
.contact-dialog[open] { animation: fadeUp 0.35s ease; }

.contact-dialog h2 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 10px 0 12px;
}
.contact-dialog h2:focus { outline: none; }
.contact-dialog h2 em { font-style: italic; color: var(--red-bright); }

.contact-intro {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 26px;
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.contact-close:hover,
.contact-close:focus-visible { color: var(--red-bright); border-color: var(--line-strong); outline: none; }
.contact-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.contact-form[hidden],
.contact-done[hidden] { display: none; }

.field { margin-bottom: 16px; min-width: 0; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 480px) { .field-pair { grid-template-columns: 1fr; } }

.field label {
  display: block;
  margin-bottom: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field .optional { letter-spacing: 0.1em; text-transform: none; opacity: 0.8; margin-left: 6px; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 11px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px var(--glow);
}
.field input[aria-invalid="true"] { border-color: var(--red-bright); }

.field-error {
  min-height: 0;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--red-bright);
}
.field-error:empty { display: none; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status { font-size: 0.85rem; color: var(--text-soft); margin: 4px 0 12px; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--red-bright); }

.form-actions { margin-top: 8px; }

.privacy-note {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pricing (arterydata-site#1) */
.period-switch {
  display: inline-flex;
  margin-top: 40px;
  border: 1px solid var(--line-strong);
}
.period-switch button {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}
.period-switch button + button { border-left: 1px solid var(--line-strong); }
.period-switch button:hover,
.period-switch button:focus-visible { color: var(--fg); outline: none; }
.period-switch button[aria-checked="true"] { color: var(--red-bright); background: var(--line); }

.plans {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plans { grid-template-columns: minmax(0, 1fr); } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 32px 26px 28px;
  min-width: 0;
}
.plan-featured { background: var(--surface); box-shadow: inset 0 2px 0 var(--red-bright); }
.plan h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.plan-price {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 2.3rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-price small {
  margin-left: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.plan-quoted { font-size: 1.6rem; line-height: 1.15; }
.plan-billed {
  margin-top: 10px;
  min-height: 1.2em;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.plan-limits,
.plan-features {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
}
.plan-limits {
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--row-line);
  border-bottom: 1px solid var(--row-line);
  color: var(--fg);
}
.plan-limits li + li { margin-top: 6px; }
.plan-limits b { font-weight: 500; color: var(--red-bright); }
.plan-features { margin-top: 16px; color: var(--text-body); flex: 1; }
.plan-features li { position: relative; padding-left: 18px; }
.plan-features li + li { margin-top: 8px; }
.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--red);
}
.plan-features .soon span {
  display: inline-block;
  margin-left: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.plan-cta {
  align-self: flex-start;
  margin-top: 26px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 11px 20px;
  background: none;
  border: 1px solid var(--red-dim);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.plan-featured .plan-cta { border-color: var(--red-bright); background: rgba(192,57,43,0.12); color: var(--red-bright); }
.plan-cta:hover,
.plan-cta:focus-visible { border-color: var(--red-bright); background: rgba(192,57,43,0.12); color: var(--red-bright); outline: none; }

.pricing-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 860px) { .pricing-grid { grid-template-columns: minmax(0, 1fr); } }
.price-panel h3,
.estimate h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.price-panel > p {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-body);
}
.price-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.price-table th {
  padding: 0 0 10px;
  text-align: left;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
}
.price-table td { padding: 10px 0; border-bottom: 1px solid var(--row-line); color: var(--fg); vertical-align: top; }
.price-table td small { display: block; margin-top: 2px; font-size: 0.82rem; color: var(--text-muted); }
.price-table .amount { text-align: right; padding-left: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.estimate {
  margin-top: 56px;
  padding: 32px clamp(20px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.estimate[hidden] { display: none; }
.estimate-fields,
.estimate-sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.estimate-sources { border: none; }
.estimate-sources legend {
  grid-column: 1 / -1;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-soft);
}
@media (max-width: 760px) { .estimate-fields, .estimate-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.estimate label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 0;
}
.estimate label[hidden] { display: none; }
.estimate input,
.estimate select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 12px;
}
.estimate input:focus,
.estimate select:focus { outline: none; border-color: var(--red-bright); box-shadow: 0 0 0 3px var(--glow); }
.estimate-result { margin-top: 26px; }
.estimate-result ul { list-style: none; font-family: var(--sans); font-size: 0.95rem; }
.estimate-result li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--row-line);
  color: var(--text-body);
  font-variant-numeric: tabular-nums;
}
.estimate-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--sans);
}
.estimate-total span { font-size: 0.95rem; color: var(--fg); }
.estimate-total strong { font-size: 1.8rem; font-weight: 300; letter-spacing: -0.02em; color: var(--red-bright); font-variant-numeric: tabular-nums; }
.estimate-note,
.pricing-note {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.pricing-note { margin-top: 28px; max-width: 760px; }

/* ---- Search-friendly headings and the reporting pages ---- */

/* The keyword line that sits above the big brand headline (part of the h1 for search engines) */
.h1-kicker {
  display: block;
  margin-bottom: 28px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  line-height: 1.8;
  text-transform: uppercase;
  color: var(--red);
}

/* Links from the home page to the reporting pages */
.topic-links {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.topic-links a,
.related a {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
}
.topic-links a:hover,
.related a:hover { border-bottom-color: var(--red-bright); }

.footer-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }

/* A reporting page's top: smaller headline than the home page */
.page-hero {
  max-width: 860px;
  padding: 64px 0 48px;
}
.page-hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); }
.page-hero .tagline { max-width: 620px; }

.breadcrumb {
  margin-bottom: 32px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); }

/* Running text on the reporting pages */
.prose {
  margin-top: 32px;
  max-width: 720px;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-body);
}
.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 18px; }
.prose ul { list-style: none; }
.prose li { position: relative; padding-left: 20px; }
.prose li + li { margin-top: 10px; }
.prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 9px;
  height: 1px;
  background: var(--red);
}
.prose strong { color: var(--fg); font-weight: 500; }
.prose a { color: var(--red-bright); }

/* Questions and answers */
.faq { margin-top: 40px; max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 32px 22px 0;
  position: relative;
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--fg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 20px;
  color: var(--red-bright);
  font-family: 'DM Mono', monospace;
}
.faq details[open] summary::after { content: '−'; }
.faq summary:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 4px; }
.faq details p {
  padding: 0 0 22px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
}

.related {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}

/* On the reporting pages the logo links back home */
a.logo-mark { color: inherit; text-decoration: none; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 10px; }
.breadcrumb li + li::before { content: '/'; margin-right: 10px; }
