/* Kranson.net — family album
   Warm paper, flag navy & red, a serif with some personality, and a
   handwritten hand for the little notes the old site was full of. */

:root {
  --paper: #f6f1e7;
  --paper-2: #eee6d6;
  --card: #fffdf8;
  --ink: #1b2340;
  --ink-2: #48506e;
  --muted: #7b7f92;
  --navy: #1f3263;
  --navy-2: #2d4682;
  --red: #b63a33;
  --gold: #a9802f;
  --green: #3f6b4a;
  --sky: #c8d3e8;
  --line: rgba(27, 35, 64, .12);
  --line-2: rgba(27, 35, 64, .2);
  --shadow-sm: 0 1px 2px rgba(27, 35, 64, .08), 0 2px 6px rgba(27, 35, 64, .06);
  --shadow: 0 2px 4px rgba(27, 35, 64, .06), 0 10px 30px -8px rgba(27, 35, 64, .25);
  --shadow-lg: 0 30px 60px -20px rgba(27, 35, 64, .45);
  --polaroid: #fffefb;
  --flag-opacity: .55;
  --radius: 14px;
  --radius-sm: 9px;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --wrap: 1240px;
  --topbar: 64px;
  color-scheme: light;
}

[data-theme='dark'] {
  --paper: #0e1424;
  --paper-2: #131b30;
  --card: #18213a;
  --ink: #eef0f7;
  --ink-2: #b9c0d6;
  --muted: #858da6;
  --navy: #a9bdf0;
  --navy-2: #c5d3f6;
  --red: #f08479;
  --gold: #e2b866;
  --green: #8cc59b;
  --sky: #2a3656;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 12px 30px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
  --polaroid: #f3efe6;
  --flag-opacity: .07;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e1424; --paper-2: #131b30; --card: #18213a; --ink: #eef0f7; --ink-2: #b9c0d6;
    --muted: #858da6; --navy: #a9bdf0; --navy-2: #c5d3f6; --red: #f08479; --gold: #e2b866; --green: #8cc59b;
    --sky: #2a3656; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 12px 30px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
    --polaroid: #f3efe6; --flag-opacity: .07;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { display: block; max-width: 100%; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0; font-optical-sizing: auto; }
p { margin: 0 0 1em; }
kbd {
  font: 500 11px/1 var(--sans); padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--paper);
}
.i { width: 20px; height: 20px; flex: none; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { height: var(--topbar); display: flex; align-items: center; gap: 28px; width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; display: block; flex: none; }
.brand__mark img { width: 100%; height: 100%; display: block; filter: none; }
.brand__name { font: 650 21px/1 var(--serif); letter-spacing: -.02em; }
.brand__name span { color: var(--red); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.is-active { color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.topbar__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.searchbtn {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted);
  cursor: pointer; min-width: 210px; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.searchbtn:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); }
.searchbtn span { flex: 1; text-align: left; }
.iconbtn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.i-sun { display: none; }
[data-theme='dark'] .i-sun { display: block; }
[data-theme='dark'] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-sun { display: block; }
  :root:not([data-theme='light']) .i-moon { display: none; }
}
.menubtn { display: none; }

@media (max-width: 980px) {
  .searchbtn { min-width: 0; width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .searchbtn span, .searchbtn kbd { display: none; }
}
@media (max-width: 820px) {
  .menubtn { display: grid; }
  .nav {
    position: fixed; inset: var(--topbar) 0 auto 0; flex-direction: column; gap: 2px;
    padding: 10px 16px 18px; background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  .nav a { padding: 12px 14px; font-size: 17px; border-radius: 10px; }
  body.menu-open .nav { opacity: 1; transform: none; pointer-events: auto; }
}

/* ------------------------------------------------------------------ common bits */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.eyebrow .i { width: 13px; height: 13px; }
.hand { font-family: var(--hand); font-weight: 600; }
.stamp {
  display: inline-block; font: 600 19px/1 var(--hand); color: var(--red);
  transform: rotate(-3deg); white-space: nowrap;
}
.section { padding: 72px 0 8px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section__head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 10px; }
.section__head p { color: var(--ink-2); margin: 8px 0 0; max-width: 60ch; }
.more { font-weight: 600; font-size: 15px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.more .i { width: 16px; height: 16px; transition: transform .15s; }
.more:hover .i { transform: translateX(3px); }
.btn {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px;
  border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--navy); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn--primary:hover { color: var(--paper); background: var(--navy-2); box-shadow: var(--shadow); }
[data-theme='dark'] .btn--primary { color: #0e1424; }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-2); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn.is-on { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: all .15s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip small { font-size: 12px; opacity: .65; font-weight: 500; }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .stamp { font-size: 30px; display: block; margin-bottom: 8px; }
.fadein { animation: fadein .45s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('../flag.jpg') center / cover no-repeat;
  opacity: var(--flag-opacity);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 60% at 20% 30%, color-mix(in srgb, var(--paper) 70%, transparent), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.6vw, 86px); font-weight: 600; letter-spacing: -.03em; line-height: .98; margin: 18px 0 22px; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--red); }
.hero__lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats b { font: 600 32px/1 var(--serif); letter-spacing: -.02em; }
.hero__stats span { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hero__note { margin-top: 26px; }

.stack { position: relative; height: clamp(360px, 40vw, 500px); }
.polaroid {
  position: absolute; background: var(--polaroid); padding: 12px 12px 46px; border-radius: 3px;
  box-shadow: var(--shadow-lg); width: 64%; cursor: pointer; transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  text-decoration: none; color: #3a3a3a;
}
.polaroid__img { aspect-ratio: 4 / 3; background: #ddd center / cover; position: relative; overflow: hidden; }
.polaroid__img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .8s; }
.polaroid__cap {
  position: absolute; left: 14px; right: 14px; bottom: 9px; font: 600 21px/1.05 var(--hand); color: #2b2f45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.polaroid:nth-child(1) { left: 2%; top: 8%; transform: rotate(-7deg); z-index: 1; }
.polaroid:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); z-index: 2; }
.polaroid:nth-child(3) { left: 18%; bottom: 0; transform: rotate(-1.5deg); z-index: 3; }
.polaroid:hover { transform: rotate(0) scale(1.03); z-index: 5; color: #3a3a3a; }
.tape {
  position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--sky) 75%, transparent); opacity: .8; z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.polaroid:nth-child(2) .tape { background: rgba(182, 58, 51, .28); left: 60%; transform: translateX(-50%) rotate(4deg); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stack { height: 340px; max-width: 520px; width: 100%; margin: 8px auto 0; }
}

/* ------------------------------------------------------------------ cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--tight { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); overflow: hidden;
  outline: 1px solid var(--line); outline-offset: -1px;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.card__media { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card__media img { transform: scale(1.045); }
.card__media--none { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper) 12px 24px); }
.card__media--none .i { width: 34px; height: 34px; opacity: .55; }
.card__count {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px;
  font: 600 12px/1 var(--sans); color: #fff; background: rgba(15, 20, 36, .62); padding: 6px 9px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.card__count .i { width: 13px; height: 13px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__title { font: 600 17px/1.25 var(--serif); letter-spacing: -.005em; }
.card__meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card__ago { position: absolute; left: 10px; top: 10px; }
.card__ago .stamp { background: var(--polaroid); color: var(--red); padding: 5px 10px 7px; border-radius: 4px; font-size: 18px; box-shadow: var(--shadow-sm); }
.tag {
  font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px;
  background: var(--paper-2); color: var(--ink-2);
}
.tag--events { background: color-mix(in srgb, var(--navy) 14%, transparent); color: var(--navy); }
.tag--family { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
.tag--friends { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.tag--history { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink-2); }

/* scrapbook card used for "on this day" */
.snap { background: var(--polaroid); padding: 10px 10px 14px; border-radius: 4px; box-shadow: var(--shadow); color: #2b2f45; text-decoration: none; display: block; transition: transform .25s; }
.snap:nth-child(3n+1) { transform: rotate(-1.4deg); }
.snap:nth-child(3n+2) { transform: rotate(1deg); }
.snap:nth-child(3n) { transform: rotate(-.4deg); }
.snap:hover { transform: rotate(0) translateY(-4px); color: #2b2f45; }
.snap__img { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.snap__img img { width: 100%; height: 100%; object-fit: cover; }
.snap__ago { font: 700 24px/1 var(--hand); color: #b63a33; margin: 10px 2px 2px; }
.snap__title { font: 600 15px/1.3 var(--serif); margin: 0 2px; }
.snap__date { font-size: 12px; color: #77798a; margin: 3px 2px 0; }
.snaps { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); padding: 6px 4px; }

/* ------------------------------------------------------------------ heritage tiles */
.lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .lines { grid-template-columns: 1fr; } }
.line {
  --accent: var(--navy);
  position: relative; border-radius: 20px; overflow: hidden; min-height: 380px; display: flex; flex-direction: column;
  justify-content: flex-end; color: #fff; text-decoration: none; padding: 26px; isolation: isolate; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.line:hover { color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.line--red { --accent: #8f2c27; }
.line--navy { --accent: #1b2c58; }
.line--gold { --accent: #6d5220; }
.line__bg { position: absolute; inset: 0; z-index: -2; }
.line__bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.55) contrast(1.05) saturate(.8); transition: transform 1s; }
.line:hover .line__bg img { transform: scale(1.05); }
.line::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--accent) 12%, color-mix(in srgb, var(--accent) 55%, transparent) 50%, transparent 85%); }
.line__aka { font: 600 22px/1 var(--hand); opacity: .9; }
.line h3 { font-size: 34px; margin: 6px 0 8px; font-weight: 600; }
.line p { margin: 0; opacity: .88; font-size: 15px; }
.line__count { margin-top: 16px; font-size: 13px; opacity: .8; display: flex; gap: 14px; }

/* ------------------------------------------------------------------ kids / people */
.kids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 800px) { .kids { grid-template-columns: 1fr; } }
.kid { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); outline: 1px solid var(--line); outline-offset: -1px; text-decoration: none; color: var(--ink); display: flex; gap: 16px; align-items: center; transition: transform .2s, box-shadow .2s; }
.kid:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.kid__photos { display: flex; flex: none; }
.kid__photos span { width: 62px; height: 78px; border-radius: 6px; overflow: hidden; background: var(--paper-2); border: 3px solid var(--polaroid); box-shadow: var(--shadow-sm); }
.kid__photos span + span { margin-left: -22px; }
.kid__photos span:nth-child(1) { transform: rotate(-6deg); }
.kid__photos span:nth-child(2) { transform: rotate(3deg) translateY(-4px); }
.kid__photos span:nth-child(3) { transform: rotate(-1deg); }
.kid__photos img { width: 100%; height: 100%; object-fit: cover; }
.kid h3 { font-size: 24px; }
.kid p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.people { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 999px; background: var(--card); outline: 1px solid var(--line); outline-offset: -1px; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.person:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--paper-2); display: grid; place-items: center; font: 600 20px/1 var(--serif); color: var(--ink-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.person small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.people--stars { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px; }
.star { text-align: center; text-decoration: none; color: var(--ink); }
.star .avatar { width: 128px; height: 128px; margin: 0 auto 12px; border: 5px solid var(--polaroid); box-shadow: var(--shadow); transition: transform .25s; }
.star:hover .avatar { transform: rotate(-3deg) scale(1.04); }
.star b { font: 600 19px/1.2 var(--serif); display: block; }
.star small { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ year bars */
.years { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 0 2px; overflow-x: auto; }
.year { flex: 1 0 42px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; text-decoration: none; color: var(--ink-2); cursor: pointer; background: none; border: 0; padding: 0; }
.year__bar { width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top, color-mix(in srgb, var(--navy) 55%, var(--paper)), color-mix(in srgb, var(--navy) 28%, var(--paper))); transition: background .15s; min-height: 6px; position: relative; }
.year:hover .year__bar, .year.is-on .year__bar { background: linear-gradient(to top, var(--red), color-mix(in srgb, var(--red) 70%, var(--paper))); }
.year.is-on { color: var(--red); }
.year__n { font-size: 11px; color: var(--muted); }
.year__y { font: 600 13px/1 var(--sans); }

/* ------------------------------------------------------------------ albums page */
.pagehead { padding: 46px 0 26px; }
.pagehead h1 { font-size: clamp(38px, 5vw, 60px); margin-top: 12px; }
.pagehead p { color: var(--ink-2); font-size: 18px; max-width: 60ch; margin-top: 12px; }
.filters { position: sticky; top: var(--topbar); z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.filters__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters__search { position: relative; flex: 1 1 240px; max-width: 360px; }
.filters__search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.filters__search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 0 14px 0 40px; font: inherit; font-size: 15px; }
.filters__search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
.filters select { height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; }
.filters__spacer { flex: 1; }
.filters__count { color: var(--muted); font-size: 14px; }
.yeargroup { margin: 36px 0 10px; display: flex; align-items: baseline; gap: 14px; }
.yeargroup h2 { font-size: 46px; font-weight: 500; letter-spacing: -.03em; color: var(--ink); }
.yeargroup span { color: var(--muted); font-size: 14px; }
.yeargroup::after { content: ''; flex: 1; height: 1px; background: var(--line); align-self: center; }

/* ------------------------------------------------------------------ album page */
.albumhero { position: relative; padding: 40px 0 34px; overflow: hidden; isolation: isolate; }
.albumhero__bg { position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center; filter: blur(46px) saturate(1.1); opacity: .32; transform: scale(1.1); }
[data-theme='dark'] .albumhero__bg { opacity: .22; }
.albumhero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 40%, var(--paper)); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span[aria-hidden] { opacity: .5; }
.albumhero h1 { font-size: clamp(34px, 4.8vw, 62px); max-width: 20ch; margin: 18px 0 10px; letter-spacing: -.025em; }
.albumhero__sub { font: 600 clamp(22px, 2.4vw, 28px)/1.2 var(--hand); color: var(--ink-2); max-width: 46ch; margin-bottom: 14px; }
.albumhero__meta { display: flex; gap: 18px; align-items: center; color: var(--ink-2); font-size: 15px; flex-wrap: wrap; }
.albumhero__meta > span { display: inline-flex; gap: 7px; align-items: center; }
.albumhero__meta .i { width: 17px; height: 17px; color: var(--muted); }
.albumhero__actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.story { max-width: 1100px; margin: 0 auto; }
.prose { max-width: 680px; margin: 30px auto 18px; font: 400 19px/1.65 var(--serif); color: var(--ink); }
.prose--short { font-size: 20px; text-align: center; color: var(--ink-2); font-style: italic; margin: 34px auto 14px; }
.prose--short::before { content: '★'; display: block; font-style: normal; color: var(--red); font-size: 13px; margin-bottom: 8px; opacity: .7; }
.prose a { color: var(--red); }
.prose a[data-album] { cursor: pointer; text-decoration: underline; }

/* justified gallery: each tile grows in proportion to its aspect ratio */
.jg { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.jg::after { content: ''; flex-grow: 999; }
.jg__item {
  position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--paper-2); cursor: zoom-in;
  border: 0; padding: 0; margin: 0;
}
.jg__item i { display: block; }
.jg__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .3s; }
.jg__item:hover img { transform: scale(1.03); }
.jg__item .heart { position: absolute; right: 8px; top: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); width: 22px; height: 22px; }
.jg--solo { justify-content: center; }

.children { margin: 40px 0 0; }
.files { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; justify-content: center; }
.file { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--card); outline: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.file:hover { box-shadow: var(--shadow); color: var(--ink); }
.file small { color: var(--muted); }
.extra { margin-top: 48px; }
.extra summary { cursor: pointer; font: 600 22px/1.2 var(--serif); padding: 10px 0; list-style: none; display: flex; gap: 10px; align-items: center; }
.extra summary::before { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); font: 500 18px/1 var(--sans); }
.extra[open] summary::before { content: '−'; }
.extra p { color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 70px 0 10px; }
.pager a { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--card); outline: 1px solid var(--line); outline-offset: -1px; text-decoration: none; color: var(--ink); transition: box-shadow .15s; }
.pager a:hover { box-shadow: var(--shadow); color: var(--ink); }
.pager a.next { flex-direction: row-reverse; text-align: right; }
.pager img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.pager small { color: var(--muted); font-size: 12.5px; display: block; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.pager b { font: 600 16px/1.25 var(--serif); }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager img { width: 64px; height: 52px; } }

/* ------------------------------------------------------------------ heritage page */
.hhero { position: relative; color: #fff; padding: 80px 0 70px; overflow: hidden; isolation: isolate; }
.hhero__bg { position: absolute; inset: 0; z-index: -2; }
.hhero__bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.6) saturate(.8) contrast(1.05); }
.hhero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--accent, #1b2c58) 30%, color-mix(in srgb, var(--accent, #1b2c58) 60%, transparent) 70%, transparent); }
.hhero--red { --accent: #7e2621; } .hhero--navy { --accent: #17264d; } .hhero--gold { --accent: #5c451a; }
.hhero .crumbs, .hhero .crumbs a { color: rgba(255, 255, 255, .8); }
.hhero__aka { font: 600 28px/1 var(--hand); opacity: .9; margin-top: 30px; }
.hhero h1 { font-size: clamp(44px, 7vw, 92px); letter-spacing: -.03em; margin: 8px 0 14px; font-weight: 600; }
.hhero p { font-size: 20px; opacity: .9; max-width: 34em; margin: 0; font-family: var(--serif); font-style: italic; }
.hintro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; padding: 56px 0 10px; }
@media (max-width: 900px) { .hintro { grid-template-columns: 1fr; gap: 30px; } }
.hintro__text { font: 400 19px/1.7 var(--serif); }
.hintro__text p:first-child::first-letter { float: left; font: 600 72px/.8 var(--serif); margin: 8px 10px 0 0; color: var(--red); }
.facts { list-style: none; padding: 0; margin: 0; position: relative; }
.facts::before { content: ''; position: absolute; left: 91px; top: 14px; bottom: 14px; width: 2px; background: var(--line-2); }
.facts li { display: grid; grid-template-columns: 74px 1fr; gap: 40px; padding: 10px 0; position: relative; }
.facts li::after { content: ''; position: absolute; left: 85px; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--red); box-sizing: border-box; }
.facts b { font: 600 18px/1.3 var(--serif); text-align: right; white-space: nowrap; }
.facts span { color: var(--ink-2); font-size: 15.5px; }
.storylist { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.storycard { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--card); outline: 1px solid var(--line); outline-offset: -1px; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.storycard:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.storycard .i { width: 26px; height: 26px; color: var(--red); flex: none; margin-top: 2px; }
.storycard b { font: 600 18px/1.3 var(--serif); display: block; }
.storycard p { margin: 6px 0 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trees { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tree { background: var(--polaroid); padding: 10px 10px 12px; border-radius: 4px; box-shadow: var(--shadow); text-decoration: none; color: #2b2f45; border: 0; cursor: zoom-in; text-align: left; font: inherit; }
.tree:hover { color: #2b2f45; transform: translateY(-3px); }
.tree span.tree__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8e2d6; }
.tree img { width: 100%; height: 100%; object-fit: cover; }
.tree b { display: block; font: 700 20px/1.1 var(--hand); margin: 10px 2px 0; }
.tree--doc span.tree__img { display: grid; place-items: center; color: #6c6f80; }
.tree--doc .i { width: 46px; height: 46px; }

/* ------------------------------------------------------------------ videos */
.videos { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.video { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); outline: 1px solid var(--line); outline-offset: -1px; }
.video__frame { aspect-ratio: 16 / 9; position: relative; background: #000; }
.video__frame button { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000; }
.video__frame button img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s; filter: sepia(.25); }
.video__frame button:hover img { opacity: 1; }
.video__frame button span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; border-radius: 50%; background: rgba(182, 58, 51, .92); display: grid; place-items: center; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.video__frame button span .i { width: 30px; height: 30px; margin-left: 4px; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__body { padding: 16px 18px 18px; }
.video__body b { font: 600 18px/1.3 var(--serif); display: block; }
.video__yt { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.video__yt .i { width: 15px; height: 15px; }
.filelist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ------------------------------------------------------------------ lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 11, 20, .96); color: #fff; display: grid; grid-template-rows: auto 1fr auto; animation: lbin .2s ease; }
.lightbox[hidden] { display: none; }
@keyframes lbin { from { opacity: 0; } }
.lb__top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 64px; }
.lb__title { flex: 1; min-width: 0; }
.lb__title b { display: block; font: 600 17px/1.25 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb__title a { color: #fff; text-decoration: none; }
.lb__title a:hover { text-decoration: underline; }
.lb__title small { color: rgba(255, 255, 255, .6); font-size: 13px; }
.lb__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 0; color: #fff; cursor: pointer; text-decoration: none; transition: background .15s; flex: none; }
.lb__btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.lb__btn.is-on { color: #ff8a7d; }
.lb__stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; touch-action: pan-y; }
.lb__img { max-width: calc(100vw - 32px); max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; transition: opacity .25s; }
.lb__img.is-loading { opacity: .25; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb__nav:hover { background: rgba(255, 255, 255, .22); }
.lb__nav .i { width: 28px; height: 28px; }
.lb__nav--prev { left: 18px; } .lb__nav--next { right: 18px; }
@media (max-width: 700px) { .lb__nav { display: none; } .lb__img { max-width: 100vw; border-radius: 0; } }
.lb__bottom { padding: 12px 18px 18px; text-align: center; min-height: 70px; }
.lb__cap { font: 600 24px/1.2 var(--hand); color: rgba(255, 255, 255, .92); max-width: 60ch; margin: 0 auto 6px; }
.lb__count { font-size: 13px; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.lb__progress { position: absolute; left: 0; bottom: 0; height: 3px; background: #ff8a7d; width: 0; }
.lightbox.is-playing .lb__progress { animation: lbprog var(--slide, 5s) linear forwards; }
@keyframes lbprog { to { width: 100%; } }
.lightbox.is-lane .lb__img { animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ------------------------------------------------------------------ search palette */
.palette { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(14, 20, 36, .45); backdrop-filter: blur(3px); animation: lbin .15s; }
.palette__panel { position: relative; width: min(680px, 100%); background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; outline: 1px solid var(--line-2); animation: popin .18s cubic-bezier(.2, .8, .2, 1); }
@keyframes popin { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette__field .i { color: var(--muted); }
.palette__field input { flex: 1; height: 62px; border: 0; background: transparent; color: var(--ink); font: 500 19px/1 var(--sans); outline: none; }
.palette__field input::-webkit-search-cancel-button { display: none; }
.palette__results { max-height: min(60vh, 560px); overflow-y: auto; padding: 8px; }
.palette__group { font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.result { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.result.is-sel, .result:hover { background: var(--paper-2); color: var(--ink); }
.result img, .result .avatar { width: 56px; height: 42px; border-radius: 7px; object-fit: cover; flex: none; background: var(--paper-2); }
.result .avatar { width: 42px; height: 42px; border-radius: 50%; font-size: 16px; }
.result b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.result small { color: var(--muted); font-size: 13px; }
.result mark { background: color-mix(in srgb, var(--red) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.palette__hint { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.palette__hint .chip { margin: 4px; }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 100; background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .25s; box-shadow: var(--shadow); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ footer */
.footer { margin-top: 100px; background: var(--paper-2); border-top: 1px solid var(--line); }
.flagstripe { height: 8px; background: repeating-linear-gradient(90deg, var(--navy) 0 64px, var(--paper) 64px 72px, var(--red) 72px 136px, var(--paper) 136px 144px); opacity: .9; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; padding: 54px 0 30px; flex-wrap: wrap; }
.footer__title { font: 650 28px/1 var(--serif); margin: 0 0 14px; }
.footer__title span { color: var(--red); font-weight: 500; }
.footer__quote { font: italic 400 18px/1.5 var(--serif); color: var(--ink-2); max-width: 30em; margin: 0; }
.footer__quote span { display: block; font: 600 20px/1.4 var(--hand); color: var(--muted); font-style: normal; margin-top: 4px; }
.footer__cols { display: flex; gap: 64px; }
.footer__cols h2 { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer__cols a { display: block; color: var(--ink); text-decoration: none; padding: 4px 0; font-size: 15px; }
.footer__cols a:hover { color: var(--red); }
.footer__fine { padding: 18px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ phones */
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px); }
  .section { padding-top: 52px; }
  .grid, .grid--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__body { padding: 10px 11px 12px; }
  .card__title { font-size: 14.5px; }
  .card__meta .tag { display: none; }
  .snaps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .snap { padding: 7px 7px 10px; }
  .snap__ago { font-size: 20px; }
  .snap__title { font-size: 13.5px; }
  .line { min-height: 260px; padding: 20px; }
  .line h3 { font-size: 28px; }
  .hero { padding: 30px 0 40px; }
  .hero__stats { gap: 22px; margin-top: 32px; }
  .hero__stats b { font-size: 26px; }
  .stack { height: 280px; }
  .polaroid { width: 70%; padding: 8px 8px 34px; }
  .polaroid__cap { font-size: 17px; bottom: 7px; }
  .videos { grid-template-columns: 1fr; }
  .jg { gap: 4px; }
  .jg__item { border-radius: 4px; }
  .people { grid-template-columns: 1fr 1fr; gap: 10px; }
  .person { border-radius: 16px; padding: 8px; gap: 9px; }
  .person .avatar { width: 40px; height: 40px; }
  .person b { font-size: 13.5px; }
  .person small { font-size: 11.5px; }
  .people--stars { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .star .avatar { width: 92px; height: 92px; }
  .star b { font-size: 15px; }
  .yeargroup h2 { font-size: 36px; }
  .filters__search { max-width: none; flex-basis: 100%; }
  .footer__cols { gap: 40px; }
  .hhero { padding: 50px 0 44px; }
  .prose { font-size: 17.5px; }
}

/* ------------------------------------------------------------------ family tree */
.muted { color: var(--muted); font-size: 14px; }
.tav { --acc: var(--ink-2); width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 14%, var(--card)); color: var(--acc); font: 600 15px/1 var(--serif); letter-spacing: .02em;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 35%, transparent); }
.tav img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; filter: sepia(.25); }
.tav--red { --acc: var(--red); } .tav--navy { --acc: var(--navy); } .tav--gold { --acc: var(--gold); } .tav--green { --acc: var(--green); }
.tav--sm { width: 34px; height: 34px; font-size: 12px; }
.tav--xl { width: 132px; height: 132px; font-size: 44px; border: 5px solid var(--polaroid); box-shadow: var(--shadow); transform: rotate(-2deg); }

.tstats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 26px; }
.tstats div { display: flex; flex-direction: column; }
.tstats b { font: 600 38px/1 var(--serif); color: var(--navy); letter-spacing: -.02em; }
.tstats span { font-size: 13px; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; }

/* pedigree: nested brackets, widest generation on the right */
.pedwrap { overflow-x: auto; padding: 6px 2px 18px; margin: 0 -2px; scrollbar-width: thin; }
.ped { display: inline-flex; min-width: 100%; }
.pnode { display: flex; align-items: center; }
.pparents { display: flex; flex-direction: column; position: relative; padding-left: 34px; }
.pparents::before { content: ''; position: absolute; left: 0; top: 50%; width: 17px; border-top: 2px solid var(--line-2); }
.pparents > .pnode { position: relative; padding: 5px 0; }
.pparents > .pnode::before { content: ''; position: absolute; left: -17px; width: 17px; border-top: 2px solid var(--line-2); top: 50%; }
.pparents > .pnode::after { content: ''; position: absolute; left: -17px; border-left: 2px solid var(--line-2); }
.pparents > .pnode:first-child::after { top: 50%; bottom: 0; }
.pparents > .pnode:last-child::after { top: 0; bottom: 50%; }
.pparents > .pnode:first-child:last-child::after { display: none; }
.pbox { --acc: var(--ink-2); position: relative; width: 236px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow-sm);
  outline: 1px solid var(--line); outline-offset: -1px; border-left: 4px solid var(--acc); transition: box-shadow .15s, transform .15s; flex: none; }
.pbox:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.pbox > a { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 10px; text-decoration: none; color: var(--ink); }
.pbox b { display: block; font: 600 14.5px/1.25 var(--serif); }
.pbox small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.3; }
.pbox--red { --acc: var(--red); } .pbox--navy { --acc: var(--navy); } .pbox--gold { --acc: var(--gold); } .pbox--green { --acc: var(--green); }
.pbox.is-focus { background: color-mix(in srgb, var(--acc) 9%, var(--card)); }
.pbox--empty { border-left-style: dashed; padding: 10px 14px; background: transparent; box-shadow: none; opacity: .7; }
.pbox--empty b { color: var(--muted); font-weight: 500; }
.pbox--kids { width: 150px; padding: 14px; border-left-color: var(--ink); }
.pbox__kids { display: flex; flex-direction: column; gap: 4px; }
.pbox__kids a { font: 600 16px/1.2 var(--serif); text-decoration: none; color: var(--ink); }
.pbox__kids a:hover { color: var(--red); }
.pbox__more { position: absolute; right: -15px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); color: var(--ink-2); box-shadow: var(--shadow-sm); outline: 1px solid var(--line-2); outline-offset: -1px; }
.pbox__more:hover { background: var(--navy); color: var(--paper); }
.pbox__more .i { width: 15px; height: 15px; }

.tlines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 1000px) { .tlines { grid-template-columns: repeat(2, 1fr); } }
.tline { --acc: var(--navy); padding: 20px 20px 18px; border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--card);
  outline: 1px solid var(--line); outline-offset: -1px; border-top: 5px solid var(--acc); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.tline:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.tline--red { --acc: var(--red); } .tline--navy { --acc: var(--navy); } .tline--gold { --acc: var(--gold); } .tline--green { --acc: var(--green); }
.tline__from { font: 600 20px/1 var(--hand); color: var(--acc); }
.tline h3 { font-size: 26px; margin: 6px 0 4px; }
.tline p { margin: 0; color: var(--ink-2); font-size: 14px; }
.tline p span { color: var(--muted); }
.tline__stats { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.tline__stats b { color: var(--ink); font-weight: 600; }

.finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.find { position: relative; padding: 22px 22px 18px; background: var(--polaroid); color: #2b2f45; border-radius: 4px; box-shadow: var(--shadow); }
.find::before { content: ''; position: absolute; top: -9px; left: 50%; width: 84px; height: 20px; transform: translateX(-50%) rotate(-2deg);
  background: color-mix(in srgb, var(--gold) 35%, rgba(255, 255, 255, .5)); opacity: .8; }
.find:nth-child(2n) { transform: rotate(.5deg); }
.find:nth-child(3n) { transform: rotate(-.6deg); }
.find b { font: 600 19px/1.3 var(--serif); display: block; }
.find p { margin: 8px 0 12px; font-size: 14.5px; line-height: 1.55; color: #48506e; }
.find__who { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.find__who a { color: #b63a33; font-weight: 500; }
.find--inline { margin: 26px 0; transform: none !important; }

.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; }
.place { background: var(--card); border-radius: var(--radius); padding: 20px 22px; outline: 1px solid var(--line); outline-offset: -1px; }
.place h3 { font-size: 20px; margin: 0 0 12px; }
.place ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.place li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.place__t { font-weight: 600; font-size: 15px; }
.place__n { font: 600 15px/1 var(--serif); color: var(--ink-2); grid-row: 1; grid-column: 2; }
.place__bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.place__bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
.place__who { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.place__who a { color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { text-decoration: none; }
.variants { margin-top: 30px; border-collapse: collapse; font-size: 14.5px; max-width: 720px; width: 100%; }
.variants caption { text-align: left; font: 600 20px/1.3 var(--serif); padding-bottom: 10px; }
.variants th, .variants td { text-align: left; padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.variants th { font-weight: 600; width: 34%; }
.variants td { color: var(--ink-2); }

.qs { display: grid; gap: 10px; max-width: 860px; }
.q { background: var(--card); border-radius: 12px; outline: 1px solid var(--line); outline-offset: -1px; padding: 0 20px; margin-bottom: 10px; }
.q summary { cursor: pointer; padding: 16px 0; font: 600 17px/1.35 var(--serif); list-style: none; display: flex; gap: 10px; align-items: baseline; }
.q summary::-webkit-details-marker { display: none; }
.q summary::before { content: '?'; font: 700 22px/1 var(--hand); color: var(--red); width: 14px; flex: none; }
.q[open] summary::before { content: '\2013'; }
.q p { margin: 0 0 12px 24px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.q .find__who { margin: 0 0 16px 24px; }
.q .find__who a { color: var(--red); }

.tsources { max-width: 860px; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; padding-bottom: 40px; }

.thero { --acc: var(--navy); background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 11%, var(--paper)), var(--paper)); padding: 34px 0 30px; border-bottom: 1px solid var(--line); }
.thero--red { --acc: var(--red); } .thero--navy { --acc: var(--navy); } .thero--gold { --acc: var(--gold); } .thero--green { --acc: var(--green); }
.thero__main { display: flex; gap: 32px; align-items: center; margin-top: 22px; }
.thero__line { font: 600 22px/1 var(--hand); color: var(--acc); }
.thero h1 { font-size: clamp(34px, 5vw, 58px); margin: 6px 0 4px; letter-spacing: -.02em; }
.thero__aka { font: italic 400 19px/1.4 var(--serif); color: var(--ink-2); }
.thero__meta { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.thero .albumhero__actions { margin-top: 16px; }
@media (max-width: 640px) { .thero__main { flex-direction: column; align-items: flex-start; gap: 18px; } .tav--xl { width: 96px; height: 96px; font-size: 32px; } }

.tperson { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; padding: 40px 0 0; }
@media (max-width: 900px) { .tperson { grid-template-columns: 1fr; gap: 30px; } }
.tnote { font: 400 19px/1.7 var(--serif); margin-bottom: 30px; }
.tnote::first-letter { float: left; font: 600 64px/.8 var(--serif); margin: 6px 10px 0 0; color: var(--red); }
.tsub { font-size: 13px; font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 30px 0 12px; }
.tperson > div > .tsub:first-child, .tfam > .tsub:first-child { margin-top: 0; }
.tfacts span em { font-style: normal; font-weight: 600; color: var(--ink); margin-right: 4px; }
.tfacts span { font-size: 15px; }
.tsrc { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.tfam { background: var(--card); border-radius: var(--radius); padding: 24px; outline: 1px solid var(--line); outline-offset: -1px; align-self: start; }
.trow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.trow:hover { background: var(--paper-2); color: var(--ink); }
.trow b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.trow small { display: block; color: var(--muted); font-size: 12.5px; }
.trow--empty { color: var(--muted); font-size: 14px; padding-left: 10px; }
.tkids { margin: 4px 0 0 22px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.trows { display: grid; gap: 2px; max-width: 760px; }
.trows--grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-width: none; gap: 4px 24px; }
.trows--grid .trow { margin: 0; }
#ancestors, #pedigree { scroll-margin-top: calc(var(--topbar) + 10px); }

@media (max-width: 600px) {
  .tstats b { font-size: 30px; }
  .tlines { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tline { padding: 14px; }
  .tline h3 { font-size: 20px; }
  .tline p { font-size: 12.5px; }
  .tline__stats { flex-direction: column; gap: 2px; }
  .pbox { width: 188px; }
  .pbox--kids { width: 112px; padding: 10px; }
  .pbox__kids a { font-size: 13.5px; }
  .pparents { padding-left: 24px; }
  .pparents::before { width: 12px; }
  .pparents > .pnode::before, .pparents > .pnode::after { left: -12px; }
  .pparents > .pnode::before { width: 12px; }
  .pbox b { font-size: 13.5px; }
  .places { grid-template-columns: 1fr; }
}

/* links into the tree from the history pages */
.btn--light { background: #fffdf8; color: #1b2340; box-shadow: var(--shadow-sm); }
.btn--light:hover { color: #1b2340; background: #fff; box-shadow: var(--shadow); }
.btn--glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--glass:hover { color: #fff; background: rgba(255, 255, 255, .24); }
.hhero .albumhero__actions { margin-top: 26px; }
.mores { display: flex; gap: 22px; flex-wrap: wrap; }
.treecta { display: flex; align-items: center; gap: 28px; margin-top: 28px; padding: 22px 26px; border-radius: 20px; background: var(--card);
  outline: 1px solid var(--line); outline-offset: -1px; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.treecta:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.treecta__faces { display: flex; flex: none; }
.treecta__faces .tav { width: 54px; height: 54px; border: 3px solid var(--card); margin-left: -14px; }
.treecta__faces .tav:first-child { margin-left: 0; }
.treecta__text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.treecta__text b { font: 600 24px/1.25 var(--serif); }
.treecta__text > span:last-child { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .treecta { flex-direction: column; align-items: flex-start; gap: 16px; } }

.emblem { display: flex; align-items: center; gap: 44px; margin-top: 28px; padding: 34px 38px; border-radius: 20px; background: var(--card);
  outline: 1px solid var(--line); outline-offset: -1px; box-shadow: var(--shadow-sm); }
.emblem__mark { width: 220px; height: 220px; flex: none; }
.emblem__text { flex: 1; }
.emblem__text h2 { font: 600 30px/1.2 var(--serif); margin: 6px 0 8px; }
.emblem__text > p { color: var(--ink-2); margin: 0 0 18px; max-width: 60ch; }
.emblem__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.emblem__rows li { display: flex; gap: 14px; align-items: flex-start; }
.emblem__rows li > span:last-child { display: flex; flex-wrap: wrap; column-gap: 8px; }
.emblem__rows b { font-weight: 650; }
.emblem__rows a { color: var(--ink-2); }
.emblem__rows li > span:last-child > span { flex-basis: 100%; color: var(--ink-2); font-size: 15px; }
.flag { width: 34px; height: 22px; border-radius: 6px; flex: none; margin-top: 2px; outline: 1px solid rgba(0,0,0,.12); outline-offset: -1px; }
.flag--ua { background: linear-gradient(#2b6fd6 50%, #ffd500 50%); }
.flag--pl { background: linear-gradient(#fff 50%, #dc143c 50%); }
.flag--it { background: linear-gradient(90deg, #009246 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%); }
@media (max-width: 760px) { .emblem { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px 22px; } .emblem__mark { width: 150px; height: 150px; } }

