/* course.css: shared styles for every course page (biases, eugenics, uncertainty, xmas).
   Edit here once; all course pages pick it up. The hub (index.html) keeps its own
   inline styles because it is also published as a self-contained Claude artifact. */
:root {
  --bg: #ffffff;
  --page: #f7f9fa;
  --glow: #a6c4d6;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #e6e6e6;
  --accent: #2b5f83;
  --hover: #f6f7f7;
  --active: #dbe6f0;
  --side: #eef2f6;
  --side-rule: #d7e0e8;
  --menu-hover: #e3ebf2;
  --font: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17191c; --page: #17191c; --glow: #1f3b52; --ink: #ececec; --muted: #9a9fa6; --rule: #2e3237;
    --accent: #6fa8d6; --hover: #1f2226; --active: #2a3a4a; --side: #1d2124; --side-rule: #2e3237; --menu-hover: #252b2f;
  }
}
:root[data-theme="dark"] {
  --bg: #17191c; --page: #17191c; --glow: #1f3b52; --ink: #ececec; --muted: #9a9fa6; --rule: #2e3237;
  --accent: #6fa8d6; --hover: #1f2226; --active: #2a3a4a; --side: #1d2124; --side-rule: #2e3237; --menu-hover: #252b2f;
}
html { background: var(--page); scroll-padding-top: env(safe-area-inset-top, 0px); }
.badge { display: inline-block; margin-left: 0.6rem; padding: 0.05rem 0.6rem; border: 1px solid currentColor; border-radius: 999px; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5; vertical-align: 0.15em; color: var(--muted); }
.contours { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media print { .contours { display: none; } }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
.layout { display: flex; min-height: 100vh; }
aside { width: 240px; flex: none; align-self: flex-start; position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; overflow-y: auto; padding: 2rem 1rem 2rem 1.25rem; background: var(--side); border-right: 1px solid var(--side-rule); }
.back { display: inline-block; font-size: 0.9rem; color: var(--muted); text-decoration: none; margin-bottom: 1.25rem; }
.back:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.back:focus-visible, .menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
aside h1 { margin: 0 0 1rem; padding-bottom: 0.9rem; font-size: 1.35rem; font-weight: 500; line-height: 1.25; border-bottom: 2px solid var(--accent); }
.menu { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 0.55rem 0.75rem; color: var(--ink); text-decoration: none; font-size: 1rem; border-radius: 4px; }
.menu a:hover { background: var(--menu-hover); }
.menu a.disabled { opacity: 0.45; pointer-events: none; cursor: default; }
.menu a[aria-current="page"] { background: var(--active); color: var(--accent); font-weight: 500; }
main { flex: 1; min-width: 0; padding: 2.25rem 2rem 4rem; }
main h2 { margin: 0 0 calc(1.25rem + 20px); padding-bottom: 0.5rem; font-size: 1.75rem; font-weight: 500; line-height: 1.3; border-bottom: 2px solid var(--accent); }
.panel { max-width: 680px; }
.empty { color: var(--muted); margin: 0; }
#p-description p:not(.empty) { margin: 0 0 1rem; }
.btn { display: inline-block; padding: 0.7rem 1.25rem; background: var(--accent); color: var(--bg); border-radius: 4px; font-weight: 500; text-decoration: none; }
.btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.disabled { opacity: 0.45; cursor: default; }
.btn.disabled:hover { text-decoration: none; }
#p-tools p { margin: 0; }
#p-tools p.btn-note { margin-top: 1rem; max-width: 34rem; font-size: 0.95rem; color: var(--muted); }
/* Classes: session table */
.classes { width: 100%; border-collapse: collapse; font-size: 1rem; }
.classes th, .classes td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.classes thead th { font-weight: 600; color: var(--accent); border-bottom: 2px solid var(--accent); }
.classes td:first-child, .classes th:first-child { width: 5.5rem; }
/* Resources: one line per document (title, then type and size) */
.doc-list { margin: 0; padding-left: 1.25rem; }
.doc-list li { margin: 0.35rem 0; }
.doc-list a { color: var(--accent); text-underline-offset: 3px; }
.doc-meta { color: var(--muted); font-size: 0.9rem; }
@media (min-width: 721px) { #p-tools p { margin-top: 1.9rem; } }
#p-bibliography .ref { margin: 0 0 0.85rem; padding-left: 2rem; text-indent: -2rem; overflow-wrap: anywhere; }
#p-bibliography .ref a { color: var(--accent); text-underline-offset: 3px; }
#p-blog .post { margin: 0 0 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--rule); }
#p-blog .post-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0 0 1rem; }
#p-blog .post h3 { margin: 0; font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
#p-blog .post time { margin: 0; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
#p-blog .post h4 { margin: 1.5rem 0 0.4rem; font-size: 1.05rem; font-weight: 600; }
#p-blog .post p { margin: 0 0 1rem; }
#p-blog .post-links { margin: 1.5rem 0 0; padding-left: 1.25rem; }
#p-blog .post-links a { color: var(--accent); text-underline-offset: 3px; }
#p-bibliography h3 { margin: 2rem 0 0.9rem; font-size: 1.15rem; font-weight: 500; line-height: 1.3; }
#p-bibliography h2 + h3 { margin-top: 0; }
#p-slides { max-width: 1100px; }
#slide-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
@media (min-width: 1150px) { #slide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.75rem; } }
.slide { margin: 0; }
.slide img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); cursor: zoom-in; }
.slide img:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(10, 14, 16, 0.88); cursor: zoom-out; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); }
.slide figcaption { margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 720px) {
  .layout { display: block; }
  aside { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; width: auto; height: auto; overflow: visible; align-self: auto; border-right: none; border-bottom: 1px solid var(--side-rule); padding: 0.6rem 0.75rem 0.4rem; }
  .back { display: inline; margin: 0 0.75rem 0 0; font-size: 0.85rem; }
  aside h1 { display: inline; margin: 0; padding: 0; border: none; font-size: 1.05rem; }
  .menu { display: flex; flex-wrap: nowrap; gap: 0.25rem; margin-top: 0.4rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.2rem; }
  .menu li { flex: none; }
  .menu a { padding: 0.45rem 0.7rem; white-space: nowrap; }
  .menu li.tool { margin: 0; padding: 0; border-top: none; }
  main { padding: 1.5rem 1.25rem 3rem; }
}
