:root {
  --ink: #1d1d1d;
  --mute: #8a8a8a;
  --line: #d9d9d9;
  --acc: #b3261e;
  --cjk: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --latin: "Avenir Book", "Avenir", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111; overflow: hidden; }
body { font-family: var(--latin), var(--cjk); color: var(--ink); -webkit-font-smoothing: antialiased; }
#stage { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center; background: #fff; overflow: hidden; }

.slide { position: absolute; inset: 0; padding: 70px 130px 60px 110px; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }
.slide.active { opacity: 1; visibility: visible; }

/* title: thin vertical rule, like the previous slides */
h2 { margin: 0 0 40px; padding: 6px 0 6px 26px; border-left: 3px solid var(--ink); font-size: 42px; font-weight: 500; letter-spacing: .04em; line-height: 1.2; }
h2 .zh { text-transform: none; }
h2 small { text-transform: none; font-size: 22px; color: var(--mute); letter-spacing: .06em; margin-left: .7em; font-weight: 400; }
.kicker { display: none; }

p { margin: 0 0 18px; font-size: 28px; line-height: 1.7; }
b, strong { font-weight: 700; }
.mute { color: var(--mute); }
.acc { color: var(--acc); font-weight: 700; }
.en { font-family: var(--latin); color: var(--mute); font-size: .8em; }
.small { font-size: 21px; line-height: 1.6; }
.src { position: absolute; left: 110px; right: 130px; bottom: 34px; font-size: 15px; color: var(--mute); line-height: 1.5; }

ul.l { list-style: none; margin: 0; padding: 0; }
ul.l li { font-size: 28px; line-height: 1.7; margin-bottom: 10px; }
ul.l.small li { font-size: 24px; }

.quote { font-size: 34px; line-height: 1.65; padding-left: 26px; border-left: 3px solid var(--line); }
.quote .by { display: block; font-size: 17px; color: var(--mute); margin-top: 8px; line-height: 1.5; }
.quote-en { font-size: 21px; color: var(--mute); line-height: 1.55; margin-top: 18px; padding-left: 29px; }

[data-step] { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
[data-step].on { opacity: 1; transform: none; pointer-events: auto; }
.dim.on { opacity: .3; }

.row { display: flex; gap: 40px; }
.row.mid { align-items: center; }
.col { flex: 1; min-width: 0; }

/* title slide */
.title-slide { display: flex; flex-direction: column; justify-content: center; }
.title-slide .t1 { font-size: 88px; font-weight: 500; letter-spacing: .1em; line-height: 1.1; }
.title-slide .t2 { font-size: 26px; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); margin-top: 6px; }
.title-slide .rule { width: 3px; height: 90px; background: var(--acc); margin: 38px 0 0 0; position: absolute; left: 110px; bottom: 120px; }
.title-slide .t3 { position: absolute; left: 140px; bottom: 120px; font-size: 26px; line-height: 1.6; max-width: 900px; }
.title-slide .hint { position: absolute; left: 110px; bottom: 30px; font-size: 13px; color: var(--mute); }
kbd { border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-family: inherit; font-size: .95em; }

/* diagrams */
svg text { font-family: var(--latin), var(--cjk); }
.big { font-size: 44px; line-height: 1.5; font-weight: 500; }
.rows { margin-top: 6px; }
.rows .r { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.rows .r:last-child { border-bottom: 1px solid var(--line); }
.rows .r .k { font-size: 26px; font-weight: 700; }
.rows .r .k small { display: block; font-size: 15px; font-weight: 400; color: var(--mute); }
.rows .r .v { font-size: 24px; line-height: 1.6; }
.flow { display: flex; align-items: center; gap: 22px; font-size: 28px; }
.flow .a { color: var(--mute); font-size: 34px; }
.flow .box { border: 2px solid var(--ink); padding: 10px 22px; border-radius: 6px; }
.flow .box.k { border-color: var(--acc); color: var(--acc); font-weight: 700; }

/* chrome */
#side { position: absolute; right: 0; top: 0; bottom: 0; width: 64px; z-index: 6; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; opacity: 0; transition: opacity .25s; background: #fafafa; border-left: 1px solid var(--line); }
#side:hover, #stage:has(#nav:hover) #side { opacity: 1; }
#side.hide { opacity: 0 !important; pointer-events: none; }
#side .item { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--mute); }
#side .item:hover { background: #eee; color: var(--ink); }
#side .item.done { color: var(--ink); }
#side .item.cur { background: var(--ink); color: #fff; }
#side .item .tip { display: none; position: absolute; right: 50px; top: 50%; transform: translateY(-50%); background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 14px; white-space: nowrap; text-align: left; font-weight: 400; pointer-events: none; }
#side .item:hover .tip { display: block; }
#side .item .tip .zh { display: block; font-size: 18px; }
#side .item .tip .en { display: block; font-size: 13px; color: #bbb; }
#bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--ink); width: 0; transition: width .3s; z-index: 7; }
#nav { position: absolute; right: 4px; bottom: 14px; width: 56px; display: flex; gap: 4px; z-index: 8; opacity: 0; transition: opacity .25s; }
#stage:hover #nav { opacity: .8; }
#nav button { flex: 1; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--mute); font: inherit; font-size: 20px; cursor: pointer; padding: 0; }
#num { position: absolute; right: 68px; bottom: 14px; height: 30px; line-height: 30px; font-size: 13px; color: var(--mute); z-index: 5; cursor: pointer; }
#num input { width: 3.2ch; font: inherit; color: var(--ink); background: transparent; border: none; border-bottom: 1px solid var(--mute); padding: 0; text-align: right; outline: none; }

#s-husserl p { font-size: 24px; line-height: 1.6; }

/* figures */
.fig { margin: 0; text-align: center; }
.fig img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; object-fit: contain; box-shadow: 0 2px 14px rgba(0,0,0,.12); }
.fig figcaption { font-size: 14px; color: var(--mute); margin-top: 8px; line-height: 1.4; }
.figs { display: flex; gap: 18px; align-items: flex-end; justify-content: center; }
.figs .fig img { max-height: 300px; }
.cover img { box-shadow: 0 4px 18px rgba(0,0,0,.22); }
.title-slide .tcover { position: absolute; right: 250px; top: 210px; width: 400px; box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 3; }
.title-slide .tnj { position: absolute; right: 90px; top: 40px; width: 340px; box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 4; }
.title-slide .tphoto { position: absolute; right: 470px; top: 50px; width: 330px; box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 1; }
.title-slide .tcredit { position: absolute; left: 520px; right: 90px; bottom: 50px; font-size: 11.5px; line-height: 1.5; color: var(--mute); text-align: right; }
.title-slide .t3 { z-index: 3; }
table.cmp2 { border-collapse: collapse; width: 100%; font-size: 23px; }
table.cmp2 th { text-align: left; font-size: 24px; padding: 6px 14px 12px; border-bottom: 2px solid var(--ink); }
table.cmp2 th.k { color: var(--acc); }
table.cmp2 td { padding: 7px 14px; border-bottom: 1px solid var(--line); line-height: 1.45; vertical-align: top; }
table.cmp2 td.l { color: var(--mute); font-size: 18px; width: 120px; white-space: nowrap; }
table.cmp2 tr[data-step] { transform: none; }

#s-lineage .fig { width: 170px !important; }
#s-lineage .fig figcaption { font-size: 12.5px; line-height: 1.35; }

table.ret td { font-size: 22px; padding: 12px 14px; }
table.ret td.l { font-size: 20px; color: var(--ink); font-weight: 700; width: 110px; }
table.ret td.l .en { font-weight: 400; font-size: 14px; }
table.ret { table-layout: fixed; }
table.ret th:first-child, table.ret td.l { width: 120px; }
#s-stiegler table.ret td { font-size: 19px; padding: 9px 12px; }
table.ret tr.t3 td { background: #fbf3f2; }

.xs { font-size: 14px; line-height: 1.45; }

.collage { position: absolute; inset: 0; z-index: 5; }
.collage img { position: absolute; height: 230px; box-shadow: 0 8px 26px rgba(0,0,0,.35); border: 3px solid #fff; }
.collage-lab { position: absolute; left: 110px; top: 128px; font-size: 22px; font-weight: 700; color: var(--acc); background: #fff; padding: 2px 10px; }
#s-lineage.collage-on .figs, #s-lineage.collage-on .lab { opacity: .12; transition: opacity .4s; }
#s-stiegler table.ret td { font-size: 20px; padding: 8px 14px; }

/* ---------- week 8 additions ---------- */
/* Han Kang reading tag (top right) */
.hk { position: absolute; right: 130px; top: 44px; font-size: 15px; letter-spacing: .08em; color: var(--acc); border-left: 3px solid var(--acc); padding: 2px 0 2px 10px; line-height: 1.4; }
.hk b { font-weight: 700; }
.quote.hkq { border-left-color: var(--acc); }
.quote .hl { transition: background .35s, color .35s; border-radius: 3px; padding: 0 2px; }

/* video */
.video { position: relative; width: 640px; height: 360px; flex: none; background: #111; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vlink { display: inline-block; margin-top: 10px; font-size: 15px; color: var(--mute); text-decoration: none; border-bottom: 1px solid var(--line); }

/* pointillism zoom */
.zoombox { position: relative; width: 660px; height: 439px; overflow: hidden; flex: none; box-shadow: 0 2px 14px rgba(0,0,0,.18); }

/* 2x2 grid */
.grid2 { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 10px; font-size: 22px; }
.grid2 .h { font-size: 18px; color: var(--mute); text-align: center; align-self: end; padding-bottom: 4px; }
.grid2 .rh { font-size: 18px; color: var(--mute); align-self: center; text-align: right; padding-right: 8px; }
.grid2 .c { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; line-height: 1.45; min-height: 96px; }
.grid2 .c.bad { border: 2px solid var(--acc); }
.grid2 .c small { display: block; font-size: 16px; color: var(--mute); margin-top: 4px; }
.grid2 .c.bad small { color: var(--acc); }

/* levels ladder */
.ladder { display: flex; flex-direction: column; gap: 8px; width: 520px; flex: none; }
.ladder .lv { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; font-size: 22px; transition: border-color .3s, background .3s; }
.ladder .lv small { color: var(--mute); font-size: 15px; margin-left: auto; text-align: right; }
.ladder .lv.ext { border-style: dashed; color: var(--mute); font-size: 18px; padding: 6px 18px; }
.ladder .lv.g1 { border-left: 6px solid #555; }
.ladder .lv.g2 { border-left: 6px solid var(--acc); }
.ladder .lv.off { color: #bbb; }

/* components table */
table.comp td.y { color: var(--ink); font-weight: 700; text-align: center; }
table.comp td.n { color: var(--acc); font-weight: 700; text-align: center; }
table.comp td.m { color: var(--mute); text-align: center; }
table.comp th { text-align: center; }
table.comp th:first-child { text-align: left; }

/* two-column contrast */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.vs .lab, .lab { font-size: 15px; letter-spacing: .1em; color: var(--mute); margin-bottom: 8px; }
.lab.acc { color: var(--acc); font-weight: 400; }

/* senses highlighting */
#s-senses.h-touch .touch { background: #e8eef7; }
#s-senses.h-smell .smell { background: #f3e9d2; }
#s-senses.h-sound .sound { background: #e3f0e3; }
#s-senses.h-sight .sight { background: #efe6f3; }
#s-senses.h-taste .taste { background: #f7e1df; }
.legend { display: flex; gap: 18px; font-size: 16px; color: var(--mute); margin-top: 10px; }
.legend span i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }

/* photo slots for the instructor's own Gwangju photographs: show the expected file name until it exists */
.ph { position: relative; }
.ph .need { display: none; }
.ph.missing img { display: none; }
.ph.missing .need { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border: 2px dashed var(--line); border-radius: 8px; color: var(--mute); font-size: 15px; text-align: center; padding: 12px; height: var(--h, 260px); }
.ph.missing .need code { font-size: 14px; color: var(--acc); }

/* image pairs (fear errors) */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { margin: 0; }
.pair img { width: 100%; height: 215px; object-fit: cover; display: block; }
.pair figcaption { font-size: 18px; margin-top: 6px; text-align: center; }
.pair .bad img { outline: 4px solid var(--acc); outline-offset: -4px; }
.pair .bad figcaption { color: var(--acc); font-weight: 700; }

/* levels: spectrum arrow */
.spectrum { display: flex; gap: 22px; align-items: stretch; }
.spectrum .arrow { width: 70px; flex: none; position: relative; }
.spectrum .arrow svg { position: absolute; inset: 0; }

/* three trigger columns */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.three .t { border-top: 3px solid var(--ink); padding-top: 12px; }
.three .t.k { border-top-color: var(--acc); }
.three .t h3 { margin: 0 0 4px; font-size: 28px; font-weight: 700; }
.three .t h3 small { display: block; font-size: 14px; font-weight: 400; color: var(--mute); letter-spacing: .04em; }
.three .t p { font-size: 19px; line-height: 1.55; margin: 8px 0 0; }
.three .t img { width: 100%; height: 150px; object-fit: cover; display: block; margin-top: 10px; }

/* appraisal cards: a drawn face, the emotion, one line */
.emo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 26px; }
.emo .card { border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 20px; text-align: center; }
.emo .hd { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }
.emo .hd svg { width: 110px; height: 110px; }
.emo .hd b { font-size: 30px; }
.emo .card p { font-size: 21px; margin: 0; line-height: 1.5; }

/* levels: one colour scale from sociology (light) to physics (deep red) */
#s-levels .ladder .lv { border: none; color: var(--ink); }
#s-levels .ladder .lv small { color: inherit; opacity: .75; }
#s-levels .ladder .lv:nth-child(1) { background: #fbefed; }
#s-levels .ladder .lv:nth-child(2) { background: #f3d9d5; }
#s-levels .ladder .lv:nth-child(3) { background: #e9b9b2; }
#s-levels .ladder .lv:nth-child(4) { background: #da8c82; }
#s-levels .ladder .lv:nth-child(5) { background: #c75a4e; color: #fff; }
#s-levels .ladder .lv:nth-child(6) { background: #b3261e; color: #fff; }

/* Seurat zoom: a plane resized every frame by JS (no CSS transform, so the browser always
   draws from the source pixels); the high-res layer l1 sits exactly over its part of l0. */
.zoombox .plane { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.zoombox .plane img { position: absolute; display: block; max-width: none; }
.zoombox .plane .l0 { left: 0; top: 0; width: 100%; height: 100%; }

/* levels, step 6: the four middle rows split into two groups, brackets draw in, the ends fade */
#s-levels .ladder { position: relative; }
#s-levels .ladder .lv { width: 100%; align-self: flex-start; transition: opacity .45s ease, transform .45s ease, width .6s ease, translate .6s ease; }
#s-levels.grp .ladder .lv.g1, #s-levels.grp .ladder .lv.g2 { width: calc(100% - 74px); }
#s-levels.grp .ladder .lv.g1 { translate: 0 -7px; }
#s-levels.grp .ladder .lv.g2 { translate: 0 7px; }
#s-levels.grp .ladder .lv.ext { opacity: .35; }
#s-levels .brace { position: absolute; left: calc(100% - 60px); width: 16px; border: 3px solid var(--ink); border-left: none; border-radius: 0 6px 6px 0; transform: scaleY(0); transform-origin: top; transition: transform .5s ease .35s; }
#s-levels .brace span { position: absolute; left: 26px; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; font-size: 22px; font-weight: 700; letter-spacing: .2em; opacity: 0; transition: opacity .4s ease .75s; }
#s-levels .brace.b1 { top: 47px; height: 140px; }
#s-levels .brace.b2 { top: 213px; height: 140px; border-color: var(--acc); }
#s-levels .brace.b2 span { color: var(--acc); }
#s-levels.grp .brace { transform: scaleY(1); }
#s-levels.grp .brace span { opacity: 1; }

/* disgust walls: the push arrow draws itself */
#s-rings .push { stroke-dasharray: 320; animation: push-draw .9s ease-out both; }
@keyframes push-draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }

/* Seurat: nested frames, each projected out of the previous one */
.nest { display: block; margin-top: 6px; }
/* one level per click: red box, then projection lines, then the next frame */
.nest [data-step] { transform: none; transition: opacity .45s ease var(--d); }
.nest .ln { stroke-dasharray: 400; stroke-dashoffset: 400; transition: opacity .1s ease var(--d), stroke-dashoffset .45s ease var(--d); }
.nest .ln.on { stroke-dashoffset: 0; }

/* two spatial maps */
.spaces { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.spaces svg { display: block; width: 100%; height: 250px; }
.spaces .lab { font-size: 20px; letter-spacing: .04em; color: var(--ink); font-weight: 700; margin-bottom: 8px; }
.spaces .lab.acc { color: var(--acc); }
.spaces .lab .en { font-weight: 400; font-size: 15px; }
.spaces .cap { font-size: 19px; line-height: 1.5; margin: 8px 0 0; }

/* levels, step 7: the gap closes again (the levels are not mutually exclusive) */
#s-levels .brace { transition: transform .5s ease .35s, translate .6s ease; }
#s-levels.joined .ladder .lv.g1, #s-levels.joined .ladder .lv.g2 { translate: 0 0; }
#s-levels.joined .brace.b1 { translate: 0 7px; }
#s-levels.joined .brace.b2 { translate: 0 -7px; }

/* ---------- larger type on slides with room (overrides inline sizes) ---------- */
#s-appraisal .emo .card p { font-size: 23px; }
#s-appraisal p[data-step="5"] { font-size: 24px !important; }
#s-errors p.small { font-size: 24px !important; }
#s-three > p.small { font-size: 22px !important; }
#s-hk-pen .quote { font-size: 28px !important; }
#s-hk-pen p.small { font-size: 24px !important; }
#s-fiction p.small { font-size: 24px !important; }
#s-fiction .lab { font-size: 17px; }
#s-hk-count .quote { font-size: 27px !important; line-height: 1.6; }
#s-hk-count p.small { font-size: 26px !important; }
#s-space p[data-step="3"] { font-size: 25px !important; }
#s-space p[data-step="4"] { font-size: 20px !important; }
#s-space .cap { font-size: 20px; }
#s-hk-magnet .quote { font-size: 27px !important; }
#s-hk-magnet p.small { font-size: 24px !important; }
#s-hk-magnet p.small.mute { font-size: 17px !important; }
#s-rings .col p.small { font-size: 23px !important; }
#s-rings .col p.small.mute { font-size: 20px !important; }
#s-yatharth2 .quote { font-size: 30px !important; }
#s-yatharth2 p.small { font-size: 25px !important; }
#s-hk-hunger .quote { font-size: 25px !important; }
#s-hk-hunger p.small { font-size: 25px !important; }
#s-hk-beast .quote { font-size: 26px !important; }
#s-hk-beast p.small { font-size: 24px !important; }
#s-hk-mother .quote { font-size: 27px !important; }
#s-hk-mother p.small { font-size: 24px !important; }
#s-hk-mother p.small.mute { font-size: 17px !important; }
#s-conclusion .quote { font-size: 28px !important; }
#s-conclusion table.cmp2 { font-size: 25px; }
#s-conclusion p.small { font-size: 25px !important; }
#s-discuss ul.l li { font-size: 27px; }

.spaces .hdr { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 6px; }
.spaces .hdr .lab { margin-bottom: 4px; }
.spaces .hdr img { height: 82px; display: block; }

#s-nospecial .quote-en { font-size: 25px; line-height: 1.5; }

/* Yatharth plot summary */
ol.story { list-style: none; counter-reset: st; margin: 0; padding: 0; }
ol.story li { counter-increment: st; position: relative; padding-left: 42px; font-size: 23px; line-height: 1.5; margin-bottom: 13px; }
ol.story li::before { content: counter(st); position: absolute; left: 0; top: 5px; width: 27px; height: 27px; border-radius: 50%; background: var(--acc); color: #fff; font-size: 15px; font-weight: 700; display: grid; place-items: center; }

/* question to the class, as a speech bubble */
.bubble { position: relative; display: inline-block; margin-top: 22px; padding: 12px 24px; background: #fbe9e7; color: var(--acc); border: 2px solid var(--acc); border-radius: 22px; font-size: 25px; font-weight: 700; }
.bubble::after { content: ''; position: absolute; left: 34px; bottom: -14px; width: 22px; height: 22px; background: #fbe9e7; border-right: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(45deg) skew(10deg, 10deg); }

/* starting-point slide: a small stack of Hogan's books */
.hogan-books { position: absolute; right: 120px; top: 24px; width: 340px; height: 175px; }
.hogan-books img { position: absolute; height: 150px; box-shadow: 0 3px 12px rgba(0,0,0,.25); }
.hogan-books img:last-child { height: 175px; }
