/* ============================================================================
   ppt.thomasthzh.top · Swiss Print / Archival Editorial Presentation System
   Warm paper ground + charcoal ink + vermilion & technical cobalt
   ============================================================================ */

:root {
  --paper: #f6f3ec;
  --paper-2: #fdfcf9;
  --paper-tint: #eee9de;
  --ink: #181817;
  --ink-2: #4b4a46;
  --ink-3: #7a7872;
  --rule: rgba(24, 24, 23, 0.14);
  --rule-strong: rgba(24, 24, 23, 0.34);
  --red: #c93b2b;
  --red-bg: rgba(201, 59, 43, 0.07);
  --blue: #1d4ed8;
  --blue-bg: rgba(29, 78, 216, 0.07);
  --green: #15803d;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* Subtle light-mode paper ribbons from profile.thomasthzh.top */
#bg-stage-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Hairline top progress */
.progress-rule {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rule);
  z-index: 40;
}
.progress-rule i {
  display: block;
  height: 100%;
  width: 10%;
  background: var(--ink);
  transition: width 0.35s ease;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 12px; left: 28px; right: 28px;
  height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 30;
  font-size: 12.5px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.doc-idx { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
.doc-sep { color: var(--ink-3); }
.doc-section { color: var(--ink-2); }

.bar-btn {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: 5px 11px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bar-btn:hover, .bar-btn.is-on {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.bar-btn.is-running .rec-dot { background: var(--red); animation: blink 1s infinite; }

/* Main Viewport */
.viewport {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  padding: 56px 32px 58px;
  display: flex; align-items: center; justify-content: center;
}
.stage {
  position: relative;
  width: min(1240px, 100%);
  height: min(700px, 100%);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
  display: flex; flex-direction: column;
}
.slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.slide-body {
  width: 100%;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  gap: 18px;
  overflow-y: auto;
  scrollbar-width: none;
}
.slide-body::-webkit-scrollbar { display: none; }

/* Editorial Headings */
.folio {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.hd {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
}
.hd.tight { padding-bottom: 10px; }
.num-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--paper-2);
  background: var(--ink);
  padding: 4px 8px;
  line-height: 1;
  margin-top: 5px;
  flex-shrink: 0;
}
.hd h2 {
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.7vw, 33px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.01em;
}
.hd .sub { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; line-height: 1.5; }
.ink-red { color: var(--red); }
.ink-blue { color: var(--blue); }
.rule-h { height: 1px; background: var(--rule-strong); margin: 16px 0; }

/* Stamps */
.stamp {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  background: var(--paper);
}
.stamp-blue { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.stamp-red { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* ==================== 01 COVER ==================== */
.cover-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.92fr;
  gap: 36px;
  align-items: center;
}
.display-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.16;
  margin: 12px 0 10px;
  letter-spacing: -0.02em;
}
.display-sub {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-2);
}
.cover-note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 20px;
}
.chapter-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chapter-list button {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.chapter-list button b { font-family: var(--font-mono); color: var(--red); }
.chapter-list button:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.chapter-list button:hover b { color: var(--paper-2); }

.exhibit-frame {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 6px 6px 0 rgba(24, 24, 23, 0.08);
}
.exhibit-bar, .exhibit-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-3);
  font-family: var(--font-mono);
}
.seg-btns { display: flex; border: 1px solid var(--rule-strong); }
.seg-btns button {
  background: transparent; border: none; border-right: 1px solid var(--rule-strong);
  padding: 3px 9px; font-size: 11px; color: var(--ink-2); cursor: pointer;
}
.seg-btns button:last-child { border-right: none; }
.seg-btns button.is-active { background: var(--ink); color: var(--paper-2); }
.t-canvas {
  width: 100%; max-width: 350px; aspect-ratio: 1;
  margin: 0 auto; display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  cursor: crosshair;
}

/* ==================== 02 LEDGER COMPARE ==================== */
.ledger-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ledger-col {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--blue);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.ledger-col.is-red { border-top-color: var(--red); }
.col-head { display: flex; justify-content: space-between; align-items: center; }
.col-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.ledger-col h3 { font-family: var(--font-serif); font-size: 21px; }
.plain-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14.5px; line-height: 1.65; color: var(--ink-2);
}
.plain-list li { padding-left: 14px; position: relative; }
.plain-list li::before {
  content: "—";
  position: absolute; left: 0; top: 0;
  color: var(--ink-3);
}
.col-verdict {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 13.5px;
  display: flex; flex-direction: column; gap: 3px;
}
.col-verdict span { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.col-verdict.is-red strong { color: var(--red); }

.thesis-strip {
  background: var(--paper-tint);
  border-left: 4px solid var(--ink);
  padding: 13px 18px;
  font-size: 15.5px;
  line-height: 1.5;
}

/* ==================== 03 MIGRATED PROJECTS ==================== */
.tab-strip {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tab-strip button {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  padding: 7px 14px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.tab-strip button.is-active, .tab-strip button:hover {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}
.exhibit-stage { flex: 1; min-height: 380px; }
.proj-panel {
  display: none;
  grid-template-columns: 1.38fr 0.85fr;
  gap: 20px;
  height: 100%;
}
.proj-panel.is-active { display: grid; }
.demo-box {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
}
.proj-side {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.ext-link { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.proj-side h3 { font-family: var(--font-serif); font-size: 20px; line-height: 1.3; }
.proj-side p { font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.side-note {
  margin-top: auto;
  padding: 10px 12px;
  background: var(--red-bg);
  border-left: 3px solid var(--red);
  color: var(--ink) !important;
  font-size: 13px !important;
}

/* WebOS Light Frame */
.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px; border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
}
.win-dots { display: flex; gap: 5px; }
.win-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--paper-tint); }
.win-stat { color: var(--green); font-weight: 700; }
.webos-inner {
  position: relative; flex: 1;
  display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 12px;
  overflow: hidden;
}
.webos-scan-ray {
  position: absolute; inset: 0 auto 0 -38%; width: 34%;
  background: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.12), transparent);
  pointer-events: none;
  animation: webosScan 4s linear infinite;
}
.webos-card-main {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.webos-card-main small { font-family: var(--font-mono); font-size: 11px; color: var(--blue); font-weight: 700; }
.webos-card-main h4 { font-family: var(--font-serif); font-size: 17px; line-height: 1.35; }
.webos-card-main p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.webos-meta-row {
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px;
}
.webos-meta-row b { color: var(--green); }
.webos-nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.webos-node {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  padding: 10px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px;
}
.webos-node b { font-size: 13px; color: var(--ink); }
.webos-node small { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.webos-node.is-active, .webos-node:hover { background: var(--ink); border-color: var(--ink); }
.webos-node.is-active b, .webos-node:hover b, .webos-node.is-active small, .webos-node:hover small { color: var(--paper-2); }
.webos-dock { display: flex; justify-content: center; gap: 8px; }
.webos-dock button {
  background: var(--paper); border: 1px solid var(--rule-strong);
  padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--ink);
}
.webos-dock button:hover { background: var(--ink); color: var(--paper-2); }

/* SyncAction Light Frame */
.sync-top {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--blue);
  padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.sync-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sync-viewport {
  position: relative; min-height: 240px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 12px; overflow: hidden; cursor: crosshair;
}
.vp-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-bottom: 12px; }
.vp-lines { display: flex; flex-direction: column; gap: 10px; }
.vp-lines i { display: block; height: 12px; background: var(--paper-tint); border: 1px solid var(--rule); }
.vp-lines i:nth-child(2) { width: 72%; }
.vp-lines i:nth-child(3) { width: 48%; }
.sync-cursor-tag {
  position: absolute; left: 36%; top: 54%;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
  background: var(--ink); color: var(--paper-2);
  pointer-events: none; transition: left 0.05s linear, top 0.05s linear;
  animation: idleFloat 4.2s ease-in-out infinite;
}
.sync-cursor-tag.is-peer { background: var(--blue); }
.sync-viewport.is-live-mirror .sync-cursor-tag { animation: none; }
.sync-target-ring {
  position: absolute; left: 36%; top: 54%;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--blue); transform: translate(-50%, -50%);
  pointer-events: none;
}
.sync-click-ping {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--red); transform: translate(-50%, -50%);
  pointer-events: none; animation: pingOut 0.7s ease-out forwards;
}

/* Nylon Light Frame */
.nylon-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nylon-tile {
  background: var(--paper); border: 1px solid var(--rule-strong);
  padding: 14px 12px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
}
.nylon-tile b { font-size: 13.5px; color: var(--ink); }
.nylon-tile small { font-size: 11.5px; color: var(--ink-3); }
.nylon-tile.is-picked, .nylon-tile:hover { background: var(--ink); border-color: var(--ink); }
.nylon-tile.is-picked b, .nylon-tile:hover b, .nylon-tile.is-picked small, .nylon-tile:hover small { color: var(--paper-2); }
.nylon-pill {
  background: var(--paper-tint); border: 1px solid var(--rule-strong);
  padding: 12px 14px; display: flex; justify-content: space-between; font-size: 13.5px;
}
.nylon-pill span { font-family: var(--font-mono); color: var(--blue); font-weight: 700; }
.alice-pipe {
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 12px; border: 1px dashed var(--rule-strong); background: var(--paper);
}
.alice-pipe > div {
  flex: 1; text-align: center; padding: 8px 4px;
  border: 1px solid var(--rule-strong); background: var(--paper-2);
}
.alice-pipe > div.is-hi { border-color: var(--blue); background: var(--blue-bg); }
.alice-pipe b { display: block; font-size: 12px; font-family: var(--font-mono); }
.alice-pipe small { font-size: 10.5px; color: var(--ink-3); }
.alice-pipe i { font-style: normal; color: var(--ink-3); font-weight: 700; }

/* Curling Light Frame */
.rink-wrap { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; }
.rink-house { position: relative; width: 210px; height: 210px; margin: 0 auto; display: grid; place-items: center; }
.ring { position: absolute; border-radius: 50%; }
.r1 { width: 196px; height: 196px; border: 16px solid rgba(29, 78, 216, 0.22); }
.r2 { width: 116px; height: 116px; border: 14px solid rgba(201, 59, 43, 0.28); }
.r3 { width: 38px; height: 38px; border: 2px solid var(--ink); background: var(--paper-2); }
.stone {
  position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--ink); transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.s1 { background: var(--red); transform: translate(-24px, -18px); }
.s2 { background: #eab308; transform: translate(28px, 24px); }
.s3 { background: var(--blue); transform: translate(-6px, 8px); }
.rink-info { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rule-strong); background: var(--paper); }
.kv { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.kv span { color: var(--ink-3); }
.ink-btn {
  background: var(--ink); color: var(--paper-2); border: none;
  padding: 8px 12px; font-size: 12.5px; cursor: pointer;
}
.profile-mini-box { flex-direction: row; align-items: center; justify-content: center; gap: 20px; }
.profile-mini-box h4 { font-family: var(--font-serif); font-size: 18px; margin-bottom: 6px; }
.profile-mini-box p { font-size: 13.5px; color: var(--ink-2); max-width: 220px; line-height: 1.6; }

/* ==================== 04 / 05 / 07 TWO-COLUMN PAPER PANELS ==================== */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.paper-panel {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.panel-label {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--ink-3); padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.compare-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.c-row { padding: 14px; background: var(--paper); border: 1px solid var(--rule); }
.c-row.is-accent { border-color: var(--red); background: var(--red-bg); }
.c-row h4 { font-size: 15px; margin-bottom: 6px; }
.c-row p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

.formula-box {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; background: var(--paper); border: 1px solid var(--rule-strong);
}
.formula-box > div { flex: 1; font-size: 12.5px; line-height: 1.45; }
.formula-box b { display: block; margin-bottom: 2px; }
.formula-box span { color: var(--ink-2); }
.formula-box i { font-style: normal; font-weight: 800; color: var(--red); font-size: 16px; }
.formula-box .is-res { background: var(--ink); color: var(--paper-2); padding: 8px; text-align: center; }
.formula-box .is-res span { color: rgba(253,252,249,0.78); }

.diesel-pair {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center;
}
.d-card { padding: 14px 10px; background: var(--paper); border: 1px solid var(--rule-strong); }
.big-num { display: block; font-family: var(--font-mono); font-size: 30px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.d-card b { display: block; font-size: 14.5px; }
.d-card small { font-size: 12px; color: var(--ink-3); }
.d-eq { font-size: 28px; font-weight: 800; color: var(--ink-2); }

.floor-gauge { padding: 10px 12px; background: var(--paper); border: 1px solid var(--rule); }
.fg-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; color: var(--ink-2); }
.fg-track { height: 10px; background: var(--paper-tint); overflow: hidden; }
.fg-fill { display: block; height: 100%; width: 75%; background: var(--red); animation: floorPress 3.4s ease-in-out infinite alternate; }

.ink-quote {
  border-left: 3.5px solid var(--ink);
  padding: 10px 14px;
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 15px; line-height: 1.65;
}
.ink-quote cite { display: block; margin-top: 4px; font-family: var(--font-sans); font-size: 11.5px; color: var(--ink-3); font-style: normal; }

/* Slide 5 */
.four-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-item {
  background: var(--paper); border: 1px solid var(--rule-strong);
  padding: 13px; text-align: left; cursor: pointer;
  transition: all 0.15s ease;
}
.f-item span { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--red); }
.f-item h4 { font-size: 15px; margin: 3px 0 5px; color: var(--ink); }
.f-item p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.f-item.is-active, .f-item:hover { background: var(--paper-2); border-color: var(--ink); box-shadow: 3px 3px 0 rgba(24,24,23,0.12); }
.side-fix { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: var(--blue); }

.state-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.state-row > div { padding: 10px; background: var(--paper); border: 1px solid var(--rule); font-size: 12.5px; }
.state-row b { display: block; color: var(--red); margin-bottom: 3px; }
.state-row span { color: var(--ink-2); line-height: 1.45; }

.blueprint-svg { width: 100%; max-height: 220px; }
.bp-line { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 6 4; animation: dashMove 1.4s linear infinite; }
.bp-box rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.bp-box.is-hot rect { fill: var(--red-bg); stroke: var(--red); }
.bt1 { fill: var(--ink); font-size: 13px; font-weight: 700; }
.bt2 { fill: var(--ink-2); font-size: 10.5px; }

/* Slide 6: Valves */
.valve-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.v-col {
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.v-col.is-breaking { border: 2px solid var(--red); background: var(--red-bg); }
.v-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.tag-ok { color: var(--green); }
.tag-warn { color: var(--red); }
.v-col h3 { font-family: var(--font-serif); font-size: 21px; }
.v-col p { font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }

/* Slide 7: Scissors */
.bar-compare { display: flex; flex-direction: column; gap: 12px; }
.bc-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.bc-track { height: 26px; background: var(--paper-tint); display: flex; align-items: center; }
.bc-blue { height: 100%; background: var(--blue); color: #fff; font-size: 12px; display: flex; align-items: center; padding-left: 10px; font-style: normal; }
.bc-red { height: 100%; background: var(--red); display: block; }
.bc-track span { margin-left: 10px; font-size: 12.5px; color: var(--red); font-weight: 600; }
.chart-svg { width: 100%; height: auto; }

.tier-box { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tier { padding: 15px; background: var(--paper); border: 1px solid var(--rule-strong); }
.tier.is-red { border-color: var(--red); background: var(--red-bg); }
.tier-k { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--blue); }
.tier h4 { font-family: var(--font-serif); font-size: 17px; margin: 4px 0 6px; }
.tier p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.bottom-line { padding-top: 10px; border-top: 1px solid var(--rule-strong); font-size: 14px; }

/* Slide 8: Three Cases */
.three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case-col {
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.case-idx { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--red); }
.case-col h3 { font-family: var(--font-serif); font-size: 19px; }
.mini-diagram {
  background: var(--paper); border: 1px solid var(--rule);
  padding: 12px; min-height: 118px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.api-diag { flex-direction: row; align-items: center; text-align: center; gap: 4px; }
.api-diag span { flex: 1; padding: 8px 4px; border: 1px solid var(--rule-strong); background: var(--paper-2); font-size: 11.5px; font-weight: 700; }
.api-diag span.is-hi { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); }
.api-diag small { display: block; font-weight: 400; color: var(--ink-3); font-size: 10px; }
.api-diag b { color: var(--red); }
.quota-diag > div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 8px; background: var(--paper-2); border: 1px solid var(--rule); }
.quota-diag > div.is-hi { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.race-diag { align-items: center; text-align: center; font-size: 13px; font-weight: 600; }
.race-diag b { color: var(--red); }
.case-quote { font-family: var(--font-serif); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.case-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-top: auto; }

/* Slide 9: Paradox */
.clarify-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.cl-box { background: var(--paper-2); border: 1px solid var(--rule-strong); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cl-box.is-blue { border-color: var(--blue); background: var(--blue-bg); }
.cl-box p { font-size: 14.5px; line-height: 1.65; }
.cl-box small { color: var(--ink-2); }

.paradox-box {
  background: var(--paper-2); border: 1.5px solid var(--ink);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
}
.px-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.px-head span { color: var(--ink-2); }
.px-bars { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.px-bars small { display: block; margin-bottom: 6px; color: var(--ink-3); font-size: 12px; }
.bar-split { display: flex; height: 44px; font-size: 12.5px; font-weight: 700; }
.bar-split span { width: 50%; display: grid; place-items: center; padding: 0 8px; text-align: center; }
.bs-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue); }
.bs-ok { background: rgba(21,128,61,0.1); color: var(--green); border: 1px solid var(--green); border-left: none; }
.bs-red { background: var(--red); color: #fff; }
.bs-dark { background: var(--ink); color: var(--paper-2); }
.px-neq { font-size: 26px; color: var(--red); }
.px-foot {
  text-align: center; font-family: var(--font-serif);
  font-size: 21px; font-weight: 700; color: var(--red);
  padding-top: 8px; border-top: 1px solid var(--rule);
}

/* Slide 10: Ending */
.end-body { align-items: center; text-align: center; gap: 22px; }
.end-pre { font-size: 18px; line-height: 1.75; color: var(--ink-2); max-width: 720px; }
.end-q {
  max-width: 820px;
  padding: 28px 36px;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(24, 24, 23, 0.08);
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.8vw, 34px);
  font-weight: 700; line-height: 1.55;
}
.end-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.end-links a {
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  padding: 6px 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
}
.end-links a:hover { background: var(--ink); color: var(--paper-2); text-decoration: none; }
.end-foot { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-2); }

/* Bottombar & Drawers */
.bottombar {
  position: fixed; bottom: 12px; left: 28px; right: 28px; height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 30; font-size: 12px;
}
.nav-group { display: flex; align-items: center; gap: 10px; }
.counter { font-family: var(--font-mono); color: var(--ink-3); }
.counter b { color: var(--ink); }
.dots { display: flex; gap: 6px; }
.dots button { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--rule-strong); background: transparent; cursor: pointer; }
.dots button.is-active { width: 22px; border-radius: 99px; background: var(--ink); border-color: var(--ink); }
.hint { color: var(--ink-3); }

.notes-drawer {
  position: fixed; right: 24px; bottom: 58px;
  width: min(440px, calc(100vw - 48px)); max-height: 52vh;
  background: var(--paper-2); border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(24,24,23,0.12);
  padding: 16px 18px; z-index: 50;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: all 0.2s ease; user-select: text;
}
.notes-drawer.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.drawer-hd { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.drawer-body { overflow-y: auto; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); white-space: pre-line; }
.x-btn { background: none; border: 1px solid var(--rule-strong); width: 26px; height: 26px; cursor: pointer; font-size: 16px; color: var(--ink); }

.overview-modal {
  position: fixed; inset: 0; background: rgba(24, 24, 23, 0.52);
  z-index: 60; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.overview-modal.is-open { opacity: 1; pointer-events: auto; }
.overview-sheet {
  width: min(920px, 92vw); max-height: 82vh; overflow-y: auto;
  background: var(--paper); border: 1.5px solid var(--ink); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ov-card {
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  padding: 12px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; color: var(--ink);
}
.ov-card span { font-family: var(--font-mono); font-size: 11px; color: var(--red); }
.ov-card small { font-size: 11.5px; color: var(--ink-3); }
.ov-card.is-current, .ov-card:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.ov-card.is-current span, .ov-card:hover span, .ov-card.is-current small, .ov-card:hover small { color: rgba(253,252,249,0.75); }

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes webosScan { 0% { left: -38%; } 100% { left: 112%; } }
@keyframes idleFloat { 0%,100% { transform: translate(-50%,-50%) translate(0,0); } 50% { transform: translate(-50%,-50%) translate(14px,-8px); } }
@keyframes pingOut { 0% { width: 10px; height: 10px; opacity: 1; } 100% { width: 58px; height: 58px; opacity: 0; } }
@keyframes floorPress { 0% { width: 80%; } 100% { width: 28%; } }
@keyframes dashMove { to { stroke-dashoffset: -20; } }

@media (max-width: 960px) {
  .cover-grid, .ledger-two, .proj-panel.is-active, .split-2, .valve-row, .three-cols, .clarify-row, .px-bars {
    grid-template-columns: 1fr;
  }
  .hint { display: none; }
}
