/* Homepage layout: existing destinations and interactive hooks are preserved. */
:root { --muted: #b9c5d8; --faint: #a5b3c8; }
body { margin: 0; background: #0b1220; }
.home { --text: #edf2fa; }
.toolbar { height: 76px; box-shadow: none; background: #101d35; }
.toolbar .logo { width: 54px; height: 54px; object-fit: contain; }
.home-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 32px; padding: 14px 20px; border-bottom: 1px solid #ffffff12; background: #101a2c; }
.home-nav a { color: #ced8e8; text-decoration: none; font-size: 15px; padding: 7px 4px; }
.home-nav a:hover { color: #ffd166; }
a:focus-visible, summary:focus-visible { outline: 2px solid #ffd166; outline-offset: 5px; }
.home .topAuthBar { max-width: 1060px; margin: 0 auto; padding: 12px 20px; border: 0; justify-content: flex-start; }
.hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 26px 20px 0; margin-bottom: 24px; }
.hero__content { padding: 12px 0 20px; background: none; border: 0; box-shadow: none; max-width: 820px; }
.hero .badge { border: 0; background: none; padding: 0; color: #ffd166; font-size: 14px; margin-bottom: 18px; }
.hero__title { font-size: clamp(30px, 4vw, 48px); line-height: 1.4; letter-spacing: -.7px; margin-bottom: 16px; color: #f4f6fb; }
.hero__subtitle { font-size: 17px; line-height: 1.9; max-width: 650px; color: #b9c5d8; }
.hero__actions a { text-decoration: none; }
.hero__actions { gap: 12px; margin-top: 24px; }
.hero .hero-btn--academy { background: #ffd166; color: #15213a !important; border: 1px solid #ffd166; box-shadow: none; padding: 13px 20px; }
.hero .hero-btn { background: transparent; color: #cbd5e5; border-color: #ffffff24; padding: 13px 18px; box-shadow: none; }
.hero__panel { display: block; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.routes-title { font-size: 19px; margin: 0 0 16px; color: #edf2fa; }
.hero .panel__card--routes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0; background: none; border: 0; box-shadow: none; }
.hero .hero-mini-link { min-height: 120px; padding: 18px 14px; background: #131f33; border: 1px solid #ffffff15; box-shadow: none; border-radius: 12px; justify-content: flex-start; gap: 12px; }
.hero .hero-mini-link strong { color: #f3d68e; font-size: 15px; }
.hero .hero-mini-link span { color: #b9c5d8; font-size: 13px; line-height: 1.6; }
.hero .hero-mini-link:hover { border-color: #ffd16688; background: #192940; transform: translateY(-3px); }
.hero .hero-mini-link--music { order: 5; }
.hero .hero-mini-link--music .music-orbit { display: none; }
.hero .hero-mini-link::before, .hero .hero-mini-link::after,
.hero .hero-btn--academy::before, .hero .hero-btn--academy::after { display: none; }
.stats-bar { margin: 0 auto 40px; padding: 10px 20px; gap: 12px 28px; }
.stats-bar .stat-pill { border: 0; background: none; box-shadow: none; padding: 4px 0; color: #aebdd2; font-size: 13px; }
.home-highlights { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 48px; }
.home-picks { grid-row: 1; min-width: 0; }
.home-picks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-picks .slider-source-card { display: flex; flex-direction: column; height: auto; min-width: 0; background: #131f33; border: 1px solid #ffffff15; border-radius: 14px; overflow: hidden; animation: none; }
.home-picks .card-visual { height: 140px; min-height: 140px; overflow: hidden; }
.home-picks .card-content { padding: 20px; }
.home-picks .card-content h3 { color: #f1f5fa; font-size: 20px; }
.home-picks .card-content p { color: #b9c5d8; line-height: 1.8; }
.home-picks .feature-action { color: #ffd166; }
.home-more { margin-top: 18px; border-top: 1px solid #ffffff18; }
.home-more summary { cursor: pointer; padding: 18px 4px; color: #e9cb85; font-weight: 700; }
.latest-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px; background: transparent; box-shadow: none; border-color: #ffffff15; }
.latest-box h2 { border: 0; font-size: 14px; padding: 6px 10px; color: #b9c5d8; }
.latest-box .latest-item { border: 0; padding: 9px 12px; border-radius: 8px; background: #142137; }
.latest-box .latest-item:hover { padding: 9px 12px; background: #1d304c; }
.latest-box .latest-item small { display: none; }
.section { margin-bottom: 44px; scroll-margin-top: 96px; }
.section__head { margin-bottom: 20px; }
.section__title { color: #eef3fb; font-size: 24px; }
.section__desc, .card__text, .card__hint, .update__text { color: #b9c5d8; }
.home .card { background: #131f33; box-shadow: none; border-color: #ffffff15; }
.home .card__title { color: #f0d18a; }
.featured__box { background: #132039; box-shadow: none; border-color: #ffffff18; }
.featured .courseAd { box-shadow: none; background: transparent; }
.featured .courseAd .flame, .featured .courseAd .flame-mini { display: none; }
.featured .courseAd * { animation: none; }
.ntf-ai__toggle::before { display: none; }
.home .card-visual *, .hero-mini-link *, .hero-mini-link { animation: none !important; }
@media (max-width: 850px) {
  .hero .panel__card--routes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-picks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .toolbar { height: 68px; padding: 0 16px; }
  .home-nav { gap: 4px 18px; padding: 8px 12px; }
  .home-nav a { font-size: 13px; }
  .hero { padding: 16px 18px 0; gap: 24px; }
  .hero__subtitle { font-size: 15px; }
  .hero__actions a { text-decoration: none; }
.hero__actions { gap: 8px; }
  .hero .hero-btn, .hero .hero-btn--academy { padding: 12px; font-size: 13px; }
  .hero .panel__card--routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .hero-mini-link { min-height: 112px; }
  .hero .hero-mini-link--music { grid-column: 1 / -1; min-height: 80px; }
  .home-picks-grid { grid-template-columns: minmax(0, 1fr); }
  .home-picks .card-visual { height: 120px; min-height: 120px; }
  .stats-bar { margin-bottom: 24px; }
  .home-highlights { padding: 0 18px; }
  .section__title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* App destinations and the signed-in account shortcut. */
#home-sections { scroll-margin-top: 100px; }
.hero .panel__card--routes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ntf-apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ntf-app { --app-accent: #aeb8ff; display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid #ffffff1c; border-radius: 16px; background: #131f33; text-decoration: none; transition: border-color .2s, transform .2s; }
.ntf-app--store { --app-accent: #f0cf85; }
.ntf-app--music { --app-accent: #85d4d3; }
.ntf-app:hover { border-color: var(--app-accent); transform: translateY(-3px); }
.ntf-app__icon { color: var(--app-accent); font-size: 28px; }
.ntf-app h3 { color: #f1f5fa; margin: 0; font-size: 22px; }
.ntf-app p { color: #b9c5d8; margin: 0 0 12px; line-height: 1.8; }
.ntf-app__action { color: var(--app-accent); font-weight: 700; margin-top: auto; }
.home .auth-identity { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.home .auth-identity .userHello { min-width: 0; }
.home .auth-identity .profile-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home .account-role-link { display: inline; flex-shrink: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #ffd166; text-decoration: none; font-family: inherit; font-size: 0.78rem; line-height: 1; font-weight: 700; white-space: nowrap; }
.home .account-role-link[hidden] { display: none; }
@media(max-width:600px) {
  .hero .panel__card--routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ntf-apps-grid { grid-template-columns: 1fr; }
  .home .authRight { flex-wrap: wrap; }
  .home .account-role-link { width: auto; }
}

/* Gold headings and four peer applications. */
.home h1, .home h2, .home h3, .home .hero-mini-link strong { color: #ffd166; }
.hero .panel__card--routes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ntf-apps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ntf-app--academy { --app-accent: #c9b0f5; }
@media(max-width:900px) { .ntf-apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width:600px) {
  .ntf-apps-grid { grid-template-columns: 1fr; }
  .hero .panel__card--routes { grid-template-columns: 1fr; }
}
main.home h1, main.home h2, main.home h3,
.home .home-picks .card-content h3 { color: #ffd166; }
.home .card__title { color: #ffd166; }

.home .account-role-link:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Firestore-backed editorial cards. */
.cms-home-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px; }
.cms-home-card { display:flex;flex-direction:column;background:#142137;border:1px solid #ffffff1c;border-radius:14px;overflow:hidden;text-decoration:none; }
.cms-home-card img { width:100%;height:180px;object-fit:cover; }
.cms-home-card>div { padding:20px; }
.cms-home-card h3 { margin:8px 0; }
.cms-home-card p,.cms-home-card small { color:#b9c5d8;overflow-wrap:anywhere; }
.cms-home-card span { color:#ffd166; }
@media(max-width:850px){.cms-home-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.cms-home-grid{grid-template-columns:1fr;}}
