/* Organic Clinical design system: see screenshots/DESIGN.md (not deployed) */

:root {
  --burgundy: #8b1e3f;
  --burgundy-dark: #74092f;
  --parchment: #f4e1c6;
  --rose: #f8c8dc;
  --bone: #faf5f0;

  --font-heading: "Source Serif 4", "Noto Sans TC", serif;
  --font-body: "Source Serif 4", "Noto Sans TC", serif;

  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;

  --shadow-soft: 0 12px 32px rgba(139, 30, 63, 0.04);
  --header-height: 112px; /* the logo plus 8px above and below */
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--burgundy);
  font: 400 16px/24px var(--font-body);
  font-variant-numeric: lining-nums;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.container {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

.heading-lg {
  font: 500 32px/40px var(--font-heading);
}

.body-lg {
  font-size: 18px;
  line-height: 28px;
}

:lang(zh-Hant) .hero__title {
  letter-spacing: 0;
}

/* Icon buttons */

.icon-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.icon-button svg {
  width: 100%;
  height: 100%;
}

/* Header */

.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--bone);
  color: var(--burgundy);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  background: rgba(250, 245, 240, 0.88);
  color: var(--burgundy);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.2s, color 0.2s;
}

.site-header.is-over-hero {
  background: transparent;
  color: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header.is-menu-open {
  background: var(--bone);
}

.site-header__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
  height: var(--header-height);
  padding-inline: 32px;
}

.site-header__start,
.site-header__end {
  display: flex;
  align-items: center;
}

.site-header__start {
  gap: var(--space-md);
}

.site-logo {
  display: block;
  flex: none;
  border-radius: var(--radius-full);
}

.site-logo img {
  width: 96px;
  height: 96px;
}

.site-header__end {
  justify-content: flex-end;
  gap: var(--space-sm);
}

.site-header__cta {
  padding-block: 10px;
  border-radius: var(--radius);
  font: 700 clamp(24px, 2.4vw, 32px)/36px var(--font-heading);
  text-decoration: none;
  text-transform: uppercase;
  text-underline-offset: 6px;
  white-space: nowrap;
}

.site-header__cta:hover {
  text-decoration: underline;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px var(--space-sm);
  border: 0;
  border-radius: var(--radius);
  background: none;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  text-underline-offset: 4px;
}

.nav-link:hover {
  text-decoration: underline;
}

.is-over-hero .nav-link,
.is-over-hero .site-header__cta {
  text-shadow: 0 1px 4px rgba(46, 18, 33, 0.45);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav-group {
  position: relative;
}

.nav-trigger[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

/* The top padding bridges the gap so hover survives moving onto the menu. */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 200px;
  padding-top: var(--space-sm);
  color: var(--burgundy);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 0.15s, visibility 0.15s;
}

.nav-trigger[aria-expanded="true"] + .dropdown {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) {
  .nav-group:hover .dropdown {
    opacity: 1;
    visibility: visible;
  }

  .nav-group:hover .nav-chevron {
    transform: rotate(180deg);
  }
}

.dropdown__list {
  padding: var(--space-sm);
  border: 1px solid var(--parchment);
  border-radius: var(--radius-lg);
  background: var(--bone);
  box-shadow: var(--shadow-soft);
}

.dropdown__link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 18px;
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown__link:hover,
.dropdown__link:focus-visible {
  background: var(--rose);
}

/* The page being viewed: a rose highlight in menus, an underline in the bar. */
.dropdown__link[aria-current="page"],
.mobile-nav__link[aria-current="page"] {
  background: var(--rose);
  font-weight: 700;
}

.mobile-nav__link[aria-current="page"] {
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: var(--radius);
}

.nav-link[aria-current="page"],
.site-header__cta[aria-current="page"] {
  text-decoration: underline;
}

.site-header .icon-button:hover {
  background: rgba(139, 30, 63, 0.1);
}

.site-header.is-over-hero .icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle,
.mobile-nav {
  display: none;
}

@media (max-width: 1023px) {
  :root {
    --header-height: 88px;
  }

  .site-header__bar {
    gap: var(--space-sm);
    padding-inline: 20px;
  }

  .site-header__start {
    gap: 4px;
  }

  /* Lines the hamburger's bars up with the page margin. */
  .menu-toggle {
    margin-left: -12px;
  }

  .site-logo img {
    width: 72px;
    height: 72px;
  }

  .site-header__cta {
    font-size: clamp(13px, 4.5vw, 24px);
    line-height: 28px;
    text-underline-offset: 4px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav:not([hidden]) {
    display: block;
    max-height: calc(100vh - var(--header-height));
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    overflow-y: auto;
  }

  .mobile-nav__link {
    display: block;
    padding: 10px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    text-decoration: none;
  }

  .mobile-nav__group {
    margin-top: var(--space-md);
  }

  .mobile-nav__heading {
    display: block;
    padding-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
}

/* Phones can't fit the hamburger and logo in a side as wide as the centered
   layout allows, so the button sits midway between its neighbours instead. */
@media (max-width: 559px) {
  .site-header__bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-header__cta {
    justify-self: center;
  }
}

@media (max-width: 379px) {
  :root {
    --header-height: 80px;
  }

  .site-header .icon-button {
    width: 40px;
    height: 40px;
  }

  .site-logo img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 349px) {
  .site-header__bar {
    padding-inline: var(--space-sm);
  }

  .menu-toggle {
    margin-left: -8px;
  }
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  max-height: 1000px;
  overflow: hidden;
  background: #a5835a; /* matches the video backdrop while it loads */
  color: #fff;
}

.hero__video,
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keeps the header links and headline readable; the header itself stays transparent. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(46, 18, 33, 0.5), rgba(46, 18, 33, 0) 22%),
    linear-gradient(to top, rgba(46, 18, 33, 0.82), rgba(46, 18, 33, 0.55) 25%, rgba(46, 18, 33, 0) 55%);
  pointer-events: none;
}

/* Lines up with the logo's left edge, so it stays at the left on wide screens. */
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 32px var(--space-xl);
}

.hero__title {
  font: 700 clamp(56px, 6vw, 88px)/1.05 var(--font-heading);
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: 600px;
  margin-top: var(--space-md);
  font-size: 18px;
  line-height: 28px;
}

.hero__video-toggle {
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-lg);
  z-index: 1;
  background: rgba(46, 18, 33, 0.5);
  color: #fff;
}

.hero__video-toggle:hover {
  background: rgba(46, 18, 33, 0.75);
}

/* Page sections */

main {
  position: relative;
  z-index: 1;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--bone);
}

/* Pages without a hero video start their content below the fixed header. */
body:not(.has-hero) main {
  padding-top: var(--header-height);
}

.section {
  padding-top: var(--space-xl);
}

.section--last {
  padding-bottom: var(--space-xl);
}

.intro {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-xl) var(--space-md);
  align-items: center;
  padding-top: 64px;
}

.intro .heading-lg + .body-lg {
  margin-top: var(--space-md);
}

.intro__purpose {
  grid-column: 1 / span 6;
}

.intro__image {
  grid-column: 8 / span 5;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  object-fit: cover;
}

.intro__problem {
  grid-column: 1 / span 9;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.stat {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.stat__number {
  display: block;
  font: 700 40px/48px var(--font-heading);
  letter-spacing: -0.02em;
}

.stat__text {
  display: block;
  margin-top: var(--space-sm);
}

.survey-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--burgundy);
  color: var(--bone);
  font: 500 24px/32px var(--font-heading);
  text-decoration: none;
  transition: background-color 0.2s;
}

.survey-link:hover {
  background: var(--burgundy-dark);
}

.survey-link__arrow {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.survey-link:hover .survey-link__arrow {
  transform: translateX(4px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  color: var(--bone);
  text-decoration: none;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover img {
  transform: scale(1.04);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(63, 0, 21, 0.75), rgba(63, 0, 21, 0) 60%);
}

.card__label {
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: 1;
  font: 500 24px/32px var(--font-heading);
}

/* Results page */

.hero.hero--short {
  height: clamp(340px, 46vh, 460px);
  min-height: 0;
}

.hero--short .hero__video {
  object-position: center 30%;
}

.heading-md {
  font: 500 24px/32px var(--font-heading);
}

.results-heading {
  margin-bottom: var(--space-lg);
}

.results-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: center;
  padding-top: 64px;
}

.results-intro__card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.key-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.key-stat {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.key-stat__number {
  display: block;
  font: 700 56px/60px var(--font-heading);
  letter-spacing: -0.02em;
}

.key-stat__text {
  display: block;
  margin-top: var(--space-sm);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.split--figure-first .chart {
  order: -1;
}

.prose p {
  margin-top: var(--space-md);
}

.prose > :first-child {
  margin-top: 0;
}

.learn {
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-xl);
  background: var(--parchment);
}

.learn__intro {
  margin-top: var(--space-md);
}

.learn__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.learn__card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.learn__card p {
  margin-top: var(--space-sm);
}

.about-survey__body {
  margin-top: var(--space-md);
}

/* Charts: drawn by js/charts.js. Marks follow the data-viz specs: thin bars with
   4px rounded ends, solid hairline grids, and a 2px gap between donut segments.
   The two chart colors are slightly adjusted from the brand burgundy and rose so
   they pass the palette validator on this background. */

.chart {
  --chart-1: #8f2041;
  --chart-2: #fe7796;
  --chart-grid: #e6e2dd;
  --chart-muted: #4c463d;
  min-width: 0;
  margin: 0;
  padding: var(--space-lg);
  border: 1px solid var(--parchment);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.chart__title {
  margin: 0 0 var(--space-md);
  font: 600 18px/24px var(--font-heading);
}

.chart__axis-title {
  margin-bottom: var(--space-sm);
  color: var(--chart-muted);
  font-size: 14px;
  line-height: 20px;
}

.chart__axis-title--x {
  margin: var(--space-sm) 0 0;
  text-align: center;
}

.chart__caption {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--chart-grid);
  color: var(--chart-muted);
  font-size: 14px;
  line-height: 20px;
}

.chart__tick {
  position: absolute;
  color: var(--chart-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
}

.chart__value {
  position: absolute;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.chart__grid-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--chart-grid);
}

.chart__grid-line--vertical {
  top: 0;
  right: auto;
  bottom: 0;
  width: 1px;
  height: auto;
}

.chart__frame {
  padding: 24px 0 0 28px; /* room for the top value and the y-axis numbers */
}

.chart__area {
  position: relative;
  height: 240px;
}

.chart__tick--y {
  left: -28px;
  width: 20px;
  text-align: right;
  transform: translateY(50%);
}

.chart__columns,
.chart__column-labels {
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
}

.chart__columns {
  position: absolute;
  inset: 0;
}

.chart__slot {
  position: relative;
  cursor: default;
}

.chart__slot:focus-visible,
.chart__bar-row:focus-visible {
  outline-offset: 0;
  border-radius: var(--radius);
}

.chart__column {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 24px;
  border-radius: 4px 4px 0 0;
  background: var(--chart-1);
  transform: translateX(-50%);
  transition: opacity 0.15s;
}

.chart__slot:hover .chart__column,
.chart__bar-row:hover .chart__bar {
  opacity: 0.8;
}

.chart__value--column {
  left: 50%;
  margin-bottom: 2px;
  transform: translateX(-50%);
}

.chart__column-labels {
  margin-top: var(--space-sm);
}

.chart__column-label {
  padding-inline: 4px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.chart__bars {
  --label-width: clamp(112px, 42%, 220px);
  position: relative;
  padding-right: 20px; /* room for a value past the longest bar */
}

.chart__bar-grid {
  position: absolute;
  top: 0;
  right: 20px;
  bottom: 0;
  left: var(--label-width);
}

.chart__bar-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  align-items: center;
  min-height: 32px;
  cursor: default;
}

.chart__bar-label {
  padding: 4px var(--space-sm) 4px 0;
  font-size: 14px;
  line-height: 18px;
}

.chart__bar-track {
  position: relative;
  align-self: stretch;
}

.chart__bar {
  position: absolute;
  top: 50%;
  left: 0;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: var(--chart-1);
  transform: translateY(-50%);
  transition: opacity 0.15s;
}

.chart__value--bar {
  top: 50%;
  margin-left: 6px;
  padding-inline: 2px;
  background: var(--bone);
  transform: translateY(-50%);
}

.chart__bar-axis {
  position: relative;
  height: 20px;
  margin: 4px 20px 0 clamp(112px, 42%, 220px);
}

.chart__tick--x {
  top: 2px;
  transform: translateX(-50%);
}

.chart__donut {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
  justify-content: center;
}

.chart__donut-ring {
  position: relative;
  flex: none;
  width: 200px;
  height: 200px;
}

.chart__segment {
  fill: none;
  stroke-width: 28;
  pointer-events: stroke;
  outline: none;
  transition: stroke-width 0.15s;
}

.chart__segment:hover,
.chart__segment:focus-visible {
  stroke-width: 34;
}

.chart__segment--1,
.chart__swatch--1 {
  stroke: var(--chart-1);
  background: var(--chart-1);
}

.chart__segment--2,
.chart__swatch--2 {
  stroke: var(--chart-2);
  background: var(--chart-2);
}

.chart__donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.chart__donut-value {
  font: 700 32px/36px var(--font-heading);
  letter-spacing: -0.02em;
}

.chart__donut-label {
  color: var(--chart-muted);
  font-size: 14px;
  line-height: 20px;
}

.chart__legend {
  display: grid;
  gap: 12px;
}

.chart__legend-item {
  display: grid;
  grid-template-columns: 12px auto;
  gap: 0 var(--space-sm);
  align-items: center;
}

.chart__swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.chart__legend-name {
  font-weight: 600;
}

.chart__legend-value {
  grid-column: 2;
  color: var(--chart-muted);
  font-size: 14px;
  line-height: 20px;
}

.chart__data {
  margin-top: 12px;
  font-size: 14px;
  line-height: 20px;
}

.chart__data summary {
  width: fit-content;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.chart__data table {
  width: 100%;
  margin-top: var(--space-sm);
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.chart__data th,
.chart__data td {
  padding: 6px var(--space-sm) 6px 0;
  border-bottom: 1px solid var(--chart-grid);
  font-weight: 400;
  text-align: left;
}

.chart__data thead th {
  font-weight: 700;
}

.chart__data td:last-child,
.chart__data thead th:last-child {
  padding-right: 0;
  text-align: right;
}

.chart-tooltip {
  position: fixed;
  z-index: 20;
  display: grid;
  max-width: 240px;
  padding: var(--space-sm) 12px;
  border-radius: var(--radius);
  background: #32302d;
  color: #f5f0eb;
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip strong {
  font-size: 15px;
  line-height: 20px;
}

/* The Problem page */

.hero.hero--intro {
  height: auto;
  min-height: clamp(460px, 60vh, 600px);
  max-height: none;
  padding-top: calc(var(--header-height) + var(--space-lg));
}

.hero--intro .hero__video {
  object-position: center 30%;
}

.hero--intro .hero__content {
  padding-right: 88px; /* clears the video's pause button */
}

.hero--intro .hero__text {
  max-width: 920px;
}

.section--divided {
  margin-top: var(--space-xl);
  border-top: 1px solid var(--parchment);
}

.split--spaced {
  margin-top: var(--space-xl);
}

.problem__centered {
  text-align: center;
}

.content-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  object-fit: cover;
}

.fact-list {
  margin-top: var(--space-md);
  padding-left: 1.25em;
  list-style: disc;
}

.fact-list li + li {
  margin-top: 12px;
}

.blood-parts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: var(--space-lg);
  align-items: center;
  margin-top: var(--space-xl);
}

.blood-parts__lead {
  margin-top: var(--space-sm);
}

.blood-parts__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.blood-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.blood-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.blood-card__body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.blood-card__title {
  margin-bottom: 4px;
  font: 600 20px/28px var(--font-heading);
}

.blood-loss {
  margin-top: var(--space-xl);
}

.blood-loss__headline {
  font: 700 32px/1.15 var(--font-heading);
  letter-spacing: -0.02em;
}

.blood-loss__text {
  margin-top: var(--space-md);
}

.sources {
  margin-top: var(--space-md);
  color: #4c463d;
  font-size: 14px;
  line-height: 20px;
}

.sources a {
  color: var(--burgundy);
  text-underline-offset: 3px;
}

.pints {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pints span {
  display: block;
}

.pints__amount {
  font-size: 56px;
  line-height: 1.1;
}

.pints__equals {
  font-size: 32px;
  line-height: 1.4;
}

.pints__result {
  font-size: 36px;
  line-height: 1.15;
}

@media (min-width: 900px) {
  .problem .hero__text,
  .process .hero__text {
    font-size: var(--results-body);
    line-height: 1.45;
  }

  .blood-loss__headline {
    font-size: clamp(42px, 4.4vw, 56px);
  }

  .blood-card__title {
    font-size: clamp(20px, 1.9vw, 24px);
    line-height: 1.3;
  }

  .blood-card__body p {
    font-size: var(--results-small);
    line-height: 1.45;
  }

  .problem .sources {
    font-size: var(--results-small);
    line-height: 1.5;
  }

  .problem .fact-list li {
    font-size: var(--results-body);
    line-height: 1.5;
  }

  .pints__amount {
    font-size: clamp(64px, 6.9vw, 88px);
  }

  .pints__equals {
    font-size: clamp(36px, 3.8vw, 48px);
  }

  .pints__result {
    font-size: clamp(40px, 4.4vw, 56px);
  }
}

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

@media (max-width: 599px) {
  .blood-parts__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }
}

/* Donation Process page */

.button-primary {
  display: inline-flex;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--space-md);
  padding: 12px var(--space-lg);
  border-radius: var(--radius);
  background: var(--burgundy);
  color: var(--bone);
  font: 600 18px/24px var(--font-heading);
  text-decoration: none;
  transition: background-color 0.2s;
}

.button-primary:hover {
  background: var(--burgundy-dark);
}

.button-primary svg {
  width: 20px;
  height: 20px;
}

.steps {
  display: grid;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: center;
}

.step__heading {
  display: flex;
  gap: 12px;
  align-items: center;
}

.step__number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--burgundy);
  border-radius: var(--radius-full);
  font: 700 22px/1 var(--font-heading);
}

.content-image--wide {
  aspect-ratio: 16 / 9;
}

.eligibility {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.eligibility__title {
  margin-top: var(--space-md);
}

.benefits {
  display: grid;
  gap: var(--space-lg);
}

.benefits p {
  margin-top: 4px;
}

@media (min-width: 900px) {
  .eligibility__group--cats {
    order: -1; /* cats on the left, as in the wireframe */
  }

  .process .fact-list li {
    font-size: var(--results-mid);
    line-height: 1.45;
  }

  .button-primary {
    padding: 14px 28px;
    font-size: 22px;
    line-height: 28px;
  }
}

@media (max-width: 899px) {
  .step,
  .eligibility {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }
}

/* Our Initiative page */

.initiative__lead {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.attribution {
  color: #4c463d;
}

.hero--short .hero__image {
  object-position: center 40%;
}

#who-we-are {
  scroll-margin-top: calc(var(--header-height) + var(--space-md));
}

.goal-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.goal-card__title {
  margin-top: 12px;
  font: 600 20px/1.3 var(--font-heading);
}

.goal-card p {
  margin-top: 12px;
}

.bio {
  display: flow-root;
}

.bio--spaced {
  margin-top: var(--space-xl);
}

.bio__media--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.bio .fact-list li {
  margin-top: 12px;
}

.photo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: var(--space-md);
  border: 1px dashed var(--burgundy);
  border-radius: var(--radius-lg);
  background: var(--parchment);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

@media (min-width: 900px) {
  .bio__media {
    width: 36%;
    margin-bottom: var(--space-md);
  }

  .bio__media--right {
    float: right;
    margin-left: var(--space-xl);
  }

  .bio__media--left {
    float: left;
    margin-right: var(--space-xl);
  }

  .bio__media--pair {
    width: 46%;
  }

  .initiative .fact-list li {
    font-size: var(--results-body);
    line-height: 1.5;
  }

  .goal-card p {
    font-size: var(--results-small);
    line-height: 1.5;
  }

  .goal-card__title {
    font-size: clamp(20px, 1.72vw, 22px);
  }

  .photo-slot {
    font-size: var(--results-small);
    line-height: 1.4;
  }
}

.roles {
  margin-top: var(--space-xl);
}

.roles__cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.role-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.role-card__title {
  font: 600 20px/1.3 var(--font-heading);
}

.role-card p {
  margin-top: var(--space-sm);
}

@media (min-width: 900px) {
  .role-card__title {
    font-size: clamp(20px, 1.9vw, 24px);
  }

  .role-card p {
    font-size: var(--results-mid);
    line-height: 1.5;
  }
}

@media (max-width: 899px) {
  .roles__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }
}

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

@media (max-width: 899px) {
  .bio__media {
    margin-bottom: var(--space-lg);
  }
}

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

/* Personal Stories page: each story has its own background band, layout side and
   image shape, so it reads as separate from the one before it. */

.story {
  padding-block: 64px;
}

.story--parchment {
  background: var(--parchment);
}

.story--rose {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: #ffdae8;
}

.prose > .story__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--rose);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.story--rose .chip {
  background: var(--bone);
}

.chip--sample,
.story--rose .chip--sample {
  border: 1px dashed var(--burgundy);
  background: transparent;
}

.story__figure {
  margin: 0;
}

.story__figure--round img {
  width: min(100%, 440px);
  margin-inline: auto;
  border-radius: var(--radius-full);
  aspect-ratio: 1;
}

.story__figure--round .story__source {
  text-align: center;
}

.story__source {
  margin-top: var(--space-sm);
  color: #4c463d;
  font-size: 14px;
  line-height: 20px;
}

.story__quote {
  margin: var(--space-lg) 0 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--burgundy);
}

.story__quote p {
  margin-top: 0;
  font-family: var(--font-heading);
  font-weight: 500;
}

.story__quote cite {
  display: block;
  margin-top: var(--space-sm);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 20px;
}

@media (min-width: 900px) {
  .stories .prose .story__quote p {
    font-size: clamp(22px, 2.05vw, 26px);
    line-height: 1.35;
  }

  .story__quote cite,
  .story__source,
  .chip {
    font-size: var(--results-small);
    line-height: 1.4;
  }

  .stories .heading-lg + p {
    margin-top: var(--space-md);
  }
}

@media (max-width: 899px) {
  .story {
    padding-block: var(--space-xl);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Become a Donor page. The form's page paints white around its card, and a site
   can't restyle another site's page. So the frame is positioned inside a window
   cut just inside the card's edges: the form stays untouched, and everything
   around it is this page's own background.

   The numbers below were measured from Ragic's layout. If Ragic changes it, the
   crop needs re-measuring; the frame stays scrollable, so nothing becomes
   unreachable.
     Frame 815px wide: card at x 50-750, y 178-1438 (x shifts 7.5px when the
                       frame has no classic scrollbar, hence the 10px+ inset).
     Frame under 768px: card is the middle 90% of the frame, starting at y 72. */
.donor {
  padding-bottom: var(--space-xl);
}

.donor__intro {
  padding-block: var(--space-lg);
}

.donor__window {
  display: flow-root; /* keeps the frame's negative margin inside the window */
  width: min(680px, 100% - 40px);
  height: 1248px;
  margin-inline: auto;
  overflow: hidden;
  overflow: clip;
  border-radius: var(--radius-lg);
  outline: 1px solid var(--parchment);
  background: #fff;
}

.donor__form {
  display: block;
  width: 815px;
  height: 1432px;
  margin: -184px 0 0 -68px;
  border: 0;
}

/* After a submit: the plain, uncropped frame. */
.donor__window.is-uncropped {
  width: 100%;
  height: auto;
  border-radius: 0;
  outline: 0;
}

.donor__window.is-uncropped .donor__form {
  width: 100%;
  height: max(600px, calc(100vh - var(--header-height)));
  margin: 0;
}

@media (max-width: 719px) {
  .donor__window {
    height: 1252px;
  }

  .donor__form {
    width: calc((100% + 4px) / 0.9);
    height: 1328px;
    margin: -76px 0 0 calc(((100% + 4px) / 0.9) * -0.05 - 2px);
  }
}

@media (max-width: 494px) {
  .donor__window {
    height: 1300px;
  }

  .donor__form {
    height: 1376px;
  }
}

/* Narrow desktop windows: a classic scrollbar inside the frame moves the card
   7.5px left. Phones use overlay scrollbars, so this doesn't apply to them. */
@media (max-width: 719px) and (pointer: fine) {
  .donor__form {
    margin-left: calc(((100% + 4px) / 0.9) * -0.05 + 5.5px);
  }
}

/* Survey page. The form scrolls inside a box sized to fit below the header, so
   the whole box stays on screen and Google's confirmation shows after sending. */
.survey__intro {
  margin-top: var(--space-md);
}

.survey__form {
  max-width: 920px;
  margin: var(--space-xl) auto 0;
  overflow: hidden;
  border: 1px solid var(--parchment);
  border-radius: var(--radius-lg);
  background: #fff;
}

.survey__form iframe {
  display: block;
  width: 100%;
  height: max(640px, calc(100vh - var(--header-height) - 48px));
  border: 0;
}

.survey__fallback {
  margin-top: var(--space-md);
  text-align: center;
}

.survey__fallback a {
  text-underline-offset: 3px;
}

/* Results and survey pages on desktop: larger text, so the columns beside each
   graph fill their space. Sizes follow the window up to the full 1140px width. */
@media (min-width: 900px) {
  .results,
  .survey,
  .donor,
  .problem,
  .process,
  .initiative,
  .stories {
    --results-body: clamp(19px, 1.875vw, 24px);
    --results-mid: clamp(18px, 1.72vw, 22px);
    --results-small: clamp(15px, 1.33vw, 17px);
  }

  .results .split,
  .problem .split,
  .stories .split {
    align-items: center;
  }

  .results .heading-lg,
  .survey .heading-lg,
  .problem .heading-lg,
  .process .heading-lg,
  .initiative .heading-lg,
  .stories .heading-lg {
    font-size: clamp(34px, 3.44vw, 44px);
    line-height: 1.2;
  }

  .results .heading-md,
  .problem .heading-md,
  .process .heading-md,
  .initiative .heading-md {
    font-size: clamp(26px, 2.5vw, 32px);
    line-height: 1.25;
  }

  .results .chart__area {
    height: 210px;
  }

  .results .results-intro__heading {
    font-size: clamp(42px, 4.4vw, 56px);
  }

  .results .body-lg,
  .results .prose p,
  .survey .body-lg,
  .donor .body-lg,
  .problem .body-lg,
  .problem .prose p:not(.sources),
  .process .body-lg,
  .process .prose p,
  .initiative .prose p,
  .initiative .body-lg,
  .stories .prose p {
    font-size: var(--results-body);
    line-height: 1.5;
  }

  .results .learn__card p,
  .results .about-survey__body p {
    font-size: var(--results-mid);
    line-height: 1.5;
  }

  .results .key-stat__number {
    font-size: clamp(48px, 5vw, 64px);
    line-height: 1.1;
  }

  .results .key-stat__text {
    font-size: var(--results-small);
    line-height: 1.45;
  }

  .about-survey__body {
    columns: 2;
    column-gap: var(--space-xl);
  }

  .about-survey__body p {
    break-inside: avoid;
  }

  .about-survey__body > :first-child {
    margin-top: 0;
  }

  .about-survey__body p:nth-child(3) {
    break-before: column;
    margin-top: 0;
  }

  .results .chart__title {
    font-size: clamp(19px, 1.72vw, 22px);
    line-height: 1.3;
  }

  .results .chart__axis-title,
  .results .chart__caption,
  .results .chart__data {
    font-size: var(--results-small);
    line-height: 1.45;
  }

  .results .chart__value,
  .results .chart__column-label,
  .results .chart__bar-label,
  .results .chart__legend-value {
    font-size: var(--results-small);
    line-height: 1.35;
  }

  .results .chart__tick {
    font-size: 15px;
    line-height: 18px;
  }

  .results .chart__legend-name {
    font-size: var(--results-body);
  }

  .results .chart__bars {
    --label-width: clamp(112px, 46%, 240px);
    padding-right: 28px;
  }

  .results .chart__bar-grid {
    right: 28px;
  }

  .results .chart__bar-row {
    min-height: 34px;
  }

  .results .chart__bar-axis {
    margin-right: 28px;
    margin-left: clamp(112px, 46%, 240px);
  }

  .results .chart__donut-ring {
    width: 230px;
    height: 230px;
  }

  .results .chart__donut-value {
    font-size: 40px;
    line-height: 44px;
  }

  .results .chart__donut-label {
    font-size: var(--results-small);
    line-height: 1.35;
  }
}

@media (max-width: 899px) {
  .results-intro {
    display: block;
    padding-top: var(--space-xl);
  }

  .results-intro__card {
    margin-top: var(--space-lg);
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .split--figure-first .chart {
    order: 0;
  }

  .learn__cards {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Footer: main slides up off a footer pinned behind it. js/site.js adds the
   --reveal class only when the footer fits in the window, because a pinned
   footer taller than the window would have its top cut off. */

.site-footer {
  position: relative;
  margin-top: calc(var(--radius-xl) * -1);
  padding-top: calc(var(--space-xl) + var(--radius-xl));
  padding-bottom: var(--space-xl);
  background: var(--parchment);
}

.site-footer--reveal {
  position: sticky;
  bottom: 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 7fr);
  gap: var(--space-xl) var(--space-lg);
  align-items: start;
}

.site-footer__heading {
  margin: 0 0 var(--space-md);
  font: 700 18px/24px var(--font-heading);
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.site-footer__list a {
  overflow-wrap: anywhere;
}

.site-footer__list {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.site-footer__list a {
  text-underline-offset: 3px;
}

.site-footer__list a:hover {
  text-decoration-thickness: 2px;
}

.site-footer__hours {
  margin-top: var(--space-sm);
}

.site-footer__label {
  display: block;
  font-weight: 600;
}

.site-footer__map {
  display: block;
  width: 100%;
  height: 140px;
  margin-bottom: var(--space-md);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bone);
}

/* Narrow screens */

@media (max-width: 1023px) {
  .hero__content {
    padding-inline: 20px;
  }

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

  .site-footer__group--doolb {
    grid-column: 1 / -1;
  }
}

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

@media (max-width: 767px) {
  .hero {
    height: 72vh;
    height: 72svh;
    min-height: 520px;
  }

  /* Cropped to phone width, this keeps the dog and the high-five in frame. */
  .hero__video {
    object-position: 35% center;
  }

  .hero__content {
    padding-bottom: var(--space-lg);
  }

  .hero__title {
    font-size: clamp(36px, 10.5vw, 56px);
  }

  .hero__text {
    padding-right: 52px;
    font-size: 16px;
    line-height: 24px;
  }

  .hero__video-toggle {
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .intro {
    display: block;
    padding-top: var(--space-xl);
  }

  .intro__image {
    margin-top: var(--space-lg);
  }

  .intro__problem {
    margin-top: var(--space-xl);
  }

  .heading-lg {
    font-size: 26px;
    line-height: 32px;
  }

  .body-lg {
    font-size: 16px;
    line-height: 24px;
  }

  .stats,
  .cards,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: var(--space-md);
  }

  .cards {
    gap: var(--space-md);
    margin-top: var(--space-md);
  }

  .card {
    aspect-ratio: 16 / 10;
  }

  .site-footer__grid {
    gap: var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
