:root {
  --bg: #07090c;
  --navy: #091321;
  --panel: rgba(13, 18, 25, .72);
  --text: #f1eee7;
  --muted: #9ba0a8;
  --dim: #686e77;
  --line: rgba(255, 255, 255, .13);
  --gold: #bba14f;
  --gold-soft: #d2bd78;
  --max: min(1380px, calc(100vw - 64px));
  --ease: cubic-bezier(.2, .75, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 9%, rgba(187, 161, 79, .12), transparent 26%),
    radial-gradient(circle at 88% 30%, rgba(49, 103, 145, .13), transparent 28%),
    linear-gradient(125deg, #07090c 0%, #09111c 52%, #07090c 100%);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .14;
  background-image: radial-gradient(rgba(255, 255, 255, .42) .65px, transparent .65px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
main, .site-header, footer { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-top: 1px solid rgba(187, 161, 79, .62);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(rgba(255,255,255,.11) .6px, transparent .6px) 0 0 / 16px 16px,
    rgba(5, 5, 6, .92);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: var(--max);
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  background: transparent;
}
.brand img {
  width: 312px;
  height: 66px;
  display: block;
  object-fit: contain;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.source-theme-toggle,
.header-home {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 800 10px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.source-theme-toggle {
  color: var(--text);
  background: rgba(255,255,255,.055);
  cursor: pointer;
}
.source-theme-toggle:hover,
.source-theme-toggle:focus-visible {
  color: var(--gold-soft);
  border-color: rgba(187,161,79,.48);
  background: rgba(187,161,79,.1);
  outline: none;
  transform: translateY(-1px);
}
.header-home {
  min-width: 154px;
  padding-inline: 18px;
  color: #101113;
  border-color: var(--gold);
  background: var(--gold);
}
.header-home:hover,
.header-home:focus-visible {
  color: var(--text);
  border-color: var(--text);
  background: transparent;
  outline: none;
  transform: translateY(-1px);
}
.header-home-arrow {
  font-size: 16px;
  transition: transform .25s var(--ease);
}
.header-home:hover .header-home-arrow,
.header-home:focus-visible .header-home-arrow { transform: translateX(-3px); }

.sources-hero {
  width: var(--max);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(370px, .85fr);
  align-items: center;
  gap: 72px;
  margin: auto;
  padding: 94px 0 88px;
  position: relative;
}
.eyebrow {
  margin: 0 0 19px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  display: inline-block;
  margin: 0 14px 3px 0;
  background: currentColor;
}
.sources-hero h1 {
  max-width: 820px;
  margin: 0 0 28px;
  font-size: clamp(62px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .86;
}
.sources-hero h1 em,
.library-head h2 em {
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.hero-copy {
  max-width: 570px;
  margin-bottom: 28px;
  color: #b2b6bd;
  font-size: clamp(16px, 1.55vw, 20px);
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-link span { color: var(--gold); }

.hero-source-orbit {
  width: min(100%, 500px);
  aspect-ratio: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: auto;
  padding: 68px;
  border: 1px solid rgba(187, 161, 79, .22);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(25, 39, 56, .7), rgba(7, 10, 15, .36) 66%, transparent 67%);
  box-shadow: 0 0 110px rgba(26, 68, 102, .14), inset 0 0 70px rgba(187, 161, 79, .035);
}
.hero-source-orbit::before {
  content: "";
  position: absolute;
  inset: 38px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.orbit-line {
  position: absolute;
  inset: -13px 42%;
  border-top: 1px solid rgba(187,161,79,.3);
  border-right: 0;
  border-bottom: 1px solid rgba(187,161,79,.12);
  border-left: 0;
  border-radius: 50%;
  background: transparent;
  transform: rotate(42deg);
  transform-box: border-box;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform;
  animation: source-orbit-primary 18s linear infinite;
}
.orbit-line-two {
  inset: 15% -5%;
  transform: rotate(-21deg);
  animation-name: source-orbit-secondary;
  animation-duration: 24s;
  animation-direction: reverse;
}
@keyframes source-orbit-primary {
  from { transform: rotate(42deg); }
  to { transform: rotate(402deg); }
}
@keyframes source-orbit-secondary {
  from { transform: rotate(-21deg); }
  to { transform: rotate(339deg); }
}
.hero-source-orbit > p {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .2em;
}
.hero-source-names { position: relative; z-index: 1; display: grid; gap: 13px; }
.hero-source-names a {
  width: fit-content;
  color: #e8e5de;
  font-size: clamp(23px, 2.2vw, 34px);
  font-weight: 720;
  letter-spacing: -.04em;
  line-height: 1;
  opacity: .88;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.hero-source-names a:hover { color: var(--gold-soft); transform: translateX(6px); }
.hero-source-names .serif-mark { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
.hero-index {
  position: absolute;
  right: 0;
  bottom: 46px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  color: var(--dim);
}
.hero-index span { font-family: Georgia, serif; font-size: 38px; line-height: .9; }
.hero-index small { font-size: 7px; letter-spacing: .13em; line-height: 1.4; }

.source-principles {
  width: var(--max);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.source-principles article {
  min-height: 174px;
  padding: 30px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-content: center;
  column-gap: 14px;
}
.source-principles article + article { border-left: 1px solid var(--line); }
.source-principles span { grid-row: 1 / 3; color: var(--gold); font: 18px Georgia, serif; }
.source-principles strong { font-size: 16px; letter-spacing: -.02em; }
.source-principles p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.library { width: var(--max); margin: auto; padding: 124px 0 120px; }
.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 42px;
}
.library-head h2 {
  margin: 0;
  font-size: clamp(48px, 6.4vw, 88px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .95;
}
#source-count { margin: 0 0 8px; color: var(--gold-soft); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.filters {
  position: sticky;
  top: 91px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 1px;
  margin-bottom: 34px;
  padding: 1px;
  background: var(--line);
  box-shadow: 0 16px 35px rgba(0,0,0,.24);
}
.filters label { display: block; min-width: 0; padding: 14px 17px 12px; background: rgba(9, 12, 17, .96); }
.filters label span { display: block; margin-bottom: 4px; color: #747a83; font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
.filters input, .filters select {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
}
.filters input::placeholder { color: #707680; }
.filters select option { color: var(--text); background: #0b0f15; }

.source-grid {
  counter-reset: source-card;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.source-card {
  counter-increment: source-card;
  scroll-margin-top: 165px;
  min-width: 0;
  min-height: 480px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,.043), rgba(255,255,255,.012)),
    rgba(8, 12, 18, .7);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.source-card::before {
  content: "/" counter(source-card, decimal-leading-zero);
  position: absolute;
  top: 25px;
  right: 25px;
  color: #626871;
  font-size: 9px;
  letter-spacing: .12em;
}
.source-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -70px;
  bottom: -70px;
  border: 1px solid rgba(187,161,79,.16);
  border-radius: 50%;
  transition: transform .4s var(--ease);
}
.source-card:hover {
  z-index: 2;
  border-color: rgba(187,161,79,.55);
  background: linear-gradient(145deg, rgba(187,161,79,.08), rgba(255,255,255,.012)), rgba(8,12,18,.78);
  transform: translateY(-4px);
}
.source-card:hover::after { transform: scale(1.35); }
.source-brand {
  height: 74px;
  display: flex;
  align-items: flex-end;
  margin: 0 0 22px;
  padding: 0 48px 17px 0;
  border-bottom: 1px solid var(--line);
  color: #eeebe4;
  overflow: hidden;
}
.source-brand img { display: block; max-width: 76%; max-height: 42px; object-fit: contain; filter: grayscale(1) brightness(2.2); }
.source-brand .text-mark { font-size: clamp(20px, 2vw, 29px); font-weight: 720; letter-spacing: -.045em; line-height: 1; }
.source-brand .symbol-mark { font: 45px/1 Georgia, serif; }
.source-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; color: #7e848d; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.category-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier { flex: 0 0 auto; color: var(--gold); }
.source-card > h2 { margin: 0 0 7px; font-size: clamp(23px, 2vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; }
.publisher { margin-bottom: 14px; color: #777d86; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.description { margin-bottom: 25px; color: #adb1b8; font-size: 13px; }

.course-usage { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.course-usage h3 { margin-bottom: 11px; color: var(--gold); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.course-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.course-chip, .scope-chip { padding: 6px 8px; border: 1px solid var(--line); border-radius: 100px; color: #c2c5ca; font-size: 9px; line-height: 1.25; }
.scope-chip { border-color: rgba(187,161,79,.34); color: #d1c27f; text-transform: uppercase; }
.course-chip[hidden] { display: none; }
.show-courses { margin-top: 11px; padding: 0 0 3px; border: 0; border-bottom: 1px solid currentColor; color: var(--gold); background: none; font: inherit; font-size: 9px; cursor: pointer; }
.source-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 19px; position: relative; z-index: 1; }
.brand-policy { max-width: 57%; margin: 0; color: #666c75; font-size: 8px; }
.official-link { flex: 0 0 auto; color: #e3e0d9; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.official-link:hover { color: var(--gold-soft); }

.source-disclaimer {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 44px;
  margin-top: 64px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.source-disclaimer strong { color: var(--gold); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.source-disclaimer p { max-width: 880px; margin: 0; color: #7d838b; font-size: 11px; }
.empty-state, .load-error, .noscript-library { padding: 48px; border: 1px solid var(--line); color: var(--muted); text-align: center; }
.noscript-library { margin-top: 20px; text-align: left; }

footer {
  width: var(--max);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 42px;
  margin: auto;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-brand img { width: 180px; display: block; margin-bottom: 12px; }
footer p { margin: 5px 0 0; font-size: 10px; }
footer div:nth-child(2) { display: flex; gap: 24px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
footer > p { grid-column: 1 / -1; color: #626870; }

@media (max-width: 1100px) {
  .sources-hero { grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: 36px; }
  .hero-source-orbit { padding: 55px; }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --max: calc(100vw - 24px); }
  .header-inner { min-height: 78px; gap: 12px; }
  .brand img { width: 238px; height: 52px; }
  .header-actions { gap: 6px; }
  .source-theme-toggle,
  .header-home { min-height: 44px; }
  .header-home { min-width: 140px; padding-inline: 15px; }
  .sources-hero { min-height: 0; grid-template-columns: 1fr; gap: 52px; padding: 76px 0 70px; }
  .sources-hero h1 { font-size: clamp(58px, 18vw, 84px); }
  .hero-source-orbit { width: min(100%, 420px); margin: auto; padding: 56px; }
  .hero-source-names a { font-size: clamp(23px, 7vw, 31px); }
  .hero-index { display: none; }
  .source-principles { grid-template-columns: 1fr; }
  .source-principles article { min-height: 132px; padding: 25px 18px; }
  .source-principles article + article { border-left: 0; border-top: 1px solid var(--line); }
  .library { padding: 84px 0 86px; }
  .library-head { display: block; }
  #source-count { margin-top: 15px; }
  .filters { position: static; grid-template-columns: 1fr; gap: 1px; }
  .source-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 0; padding: 23px; }
  .source-brand .text-mark { font-size: 25px; }
  .source-disclaimer { grid-template-columns: 1fr; gap: 9px; }
  footer { grid-template-columns: 1fr; }
  footer > p { grid-column: auto; }
}

@media (max-width: 620px) {
  .brand img { width: 170px; height: 46px; }
  .source-theme-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  .source-theme-toggle [data-theme-label] { display: none; }
  .header-home { min-width: 0; padding-inline: 12px; gap: 7px; font-size: 9px; }
}
@media (max-width: 430px) {
  .brand img { width: 150px; }
  .header-home-label { font-size: 0; }
  .header-home-label::after { content: "Home"; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit-line { animation: none; }
  .source-card, .hero-source-names a { transition: none; }
}

/* Cream light mode — same tonal system as the approved CCY homepage. */
html[data-theme="light"] {
  --bg: #f6eddc;
  --navy: #ead7b6;
  --panel: rgba(252,247,237,.74);
  --text: #232722;
  --muted: #625b50;
  --dim: #7a6f60;
  --line: rgba(70,52,25,.16);
  --gold: #806018;
  --gold-soft: #8c6920;
  color-scheme: light;
}
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 13% 9%, rgba(128,96,24,.13), transparent 27%),
    radial-gradient(circle at 88% 30%, rgba(113,82,34,.07), transparent 30%),
    linear-gradient(125deg, #f6eddc 0%, #ead7b6 52%, #faf4e8 100%);
}
html[data-theme="light"] body::before {
  opacity: .1;
  background-image: radial-gradient(rgba(83,59,24,.42) .65px, transparent .65px);
}
html[data-theme="light"] .site-header {
  background: radial-gradient(rgba(83,59,24,.12) .6px, transparent .6px) 0 0 / 16px 16px, rgba(248,240,226,.92);
}
html[data-theme="light"] .brand img { filter: brightness(.2); }
html[data-theme="light"] .source-theme-toggle { background: rgba(252,247,237,.75); }
html[data-theme="light"] .header-home { color: #f9f3e7; border-color: #806018; background: #806018; }
html[data-theme="light"] .header-home:hover,
html[data-theme="light"] .header-home:focus-visible { color: #232722; border-color: #232722; background: transparent; }
html[data-theme="light"] .hero-copy { color: #5f584d; }
html[data-theme="light"] .hero-source-orbit {
  background: radial-gradient(circle at 50% 50%, rgba(232,213,180,.83), rgba(252,247,237,.42) 66%, transparent 67%);
  box-shadow: 0 0 110px rgba(128,96,24,.1), inset 0 0 70px rgba(128,96,24,.05);
}
html[data-theme="light"] .hero-source-names a { color: #2c2f2a; }
html[data-theme="light"] .source-principles article { background: rgba(252,247,237,.2); }
html[data-theme="light"] .filters { box-shadow: 0 16px 35px rgba(70,52,25,.12); }
html[data-theme="light"] .filters label { background: rgba(248,240,226,.97); }
html[data-theme="light"] .filters select option { color: #232722; background: #f8f0e2; }
html[data-theme="light"] .source-card {
  background: linear-gradient(145deg, rgba(252,247,237,.92), rgba(232,213,180,.68));
  box-shadow: 0 13px 32px rgba(70,52,25,.07);
}
html[data-theme="light"] .source-card:hover {
  background: linear-gradient(145deg, #fcf7ed, #dfc49a);
}
html[data-theme="light"] .source-brand { color: #272a25; }
html[data-theme="light"] .source-brand img { filter: grayscale(1) contrast(1.15); }
html[data-theme="light"] .description { color: #5f584e; }
html[data-theme="light"] .course-chip { color: #4d473e; }
html[data-theme="light"] .official-link { color: #292c27; }
