/* FamPeople design system. Tokens first; dark theme follows the OS setting. */
:root {
  --paper: #faf7f2;
  --card: #ffffff;
  --ink: #1b1714;
  --ink-2: #5c534c;
  --line: #e6dfd5;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --mast: #14110f;
  --mast-ink: #f4efe8;
  --chip: #f1ebe2;
  --shadow: 0 1px 2px rgba(27, 23, 20, .06), 0 8px 24px rgba(27, 23, 20, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120f;
    --card: #1e1a17;
    --ink: #f1ebe3;
    --ink-2: #b3a89c;
    --line: #342d27;
    --accent: #ff4d5e;
    --accent-ink: #1a0004;
    --mast: #0d0b09;
    --chip: #2a241f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--ink-2); }

/* masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: var(--mast); color: var(--mast-ink); }
.masthead-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; text-decoration: none; font: 700 22px/1 var(--serif); letter-spacing: .02em; }
.brand-fam { background: var(--accent); color: #fff; padding: 4px 7px 3px; transform: skewX(-10deg); display: inline-block; margin-right: 4px; }
.brand-people { color: var(--mast-ink); }
.sitefoot .brand-people { color: var(--ink); }
.mainnav { display: flex; gap: 20px; font: 500 15px/1 var(--sans); }
.mainnav a { text-decoration: none; opacity: .85; }
.mainnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.masthead .search { margin-left: auto; width: min(340px, 40vw); min-width: 0; }

/* search */
.search { position: relative; display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; font: 400 15px/1.2 var(--sans); padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.masthead .search input { background: #26211d; border-color: #3a332d; color: var(--mast-ink); }
.masthead .search input::placeholder { color: #a39889; }
.search button { font: 600 15px/1 var(--sans); padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; z-index: 30; max-height: 70vh; overflow: auto; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--chip); }
.search-results small { display: block; color: var(--ink-2); font-size: 13px; }
.search-results .all { justify-content: center; font-weight: 600; color: var(--accent); }

/* portraits */
.portrait { display: block; object-fit: cover; border-radius: 50%; background: var(--chip); flex: none; }
.portrait-lg { width: 168px; height: 168px; border: 4px solid var(--card); box-shadow: var(--shadow); }
.portrait-sm { width: 52px; height: 52px; }
.portrait-xs { width: 36px; height: 36px; }
.monogram { display: grid; place-items: center; font: 700 1em/1 var(--serif); color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 40% 88%); }
@media (prefers-color-scheme: dark) { .monogram { color: hsl(var(--h) 50% 85%); background: hsl(var(--h) 25% 24%); } }
.portrait-lg.monogram { font-size: 56px; }
.portrait-sm.monogram { font-size: 19px; }
.portrait-xs.monogram { font-size: 14px; }

/* shared bits */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font: 500 13px/1 var(--sans); padding: 7px 12px; border-radius: 999px; background: var(--chip); text-decoration: none; }
.chip:hover { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5vw, 54px); margin: 0; }
.lede { font-size: 19px; color: var(--ink-2); margin: 10px 0 0; }
.kicker { font: 600 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 14px; }
.btn { display: inline-block; margin-top: 18px; padding: 13px 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; }

/* biography */
.bio-hero { background: linear-gradient(180deg, var(--chip), var(--paper)); border-bottom: 1px solid var(--line); }
.bio-hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding: 40px 0 34px; }
.parttag { font: 500 16px/1 var(--sans); color: var(--ink-2); vertical-align: middle; margin-left: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 0; }
.facts div { min-width: 0; }
.bio-id { min-width: 0; }
.facts dt { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.facts dd { margin: 5px 0 0; font-weight: 500; }
.bio-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 40px 0; }
.bio-side { position: relative; }
.bio-grid.no-side { grid-template-columns: minmax(0, 1fr); }
.bio-grid.no-side .prose { margin-inline: auto; }
.toc { position: sticky; top: 88px; font-size: 14px; }
.toc h2 { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--accent); }

.prose { max-width: 720px; font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
.prose > p:first-of-type { font-size: 20px; line-height: 1.6; }
.prose h2 { font-size: 28px; margin: 44px 0 10px; padding-top: 8px; }
.prose h3 { font-size: 22px; margin: 30px 0 8px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose img { display: block; border-radius: var(--r); margin: 24px auto; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 21px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); }
.prose ul, .prose ol { padding-left: 22px; }
.parts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.parts > span:first-child { color: var(--ink-2); margin-right: 6px; }
.parts a, .parts .cur { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.parts .cur { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.more { padding: 34px 0 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.more h2 { font-size: 26px; margin: 0 0 18px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pcard { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard-txt { min-width: 0; }
.pcard-name { display: block; font-weight: 600; line-height: 1.3; }
.pcard-sub { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* stories */
.story { padding: 40px 0; }
.story h1 { font-size: clamp(30px, 4.6vw, 48px); }
.meta { color: var(--ink-2); margin: 10px 0 0; font-size: 15px; }
.feature { margin: 28px 0; }
.feature img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.scard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.scard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.scard img, .scard .noimg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: linear-gradient(135deg, var(--chip), var(--line)); }
.scard-t { font: 700 19px/1.25 var(--serif); padding: 14px 16px 4px; }
.scard-x, .scard-d { font-size: 14px; color: var(--ink-2); padding: 0 16px 16px; }

/* listings */
.listing { padding: 40px 0 60px; }
.listing h1 { margin-bottom: 22px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.pager a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--card); }
.az { columns: 3 240px; column-gap: 32px; list-style: none; padding: 0; margin: 0; }
.az li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line); }
.az a { text-decoration: none; font-weight: 500; }
.az a:hover { color: var(--accent); }
.az small { display: block; color: var(--ink-2); font-size: 13px; }
.azsec h2 { font-size: 34px; margin: 34px 0 10px; color: var(--accent); }
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters a { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--card); font: 700 18px/1 var(--serif); }
.letters a:hover { border-color: var(--accent); color: var(--accent); }
.letters small { font: 500 11px/1.4 var(--sans); color: var(--ink-2); margin-top: 3px; }
.letters-sticky { position: sticky; top: 64px; background: var(--paper); padding: 10px 0; z-index: 5; }
.letters-sticky a { min-width: 36px; padding: 6px; font-size: 15px; }

/* home */
.home-hero { background: var(--mast); color: var(--mast-ink); overflow-x: clip; position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 64px 0 72px; }
.home-hero h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; }
.home-hero .lede { color: #c9bfb3; max-width: 34ch; }
.search-hero { margin-top: 28px; max-width: 560px; }
.search-hero input { font-size: 17px; padding: 16px 20px; }
.home-hero .search-hero input { background: #fffdf9; color: #1b1714; border: 0; }
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; transform: rotate(-4deg) scale(1.08); }
.mosaic a { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #2a241f; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.mosaic a:nth-child(3n) { transform: translateY(14px); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.05); transition: filter .2s; }
.mosaic a:hover img { filter: none; }
.band { padding: 52px 0 8px; }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 18px; }
.band-head h2 { font-size: 34px; margin: 0; }
.band-head p { margin: 0; color: var(--ink-2); }
.more-link { margin-left: auto; color: var(--accent); font-weight: 600; text-decoration: none; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.catcard { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font-weight: 500; }
.catcard b { font: 700 15px/1 var(--sans); color: var(--ink-2); }
.catcard:hover { border-color: var(--accent); }
.t-home main { padding-bottom: 56px; }

/* footer */
.sitefoot { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 56px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 4px 0 12px; }
.foot-grid a:not(.brand) { display: block; padding: 3px 0; text-decoration: none; }
.foot-grid p { color: var(--ink-2); max-width: 36ch; }

/* phone */
@media (max-width: 900px) {
  .mainnav { display: none; }
  .masthead .search { width: auto; flex: 1 1 0; }
  .t-home .masthead .search { display: none; }
  .masthead-row { gap: 14px; }
  .brand { font-size: 19px; }
  .bio-grid, .bio-grid.no-side { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .bio-side { display: none; }
  .hero-grid { grid-template-columns: 1fr; padding: 40px 0 36px; gap: 28px; }
  .mosaic { grid-template-columns: repeat(9, 1fr); transform: none; gap: 6px; order: -1; }
  .mosaic a:nth-child(3n) { transform: none; }
  .mosaic a:nth-child(n+10) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bio-hero-grid { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
  .portrait-lg { width: 112px; height: 112px; }
  .portrait-lg.monogram { font-size: 40px; }
  .prose { font-size: 17px; }
  .prose > p:first-of-type { font-size: 18px; }
  .band-head h2 { font-size: 28px; }
  .search-hero button { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
