/* Quant Finance Topic Library — prototype-only styles
   Uses the site's existing styles.css and presentation.css first. */
.topic-library { --topic-link:#155783; --topic-line:#dce5ec; --topic-muted:#50677d; }
.topic-library .topics-lead-strong { font-weight:600; color:#324d60; }
.topic-library .topic-overview { padding-top:34px; }
.topic-library .topic-stats { display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }
.topic-library .topic-stat { display:inline-flex; align-items:center; gap:7px; font-size:13px; color:#50677d; border:1px solid #d8e3ec; border-radius:100px; background:#fff; padding:7px 13px; }
.topic-library .topic-stat strong { color:#193247; }
.topic-library .topic-guide { background:#f7fafc; border:1px solid #dce7f0; border-left:3px solid #2877a5; border-radius:6px; padding:17px 21px; margin:0 0 26px; font-size:14px; line-height:1.65; color:#4e6476; }
.topic-library .topic-guide strong { color:#193247; }
.topic-library .topic-jump-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:22px; }
.topic-library a.topic-jump { display:flex; flex-direction:column; gap:9px; padding:23px 24px; border:1px solid #dce5ec; border-radius:8px; background:#fff; min-height:145px; text-decoration:none; }
.topic-library a.topic-jump:hover { border-color:#91b8ce; background:#f7fafc; }
.topic-library a.topic-jump strong { font-size:20px; color:#193247; line-height:1.35; }
.topic-library a.topic-jump span { color:#50677d; font-size:13px; }
.topic-library a.topic-jump b { color:#155783; font-size:13px; margin-top:auto; }
.topic-library .topic-course { padding-top:32px; scroll-margin-top:25px; }
.topic-library .topic-course + .topic-course { border-top:1px solid #dce5ec; }
.topic-library .topic-course-head { display:flex; gap:12px; align-items:baseline; justify-content:space-between; flex-wrap:wrap; }
.topic-library .topic-course-head h2 { margin:0; }
.topic-library .topic-course-head .topic-total { color:#50677d; font-size:13px; white-space:nowrap; }
.topic-library .topic-course > p { margin:9px 0 24px; max-width:760px; color:#50677d; }
.topic-library .topic-lectures { border-top:1px solid var(--topic-line); }
.topic-library details.topic-lecture { border-bottom:1px solid var(--topic-line); }
.topic-library .topic-lecture summary { display:grid; grid-template-columns:94px minmax(0,1fr) auto 16px; align-items:center; gap:10px 16px; padding:18px 8px; list-style:none; cursor:pointer; color:#193247; }
.topic-library .topic-lecture summary::-webkit-details-marker { display:none; }
.topic-library .topic-lecture summary::after { content:'+'; font-size:19px; color:#507b9a; line-height:1; text-align:right; }
.topic-library .topic-lecture[open] summary::after { content:'−'; }
.topic-library .topic-lecture summary:hover { background:#f7fafc; }
.topic-library .topic-lecture summary:focus-visible { outline:3px solid #086ca4; outline-offset:2px; }
.topic-library .topic-lec-num { color:#61758a; font-size:11px; letter-spacing:.04em; font-weight:700; }
.topic-library .topic-lec-title { font-size:16px; font-weight:680; line-height:1.4; }
.topic-library .topic-count { color:#50677d; font-size:12px; white-space:nowrap; }
.topic-library .topic-entry-list { list-style:none; padding:0 0 14px; margin:0; }
.topic-library .topic-entry { display:grid; grid-template-columns:94px minmax(0,1fr) auto; gap:12px 16px; align-items:center; border-top:1px solid #eef2f5; padding:12px 8px; }
.topic-library .topic-entry:nth-child(even) { background:#fbfcfd; }
.topic-library .topic-entry .topic-part { color:#738396; font-size:12px; white-space:nowrap; }
.topic-library .topic-entry .topic-name { font-size:14px; color:#243d4f; line-height:1.45; overflow-wrap:anywhere; }
.topic-library .topic-entry .topic-name a { color:#155783; text-decoration:underline; font-weight:680; }
.topic-library .topic-entry .topic-name a:hover { color:#0c4569; }
.topic-library .topic-entry .topic-review { font-size:10px; color:#647487; margin-left:8px; border:1px solid #ccd9e3; border-radius:4px; padding:2px 5px; white-space:nowrap; }
.topic-library .topic-entry .topic-sample { color:#155783; font-size:11px; font-weight:680; margin-left:8px; white-space:nowrap; }
.topic-library .topic-watch { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-height:37px; padding:6px 11px; color:#155783; background:#f3f8fb; font-size:12px; border:1px solid #dce7ee; border-radius:5px; white-space:nowrap; font-weight:700; }
.topic-library .topic-watch:hover { background:#e7f1f8; border-color:#a7c9dd; text-decoration:none; }
.topic-library .topic-existing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.topic-library .topic-existing-grid a { display:block; border:1px solid #dce5ec; border-radius:7px; padding:15px 18px; color:#155783; font-size:14px; font-weight:700; text-decoration:none; }
.topic-library .topic-existing-grid a:hover { background:#f7fafc; border-color:#9cb9cc; }
.topic-library .topic-bottom { padding:20px 24px; border-radius:8px; background:#f6f9fc; border:1px solid #e0eaf1; margin-top:27px; font-size:14px; }
.topic-library .topic-bottom p { margin:0; color:#50677d; }
/* Single topic layout */
.topic-library.topic-single .topic-hero-meta { margin:0 0 17px; display:flex; flex-wrap:wrap; gap:8px; }
.topic-library.topic-single .topic-hero-meta span { color:#3f6077; background:#fff; border:1px solid #dbe5ed; border-radius:100px; padding:5px 12px; font-size:12px; }
.topic-library .topic-body { max-width:940px; padding-top:34px; }
.topic-library .topic-video-frame { position:relative; width:100%; aspect-ratio:16/9; background:#102233; border-radius:8px; overflow:hidden; box-shadow:0 9px 26px #182b3814; }
.topic-library .topic-video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.topic-library .topic-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; margin:16px 0 28px; }
.topic-library .topic-actions a.topic-watch-main { display:inline-flex; justify-content:center; align-items:center; min-height:44px; background:#19548d; color:#fff; border-radius:5px; padding:10px 18px; font-size:14px; font-weight:700; text-decoration:none; }
.topic-library .topic-actions a.topic-watch-main:hover { background:#113d6a; }
.topic-library .topic-actions a.topic-action-plain { color:#155783; font-size:14px; font-weight:650; }
.topic-library .topic-section { padding:20px 0 12px; border-top:1px solid #e2e9ef; }
.topic-library .topic-section h2 { margin:0 0 14px; }
.topic-library .topic-placeholder { padding:22px; border-radius:8px; border:1px dashed #b7cad9; background:#f8fafc; color:#607589; line-height:1.65; font-size:14px; }
.topic-library .topic-placeholder p { margin:0 0 10px; }
.topic-library .topic-placeholder p:last-child { margin:0; }
.topic-library .topic-context { border-radius:8px; background:#f5f8fb; border:1px solid #dce5ec; padding:20px 22px; margin:22px 0; }
.topic-library .topic-context h2 { font-size:17px; margin:0 0 8px; }
.topic-library .topic-context p { margin:0; color:#50677d; }
.topic-library .topic-context a { color:#155783; font-weight:700; text-decoration:underline; }
.topic-library .topic-return { margin:24px 0 0; font-size:14px; }
.topic-library .topic-return a { color:#155783; font-weight:700; text-decoration:underline; }
@media(max-width:760px) {
  .topic-library .topic-jump-grid,.topic-library .topic-existing-grid { grid-template-columns:1fr; }
  .topic-library .topic-lecture summary { grid-template-columns:70px minmax(0,1fr) auto 12px; gap:10px; }
  .topic-library .topic-entry { grid-template-columns:70px minmax(0,1fr); gap:4px 10px; }
  .topic-library .topic-watch { grid-column:2; justify-self:start; margin-top:3px; }
}
@media(max-width:470px) {
  .topic-library .topic-lecture summary { grid-template-columns:minmax(0,1fr) auto 14px; gap:6px; }
  .topic-library .topic-lec-num { grid-column:1/-1; }
  .topic-library .topic-lec-title { font-size:15px; }
  .topic-library .topic-entry { grid-template-columns:1fr; gap:4px; }
  .topic-library .topic-part { grid-column:1; }
  .topic-library .topic-watch { grid-column:1; }
  .topic-library .topic-entry .topic-name { font-size:14px; }
  .topic-library .topic-sample,.topic-library .topic-review { display:inline-block; margin-top:5px; }
}
@media(prefers-reduced-motion:reduce){ .topic-library * { transition:none !important; } }

/* Completed, indexable Computational Finance topic guides: focused additions. */
.topic-library .page-head .lead a,.topic-library .topic-overview .lead a{color:#155783;text-decoration:underline;text-underline-offset:3px;font-weight:650}
.topic-library .topic-lecture{scroll-margin-top:1rem}
.topic-library .topic-lecture-tools{margin:3px 8px 7px;padding:0 0 0 110px;font-size:.84rem}
.topic-library .topic-lecture-tools a{color:#1d638f;text-decoration:underline;font-weight:650}
.topic-library .topic-copy{max-width:810px;padding:5px 0 18px;font-size:1rem;line-height:1.75;color:#304c63}
.topic-library .topic-copy .topic-section h2{color:#1b3652;font-size:clamp(1.2rem,2.1vw,1.46rem);line-height:1.35}
.topic-library .topic-copy .topic-section p{margin:0 0 4px;max-width:780px}
.topic-library .topic-insight{margin:27px 0 6px;padding:19px 23px;background:#edf5fc;border-left:4px solid #276c9a;border-radius:8px}
.topic-library .topic-insight h2{font-size:1.1rem;color:#195080;margin:0 0 6px}
.topic-library .topic-insight p{margin:0;font-weight:650;color:#204568;line-height:1.62}
.topic-library .topic-pager{display:flex;gap:14px;justify-content:space-between;flex-wrap:wrap;margin-top:24px}
.topic-library .topic-pager a{flex:1 1 240px;display:block;border:1px solid #dae6ef;border-radius:8px;padding:13px 17px;color:#1b597e;text-decoration:none;min-width:0}
.topic-library .topic-pager a:last-child{text-align:right}
.topic-library .topic-pager a:hover{background:#f5f9fd;border-color:#abc4d8}
.topic-library .topic-pager a span{display:block;font-size:.76rem;color:#677c8f;margin-bottom:4px}
.topic-library .topic-pager a strong{display:block;line-height:1.4;font-size:.91rem;overflow-wrap:anywhere}
.topic-library .topic-context p{line-height:1.72}
.topic-library .topic-hero-meta span:last-child{font-variant-numeric:tabular-nums}
@media(max-width:760px){.topic-library .topic-lecture-tools{padding-left:8px}}
@media(max-width:480px){.topic-library .topic-pager a:last-child{text-align:left}}
