/* Site design, round three (28 Nov 2026): the home page hero art in light and dark, the page under it,
   and the dropdown menus in dark mode. Loaded last, after the other site design sheets. Layout and colour only. */

/* ---- 1. The hero band: Union blue with the two cover scenes, the same in light and dark ---- */
body.home:not(#_) { position: relative; background: #f6f1e7 !important; }
html.theme-dark body.home:not(#_) { background: #131b2a !important; }
html.theme-dark:not(#_) body.home main.splash:not(#_) { background-color: transparent !important; }   /* was painting over the picture */
body.home:not(#_)::before {
  content: ""; position: absolute; z-index: 0; top: 0; left: 0; right: 0; width: auto; height: var(--home-hero-h, 640px);
  max-height: none; aspect-ratio: auto; transform: none; opacity: 1; mix-blend-mode: normal;
  -webkit-mask-image: none; mask-image: none; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(28,42,63,0) 60%, rgba(28,42,63,0.9) 100%),
    linear-gradient(to right, rgba(28,42,63,0.28) 0%, rgba(28,42,63,0.28) 9%, rgba(28,42,63,0.80) 30%, rgba(28,42,63,0.80) 70%, rgba(28,42,63,0.28) 91%, rgba(28,42,63,0.28) 100%),
    url("brand/home-scenes.webp") center top / max(100%, 1100px) auto no-repeat,
    linear-gradient(160deg, #1c2a3f 0%, #141f30 100%);
  background-blend-mode: normal, normal, screen, normal;
  border-bottom: 1px solid #d8b366;
}
@media (max-width: 760px) {
  body.home:not(#_)::before {
    background:
      linear-gradient(to bottom, rgba(28,42,63,0.45) 0, rgba(28,42,63,0.45) 150px, rgba(28,42,63,0.86) 330px, #1c2a3f 100%),
      url("brand/home-scenes.webp") 12% top / auto 330px no-repeat,
      linear-gradient(160deg, #1c2a3f 0%, #141f30 100%);
    background-blend-mode: normal, screen, normal;
  }
}
@media print { body.home:not(#_)::before { display: none; } }

/* ---- 2. Below the hero: paper in light, night blue in dark (as on every other page) ---- */
html:not(.theme-dark) body.home main.splash > :is(.latest, .doors, .scenes, .nums, .find-strip, .quick, .book-note, .otd, p, ul, div, section, a):not(.mast):not(.hero-go):not(.standfirst:not(.latest)):not(#_) {
  --text-on-dark: #1c2a3f; --text-on-dark-d: #3a3226; --brand: #8a6420; --hd-ring: #8a6420; color: #3a3226;
}
html:not(.theme-dark) body.home main.splash > :not(.mast):not(.hero-go) a:not(.go):not(h2 > a):not(#_) { color: #24497a !important; -webkit-text-fill-color: #24497a; text-decoration-color: rgba(36,73,122,0.45) !important; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) { background: #fffaf0 !important; border: 1px solid #e2d3ac !important; border-top: 3px solid #d8b366 !important; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) :is(h2, h2 a) { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) :is(.kicker, .hd-part) { color: #8a6420 !important; -webkit-text-fill-color: #8a6420; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) p { color: #3a3226 !important; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) a.go:not(.go-primary) { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f; border-color: #1c2a3f !important; }
html:not(.theme-dark) body.home .doors .hd-door:not(#_) a.go.go-primary { background: #1c2a3f !important; border-color: #1c2a3f !important; color: #f6ebd2 !important; -webkit-text-fill-color: #f6ebd2; }
html:not(.theme-dark) body.home .scenes.hs:not(#_) :is(.hs-title) { color: #1c2a3f !important; }
html:not(.theme-dark) body.home .scenes.hs:not(#_) :is(.hs-kicker, .hs-num) { color: #8a6420 !important; }
html:not(.theme-dark) body.home .scenes.hs:not(#_) .hs-years { color: #5a5140 !important; }
html:not(.theme-dark) body.home .nums:not(#_) a { background: #fffaf0 !important; border: 1px solid #e2d3ac !important; color: #3a3226 !important; -webkit-text-fill-color: #3a3226; }
html:not(.theme-dark) body.home .nums:not(#_) .nn { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f; }
html:not(.theme-dark) body.home .nums:not(#_) .nl { color: #3a3226 !important; -webkit-text-fill-color: #3a3226; }
html:not(.theme-dark) body.home a.find-strip:not(#_) { background: #f6ebd2 !important; border: 1px solid #d8b366 !important; }
html:not(.theme-dark) body.home a.find-strip:not(#_) h2 { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f; }
html:not(.theme-dark) body.home a.find-strip:not(#_) :is(p, div) { color: #3a3226 !important; -webkit-text-fill-color: #3a3226; }
html:not(.theme-dark) body.home a.find-strip:not(#_) :is(.kicker, .go) { color: #8a6420 !important; -webkit-text-fill-color: #8a6420; }
html:not(.theme-dark) body.home .quick:not(#_) a { border-color: #cbb98a !important; color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f; text-decoration: none !important; }

/* ---- 3. Dropdown menus: a dark panel in dark mode; the footer label readable in both ---- */
html body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-foot b { color: #5a5140 !important; font-weight: 600; }
html body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-foot a[role="menuitem"] { display: inline !important; padding: 0 !important; min-height: 0 !important; border: 0 !important; text-decoration: underline !important; }
@media (min-width: 761px) {
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu:not([hidden]) { background: #1f2c40 !important; border-color: #3a4a63 !important; border-top-color: #d8b366 !important; box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu .menu-label { color: #d8b366 !important; border-bottom-color: #3a4a63 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu a[role="menuitem"] { color: #f6ebd2 !important; -webkit-text-fill-color: #f6ebd2 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-desc { color: #c9bfa8 !important; -webkit-text-fill-color: #c9bfa8 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu a[role="menuitem"]:is(:hover, :focus-visible) { background: #2a3a54 !important; border-left-color: #d8b366 !important; color: #f6ebd2 !important; -webkit-text-fill-color: #f6ebd2 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-foot { background: #1c2a3f !important; border-top-color: #3a4a63 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-foot b { color: #c9bfa8 !important; }
  html.theme-dark body nav.site-nav-shared:not(#_):not(#__) .group-menu .d55-foot a { color: #e8cd8a !important; -webkit-text-fill-color: #e8cd8a !important; }
}

/* ---- 4. The family tree page ---- */
/* 1. Charles's card: Union blue and gold, not red */
.ft-card.ft-charles:not(#_) { border-left: 4px solid #d8b366; }
.ft-card.ft-charles:not(#_) .ft-n { color: #1c2a3f; }
.ft-card.ft-charles.ft-center:not(#_) { background: #1c2a3f; color: #f6ebd2; border: 2px solid #1c2a3f; border-left: 5px solid #d8b366; }
.ft-card.ft-charles.ft-center:not(#_) .ft-n { color: #ffffff; }
.ft-card.ft-charles.ft-center:not(#_) .ft-tag { color: #e8cd8a; }
html.theme-dark .ft-card.ft-charles:not(#_) { border-left-color: #d8b366; }
html.theme-dark .ft-card.ft-charles:not(#_) .ft-n { color: #f6ebd2; }
html.theme-dark .ft-card.ft-charles.ft-center:not(#_) { background: #e8cd8a; color: #141f30; border-color: #e8cd8a; border-left-color: #8a6420; }
html.theme-dark .ft-card.ft-charles.ft-center:not(#_) .ft-n { color: #141f30; }
html.theme-dark .ft-card.ft-charles.ft-center:not(#_) .ft-tag { color: #4a3508; }
/* 2. The chart never shrinks below nine tenths; past that it scrolls sideways (the tree script's floor is 0.9 too) */
@media screen { .ft-tree:not(.ft-outline):not(#_) { zoom: max(var(--ft-fit, 1), 0.9); } }
/* 3. The marriage year reads as in the book: "= 1866" */
.ft-knot:not(#_) { color: #6b5220; font-variant-numeric: lining-nums; }
html.theme-dark .ft-knot:not(#_) { color: #d8b366; }
.ft-legend .ft-knot-key:not(#_) { display: inline-block; min-width: 3.2em; color: #6b5220; font-weight: 600; font-variant-numeric: lining-nums; white-space: nowrap; }
html.theme-dark .ft-legend .ft-knot-key:not(#_) { color: #d8b366; }
/* 4. Less empty space between the band and the chart */
.ft-main > .ft-sec:first-child:not(#_), main.ft-main:not(#_) { padding-top: 0.6rem; }

/* ---- 5. Home page strip of scenes: the gold drawing on its dark disc in light and dark mode alike, the ring about 56 px across ---- */
body.home .scenes.hs:not(#_) img.hs-ico-ink { display: none; }
body.home .scenes.hs:not(#_) img.hs-ico-gold { display: inline-block; width: 70px; height: auto; aspect-ratio: 120 / 116;
  background: radial-gradient(circle 27.4px at 50% 48.28%, #131d2b 0 27px, transparent 27.4px); }   /* the dark disc inside the gold ring, on paper as on blue */

/* ---- 6. Footer on a phone: "Deutsch" on its own line, with no dot left standing alone ---- */
@media (max-width: 760px) {
  html:not(#_):not(#__):not(#___) footer.site-foot-shared .foot-lang { display: block !important; margin-top: 0.45rem !important; }
  html:not(#_):not(#__):not(#___) footer.site-foot-shared .foot-lang::before { content: none !important; }
}

/* ---- 7. Person pages: the flat shield in the top card when the page has no portrait or record ---- */
html:not(#_):not(#__):not(#___) main.ppg-main .ppg-head-arms img.ppg-shield { height: 48px !important; width: 39px !important; }
