/* Propecia Side Effects — site styles
   Palette: paper, ink, leaflet blue, rule grey, tint, warning amber. */

@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f8f6;
  --white: #ffffff;
  --ink: #18212d;
  --ink-soft: #46515f;
  --blue: #2f5d86;
  --blue-deep: #1f4467;
  --tint: #e8eef4;
  --rule: #cbd2d9;
  --amber: #e8b10e;
  --amber-tint: #fdf6df;

  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  /* Modular scale, ratio ~1.25 */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: var(--step-2); font-weight: 700; margin-top: 2.6em; margin-bottom: 0.6em; }
h3 { font-size: var(--step-1); font-weight: 650; margin-top: 2em; margin-bottom: 0.4em; }

p { margin: 0 0 1.1em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--white);
  font-family: var(--sans); font-weight: 600; padding: 0.6rem 1rem;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-top: 1rem; padding-bottom: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-weight: 750; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 0.35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

/* ---------- Page scaffolding ---------- */
main { display: block; }

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-head h1 { max-width: 16ch; }
.breadcrumb { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 1.25rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--rule); }
.breadcrumb a { color: var(--ink-soft); }

.lead {
  font-size: var(--step-1); line-height: 1.55; font-style: italic;
  color: var(--ink-soft); max-width: 40ch; margin-top: 1.25rem;
}

.prose { max-width: var(--measure); padding-bottom: 4rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.45em; padding-left: 0.3rem; }
.prose li::marker { color: var(--blue); }

/* ---------- Home hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
.hero h1 { max-width: 11ch; margin-bottom: 1.75rem; }
.hero .intro { max-width: 58ch; }
.hero .intro p:first-child { font-size: var(--step-1); line-height: 1.55; }

/* Pharmacy-label panel: the site's one bold element */
.label {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: var(--sans);
  box-shadow: 8px 8px 0 var(--tint);
  max-width: 26rem;
}
.label-head {
  background: var(--blue); color: var(--white);
  padding: 0.9rem 1.2rem 0.85rem;
  border-radius: 3px 3px 0 0;
}
.label-head .drug { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.label-head .strength { display: block; font-size: 0.9rem; font-weight: 500; opacity: 0.9; margin-top: 0.15rem; }
.label dl { margin: 0; padding: 0.4rem 1.2rem 0.6rem; }
.label .row {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem;
  padding: 0.7rem 0; border-bottom: 1px dashed var(--rule);
  font-size: 0.95rem; line-height: 1.4;
}
.label .row:last-child { border-bottom: 0; }
.label dt { color: var(--ink-soft); font-weight: 500; }
.label dd { margin: 0; font-weight: 650; }
.label .row.outcome dd { background: var(--amber); padding: 0.15rem 0.45rem; margin: -0.15rem 0 -0.15rem -0.45rem; border-radius: 2px; justify-self: start; }
.label-foot { border-top: 2px solid var(--ink); padding: 0.7rem 1.2rem; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.45; }

/* ---------- Statement ---------- */
.statement {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--white);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.statement p { max-width: 44ch; margin: 0; }
.statement .purpose { font-family: var(--sans); font-weight: 600; font-size: var(--step-0); color: var(--blue); margin-bottom: 0.9rem; }
.statement .question { font-size: var(--step-3); line-height: 1.3; font-weight: 400; letter-spacing: -0.01em; }

/* ---------- Regulator warnings (leaflet box) ---------- */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section > .wrap > h2:first-child { margin-top: 0; }

.warnings {
  background: var(--amber-tint);
  border-left: 6px solid var(--amber);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  max-width: 52rem;
}
.warnings h2 { margin-top: 0; }
.warnings > p { max-width: 60ch; }
.warnings ol { list-style: none; margin: 1.5rem 0 0.5rem; padding: 0; }
.warnings li {
  display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 0.25rem 1.25rem;
  padding: 1rem 0; border-top: 1px solid rgba(24, 33, 45, 0.15);
}
.warnings time { font-family: var(--sans); font-weight: 700; font-size: 0.95rem; padding-top: 0.15rem; }
.warnings li p { margin: 0; }
.warnings .src { font-family: var(--sans); font-size: var(--step--1); margin-top: 0.35rem; display: inline-block; }
@media (max-width: 34rem) {
  .warnings li { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Onward links ---------- */
.onward { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 52rem; border-top: 2px solid var(--ink); }
.onward li { border-bottom: 1px solid var(--rule); }
.onward a {
  display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 0.25rem 1.5rem;
  padding: 1.15rem 0.25rem; text-decoration: none; color: var(--ink);
}
.onward a:hover { background: var(--white); }
.onward a:hover .t { color: var(--blue); text-decoration: underline; text-underline-offset: 0.18em; }
.onward .t { font-family: var(--sans); font-weight: 700; font-size: var(--step-1); line-height: 1.3; }
.onward .d { color: var(--ink-soft); }
@media (max-width: 40rem) {
  .onward a { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- My Story ---------- */
.timeline {
  list-style: none; margin: 0.5rem 0 2.5rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  border-top: 2px solid var(--ink);
  font-family: var(--sans); max-width: 52rem;
}
.timeline li { padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.timeline .when { display: block; font-weight: 750; font-size: 1.05rem; }
.timeline .what { display: block; color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.15rem; }
.timeline li:last-child .when { color: var(--blue); }

.symptoms {
  background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.25rem 1.5rem 0.75rem 2.4rem !important;
}

.closing {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink);
  font-size: var(--step-2); line-height: 1.4; font-weight: 500;
}

/* ---------- Epigenetics ---------- */
.epi-figure {
  margin: 2rem 0; padding: 1.25rem 1.25rem 1rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
}
.epi-svg { display: block; width: 100%; height: auto; }
.epi-figure figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.75rem; line-height: 1.5; }

.terms { margin: 2rem 0 0; border-top: 2px solid var(--ink); font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; }
.terms > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.2rem 1.25rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 34rem) { .terms > div { grid-template-columns: minmax(0, 1fr); } }

.prose .studies { list-style: none; padding: 0; margin: 1.5rem 0 1rem; border-top: 2px solid var(--ink); }
.prose .studies > li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 1.25rem; padding: 1.4rem 0 0.4rem; margin: 0; border-bottom: 1px solid var(--rule); }
.studies .yr { font-family: var(--sans); font-weight: 800; font-size: 1.15rem; color: var(--blue); padding-top: 0.1rem; }
.studies h3 { margin-top: 0; font-size: 1.15rem; }
.studies .cite { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 34rem) { .prose .studies > li { grid-template-columns: minmax(0, 1fr); } .studies .yr { margin-bottom: 0.2rem; } }

.prose .sources-title { font-size: 1.15rem; margin-top: 3rem; }
.prose .sources { font-family: var(--sans); font-size: var(--step--1); line-height: 1.55; color: var(--ink-soft); padding-left: 1.4rem; }
.prose .sources li { margin-bottom: 0.6em; padding-left: 0.2rem; }
.prose .sources a { overflow-wrap: anywhere; }

/* ---------- Videos ---------- */
.videos { display: grid; gap: 2.5rem; max-width: 52rem; padding-bottom: 4rem; }
.video figure { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 4px; overflow: hidden; }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--white);
}
.video-play img { opacity: 0.85; transition: opacity 0.2s; }
.video-play:hover img, .video-play:focus-visible img { opacity: 1; }
.video-play .icon {
  position: relative; display: grid; place-items: center;
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: rgba(24, 33, 45, 0.82); border: 2px solid var(--white);
}
.video-play .icon svg { margin-left: 4px; }
.video-play:focus-visible { outline-offset: -6px; }
.video figcaption { font-family: var(--sans); margin-top: 0.85rem; }
.video figcaption strong { display: block; font-size: var(--step-1); line-height: 1.3; font-weight: 700; }
.video figcaption span { display: block; color: var(--ink-soft); font-size: var(--step--1); margin-top: 0.3rem; }

/* ---------- Forum / contact panels ---------- */
.panel-link {
  display: block; max-width: 34rem; margin: 1.5rem 0 2rem;
  background: var(--white); border: 2px solid var(--ink); border-radius: 6px;
  padding: 1.25rem 1.5rem; text-decoration: none; color: var(--ink);
  box-shadow: 6px 6px 0 var(--tint);
  font-family: var(--sans);
}
.panel-link:hover { color: var(--ink); box-shadow: 6px 6px 0 var(--blue); }
.panel-link .t { display: block; font-size: var(--step-1); font-weight: 750; line-height: 1.3; }
.panel-link .u { display: block; color: var(--blue); margin-top: 0.25rem; font-weight: 500; overflow-wrap: anywhere; }

.note { color: var(--ink-soft); font-size: var(--step--1); font-family: var(--sans); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: #d9dee4;
  font-family: var(--sans); font-size: 0.92rem; line-height: 1.6;
  padding: 3rem 0 2.5rem; margin-top: 2rem;
}
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.site-footer h2 { color: var(--white); font-size: 1rem; margin: 0 0 0.6rem; }
.site-footer p { margin: 0 0 0.8rem; max-width: 56ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, 0.18); margin-top: 2rem; padding-top: 1.25rem; color: #aeb7c2; font-size: 0.85rem; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(3rem, 8vw, 6rem) 0 4rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .site-footer, .skip-link, .video-play { display: none; }
  body { background: #fff; }
}

/* ---------- Home: epigenetics summary ---------- */
.epi-home { background: var(--tint); border-bottom: 1px solid var(--rule); }
.epi-home-grid { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 60rem) { .epi-home-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.epi-home h2 { margin-top: 0; font-size: var(--step-3); letter-spacing: -0.02em; }
.epi-home h2 a { color: var(--ink); text-decoration: none; }
.epi-home h2 a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.epi-home-grid > div > p { max-width: 60ch; }
.epi-home-more { font-family: var(--sans); font-weight: 650; margin-top: 1.4rem; }

.epi-stat { margin: 0; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; padding: 1.25rem 1.4rem 1rem; font-family: var(--sans); }
.epi-stat figcaption { font-weight: 700; font-size: 1.05rem; line-height: 1.35; margin-bottom: 1.1rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.9rem; margin-bottom: 1rem; align-items: center; }
.bar-label { grid-column: 1 / -1; font-size: 0.92rem; color: var(--ink-soft); }
.bar { display: block; height: 1.1rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--amber); border-right: 2px solid var(--ink); }
.bar .fill-pfs { width: 56.3%; }
.bar .fill-ctl { width: 7.7%; background: var(--blue); }
.bar-val { font-weight: 750; font-size: 1.05rem; min-width: 4.5rem; text-align: right; }
.epi-stat-src { font-size: 0.8rem; color: var(--ink-soft); margin: 0.25rem 0 0; }
