:root {
  --brand-primary: #1d2b6b;
  --brand-primary-light: #2a3e8f;
  --brand-primary-soft: #3b53b5;
  --brand-accent: #c8a564;
  --brand-accent-light: #dfbf7a;
  --bg-page: #f4f1ea;
  --bg-card: #ffffff;
  --bg-soft: #f8f6ef;
  --bg-dark: #0f183f;
  --text-main: #1a2140;
  --text-sub: #4f5875;
  --text-mute: #8891ab;
  --border: #e4e0d2;
  --danger: #c24d4d;
  --success: #2f8f6a;
  --shadow-lg: 0 30px 80px -30px rgba(29, 43, 107, 0.35);
  --shadow-md: 0 10px 30px -12px rgba(29, 43, 107, 0.25);
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition: 420ms cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}

/* ========= TOP BAR ========= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(29, 43, 107, 0.04);
  z-index: 5;
}
.top-bar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.top-bar__brand img {
  height: 36px;
}
.top-bar__title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-primary);
  letter-spacing: 0.5px;
}
.top-bar__subtitle {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}
.top-bar__center {
  display: flex;
  align-items: center;
  gap: 20px;
  font-variant-numeric: tabular-nums;
}
.timer-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sub);
}
.timer-widget__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-mute);
  transition: background var(--transition);
}
.timer-widget--running .timer-widget__dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(47, 143, 106, 0.15);
  animation: pulse 1.6s ease-in-out infinite;
}
.timer-widget--over .timer-widget__dot { background: var(--danger); }
.timer-widget--over { color: var(--danger); }
.timer-widget__time {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}
.timer-widget--over .timer-widget__time { color: var(--danger); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(47, 143, 106, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(47, 143, 106, 0.05); }
}
.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary-soft);
  background: rgba(59, 83, 181, 0.06);
}
.btn--primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--brand-primary-light);
  color: #fff;
}

/* ========= SLIDE AREA ========= */
.stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.slide {
  position: absolute;
  inset: 0;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.slide-enter-active, .slide-leave-active {
  transition: opacity 400ms ease, transform 400ms cubic-bezier(.2,.8,.2,1);
}
.slide-enter-from {
  opacity: 0;
  transform: translateX(40px);
}
.slide-leave-to {
  opacity: 0;
  transform: translateX(-40px);
}

/* ========= BOTTOM BAR ========= */
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 5;
}
.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination__dot {
  width: 28px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  cursor: pointer;
  transition: all 260ms;
  border: none;
  padding: 0;
}
.pagination__dot:hover {
  background: var(--brand-primary-soft);
  transform: scaleY(1.4);
}
.pagination__dot--active {
  background: var(--brand-primary);
  width: 60px;
}
.pagination__dot--done {
  background: var(--brand-accent);
}
.slide-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-sub);
}
.slide-counter strong {
  color: var(--brand-primary);
  font-size: 16px;
}

/* ========= PROGRESS BAR ========= */
.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 6;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  transition: width 250ms linear;
}

/* ========= SLIDE CONTENT COMMONS ========= */
.slide-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--brand-primary);
  position: relative;
}
.slide-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 64px;
  height: 2px;
  background: var(--brand-accent);
}
.slide-title-group {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.slide-chapter {
  font-family: "Noto Serif SC", serif;
  font-size: 42px;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1;
  letter-spacing: -1px;
}
.slide-chapter__num {
  color: var(--brand-accent);
  font-size: 58px;
  margin-right: 4px;
}
.slide-subtitle {
  font-size: 16px;
  color: var(--text-sub);
  font-weight: 400;
  letter-spacing: 4px;
}
.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ========= COVER SLIDE ========= */
.cover {
  padding: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(59, 83, 181, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 10% 90%, rgba(200, 165, 100, 0.12) 0%, transparent 60%),
              var(--bg-page);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29, 43, 107, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 107, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.cover__frame {
  position: relative;
  z-index: 2;
  padding: 72px 96px;
  max-width: 1100px;
  text-align: center;
}
.cover__logo {
  height: 78px;
  margin: 0 auto 36px;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(29, 43, 107, 0.2));
}
.cover__school {
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  letter-spacing: 12px;
  color: var(--brand-primary);
  margin-bottom: 8px;
  font-weight: 500;
}
.cover__college {
  font-size: 13px;
  letter-spacing: 6px;
  color: var(--text-sub);
  margin-bottom: 48px;
}
.cover__kicker {
  display: inline-block;
  padding: 6px 16px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 13px;
  letter-spacing: 3px;
  border-radius: 4px;
  margin-bottom: 36px;
}
.cover__title {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: 48px;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.cover__title em {
  color: var(--brand-primary);
  font-style: normal;
}
.cover__subtitle {
  font-family: "Noto Serif SC", serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--text-sub);
  margin-bottom: 64px;
  letter-spacing: 4px;
}
.cover__divider {
  width: 100px;
  height: 2px;
  background: var(--brand-accent);
  margin: 0 auto 40px;
}
.cover__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}
.cover__meta-item {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-primary);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.cover__meta-label {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.cover__meta-value {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 500;
}
.cover__footer {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 4px;
  z-index: 2;
}

/* ========= OUTLINE SLIDE ========= */
.outline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  flex: 1;
}
.outline-item {
  position: relative;
  padding: 28px 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.outline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-primary);
  transition: width var(--transition);
}
.outline-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.outline-item:hover::before {
  width: 100%;
  opacity: 0.04;
}
.outline-item__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 36px;
  color: var(--brand-accent);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.outline-item__title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-main);
  margin-bottom: 6px;
}
.outline-item__desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ========= CARD LAYOUT ========= */
.card {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.card--soft {
  background: var(--bg-soft);
  box-shadow: none;
}
.card__title {
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--brand-accent);
  border-radius: 2px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========= BULLET LIST ========= */
.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullets li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-main);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 17px;
  width: 6px;
  height: 6px;
  background: var(--brand-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(200, 165, 100, 0.2);
}
.bullets li strong {
  color: var(--brand-primary);
  font-weight: 600;
}

/* ========= STATS ========= */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.stat__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-primary);
  margin-bottom: 6px;
}
.stat__num small { font-size: 22px; color: var(--text-sub); }
.stat__label {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 2px;
}

/* ========= ARCHITECTURE DIAGRAM ========= */
.arch {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: center;
}
.arch-row {
  display: grid;
  gap: 14px;
}
.arch-entry-row {
  grid-template-columns: 1fr 1fr;
}
.arch-service-row {
  grid-template-columns: repeat(3, 1fr);
}
.arch-node {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 240ms;
  position: relative;
}
.arch-node--primary {
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
  color: #fff;
}
.arch-node--accent {
  border-color: var(--brand-accent);
  background: linear-gradient(135deg, #fef6e2 0%, #f9e9bf 100%);
}
.arch-node--dark {
  background: #f0ecde;
  border-color: var(--brand-accent-light);
}
.arch-node__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.arch-node__desc {
  font-size: 12px;
  opacity: 0.85;
}
.arch-node--primary .arch-node__desc { opacity: 0.8; }
.arch-arrow {
  text-align: center;
  color: var(--brand-accent);
  font-size: 22px;
  margin: -2px 0;
  line-height: 1;
}

/* ========= TIMELINE / STEPS ========= */
.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
}
.step__num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 14px;
}
.step__body { flex: 1; }
.step__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.step__desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}
.step__tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  margin-left: 6px;
  background: rgba(200, 165, 100, 0.15);
  color: var(--brand-accent);
}

/* ========= DEFENSE LAYERS ========= */
.defense-wrap {
  flex: 1;
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.defense-layers {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.defense-layer {
  position: relative;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid;
  transition: all var(--transition);
}
.defense-layer:hover {
  transform: translateX(4px);
}
.defense-layer__num {
  font-family: "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 900;
  min-width: 30px;
}
.defense-layer__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}
.defense-layer__desc {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.55;
}
.defense-layer--l1 { background: #eff2ff; border-color: #c5d0f5; }
.defense-layer--l1 .defense-layer__num { color: #3b53b5; }
.defense-layer--l2 { background: #f4f0ff; border-color: #d5c8f0; }
.defense-layer--l2 .defense-layer__num { color: #7b57c8; }
.defense-layer--l3 { background: #fff4e6; border-color: #f0d7a8; }
.defense-layer--l3 .defense-layer__num { color: #c8902a; }
.defense-layer--l4 { background: #fef0ec; border-color: #f2c8bb; }
.defense-layer--l4 .defense-layer__num { color: #c65a3b; }
.defense-layer--l5 { background: #e8f4ee; border-color: #b6d9c3; }
.defense-layer--l5 .defense-layer__num { color: #2f8f6a; }
.defense-note {
  flex: 0.8;
  padding: 24px;
  background: linear-gradient(145deg, var(--brand-primary) 0%, #0f183f 100%);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.defense-note::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
  opacity: 0.3;
}
.defense-note h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  margin: 0 0 16px;
  position: relative;
}
.defense-note p {
  margin: 0 0 14px;
  line-height: 1.75;
  font-size: 14px;
  opacity: 0.92;
  position: relative;
}
.defense-note strong {
  color: var(--brand-accent-light);
}

/* ========= FLOW / ASK PIPELINE ========= */
.flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.flow-stage {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: stretch;
}
.flow-stage__label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
}
.flow-stage--exec .flow-stage__label {
  background: var(--brand-accent);
  color: var(--text-main);
}
.flow-nodes {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}
.flow-node {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  text-align: center;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
}
.flow-node strong {
  display: block;
  font-size: 13px;
  color: var(--brand-primary);
  margin-bottom: 2px;
}
.flow-node--highlight {
  background: linear-gradient(135deg, #fff4e6, #ffe8cc);
  border-color: var(--brand-accent);
}

/* ========= RBAC ========= */
.rbac {
  flex: 1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}
.rbac-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.rbac-level {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-soft);
  position: relative;
}
.rbac-level::before {
  content: attr(data-n);
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg-card);
}
.rbac-level__name {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 15px;
  min-width: 90px;
}
.rbac-level__detail {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.55;
}
.rbac-arrow {
  text-align: center;
  color: var(--brand-accent);
  font-size: 18px;
  line-height: 0.6;
}
.rbac-granularity {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.granularity {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
}
.granularity__title {
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 4px;
  font-size: 15px;
}
.granularity__title .badge {
  float: right;
  padding: 2px 8px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
}
.granularity__desc {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ========= MCP TOOLS ========= */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.tool {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 240ms;
}
.tool:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tool__name {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 6px;
  display: inline-block;
  padding: 3px 10px;
  background: rgba(29, 43, 107, 0.08);
  border-radius: 4px;
}
.tool__desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-top: 8px;
}

/* ========= DIALECT TAGS ========= */
.dialect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.dialect {
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sub);
  font-family: "JetBrains Mono", monospace;
}
.dialect--featured {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* ========= SCREENSHOT ========= */
.screenshot-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.screenshot-wrap img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  object-fit: contain;
}

/* Tall IDE-like screenshot mock for test result (vertical sidebar) */
.ide-mock {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  background: #1e1e1e;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
}
.ide-mock__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #2d2d30;
  border-bottom: 1px solid #1a1a1a;
}
.ide-mock__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.ide-mock__dot--r { background: #ff5f57; }
.ide-mock__dot--y { background: #febc2e; }
.ide-mock__dot--g { background: #28c840; }
.ide-mock__title {
  margin-left: 8px;
  color: #cccccc;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.ide-mock__body {
  flex: 1;
  background: #1e1e1e;
  padding: 14px 12px;
  overflow: hidden;
  max-height: 420px;
}
.ide-mock__stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(47, 143, 106, 0.1);
  border: 1px solid rgba(47, 143, 106, 0.3);
  border-radius: 6px;
  margin-bottom: 12px;
}
.ide-mock__stat-label {
  color: #cccccc;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}
.ide-mock__stat-val {
  color: #73c991;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}
.ide-mock__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ide-mock__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  color: #cccccc;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  border-radius: 3px;
}
.ide-mock__list li:hover { background: rgba(255,255,255,0.04); }
.ide-mock__check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #73c991;
  color: #1e1e1e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
}
.ide-mock__check--skip {
  background: #e2a03f;
}
.ide-mock__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ide-mock__tag {
  font-size: 10px;
  color: #6c9bd1;
  flex-shrink: 0;
}

/* ========= CLOSING ========= */
.closing {
  padding: 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--brand-primary) 100%);
  color: #fff;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(200, 165, 100, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 83, 181, 0.4) 0%, transparent 40%);
}
.closing__content {
  position: relative;
  text-align: center;
  z-index: 2;
}
.closing__icon {
  font-family: "Noto Serif SC", serif;
  font-size: 80px;
  color: var(--brand-accent);
  margin-bottom: 24px;
  letter-spacing: 20px;
}
.closing__title {
  font-family: "Noto Serif SC", serif;
  font-size: 72px;
  font-weight: 900;
  margin: 0 0 20px;
  letter-spacing: 28px;
  text-indent: 28px;
}
.closing__line {
  width: 80px;
  height: 2px;
  background: var(--brand-accent);
  margin: 0 auto 24px;
}
.closing__subtitle {
  font-size: 18px;
  letter-spacing: 8px;
  opacity: 0.85;
  margin-bottom: 48px;
}
.closing__sign {
  font-size: 13px;
  letter-spacing: 4px;
  opacity: 0.6;
}

/* ========= KEYBOARD HELP ========= */
.keyhelp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 63, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.keyhelp {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
}
.keyhelp h3 {
  margin: 0 0 24px;
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  color: var(--brand-primary);
}
.keyhelp dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 20px;
  margin: 0;
}
.keyhelp kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text-main);
  min-width: 32px;
  text-align: center;
}

/* scrollbar */
.slide::-webkit-scrollbar { width: 6px; }
.slide::-webkit-scrollbar-track { background: transparent; }
.slide::-webkit-scrollbar-thumb {
  background: rgba(29, 43, 107, 0.2);
  border-radius: 3px;
}

@media (max-width: 1200px) {
  .slide { padding: 32px 40px; }
  .cover__title { font-size: 38px; }
  .slide-chapter { font-size: 34px; }
  .outline-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
}
