/* ===========================================================
   COSCUP 2026 — 同個 Email、兩種登入方式
   自訂主題：暖色編輯體 + 炭灰對比軸
   =========================================================== */

/* 本地字型（已依實際投影片文字內容裁切成子集，不依賴 CDN） */
@font-face { font-family: 'Noto Serif TC'; font-weight: 500; font-style: normal; src: url('../vendor/fonts/serif-500.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Serif TC'; font-weight: 600; font-style: normal; src: url('../vendor/fonts/serif-600.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Serif TC'; font-weight: 700; font-style: normal; src: url('../vendor/fonts/serif-700.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Sans TC'; font-weight: 400; font-style: normal; src: url('../vendor/fonts/sans-400.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Sans TC'; font-weight: 500; font-style: normal; src: url('../vendor/fonts/sans-500.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'Noto Sans TC'; font-weight: 600; font-style: normal; src: url('../vendor/fonts/sans-600.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; src: url('../vendor/fonts/mono-400.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; src: url('../vendor/fonts/mono-500.woff2?v=25') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; src: url('../vendor/fonts/mono-600.woff2?v=25') format('woff2'); font-display: swap; }

:root {
  /* 暖色主軸 */
  --cream:        #f6f1ea;
  --cream-deep:   #efe7d8;
  --card:         #fdfbf7;
  --accent:       #a8553a;
  --accent-soft:  #d9b9a5;
  --good:         #4a7553;

  /* 炭灰對比軸（新增，取代原本純黑，用在核心概念頁 / code 頁做反差） */
  --ink:          #2b2622;
  --charcoal:     #211d1a;
  --charcoal-2:   #322c27;
  --on-charcoal:      #f3ece2;
  --on-charcoal-soft: #b8ada0;
  --rule-dark:    #453e37;

  --ink-soft:  #5c544c;
  --ink-faint: #948b7f;
  --rule:      #e2d8c8;

  --code-kw:  #954a2f;
  --code-str: #4a7553;
  --code-cm:  #948b7f;
  --code-fn:  #92661c;

  --font-serif: "Noto Serif TC", "PingFang TC", Georgia, serif;
  --font-sans:  "Noto Sans TC", "PingFang TC", "Helvetica Neue", sans-serif;
  --font-mono:  "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

html { font-size: 32px; }

body { background: var(--cream); }

.reveal {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 400;
}

.reveal .slides section {
  text-align: left;
  padding: 0;
  height: 100%;
}

/* ---------- 共用：頁面畫布 ---------- */
.deck-slide {
  width: 100%;
  height: 100%;
  padding: 1.15em 1.5em;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

.deck-slide.on-cream    { background: var(--cream); color: var(--ink); }
.deck-slide.on-charcoal { background: var(--charcoal); color: var(--on-charcoal); }

/* 頁眉：eyebrow / section 標記 */
.deck-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.44em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7em;
}

.on-charcoal .deck-eyebrow { color: var(--accent-soft); }

/* 共用投影片標題 */
.deck-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4em;
  line-height: 1.4;
  margin: 0 0 0.75em;
}

/* 頁碼：右上角（跟左上角 eyebrow 對稱，避開左右下角可能被內容或翻頁箭頭佔用的區域） */
.deck-pageno {
  position: absolute;
  right: 1.6em;
  top: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.5em;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.on-charcoal .deck-pageno { color: var(--on-charcoal-soft); }

/* ---------- 封面 ---------- */
.cover .deck-eyebrow { font-size: 0.85em; }

.cover-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.1em;
  line-height: 1.42;
  margin: auto 0;
  max-width: 15em;
  letter-spacing: 0.01em;
}

.cover-title .line2 {
  display: block;
  color: var(--accent);
  margin-top: 0.15em;
}

.cover-subtitle {
  font-size: 0.75em;
  color: var(--ink-soft);
  max-width: 20em;
  line-height: 1.7;
  margin-bottom: auto;
}

.cover-meta {
  display: flex;
  gap: 2em;
  font-family: var(--font-mono);
  font-size: 0.48em;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  padding-top: 1.4em;
  border-top: 1px solid var(--rule);
}

.cover-meta strong { color: var(--ink-soft); font-weight: 600; margin-right: 0.4em; }

/* 封面右側：兩條路徑匯流成一個節點的線稿圖 */
.cover-diagram {
  position: absolute;
  right: 1.6em;
  top: 50%;
  transform: translateY(-50%);
  width: 9.5em;
  height: 9.5em;
}

/* ---------- 收尾：謝謝聆聽 + 聯絡方式 QR ---------- */
.closing-qr-list {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 3em;
  margin-top: 2.2em;
}

.closing-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing-qr-code {
  position: relative;
  width: 7em;
  height: 7em;
  background: #fdfbf7;
  border: 1px solid var(--rule);
  border-radius: 0.6em;
  margin-bottom: 0.8em;
  padding: 0.5em;
  box-sizing: border-box;
}

.closing-qr-code svg { width: 100%; height: 100%; display: block; }

/* QR 中間的小圖示（例如 IG icon），墊一塊底色蓋掉底下的 QR 模組 */
.closing-qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: 30%;
  background: #fdfbf7;
  border: 1px solid var(--rule);
  border-radius: 0.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2em;
  box-sizing: border-box;
}

.closing-qr-logo svg { width: 100%; height: 100%; display: block; }

.closing-qr-label {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.75em;
  color: var(--ink);
  margin-bottom: 0.5em;
}

.closing-qr-caption {
  font-family: var(--font-mono);
  font-size: 0.5em;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

/* 簡報會外流，網址做成可點連結，但視覺上不特別標榜是連結 */
.closing-qr-caption a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
}

.closing-qr-caption a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 講者自我介紹 ---------- */
.speaker-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3em;
}

.speaker-avatar {
  flex: 0 0 auto;
  width: 9em;
  height: 9em;
  border-radius: 50%;
  object-fit: cover;
}

.speaker-text-col {
  flex: 1;
  min-width: 0;
}

.speaker-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8em;
  margin-bottom: 1.8em;
}

.speaker-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2em;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

.speaker-name-sub {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1em;
  color: var(--ink-faint);
  margin-left: 0.6em;
}

.speaker-role {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-left: 0.9em;
  border-left: 1px solid var(--rule);
}

.speaker-bio {
  font-size: 0.94em;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 42em;
  margin: 0;
  text-align: justify;
}

.speaker-bio + .speaker-bio {
  margin-top: 1.4em;
}

/* ---------- 開場提醒（QR code） ---------- */
.qr-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7em;
  margin-top: 2.2em;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-placeholder {
  width: 9.5em;
  height: 9.5em;
  background: var(--ink);
  border-radius: 0.6em;
  margin-bottom: 1.3em;
}

.qr-code {
  width: 9.5em;
  height: 9.5em;
  background: #fdfbf7;
  border: 1px solid var(--rule);
  border-radius: 0.6em;
  margin-bottom: 1.3em;
  padding: 0.6em;
  box-sizing: border-box;
}

.qr-code svg { width: 100%; height: 100%; display: block; }

.qr-label {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1em;
  color: var(--ink);
  margin-bottom: 0.5em;
}

.qr-desc {
  font-family: var(--font-mono);
  font-size: 0.55em;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  max-width: 10.5em;
}

/* 開場提醒：QR 旁邊的重點列表（無編號，用細線分隔） */
.qr-notes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  max-width: 15em;
}

.qr-note-item {
  font-size: 0.85em;
  line-height: 1.6;
  color: var(--ink);
  padding: 0.85em 0;
  border-bottom: 1px solid var(--rule);
}

.qr-note-item:first-child { padding-top: 0; }
.qr-note-item:last-child { border-bottom: none; padding-bottom: 0; }

/* ---------- 狀態矩陣（淺色） ---------- */
.matrix-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  margin-top: 0.4em;
}

.matrix-grid {
  display: grid;
  grid-template-columns: 7em repeat(2, 1fr);
  grid-template-rows: auto repeat(2, 1fr);
  gap: 0.9em;
  flex: 1;
  min-height: 0;
}

.matrix-axis-label {
  font-family: var(--font-mono);
  font-size: 0.62em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 0.55em;
  line-height: 1.3;
}

.matrix-axis-label .axis-value {
  font-size: 1.3em;
  color: var(--ink);
  font-weight: 600;
}

.matrix-col-label { padding-bottom: 0.7em; }
.matrix-row-label { justify-content: flex-end; padding-right: 0.4em; }

.matrix-cell {
  min-height: 0;
  border-radius: 0.22em;
  padding: 1em 1.6em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--rule);
  background: var(--card);
  position: relative;
  overflow: hidden;
}

.matrix-cell.risk-safe { border-color: rgba(74, 117, 83, 0.4); }
.matrix-cell.risk-warn { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(168,85,58,0.25) inset; }

.matrix-cell .cell-desc {
  font-size: 0.85em;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: justify;
}

.cell-badge {
  display: flex;
  align-items: center;
  gap: 0.45em;
  align-self: flex-end;
}

.matrix-cell .cell-icon { font-size: 1em; line-height: 1; }
.matrix-cell.risk-safe .cell-icon { color: var(--good); }
.matrix-cell.risk-warn .cell-icon { color: var(--accent); }

.matrix-cell.risk-safe .cell-tag { color: var(--good); }
.matrix-cell.risk-warn .cell-tag { color: var(--accent); }

.cell-tag {
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- 攻擊流程 swimlane ---------- */
.flow-wrap {
  flex: 1;
  display: flex;
  gap: 1.8em;
  min-height: 0;
  margin-top: 0.4em;
}

.flow-labels {
  width: 6em;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.flow-label {
  flex: 1;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
}

.flow-label:first-child { border-top: none; }

.flow-canvas {
  position: relative;
  flex: 1;
}

.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.flow-dot {
  position: absolute;
  z-index: 1;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.flow-node {
  position: absolute;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.2em;
  padding: 0.8em 1.1em;
  font-size: 0.9em;
  line-height: 1.45;
  max-width: 10rem;
  color: var(--ink-soft);
  box-shadow: 0 0.15em 0.6em rgba(43,38,34,0.08);
}

.flow-node.anchor-r { transform: translateY(-50%); }
.flow-node.anchor-l { transform: translateY(-50%); }

.flow-node.is-critical {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff7f0;
  font-weight: 600;
}

.flow-node .node-step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
  margin-right: 0.4em;
}

.flow-node.is-critical .node-step { color: #fbe4d6; }

/* ---------- Code 頁（淺色） ---------- */
.code-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-top: 0.4em;
}

.code-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.code-file-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.44em;
  letter-spacing: 0.02em;
  color: var(--card);
  background: var(--ink-soft);
  padding: 0.3em 0.7em;
  border-radius: 0.15em;
  margin-bottom: 0.7em;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 0.68em;
  line-height: 1.6;
  color: var(--ink);
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  border-radius: 0.3em;
  padding: 0.65em 1.15em;
  overflow: hidden;
}

.code-block pre { margin: 0; }
.code-block .kw { color: var(--code-kw); }
.code-block .str { color: var(--code-str); }
.code-block .cm { color: var(--code-cm); font-style: italic; }
.code-block .fn { color: var(--code-fn); }

.code-sidebar {
  width: 100%;
  flex-shrink: 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.9em;
}

.code-annotation {
  font-size: 0.72em;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: justify;
}

.code-annotation strong { color: var(--ink); font-weight: 600; }

/* ---------- Section 轉場頁 ---------- */
.section-divider { justify-content: center; }
.section-divider .deck-eyebrow { font-size: 0.6em; }

.divider-num {
  font-family: var(--font-mono);
  font-size: 5.6rem;
  font-weight: 500;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.divider-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.35rem;
  line-height: 1.38;
  max-width: 38rem;
  color: var(--ink);
}

.divider-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 1.2rem;
  max-width: 26em;
  line-height: 1.7;
}

/* ---------- 條列清單 ---------- */
.bullet-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  max-width: 42rem;
}

/* ---------- 目錄：左右兩欄 ---------- */
.toc-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5em;
  align-content: center;
}

.toc-col {
  display: flex;
  flex-direction: column;
}

.bullet-item {
  display: flex;
  align-items: baseline;
  gap: 1.3rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.bullet-item:first-child { padding-top: 0; }
.bullet-item:last-child { border-bottom: none; padding-bottom: 0; }

.bullet-marker {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 2.2rem;
}

.bullet-text {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink);
  text-align: justify;
}

.bullet-text strong { color: var(--accent); font-weight: 600; }
.bullet-text code {
  background: rgba(168,85,58,0.08);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- 名詞定義卡 ---------- */
.term-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 1.8rem;
  align-items: stretch;
}

.term-grid.single { grid-template-columns: 1fr; max-width: 26em; }

.term-card {
  min-height: 0;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  padding: 1.8rem 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.term-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.term-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: break-word;
}

.term-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
  text-align: justify;
}
.term-desc + .term-desc { margin-top: 1rem; }
.term-desc strong { color: var(--ink); font-weight: 600; }
.term-desc code {
  background: rgba(168,85,58,0.08);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- 名詞定義：編輯體無卡片版（provider / sub） ---------- */
.term-editorial {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.term-editorial-row {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.term-editorial-row:first-child { border-top: none; padding-top: 0; }
.term-editorial-row:last-child  { padding-bottom: 0; }

.term-editorial-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 0.55rem;
  display: flex;
  align-items: baseline;
  position: relative;
}

.term-editorial-gloss {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.62em;
  color: var(--ink-faint);
  margin-left: 0.7em;
}

.term-editorial-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0;
  text-align: justify;
}
.term-editorial-desc strong { color: var(--ink); font-weight: 600; }
.term-editorial-desc code {
  background: rgba(168,85,58,0.08);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* 「BDD」哏：設定 → 翻牌吐槽 → 真正的punchline */
.bdd-setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.bdd-nope {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.bdd-strike-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0.15em;
  background: var(--accent);
  transform: translateY(-50%);
  pointer-events: none;
}

.term-editorial-name-punch {
  color: var(--accent);
  font-size: 1.35rem;
}

/* ---------- 引言強調頁 ---------- */
.pull-quote-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.quote-text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 1.3rem;
  text-align: justify;
}

.quote-text .em { color: var(--accent); }

.quote-context {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: justify;
}

/* ---------- 案例統計卡 ---------- */
.stat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 3.4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.8rem;
}

.stat-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
  text-align: justify;
}

.stat-desc strong { color: var(--ink); font-weight: 600; }

.stat-cite { font-size: 0.82rem; color: var(--ink-faint); }

/* ---------- 時間序敘事 ---------- */
.timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 38em;
}

.tl-step { display: flex; gap: 1.3rem; }

.tl-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 2.3rem;
}

.tl-num {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.tl-line { flex: 1; width: 1px; background: var(--rule); margin: 0.3rem 0; min-height: 0.7rem; }
.tl-step:last-child .tl-line { display: none; }

.tl-step.is-critical .tl-num { border-color: var(--accent); background: var(--accent); color: #fff7f0; }

/* 步驟少、畫面空間夠時的放大版（例：使用者登入流程頁） */
.timeline-lg { max-width: 44em; }
.timeline-lg .tl-marker, .timeline-lg .tl-num { width: 2.8rem; height: 2.8rem; }
.timeline-lg .tl-num { font-size: 0.85rem; }
.timeline-lg .tl-body { font-size: 1.2rem; line-height: 1.6; }

.tl-body { font-size: 1rem; line-height: 1.5; padding: 0.3rem 0 0.65rem; color: var(--ink); text-align: justify; }
.tl-step.is-critical .tl-body { color: var(--accent); font-weight: 600; }

.tl-body code, .flow-step code {
  background: rgba(168,85,58,0.08);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* 無編號的兩段式流程：句子置左、箭頭置中，標題字級仍大於內文 */
.flow-steps {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 42em;
}

.flow-step {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  text-align: justify;
}

.flow-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  margin: 0.6rem 0;
}
