/* ===== TT-ACL-032 / tt-020: the ready-made shelf -- language tabs, cards, the sample row =====
   Shared by any product page with a `#ready-made`/`#select-version` shelf (originally
   themed-alphabet-colouring-book only; tt-020 generalized shelf_grouping.py for a second,
   theme-less product and extracted this block here per tt-017's own cold-start rule: "extract
   only once a second real user shows up"). Relies on the brand tokens (brand-tokens.css) already
   loaded by every product page -- no new variables introduced here. */
.shelf { margin-top: 4rem; }
.shelf-title { color: var(--accent-primary); margin-bottom: 0.5rem; }
.shelf-lead { color: var(--text-gray, #5f5955); max-width: 62ch; margin: 0 0 1.25rem; }
.shelf-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--accent-color); margin: 0 0 1.25rem; }
.shelf-tab { position: relative; padding: 10px 16px 12px; border-radius: 8px 8px 0 0; border: 1px solid var(--accent-color); border-bottom: 0; text-decoration: none; font-family: var(--font-ibm); font-weight: 600; font-size: 15px; color: var(--text-gray, #5f5955); }
.shelf-tab small { display: block; font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.shelf-tab[aria-selected="true"] { color: var(--primary-color); }
.shelf-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; background: var(--accent-primary); border-radius: 2px; }
.shelf-tab:focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 2px; }
/* no JS: every panel stacks under its heading; with JS: one panel, no headings */
.shelf-panel-title { font-size: 1.25rem; color: var(--primary-color); margin: 1.5rem 0 0.75rem; }
.shelf-js .shelf-panel { display: none; }
.shelf-js .shelf-panel.is-active { display: block; }
.shelf-js .shelf-panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.shelf-panel-note { color: var(--text-gray, #5f5955); font-size: 0.9rem; margin: 0 0 1rem; }
.shelf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .shelf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.shelf-card { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(12, 58, 40, 0.08); }
.shelf-card-art { position: relative; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--border-color); display: grid; place-items: center; overflow: hidden; }
.shelf-card-art img { width: 100%; height: 100%; object-fit: contain; padding: 6px; max-width: 100%; }
.shelf-sticker { position: absolute; top: 10px; right: 10px; background: var(--accent-orange-light); color: #3a2a08; font-family: var(--font-ibm); font-weight: 600; font-size: 13px; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.shelf-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shelf-card-title { font-family: var(--f-title), serif; font-weight: var(--f-title-wght, 600); font-size: 1.25rem; line-height: 1.15; color: var(--primary-dark); margin: 0; }
.shelf-card-descr { margin: 0; font-size: 0.875rem; color: var(--text-gray, #5f5955); line-height: 1.4; }
.shelf-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; font-family: var(--font-ibm); }
.shelf-chips li { background: var(--bg-polar); color: #2f4a5e; font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: 999px; }
.shelf-card form { margin-top: auto; }

/* tt-001d follow-up (2026-09-24): a shelf with exactly one card per tab (Lifecycles) -- the grid
   is already a single full-width column (see detail.html); this lays the card out sideways (art
   left, body right) instead of stretching the vertical card design across the whole row. */
.shelf-card-wide { flex-direction: row; align-items: stretch; max-height: 420px; min-height: 0; }
.shelf-card-wide .shelf-card-art { flex: 0 0 320px; width: 320px; aspect-ratio: auto; border-bottom: none; border-right: 1px solid var(--border-color); min-height: 0; }
.shelf-card-wide .shelf-card-body { justify-content: center; gap: 10px; }
.shelf-card-wide .shelf-card-title { font-size: 1.5rem; }
.shelf-card-wide .shelf-btn, .shelf-card-wide .shelf-paper-actions { max-width: 280px; }
.shelf-card-wide form { margin-top: 4px; }
@media (max-width: 640px) {
    .shelf-card-wide { flex-direction: column; }
    .shelf-card-wide .shelf-card-art { flex: none; width: 100%; aspect-ratio: 4 / 3; border-right: none; border-bottom: 1px solid var(--border-color); }
    .shelf-card-wide .shelf-btn, .shelf-card-wide .shelf-paper-actions { max-width: none; }
}
.shelf-btn { width: 100%; background: var(--accent-primary); color: #fff; border: 0; border-radius: 8px; padding: 10px 12px; font-weight: 600; font-family: var(--font-ibm); cursor: pointer; }
.shelf-btn:hover { filter: brightness(0.92); }
.shelf-btn[disabled] { background: var(--border-color); color: var(--text-gray, #5f5955); cursor: not-allowed; }
.shelf-btn-ghost { width: auto; background: transparent; color: var(--primary-color); border: 1.5px solid var(--primary-color); padding: 8px 12px; }
.shelf-card-soon { opacity: 0.72; box-shadow: none; border-style: dashed; }
.shelf-card-soon .shelf-card-art { background: #f2f2f0; }
.shelf-soon-mark { font-family: var(--font-ibm); font-weight: 600; color: var(--text-gray, #5f5955); letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.shelf-sample { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding: 14px 16px; background: var(--primary-light); border: 1px solid var(--border-color); border-radius: 12px; }
.shelf-sample-free { font-family: var(--font-ibm); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary-color); }
.shelf-sample-title { font-family: var(--f-title), serif; font-size: 1.125rem; color: var(--primary-dark); }
.shelf-sample-descr { color: var(--text-gray, #5f5955); font-size: 0.875rem; flex: 1; min-width: 16ch; }
@media (max-width: 600px) { .shelf-sample { flex-direction: column; align-items: flex-start; } }
a.shelf-btn { display: inline-block; text-decoration: none; text-align: center; }
@media (max-width: 480px) {
    /* two narrow columns on a phone: the card keeps its shape, the type steps down */
    .shelf-card-body { padding: 10px 10px 12px; gap: 6px; }
    .shelf-card-title { font-size: 1.05rem; overflow-wrap: anywhere; }
    .shelf-card-descr { font-size: 0.8rem; }
    .shelf-chips li { font-size: 10.5px; padding: 2px 6px; }
    .shelf-btn { padding: 8px 6px; font-size: 0.9rem; }
    .shelf-tabs { gap: 0; }
    .shelf-tab { padding: 8px 10px 10px; }
}

/* tt-001d (print-chrome-other-materials, 2026-09-23): a shelf card that offers TWO paper sizes of
   the same download (Lifecycles' A4 + Letter) instead of one button. */
.shelf-paper-actions { display: flex; gap: 8px; margin-top: auto; }
.shelf-paper-actions form { margin-top: 0; flex: 1 1 50%; }
.shelf-btn-paper { width: 100%; }
