.home-r8-root {
  scroll-snap-type: none;
  scroll-padding-top: 0;
}

body.home-r8-page {
  overflow-x: hidden;
  background: #fff;
}

.home-r8-page #main-content {
  min-height: 100vh;
}

.home-r8,
.home-r8-header,
.home-r8-footer,
.home-r8-mobile-panel {
  --home-r8-white: #fff;
  --home-r8-surface: #fafafa;
  --home-r8-surface-2: #f5f5f7;
  --home-r8-border: #d9d9de;
  --home-r8-text: #111;
  --home-r8-text-2: #3a3a3c;
  --home-r8-muted: #66666b;
  --home-r8-max: 1240px;
  --home-r8-header-h: 76px;
  --home-r8-radius: 22px;
}

.home-r8 * { box-sizing: border-box; }
.home-r8 img { display: block; max-width: 100%; }

.home-r8-wrap {
  width: min(calc(100% - 48px), var(--home-r8-max));
  margin-inline: auto;
}

.home-r8-snap {
  scroll-snap-align: none;
  scroll-margin-top: 0;
}

.home-r8-eyebrow {
  margin: 0;
  color: var(--home-r8-muted);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.home-r8-eyebrow-inverse { color: rgba(255, 255, 255, .82); }

.home-r8 h1,
.home-r8 h2,
.home-r8 h3 {
  color: var(--home-r8-text);
  text-wrap: pretty;
}

.home-r8 h1 {
  margin: 12px 0 18px;
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 650;
  letter-spacing: -.018em;
  line-height: 1.04;
}

.home-r8 h2 {
  margin: 8px 0 14px;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.08;
}

.home-r8 h3 {
  margin: 8px 0 12px;
  font-size: clamp(25px, 2.35vw, 32px);
  font-weight: 620;
  letter-spacing: -.012em;
  line-height: 1.12;
}

.home-r8 p { text-wrap: pretty; }

.home-r8-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--home-r8-text);
  border-radius: 12px;
  background: transparent;
  color: var(--home-r8-text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.home-r8-btn-primary {
  border-color: var(--home-r8-text);
  background: var(--home-r8-text);
  color: #fff;
}

.home-r8-btn-secondary {
  border-color: var(--home-r8-border);
  background: #fff;
}

.home-r8-btn-ghost {
  border-color: rgba(255, 255, 255, .78);
  background: rgba(0, 0, 0, .08);
  color: #fff;
}

.home-r8-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Homepage-only transparent header. */
.home-r8-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 130;
  height: var(--home-r8-header-h);
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #fff;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.home-r8-header.is-scrolled,
.home-r8-header.is-menu-open {
  border-bottom-color: rgba(0, 0, 0, .08);
  background: #fff;
  color: var(--home-r8-text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .05);
}

.home-r8-nav {
  display: grid;
  height: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
}

.home-r8-brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}

.home-r8-wordmark { width: 132px; height: auto; }
.home-r8-wordmark-dark { display: none; }

.home-r8-header.is-scrolled .home-r8-wordmark-inverse,
.home-r8-header.is-menu-open .home-r8-wordmark-inverse { display: none; }

.home-r8-header.is-scrolled .home-r8-wordmark-dark,
.home-r8-header.is-menu-open .home-r8-wordmark-dark { display: block; }

.home-r8-desktop-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 16px;
  font-weight: 550;
}

.home-r8-desktop-nav a { color: inherit; text-decoration: none; }

.home-r8-desktop-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-r8-header:not(.is-scrolled):not(.is-menu-open) .home-r8-btn-primary {
  border-color: #fff;
  background: #fff;
  color: var(--home-r8-text);
}

.home-r8-header:not(.is-scrolled):not(.is-menu-open) .home-r8-btn-secondary {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(0, 0, 0, .08);
  color: #fff;
}

.home-r8-header .language-switcher > summary {
  min-height: 46px;
  border-color: transparent;
  background: transparent;
  color: inherit;
}

.home-r8-header:not(.is-scrolled):not(.is-menu-open) .language-switcher > summary {
  border-color: rgba(255, 255, 255, .42);
}

.home-r8-header .language-menu-panel { color: var(--home-r8-text); }

.home-r8-mobile-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 12px;
  background: rgba(0, 0, 0, .08);
  color: #fff;
  cursor: pointer;
}

.home-r8-mobile-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.home-r8-header.is-scrolled .home-r8-mobile-toggle,
.home-r8-header.is-menu-open .home-r8-mobile-toggle {
  border-color: var(--home-r8-border);
  background: #fff;
  color: var(--home-r8-text);
}

.home-r8-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: none;
  background: rgba(0, 0, 0, .34);
}

.home-r8-mobile-panel {
  position: fixed;
  top: var(--home-r8-header-h);
  right: 0;
  z-index: 125;
  width: min(88vw, 390px);
  height: calc(100dvh - var(--home-r8-header-h));
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid var(--home-r8-border);
  background: #fff;
  color: var(--home-r8-text);
  transform: translateX(102%);
  transition: transform .18s ease;
}

.home-r8-mobile-panel nav { display: grid; gap: 4px; }

.home-r8-mobile-panel nav a {
  display: flex;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid #ececef;
  color: var(--home-r8-text);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.home-r8-mobile-panel-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

body.home-r8-menu-open,
body.home-r8-lightbox-open { overflow: hidden; }

body.home-r8-menu-open .home-r8-mobile-backdrop { display: block; }
body.home-r8-menu-open .home-r8-mobile-panel { transform: translateX(0); }

/* Hero. */
.home-r8-hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  background: #202020;
  color: #fff;
}

.home-r8-header-sentinel {
  position: absolute;
  top: 28px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.home-r8-hero-poster,
.home-r8-hero-poster img,
.home-r8-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-r8-hero-poster {
  z-index: 0;
  transition: opacity .36s ease;
}

.home-r8-hero-poster img,
.home-r8-hero-video { object-fit: cover; }

.home-r8-hero-video {
  z-index: 1;
  border: 0;
  opacity: 1;
  pointer-events: none;
}

.home-r8-hero-poster {
  z-index: 2;
}

.home-r8-hero.has-self-video .home-r8-hero-poster {
  opacity: 0;
  pointer-events: none;
}

.home-r8-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, .63),
      rgba(0, 0, 0, .31) 48%,
      rgba(0, 0, 0, .13) 72%
    ),
    linear-gradient(0deg, rgba(0, 0, 0, .24), transparent 48%);
}

.home-r8-hero-copy {
  position: absolute;
  z-index: 5;
  left: max(24px, calc((100vw - var(--home-r8-max)) / 2));
  bottom: 10vh;
  width: min(740px, calc(100% - 48px));
}

.home-r8-hero-copy h1 { color: #fff; }

.home-r8-hero-copy > p:not(.home-r8-eyebrow) {
  max-width: 670px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .94);
  font-size: 20px;
  line-height: 1.5;
}

.home-r8-hero .home-r8-btn-primary {
  border-color: #fff;
  background: #fff;
  color: var(--home-r8-text);
}

/* Shared section rhythm. */
.home-r8-section { padding: 92px 0; }
.home-r8-head { max-width: 790px; margin-bottom: 36px; }
.home-r8-head-center { margin-inline: auto; text-align: center; }

.home-r8-head > p:not(.home-r8-eyebrow),
.home-r8-copy > p {
  color: var(--home-r8-text-2);
  font-size: 18px;
  line-height: 1.55;
}

/* Memorial-first public search. */
.home-r8-search {
  padding: 72px 0;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.home-r8-search-box { max-width: 920px; }

.home-r8-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--home-r8-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .035);
}

.home-r8-search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--home-r8-text);
  padding: 0 16px;
  font-size: 18px;
}

/* First family story. */
.home-r8-story {
  display: grid;
  min-height: 610px;
  grid-template-columns: 360px 1fr;
  align-items: stretch;
  gap: 42px;
  padding: 32px;
  border: 1px solid #e6e6e6;
  border-radius: var(--home-r8-radius);
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .045);
}

.home-r8-story-main {
  min-height: 610px;
  overflow: hidden;
  border-radius: 18px;
}

.home-r8-lightbox-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.home-r8-story-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-r8-story-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.home-r8-meta {
  margin: 2px 0 16px;
  color: var(--home-r8-muted);
  font-size: 18px;
}

.home-r8-story-body > p:not(.home-r8-eyebrow):not(.home-r8-meta) {
  max-width: 820px;
  margin: 0 0 14px;
  color: var(--home-r8-text-2);
  font-size: 18px;
  line-height: 1.55;
}

.home-r8-story-explainer { margin-bottom: 20px !important; }

.home-r8-story-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.home-r8-story-thumbs figure { margin: 0; }

.home-r8-story-thumbs .home-r8-lightbox-trigger {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 13px;
}

.home-r8-story-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-r8-story-thumbs figcaption {
  margin-top: 8px;
  color: var(--home-r8-muted);
  font-size: 15px;
  line-height: 1.35;
}

/* Family memory. */
.home-r8-memory-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: center;
  gap: 56px;
}

.home-r8-memory-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.home-r8-memory-collage img {
  width: 100%;
  height: 250px;
  border-radius: 18px;
  object-fit: cover;
}

.home-r8-memory-collage .home-r8-wide {
  grid-column: 1 / -1;
  height: 330px;
}

/* Compact physical remembrance. */
.home-r8-physical {
  padding: 58px 0;
  background: var(--home-r8-surface);
}

.home-r8-physical-grid {
  display: grid;
  height: min(620px, calc(100svh - var(--home-r8-header-h) - 120px));
  min-height: 520px;
  max-height: 620px;
  grid-template-columns: 1.03fr .97fr;
  align-items: stretch;
  gap: 24px;
}

.home-r8-physical-main,
.home-r8-physical-copy {
  overflow: hidden;
  border-radius: 20px;
}

.home-r8-physical-main { background: #ececec; }

.home-r8-physical-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-r8-physical-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 38px 40px;
  border: 1px solid #e5e5e5;
  background: #fff;
}

.home-r8-physical-copy > p:not(.home-r8-eyebrow) {
  margin: 0 0 14px;
  color: var(--home-r8-text-2);
  font-size: 18px;
  line-height: 1.5;
}

.home-r8-physical-scan {
  width: 100%;
  height: 190px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 15px;
  background: #eee;
}

.home-r8-physical-scan img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

/* How it works. */
.home-r8-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--home-r8-border);
  border-bottom: 1px solid var(--home-r8-border);
}

.home-r8-step {
  min-height: 220px;
  padding: 32px;
}

.home-r8-step + .home-r8-step {
  border-left: 1px solid var(--home-r8-border);
}

.home-r8-step-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--home-r8-surface-2);
  font-weight: 650;
}

.home-r8-step p {
  margin: 0;
  color: var(--home-r8-text-2);
}

/* Final continuity CTA. */
.home-r8-final-section { padding-top: 72px; }

.home-r8-final-card {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: var(--home-r8-radius);
  background: var(--home-r8-surface);
}

.home-r8-final-copy { padding: 48px; }

.home-r8-final-copy > p:not(.home-r8-eyebrow) {
  color: var(--home-r8-text-2);
  font-size: 18px;
  line-height: 1.55;
}

.home-r8-final-image img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

/* Lightbox only for the five-frame story. */
.home-r8-lightbox[hidden] { display: none !important; }

.home-r8-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .88);
}

.home-r8-lightbox img {
  max-width: min(94vw, 1600px);
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .4);
}

.home-r8-lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* Homepage footer. */
.home-r8-footer {
  border-top: 1px solid #e7e7e7;
  background: #fff;
  color: var(--home-r8-muted);
}

.home-r8-footer-main,
.home-r8-footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-r8-footer-main {
  padding-top: 34px;
  padding-bottom: 22px;
}

.home-r8-footer-wordmark { width: 112px; }

.home-r8-footer-links,
.home-r8-footer-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
}

.home-r8-footer a,
.home-r8-footer button {
  color: inherit;
  text-decoration: none;
}

.home-r8-footer-legal {
  padding-top: 20px;
  padding-bottom: 38px;
  border-top: 1px solid #eeeeef;
  font-size: 14px;
}

.home-r8-footer-legal button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.home-r8-footer-legal p { margin: 0; }

/* Mobile / tablet contract. */
@media (max-width: 900px) {
  .home-r8-root { scroll-padding-top: 74px; }

  .home-r8,
  .home-r8-header,
  .home-r8-mobile-panel { --home-r8-header-h: 72px; }

  .home-r8-wrap { width: min(calc(100% - 32px), 780px); }
  .home-r8-nav { grid-template-columns: auto 1fr; }

  .home-r8-desktop-nav,
  .home-r8-desktop-actions { display: none; }

  .home-r8-mobile-toggle { display: inline-flex; }

  .home-r8-hero {
    height: 88svh;
    min-height: 620px;
  }

  .home-r8-story {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 22px;
  }

  .home-r8-story-main {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .home-r8-story-thumbs {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 28px;
    padding-top: 0;
  }

  .home-r8-memory-grid,
  .home-r8-final-card { grid-template-columns: 1fr; }

  .home-r8-memory-grid { gap: 32px; }

  .home-r8-physical-grid {
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .home-r8-physical-main { height: min(48vh, 480px); }
  .home-r8-physical-scan { height: 220px; }
  .home-r8-steps { grid-template-columns: 1fr; }

  .home-r8-step + .home-r8-step {
    border-top: 1px solid var(--home-r8-border);
    border-left: 0;
  }

  .home-r8-final-image { order: -1; }
}

@media (max-width: 620px) {
  .home-r8-wrap { width: calc(100% - 28px); }
  .home-r8-wordmark { width: 112px; }

  .home-r8-hero-copy {
    left: 14px;
    bottom: 7vh;
    width: calc(100% - 28px);
  }

  .home-r8-hero-copy > p:not(.home-r8-eyebrow) { font-size: 18px; }
  .home-r8-section { padding: 66px 0; }
  .home-r8-search { padding: 54px 0; }
  .home-r8-search-form { grid-template-columns: 1fr; }
  .home-r8-search-form input { min-height: 52px; }
  .home-r8-story { padding: 18px; }
  .home-r8-memory-collage { grid-template-columns: 1fr; }
  .home-r8-memory-collage .home-r8-wide { grid-column: auto; }

  .home-r8-memory-collage img,
  .home-r8-memory-collage .home-r8-wide { height: 230px; }

  .home-r8-physical-copy,
  .home-r8-final-copy { padding: 28px; }

  .home-r8-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-r8-actions .home-r8-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .home-r8-footer-main,
  .home-r8-footer-legal {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-r8-footer-legal { gap: 14px; }
}

@media (max-width: 440px) {
  .home-r8-hero { min-height: 640px; }
  .home-r8-story-thumbs { gap: 10px; }
  .home-r8-story-thumbs figcaption { font-size: 14px; }
  .home-r8-mobile-panel { width: min(92vw, 380px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-r8-root { scroll-behavior: auto; }

  .home-r8-header,
  .home-r8-mobile-panel,
  .home-r8-hero-poster,
  .home-r8-hero-video { transition: none !important; }
}

/* R8 successor uses the shared Core header DOM and preserves its contracts. */
body.home-r8-page .site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 130;
  border-bottom-color: transparent;
  background: transparent;
  color: #fff;
  box-shadow: none;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

body.home-r8-page .site-header.home-r8-header-scrolled,
body.home-r8-page .site-header.home-r8-menu-open {
  border-bottom-color: rgba(0, 0, 0, .08);
  background: #fff;
  color: var(--home-r8-text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .05);
}

body.home-r8-page .site-header .header-inner {
  width: min(calc(100% - 48px), var(--home-r8-max));
  max-width: var(--home-r8-max);
  margin-inline: auto;
}

body.home-r8-page .site-header .brand img {
  filter: brightness(0) invert(1);
}

body.home-r8-page .site-header.home-r8-header-scrolled .brand img,
body.home-r8-page .site-header.home-r8-menu-open .brand img {
  filter: none;
}

body.home-r8-page .site-header .desktop-header-search {
  display: none !important;
}

body.home-r8-page .site-header .site-nav a,
body.home-r8-page .site-header .desktop-register-link,
body.home-r8-page .site-header .desktop-login-link {
  color: inherit;
}

body.home-r8-page .site-header .desktop-register-link {
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fff;
  color: #111;
}

body.home-r8-page .site-header .desktop-login-link {
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 12px;
  background: rgba(0, 0, 0, .08);
  color: #fff;
}

body.home-r8-page .site-header.home-r8-header-scrolled .desktop-register-link,
body.home-r8-page .site-header.home-r8-menu-open .desktop-register-link {
  border-color: #111;
  background: #111;
  color: #fff;
}

body.home-r8-page .site-header.home-r8-header-scrolled .desktop-login-link,
body.home-r8-page .site-header.home-r8-menu-open .desktop-login-link {
  border-color: var(--home-r8-border);
  background: #fff;
  color: #111;
}

body.home-r8-page .site-header .account-menu > summary,
body.home-r8-page .site-header .language-switcher > summary,
body.home-r8-page .site-header .mobile-menu > summary {
  border-color: rgba(255, 255, 255, .48);
  background: rgba(0, 0, 0, .08);
  color: #fff;
}

body.home-r8-page .site-header.home-r8-header-scrolled .account-menu > summary,
body.home-r8-page .site-header.home-r8-header-scrolled .language-switcher > summary,
body.home-r8-page .site-header.home-r8-header-scrolled .mobile-menu > summary,
body.home-r8-page .site-header.home-r8-menu-open .account-menu > summary,
body.home-r8-page .site-header.home-r8-menu-open .language-switcher > summary,
body.home-r8-page .site-header.home-r8-menu-open .mobile-menu > summary {
  border-color: var(--home-r8-border);
  background: #fff;
  color: #111;
}

body.home-r8-page .site-header .account-menu-panel,
body.home-r8-page .site-header .language-menu-panel,
body.home-r8-page .site-header .mobile-menu-panel {
  color: #111;
}

body.home-r8-page .home-r8-intents {
  padding: 84px 0;
  background: var(--home-r8-surface);
}

.home-r8-intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 980px;
  margin-inline: auto;
}

.home-r8-intent-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: flex-start;
  padding: 34px;
  border: 1px solid #e3e3e5;
  border-radius: var(--home-r8-radius);
  background: #fff;
}

.home-r8-intent-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--home-r8-surface-2);
  color: var(--home-r8-muted);
  font-weight: 650;
}

.home-r8-intent-card p {
  margin: 0 0 24px;
  color: var(--home-r8-text-2);
  font-size: 18px;
  line-height: 1.55;
}

.home-r8-intent-card .home-r8-btn {
  margin-top: auto;
}

@media (max-width: 900px) {
  body.home-r8-page .site-header .header-inner {
    width: min(calc(100% - 32px), 780px);
  }

  body.home-r8-page .site-header .brand img {
    width: 112px;
  }

  body.home-r8-page .site-header .mobile-menu-panel {
    background: #fff;
  }

  .home-r8-intent-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body.home-r8-page .site-header .header-inner {
    width: calc(100% - 28px);
  }

  .home-r8-intent-card {
    min-height: 0;
    padding: 28px;
  }
}



/* ===== R11.7.0 FIX6 — ALL-LOCALE UI FIT + RESPONSIVE CONTAINMENT ===== */
body.home-r8-page {
  --home-r8-max: 1240px;
  --home-r8-text: #111;
  --home-r8-border: #d9d9de;
  --home-r8-header-h: 76px;
}

/* Shared Core header: real gutters and equal control geometry. */
body.home-r8-page .site-header .header-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--home-r8-max) + 80px);
  margin-inline: auto;
  padding-inline: clamp(24px, 3vw, 40px);
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: clamp(18px, 2vw, 30px);
}

body.home-r8-page .site-header .brand {
  min-width: 0;
}

body.home-r8-page .site-header .desktop-guest-actions {
  gap: 10px;
}

body.home-r8-page .site-header .desktop-register-link,
body.home-r8-page .site-header .desktop-login-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  line-height: 1.2;
  text-decoration: none;
}

body.home-r8-page .site-header .kinelio-header-language {
  margin: 0;
}

body.home-r8-page .site-header .language-switcher > summary {
  min-height: 48px;
  padding: 0 16px;
}

/* Story card: every grid track may shrink, so media stays inside the card. */
.home-r8-story {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  overflow: visible;
}

.home-r8-story-main,
.home-r8-story-body,
.home-r8-story-thumbs,
.home-r8-story-thumbs figure,
.home-r8-story-thumbs .home-r8-lightbox-trigger {
  min-width: 0;
  max-width: 100%;
}

.home-r8-story-body {
  width: 100%;
}

.home-r8-story-thumbs {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-r8-story-thumbs figure {
  overflow: visible;
}

.home-r8-story-thumbs .home-r8-lightbox-trigger {
  width: 100%;
}

.home-r8-story-thumbs img {
  min-width: 0;
  max-width: 100%;
}

.home-r8-story-thumbs figcaption {
  overflow-wrap: anywhere;
}

/* Keep soft section concentration without trapping the long family-story module. */
.home-r8-snap {
  scroll-snap-stop: normal;
}

.home-r8-story-section {
  scroll-snap-align: none;
}

@media (max-width: 1180px) {
  body.home-r8-page .site-header .header-inner {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding-inline: 20px;
  }

  body.home-r8-page .site-header .desktop-site-nav,
  body.home-r8-page .site-header .desktop-guest-actions,
  body.home-r8-page .site-header .desktop-account-menu {
    display: none !important;
  }

  body.home-r8-page #kinelio-mobile-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-left: auto !important;
  }

  body.home-r8-page #kinelio-mobile-header-actions > .mobile-menu {
    display: inline-flex !important;
  }
}

@media (max-width: 900px) {
  .home-r8-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-r8-story-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-r8-story-section,
  .home-r8-snap {
    scroll-snap-align: none;
  }
}

@media (max-width: 620px) {
  body.home-r8-page .site-header .header-inner {
    padding-inline: 14px;
  }

  body.home-r8-page .site-header .language-switcher > summary,
  body.home-r8-page .site-header .mobile-menu > summary {
    min-height: 44px;
  }

  body.home-r8-page .site-header .language-switcher > summary {
    padding-inline: 12px;
  }

  .home-r8-story {
    padding: 18px;
  }
}
/* ===== END R11.7.0 FIX6 ===== */


/* ===== R11.7.1 — HUMAN SCROLL + SELF-HOST HERO + STORY RHYTHM ===== */

/* Natural document flow: no automatic section snapping at any viewport. */
.home-r8-root {
  scroll-snap-type: none !important;
  scroll-padding-top: 0 !important;
}

.home-r8-snap,
.home-r8-story-section {
  scroll-snap-align: none !important;
  scroll-margin-top: 0 !important;
}

/* Self-hosted hero media stays full-bleed; poster remains above it until playing. */
.home-r8-hero-poster,
.home-r8-hero-video {
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-r8-hero-poster img,
.home-r8-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.home-r8-hero-video {
  pointer-events: none;
}

/* Homepage memorial search remains simple until the visitor opens filters. */
.home-r8-search-form {
  display: grid;
  gap: 12px;
}

.home-r8-search-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.home-r8-search-more {
  width: min(100%, 980px);
  margin-inline: auto;
  border: 1px solid var(--home-r8-border);
  border-radius: 14px;
  background: #fff;
}

.home-r8-search-more > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  cursor: pointer;
  color: var(--home-r8-text-2);
  font-weight: 650;
  list-style: none;
}

.home-r8-search-more > summary::-webkit-details-marker {
  display: none;
}

.home-r8-search-more[open] > summary {
  border-bottom: 1px solid var(--home-r8-border);
}

.home-r8-search-more > p {
  margin: 14px 18px 0;
  color: var(--home-r8-muted);
  font-size: 14px;
}

.home-r8-search-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.home-r8-search-filter-grid label {
  min-width: 0;
}

.home-r8-search-filter-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--home-r8-text-2);
  font-size: 13px;
  font-weight: 650;
}

.home-r8-search-filter-grid input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--home-r8-border);
  border-radius: 10px;
  background: #fff;
  color: var(--home-r8-text);
  font: inherit;
}

.home-r8-search-browse {
  justify-self: center;
  color: var(--home-r8-text-2);
  font-size: 14px;
  font-weight: 650;
}

/* Story card: centered composition with visible step captions. */
.home-r8-story-section .home-r8-wrap {
  width: min(calc(100% - 96px), 1180px);
}

.home-r8-story {
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 34px;
  padding: 30px;
  overflow: visible;
  border-radius: 18px;
}

.home-r8-story-thumbs figure {
  min-width: 0;
  overflow: visible;
}

.home-r8-story-thumbs figcaption {
  display: block;
  min-height: 2.7em;
  margin-top: 8px;
  overflow: visible;
  white-space: normal;
}

@media (max-width: 900px) {
  .home-r8-story-section .home-r8-wrap {
    width: min(calc(100% - 32px), 720px);
  }

  .home-r8-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
  }

  .home-r8-search-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-r8-search-main {
    grid-template-columns: 1fr;
  }

  .home-r8-search-main .home-r8-btn {
    width: 100%;
  }

  .home-r8-search-filter-grid {
    grid-template-columns: 1fr;
  }

  .home-r8-story-section .home-r8-wrap {
    width: calc(100% - 28px);
  }

  .home-r8-story {
    padding: 18px;
  }
}

/* ===== END R11.7.1 ===== */


/* ===== R11.7.2 — PRESENTATION POLISH + CACHE-BUST CONTRACT ===== */
@media (max-width: 620px) {
  body.home-r8-page .site-header .brand img { width: 136px !important; max-width: 136px !important; }
}

.home-r8-search-form { width: min(100%, 920px); margin-inline: auto; padding: 10px; }
.home-r8-search-more { width: 100%; overflow: hidden; }
.home-r8-search-more > summary { position: relative; justify-content: flex-start; gap: 10px; padding: 0 16px; user-select: none; }
.home-r8-filter-toggle-less { display: none; }
.home-r8-search-more[open] .home-r8-filter-toggle-more { display: none; }
.home-r8-search-more[open] .home-r8-filter-toggle-less { display: inline; }
.home-r8-filter-toggle-chevron { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transform-origin: center; transition: transform .16s ease; }
.home-r8-search-more[open] .home-r8-filter-toggle-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.home-r8-search-more > p { margin: 14px 16px 0; }
.home-r8-search-filter-grid { display: grid; gap: 10px; padding: 14px 16px 16px; }
.home-r8-filter-row { display: grid; min-width: 0; gap: 10px; }
.home-r8-filter-row-top { grid-template-columns: minmax(130px, .75fr) minmax(220px, 1.45fr) minmax(180px, 1fr); }
.home-r8-filter-row-years { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-r8-search-filter-grid input, .home-r8-search-filter-grid select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 0 40px 0 13px; border: 1px solid #c7c7cc; border-radius: 11px; outline: none; background-color: #fff; color: var(--home-r8-text); font: inherit; font-size: 15px; }
.home-r8-search-filter-grid input { padding-right: 13px; }
.home-r8-search-filter-grid select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.home-r8-search-filter-grid input:focus, .home-r8-search-filter-grid select:focus { border-color: #111; box-shadow: 0 0 0 2px rgba(17,17,17,.08); }
.home-r8-search-browse { min-height: 36px; display: inline-flex; align-items: center; justify-self: start; padding-inline: 4px; }

.home-r8-story-section { padding-inline: 0; }
.home-r8-story-section .home-r8-wrap { box-sizing: border-box; width: min(calc(100% - 64px), 1240px) !important; max-width: 1240px !important; margin-inline: auto !important; }
.home-r8-story { min-height: 0; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 34px; padding: 30px; overflow: hidden !important; }
.home-r8-story-main { min-height: 600px; }
.home-r8-story-thumbs { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; padding: 0 0 2px; align-items: start; }
.home-r8-story-thumbs figure { display: grid; min-width: 0; grid-template-rows: auto auto; align-content: start; gap: 8px; margin: 0; overflow: visible; }
.home-r8-story-thumbs .home-r8-lightbox-trigger { width: 100%; height: auto !important; aspect-ratio: 16 / 9; overflow: hidden; }
.home-r8-story-thumbs figcaption { display: block; min-height: 2.8em; margin: 0; padding: 0 2px; overflow: visible; color: var(--home-r8-muted); font-size: 14px; line-height: 1.35; white-space: normal; overflow-wrap: break-word; }

@media (max-width: 900px) {
  .home-r8-story-section .home-r8-wrap { width: min(calc(100% - 32px), 720px) !important; }
  .home-r8-story { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px; }
  .home-r8-story-main { min-height: 0; aspect-ratio: 16 / 10; }
  .home-r8-story-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .home-r8-story-thumbs figcaption { min-height: 0; }
  .home-r8-filter-row-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .home-r8-filter-row-top select:last-child { grid-column: 1 / -1; }
  .home-r8-filter-row-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .home-r8-search-form { width: 100%; padding: 10px; }
  .home-r8-search-main { grid-template-columns: 1fr; }
  .home-r8-search-main .home-r8-btn { width: 100%; }
  .home-r8-search-more > summary { min-height: 52px; padding-inline: 14px; }
  .home-r8-search-filter-grid { padding: 12px 14px 14px; }
  .home-r8-filter-row-top { grid-template-columns: 1fr; }
  .home-r8-filter-row-top select:last-child { grid-column: auto; }
  .home-r8-filter-row-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-r8-search-filter-grid input, .home-r8-search-filter-grid select { min-height: 50px; font-size: 16px; }
  .home-r8-story-section .home-r8-wrap { width: calc(100% - 28px) !important; }
  .home-r8-story { padding: 16px; border-radius: 18px; }
  .home-r8-story-thumbs { gap: 16px 10px; }
  .home-r8-story-thumbs figcaption { padding-inline: 1px; font-size: 13.5px; line-height: 1.32; }
}
/* ===== END R11.7.2 ===== */


/* ===== R11.7.2 FIX3 — HOME COMPOSITION + FILTER STANDARD ===== */

/* Compact search row with explicit field border and a settings icon. */
.home-r8-search-form {
  position: relative;
  width: min(100%, 920px);
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto 52px !important;
  gap: 10px !important;
  padding: 10px !important;
}

.home-r8-search-query {
  grid-column: 1;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 14px !important;
  border: 1px solid #c7c7cc !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--home-r8-text);
  font: inherit;
  font-size: 17px;
}

.home-r8-search-query:focus {
  border-color: #111 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, .08);
}

.home-r8-search-submit {
  grid-column: 2;
  width: auto !important;
  min-width: 96px;
  min-height: 50px;
  padding-inline: 18px;
}

.home-r8-search-more {
  position: static;
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-r8-search-more > summary.home-r8-filter-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  box-sizing: border-box;
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c7c7cc;
  border-radius: 12px;
  background: #fff;
  color: #111;
  cursor: pointer;
  list-style: none;
}

.home-r8-search-more > summary.home-r8-filter-trigger::-webkit-details-marker {
  display: none;
}

.home-r8-filter-trigger svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-r8-search-more[open] > summary.home-r8-filter-trigger {
  border-color: #111;
  background: #111;
  color: #fff;
}

.home-r8-filter-panel {
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--home-r8-border);
  border-radius: 14px;
  background: #fff;
}

.home-r8-filter-panel > p {
  margin: 14px 16px 0;
  color: var(--home-r8-muted);
  font-size: 14px;
}

.home-r8-search-filter-grid {
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.home-r8-filter-row-top {
  grid-template-columns:
    minmax(150px, .72fr)
    minmax(240px, 1.4fr)
    minmax(180px, .9fr);
  gap: 12px;
}

.home-r8-filter-row-years {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-r8-year-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.home-r8-year-group legend {
  margin: 0 0 7px;
  padding: 0;
  color: var(--home-r8-text-2);
  font-size: 13px;
  font-weight: 700;
}

.home-r8-year-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-r8-year-range input {
  min-width: 0;
  padding-inline: 13px !important;
}

.home-r8-search-browse {
  grid-column: 1 / -1;
  justify-self: start;
  white-space: nowrap;
}

/* Story becomes an explicit 1→5 visual sequence with overlay badges. */
.home-r8-story-main,
.home-r8-story-thumbs figure {
  position: relative;
}

.home-r8-story-main {
  margin: 0;
}

.home-r8-story-main .home-r8-lightbox-trigger {
  width: 100%;
  height: 100%;
}

.home-r8-story-step-badge {
  position: absolute;
  z-index: 3;
  left: 10px;
  bottom: 10px;
  box-sizing: border-box;
  max-width: calc(100% - 20px);
  min-height: 32px;
  margin: 0 !important;
  padding: 7px 11px !important;
  display: inline-flex !important;
  align-items: center;
  border: 1px solid rgba(17, 17, 17, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .12);
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 750;
  line-height: 1.2 !important;
  white-space: normal;
  overflow-wrap: normal !important;
  backdrop-filter: blur(8px);
}

.home-r8-story-main .home-r8-story-step-badge {
  left: 14px;
  bottom: 14px;
  min-height: 36px;
  padding: 8px 13px !important;
  font-size: 14px !important;
}

/* Deterministic desktop-only stage composition.
   Mobile stays natural; desktop uses soft proximity snapping only. */
@media (min-width: 901px) and (min-height: 650px) {
  html.home-r8-root {
    scroll-snap-type: y proximity !important;
    scroll-padding-top: 76px;
  }

  body.home-r8-page .home-r8-snap:not(.home-r8-hero) {
    box-sizing: border-box;
    min-height: calc(100svh - 76px);
    display: flex;
    align-items: center;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal;
    scroll-margin-top: 76px !important;
  }

  body.home-r8-page .home-r8-search,
  body.home-r8-page .home-r8-section,
  body.home-r8-page .home-r8-physical,
  body.home-r8-page .home-r8-intents {
    padding-top: clamp(28px, 4vh, 58px);
    padding-bottom: clamp(28px, 4vh, 58px);
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .home-r8-story {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
  }

  .home-r8-story-main {
    min-height: 0;
    height: min(520px, calc(100svh - 170px));
  }

  .home-r8-story-body > p:not(.home-r8-eyebrow):not(.home-r8-meta) {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
  }

  .home-r8-story-explainer {
    margin-bottom: 10px !important;
  }

  .home-r8-story-thumbs {
    gap: 8px;
    margin-top: auto;
  }

  .home-r8-story-step-badge {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    min-height: 28px;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }

  .home-r8-story-main .home-r8-story-step-badge {
    left: 10px;
    bottom: 10px;
    font-size: 12.5px !important;
  }

  .home-r8-head {
    margin-bottom: 24px;
  }

  .home-r8-steps {
    gap: 14px;
  }
}

@media (max-width: 900px) {
  html.home-r8-root {
    scroll-snap-type: none !important;
  }

  body.home-r8-page .home-r8-snap {
    min-height: 0;
    display: block;
    scroll-snap-align: none !important;
    scroll-margin-top: 0 !important;
  }
}

@media (max-width: 560px) {
  .home-r8-search-form {
    grid-template-columns: auto 52px minmax(0, 1fr) !important;
  }

  .home-r8-search-query {
    grid-column: 1 / -1;
  }

  .home-r8-search-submit {
    grid-column: 1;
    min-width: 104px;
  }

  .home-r8-search-more > summary.home-r8-filter-trigger {
    top: 70px;
    right: auto;
    left: 124px;
  }

  .home-r8-filter-row-top {
    grid-template-columns: 1fr;
  }

  .home-r8-filter-row-years {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-r8-year-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-r8-story-step-badge {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    min-height: 28px;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }

  .home-r8-story-main .home-r8-story-step-badge {
    left: 10px;
    bottom: 10px;
    font-size: 12.5px !important;
  }
}
/* ===== END R11.7.2 FIX3 ===== */


/* ===== R11.7.2 FIX5 — HOME UI QUALITY PASS ===== */

.home-r8-filter-panel {
  overflow: visible !important;
}

.home-r8-search-more > summary.home-r8-filter-trigger {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.home-r8-filter-trigger svg {
  display: block;
  margin: 0 auto;
  transform: none !important;
}

/* Story captions live under the media. They never cover the photograph. */
.home-r8-story-main {
  overflow: visible !important;
  border-radius: 0 !important;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 44px;
  gap: 8px;
}

.home-r8-story-main .home-r8-lightbox-trigger {
  overflow: hidden;
  border-radius: 18px;
}

.home-r8-story-thumbs figure {
  display: grid;
  grid-template-rows: auto 44px;
  gap: 8px;
}

.home-r8-story-step-badge {
  position: static !important;
  z-index: auto !important;
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid #dedee3;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 720;
  line-height: 1.2 !important;
  white-space: normal;
  overflow-wrap: normal !important;
  backdrop-filter: none !important;
}

.home-r8-story-main .home-r8-story-step-badge {
  min-height: 44px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
}

/* Final continuity section never participates in snap, so the footer is reachable. */
@media (min-width: 901px) and (min-height: 650px) {
  body.home-r8-page .home-r8-final-section {
    min-height: 0 !important;
    display: block !important;
    scroll-snap-align: none !important;
    scroll-margin-top: 0 !important;
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .home-r8-story-main {
    height: min(520px, calc(100svh - 170px));
  }

  .home-r8-story-thumbs figure {
    grid-template-rows: auto 40px;
    gap: 6px;
  }

  .home-r8-story-step-badge,
  .home-r8-story-main .home-r8-story-step-badge {
    min-height: 40px !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
  }
}

@media (max-width: 560px) {
  .home-r8-story-main {
    grid-template-rows: auto 42px;
  }

  .home-r8-story-thumbs figure {
    grid-template-rows: auto 42px;
    gap: 6px;
  }

  .home-r8-story-step-badge,
  .home-r8-story-main .home-r8-story-step-badge {
    min-height: 42px !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
  }
}

/* ===== END R11.7.2 FIX5 ===== */


/* FIX5.1 exact optical centering + snap release near the footer. */
.home-r8-search-more > summary.home-r8-filter-trigger {
  position: absolute;
}

.home-r8-filter-trigger svg {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

html.home-r8-root.home-r8-snap-released {
  scroll-snap-type: none !important;
}
/* END FIX5.1 */


/* FIX5.2 keep all five step captions on one horizontal baseline on desktop. */
@media (min-width: 901px) {
  .home-r8-story-thumbs {
    margin-top: auto !important;
    padding-bottom: 0 !important;
  }
}
/* END FIX5.2 */


/* ===== R11.7.2 FIX6 — HOME SEARCH ALIGNMENT + LIGHTBOX CONTROL ===== */

.home-r8-search-form {
  align-items: start;
}

.home-r8-filter-trigger {
  grid-column: 3;
  grid-row: 1;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  box-sizing: border-box;
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-self: start;
  border: 1px solid #c7c7cc;
  border-radius: 12px;
  background: #fff;
  color: #111;
  cursor: pointer;
  line-height: 0 !important;
}

.home-r8-filter-trigger[aria-expanded="true"] {
  border-color: #111;
  background: #111;
  color: #fff;
}

.home-r8-filter-trigger svg {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: 21px;
  height: 21px;
  margin: 0 !important;
  display: block;
  transform: none !important;
}

.home-r8-filter-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0;
}

.home-r8-filter-panel[hidden] { display: none !important; }

.home-r8-search-browse {
  grid-column: 1 / -1;
}

/* The close control is a fixed circle, immune to global button padding/min-width. */
.home-r8-lightbox-close {
  box-sizing: border-box !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  line-height: 1 !important;
}

@media (max-width: 560px) {
  .home-r8-search-form {
    grid-template-columns: auto 52px minmax(0, 1fr) !important;
    align-items: start;
  }

  .home-r8-search-query {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .home-r8-search-submit {
    grid-column: 1;
    grid-row: 2;
    height: 50px;
    min-height: 50px;
    margin: 0 !important;
    align-self: start;
  }

  .home-r8-filter-trigger {
    grid-column: 2;
    grid-row: 2;
    width: 50px;
    height: 50px;
    align-self: start;
  }

  .home-r8-filter-panel {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .home-r8-search-browse {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .home-r8-filter-row-top {
    grid-template-columns: 1fr;
  }

  .home-r8-filter-row-top .k-letter-popover {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
}

/* ===== END R11.7.2 FIX6 ===== */

/* ===== R11.7.2 FIX7.1 — SEARCH FIELD CANON REPAIR ===== */
/* Homepage must render the same canonical search-field border as Memorials. */
body.home-r8-page .home-r8-search-query {
  border: 2px solid #4a4a4a !important;
  border-radius: 12px !important;
}

body.home-r8-page .home-r8-search-query:focus {
  border-color: #111111 !important;
}
/* ===== END R11.7.2 FIX7.1 ===== */
