/*
 * ============================================================
 * RESOURCES PAGE (resources.html)
 * Reuses the site's existing design tokens/glass-panel language —
 * this is a public marketing page, not the lesson reading environment
 * (see css/pages/lesson.css for why THAT page deliberately breaks away).
 * ============================================================
 */

.resources-hero { padding: 140px 24px 32px; max-width: 760px; margin: 0 auto; box-sizing: border-box; }

/* ---- Category chooser ---------------------------------------------------- */
.resources-kind-tabs { width: 100%; max-width: 1100px; margin: 0 auto 8px; padding: 0 24px; }
.resources-kind-tab-row {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    background-color: var(--neutral-soft-bg);
    border-radius: var(--radius-pill);
    margin-bottom: 18px;
}
.resources-kind-tab {
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 22px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: var(--transition-fast);
}
.resources-kind-tab.is-active {
    background: linear-gradient(135deg, var(--grad-btn-start), var(--grad-btn-end));
    color: #fff;
    box-shadow: 0 6px 16px rgba(93, 13, 24, 0.25);
}
.resources-category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.resources-chip {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--neutral-border);
    background: var(--color-surface);
    color: var(--ink-soft);
    cursor: pointer;
    transition: var(--transition-fast);
}
.resources-chip:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.resources-chip.is-active { background-color: var(--accent-soft-bg); border-color: var(--accent-gold); color: var(--accent-gold); }

/* ---- Loading / empty states ------------------------------------------------ */
.resources-grid-section { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px 40px; }
.resources-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--ink-muted);
}
.resources-state svg { width: 40px; height: 40px; opacity: 0.5; }
.resources-state h3 { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.resources-state p { font-size: 13px; max-width: 320px; line-height: 1.8; }
.resources-spinner {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 3px solid var(--neutral-border);
    border-top-color: var(--accent-gold);
    animation: resources-spin 0.8s linear infinite;
}
@keyframes resources-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .resources-spinner { animation-duration: 2.4s; } }

/* ---- Resource cards --------------------------------------------------------- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 20px;
}
.resource-card {
    background-color: var(--glass-bg);
    border: 1px solid var(--neutral-border);
    border-top: 1px solid var(--glass-border-highlight);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-theme), transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-card:hover, .resource-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
}
/* aspect-ratio (not a fixed short height) so a cover photo scales with the
   card's own width and stays fully visible instead of being cropped —
   3/4 matches real book-cover proportions closely; the exam-prep
   placeholder icon just centers in the same taller box. */
.resource-card-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    background-color: var(--neutral-soft-bg);
    color: var(--accent-gold);
    overflow: hidden;
}
.resource-card-cover img { width: 100%; height: 100%; object-fit: contain; }
.resource-card-cover svg { width: 42px; height: 42px; }
.resource-card-body { padding: 16px 18px 18px; }
.resource-card-level {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
    margin-bottom: 8px;
}
.resource-card-title { font-family: var(--font-display-fa); font-size: 15.5px; font-weight: 800; color: var(--primary-navy); margin-bottom: 6px; line-height: 1.5; }
.resource-card-desc { font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-card-file-count { font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }

/* ---- Recommended practice books -------------------------------------------- */
.recommended-section { width: 100%; max-width: 1100px; margin: 8px auto 60px; padding: 0 24px; }
.recommended-section, .resources-kind-tabs, .library-section { scroll-margin-top: 110px; } /* deep links from the header menu */
.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 16px;
    margin-top: 24px;
}
.recommended-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    border: 1px solid var(--neutral-border);
    cursor: pointer;
    transition: var(--transition-fast), transform 0.25s ease;
}
.recommended-card:hover, .recommended-card:focus-visible { transform: translateY(-3px); border-color: var(--accent-gold); }
.recommended-card-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.recommended-skill-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--neutral-soft-bg);
    color: var(--ink-soft);
}

/* ---- Book look (shared with book.html) ---------------------------------------
   Level tone: [data-tone] = the CEFR family of a book's level (a/b/c — see
   levelTone() in js/pages/resources.js and js/pages/book.js), so A-, B- and
   C-level books read apart at a glance. 'none' keeps the brand accent. */
[data-tone] { --book-tone: var(--accent-gold); }
[data-tone="a"] { --book-tone: #1F8A5B; }
[data-tone="b"] { --book-tone: #2B5FB3; }
[data-tone="c"] { --book-tone: var(--accent-gold); }
[data-theme="dark"] [data-tone="a"] { --book-tone: #34C98A; }
[data-theme="dark"] [data-tone="b"] { --book-tone: #6EA2FF; }

.book-level-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    background-color: var(--book-tone);
    color: #fff;
    box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--book-tone) 60%, transparent);
}

/* A cover drawn as a physical book: darker spine band + highlight on the
   binding edge (::before), stacked page edges on the open side (box-shadow),
   and a light sheen that sweeps across on hover (::after). Covers are LTR
   German coursebooks, so the spine is on the left regardless of page dir. */
.book-3d {
    position: relative;
    border-radius: 3px 7px 7px 3px;
    box-shadow:
        2px 1px 0 #FFFFFF,
        4px 2px 0 #E4E0D8,
        5px 3px 0 #FFFFFF,
        7px 4px 0 #D6D1C7,
        0 22px 30px -14px rgba(15, 23, 42, 0.55);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}
.book-3d img,
.book-3d-placeholder {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}
.book-3d-placeholder {
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--book-tone), color-mix(in srgb, var(--book-tone) 55%, #0F172A));
    color: rgba(255, 255, 255, 0.85);
}
.book-3d-placeholder svg { width: 38%; height: auto; }
.book-3d::before,
.book-3d::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}
.book-3d::before {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.32) 0%,
        rgba(255, 255, 255, 0.22) 2.2%,
        rgba(0, 0, 0, 0.14) 4.5%,
        rgba(0, 0, 0, 0) 8%);
}
.book-3d::after {
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.38) 48%, transparent 60%);
    background-size: 250% 100%;
    background-position: 130% 0;
    transition: background-position 0.9s ease;
}
[data-theme="dark"] .book-3d {
    box-shadow:
        2px 1px 0 #CBD5E1,
        4px 2px 0 #64748B,
        5px 3px 0 #CBD5E1,
        7px 4px 0 #475569,
        0 24px 34px -14px rgba(0, 0, 0, 0.8);
}

/* ---- Books grid ("کتاب‌ها" tab) --------------------------------------------- */
.resources-grid--books {
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 26px;
}
.book-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    animation: book-card-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes book-card-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.book-card:hover, .book-card:focus-visible {
    box-shadow: var(--glass-shadow-hover), 0 0 0 1px color-mix(in srgb, var(--book-tone) 35%, transparent);
}
.book-card:focus-visible { outline: 2px solid var(--book-tone); outline-offset: 3px; }

/* The stage: a soft level-tinted backdrop with a floor shadow the book stands on. */
.book-card-stage {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    aspect-ratio: 1 / 1.08;
    padding: 30px 22% 30px;
    background-color: var(--neutral-soft-bg);
    background-image:
        radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--book-tone) 20%, transparent), transparent 70%),
        linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--book-tone) 9%, transparent));
    overflow: hidden;
}
.book-card-stage::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 20px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(15, 23, 42, 0.28), transparent);
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 0;
}
.book-card-stage .book-3d { width: 100%; z-index: 1; }
.book-card-stage .book-level-pill {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 2;
}
.book-card:hover .book-3d,
.book-card:focus-visible .book-3d { transform: translateY(-10px) rotate(-2deg); }
.book-card:hover .book-3d::after,
.book-card:focus-visible .book-3d::after { background-position: -30% 0; }
.book-card:hover .book-card-stage::after { transform: scaleX(0.82); opacity: 0.6; }

.book-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 16px 18px 16px;
}
.book-card-title {
    /* The site's own font (Kalameh — it carries Latin glyphs), not a
       separate serif: titles read as part of the interface. dir="ltr" on
       the element keeps "Starten wir! A1" in German order. */
    font-family: var(--font-body);
    font-size: 16.5px;
    font-weight: 800;
    color: var(--primary-navy);
    line-height: 1.45;
    margin-bottom: 2px;
    text-align: right;
}
.book-card-type {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--book-tone);
    margin-bottom: 2px;
}
.book-card-desc {
    font-size: 12px;
    line-height: 1.8;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--neutral-border);
}
/* margin-top:auto above pins the footer to the card bottom (cards share a
   row height); this keeps a minimum gap when the text fills the card. */
.book-card-body > :nth-last-child(2) { margin-bottom: 12px; }
.book-card-files {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--book-tone);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background-color: color-mix(in srgb, var(--book-tone) 11%, transparent);
}
.book-card-files.is-soon { color: var(--ink-muted); background-color: var(--neutral-soft-bg); }
.book-card-files svg { width: 13px; height: 13px; }
.book-card-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    transition: color 0.3s ease;
}
.book-card-open svg { width: 15px; height: 15px; transition: transform 0.3s ease; }
.book-card:hover .book-card-open,
.book-card:focus-visible .book-card-open { color: var(--book-tone); }
.book-card:hover .book-card-open svg,
.book-card:focus-visible .book-card-open svg { transform: translateX(-4px); }

/* Recommended cards with a cover: small book thumbnail beside the text. */
.recommended-card.has-cover { display: flex; align-items: flex-start; gap: 16px; }
.recommended-cover { flex: 0 0 64px; }
.recommended-card-main { flex: 1 1 auto; min-width: 0; }
.book-3d--sm {
    box-shadow:
        1px 1px 0 #FFFFFF,
        2px 2px 0 #D6D1C7,
        0 10px 16px -8px rgba(15, 23, 42, 0.5);
}
[data-theme="dark"] .book-3d--sm {
    box-shadow: 1px 1px 0 #CBD5E1, 2px 2px 0 #475569, 0 10px 16px -8px rgba(0, 0, 0, 0.8);
}
.recommended-card:hover .book-3d--sm { transform: translateY(-3px) rotate(-2deg); }
.recommended-card .resource-card-level {
    background-color: color-mix(in srgb, var(--book-tone) 12%, transparent);
    color: var(--book-tone);
}

@media (prefers-reduced-motion: reduce) {
    .book-card { animation: none; }
    .book-3d, .book-3d::after { transition: none; }
    .book-card:hover .book-3d, .book-card:focus-visible .book-3d,
    .recommended-card:hover .book-3d--sm { transform: none; }
}

/* ---- File dialog ------------------------------------------------------------ */
.resources-dialog {
    border: none;
    border-radius: var(--radius-lg);
    padding: 26px;
    width: min(520px, 92vw);
    max-height: 82vh;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.resources-dialog::backdrop { background-color: var(--color-overlay); }
.resources-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.resources-dialog-level {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
    margin-bottom: 6px;
}
.resources-dialog-head h2 { font-family: var(--font-display-fa); font-size: 18px; font-weight: 800; color: var(--primary-navy); }
.resources-dialog-close {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--neutral-border);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.resources-dialog-close svg { width: 15px; height: 15px; }
.resources-dialog-close:hover { border-color: var(--color-error); color: var(--color-error); }
.resources-dialog-desc { font-size: 13px; line-height: 1.8; color: var(--ink-soft); margin: 10px 0 18px; }
.resources-file-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.resources-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background-color: var(--neutral-soft-bg);
}
.resources-file-item.is-empty { justify-content: center; color: var(--ink-muted); font-size: 12.5px; padding: 24px; }
.resources-file-type { font-size: 11px; font-weight: 700; color: var(--accent-gold); flex-shrink: 0; }
.resources-file-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.resources-file-download svg { width: 15px; height: 15px; color: var(--ink-muted); }
.resources-file-download:hover { color: var(--accent-gold); }

/* ============================================================
   LIBRARY (کتاب‌ها) — sections per book family / category, each with
   shelves (books, Hören listening, other files). Markup is generated by
   js/pages/resources.js from js/resource-library.js's grouping.
   ============================================================ */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.resources-library { display: flex; flex-direction: column; gap: 28px; }

.library-section {
    padding: 26px 26px 28px;
    border-radius: var(--radius-lg);
    background-color: var(--glass-bg);
    border: 1px solid var(--neutral-border);
    border-top-color: var(--glass-border-highlight);
    box-shadow: var(--glass-shadow);
    animation: library-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--si, 0) * 70ms);
}
@keyframes library-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
/* Sections animate as a whole — individual cards don't, so a library of
   hundreds of items costs a handful of animations, not hundreds. */
.resources-library .book-card { animation: none; }

.library-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.library-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft-bg), transparent);
    border: 1px solid var(--neutral-border);
    color: var(--accent-gold);
}
.library-section-icon svg { width: 22px; height: 22px; }
.library-section-heading { min-width: 0; }
.library-section-title {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--primary-navy);
    text-align: right;
}
.library-section-meta { margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }

.library-shelf + .library-shelf {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px dashed var(--neutral-border);
}
.library-shelf-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--primary-navy);
}
.library-shelf-icon { display: flex; color: var(--accent-gold); }
.library-shelf-icon svg { width: 18px; height: 18px; }

.library-level-group + .library-level-group { margin-top: 18px; }
.library-level-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}
.library-level-title .book-level-pill { --book-tone: var(--accent-gold); }

/* Listening / document items: one compact row card, icon by type. */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 10px;
}
/* Must match TRACKS_VISIBLE in js/pages/resources.js (8). */
.library-level-group.is-collapsed .track-card:nth-child(n + 9) { display: none; }
.track-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    box-shadow: none;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.track-card:hover,
.track-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--book-tone) 45%, transparent);
    box-shadow: var(--shadow-sm);
}
.track-card:focus-visible { outline: 2px solid var(--book-tone); outline-offset: 2px; }
.track-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background-color: var(--neutral-soft-bg);
    color: var(--ink-soft);
}
.track-icon svg { width: 19px; height: 19px; }
/* Audio is the primary listening item → level-toned; transcripts and
   other documents stay neutral beside it. */
.track-card[data-type="audio"] .track-icon {
    background-color: color-mix(in srgb, var(--book-tone) 12%, transparent);
    color: var(--book-tone);
}
.track-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.track-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start;
}
.track-meta { font-size: 11.5px; color: var(--ink-muted); }
/* "a | b | c" with a drawn divider (see metaList() in js/pages/resources.js
   for why it isn't a "·" character). */
.meta-list { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.meta-list > span + span::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin: 0 8px;
    vertical-align: -0.1em;
    background-color: currentColor;
    opacity: 0.35;
}
.track-go { display: flex; color: var(--ink-muted); transition: transform 0.25s ease, color 0.25s ease; }
.track-go svg { width: 16px; height: 16px; }
.track-card:hover .track-go,
.track-card:focus-visible .track-go { color: var(--book-tone); transform: translateX(-3px); }

.library-more {
    margin-top: 10px;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--neutral-border);
    background: transparent;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.library-more:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

@media (prefers-reduced-motion: reduce) {
    .library-section { animation: none; }
    .track-card, .track-card:hover, .track-card:focus-visible { transform: none; }
}

@media (max-width: 640px) {
    .resources-library { gap: 18px; }
    .library-section { padding: 18px 14px 20px; border-radius: var(--radius-md); }
    .library-section-head { gap: 12px; margin-bottom: 16px; }
    .library-section-icon { width: 40px; height: 40px; border-radius: 12px; }
    .library-section-title { font-size: 19px; }
    .track-grid { grid-template-columns: 1fr; }
    /* Narrow screens: long German track titles wrap (2 lines) instead of cutting off. */
    .track-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.5;
    }
}

@media (max-width: 640px) {
    .resources-hero { padding: 112px 20px 24px; }
    .resources-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .recommended-grid { grid-template-columns: 1fr; }
    .resources-grid--books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .book-card-stage { padding: 22px 18% 24px; }
    .book-card-stage::after { bottom: 14px; }
    .book-card-stage .book-level-pill { top: 10px; inset-inline-start: 10px; font-size: 10.5px; padding: 3px 9px; }
    .book-card-body { padding: 12px 12px 12px; }
    .book-card-title { font-size: 15px; }
    .book-card-open { display: none; }
    .book-card-foot { justify-content: flex-start; }
}
