/* TransplantCheck, idea A (check-in front door), Nov 2, 2026.
   One column, big type, light only. The colors and fonts are the approved
   look; the layout is new. Made for tools/build_site.py. */

@font-face {
  font-family: "Kalam";
  src: url("/assets/kalam-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: only light;
  --paper: #f5f0e6;
  --card: #fffdf9;
  --ink: #202c29;
  --soft: #52645c;
  --brick: #8c3528;
  --deep: #152522;
  --green: #263d35;
  --teal: #235e4d;
  --sand: #e7e0d3;
  --sand-2: #ece9dd;
  --navy: #23364a;
  --line: #d6ccba;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Kalam", "Bradley Hand", "Segoe Print", cursive;
  --read: 42.5rem;
  --wide: 82rem;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --shadow: 0 6px 24px rgb(21 37 34 / 0.12);
  --head: 65px;
}

/* Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--sans);
  overflow-wrap: break-word;
}
@media (max-width: 599px) { body { font-size: 1.125rem; } }

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.625rem, 1.35rem + 1vw, 1.875rem); }
h3 { font-size: 1.3125rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0.35em 0; }
li::marker { color: var(--brick); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--deep); color: var(--card); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.small, figcaption, .caption { font-size: 0.9375rem; line-height: 1.5; color: var(--soft); }
.next { font-weight: 600; text-decoration: none; }
.next { display: inline-block; padding: 10px 0; }
.go { padding-block: 12px; }
.nw { white-space: nowrap; }
.next:hover { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  background: var(--brick); color: #fff; font: 600 1.125rem/1.2 var(--sans); text-decoration: none;
}
.button:hover { background: #6f291f; color: #fff; }

/* Header ---------------------------------------------------------------- */

.site-head { position: relative; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter);
  min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
}
.brand { font: 400 1.375rem/1 var(--serif); color: var(--deep); text-decoration: none; padding: 12px 0; }
.brand:hover { color: var(--deep); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.menu li { margin: 0; }
.menu a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); font: 500 1rem/1.3 var(--sans); text-decoration: none;
}
.menu a:hover { background: var(--sand-2); color: var(--deep); }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.menu-talk a { margin-left: 8px; padding: 8px 18px; border: 2px solid var(--brick); color: var(--brick); }
.menu-talk a:hover { background: var(--brick); color: #fff; }
.menu-button { display: none; }

@media (max-width: 759px) {
  .js .menu-button {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
    border: 2px solid var(--green); border-radius: 999px; background: var(--card);
    color: var(--deep); font: 600 1rem/1 var(--sans); cursor: pointer;
  }
  .js .menu { display: none; }
  .js .site-head.open .menu {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px var(--gutter) 20px;
  }
  .js .site-head.open .menu a { padding: 14px 8px; border-radius: 8px; font-size: 1.125rem; }
  .js .site-head.open .menu-talk a { margin: 10px 0 0; text-align: center; }
}

/* Front door ------------------------------------------------------------- */

.door-in { display: grid; grid-template-areas: "film" "copy"; }
.door-film { grid-area: film; position: relative; margin: 0; background: var(--deep); overflow: hidden; }
.door-film video { width: 100%; aspect-ratio: 16 / 9; max-height: 30svh; object-fit: cover; }
@media (min-width: 600px) { .door-film video { max-height: 42svh; } }
@media (max-width: 599px) and (max-height: 700px) { .door-film video { max-height: 26svh; } }
.film-toggle {
  position: absolute; left: 12px; bottom: 12px;
  min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: rgb(21 37 34 / 0.82); color: #fff; font: 600 0.9375rem/1 var(--sans); cursor: pointer;
}
.film-toggle:hover { background: var(--deep); }

.door-copy { grid-area: copy; padding: 16px var(--gutter) 28px; }
.door h1 { font-size: clamp(1.75rem, 1rem + 2.4vw, 3rem); line-height: 1.1; margin: 0 0 0.45em; }
.door-ask { font: 600 1.3125rem/1.3 var(--sans); color: var(--brick); margin: 0 0 10px; }
.doors { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.doors li { margin: 0; }
.door-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 10px 20px;
  background: var(--card); border: 2px solid var(--green); border-radius: 14px;
  color: var(--deep); font: 600 1.1875rem/1.25 var(--sans); text-decoration: none;
}
.door-link::after { content: "→"; color: var(--brick); font-size: 1.375rem; line-height: 1; }
.door-link:hover { background: var(--green); color: var(--card); }
.door-link:hover::after { color: var(--card); }
/* The smallest phones (320 x 568) still show all three doors on the first
   screen. After the rules above, so it wins. */
@media (max-width: 359px) {
  .door-link { min-height: 50px; padding: 10px 14px; font-size: 1.125rem; }
  .doors { gap: 6px; }
}
.door-watch { margin: 0; }
.door-watch a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: none; }
.door-watch a:hover { text-decoration: underline; }

.play-icon {
  flex: none; width: 0; height: 0;
  border-left: 13px solid var(--brick); border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}

@media (min-width: 960px) {
  .door-in {
    grid-template-areas: "copy film";
    grid-template-columns: minmax(0, clamp(22rem, 36vw, 32rem)) minmax(0, 1fr);
    column-gap: clamp(32px, 4vw, 56px);
    align-items: center;
    min-height: calc(100svh - var(--head));
    padding-left: max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter)));
  }
  .door-copy { padding: 40px 0; }
  .door-film { border-radius: 24px 0 0 24px; box-shadow: var(--shadow); }
  .door-film video { max-height: none; }
  .film-toggle { left: 16px; bottom: 16px; }
}

.strip { max-width: var(--read); margin: 0 auto; padding: 56px var(--gutter) 16px; }
.strip-lede { font: 400 clamp(1.5rem, 1.25rem + 1vw, 1.875rem)/1.3 var(--serif); color: var(--deep); margin-bottom: 0.6em; }

.story { max-width: 60rem; margin: 0 auto; padding: 40px var(--gutter) 80px; }
.story h2 small { display: block; margin-top: 6px; font: 400 0.9375rem/1.4 var(--sans); color: var(--soft); }
.story-film { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--deep); }

.fold {
  margin: 20px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px;
}
.fold > summary {
  cursor: pointer; padding: 14px 0; min-height: 52px; display: flex; align-items: center;
  font-weight: 600; color: var(--deep);
}
.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.fold ol { padding-left: 1.4em; }

/* Inner pages ------------------------------------------------------------ */

.page { max-width: var(--read); margin: 0 auto; padding: 40px var(--gutter) 80px; }
.eyebrow { font: 600 0.9375rem/1.4 var(--sans); color: var(--soft); margin: 0 0 10px; }
.lead { font-size: 1.3125rem; line-height: 1.5; }
.family {
  margin: 0 0 8px; padding: 12px 16px;
  background: var(--sand-2); border-left: 4px solid var(--brick); border-radius: 0 12px 12px 0;
}
.family:target { background: #f2dfd4; }

.steps { list-style: none; margin: 28px 0 20px; padding: 0; display: grid; gap: 10px; }
.steps li { margin: 0; }
.steps a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: 76px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none;
}
.steps a::after { content: "→"; color: var(--brick); font-size: 1.375rem; line-height: 1; }
.steps a:hover { border-color: var(--green); box-shadow: var(--shadow); }
.step-num {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: var(--card); font: 400 1.3125rem/1 var(--serif);
}
.step-name { display: block; font: 600 1.1875rem/1.3 var(--sans); color: var(--deep); }
.step-voice { display: block; margin-top: 2px; font: 700 1.125rem/1.35 var(--hand); color: var(--navy); }

.section { margin: 56px 0 0; }
.section > h2:first-child { margin-top: 0; }
.note { color: var(--soft); }

/* Step page -------------------------------------------------------------- */

.crumbs { font-size: 0.9375rem; color: var(--soft); margin: -12px 0 2px; }
.crumbs a { display: inline-block; min-height: 44px; padding-block: 12px; color: var(--soft); }
.voice { margin: 0 0 28px; }
.voice p { margin: 0; font: 700 1.5rem/1.3 var(--hand); color: var(--navy); }
.voice footer { margin-top: 4px; font-size: 0.9375rem; color: var(--soft); }

.chapter { margin: 0 0 36px; }
.chapter-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--deep); }
.chapter-frame img, .chapter-frame video { width: 100%; height: 100%; object-fit: cover; }
.chapter-frame .chapter-play { position: absolute; left: 14px; bottom: 14px; box-shadow: 0 4px 16px rgb(0 0 0 / 0.3); }
.chapter-play {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 18px 10px 16px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--deep); font: 600 1rem/1.2 var(--sans); text-align: left; cursor: pointer;
}
.chapter-play:hover { background: #fff; }
.chapter figcaption { margin-top: 8px; }
.chapter-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.chapter-list li { margin: 0; }
.chapter-list .chapter-play { width: 100%; border: 1px solid var(--line); }
.chapter-list .chapter-play[aria-current="true"] { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.chapter-list .time { margin-left: auto; font-weight: 400; color: var(--soft); }

.cite { font-size: max(15px, 0.8em); line-height: 0; }
.cite a { font-weight: 600; text-decoration: none; padding: 0 2px; }
.cite-sep { font-size: max(15px, 0.8em); line-height: 0; color: var(--teal); }
.cite-sep::before { content: ","; }
.questions { margin: 36px 0 0; border-top: 1px solid var(--line); }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary {
  list-style: none; cursor: pointer; position: relative; padding: 18px 44px 18px 0;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary h2 { margin: 0; font-size: 1.3125rem; line-height: 1.3; }
.questions summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: 400 1.75rem/1 var(--sans); color: var(--brick);
}
.questions details[open] summary::after { content: "–"; }
.questions .qa-body { padding: 0 0 18px; }

.helps { margin: 44px 0 0; padding: 22px 24px; background: var(--sand-2); border-radius: var(--radius); }
.helps h2 { font-size: 1.3125rem; }
.helps p:last-child { margin: 0; }

.sources { margin: 44px 0 0; }
.sources li { font-size: 0.9375rem; line-height: 1.5; }

.step-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 44px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.step-nav a { display: block; padding: 8px 0; font-weight: 600; text-decoration: none; }
.step-nav a:hover { text-decoration: underline; }
.step-nav .small { display: block; font-weight: 400; }
.step-nav [rel="next"] { text-align: right; grid-column: 2; }

/* Dialysis teams page ---------------------------------------------------- */

.drawing { margin: 24px 0; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.drawing img { margin: 0 auto; }
.drawing figcaption { padding: 10px 4px 0; }
.pair { display: grid; gap: 12px; }
@media (min-width: 600px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; }
.pair figcaption { padding: 6px 4px 0; }

.quotes { margin: 24px 0; padding: 18px 22px; background: var(--card); border-left: 4px solid var(--navy); border-radius: 0 12px 12px 0; }
.quotes p { margin: 0 0 6px; font: 700 1.3125rem/1.35 var(--hand); color: var(--navy); }
.quotes figcaption { margin-top: 8px; }
.pull { margin: 24px 0; }
.pull p { margin: 0; font: 700 1.5rem/1.3 var(--hand); color: var(--navy); }
.pull footer { margin-top: 4px; font-size: 0.9375rem; color: var(--soft); }

.fact { margin: 16px 0; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; }
.fact-label { font: 600 0.9375rem/1.4 var(--sans); color: var(--teal); margin: 0 0 6px; }
.fact p:last-child { margin: 0; }

.screen { margin: 24px 0; display: grid; gap: 16px; }
@media (min-width: 600px) { .screen { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.screen figure { margin: 0; }
.phone { max-width: 220px; }
.screen img { border-radius: 22px; box-shadow: var(--shadow); }

.pilot { margin: 64px 0 0; padding: 32px 28px; background: var(--deep); color: #ece7dc; border-radius: var(--radius); }
.pilot h2 { color: var(--card); }
.pilot .caption { color: #c9d1cc; margin: 18px 0 0; }

/* Drawings with motion: the shapes are inline; motion.css moves them. */

.dw { display: block; width: 100%; height: auto; }
.drawing.motion { overflow: hidden; }
.motion-control { margin: 24px 0 0; }
.motion-toggle {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px;
  border: 2px solid var(--green); border-radius: 999px; background: var(--card);
  color: var(--deep); font: 600 1rem/1 var(--sans); cursor: pointer;
}
.motion-toggle:hover { background: var(--green); color: var(--card); }
@media (prefers-reduced-motion: reduce) { .motion-control { display: none; } }
.step-drawing { margin: 0 0 36px; }

/* Answers ---------------------------------------------------------------- */

.qa { margin: 0 0 8px; }
.qa > h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.75rem); }
.qa h3, .qa-body h3 { font-size: 1.1875rem; margin-top: 1.4em; }
.subpage { margin: 28px 0 0; }
.subpage a {
  display: block; padding: 16px 20px; background: var(--card);
  border: 2px solid var(--green); border-radius: 14px;
  color: var(--deep); font: 600 1.1875rem/1.35 var(--sans); text-decoration: none;
}
.subpage a::after { content: " →"; color: var(--brick); }
.subpage a:hover { background: var(--green); color: var(--card); }
.subpage a:hover::after, .subpage a:hover .small { color: var(--card); }
.subpage .small { display: block; margin-bottom: 2px; font-weight: 400; }
.page-facts h3 { font-size: 1.1875rem; }
.page-facts ul { margin-bottom: 18px; }

dl { margin: 0 0 1em; }
dt { margin: 18px 0 0; font-weight: 600; color: var(--deep); }
dd { margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button.quiet { background: transparent; color: var(--brick); border: 2px solid var(--brick); }
.button.quiet:hover { background: var(--brick); color: #fff; }
.links { list-style: none; padding: 0; }
.links li { margin: 0; }
.links a, .standalone > a { display: inline-block; min-height: 44px; padding-block: 10px; }

/* Transplant centers: a table on computers, one card per program on phones. */

.wide-page { max-width: var(--wide); }
.read { max-width: var(--read); margin-inline: auto; }
.state { max-width: 72rem; margin: 48px auto 0; }
.programs {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem;
}
.programs caption { caption-side: top; text-align: left; padding: 0 0 12px; font-size: 0.9375rem; line-height: 1.5; color: var(--soft); }
.programs th, .programs td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.programs tbody tr:last-child > * { border-bottom: 0; }
.programs thead th { font: 600 0.9375rem/1.3 var(--sans); color: var(--deep); background: var(--sand-2); }
.programs thead th:first-child { border-top-left-radius: var(--radius); }
.programs thead th:last-child { border-top-right-radius: var(--radius); }
.programs tbody th { font-weight: 600; color: var(--deep); }
/* Only the links themselves: a source number stays small, beside its link. */
.programs td > a { display: inline-block; min-height: 44px; padding-block: 10px; }

/* On phones, a short card per program: its name; where and who; the three
   counts side by side; then its links. Each value sits under its label. */
@media (max-width: 1023px) {
  .programs, .programs tbody, .programs th, .programs td { display: block; }
  .programs { background: none; border: 0; font-size: 1.125rem; }
  .programs caption { display: block; }
  .programs thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .programs tr {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px;
    margin: 0 0 12px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  }
  .programs tbody th { grid-column: 1 / -1; padding: 0; border: 0; font-size: 1.1875rem; line-height: 1.3; }
  .programs td { grid-column: span 3; padding: 0; border: 0; line-height: 1.35; }
  .programs td[data-label="Waiting list"], .programs td[data-label="Deceased donor"], .programs td[data-label="Living donor"] {
    grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between;
  }
  .programs td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--soft);
  }
}

/* Site map and moved pages ------------------------------------------------ */

.map, .map ul, .map ol { padding-left: 1.25em; }
.map > li { margin: 0 0 28px; }
.map > li > a { font: 600 1.25rem/1.4 var(--sans); }
.map h2 { margin: 18px 0 8px; font-size: 1.5rem; }
.map a { display: inline-block; min-height: 44px; padding-block: 10px; }
.map .sub > a { font-weight: 600; }

/* Footer ----------------------------------------------------------------- */

.site-foot { background: var(--deep); color: #e7e2d6; }
.foot-in { max-width: var(--wide); margin: 0 auto; padding: 40px var(--gutter) 48px; }
.foot-brand { font: 400 1.375rem/1.2 var(--serif); color: var(--card); margin: 0 0 4px; }
.foot-by { margin: 0 0 14px; font-size: 0.9375rem; color: #c9d1cc; }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-links li { margin: 0; }
.foot-links a { display: inline-block; padding: 10px 0; color: #e7e2d6; font-size: 1rem; }
.foot-links a:hover { color: #fff; }
