/* Learning Resources - public/learning-resources.php. Open layout: no cards. */
.lr-intro { margin-bottom: 18px; }
.lr-wrap { max-width: 1100px; margin: 0 auto 56px; padding: 0 16px; }
.lr-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent, #E07856); margin: 0; }

/* We recommend: one row, plain text, thin dividers between items */
.lr-recommend { margin: 0 0 26px; padding: 12px 0 14px; border-top: 2px solid var(--color-border); border-bottom: 2px solid var(--color-border); }
.lr-recommend > .lr-label { margin-bottom: 8px; }
.lr-rec-row { display: flex; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.lr-rec { flex: 1 1 0; min-width: 132px; padding: 2px 14px; border-left: 1px solid var(--color-border); }
.lr-rec:first-child { padding-left: 0; border-left: 0; }
.lr-rec-name { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; font-size: 0.95rem; line-height: 1.25; font-weight: 700; color: var(--color-primary-dark); }
.lr-star { flex: 0 0 16px; width: 16px; height: 16px; color: #E0A23A; align-self: flex-start; margin-top: 1px; }
.lr-rec-years { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 0 0 22px; font-size: 0.85rem; }
.lr-rec-years a { color: var(--color-primary); font-weight: 600; white-space: nowrap; }

/* Year buttons and subject tabs */
.lr-years { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.lr-years .lr-label { margin-right: 6px; color: var(--color-primary-dark); }
.lr-year-btn { padding: 6px 15px; border-radius: 999px; border: 1px solid var(--color-border); background: transparent; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--color-primary-dark); cursor: pointer; }
.lr-year-btn:hover { background: rgba(42, 111, 119, 0.07); }
.lr-year-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.lr-subjects { display: flex; gap: 2px; margin: 0 0 18px; border-bottom: 2px solid var(--color-border); overflow-x: auto; scrollbar-width: none; }
.lr-subjects::-webkit-scrollbar { display: none; }
.lr-subject-tab { position: relative; padding: 9px 16px 10px; border: 0; background: none; font: inherit; font-size: 1rem; font-weight: 700; color: var(--color-text-muted); cursor: pointer; white-space: nowrap; }
.lr-subject-tab:hover { color: var(--color-primary-dark); }
.lr-subject-tab.is-active { color: var(--color-primary-dark); }
.lr-subject-tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 3px; border-radius: 3px; background: var(--color-accent, #E07856); }

/* Modules left, files right */
.lr-subject { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: start; }
.lr-module-select-label { display: none; }
.lr-module-list { list-style: none; margin: 0; padding: 0; }
.lr-module-head { margin: 14px 0 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.lr-module-head:first-child { margin-top: 0; }
.lr-module-btn { display: block; width: 100%; padding: 6px 10px; border: 0; border-left: 3px solid transparent; background: none; font: inherit; font-size: 0.93rem; text-align: left; color: var(--color-text); cursor: pointer; border-radius: 0 6px 6px 0; }
.lr-module-btn:hover { background: rgba(42, 111, 119, 0.06); }
.lr-module-btn.is-active { border-left-color: var(--color-accent, #E07856); background: rgba(224, 120, 86, 0.08); font-weight: 700; color: var(--color-primary-dark); }

.lr-panel { padding-left: 26px; border-left: 1px solid var(--color-border); min-height: 220px; }
.lr-crumb { margin: 0 0 2px; font-size: 0.85rem; font-weight: 700; color: var(--color-accent, #E07856); letter-spacing: 0.02em; }
.lr-panel-title { margin: 0 0 16px; font-size: 1.6rem; line-height: 1.2; color: var(--color-primary-dark); }
.lr-group { margin: 0 0 18px; }
.lr-group-title { margin: 0 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--color-primary); }
.lr-group-title span { margin-left: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-text-muted); font-size: 0.82rem; }
.lr-files { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.lr-levels { list-style: none; margin: 0; padding: 0; }
.lr-level { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 7px 0; border-bottom: 1px dotted var(--color-border); }
.lr-level:last-child { border-bottom: 0; }
.lr-level-note { font-size: 0.8rem; color: var(--color-text-muted); min-width: 92px; }
.lr-file { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; }
.lr-file span { text-decoration: underline; text-decoration-color: rgba(42, 111, 119, 0.35); text-underline-offset: 3px; }
.lr-file:hover span { text-decoration-color: currentColor; }
.lr-file .lr-pdf { flex: 0 0 20px; width: 20px; height: 20px; color: #C4573A; }
.lr-level > .lr-file:first-child { min-width: 120px; }
.lr-file-answers { font-weight: 600; font-size: 0.9rem; color: var(--color-text-muted); }
.lr-file-answers .lr-pdf { color: #8C8278; width: 17px; height: 17px; flex-basis: 17px; }
.lr-level-1 > .lr-file:first-child .lr-pdf { color: #A8632F; }
.lr-level-2 > .lr-file:first-child .lr-pdf { color: #7D868C; }
.lr-level-3 > .lr-file:first-child .lr-pdf { color: #B8862B; }
.lr-file-guide .lr-pdf { color: #6B4FA0; }

@media (max-width: 760px) {
    .lr-rec { min-width: 146px; }
    .lr-subject { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .lr-module-list { display: none; }
    .lr-module-select-label { display: flex; align-items: center; gap: 10px; }
    .lr-module-select { flex: 1; min-width: 0; width: 100%; max-width: 100%; padding: 9px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; font: inherit; font-size: 0.95rem; }
    .lr-panel { padding-left: 0; border-left: 0; min-height: 0; }
    .lr-panel-title { font-size: 1.35rem; }
    .lr-level-note { min-width: 0; }
}
/* Without JavaScript every panel is listed - nothing is hidden */
html:not(.js-enabled) .lr-year[hidden], html:not(.js-enabled) .lr-panel[hidden] { display: block; }
html:not(.js-enabled) .lr-subject[hidden] { display: grid; }

/* the grid layout above must not override [hidden] */
.js-enabled .lr-browser [hidden] { display: none; }
