/* ================================================================
 * OPENV｜講師介紹「經歷 × 3V」（2026-11-02）
 * ----------------------------------------------------------------
 * 角色與代表經歷合併成同一個區塊，依 OPENV 3V 歸類：三個面向、四種跨面向、其他經歷。
 * 兩種顯示：心智圖（about-track.js 畫，可縮放、拖曳）與階層式（網頁原本就有的清單）。
 * 3V 顏色只在這個區塊使用，一定搭配文字（Vision／Vigor／Voice），不靠顏色單獨傳達意思。
 * 跨面向的連線用品牌金色：代表「把不同面向整合在一起」。
 * ================================================================ */
:root {
  --v-vision: #3874AE; --v-vision-ink: #2C5F91; --v-vision-wash: #EAF1F8;
  --v-vigor: #3E8C6F;  --v-vigor-ink: #2D6C55;  --v-vigor-wash: #E7F2EC;
  --v-voice: #C17B3F;  --v-voice-ink: #96582A;  --v-voice-wash: #F9EEE3;
  --v-other: #8A939A;  --v-other-ink: #5F6871;  --v-other-wash: #EEF0F1;
  --tm-bg: #FBFAF6; --tm-dot: rgba(39, 51, 62, .13); --tm-ui: rgba(255, 253, 249, .94);
}
:root[data-theme="dark"] {
  --v-vision: #79A9D6; --v-vision-ink: #9CC2E6; --v-vision-wash: #1A2B3B;
  --v-vigor: #6FBF9D;  --v-vigor-ink: #93D3B7;  --v-vigor-wash: #16302A;
  --v-voice: #E0A36C;  --v-voice-ink: #EBBB8E;  --v-voice-wash: #36291C;
  --v-other: #8E9AA3;  --v-other-ink: #B7C0C7;  --v-other-wash: #222D36;
  --tm-bg: #111C25; --tm-dot: rgba(244, 241, 234, .10); --tm-ui: rgba(23, 35, 45, .94);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --v-vision: #79A9D6; --v-vision-ink: #9CC2E6; --v-vision-wash: #1A2B3B;
    --v-vigor: #6FBF9D;  --v-vigor-ink: #93D3B7;  --v-vigor-wash: #16302A;
    --v-voice: #E0A36C;  --v-voice-ink: #EBBB8E;  --v-voice-wash: #36291C;
    --v-other: #8E9AA3;  --v-other-ink: #B7C0C7;  --v-other-wash: #222D36;
    --tm-bg: #111C25; --tm-dot: rgba(244, 241, 234, .10); --tm-ui: rgba(23, 35, 45, .94);
  }
}

/* 每一種歸類的顏色：--g 線條、--g-ink 文字、--g-wash 底色、--band 卡片上緣色帶 */
.tl-group--vision, .tm-n--vision { --g: var(--v-vision); --g-ink: var(--v-vision-ink); --g-wash: var(--v-vision-wash); --band: var(--v-vision); }
.tl-group--vigor, .tm-n--vigor { --g: var(--v-vigor); --g-ink: var(--v-vigor-ink); --g-wash: var(--v-vigor-wash); --band: var(--v-vigor); }
.tl-group--voice, .tm-n--voice { --g: var(--v-voice); --g-ink: var(--v-voice-ink); --g-wash: var(--v-voice-wash); --band: var(--v-voice); }
.tl-group--vision-vigor, .tm-n--vision-vigor { --g: linear-gradient(var(--v-vision), var(--v-vigor)); --g-ink: var(--text); --g-wash: var(--surface); --band: linear-gradient(90deg, var(--v-vision) 0 50%, var(--v-vigor) 50% 100%); --hub-bg: linear-gradient(135deg, var(--v-vision-wash), var(--v-vigor-wash)); }
.tl-group--vigor-voice, .tm-n--vigor-voice { --g: linear-gradient(var(--v-vigor), var(--v-voice)); --g-ink: var(--text); --g-wash: var(--surface); --band: linear-gradient(90deg, var(--v-vigor) 0 50%, var(--v-voice) 50% 100%); --hub-bg: linear-gradient(135deg, var(--v-vigor-wash), var(--v-voice-wash)); }
.tl-group--voice-vision, .tm-n--voice-vision { --g: linear-gradient(var(--v-voice), var(--v-vision)); --g-ink: var(--text); --g-wash: var(--surface); --band: linear-gradient(90deg, var(--v-voice) 0 50%, var(--v-vision) 50% 100%); --hub-bg: linear-gradient(135deg, var(--v-voice-wash), var(--v-vision-wash)); }
.tl-group--vision-vigor-voice, .tm-n--vision-vigor-voice { --g: linear-gradient(var(--v-vision), var(--v-vigor), var(--v-voice)); --g-ink: var(--text); --g-wash: var(--surface); --band: linear-gradient(90deg, var(--v-vision) 0 33.3%, var(--v-vigor) 33.3% 66.6%, var(--v-voice) 66.6% 100%); --hub-bg: linear-gradient(135deg, var(--v-vision-wash), var(--v-vigor-wash) 50%, var(--v-voice-wash)); }
.tl-group--other, .tm-n--other { --g: var(--v-other); --g-ink: var(--v-other-ink); --g-wash: var(--v-other-wash); --band: var(--v-other); }

/* ---------- 區塊標題與切換 ---------- */
.track { margin-top: 36px; }
.track-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.track-heading { flex: 1 1 320px; min-width: 0; }
.track-title { font-size: 20px; line-height: 1.35; letter-spacing: .01em; }
@media (min-width: 1024px) { .track-title { font-size: 22px; } }
.track-intro { margin-top: 6px; max-width: 46em; font-size: 15px; line-height: 1.7; color: var(--muted); }
.track-switch { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.track-switch-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.track-switch-btn:hover { color: var(--text); }
.track-switch-btn[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-1); }
.track-ic { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.track-footnote { margin-top: 16px; }

/* ---------- 階層式：大綱＋樹狀線 ---------- */
.tl { display: grid; gap: 30px; max-width: 940px; }
.tl-tier { display: grid; gap: 28px; }
.tl-tier-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tl-tier-label { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--accent-ink); }
.tl-group { position: relative; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tl-dots { display: inline-flex; flex: 0 0 auto; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 3px var(--bg); }
.tl-dot + .tl-dot { margin-left: -5px; }
.tl-dot--vision { background: var(--v-vision); } .tl-dot--vigor { background: var(--v-vigor); } .tl-dot--voice { background: var(--v-voice); } .tl-dot--other { background: var(--v-other); }
.tl-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 18px; line-height: 1.35; }
.tl-en { font-family: var(--font-latin); font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--g-ink); }
.tl-zh { font-size: 15px; font-weight: 700; color: var(--muted); }
.tl-group--other .tl-zh { font-size: 18px; color: var(--text); }
.tl-course { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; line-height: 1.5; }
.tl-head .tl-course { flex: 1 1 100%; margin: 2px 0 0 28px; }
@media (min-width: 768px) { .tl-head .tl-course { flex: 0 1 auto; margin: 0 0 0 auto; text-align: right; justify-content: flex-end; } }
.tl-course-cap { color: var(--muted); }
.tl-course-name { font-weight: 700; color: var(--text); }
.tl-course-cta { font-weight: 700; color: var(--primary); text-decoration: underline; text-underline-offset: .2em; white-space: nowrap; }
.tl-course-cta::after { content: " →"; }
.tl-empty { margin: 8px 0 0 28px; font-size: 14px; color: var(--muted); }
/* 樹狀線：每一筆畫自己那一段直線，最後一筆只畫到橫線（線的位置跟著第一行，不跟內容高度走） */
.tl-items { margin: 6px 0 0 7px; }
.tl-items--plain { margin: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .tl-items--plain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-item { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 14px; padding: 13px 0 13px 30px; }
.tl-items:not(.tl-items--plain) .tl-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--g); opacity: .55; }
.tl-items:not(.tl-items--plain) .tl-item:last-child::before { bottom: auto; height: 28px; }
.tl-items:not(.tl-items--plain) .tl-item::after { content: ""; position: absolute; left: 0; top: 26px; width: 18px; height: 2px; border-radius: 2px; background: var(--g); opacity: .55; }
.tl-items--plain .tl-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tl-metric { font-family: var(--font-latin); font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; color: var(--g-ink, var(--text)); white-space: nowrap; }
.tl-metric .unit { margin-left: 3px; font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--muted); }
.tl-title { font-weight: 700; line-height: 1.5; }
.tl-detail { margin-top: 3px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.tl-key { color: var(--accent-ink); font-weight: 700; }
@media (max-width: 599px) {
  .tl-item { grid-template-columns: 1fr; padding-left: 26px; }
  .tl-items:not(.tl-items--plain) .tl-item::after { width: 15px; }
  .tl-items--plain .tl-item { padding: 12px 14px; }
  .tl-metric { font-size: 20px; }
}

/* ---------- 心智圖 ---------- */
.track-map {
  position: relative; height: clamp(540px, 80vh, 760px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background-color: var(--tm-bg); background-image: radial-gradient(var(--tm-dot) 1px, transparent 1.3px); background-size: 22px 22px;
  touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; outline: none; isolation: isolate;
}
.track-map:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.track-map.is-panning { cursor: grabbing; }
.track-map.is-zoomed:not(.is-vertical), .track-map.is-expanded { touch-action: none; }
.track-map.is-vertical { height: auto; }
.tm-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tm-world.is-anim { transition: transform .38s var(--ease); }
.tm-links { position: absolute; left: 0; top: 0; max-width: none; overflow: visible; pointer-events: none; }
.tm-link { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; opacity: .55; transition: opacity .2s var(--ease), stroke-width .2s var(--ease); }
.tm-link--vision { stroke: var(--v-vision); opacity: .75; }
.tm-link--vigor { stroke: var(--v-vigor); opacity: .75; }
.tm-link--voice { stroke: var(--v-voice); opacity: .75; }
.tm-link--cross { stroke: var(--accent); opacity: .85; }
.tm-link--other { stroke: var(--v-other); opacity: .7; }
.tm-link--trunk { stroke-width: 2.5; }
.tm-link--spine { stroke: var(--line-strong); opacity: .5; }
.tm-n { position: absolute; left: 0; top: 0; transition: opacity .2s var(--ease), box-shadow .2s var(--ease); }

/* 中心：Wayne */
.tm-root { width: 228px; padding: 18px 18px 16px; border-radius: 22px; background: var(--dark); color: var(--on-dark); text-align: center; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tm-root-cap { font-family: var(--font-latin); font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--on-dark-accent); }
.tm-root-name { margin-top: 6px; font-family: var(--font-head); font-size: 19px; font-weight: 700; line-height: 1.35; }
.tm-root-sub { margin-top: 4px; font-size: 13px; color: var(--on-dark-muted); }

/* 面向／跨面向 */
.tm-hub { width: 196px; padding: 13px 15px 13px; border-radius: 18px; background: var(--hub-bg, var(--g-wash)); border: 1.5px solid var(--g-line, transparent); box-shadow: var(--shadow-1); }
.tm-n--vision.tm-hub { --g-line: var(--v-vision); } .tm-n--vigor.tm-hub { --g-line: var(--v-vigor); } .tm-n--voice.tm-hub { --g-line: var(--v-voice); }
.tm-n--vision-vigor.tm-hub, .tm-n--vigor-voice.tm-hub, .tm-n--voice-vision.tm-hub, .tm-n--vision-vigor-voice.tm-hub { --g-line: var(--accent); }
.tm-n--other.tm-hub { --g-line: var(--line-strong); }
.tm-hub-top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.tm-hub-en { margin-top: 4px; font-family: var(--font-latin); font-weight: 800; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; color: var(--g-ink); }
.tm-hub--cross .tm-hub-en { font-size: 16px; line-height: 1.3; }
.tm-n--other .tm-hub-en { font-family: var(--font-head); font-size: 17px; }
.tm-hub-zh { margin-top: 2px; font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--muted); }
.tm-count { margin-left: auto; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--g-ink); font: 800 13px/26px var(--font-latin); text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.tm-hub .tl-course { display: grid; gap: 0; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; }
.tm-hub .tl-course-name { font-size: 13.5px; }
.tm-hub .tl-course-cta { justify-self: start; margin-top: 2px; font-size: 13px; }
.tm-hub-note { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* 經歷卡片：左邊數字、右邊名稱與能力說明 */
.tm-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; width: 272px; padding: 15px 15px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.tm-card::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 4px; border-radius: 0 0 4px 4px; background: var(--band); }
.tm-card .tl-metric { min-width: 40px; font-size: 21px; line-height: 1.25; }
.tm-card .tl-metric .unit { font-size: 12.5px; }
.tm-card .tl-metric--none { display: none; }
.tm-card .tl-metric--none + .tl-body { grid-column: 1 / -1; }
.tm-card .tl-title { font-size: 15px; line-height: 1.45; }
.tm-card .tl-detail { margin-top: 3px; font-size: 13.5px; line-height: 1.6; }
.tm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--surface-2); font: 700 12px/1.6 var(--font-latin); color: var(--text); }
.tm-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tm-chip--vision { --c: var(--v-vision); } .tm-chip--vigor { --c: var(--v-vigor); } .tm-chip--voice { --c: var(--v-voice); }

/* 兩側標示：單一面向／跨面向 */
.tm-caption { width: 220px; }
.tm-caption-label { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; color: var(--accent-ink); }
.tm-caption .tl-course { display: grid; gap: 0; margin-top: 4px; font-size: 13px; }
.tm-caption .tl-course-cta { justify-self: start; }
.track-map:not(.is-vertical):not(.is-tall) .tm-caption--left { text-align: right; }
.track-map:not(.is-vertical):not(.is-tall) .tm-caption--left .tl-course { justify-items: end; }
.track-map:not(.is-vertical):not(.is-tall) .tm-caption--left .tl-course-cta { justify-self: end; }

/* 滑過或點選：相關的面向與連線亮起，其他淡出 */
.track-map.has-focus .tm-n:not(.is-lit), .track-map.has-focus .tm-link:not(.is-lit) { opacity: .22; }
.track-map.has-focus .tm-link.is-lit { stroke-width: 3; }
.track-map.has-focus .tm-card.is-lit, .track-map.has-focus .tm-hub.is-lit { box-shadow: var(--shadow-2); }
.tm-card.is-picked { box-shadow: 0 0 0 2px var(--primary), var(--shadow-2); }

/* 工具列、圖例、提示（不跟著縮放） */
.tm-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tm-tools { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--tm-ui); border: 1px solid var(--line); box-shadow: var(--shadow-1); pointer-events: auto; }
.tm-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.tm-btn:hover { background: var(--surface-2); }
.tm-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-zoom { width: auto; min-width: 54px; padding: 0 6px; font: 800 13px/1 var(--font-latin); color: var(--muted); }
.tm-sep { width: 1px; height: 22px; margin: 0 2px; background: var(--line); }
.tm-legend { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 270px); pointer-events: auto; }
.tm-legend .tm-chip { padding: 4px 10px 4px 8px; background: var(--tm-ui); border: 1px solid var(--line); font-size: 12.5px; }
.tm-legend .tm-chip span { font-family: var(--font-body); font-weight: 700; color: var(--muted); }
.tm-legend .tm-chip--cross { --c: var(--accent); }
.tm-hint { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 5px 12px; border-radius: 999px; background: var(--tm-ui); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.track-map.is-vertical .tm-legend { display: none; }
@media (max-width: 767px) {
  .tm-legend { display: none; }
  .tm-tools { top: 10px; right: 10px; }
  .tm-hint { bottom: 10px; left: 10px; }
}

/* 放大檢視：整個畫面都是心智圖（Esc 或右上角按鈕結束） */
.track-map.is-expanded { position: fixed; inset: 0; z-index: 1000; height: auto !important; border: 0; border-radius: 0; }
.tm-lock, .tm-lock body { overflow: hidden; }
.track-map.is-expanded .tm-legend { display: flex; }

@media (prefers-reduced-motion: reduce) {
  .tm-world.is-anim, .tm-n, .tm-link, .track-switch-btn { transition: none; }
}
/* 列印：印出階層式清單 */
@media print {
  .track-map, .track-switch { display: none !important; }
  .track-list[hidden] { display: block !important; }
}
