/* Shared design tokens for atlas pages. Source of truth: .user/docs/DESIGN-GUIDELINE.md (palette updated 2026-10-16 to navy + coral, see .todo/037). Link BEFORE reading.css. */
:root {
  /* Back and back-to-top (BackToTop.astro, BackPage.astro): size, the gap between them, their right edge; and the
     room a page keeps under a fixed bottom tool bar (v2 tool bars, the slim phone bar) */
  --fab-size: 38px;
  --fab-gap: 10px;
  --fab-right: calc(1.35rem + 1.5rem - 19px);
  --bar-clear: calc(68px + env(safe-area-inset-bottom));
  --paper: #f4f3f0;
  --paper-2: #ebe9e4;
  --surface: #fcfbf9;
  --rule: #dedad3;
  --ink: #13233a;
  --muted: #4b505a;
  --blue-ink: #25324a;
  --blue: #39465a;
  --blue-line: #6b6f78;
  --blue-soft: #bdb8ae;
  --r-pill: 999px;
  --r-lg: 1.4rem;
  --r-md: 1.1rem;
  --r-sm: 0.5rem;
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 350ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fs-callout: 0.9375rem;
  --fs-foot: 0.8125rem;
  --fs-caption: 0.75rem;
  /* Palette "navy + glacier" (owner, 2026-11-17; was sage, before that coral). --accent is a fill with navy text
     (buttons, pills, badges); --accent-text is for words (kickers, active nav, chips); --accent-mark is for non-text marks on paper
     (dots, pins, underlines, selected edges, thin bars) where the light fill is too faint. On photos and the dark
     bar use --accent itself. */
  --accent: #a8dbe8;
  --accent-hover: #92cfdf;
  --accent-ink: #13233a;
  --accent-soft: #ebf7fa;
  --accent-text: #1f6578;
  --accent-mark: #3f8aa0;
  --accent-rim: #cdebf2;
  /* Family-tree lineages. "East": dusty mauve (dot, light tile, deeper tile). */
  --lineage-east: #c48fb0;
  --lineage-east-1: #efdae7;
  --lineage-east-2: #e5c4d8;
  /* "Europe" lineage: slate (2026-11-17), so it never reads as the glacier --accent-mark on a highlighted path. */
  --lineage-europe: #7d8fb3;
  --lineage-europe-1: #dde2ee;
  --lineage-europe-2: #cbd3e6;
  /* Old names, kept as aliases so nothing missed breaks. */
  --coral: var(--accent);
  --coral-hover: var(--accent-hover);
  --coral-ink: var(--accent-ink);
  --coral-soft: var(--accent-soft);
  --coral-text: var(--accent-text);
  /* Shelter finder map (TASK-004): land and sea of the dot map and the Google basemap; tick on checked shelters. */
  --map-land: #f6f3ec;
  --map-sea: #cfe3ef;
  /* Google basemap style (public/atlas/shelters/gmap.js): pale, coloured, warm paper land. */
  --map-label: #5a6478;
  --map-park: #e3eedc;
  --map-landcover: #e9f0e0;
  --map-terrain: #eef0e4;
  --map-built: #f1ede4;
  --map-water-label: #6f8fa6;
  --map-road: #ffffff;
  --map-highway: #f3dfc4;
  --map-highway-edge: #e8cfae;
  --map-border: #a9b3c4;
  --map-province: #cfd4dd;
  --map-country-label: #4b5a73;
  --ok: #3c7d5a;
}

/* Text and shading over photos (DESIGN-GUIDELINE --night / --on-photo): --scrim is the navy behind photo text. */
:root {
  --scrim: #0e1a2b;
  --on-photo: #fff;
}

/* Reading-page tints, between --blue-soft and --blue-wash (was --gold / the old reading.css --blue-soft). */
:root {
  --blue-mid: #8e8a82;
  --blue-pale: #dedad3;
}

/* One focus ring (zero specificity: component rules still win). */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 2px;
}
.dark-mood :focus-visible {
  outline-color: var(--blue-soft);
}

/* Glass tiers. Adopt by class or copy the values into an existing selector. */
.glass-clear {
  background: #0e1a2b40;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.glass-regular {
  background: linear-gradient(140deg, #ffffffb3, #ffffff73);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid #dedad3cc;
  box-shadow:
    0 10px 30px #25324a14,
    inset 0 1px 0 #ffffffcc;
}
.glass-thick {
  background: #fcfbf9f2;
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass-regular,
  .glass-thick {
    background: var(--surface);
  }
  .glass-clear {
    background: #08111de6;
    color: #fff;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass-regular,
  .glass-thick {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface);
  }
  .glass-clear {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #08111de6;
    color: #fff;
  }
}
@media (prefers-contrast: more) {
  .glass-regular,
  .glass-thick {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface);
    border: 2px solid var(--ink);
  }
  .glass-clear {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #08111de6;
    color: #fff;
  }
}
@media (forced-colors: active) {
  .glass-clear,
  .glass-regular,
  .glass-thick {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Author and date under an article's title (Byline.astro). */
.byline {
  margin-top: 0.8rem;
  font-size: var(--fs-foot);
  color: var(--muted);
}
.byline a {
  color: inherit;
  text-underline-offset: 3px;
}

/* Analytics consent notice (JS-built, see consent.js). Not a modal: no backdrop, no focus trap. */
.consent {
  position: fixed;
  z-index: 65;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(22rem, calc(100vw - 2rem));
  box-sizing: border-box;
  padding: 1rem 1rem 0.9rem;
  border-radius: var(--r-lg);
  color: var(--ink);
  font-size: var(--fs-callout);
  line-height: 1.45;
  animation: consent-in var(--t-base) var(--ease);
}
.consent[hidden] {
  display: none;
}
.consent-text {
  /* No × any more (owner, 2026-10-19), so the text uses the full width. */
  margin: 0 0 0.8rem;
}
.consent-text a {
  color: var(--blue-ink);
  text-underline-offset: 3px;
}
.consent-actions {
  display: flex;
  gap: 0.5rem;
}
.consent-actions :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--blue-line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--blue-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consent-actions :is(button, a):hover {
  background: var(--paper-2);
}
.consent-x {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
/* The notice wears the navigation bar's material per page tone (--bar-* tokens, NavBar.astro): same glass, edge,
   blur, corners and ink; its buttons are the bar's pills (one filled, one outlined). Overrides .glass-regular. */
.consent.consent {
  color: var(--bar-ink, var(--ink));
  background: var(--bar-bg, var(--glass-regular-bg));
  border: 1px solid var(--bar-edge, var(--rule));
  border-radius: var(--bar-r, var(--r-md));
  box-shadow: var(--bar-shadow, none);
  backdrop-filter: var(--bar-blur, blur(16px));
  -webkit-backdrop-filter: var(--bar-blur, blur(16px));
}
.consent .consent-text a,
.consent .consent-x {
  color: inherit;
}
.consent .consent-x {
  opacity: 0.8;
}
.consent .consent-actions :is(button, a) {
  border: 1px solid var(--bar-edge, var(--rule));
  background: transparent;
  color: inherit;
  font-weight: 500;
  transition: background-color var(--t-fast);
}
.consent .consent-actions button[data-choice="granted"] {
  background: var(--bar-pill, var(--blue-pale));
}
.consent .consent-actions :is(button, a):hover {
  background: var(--bar-pill-hover, var(--paper-2));
}
@supports not (backdrop-filter: blur(1px)) {
  .consent.consent {
    background: var(--bar-solid, var(--surface));
  }
}
@media (prefers-reduced-transparency: reduce) {
  .consent.consent {
    background: var(--bar-solid, var(--surface));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@keyframes consent-in {
  from {
    opacity: 0;
  }
}
/* Home and /breeds/: stay clear of the density strip and the letter rail on the right edge. */
body:has(.density) .consent,
body:has(.alphabet) .consent {
  right: 5rem;
}
/* Phones: a compact card low in the corner, so most of the screen stays free. */
@media (max-width: 760px) {
  .consent {
    right: max(0.5rem, env(safe-area-inset-right));
    /* Bottom gap shared with the fixed UI (--tabs-clear, NavBar.astro). */
    bottom: var(--tabs-clear, max(0.5rem, env(safe-area-inset-bottom)));
    width: min(17rem, calc(100vw - 3rem));
    padding: 0.7rem 0.75rem 0.6rem;
    font-size: var(--fs-foot);
    line-height: 1.4;
  }
  .consent-text {
    margin: 0 1.8rem 0.55rem 0;
  }
  .consent-actions :is(button, a) {
    min-height: 40px;
  }
  .consent-x {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  /* Home and /breeds/: stay clear of the density strip and the letter rail on the right edge (home: also of the
     back-to-top button in the bottom-right corner and the time marker on the left). */
  body:has(.density) .consent {
    right: 3.75rem;
    width: min(17rem, calc(100vw - 6.5rem));
  }
  body:has(.alphabet) .consent {
    right: 3.4rem;
  }
}

/* Footer "Cookie settings" button looks like the footer links. */
.foot nav button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-ink);
  font: inherit;
  cursor: pointer;
}
.foot nav button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* One typeface for the whole site (owner, 2026-10-17): Libre Franklin, the wordmark's sans, also for article text,
   captions and notes that used the book serif. "html:root" outranks reading.css's own :root tokens. Sans reads
   larger than the serif did, so body text steps down a little. */
html:root {
  --serif: var(--sans);
  --wordmark: var(--sans);
}
html body {
  font-size: 1.0625rem;
  line-height: 1.7;
}
/* Article text in the sans: a comfortable reading size (the serif needed more). */
html main :is(p, li, blockquote) {
  font-size: 1.125rem;
  line-height: 1.7;
}
@media (max-width: 760px) {
  html main :is(p, li, blockquote) {
    font-size: 1.0625rem;
  }
}

/* Headings in the wordmark's manner (owner's pick "F", 2026-10-17), on every reading page (the home timeline keeps
   its own): page titles light (no coral full stop since owner, 2026-11-10), section headings bold and tight, subheadings bold and
   small. !important: reading.css's light-type layer sets heading weights with !important. */
html
  body:not(:has(.density))
  :is(.hero-card h1, .plain-card h1, .about-story h1) {
  font-weight: 300 !important;
  letter-spacing: -0.03em !important;
}
html body:not(:has(.density)) main h2 {
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}
html body:not(:has(.density)) main h3 {
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

/* Spacing rhythm for reading pages (owner, 2026-10-17): paragraphs about one line apart; a section heading has
   clearly more air above than below, so it belongs to the text it introduces; subheadings sit closer still. */
html body:not(:has(.density)) main section > :is(p, ul, ol, blockquote) {
  margin-top: 0;
  margin-bottom: 1.05em;
}
html body:not(:has(.density)) main > section {
  padding-top: 2.4rem;
}
html body:not(:has(.density)) main > section:first-child {
  padding-top: 0.6rem;
}
html body:not(:has(.density)) main section > h2 {
  margin: 0 0 0.6em;
}
html body:not(:has(.density)) main section > h3 {
  margin: 1.5em 0 0.45em;
}
html body:not(:has(.density)) main section :is(ul, ol) > li + li {
  margin-top: 0.35em;
}
@media (max-width: 760px) {
  html body:not(:has(.density)) main > section {
    padding-top: 2rem;
  }
}
/* The same reading rhythm inside text pages' single card (About, Privacy, Sitemap). */
html .plain-card .prose > h2,
html .plain-card h2 {
  margin: 2em 0 0.55em;
}
html .plain-card :is(p, ul, ol) {
  margin-top: 0;
  margin-bottom: 1em;
}
html .plain-card li + li {
  margin-top: 0.3em;
}

/* Nothing shows above the navigation bar's bottom edge (owner): a strip of the same page background sits behind
   the bar, so text and photos scrolling up end at the bar instead of showing around and through it. */
.nav-wrap[data-tone="paper"]::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: calc(
    max(0.75rem, env(safe-area-inset-top, 0px)) + var(--bar-h, 60px) + 1.5rem
  );
  /* Soft lower edge: content fades in under the bar instead of meeting a hard line. */
  -webkit-mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent);
  background:
    radial-gradient(55rem 38rem at 92% 8%, #dedad34d, transparent 70%),
    radial-gradient(48rem 36rem at 4% 55%, #bdb8ae1f, transparent 70%),
    radial-gradient(42rem 30rem at 85% 95%, #8e8a821a, transparent 70%),
    var(--paper);
  background-attachment: fixed;
  pointer-events: none;
}
/* Phone page plan sits in the dark bar glass: its current section reads in the bar's light ink. */
html body .toc details ol a.on {
  color: var(--bar-pill-ink, inherit);
}
/* The Pinterest mark sits in the photo's bottom-right corner everywhere (owner, 2026-10-17); in a captioned figure it
   stays on the photo, above the caption. */
html body .pin-save {
  top: auto;
  bottom: 0.6rem;
  right: 0.6rem;
}
html body figure:has(> .pin-save) {
  display: grid;
}
html body figure:has(> .pin-save) > :is(img, picture) {
  grid-area: 1 / 1;
}
html body figure > .pin-save {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  margin: 0 0.6rem 0.6rem 0;
}
/* Neat start under the title card (owner): one even step to "On this page", one to the first paragraph. */
html body .page {
  padding-top: 2.5rem;
}
@media (max-width: 1100px) {
  html body .page {
    padding-top: 1.5rem;
  }
  html body .page > .toc {
    margin-bottom: 1.25rem;
  }
}
html.has-hero:not(.past-hero) .nav-wrap[data-tone="paper"]::before {
  opacity: 0;
}
/* One header for every inner page (owner, 2026-10-18: "standardised appearance"): the photo runs up behind the
   navigation bar on every page (owner), its frame below the bar sized and focused so the dogs' heads sit under
   the bar; it is the same share of the screen on every page (capped, so the title card is always in view on a short laptop
   window), and the title card overlaps it by the same amount. Wins over the per-page rules (reading.css .hero /
   .hero.whole, Breeds A to Z .dogs-photo). */
body:has(.nav-wrap[data-tone="paper"]) .hero {
  /* --hero-show: photo strip from the page top to the card's top edge plus the overlap; --hero-lap: overlap. */
  --hero-show: calc(clamp(18rem, 50svh, 30rem) + var(--nav-clear, 5.25rem));
  --hero-lap: 3rem;
  position: relative;
  padding-top: calc(var(--hero-show) - var(--hero-lap));
  overflow-x: clip;
}
/* The photo runs down behind the whole title card and ends where the card ends (owner, 2026-11-17: "make those
   pictures longer ... really smooth"): the strip above the card is unchanged, and from the card's top edge the photo
   melts into the page along an eased curve (smoothstep stops), so no band or edge shows anywhere. */
body:has(.nav-wrap[data-tone="paper"]) .hero > :is(img, picture) {
  --fade-from: calc(var(--hero-show) - var(--hero-lap));
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: 100%;
  /* Never taller than the photo shown full width (--photo-ar = width/height, set by rail.js; 1.5 for the hubs):
     a taller frame would zoom the photo in and push the heads under the card (tablets, small laptops). */
  height: min(100%, max(var(--hero-show), calc(100vw / var(--photo-ar, 1.5))));
  overflow: hidden;
  object-fit: cover;
  -webkit-mask-image: var(--photo-fade);
  mask-image: var(--photo-fade);
}
/* A <picture> wrapper takes the size (and the fade); its photo fills it with no fade of its own. */
body:has(.nav-wrap[data-tone="paper"]) .hero > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: none;
  mask-image: none;
}
/* No milky white layer over the photo's lower half (reading.css .hero::after). */
body:has(.nav-wrap[data-tone="paper"]) .hero::after {
  display: none;
}
body:has(.nav-wrap[data-tone="paper"]) .hero .hero-card {
  margin-top: 0;
}
/* The photo now runs under the whole title card, so its glass carries a little more paper tint to keep the title crisp
   over it (still see-through). The reduced-transparency / more-contrast fallbacks stay solid. */
body:has(.nav-wrap[data-tone="paper"]) .hero > .hero-card .glass {
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--paper) 62%, transparent),
    color-mix(in srgb, var(--paper) 42%, transparent) 55%,
    color-mix(in srgb, var(--paper) 30%, transparent)
  );
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body:has(.nav-wrap[data-tone="paper"]) .hero > .hero-card .glass {
    background: var(--surface);
  }
}
/* Phones: fixed heights, never svh (the photo must not resize while the browser bars slide, owner 2026-10-19).
   A landscape photo on a phone is already shown at its full height, so running it further down could only zoom it
   in and push the heads under the card: here it keeps its old frame (ending 2.5rem into the card) and melts along
   the same eased curve over its last 7rem instead. */
@media (max-width: 760px) {
  body:has(.nav-wrap[data-tone="paper"]) .hero {
    --hero-show: calc(17rem + var(--nav-clear, 3.25rem));
    --hero-lap: 2.5rem;
  }
  body:has(.nav-wrap[data-tone="paper"]) .hero > :is(img, picture) {
    --fade-from: calc(var(--hero-show) - 7rem);
    height: var(--hero-show);
  }
}
/* One smooth bottom fade for header photos: opaque down to --fade-from (set on the element), then an eased
   (smoothstep) melt to transparent at the element's foot. Used by every header photo that melts into the page (this
   file and reading.css .hero); BreedHero keeps its dark name shade on the same curve (reading.css .bh-photo::after). */
:where(.hero > img, .hero > picture) {
  --fade-from: 55%;
  --photo-fade: linear-gradient(
    #000 var(--fade-from),
    rgb(0 0 0 / 0.97) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.12),
    rgb(0 0 0 / 0.88) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.25),
    rgb(0 0 0 / 0.7) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.38),
    rgb(0 0 0 / 0.5) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.5),
    rgb(0 0 0 / 0.3) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.62),
    rgb(0 0 0 / 0.12) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.75),
    rgb(0 0 0 / 0.03) calc(var(--fade-from) + (100% - var(--fade-from)) * 0.88),
    transparent 100%
  );
}
/* Search and form placeholders read quieter than typed text (owner, 2026-10-17). */
html input::placeholder,
html textarea::placeholder {
  color: currentColor;
  opacity: 0.45;
}
/* Every close × is coral, like the "i" (owner, 2026-10-17): popups, the home card, search and the cookie notice. */
html :is(.peek-x, .panel .close, .nav-search-close, .consent-x) {
  color: var(--accent-mark);
}
/* "Show all / Show more / Show fewer" buttons in coral (owner, 2026-10-17): coral words and a soft coral edge on
   the usual light pill; a faint coral tint when pointed at. The full coral fill stays for a card's main link. */
html :is(.table-more, .show-more, .group .show-more) {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent-mark) 55%, transparent);
}
html :is(.table-more, .show-more, .group .show-more):hover,
html :is(.table-more, .show-more, .group .show-more):focus-visible {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-mark);
}
/* The "On this page" chip fades away where it would meet the fixed back / back-to-top buttons (rail.js). */
html .toc {
  transition: opacity var(--t-fast, 0.15s);
}
html .toc.near-buttons:not(:has(details[open])) {
  opacity: 0;
  pointer-events: none;
}
/* Search in coral (owner): the magnifier in the field and in the bar's search button, and the field's ×. */
html .nav .nav-search svg,
html .nav .nav-search-open svg,
html .nav.is-finding .nav-search-close,
html .nav .nav-search-close {
  color: var(--accent-mark);
  stroke: var(--accent-mark);
}
/* No lonely last word (owner): headings and card titles balance their lines, body text avoids a single short word
   on its own last line. */
html :is(h1, h2, h3, h4, .hero-card h1, .card h3, .peek h3, figcaption) {
  text-wrap: balance;
}
html :is(p, li, dd, blockquote) {
  text-wrap: pretty;
}
/* More coral on reading pages (owner, 2026-10-17). "On this page": its label and the section being read. */
html .toc > .kicker,
html .toc summary,
html body .toc details:not([open]) summary {
  color: var(--accent-text);
}
html .toc > ol a.on,
html body .toc details ol a.on {
  color: var(--accent-text);
}
/* Family cards (Families page, family articles): the breed-share bar, "For example" and the "Open the family" link. */
html .fam-bar .all {
  background: color-mix(in srgb, var(--accent-mark) 55%, #fff);
}
html .fam-bar .tested {
  background: var(--accent-mark);
}
html .fam-eg small,
html .fam-card .fam-go,
html .fam-card .fam-go a {
  color: var(--accent-text);
}
/* "Open the family" without an underline (owner); the arrow carries the link. */
html .fam-go,
html .fam-go a {
  text-decoration: none;
}
/* Coral search icon that reads on any glass: deeper and a touch bolder on the light bar, lighter on the dark home bar. */
html .nav .nav-search svg,
html .nav .nav-search-open svg,
html .nav .nav-search-close,
html .nav.is-finding .nav-search-close {
  color: var(--accent-mark);
  stroke: var(--accent-mark);
}
html .nav .nav-search-open svg,
html .nav .nav-search svg {
  stroke-width: 2.2;
}
html [data-tone="photo"] .nav :is(.nav-search svg, .nav-search-open svg),
html [data-tone="photo"] .nav .nav-search-close {
  color: var(--accent);
  stroke: var(--accent);
}
/* Side notes ("Did you know?", "Guide, coming soon" and the like): a coral left line and a coral label (owner). */
/* !important: reading.css's shared pane rule (html :is(... #quick ul ...)) carries an ID-level specificity. */
html .side {
  border-left-color: color-mix(
    in srgb,
    var(--accent-mark) 80%,
    #fff
  ) !important;
}
html .side > b:first-child,
html .side > .kicker:first-child {
  color: var(--accent-text);
}
/* The coral label reads as a small heading, so it gets heading-sized air below it before the text (owner,
   2026-10-21: "Did you know?" sat right on top of its fact). "Did you know?" was placed absolutely over a padded
   top; it now sits in the flow like every other label. */
html body .side > b:first-child,
html body .side > .kicker:first-child {
  position: static;
  display: block;
  margin-bottom: 0.75rem;
}
html body .side.did {
  padding-top: 0.8rem;
}
/* Text pages (About, Privacy, Sitemap): coral headings, links and list marks (owner: "a lot of orange"). */
html main:has(.plain-card) h2 {
  color: var(--accent-text);
}
html main:has(.plain-card) :is(p, li) a {
  color: var(--accent-text);
  text-decoration-color: color-mix(
    in srgb,
    var(--accent-mark) 60%,
    transparent
  );
}
html main:has(.plain-card) li::marker {
  color: var(--accent-mark);
}
/* The owner's Instagram link gets the Instagram glyph in front (simple outline: rounded square, lens, dot). */
html a[href^="https://www.instagram.com/"]:not(.share-btn) {
  white-space: nowrap;
}
html a[href^="https://www.instagram.com/"]:not(.share-btn)::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.3em;
  vertical-align: -0.17em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='0.6' fill='black'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='0.6' fill='black'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
/* Text pages (About, Privacy, Sitemap) use the same "Atlas mesh" page background as every inner page (owner, 2026-10-18;
   reading.css body). Their old drifting coral clouds were removed. */
/* The clouds used to fill body::before, which is also the layout's photo band (reading.css .plain-page::before);
   keep that band off here so these pages show only the mesh (owner: no backgrounds on text pages). */
html body:has(.plain-card)::before {
  content: none;
}
/* Text pages: no card at all (owner): the text and the sticker sit straight on the gradient. */
html body:has(.plain-card) .plain-card {
  background: none;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Page badges (counts, dates, places, "Read the family tree") in coral like the About chips (owner, 2026-10-17). */
html .chips > :is(a, span),
html .chips .sure {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent-mark) 45%, transparent);
}
html .chips a:hover {
  border-color: var(--accent-mark);
}
/* No rubber-band bounce at the page ends (owner, phones): pulling down at the top dragged the whole page, bar
   included, away from the status bar and showed a dark gap. Scroll chaining inside panels is unaffected. */
html,
body {
  overscroll-behavior-y: none;
}
/* Popup close ×: a tiny hairline frame so the disc reads on any photo (owner, 2026-10-18). */
html :is(.peek-x, .panel .close) {
  border: 1px solid #ffffff59;
}
/* No page strip behind the bar (owner, 2026-10-18: "no blur, no disappearing page"): the page scrolls on under the
   glass bar instead of fading out above its lower edge. Replaces the strip rule near the top of this file. */
html .nav-wrap[data-tone="paper"]::before {
  display: none;
}
/* One place for every popup × (owner, 2026-10-18): 14px of air from the card's top and right edges, so the disc
   sits clear of the rounded corner instead of running into it. Home card (pop, side panel, phone sheet) and the
   inner-page popup (peek.css). */
html .panel .close {
  top: 0.875rem;
  right: 0.875rem;
}
html .peek-x {
  top: 0.875rem;
  right: 0.875rem;
}
html body .peek-modal-box > .peek-x {
  top: 0.875rem;
  margin: 0.875rem 0.875rem -3.375rem auto;
}
@media (max-width: 760px) {
  /* Phone sheet: the × stays pinned while the card scrolls (sticky), with the same air. */
  html .panel .close {
    top: 0.875rem;
    margin-right: 0.875rem;
  }
}
/* "On this page" chip (phones and tablets): the bar's own glass (owner, 2026-10-18: "as nav bar colour"), with a
   deeper coral label so it reads over photos. */
@media (max-width: 1100px) {
  html body .toc details:not([open]) summary,
  html .toc summary {
    color: var(--accent-text);
  }
}

/* Tablets and phones: the open "On this page" list is a compact card on the navigation bar's glass (owner,
   2026-10-19), not a wide paper panel: its own width, smaller rows, scrolls past half the screen. */
@media (max-width: 1100px) {
  html body .toc details {
    border: 1px solid var(--bar-edge);
    border-radius: var(--bar-r, 1.1rem);
    background: var(--bar-bg);
    box-shadow: var(--bar-shadow);
    -webkit-backdrop-filter: var(--bar-blur);
    backdrop-filter: var(--bar-blur);
  }
  html body .toc details[open] {
    width: min(17rem, calc(100vw - 2rem));
  }
  html body .toc details ol {
    max-height: 50vh;
    padding: 0 0.4rem 0.4rem;
  }
  html body .toc details ol a {
    min-height: 36px;
    padding: 0.35rem 0.6rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.3;
  }
  html body .toc details ol a.on {
    background: var(--bar-pill);
  }
  html body .toc details[open] ol {
    animation: toc-drop 0.22s ease-out;
  }
}
@keyframes toc-drop {
  from {
    opacity: 0;
    transform: translateY(-0.3rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  html body .toc details[open] ol {
    animation: none;
  }
}

/* Filter option lists (Breeds A to Z, Dog Families) on the navigation bar's glass, like the pills above them
   (owner, 2026-10-19): compact rows, coral ticks. */
html body :is(.filter, .fh-dd) .fl {
  min-width: 12rem;
  padding: 0.3rem;
  border: 1px solid var(--bar-edge);
  border-radius: var(--bar-r, 1.1rem);
  background: var(--bar-bg);
  box-shadow: var(--bar-shadow);
  -webkit-backdrop-filter: var(--bar-blur);
  backdrop-filter: var(--bar-blur);
  color: var(--bar-ink);
  font: 400 0.875rem var(--sans);
}
html body :is(.filter, .fh-dd) .fl label {
  min-height: 36px;
  padding: 0.3rem 0.55rem;
  border-radius: 0.6rem;
}
html body :is(.filter, .fh-dd) .fl label:hover {
  background: var(--bar-pill-hover);
}
html body :is(.filter, .fh-dd) .fl input {
  accent-color: var(--accent-mark);
}
html body .filter .fl .clear {
  min-height: 36px;
  margin: 0.15rem 0.55rem 0.1rem;
  color: var(--accent-text);
}
/* Neater (owner): the list's type, ticks and rows sized like the pills. */
html body :is(.filter, .fh-dd) .fl {
  min-width: 10.5rem;
  padding: 0.25rem;
  font-size: 0.8125rem;
}
html body :is(.filter, .fh-dd) .fl label {
  gap: 0.5rem;
  min-height: 30px;
  padding: 0.2rem 0.5rem;
}
html body :is(.filter, .fh-dd) .fl input {
  width: 0.8rem;
  height: 0.8rem;
  margin: 0;
}
html body .filter .fl .clear {
  min-height: 30px;
  margin: 0.1rem 0.5rem 0;
  padding: 0;
  font-size: 0.75rem;
}
@media (max-width: 760px) {
  html body :is(.filter, .fh-dd) .fl label {
    min-height: 40px;
  }
}

/* Phones: header photos get a fixed height (owner, 2026-10-19: the photo resized and the page jumped while Chrome's
   address bar slid away; screen-height units follow that bar in some browsers). Same sizes as before on a
   typical phone, but they never change while scrolling. */
@media (max-width: 760px) {
  /* :not([data-hero]): the :has() lifts this over home.css's longer wolves photo, which must stay (2026-11-18). */
  html
    body:not(:has(.nav-wrap[data-tone="paper"]))
    .hero
    > img:not([data-hero]) {
    height: 26rem;
  }
}

/* Phones: the round buttons (share, back-to-top, back) are pinned from the top of the smallest screen height (100svh),
   not from the bottom edge, so they stay put while the browser's toolbars slide in and out (owner, 2026-10-21:
   "all buttons are jumping up and down while scrolling"). They only fade, never slide. Share: bottom right.
   Back and back-to-top: bottom left, side by side (owner 2026-11-21); on Breeds A to Z stacked in the letter lane
   left of the cards, so the alphabet rail keeps the right edge. Pages with a bottom tool bar take them into it
   (BackToTop.astro): these pins do not apply there. Lifted above the consent notice: from the bottom again. */
@media (max-width: 760px) {
  :root {
    --fab-step: calc(2.3rem + var(--fab-gap));
    --fab-base: calc(100svh - max(var(--tabs-clear, 0px), 0.5rem) - 2.3rem);
    --fab-left: max(env(safe-area-inset-left), 0.75rem);
  }
  html body :is(.share, .to-top, .to-back) {
    top: var(--fab-base);
    bottom: auto !important;
    transition: opacity var(--t-fast, 0.15s) ease !important;
    translate: none !important;
  }
  html body .share {
    right: max(env(safe-area-inset-right), 0.75rem) !important;
    left: auto !important;
  }
  html body :is(.to-top, .to-back) {
    right: auto !important;
    left: var(--fab-left) !important;
  }
  html body:has(.to-back:not([hidden])) .to-top {
    left: calc(var(--fab-left) + var(--fab-step)) !important;
  }
  html body:has(.alphabet) .to-top:not(.in-bar) {
    left: var(--fab-left) !important;
  }
  html body:has(.alphabet) .to-back {
    top: calc(var(--fab-base) - var(--fab-step));
  }
  html body :is(.to-top, .to-back).lift {
    top: auto;
    bottom: calc(var(--lift, 0px) + 0.5rem) !important;
  }
  html body:has(.alphabet) .to-back.lift {
    bottom: calc(var(--lift, 0px) + 0.5rem + var(--fab-step)) !important;
  }
}

/* Moving between pages: the browser fades the old page into the new one instead of blanking the screen first
   (owner, 2026-10-21: blinks while a page loads on a phone). Browsers without support simply load as before. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Every link's underline is coral (owner, 2026-10-22), whatever its text colour or line style. */
html body a {
  text-decoration-color: var(--accent-mark) !important;
}
