:root {
  color-scheme: light;
  --navy: #0f2554;
  --blue: #1a4a99;
  --orange: #e07635;
  --ink: #1a1f36;
  --muted: #56647d;
  --line: rgba(26, 74, 153, .16);
  --pale: #f3f7fa;
  --font: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 400 1rem/1.65 var(--font); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; }
.wrap { width: min(960px, calc(100% - 48px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.header-inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-size: 1.05rem; font-weight: 800; line-height: 1.15; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .13em; }
.header-link, .back-link { color: var(--blue); font-weight: 800; }
.header-link:hover, .back-link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

main { padding-bottom: 72px; }
.page-intro { padding-top: clamp(36px, 7vw, 72px); padding-bottom: 24px; }
.back-link { display: inline-flex; margin-bottom: 22px; }
.product-detail { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 28px rgba(15, 37, 84, .06); }
.product-detail--unavailable { border-color: #d7dce2; background: #f0f2f4; box-shadow: 0 10px 28px rgba(15, 37, 84, .035); }
.product-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.product-head h1 { margin-bottom: 10px; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.04em; }
.product-head p { max-width: 680px; margin-bottom: 0; color: var(--muted); }
.product-detail--unavailable .product-head h1 { color: #3e4856; }
.product-detail--unavailable .product-head p { color: #485361; }
.product-price { flex: 0 0 auto; color: var(--blue); font-size: 1.2rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.product-price small { display: block; color: var(--muted); font-size: .84rem; font-weight: 600; }
.product-detail--unavailable .product-price { color: #3e4856; }
.product-detail--unavailable .product-price small { color: #56616f; }
.status { display: inline-flex; margin-top: 14px; padding: 5px 12px; border-radius: 999px; color: #3e4856; background: #e2e6eb; font-size: .82rem; font-weight: 800; }
.detail-block + .detail-block { margin-top: 28px; }
.detail-block h2 { margin-bottom: 12px; font-size: 1.2rem; }
.detail-block h3 { margin-bottom: 8px; font-size: 1.05rem; }
.program-list, .feature-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.program-list { margin: 0; padding: 0; list-style: none; }
.program-list li { padding: 12px 14px; border-radius: 10px; color: var(--navy); background: var(--pale); font-weight: 750; line-height: 1.4; }
.program-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.program-gallery--two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.program-gallery__item { min-width: 0; margin: 0; }
.program-gallery__image { display: flex; height: 220px; align-items: center; justify-content: center; padding: 12px; }
.program-gallery__image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.program-gallery__item figcaption { min-height: 58px; padding: 12px 0; color: var(--navy); font-size: .92rem; font-weight: 800; line-height: 1.4; }
.program-gallery__item figcaption strong { display: block; margin-top: 4px; color: var(--blue); }
.program-gallery--books .program-gallery__item figcaption { text-align: center; }
.katbook-slideshow { width: min(100%, 680px); margin-inline: auto; }
.katbook-slideshow__frame { height: clamp(200px, 35vw, 360px); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--pale); }
.katbook-slideshow__image { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 1; transition: opacity .2s ease; }
.katbook-slideshow__image.is-transitioning { opacity: 0; }
.katbook-slideshow__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.katbook-slideshow__controls button { min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.katbook-slideshow__controls button:hover { border-color: var(--blue); background: var(--pale); }
.katbook-slideshow__count { min-width: 90px; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; text-align: center; }
.feature-columns ul, .simple-list { margin: 0; padding-left: 21px; color: var(--muted); }
.feature-columns li + li, .simple-list li + li { margin-top: 6px; }
.offer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 760px; }
.offer { padding-top: 14px; border-top: 2px solid var(--blue); }
.offer h2 { margin-bottom: 8px; font-size: 1.08rem; }
.offer .product-price { text-align: left; }
.included-labs { margin-top: 24px; padding: 17px 20px; border-radius: 12px; color: var(--navy); background: #ffcc00; }
.included-labs strong { display: block; margin-bottom: 5px; }
.included-labs p { margin: 0; }
.book-list { max-width: 820px; margin: 0; padding: 0; list-style: none; }
.book-list li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.book-list strong { flex: 0 0 auto; color: var(--navy); font-variant-numeric: tabular-nums; }
.purchase-note { margin: 28px 0 0; color: var(--muted); font-size: .92rem; font-weight: 700; }
.purchase-button { display: inline-flex; min-width: 220px; min-height: 50px; align-items: center; justify-content: center; padding: 12px 24px; border: 1px solid var(--navy); border-radius: 8px; color: #fff; background: var(--blue); box-shadow: 0 4px 10px rgba(15, 37, 84, .2); font-size: 1rem; font-weight: 900; text-align: center; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.purchase-button:hover { color: #fff; background: var(--navy); box-shadow: 0 6px 14px rgba(15, 37, 84, .24); transform: translateY(-1px); }
.purchase-button:active { box-shadow: 0 2px 6px rgba(15, 37, 84, .18); transform: translateY(0); }

.site-footer { color: #fff; background: var(--navy); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; padding-bottom: 24px; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.84); }
.footer-inner a { color: #fff; font-weight: 800; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 680px) {
  .wrap { width: min(100% - 34px, 960px); }
  .header-inner { min-height: 74px; }
  .brand img { width: 52px; height: 52px; }
  .product-head { flex-direction: column; gap: 14px; }
  .product-price { text-align: left; }
  .offer-list, .program-list, .feature-columns { grid-template-columns: 1fr; }
  .program-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .program-gallery__image { height: 190px; padding: 8px; }
  .program-gallery__item figcaption { padding: 10px 0; font-size: .86rem; }
  .katbook-slideshow__frame { height: clamp(180px, 56vw, 260px); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .katbook-slideshow__image { transition: none; }
}
