/* Jeremy D. Richmon, MD — site styles */
:root {
  --paper: #f7f8f6;
  --surface: #ffffff;
  --ink: #1b2a33;
  --muted: #5c6b75;
  --line: #d6ddda;
  --teal: #146b67;
  --teal-deep: #0f524f;
  --tint: #e4f0ee;
  --focus: #0b8f88;
  --on-teal: #ffffff;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101b20;
    --surface: #172730;
    --ink: #e6ecea;
    --muted: #a3b0b7;
    --line: #2b3d46;
    --teal: #5fbdb6;
    --teal-deep: #8ad3cd;
    --tint: #1a3436;
    --focus: #8ad3cd;
    --on-teal: #0d1b1e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101b20;
  --surface: #172730;
  --ink: #e6ecea;
  --muted: #a3b0b7;
  --line: #2b3d46;
  --teal: #5fbdb6;
  --teal-deep: #8ad3cd;
  --tint: #1a3436;
  --focus: #8ad3cd;
  --on-teal: #0d1b1e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  padding-inline: 20px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.75rem; }
.prose h3 { margin-top: 2rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0.75rem; }
.prose { max-width: 66ch; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li::marker { color: var(--teal); }
strong { font-weight: 600; }
small, .small { font-size: 0.92rem; }
.muted { color: var(--muted); }

.wrap { max-width: 1080px; margin-inline: auto; }

/* Skip link and screen-reader-only text */
.skip-link { position: absolute; left: 16px; top: -100px; background: var(--teal); color: var(--on-teal); padding: 10px 14px; border-radius: 3px; z-index: 10; text-decoration: none; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 12px 28px;
  padding-block: 22px 18px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--muted); font-size: 1rem; font-family: var(--sans); margin-left: 8px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.97rem; }
.nav a { color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--teal); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px; align-items: start;
  padding-block: 56px 40px;
}
.hero .prose { max-width: 60ch; }
.hero .lead { font-size: 1.22rem; line-height: 1.5; color: var(--ink); }
.hero .kicker { color: var(--muted); font-size: 1rem; margin-bottom: 14px; }
.portrait { border-radius: 4px; width: 100%; max-width: 420px; justify-self: end; }
.portrait-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; max-width: 420px; justify-self: end; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-block: 36px 28px; }
  .portrait, .portrait-note { justify-self: start; max-width: 300px; }
}

/* Page header (interior pages) */
.page-head { padding-block: 48px 8px; max-width: 66ch; }
.page-head .lead { font-size: 1.18rem; line-height: 1.5; margin-top: 18px; }

/* Appointment card: the one boxed object on the page */
.appt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 3px;
  padding: 22px 26px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 32px;
  margin-block: 28px 8px;
}
.appt h2, .appt h3 { font-size: 1.15rem; margin-bottom: 6px; }
.appt .phone {
  font-family: var(--serif); font-size: 2rem; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none;
  display: inline-block; margin-top: 2px;
}
.appt .phone:hover { color: var(--teal-deep); }
.appt address { font-style: normal; color: var(--muted); }
.appt .cta {
  display: inline-block; margin-top: 10px;
  background: var(--teal); color: var(--on-teal); text-decoration: none;
  padding: 10px 16px; border-radius: 3px; font-weight: 500; font-size: 0.97rem;
}
.appt .cta:hover { background: var(--teal-deep); color: var(--on-teal); }

/* Sections */
.section { padding-block: 44px; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 22px; }
.section-note { color: var(--muted); max-width: 66ch; margin-top: 14px; }

/* Definition rows: condition -> approach */
.rows { display: grid; gap: 0; }
.row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: 8px 36px;
  padding-block: 18px; border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: 1.15rem; }
.row h3 a { color: var(--ink); }
.row p { color: var(--ink); max-width: 66ch; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: 6px; } }

/* Facts list */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 40px; }
.facts p { max-width: 40ch; }
.facts .year { font-family: var(--serif); font-size: 1.6rem; color: var(--teal); font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }

/* Video links */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.video {
  display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink); text-decoration: none;
}
.video:hover { border-color: var(--teal); color: var(--ink); }
.video .play { width: 52px; height: 52px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; color: var(--teal); }
.video .play svg { width: 20px; height: 20px; margin-left: 3px; }
.video strong { display: block; font-weight: 500; font-family: var(--serif); font-size: 1.15rem; }
.video span { color: var(--muted); font-size: 0.92rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
td:first-child { font-weight: 500; }

/* Steps: only used where the content is a true sequence */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding-left: 52px; padding-block: 12px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 12px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--teal);
  font-family: var(--serif); font-size: 1.05rem; display: grid; place-items: center;
}
.steps strong { display: block; font-weight: 600; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding-block: 14px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.3rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink); max-width: 66ch; }

/* Callout (quiet) */
.note { background: var(--tint); border-radius: 3px; padding: 16px 20px; max-width: 66ch; }

/* Footer */
.site-foot {
  margin-top: 56px; padding-block: 32px 40px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 40px;
  color: var(--muted); font-size: 0.93rem;
}
.site-foot address { font-style: normal; }
.site-foot a { color: var(--muted); }
.site-foot .legal { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  .nav a, .video, .appt .cta { transition: border-color .15s, background-color .15s, color .15s; }
}
@media print {
  .nav, .site-foot .legal { display: none; }
  body { background: #fff; color: #000; }
}

/* Bio below hero */
.bio { padding-bottom: 12px; }
.page-head .lead-follow { margin-top: 14px; }
/* Atrius card uses the quieter border */
.appt-atrius { border-left-color: var(--line); margin-top: 14px; }
/* Team */
.team { display: grid; gap: 0; padding-block: 28px 12px; }
.member { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px 32px; align-items: start; padding-block: 28px; border-top: 1px solid var(--line); }
.member:last-child { border-bottom: 1px solid var(--line); }
.member h2 { font-size: 1.5rem; }
.member .role { color: var(--muted); margin-top: 4px; }
.member-bio { max-width: 62ch; margin-top: 14px; }
.member-bio p + p { margin-top: 0.8rem; }
.photo { width: 200px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.photo-placeholder { background: var(--tint); color: var(--teal); display: grid; place-items: center; font-family: var(--serif); font-size: 2.2rem; }
@media (max-width: 600px) { .member { grid-template-columns: 1fr; } .photo { width: 160px; } }

/* CV-style dated list */
.prose ul.cv { list-style: none; padding-left: 0; }
.prose ul.cv li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 4px 16px; padding-block: 8px; border-top: 1px solid var(--line); margin: 0; }
.prose ul.cv li:last-child { border-bottom: 1px solid var(--line); }
.prose ul.cv span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; }
@media (max-width: 520px) { .prose ul.cv li { grid-template-columns: 1fr; } }

.team-photo { width: 100%; max-width: 760px; border-radius: 4px; margin-top: 28px; }

/* Interior page intro with a photo */
.intro-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px 48px; align-items: start; }
.intro-split .page-head { max-width: 62ch; }
.intro-text { margin-top: 18px; }
.side-photo { width: 100%; border-radius: 4px; margin-top: 48px; }
@media (max-width: 760px) { .intro-split { grid-template-columns: 1fr; } .side-photo { max-width: 240px; margin-top: 8px; } }

.side-figure { margin: 48px 0 0; }
.side-figure .side-photo { margin-top: 0; }
.side-figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.intro-split:has(.side-figure) { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 760px) { .intro-split:has(.side-figure) { grid-template-columns: 1fr; } .side-figure { margin-top: 8px; max-width: 320px; } }

.wide-photo { width: 100%; border-radius: 4px; margin-block: 36px 8px; }

.wide-figure { margin: 32px 0 8px; }
.wide-figure .wide-photo { margin: 0; }
.wide-figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.donate p { margin-top: 6px; }
.donate .cta { margin-top: 0; }

.donate-wrap { margin-top: 2.75rem; }
.donate-intro { max-width: 66ch; margin-top: 0.75rem; }
.donate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 8px; }
.donate-grid .appt { grid-template-columns: 1fr; margin-block: 12px 0; }
.donate .cta { margin-top: 14px; }
.donate p.small { margin-top: 12px; }

/* Photo row */
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }
.photo-row figure { margin: 0; }
.photo-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.photo-row figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.photo-row + .section-note { margin-top: 10px; font-size: 0.88rem; }

.diagram { margin: 28px 0 8px; max-width: 720px; }
.diagram img { width: 100%; border-radius: 4px; background: #fff; border: 1px solid var(--line); }
.diagram figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }

.award { margin-top: 1rem; }
