:root {
  color-scheme: light;
  --red-900: #6f0710;
  --red-800: #8f0d18;
  --red-700: #b51320;
  --red-600: #d81f2f;
  --red-100: #ffe8ea;
  --red-050: #fff4f5;
  --ink: #221516;
  --muted: #6e5b5d;
  --line: #ead3d6;
  --paper: #ffffff;
  --surface: #fffafa;
  --shadow: 0 22px 70px rgba(111, 7, 16, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(216, 31, 47, 0.12), transparent 30%),
    linear-gradient(180deg, var(--red-050) 0%, #ffffff 44%, #fff8f8 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(181, 19, 32, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(111, 7, 16, 0.92), rgba(181, 19, 32, 0.82)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 28px);
  box-shadow: var(--shadow);
  color: #ffffff;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 420px;
  padding: clamp(28px, 6vw, 72px);
}

.profile-photo {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #ffd6da);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo__fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--red-700);
  font-size: clamp(3.6rem, 12vw, 6rem);
  font-weight: 800;
}

.profile-photo.is-missing img {
  display: none;
}

.profile-photo.is-missing .profile-photo__fallback {
  display: grid;
}

.hero__copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 8vw, 6.6rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.intro {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.identity-grid div,
.metrics article,
.panel,
.status-panel {
  border: 1px solid rgba(181, 19, 32, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.identity-grid div {
  min-width: 0;
  padding: 16px;
  color: var(--ink);
}

.identity-grid span,
.metrics span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.identity-grid strong,
.metrics strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.status-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 245, 0.98)),
    var(--paper);
  box-shadow: 0 18px 46px rgba(111, 7, 16, 0.12);
}

.logo-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 22px;
}

.logo-strip__item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 112px;
  padding: 16px 20px;
  border: 1px solid rgba(181, 19, 32, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(111, 7, 16, 0.08);
  color: var(--ink);
  text-decoration: none;
}

.logo-strip__item img {
  display: block;
  width: 74px;
  max-height: 74px;
  object-fit: contain;
}

.logo-strip__item--wide {
  grid-template-columns: minmax(160px, 220px) 1fr;
}

.logo-strip__item--wide img {
  width: min(220px, 100%);
  max-height: 58px;
}

.logo-strip__item span {
  color: var(--red-900);
  font-weight: 850;
  line-height: 1.3;
}

.status-panel .eyebrow,
.section-heading .eyebrow {
  color: var(--red-700);
}

.eligibility-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 24px 26px;
  border: 1px solid rgba(143, 13, 24, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(143, 13, 24, 0.2);
}

.eligibility-card::after {
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 16px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.eligibility-card__label,
.eligibility-card__detail {
  position: relative;
  z-index: 1;
  display: block;
}

.eligibility-card__label {
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.eligibility-card__main {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: clamp(2.35rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.eligibility-card__detail {
  max-width: 520px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
}

.eligibility-card.is-ready {
  border-color: rgba(23, 96, 43, 0.2);
  background: linear-gradient(135deg, #17602b, #2d9b4b);
  box-shadow: 0 18px 42px rgba(23, 96, 43, 0.18);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.metrics article {
  min-height: 118px;
  padding: 20px;
  background: var(--paper);
}

.metrics strong {
  color: var(--red-800);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
}

.blood-feature {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(181, 19, 32, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(143, 13, 24, 0.96), rgba(216, 31, 47, 0.9)),
    var(--red-800);
  color: #ffffff;
  overflow: hidden;
}

.blood-feature .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.blood-feature__visual {
  display: grid;
  gap: 18px;
  place-items: center;
  min-height: 280px;
}

.donor-card {
  position: relative;
  display: grid;
  align-content: center;
  width: min(100%, 300px);
  min-height: 260px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 243, 0.9));
  box-shadow: 0 26px 58px rgba(70, 0, 8, 0.28);
  color: var(--red-900);
}

.donor-card::before {
  position: absolute;
  inset: auto -24px -54px;
  height: 124px;
  background:
    linear-gradient(90deg, rgba(216, 31, 47, 0.92), rgba(143, 13, 24, 0.96));
  content: "";
  animation: clinicalLevel 5.8s ease-in-out infinite;
}

.donor-card::after {
  position: absolute;
  inset: auto 22px 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.46);
  content: "";
}

.donor-card__label,
.donor-card__meta,
.donor-card strong {
  position: relative;
  z-index: 1;
}

.donor-card__label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.donor-card strong {
  margin-top: 8px;
  font-size: clamp(5.4rem, 14vw, 8.4rem);
  line-height: 0.9;
}

.donor-card__meta {
  max-width: 210px;
  margin-top: 14px;
  color: rgba(111, 7, 16, 0.74);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.donor-card__level {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  width: 10px;
  height: 70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.donor-card__level::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46px;
  border-radius: inherit;
  background: #ffffff;
  content: "";
  animation: levelPulse 5.8s ease-in-out infinite;
}

.donor-flow {
  display: grid;
  grid-template-columns: auto minmax(66px, 112px) auto;
  gap: 12px;
  align-items: center;
  width: min(100%, 300px);
}

.donor-flow span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
}

.donor-flow i {
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.donor-flow i::after {
  position: absolute;
  inset: 0;
  width: 45%;
  background: #ffffff;
  content: "";
  animation: flowLine 2.4s ease-in-out infinite;
}

.blood-feature__content p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
  line-height: 1.7;
}

.compatibility-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 14px;
  margin-top: 22px;
}

.compatibility-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.compatibility-card span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.compatibility-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compatibility-card li {
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--red-800);
  font-weight: 900;
  text-align: center;
}

.compatibility-card--receive li {
  min-width: 72px;
}

.compatibility-note {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 22px;
  margin-top: 22px;
}

.panel {
  padding: clamp(22px, 4vw, 34px);
  background: var(--paper);
}

.section-heading {
  margin-bottom: 22px;
}

.donation-ledger {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.donation-ledger table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.donation-ledger th,
.donation-ledger td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.donation-ledger th {
  background: var(--red-050);
  color: var(--red-900);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.donation-ledger td {
  color: var(--ink);
  font-weight: 650;
}

.donation-ledger tr:last-child td {
  border-bottom: 0;
}

.donation-ledger td:first-child,
.donation-ledger th:first-child {
  width: 62px;
  color: var(--muted);
  text-align: center;
}

.donation-ledger td:nth-child(2) {
  color: var(--red-800);
  font-weight: 850;
}

.donation-ledger tr.is-latest td {
  background: #fff1f2;
}

.donation-ledger tr.is-latest td:first-child {
  color: var(--red-800);
}

.empty-ledger {
  padding: 22px;
  color: var(--muted);
}

.info-panel p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.side-stack {
  display: grid;
  gap: 22px;
}

.service-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.service-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.service-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.service-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.note {
  margin-top: 24px;
  padding: 18px;
  border-left: 5px solid var(--red-700);
  border-radius: 8px;
  background: var(--red-050);
}

.note span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
  text-transform: uppercase;
}

.note strong {
  display: block;
  margin-top: 7px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .hero__content,
  .logo-strip,
  .blood-feature,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero__content {
    align-items: start;
  }

  .profile-photo {
    width: min(220px, 72vw);
  }

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

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

  .blood-feature__visual {
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .hero__content {
    padding: 24px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.25rem);
  }

  .identity-grid,
  .metrics,
  .status-panel {
    grid-template-columns: 1fr;
  }

  .logo-strip__item,
  .logo-strip__item--wide {
    grid-template-columns: 64px 1fr;
    padding: 14px 16px;
  }

  .logo-strip__item img,
  .logo-strip__item--wide img {
    width: 64px;
    max-height: 64px;
  }

  .compatibility-grid {
    grid-template-columns: 1fr;
  }

  .donation-ledger {
    overflow-x: visible;
  }

  .donation-ledger table,
  .donation-ledger thead,
  .donation-ledger tbody,
  .donation-ledger tr,
  .donation-ledger td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .donation-ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .donation-ledger tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .donation-ledger tr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .donation-ledger tr.is-latest {
    border-color: rgba(181, 19, 32, 0.28);
    background: #fff1f2;
  }

  .donation-ledger th,
  .donation-ledger td,
  .donation-ledger tr:last-child td {
    border-bottom: 0;
  }

  .donation-ledger td {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    padding: 7px 0;
    text-align: left;
  }

  .donation-ledger td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .donation-ledger td:first-child,
  .donation-ledger th:first-child {
    width: auto;
    text-align: left;
  }
}

@keyframes clinicalLevel {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes levelPulse {
  0% {
    height: 42px;
  }

  50% {
    height: 58px;
  }

  100% {
    height: 42px;
  }
}

@keyframes flowLine {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(230%);
  }
}
