/* Interior pages of Selezione di Camugliano.
   Editorial direction from the Diamante Nero reference (uniform photo frames,
   staggered entrances, decade line, horizontal pedigree); identity from the
   homepage: Spectral / Public Sans, gold on black, archive paper.
   The homepage (main.css) is never overridden outside .inner-page. */

.inner-page {
  --display: var(--serif);
  --page-max: 1360px;
  --raised: #1d1c19;
  --raised-2: #25221d;
  --line-d: #36322b;
  --line-d-soft: #26241f;
  --gold-soft: #c0a47d;
  --soft-text: #c7c1b8;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
}
.inner-page [hidden] { display: none !important; }
.inner-page .wrap { max-width: var(--page-max); }
.inner-page h1, .inner-page h2, .inner-page h3 { font-weight: 400; }
.inner-page h1, .inner-page h2 { text-wrap: balance; }
.inner-page .site-header { opacity: 1; transform: none; pointer-events: auto; }
.inner-page .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .5em; text-decoration-color: var(--gold); }
.inner-page .label { font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .16em; margin-bottom: 1.3rem; }
.inner-page a { text-underline-offset: .2em; }
.inner-page :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Shared action styles are defined in updates.css. */
.inner-page .text-link { font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; min-height: 44px; }
.text-button { background: none; border: 0; border-bottom: 1px solid var(--gold); color: inherit; font: 500 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; min-height: 44px; padding: .5rem 0; cursor: pointer; transition: color .2s, border-color .2s; }
.text-button:hover { border-color: var(--white); }

.paper { background: var(--archive); color: var(--text); }
.section-title, .section-heading h2 { font-family: var(--display); font-size: clamp(2.3rem, 1.5rem + 2.8vw, 4.2rem); line-height: 1.06; margin-bottom: 1.5rem; }
.section-heading { margin-bottom: 2.5rem; }
.quiet-note { color: var(--muted); font-size: .82rem; line-height: 1.8; max-width: 60rem; }
.inner-page figcaption { color: #b4ada2; font: 400 .72rem/1.6 var(--sans); margin-top: .85rem; }
.paper figcaption { color: var(--muted); }

/* ---------- Entrances (main.js adds .is-in to [data-reveal]) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .inner-page [data-reveal] { transition-delay: calc(var(--d, 0) * 90ms); }
  /* Photographs open like a curtain instead of sliding; the figure itself stays put. */
  .js .inner-page .reveal-mask[data-reveal] { opacity: 1; transform: none; }
  .js .inner-page .reveal-mask[data-reveal] .frame { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease) calc(var(--d, 0) * 90ms); }
  .js .inner-page .reveal-mask[data-reveal].is-in .frame { clip-path: inset(0 0 0 0); }
  .js .inner-page .reveal-mask[data-reveal] figcaption { opacity: 0; transition: opacity .8s var(--ease) calc(300ms + var(--d, 0) * 90ms); }
  .js .inner-page .reveal-mask[data-reveal].is-in figcaption { opacity: 1; }
}

/* ---------- Photo frame: the whole dog, uniform proportions ---------- */
.frame { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #1a1916; isolation: isolate; }
.frame__bg { position: absolute; inset: -14%; z-index: -1; background: center / cover no-repeat; filter: blur(14px) brightness(.5) saturate(1.1); transition: transform .9s var(--ease); }
.frame > img { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform .9s var(--ease); }
a:hover > .frame .frame__bg { transform: scale(1.08); }
@media (prefers-reduced-motion: no-preference) { a:hover > .frame > img { transform: scale(1.02); } }
.frame--profile { aspect-ratio: 5 / 4; }
.frame--tall { aspect-ratio: 4 / 5; }
.frame--square { aspect-ratio: 1; }
.frame--square > img { object-fit: cover; }
.frame--empty { display: grid; place-content: center; justify-items: center; gap: .9rem; background: #1b1a17; border: 1px solid var(--line-d); color: #8f877a; font: 500 .62rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-align: center; padding: 1rem; }
.frame--empty > img { width: 56px; height: 56px; object-fit: contain; opacity: .32; filter: grayscale(.3); }
.paper .frame { background: #ddd6ca; }
.paper .frame--empty { background: #e9e4da; border-color: #d4cbbb; color: var(--muted); }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(8rem, 13vw, 11rem) 0 clamp(4rem, 7vw, 6rem); overflow: hidden; }
.page-hero__inner { display: grid; gap: 3rem; }
.page-title { font-family: var(--display); font-size: clamp(3.2rem, 1.6rem + 5.4vw, 7.2rem); line-height: .98; letter-spacing: -.025em; max-width: 18ch; }
.page-title em { color: var(--gold-soft); font-weight: 400; }
.page-lead { max-width: 40rem; margin-top: 2rem; color: var(--soft-text); font-size: clamp(1rem, .95rem + .3vw, 1.16rem); line-height: 1.8; }
.page-title--profile { font-size: clamp(2.8rem, 1.6rem + 4vw, 6rem); max-width: 14ch; }
.page-hero--split .page-hero__inner { align-items: center; }
.story-photo { max-width: 520px; justify-self: end; width: 100%; }
@media (min-width: 850px) { .page-hero--split .page-hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(3rem, 6vw, 6rem); } }

/* ---------- Chapter line (directory generations, story chapters) ---------- */
.generation-nav { position: sticky; top: var(--header-h); z-index: 20; background: var(--black); border-block: 1px solid var(--line-d-soft); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.generation-nav::-webkit-scrollbar { display: none; }
.generation-nav__track { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(.4rem, 1.6vw, 1.6rem); width: max-content; min-width: 100%; margin: 0 auto; padding: 0 var(--pad); }
.generation-nav__track::before { content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 50%; height: 1px; background: var(--line-d); }
.generation-nav a { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: .55rem; min-height: 68px; align-content: center; padding: 1.4rem .9rem; background: var(--black); font: 400 clamp(1rem, .9rem + .35vw, 1.22rem)/1 var(--serif); color: #8f877a; text-decoration: none; white-space: nowrap; transition: color .4s var(--ease); }
.generation-nav__num { font: 600 .58rem/1 var(--sans); letter-spacing: .12em; color: var(--gold); opacity: .7; transition: opacity .4s var(--ease); }
.generation-nav a::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .4s var(--ease); }
.generation-nav a:hover, .generation-nav a[aria-current] { color: var(--white); }
.generation-nav a[aria-current] .generation-nav__num { opacity: 1; }
.generation-nav a[aria-current]::after { transform: scale(1); }
@media (max-width: 1100px) { .generation-nav__track { justify-content: flex-start; } .generation-nav a { min-height: 58px; padding-block: 1.1rem; } }

/* ---------- Directory ---------- */
.catalog-intro { padding-bottom: 2.5rem; }
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem 2rem; padding-block: 1.5rem; border-block: 1px solid var(--line-d); }
.catalog-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 1.2rem 2rem; flex: 1; }
.search-control { flex: 1 1 240px; max-width: 460px; }
.search-control label, .catalog-filters legend { display: block; font: 600 .64rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: .6rem; padding: 0; }
.search-control input { width: 100%; min-height: 48px; padding: .8rem 1rem; border: 1px solid #4a443b; border-radius: 0; background: var(--raised); color: var(--white); font: inherit; font-size: .92rem; -webkit-appearance: none; appearance: none; transition: border-color .2s; }
.search-control input::placeholder { color: #8f877a; }
.search-control input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.catalog-filters fieldset { padding: 0; margin: 0; border: 0; display: flex; flex-wrap: wrap; }
.catalog-filters legend { width: 100%; }
.catalog-filters fieldset label { position: relative; }
.catalog-filters fieldset span { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem 1.05rem; font-size: .82rem; border: 1px solid #4a443b; margin-right: -1px; color: #d6d0c6; cursor: pointer; transition: background-color .2s, color .2s; }
.catalog-filters input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.catalog-filters input:checked + span { background: var(--archive); color: var(--black); border-color: var(--archive); font-weight: 600; }
.catalog-filters input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; position: relative; z-index: 1; }
.filter-reset { border: 0; border-bottom: 1px solid var(--gold); background: transparent; color: var(--white); font: 500 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; min-height: 48px; padding: .5rem 0; cursor: pointer; }
.catalog-status { font-weight: 600; font-size: .9rem; margin: 0; }
.catalog-intro > .quiet-note { margin-top: 1.2rem; color: #9e968a; }
html:not(.js) .catalog-toolbar { display: none; }

.catalog-era { padding-block: clamp(4rem, 7vw, 6.5rem); border-bottom: 1px solid var(--line-d-soft); scroll-margin-top: calc(var(--header-h) + 70px); }
.catalog-era__heading { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: clamp(1.2rem, 3vw, 2.5rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.catalog-era__heading .section-title { margin: 0 0 .7rem; }
.catalog-era__heading > p { margin: 0; max-width: 34rem; font-size: .88rem; color: #aaa294; }
@media (max-width: 599px) {
  .catalog-era__heading { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .catalog-era__heading { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .catalog-era__heading .section-title { margin: 0; }
  .catalog-era__heading > p { padding-bottom: .4rem; }
}
.catalog-era__dogs > div + div { margin-top: 3.5rem; }
.catalog-group-title { display: flex; align-items: center; gap: 1rem; font: 600 .64rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #aaa294; margin-bottom: 1.6rem; }
.catalog-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line-d-soft); }
.catalog-grid { display: grid; grid-template-columns: 1fr; gap: 3rem 1.6rem; }
@media (min-width: 520px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.6rem 1.2rem; } }
@media (min-width: 860px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 1.6rem; } }
@media (min-width: 1180px) { .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.catalog-card { min-width: 0; }
.catalog-card article { height: 100%; display: flex; flex-direction: column; }
.catalog-card__photo { display: block; margin-bottom: 1.1rem; }
.catalog-card__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.tag { font: 600 .58rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #aaa294; border: 1px solid #423d35; padding: .38rem .5rem .34rem; }
.tag--home { color: var(--white); border-color: var(--gold); }
.catalog-card h3 { font: 400 clamp(1.45rem, 1.2rem + .55vw, 1.85rem)/1.12 var(--display); margin-bottom: .45rem; overflow-wrap: break-word; }
.catalog-card h3 a { text-decoration: underline; text-decoration-color: rgba(154, 123, 79, .65); text-decoration-thickness: 1px; text-underline-offset: .18em; transition: text-decoration-color .2s; }
.catalog-card h3 a:hover { text-decoration-color: var(--gold-soft); }
.catalog-card__date { font-size: .76rem; color: #d6d0c6; margin-bottom: .45rem; font-variant-numeric: tabular-nums; }
.catalog-card__summary { font-size: .82rem; line-height: 1.65; color: #aaa294; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-card .text-link { margin-top: auto; }
.empty-results { padding-block: 4rem 5rem; font: 400 clamp(1.6rem, 1.3rem + 1vw, 2.2rem)/1.2 var(--display); }

/* ---------- Dog profile ---------- */
.profile-banner { padding-top: calc(var(--header-h) + 2rem); }
.profile-banner img { width: min(100%, 420px); height: 130px; object-fit: contain; margin-inline: auto; }
.profile-banner + .dog-profile-hero { padding-top: 2rem; }
.dog-profile-hero { display: grid; gap: 3rem; padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.profile-breadcrumb { font-size: .76rem; color: #b4ada2; margin-bottom: 1.6rem; }
.profile-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.dog-profile-hero .label { margin-bottom: 1rem; }
.dog-profile-hero .page-title { margin-bottom: 2rem; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; border-top: 1px solid var(--line-d); margin: 0; }
.profile-facts > div { padding: .95rem 0; border-bottom: 1px solid var(--line-d); }
.profile-facts dt { font: 700 .6rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #9e968a; }
.profile-facts dd { font-size: .92rem; line-height: 1.55; margin: .25rem 0 0; }
.profile-facts__wide { grid-column: 1 / -1; }
.profile-summary { color: var(--soft-text); line-height: 1.8; font-size: .95rem; margin-top: 1.6rem; max-width: 42rem; }
.source-note { border-left: 1px solid var(--gold); padding-left: 1rem; }
.birth-note { margin-top: 1.25rem; font-size: .8rem; color: #b4ada2; max-width: 42rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; margin-top: 1.4rem; }
.dog-profile-hero__media { min-width: 0; margin: 0; }
.dog-profile-hero__media > a { display: block; }
@media (min-width: 960px) {
  .dog-profile-hero { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 2rem; padding-top: calc(var(--header-h) + 4rem); }
  .dog-profile-hero__text { grid-column: 1 / span 6; padding-bottom: 1rem; }
  .dog-profile-hero__media { grid-column: 7 / span 6; }
}
@media (max-width: 959px) {
  .dog-profile-hero { display: flex; flex-direction: column; gap: 0; padding-top: calc(var(--header-h) + 1rem); }
  .dog-profile-hero__text { display: contents; }
  .profile-breadcrumb { order: 1; margin-bottom: .6rem; }
  .dog-profile-hero .label { order: 2; }
  .dog-profile-hero .page-title { order: 3; margin-bottom: 1.5rem; }
  .dog-profile-hero__media { order: 4; width: 100%; margin-bottom: 2rem; }
  .profile-facts { order: 5; width: 100%; }
  .profile-summary, .birth-note { order: 6; }
  .profile-actions { order: 7; }
}
@media (max-width: 430px) { .profile-facts { grid-template-columns: 1fr; } }

.profile-milestone { display: grid; gap: 1.5rem 3rem; padding-block: clamp(3.5rem, 7vw, 6rem); border-block: 1px solid var(--line-d-soft); }
.milestone__year { font: 300 clamp(5rem, 2.5rem + 9vw, 11rem)/.82 var(--display); color: var(--gold); letter-spacing: -.04em; margin: 0; }
.milestone__body { color: var(--soft-text); font-size: 1.02rem; line-height: 1.85; max-width: 42rem; }
@media (min-width: 960px) { .profile-milestone { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; } }

.profile-records { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line-d-soft); }
.profile-records .text-link { margin-top: 1.5rem; }

/* ---------- Pedigree (same behaviour as Diamante Nero) ---------- */
.pedigree-section { padding-block: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line-d-soft); }
.pedigree-heading { display: grid; gap: 1rem 3rem; margin-bottom: 2.5rem; }
.pedigree-heading .section-title { margin: 0; }
.pedigree-hint { display: flex; align-items: center; gap: .65rem; margin: 0; font-weight: 600; font-size: .95rem; }
.pedigree-hint__icon { display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border: 1px solid var(--gold); border-radius: 50%; font-weight: 400; }
.pedigree-hint__desktop { display: none; }
.pedigree-source { color: #9e968a; font-size: .78rem; margin-top: .7rem; max-width: 46rem; }
@media (min-width: 960px) { .pedigree-heading { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; } }
.pedigree-controls { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-bottom: 1.2rem; }
.pedigree-canvas { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: .6rem; scrollbar-color: #5c5040 transparent; }
.pedigree-legend { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; color: #9e968a; font-size: .72rem; margin-top: 1.6rem; }
.pedigree-legend > span::before { content: ""; display: inline-block; width: 14px; height: 2px; background: #d9d1c3; margin-right: .4rem; vertical-align: middle; }
.pedigree-legend > span:nth-child(2)::before { background: var(--gold); }

.ped-tree, .ped-children { list-style: none; margin: 0; padding: 0; }
.ped-node { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .6rem .8rem; background: var(--raised); border: 1px solid #312d27; border-left: 2px solid #d9d1c3; transition: background-color .2s, border-color .2s; }
.ped-item--madre > .ped-node { border-left-color: var(--gold); }
.ped-item--g0 > .ped-node { border-left-color: var(--gold); background: var(--raised-2); }
.ped-node--branch { cursor: pointer; }
.ped-node--branch:hover { background: #26241f; border-top-color: #4a443a; border-right-color: #4a443a; border-bottom-color: #4a443a; }
.ped-node--unknown { border-style: dashed; border-left-style: solid; color: #b4ada2; }
.ped-photo { display: block; flex: none; width: 44px; height: 44px; overflow: hidden; background: #0f0f0d; }
.ped-photo img { width: 100%; height: 100%; object-fit: contain; }
.ped-photo .frame { width: 100%; height: 100%; aspect-ratio: auto; }
.ped-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ped-role { font: 700 .58rem/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #9e968a; }
.ped-name { font: 600 .86rem/1.28 var(--sans); overflow-wrap: break-word; }
.ped-name a { text-decoration-color: var(--gold); }
.ped-date { font-size: .68rem; color: #9e968a; font-variant-numeric: tabular-nums; }
.ped-note { font-size: .64rem; line-height: 1.4; color: #8a8276; margin-top: .15rem; }
.ped-toggle { position: relative; flex: none; width: 28px; height: 28px; padding: 0; border: 1px solid #6b6253; border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .4s var(--ease), transform .5s var(--ease); }
.ped-toggle::before { content: ""; position: absolute; inset: -9px; }
.ped-toggle__icon::before, .ped-toggle__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--white); transform: translate(-50%, -50%); }
.ped-toggle__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .5s var(--ease); }
.ped-toggle[aria-expanded="true"] { transform: rotate(180deg); border-color: var(--gold); }
.ped-toggle[aria-expanded="true"] .ped-toggle__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.ped-toggle:hover { border-color: var(--gold-soft); }
.ped-children[hidden] { display: none !important; }

/* Mobile / tablet: progressive nested generations */
@media (max-width: 1179px) {
  .pedigree-canvas { max-width: 640px; }
  .ped-children { display: flex; flex-direction: column; gap: .55rem; margin: .55rem 0 .2rem .9rem; padding-left: .9rem; border-left: 1px solid #3f3a32; }
  .ped-item { position: relative; }
  .ped-children > .ped-item::before { content: ""; position: absolute; left: -.9rem; top: 28px; width: .9rem; border-top: 1px solid #3f3a32; }
  .ped-item--g0 > .ped-node .ped-photo { width: 64px; height: 64px; }
}
@media (max-width: 400px) {
  .ped-children { margin-left: .5rem; padding-left: .7rem; }
  .ped-children > .ped-item::before { left: -.7rem; width: .7rem; }
  .ped-node { padding: .55rem .6rem; gap: .55rem; }
  .ped-photo { width: 36px; height: 36px; }
}

/* Desktop: horizontal tree, one column per generation */
@media (min-width: 1180px) {
  .pedigree-hint__mobile { display: none; }
  .pedigree-hint__desktop { display: inline; }
  .pedigree-controls { display: none; }
  .pedigree-canvas { --gap: 1.5rem; --w0: 11rem; --w1: 12.5rem; --w4: 11.5rem; }
  .ped-tree { display: flex; width: max-content; min-width: 100%; }
  .ped-item { display: flex; align-items: center; position: relative; }
  .ped-item > .ped-node { width: var(--w1); flex: none; }
  .ped-item--g0 > .ped-node { width: var(--w0); flex-direction: column; align-items: stretch; gap: .7rem; padding: .7rem; }
  .ped-item--g0 > .ped-node .ped-photo { width: 100%; height: auto; aspect-ratio: 1; }
  .ped-item--g0 > .ped-node .ped-toggle { position: absolute; right: .7rem; bottom: .9rem; }
  .ped-item--g0 > .ped-node .ped-text { padding-right: 2.2rem; }
  .ped-item--g0 > .ped-node .ped-name { font: 400 1.45rem/1.08 var(--display); }
  .ped-item--g1 > .ped-node .ped-photo, .ped-item--g2 > .ped-node .ped-photo { width: 40px; height: 40px; }
  .ped-toggle { width: 24px; height: 24px; }
  .ped-children { display: flex; flex-direction: column; justify-content: center; flex-shrink: 0; padding-left: var(--gap); position: relative; }
  .ped-children::before { content: ""; position: absolute; left: 0; top: 50%; width: calc(var(--gap) / 2); border-top: 1px solid #5c5447; }
  .ped-children > .ped-item { padding: .3rem 0 .3rem calc(var(--gap) / 2); }
  .ped-children > .ped-item::before { content: ""; position: absolute; left: 0; top: 50%; width: calc(var(--gap) / 2); border-top: 1px solid #5c5447; }
  .ped-children > .ped-item::after { content: ""; position: absolute; left: 0; border-left: 1px solid #5c5447; }
  .ped-children > .ped-item:first-child::after { top: 50%; bottom: 0; }
  .ped-children > .ped-item:last-child::after { top: 0; height: 50%; }
  .ped-children > .ped-item--madre::before, .ped-children > .ped-item--madre::after { border-color: #6e5a3c; }
  .ped-item--g3 > .ped-node, .ped-item--g4 > .ped-node { min-height: 0; padding: .4rem .65rem; }
  .ped-item--g4 > .ped-node { width: var(--w4); background: #191815; }
  .ped-item--g4 .ped-role { font-size: .54rem; }
  .ped-item--g4 .ped-name { font-size: .78rem; font-weight: 500; }
  .ped-item--g4 .ped-date { font-size: .64rem; }
  .ped-item--g4 .ped-note { display: none; }
  .ped-item--g4 .ped-photo { width: 30px; height: 30px; }
  .ped-item--g3 > .ped-children > .ped-item, .ped-item--g4 { padding-top: .12rem !important; padding-bottom: .12rem !important; }
}
@media (min-width: 1400px) { .pedigree-canvas { --gap: 1.75rem; --w0: 12rem; --w1: 13.5rem; --w4: 12.5rem; } }

/* ---------- Descendants and gallery ---------- */
.descendants-section { padding-block: clamp(4rem, 8vw, 6.5rem); border-top: 1px solid var(--line-d-soft); }
.descendants__head { max-width: 46rem; margin-bottom: 2.5rem; }
.descendants__head .section-title { margin-bottom: .8rem; }
.descendants__head > p:last-child { color: #aaa294; font-size: .9rem; }
.descendant-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 2.2rem 1.4rem; }
.descendant { display: flex; flex-direction: column; gap: .3rem; }
.descendant__photo { display: block; margin-bottom: .75rem; }
.descendant > .frame { margin-bottom: .75rem; }
.descendant__name { font: 400 1.45rem/1.15 var(--display); text-decoration-color: rgba(154, 123, 79, .65); text-underline-offset: .18em; }
.descendant__name:hover { text-decoration-color: var(--gold-soft); }
.descendant__meta { font-size: .72rem; color: #9e968a; }

.profile-gallery { padding-block: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line-d-soft); }
.gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 3rem; margin-bottom: 2.5rem; }
.gallery-head .section-title { margin: 0; }
.gallery-head > p { color: #9e968a; font-size: .85rem; max-width: 24rem; margin: 0; }
.photo-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.photo-grid figure { margin: 0; }
.photo-grid a { display: block; }

/* ---------- Sources ---------- */
.source-section { padding-block: 3rem 4rem; }
.source-section > .text-link { margin-top: 2rem; }
.source-section details, .results-sources { border-top: 1px solid #3a352d; border-bottom: 1px solid #3a352d; }
.inner-page summary { cursor: pointer; padding: 1.2rem 2.5rem 1.2rem 0; min-height: 48px; font-size: .85rem; font-weight: 600; list-style: none; position: relative; }
.inner-page summary::-webkit-details-marker { display: none; }
.inner-page summary::after { content: "+"; position: absolute; right: .3rem; top: .95rem; font: 300 1.5rem/1 var(--sans); color: var(--gold); transition: transform .3s var(--ease); }
.inner-page details[open] > summary::after { transform: rotate(45deg); }
.source-content { padding-block: .5rem 1.5rem; max-width: 60rem; overflow-wrap: anywhere; }
.source-content p { font-size: .82rem; color: #bcb4a8; margin-bottom: 1rem; }
.source-content a { color: var(--white); }
.source-content small { display: block; font-size: .7rem; margin-top: .3rem; }

/* ---------- Story timeline ---------- */
.story-timeline { padding-block: 1rem clamp(4rem, 8vw, 7rem); }
.timeline { --rail: clamp(9rem, 15vw, 14rem); position: relative; }
.timeline__spine { position: absolute; top: 0; bottom: 0; left: calc(var(--pad) + var(--rail) - 2.25rem); width: 1px; background: var(--line-d); }
.timeline__progress { position: absolute; inset: 0; background: var(--gold); transform-origin: top; transform: scaleY(var(--progress, 0)); }
html:not(.js) .timeline__progress { display: none; }
.chapter { position: relative; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); padding-block: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid var(--line-d-soft); scroll-margin-top: calc(var(--header-h) + 70px); }
.chapter:first-of-type { border-top: 0; }
.chapter__marker { position: relative; }
.chapter__sticky { position: sticky; top: calc(var(--header-h) + 100px); padding-right: 3.25rem; }
.chapter__num { display: block; font: 300 clamp(2.6rem, 2rem + 2vw, 4rem)/1 var(--display); color: #6f675b; transition: color .4s var(--ease); }
.chapter__period { margin: .7rem 0 0; font: 700 .6rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #9e968a; }
.chapter__dot { position: absolute; left: calc(var(--rail) - 2.25rem - 6px); top: 1.1rem; width: 13px; height: 13px; border-radius: 50%; background: var(--black); border: 1px solid #6a6458; transition: background-color .4s var(--ease), border-color .4s var(--ease); }
.chapter.is-active .chapter__num, html:not(.js) .chapter__num { color: var(--gold); }
.chapter.is-active .chapter__dot { background: var(--gold); border-color: var(--gold); }
.chapter__content { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
.chapter--pari .chapter__content { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.chapter--pari .chapter__figure { order: -1; }
.chapter__title { font: 400 clamp(2rem, 1.5rem + 2vw, 3.4rem)/1.05 var(--display); margin-bottom: 1.2rem; }
.chapter__text > p { color: var(--soft-text); max-width: 40rem; margin-bottom: 1rem; }
.chapter__figure { margin: 0; }
@media (max-width: 859px) {
  .timeline { --rail: 0px; padding-left: calc(var(--pad) + 1.6rem); }
  .timeline__spine { left: calc(var(--pad) + .35rem); }
  .chapter { grid-template-columns: 1fr; padding-block: 3rem; border-top: 0; }
  .chapter__marker { margin-bottom: 1rem; }
  .chapter__sticky { position: static; padding-right: 0; display: flex; align-items: baseline; gap: 1rem; }
  .chapter__period { margin: 0; }
  .chapter__dot { left: calc(-1.6rem + .35rem - 6px); top: .9rem; }
  .chapter__content, .chapter--pari .chapter__content { grid-template-columns: 1fr; gap: 1.8rem; }
  .chapter--pari .chapter__figure { order: 0; }
}
.editorial-close { padding-block: clamp(4rem, 8vw, 7rem); }
.editorial-close .text-link { margin-top: 2rem; }
.reading-grid { display: grid; gap: 2rem 4rem; }
.reading-grid > div > p { margin-bottom: 1.25rem; max-width: 42rem; }
@media (min-width: 850px) { .reading-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }

/* ---------- Results ---------- */
.results-section { padding-block: clamp(4rem, 7vw, 6rem); }
.result-feature { display: grid; gap: 3rem; align-items: center; margin-bottom: clamp(4.5rem, 9vw, 7.5rem); }
.result-feature h2 { font: 400 clamp(2.4rem, 1.6rem + 2.8vw, 4.4rem)/1.05 var(--display); }
.result-feature__media { margin: 0; max-width: 420px; width: 100%; }
@media (min-width: 960px) { .result-feature { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(3rem, 6vw, 6rem); } .result-feature__media { justify-self: end; } }
.result-numbers { display: flex; flex-wrap: wrap; gap: 2rem 4.5rem; margin-block: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--rule-light); }
.result-numbers strong { font: 300 clamp(4rem, 2.5rem + 5vw, 7rem)/1 var(--display); color: var(--gold-deep); }
.result-numbers span { display: block; font: 600 .64rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; margin-top: .75rem; }
.result-feature__text > p { color: var(--muted); font-size: .88rem; }
.result-feature .text-link { margin-top: 1.5rem; }
.results-scroll { overflow-x: auto; }
.results-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; font-size: .84rem; }
.results-table caption { text-align: left; padding-bottom: 1.5rem; color: var(--muted); font-size: .78rem; }
.results-table td, .results-table th { padding: 1.3rem .9rem; vertical-align: top; border-bottom: 1px solid var(--rule-light); }
.results-table tbody th { font: 400 1.2rem/1.2 var(--display); }
.results-table tbody th a { text-decoration-color: var(--gold); }
.results-table td:first-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.results-table thead { color: var(--muted); text-transform: uppercase; font-size: .62rem; letter-spacing: .12em; }
.results-table thead th { font-weight: 600; }
.results-table tbody tr { transition: background-color .2s; }
.results-table tbody tr:hover { background: rgba(154, 123, 79, .06); }
.result-tag { display: block; font: 600 .62rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .5rem; color: var(--gold-deep); }
.results-sources { margin-top: 2rem; border-color: #c8beae; }
.results-sources ul { padding-left: 1.2rem; font-size: .8rem; line-height: 2; }
.results-sources > p { font-size: .8rem; padding-bottom: 1rem; }

/* ---------- Litters ---------- */
.litter-section { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }
.litter-list { margin-top: 2.5rem; }
.litter { display: grid; grid-template-columns: clamp(4.5rem, 11vw, 10rem) minmax(0, 1fr); gap: clamp(1rem, 3vw, 3rem); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid #cfc5b4; }
.litter__mark { font: 300 clamp(2.4rem, 1.4rem + 3.5vw, 5rem)/.9 var(--display); color: var(--gold-deep); letter-spacing: -.03em; }
.litter__mark--undated { font-style: italic; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem); color: #b3a58f; letter-spacing: 0; }
.litter__date { font: 600 .64rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .7rem; }
.litter__parents { font: 400 clamp(1.7rem, 1.3rem + 1.4vw, 2.6rem)/1.12 var(--display); margin-bottom: 1.6rem; max-width: 32ch; }
.litter__parents > span[aria-hidden] { color: var(--gold); padding-inline: .1em; }
.litter__parents-img { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 1rem; margin-bottom: 1.8rem; }
.litter__parents-img figure { margin: 0; }
.litter__parents-img figcaption { font-size: .84rem; color: var(--text); margin-top: .55rem; }
.litter__parents-img figcaption span { display: block; font: 700 .58rem/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.litter__parents-img figcaption a { text-decoration-color: var(--gold); }
.litter__text { max-width: 44rem; color: #3d3a35; }
.litter__label { font: 600 .62rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1.8rem 0 .9rem; }
.litter__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: .8rem; }
.litter__photos figure { margin: 0; }
.litter__photos a { display: block; }
.litter__pups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1.6rem 1.2rem; }
.litter-pup { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; }
.litter-pup .frame { margin-bottom: .65rem; }
.litter-pup__name { font: 400 1.3rem/1.15 var(--display); }
.litter-pup__go { font: 600 .6rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.litter-pup:hover .litter-pup__name { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }
@media (max-width: 600px) { .litter { grid-template-columns: 1fr; gap: .6rem; } .litter__parents-img { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Contact ---------- */
.contact-section { padding-block: clamp(4rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem); }
.contact-list { margin: 0 0 2rem; border-top: 1px solid var(--rule-light); }
.contact-list > div { padding: 1.4rem 0; border-bottom: 1px solid var(--rule-light); }
.contact-list dt { font: 700 .62rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.contact-list dd { margin: 0; }
.contact-phone { font: 400 clamp(2rem, 1.5rem + 2vw, 3.2rem)/1.1 var(--display); text-decoration: none; background-image: linear-gradient(var(--gold), var(--gold)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .5s var(--ease); }
.contact-phone:hover { background-size: 100% 1px; }

/* ---------- Footer ---------- */
.page-footer { padding-block: 3rem 2rem; border-top: 1px solid #3f392f; }
.page-footer__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; padding-bottom: 2.5rem; }
.page-footer__top .brand { font-family: var(--display); font-size: 1.8rem; line-height: 1.15; display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; }
.page-footer small { font: 400 .7rem/1.8 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #b4ada2; }
.page-footer__top > p { font-family: var(--display); font-size: 1.8rem; color: var(--gold-soft); line-height: 1.15; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .75rem; padding-bottom: 2rem; }
.footer-nav a { min-height: 40px; display: inline-flex; align-items: center; text-decoration-color: rgba(154, 123, 79, .6); }
.page-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; border-top: 1px solid #3f392f; padding-top: 1.5rem; font-size: .66rem; color: #b4ada2; }

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