
/* IBM Plex via <link display=optional> — no late swap thrash */

/* IBM Plex Sans = UI and notes. IBM Plex Serif = titles and quotes. */

:root {
  --bg:       #ffffff;
  --surface:  #f6f8fa;
  --card:     #ffffff;
  --card2:    #f6f8fa;
  --border:   #d0d7de;
  --gold:     #0969da;
  --gold-lt:  #218bff;
  --gold-dim: #0550ae;
  --gold-bg:  rgba(9,105,218,0.08);
  --txt:      #1f2328;
  --txt-dim:  #59636e;
  --txt-mute: #59636e;
  --red:      #0969da;
  --blue:     #0969da;
  --green:    #0969da;
  --purple:   #0969da;
  --orange:   #0969da;

  --c2:  #0969da;
  --c3:  #0969da;
  --c4:  #0969da;
  --c78: #0969da;
  --c10: #0969da;
  --c11: #0969da;

  --font-display: 'IBM Plex Serif', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-quote:   'IBM Plex Serif', Georgia, serif;

  --header-h: 56px;
  --nav-h:    76px;
  --radius:   12px;
  --radius-sm:8px;
  --toc-w:    240px;
  --rail-w:   252px;
  --page-max: 46rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-semester="spring"] {
  --bg:       #f2ede3;
  --surface:  #f4efe4;
  --card:     #ede8db;
  --card2:    #e6e0d2;
  --border:   #c4baa6;
  --gold:     #8a6010;
  --gold-lt:  #8a5808;
  --gold-dim: #6e4a06;
  --gold-bg:  rgba(138,96,16,0.09);
  --txt:      #1e180c;
  --txt-dim:  #6a5a3a;
  --txt-mute: #6a5840;
  --red:      #8a6010;
  --blue:     #8a6010;
  --green:    #8a6010;
  --purple:   #8a6010;
  --orange:   #8a6010;
  --c2:  #8a6010;
  --c3:  #8a6010;
  --c4:  #8a6010;
  --c78: #8a6010;
  --c10: #8a6010;
  --c11: #8a6010;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.header-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .02em;
}
@media (max-width: 699px) {
  .header-title {
    font-size: 15px;
    line-height: 1.2;
  }
  .app-header { gap: 24px; }
  .home-logo { width: 32px; height: 32px; }
  .home-logo svg { width: 24px; height: 24px; }
}

/* ── Buttons share consistent affordance ── */
.mode-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--card);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.mode-btn:hover { background: var(--gold-bg); }
.mode-btn:active { background: var(--gold-bg); }
.mode-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.semester-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.semester-btn {
  min-width: 76px;
  justify-content: center;
  padding: 6px 10px;
}
.semester-btn.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.semester-btn.active:hover { background: var(--gold-lt); color: #fff; }

.home-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 2px;
  border-radius: 8px;
  line-height: 0;
  color: #0b0b0c;
}
.home-logo svg {
  width: 28px;
  height: 28px;
  display: block;
  overflow: visible;
  image-rendering: crisp-edges;
  shape-rendering: geometricPrecision;
}
.home-logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  height: var(--nav-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 4px;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 14px;
  min-width: 64px;
  cursor: pointer;
  border: none; background: transparent;
  transition: background .15s ease, color .15s ease;
  position: relative;
  flex-shrink: 0;
  font-family: var(--font-body);
}
.nav-tab:hover:not(.disabled) { background: var(--gold-bg); }
.nav-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.nav-tab.active .nt-dot { opacity: 1; }
.nav-tab.active .nt-week { color: var(--gold); }
.nav-tab.active .nt-label { color: var(--txt); }
.nav-tab.disabled { pointer-events: none; cursor: default; }
.nav-tab.disabled .nt-week { color: var(--txt-mute); }
.nav-tab.disabled .nt-label { color: var(--txt-mute); }
.nt-dot {
  position: absolute; top: 6px;
  width: 4px; height: 4px;
  border-radius: 50%; background: var(--gold);
  opacity: 0; transition: opacity .2s;
}
.nt-week { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--txt-dim); }
.nt-label { font-family: var(--font-body); font-size: 13px; color: var(--txt-mute); text-align: center; line-height: 1.2; max-width: 68px; }
.nav-divider { width: 1px; background: var(--border); margin: 14px 2px; flex-shrink: 0; }

.page {
  padding: calc(var(--header-h) + 12px) 16px 32px;
  font-family: var(--font-body);
}

.week { scroll-margin-top: calc(var(--header-h) + 16px); margin-bottom: 48px; }

.week-hero {
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 22px 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--card);
}
.wh-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.wh-badge {
  font-family: var(--font-body);
  font-weight: 600; font-size: 12px;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid; flex-shrink: 0;
  letter-spacing: .02em;
  line-height: 1.25;
}
.wh-dates {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.wh-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--txt);
  line-height: 1.35;
  margin-bottom: 12px;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
.wh-verse {
  font-family: var(--font-quote); font-style: italic;
  font-size: 16px; color: var(--txt-dim);
  margin-bottom: 10px;
  line-height: 1.6;
}
.wh-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.wh-tag {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px; border: 1px solid;
}

.w2, .w3, .w4, .w7, .w8, .w10, .w11,
.fw1, .fw2, .fw3, .fw5, .fw7, .fw8, .fw9, .fw10, .fw11, .fw12, .fw13, .fw14 {
  --wc: var(--gold);
}

.wh-badge { color: var(--wc); border-color: var(--wc); }
.wh-dates { color: var(--wc); }
.wh-tag { color: var(--wc); border-color: var(--wc); }

.callout,
.verse-box,
.scholar-box,
.insight-box,
.summary-card,
.key-question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
}
#f-overview > .callout:first-child,
#overview > .callout:first-child {
  margin-top: 0;
}
.week > .key-question {
  margin: 0;
  border-radius: 0;
  border-top: none;
  padding: 20px 22px 22px;
}
.kq-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.kq-question {
  font-family: var(--font-body); font-style: italic;
  font-size: 16px; color: var(--txt); line-height: 1.65;
  margin-bottom: 0;
  text-wrap: pretty;
}
.kq-question:has(+ .kq-answer) { margin-bottom: 12px; }
.kq-answer {
  font-family: var(--font-body);
  font-size: 16px; color: var(--txt-dim); line-height: 1.7;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.kq-answer strong { color: var(--gold-lt); font-weight: 600; }
.kq-answer em { color: var(--txt); font-style: italic; }

/* ── ACCORDION (CLICKABLE — clear affordance) ── */
.acc-wrap { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.acc-item { border-top: 1px solid var(--border); }
.acc-item:first-child { border-top: none; }

.acc-btn {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 18px;
  background: var(--card);
  border: none;
  cursor: pointer;
  transition: background .15s ease;
  min-height: 60px;
  font-family: var(--font-body);
  position: relative;
}
.acc-btn:hover { background: var(--card2); }
.acc-btn:active { background: var(--card2); }
.acc-btn.open { background: var(--card2); }
.acc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.ab-text { flex: 1; }
.ab-title { font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--txt); line-height: 1.3; }
.ab-sub { font-family: var(--font-body); font-size: 13.5px; color: var(--txt-mute); margin-top: 3px; line-height: 1.4; }

/* Prominent circular chevron — clear visual cue that the row is clickable */
.ab-arrow {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold-bg);
  color: var(--gold-dim);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, background .15s ease, color .15s ease;
  border: 1px solid var(--border);
}
.acc-btn:hover .ab-arrow { background: var(--gold); color: #fff; }
.acc-btn.open .ab-arrow { transform: rotate(180deg); background: var(--gold); color: #fff; }

.acc-body {
  display: none;
  padding: 22px 20px 26px;
  background: var(--surface);
  animation: slideIn .2s var(--ease);
  font-family: var(--font-body);
}
.acc-body.open { display: block; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Helper hint shown above the first accordion in each week */
.click-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--gold-bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.click-hint::before {
  content: '▾';
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
}

/* ── CONTENT ATOMS ── */
.prose {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--txt);
  margin-bottom: 16px;
  text-wrap: pretty;
}
.prose strong { color: var(--gold-lt); font-weight: 600; }
.prose em { color: var(--txt-dim); font-style: italic; }

.section-label {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-dim); margin: 22px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-label:first-child { margin-top: 0; }

.vb-ref {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.vb-text {
  font-family: var(--font-quote); font-style: italic;
  font-size: 16px; color: var(--txt-dim); line-height: 1.75;
}
.vb-note {
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--txt-mute);
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
  line-height: 1.6;
}

.sb-source { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.sb-text { font-family: var(--font-quote); font-style: italic; font-size: 16px; color: var(--txt-dim); line-height: 1.7; }

.ib-label { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.ib-text { font-family: var(--font-body); font-size: 16px; color: var(--txt); line-height: 1.7; }

.card-stack { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.card-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; gap: 12px; align-items: flex-start;
  font-family: var(--font-body);
}
.ci-icon { font-size: 15px; flex-shrink: 0; width: 22px; font-weight: 700; color: var(--gold); }
.ci-body { flex: 1; }
.ci-title { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 4px; letter-spacing: .01em; }
.ci-text { font-family: var(--font-body); font-size: 15px; color: var(--txt-dim); line-height: 1.55; }

.use-pills { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.use-pill {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-body);
}
.up-num { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--gold); min-width: 28px; }
.up-body { flex: 1; }
.up-name { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 2px; }
.up-desc { font-family: var(--font-body); font-size: 14.5px; color: var(--txt-dim); line-height: 1.5; }

.antithesis { margin: 10px 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.ant-old { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ant-new { padding: 12px 14px; }
.ant-label { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.ant-old .ant-label { color: var(--txt-dim); }
.ant-new .ant-label { color: var(--gold); }
.ant-text { font-family: var(--font-quote); font-style: italic; font-size: 16px; color: var(--txt-dim); line-height: 1.6; }

.cmd-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.cmd-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--font-body);
}
.cmd-n { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--gold-dim); min-width: 24px; line-height: 1.1; }
.cmd-body { flex: 1; }
.cmd-text { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--txt); }
.cmd-ex { font-family: var(--font-body); font-size: 13.5px; color: var(--txt-mute); font-style: italic; margin-top: 2px; }
.cmd-group-hdr {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--blue); padding: 8px 0 2px;
}

.cov-list { margin: 10px 0; }
.cov-item { display: flex; gap: 12px; margin-bottom: 16px; font-family: var(--font-body); }
.cov-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  color: #fff; margin-top: 1px;
}
.cov-content { flex: 1; }
.cov-title { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 3px; }
.cov-body { font-family: var(--font-body); font-size: 15px; color: var(--txt-dim); line-height: 1.55; }

.lang-note {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--txt-mute);
  margin: 8px 0; line-height: 1.6;
}

.bridge { text-align: center; margin: 16px 0 32px; }
.bridge-line { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); margin-bottom: 10px; }
.bridge-text { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--txt-mute); }

.lec { margin: 0 0 8px; }
.week > .lec {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px 22px 36px;
  background: var(--card);
}
.lec-claim {
  font-family: var(--font-body);
  font-size: 17px; font-weight: 700;
  color: var(--txt); line-height: 1.5;
  margin-bottom: 18px;
  text-wrap: pretty;
}
.lec-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 40px;
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 700px) {
  .lec-pair { grid-template-columns: 1fr 1fr; align-items: start; }
}
.lec-h {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 700;
  color: var(--gold);
  margin: 28px 0 12px;
  letter-spacing: .01em;
  text-wrap: balance;
}
.lec > .lec-h:first-child,
.lec-claim + .lec-h,
.lec-center .lec-h {
  margin-top: 0;
}
.lec-lead {
  font-family: var(--font-body);
  font-size: 15px; color: var(--txt-dim);
  line-height: 1.7; margin-bottom: 14px;
}
.lec-ol { list-style: none; padding: 0; margin: 0 0 8px; }
.lec-ol li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 15px; color: var(--txt-dim); line-height: 1.65;
}
.lec-ol li:last-child { margin-bottom: 0; }
.lec-ol .n {
  font-family: var(--font-body);
  font-weight: 700; color: var(--gold);
}
.lec-ol strong { color: var(--txt); font-weight: 700; }
.lec-center { text-align: center; padding: 8px 4px 18px; }
.lec-center .lec-h { margin-bottom: 8px; }
.lec-center .lec-claim { margin-bottom: 0; }
.lec-eq {
  text-align: center;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 700;
  color: var(--txt);
  line-height: 1.55;
  margin: 20px 0 8px;
  text-wrap: balance;
}
.lec-eq-sub {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px; color: var(--txt-mute);
  margin-bottom: 8px;
}
.lec .verse-box {
  background: transparent;
  border: none;
  border-left: 2px solid var(--gold);
  border-radius: 0;
  padding: 2px 0 2px 16px;
  margin: 16px 0 24px;
}
.lec .prose:last-child,
.lec .lec-ol:last-child,
.lec .verse-box:last-child {
  margin-bottom: 0;
}
.lec-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  -webkit-overflow-scrolling: touch;
}
.lec-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: var(--font-body);
  font-size: 15px;
}
.lec-table th,
.lec-table td {
  border: 1px solid var(--border);
  padding: 20px 18px;
  vertical-align: top;
  line-height: 1.75;
  color: var(--txt-dim);
  text-align: left;
}
.lec-table thead th {
  background: var(--card2);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 14px 18px;
}
.lec-table tbody th {
  width: 6.25rem;
  color: var(--txt);
  font-weight: 700;
  background: var(--card);
  line-height: 1.45;
}
@media (max-width: 699px) {
  .week-hero,
  .week > .key-question,
  .week > .lec {
    padding-left: 18px;
    padding-right: 18px;
  }
  .lec-table {
    table-layout: auto;
    min-width: 34rem;
  }
  .lec-table tbody th { width: auto; white-space: nowrap; }
}

.coming-soon {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 32px 20px; text-align: center;
  background: var(--surface);
  margin-bottom: 24px;
}
.cs-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--gold); opacity: 0.2; }
.cs-title { font-family: var(--font-display); font-size: 18px; color: var(--gold); margin: 6px 0; }
.cs-verse { font-family: var(--font-quote); font-style: italic; font-size: 14px; color: var(--txt-dim); margin-bottom: 8px; }
.cs-note { font-family: var(--font-body); font-size: 13px; color: var(--txt-mute); }

/* ── GLOSSARY (용어사전) ── */
.glossary-section {
  margin: 32px 0 24px;
  padding: 0 4px;
}
.gl-header {
  text-align: center;
  padding: 24px 0 18px;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}
.gl-eyebrow {
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.gl-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--txt); line-height: 1.3; margin-bottom: 6px;
}
.gl-subtitle {
  font-family: var(--font-quote); font-style: italic;
  font-size: 14.5px; color: var(--txt-dim);
}
.gl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 700px) {
  .gl-grid { grid-template-columns: 1fr 1fr; }
}
.gl-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
}
.gl-item:hover { background: var(--card2); }
.gl-term-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.gl-en {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .01em;
}
.gl-kr {
  font-family: 'Apple SD Gothic Neo','Malgun Gothic','Noto Sans KR',sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt-mute);
  opacity: 0.9;
}
.gl-kr::before { content: '·\00a0'; opacity: 0.6; margin-right: 2px; }

/* Korean side-label inside Key Concepts at a Glance grid */
.kc-kr {
  font-family: 'Apple SD Gothic Neo','Malgun Gothic','Noto Sans KR',sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-mute);
  opacity: 0.9;
  letter-spacing: 0;
  margin-left: 6px;
}
.gl-def {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--txt-dim);
  line-height: 1.65;
}
.gl-meta {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-dim);
}

/* Exam summary helper classes */
.summary-label { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.summary-body  { font-family: var(--font-body); font-size: 15.5px; line-height: 1.75; color: var(--txt); }
.summary-body em { font-style: italic; color: var(--txt-dim); }
.summary-card .summary-body { font-size: 15px; line-height: 1.7; }
.summary-card em { color: var(--gold-lt); font-style: italic; }

.toc-sidebar { display: none; }
.context-rail { display: none; }

@media (min-width: 700px) {
  .toc-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--toc-w);
    background: var(--bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 200;
    padding-bottom: 24px;
    padding-top: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .toc-sidebar::-webkit-scrollbar { width: 4px; }
  .toc-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

  .toc-head {
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    flex-shrink: 0;
  }
  .toc-course {
    font-family: var(--font-display);
    font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--gold); margin-bottom: 6px;
  }
  .toc-section-hdr {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.8px; text-transform: uppercase;
    color: var(--txt-mute); padding: 14px 20px 5px;
  }

  /* TOC items: clickable rows with clear hover + active state */
  .toc-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    min-height: 44px;
    cursor: pointer; border: none; background: transparent;
    width: 100%; text-align: left;
    transition: background .2s var(--ease), border-color .2s var(--ease);
    border-left: 3px solid transparent;
    text-decoration: none; color: inherit;
    font-family: var(--font-body);
  }
  .toc-item:hover:not(.disabled) {
    background: var(--card);
    border-left-color: var(--gold-dim);
  }
  .toc-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
  .toc-item.active {
    background: var(--gold-bg);
    border-left-color: var(--gold);
  }
  .toc-item.disabled {
    cursor: default;
    pointer-events: none;
    border-left-color: #b0b0b0;
  }
  .toc-item.disabled .toc-week { color: #999; }
  .toc-item.disabled .toc-label { color: #999; }
  .toc-week {
    font-family: var(--font-body); font-size: 12px; font-weight: 700;
    color: var(--gold); min-width: 28px; flex-shrink: 0;
  }
  .toc-label { font-family: var(--font-body); font-size: 14px; color: var(--txt-dim); line-height: 1.3; }
  .toc-item.active .toc-label { color: var(--txt); font-weight: 600; }

  .toc-title-big {
    font-family: var(--font-display);
    font-size: 15px; font-weight: 700;
    color: var(--txt); line-height: 1.45;
    margin: 6px 0 10px;
  }

  body { padding-left: var(--toc-w); }
  .app-header { left: 0; right: 0; padding: 0 20px; }
  .bottom-nav { display: none; }
  .page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: calc(var(--header-h) + 16px) 32px 64px;
  }
}

@media (min-width: 1180px) {
  body { padding-right: var(--rail-w); }
  .context-rail {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: var(--rail-w);
    background: var(--bg);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    z-index: 200;
    padding: 20px 16px 32px;
    gap: 24px;
  }
  .rail-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .rail-kicker {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.6px; text-transform: uppercase;
    color: var(--txt-mute);
  }
  .rail-badge {
    font-family: var(--font-body);
    font-size: 12px; font-weight: 600;
    color: var(--gold);
    width: fit-content;
    padding: 2px 8px;
    border: 1px solid var(--gold);
    border-radius: 999px;
  }
  .rail-title {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 700;
    color: var(--txt); line-height: 1.35;
  }
  .rail-date {
    font-family: var(--font-body);
    font-size: 12px; font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--txt-mute);
  }
  .rail-verse {
    font-family: var(--font-quote); font-style: italic;
    font-size: 13px; color: var(--txt-dim); line-height: 1.55;
  }
  .rail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
  .rail-tag {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 500;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--txt-dim);
  }
  .rail-exam {
    font-family: var(--font-body);
    font-size: 13px; color: var(--txt-dim); line-height: 1.5;
  }
  .rail-jump {
    font-family: var(--font-body);
    font-size: 13px; font-weight: 600;
    color: var(--gold);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 44px;
    text-align: left;
    cursor: pointer;
  }
  .rail-jump:hover { background: var(--gold-bg); border-color: var(--gold); }
  .rail-jump:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
}

/* Fall refinement. Spring retains the original visual system above. */
html[data-semester="fall"] {
  --gold-lt: #0969da;
  --page-max: 52rem;
  --fall-rule: #e3e8ee;
  --fall-soft: #f6f8fa;
  --fall-blue-soft: #eef5fd;
}
html[data-semester="fall"] ::selection { background: #dcecff; color: #1f2328; }
html[data-semester="fall"] body { padding-bottom: 0; }
html[data-semester="fall"] :is(button, a) { touch-action: manipulation; }
html[data-semester="fall"] :is(button, a):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
html[data-semester="fall"] :is(.toc-item, .nav-tab, .acc-btn):focus-visible { outline-offset: -3px; }
html[data-semester="fall"] .app-header { border-color: var(--fall-rule); gap: 16px; }
html[data-semester="fall"] .header-title { letter-spacing: -.015em; }
html[data-semester="fall"] .semester-toggle {
  gap: 2px; padding: 3px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--fall-soft);
}
html[data-semester="fall"] .semester-btn {
  min-width: 66px; min-height: 36px; padding: 6px 12px;
  border: 0; border-radius: 5px; background: transparent; color: var(--txt-dim);
}
html[data-semester="fall"] .semester-btn:hover { background: #e8edf2; color: var(--txt); }
html[data-semester="fall"] .semester-btn.active { background: var(--gold); color: #fff; }
html[data-semester="fall"] .semester-btn.active:hover { background: var(--gold-dim); }
html[data-semester="fall"] button:active { filter: brightness(.96); }
.fall-skip-link {
  position: fixed; top: 8px; left: 16px; z-index: 400;
  transform: translateY(-160%); padding: 8px 16px;
  background: var(--bg); color: var(--gold); border: 1px solid var(--gold); border-radius: 6px;
}
.fall-skip-link:focus { transform: translateY(0); }
html[data-semester="spring"] .fall-skip-link { display: none; }
#semester-fall { padding-top: calc(var(--header-h) + 32px); padding-bottom: 64px; }
#semester-fall #f-overview { padding: 0; margin-bottom: 32px; scroll-margin-top: 80px; }
#f-overview .callout { border: 0; border-radius: 0; margin: 0; padding: 0 0 24px; }
#f-overview .overview-heading {
  font-family: var(--font-display); font-size: 26px;
  font-weight: 600; line-height: 1.35; letter-spacing: -.025em;
  color: var(--txt); margin-bottom: 16px; text-wrap: balance;
}
#f-overview .overview-body { font-size: 16px; line-height: 1.8; }
#f-overview .exam-callout { border-top: 1px solid var(--fall-rule); padding: 22px 0 0; }
#f-overview .exam-heading { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
#f-overview .exam-date { font-size: 15px; line-height: 1.6; color: var(--gold-dim); margin-bottom: 8px; }
#f-overview .exam-body { font-size: 14px; color: var(--txt-dim); line-height: 1.7; }
#semester-fall .week {
  border: 1px solid var(--fall-rule); border-radius: 12px;
  margin-bottom: 0; scroll-margin-top: calc(var(--header-h) + 24px);
}
#semester-fall .week-hero { border: 0; padding: 28px 28px 24px; border-radius: 12px 12px 0 0; }
#semester-fall .wh-meta { align-items: baseline; gap: 6px 16px; margin-bottom: 12px; }
#semester-fall .wh-badge {
  padding: 0; border: 0; border-radius: 0; font-size: 13px;
  font-weight: 600; letter-spacing: 0; line-height: 1.5;
}
#semester-fall .wh-dates {
  font-size: 13px; font-weight: 400; color: var(--txt-dim);
  text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
#semester-fall .wh-title {
  font-size: 26px; font-weight: 600;
  line-height: 1.3; letter-spacing: -.025em; margin-bottom: 10px;
}
#semester-fall .wh-verse { font-size: 15px; line-height: 1.65; margin-bottom: 16px; }
#semester-fall .wh-tags { gap: 6px; }
#semester-fall .wh-tag {
  color: var(--txt-dim); background: var(--fall-soft); border: 0;
  border-radius: 4px; padding: 3px 8px; font-size: 12px; line-height: 1.5;
}
#semester-fall .week > .key-question {
  border: 0; border-top: 1px solid var(--fall-rule);
  background: var(--fall-soft); padding: 22px 28px 24px;
}
#semester-fall .kq-label { letter-spacing: .04em; text-transform: none; font-size: 12px; margin-bottom: 8px; }
#semester-fall .kq-question { font-style: normal; font-weight: 500; font-size: 17px; line-height: 1.6; }
#semester-fall .kq-answer { border: 0; padding-top: 0; font-size: 15px; line-height: 1.75; }
#semester-fall .kq-answer strong { color: var(--txt); }
#semester-fall .week > .lec { border: 0; margin: 0; padding: 28px 28px 32px; }
#semester-fall .lec { container-type: inline-size; container-name: lecture; }
#semester-fall .lec-claim { font-size: 18px; font-weight: 500; line-height: 1.65; margin-bottom: 24px; }
#semester-fall .lec-h { color: var(--txt); font-size: 17px; font-weight: 600; letter-spacing: 0; margin: 40px 0 12px; }
#semester-fall .lec > .lec-h:first-child,
#semester-fall .lec-pair .lec-h:first-child { margin-top: 0; }
#semester-fall :is(.prose, .lec-lead, .lec-ol li) { font-size: 16px; line-height: 1.75; }
#semester-fall :is(.prose, .lec-lead) { margin-bottom: 22px; text-align: left; }
#semester-fall .will-comparison { margin: 28px 0; padding: 28px 0 0; border-block: 1px solid var(--fall-rule); }
#semester-fall .will-scales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
#semester-fall .will-scale { margin: 0; min-width: 0; }
#semester-fall .will-scale figcaption { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--txt); }
#semester-fall .will-scale svg { display: block; width: 100%; max-width: 320px; height: auto; margin: 12px auto 8px; }
#semester-fall .will-scale svg text { fill: var(--txt-dim); font: 16px var(--font-body); }
#semester-fall .scale-support { stroke: #9aa8b8; stroke-width: 1.5; }
#semester-fall .scale-beam { stroke: var(--gold-dim); stroke-width: 2.5; }
#semester-fall .scale-cords { stroke: #748499; stroke-width: 1.25; }
#semester-fall .scale-pan { fill: var(--fall-blue-soft); stroke: #748499; stroke-width: 1.5; }
#semester-fall .scale-pivot { fill: var(--bg); stroke: var(--gold-dim); stroke-width: 2; }
#semester-fall .scale-weight { fill: var(--gold-dim); }
#semester-fall .will-scale svg .scale-weight-label { fill: #fff; font-size: 16px; font-weight: 500; }
#semester-fall .scale-summary { font-size: 15px; line-height: 1.65; color: var(--txt-dim); margin: 12px 0 0; }
#semester-fall .scale-summary strong { color: var(--txt); font-weight: 500; }
#semester-fall .will-comparison > p { font-size: 14px; line-height: 1.7; color: var(--txt-dim); margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--fall-rule); }
#semester-fall .will-comparison > p strong { color: var(--gold-dim); font-weight: 600; }
.term-button { display: inline; appearance: none; font: inherit; color: var(--gold-dim); background: transparent; border: 0; border-bottom: 1px dashed currentColor; border-radius: 0; padding: 2px 0; cursor: pointer; text-align: inherit; }
.term-button::before, #semester-fall .term-button::after { content: none !important; display: none !important; }
.term-button:hover, .term-button[aria-expanded="true"] { color: var(--gold); border-bottom-style: solid; background: var(--fall-blue-soft, var(--card)); }
.term-definition { position: fixed; inset: auto; margin: 0; padding: 16px 20px 20px; width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; background: var(--bg); border: 1px solid var(--fall-rule, var(--border)); border-radius: 8px; box-shadow: 0 8px 24px rgba(31, 35, 40, .12); font: 400 15px/1.7 var(--font-body); text-align: left; color: var(--txt); z-index: 500; }
.term-definition-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-weight: 600; }
.term-definition-body { display: block; }
.term-source { display: block; margin-top: 8px; }
.term-close { flex-shrink: 0; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--gold-dim); font: 400 14px var(--font-body); cursor: pointer; }
.term-close:hover { background: var(--fall-blue-soft, var(--card)); }
:is(.term-button, .term-close):focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 3px; }
@container lecture (width < 480px) {
  #semester-fall .will-scales { grid-template-columns: 1fr; gap: 24px; }
}
#semester-fall .lesson-list { list-style: none; padding: 0; margin: 0 0 22px; }
#semester-fall .lesson-list li { font-size: 16px; line-height: 1.75; color: var(--txt-dim); margin-bottom: 14px; }
#semester-fall .lesson-list strong { color: var(--txt); font-weight: 600; }
#semester-fall .lesson-list li:last-child { margin-bottom: 0; }
#semester-fall .lesson-recap { padding: 0 0 0 20px; border-left: 1px solid var(--fall-rule); }
#semester-fall .acc-body.open { padding-top: 22px; }
#semester-fall .acc-body .prose:last-child { margin-bottom: 0; }
#semester-fall .will-scales.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container lecture (width < 720px) {
  #semester-fall .will-scales.cols-3 { grid-template-columns: 1fr; }
}
#semester-fall .concept-svg { display: block; width: 100%; max-width: 320px; height: auto; margin: 12px auto 8px; }
#semester-fall .concept-svg text { fill: var(--txt-dim); font: 15px var(--font-body); }
#semester-fall .concept-svg .c-label { fill: var(--txt); font-weight: 600; }
#semester-fall .concept-svg .c-stroke { fill: none; stroke: var(--gold-dim); stroke-width: 2; }
#semester-fall .concept-svg .c-soft { fill: var(--fall-blue-soft); stroke: #748499; stroke-width: 1.5; }
#semester-fall .concept-svg .c-muted { fill: none; stroke: #9aa8b8; stroke-width: 1.5; }
#semester-fall .concept-svg .c-fill { fill: var(--gold-dim); }
#semester-fall :is(.prose, .lec-ol) strong { color: var(--txt); font-weight: 600; }
#semester-fall .lec-ol li { gap: 10px; margin-bottom: 12px; }
#semester-fall .lec-ol .n { font-size: 14px; line-height: 2; font-variant-numeric: tabular-nums; }
#semester-fall .lec-pair { gap: 24px; padding: 24px 0; margin: 24px 0; border-color: var(--fall-rule); }
#semester-fall .lec .verse-box { border-left-width: 1px; margin: 24px 0; padding: 2px 0 2px 20px; }
#semester-fall .vb-ref { letter-spacing: .04em; text-transform: none; }
#semester-fall .lec-eq { font-weight: 600; line-height: 1.65; }
#semester-fall .bridge { margin: 28px 0; text-align: left; }
#semester-fall .bridge-line { display: none; }
#semester-fall .bridge-text { font-size: 12px; font-weight: 500; line-height: 1.6; letter-spacing: .02em; text-transform: none; color: var(--txt-dim); }
#semester-fall .acc-wrap { border: 0; border-top: 1px solid var(--fall-rule); border-radius: 0 0 12px 12px; }
#semester-fall .acc-item { border-color: var(--fall-rule); }
#semester-fall .acc-btn { padding: 20px 28px; gap: 16px; }
#semester-fall .ab-text { min-width: 0; }
#semester-fall .ab-title { font-size: 16px; line-height: 1.5; }
#semester-fall .ab-sub { font-size: 14px; line-height: 1.5; margin-top: 4px; }
#semester-fall .ab-arrow { width: 20px; height: 20px; background: transparent; border: 0; border-radius: 0; color: var(--gold); }
#semester-fall .ab-arrow svg { width: 18px; height: 18px; }
#semester-fall .acc-body { padding: 0 28px 24px; background: var(--fall-soft); animation: none; }
#semester-fall .acc-body :is(.insight-box, .verse-box, .callout) { border: 0; background: transparent; padding: 16px 0 0; margin: 0; }
#semester-fall .acc-body .ib-label { letter-spacing: .04em; text-transform: none; }
#semester-fall .lec-table-wrap { container: comparison / inline-size; overflow: visible; margin: 24px 0 28px; }
#semester-fall .lec-table { min-width: 0; width: 100%; table-layout: fixed; font-size: 15px; }
#semester-fall .lec-table col:first-child { width: 16%; }
#semester-fall .lec-table col:not(:first-child) { width: 42%; }
#semester-fall .lec-table :is(th, td) {
  padding: 18px 16px; border: 0; border-bottom: 1px solid var(--fall-rule);
  font-size: 15px; line-height: 1.7; color: var(--txt); width: auto; white-space: normal;
}
#semester-fall .lec-table thead th {
  font-size: 13px; font-weight: 600; line-height: 1.5;
  text-transform: none; letter-spacing: 0; background: var(--fall-soft); padding: 12px 16px;
}
#semester-fall .lec-table thead th:first-child { border-radius: 6px 0 0 0; }
#semester-fall .lec-table thead th:last-child { border-radius: 0 6px 0 0; color: var(--gold-dim); }
#semester-fall .lec-table tbody th { font-size: 14px; font-weight: 600; background: transparent; }
#semester-fall .comparison-label { display: none; }
@container comparison (width < 560px) {
  #semester-fall .lec-table { display: block; }
  #semester-fall .lec-table colgroup { display: none; }
  #semester-fall .lec-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #semester-fall .lec-table :is(tbody, tr, th, td) { display: block; width: 100%; }
  #semester-fall .lec-table tbody tr { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
  #semester-fall .lec-table tbody tr:last-child { margin-bottom: 0; }
  #semester-fall .lec-table tbody th { padding: 10px 14px; background: var(--fall-soft); border: 0; border-radius: 4px; font-size: 16px; }
  #semester-fall .lec-table tbody td { border: 0; padding: 16px 0 0; }
  #semester-fall .comparison-label { display: block; font-size: 12px; font-weight: 600; color: var(--txt-dim); margin-bottom: 4px; }
  #semester-fall td:last-child .comparison-label { color: var(--gold-dim); }
}
#semester-fall .approach-comparison { container-name: approach-comparison; overflow-x: auto; scrollbar-color: var(--border) var(--bg); }
#semester-fall .approach-comparison .lec-table { min-width: 640px; }
#semester-fall .approach-comparison:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
#semester-fall .approach-comparison-heading { scroll-margin-top: calc(var(--header-h) + 24px); }
@container lecture (width < 560px) {
  #semester-fall .lec-pair { grid-template-columns: 1fr; }
}
html[data-semester="fall"] .toc-sidebar { border-color: var(--fall-rule); }
html[data-semester="fall"] .toc-head { padding: 24px 20px 18px; border-color: var(--fall-rule); }
html[data-semester="fall"] .toc-course { font-family: var(--font-body); letter-spacing: .04em; font-size: 12px; }
html[data-semester="fall"] .toc-title-big { font-weight: 600; font-size: 16px; }
html[data-semester="fall"] .toc-section-hdr { letter-spacing: .04em; text-transform: none; font-size: 12px; padding-top: 20px; padding-bottom: 8px; }
html[data-semester="fall"] .toc-item { border-left: 1px solid transparent; padding: 10px 18px 10px 19px; gap: 8px; }
html[data-semester="fall"] .toc-item:hover:not(.disabled) { background: var(--fall-soft); }
html[data-semester="fall"] .toc-item.active { background: var(--fall-blue-soft); border-left-color: var(--gold); }
html[data-semester="fall"] .toc-week { min-width: 30px; font-weight: 500; font-variant-numeric: tabular-nums; }
html[data-semester="fall"] .toc-item.disabled { border-left-color: transparent; }
html[data-semester="fall"] .toc-item.disabled :is(.toc-week, .toc-label) { color: var(--txt-dim); }
html[data-semester="fall"] .context-rail { border-color: var(--fall-rule); padding: 28px 20px; gap: 28px; }
html[data-semester="fall"] .rail-kicker { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: .02em; }
html[data-semester="fall"] .rail-badge { padding: 0; border: 0; border-radius: 0; }
html[data-semester="fall"] .rail-title { font-size: 17px; font-weight: 600; line-height: 1.45; }
html[data-semester="fall"] .rail-date { text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
html[data-semester="fall"] .rail-tags { gap: 5px; }
html[data-semester="fall"] .rail-tag { border: 0; border-radius: 4px; background: var(--fall-soft); padding: 3px 6px; }
html[data-semester="fall"] .rail-block + .rail-block { border-top: 1px solid var(--fall-rule); padding-top: 24px; }
html[data-semester="fall"] .rail-jump { border-color: var(--fall-rule); border-radius: 6px; }
@media (min-width: 700px) {
  #semester-fall { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 699px) {
  html[data-semester="fall"] body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
  html[data-semester="fall"] .app-header { padding: 0 16px; gap: 24px; }
  html[data-semester="fall"] .header-title { white-space: nowrap; font-size: 15px; line-height: 1.2; }
  html[data-semester="fall"] .semester-btn { min-width: 54px; padding-inline: 8px; }
  #semester-fall { padding: calc(var(--header-h) + 24px) 16px 32px; }
  #semester-fall .week-hero { padding: 22px 20px; }
  #semester-fall .week > .key-question { padding: 20px; }
  #semester-fall .week > .lec { padding: 24px 20px; }
  #semester-fall .wh-meta { display: grid; gap: 4px; }
  #semester-fall .wh-title { font-size: 24px; }
  #semester-fall .acc-btn { padding: 18px 20px; gap: 12px; }
  #semester-fall .acc-body { padding: 0 20px 20px; }
  #semester-fall .bridge { margin: 24px 4px; }
  html[data-semester="fall"] .bottom-nav {
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    border-color: var(--border); scroll-padding-inline: 12px;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  }
  html[data-semester="fall"] .bottom-nav::-webkit-scrollbar { display: block; height: 3px; }
  html[data-semester="fall"] .nav-tab { min-width: 76px; padding: 10px 12px; gap: 4px; border-top: 2px solid transparent; }
  html[data-semester="fall"] .nav-tab.active { background: var(--fall-blue-soft); border-top-color: var(--gold); }
  html[data-semester="fall"] .nt-dot { display: none; }
  html[data-semester="fall"] .nt-week { font-variant-numeric: tabular-nums; }
  html[data-semester="fall"] .nt-label { font-size: 12px; }
}

/* ── Fall figures: one blue, drawn on a 320-wide grid so labels stay readable on phones ── */
#semester-fall .concept-svg { max-width: 320px; overflow: visible; }
#semester-fall .concept-svg text { font: 15px var(--font-body); fill: var(--txt-dim); }
#semester-fall .concept-svg .c-label { fill: var(--txt); font-weight: 600; }
#semester-fall .concept-svg .c-on { fill: #fff; font-weight: 600; }
#semester-fall .concept-svg .c-blue { fill: var(--gold-dim); font-weight: 600; }
#semester-fall .concept-svg .c-line { fill: none; stroke: var(--gold-dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#semester-fall .concept-svg .c-thin { fill: none; stroke: #748499; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#semester-fall .concept-svg .c-dash { fill: none; stroke: #748499; stroke-width: 1.5; stroke-dasharray: 5 5; stroke-linecap: round; }
#semester-fall .concept-svg .c-box { fill: var(--bg); stroke: #748499; stroke-width: 1.5; }
#semester-fall .concept-svg .c-boxblue { fill: var(--bg); stroke: var(--gold-dim); stroke-width: 2; }
#semester-fall .concept-svg .c-band { fill: var(--fall-soft); stroke: none; }
#semester-fall .fig-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
#semester-fall .fig-defs .mk-blue { fill: var(--gold-dim); }
#semester-fall .fig-defs .mk-grey { fill: #748499; }
#semester-fall .fig-wide { margin: 0 0 8px; }
#semester-fall .fig-wide figcaption { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--txt); }
#semester-fall .fig-wide .concept-svg { max-width: 340px; }
#semester-fall .fig-note { font-size: 15px; line-height: 1.65; color: var(--txt-dim); margin: 12px 0 0; }
#semester-fall .fig-note strong { color: var(--txt); font-weight: 500; }
#semester-fall .will-comparison + .will-comparison { border-top: 0; margin-top: -28px; }

/* Three unions: state switch */
#semester-fall .fig-switch { display: inline-flex; gap: 2px; padding: 3px; margin: 14px 0 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--fall-soft); }
#semester-fall .fig-switch button { appearance: none; border: 0; border-radius: 6px; background: transparent; color: var(--txt-dim); font: 500 14px var(--font-body); min-height: 40px; padding: 6px 14px; cursor: pointer; }
#semester-fall .fig-switch button[aria-pressed="true"] { background: var(--gold); color: #fff; }
#semester-fall .fig-switch button:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 2px; }
#semester-fall .unions { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 8px 32px; align-items: center; }
@container lecture (width < 560px) { #semester-fall .unions { grid-template-columns: 1fr; } }
#semester-fall .unions .bond { transition: stroke .25s; }
#semester-fall .unions[data-state="broken"] .bond { stroke: #9aa8b8; stroke-dasharray: 3 9; }
#semester-fall .unions[data-state="restored"] .bond { stroke-width: 3; }
#semester-fall .unions .badge { fill: var(--gold-dim); }
#semester-fall .unions[data-state="broken"] .badge { fill: #9aa8b8; }
#semester-fall .unions-legend { list-style: none; margin: 0; padding: 0; }
#semester-fall .unions-legend li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--txt-dim); margin-bottom: 12px; }
#semester-fall .unions-legend .n { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-dim); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center; margin-top: 1px; }
#semester-fall .unions-legend strong { display: block; color: var(--txt); font-weight: 600; }
#semester-fall .unions [data-for] { display: none; }
#semester-fall .unions[data-state="created"] [data-for="created"],
#semester-fall .unions[data-state="broken"] [data-for="broken"],
#semester-fall .unions[data-state="restored"] [data-for="restored"] { display: block; }
#semester-fall .unions-lead { font-size: 15px; line-height: 1.6; color: var(--txt); font-weight: 500; margin: 0 0 14px; }

/* Step figures: timeline, checklist, staircase */
#semester-fall .fig-steps { list-style: none; margin: 16px 0 26px; padding: 0; counter-reset: step; }
#semester-fall .fig-steps li { position: relative; padding: 0 0 18px 40px; font-size: 15px; line-height: 1.6; color: var(--txt-dim); counter-increment: step; }
#semester-fall .fig-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold-dim); color: var(--gold-dim); font-size: 13px; font-weight: 600; display: grid; place-items: center; box-sizing: border-box; }
#semester-fall .fig-steps li::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--fall-rule); }
#semester-fall .fig-steps li:last-child { padding-bottom: 0; }
#semester-fall .fig-steps li:last-child::after { display: none; }
#semester-fall .fig-steps strong { display: block; color: var(--txt); font-weight: 600; }
#semester-fall .fig-steps.is-dated li::before { content: ""; width: 12px; height: 12px; left: 7px; top: 6px; background: var(--gold-dim); border: 0; }
#semester-fall .fig-steps.is-dated li::after { top: 20px; }
#semester-fall .fig-steps .when { display: block; font-size: 13px; font-weight: 600; color: var(--gold-dim); font-variant-numeric: tabular-nums; }
#semester-fall .fig-steps.is-stairs li:nth-child(2) { margin-left: 6%; }
#semester-fall .fig-steps.is-stairs li:nth-child(3) { margin-left: 12%; }
#semester-fall .fig-steps.is-stairs li:nth-child(4) { margin-left: 18%; }
#semester-fall .fig-steps.is-stairs li:last-child::before { background: var(--gold-dim); color: #fff; }
#semester-fall .fig-steps.is-stairs li:last-child strong { color: var(--gold-dim); }

/* Liberty Map */
#semester-fall .lmap-wrap { container: lmap / inline-size; margin: 40px 0 0; }
#semester-fall .lmap-h { font: 600 22px/1.3 var(--font-display); color: var(--txt); margin: 0 0 8px; }
#semester-fall .lmap-sub { font-size: 16px; line-height: 1.7; color: var(--txt-dim); margin: 0 0 24px; max-width: 60ch; }
#semester-fall .lmap-root { display: block; padding: 14px 16px; border-left: 3px solid var(--gold); background: var(--fall-blue-soft); border-radius: 0 6px 6px 0; margin: 0 0 8px; }
#semester-fall .lmap-root b { display: block; font-size: 13px; font-weight: 600; color: var(--gold-dim); margin-bottom: 2px; }
#semester-fall .lmap-root span { font: 500 17px/1.5 var(--font-display); color: var(--txt); }
#semester-fall .lmap-band { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--txt-dim); margin: 26px 0 0; padding-left: 34px; }
#semester-fall .lmap { list-style: none; margin: 0; padding: 0; }
#semester-fall .lmap li { position: relative; }
#semester-fall .lmap button { appearance: none; display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: 14px 12px 14px 34px; cursor: pointer; font: inherit; color: inherit; }
#semester-fall .lmap button:hover { background: var(--fall-soft); }
#semester-fall .lmap button:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 2px; }
#semester-fall .lmap li::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--fall-rule); }
#semester-fall .lmap li::after { content: ""; position: absolute; left: 6px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold-dim); box-sizing: border-box; }
#semester-fall .lmap .is-cross::after { background: var(--gold-dim); }
#semester-fall .lmap-when { display: block; font-size: 13px; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
#semester-fall .lmap-who { display: block; font-size: 16px; font-weight: 600; color: var(--txt); line-height: 1.4; }
#semester-fall .lmap-says { display: block; font: 400 17px/1.45 var(--font-display); color: var(--gold-dim); margin-top: 2px; }
#semester-fall .lmap-aside { font-size: 15px; line-height: 1.65; color: var(--txt-dim); margin: 20px 0 0; }
#semester-fall .lmap-link { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--gold-dim); border-bottom: 1px solid currentColor; cursor: pointer; }
@container lmap (width >= 600px) {
  #semester-fall .lmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0; }
  #semester-fall .lmap-band { padding-left: 0; margin-top: 30px; }
  #semester-fall .lmap button { padding: 30px 16px 14px 0; height: 100%; }
  #semester-fall .lmap li::before { left: 0; right: 0; top: 13px; bottom: auto; width: auto; height: 2px; }
  #semester-fall .lmap li::after { left: 0; top: 8px; }
}

/* Two families of liberty */
#semester-fall .families { margin: 48px 0 0; }
#semester-fall .fam-q { display: block; width: fit-content; margin: 0 auto; padding: 10px 18px; border: 2px solid var(--gold-dim); border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--txt); text-align: center; }
#semester-fall .fam-stem { width: 2px; height: 22px; background: var(--gold-dim); margin: 0 auto; }
#semester-fall .fam-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
#semester-fall .fam { border: 1px solid var(--fall-rule); border-top: 3px solid var(--gold-dim); border-radius: 6px; padding: 18px 18px 16px; background: var(--bg); }
#semester-fall .fam.is-mid { border-top-color: #9aa8b8; background: var(--fall-soft); }
#semester-fall .fam-kicker { font-size: 13px; font-weight: 600; color: var(--gold-dim); }
#semester-fall .fam.is-mid .fam-kicker { color: var(--txt-dim); }
#semester-fall .fam-name { font: 600 18px/1.35 var(--font-display); color: var(--txt); margin: 2px 0 8px; }
#semester-fall .fam-ask { font-size: 15px; line-height: 1.6; color: var(--txt); margin: 0 0 10px; }
#semester-fall .fam-who { font-size: 14px; line-height: 1.6; color: var(--txt-dim); margin: 0; }
@container lmap (width >= 600px) {
  #semester-fall .fam-grid { grid-template-columns: 1fr .8fr 1fr; }
}

/* Compare any two */
#semester-fall .compare { container: cmp / inline-size; margin: 40px 0 0; padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); scroll-margin-top: calc(var(--header-h) + 24px); }
#semester-fall .cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 8px; }
#semester-fall .cmp-pick label { display: block; font-size: 13px; font-weight: 600; color: var(--txt-dim); }
#semester-fall .cmp-pick select { width: 100%; margin-top: 6px; min-height: 44px; padding: 8px 10px; font: 500 16px var(--font-body); color: var(--txt); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
#semester-fall .cmp-pick select:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 2px; }
#semester-fall .cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; padding: 18px 0; border-top: 1px solid var(--fall-rule); }
#semester-fall .cmp-row h4 { grid-column: 1 / -1; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--txt-dim); }
#semester-fall .cmp-row p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--txt); }
#semester-fall .cmp-row p b { display: none; font-size: 12px; font-weight: 600; color: var(--txt-dim); }
#semester-fall .cmp-row p + p b { color: var(--gold-dim); }
@container cmp (width < 440px) {
  #semester-fall .cmp-row { grid-template-columns: 1fr; gap: 12px; }
  #semester-fall .cmp-row p b { display: block; margin-bottom: 2px; }
}
@media (max-width: 699px) { #semester-fall .compare { padding: 22px 20px; } }

/* Comparison tables stack on narrow columns instead of scrolling sideways */
#semester-fall .approach-comparison { container: comparison / inline-size; overflow: visible; }
#semester-fall .approach-comparison .lec-table { min-width: 0; }
#semester-fall .lec-table.cols-4 col:first-child { width: 16%; }
#semester-fall .lec-table.cols-4 col:not(:first-child) { width: 28%; }
@container comparison (width < 640px) {
  #semester-fall .lec-table.cols-4 { display: block; }
  #semester-fall .lec-table.cols-4 colgroup { display: none; }
  #semester-fall .lec-table.cols-4 thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #semester-fall .lec-table.cols-4 :is(tbody, tr, th, td) { display: block; width: 100%; }
  #semester-fall .lec-table.cols-4 tbody tr { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
  #semester-fall .lec-table.cols-4 tbody th { padding: 10px 14px; background: var(--fall-soft); border: 0; border-radius: 4px; font-size: 16px; }
  #semester-fall .lec-table.cols-4 tbody td { border: 0; padding: 16px 0 0; }
  #semester-fall .lec-table.cols-4 .comparison-label { display: block; font-size: 12px; font-weight: 600; color: var(--txt-dim); margin-bottom: 4px; }
}

/* Active nav: bar only */
html[data-semester="fall"] .toc-item.active { background: transparent; border-left-width: 3px; padding-left: 17px; }
@media (max-width: 699px) {
  html[data-semester="fall"] .nav-tab.active { background: transparent; }
}

/* Freedom family tree */
#semester-fall .ftree { margin: 16px 0 0; }
#semester-fall .ftree-root { padding: 14px 16px; border: 2px solid var(--gold-dim); border-radius: 8px; font-size: 15px; line-height: 1.6; color: var(--txt-dim); }
#semester-fall .ftree strong { display: block; color: var(--txt); font-weight: 600; font-size: 16px; }
#semester-fall .ftree ul { list-style: none; margin: 0 0 0 18px; padding: 0; }
#semester-fall .ftree li { position: relative; padding: 12px 0 0 22px; border-left: 2px solid var(--fall-rule); }
#semester-fall .ftree li:last-child { border-left-color: transparent; }
#semester-fall .ftree li::before { content: ""; position: absolute; left: -2px; top: 0; width: 20px; height: 34px; border-left: 2px solid var(--fall-rule); border-bottom: 2px solid var(--fall-rule); border-bottom-left-radius: 8px; box-sizing: border-box; }
#semester-fall .ftree-node { padding: 10px 14px; border: 1px solid var(--fall-rule); border-radius: 6px; background: var(--bg); font-size: 15px; line-height: 1.6; color: var(--txt-dim); }
#semester-fall .ftree-node.is-key { background: var(--fall-blue-soft); border-color: transparent; }
#semester-fall .ftree-tag { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--gold-dim); }
@container lecture (width >= 600px) {
  #semester-fall .fam-grid.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container lecture (width < 480px) {
  #semester-fall .ftree ul { margin-left: 6px; }
  #semester-fall .ftree li { padding-left: 14px; }
  #semester-fall .ftree li::before { width: 12px; }
  #semester-fall .ftree-node { padding: 10px 12px; }
}

/* Phone header: room for the full title even before the web font loads */
@media (max-width: 699px) {
  html[data-semester] .app-header { gap: 12px; padding: 0 16px; }
  html[data-semester] .header-title { white-space: nowrap; font-size: 15px; line-height: 1.2; }
  html[data-semester] .semester-btn { min-width: 54px; padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (min-width: 1100px) {
}
.thesis-box {
  margin: 0 0 20px;
  padding: 18px 0 0;
}
.thesis-lift {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: var(--gold-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--txt);
}
.aeo-shared {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 32px 28px 48px;
}
.aeo-shared h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--txt);
}
.faq-block .faq-item { margin: 0 0 22px; }
.faq-block .faq-item:last-child { margin-bottom: 0; }
.faq-block h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 8px;
  color: var(--txt);
}
.faq-block .faq-item p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--txt-dim);
  margin: 0;
}
.about-block {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 28px;
}
.about-block p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--txt-dim);
  margin: 0 0 12px;
}
.about-block a { color: var(--gold-dim); }
html[data-semester="fall"] .aeo-shared { padding-left: 28px; padding-right: 28px; }
@media (max-width: 699px) {
  .aeo-shared { padding: 24px 16px 40px; }
}

