:root {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-2: #edf3f0;
  --celadon: #dbe7e1;
  --celadon-deep: #aebfb5;
  --ink: #19211f;
  --ink-2: #3a4743;
  --ink-3: #64746f;
  --ink-4: #8fa09a;
  --rule: #cedad4;
  --rule-2: #e2ebe6;

  /* Unified palette anchored on the cover illustration */
  --pine: #245b56;
  --pine-dark: #1a433f;
  --pine-soft: #e7f1ee;
  --slate: #43645f;
  --slate-soft: #eef4f2;
  --brass: #84693a;
  --brass-soft: #faf4e6;
  --brass-border: #d9c396;
  --warn: #8c483b;
  --warn-soft: #faefed;
  --warn-border: #d7aba2;

  --display: "Spectral", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

::selection { background: #cfe0da; }

a {
  color: var(--pine);
  text-decoration: none;
  border-bottom: 1px solid rgba(36, 91, 86, 0.3);
}
a:hover { border-bottom-color: var(--pine); }

b, strong { font-weight: 650; color: var(--ink); }
.en { font-family: var(--mono); font-size: 0.9em; }

/* Inline & SVG Math Typography */
.m {
  font-family: "Spectral", "Times New Roman", Times, Georgia, serif;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.06em;
}
.m i {
  font-style: italic;
  padding-right: 0.02em;
}
.m sub {
  font-size: 0.72em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  bottom: -0.22em;
  margin-left: 0.01em;
}
svg .sm {
  font-family: "Spectral", "Times New Roman", Times, Georgia, serif;
  font-style: italic;
  font-size: 1.14em;
}
svg .sm-sub {
  font-family: "Spectral", "Times New Roman", Times, Georgia, serif;
  font-size: 0.76em;
  baseline-shift: -24%;
}

/* Laser pointer */
#laser-dot {
  position: fixed;
  top: -4px;
  left: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c83e2b;
  box-shadow: 0 0 0 3px rgba(200, 62, 43, 0.2), 0 0 10px rgba(200, 62, 43, 0.5);
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.15s ease;
}
html.laser-mode #laser-dot.visible { opacity: 1; }
html.laser-down #laser-dot { width: 13px; height: 13px; top: -6px; left: -6px; }

/* Top progress bar & chrome */
#bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0;
  background: var(--pine);
  z-index: 95;
  transition: width 0.3s ease;
}

.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 85;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 32px;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.chrome-left {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chrome-left b { color: var(--pine); }
.chrome-left a { border-bottom: none; color: var(--ink-3); }
.chrome-left a:hover { color: var(--pine); }

.rqnav {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.rqnav button {
  appearance: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid rgba(36, 91, 86, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  cursor: pointer;
  transition: 0.18s ease;
}
.rqnav button:hover { color: var(--pine); border-color: var(--pine); }
.rqnav button.on { background: var(--pine); border-color: var(--pine); color: #ffffff; }

.chrome-right {
  pointer-events: auto;
  display: flex;
  gap: 6px;
}

.chrome-btn {
  appearance: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--ink-3);
  font: 500 11.5px/1 var(--mono);
  padding: 5px 11px;
  cursor: pointer;
}
.chrome-btn:hover { color: var(--pine); border-color: var(--pine); }

/* Scroll-snap deck */
.deck {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px 64px;
  position: relative;
  background: var(--bg);
}

.in {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.speaker-note { display: none; }

/* Slide 1: Full-Bleed Illustration + Translucent Frosted Bottom Band */
.slide.cover-bleed {
  padding: 0;
  height: 100vh;
  background: #afc0b6;
  overflow: hidden;
  position: relative;
}

.cover-card {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #afc0b6;
}

.cover-art {
  position: absolute;
  inset: 0;
  padding-top: 28px;
  overflow: hidden;
  background: #afc0b6;
}
.cover-art::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(to bottom, #afc0b6 0%, #afc0b6 60%, rgba(175, 192, 182, 0) 100%);
  pointer-events: none;
}

.cover-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cover-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 25vh;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(16, 30, 27, 0.34) 0%, rgba(16, 30, 27, 0.08) 14%, rgba(16, 30, 27, 0) 30%),
    linear-gradient(
      180deg,
      rgba(20, 37, 34, 0.56) 0%,
      rgba(16, 31, 28, 0.68) 55%,
      rgba(13, 25, 23, 0.76) 100%
    );
  backdrop-filter: blur(4.5px) saturate(112%);
  -webkit-backdrop-filter: blur(4.5px) saturate(112%);
  border-top: 1px solid rgba(242, 230, 202, 0.42);
  box-shadow: 0 -10px 32px rgba(14, 24, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #f4f7f5;
  display: flex;
  align-items: center;
}

.cover-band-in {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 68px 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 44px;
}

.cover-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cover-band h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 3.65vw, 3.28rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(10, 20, 18, 0.32);
}

.cover-band h1 .title-pre {
  font-style: italic;
  font-weight: 400;
  color: rgba(238, 234, 220, 0.9);
  margin-right: 0.08em;
}

.cover-band .sub {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.03rem;
  color: rgba(236, 243, 239, 0.9);
  margin-top: 12px;
  letter-spacing: 0.03em;
}
.cover-band .sub::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: #dcc596;
  flex: none;
}

.cover-meta {
  padding-left: 40px;
  border-left: 1px solid rgba(242, 230, 202, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: rgba(235, 243, 239, 0.9);
  line-height: 1.8;
  white-space: nowrap;
}
.cover-meta b {
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}
.cover-meta .cover-date {
  color: #e2cfa6;
}

/* Slide 2: Clean Dedicated Agenda */
.agenda-list {
  list-style: none;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--surface);
  border-radius: 4px;
}
.agenda-list li {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 1.12rem;
  color: var(--ink);
}
.agenda-list li:last-child { border-bottom: none; }
.agenda-list li .code {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pine);
}
.agenda-list li .type {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-3);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
}
.agenda-list li.is-disc .type {
  background: var(--pine-soft);
  color: var(--pine);
}

/* Typography */
.kick {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: 10px;
}
.kick::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--pine);
  vertical-align: middle;
  margin-right: 9px;
}

h2.head {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.62rem, 2.9vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--ink);
}

/* Unified Chapter Dividers (RQ & Discussion share cohesive celadon palette) */
.slide.divider {
  background: var(--celadon);
}

.divider .rqbig {
  font-family: var(--mono);
  font-size: clamp(3.2rem, 8vw, 5.2rem);
  font-weight: 600;
  color: var(--pine);
  line-height: 0.96;
}

.divider h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  line-height: 1.18;
  margin: 10px 0 18px;
  color: var(--ink);
}

/* RQ Index Table (exact 组会 0623 .idx pattern) */
table.idx {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  overflow: hidden;
  border: none;
}
table.idx thead th {
  text-align: left;
  background: rgba(36, 91, 86, 0.08);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 9px 14px;
}
table.idx td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
table.idx tbody tr:last-child td {
  border-bottom: 1.5px solid var(--ink);
}
table.idx td:first-child {
  font-family: var(--display);
  font-weight: 600;
}
table.idx td.src {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--pine);
  font-weight: 600;
  white-space: nowrap;
}
table.idx td.tm {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.pill b { color: var(--pine); font-family: var(--mono); font-size: 0.8rem; }
.pill.pine { background: var(--pine-soft); border-color: rgba(36, 91, 86, 0.25); color: var(--pine); }
.pill.brass { background: var(--brass-soft); border-color: var(--brass-border); color: var(--brass); }
.pill.warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }

/* Grids & Minimal Cards */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.cols.top { align-items: stretch; }
.cols.w-right { grid-template-columns: 0.82fr 1.18fr; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.card.pine { border-top: 3px solid var(--pine); }
.card.slate { border-top: 3px solid var(--slate); }
.card.brass { border-top: 3px solid var(--brass); }
.card.warn { border-top: 3px solid var(--warn); }

.card .tag-top {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.card.pine .tag-top { color: var(--pine); }
.card.slate .tag-top { color: var(--slate); }
.card.brass .tag-top { color: var(--brass); }
.card.warn .tag-top { color: var(--warn); }

.card h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.28;
}

.card p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* Keyword Bullets */
ul.kw {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
ul.kw li {
  font-size: 0.92rem;
  color: var(--ink-2);
  padding-left: 16px;
  position: relative;
}
ul.kw li::before {
  content: "·";
  position: absolute;
  left: 2px;
  font-weight: 700;
  color: var(--ink-4);
}
ul.kw li.ok { color: var(--pine); font-weight: 500; }
ul.kw li.ok::before { content: "✓"; left: 0; color: var(--pine); font-size: 0.82rem; }
ul.kw li.bad { color: var(--warn); font-weight: 500; }
ul.kw li.bad::before { content: "✗"; left: 0; color: var(--warn); font-size: 0.82rem; }

/* KV Big Numbers */
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  margin: 12px 0;
}
.kv > div {
  padding: 13px 18px;
  border-right: 1px solid var(--rule-2);
}
.kv > div:last-child { border-right: none; }
.kv b {
  display: block;
  font-family: var(--display);
  font-size: 1.46rem;
  color: var(--pine);
  line-height: 1.05;
}
.kv > div.warn b { color: var(--warn); }
.kv > div.brass b { color: var(--brass); }
.kv span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Matrix Table */
table.mat {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94rem;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
table.mat th, table.mat td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-2);
}
table.mat thead th {
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-2);
}
table.mat tbody tr:last-child td { border-bottom: none; }

.cell-ok { color: var(--pine); font-weight: 650; }
.cell-mid { color: var(--brass); font-weight: 600; }
.cell-no { color: var(--warn); font-weight: 600; }
.cell-na { color: var(--ink-4); }

.sub-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 2px;
}

/* I/O & Interface Spec Card for Representative Works */
.io-spec {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.io-spec.pine { border-top: 3px solid var(--pine); }
.io-spec.brass { border-top: 3px solid var(--brass); }
.io-spec.slate { border-top: 3px solid var(--slate); }

.io-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-2);
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--ink-2);
}
.io-row:last-child { border-bottom: none; }
.io-row .k {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pine);
}
.io-spec.brass .io-row .k { color: var(--brass); }
.io-spec.slate .io-row .k { color: var(--slate); }
.io-row code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

/* Score Span Bars */
.span-chart {
  display: grid;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 22px;
}
.span-row {
  display: grid;
  grid-template-columns: 175px 1fr 215px;
  gap: 18px;
  align-items: center;
}
.span-name b { font-size: 0.94rem; display: block; }
.span-name span { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-4); }
.span-track {
  position: relative;
  height: 15px;
  background: #edf2ef;
  border-radius: 999px;
}
.span-init {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: #b8c8c1;
  border-radius: 999px;
}
.span-sota {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--pine);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
}
.span-sota.brass { background: var(--brass); }
.span-val { font-family: var(--mono); font-size: 0.8rem; text-align: right; color: var(--ink-2); white-space: nowrap; }
.span-val b { color: var(--pine); }
.span-val b.brass { color: var(--brass); }

.chart-legend {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-top: 2px;
}
.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}

/* SVG & Media */
.svg-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px;
}
.svg-card svg { display: block; width: 100%; height: auto; }

figure .frame {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: #141918;
  display: flex;
  justify-content: center;
  align-items: center;
}
figure .frame.light { background: #f9f9fb; }
figure .frame.zoomable { cursor: zoom-in; }
figure img { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; }
figure.tall img { max-height: 60vh; }
figure video { display: block; width: 100%; max-height: 45vh; background: inherit; }
figcaption {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.vid-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vid-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }

/* Interactive Step Gallery (for My Try multi-step screenshots) */
.step-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.step-tab {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  font: 500 11px/1 var(--mono);
  padding: 5px 9px;
  cursor: pointer;
  transition: 0.16s ease;
}
.step-tab:hover { border-color: var(--brass); color: var(--brass); }
.step-tab.on {
  background: var(--brass);
  border-color: var(--brass);
  color: #ffffff;
}
.sync-btn {
  appearance: none;
  border: 1px solid var(--pine);
  background: var(--pine-soft);
  color: var(--pine);
  border-radius: 999px;
  font: 600 12px/1 var(--mono);
  padding: 6px 14px;
  cursor: pointer;
}
.sync-btn:hover { background: var(--pine); color: #ffffff; }

.q-box {
  margin-top: 12px;
  padding: 11px 15px;
  border-left: 3px solid var(--pine);
  background: var(--pine-soft);
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: var(--ink);
}

/* Right Rail & HUD (unified pine color) */
.rail {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rail i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rule);
  cursor: pointer;
  transition: 0.18s;
  display: block;
}
.rail i[data-d="1"] { border-radius: 1px; border: 1px solid var(--ink-3); background: var(--surface); }
.rail i.on { background: var(--pine); border-color: var(--pine); transform: scale(1.45); }

.hud {
  position: fixed;
  bottom: 14px;
  right: 26px;
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 10px;
}
.hud button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.hud button:disabled { opacity: 0.3; }
.hud .ctr { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); min-width: 110px; text-align: center; }
.hud .ctr b { color: var(--pine); }
.hud .ctr .sec { display: none; }

/* Sorter, Notes, Lightbox */
.sorter {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(245, 248, 246, 0.96);
  backdrop-filter: blur(8px);
  padding: 58px 44px 36px;
  overflow-y: auto;
  display: none;
}
.sorter.open { display: block; }
.sorter-top { max-width: 1080px; margin: 0 auto 16px; display: flex; justify-content: space-between; align-items: center; }
.sorter-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sorter-card {
  appearance: none;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.sorter-card.on { border-color: var(--pine); background: var(--pine-soft); }
.sorter-card b { display: block; font-family: var(--mono); font-size: 0.68rem; color: var(--pine); margin-bottom: 3px; }
.sorter-card span { font-size: 0.84rem; color: var(--ink); display: block; }

dialog.notes-modal {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 680px;
  width: 92vw;
  margin: auto;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(18, 28, 25, 0.22);
}
dialog.notes-modal::backdrop { background: rgba(20, 28, 25, 0.42); backdrop-filter: blur(2px); }
.nm-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 12px; font-family: var(--mono); font-size: 0.82rem; color: var(--pine); }
.nm-body { font-size: 0.94rem; line-height: 1.64; color: var(--ink-2); }
.nm-body p + p { margin-top: 8px; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(16, 22, 20, 0.93);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  overflow: auto;
  cursor: zoom-out;
}
.lb.open { display: flex; }
.lb img { max-width: 96vw; max-height: 94vh; border-radius: 6px; background: #fff; cursor: zoom-in; }
.lb.zoom { align-items: flex-start; justify-content: flex-start; }
.lb.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-hint { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.7); pointer-events: none; }

/* Left Collapsible Page-Bound Takeaway Dock */
.tk-dock {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 120;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.tk-dock.is-hidden {
  opacity: 0;
}
.tk-dock.is-hidden .tk-handle,
.tk-dock.is-hidden .tk-drawer {
  pointer-events: none;
}

.tk-handle {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(36, 91, 86, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(20, 36, 33, 0.1);
  padding: 13px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, background 0.2s, box-shadow 0.25s, opacity 0.25s;
}
.tk-handle:hover {
  border-color: var(--pine);
  transform: translateY(-50%) translateX(2px);
  box-shadow: 0 10px 28px rgba(36, 91, 86, 0.18);
}
.tk-dock.is-open .tk-handle {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-24px);
}
.tk-dock.is-released .tk-handle {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(36px) scale(0.85);
}

.tk-handle-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pine);
}
.tk-handle-cnt {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: var(--pine);
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1.2;
}
.tk-handle-dots {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tk-handle-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rule);
  transition: background 0.25s, transform 0.25s;
}
.tk-handle-dots i.on {
  background: var(--brass);
  transform: scale(1.2);
}

@keyframes tkHandlePulse {
  0% { box-shadow: 0 0 0 0 rgba(36, 91, 86, 0.55), 0 8px 24px rgba(20, 36, 33, 0.14); transform: translateY(-50%) scale(1); }
  45% { box-shadow: 0 0 0 12px rgba(36, 91, 86, 0), 0 12px 32px rgba(36, 91, 86, 0.32); transform: translateY(-50%) scale(1.1); background: var(--pine-soft); border-color: var(--pine); }
  100% { box-shadow: 0 0 0 0 rgba(36, 91, 86, 0), 0 8px 24px rgba(20, 36, 33, 0.1); transform: translateY(-50%) scale(1); }
}
.tk-handle.is-pulsing {
  animation: tkHandlePulse 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.tk-toast {
  position: fixed;
  left: 26px;
  bottom: 16px;
  transform: translateY(10px);
  background: rgba(24, 44, 41, 0.92);
  color: #f4f7f5;
  border: 1px solid rgba(242, 230, 202, 0.36);
  border-radius: 999px;
  padding: 6px 15px;
  font-family: var(--mono);
  font-size: 11.5px;
  box-shadow: 0 8px 24px rgba(16, 28, 25, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), left 0.3s ease;
  white-space: nowrap;
}
.tk-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.tk-dock.is-open .tk-toast {
  left: 362px;
}

.tk-drawer {
  position: fixed;
  left: 14px;
  top: 54px;
  bottom: 54px;
  width: 334px;
  background: rgba(250, 252, 251, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(36, 91, 86, 0.22);
  border-radius: 12px;
  box-shadow: 0 20px 54px rgba(18, 32, 29, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(-368px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  overflow: hidden;
}
.tk-dock.is-open .tk-drawer {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.tk-drawer-head {
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--rule);
  background: rgba(231, 241, 238, 0.55);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tk-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--pine);
  font-weight: 600;
}
.tk-drawer-head b {
  font-family: var(--display);
  font-size: 0.96rem;
  color: var(--ink);
}

.tk-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tk-empty {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 14px 13px;
  text-align: center;
}
.tk-empty.is-gone {
  display: none;
}

.tk-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--pine);
  border-radius: 9px;
  cursor: pointer;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 11px;
  margin-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  border-right-width: 0;
  pointer-events: none;
  transform: translateX(-14px);
  transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), padding 0.28s ease, margin 0.28s ease, box-shadow 0.2s;
}
.tk-item.is-unlocked {
  max-height: 260px;
  opacity: 1;
  padding: 9px 11px 10px;
  margin-bottom: 10px;
  border-top-width: 1px;
  border-bottom-width: 1px;
  border-right-width: 1px;
  pointer-events: auto;
  transform: translateX(0);
}
.tk-item.is-unlocked:hover {
  border-color: var(--pine);
  box-shadow: 0 6px 18px rgba(36, 91, 86, 0.1);
}
@keyframes tkItemAddedGlow {
  0% { background: #e1f2ec; box-shadow: 0 0 0 3px rgba(36, 91, 86, 0.28); }
  100% { background: var(--surface); box-shadow: none; }
}
.tk-item.just-added {
  animation: tkItemAddedGlow 1.1s ease;
}

.tk-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--pine);
}
.tk-item-head em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 999px;
}
.tk-item svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 155px;
}

.tk-mini-tags {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.tk-mini-tags li {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.tk-mini-tags li b {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  background: #fff;
  border-radius: 4px;
  padding: 0 4px;
}
.tk-mini-tags li.pine { background: var(--pine-soft); border-color: rgba(36, 91, 86, 0.2); }
.tk-mini-tags li.pine b { color: var(--pine); }
.tk-mini-tags li.brass { background: var(--brass-soft); border-color: var(--brass-border); }
.tk-mini-tags li.brass b { color: var(--brass); }
.tk-mini-tags li.slate { background: var(--slate-soft); border-color: rgba(67, 100, 95, 0.22); }
.tk-mini-tags li.slate b { color: var(--slate); }

/* Flying Capture Card on Forward Flip */
.tk-flyer {
  position: fixed;
  left: 0;
  top: 0;
  width: 268px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.97);
  border: 1.5px solid var(--pine);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(24, 52, 48, 0.26);
  z-index: 160;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(38vw, 38vh, 0) scale(0.9);
}
.tk-flyer svg {
  width: 100%;
  height: auto;
  max-height: 120px;
  display: block;
}
@keyframes tkFlyToDock {
  0% {
    opacity: 0;
    transform: translate3d(38vw, 36vh, 0) scale(0.86);
  }
  18% {
    opacity: 1;
    transform: translate3d(34vw, 36vh, 0) scale(1);
  }
  100% {
    opacity: 0.12;
    transform: translate3d(18px, 44vh, 0) scale(0.18);
  }
}
.tk-flyer.is-flying {
  animation: tkFlyToDock 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* P41: Full-Page Unfolded Takeaway Stage */
.slide.takeaway-stage {
  padding: 54px 56px 52px;
}
.tk-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 16px;
}
.tk-stage-links {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-2);
  margin: 0;
}

.tk-stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.tk-final-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--pine);
  border-radius: 10px;
  padding: 14px 18px 14px;
  box-shadow: 0 8px 24px rgba(22, 38, 35, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tk-final-card:hover {
  border-color: var(--pine);
  box-shadow: 0 12px 30px rgba(22, 38, 35, 0.12);
}
.tk-final-card.brass { border-top-color: var(--brass); }
.tk-final-card.slate { border-top-color: var(--slate); }

.tk-fc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule-2);
}
.tk-fc-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pine);
  letter-spacing: 0.04em;
}
.tk-final-card.brass .tk-fc-badge { color: var(--brass); }
.tk-final-card.slate .tk-fc-badge { color: var(--slate); }
.tk-fc-head b {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.tk-final-card svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 205px;
  margin: auto 0;
}

.tk-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: auto 0;
}
.tk-name-pill {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tk-name-pill span {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-3);
}
.tk-name-pill b {
  font-family: var(--display);
  font-size: 1.06rem;
  color: var(--ink);
}
.tk-name-pill.pine { background: var(--pine-soft); border-color: rgba(36, 91, 86, 0.24); }
.tk-name-pill.pine span, .tk-name-pill.pine b { color: var(--pine-dark); }
.tk-name-pill.brass { background: var(--brass-soft); border-color: var(--brass-border); }
.tk-name-pill.brass span, .tk-name-pill.brass b { color: var(--brass); }
.tk-name-pill.slate { background: var(--slate-soft); border-color: rgba(67, 100, 95, 0.25); }
.tk-name-pill.slate span, .tk-name-pill.slate b { color: var(--slate); }
.tk-name-pill.muted b { color: var(--ink-2); }

@keyframes tkReleaseFromDock {
  0% {
    opacity: 0;
    transform: translate3d(var(--from-x, -36vw), var(--from-y, 0), 0) scale(0.28);
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}
.slide.takeaway-stage.is-unfolding .tk-final-card {
  animation: tkReleaseFromDock 0.72s cubic-bezier(0.18, 0.89, 0.32, 1.06) both;
  animation-delay: calc(var(--slot, 0) * 95ms);
}

@media (max-width: 900px) {
  .slide { padding: 58px 20px 64px; }
  .slide.cover-bleed { padding: 0; }
  .cover-band-in { padding: 22px 24px 40px; gap: 16px; }
  .cover-band h1 { white-space: normal; font-size: 1.85rem; }
  .cols, .cols.w-right, .cards, .cards.three, .cards.four, .vid-pair, .span-row, .cover-band-in, .agenda-list li, .tk-stage-grid, .tk-name-grid { grid-template-columns: 1fr; }
  .cover-meta { text-align: left; padding: 12px 0 0; border-left: none; border-top: 1px solid rgba(242, 230, 202, 0.2); }
  .tk-drawer { width: min(320px, calc(100vw - 24px)); }
  .rail { display: none; }
}
