/* Notes shop shelf (Nov 2026). Notes page only, loaded after kw-blocks.css.
   Every set sits on one shelf, so a buyer sees the whole range, each price and
   each Buy button without scrolling through long rows.
   Motion slides. Nothing fades. With no JS the "What's inside" text shows in the card. */

/* ---------- short hero, so the covers start on the first screen ---------- */
.kb-hero-shop { padding: calc(78px + clamp(1.25rem, 2.4vw, 1.9rem)) 0 clamp(1rem, 2vw, 1.4rem); border-bottom: 0; }
.kb-shop-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem clamp(2rem, 5vw, 4.5rem); align-items: end; }
.kb-hero-shop .kb-h1 { font-size: clamp(2rem, 3.3vw, 2.7rem) !important; line-height: 1.05 !important; max-width: 22em; }
.kb-hero-shop .kb-hero-sub { margin-top: .8rem; font-size: 1.02rem; line-height: 1.55; max-width: 46rem; }
.kb-hero-shop .kb-facts { display: grid; gap: .55rem; margin: 0; padding: .2rem 0 .2rem 1.75rem; border-top: 0; border-left: 1px solid var(--line-2, rgba(11,22,51,.18)); }
.kb-hero-shop .kb-jump { display: none; }

/* ---------- the shelf ---------- */
.kb-shop { padding: clamp(.5rem, 1vw, .75rem) 0 clamp(3rem, 5vw, 4.5rem); background: var(--paper); }
.kb-shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 2rem; margin-bottom: .85rem; }
.kb-shelf-head .kb-inline { margin: 0; font-size: .93rem; color: var(--ink-2); max-width: 34rem; }
.kb-title-sm { font-size: clamp(1.35rem, 2vw, 1.65rem) !important; letter-spacing: -.025em; scroll-margin-top: 100px; }
.kb-group > .kb-title-sm { margin-bottom: 1rem !important; }

.kb-shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; background: none; border: 0; border-radius: 0; overflow: visible; }
.kb-shelf-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kb-shelf-1 { grid-template-columns: minmax(0, 1fr); }
.kb-shelf-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.kb-group { display: flex; flex-direction: column; min-width: 0; }
.kb-group-3 { grid-column: span 3; }
.kb-group > .kb-shelf, .kb-group > .kb-ask { flex: 1; }

.kb-shelf .kb-note { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; scroll-margin-top: 100px; transition: border-color .2s, transform .3s var(--kb-ease); }
.kb-shelf .kb-note:hover { border-color: var(--line-2, rgba(11,22,51,.28)); transform: translateY(-3px); }
.kb-shelf .kb-note-face { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.kb-shelf .kb-note-cover { display: flex; justify-content: center; padding: .75rem 1rem .7rem; background: var(--paper-2, #EAEDF3); border-bottom: 1px solid var(--line); }
.kb-shelf .kb-note-cover img { width: auto; height: 106px; border-radius: 4px; }
.kb-shelf .kb-note-body { padding: .95rem 1rem .2rem; }
.kb-shelf .kb-note h3 { font-size: 1.06rem; line-height: 1.22; letter-spacing: -.015em; }
.kb-shelf .kb-note-sub { margin-top: .3rem; font-size: .72rem; line-height: 1.4; }
.kb-note-for { margin: .55rem 0 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.kb-note-more, .kb-note-close { appearance: none; background: none; border: 0; padding: .35rem 0; margin: .35rem 0 0; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.kb-note-more:hover, .kb-note-close:hover { color: var(--accent-ink, #A84E14); }
.kb-note-more:focus-visible, .kb-note-close:focus-visible { outline: 2px solid var(--navy, #1E3A8A); outline-offset: 2px; border-radius: 4px; }
html:not(.js) .kb-note-more, html:not(.js) .kb-note-close { display: none; }

.kb-shelf .kb-note-buy { margin-top: auto; padding: .7rem .8rem .9rem; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.kb-shelf .kb-price { flex-wrap: wrap; gap: .1rem .5rem; }
.kb-shelf .kb-price b { font-size: 1.5rem; }
.kb-shelf .kb-save { flex: 1 1 100%; margin: -.3rem 0 0; font-size: .85rem; }
.kb-shelf .kb-note-buy .btn { flex: 1 1 100%; width: auto; min-height: 44px; padding-left: .5rem; padding-right: .5rem; }

/* what's inside: a sheet that slides up over the cover, so the price and Buy button never move */
.kb-note-inside { padding: 0 1rem .6rem; }
.kb-note-inside-h { margin: 0; font-size: .95rem; font-weight: 700; color: var(--ink); }
.kb-shelf .kb-note-desc { margin-top: .45rem; font-size: .88rem; line-height: 1.5; }
.kb-shelf .kb-note-list { grid-template-columns: 1fr; gap: .32rem; margin-top: .6rem; }
.kb-shelf .kb-note-list li { font-size: .86rem; line-height: 1.4; }
.js .kb-note-inside { position: absolute; inset: 0; z-index: 2; padding: .9rem 1rem .5rem; background: var(--surface); overflow-y: auto; overscroll-behavior: contain; transform: translateY(101%); visibility: hidden; transition: transform .38s var(--kb-ease), visibility 0s .38s; }
.js .kb-note.is-open .kb-note-inside { transform: none; visibility: visible; transition: transform .38s var(--kb-ease), visibility 0s; }

/* bundles: the dark card, same as before */
.kb-shelf .kb-note-bundle { background: var(--ink); border-color: var(--ink); }
.kb-shelf .kb-note-bundle .kb-note-cover { background: rgba(255,255,255,.07); border-bottom-color: rgba(255,255,255,.12); }
.kb-note-bundle .kb-note-for, .kb-note-bundle .kb-note-inside .kb-note-desc { color: rgba(255,255,255,.78); }
.kb-note-bundle .kb-note-more, .kb-note-bundle .kb-note-close, .kb-note-bundle .kb-note-inside-h { color: #fff; }
.kb-note-bundle .kb-note-more:hover, .kb-note-bundle .kb-note-close:hover { color: var(--accent-bright, #E07B39); }
.kb-note-bundle .kb-note-inside { background: var(--ink); }
.kb-note-bundle .kb-note-more:focus-visible, .kb-note-bundle .kb-note-close:focus-visible { outline-color: #fff; }

/* the "not sure" card that fills the last slot */
.kb-ask { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem 1rem 1rem; border: 1px dashed var(--line-2, rgba(11,22,51,.28)); border-radius: 18px; }
.kb-ask p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.kb-ask p b { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.kb-ask .btn { margin-top: auto; justify-content: center; min-height: 44px; }

/* buy buttons inside the compare table */
.kb-pick .kb-go a.payhip-buy-button { width: auto !important; min-height: 38px; padding: .45rem 1rem !important; font-size: .88rem !important; box-shadow: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kb-shelf, .kb-shelf-3, .kb-shelf-1 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kb-shelf-row { grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 3vw, 2.5rem); }
  .kb-group-3 { grid-column: auto; }
  .kb-shelf > .kb-note-bundle:nth-child(5) { grid-column: span 2; }
  .kb-ask { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
  .kb-ask p { flex: 1 1 16rem; }
  .kb-ask .btn { margin-top: 0; }
}
@media (max-width: 720px) {
  .kb-hero-shop { padding-top: calc(78px + 1.1rem); }
  .kb-hero-shop .kb-h1 { font-size: 1.85rem !important; }
  .kb-hero-shop .kb-hero-sub { font-size: .98rem; margin-top: .65rem; }
  .kb-shelf-head .kb-inline { display: none; }
  .kb-shop-top { grid-template-columns: 1fr; gap: 1.1rem; }
  .kb-hero-shop .kb-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; padding: .8rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .kb-hero-shop .kb-facts li { font-size: .86rem; }
  .kb-hero-shop .kb-jump { display: flex; flex-wrap: nowrap; gap: .4rem; margin-top: .9rem; }
  .kb-hero-shop .kb-jump li { flex: 1 1 0; min-width: 0; }
  .kb-hero-shop .kb-jump a { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: .45rem .6rem; font-size: .84rem; white-space: nowrap; border-radius: 12px; }
  .kb-hero-shop .kb-jump a span { font-size: .74rem; }
  .kb-shelf, .kb-shelf-3, .kb-shelf-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .kb-shelf .kb-note:hover { transform: none; }
  .kb-shelf .kb-note-cover { padding: .8rem .6rem; }
  .kb-shelf .kb-note-cover img { height: 118px; }
  .kb-shelf .kb-note-body { padding: .75rem .8rem .1rem; }
  .kb-shelf .kb-note h3 { font-size: .98rem; }
  .kb-note-for { font-size: .85rem; }
  .kb-shelf .kb-note-buy { padding: .6rem .8rem .8rem; }
  .kb-shelf .kb-price b { font-size: 1.35rem; }
  /* phones: the sheet opens in place under the card text instead of sliding over it */
  .js .kb-note-inside { position: static; display: none; padding: .2rem .8rem .5rem; transform: none; visibility: visible; transition: none; overflow: visible; }
  .js .kb-note.is-open .kb-note-inside { display: block; }
  .kb-note-close { display: none; }
  /* bundles and a lone card take the full row: cover on the left, words on the right */
  .kb-shelf > .kb-note-bundle, .kb-shelf > .kb-note-bundle:nth-child(5), .kb-shelf-1 > .kb-note { grid-column: 1 / -1; }
  .kb-shelf > .kb-note-bundle .kb-note-face, .kb-shelf-1 > .kb-note .kb-note-face { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); align-items: start; }
  .kb-shelf > .kb-note-bundle .kb-note-cover, .kb-shelf-1 > .kb-note .kb-note-cover { height: 100%; align-items: center; border-bottom: 0; border-right: 1px solid var(--line); }
  .kb-shelf > .kb-note-bundle .kb-note-cover { border-right-color: rgba(255,255,255,.12); }
  .kb-shelf > .kb-note-bundle .kb-note-inside, .kb-shelf-1 > .kb-note .kb-note-inside { grid-column: 1 / -1; padding-top: .7rem; }
  .kb-shelf > .kb-note-bundle .kb-note-buy, .kb-shelf-1 > .kb-note .kb-note-buy { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
  .kb-shelf > .kb-note-bundle .kb-note-buy { border-top-color: rgba(255,255,255,.12); }
  .kb-shelf > .kb-note-bundle .kb-note-buy .btn, .kb-shelf-1 > .kb-note .kb-note-buy .btn { flex: 1 1 9rem; width: auto; }
  .kb-shelf > .kb-note-bundle .kb-save { margin: 0; }
  .kb-pick .kb-go a.payhip-buy-button { width: 100% !important; }
}
@media (max-width: 360px) {
  .kb-hero-shop .kb-jump a { font-size: .82rem; padding: .5rem .55rem; }
}

/* ---------- covers you can open (Nov 2026 covers + sample pages) ---------- */
.kb-shelf .kb-note-cover { padding: .8rem .9rem 1.05rem; }
.kb-look-open { position: relative; display: flex; justify-content: center; color: var(--ink); text-decoration: none; border-radius: 8px; }
.kb-look-open:focus-visible { outline: 2px solid var(--navy, #1E3A8A); outline-offset: 4px; }
.kb-shelf .kb-note-cover .kb-look-open img { flex: none; width: auto; height: 144px; border-radius: 5px; border: 0; box-shadow: 0 6px 16px rgba(11,22,51,.2); }
.kb-look-tag { position: absolute; left: 50%; bottom: -.55rem; transform: translateX(-50%); padding: .3rem .75rem .32rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .74rem; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: 0 2px 8px rgba(11,22,51,.25); transition: transform .25s var(--kb-ease, ease); }
.kb-look-open:hover .kb-look-tag { transform: translate(-50%, -3px); }
.kb-note-bundle .kb-look-tag { background: #fff; color: var(--ink); }
.kb-note-bundle .kb-look-open:focus-visible { outline-color: #fff; }
html:not(.js) .kb-look-tag { display: none; }

/* the viewer: pages slide sideways, nothing fades */
.kb-look { width: min(1060px, calc(100vw - 2rem)); height: min(900px, calc(100dvh - 2rem)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 20px; background: var(--surface, #fff); color: var(--ink); overflow: hidden; }
.kb-look::backdrop { background: rgba(11,22,51,.78); }
.kb-look[open] { display: grid; grid-template-columns: minmax(0, 1fr) 300px; animation: kb-look-in .34s var(--kb-ease, cubic-bezier(.2,.7,.2,1)); }
@keyframes kb-look-in { from { transform: translateY(36px); } }
.kb-look-stage { position: relative; min-width: 0; min-height: 0; background: var(--paper-2, #EAEDF3); }
.kb-look-strip { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior: contain; }
.kb-look-strip::-webkit-scrollbar { display: none; }
.kb-look-strip li { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 1.25rem 3.6rem; scroll-snap-align: center; scroll-snap-stop: always; }
.kb-look-strip img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(min(900px, 100dvh - 2rem) - 2.5rem); border-radius: 6px; background: #fff; box-shadow: 0 12px 30px rgba(11,22,51,.2); }
.kb-look-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; transition: transform .2s var(--kb-ease, ease); }
.kb-look-nav svg { width: 20px; height: 20px; }
.kb-look-nav:hover { transform: scale(1.08); }
.kb-look-nav:disabled { background: rgba(11,22,51,.22); cursor: default; transform: none; }
.kb-look-nav:focus-visible, .kb-look-x:focus-visible, .kb-look-thumbs button:focus-visible { outline: 2px solid var(--navy, #1E3A8A); outline-offset: 2px; }
.kb-look-prev { left: .6rem; }
.kb-look-prev svg { transform: scaleX(-1); }
.kb-look-next { right: .6rem; }
.kb-look-side { display: flex; flex-direction: column; gap: 1rem; min-height: 0; padding: 1.25rem 1.25rem 1.35rem; border-left: 1px solid var(--line); overflow-y: auto; }
.kb-look-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.kb-look-head h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.kb-look-x { flex: none; width: 36px; height: 36px; margin: -.3rem -.4rem 0 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--paper-2, #EAEDF3); color: var(--ink); cursor: pointer; }
.kb-look-x svg { width: 16px; height: 16px; }
.kb-look-count { margin: 0; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-3, #5B6478); }
.kb-look-thumbs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: .55rem; margin: 0; padding: 0; list-style: none; }
.kb-look-thumbs button { display: block; width: 100%; padding: 0; border: 2px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; cursor: pointer; }
.kb-look-thumbs button[aria-current="true"] { border-color: var(--accent, #C9611F); }
.kb-look-thumbs img { display: block; width: 100%; height: auto; }
.kb-look-note { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--ink-2); }
.kb-look-solo .kb-look-thumbs, .kb-look-solo .kb-look-count, .kb-look-solo .kb-look-nav, .kb-look-solo .kb-look-note { display: none; }
.kb-look-buy { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.kb-look-buy b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.kb-look-buy .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }

@media (max-width: 720px) {
  .kb-shelf .kb-note-cover { padding: .75rem .6rem 1rem; }
  .kb-shelf .kb-note-cover .kb-look-open img { height: 150px; }
  .kb-shelf > .kb-note-bundle .kb-note-cover .kb-look-open img, .kb-shelf-1 > .kb-note .kb-note-cover .kb-look-open img { height: 124px; }
  .kb-look { width: 100vw; height: 100dvh; border-radius: 0; }
  .kb-look[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .kb-look-strip li { padding: .9rem .9rem .7rem; }
  .kb-look-strip img { max-height: calc(100dvh - 15.5rem); }
  .kb-look-nav { display: none; }
  .kb-look-side { gap: .6rem; padding: .8rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .kb-look-head h2 { font-size: 1.05rem; }
  .kb-look-thumbs { grid-template-columns: repeat(5, minmax(0, 3rem)); gap: .4rem; }
  .kb-look-note { display: none; }
  .kb-look-buy { margin-top: 0; padding-top: .7rem; flex-wrap: nowrap; }
  .kb-look-buy .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .kb-look[open] { animation: none; }
  .kb-look-strip { scroll-behavior: auto; }
}

/* ---------- 13 Nov 2026: the cover leads ----------
   Each card is now mostly cover: title, one line, price and Buy underneath.
   The longer "what's inside" text opens with the cover, in the viewer. */
.kb-shelf .kb-note-cover { display: block; padding: .7rem .7rem 1.2rem; }
.kb-shelf .kb-note-cover .kb-look-open { display: block; }
.kb-shelf .kb-note-cover .kb-look-open img { display: block; width: 100%; height: auto; aspect-ratio: 480 / 679; border-radius: 6px; box-shadow: 0 8px 20px rgba(11,22,51,.22); }
.kb-look-tag { bottom: -.7rem; padding: .4rem .95rem .42rem; font-size: .8rem; }
.kb-shelf .kb-note-face { flex: 0 0 auto; }
.kb-shelf .kb-note-body { padding: 1rem .9rem .15rem; }
.kb-shelf .kb-note h3 { font-size: 1.04rem; }
.kb-shelf .kb-note-sub { margin-top: .35rem; font-size: .74rem; }
.js .kb-note-inside { display: none; }
.kb-shelf .kb-note-buy { padding-top: .6rem; }

/* subject tabs: stay under the menu bar while you scroll the shelves */
.kb-tabs { position: sticky; top: 76px; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.kb-tabs ul { display: flex; gap: .5rem; margin: 0; padding: .65rem 0; list-style: none; }
.kb-tabs a { display: inline-flex; align-items: baseline; gap: .5rem; padding: .55rem 1.05rem; border: 1.5px solid var(--line-2, rgba(11,22,51,.18)); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: border-color .2s, transform .25s var(--kb-ease, ease); }
.kb-tabs a span { font-family: var(--font-mono); font-size: .74rem; font-weight: 400; color: var(--ink-3); }
.kb-tabs a:hover { border-color: var(--ink); transform: translateY(-2px); }
.kb-tabs a:focus-visible { outline: 2px solid var(--navy, #1E3A8A); outline-offset: 2px; }
.kb-tabs a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.kb-tabs a[aria-current="true"] span { color: rgba(255,255,255,.72); }
.kb-hero-shop { padding-bottom: clamp(1.1rem, 2vw, 1.5rem); }
.kb-shop { padding-top: clamp(1.4rem, 2.4vw, 2rem); }
.kb-title-sm, .kb-shelf .kb-note { scroll-margin-top: 150px; }

/* the viewer's side panel now carries the detail text */
.kb-look-inside { display: flex; flex-direction: column; gap: .55rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.kb-look-inside h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.kb-look-inside p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.kb-look-inside ul { display: grid; gap: .35rem; margin: .1rem 0 0; padding: 0; list-style: none; }
.kb-look-inside li { position: relative; padding-left: 1rem; font-size: .88rem; line-height: 1.4; color: var(--ink); }
.kb-look-inside li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.kb-look-inside a { color: inherit; }
.kb-look-note { font-size: .8rem; color: var(--ink-3); }

@media (max-width: 720px) {
  .kb-tabs { top: 70px; }
  .kb-tabs ul { gap: .4rem; padding: .55rem 0; }
  .kb-tabs li { flex: 1 1 auto; min-width: 0; }
  .kb-tabs a { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; padding: .45rem .6rem; border-radius: 12px; font-size: .84rem; letter-spacing: -.01em; }
  .kb-tabs a:hover { transform: none; }
  .kb-shelf .kb-note-cover { padding: .55rem .55rem 1.1rem; }
  .kb-shelf .kb-note-cover .kb-look-open img, .kb-shelf > .kb-note-bundle .kb-note-cover .kb-look-open img, .kb-shelf-1 > .kb-note .kb-note-cover .kb-look-open img { height: auto; }
  .kb-shelf .kb-note-body { padding: .85rem .8rem .1rem; }
  /* bundles and a lone card: a wider cover on the left */
  .kb-shelf > .kb-note-bundle .kb-note-face, .kb-shelf-1 > .kb-note .kb-note-face { grid-template-columns: 44% minmax(0, 1fr); align-items: center; }
  .kb-shelf > .kb-note-bundle .kb-note-cover, .kb-shelf-1 > .kb-note .kb-note-cover { height: auto; }
  .kb-shelf > .kb-note-bundle .kb-note-body h3, .kb-shelf-1 > .kb-note .kb-note-body h3 { font-size: 1.15rem; }
  /* viewer on a phone: page on top, details scroll underneath, Buy stays in reach */
  .kb-look[open] { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .kb-look-stage { flex: none; height: min(62dvh, 132vw); }
  .kb-look-strip img { max-height: calc(min(62dvh, 132vw) - 1.6rem); }
  .kb-look-side { flex: none; overflow: visible; padding-bottom: 0; }
  .kb-look-inside { padding-top: .8rem; }
  .kb-look-buy { position: sticky; bottom: 0; margin: .3rem -1rem 0; padding: .7rem 1rem calc(.8rem + env(safe-area-inset-bottom, 0px)); background: var(--surface, #fff); }
}
@media (min-width: 721px) and (max-width: 1100px) {
  /* the bundle takes two columns here, so lay it sideways: cover left, words right */
  .kb-shelf > .kb-note-bundle:nth-child(5) .kb-note-face { display: grid; grid-template-columns: 46% minmax(0, 1fr); align-items: center; flex: 1; }
  .kb-shelf > .kb-note-bundle:nth-child(5) .kb-note-cover { border-bottom: 0; }
  .kb-shelf > .kb-note-bundle:nth-child(5) .kb-note-body h3 { font-size: 1.3rem; }
}

/* ---------- 13 Nov 2026: one full-width section per subject ----------
   English, General Maths and Accounting each get their own shelf, stacked, on the same
   five-across grid. A new subject is one more block; a new set is one more card. */
.kb-shelf-row { grid-template-columns: minmax(0, 1fr); gap: clamp(2.25rem, 4vw, 3.25rem); margin-top: clamp(2.25rem, 4vw, 3.25rem); }
.kb-group-3 { grid-column: auto; }
.kb-shelf-3, .kb-shelf-1 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kb-group > .kb-shelf, .kb-group > .kb-ask { flex: none; }
.kb-shelf-row > .kb-group { padding-top: clamp(1.75rem, 3vw, 2.4rem); border-top: 1px solid var(--line-2, rgba(11,22,51,.18)); }
/* "ask a tutor" becomes a slim strip under the shelves */
.kb-ask { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; padding: 1.1rem 1.25rem; }
.kb-ask p { flex: 1 1 18rem; }
.kb-ask p:first-child { flex: 0 0 auto; }
.kb-ask .btn { margin-top: 0; }
/* tabs scroll sideways once there are more subjects than fit */
.kb-tabs ul { overflow-x: auto; scrollbar-width: none; }
.kb-tabs ul::-webkit-scrollbar { display: none; }
.kb-tabs li { flex: none; }
@media (max-width: 1100px) {
  .kb-shelf-3, .kb-shelf-1 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kb-shelf-3, .kb-shelf-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-tabs li { flex: 1 0 auto; }
  .kb-ask p:first-child { flex: 1 1 100%; }
}

/* v5 (2026-11-16): the subject strip is a picker. Every subject shows at once (it wraps, no sideways scroll),
   and choosing one hides the other shelves so nobody scrolls past 13 subjects. */
.kb-tabs { position: static; border-bottom: 0; }
.kb-tabs ul { flex-wrap: wrap; overflow: visible; padding: .2rem 0 1rem; }
.kb-tabs li { flex: none; }
.kb-tabs a { cursor: pointer; }
[data-kb-off] { display: none !important; }
.kb-shop[data-kb-filtered] .kb-shelf-row { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 720px) {
  .kb-tabs ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .kb-tabs li { min-width: 0; }
  .kb-tabs a { width: 100%; height: 100%; white-space: normal; }
}
