/* H5PPT — refined editorial theme. Flat, light, restrained palette.
   Stays in lockstep with app/slide_render.py tokens. */

/* === Tokens =============================================================== */
:root {
  /* surfaces — pure white paper */
  --paper: #FFFFFF;
  --card: #FFFFFF;
  --soft: #FAFAFB;
  --tint: #F6F7F9;
  --line: #E5E7EB;
  --line-2: #F1F2F4;
  --bg-app: #F4F5F7;
  --bg-stage: #EFF1F4;

  /* text — high-contrast near-black ladder */
  --ink: #0A0A0A;
  --text: #181B22;
  --body: #2A2E39;
  --muted: #4B5260;
  --faint: #8A909C;

  /* single calm accent — indigo */
  --brand: #2C4AE2;
  --brand-dark: #1E36B8;
  --brand-soft: #EEF2FF;
  --brand-border: #D7DFFB;

  /* neutral slate variant */
  --alt: #4D5866;
  --alt-dark: #333B47;
  --alt-soft: #F3F5F8;
  --alt-border: #E2E6ED;

  /* legacy aliases kept for safety */
  --warm: var(--brand);
  --warm-dark: var(--brand-dark);
  --warm-soft: var(--brand-soft);
  --warm-border: var(--brand-border);
  --sage: var(--alt);
  --sage-dark: var(--alt-dark);
  --sage-soft: var(--alt-soft);
  --sage-border: var(--alt-border);

  --danger: #B23A3A;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hidden { display: none !important; }

/* === App shell ============================================================ */
.desktop {
  min-height: 100vh;
  padding: 24px;
  background: var(--bg-app);
}

.app-window {
  max-width: 1320px;
  margin: 0 auto;
  height: calc(100vh - 48px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.titlebar {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 18px 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.traffic-lights { display: flex; gap: 8px; width: 64px; }
.dot { width: 11px; height: 11px; border-radius: 50%; opacity: 0.78; }
.dot.red { background: #E5644E; }
.dot.yellow { background: #DDB041; }
.dot.green { background: #6B9B6E; }
.titlebar-title {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 600;
  color: var(--ink); margin-right: 64px;
}
.titlebar-actions {
  position: absolute; right: 16px;
  display: flex; align-items: center; gap: 10px;
}
.status-pill {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--soft); color: var(--muted);
  letter-spacing: 0.04em;
}
.status-pill.ready { background: var(--sage-soft); color: var(--sage-dark); }
.status-pill.busy { background: var(--warm-soft); color: var(--warm-dark); }

/* === Workspace ============================================================ */
.workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1;
  min-height: 0;
}

.sidebar {
  display: flex; flex-direction: column;
  background: var(--paper);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.sidebar-section {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line-2);
}
.sidebar-grow {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar-hint {
  font-size: 11px; color: var(--faint);
  margin: -4px 0 10px; line-height: 1.5;
}

/* Inputs */
.input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74, 85, 128, 0.14);
}
.input-num { width: 64px; text-align: center; margin-bottom: 0; }
.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.field-inline {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 0 12px;
}
.field-inline label { font-size: 12px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-accent {
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
  padding: 6px 12px;
}
.btn-accent:hover:not(:disabled) { background: #000; }
.btn-block { width: 100%; padding: 9px 14px; margin-top: 4px; }
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover:not(:disabled) { background: var(--soft); }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover:not(:disabled) { background: rgba(178, 58, 58, 0.06); }
.btn-with-icon { gap: 6px; }
.ico { width: 16px; height: 16px; flex-shrink: 0; }

/* Slide list */
.slide-list {
  flex: 1; overflow-y: auto;
  padding: 4px 4px;
}
.slide-thumb {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.slide-thumb:hover { background: var(--soft); }
.slide-thumb.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand-border);
}
.slide-thumb .num {
  font-size: 11px; font-weight: 700;
  color: var(--faint); min-width: 18px;
}
.slide-thumb.active .num { color: var(--brand); }
.slide-thumb .title-text {
  flex: 1; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.slide-thumb .stype {
  font-size: 10px;
  color: var(--faint);
  flex-shrink: 0;
}
.slide-thumb.active .stype { color: var(--brand); }

/* Generation progress */
.gen-progress { margin-top: 12px; }
.gen-progress-bar {
  position: relative;
  height: 4px;
  background: var(--soft);
  border-radius: 2px;
  overflow: hidden;
}
.gen-progress-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg, transparent, rgba(74, 85, 128, 0.45), transparent
  );
  background-size: 200% 100%;
  opacity: 0;
}
.gen-progress.is-active .gen-progress-shimmer {
  opacity: 1;
  animation: shimmer 1.4s ease-in-out infinite;
}
.gen-progress-fill {
  position: relative;
  height: 100%; width: 0%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.gen-progress-text {
  font-size: 11px; color: var(--muted);
  margin-top: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Stage / canvas ======================================================= */
.stage {
  background: var(--bg-stage);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.stage-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 32px 16px;
  width: 100%;
  overflow: auto;
}
.slide-frame {
  position: relative;
  width: 100%;
  max-width: 920px;
}
.slide-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  color: var(--ink);
}

/* Edit panel */
.edit-panel {
  position: absolute;
  right: 32px;
  bottom: 72px;
  width: min(320px, calc(100% - 64px));
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px 14px;
}
.edit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.edit-panel-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.edit-panel-close {
  width: 22px; height: 22px;
  border: none;
  background: var(--soft);
  color: var(--muted);
  border-radius: 50%;
  font-size: 16px; line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.edit-panel-close:hover { background: var(--line); color: var(--ink); }
.edit-panel-textarea { min-height: 90px; resize: vertical; margin: 0; }
.edit-panel-input { margin: 0; }

/* Editable preview elements */
.pv-editable {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s, outline-color 0.12s;
}
.pv-editable:hover {
  background: rgba(74, 85, 128, 0.06);
  outline: 1px dashed rgba(74, 85, 128, 0.32);
  outline-offset: 2px;
}
.pv-editable.selected {
  background: rgba(74, 85, 128, 0.10);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 920px;
  margin-top: 18px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.toolbar-spacer { flex: 1; }
.shortcut-hint { font-size: 12px; color: var(--faint); }
.pager {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.pager-btn {
  width: 30px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
}
.pager-btn:hover:not(:disabled) { background: var(--soft); }
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-btn .ico { width: 16px; height: 16px; }
.pager-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* === Loading / toast ====================================================== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(24, 31, 44, 0.32);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.loading-overlay.show { display: flex; }
.loading-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 36px;
  text-align: center;
}
.loading-spinner {
  position: relative;
  width: 36px; height: 36px;
  margin: 0 auto;
}
.loading-ring {
  position: absolute; inset: 0;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.loading-ring-2 {
  inset: 6px;
  border-color: var(--line-2);
  border-bottom-color: var(--warm);
  animation: spin-r 1.1s linear infinite;
}
.loading-bar-track {
  width: 120px; height: 3px;
  margin: 16px auto 0;
  background: var(--soft);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-indeterminate {
  height: 100%; width: 36%;
  background: var(--brand);
  border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}
.loading-text {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-r { to { transform: rotate(-360deg); } }
@keyframes bar {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(330%); }
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }

/* Scrollbars */
.slide-list::-webkit-scrollbar { width: 6px; }
.slide-list::-webkit-scrollbar-thumb {
  background: rgba(24, 31, 44, 0.18);
  border-radius: 3px;
}

/* === Slide preview ========================================================
   The preview mirrors PPTX render geometry: a 16:9 light "paper" slide
   with restrained editorial typography, no shadows, no gradients. */
.preview-rich {
  position: relative;
  width: 100%; height: 100%;
  padding: 44px 56px 60px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.42;
  overflow: hidden;
}
.preview-rich > * { position: relative; z-index: 2; }

/* Hairline top frame for cover/section/closing */
.layout-title_cover::before,
.layout-title::before,
.layout-section_divider::before,
.layout-section::before,
.layout-closing_end::before,
.layout-closing::before {
  content: "";
  position: absolute;
  left: 56px; right: 56px;
  top: 44px;
  height: 1px;
  background: var(--line);
}

.pv-brand-bar {
  position: absolute;
  left: 56px; top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--faint);
}

/* Top-right page indicator (used on detail layouts) */
.pv-decor {
  position: absolute;
  right: 56px;
  top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  pointer-events: none;
}
.pv-decor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warm);
}
.pv-decor-line {
  width: 24px; height: 1px;
  background: var(--line);
}
.pv-decor-bottom {
  top: auto;
  bottom: 36px;
  right: 44px;
}
.pv-brand-bar-center {
  left: 50%;
  transform: translateX(-50%);
}

/* Common section title rule + eyebrow ====================================== */
.pv-cover-mark,
.pv-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}
.pv-cover-mark::before,
.pv-section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

.pv-hd {
  position: relative;
  margin: 0 0 4px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pv-hd .pv-hd-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.pv-sub-hd {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* === Cover ================================================================ */
.layout-title_cover,
.layout-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 88px 72px;
}
.layout-title_cover .pv-cover-mark,
.layout-title .pv-cover-mark {
  margin-bottom: 18px;
}
.pv-title {
  max-width: 88%;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 3.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.pv-sub {
  max-width: 74%;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.45;
}
.pv-author {
  position: absolute;
  left: 88px; bottom: 56px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
/* hairline above author */
.layout-title_cover::after,
.layout-title::after {
  content: "";
  position: absolute;
  left: 56px; right: 56px;
  bottom: 92px;
  height: 1px;
  background: var(--line);
}

/* === Section divider ====================================================== */
.layout-section_divider,
.layout-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 88px;
}
.pv-section-title {
  max-width: 70%;
  color: var(--ink);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-align: left;
}
/* Big watermark digit on the right (last digit) */
.layout-section_divider::after,
.layout-section::after {
  content: attr(data-watermark);
  position: absolute;
  right: 8%; top: 50%;
  transform: translateY(-50%);
  font-size: 22rem;
  font-weight: 800;
  color: var(--line-2);
  line-height: 0.85;
  letter-spacing: -0.06em;
  pointer-events: none;
}
.pv-section-rule {
  width: 78px; height: 3px;
  margin-top: 28px;
  background: var(--brand);
  border-radius: 2px;
}

/* === Closing ============================================================== */
.layout-closing_end,
.layout-closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 88px;
}
.layout-closing_end .pv-close-eyebrow,
.layout-closing .pv-close-eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  margin-bottom: 14px;
}
.pv-close-title {
  color: var(--ink);
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 8px;
}
.pv-close-sub {
  max-width: 70%;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.5;
}
.pv-close-rule {
  width: 84px; height: 2px;
  margin-top: 26px;
  background: var(--brand);
  border-radius: 1px;
}
.layout-closing_end::after,
.layout-closing::after {
  content: "";
  position: absolute;
  left: 56px; right: 56px;
  bottom: 56px;
  height: 1px;
  background: var(--line);
}

/* === KPI dashboard ======================================================== */
.layout-kpi_dashboard {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.pv-kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  min-height: 120px;
}
.pv-kpi-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pv-kpi-value {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pv-kpi-note {
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.34;
}

/* Mini icons: small soft tile + dot indicator */
.pv-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--soft);
}
.pv-mini-icon::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
}
.pv-mini-trend::before { background: var(--brand); }
.pv-mini-target::before { background: var(--sage); }
.pv-mini-bolt::before { background: var(--warm); }
.pv-mini-spark::before { background: var(--brand); }
.pv-mini-grid::before { background: var(--sage); }
.pv-mini-shield::before { background: var(--warm); }
.pv-mini-rocket::before { background: var(--brand-dark); }

/* KPI conclusion bullets — three flat cards */
.layout-kpi_dashboard .pv-bullets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 14px;
}
.layout-kpi_dashboard .pv-bullets li {
  position: relative;
  margin: 0;
  padding: 38px 16px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 0.9rem;
  line-height: 1.36;
  color: var(--body);
  min-height: 96px;
}
.layout-kpi_dashboard .pv-bullets li::before {
  position: absolute;
  left: 14px; top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 800;
}

/* Action / rhythm strip */
.pv-action-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  border-radius: var(--r);
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.4;
}
.pv-action-kicker {
  color: var(--warm-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.pv-action-text { color: var(--body); }
.layout-timeline_flow .pv-action-strip {
  background: var(--sage-soft);
  border-color: var(--sage-border);
}
.layout-timeline_flow .pv-action-kicker { color: var(--sage-dark); }

/* === Split insight ======================================================== */
.layout-split_insight {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-split {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 22px;
  flex: 1;
}
.pv-split-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.layout-split_insight .pv-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.layout-split_insight .pv-bullets li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 50px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 56px;
  display: flex;
  align-items: center;
}
.layout-split_insight .pv-bullets li::before {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.74rem;
  font-weight: 800;
}
.pv-callout {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--r-lg);
  padding: 22px 22px 24px;
  color: var(--ink);
}
.pv-callout-title {
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.pv-callout-body {
  color: var(--body);
  font-size: 0.94rem;
  line-height: 1.5;
}

/* === Comparison matrix ==================================================== */
.layout-comparison_matrix {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.pv-compare-h {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}
.pv-compare-h:nth-child(1) {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-border);
}
.pv-compare-h:nth-child(2) {
  background: var(--warm-soft);
  color: var(--warm-dark);
  border: 1px solid var(--warm-border);
}
.pv-compare-cell {
  position: relative;
  padding: 12px 14px 12px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.pv-compare-cell::before {
  content: "";
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.pv-compare-cell:nth-child(2n)::before { background: var(--warm); }

/* === Timeline flow ======================================================== */
.layout-timeline_flow {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
  flex: 1;
}
.pv-timeline::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%;
  top: 18px;
  height: 1px;
  background: var(--line);
}
.pv-step {
  position: relative;
  padding: 8px 8px 14px;
  text-align: center;
}
.pv-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--brand-border);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.pv-step:nth-child(2) .pv-step-num { color: var(--sage-dark); border-color: var(--sage-border); }
.pv-step:nth-child(3) .pv-step-num { color: var(--warm-dark); border-color: var(--warm-border); }
.pv-step-label {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.pv-step-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.42;
}

/* === Feature grid ========================================================= */
.layout-feature_grid {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
}
.pv-feature-card {
  position: relative;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}
.pv-feature-card .pv-mini-icon {
  position: absolute;
  right: 18px; top: 18px;
  margin: 0;
}
.pv-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  align-self: flex-start;
  margin-bottom: 10px;
}
.pv-card-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.pv-card-body {
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.46;
}

/* === Quote evidence ======================================================= */
.layout-quote_evidence {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-quote {
  position: relative;
  margin: 8px 0 8px;
  padding: 24px 28px 22px 64px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.46;
}
.pv-quote::before {
  content: "“";
  position: absolute;
  left: 22px; top: 6px;
  color: var(--warm);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
}
.pv-attr {
  display: block;
  margin-top: 10px;
  text-align: right;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}
.pv-attr:not(:empty)::before { content: "— "; }

.pv-evidence {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.pv-evidence li {
  position: relative;
  margin: 0;
  padding: 11px 14px 11px 38px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.42;
  display: flex;
  align-items: center;
}
.pv-evidence li::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

/* === Insight cards ======================================================== */
.layout-insight_cards {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-insight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  flex: 1;
}
.pv-insight-card {
  position: relative;
  padding: 24px 26px 26px 30px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}
.pv-insight-card:nth-child(1) {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
}
.pv-insight-card:nth-child(2) {
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
}
.pv-insight-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
  border-radius: 4px 0 0 4px;
}
.pv-insight-card:nth-child(2)::before { background: var(--warm); }
.pv-insight-card .pv-card-title {
  font-size: 1.18rem;
  margin-bottom: 12px;
}
.pv-insight-card .pv-card-body {
  font-size: 0.96rem;
  line-height: 1.6;
}
.pv-footer-note {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* === Agenda =============================================================== */
.layout-agenda {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-agenda {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin-top: 10px;
  flex: 1;
}
.pv-agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.pv-agenda-num {
  flex-shrink: 0;
  width: 42px;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pv-agenda-body { flex: 1; }
.pv-agenda-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.pv-agenda-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* === Big number =========================================================== */
.layout-big_number {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 38px 56px 52px;
  text-align: center;
}
.layout-big_number .pv-hd {
  width: 100%;
  text-align: left;
}
.pv-bignum-value {
  margin-top: 10px;
  color: var(--ink);
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.pv-bignum-unit {
  margin-top: 12px;
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.pv-bignum-caption {
  max-width: 70%;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.pv-bignum-supports {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  margin-top: auto;
  padding-top: 24px;
}
.pv-bignum-support {
  position: relative;
  padding-left: 14px;
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: left;
}
.pv-bignum-support::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--brand);
  border-radius: 2px;
}

/* === Three columns ======================================================== */
.layout-three_col {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  flex: 1;
}
.pv-three-card {
  position: relative;
  padding: 22px 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}
.pv-three-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--brand);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.pv-three-num {
  color: var(--brand);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.pv-three-title {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 14px;
}
.pv-three-card .pv-three-title + .pv-three-body::before {
  content: "";
  display: block;
  width: 32px; height: 3px;
  background: var(--brand);
  margin-bottom: 12px;
  border-radius: 2px;
}
.pv-three-body {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* === Process flow ========================================================= */
.layout-process_flow {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-process {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  flex: 1;
}
.pv-process-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr 2fr;
  align-items: center;
  gap: 18px;
  padding: 14px 16px 14px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-height: 56px;
}
.pv-process-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.pv-process-num {
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pv-process-label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}
.pv-process-desc {
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* === Data callout ========================================================= */
.layout-data_callout {
  display: flex;
  flex-direction: column;
  padding: 38px 56px 52px;
}
.pv-data-callout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  flex: 1;
}
.pv-data-hero {
  position: relative;
  padding: 28px 30px 30px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--r-lg);
}
.pv-data-hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--brand);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.pv-data-label {
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pv-data-value {
  margin: 22px 0 22px;
  color: var(--ink);
  font-size: 5.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.pv-data-value::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--brand);
  margin-top: 14px;
  border-radius: 2px;
}
.pv-data-caption {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.5;
}
.pv-data-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pv-data-point {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.pv-data-point-value {
  color: var(--brand);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pv-data-point-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pv-data-point-note {
  margin-top: 10px;
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* === Lists reset ========================================================== */
.slide-canvas ul,
.pv-bullets,
.pv-evidence {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* === Responsive =========================================================== */
@media (max-width: 960px) {
  .desktop { padding: 12px; }
  .app-window { height: calc(100vh - 24px); border-radius: var(--r); }
  .workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { max-height: 42vh; border-right: none; border-bottom: 1px solid var(--line); }
  .titlebar-title { margin-right: 0; font-size: 12px; }
  .preview-rich {
    padding: 24px 28px 36px;
    font-size: 13px;
  }
  .pv-title { font-size: 2.1rem; }
  .pv-section-title { font-size: 2rem; }
  .pv-close-title { font-size: 2.6rem; }
}
