/* Kuru 03 Standards 1 to 12: twelve maths notebooks in brown-paper covers, the way Indian school books are covered, each
   with a name label: the standard, then what Kuru practises in it (the topics come from Kuru's own question templates,
   js/learn/t/*.js; Standards 11 and 12 carry a "Practice topics" tag). Four to a row on a desk, three on a laptop, two
   on a tablet; on a phone the shelf scrolls sideways one book at a time. The notebooks are set down on twos when the
   shelf is seen (03-standards.js). */
.ks__head { max-width: 50rem; }
.ks__lead { margin-top: clamp(12px, 1.4vw, 18px); max-width: 40em; font-size: var(--t-lead); line-height: 1.55; color: var(--ink); }
.ks__swipe { display: none; }
.ks__shelf { margin-top: clamp(36px, 4.4vw, 60px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 30px); }
.ks__book { --c: var(--sun); position: relative; isolation: isolate; padding: 20px 16px 20px 28px; rotate: var(--t, 0deg);
  border-radius: 6px 14px 12px 6px / 6px 12px 14px 6px; background: var(--kraft) url(/assets/art/textures/kraft-tile.webp) 0 0 / 512px 512px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 1.5px rgba(30, 60, 140, .3), 0 18px 28px -18px rgba(30, 60, 140, .5); }
/* the notebook's spine */
.ks__book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; border-radius: 6px 0 0 6px; background: rgba(90, 42, 0, .2); box-shadow: inset -2px 0 0 rgba(90, 42, 0, .12); }
/* the name label: cream paper with a coloured band, as children label their books */
.ks__label { position: relative; height: 100%; padding: 0 0 14px; border-radius: 12px 14px 12px 10px / 12px 10px 14px 12px; background: var(--card); overflow: hidden;
  box-shadow: 0 1px 1px rgba(90, 42, 0, .3), 0 6px 10px -6px rgba(90, 42, 0, .4); }
.ks__std { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 12px 16px 10px; background: var(--c); font: 800 21px/1 var(--font-display); color: var(--ink);
  box-shadow: inset 0 -1px 0 rgba(30, 42, 90, .1); }
.ks__std b { font-size: 2em; line-height: .8; }
/* Standards 11 and 12: practice topics, said on the book itself */
.ks__tag { align-self: center; margin-left: auto; padding: 5px 10px; border-radius: 999px; background: var(--card); color: var(--ink); font: 800 15px/1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 1px 1px rgba(30, 60, 140, .25); }
.ks__topics { padding: 6px 16px 0; }
.ks__topics li { padding: 9px 0 8px; border-bottom: 1.5px solid rgba(35, 70, 198, .13); font: 650 var(--t-body)/1.35 var(--font-body); color: var(--ink); }
.ks__topics li:last-child { border-bottom: 0; }
/* under the shelf: every board and chapter on the maths pages, and the one claim Kuru makes */
.ks__more { margin-top: clamp(32px, 4vw, 52px); display: grid; justify-items: center; gap: 16px; text-align: center; }
.ks__claim { max-width: 44em; font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }
@media (max-width: 1199.98px) {
  .ks__shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899.98px) {
  .ks__shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  .ks__swipe { display: block; margin-top: clamp(28px, 6vw, 40px); font: 800 var(--t-small)/1.3 var(--font-body); color: var(--ink-2); }
  .ks__swipe::after { content: " \2192"; }
  .ks__shelf { margin-top: 12px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px); gap: 14px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 20px; scrollbar-width: thin; }
  .ks__shelf:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 12px; }
  .ks__book { scroll-snap-align: start; padding-left: 26px; }
  .ks__more { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ks [data-pm] { animation: none !important; opacity: 1 !important; } }
@media (forced-colors: active) { .ks__book, .ks__label, .ks__tag { border: 1px solid CanvasText; } }

/* R6 (9 Nov): the twelve books on one shelf that scrolls left to right (the page stays short) */
.ks .ks__shelf { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(250px, 23vw, 300px); gap: clamp(16px, 1.8vw, 24px);
  margin-top: 14px; padding: 10px 4px 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(30, 42, 90, .3) transparent; }
.ks .ks__book { scroll-snap-align: start; }
.ks .ks__swipe { display: block; margin-top: clamp(22px, 2.6vw, 34px); font: 700 15px/1.3 var(--font-body); color: var(--ink-2); }
.ks__arrows { display: flex; gap: 10px; margin-top: 10px; }
.ks__arrow { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: var(--sh-paper); display: grid; place-items: center; cursor: pointer; transition: transform .15s var(--ease-settle), opacity .2s; }
.ks__arrow svg { width: 22px; height: 22px; }
.ks__arrow:active { transform: scale(.94); }
.ks__arrow[disabled] { opacity: .35; cursor: default; }

/* R6 motion (docs/MOTION_LANGUAGE.md): the shelf's own scrollbar is gone; a thin paper line under the shelf fills as it scrolls, and a
   small felt Kuru walks along the top of the shelf to the same place (03-standards.js). The books are pulled off the shelf one by
   one with a slight fan when it is seen (data-pm="book"); the book under a pointer lifts 4 px, nothing more. */
.ks .ks__shelf { scrollbar-width: none; overflow-y: hidden; padding-bottom: 26px; }
.ks .ks__shelf::-webkit-scrollbar { display: none; }
.ks__book { transition: translate 240ms var(--pm-glide, ease-out); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { .ks__book:hover { translate: 0 -4px; } }
.ks__walk { position: relative; height: 76px; margin-top: 4px; margin-bottom: -2px; pointer-events: none; }
.ks__walk::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; border-radius: 4px; z-index: 0;
  background: var(--kraft) url(/assets/art/textures/kraft-tile.webp) 0 0 / 512px 512px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 1.5px rgba(30, 60, 140, .3), 0 8px 12px -8px rgba(30, 60, 140, .45); }
.ks__kuru { position: absolute; left: 0; bottom: 5px; z-index: 1; width: 62px; height: auto; transform-origin: 50% 100%; will-change: transform; filter: drop-shadow(0 3px 2px rgba(30, 60, 140, .25)); }
.ks__rail { position: relative; height: 6px; margin: 2px 4px 0; border-radius: 3px; overflow: hidden; background: rgba(30, 42, 90, .14); }
.ks__rail-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; }
@media (max-width: 639.98px) {
  .ks__walk { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .ks__rail { margin-inline: 0; }
  .ks__kuru { width: 54px; }
}
html.rm .ks__walk, .ks__walk[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ks__walk { display: none; } }
