/* Homepage and public course directory pages. */
:root { --bg: #0f172a; --surface: #1e293b; --border: #334155; --text: #f1f5f9; --muted: #a5b4c8; --directory-accent: #7dd3fc; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
a:focus-visible, select:focus-visible { outline: 2px solid var(--directory-accent); outline-offset: 4px; }
.home-main { width: 100%; max-width: 960px; padding: 1.7rem 1.5rem 1.4rem; margin: 0 auto; flex: 1; }
.home-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: 1.5rem; }
.home-heading h1 { font-size: 1.4rem; font-weight: 750; letter-spacing: -.02em; }
.home-heading > span { color: var(--muted); font-size: .75rem; }
.category-section + .category-section { margin-top: 1.3rem; }
.category-section > h2 { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.category-grid-medicine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-card { display: flex; flex-direction: column; gap: .8rem; min-width: 0; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: background .16s, border-color .16s, transform .16s; }
.category-card:hover { background: #24344b; border-color: #7dd3fc; transform: translateY(-2px); }
.category-meta { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .69rem; color: var(--muted); }
.category-meta > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.category-card h3 { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font-size: 1.1rem; font-weight: 700; }
.category-arrow { color: var(--directory-accent); font-size: 1rem; }
.category-preview { color: var(--muted); font-size: .76rem; line-height: 1.7; }
.site-footer { padding: .9rem 1rem 1.1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .68rem; line-height: 1.7; }
.site-footer p + p { margin-top: .2rem; }
.directory-topbar { height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 0 1rem; background: var(--surface); border-bottom: 1px solid var(--border); font-size: .8rem; }
.directory-brand { font-weight: 750; font-size: .95rem; }
.directory-topbar > a:last-child { color: var(--muted); }
.course-main { width: 100%; max-width: 1040px; padding: 1.5rem; margin: 0 auto; flex: 1; }
.course-breadcrumb { color: var(--muted); font-size: .75rem; margin-bottom: 1rem; }
.course-breadcrumb a:hover { color: var(--text); }
.course-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.course-heading h1 { font-size: 1.4rem; font-weight: 750; }
.course-heading p { color: var(--muted); font-size: .75rem; margin-top: .35rem; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.course-entry { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 88px; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.course-entry:hover { border-color: var(--directory-accent); background: #24344b; }
.course-info { min-width: 0; }
.course-name { display: block; font-size: .97rem; font-weight: 650; overflow-wrap: anywhere; }
.course-detail { display: block; margin-top: .4rem; color: var(--muted); font-size: .69rem; line-height: 1.5; }
.course-arrow { color: var(--directory-accent); flex-shrink: 0; }
.supplementary-practice { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.15rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.supplementary-practice h2 { font-size: .85rem; font-weight: 600; }
.supplementary-practice p { margin-top: .3rem; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.supplementary-practice > a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; color: var(--directory-accent); font-size: .8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) { .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .home-main { padding: 1.2rem .8rem 1rem; }
  .home-heading { margin-bottom: 1.15rem; }
  .home-heading h1 { font-size: 1.2rem; }
  .home-heading > span { font-size: .68rem; }
  .category-grid { gap: .5rem; }
  .category-section + .category-section { margin-top: 1.1rem; }
  .category-card { padding: .8rem .6rem; gap: .6rem; border-radius: 10px; }
  .category-meta > span:first-child { display: none; }
  .category-meta { font-size: .64rem; }
  .category-card h3 { font-size: .87rem; gap: .1rem; }
  .category-arrow { font-size: .8rem; }
  .category-preview { font-size: .65rem; line-height: 1.75; }
  .site-footer { padding: .7rem .75rem .9rem; font-size: .64rem; }
  .course-main { padding: 1rem .8rem; }
  .course-heading { gap: .5rem; margin-bottom: 1rem; }
  .course-heading h1 { font-size: 1.2rem; }
  .course-heading p { font-size: .69rem; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .course-entry { min-height: 68px; padding: .8rem .65rem; }
  .course-name { font-size: .88rem; }
  .course-detail { display: none; }
}
@media (prefers-reduced-motion: reduce) { .category-card { transition: none; } .category-card:hover { transform: none; } }

/* Direct course entrances with one top-level category menu. */
.home-direct-courses { padding-top: 4px; }
.home-course-menu { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; border-bottom: 1px solid var(--border); }
.home-course-tabs { display: flex; gap: .75rem; }
.home-course-tabs button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem .5rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; font-weight: 650; cursor: pointer; }
.home-course-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--directory-accent); }
.home-course-tabs button:focus-visible { outline: 2px solid var(--directory-accent); outline-offset: 2px; }
.home-resource-link[hidden] { display: none; }
.home-resource-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--directory-accent); font-size: .72rem; white-space: nowrap; }
.home-course-panel[hidden] { display: none; }
.home-course-section + .home-course-section { margin-top: .85rem; }
.home-course-section-title { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.4; }
.home-course-section-title::after { content: ''; height: 1px; flex: 1; background: var(--border); }
.home-course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.home-course-entry {
  --entry-accent: 45, 212, 191;
  --entry-button: 0, 133, 122;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 68px; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 10px;
  background-color: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .15s;
}
.home-course-entry::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: rgb(var(--entry-button)); pointer-events: none;
}
[aria-labelledby="medicine-clinical-heading"] .home-course-entry,
[aria-labelledby="tcm-clinical-heading"] .home-course-entry {
  --entry-accent: 56, 189, 248;
  --entry-button: 0, 123, 184;
}
[aria-labelledby="tcm-classics-heading"] .home-course-entry {
  --entry-accent: 187, 164, 255;
  --entry-button: 124, 58, 237;
}
@media (hover: hover) and (pointer: fine) {
  .home-course-entry:hover {
    background-color: #24344b; border-color: rgba(var(--entry-accent), .6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .04);
    transform: translateY(-1px);
  }
}
.home-course-entry:focus-visible { outline-color: rgb(var(--entry-accent)); border-color: rgba(var(--entry-accent), .6); background-color: #24344b; }
.home-course-entry:active { background-color: #24344b; border-color: rgb(var(--entry-accent)); box-shadow: inset 0 1px 4px rgba(0, 0, 0, .14); transform: translateY(1px); }
.home-entry-info { display: flex; flex-direction: column; justify-content: center; gap: .2rem; flex: 1; min-width: 0; }
.home-entry-hint { color: rgb(var(--entry-accent)); font-size: .68rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.home-entry-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 1.2rem; width: 1.2rem; margin-right: .3rem; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 1.2rem; font-weight: 400; line-height: 1; }
.home-entry-title { min-width: 0; color: var(--text); font-size: .92rem; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.home-entry-action {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  flex-shrink: 0; margin-left: auto; padding: .35rem .6rem;
  border: 1px solid rgb(var(--entry-button)); border-radius: 7px;
  background: rgb(var(--entry-button)); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  font-size: .72rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
  transition: box-shadow .15s;
}
.home-entry-action-arrow { display: inline-block; flex: 0 0 auto; font-size: .8rem; line-height: 1; }
.home-course-entry:focus-visible .home-entry-action,
.home-course-entry:active .home-entry-action { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
@media (hover: hover) and (pointer: fine) {
  .home-course-entry:hover .home-entry-action { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
}
.home-extra-practice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .55rem; margin-top: .55rem; }
.home-extra-practice a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--muted); font-size: .75rem; }
.home-extra-practice a:hover { color: var(--directory-accent); }
.home-extra-practice > span { color: var(--muted); font-size: .67rem; }
@media (max-width: 560px) {
  .home-direct-courses { padding: 4px .8rem .8rem; }
  .home-course-menu { margin-bottom: .7rem; }
  .home-course-tabs { gap: .7rem; }
  .home-course-tabs button { font-size: .86rem; }
  .home-course-grid { gap: .45rem; }
  .home-course-entry { min-height: 60px; padding: .55rem; gap: .3rem; border-radius: 9px; }
  .home-entry-title { font-size: .88rem; }
  .home-entry-icon { flex-basis: 1rem; width: 1rem; font-size: 1rem; }
  .home-entry-info { gap: .15rem; }
  .home-entry-hint { font-size: .62rem; }
  .home-entry-action { padding: .3rem; font-size: .68rem; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) { .home-course-entry, .home-entry-action { transition: none; } .home-course-entry:hover, .home-course-entry:active { transform: none; } }

/* Course library and store share the existing dark blue directory surfaces. */
[data-course-library] [hidden]{display:none!important}
.library-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 18px}
.library-heading h1{font-size:1.15rem;margin:0;font-weight:650}.library-heading a{color:var(--directory-accent);font-size:.8rem;white-space:nowrap}
.library-status,.library-intro{font-size:.82rem;line-height:1.8;color:var(--muted);margin:12px 0 16px}
.library-status{padding:10px 12px;background:#16263b;border:1px solid var(--border);border-radius:8px;color:#bfddf0}
.library-empty{padding:26px 18px;text-align:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;margin:16px 0}.library-empty p{font-size:.9rem;color:var(--muted);margin-bottom:16px}
.home-library-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:.74rem;color:var(--muted);margin:8px 0 12px}.home-library-tools button{padding:6px 0;border:0;background:none;font:inherit;color:var(--directory-accent);cursor:pointer}
.library-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.library-product{padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);min-width:0}.library-product h2{font-size:1.08rem;margin:0 0 10px;color:var(--text)}
.library-description{font-size:.84rem;line-height:1.9;color:var(--muted);margin:0 0 14px}.library-expiry{font-size:.8rem;line-height:1.8;color:#bbd9ed;margin:10px 0 18px}
.library-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}.library-added{font-size:.78rem;color:var(--muted)}
.library-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 14px;border:1px solid #475569;border-radius:7px;background:#182c43;color:#d8e8f5;font:inherit;font-size:.8rem;cursor:pointer;text-decoration:none}
.library-button.primary{background:#075985;border-color:#0284c7;color:#fff}.library-button.quiet{background:none;border-color:transparent;color:var(--muted)}.library-button:hover{border-color:#7dd3fc}.library-button:disabled{opacity:.5;cursor:wait}
.library-notes{border-top:1px solid var(--border);padding-top:18px;margin-top:24px;font-size:.76rem;line-height:1.9;color:var(--muted)}.library-notes p{margin-bottom:10px}.library-notes a{display:inline-block;color:var(--directory-accent);margin:8px 22px 0 0}
.library-dialog{position:fixed;inset:0;margin:auto;padding:26px;width:min(480px,calc(100% - 32px));max-height:85vh;overflow-y:auto;border:1px solid #475569;border-radius:14px;background:#17253a;color:#e2e8f0;box-shadow:0 20px 70px #0008;font:14px/1.8 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;z-index:10002}
.library-dialog::backdrop{background:#020617bb;backdrop-filter:blur(4px)}.library-dialog h2{font-size:20px;margin:0 0 12px}.library-dialog p{margin:10px 0}
.library-use-credit{display:flex;align-items:baseline;gap:9px;margin:16px 0;color:#cbd5e1;font-size:13px}.library-use-credit input{accent-color:#38bdf8}
.library-code-label{display:block;margin:16px 0;color:#cbd5e1;font-size:13px}.library-code-label input{box-sizing:border-box;display:block;width:100%;margin-top:8px;padding:10px 12px;border:1px solid #475569;border-radius:7px;background:#0f172a;color:#e2e8f0;font:inherit;font-size:16px;line-height:1.5}
.library-error{color:#f8bd91;font-size:12px;min-height:22px}.library-dialog [hidden]{display:none!important}
[data-course-library] :is(a,button,input):focus-visible,.library-dialog :is(button,input):focus-visible{outline:2px solid #7dd3fc;outline-offset:3px}
@media(max-width:600px){.library-products{grid-template-columns:1fr}.library-product{padding:14px}.library-heading{margin:12px 0}.library-dialog{padding:22px}.library-actions{gap:8px}.library-button{font-size:.78rem}}

/* Public discovery and compact, account-aware course cards. */
.library-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.library-credit{font-size:.7rem;color:#99daca;background:#0e3936;border:1px solid #1d5f57;border-radius:5px;padding:3px 7px}
.library-products{align-items:start}
.library-product-heading{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.library-product-heading h2{margin:0;font-size:1.08rem}
.library-product-icon{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;border:1px solid #315353;border-radius:9px;background:#173c3c;font-size:21px}
[data-pack-id="tcm"] .library-product-icon{background:#1a3445;border-color:#335069}
.library-product-state{margin-left:auto;flex-shrink:0;color:#9bacbf;font-size:.7rem;line-height:1.5;padding:3px 7px;border:1px solid #415166;border-radius:5px}
.library-product-state.is-owned{color:#a6e4d2;border-color:#32665a;background:#173d35}
.library-product.is-owned{border-color:#32665a;background:linear-gradient(120deg,#193b38,var(--surface) 80%)}
.library-owned-status{display:inline-flex;align-items:center;gap:5px;padding:7px 4px;color:#a6e4d2;font-size:.78rem;line-height:1.5;white-space:nowrap}
.library-product .library-description{font-size:.8rem;line-height:1.8;min-height:0;margin:0 0 12px}
.library-product .library-actions{margin-top:0;gap:8px}
.library-product .library-button.primary{background:#087f72;border-color:#199d8c}
.library-course-contents{margin-top:18px;border-top:1px solid var(--border);padding-top:12px}
.library-course-contents>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;color:var(--directory-accent);font-size:.76rem;list-style:none;min-height:30px}
.library-course-contents>summary::after{content:'⌄';font-size:15px}.library-course-contents[open]>summary::after{content:'⌃'}
.library-course-contents>summary span{margin-left:auto;color:var(--muted);font-size:.68rem}
.library-course-contents>p{font-size:.72rem;color:var(--muted);line-height:1.7;margin:10px 0}
.library-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;margin-top:10px}
.library-subjects a{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:38px;border-bottom:1px solid #33415580;color:#c5d3e3;font-size:.75rem}
.library-subjects a:hover{color:#7dd3fc}.library-subjects a span{color:#6ebad7}
.library-product-options{position:relative;margin-left:auto;font-size:.74rem;color:var(--muted)}
.library-product-options>summary{cursor:pointer;list-style:none;min-height:42px;padding:10px 4px}
.library-product-options[open]{z-index:2}
.library-product-options>button{position:absolute;right:0;top:100%;min-width:130px;background:#1e3047!important;border:1px solid #475569!important;box-shadow:0 6px 20px #0005}
.library-help{display:flex;justify-content:flex-end;margin-top:18px;font-size:.74rem;color:var(--muted)}.library-help a{padding:8px 0}.library-help a:hover{color:#7dd3fc}
.library-course-contents>summary:focus-visible,.library-product-options>summary:focus-visible{outline:2px solid #7dd3fc;outline-offset:3px}
#home-discover .library-products{margin-bottom:24px}
@media(max-width:600px){.library-product-heading{gap:8px}.library-product-heading h2{font-size:1.04rem}.library-title-row{gap:7px}.library-credit{font-size:.65rem}.library-product .library-description{min-height:0}.library-subjects{gap:4px 10px}.library-product-options>button{min-width:120px}}

/* Catalogue / library navigation and public pack homepages. */
.library-view-tabs{display:flex;gap:20px;border-bottom:1px solid var(--border);margin-bottom:22px}
.library-view-tabs a{display:inline-flex;align-items:center;min-height:44px;padding:5px 2px;border-bottom:2px solid transparent;font-size:.92rem;color:var(--muted)}
.library-view-tabs a[aria-current="page"]{border-color:var(--directory-accent);color:var(--text);font-weight:650}
.catalogue-main>.library-heading{margin:0 0 8px}.catalogue-main>.library-intro{margin:0 0 16px}
.library-product-count{margin-left:auto;font-size:.68rem;color:var(--muted);white-space:nowrap}
.library-product-options{margin-left:0}
.library-button{min-height:38px;padding:7px 11px}
/* Match the original course switcher and two-column subject cards. */
.home-course-tabs a{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.55rem .5rem;border-bottom:2px solid transparent;color:var(--muted);font-size:.92rem;font-weight:650}
.home-course-tabs a[aria-current="page"]{color:var(--text);border-bottom-color:var(--directory-accent)}
.pack-main{padding-top:16px}.pack-main .home-course-grid{align-items:start}
.library-view-tabs [hidden]{display:none!important}
.catalogue-main .library-products{margin-top:0}
@media(max-width:600px){.catalogue-main,.pack-main{padding-top:14px}.library-view-tabs{margin-bottom:18px}.library-product-heading h2{font-size:1rem}.home-course-tabs a{font-size:.86rem}}

/* Guest course cards place the course name and its entry on the same row. */
.is-guest-catalogue .library-product{display:flex;align-items:center;justify-content:space-between;gap:12px}
.is-guest-catalogue .library-product-heading{margin-bottom:0;min-width:0}
.is-guest-catalogue .library-actions{margin:0;flex-shrink:0}
.is-guest-catalogue .library-button{white-space:nowrap}

.library-product-heading h2{min-width:0}.library-product-heading .library-home-toggle{margin-left:auto;flex-shrink:0;color:var(--directory-accent);border-color:var(--border);padding:5px 11px;min-height:34px}

.library-directories{padding-top:4px}

/* Keep the two navigation rows close to the course content. */
.catalogue-main{padding-top:8px}
.catalogue-main .library-view-tabs{margin-bottom:4px}
.catalogue-main .library-view-tabs a{min-height:40px;padding:4px 2px}
.catalogue-main .library-directories{padding-top:0}
.catalogue-main .home-course-menu{margin-bottom:8px}
.catalogue-main .home-course-tabs button{min-height:36px;padding:.3rem .5rem}
.catalogue-main .home-resource-link{min-height:36px}

.catalogue-main .library-empty{padding:24px 0;margin:0;border:0;background:none}

/* Welcome appears only when the signed-in homepage has no added courses. */
.catalogue-main .library-welcome{max-width:640px;margin:clamp(40px,9vh,92px) auto 56px;padding:0 20px}
.library-welcome-icon{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 24px;border:1px solid #315353;border-radius:16px;background:#173c3c;font-size:30px}
.library-welcome h2{margin:0 0 16px;font-size:clamp(24px,3vw,32px);line-height:1.4;letter-spacing:.02em;font-weight:700;text-wrap:balance}
.library-welcome .library-welcome-copy{max-width:480px;margin:0 auto 26px;color:var(--muted);font-size:15px;line-height:1.95;text-wrap:balance}
.library-welcome .library-welcome-next{margin:14px 0 10px;color:var(--muted);font-size:13px;line-height:1.9}
.library-welcome>.library-button{min-height:46px;min-width:170px;gap:18px;padding:10px 20px;border-color:#199d8c;border-radius:8px;background:#087f72;font-size:15px;font-weight:600}
.library-welcome>.library-button:hover{background:#0a9182;border-color:#4fd1bd}
.library-welcome-guide{display:inline-flex;align-items:center;justify-content:center;min-height:44px;color:var(--directory-accent);font-size:14px;line-height:1.7}
.library-welcome-guide:hover{text-decoration:underline;text-underline-offset:4px}
.catalogue-main>#library-empty:not([hidden])~.library-help{display:none}
@media(max-width:600px){.catalogue-main .library-welcome{margin:42px auto 36px;padding:0 8px}.library-welcome-icon{margin-bottom:20px}.library-welcome h2{font-size:clamp(22px,5.7vw,26px)}.library-welcome .library-welcome-copy{font-size:14px}.library-welcome-guide{font-size:13px}}

/* Preparatory courses expose their outline without purchase controls. */
.library-planned-heading { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.library-product .library-planned-heading h2 { margin: 0; }
.library-planned-status { margin-left: auto; color: var(--muted); font-size: .66rem; line-height: 1.4; white-space: nowrap; }
.library-unopened-status { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.is-guest-catalogue .library-product[data-course-stage="planned"] { display: block; }
.is-guest-catalogue [data-course-stage="planned"] .library-product-heading { margin-bottom: 10px; }

/* Course introductions have a dedicated action row. */
.is-guest-catalogue .library-product[data-overview]{display:block}.is-guest-catalogue [data-overview] .library-product-heading{margin-bottom:10px}

@media(max-width:600px){.catalogue-main .home-course-menu{flex-wrap:wrap}.catalogue-main .home-course-tabs{flex-wrap:wrap;gap:.25rem}.catalogue-main .home-resource-link{margin-left:auto}}
.library-availability-note{color:var(--muted);font-size:.78rem;line-height:1.6}
