/* Aperture layout for the existing homepage. Colours and type come from shared-shell. */
body[data-rs-page="home"] { --home-stage-min-height: 640px; --home-stage-height: max(calc(100svh - var(--rs-header-h)), var(--home-stage-min-height)); }
body.home-aperture-active #rs-scene { display: none; }
body.home-aperture-active #root .app-main { max-width: none; padding: 0; }
body[data-rs-page="home"] .login-hero.home-aperture {
  position: relative; display: block; width: 100%; min-height: 0;
  height: auto !important; padding: 0 !important; margin: 0;
  background: var(--rs-ground) !important;
}
.home-aperture-stage { position: relative; overflow: clip; display: grid; background: var(--rs-ground); }
.home-aperture .hero-center-wrap { width: 100%; order: 0; padding: 100px var(--rs-gutter) 0 !important; }
.home-aperture .landing-title { display: flex; align-items: center; justify-content: center; gap: .24em; width: 100%; max-width: none; font-size: clamp(48px, 6.3vw, 118px) !important; line-height: 1.05 !important; margin: 0 !important; text-align: center !important; animation: none !important; opacity: 1; transform: none; }
.home-aperture .home-lead, .home-aperture .home-trail { white-space: nowrap; }
.home-aperture .home-opening { display: none; width: 17vw; height: .75em; flex: 0 0 17vw; }
.home-intro { order: 1; padding: 38px var(--rs-gutter) 80px; width: 100%; display: flex; align-items: center; flex-direction: column; gap: 28px; }
.home-intro .landing-subtitle { width: min(100%, 620px); max-width: 620px !important; margin: 0 !important; font-size: 17px !important; line-height: 1.7 !important; text-align: center !important; animation: none !important; opacity: 1; transform: none; }
.home-intro .hero-row { animation: none !important; opacity: 1; transform: none; flex-direction: row; flex-wrap: wrap; justify-content: center !important; }
.home-aperture-media { position: relative; order: 2; height: min(70vw, 720px); background: var(--rs-ground); overflow: clip; }
.home-aperture-media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 46%; filter: grayscale(1); opacity: .5; }
.home-aperture-media::after { content: ""; position: absolute; inset: 0; background: #151515; opacity: .3; pointer-events: none; }
.home-motion-ready body[data-rs-page="home"] .login-hero.home-aperture { height: calc(var(--home-stage-height) * 3) !important; }
.home-motion-ready .home-aperture-stage { display: block; position: sticky; top: var(--rs-header-h); height: var(--home-stage-height); }
.home-motion-ready .home-aperture-media { position: absolute; inset: 0; height: 100%; clip-path: inset(var(--clip-top, 50%) var(--clip-right, 50%) var(--clip-bottom, 50%) var(--clip-left, 50%) round var(--clip-round, 80px)); }
.home-motion-ready .home-aperture-media img { transform: scale(var(--image-scale, 1.32)); }
.home-motion-ready .home-aperture .hero-center-wrap { position: absolute; top: 25%; inset-inline: 0; padding: 0 var(--rs-gutter) !important; }
.home-motion-ready .home-aperture .home-opening { display: block; }
.home-motion-ready .home-lead { transform: translate(var(--lead-x, 0px), var(--lead-y, 0px)); opacity: var(--words-opacity, 1); }
.home-motion-ready .home-trail { transform: translate(var(--trail-x, 0px), var(--trail-y, 0px)); opacity: var(--words-opacity, 1); }
.home-motion-ready .home-intro { position: absolute; top: calc(25% + clamp(48px, 6.3vw, 118px) * 1.05); padding-top: 44px; padding-bottom: 0; opacity: var(--intro-opacity, 1); }
.home-motion-ready .home-caption-phase .home-intro { top: auto; bottom: 10%; align-items: flex-start; }
.home-motion-ready .home-caption-phase .home-intro .landing-subtitle { text-align: left !important; font-size: clamp(20px, 2.1vw, 30px) !important; line-height: 1.5 !important; max-width: 720px !important; }
.home-motion-ready .home-caption-phase .home-intro .hero-row { justify-content: flex-start !important; }
.home-motion-ready .home-intro[aria-hidden="true"] { visibility: hidden; }
.home-aperture.is-moving .home-aperture-media { will-change: clip-path; }
.home-aperture.is-moving .home-aperture-media img, .home-aperture.is-moving .home-lead, .home-aperture.is-moving .home-trail { will-change: transform; }

/* The current counters, history, all FAQ groups and footer keep their content. */
body[data-rs-page="home"] #landing-stats { width: 100%; max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin: 0 !important; padding: 72px max(var(--rs-gutter), calc((100% - var(--rs-width)) / 2)) !important; }
body[data-rs-page="home"] #landing-stats h2 { grid-column: 1 / -1; max-width: none; margin: 0 0 20px; font-size: clamp(30px, 4vw, 56px); line-height: 1.12; font-weight: 650; letter-spacing: -.05em; }
body[data-rs-page="home"] #landing-stats .stat-num { font-size: clamp(56px, 8vw, 116px) !important; line-height: 1.1 !important; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body[data-rs-page="home"] #landing-stats .stat-label { font-size: 16px !important; }
body[data-rs-page="home"] #banned { width: min(var(--rs-width), calc(100% - var(--rs-gutter) * 2)); max-width: var(--rs-width); grid-template-columns: minmax(0, 1fr); gap: 42px; padding-block: 120px !important; }
/* In this single-column layout the intro must scroll above the ledger. */
body[data-rs-page="home"] #banned .rs-ban-intro { display: block; position: static; top: auto; }
body[data-rs-page="home"] #banned .section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
body[data-rs-page="home"] #banned .landing-features-title, body[data-rs-page="home"] #faq > .section-header .landing-features-title { font-size: clamp(32px, 4vw, 56px) !important; line-height: 1.12 !important; margin: 0 !important; }
body[data-rs-page="home"] #banned .landing-features-desc { max-width: 370px; font-size: 16px !important; }
body[data-rs-page="home"] #banned .rs-ban-note { margin-top: 24px; }
body[data-rs-page="home"] #banned .rs-ban-note a { display: inline; margin-left: 12px; }
body[data-rs-page="home"] #banned .rs-ban-ledger { grid-row: auto; }
body[data-rs-page="home"] #banned .rs-ban-entry summary { min-height: 105px; }
body[data-rs-page="home"] #banned .rs-ban-person strong { font-size: 22px; }
body[data-rs-page="home"] #banned .rs-ban-reason { font-size: 15px; }
body[data-rs-page="home"] #faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 44px 72px; padding: 0 0 120px; }
body[data-rs-page="home"] #faq > .section-header { grid-column: 1; grid-row: 1 / 5; position: sticky; top: calc(var(--rs-header-h) + 44px); align-self: start; }
body[data-rs-page="home"] #faq > .section-header .landing-features-desc { margin-top: 24px !important; max-width: 360px; }
body[data-rs-page="home"] #faq .rs-faq-group { grid-column: 2; display: block; margin: 0; }
body[data-rs-page="home"] #faq .rs-faq-group h3 { margin: 0 0 18px; }
body[data-rs-page="home"] #faq .rs-faq-list details { background: var(--rs-surface); margin-bottom: 8px; }
body[data-rs-page="home"] #faq .rs-faq-list summary { min-height: 76px; }
body[data-rs-page="home"] #faq .rs-faq-contact { grid-column: 2; margin: 0; }
body[data-rs-page="home"] #rs-footer { width: 100%; padding: 70px max(var(--rs-gutter), calc((100% - var(--rs-width)) / 2)) 32px; background: var(--rs-surface); gap: 28px 40px; }
body[data-rs-page="home"] .rs-footer-brand { font-size: clamp(80px, 15vw, 230px); letter-spacing: -.075em; line-height: 1; }
body[data-rs-page="home"] #rs-footer > p { font-size: 16px; }
body[data-rs-page="home"] .rs-footer-links { grid-row: 1 / 3; max-width: 320px; }
@media (max-width: 1000px) {
  body[data-rs-page="home"] #faq { gap: 38px; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
  .home-aperture .landing-title { font-size: 6.2vw !important; }
}
@media (max-width: 767px) {
  body[data-rs-page="home"] #banned { padding-block: 80px !important; gap: 28px; }
  body[data-rs-page="home"] #banned .section-header { flex-direction: column; gap: 22px; }
  body[data-rs-page="home"] #banned .landing-features-desc { max-width: 500px; }
  body[data-rs-page="home"] #faq { grid-template-columns: minmax(0, 1fr); padding-bottom: 80px; }
  body[data-rs-page="home"] #faq > .section-header { grid-column: 1; grid-row: auto; position: static; }
  body[data-rs-page="home"] #faq .rs-faq-group, body[data-rs-page="home"] #faq .rs-faq-contact { grid-column: 1; }
}
@media (max-width: 639px) {
  body[data-rs-page="home"] { --home-stage-min-height: 700px; }
  .home-aperture .hero-center-wrap { padding-top: 70px !important; }
  .home-aperture .landing-title { flex-direction: column; gap: 14px; font-size: clamp(38px, 13vw, 78px) !important; }
  .home-motion-ready .home-aperture .hero-center-wrap { top: 13%; }
  .home-aperture .home-opening { width: 44vw; height: 58px; flex: 0 0 58px; }
  .home-motion-ready .home-intro { top: calc(13% + clamp(38px, 13vw, 78px) * 2.1 + 86px); padding-top: 30px; }
  .home-intro { padding: 30px var(--rs-gutter) 54px; gap: 22px; }
  .home-intro .landing-subtitle { font-size: 16px !important; line-height: 1.65 !important; }
  .home-intro .hero-row { flex-direction: column; align-items: center; gap: 10px; width: 100%; }
  .home-intro .landing-cta { min-width: 220px; width: auto !important; }
  .home-intro .landing-cta-secondary { width: auto !important; min-width: 220px; justify-content: space-between !important; padding-inline: 0; }
  .home-motion-ready .home-caption-phase .home-intro { top: auto; bottom: 9%; }
  .home-motion-ready .home-caption-phase .home-intro .landing-subtitle { font-size: 21px !important; }
  .home-motion-ready .home-caption-phase .home-intro .hero-row { align-items: flex-start; }
  .home-aperture-media { height: 100vw; }
  body[data-rs-page="home"] #landing-stats { padding: 48px var(--rs-gutter) !important; gap: 28px 18px; }
  body[data-rs-page="home"] #landing-stats h2 { font-size: 32px; margin-bottom: 8px; }
  body[data-rs-page="home"] #landing-stats .stat-num { font-size: clamp(40px, 11vw, 64px) !important; }
  body[data-rs-page="home"] #landing-stats .stat-label { font-size: 13px !important; }
  body[data-rs-page="home"] #banned .rs-ban-note a { display: block; margin: 8px 0 0; }
  body[data-rs-page="home"] #banned .rs-ban-entry summary { min-height: 95px; }
  body[data-rs-page="home"] #banned .rs-ban-person strong { font-size: 17px; }
  body[data-rs-page="home"] #banned .rs-ban-reason { font-size: 14px; }
  body[data-rs-page="home"] #faq .rs-faq-list summary { min-height: 74px; padding: 17px 16px; }
  body[data-rs-page="home"] #faq .rs-faq-answer { padding: 0 16px 24px; }
  body[data-rs-page="home"] #rs-footer { padding-top: 48px; gap: 22px; }
  body[data-rs-page="home"] .rs-footer-brand { font-size: 20vw; }
  body[data-rs-page="home"] .rs-footer-links { grid-row: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-aperture * { animation: none !important; transition: none !important; }
}

/* Mobile is ordinary reading flow: whole headline, actions, then actual public data. */
@media (max-width: 999px) {
  body[data-rs-page="home"] { --home-stage-min-height: 0px; }
  body[data-rs-page="home"] .login-hero.home-aperture { height:auto!important; }
  .home-aperture-stage { position:relative; height:auto; display:block; }
  .home-aperture .hero-center-wrap { position:relative; padding:36px var(--rs-gutter) 0!important; }
  .home-aperture .landing-title { flex-direction:column; gap:0; font-size:clamp(44px,10vw,76px)!important; line-height:1!important; }
  .home-aperture .home-opening { display:none!important; }
  .home-intro { position:relative; padding:20px var(--rs-gutter) 32px; gap:20px; }
  .home-intro .landing-subtitle { font-size:16px!important; line-height:1.5!important; max-width:540px!important; }
  .home-intro .hero-row { gap:8px; }
  .home-intro .landing-cta,.home-intro .landing-cta-secondary { min-height:44px; }
  .home-aperture-media { display:none; }
  body[data-rs-page="home"] #landing-stats { padding:24px var(--rs-gutter)!important; gap:16px; }
  body[data-rs-page="home"] #landing-stats h2 { font-size:24px; margin:0; }
  body[data-rs-page="home"] #landing-stats .stat-num { font-size:clamp(30px,8vw,48px)!important; }
  body[data-rs-page="home"] #landing-stats .stat-label { font-size:14px!important; }
  body[data-rs-page="home"] #banned { padding-block:40px!important; gap:20px; }
  body[data-rs-page="home"] #banned .section-header { gap:12px; }
  body[data-rs-page="home"] #banned .landing-features-desc { font-size:14px!important; }
  body[data-rs-page="home"] #faq { padding-bottom:40px; gap:24px; }
  body[data-rs-page="home"] #faq > .section-header .landing-features-desc { margin-top:12px!important; }
  body[data-rs-page="home"] #rs-footer { padding-top:32px; }
}
