:root {
  --ink: #17212a;
  --muted: #66727c;
  --paper: #f4f7f4;
  --white: #ffffff;
  --line: #dbe3dc;
  --crimson: #9a2734;
  --crimson-2: #c43a45;
  --deep: #18364b;
  --teal: #22766e;
  --green: #3c8d5b;
  --amber: #c88a2f;
  --orange: #cc6638;
  --shadow: 0 24px 70px rgba(23, 33, 42, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(244, 247, 244, 0.92);
  border-bottom: 1px solid rgba(219, 227, 220, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--crimson);
  color: white;
  font-weight: 950;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.05;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--crimson-2);
}

.nav-button {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--deep);
  color: white;
  font-weight: 850;
}

.nav-button:hover {
  color: white;
  background: var(--crimson);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #14212d;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.88;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 27, 36, 0.98) 0%, rgba(24, 54, 75, 0.86) 43%, rgba(24, 54, 75, 0.22) 72%, rgba(154, 39, 52, 0.16) 100%),
    linear-gradient(0deg, rgba(17, 27, 36, 0.25), rgba(255, 255, 255, 0.04));
}

.hero-copy {
  position: relative;
  max-width: 900px;
  padding: 84px clamp(22px, 7vw, 96px) 118px;
  color: white;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2c56d;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 790px;
  font-size: clamp(3rem, 8vw, 7.4rem);
}

h2 {
  font-size: clamp(2rem, 4.1vw, 4rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 14px 0 0;
}

.lede {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: #fbf8ef;
  color: #121d28;
}

.button.ghost {
  color: white;
}

.notice-band {
  padding: 16px clamp(20px, 5vw, 70px);
  background: #fff0e8;
  border-top: 1px solid #f0d0bd;
  border-bottom: 1px solid #f0d0bd;
  color: #5b3026;
}

.audience-bar {
  position: sticky;
  top: 67px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px clamp(20px, 5vw, 70px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.audience-bar h2 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 340px);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ee;
}

.segmented-control button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.segmented-control button.active {
  background: var(--crimson);
  color: white;
  box-shadow: 0 9px 22px rgba(154, 39, 52, 0.22);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section,
.band {
  padding: clamp(64px, 9vw, 116px) 0;
}

.band {
  background: var(--white);
}

.section-heading {
  max-width: 920px;
  margin-bottom: 34px;
}

.section-heading.compact {
  max-width: 760px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 7vw, 80px);
  align-items: start;
}

.bp-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.bp-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(130px, 0.72fr) minmax(140px, 0.72fr) minmax(230px, 1.2fr);
  gap: 1px;
  background: var(--line);
}

.bp-row > * {
  padding: 16px;
  background: white;
}

.bp-head > * {
  background: var(--deep);
  color: white;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bp-row strong {
  border-left: 8px solid var(--green);
}

.bp-row.elevated strong {
  border-left-color: var(--amber);
}

.bp-row.stage-one strong {
  border-left-color: var(--orange);
}

.bp-row.stage-two strong,
.bp-row.crisis strong {
  border-left-color: var(--crimson);
}

.bp-row.crisis > * {
  background: #fff5f0;
}

.table-note {
  max-width: 960px;
  color: var(--muted);
  font-size: 0.96rem;
}

.equation-strip {
  display: grid;
  grid-template-columns: minmax(110px, 0.6fr) 48px minmax(190px, 1.1fr) 48px minmax(220px, 1.2fr);
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 18px 48px rgba(23, 33, 42, 0.06);
}

.equation-strip div {
  padding: 18px;
  background: white;
}

.equation-strip strong,
.equation-strip span {
  display: block;
}

.equation-strip strong {
  color: var(--crimson);
  font-size: 1.08rem;
}

.equation-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.cause-grid,
.workup-grid,
.risk-grid,
.visual-grid,
.language-tools,
.retina-grid,
.variation-grid,
.physiology-grid {
  display: grid;
  gap: 18px;
}

.physiology-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cause-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cause-card,
.physiology-grid article,
.workup-grid article,
.risk-grid article,
.treatment-panel article,
figure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(23, 33, 42, 0.06);
}

.cause-card {
  position: relative;
  min-height: 265px;
  padding: 28px;
  overflow: hidden;
}

.physiology-grid article {
  padding: 22px;
}

.cause-card::after {
  position: absolute;
  inset: auto 20px 18px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(34, 118, 110, 0.1);
  content: "";
}

.cause-card.urgent {
  border-color: #e7b2a1;
  background: #fffaf2;
}

.number {
  display: block;
  margin-bottom: 16px;
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 950;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(28px, 7vw, 80px);
  align-items: center;
}

.detection-section {
  background: #18364b;
  color: #f6fbfb;
}

.detection-section .eyebrow {
  color: #8bd2c7;
}

.detection-section p {
  color: rgba(255, 255, 255, 0.84);
}

.measurement-list {
  display: grid;
  gap: 12px;
}

.measurement-list div {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.measurement-list strong {
  color: #f2c56d;
  font-weight: 950;
  text-transform: uppercase;
}

.home-monitor-card {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #fffaf1;
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(23, 33, 42, 0.16);
}

.home-monitor-card .eyebrow {
  color: var(--crimson);
}

.home-monitor-card p {
  color: #3f4a53;
}

.monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.monitor-button {
  border-color: var(--crimson);
  background: var(--crimson);
  color: white;
}

.monitor-ghost {
  border-color: var(--line);
  background: white;
  color: var(--deep);
}

.affiliate-note {
  max-width: 820px;
  font-size: 0.86rem;
}

.print-actions {
  margin-bottom: 18px;
}

.print-button {
  border-color: var(--deep);
  background: var(--deep);
  color: white;
  cursor: pointer;
}

.bp-log-sheet {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(23, 33, 42, 0.06);
  overflow-x: auto;
}

.log-title {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.log-title h3 {
  font-size: 1.45rem;
}

.bp-log-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.86rem;
  line-height: 1.2;
}

.bp-log-table th,
.bp-log-table td {
  min-height: 54px;
  padding: 8px;
  border: 1px solid #bfc9c1;
  vertical-align: top;
}

.bp-log-table .date-col {
  width: 11%;
}

.bp-log-table .reading-col {
  width: 11.5%;
}

.bp-log-table .pulse-col {
  width: 7%;
}

.bp-log-table .notes-col {
  width: 36%;
}

.bp-log-table thead th {
  background: #edf2ee;
  color: var(--deep);
  white-space: normal;
}

.bp-log-table th span,
.bp-log-table th small {
  display: block;
}

.bp-log-table th small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.bp-log-table tbody th {
  color: var(--crimson);
  text-align: left;
}

.average-row td {
  height: 58px;
  font-weight: 850;
}

.log-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.variation-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
  gap: clamp(22px, 5vw, 58px);
}

.variation-figure img {
  height: auto;
  max-height: 470px;
  object-fit: contain;
}

.variation-points {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.variation-points div {
  padding: 16px;
  background: white;
}

.variation-points strong,
.variation-points span {
  display: block;
}

.variation-points strong {
  color: var(--crimson);
}

.variation-points span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.workup-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workup-grid article,
.risk-grid article,
.treatment-panel article {
  padding: 22px;
}

.risk-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-meter {
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--green);
}

.risk-meter.medium {
  background: var(--amber);
}

.risk-meter.high {
  background: var(--orange);
}

.risk-meter.severe {
  background: var(--crimson);
}

.organ-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.organ-strip div {
  padding: 16px;
  background: #f7faf8;
}

.organ-strip strong,
.organ-strip span {
  display: block;
}

.organ-strip strong {
  color: var(--crimson);
}

.organ-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.retina-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  align-items: start;
  gap: clamp(22px, 5vw, 58px);
}

.retina-figure {
  background: #071012;
}

.retina-figure img {
  height: auto;
  max-height: 540px;
  object-fit: contain;
}

.retina-findings {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.retina-findings div {
  padding: 16px;
  background: white;
}

.retina-findings strong,
.retina-findings span {
  display: block;
}

.retina-findings strong {
  color: var(--teal);
}

.retina-findings span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.treatment-panel {
  display: grid;
  gap: 14px;
}

.visual-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

figure {
  margin: 0;
  overflow: hidden;
}

figure img {
  display: block;
  width: 100%;
  height: 270px;
  object-fit: cover;
  background: #edf2ee;
}

figcaption {
  padding: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

figcaption strong {
  color: var(--ink);
}

.language-tools {
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.35fr) minmax(220px, 0.75fr);
  align-items: end;
}

.language-tools label,
.language-tools > div {
  display: grid;
  gap: 8px;
}

.mini-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.language-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.language-chips a,
.language-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--deep);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.language-chips a:hover {
  border-color: var(--crimson-2);
  color: var(--crimson-2);
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list a {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--deep);
  font-weight: 850;
  text-decoration: none;
}

.source-list a:hover {
  border-color: var(--crimson-2);
  color: var(--crimson-2);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 5vw, 70px);
  background: #111c25;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer div,
.site-footer span {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  color: white;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.audience-clinician .patient-copy,
.clinician-copy {
  display: none;
}

.audience-clinician .clinician-copy {
  display: block;
}

@media (max-width: 1100px) {
  .visual-grid,
  .physiology-grid,
  .risk-grid,
  .workup-grid,
  .organ-strip,
  .retina-findings,
  .variation-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audience-bar {
    top: 84px;
  }
}

@media (max-width: 820px) {
  .site-header,
  .audience-bar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 760px;
  }

  .hero img {
    object-position: 66% center;
  }

  .hero-copy {
    padding-top: 90px;
  }

  .intro-grid,
  .cause-grid,
  .two-col,
  .retina-grid,
  .variation-grid,
  .language-tools,
  .source-list {
    grid-template-columns: 1fr;
  }

  .bp-table {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .bp-head {
    display: none;
  }

  .bp-row {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .audience-bar {
    position: static;
  }

  .equation-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  h2 {
    font-size: 2rem;
  }

  .visual-grid,
  .physiology-grid,
  .risk-grid,
  .workup-grid,
  .organ-strip,
  .retina-findings,
  .variation-points {
    grid-template-columns: 1fr;
  }

  .measurement-list div {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .bp-log-sheet,
  .bp-log-sheet * {
    visibility: visible;
  }

  .bp-log-sheet {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .bp-log-table {
    min-width: 0;
    font-size: 8.8pt;
  }

  .bp-log-table th,
  .bp-log-table td {
    padding: 5px;
  }

  .log-title h3 {
    font-size: 15pt;
  }

  .log-title p,
  .log-footer {
    font-size: 8.5pt;
  }

  @page {
    size: landscape;
    margin: 12mm;
  }
}
