/* ============================================================
   作品集共用樣式
   色調：溫和暖色調（米白底、赭土橙、奶茶棕）
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
  --bg:         #faf8f5;       /* 主背景：暖米白 */
  --bg-card:    #fff9f4;       /* 卡片背景：奶油白 */
  --bg-dark:    #2d2014;       /* 深色區塊：深咖啡 */
  --accent:     #b5723a;       /* 主色：赭土橙 */
  --accent-lt:  #e8c9a8;       /* 淡版：奶茶 */
  --accent-bg:  #f5ede3;       /* 超淡：背景用 */
  --text:       #2d2014;       /* 主文字：深咖啡 */
  --muted:      #8a7060;       /* 次要文字：暖灰棕 */
  --muted-lt:   #b8a898;       /* 更淡 */
  --rule:       #e8ddd4;       /* 分隔線 */
  --font:         "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-heading: "Montserrat", "Noto Sans TC", "PingFang TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
}

.container--wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* ── Hero（首頁） ────────────────────────────────────────── */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--rule);
}

.hero-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Section 標題 ────────────────────────────────────────── */
.section-header {
  padding: 56px 0 32px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

/* ── Project Cards ───────────────────────────────────────── */
.projects {
  padding-bottom: 80px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.project-card:nth-child(7) {
  grid-column: 1 / -1;
  max-width: calc(50% - 14px);
  justify-self: center;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 32, 20, 0.1);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--accent-bg);
  transform: translateZ(0);
}

/* ── Card Overlay ────────────────────────────────────────── */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 32, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: opacity;
}
.project-card:hover .card-overlay {
  opacity: 1;
}
.card-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.card-overlay li {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
  transform: translate3d(0, 6px, 0);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform;
}
.project-card:hover .card-overlay li {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.project-card:hover .card-overlay li:nth-child(1) { transition-delay: 0.05s; }
.project-card:hover .card-overlay li:nth-child(2) { transition-delay: 0.12s; }
.project-card:hover .card-overlay li:nth-child(3) { transition-delay: 0.19s; }
.card-overlay li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-lt);
}


.card-body {
  padding: 24px 28px 28px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.card-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}


.card-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.card-link::after {
  content: "→";
  transition: transform 0.2s;
}

.project-card:hover .card-link::after {
  transform: translateX(4px);
}

/* ── Intro（我是誰／怎麼工作） ──────────────────────────── */
.intro {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--rule);
}

.intro .section-label {
  margin-bottom: 24px;
}

.intro-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-content p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.intro-motto {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  padding-top: 4px;
}

/* ── Closing（結論） ─────────────────────────────────────── */
.closing {
  background: var(--bg-dark);
  color: #f5ede3;
  padding: 80px 0;
}

.closing p {
  font-size: 15px;
  line-height: 1.9;
  color: #c4a882;
  max-width: 600px;
  margin-bottom: 32px;
}

.closing-tagline {
  font-family: var(--font-heading);
  font-size: 22px !important;
  font-weight: 700;
  line-height: 1.6 !important;
  color: #fff !important;
  margin-bottom: 0 !important;
}

/* ── About（保留，project 頁面未用到，可清除） ───────────── */
.about {
  background: var(--bg-dark);
  color: #f5ede3;
  padding: 64px 0;
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.about p {
  font-size: 14px;
  line-height: 1.85;
  color: #c4a882;
}

.about-contact h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-lt);
  margin-bottom: 16px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list li {
  font-size: 13px;
  color: #c4a882;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-list li span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-lt);
  min-width: 40px;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--bg-dark);
  border-top: 1px solid #3d2e1e;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
}

.footer-contact li {
  font-size: 12px;
  color: #6b5040;
  letter-spacing: 0.03em;
}

.footer-copy {
  font-size: 12px;
  color: #6b5040;
  letter-spacing: 0.05em;
}

/* ── Project Page ────────────────────────────────────────── */
.project-hero {
  height: 420px;
  overflow: hidden;
  position: relative;
  background: var(--accent-bg);
}

/* ── Hero B variant（淺色疊層）────────────────────────────── */
.project-hero-overlay--light {
  background: linear-gradient(to top, rgba(245,237,227,0.92) 0%, rgba(245,237,227,0.5) 50%, transparent 80%);
}

.project-hero-text--light {
  background: none;
  backdrop-filter: none;
  border-radius: 0;
  margin: 0 48px 40px;
}

.project-hero-text--light h1 {
  color: var(--text);
}

.project-hero-text--light p {
  color: var(--muted);
}

.project-hero--image-only {
  height: 360px;
}
.project-hero--short {
  height: 240px;
}

.project-hero-below {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 32px 32px;
  border-bottom: 1px solid rgba(181, 114, 58, 0.12);
}

.project-intro {
  margin-bottom: 24px;
}

.project-hero-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin: 10px 0 10px;
}

.project-hero-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.project-summary {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 600px;
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45,32,20,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
}

.project-hero-text {
  padding: 32px 40px;
  color: #fff;
  background: rgba(30, 18, 8, 0.35);
  backdrop-filter: blur(3px);
  border-radius: 8px;
  margin: 0 40px 40px;
  max-width: 600px;
}

.project-hero-text .hero-label {
  color: var(--accent-lt);
  margin-bottom: 12px;
}

.project-hero-text h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #fff;
}

.project-hero-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
}

/* ── Project Content ─────────────────────────────────────── */
.project-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-lt);
  font-weight: 600;
}

.meta-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ── Content Sections ────────────────────────────────────── */
.content-section {
  margin-bottom: 48px;
}

.content-section + .content-section {
  border-top: 1px solid var(--rule);
  padding-top: 40px;
  margin-top: 8px;
}

.content-section h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 20px;
  margin-top: 8px;
  transition: border-left-width 0.3s ease;
}
.content-section:target h2 {
  border-left-width: 5px;
}

.content-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
}

.content-section p {
  font-size: 14px;
  line-height: 1.85;
  color: #3d2e1e;
  margin-bottom: 12px;
}

.content-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.content-section ul li {
  font-size: 14px;
  line-height: 1.85;
  color: #3d2e1e;
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}

.content-section ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 4px;
}

/* 強調數字 */
.stat-highlight {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* 成果區塊 */
.outcomes {
  background: var(--accent-bg);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 24px 0;
}

.outcomes h3 {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.outcome-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.outcome-list li {
  font-size: 14px;
  color: var(--text);
  padding-left: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.outcome-list li::before { display: none; }

.outcome-num {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  min-width: fit-content;
}

/* ── 圖片區塊 ────────────────────────────────────────────── */
.image-block {
  margin: 32px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-bg);
}

.image-block img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 480px;
}

.image-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
}

/* ── 外部連結區塊 ───────────────────────────────────────────── */
.external-link-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 18px 24px;
  margin-top: 20px;
  transition: background 0.2s;
}

.external-link-block:hover {
  background: var(--accent-bg);
}

.external-link-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.external-link-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.external-link-title {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin: 0;
}

.external-link-arrow {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 16px;
}

/* ── 成果雙欄 ────────────────────────────────────────────── */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 32px 0;
}

.result-grid .image-block {
  margin: 0;
}

.result-grid .outcomes {
  margin: 0;
  height: 100%;
}

@media (max-width: 640px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 影片區塊 ────────────────────────────────────────────── */
.video-block {
  margin: 32px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1008;
}

.video-block video {
  width: 100%;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

.video-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
}

/* ── 表格 ────────────────────────────────────────────────── */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

.content-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-lt);
}

.content-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  color: #3d2e1e;
  vertical-align: top;
  line-height: 1.6;
}

.content-table tr:last-child td { border-bottom: none; }

/* ── 專案導覽 ────────────────────────────────────────────── */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.project-nav-item {
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.project-nav-item:hover {
  border-color: var(--accent-lt);
  transform: translateY(-2px);
}

.project-nav-item .nav-dir {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-lt);
  margin-bottom: 6px;
}

.project-nav-item .nav-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.project-nav-item.next { text-align: right; }

/* ── Back to index ───────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0 0;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

.back-link::before { content: "←"; }

/* ── Hero label 底色 ─────────────────────────────────────── */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.hero-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── Meta 字體修正 ───────────────────────────────────────── */
.meta-label {
  font-size: 11px;
}

.meta-value {
  font-size: 14px;
}

/* ── 專案頁面寬容器 + TOC 側欄 ───────────────────────────── */
.project-content {
  max-width: 960px;
}

.project-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.project-main {
  flex: 1;
  min-width: 0;
}

/* ── TOC 桌面側欄 ────────────────────────────────────────── */
.toc {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  align-self: flex-start;
}

.toc-back {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  padding-left: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.toc-back:hover {
  color: var(--accent);
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-lt);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  padding-left: 12px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc ul li a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--rule);
  line-height: 1.4;
  transition: color 0.2s, border-color 0.2s;
}

.toc ul li a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── TOC 手機浮動按鈕 ────────────────────────────────────── */
.toc-mobile {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
}

.toc-mobile summary {
  list-style: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(116,66,16,0.3);
  user-select: none;
}

.toc-mobile summary::-webkit-details-marker { display: none; }

.toc-mobile-list {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 8px 0;
  width: 150px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.toc-mobile-list a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}

.toc-mobile-list a:hover {
  background: var(--accent-bg);
  color: var(--accent);
}

/* ── Lightbox ────────────────────────────────────────────── */
.thumb-link {
  display: block;
  position: relative;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-bg);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.thumb-link img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.thumb-link:hover img { opacity: 0.88; }

.thumb-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

/* ── Dialog Lightbox ─────────────────────────────────────── */
dialog.lightbox {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 75vw;
  max-height: 85vh;
  overflow: hidden;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  dialog.lightbox {
    max-width: 95vw;
    max-height: 90vh;
  }
}

dialog.lightbox::backdrop {
  background: rgba(0,0,0,0.75);
  cursor: zoom-out;
}

dialog.lightbox img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* ── Design Decision Cards ───────────────────────────────── */
.design-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 8px;
}

.design-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.design-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 32, 20, 0.07);
  border-color: var(--accent-lt);
}

.design-card-icon {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.design-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.design-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ── Demo Image Grid ─────────────────────────────────────── */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 6px;
}

.demo-grid .thumb-link {
  background: var(--accent-bg);
  cursor: zoom-in;
}

.demo-grid .thumb-link img {
  height: 160px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .demo-grid { grid-template-columns: 1fr; }
}

/* ── Validation Flow ─────────────────────────────────────── */
.validation-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 20px 0 8px;
  overflow-x: auto;
}

.validation-step {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.validation-step:hover {
  transform: translateY(-2px);
  border-color: var(--accent-lt);
}

.validation-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.validation-step h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.validation-method,
.validation-signal {
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-lt) !important;
  margin: 10px 0 4px !important;
}

.validation-step p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

.validation-arrow {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
  align-self: center;
}

@media (max-width: 768px) {
  .design-cards { grid-template-columns: 1fr; }
  .validation-flow { flex-direction: column; }
  .validation-arrow { padding-top: 0; transform: rotate(90deg); align-self: center; }
}

/* ── Demo Video ──────────────────────────────────────────── */
.demo-video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  pointer-events: none;
}

/* ── Decision Compare ────────────────────────────────────── */
.decision-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 8px;
}

.decision-option {
  border-radius: 10px;
  padding: 20px;
  border: 1.5px solid var(--rule);
}

.decision-reject {
  background: #faf8f5;
  border-left: 4px solid var(--muted-lt);
  opacity: 0.65;
}

.decision-adopt {
  background: var(--accent-bg);
  border-color: var(--rule);
  border-left: 4px solid var(--accent);
}

.decision-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  margin-bottom: 8px !important;
  color: var(--muted) !important;
}

.decision-adopt .decision-label {
  color: var(--accent) !important;
}

.decision-option h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.decision-option p:last-child {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .decision-compare { grid-template-columns: 1fr; }
}

/* ── Trello Structure ────────────────────────────────────── */
.trello-structure {
  margin: 20px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.trello-row {
  width: 100%;
}

.trello-node {
  border-radius: 10px;
  padding: 16px 20px;
  width: 100%;
}

.trello-node-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-lt) !important;
  margin-bottom: 6px !important;
}

.trello-node p:last-child {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.trello-observe {
  background: var(--accent-bg);
  border: 1px solid var(--rule);
}

.trello-room {
  background: var(--bg-card);
  border: 1px solid var(--rule);
}

.trello-connector {
  font-size: 12px;
  color: var(--muted-lt);
  text-align: center;
  padding: 8px 0;
  letter-spacing: 0.04em;
}

.trello-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.trello-type {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.trello-priority {
  background: var(--bg-card);
  border: 1px solid var(--accent-lt);
}

.trello-priority-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.trello-priority-tags span {
  font-size: 13px;
  color: var(--text);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.trello-times {
  background: none !important;
  padding: 0 !important;
  color: var(--muted-lt) !important;
  font-weight: 400 !important;
}

.trello-arrow-right {
  background: none !important;
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
}

@media (max-width: 640px) {
  .trello-types { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .toc { display: none; }
  .toc-mobile { display: block; }
  .project-layout { display: block; }
  .project-content { max-width: 100%; }
  .decision-compare { grid-template-columns: 1fr; }
  .content-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .project-hero--image-only { height: 240px; }
  .project-content { padding: 32px 20px 60px; }
  .project-meta { gap: 20px; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card:nth-child(7) { grid-column: auto; max-width: none; justify-self: auto; }
  .about .container { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-contact { flex-direction: column; gap: 4px; }
  .container--wide { padding: 0 20px; }
  .intro { padding: 48px 0 40px; }
  .closing { padding: 56px 0; }
  .closing-tagline { font-size: 18px !important; }
  .project-card.overlay-active .card-overlay { opacity: 1; }
  .project-card.overlay-active .card-overlay li { opacity: 1; transform: translate3d(0, 0, 0); }
  .project-card.overlay-active .card-overlay li:nth-child(1) { transition-delay: 0.05s; }
  .project-card.overlay-active .card-overlay li:nth-child(2) { transition-delay: 0.12s; }
  .project-card.overlay-active .card-overlay li:nth-child(3) { transition-delay: 0.19s; }
  .project-nav { grid-template-columns: 1fr; }
  .project-hero-title { font-size: 22px; }
  .project-hero-desc { font-size: 14px; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 30px; }
}

/* ── Hero Stats（首頁數字統計）──────────────────────────── */
.hero-stats {
  display: flex;
  gap: 40px;
  margin: 32px 0 28px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── Insight Pull（洞察框）──────────────────────────────── */
.insight-pull {
  margin: 28px 0;
  padding: 22px 28px;
  background: #fff;
  border: 1.5px solid var(--accent-lt);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  transition: background 0.2s ease, border-left-color 0.2s ease;
}
.insight-pull:hover {
  background: #fffaf5;
  border-left-color: var(--accent);
}

.insight-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.insight-pull p {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  line-height: 1.7 !important;
  margin: 0 !important;
}
.insight-pull ol,
.insight-pull ul {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
  margin-top: 6px;
}
.insight-pull li { margin: 0; }

/* ── User Quote（使用者引言）────────────────────────────── */
.user-quote {
  position: relative;
  margin: 28px 0;
  padding: 24px 28px 20px 48px;
  background: var(--accent-bg);
  border-radius: 10px;
}

.user-quote::before {
  content: "\201C";
  position: absolute;
  top: 10px;
  left: 16px;
  font-size: 52px;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.user-quote blockquote {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 10px;
  font-style: normal;
}

.user-quote cite {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.04em;
}

/* ── TOC Active State ────────────────────────────────────── */
.toc ul li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* ── Scroll Fade-in ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Hero Stagger Animation ──────────────────────────────── */
.hero-animate {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-enter 0.6s ease forwards;
}
@keyframes hero-enter {
  to { opacity: 1; transform: none; }
}
.hero-animate:nth-child(1) { animation-delay: 0.05s; }
.hero-animate:nth-child(2) { animation-delay: 0.18s; }
.hero-animate:nth-child(3) { animation-delay: 0.30s; }
.hero-animate:nth-child(4) { animation-delay: 0.42s; }
.hero-animate:nth-child(5) { animation-delay: 0.52s; }

/* ── Hero Scroll Hint ────────────────────────────────────── */
.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-lt);
  letter-spacing: 0.08em;
  margin-top: 28px;
  opacity: 0.6;
}
.hero-scroll-hint::before {
  content: "";
  display: block;
  width: 1px;
  height: 24px;
  background: var(--accent-lt);
}

/* ── Before / After 統計對比 ─────────────────────────────── */
.stat-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
}

.stat-compare-side {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
}

.stat-compare-side.after {
  background: var(--accent-bg);
  border-color: var(--accent-lt);
}

.stat-compare-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-lt);
  margin-bottom: 14px;
}

.stat-compare-side.after .stat-compare-label {
  color: var(--accent);
}

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.stat-row:last-child { margin-bottom: 0; }

.stat-frac {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
  flex-shrink: 0;
}

.stat-compare-side.after .stat-frac {
  color: var(--accent);
}

.stat-row > span:last-child {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.stat-compare-arrow {
  font-size: 20px;
  color: var(--accent-lt);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  .stat-compare {
    grid-template-columns: 1fr;
  }
  .stat-compare-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}

/* ── Trello 看板示意圖 ───────────────────────────────────── */
.trello-board-demo {
  margin: 20px 0 8px;
}

.trello-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.trello-col-header {
  background: var(--accent-bg);
  border: 1px solid var(--accent-lt);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.trello-card-example {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(45,32,20,0.05);
}

.trello-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.trello-type-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-bg);
  color: var(--accent);
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-dot.red    { background: #d94f4f; }
.priority-dot.yellow { background: #c9940a; }
.priority-dot.blue   { background: #4a7fb5; }
.priority-dot.green  { background: #4e9e6e; }

.scope-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.scope-badge.global {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-lt);
}

.scope-badge.local {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--rule);
}

.trello-card-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.trello-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--rule);
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Service Blueprint ───────────────────────────────────── */
.service-blueprint-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.service-blueprint {
  min-width: 600px;
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.service-blueprint thead th {
  padding: 10px 12px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--rule);
  border-bottom: 2px solid var(--accent-lt);
  text-align: center;
  vertical-align: bottom;
  line-height: 1.4;
}

.service-blueprint thead th:first-child {
  width: 68px;
  background: transparent;
  border-bottom-color: transparent;
}

.service-blueprint thead th.bp-phase-perf {
  background: #f0e4d0;
}

.bp-time-note {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0;
}

.service-blueprint td {
  padding: 12px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  line-height: 1.55;
  vertical-align: top;
  color: var(--muted);
  font-size: 12px;
}

.service-blueprint td.bp-role {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.75);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.service-blueprint tr.bp-player td { background: #fff; color: var(--text); }
.service-blueprint tr.bp-front td  { background: var(--bg-card); }
.service-blueprint tr.bp-back td   { background: var(--bg); }

.service-blueprint td.bp-perf {
  background: #fef5eb;
  color: var(--text);
  font-weight: 500;
}

.bp-sub-note {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 600;
}

.service-blueprint tr.bp-divider td {
  background: var(--rule);
  padding: 3px 12px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: none;
}

/* ── Validation Flow 手機版修正 ──────────────────────────── */
@media (max-width: 768px) {
  .validation-flow {
    flex-direction: column;
    gap: 0;
  }
  .validation-step {
    border-radius: 8px;
    flex: none;
    width: 100%;
  }
  .validation-arrow {
    padding: 2px 0;
    font-size: 14px;
    align-self: center;
    transform: rotate(90deg);
  }
}

/* ── Panel list (numbered rows) ── */
.panel-list {
  margin: 20px 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.panel-item {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.panel-item:last-child { border-bottom: none; }
.panel-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  min-width: 130px;
}
.panel-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Demo explain (left text + right image) ── */
.demo-explain {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  align-items: start;
  margin: 24px 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.demo-explain:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.demo-explain-text h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.demo-explain-text p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}
.demo-explain-img img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--rule);
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
@media (max-width: 768px) {
  .demo-explain {
    grid-template-columns: 1fr;
  }
}

/* ── Proposal core bar ── */
.proposal-core-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 10px;
  margin: 16px 0 16px;
  letter-spacing: 0.03em;
}

/* ── Hub diagram ── */
.hub-diagram {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  grid-template-rows: auto 120px auto;
  gap: 12px;
  align-items: stretch;
  margin: 28px 0;
}
.hub-center-node {
  grid-column: 2;
  grid-row: 2;
  width: 120px;
  height: 120px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.6;
  justify-self: center;
  align-self: center;
}
.hub-node {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}
.hub-node strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.hub-node p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.hub-node ul {
  margin: 4px 0 0 0;
  padding-left: 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.hub-node li { line-height: 1.7; }
/* top & bottom span full width */
.hub-top    { grid-column: 1 / -1; grid-row: 1; }
.hub-left   { grid-column: 1;      grid-row: 2; }
.hub-right  { grid-column: 3;      grid-row: 2; }
.hub-bottom { grid-column: 1 / -1; grid-row: 3; }

@media (max-width: 600px) {
  .hub-diagram {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .hub-center-node {
    align-self: center;
    width: 108px;
    height: 108px;
  }
  .hub-node { width: 100%; }
}

/* ── P-Table（Dashboard 分析架構表格）── */
.p-table {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}
.p-table-header {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
}
.p-table-row {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  gap: 16px;
  align-items: center;
  transition: background 0.15s;
}
.p-table-row:hover { background: var(--accent-bg); }
.p-tab-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.p-func,
.p-question {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .p-table-header { display: none; }
  .p-table-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }
  .p-func::before { content: '功能：'; font-weight: 600; color: var(--text); }
  .p-question::before { content: '問題：'; font-weight: 600; color: var(--text); }
}

/* ── Demo Feature (large screenshot with depth) ── */
.demo-feature {
  margin: 36px 0;
}
.demo-feature-img {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(45, 32, 20, 0.18), 0 4px 14px rgba(45, 32, 20, 0.08);
}
.demo-feature-img img {
  width: 100%;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.demo-feature-img .thumb-link {
  border-radius: 0;
}
.demo-feature-img .thumb-link img,
.outcomes .thumb-link img {
  height: auto;
  max-height: 420px;
  object-fit: contain;
}
.demo-feature-caption {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 0 4px;
}
.demo-feature-tag {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.demo-feature-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}
.demo-feature-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

/* ── IA Tree ── */
.ia-tree {
  margin: 24px 0;
  border-left: 2px solid var(--rule);
  padding-left: 0;
}
.ia-node {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0 7px 16px;
  position: relative;
}
.ia-node::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--rule);
}
.ia-node--l0 { padding-left: 16px; }
.ia-node--l1 { padding-left: 32px; }
.ia-node--l1x { padding-left: 56px; }
.ia-node--l2 { padding-left: 80px; }
.ia-level {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ia-level--l0 { background: var(--accent); color: #fff; }
.ia-level--l1 { background: var(--accent-lt); color: var(--text); }
.ia-level--l1x { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-lt); }
.ia-level--l2 { background: transparent; color: var(--muted); border: 1px solid var(--rule); }
.ia-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ia-desc {
  font-size: 13px;
  color: var(--muted);
  margin-left: 4px;
}

/* ia-node with question column (P1–P6 rows) */
.ia-node--page {
  display: grid;
  grid-template-columns: auto 1fr auto minmax(170px, auto);
  gap: 0 10px;
  align-items: center;
}
.ia-page-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ia-page-arrow {
  color: var(--accent-lt);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.ia-page-question {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  text-align: right;
}
@media (max-width: 640px) {
  .ia-node--page {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .ia-page-arrow { display: none; }
  .ia-page-question {
    grid-column: 2;
    text-align: left;
    color: var(--muted);
    font-size: 12px;
  }
}

/* ── Task Flow（垂直步驟列表）── */
.task-flow {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 16px 0 24px;
}
.task-step {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.task-step:last-child { border-bottom: none; }
.task-step-num {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-step-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.task-step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .task-step {
    grid-template-columns: 28px 1fr;
  }
  .task-step-desc {
    grid-column: 2;
    padding-top: 2px;
  }
}

/* validation-step bullet lists */
.validation-step ul {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.validation-step ul li { margin: 0; }

/* ── Outcome Pairs（成果前後對照） ─────────────────── */
.outcome-pairs {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.outcome-pair-header {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 0 12px;
  padding: 10px 20px;
  background: var(--accent-bg);
  border-bottom: 1px solid var(--rule);
}
.outcome-col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.outcome-col-label.after { color: var(--accent); }
.outcome-pair {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 0 12px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.outcome-pair:last-child { border-bottom: none; }
.outcome-before {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.outcome-arrow {
  font-size: 14px;
  color: var(--accent-lt);
  text-align: center;
}
.outcome-after {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.outcome-after strong {
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 640px) {
  .outcome-pair-header { display: none; }
  .outcome-pair {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
  .outcome-before {
    font-size: 12px;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--rule);
  }
  .outcome-arrow { display: none; }
  .outcome-after { font-size: 13px; }
}
}
