/* =========================================================
   iDASH × AI-First 提案系統 — 顧問風投影片
   設計風格：Editorial Consultant（米白紙 + 墨色 + 單色重點）
   ========================================================= */

:root {
  /* — Paper & Ink — */
  --paper: #faf7f1;
  --paper-card: #ffffff;
  --paper-deep: #f1ece1;
  --ink: #15181d;
  --ink-2: #3d4754;
  --ink-3: #7a8392;
  --ink-4: #a8afba;
  --divider: #e2dbcb;
  --divider-soft: #efeae0;

  /* — Single accent (tweakable) — */
  --accent: #b8763a;          /* warm ochre */
  --accent-ink: #8a541f;      /* darker for type on paper */
  --accent-bg: #f4e8d6;       /* tinted background */
  --accent-line: #d4a572;

  /* — Status — */
  --good: #4a7c5a;
  --warn: #c47832;
  --bad:  #b94634;
  --info: #3d6da3;

  /* — Type — */
  --font-display: "Noto Serif TC", "Source Serif 4", "Songti TC", serif;
  --font-sans: "Noto Sans TC", -apple-system, "PingFang TC", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-num: "Newsreader", "Noto Serif TC", serif;

  /* — Density — */
  --pad-frame: 88px;
  --pad-frame-y: 72px;
}

* { box-sizing: border-box; }

deck-stage { background: #0a0a0a; }

section {
  position: relative;
  width: 1920px;
  height: 1080px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11", "kern";
  overflow: hidden;
  letter-spacing: 0;
}

/* ============= Reusable chrome ============= */

.frame {
  position: absolute;
  inset: var(--pad-frame-y) var(--pad-frame);
  display: flex;
  flex-direction: column;
}

/* Top chrome: tiny brand + section + page no. */
.chrome {
  position: absolute;
  top: 40px;
  left: var(--pad-frame);
  right: var(--pad-frame);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chrome .brand {
  display: flex; align-items: center; gap: 14px;
}
.chrome .brand::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
}
.chrome .meta { display: flex; gap: 32px; }
.chrome .meta span { color: var(--ink-4); }
.chrome .meta strong { color: var(--ink-3); font-weight: 500; }

/* Bottom chrome: footer rule + footnote */
.footrule {
  position: absolute;
  left: var(--pad-frame); right: var(--pad-frame);
  bottom: 48px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 16px;
  color: var(--ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.footrule::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -16px;
  height: 1px;
  background: var(--divider);
}

/* Slide title block */
.kicker {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px;
}
.kicker .num {
  font-family: var(--font-num);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--ink-3);
}

.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 76px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: balance;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 18px;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}
.dek {
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 1100px;
}
.body {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 400;
}
.body strong { color: var(--ink); font-weight: 600; }
.caption {
  font-size: 17px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.mono { font-family: var(--font-mono); font-feature-settings: "ss02"; }
.num  { font-family: var(--font-num); font-style: normal; font-weight: 500; }

.rule {
  height: 1px;
  background: var(--divider);
  border: 0;
  margin: 24px 0;
}
.rule.bold { background: var(--ink); height: 2px; }
.rule.accent { background: var(--accent); height: 2px; }

/* Marks */
mark {
  background: linear-gradient(transparent 60%, var(--accent-bg) 60%);
  color: inherit;
  padding: 0 2px;
}
.tag {
  display: inline-flex; align-items: center;
  font-size: 16px; font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--divider);
  color: var(--ink-2);
  background: var(--paper-card);
  border-radius: 2px;
}
.tag.accent { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-bg); }
.tag.good { color: var(--good); border-color: rgba(74,124,90,0.4); background: rgba(74,124,90,0.08); }
.tag.warn { color: var(--warn); border-color: rgba(196,120,50,0.4); background: rgba(196,120,50,0.08); }
.tag.bad  { color: var(--bad);  border-color: rgba(185,70,52,0.4);  background: rgba(185,70,52,0.08); }

/* ============= Cover slide ============= */

.cover {
  background: var(--paper);
  padding: var(--pad-frame-y) var(--pad-frame);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.cover .top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 24px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.cover .top .brand {
  display: flex; align-items: center; gap: 16px;
  font-size: 26px; color: var(--ink); letter-spacing: 0.08em;
}
.cover .top .brand .mark {
  width: 36px; height: 36px;
  position: relative;
}
.cover .top .brand .mark::before,
.cover .top .brand .mark::after {
  content: ""; position: absolute; inset: 0;
}
.cover .top .brand .mark::before {
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 100%, 50% 50%, 0 50%);
}
.cover .top .brand .mark::after {
  width: 14px; height: 14px;
  right: 0; bottom: 0; left: auto; top: auto;
  background: var(--accent);
}

.cover .hero {
  align-self: center;
  max-width: 1500px;
}
.cover .eyebrow {
  font-family: var(--font-mono);
  font-size: 18px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 16px;
}
.cover .eyebrow::before {
  content: ""; width: 60px; height: 2px; background: var(--accent);
}
.cover h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 136px;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 36px;
}
.cover h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-ink);
}
.cover .sub {
  font-size: 30px;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 1100px;
}

.cover .footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--divider);
}
.cover .footer .col .k {
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 600;
}
.cover .footer .col .v {
  font-size: 24px;
  color: var(--ink);
  font-weight: 500;
}
.cover .footer .col .v .small { font-size: 18px; color: var(--ink-3); font-weight: 400; }

/* ============= Cover decoration: serial numbers ============= */
.cover-serial {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--ink-4);
  text-transform: uppercase;
  font-weight: 500;
}
.cover-serial.tl { top: 40px; left: var(--pad-frame); }
.cover-serial.tr { top: 40px; right: var(--pad-frame); }
.cover-serial.br { bottom: 40px; right: var(--pad-frame); }

/* ============= Layout grids ============= */

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; flex: 1; }
.split-2-tight { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; flex: 1; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; flex: 1; }
.split-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; flex: 1; }
.split-7-3 { display: grid; grid-template-columns: 7fr 3fr; gap: 72px; flex: 1; }
.split-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; flex: 1; }

/* ============= Cards ============= */

.card {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  padding: 36px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
}
.card .idx {
  font-family: var(--font-num);
  font-style: italic;
  font-size: 18px;
  color: var(--accent-ink);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.card .ct {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--ink);
}
.card .cb {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  flex: 1;
}
.card.muted {
  background: transparent;
  opacity: 0.55;
}
.card.highlight {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card.highlight .ct { color: var(--paper); }
.card.highlight .cb { color: rgba(250, 247, 241, 0.78); }
.card.highlight .idx { color: var(--accent-line); }
.card.accent-side {
  border-left: 4px solid var(--accent);
}

/* ============= Stat block ============= */

.stat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 0;
}
.stat .v {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 96px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-top: 6px;
}
.stat .v em { font-style: italic; color: var(--accent-ink); font-weight: 400; }
.stat .v .unit { font-size: 40px; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.stat .k {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat .d {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 8px;
}

/* ============= Tables ============= */

table.editorial {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}
table.editorial th,
table.editorial td {
  text-align: left;
  padding: 18px 20px;
  vertical-align: top;
  border-bottom: 1px solid var(--divider);
  line-height: 1.45;
}
table.editorial th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1.5px solid var(--ink);
  padding-top: 16px;
  padding-bottom: 14px;
}
table.editorial td strong { color: var(--ink); font-weight: 600; }
table.editorial tbody tr:last-child td { border-bottom: 0; }
table.editorial.compact th, table.editorial.compact td { padding: 14px 16px; font-size: 19px; }
table.editorial .num-col {
  font-family: var(--font-num);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  white-space: nowrap;
}
table.editorial .col-accent { color: var(--accent-ink); }
table.editorial .row-emph td { background: var(--accent-bg); }
table.editorial .row-emph td strong { color: var(--accent-ink); }

/* ============= Architecture diagram ============= */

.archi-layer {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  padding: 28px 36px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
}
.archi-layer + .archi-layer { margin-top: 12px; }
.archi-layer .lvl {
  font-family: var(--font-num);
  font-style: italic;
  font-size: 56px;
  color: var(--accent-ink);
  line-height: 1;
  font-weight: 400;
}
.archi-layer .title-line {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 8px;
}
.archi-layer .lt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  color: var(--ink);
}
.archi-layer .lt-en {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.archi-layer .ld {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
}
.archi-arrow {
  text-align: center;
  font-size: 22px;
  color: var(--ink-4);
  line-height: 1;
  margin: 4px 0;
}

/* ============= Timeline ============= */

.timeline-v {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 8px 36px;
  position: relative;
}
.timeline-v::before {
  content: "";
  position: absolute;
  left: 252px; top: 0; bottom: 0;
  width: 1px; background: var(--divider);
}
.timeline-v .tt {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  padding: 12px 0;
  font-weight: 500;
  text-align: right;
  padding-right: 28px;
  position: relative;
}
.timeline-v .tt::after {
  content: "";
  position: absolute;
  right: -7px; top: 18px;
  width: 13px; height: 13px;
  background: var(--accent);
  border: 3px solid var(--paper);
  z-index: 2;
}
.timeline-v .tc {
  padding: 12px 0;
}
.timeline-v .tc .th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 6px;
}
.timeline-v .tc .td {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.45;
}
.timeline-v .tc .td .b { color: var(--ink); font-weight: 600; }

/* ============= Phase gantt ============= */

.gantt {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px 24px;
  font-size: 18px;
}
.gantt .ph-name {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 8px;
}
.gantt .ph-name .pn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
}
.gantt .ph-name .pw {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.gantt .ph-bar {
  position: relative;
  height: 56px;
  background: var(--divider-soft);
  border-radius: 2px;
}
.gantt .ph-bar .seg {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--ink);
  display: flex; align-items: center;
  padding: 0 18px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  border-radius: 2px;
}
.gantt .ph-bar .seg.accent { background: var(--accent); color: white; }
.gantt .ph-bar .seg.outline { background: transparent; border: 1.5px dashed var(--ink-3); color: var(--ink-2); }
.gantt .axis {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}
.gantt .axis div { text-align: center; }

/* ============= Diagram: bet loop ============= */

.bet-loop {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.bet-loop .node {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  padding: 20px 26px;
  font-size: 21px;
  color: var(--ink);
  text-align: center;
  font-weight: 500;
  position: relative;
}
.bet-loop .node .b { color: var(--accent-ink); font-weight: 600; }
.bet-loop .arrow {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 30px;
  color: var(--ink-3);
  line-height: 1;
}

/* ============= Investment slide special ============= */

.invest-row {
  display: grid;
  grid-template-columns: 60px 1fr 1.8fr 220px;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--divider);
  align-items: baseline;
}
.invest-row:last-child { border-bottom: 1px solid var(--divider); }
.invest-row .ix {
  font-family: var(--font-num);
  font-style: italic;
  font-size: 28px;
  color: var(--ink-3);
  font-weight: 400;
}
.invest-row .iname {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
}
.invest-row .idesc {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
}
.invest-row .iprice {
  font-family: var(--font-num);
  font-weight: 500;
  font-size: 32px;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.invest-row .iprice .unit { font-size: 16px; color: var(--ink-3); font-weight: 400; margin-right: 6px; }
.invest-row.total { background: var(--ink); padding: 24px 28px; margin-top: 12px; border: 0; border-radius: 2px; }
.invest-row.total .iname { color: var(--paper); font-size: 28px; }
.invest-row.total .idesc { color: rgba(250,247,241,0.7); }
.invest-row.total .iprice { color: var(--paper); font-size: 40px; }
.invest-row.total .iprice .unit { color: rgba(250,247,241,0.6); }
.invest-row.total .ix { color: var(--accent-line); }

/* ============= Bullets ============= */

ul.dash { list-style: none; padding: 0; margin: 0; }
ul.dash li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-2);
}
ul.dash li::before {
  content: "";
  position: absolute;
  left: 0; top: 22px;
  width: 14px; height: 1.5px;
  background: var(--accent);
}
ul.dash li strong { color: var(--ink); font-weight: 600; }

ul.bullets { list-style: none; padding: 0; margin: 0; }
ul.bullets li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
}
ul.bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: 18px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

/* ============= Side label ============= */
.side-label {
  position: absolute;
  left: 32px; top: 50%;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

/* ============= Section divider ============= */
.section-divider {
  background: var(--ink);
  color: var(--paper);
  padding: var(--pad-frame-y) var(--pad-frame);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-divider .sec-num {
  font-family: var(--font-num);
  font-style: italic;
  font-size: 28px;
  color: var(--accent-line);
  margin-bottom: 22px;
}
.section-divider .sec-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 112px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 28px;
}
.section-divider .sec-title em { font-style: italic; color: var(--accent-line); font-weight: 400; }
.section-divider .sec-sub {
  font-size: 26px;
  color: rgba(250,247,241,0.75);
  max-width: 1200px;
  line-height: 1.5;
}
.section-divider::before {
  content: "";
  position: absolute;
  left: var(--pad-frame); top: 64px;
  width: 60px; height: 2px;
  background: var(--accent);
}

/* ============= Quote slide ============= */
.pullquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 64px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.pullquote em { font-style: italic; color: var(--accent-ink); font-weight: 400; }
.pullquote .open {
  font-family: var(--font-num);
  font-style: italic;
  font-size: 140px;
  color: var(--accent);
  line-height: 0.5;
  margin-right: 12px;
  vertical-align: -50px;
  font-weight: 400;
}

/* ============= Demo specific ============= */
.demo-frame {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.demo-frame .toolbar {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--divider);
  background: var(--paper-deep);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  gap: 16px;
}
.demo-frame .toolbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); }
.demo-frame .toolbar .dot:nth-child(1) { background: #d97070; }
.demo-frame .toolbar .dot:nth-child(2) { background: #d9b770; }
.demo-frame .toolbar .dot:nth-child(3) { background: #88b07a; }
.demo-frame .toolbar .url {
  flex: 1; text-align: center;
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
  font-size: 14px;
}

/* ============= Animations ============= */
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
section[data-active="true"] .anim-up { animation: slide-up 700ms cubic-bezier(.2,.7,.2,1) both; }
section[data-active="true"] .anim-up-1 { animation-delay: 0ms; }
section[data-active="true"] .anim-up-2 { animation-delay: 100ms; }
section[data-active="true"] .anim-up-3 { animation-delay: 200ms; }
section[data-active="true"] .anim-up-4 { animation-delay: 300ms; }
section[data-active="true"] .anim-up-5 { animation-delay: 400ms; }
