/* Reference-led masthead: live typography and controls over original artwork. */
.header-frame { position: relative; padding: 7px; border: 1px solid #fff; border-radius: 42px; background: #fff; box-shadow: 0 6px 18px #289bc516; }
.app-shell .header-frame .header { margin: 0; border: 1px solid #fff; border-radius: 35px; background: linear-gradient(110deg, #fff, #fcfeff); box-shadow: 0 3px 10px #2795c00b, inset 0 1px 0 #fff; }
.header .create-top svg[fill] { fill: currentColor; stroke: none; }
.private-publication-badge { display: inline-flex; align-items: center; width: fit-content; margin: 4px 0; padding: 4px 8px; border: 1px solid #e4d7ff; border-radius: 14px; background: #f5efff; color: #7551be; font-size: 10px; font-weight: 850; }
@media screen and (min-width: 851px) {
    .app-shell .header { height: 90px; padding: 0 22px; border: 1px solid #fff; border-radius: 32px; background: #fffffff5; box-shadow: 0 10px 30px #238db50b; }
    .app-shell .header .brand .brand-logo { width: 200px; height: auto; }
    .app-shell .header .nav { gap: 3px; }
    .app-shell .header .nav a { padding: 12px 15px; gap: 9px; font-size: 16px; border-radius: 28px; color: #5a7693; }
    .app-shell .header .nav a.active { color: #008ddd; background: #e4f6ff; box-shadow: inset 0 0 0 1px #c8edff; }
    .app-shell .header .nav svg { width: 26px; height: 26px; }
    .app-shell .header .header-actions { gap: 12px; }
    .app-shell .header .header-actions .button { min-height: 50px; padding: 12px 22px; border-radius: 28px; font-size: 16px; }
    .app-shell .header .create-top { background: linear-gradient(120deg, #ec1680, #df1268); border-color: #d81065; box-shadow: inset 0 2px 0 #ffffff25, 0 2px 0 #ba1558; }
    .app-shell .header .header-search { display: grid; width: 44px; height: 44px; place-items: center; padding: 10px; }
    .app-shell .header .header-search svg { width: 25px; height: 25px; }
}
@media screen {
    .page-home .header { margin: 0; }
    .page-home .hero.school-hero { position: relative; min-height: 470px; height: auto; margin: 18px 0 0; border: 0; border-radius: 24px; background: #effaff url('../images/header-sky.svg') center / cover no-repeat; isolation: isolate; overflow: hidden; }
    .page-home .hero-character { width: 40%; height: 100%; left: -46px; right: auto; bottom: -4px; z-index: 1; }
    .page-home .hero-character img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 9px #806c4f0c); mask-image: linear-gradient(90deg, #000 0%, #000 91%, transparent 100%); }
    .page-home .hero-doodles { position: absolute; z-index: -1; inset: 0 -12px; background: url('../images/header-doodles.svg') center / 100% 100% no-repeat; pointer-events: none; }
    .page-home .school-hero .hero-copy { width: 54%; margin-left: 27%; padding: 44px 6px 50px; text-align: center; }
    .page-home .school-hero .eyebrow { display: inline-flex; align-items: center; justify-content: center; max-width: none; margin-bottom: 18px; padding: 7px 16px; border: 1px solid #c8edff; border-radius: 30px; background: #c9efff; color: #008ccc; font-size: 12px; line-height: 1.3; font-weight: 900; letter-spacing: -.1px; }
    .page-home .school-hero h1 { max-width: none; margin: 0 0 18px; color: #11385e; font-size: clamp(32px, 3.35vw, 48px); line-height: 1.08; letter-spacing: -1.4px; }
    .page-home .hero-word { color: #008feb; }
    .page-home .school-hero h1 em { position: relative; color: #f23887; white-space: nowrap; text-shadow: 0 2px 0 #fff; }
    .page-home .school-hero h1 em::after { content: ''; position: absolute; width: 34%; height: 5px; right: 2%; bottom: -8px; background: #ffda4d; border-radius: 100%; transform: rotate(-1deg); }
    .page-home .school-hero p { max-width: 550px; margin: 0 auto 22px; color: #557695; font-size: 18px; line-height: 1.5; }
    .page-home .hero-cta.button { position: relative; display: inline-flex; min-height: 62px; padding: 14px 26px; gap: 13px; border: 3px solid #fff; border-radius: 40px; background: linear-gradient(110deg, #ed147a, #fa4d99); color: #fff; box-shadow: inset 0 3px 0 #ffffff30, 0 4px 0 #f6a2c7, 0 9px 20px #da27732b; font-size: 19px; line-height: 1.3; }
    .page-home .hero-cta.button:hover { background: linear-gradient(110deg, #d81370, #f23887); transform: translateY(-2px); }
    .page-home .hero-cta::before,.page-home .hero-cta::after { content: ''; position: absolute; top: 50%; width: 28px; height: 54px; background: url('../images/cta-rays.svg') center / contain no-repeat; pointer-events: none; }
    .page-home .hero-cta::before { left: -42px; transform: translateY(-50%); }
    .page-home .hero-cta::after { right: -42px; transform: translateY(-50%) scaleX(-1); }
    .page-home .hero-cta svg { width: 25px; height: 25px; }
    .page-home .school-hero .hero-note { display: block; max-width: 270px; margin: 17px auto 0; color: #6385a0; font-size: 15px; font-style: italic; font-weight: 700; line-height: 1.4; }
    .page-home .hero-steps { display: grid; top: 90px; right: 0; width: 198px; gap: 20px; }
    .page-home .hero-step { min-height: 94px; padding: 16px 12px; gap: 10px; border: 3px solid #fff; border-radius: 23px; background: linear-gradient(130deg, #fff, #fff4fa); box-shadow: 0 5px 0 #e7bedc40, 0 10px 22px #55a7cb16; transform: rotate(6deg); }
    .page-home .hero-step:nth-child(2) { background: linear-gradient(130deg, #fff, #edfaff); transform: rotate(6deg); box-shadow: 0 5px 0 #a3dcef55, 0 10px 22px #55a7cb16; }
    .page-home .hero-step:nth-child(3) { background: linear-gradient(130deg, #fff, #eefbf5); transform: rotate(6deg); box-shadow: 0 5px 0 #a1dccc50, 0 10px 22px #55a7cb16; }
    .page-home .hero-step>img { width: 44px; height: 44px; flex-shrink: 0; transform: rotate(-6deg); }
    .page-home .hero-step strong { display: block; color: #e5217d; font-size: 20px; font-weight: 900; line-height: 1.3; }
    .page-home .hero-step small { display: block; margin-top: 4px; color: #6383a1; font-size: 13px; line-height: 1.4; }
    .page-home .hero-step:nth-child(2) strong { color: #008cdb; }
    .page-home .hero-step:nth-child(3) strong { color: #00a780; }
    .page-home .step-number { top: -13px; left: -12px; width: 31px; height: 31px; border: 3px solid #fff; background: linear-gradient(#ff5aa4, #df1677); font-size: 16px; box-shadow: 0 2px 4px #ca1b7420; }
    .page-home .hero-step:nth-child(2) .step-number { background: linear-gradient(#24d5f6, #00a5de); }
    .page-home .hero-step:nth-child(3) .step-number { background: linear-gradient(#20dca4, #00b480); }
    .page-home .workspace { display: block; margin-top: 0; }
    .page-home .catalog-discovery { position: relative; z-index: 3; margin: -5px 28px 0; }
    .page-home .search-box { height: 72px; padding: 7px 9px 7px 15px; gap: 15px; border: 2px solid #e0f6ff; border-radius: 50px; background: #fffffffa; box-shadow: 0 6px 0 #ffffff65, 0 10px 25px #249ed019; }
    .page-home .search-box>svg { width: 48px; height: 48px; padding: 11px; border: 1px solid #dff2ff; border-radius: 50%; background: #f7fcff; color: #0099e2; }
    .page-home .search-box input { font-size: 17px; }
    .page-home .search-box input::placeholder { color: #7d98b2; }
    .page-home .search-submit { width: 54px; height: 54px; border: 2px solid #fff; border-radius: 50%; background: #00ace9; }
    .page-home .catalog-heading { padding-top: 30px; }
}
@media screen and (min-width: 851px) {
    .app-shell .header { padding-inline: 16px; gap: 10px; }
    .app-shell .header .brand .brand-logo { width: 165px; }
    .app-shell .header .nav a { font-size: 14px; padding-inline: 10px; }
    .app-shell .header .header-actions .button { font-size: 14px; padding-inline: 15px; }
    .app-shell .header .header-actions { gap: 8px; }
    .app-shell .header .header-search { display: none; }
}
@media screen and (min-width: 761px) {
    .page-home .hero-character { width: 39%; left: -35px; bottom: 0; }
    .page-home .school-hero .hero-copy { width: 66%; margin-left: 34%; padding: 36px 4px 140px; }
    .page-home .school-hero h1 { font-size: 34px; }
    .page-home .school-hero p { font-size: 16px; }
    .page-home .hero-steps { display: flex; top: auto; bottom: 28px; left: 37%; right: 12px; width: auto; gap: 10px; }
    .page-home .hero-step { flex: 1; min-width: 0; min-height: 74px; padding: 12px 8px; gap: 5px; border-radius: 16px; }
    .page-home .hero-step>img { width: 28px; height: 28px; }
    .page-home .hero-step strong { font-size: 15px; }
    .page-home .hero-step small { font-size: 10px; }
    .page-home .step-number { width: 25px; height: 25px; font-size: 12px; }
}
@media screen and (max-width: 850px) {
    .page-home .header { height: 76px; padding: 0 14px; border: 1px solid #fff; border-radius: 25px; background: #fffffff5; box-shadow: 0 8px 24px #168fb214; }
}
@media screen and (max-width: 760px) {
    .page-home .header { height: calc(72px + env(safe-area-inset-top)); top: 8px; margin: 0; padding-top: env(safe-area-inset-top); gap: 8px; }
    .page-home .header .brand .brand-logo { width: 146px; }
    .page-home .header .header-actions { gap: 6px; }
    .page-home .header .header-actions .account { min-height: 44px; padding: 10px; border-radius: 22px; font-size: 12px; }
    .page-home .header .menu-button { width: 44px; height: 44px; padding: 9px; border: 0; border-radius: 14px; background: #f0faff; }
    .page-home .header .nav { left: 0; right: 0; }
    .page-home .hero.school-hero { min-height: 510px; margin: 16px 0 0; border-radius: 22px; overflow: hidden; }
    .page-home .school-hero .hero-copy { width: 100%; margin: 0; padding: 28px 0 222px; }
    .page-home .school-hero .eyebrow { max-width: 100%; margin-bottom: 16px; padding: 7px 11px; font-size: 9px; letter-spacing: 0; }
    .page-home .school-hero h1 { max-width: 100%; margin-bottom: 15px; font-size: 29px; line-height: 1.15; letter-spacing: -.8px; }
    .page-home .school-hero h1 em { white-space: normal; }
    .page-home .school-hero h1 em::after { height: 3px; bottom: -5px; width: 45%; }
    .page-home .school-hero p { max-width: 310px; margin: 0 auto 18px; font-size: 14px; line-height: 1.6; }
    .page-home .hero-cta.button { min-height: 52px; padding: 12px 23px; gap: 10px; font-size: 16px; }
    .page-home .hero-cta svg { width: 21px; height: 21px; }
    .page-home .hero-cta::before { left: -28px; width: 18px; }
    .page-home .hero-cta::after { right: -28px; width: 18px; }
    .page-home .school-hero .hero-note { max-width: 270px; margin-top: 14px; font-size: 12px; line-height: 1.5; }
    .page-home .hero-character { width: 235px; height: 235px; aspect-ratio: 1; left: -28px; right: auto; bottom: 0; }
    .page-home .hero-doodles { inset: 0 -14px; background-size: auto 100%; background-position: 62% center; opacity: .7; }
    .page-home .hero-steps { display: grid; top: auto; right: 5px; bottom: 28px; left: auto; width: 136px; gap: 12px; }
    .page-home .hero-step { min-height: 56px; padding: 8px 7px; gap: 5px; border-width: 2px; border-radius: 15px; }
    .page-home .hero-step>img { width: 29px; height: 29px; }
    .page-home .hero-step strong { font-size: 14px; }
    .page-home .hero-step small { margin-top: 2px; font-size: 10px; }
    .page-home .step-number { top: -8px; left: -9px; width: 23px; height: 23px; border-width: 2px; font-size: 11px; }
    .page-home .workspace { margin-top: 0; }
    .page-home .catalog-discovery { margin: -3px 0 0; }
    .page-home .search-box { height: 62px; padding: 6px; gap: 8px; }
    .page-home .search-box>svg { width: 36px; height: 36px; padding: 7px; }
    .page-home .search-box input { font-size: 16px; }
    .page-home .search-box input::placeholder { font-size: 13px; }
    .page-home .search-submit { width: 46px; height: 46px; }
    .page-home .mobile-discovery { margin-inline: -16px; padding-inline: 16px; }
    .page-home .catalog-heading { padding-top: 20px; }
}
@media screen and (max-width: 359px) {
    .page-home .header { padding-inline: 10px; gap: 5px; }
    .page-home .header .brand .brand-logo { width: 123px; }
    .page-home .header .header-actions .account { padding-inline: 8px; font-size: 11px; }
    .page-home .school-hero h1 { font-size: 27px; }
    .page-home .hero-character { width: 200px; height: 200px; left: -28px; }
    .page-home .hero-steps { width: 122px; right: 2px; bottom: 16px; }
    .page-home .hero-step strong { font-size: 13px; }
    .page-home .hero-step small { font-size: 9px; }
}
@media screen and (min-width: 600px) and (max-width: 760px) {
    .page-home .hero-character { width: 300px; height: 300px; left: 8px; }
    .page-home .hero-steps { width: 190px; right: 24px; bottom: 32px; gap: 17px; }
    .page-home .hero-step { min-height: 73px; padding: 12px; }
    .page-home .hero-step>img { width: 38px; height: 38px; }
    .page-home .hero-step strong { font-size: 18px; }
    .page-home .hero-step small { font-size: 12px; }
    .page-home .school-hero .hero-copy { padding-bottom: 300px; }
}
@media screen and (min-width: 1101px) {
    .app-shell .header-frame .header-search { display: grid; }
}
@media screen and (max-width: 760px) {
    .header-frame { position: sticky; top: 8px; z-index: 40; margin: 0 -8px; padding: 6px; border-radius: 31px; }
    .app-shell .header-frame .header { position: relative; top: auto; margin: 0; padding-inline: 10px; border-radius: 25px; }
}
@media print { .header-frame { display: none; } }
/* Navigation floats independently above the rounded content panel on every page. */
@media screen {
    .app-shell.header-detached { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
    .header-detached>.header-frame { margin: 0; }
    .header-detached>.content-frame { margin-top: 12px; padding: 22px 22px 0; border: 1px solid #fff; border-radius: 28px; background: #fffffff5; box-shadow: 0 18px 50px #345f8c33; }
    .page-home .content-frame .hero.school-hero { margin-top: 0; }
}
@media screen and (max-width: 760px) {
    .header-detached>.header-frame { margin: 8px 8px 0; }
    .header-detached>.content-frame { margin-top: 12px; padding: 16px 16px 0; border-radius: 24px 24px 0 0; box-shadow: none; }
}
@media print { .header-detached>.content-frame { margin: 0; padding: 0; border: 0; box-shadow: none; } }

/* Header symmetry: logo | navigation exactly centred | actions. Equal outer columns keep the menu on the page's centre line.
   Signed-in users show their initial instead of their name, so the actions never outgrow the logo side. */
.account-initial { display: none; }
@media screen and (min-width: 1024px) {
    .app-shell .header { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; column-gap: 12px; }
    .app-shell .header .brand { grid-column: 1; order: 0; justify-self: start; }
    .app-shell .header .brand .brand-logo { width: 190px; }
    .app-shell .header .nav { grid-column: 2; order: 0; flex-basis: auto; justify-self: center; margin: 0; gap: 2px; }
    .app-shell .header .nav a { padding: 11px 12px; gap: 7px; font-size: 15px; }
    .app-shell .header .nav svg { width: 23px; height: 23px; }
    .app-shell .header .header-actions { grid-column: 3; order: 0; justify-self: end; margin-left: 0; gap: 8px; }
    .app-shell .header .header-actions .button { min-height: 46px; padding: 10px 16px; font-size: 15px; }
    .app-shell .header .header-search { width: 40px; height: 40px; padding: 8px; }
    .app-shell .header .account:has(.account-initial) { width: 46px; min-width: 46px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
    .app-shell .header .account .account-initial { display: grid; place-items: center; width: 100%; height: 100%; font-size: 17px; font-weight: 800; }
    .app-shell .header .account .account-name { display: none; }
}
