/* pd-studies.com
   Audience: people living with Parkinson's and their caregivers.
   Look: Zhittya Genesis Medicine's own colors (oxblood, deep brown, taupe, cream) and typefaces
   (Manrope for headings, Nunito Sans for text), as used on zgm.care.
   Rules this file enforces: body text 20px (never under 18px), tap targets at least 48px,
   contrast at AA or better, visible focus, nothing moves on its own. */

@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 1000; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --oxblood: #963230;
  --oxblood-deep: #7a2826;
  --ink: #40140f;
  --text: #3a201b;
  --soft: #6b4f49;
  --taupe: #c5bbb9;
  --taupe-soft: #ddd5d2;
  --cream: #f7f1ed;
  --cream-2: #efe6e0;
  --white: #ffffff;
  --rule: #dccfc9;
  --on-dark: #f6ece8;
  --error: #a3261a;

  --sans: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Manrope", "Nunito Sans", "Segoe UI", system-ui, sans-serif;

  --measure: 66ch;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --wide: 74rem;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(64, 20, 15, 0.06), 0 8px 28px rgba(64, 20, 15, 0.08);
  --bar-h: 0px; /* set by script when the bottom bar is showing */
}

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

html {
  font-size: 125%; /* 20px base */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  scroll-padding-bottom: calc(var(--bar-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  padding-bottom: var(--bar-h);
}

img, svg, iframe { max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.4rem; margin-top: 2em; letter-spacing: -0.01em; }
h4 { font-size: 1.15rem; margin-top: 1.6em; letter-spacing: -0.005em; }
p, ul, ol, dl, figure, blockquote { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.45em; }
strong { font-weight: 800; }

a { color: var(--oxblood); text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
a:hover { color: var(--oxblood-deep); text-decoration-thickness: 0.16em; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--white);
  border-radius: 4px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--white); box-shadow: 0 0 0 3px var(--ink); }

.skip {
  position: absolute; left: 0.75rem; top: -6rem; z-index: 100;
  background: var(--white); color: var(--ink); padding: 0.9rem 1.2rem; font-weight: 800;
}
.skip:focus { top: 0.75rem; }

.vh {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
html:not(.js) .js-only { display: none; }

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.lede { font-size: 1.2rem; line-height: 1.5; }
.muted { color: var(--soft); }
.small { font-size: 0.9rem; } /* 18px: the floor */
.eyebrow {
  font: 800 0.9rem/1.3 var(--display); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--oxblood); margin: 0 0 0.8rem;
}
.on-dark .eyebrow { color: var(--on-dark); }

/* ---------- Buttons: pills, as on zgm.care ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 56px; padding: 0.7rem 1.7rem;
  font: 700 1.05rem/1.2 var(--display);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn-big { min-height: 64px; padding: 0.8rem 2.1rem; font-size: 1.15rem; }
.btn-primary { background: var(--oxblood); color: var(--white); border-color: var(--oxblood); }
.btn-primary:hover { background: var(--oxblood-deep); border-color: var(--oxblood-deep); color: var(--white); }
.btn-quiet { background: var(--white); color: var(--oxblood); border-color: var(--oxblood); }
.btn-quiet:hover { background: var(--cream); color: var(--oxblood-deep); border-color: var(--oxblood-deep); }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-light:hover { background: var(--cream-2); border-color: var(--cream-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

/* ---------- Header: logo and three links ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); min-height: 56px; }
.brand-emblem { width: 56px; height: 56px; flex: none; display: block; }
.emblem-fallback { display: grid; place-items: center; border-radius: 50%; background: var(--oxblood); color: var(--white); font: 400 1.7rem/1 Georgia, serif; box-shadow: inset 0 0 0 3px var(--oxblood), inset 0 0 0 4.5px var(--white); }
/* The wordmark is cut from Zhittya's stacked logo file, so the real lettering is shown. */
.brand-word { position: relative; display: block; width: 11.5rem; aspect-ratio: 369 / 86; overflow: hidden; flex: none; }
.brand-word img { position: absolute; max-width: none; width: 108.4%; height: auto; left: -5.15%; top: -291.9%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 400 1.7rem/1 Georgia, "Times New Roman", serif; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-by { font: 700 0.9rem/1.2 Georgia, "Times New Roman", serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--oxblood); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.3rem 0.5rem; }
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0.4rem 1.1rem;
  color: var(--ink); text-decoration: none; font: 700 1.05rem/1.2 var(--display); border-radius: 999px;
}
.site-nav a:hover { background: var(--cream); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--ink); }
.site-nav a.nav-cta { background: var(--oxblood); color: var(--white); padding-left: 1.5rem; padding-right: 1.5rem; }
.site-nav a.nav-cta:hover { background: var(--oxblood-deep); }
.site-nav a.nav-cta[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--white), 0 0 0 2px var(--oxblood); }
@media (max-width: 46rem) {
  .site-header .wrap { justify-content: center; }
  .site-nav { flex-basis: 100%; }
  .site-nav ul { justify-content: space-around; flex-wrap: wrap; gap: 0; }
  .site-nav a { font-size: 0.9rem; padding-left: 0.45rem; padding-right: 0.45rem; white-space: nowrap; }
  .site-nav a[aria-current="page"]:not(.nav-cta) { box-shadow: inset 0 -3px 0 var(--ink); border-radius: 0; }
  .site-nav a.nav-cta { padding-left: 1rem; padding-right: 1rem; }
  .section-form { padding-top: 1rem; }
  .page-head .wrap { padding-top: 1.4rem; padding-bottom: 1.3rem; }
  .page-head p:not(.eyebrow) { font-size: 1.05rem; }
}
.nb { white-space: nowrap; }

/* ---------- Hero: the blood vessel photograph from zgm.care ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(48, 14, 10, 0.94) 0%, rgba(56, 17, 12, 0.86) 48%, rgba(64, 20, 15, 0.45) 100%);
}
.hero .wrap { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.hero h1 { color: var(--white); max-width: 19ch; font-weight: 500; }
.hero p { max-width: 56ch; color: var(--on-dark); }
.hero .lede { color: var(--white); }
@media (max-width: 52rem) {
  .hero::after { background: rgba(52, 15, 11, 0.88); }
}

.jump { background: var(--cream); border-bottom: 1px solid var(--rule); }
.jump .wrap { display: flex; align-items: center; gap: 0.5rem 1.2rem; flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.jump-label { font: 800 0.9rem/1.3 var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--soft); }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; }
.jump li { margin: 0; }
.jump a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0.3rem 1rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--taupe); color: var(--ink); text-decoration: none; font-weight: 700;
}
.jump a:hover { border-color: var(--oxblood); color: var(--oxblood); }

/* ---------- Page header (About, Sign-up, legal pages) ---------- */
.page-head { background: var(--cream); border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.page-head h1 { max-width: 22ch; margin-bottom: 0.4em; }
.page-head p:not(.eyebrow) { max-width: 60ch; margin-bottom: 0; font-size: 1.15rem; }

.section { padding-top: clamp(2.8rem, 7vw, 5rem); padding-bottom: clamp(2.8rem, 7vw, 5rem); }
.section-cream { background: var(--cream); }
.section > .wrap > h2 { max-width: 26ch; }
.section > .wrap > :last-child { margin-bottom: 0; }
.wrap-wide { margin-top: 1.5rem; }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split-video { margin-top: 3rem; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split-video h3 { margin-top: 0; }
@media (max-width: 54rem) { .split, .split-video { grid-template-columns: 1fr; } }
.figure { margin: 0; }
.figure-img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--cream-2); }
.figure figcaption { margin-top: 0.6rem; color: var(--soft); font-size: 0.9rem; }
.figure-inline { max-width: 26rem; margin-bottom: 1.2rem; }
.photo-stack { display: grid; gap: 1.5rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem 3rem; align-items: start; }

/* ---------- Numbered steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; max-width: var(--measure); }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; margin-bottom: 1.2rem; min-height: 2.6rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--oxblood); color: var(--white); font: 700 1.1rem var(--display); }
.steps-row { max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 62rem) { .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .steps-row { grid-template-columns: 1fr; } }
.steps-row li { margin: 0; padding: 4.4rem 1.2rem 1.2rem; background: var(--cream); border-radius: var(--radius); }
.steps-row li::before { left: 1.2rem; top: 1.2rem; }
.steps-row strong { display: block; font-family: var(--display); font-weight: 700; color: var(--ink); margin-bottom: 0.2rem; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 2rem; }
.ticks li::before { content: ""; position: absolute; left: 0.25rem; top: 0.5em; width: 0.9rem; height: 0.5rem; border-left: 3px solid var(--oxblood); border-bottom: 3px solid var(--oxblood); transform: rotate(-45deg); }


/* ---------- Notices: context box and disclaimers ---------- */
.notice {
  background: var(--white); border: 1px solid var(--taupe); border-left: 8px solid var(--oxblood);
  border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; margin: 1.5rem 0; max-width: 52rem;
}
.notice h2, .notice h3 { font: 800 1.15rem/1.3 var(--display); letter-spacing: 0; margin: 0 0 0.6rem; }
.notice ul { margin-bottom: 0; }
.notice p:last-child { margin-bottom: 0; }
.notice-slim { border-left-color: var(--soft); }

details.plain { border: 1px solid var(--taupe); border-radius: var(--radius); background: var(--white); margin: 0 0 0.8rem; max-width: 52rem; }
details.plain > summary {
  cursor: pointer; min-height: 60px; padding: 0.8rem 1.3rem; font: 700 1.1rem/1.3 var(--display); color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; border-radius: var(--radius);
}
details.plain > summary::-webkit-details-marker { display: none; }
details.plain > summary::after { content: "+"; font: 400 1.7rem/1 var(--sans); flex: none; color: var(--oxblood); width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--cream); }
details.plain[open] > summary::after { content: "\2212"; }
details.plain > summary:hover { background: var(--cream); }
details.plain > .inner { padding: 0.4rem 1.3rem 1.3rem; }
details.plain > .inner > :first-child { margin-top: 0; }
details.plain > .inner > :last-child { margin-bottom: 0; }
.video-narrow { max-width: 30rem; margin: 1.2rem 0 1.5rem; }

/* ---------- Data slides ---------- */
.chips, .deck-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 1rem; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 50px; padding: 0.5rem 1.15rem; border-radius: 999px; cursor: pointer;
  font: 600 1rem/1.2 var(--sans); color: var(--ink); background: var(--white); border: 2px solid var(--soft);
}
.chip:hover { background: var(--cream-2); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--oxblood); border-color: var(--oxblood); color: var(--white); font-weight: 800; }
.chip-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cream-2); color: var(--ink); font: 700 0.9rem var(--display); }
.chip[aria-selected="true"] .chip-n { background: var(--white); color: var(--oxblood); }
html:not(.js) .deck-tabs, html:not(.js) .deck-nav { display: none; }
.deck-slide { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.2rem, 4vw, 2.5rem); margin-bottom: 1.2rem; }
.deck-slide > h3 { margin-top: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.deck-slide > :last-child { margin-bottom: 0; }
.field .hint-after { margin: 0.4rem 0 0; }
.deck-n { display: block; font: 800 0.9rem/1.3 var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--oxblood); margin-bottom: 0.5rem; }
.stat-slide { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; }
@media (max-width: 50rem) { .stat-slide { grid-template-columns: 1fr; } }
.stat { margin: 0; }
.stat-num { display: block; font: 700 clamp(3.6rem, 11vw, 6.2rem)/1 var(--display); letter-spacing: -0.04em; color: var(--oxblood); }
.stat-label { display: block; margin-top: 0.6rem; font-size: 1.1rem; line-height: 1.4; color: var(--ink); font-weight: 700; max-width: 22ch; }
.stat-slide .prose > :last-child { margin-bottom: 0; }

/* ---------- Chart ---------- */
.chart { margin: 1.5rem 0 1rem; max-width: 54rem; }
.chart h4 { margin-top: 0; }
.chart-frame { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1rem 0.8rem; }
.chart-legend { list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.chart-legend li { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.chart-legend svg { width: 44px; height: 14px; flex: none; }
.plot { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 0.25rem; }
.plot .y-title { grid-column: 1 / -1; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.9rem; }
.plot .x-title { grid-column: 2; text-align: center; font-weight: 700; font-size: 0.9rem; margin-top: 2.4rem; }
.plot-area { grid-column: 2; position: relative; height: clamp(15rem, 44vw, 21rem); margin: 0.6rem 2.6rem 0 3rem; }
.plot-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.plot .grid { stroke: #e8dfda; stroke-width: 1; }
.plot .series { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.plot .s-typical { stroke: var(--soft); stroke-dasharray: 7 6; }
.plot .s-cohort { stroke: var(--oxblood); stroke-width: 4; }
.plot .cross { stroke: var(--ink); stroke-width: 1.5; opacity: 0; }
.plot .pt { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; }
.plot .pt-cohort { background: var(--oxblood); box-shadow: 0 0 0 2px var(--white); }
.plot .pt-typical { background: var(--white); border: 3px solid var(--soft); }
.plot .pt.is-on { transform: scale(1.35); }
.plot .y-tick { position: absolute; left: -3rem; width: 2rem; text-align: right; transform: translateY(-50%); color: var(--soft); font-size: 0.9rem; }
.plot .x-tick { position: absolute; top: calc(100% + 0.5rem); transform: translateX(-50%); color: var(--soft); font-size: 0.9rem; }
.plot .dlabel { position: absolute; font-weight: 800; font-size: 1rem; line-height: 1; color: var(--ink); }
.plot .dl-end { transform: translate(0.8rem, -50%); }
.plot .dl-start { transform: translate(-50%, -1.6rem); }
.plot .dl-start.below { transform: translate(-50%, 0.8rem); }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--white);
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; line-height: 1.45;
  transform: translate(-50%, calc(-100% - 0.9rem)); white-space: nowrap; z-index: 2;
}
.chart-tip strong { display: block; }
.chart figcaption { margin-top: 0.9rem; color: var(--soft); font-size: 0.95rem; }

table.data { border-collapse: collapse; width: 100%; max-width: 40rem; margin: 0; }
table.data th, table.data td { text-align: left; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { border-bottom: 2px solid var(--ink); font-size: 0.95rem; }

/* ---------- Imaging ---------- */
.scans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem; margin: 1.5rem 0 2rem; }
.scan { margin: 0; }
.scan img { display: block; width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 3 / 2; object-fit: contain; }
.scan figcaption { margin-top: 0.8rem; }
.scan figcaption strong { display: block; font: 700 1.2rem/1.25 var(--display); color: var(--ink); margin-bottom: 0.3rem; }
.scan figcaption p { margin: 0; }
.img-missing { display: grid; place-items: center; aspect-ratio: 3 / 2; background: var(--cream); border: 2px dashed var(--soft); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--soft); }

/* ---------- Carousel: a row that scrolls sideways, with Back and Next ---------- */
.carousel-track {
  position: relative;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  padding: 0.5rem 0.25rem 1rem; margin: 0 -0.25rem; scrollbar-width: thin; scrollbar-color: var(--taupe) transparent;
}
.carousel-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.carousel-list > li { flex: 0 0 calc((100% - 2.5rem) / 3); min-width: 0; scroll-snap-align: start; margin: 0; }
@media (max-width: 64rem) { .carousel-list > li { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (max-width: 40rem) { .carousel-list > li { flex-basis: 88%; } }
.carousel-shorts .carousel-list > li { flex-basis: 15.5rem; }
@media (max-width: 40rem) { .carousel-shorts .carousel-list > li { flex-basis: 72%; } }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 0.6rem 1.2rem; flex-wrap: wrap; margin-top: 0.6rem; }
.carousel-nav .btn { min-width: 8.5rem; }
.carousel-status { margin: 0; font-weight: 700; color: var(--ink); min-width: 9rem; text-align: center; }
html:not(.js) .carousel-nav { display: none; }
@media (max-width: 30rem) {
  .carousel-nav .btn { min-width: 0; flex: 1 1 0; padding-left: 0.8rem; padding-right: 0.8rem; }
  .carousel-status { order: -1; flex-basis: 100%; }
}

/* ---------- Stories ---------- */
.results-count { font-weight: 800; margin: 0.6rem 0 0; color: var(--ink); }
.voice {
  display: flex; flex-direction: column; padding: 1.4rem 1.4rem 1.2rem;
  background: var(--white); border: 1px solid var(--taupe); border-top: 5px solid var(--oxblood); border-radius: var(--radius);
}
.section-cream .voice { border-color: var(--rule); border-top-color: var(--oxblood); }
.voice.is-editorial { border-top-color: var(--soft); }
.voice-body { position: relative; }
.js .carousel .voice-body { max-height: 16em; overflow: hidden; }
.voice.is-clamped .voice-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em; background: linear-gradient(rgba(255, 255, 255, 0), var(--white)); }
.voice blockquote, .voice .voice-text { margin: 0; }
.voice blockquote p, .voice .voice-text p { margin: 0 0 0.9em; overflow-wrap: anywhere; }
.voice blockquote::before { content: "\201C"; display: block; font: 700 3rem/0.8 Georgia, serif; color: var(--oxblood); height: 1.4rem; }
.voice-kind { font-size: 0.9rem; color: var(--soft); margin: 0 0 0.6rem; font-weight: 800; }
.voice-more {
  align-self: flex-start; min-height: 48px; margin: 0.5rem 0 0; padding: 0.3rem 1.1rem; cursor: pointer;
  font: 700 1rem/1.2 var(--display); color: var(--oxblood); background: var(--white); border: 2px solid var(--oxblood); border-radius: 999px;
}
.voice-more:hover { background: var(--cream); }
.voice-by { margin: auto 0 0; padding-top: 0.9rem; }
.voice-body + .voice-by, .voice-more + .voice-by { border-top: 0; }
.voice-by::before { content: ""; display: block; height: 1px; background: var(--rule); margin-bottom: 0.8rem; }
.voice-by strong { color: var(--ink); }
.voice-by span { color: var(--soft); }
.voice-topics { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.9rem; color: var(--soft); }
.voice-topics li { margin: 0; }

dialog.reader {
  width: min(46rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); max-height: calc(100dvh - 1.5rem);
  padding: 0; border: 0; border-radius: 20px; background: var(--white); color: var(--text); overflow: auto;
  box-shadow: 0 20px 60px rgba(64, 20, 15, 0.4);
}
dialog.reader::backdrop { background: rgba(48, 14, 10, 0.75); }
.reader-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 1.4rem; background: var(--cream); border-bottom: 1px solid var(--rule); }
.reader-head h2 { margin: 0; font-size: 1.3rem; }
.reader-head .btn, .reader-foot .btn { min-height: 52px; }
.reader-body { padding: 1.4rem 1.4rem 0.4rem; }
.reader-body .voice { border: 0; padding: 0; }
.reader-body .voice-more { display: none; }
.reader-foot { padding: 0.6rem 1.4rem 1.4rem; }
.reader-foot p { margin: 0 0 1rem; }

/* ---------- Research news cards (same shape as the carousel on pd-studies.org) ---------- */
.news-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-img { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--ink), var(--oxblood)); }
.news-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 1.2rem 1.3rem 1.4rem; }
.news-body h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.news-body p { margin: 0; }
.news-more {
  min-height: 48px; margin: 1rem 0 0; padding: 0.3rem 1.1rem; cursor: pointer;
  font: 700 1rem/1.2 var(--display); color: var(--oxblood); background: var(--white); border: 2px solid var(--oxblood); border-radius: 999px;
}
.news-more:hover { background: var(--cream); }
.news-card { position: relative; }
.news-body .news-more { display: inline-flex; align-items: center; text-decoration: none; }
.update-text h2, .reader-text h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
.update-text p, .update-text li { overflow-wrap: anywhere; }
.update-text .lede { font-weight: 700; color: var(--ink); }
.update-summary { max-width: var(--measure); }
.update-full { margin-top: 2rem; max-width: var(--measure); }
.update-full > .inner { padding-top: 0.8rem; }
.update-full .update-date { font: 800 0.9rem/1.3 var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--oxblood); }
.update-full h2, .reader-text .update-full h3 { font-size: 1.15rem; }
.update-full ol, .update-full ul { padding-left: 1.4em; }
.reader-text .eyebrow { margin-top: 0; }
.reader-text p { max-width: var(--measure); }
.reader-cta { background: var(--cream); border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.reader-cta .btn-row { margin-top: 0.6rem; }
.video-start { margin: 0.6rem 0 0; padding: 0.6rem 0.9rem; background: var(--cream); border-radius: var(--radius-sm); font-weight: 700; color: var(--ink); }

/* ---------- Video ---------- */
.video-grid { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 2rem 1.5rem; }
.video-grid li { margin: 0; }
.video { display: block; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; cursor: pointer;
  background: var(--ink); color: var(--white); display: grid; place-items: center; font: inherit; border-radius: var(--radius);
}
.video-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-play .poster-text {
  position: absolute; inset: 0; display: grid; place-items: start center; text-align: center; padding: 1.2rem 1.2rem 4.4rem;
  font: 600 clamp(1.05rem, 4.4vw, 1.3rem)/1.25 var(--display); color: var(--white);
  background: linear-gradient(150deg, var(--oxblood-deep), var(--ink) 70%);
}
.video-play .play-chip {
  position: absolute; z-index: 1; left: 0.9rem; bottom: 0.9rem; display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 48px; padding: 0.5rem 1.2rem 0.5rem 1rem; background: var(--white); color: var(--ink);
  border-radius: 999px; font: 700 1rem/1 var(--display); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.video-play .play-chip svg { width: 1rem; height: 1rem; flex: none; fill: var(--oxblood); }
.video-play:hover .play-chip { background: var(--cream-2); }
.video-play .dur { position: absolute; z-index: 1; right: 0.9rem; bottom: 1.25rem; background: rgba(48, 14, 10, 0.92); color: var(--white); padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.9rem; }
.video-title { font: 700 1.2rem/1.25 var(--display); margin: 0.8rem 0 0.25rem; letter-spacing: -0.01em; }
.video-desc { margin: 0; color: var(--soft); }
.video-note { font-size: 0.9rem; color: var(--soft); margin: 0.4rem 0 0; }
.carousel-shorts .video-frame { aspect-ratio: 9 / 16; }
.carousel-shorts .video-title { font-size: 1.1rem; }

/* ---------- Team ---------- */
.team { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 2rem 1.75rem; }
.team li { margin: 0; display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: start; }
.team img, .team .initials { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; background: var(--taupe-soft); }
.team .initials { display: grid; place-items: center; font: 600 1.6rem var(--display); color: var(--oxblood); }
.team h3 { margin: 0; font-size: 1.2rem; }
.team .role { margin: 0.1rem 0 0.4rem; color: var(--oxblood); font-weight: 800; font-size: 0.95rem; }
.team p { margin: 0; font-size: 0.95rem; }

/* ---------- Call to action band ---------- */
.cta { background: var(--oxblood); color: var(--white); }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; padding-top: clamp(2.2rem, 5vw, 3.5rem); padding-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.cta h2 { color: var(--white); margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3.2vw, 2rem); max-width: 26ch; }
.cta p { margin: 0; max-width: 58ch; color: var(--white); }
@media (max-width: 50rem) { .cta .wrap { grid-template-columns: 1fr; } .cta .btn { justify-self: start; } }

/* ---------- Sign-up page ---------- */
.section-form { background: var(--cream); padding-top: clamp(1.5rem, 4vw, 3rem); }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 62rem) { .form-layout { grid-template-columns: 1fr; } }
.form-side h2 { font-size: 1.3rem; margin-top: 1.6rem; }
.form-side h2:first-child { margin-top: 0; }
.form-side .figure { margin: 1.5rem 0 1rem; }
.help-line { padding: 1rem 1.2rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--rule); }

.signup { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.2rem, 3.5vw, 2.4rem); }
.signup [data-step] + [data-step] { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.js .signup [data-step] + [data-step] { margin-top: 0; padding-top: 0; border-top: 0; }
html:not(.js) .signup [data-step]:not([data-step="4"]) .signup-actions { display: none; }
html:not(.js) .signup [data-back] { display: none; }
.step-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; counter-reset: none; }
.step-list li { margin: 0; display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.6rem; border-top: 5px solid var(--taupe-soft); color: var(--soft); font-size: 0.9rem; line-height: 1.25; }
.step-list .step-num { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--taupe-soft); color: var(--ink); font: 800 0.95rem var(--display); }
.step-list .step-name { font-weight: 700; }
.step-list li.is-now { border-top-color: var(--oxblood); color: var(--ink); }
.step-list li.is-now .step-num { background: var(--oxblood); color: var(--white); }
.step-list li.is-done { border-top-color: var(--oxblood); color: var(--ink); }
.step-list li.is-done .step-num { background: var(--white); color: var(--oxblood); box-shadow: inset 0 0 0 2px var(--oxblood); }
@media (max-width: 36rem) { .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.signup-count { display: block; font: 800 0.9rem/1.3 var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--oxblood); margin-bottom: 0.35rem; }
.signup-title { font-size: clamp(1.5rem, 3.4vw, 1.9rem); margin: 0 0 0.5rem; }
.signup-title:focus { outline: none; }
.signup-intro { color: var(--soft); margin-bottom: 1.5rem; }
.field { margin: 0 0 1.35rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0 1rem; }
.field-short { max-width: 14rem; }
.field label, .field legend, fieldset.field > legend { display: block; font-weight: 800; color: var(--ink); margin-bottom: 0.4rem; padding: 0; }
.field .hint { display: block; font-weight: 400; color: var(--soft); font-size: 0.9rem; margin-bottom: 0.4rem; }
.field .optional { font-weight: 400; color: var(--soft); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 58px; padding: 0.7rem 1rem;
  font: 400 1.05rem/1.3 var(--sans); color: var(--text);
  background: var(--white); border: 2px solid var(--soft); border-radius: var(--radius-sm);
}
.field textarea { min-height: 5.5rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 3px; }
.field-error { color: var(--error); font-weight: 800; margin: 0.45rem 0 0; display: flex; gap: 0.45rem; align-items: flex-start; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-top: 0.15rem; border-radius: 50%; background: var(--error); color: var(--white); font-size: 0.85rem; line-height: 1; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field[data-invalid="true"] .choice span { border-color: var(--error); border-width: 3px; }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 0.55rem 1.25rem;
  border: 2px solid var(--soft); border-radius: var(--radius-sm); background: var(--white); font-weight: 600; color: var(--ink);
}
.choice small { font-size: 0.9rem; font-weight: 400; color: var(--soft); }
.choice input:checked + span { background: var(--oxblood); border-color: var(--oxblood); color: var(--white); font-weight: 800; }
.choice input:checked + span small { color: var(--white); }
.choice input[type="checkbox"] + span { padding-left: 2.9rem; }
.choice input[type="checkbox"] + span::before { content: ""; position: absolute; left: 0.95rem; top: 50%; width: 1.3rem; height: 1.3rem; margin-top: -0.65rem; border: 2px solid var(--soft); border-radius: 5px; background: var(--white); }
.choice input[type="checkbox"]:checked + span::before { border-color: var(--white); }
.choice input[type="checkbox"]:checked + span::after { content: ""; position: absolute; left: 1.28rem; top: 50%; width: 0.75rem; height: 0.42rem; margin-top: -0.36rem; border-left: 3px solid var(--oxblood); border-bottom: 3px solid var(--oxblood); transform: rotate(-45deg); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.choice:hover span { background: var(--cream); }
.choice:hover input:checked + span { background: var(--oxblood-deep); }
.choices-stack .choices { flex-direction: column; }
.choices-stack .choice span { display: flex; width: 100%; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; margin: 0 0 1.5rem; padding: 1rem 1.1rem; background: var(--cream); border-radius: var(--radius-sm); border: 2px solid transparent; }
.check[data-invalid="true"] { border-color: var(--error); }
.check input { width: 1.9rem; height: 1.9rem; margin: 0.1rem 0 0; accent-color: var(--oxblood); }
.check label { font-weight: 400; margin: 0; padding: 0.1rem 0; min-height: 48px; }
.check .field-error { grid-column: 1 / -1; margin-top: 0; }
.consent-text { font-size: 0.9rem; color: var(--soft); margin: 0 0 1.2rem; }
.form-status { margin: 1rem 0 0; font-weight: 800; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.signup-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.signup-done:focus { outline: none; }
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.turnstile-slot { height: 0; overflow: hidden; }

/* ---------- Bottom bar ---------- */
.joinbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--ink); color: var(--white); border-top: 3px solid var(--oxblood);
}
.joinbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.5rem; padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px)); }
.joinbar p { margin: 0; font-size: 1rem; line-height: 1.3; }
.joinbar .actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.joinbar .btn { min-height: 48px; padding: 0.4rem 1.3rem; font-size: 1rem; }
.joinbar-close {
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--white); border: 2px solid transparent; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.joinbar-close:hover { border-color: var(--white); }
@media (max-width: 40rem) {
  .joinbar p { display: none; }
  .joinbar .actions { flex: 1; }
  .joinbar .actions .btn { flex: 1; }
}

/* ---------- Consent notice ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--white); color: var(--text); border-top: 3px solid var(--ink);
  box-shadow: 0 -6px 24px rgba(64, 20, 15, 0.2);
}
.consent .wrap { padding-top: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center; }
.consent h2 { font: 800 1.1rem var(--display); margin: 0 0 0.3rem; letter-spacing: 0; }
.consent p { margin: 0; font-size: 0.95rem; max-width: 62ch; }
.consent .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.consent .btn { min-height: 52px; }
@media (max-width: 52rem) {
  .consent .wrap { grid-template-columns: 1fr; gap: 0.7rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
  .consent .extra { display: none; }
  .consent .actions .btn { flex: 1 1 8rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.site-footer .wrap { padding-top: 3rem; padding-bottom: 2.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 2rem; }
.footer-logo { display: block; width: 11rem; height: auto; margin: -1.2rem 0 0 -0.6rem; }
.footer-name { font: 400 1.4rem/1.2 Georgia, serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.site-footer h2 { font: 800 0.9rem var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--white); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer a, .site-footer .linkish { color: var(--white); display: inline-flex; align-items: center; min-height: 48px; }
.site-footer .linkish { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.site-footer address { font-style: normal; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(246, 236, 232, 0.25); padding-top: 1.4rem; font-size: 0.9rem; }
.site-footer .fine p { max-width: 80ch; margin-bottom: 0.7em; }

/* ---------- Legal pages ---------- */
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .chip, .choice span, .signup, .voice, .news-card, .deck-slide { border: 2px solid CanvasText; }
  .chip[aria-pressed="true"], .chip[aria-selected="true"], .choice input:checked + span { background: Highlight; color: HighlightText; }
}
@media print {
  .joinbar, .consent, .site-nav, .jump, .cta, .carousel-nav, .deck-tabs, .deck-nav, .video-play .play-chip { display: none !important; }
  .deck-slide[hidden] { display: block !important; }
  body { padding-bottom: 0; }
}
