/* The Amy J. Reed Collaborative for Medical Device Safety — responsive rebuild.
   Palette and type taken from the Wix original: cream #FFF8F1 page, sand #E0BE9A
   bands, black ink, Fahkwang headings over a Helvetica/Arial body. */

:root {
  --cream: #FFF8F1;
  --sand: #E0BE9A;
  --sand-deep: #C79B6F;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --rule: #e2d6c7;
  --head: 'Fahkwang', 'Trebuchet MS', 'Gill Sans', sans-serif;
  --body: Helvetica, Arial, sans-serif;
  --measure: 68rem;
  --gutter: 1.15rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--sand-deep); }
a:focus-visible { outline: 2px solid var(--sand-deep); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 40em) { :root { --gutter: 1.75rem; } }

h1, h2, h3, .quote, .card h3, .person h2 { font-family: var(--head); font-weight: 500; line-height: 1.15; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; z-index: 99; background: #fff; padding: .5rem 1rem; }

/* ---------- header ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.logo { display: block; flex: 0 0 auto; }
.logo img { width: 190px; height: auto; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--sand-deep); background: transparent;
  color: var(--ink); font: inherit; font-size: .95rem; border-radius: 4px; padding: .5rem .8rem; cursor: pointer;
}
.nav-toggle svg { width: 1.05rem; height: 1.05rem; }
#primary-nav { list-style: none; margin: 0; padding: 0; display: none; }
#primary-nav.open { display: block; width: 100%; padding: .25rem 0 .75rem; }
#primary-nav a { display: block; padding: .75rem .2rem; border-top: 1px solid var(--rule); text-decoration: none; font-size: 1.02rem; }
#primary-nav a[aria-current="page"] { color: var(--sand-deep); }
@media (min-width: 60em) {
  .nav-toggle { display: none; }
  #primary-nav, #primary-nav.open { display: flex; gap: 1.4rem; width: auto; padding: 0; }
  #primary-nav a { border: 0; padding: .3rem 0; font-size: .95rem; }
  #primary-nav a:hover { color: var(--sand-deep); }
  .logo img { width: 230px; }
}

/* ---------- generic content ---------- */
main { display: block; }
.section { padding: 2.75rem 0; }
.section.tight { padding: 1.75rem 0; }
h1.page-title { font-size: clamp(2.1rem, 7vw, 3.4rem); margin: 0 0 1.25rem; text-align: center; }
h2.section-title { font-size: clamp(1.5rem, 4.5vw, 2.3rem); margin: 0 0 1.25rem; text-align: center; }
.prose { max-width: 44rem; margin-inline: auto; }
.prose p { margin: 0 0 1.15rem; }
.lead { font-size: 1.15rem; text-align: center; max-width: 42rem; margin: 0 auto 1.5rem; }
.meta { text-align: center; color: var(--ink-soft); font-size: .95rem; margin: -0.5rem 0 1.75rem; }
figure { margin: 0 0 1.75rem; }
figure img { width: 100%; border-radius: 2px; }
figure.portrait { max-width: 26rem; margin-inline: auto; }
figure.wide { max-width: 54rem; margin-inline: auto; }

/* ---------- hero ---------- */
.hero { position: relative; background: #000; }
.hero img { width: 100%; height: clamp(22rem, 58vh, 34rem); object-fit: cover; opacity: .62; }
.hero .hero-text {
  position: absolute; inset: 0; display: flex; align-items: center;
  max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter);
}
.hero h1 {
  color: #fff; font-size: clamp(2rem, 6.4vw, 4rem); margin: 0; max-width: 18ch;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}

/* ---------- quote band ---------- */
.band { background: var(--sand); }
.band .quote {
  margin: 0; padding: 3rem 0; font-size: clamp(1.05rem, 2.5vw, 1.45rem); line-height: 1.5;
  max-width: 50rem; margin-inline: auto; text-align: center;
}
.band .quote::before { content: "\201C"; display: block; font-size: 3.5rem; line-height: .6; margin-bottom: .75rem; }
.note { text-align: center; font-size: 1rem; color: var(--ink-soft); padding: 1.5rem 0 0; }

/* ---------- feature card (blog teaser) ---------- */
.feature { display: block; max-width: 46rem; margin: 0 auto; text-decoration: none; border: 1px solid var(--rule); background: #fff; border-radius: 3px; overflow: hidden; }
.feature img { width: 100%; }
.feature .body { padding: 1.25rem 1.4rem 1.5rem; }
.feature h3 { font-size: 1.35rem; margin: 0 0 .5rem; }
.feature p { margin: 0 0 .75rem; color: var(--ink-soft); }
.feature .meta { text-align: left; margin: 0; font-size: .85rem; }
.feature:hover { border-color: var(--sand-deep); }

/* ---------- card grids ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card.tall img { aspect-ratio: 3 / 4; }
.card .body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { font-size: 1.1rem; margin: 0; }
.card p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.card a.stretch { text-decoration: none; }
.card a.stretch::after { content: ""; position: absolute; inset: 0; }
.card.linked { position: relative; }
.card.linked:hover { border-color: var(--sand-deep); }
@media (min-width: 38em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 58em) {
  .cards.c3 { grid-template-columns: repeat(3, 1fr); }
  .cards.c4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- people ---------- */
.person { display: grid; gap: 1.25rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.person:first-of-type { border-top: 0; }
.person img { width: 100%; max-width: 15rem; border-radius: 50%; margin-inline: auto; }
.person h2 { font-size: 1.45rem; margin: 0 0 .5rem; }
.person p { margin: 0 0 1rem; }
.person .social { display: flex; gap: .75rem; list-style: none; padding: 0; margin: .25rem 0 0; }
.person .social a { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border: 1px solid var(--rule); padding: .3rem .7rem; border-radius: 3px; }
.person .social a:hover { border-color: var(--sand-deep); }
@media (min-width: 48em) {
  .person { grid-template-columns: 15rem 1fr; gap: 2.25rem; align-items: start; }
  .person img { margin: 0; }
}

/* ---------- publications ---------- */
.pubs { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; }
.pubs li { padding: 1rem 0; border-top: 1px solid var(--rule); font-size: 1.05rem; }
.pubs li:first-child { border-top: 0; }

/* ---------- contact ---------- */
.contact-block { text-align: center; padding: 1rem 0 0; }
.contact-block a.email { font-size: 1.25rem; font-family: var(--head); }
.btn {
  display: inline-block; margin-top: 1.25rem; padding: .7rem 1.5rem; background: var(--sand);
  border: 1px solid var(--sand-deep); border-radius: 3px; text-decoration: none; font-size: 1rem;
}
.btn:hover { background: var(--sand-deep); color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--sand); margin-top: 3rem; padding: 2.25rem 0 2.5rem; }
.foot-inner { display: grid; gap: 1.25rem; text-align: center; }
.foot-inner h2 { font-size: 1.2rem; margin: 0; }
.foot-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: center; font-size: .95rem; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.copyright { font-size: .85rem; color: #5b4a37; margin: 0; }

/* ---------- embedded tracker ---------- */
.embed { margin: 1.5rem 0 0; }
.embed-bar { margin: 0 0 .75rem; text-align: right; }
.btn-sm {
  display: inline-block; padding: .45rem 1rem; background: var(--sand);
  border: 1px solid var(--sand-deep); border-radius: 3px;
  text-decoration: none; font-size: .95rem;
}
.btn-sm:hover { background: var(--sand-deep); color: #fff; }
.embed-frame {
  position: relative; background: #fff;
  border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
  height: min(82vh, 1100px); min-height: 32rem;
}
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.note-sm { font-size: .9rem; color: var(--ink-soft); margin: .75rem 0 0; }
@media (max-width: 40em) {
  .embed-bar { text-align: left; }
  .embed-frame { height: 70vh; min-height: 26rem; }
}

/* ---------- blog index ---------- */
.post-list { list-style: none; margin: 0 auto; padding: 0; max-width: 46rem; display: grid; gap: 1.5rem; }
.post-card {
  position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  overflow: hidden; display: grid; grid-template-columns: 14rem 1fr;
}
.post-card.noimg { grid-template-columns: 1fr; }
.post-card:hover { border-color: var(--sand-deep); }
.post-card img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.post-card h3 { font-family: var(--head); font-weight: 500; font-size: 1.15rem; line-height: 1.25; margin: 0; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.post-card .meta { font-size: .85rem; }
@media (max-width: 44em) {
  .post-card { grid-template-columns: 1fr; }
  .post-card img { aspect-ratio: 16 / 7; height: auto; }
}

/* ---------- footnote markers ---------- */
sup a { text-decoration: none; padding: 0 .1em; }
sup a:hover { text-decoration: underline; }
.post-card .meta, .post-card p { text-align: left; }
