/* Storefront layer: extend the existing Newborn palette and service pages. */
.nb-shop [hidden], #nb-product-dialog [hidden] { display: none !important; }
.nb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nb-shop a, .nb-shop button { -webkit-tap-highlight-color: transparent; }
.nb-shop p { word-break: keep-all; }
.nb-nav { height: 76px; background: rgba(255,255,255,.94); border-bottom: 1px solid #e9edf2; backdrop-filter: blur(18px); }
.nb-nav .nav-logo { color: #172333; text-decoration: none; font-size: 1rem; font-weight: 850; letter-spacing: -.04em; }
.nb-logo-dot { display: inline-block; width: 9px; height: 9px; margin-left: 3px; border-radius: 50%; background: #0071e3; }
.nb-nav .nav-links a { color: #465266; font-size: .875rem; padding: 12px 14px; }
.nb-nav .nav-links a:hover { color: #0071e3; background: #edf5ff; }
.nb-nav .nav-links .nav-cta { color: #172333 !important; background: #f0f3f7 !important; }
.nb-menu-toggle { display: none; border: 1px solid #dce2e9; border-radius: 12px; background: #fff; color: #243143; min-height: 44px; padding: 8px 13px; font-weight: 650; font-size: .875rem; }
.nb-shop#hero { min-height: 0; padding-top: 146px !important; padding-bottom: 62px !important; display: grid; grid-template-columns: 1.04fr 1fr; gap: clamp(24px,4vw,62px); text-align: left; align-items: center; background: #fff; overflow: visible; }
.nb-hero-copy { min-width: 0; }
.nb-eyebrow { margin-bottom: 20px; color: #0071e3; font-size: .875rem; font-weight: 800; letter-spacing: .04em; }
.nb-shop#hero .hero-title { font-size: clamp(2.35rem,4.35vw,4rem); line-height: 1.18; letter-spacing: -.055em; margin-bottom: 22px; }
.nb-shop#hero .hero-title > span, .nb-shop#hero .hero-title em { white-space: normal; word-break: keep-all; }
.nb-hero-description { max-width: 430px; font-size: 1.0625rem; color: #627086; line-height: 1.8; margin-bottom: 26px; }
.nb-hero-links { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.nb-hero-links a { color: #0071e3; text-decoration: none; font-size: .9375rem; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.nb-hero-links span { color: #d4dce6; }
.nb-audience { min-width: 0; padding: 27px; border: 1px solid #e1e9f3; background: #f6f9fd; border-radius: 26px; scroll-margin-top: 100px; }
.nb-audience-label { color: #0071e3; font-size: .8125rem; font-weight: 800; letter-spacing: .05em; }
.nb-audience h2 { font-size: 1.55rem; line-height: 1.45; letter-spacing: -.04em; margin: 7px 0 20px; }
.nb-grade-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.nb-grade-button { min-width: 0; min-height: 116px; padding: 14px 8px; border: 1px solid #dfe7f0; border-radius: 14px; background: #fff; color: #283548; cursor: pointer; transition: border-color .16s, background .16s, color .16s; }
.nb-grade-button strong { display: block; font-size: 1rem; line-height: 1.4; font-weight: 750; letter-spacing: -.03em; }
.nb-grade-button small { display: block; font-size: .875rem; color: #66738a; margin-top: 5px; white-space: normal; line-height: 1.4; }
.nb-grade-button:hover { border-color: #0071e3; background: #edf5ff; }
.nb-grade-button[aria-pressed="true"] { color: #fff; border-color: #0071e3; background: #0071e3; }
.nb-grade-button[aria-pressed="true"] small { color: #fff; }
.nb-age-note { font-size: .8125rem; line-height: 1.65; color: #617087; margin-top: 16px; }
.nb-all-grades { border: 0; border-bottom: 1px solid #afbfd2; background: transparent; color: #465d78; font-size: .875rem; font-weight: 650; cursor: pointer; padding: 7px 0 3px; margin-top: 6px; }
.nb-catalog { padding: 52px var(--page-gutter) 76px; background: #f5f7fa; scroll-margin-top: 76px; }
.nb-catalog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.nb-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.nb-selection strong { font-size: .9375rem; color: #0071e3; }
.nb-selection a { font-size: .875rem; color: #67758a; text-underline-offset: 4px; }
.nb-catalog-top > span { color: #68778a; font-size: .875rem; }
.nb-catalog h2 { color: #1d2a3b; font-size: clamp(1.5rem,2.65vw,2.3rem); letter-spacing: -.045em; line-height: 1.35; }
.nb-catalog-intro { color: #627087; font-size: 1rem; line-height: 1.7; margin-top: 12px; }
.nb-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; margin-bottom: 28px; }
.nb-filter { border: 1px solid #dce3eb; padding: 11px 18px; min-height: 46px; border-radius: 999px; font-size: .9375rem; color: #516079; background: #fff; cursor: pointer; font-weight: 650; }
.nb-filter[aria-pressed="true"] { color: #fff; background: #172333; border-color: #172333; }
.nb-filter-count { margin-left: 8px; font-size: .8125rem; opacity: .75; font-variant-numeric: tabular-nums; }
.nb-catalog-filters { margin: 22px 0 20px; scroll-margin-top: 82px; }
.nb-filter-group { display: flex; align-items: flex-start; gap: 12px; }
.nb-filter-label { flex: 0 0 2rem; line-height: 46px; color: #64738a; font-size: .875rem; font-weight: 650; }
.nb-catalog-filters .nb-filter-row { min-width: 0; margin: 0 0 8px; padding-top: 0; padding-bottom: 4px; }
.nb-grade-filters .nb-filter[aria-pressed="true"] { background: #0071e3; border-color: #0071e3; }
.nb-free-filter { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; margin-left: 44px; color: #50627a; font-size: .875rem; cursor: pointer; }
.nb-free-filter input { width: 18px; height: 18px; accent-color: #0071e3; }
.nb-product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; }
.nb-load-more { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 20px; padding: 12px 18px; border: 1px solid #d5deea; border-radius: 12px; background: #fff; color: #263b55; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.nb-load-more:focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; }
.nb-product-card { min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #e4e9f0; border-radius: 21px; overflow: hidden; }
.nb-card-visual { width: 100%; border: 0; position: relative; background: #eaf0f7; height: 315px; display: flex; align-items: center; justify-content: center; padding: 48px 36px 24px; overflow: hidden; cursor: pointer; }
.nb-card-visual img { max-width: 100%; width: auto; height: 100%; object-fit: contain; transition: transform .2s; filter: drop-shadow(0 10px 9px rgba(15,35,63,.15)); }
.nb-card-visual:hover img { transform: translateY(-4px); }
.nb-product-badge { position: absolute; left: 18px; top: 18px; color: #0761bc; background: #fff; border: 1px solid #d8e7f8; font-size: .8125rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; z-index: 1; }
.nb-card-visual-half { background: #0071e3; color: #fff; }
.nb-badge-pending { border-color: rgba(255,255,255,.3); color: #fff; background: rgba(255,255,255,.13); }
.nb-half-title { text-align: left; width: 100%; max-width: 300px; color: #fff; }
.nb-half-title > span { display: block; font-family: Inter,sans-serif; font-size: .8125rem; font-weight: 650; letter-spacing: .04em; }
.nb-half-title > strong { display: block; font-family: Inter,sans-serif; font-weight: 900; font-size: clamp(3.5rem,6.5vw,5.7rem); line-height: 1.2; letter-spacing: -.065em; margin: 14px 0; }
.nb-card-copy { padding: 23px; display: flex; flex: 1; flex-direction: column; }
.nb-card-kicker { color: #0071e3; font-size: .75rem; font-weight: 750; letter-spacing: .04em; margin-bottom: 9px; }
.nb-card-copy h3 { font-size: 1.25rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.45; color: #172333; }
.nb-card-description { color: #69778b; font-size: .9375rem; line-height: 1.6; margin-top: 10px; margin-bottom: 23px; }
.nb-card-bottom { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px; border-top: 1px solid #edf0f4; padding-top: 15px; }
.nb-card-bottom > span { color: #68778a; font-size: .8125rem; }
.nb-text-button { border: 0; padding: 6px 0; color: #0071e3; background: transparent; font-size: .9375rem; font-weight: 700; cursor: pointer; min-height: 44px; }
.nb-empty { padding: 64px 25px; text-align: center; border: 1px solid #e1e8f0; border-radius: 21px; background: #fff; }
.nb-empty h3 { font-size: 1.3rem; line-height: 1.5; }
.nb-empty p { color: #66758a; font-size: 1rem; margin: 12px auto 22px; max-width: 490px; line-height: 1.7; }
.nb-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 12px; background: #0071e3; color: #fff; text-decoration: none; font-weight: 700; font-size: .9375rem; padding: 14px 20px; min-height: 48px; cursor: pointer; }
.nb-secondary { background: #edf3fa; color: #31516f; }
.nb-info { margin: 30px 0 0; color: #69778a; font-size: .875rem; line-height: 1.7; }
.nb-shop-faq { padding: 66px var(--page-gutter); background: #fff; }
.nb-shop-faq h2 { font-size: clamp(1.6rem,2.5vw,2rem); letter-spacing: -.04em; margin-bottom: 26px; }
.nb-shop-faq details { border-bottom: 1px solid #e5eaf0; }
.nb-shop-faq summary { padding: 22px 0; cursor: pointer; font-size: 1rem; font-weight: 650; color: #263447; }
.nb-shop-faq details p { font-size: 1rem; line-height: 1.85; color: #617087; padding: 0 0 25px; max-width: 860px; }
.nb-service-links { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 32px; }
.nb-service-links a { font-size: .9375rem; font-weight: 650; color: #53647b; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nb-product-dialog { width: min(880px,calc(100vw - 36px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; color: #172333; background: #fff; border: 0; border-radius: 24px; overflow: auto; overscroll-behavior: contain; }
.nb-product-dialog::backdrop { background: rgba(13,27,48,.55); backdrop-filter: blur(5px); }
.nb-detail-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 1px solid #e2e7ef; border-radius: 50%; background: #fff; color: #25364b; font-size: 1.5rem; cursor: pointer; z-index: 2; }
.nb-detail-layout { display: grid; grid-template-columns: .85fr 1fr; }
.nb-detail-image { padding: 50px 28px; display: flex; align-items: center; justify-content: center; background: #edf2f8; }
.nb-detail-image img { width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.nb-detail-half { background: #0071e3; }
.nb-detail-image.nb-detail-weekly-set { padding: 40px 20px; max-height: none; background: #edf4f9; }
.nb-weekly-cover-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.nb-detail-weekly-set .nb-weekly-cover-grid img { display: block; width: 100%; height: auto; max-height: none; filter: drop-shadow(0 5px 5px rgba(15,35,63,.14)); }
.nb-card-visual:has(.nb-badge-pending):not(.nb-card-visual-half):not(.nb-card-visual-mockup) .nb-badge-pending { color: #31516f; background: #fff; border-color: #d8e7f8; }
.nb-detail-copy { padding: 68px 32px 36px; }
.nb-detail-copy h2 { font-size: 1.8rem; line-height: 1.45; letter-spacing: -.04em; }
.nb-detail-copy > p:not(.nb-card-kicker) { color: #65758a; font-size: .9375rem; line-height: 1.8; margin-top: 15px; }
.nb-detail-copy dl { margin: 25px 0; border-top: 1px solid #e8edf3; }
.nb-detail-copy dl > div { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid #e8edf3; font-size: .9375rem; line-height: 1.6; }
.nb-detail-copy dt { color: #6b798c; }
.nb-detail-copy dd { margin: 0; color: #283a52; }
.nb-detail-copy .nb-button { width: 100%; }
.nb-pending-label { display: block; padding: 14px; text-align: center; background: #eff2f6; color: #65758a; border-radius: 12px; font-size: .9375rem; font-weight: 650; }
@media (max-width: 1000px) {
  .nb-shop#hero { grid-template-columns: 1fr; padding-top: 114px !important; gap: 30px; }
  .nb-shop#hero .hero-title { font-size: clamp(2.25rem,6.5vw,3.8rem); }
  .nb-shop#hero .hero-title > span, .nb-shop#hero .hero-title em { display: inline; }
  .nb-hero-description { max-width: 620px; margin-bottom: 12px; }
  .nb-grade-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .nb-grade-button { min-height: 80px; }
  .nb-grade-button strong { font-size: .9375rem; }
  .nb-product-grid { gap: 17px; }
  .nb-card-visual { height: 270px; padding: 53px 22px 23px; }
  .nb-card-copy { padding: 19px; }
  .nb-nav .nav-links a { padding: 10px; }
}
@media (max-width: 768px) {
  .nb-nav { height: 66px; padding: 0 20px; }
  .nb-nav .nav-logo { font-size: .9375rem; }
  .nb-menu-toggle { display: block; }
  .nb-nav .nav-links { display: none; }
  .nb-nav .nav-links.nb-menu-open { display: flex; position: absolute; top: 66px; left: 0; right: 0; padding: 16px 20px; background: #fff; border-bottom: 1px solid #dfe6ef; flex-wrap: wrap; gap: 8px; box-shadow: 0 15px 20px rgba(20,40,60,.05); }
  .nb-nav .nav-links li { display: block; }
  .nb-nav .nav-links a { display: block; min-height: 44px; font-size: .9375rem; }
  #mobileStudentBtn { display: none !important; }
  .nb-shop#hero { padding: 92px 20px 26px !important; gap: 20px; }
  .nb-shop#hero .hero-title { font-size: clamp(2.15rem,7.6vw,3.1rem); line-height: 1.23; margin-bottom: 15px; letter-spacing: -.055em; }
  .nb-shop#hero .hero-title > span, .nb-shop#hero .hero-title em { display: block; }
  .nb-eyebrow { margin-bottom: 14px; font-size: .8125rem; }
  .nb-hero-description { font-size: 1rem; line-height: 1.7; }
  .nb-hero-links { gap: 12px; }
  .nb-hero-links a { font-size: .875rem; }
  .nb-audience { padding: 16px; border-radius: 18px; }
  .nb-audience h2 { font-size: 1.3rem; margin-bottom: 15px; }
  .nb-grade-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .nb-grade-button { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 5px; padding: 10px 5px; min-height: 106px; border-radius: 11px; text-align: center; }
  .nb-grade-button strong { font-size: 1rem; overflow-wrap: anywhere; }
  .nb-grade-button small { font-size: .875rem; letter-spacing: -.03em; }
  .nb-age-note { font-size: .8125rem; }
  .nb-catalog { padding: 26px 16px 36px; scroll-margin-top: 66px; }
  .nb-catalog h2 { font-size: 1.55rem; }
  .nb-catalog-top { margin-bottom: 14px; }
  .nb-filter-row { flex-wrap: nowrap; overflow-x: auto; padding: 3px 1px 10px; margin-top: 18px; margin-bottom: 14px; gap: 7px; }
  .nb-filter { flex-shrink: 0; padding: 10px 14px; font-size: .875rem; }
  .nb-filter-count { margin-left: 5px; }
  .nb-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .nb-product-card { border-radius: 14px; }
  .nb-card-visual { height: auto; aspect-ratio: 1; flex-shrink: 0; padding: 32px 14px 14px; }
  .nb-card-copy { padding: 12px 11px 6px; }
  .nb-card-copy h3 { font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
  .nb-card-copy > .nb-card-kicker, .nb-card-description, .nb-card-bottom > span { display: none; }
  .nb-card-bottom { border-top: 0; padding-top: 3px; flex-direction: row; align-items: center; }
  .nb-card-bottom .nb-text-button { font-size: .875rem; }
  .nb-product-badge { left: 8px; top: 8px; max-width: calc(100% - 16px); font-size: .75rem; padding: 4px 7px; }
  .nb-half-title > strong { font-size: 3.2rem; }
  .nb-half-title > span { font-size: .75rem; letter-spacing: -.02em; }
  .nb-shop-faq { padding: 42px 20px; }
  .nb-detail-layout { grid-template-columns: 1fr; }
  .nb-detail-image { padding: 30px; max-height: 270px; }
  .nb-detail-image img { height: 220px; width: auto; max-width: 100%; }
  .nb-detail-half { min-height: 230px; }
  .nb-detail-copy { padding: 27px 24px 30px; }
  .nb-detail-copy h2 { font-size: 1.55rem; }
}
@media (max-width: 420px) {
  .nb-audience { padding: 14px 12px; }
  .nb-audience h2 { font-size: 1.125rem; }
  .nb-catalog h2 { font-size: 1.375rem; }
  .nb-product-grid { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-shop *, .nb-product-dialog * { transition: none !important; scroll-behavior: auto !important; }
}

.nb-service-faq { padding: 64px var(--page-gutter); }
.nb-nav .nav-logo .nb-logo-dot { display: inline-block; margin: 0 0 0 4px; }
#catalog > #products, #catalog > #samples, #catalog > #difference { display: block; height: 0; min-height: 0; margin: 0; padding: 0 !important; overflow: hidden; }

/* Preserve the square product composition in cards and the product dialog. */
.nb-card-visual.nb-card-visual-mockup { padding: 0; background: #f0ebee; }
.nb-card-visual-mockup .nb-badge-pending { color: #405975; background: rgba(255,255,255,.95); border-color: #d8e2ee; }
.nb-card-visual-mockup img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.nb-card-visual-mockup:hover img { transform: none; }
.nb-detail-image.nb-detail-mockup { padding: 0; background: #f0ebee; }
.nb-detail-image.nb-detail-mockup img { width: 100%; height: auto; max-height: none; object-fit: contain; }
@media (max-width: 700px) {
 .nb-detail-image.nb-detail-mockup { max-height: none; }
 .nb-detail-image.nb-detail-mockup img { height: auto; width: 100%; }
}

.nb-product-card[data-product-id="weekly-high3-math"] .nb-card-visual-mockup { background: #edf3f9; }
.nb-product-card[data-product-id="weekly-high3-math"] .nb-badge-pending { color: #31516f; background: #fff; border-color: #d8e7f8; }
