/* USFLUENT system appearance + footer guard */
html{color-scheme:light dark;background:#fff}
body{min-height:0}
body>footer.footer{box-sizing:border-box;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:22px 0!important}
body>footer.footer:last-of-type{margin-bottom:0!important}
@media(max-width:620px){body>footer.footer{padding:20px 0!important}}
@media(prefers-color-scheme:dark){
  html{background:#07152f}
  body,main{background:#07152f!important;color:#eef3fb}
  :root{--ink:#eef3fb!important;--muted:#aab5c6!important;--line:#263650!important;--paper:#0b1c38!important;--white:#0d1e3b!important;--shadow:0 24px 70px rgba(0,0,0,.28)!important}
  .top{background:rgba(7,21,47,.92)!important;border-color:#263650!important;color:#eef3fb}
  .langbtn,.menuBtn,.langmenu,.langmenu button,.mobileNav{background:#0d1e3b!important;color:#eef3fb!important;border-color:#31425d!important}
  .band,.programsSection,.teacherPremium,#goals{background:#07152f!important}
  .card,.panel,.programCard,.pathCard:not(.featuredPath),.goalBtn,.formShell,.lessonPhrasePanel,.lessonInfoPanel,.teacherCopy,.steps .step,.contactPremium .panel,.contactMini,.socialReserveBtn,.socialReserve,.programStart,.dialogMini,.cta,.choiceTarget,.trustStrip,.sheet,.articleCard,.resource,.resourceList,.adminHeader,.studentDetailPanel,.studentAccessWorkspace,.filesAdminTable,.catalogFolder,.resourceFolderGroup,.communityAdminItem{background:#0d1e3b!important;color:#eef3fb!important;border-color:#263650!important}
  .sub,.card p,.programCard>p,.pathCard p,.formHint,.formNote,.muted,.fine,.lead:not(.hero .lead),.articleCard p{color:#aab5c6!important}
  /* Light cards stay genuinely readable in system dark mode. */
  .intro,.evening,.interest,.clubMoments,.features article,.evening li,.momentsGrid figure,.photoCaption{color:#0b1933!important}
  .intro p,.interestIntro p,.features p,.momentsIntro p,.momentsNote{color:#5b6679!important}
  .features h3,.evening li,.momentsGrid figcaption,.photoCaption,.photoCaption strong{color:#112140!important}
  input,select,textarea{background:#0a1931!important;color:#eef3fb!important;border-color:#3a4a63!important}
  .chip,.formBadge,.programMeta,.goalCustom{background:#18243a!important;color:#f1d06f!important;border-color:#6d5722!important}
  .footer{background:#030a18!important;color:#98a3b5!important;border-color:#1d2b43!important}
}

/* Speaking Club: preserve its intentionally light header/cards in system dark mode. */
@media(prefers-color-scheme:dark){
  .header{background:#fff!important;color:#0b1933!important}
  .header .logo,.header .logo strong,.header nav a{color:#0b1933!important}
  .header nav a[aria-current]{background:#07152f!important;color:#fff!important}
  .header .back{color:#916a12!important}
  .intro,.interest,.clubMoments{background:#fff!important;color:#0b1933!important}
  .evening{background:#ebeff6!important;color:#0b1933!important}
  .features article,.evening li,.momentsGrid figure{background:#f7f8fb!important;color:#0b1933!important;border-color:#e6e8ed!important}
  .intro h2,.interest h2,.evening h2,.features h3,.momentsIntro h2{color:#0b1933!important}
}

/* Speaking Club dark mode: dark surfaces throughout; header remains readable at page top. */
@media(prefers-color-scheme:dark){
  .intro,.interest,.clubMoments,.evening{background:#0d1e3b!important;color:#eef3fb!important;border-color:#263650!important}
  .features article,.evening li,.momentsGrid figure{background:#122541!important;color:#eef3fb!important;border-color:#31425d!important}
  .intro h2,.interest h2,.evening h2,.features h3,.momentsIntro h2,.momentsGrid figcaption{color:#f4f7fc!important}
  .intro p,.interestIntro p,.features p,.momentsIntro p,.momentsNote,.momentsGrid figcaption{color:#b8c3d4!important}
  .photoCaption{background:rgba(13,30,59,.94)!important;color:#eef3fb!important}
  .photoCaption strong{color:#fff!important}
  .header{background:#0d1e3b!important;color:#eef3fb!important;border-color:#263650!important}
  .header .logo,.header .logo strong,.header nav a{color:#eef3fb!important}
  .header nav a[aria-current]{background:#f4f7fc!important;color:#07152f!important}
  .header .back{color:#e2bd63!important}
}

/* Global dark-mode hardening: remove remaining light card islands. */
@media(prefers-color-scheme:dark){
  .approachPremium,.programsSection,.teacherPremium,.goalSection{background:#07152f!important;color:#eef3fb!important}
  .steps .step,.programCard,.pathCard:not(.featuredPath),.goalBtn:not(.active),.teacherCopy,.lessonPhrasePanel,.lessonInfoPanel,.programStart,.dialogMini,.formShell,.socialReserveBtn{background:#0d1e3b!important;background-image:none!important;color:#eef3fb!important;border-color:#31425d!important}
  .steps .step h3,.programCard h3,.pathCard h3,.goalBtn strong,.teacherCopy h2,.programResult strong,.programStart h3,.dialogMini b{color:#f4f7fc!important}
  .steps .step p,.programCard>p,.pathCard p,.goalBtn span,.teacherCopy p,.programStart p{color:#b8c3d4!important}
  .programMeta,.programCta,.goalCustom{background:#172947!important;color:#f1d06f!important;border-color:#725c29!important}
  .sectionHead h2,.approachPremium h2,.programsSection h2{color:#f4f7fc!important}
}
/* Footer must end with its own content, never fill the viewport. */
html,body{min-height:0!important;height:auto!important}
body{display:block!important}
body>footer.footer{position:static!important;inset:auto!important;min-height:0!important;height:auto!important;padding:24px 0!important;margin:0!important}
body>footer:not(.footer){min-height:0!important;height:auto!important}

/* Footer layout: content-sized only; do not stretch short pages. */
body>main{min-height:0!important}
body>footer.footer{flex:none!important;width:100%!important}

/* iOS system-dark final override for homepage cards/sections. */
@media (prefers-color-scheme: dark){
  #approach,#programs,.approachPremium,.programsSection,.teacherPremium,.goalSection{background:#07152f!important;background-image:none!important}
  #approach .step,#approach article,#programs .programCard,#programs article,.programCard,.steps .step,.pathCard:not(.featuredPath),.goalBtn:not(.active),.teacherCopy,.programStart{
    background:#0d1e3b!important;background-image:none!important;color:#eef3fb!important;border-color:#31425d!important
  }
  #approach h2,#approach h3,#programs h2,#programs h3,.programCard h3,.steps .step h3,.pathCard h3{color:#f4f7fc!important}
  #approach p,#programs p,.programCard>p,.steps .step p,.pathCard p{color:#b8c3d4!important}
}

/* system7: actual homepage interactive components */
@media (prefers-color-scheme:dark){
 #approach.approachPremium,#start.pathsPremium{background:#07152f!important;background-image:none!important;color:#f4f7fc!important}
 #approach .methodCard,#start .pathChoice{background:#0d1e3b!important;background-image:none!important;color:#f4f7fc!important;border-color:#31425d!important;box-shadow:none!important}
 #approach .methodCardCopy strong,#start .pathChoiceCopy strong{color:#f4f7fc!important}
 #approach .methodCardCopy small,#start .pathChoiceCopy small,#approach .sub,#start .sub,#approach .approachHint{color:#b8c3d4!important}
 #approach .sectionHead h2,#start .sectionHead h2{color:#f4f7fc!important}
 #approach .methodToggle span,#start .pathToggle span{background:#132847!important;color:#efc14e!important;border-color:#80631e!important}
 #approach .methodCard.active .methodToggle span,#start .pathChoice.active .pathToggle span{background:#f0c34f!important;color:#07152f!important;border-color:#f0c34f!important}
}

/* system9: compact mobile footer and no trailing document space */
@media(max-width:900px){
  html,body{height:auto!important;min-height:0!important;margin-bottom:0!important;padding-bottom:0!important}
  body{display:block!important}
  body>footer,body>footer.footer{height:auto!important;min-height:0!important;max-height:none!important;margin:0!important}
}


/* system10: stable compact footer + short-page viewport fill */
html{min-height:100%;height:auto!important}
body{min-height:100svh!important;height:auto!important;display:flex!important;flex-direction:column!important;margin-bottom:0!important;padding-bottom:0!important}
@supports (min-height:100dvh){body{min-height:100dvh!important}}
body>header{flex:0 0 auto}
body>main{flex:1 0 auto;min-height:0!important}
body>footer,body>footer.footer{position:static!important;inset:auto!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important}
@media(max-width:900px){
  html{min-height:100%!important;height:auto!important}
  body{min-height:100svh!important;height:auto!important;display:flex!important;flex-direction:column!important}
  @supports (min-height:100dvh){body{min-height:100dvh!important}}
  body>main{flex:1 0 auto!important;min-height:0!important}
  body>footer,body>footer.footer{flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important}
}


/* lux1: unified premium light appearance for all public USFLUENT pages */
@media (prefers-color-scheme:light){
  html{background:#e9eef4!important}
  body:not([data-resource-page="admin"]){
    --ink:#14213a;
    --muted:#647086;
    --line:#d7dee7;
    --paper:#edf2f7;
    --white:#f8f9f7;
    --shadow:0 22px 62px rgba(15,34,63,.105);
    background:
      radial-gradient(circle at 12% 0%,rgba(202,213,228,.28),transparent 30%),
      linear-gradient(180deg,#edf2f7 0%,#f3f1ea 48%,#eaf0f6 100%)!important;
    color:#14213a;
  }

  body:not([data-resource-page="admin"]) .top,
  body:not([data-resource-page="admin"]) .header{
    background:rgba(242,245,249,.94)!important;
    border-color:#d8e0e9!important;
    box-shadow:0 8px 30px rgba(25,45,74,.055);
  }
  body:not([data-resource-page="admin"]) .langbtn,
  body:not([data-resource-page="admin"]) .menuBtn,
  body:not([data-resource-page="admin"]) .langmenu,
  body:not([data-resource-page="admin"]) .langmenu button{
    background:#f9faf8!important;
    border-color:#d8dee7!important;
  }

  #home{background:#e9eef4!important}
  #home #goals{
    background:
      radial-gradient(circle at 88% 8%,rgba(214,168,54,.10),transparent 25%),
      linear-gradient(180deg,#eef3f8 0%,#f4f1e9 100%)!important;
  }
  #home .programsSection{
    background:
      radial-gradient(circle at 8% 10%,rgba(23,56,109,.045),transparent 24%),
      linear-gradient(180deg,#f4f1e9 0%,#edf2f7 100%)!important;
  }
  #home .lessonPremium{
    background:
      radial-gradient(circle at 12% 12%,rgba(20,59,111,.075),transparent 29%),
      linear-gradient(180deg,#e7edf4 0%,#eef2f5 100%)!important;
  }
  #home .teacherPremium{
    background:
      radial-gradient(circle at 90% 10%,rgba(214,166,45,.085),transparent 26%),
      linear-gradient(180deg,#f5f1e8 0%,#eef2f6 100%)!important;
  }
  #home .approachPremium{
    background:
      radial-gradient(circle at 90% 4%,rgba(217,166,46,.09),transparent 23%),
      linear-gradient(180deg,#eaf0f6 0%,#f2f4f5 100%)!important;
  }
  #home .pathsPremium{
    background:
      radial-gradient(circle at 6% 90%,rgba(16,53,102,.055),transparent 26%),
      linear-gradient(180deg,#f3f1ea 0%,#e9eff5 100%)!important;
  }

  body:not([data-resource-page="admin"]) .band{
    background:linear-gradient(180deg,#e9eef4 0%,#f1f3f4 100%)!important;
  }
  body:not([data-resource-page="admin"]) .intro,
  body:not([data-resource-page="admin"]) .interest,
  body:not([data-resource-page="admin"]) .clubMoments{
    background:linear-gradient(180deg,#f2f4f5,#eceff3)!important;
  }
  body:not([data-resource-page="admin"]) .evening{
    background:linear-gradient(180deg,#e5ebf2,#edf1f5)!important;
  }

  body:not([data-resource-page="admin"]) .card,
  body:not([data-resource-page="admin"]) .panel,
  body:not([data-resource-page="admin"]) .programCard,
  body:not([data-resource-page="admin"]) .pathCard:not(.featuredPath),
  body:not([data-resource-page="admin"]) .goalBtn:not(.active),
  body:not([data-resource-page="admin"]) .teacherCopy,
  body:not([data-resource-page="admin"]) .lessonPhrasePanel,
  body:not([data-resource-page="admin"]) .lessonInfoPanel,
  body:not([data-resource-page="admin"]) .steps .step,
  body:not([data-resource-page="admin"]) .programStart,
  body:not([data-resource-page="admin"]) .dialogMini,
  body:not([data-resource-page="admin"]) .formShell,
  body:not([data-resource-page="admin"]) .contactMini,
  body:not([data-resource-page="admin"]) .socialReserve,
  body:not([data-resource-page="admin"]) .socialReserveBtn,
  body:not([data-resource-page="admin"]) .category,
  body:not([data-resource-page="admin"]) .articleCard,
  body:not([data-resource-page="admin"]) .resource,
  body:not([data-resource-page="admin"]) .resourceList,
  body:not([data-resource-page="admin"]) .roleCard,
  body:not([data-resource-page="admin"]) .focusCard,
  body:not([data-resource-page="admin"]) .ecosystemCard,
  body:not([data-resource-page="admin"]) .brandCard,
  body:not([data-resource-page="admin"]) .features article,
  body:not([data-resource-page="admin"]) .evening li,
  body:not([data-resource-page="admin"]) .momentsGrid figure{
    background:
      linear-gradient(145deg,rgba(250,249,245,.98),rgba(240,244,248,.98))!important;
    border-color:#d7dce2!important;
    box-shadow:
      0 14px 38px rgba(18,38,68,.055),
      inset 0 1px 0 rgba(255,255,255,.72);
  }

  #home .goalBtn:not(.active),
  #home .methodCard,
  #home .pathChoice{
    background:linear-gradient(145deg,#f9f8f3 0%,#edf2f7 100%)!important;
    border-color:#d7dce3!important;
  }
  #home .methodCard.active,
  #home .pathChoice.active{
    background:linear-gradient(145deg,#faf7ef,#f2f5f7)!important;
  }

  body:not([data-resource-page="admin"]) .lessonInfoPanel{
    background:
      radial-gradient(circle at 92% 10%,rgba(217,166,46,.08),transparent 28%),
      linear-gradient(155deg,#faf8f1,#eef3f7)!important;
  }
  body:not([data-resource-page="admin"]) .teacherCopy{
    background:
      radial-gradient(circle at 90% 10%,rgba(217,166,46,.075),transparent 28%),
      linear-gradient(160deg,#f9f7f0,#eef3f7)!important;
  }

  body:not([data-resource-page="admin"]) input,
  body:not([data-resource-page="admin"]) select,
  body:not([data-resource-page="admin"]) textarea{
    background:#f7f8f6!important;
    border-color:#cfd8e3!important;
    color:#14213a!important;
  }
  body:not([data-resource-page="admin"]) .chip,
  body:not([data-resource-page="admin"]) .programMeta,
  body:not([data-resource-page="admin"]) .goalCustom,
  body:not([data-resource-page="admin"]) .filterBtn{
    background:#f3efe4!important;
    color:#74530d!important;
    border-color:#dccb9b!important;
  }

  body:not([data-resource-page="admin"]) .editorialNote,
  body:not([data-resource-page="admin"]) .cta{
    background:
      radial-gradient(circle at 94% 4%,rgba(217,166,46,.09),transparent 26%),
      linear-gradient(145deg,#edf2f7,#f6f1e7)!important;
    border-color:#d6dce4!important;
  }

  body[data-resource-page="public"],
  body[data-resource-page="login"]{
    background:linear-gradient(180deg,#e8eef5,#f4f1e9)!important;
  }
  body[data-resource-page="public"] .shell,
  body[data-resource-page="login"] .shell{
    background:transparent!important;
  }

  .intro,.interest,.clubMoments,.evening{border-color:#d6dde6!important}
  .header .back{color:#85610e!important}

  body:not([data-resource-page="admin"]) .sub,
  body:not([data-resource-page="admin"]) .muted,
  body:not([data-resource-page="admin"]) .fine,
  body:not([data-resource-page="admin"]) .card p,
  body:not([data-resource-page="admin"]) .programCard>p,
  body:not([data-resource-page="admin"]) .pathCard p,
  body:not([data-resource-page="admin"]) .articleCard p{
    color:#657188!important;
  }
  body:not([data-resource-page="admin"]) .kicker,
  body:not([data-resource-page="admin"]) .eyebrow:not(.hero .eyebrow),
  body:not([data-resource-page="admin"]) .programTag,
  body:not([data-resource-page="admin"]) .num{
    color:#966c0a!important;
  }
}

@media (prefers-color-scheme:light) and (max-width:620px){
  #home #goals,
  #home .programsSection,
  #home .lessonPremium,
  #home .teacherPremium,
  #home .approachPremium,
  #home .pathsPremium{
    border-top:1px solid rgba(118,132,153,.11);
  }
  body:not([data-resource-page="admin"]) .card,
  body:not([data-resource-page="admin"]) .programCard,
  body:not([data-resource-page="admin"]) .goalBtn:not(.active),
  body:not([data-resource-page="admin"]) .methodCard,
  body:not([data-resource-page="admin"]) .pathChoice{
    box-shadow:0 10px 28px rgba(18,38,68,.05)!important;
  }
}


/* Global mobile footer invariant — 2026-10-07 */
@media(max-width:900px){
  html,body{
    height:auto!important;
    min-height:0!important;
  }
  body{
    display:block!important;
  }
  body>main{
    height:auto!important;
    min-height:0!important;
  }
  footer.footer{
    position:relative!important;
    inset:auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin-bottom:0!important;
    flex:none!important;
  }
}
