:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173f49;
  background: #eff9f8;
  font-synthesis: none;
  line-height: 1.6;
  color-scheme: light dark;
  --muted: #45616a;
  --line: #bfdedc;
  --accent: #075d6c;
  --display: ui-rounded, "SF Pro Rounded", "Trebuchet MS", -apple-system, sans-serif;
  --surface: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 50% 0, #e0f8ff, transparent 1000px), #eff9f8; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
a, button, input, select { touch-action: manipulation; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #006eae; outline-offset: 5px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.library-shell { max-width: 1320px; margin: auto; padding: 0 40px; }
.library-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 108px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size:20px; letter-spacing: -.7px; line-height: 1.2; }
.brand img { width: 54px; height: 54px; object-fit: contain; padding: 4px; border: 1px solid #bfdedc; border-radius: 50%; background: #fff; }
.brand small { display: block; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size:10px; letter-spacing: 1.8px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.library-header nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 5px; border: 1px solid #c2dedf; border-radius: 999px; background: linear-gradient(#ffffffdc, #dcf1efd9); box-shadow: inset 0 2px 1px #fff, 0 3px 0 #aecdd066, 0 7px 18px #205a6710; }
.library-header nav a { display: flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; font-size:16px; font-weight: 700; min-height: 48px; }
.library-header nav a:hover { background: #d3edec; }
.library-intro { position: relative; isolation: isolate; overflow: hidden; padding: 22px 38px 26px; border: 2px solid #fff; border-radius: 36px; background: linear-gradient(100deg, #f0fcff 5%, #e4faf7f5 47%, #c8f4edc9), url('/local/wolfwhale/assets/home/library-atrium-canada.png') right center / cover; box-shadow: inset 0 1px 0 #fff, 0 6px 0 #adcfc960, 0 20px 40px #23737d10; }
.library-intro::after { content: ""; position: absolute; z-index: -1; bottom: 28%; right: 6%; width: 230px; height: 65px; border-radius: 50%; background: #66c8c052; filter: blur(12px); }
.welcome { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 250px; padding: 15px 0 24px; }
.welcome-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-size:13px; font-weight: 800; letter-spacing: 1.5px; margin: 0 0 12px; }
.welcome h1 { font-family: var(--display); font-size: clamp(36px, 4.5vw, 56px); line-height: 1.08; letter-spacing: -1.8px; margin: 0 0 18px; font-weight: 800; max-width: 15ch; }
.welcome p:last-child { font-size:16px; line-height: 1.55; color: #365b63; margin: 0; }
.welcome-orca { width: 290px; height: 270px; object-fit: contain; flex: none; filter: drop-shadow(0 17px 9px #17617526); transform: rotate(-6deg); }
.search-form { display: flex; align-items: center; gap: 15px; min-height: 76px; border: 2px solid #9dcacb; border-radius: 22px; padding: 9px 10px 9px 23px; background: #fff; box-shadow: inset 0 2px 3px #347d7910, 0 4px 0 #9acac34d; }
.search-form:focus-within { border-color: #087ca0; box-shadow: 0 0 0 4px #087ca02b; }
.search-form svg { width: 27px; height: 27px; flex: none; color: #39757f; }
.search-form input { width: 100%; min-width: 0; border: 0; padding: 9px 0; background: transparent; outline: none; font-size:16px; min-height: 52px; }
.search-form input::placeholder { color: #4d6b74; opacity: 1; }
.search-form button { background: linear-gradient(#169bac, #087183); color: #fff; border: 1px solid #036074; border-radius: 15px; min-height: 52px; padding: 10px 26px; font-weight: 750; font-size:16px; box-shadow: inset 0 2px 0 #77d2dc, 0 3px 0 #075563; transition: transform .16s, background .16s; }
.search-form button:hover { background: linear-gradient(#128695, #04596b); transform: translateY(-1px); }
.search-form button:active { transform: translateY(2px); box-shadow: inset 0 2px 0 #77d2dc; }
.discovery-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 17px; font-size:16px; }
.discovery-links > span { color: #385a60; font-weight: 650; }
.discovery-links a { display: inline-flex; align-items: center; gap: 13px; min-height: 48px; padding: 9px 13px; border: 1px solid #9ccac8; border-radius: 999px; background: #fffffff0; color: #125867; font-weight: 650; box-shadow: inset 0 1px 0 white, 0 2px 0 #a8ccc675; }
.discovery-links a:hover { background: #d7f1ec; }
#subjects { scroll-margin-top: 24px; padding: 46px 0 48px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.section-heading h2 { font-family: var(--display); font-size:24px; line-height: 1.2; font-weight: 800; margin: 0; letter-spacing: -.7px; }
.section-heading > a { font-size:17px; font-weight: 700; color: var(--accent); padding: 10px 0; min-height: 48px; display: flex; align-items: center; gap: 8px; flex: none; }
.section-heading > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.subject-card { --subject-tint: #d5f4dc; --subject-ink: #246b42; position: relative; display: grid; grid-template-columns: 38% 1fr; align-items: stretch; min-width: 0; border: 2px solid #fff; border-radius: 27px; background: linear-gradient(140deg, #fff 45%, #edf9f5); box-shadow: 0 0 0 1px #b5d8d1, 0 5px 0 #b2d4cd88, 0 10px 19px #2161600b; transition: transform .2s, box-shadow .2s; }
.subject-card:hover, .subject-card[aria-current] { transform: translateY(-3px); box-shadow: 0 0 0 2px #559c9e, 0 7px 0 #b2d4cd88, 0 14px 25px #21616018; }
.subject-card:active { transform: translateY(1px); }
.subject-scene { position: relative; display: flex; align-items: center; min-height: 234px; overflow: hidden; border-radius: 24px 0 0 24px; background: radial-gradient(ellipse at 55% 35%, #fff 3%, var(--subject-tint) 95%); }
.subject-scene > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.subject-scene-strip > img { object-fit: cover; object-position: left center; padding: 0; }
.subject-icon { position: absolute; left: 12px; bottom: 12px; width: 43px; height: 43px; border: 1px solid #ffffffc9; border-radius: 14px; background: #ffffffe6; color: var(--subject-ink); display: grid; place-items: center; box-shadow: 0 3px 7px #24595115; }
.subject-icon svg { width: 25px; height: 25px; }
.subject-science { --subject-tint: #d9e8ff; --subject-ink: #3d58a2; }
.subject-earth { --subject-tint: #cdeeff; --subject-ink: #17638a; }
.subject-math { --subject-tint: #fff0b7; --subject-ink: #84551d; }
.subject-history { --subject-tint: #f8e4c6; --subject-ink: #875b2a; }
.subject-technology { --subject-tint: #dce9f0; --subject-ink: #456080; }
.subject-indigenous { --subject-tint: #e3edc3; --subject-ink: #4b6431; }
.subject-music { --subject-tint: #f2dafa; --subject-ink: #78528e; }
.subject-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 24px 24px 20px; }
.subject-copy strong { display: block; font-family: var(--display); font-size:20px; line-height: 1.2; letter-spacing: -.45px; margin: 0 0 10px; font-weight: 800; }
.subject-copy > span { display: block; font-size:16px; line-height: 1.5; color: var(--muted); }
.subject-copy .subject-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--accent); font-size:16px; line-height: 1.4; font-weight: 700; }
.subject-count > span { font-size:16px; line-height: 1; }
.catalogue { border-top: 2px solid var(--line); padding-top: 36px; scroll-margin-top: 24px; outline: none; }
.catalogue-top { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.catalogue-top h2 { font-family: var(--display); font-size:24px; line-height: 1.15; letter-spacing: -.8px; margin: 0 0 10px; overflow-wrap: anywhere; }
.catalogue-top #count { font-size:17px; color: var(--muted); margin: 0; }
.catalogue-options { display: flex; gap: 14px; flex: none; }
.catalogue-options label { display: grid; gap: 5px; font-size:16px; font-weight: 700; color: var(--muted); }
select { border: 1px solid #99bfc4; border-radius: 13px; background: var(--surface); padding: 12px 28px 12px 13px; min-height: 52px; font-size:17px; color: inherit; max-width: 100%; }
.active-filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #deefed; border-radius: 15px; padding: 10px 18px; margin-top: 24px; font-size:17px; }
.active-filters p { margin: 0; }
.active-filters a { color: var(--accent); font-weight: 700; min-height: 48px; display: flex; align-items: center; flex: none; }
.reference-links { display: flex; align-items: center; gap: 5px 25px; flex-wrap: wrap; font-size:17px; padding: 19px 0 6px; }
.reference-links > span { color: var(--muted); }
.reference-links a { display: inline-flex; align-items: center; color: var(--accent); padding: 9px 0; min-height: 48px; font-weight: 650; }
.reference-links a:hover { text-decoration: underline; }
.subject-section { margin: 30px 0 48px; }
.group-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 0 0 14px; margin-bottom: 20px; }
.group-heading h3 { font-family: var(--display); font-size:20px; line-height: 1.25; margin: 0; letter-spacing: -.5px; }
.group-heading > a { font-size:16px; font-weight: 650; color: var(--accent); min-height: 48px; display: flex; align-items: center; flex: none; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.resource-card { min-width: 0; border: 1px solid #bfd9d8; border-radius: 24px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; box-shadow: 0 4px 0 #b5d6d22b; transition: border-color .18s, box-shadow .18s, transform .18s; }
.resource-card:hover { border-color: #5f989d; box-shadow: 0 7px 20px #18556513; transform: translateY(-2px); }
.resource-main { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 23px; padding: 26px; min-height: 228px; position: relative; flex: 1; }
.resource-art { width: 120px; height: 132px; flex: none; overflow: hidden; display: block; border-radius: 18px; background: white; }
.resource-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.resource-art.triptych img { width: 100%; object-fit: cover; object-position: left center; }
.resource-copy { display: block; min-width: 0; }
.resource-copy:only-child { grid-column: 1 / -1; }
.resource-label { display: block; font-size:15px; line-height: 1.4; font-weight: 700; color: #4c7278; margin-bottom: 8px; }
.resource-copy h3, .resource-copy h4, .resource-copy h5 { font-family: var(--display); font-size:16px; font-weight: 800; line-height: 1.25; letter-spacing: -.35px; margin: 0 0 10px; overflow-wrap: anywhere; }
.resource-description { font-size:16px; line-height: 1.55; color: var(--muted); display: block; }
.resource-arrow { position: absolute; right: 14px; top: 9px; font-size:16px; color: #38717b; }
.resource-versions { display: flex; flex-wrap: wrap; gap: 0 16px; border-top: 1px solid #d8e8e6; padding: 4px 20px; background: #f0f9f7; }
.resource-versions a { font-size:16px; font-weight: 650; padding: 10px 5px; min-height: 48px; display: flex; align-items: center; gap: 6px; color: var(--accent); }
.resource-versions a + a { margin-left: auto; }
.resource-versions a:hover { text-decoration: underline; }
.text-art { display: grid; place-items: center; background: linear-gradient(140deg, #eefaff, #d9efea); font-family: var(--display); font-size:32px; font-weight: 800; color: #276d7b; }
.library-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 35px; }
.library-footer .brand { font-size:16px; }
.library-footer p, .library-footer > a:last-child { font-size:16px; color: var(--muted); }
.library-footer > a:last-child { min-height: 48px; display: flex; align-items: center; }
#empty { text-align: center; padding: 60px 20px; }
#empty h3 { font-family: var(--display); font-size:24px; margin: 0 0 12px; }
#empty p { color: var(--muted); font-size:16px; }
#empty a { display: inline-block; min-height: 48px; padding: 12px 22px; background: #d9efed; border: 1px solid #abcfc9; border-radius: 14px; color: var(--accent); font-size:16px; }
.skip { position: absolute; top: -100px; left: 12px; background: white; padding: 14px; z-index: 10; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topic-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 26px; }
.topic-nav button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; border: 1px solid #abcacb; border-radius: 999px; padding: 10px 17px; background: linear-gradient(#fff, #edf7f4); color: #285761; font-size:17px; font-weight: 700; line-height: 1.3; box-shadow: 0 2px 0 #b6d4cf80; }
.topic-nav button:hover { border-color: #5e959f; background: #dcefeb; }
.topic-nav button[aria-pressed=true] { border-color: #075a69; background: #126f7b; color: #fff; box-shadow: inset 0 2px 0 #3198a4, 0 2px 0 #074d59; }
.topic-nav button span { display: grid; place-items: center; min-width: 26px; min-height: 26px; padding: 0 6px; border-radius: 999px; background: #dcebea; color: #285761; font-size:14px; font-variant-numeric: tabular-nums; }
.topic-nav button[aria-pressed=true] span { background: #fff; color: #0a5965; }
.topic-section { margin: 24px 0 32px; }
.topic-section + .topic-section { border-top: 1px solid var(--line); padding-top: 25px; }
.topic-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.topic-heading h4 { margin: 0; font-family: var(--display); font-size:16px; font-weight: 800; line-height: 1.3; letter-spacing: -.25px; }
.topic-heading > span { color: var(--muted); font-size:16px; white-space: nowrap; }
@media (max-width: 1050px) {
  .library-shell { padding: 0 26px; }
  .library-intro { padding: 18px 28px 24px; }
  .welcome-orca { width: 235px; height: 235px; }
  .subject-card { grid-template-columns: 33% 1fr; }
  .subject-copy { padding: 20px; }
  .subject-copy strong { font-size:16px; }
  .subject-scene > img { padding: 4px; }
  .subject-scene-strip > img { padding: 0; }
  .catalogue-top { align-items: flex-start; flex-direction: column; }
  .resource-main { grid-template-columns: 95px 1fr; padding: 24px 20px; gap: 17px; }
  .resource-art { width: 95px; height: 110px; }
}
@media (max-width: 760px) {
  .library-shell { padding: 0 20px; }
  .library-header { min-height: 97px; gap: 12px; }
  .brand { font-size:16px; }
  .brand img { width: 44px; height: 44px; }
  .brand small { font-size:8px; letter-spacing: 1.3px; }
  .library-header nav { border: 0; background: none; box-shadow: none; padding: 0; }
  .library-header nav a { padding: 9px 13px; font-size:16px; background: #ffffffc9; border: 1px solid #bfdedc; }
  .library-header nav a:first-child { display: none; }
  .welcome { min-height: 215px; }
  .welcome h1 { font-size:32px; }
  .welcome p:last-child { font-size:16px; }
  .welcome-orca { width: 180px; height: 210px; margin-left: -30px; }
  .eyebrow { font-size:12px; letter-spacing: 1.1px; }
  .discovery-links > span { width: 100%; }
  .subject-grid { grid-template-columns: 1fr; gap: 19px; }
  .subject-card { grid-template-columns: 36% 1fr; }
  .subject-scene { min-height: 220px; }
  .subject-copy { padding: 24px; }
  .subject-copy strong { font-size:20px; }
  .subject-copy > span { font-size:16px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-heading h2 { font-size:24px; }
  .section-heading > a { padding: 5px 0; }
  .cards { grid-template-columns: 1fr; gap: 18px; }
  .resource-main { grid-template-columns: 115px 1fr; gap: 22px; }
  .resource-art { width: 115px; height: 130px; }
  .group-heading { align-items: flex-start; }
  .group-heading h3 { font-size:20px; }
  .library-footer { flex-wrap: wrap; padding: 28px 0; }
  .library-footer p { margin: 0; }
}
@media (max-width: 480px) {
  .library-shell { padding: 0 16px; }
  .library-header { min-height: 91px; }
  .brand { font-size:16px; gap: 6px; }
  .brand img { width: 39px; height: 39px; }
  .brand small { font-size:7px; letter-spacing: 1px; }
  .library-header nav a { font-size:15px; padding: 9px 12px; }
  .library-intro { padding: 20px 18px 23px; border-radius: 26px; background-position: 60% center; }
  .welcome { align-items: flex-start; min-height: 175px; padding: 7px 0 25px; gap: 0; }
  .welcome-copy { width: 100%; }
  .welcome h1 { font-size:32px; letter-spacing: -1.3px; padding-right: 40px; margin-bottom: 19px; }
  .welcome .eyebrow { font-size:11px; max-width: 23ch; margin-bottom: 13px; }
  .welcome p:last-child { font-size:16px; max-width: 17ch; }
  .welcome-orca { position: absolute; right: -16px; top: 23px; width: 108px; height: 110px; margin: 0; opacity: .96; }
  .desktop-break { display: none; }
  .search-form { flex-wrap: wrap; gap: 2px 8px; border-radius: 18px; padding: 9px; }
  .search-form svg { width: 24px; height: 24px; margin-left: 3px; }
  .search-form input { width: calc(100% - 38px); flex: 1; font-size:16px; }
  .search-form input::placeholder { font-size:16px; }
  .search-form button { width: 100%; min-height: 48px; padding: 9px 18px; border-radius: 11px; }
  .discovery-links { gap: 10px; margin-top: 22px; }
  .discovery-links a { width: 100%; justify-content: space-between; padding-inline: 16px; }
  #subjects { padding: 34px 0 38px; }
  .section-heading h2 { font-size:24px; }
  .subject-card { grid-template-columns: 1fr; border-radius: 23px; }
  .subject-scene { min-height: 0; height: 175px; border-radius: 20px 20px 0 0; }
  .subject-scene > img { width: 100%; height: 100%; padding: 9px 32px; }
  .subject-scene-strip > img { width: 175px; height: 175px; object-fit: cover; object-position: left center; padding: 0; margin: auto; }
  .subject-copy { padding: 20px 23px 21px; }
  .subject-copy strong { font-size:20px; }
  .subject-copy .subject-count { margin-top: 13px; }
  .catalogue { padding-top: 30px; }
  .catalogue-top h2 { font-size:24px; }
  .catalogue-options { width: 100%; gap: 12px; flex-wrap: wrap; }
  .catalogue-options label:first-child { width: 100%; min-width: 0; }
  .catalogue-options label:last-child { width: 100%; }
  .catalogue-options select { width: 100%; }
  .active-filters { align-items: flex-start; flex-direction: column; gap: 2px; }
  .reference-links { gap: 3px; }
  .reference-links > span, .reference-links a { width: 100%; }
  .group-heading { flex-direction: column; gap: 3px; padding-bottom: 8px; }
  .topic-heading { align-items: flex-start; }
  .topic-heading h4 { font-size:16px; }
  .topic-heading > span { font-size:15px; }
  .topic-nav { gap: 9px; }
  .topic-nav button { font-size:16px; padding: 10px 13px; max-width: 100%; }
  .resource-main { grid-template-columns: 1fr; padding: 23px; gap: 17px; }
  .resource-art { width: 100%; height: 166px; }
  .resource-art img { object-fit: contain; }
  .resource-art.triptych { width: 166px; justify-self: center; }
  .resource-art.text-art { width: 85px; height: 85px; }
  .resource-copy h3, .resource-copy h4, .resource-copy h5 { font-size:16px; }
  .resource-description { font-size:16px; }
  .library-footer > a:last-child { width: 100%; }
}
@media (max-width: 350px) {
  .library-shell { padding: 0 12px; }
  .library-header { flex-wrap: wrap; padding: 18px 0; gap: 13px; }
  .library-header nav a:first-child { display: flex; }
  .library-header nav { width: 100%; }
  .library-header nav a { flex: 1; }
  .library-intro { padding: 17px 14px 22px; }
  .welcome h1 { font-size:24px; padding-right: 0; }
  .welcome-orca { width: 86px; height: 86px; right: -18px; top: 45px; z-index: 0; opacity: .6; }
  .welcome p:last-child { max-width: 18ch; }
  .subject-copy { padding-inline: 20px; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; color: #e6f5f5; background: #10292f; --surface: #19373e; --muted: #bdd4d8; --line: #3a5c62; --accent: #9ce3e8; }
  body { background: radial-gradient(ellipse at 50% 0, #1e515a, transparent 1000px), #10292f; }
  .library-header nav { background: linear-gradient(#294b53, #19383f); border-color: #51727a; box-shadow: inset 0 1px 0 #7a9a9e, 0 3px 0 #08252c; }
  .library-header nav a:hover { background: #355d65; }
  .library-intro { background: linear-gradient(100deg, #153940 5%, #1b4750f5 47%, #102f3cad), url('/local/wolfwhale/assets/home/library-atrium-canada.png') right center / cover; border-color: #608d95; box-shadow: inset 0 1px 0 #84a4a9, 0 6px 0 #081e29, 0 20px 40px #03171c33; }
  .welcome p:last-child, .discovery-links > span { color: #c6e0e3; }
  .search-form { background: #19383f; border-color: #70989f; box-shadow: 0 4px 0 #061f2855; }
  .search-form svg, .search-form input::placeholder { color: #bed9dd; }
  .search-form button { background: linear-gradient(#1693a5, #077084); }
  .discovery-links a { background: #224b54; color: #cef6f6; border-color: #6b99a0; box-shadow: inset 0 1px 0 #609098, 0 2px 0 #08282f; }
  .discovery-links a:hover { background: #30626a; }
  .subject-card { background: linear-gradient(140deg, #20444b, #18373e); border-color: #62888e; box-shadow: 0 0 0 1px #08282f, 0 5px 0 #08282f, 0 10px 19px #0002; }
  .subject-card:hover, .subject-card[aria-current] { box-shadow: 0 0 0 2px #a0d9dc, 0 7px 0 #08282f, 0 14px 25px #0003; }
  .subject-scene { background: radial-gradient(ellipse at 55% 35%, #fff 3%, var(--subject-tint) 95%); }
  .active-filters { background: #254850; }
  select { border-color: #63868e; }
  .resource-card { border-color: #4c7179; box-shadow: 0 4px 0 #031b223f; }
  .resource-card:hover { border-color: #9ed6d8; }
  .resource-label { color: #a5d0d4; }
  .resource-arrow { color: #a2d8df; }
  .resource-versions { background: #20434b; border-color: #416a72; }
  .text-art { background: linear-gradient(140deg, #315d66, #254952); color: #c0f3f5; }
  .topic-nav button { background: linear-gradient(#30525a, #214049); color: #d2eced; border-color: #6b8c92; box-shadow: 0 2px 0 #09242d; }
  .topic-nav button:hover { background: #3d6770; }
  .topic-nav button[aria-pressed=true] { background: #1b7987; color: #fff; border-color: #89d4db; }
  .topic-nav button span { background: #18373f; color: #d5f4f5; }
  #empty a { background: #254e57; border-color: #678d95; }
  .skip { background: #19373e; }
}
@media (prefers-color-scheme: dark) and (max-width: 760px) {
  .library-header nav { background: none; box-shadow: none; }
  .library-header nav a { background: #23464e; border-color: #577c83; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .subject-card, .resource-card, .search-form, .library-intro, .discovery-links a, .library-header nav { border: 2px solid CanvasText; }
  .subject-card[aria-current] { outline: 3px solid Highlight; }
  .search-form button { border: 1px solid ButtonText; }
  .subject-icon { color: CanvasText; }
  .subject-scene > img { mix-blend-mode: normal; }
  .topic-nav button[aria-pressed=true] { outline: 2px solid Highlight; }
}

/* Compact catalogue: normal reading scale and eight subjects in two desktop rows. */
.library-header{min-height:72px}.library-shell{max-width:1320px;padding:0 28px}
.library-intro{padding:16px 24px;border-radius:20px}.welcome{min-height:100px;padding:0 0 12px}.welcome h1{font-size:32px;margin-bottom:8px;max-width:none}.welcome p:last-child{font-size:16px}.welcome-orca{width:130px;height:100px}.eyebrow{margin-bottom:6px}
.search-form{min-height:48px;padding:3px 6px 3px 14px;border-radius:12px}.search-form input{font-size:16px;min-height:40px}.search-form button{min-height:40px;padding:7px 20px}.discovery-links{margin-top:8px;font-size:14px}.discovery-links a{min-height:36px;padding:5px 12px}
#subjects{padding:20px 0}.section-heading{margin-bottom:10px}.section-heading h2{font-size:22px}.section-heading>a{min-height:36px;font-size:14px}
.subject-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.subject-card{grid-template-columns:30% 1fr;border-radius:15px}.subject-scene{min-height:126px;border-radius:13px 0 0 13px}.subject-icon{width:27px;height:27px;left:6px;bottom:6px;border-radius:8px}.subject-icon svg{width:18px;height:18px}.subject-copy{padding:12px}.subject-copy strong{font-size:17px;margin-bottom:6px}.subject-copy>span{font-size:14px;line-height:1.4}.subject-copy .subject-count{font-size:12px;margin-top:8px}
.catalogue{padding-top:20px}.catalogue-top h2{font-size:24px}.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.resource-card{border-radius:14px}.resource-main{grid-template-columns:72px 1fr;gap:12px;padding:16px;min-height:144px}.resource-art{width:72px;height:86px;border-radius:9px}.resource-copy h3,.resource-copy h4,.resource-copy h5{font-size:18px;margin-bottom:6px}.resource-description{font-size:14px}.resource-label{font-size:12px}.resource-versions a{min-height:40px;font-size:13px}.topic-nav{gap:7px;margin:12px 0}.topic-nav button{min-height:40px;font-size:14px;padding:6px 12px}.topic-section{margin:16px 0}.group-heading h3{font-size:22px}
@media(max-width:1000px){.subject-grid,.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.library-shell{padding:0 16px}.library-header{flex-wrap:wrap;padding:12px 0;gap:10px}.welcome h1{font-size:28px}.welcome-orca{width:76px;height:90px}.library-intro{padding:16px}.subject-card{grid-template-columns:1fr}.subject-scene{min-height:80px;border-radius:13px 13px 0 0}.subject-copy{padding:10px}.subject-copy strong{font-size:16px}.subject-copy>span{font-size:14px}.cards{grid-template-columns:1fr}.search-form input{font-size:16px}.catalogue-top{flex-wrap:wrap}}

/* White reading surfaces, with colour reserved for small interface accents. */
:root{color-scheme:light;background:#fff}body{background:#fff;color:#20333b}.library-intro,.subject-card,.subject-scene,.facts,.browse,.deeper,.card{background:#fff;box-shadow:none}.library-intro::after{display:none}.library-intro,.subject-card{border:1px solid #dbe2e5}.library-header nav{background:#fff;box-shadow:none}.welcome-orca{filter:none}
