

:root {
  /* ── 色彩 ── */
  --paper: #f3f1ea;        /* 紙白：背景 */
  --ink: #1c2119;          /* 墨黑：帶一點綠，文字與主要細線 */
  --muted: #575c52;        /* 灰：次要文字，對紙白約 5.6:1 */
  --rule: #1c2119;         /* 主要細線 */
  --rule-soft: #cfcdc2;    /* 次要細線（裝飾用，不承載資訊） */
  --brand: #3a4530;        /* 深軍綠：首頁、About、全站品牌 */
  --brand-tint: #dfe2d3;   /* 深軍綠淺色：首頁大頁碼 */

  /* 案例色：明度 .86、彩度 .09 鎖定，只換色相 */
  --c-pp: oklch(.86 .09 95);    /* PaperPlane */
  --c-tp: oklch(.86 .09 165);   /* 台電 電力即點 */
  --c-fit: oklch(.86 .09 30);   /* 健身紀錄 */
  --case: var(--brand);         /* 當頁案例色；案例頁在 body 或區塊上覆寫 */

  /* ── 字級：中文為主，最小 14px ── */
  --fs-meta: .875rem;      /* 14px 標籤、說明 */
  --fs-small: 1rem;        /* 16px 次要內容、按鈕 */
  --fs-body: 1.0625rem;    /* 17px 內文（含案例頁內文） */
  --fs-tag: 1.125rem;      /* 18px 首屏 hashtag */
  --fs-lead: 1.25rem;      /* 20px 引言、案例副標 */
  --fs-h3: 1.625rem;       /* 26px */
  --fs-h2: clamp(2rem, 4vw, 3rem);
  --fs-h1: clamp(3.4rem, 8vw, 6.5rem);
  --fs-hero: clamp(6rem, 17vw, 14rem);

  /* ── 字體 ── */
  --display: "Barlow Condensed", "Noto Sans TC", sans-serif;   /* 只用在英文名字、數字、英文標籤 */
  --text: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;

  /* ── 版面 ── */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1320px;
  --sec-space: clamp(4.5rem, 9vw, 8rem);

  /* ── 動態 ── */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--text); font-size: var(--fs-body); line-height: 1.8; color: var(--ink); background: var(--paper); font-weight: 400; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* 菱形標記：取自 favicon 的 45° 菱形 */
.dia { display: inline-block; width: .55em; height: .55em; border: 1.5px solid currentColor; transform: rotate(45deg); flex: none; }
.dia.fill { background: currentColor; }
.label { display: inline-flex; align-items: center; gap: .7em; font-family: var(--display); font-weight: 600; font-size: var(--fs-meta); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ── 上方列 ── */
.bar { border-bottom: 1px solid var(--rule); background: var(--paper); }
.bar .wrap { display: flex; align-items: center; gap: 2rem; height: 4.25rem; }
.logo { width: 1.5rem; height: 2.2rem; background: var(--brand); -webkit-mask: url(../assets/images/favicon.svg) center / contain no-repeat; mask: url(../assets/images/favicon.svg) center / contain no-repeat; }
.nav { margin-left: auto; display: flex; gap: 2rem; font-weight: 500; font-size: var(--fs-small); }
.nav a, .lang { white-space: nowrap; }
.nav a { padding-block: .3rem; border-bottom: 2px solid transparent; transition: border-color .2s; }
.nav a:hover, .nav a.on { border-color: var(--case); }
.lang { font-family: var(--display); font-weight: 400; font-size: var(--fs-small); letter-spacing: .06em; color: var(--muted); }
.lang b { color: var(--ink); font-weight: 500; font-family: var(--text); }

/* ── 按鈕 ── */
.btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: 0 1.4rem; border: 1.5px solid var(--ink); font-weight: 700; font-size: var(--fs-small); transition: background .2s, color .2s; }
.btn-main { background: var(--brand); border-color: var(--brand); color: var(--paper); }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ── 色塊：透明度漸層（左 35% 實色 → 右側透明），疊在去色照片上相乘；右下角切 45° ── */
.tint-block { position: absolute; background: linear-gradient(90deg, var(--case) 0%, var(--case) 35%, color-mix(in oklch, var(--case) 0%, transparent) 100%); mix-blend-mode: multiply; transform-origin: left center; transition: transform .9s var(--ease); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut, 2.2rem)), calc(100% - var(--cut, 2.2rem)) 100%, 0 100%); }

/* 情境照片去色；App 截圖維持原色 */
.photo-mono { filter: grayscale(1) contrast(1.05); }
.shot-shadow { filter: drop-shadow(0 18px 30px rgba(28, 33, 25, .28)); }

/* 重點字：案例色螢光筆 */
.hl { background: linear-gradient(transparent 55%, var(--case) 55%); }

/* ── 捲動進場：色塊滑入、細線描出、文字淡入（加 .reveal，進入畫面時加 .in） ── */
.reveal .tint-block { transform: scaleX(0); }
.reveal.in .tint-block { transform: scaleX(1); }
.rule-line { height: 1px; background: var(--rule); transform-origin: left; transition: transform 1s var(--ease) .15s; }
.reveal .rule-line { transform: scaleX(0); }
.reveal.in .rule-line { transform: scaleX(1); }
.fade-up { transition: opacity .8s .3s, transform .8s .3s; }
.reveal .fade-up { opacity: 0; transform: translateY(12px); }
.reveal.in .fade-up { opacity: 1; transform: none; }

@media (max-width: 900px) {
  body { font-size: 1rem; }
  .bar .wrap { gap: 1rem; height: 3.75rem; }
  .nav { gap: 1.1rem; font-size: .9375rem; }
}
@media (max-width: 420px) {
  .bar .wrap { gap: .8rem; }
  .nav { gap: .8rem; }
  .lang { font-size: .875rem; }
}
/* 320～359px：導覽再收一點，避免換行 */
@media (max-width: 359px) {
  .bar .wrap { gap: .6rem; }
  .nav { gap: .6rem; font-size: .875rem; }
  .logo { width: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal .tint-block, .reveal .rule-line, .reveal .fade-up { transform: none; opacity: 1; transition: none; }
}



/* ══ 頁首 ══ */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.bar-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 4.25rem; display: flex; align-items: center; gap: 2rem; }
.bar .logo { display: block; width: 1.5rem; height: 2.2rem; flex: none; background: var(--brand); -webkit-mask: url(../assets/images/favicon.svg) center / contain no-repeat; mask: url(../assets/images/favicon.svg) center / contain no-repeat; }
.bar .logo img { width: 100%; height: 100%; visibility: hidden; }
.bar-nav { margin-left: auto; display: flex; gap: 2rem; font-weight: 500; font-size: var(--fs-small); }
.bar-nav a { white-space: nowrap; padding-block: .3rem; border-bottom: 2px solid transparent; transition: border-color .2s; }
.bar-nav a:hover, .bar-nav a.active { border-color: var(--case); }
.bar .lang { display: flex; align-items: center; font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.bar .lang span { cursor: pointer; user-select: none; padding: .2rem .15rem; }
.bar .lang span + span::before { content: "/"; margin: 0 .45rem 0 .3rem; color: var(--rule-soft); }
.bar .lang span:hover { color: var(--ink); }
.bar .lang span.on { color: var(--ink); font-weight: 500; }
.bar .lang [data-lang="en"] { font-family: var(--display); letter-spacing: .06em; }

/* ══ 頁尾：深軍綠底 ══ */
.foot { background: var(--brand); color: var(--paper); }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) var(--gutter) 2.6rem; }
.foot-label { display: flex; align-items: center; gap: .7em; font-family: var(--display); font-weight: 600; font-size: var(--fs-meta); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-tint); }
.foot-label::before { content: ""; width: .55em; height: .55em; border: 1.5px solid currentColor; transform: rotate(45deg); }
.foot-mail { display: inline-block; margin: .8rem 0 3rem; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 6.4vw, 5.4rem); line-height: 1.1; letter-spacing: .01em; border-bottom: 2px solid transparent; transition: border-color .2s; white-space: nowrap; }
.foot-mail:hover { border-color: var(--paper); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1rem 2rem; border-top: 1px solid color-mix(in oklch, var(--paper) 35%, transparent); padding-top: 1.4rem; font-weight: 500; }
.foot-nav a:hover { color: var(--brand-tint); }

/* ══ 回到頂部 ══ */
#go-top { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 30; width: 3rem; height: 3rem; background: var(--paper); border: 1px solid var(--ink); display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(1rem); transition: opacity .2s, transform .2s, background .2s; }
#go-top.show { opacity: 1; pointer-events: auto; transform: none; }
#go-top img { display: none; }
#go-top::before { content: ""; width: 1.3rem; height: 1.3rem; background: var(--ink); -webkit-mask: url(../assets/images/icon-gototop.svg) center / contain no-repeat; mask: url(../assets/images/icon-gototop.svg) center / contain no-repeat; }
#go-top:hover { background: var(--ink); }
#go-top:hover::before { background: var(--paper); }

/* ══ 彈窗（作品細節／閒置提示）══ */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(28, 33, 25, .72); display: none; align-items: center; justify-content: center; padding: 1.5rem; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { position: relative; width: min(100%, 44rem); max-height: calc(100vh - 3rem); overflow-y: auto; background: var(--paper); }
.modal-close { position: absolute; top: .9rem; right: .9rem; z-index: 2; width: 2.75rem; height: 2.75rem; background: var(--ink); border: 0; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.modal-close img { width: 1.2rem; }
.modal-close:hover { background: var(--brand); }
.lb-cover { position: relative; aspect-ratio: 646 / 464; background: var(--ink); }
.lb-cover img { width: 100%; height: 100%; object-fit: contain; }
.lb-tags { position: absolute; left: 1.4rem; bottom: -1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.lb-tags span { background: var(--paper); border: 1px solid var(--ink); padding: .05rem .7rem; font-weight: 500; font-size: var(--fs-meta); }
.lb-body { padding: 2.4rem 2rem 2.2rem; }
.lb-body h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.25; }
.lb-sub { font-weight: 500; font-size: var(--fs-lead); color: var(--muted); margin-top: .4rem; }
.lb-meta { display: grid; grid-template-columns: 1fr 2fr; gap: 1.2rem; margin-top: 1.6rem; }
.lb-sec { margin-top: 1.4rem; }
.lb-label { display: block; font-weight: 700; font-size: var(--fs-meta); letter-spacing: .1em; color: var(--muted); margin-bottom: .3rem; }
.lb-val { line-height: 1.8; }
.lb-sec.key .lb-val { background: var(--brand-tint); border-left: 3px solid var(--brand); padding: .6rem 1rem; font-weight: 700; }
.lb-link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; word-break: break-all; font-weight: 500; }
.lb-link:hover { color: var(--brand); }

.idle-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); width: min(100%, 44rem); background: var(--paper); }
.idle-box img { width: 100%; height: 100%; object-fit: cover; }
.idle-content { padding: 2rem 1.6rem; display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; }
.idle-title { font-weight: 900; font-size: 1.4rem; line-height: 1.5; white-space: pre-line; transition: opacity .3s; }
.idle-btns { display: flex; flex-wrap: wrap; gap: 1rem; }
.idle-btns .btn { cursor: pointer; font: inherit; font-weight: 700; background: none; }

/* ══ 色彩 class：首頁案例卡、作品卡、經歷卡上的 c-yellow 等，在新風格只決定案例色（同明度、同彩度）；
   案例內頁一頁只用一個案例色，所以頁內元素上的 c-* 不生效 ══ */
:is(.case, .work, .exp).c-yellow { --case: oklch(.86 .09 95); }
:is(.case, .work, .exp).c-mint { --case: oklch(.86 .09 165); }
:is(.case, .work, .exp).c-orange { --case: oklch(.86 .09 30); }
:is(.case, .work, .exp).c-blue { --case: oklch(.86 .09 250); }
:is(.case, .work, .exp).c-pink { --case: oklch(.86 .09 340); }

/* ══ 共用排版 ══ */
.sec { padding-bottom: var(--sec-space); }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1rem 1.4rem; margin-bottom: 2.6rem; }
.sec-title { font-size: var(--fs-h2); font-weight: 900; line-height: 1.3; }
.sec-head .sec-title { font-size: var(--fs-h2); }
.muted { color: var(--muted); }
.accent { background: linear-gradient(transparent 58%, var(--case) 58%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* 小標籤（原「貼紙」）：灰字＋空心菱形 */
.note, .dr-label, .tagline { display: inline-flex; align-items: center; gap: .65em; font-weight: 700; font-size: var(--fs-small); letter-spacing: .1em; color: var(--muted); }
.note::before, .dr-label::before, .tagline::before { content: ""; flex: none; width: .5em; height: .5em; border: 1.5px solid currentColor; transform: rotate(45deg); }

/* 舊標記的 btn-ink 就是主按鈕 */
.btn-ink { background: var(--brand); border-color: var(--brand); color: var(--paper); }
.btn-ink:hover { background: var(--ink); border-color: var(--ink); }

/* 按鈕在 button 元素上也要一致 */
button.btn { font: inherit; font-weight: 700; font-size: var(--fs-small); background: none; color: inherit; cursor: pointer; }

/* ══ 案例頁首屏：直排標題＋去色照片＋色塊＋截圖 ══ */
.cs-hero-inner { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) var(--gutter) 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }
.cs-hero-inner > div:first-child { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto; grid-template-areas: "title sub" "title tags"; justify-content: start; align-self: start; column-gap: 1.4rem; }
.cs-title { grid-area: title; writing-mode: vertical-rl; font-size: var(--fs-h1); font-weight: 900; line-height: 1; letter-spacing: .06em; }
.cs-title small { writing-mode: horizontal-tb; display: inline-block; font-family: var(--display); font-weight: 600; font-size: .62em; line-height: 1; letter-spacing: .02em; margin-top: .3em; }
.cs-sub { grid-area: sub; align-self: start; justify-self: start; writing-mode: vertical-rl; font-size: var(--fs-lead); font-weight: 700; letter-spacing: .1em; padding-top: .4rem; }
/* hashtag 橫排，貼齊標題底部（「App」那一行） */
.cs-tags { grid-area: tags; align-self: end; display: flex; flex-direction: column; gap: .15rem; font-size: var(--fs-tag); line-height: 1.5; color: var(--muted); padding-bottom: .3rem; }

.cs-media { position: relative; min-height: 34rem; }
.cs-media > img.bg { position: absolute; inset: 0 0 14% 18%; width: 82%; height: 86%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.cs-media::before { content: ""; position: absolute; z-index: 1; left: 0; bottom: 0; width: 58%; height: 58%; background: linear-gradient(90deg, var(--case) 0%, var(--case) 35%, color-mix(in oklch, var(--case) 0%, transparent) 100%); mix-blend-mode: multiply; transform-origin: left center; transition: transform .9s var(--ease); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.2rem), calc(100% - 2.2rem) 100%, 0 100%); }
.cs-media .ph { position: absolute; z-index: 2; bottom: 3%; height: 86%; width: auto; filter: drop-shadow(0 20px 34px rgba(28, 33, 25, .3)); }
.cs-media .ph-side { left: 16%; height: 72%; }
.cs-media .ph-main { left: 40%; }

/* 角色／團隊／發布 */
.info { max-width: var(--max); margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.info > div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.info h2 { display: flex; align-items: center; gap: .7em; font-family: var(--display); font-weight: 600; font-size: var(--fs-meta); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.info h2::before { content: ""; width: .55em; height: .55em; border: 1.5px solid currentColor; transform: rotate(45deg); }
.info .role-main { font-size: var(--fs-h3); font-weight: 900; line-height: 1.3; margin-bottom: .6rem; }
.info p, .info li { font-size: var(--fs-body); line-height: 1.75; }
.info-gap { height: var(--sec-space); }

/* 速覽：四欄，CSS 自動編號 */
.tldr { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); counter-reset: tldr; }
.tldr > div { counter-increment: tldr; padding: 1.6rem 1.6rem 2rem 0; }
.tldr > div + div { padding-left: 1.6rem; border-left: 1px solid var(--rule-soft); }
.tldr > div::before { content: counter(tldr, decimal-leading-zero); display: block; font-family: var(--display); font-weight: 300; font-size: 3.4rem; line-height: .9; color: color-mix(in oklch, var(--case) 70%, var(--ink)); }
.tldr h3 { font-size: 1.25rem; font-weight: 900; margin: .7rem 0 .6rem; }
.tldr p { font-size: var(--fs-body); line-height: 1.85; }

/* 段落跳轉 */
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.6rem; }
.jump > span { font-weight: 700; color: var(--muted); margin-right: .4rem; }

/* 引言／兩欄文字 */
.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }
.intro p { font-size: var(--fs-body); line-height: 1.85; }
.intro p + p { margin-top: 1.1rem; }

/* 三張重點卡 */
.v1 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.v1-card { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.v1-card h3 { padding: 1rem 0 .9rem; font-weight: 900; font-size: 1.25rem; }
.v1-card .shot { height: 15rem; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 55%, var(--paper)) 0%, var(--paper) 100%); }
.v1-card .shot img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.v1-card p { padding-top: 1rem; }

/* 階段成果：深軍綠底 */
.v1-result { position: relative; margin-top: 5rem; background: var(--brand); color: var(--paper); padding: 2.6rem 2.8rem 3.4rem; }
.v1-result .head { display: inline-flex; align-items: center; gap: .65em; font-weight: 700; letter-spacing: .1em; color: var(--brand-tint); margin-bottom: 1.2rem; }
.v1-result .head::before { content: ""; width: .5em; height: .5em; border: 1.5px solid currentColor; transform: rotate(45deg); }
.v1-result .line { font-weight: 900; font-size: clamp(1.5rem, 3.2vw, 2.6rem); line-height: 1.45; }
.v1-result .accent { background: none; color: var(--case); }
.v1-but { position: absolute; right: 2.6rem; bottom: 1.6rem; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; color: var(--case); }

/* 問題清單＋焦點 */
.prob { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: start; }
.prob-list { display: grid; gap: 2rem; }
.prob-item { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.prob-item h3 { font-weight: 900; font-size: 1.35rem; line-height: 1.4; margin-bottom: .6rem; }
.focus { background: linear-gradient(180deg, color-mix(in oklch, var(--case) 55%, var(--paper)) 0%, var(--paper) 100%); padding: 1.6rem 1.8rem 2rem; }
.focus h3 { font-weight: 700; font-size: var(--fs-small); letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; }
.focus ul { display: grid; gap: .7rem; }
.focus li { border-left: 3px solid var(--ink); padding-left: .9rem; font-weight: 700; font-size: 1.125rem; }
.focus img { width: 4.5rem; margin-top: 1.6rem; }

.focus-tags { display: flex; flex-wrap: wrap; gap: .8rem 1rem; margin-top: 1.6rem; }
.focus-tags span { border-left: 3px solid var(--case); background: color-mix(in oklch, var(--case) 30%, var(--paper)); padding: .45rem 1rem; font-weight: 700; font-size: 1.0625rem; }

/* 設計段落：圖＋文 */
.dr { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: center; margin-bottom: 7rem; }
.dr.rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.dr.rev .dr-media { order: 2; }
.dr-media { position: relative; height: 34rem; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 70%, var(--paper)) 0%, color-mix(in oklch, var(--case) 0%, var(--paper)) 100%); }
.dr-media img { height: 90%; width: auto; margin-bottom: -6%; filter: drop-shadow(0 18px 30px rgba(28, 33, 25, .28)); }
.dr-media.two img { height: 84%; margin-bottom: -5%; }
.dr-media.two img:first-child { transform: translateX(6%); }
.dr-media.two img:last-child { transform: translateX(-6%) translateY(4%); }
.dr-icon { height: 3.6rem; width: auto; margin-bottom: 1.2rem; }
.dr h3 { font-weight: 900; font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.35; margin: .8rem 0 1.2rem; }
.dr p { font-size: var(--fs-body); line-height: 1.85; }
.dr p + p { margin-top: 1rem; }

/* 兩欄說明 */
.d2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; margin-bottom: 3.5rem; }
.d2 > div { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.d2 h3 { font-weight: 900; font-size: 1.375rem; margin-bottom: .6rem; }
.d2 p { font-size: var(--fs-body); line-height: 1.85; }

/* 四格限制／問題 */
.problem4 { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.p4 { padding: 1.4rem 1.4rem 1.6rem 0; }
.p4 + .p4 { padding-left: 1.4rem; border-left: 1px solid var(--rule-soft); }
.p4 p { font-weight: 900; font-size: 1.25rem; line-height: 1.45; }

/* 成效：大數字 */
.result { padding: var(--sec-space) 0; margin-bottom: var(--sec-space); background: linear-gradient(180deg, color-mix(in oklch, var(--case) 45%, var(--paper)) 0%, var(--paper) 100%); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.nums > div { padding: 1.6rem 1.6rem 1.8rem 0; display: flex; flex-direction: column; }
.nums > div + div { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
.nums dd { order: 1; font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 5.4vw, 5rem); line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums dd small { font-family: var(--text); font-weight: 700; font-size: .32em; margin: 0 .2em; color: var(--ink); }
.nums dd span + span { font-family: var(--text); font-weight: 700; font-size: .36em; margin-left: .15em; color: var(--ink); }
.nums dt { order: 2; margin-top: .8rem; font-size: var(--fs-small); line-height: 1.65; color: var(--muted); }

/* 還要再更好 */
.more { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem 4rem; align-items: start; }
.more .sec-title { font-size: clamp(1.8rem, 3.4vw, 2.75rem); margin: 1rem 0 1.6rem; }
.more p { font-size: var(--fs-body); line-height: 1.85; }
.more .issues { margin-bottom: 1.4rem; }
.feat { margin: 1rem 0 0; display: grid; border-top: 1px solid var(--rule-soft); }
.feat li { border-bottom: 1px solid var(--rule-soft); padding: .9rem 0; font-size: var(--fs-body); line-height: 1.75; }
.feat b { font-weight: 700; }
.more .fail-h { margin-top: 1.4rem; }
.more .feat.fail { margin: .6rem 0 1.8rem; }
.more .feat.fail li { border-left: 3px solid var(--case); padding-left: 1rem; }
.more .muted { font-size: var(--fs-small); }
.more .more-note { justify-self: start; }
@media (min-width: 901px) {
  .more { row-gap: 0; grid-template-rows: auto auto 1fr; }
  .more .more-note { grid-column: 1; grid-row: 1; }
  .more .more-body { grid-column: 1; grid-row: 2; }
  .more .char-panel { grid-column: 2; grid-row: 1 / span 3; }
  .more .more-muted { grid-column: 1; grid-row: 3; align-self: start; margin-top: 1.6rem; }
}
.char-panel { display: flex; justify-content: center; align-items: flex-end; padding: 2rem 1rem 0; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 70%, var(--paper)) 0%, var(--paper) 100%); }
.char-panel img { width: 70%; max-width: 12rem; }

/* 學習與反思 */
.reflect { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; align-items: center; }
.reflect .panel { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 70%, var(--paper)) 0%, var(--paper) 100%); }
.reflect .panel img { width: 74%; }
.reflect .head { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1.8rem; }
.reflect .sec-title { font-size: clamp(1.6rem, 2.5vw, 2.4rem); line-height: 1.45; text-wrap: balance; }
.reflect p { font-size: var(--fs-body); line-height: 1.9; }
.reflect p + p { margin-top: 1rem; }

.disclaimer { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 4rem; font-size: var(--fs-meta); color: var(--muted); text-align: center; }

/* ══ 案例頁共用：背景段落、研究、限制、決策、比較圖（台電、PaperPlane 等共用）══ */
.intro a.lnk { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; font-weight: 500; word-break: break-all; }
.intro a.lnk:hover { color: var(--brand); }
/* 背景與目標：桌機左圖右文（圖是 .bg-intro 的最後一個子元素） */
.bg-intro .bg-label { justify-self: start; }
.bg-intro .bg-text .sec-title { font-size: clamp(1.8rem, 3.2vw, 2.75rem); margin: 0 0 1.6rem; }
@media (min-width: 901px) {
  .bg-intro { row-gap: 1.2rem; }
  .bg-intro .bg-label { grid-column: 2; grid-row: 1; }
  .bg-intro .bg-text { grid-column: 2; grid-row: 2; }
  .bg-intro > :last-child { grid-column: 1; grid-row: 2; align-self: start; margin-top: .4rem; }
}
@media (max-width: 900px) { .bg-intro { row-gap: 1.2rem; } }

section.research, section.decisions, section.outcomes, section.pivot-sec { max-width: calc(52rem + 2 * var(--gutter)); }
.sec-head + .src-line { margin: -1.6rem 0 0; font-size: var(--fs-small); color: var(--muted); }
.subhead { font-weight: 900; font-size: 1.375rem; line-height: 1.45; margin: 3.4rem 0 1.4rem; }
.finding { margin-top: 1.4rem; font-size: var(--fs-body); line-height: 1.85; }
.cap { margin-top: .9rem; font-size: var(--fs-small); line-height: 1.65; color: var(--muted); }
.cap.fine, .cap .fine { font-size: var(--fs-meta); }
.cap .fine { display: block; margin-top: .2rem; }

.goals { margin-top: 3.4rem; border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.goals h3 { font-weight: 900; font-size: 1.25rem; }
.goals .focus-tags { margin-top: 1rem; }
@media (min-width: 901px) { .goals .focus-tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.problem4.three { grid-template-columns: repeat(3, 1fr); }
.limits p small { display: block; font-weight: 400; font-size: var(--fs-small); line-height: 1.75; margin-top: .5rem; color: var(--muted); }

/* 關鍵決策：情境／決定／取捨 */
.dec { margin-bottom: 7rem; }
.dec h3 { font-weight: 900; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.4; margin: .8rem 0 1.6rem; text-wrap: balance; }
.dec dl { display: grid; gap: 2.4rem; max-width: 52rem; }
.dec dl > div { display: grid; grid-template-columns: 4.4rem 1fr; gap: 1rem; align-items: start; }
.dec dt { border-top: 2px solid var(--ink); padding-top: .25rem; font-weight: 700; font-size: var(--fs-small); letter-spacing: .1em; }
.dec dd { font-size: var(--fs-body); line-height: 1.85; }
.dec dl > div.cost dt { border-color: var(--brand); color: var(--brand); }
.dec dl > div.cost dd { border-left: 3px solid var(--case); padding-left: 1rem; }
@media (min-width: 901px) { html[lang="en"] .dec dl > div { grid-template-columns: 6.6rem 1fr; } }

/* 小標（原「黑底貼紙」）：重點版本用實心菱形 */
.tagline.hot { color: var(--ink); }
.tagline.hot::before { background: var(--case); border-color: color-mix(in oklch, var(--case) 70%, var(--ink)); }

/* 前後比較 */
.compare { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: end; }
.cmp { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.shotbox { width: 100%; padding: 1.4rem; display: flex; justify-content: center; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 22%, var(--paper)) 0%, var(--paper) 100%); }
.shotbox.y { background: linear-gradient(180deg, color-mix(in oklch, var(--case) 75%, var(--paper)) 0%, var(--paper) 100%); }
.shotbox img { max-height: 34rem; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 14px 26px rgba(28, 33, 25, .2)); }

/* 流程比較 */
.flowcmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; margin-top: 3rem; align-items: start; }
.flow { display: flex; flex-direction: column; align-items: stretch; margin-top: 1rem; }
.fstep { border: 1px solid var(--ink); padding: .55rem 1rem; font-weight: 700; text-align: center; }
.fstep.removed { border-style: dashed; color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklch, var(--muted) 60%, transparent); }
.fstep.new { background: var(--case); border-color: var(--case); }
.farrow { text-align: center; color: var(--muted); line-height: 1.8; }
.screens { display: flex; gap: 1.2rem; justify-content: center; }
.screens img { width: 48%; height: auto; filter: drop-shadow(0 14px 26px rgba(28, 33, 25, .2)); }

/* 單張截圖＋圖說 */
.shot-f img { width: 100%; filter: drop-shadow(0 14px 26px rgba(28, 33, 25, .2)); }

/* 兩張／三張截圖並排 */
.shots2 { display: grid; grid-template-columns: repeat(2, minmax(0, 18rem)); gap: 4rem; justify-content: center; margin-top: 3rem; align-items: start; }
.shots3 { display: grid; grid-template-columns: repeat(3, minmax(0, 18rem)); gap: 2rem; justify-content: center; margin-top: 3rem; align-items: start; }
@media (max-width: 900px) {
  .shots2 { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .shots3 { grid-template-columns: minmax(0, 18rem); gap: 2rem; }
}

/* 品牌區塊（logo＋下載按鈕） */
.brandbox { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; padding: 2.4rem 1.5rem; background: linear-gradient(180deg, color-mix(in oklch, var(--case) 75%, var(--paper)) 0%, var(--paper) 100%); }
.brandbox img.brand { width: 100%; max-width: 17rem; }
.badges { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.badges a { display: block; background: var(--ink); padding: .35rem .5rem; transition: background .2s; }
.badges a:hover { background: var(--brand); }
.badges img { height: 2.6rem; width: auto; }
@media (max-width: 520px) {
  .brandbox .badges { flex-wrap: nowrap; gap: .8rem; width: 100%; }
  .brandbox .badges a { min-width: 0; padding: .2rem .25rem; }
  .brandbox .badges img { height: 2.1rem; max-width: 100%; object-fit: contain; }
}

/* 成效附註、第二排數字 */
.result .nums.usage { margin-top: 1.6rem; }
@media (min-width: 901px) { .result .nums.usage { grid-template-columns: repeat(2, 1fr); } }
.result .res-notes { margin-top: 2rem; display: grid; gap: .4rem; font-size: var(--fs-small); line-height: 1.7; color: var(--muted); }
.result .res-notes li::before { content: "— "; }

/* 兩欄：不如預期＋反思 */
.res2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
.reflect-col .head { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1.8rem; }
.reflect-col .sec-title { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.4; text-wrap: balance; }
.reflect-col p { font-size: var(--fs-body); line-height: 1.9; }
.reflect-col p + p { margin-top: 1rem; }

@media (max-width: 900px) {
  .dec { margin-bottom: 5rem; }
  .dec dl > div { grid-template-columns: 1fr; gap: .5rem; }
  .dec dt { justify-self: start; }
  .problem4.three { grid-template-columns: 1fr; }
  .compare, .flowcmp, .res2 { grid-template-columns: 1fr; gap: 2.4rem; }
}

/* ══ 捲動進場（editorial.js 會替區塊加 .reveal）══ */
.reveal.rv { opacity: 0; transform: translateY(14px); transition: opacity .8s .1s, transform .8s .1s; }
.reveal.rv.in { opacity: 1; transform: none; }
.reveal .cs-media::before, .reveal.cs-media::before { transform: scaleX(0); }
.reveal.in .cs-media::before, .reveal.in.cs-media::before { transform: scaleX(1); }

/* ══ 手機：重排 ══ */
@media (max-width: 900px) {
  .bar-inner { height: 3.75rem; gap: 1rem; }
  .bar-nav { gap: 1.1rem; font-size: .9375rem; }
  .cs-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  /* 手機：案例標題一律橫排（副標在上、標題在中、hashtag 在下） */
  .cs-hero-inner > div:first-child { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "sub" "title" "tags"; row-gap: .35rem; }
  .cs-title { writing-mode: horizontal-tb; font-size: clamp(3rem, 15vw, 4.2rem); line-height: 1.05; letter-spacing: .04em; }
  .cs-title small { display: block; margin-top: .15em; font-size: .45em; }
  .cs-sub { writing-mode: horizontal-tb; padding-top: 0; letter-spacing: .04em; }
  .cs-tags { flex-direction: row; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: .3rem; padding-bottom: 0; }
  .cs-media { min-height: 0; aspect-ratio: 1 / 1; }
  .cs-media > img.bg { inset: 0 0 14% 12%; width: 88%; }
  .info { grid-template-columns: 1fr; gap: 1.6rem; }
  .tldr, .problem4 { grid-template-columns: 1fr; }
  .tldr > div, .tldr > div + div, .p4, .p4 + .p4 { padding: 1.4rem 0 1.6rem; border-left: 0; }
  .tldr > div + div, .p4 + .p4 { border-top: 1px solid var(--rule-soft); }
  .intro, .prob, .dr, .dr.rev, .more, .reflect, .d2 { grid-template-columns: 1fr; gap: 2.2rem; }
  .dr.rev .dr-media { order: 0; }
  .dr { margin-bottom: 5rem; }
  .dr-media { height: 26rem; }
  .v1 { grid-template-columns: 1fr; gap: 2.2rem; }
  .v1-result { margin-top: 3.6rem; padding: 2rem 1.4rem 4.4rem; }
  .v1-but { right: 1.4rem; bottom: 1.2rem; }
  .nums { grid-template-columns: 1fr; }
  .nums > div, .nums > div + div { padding: 1.3rem 0 1.5rem; border-left: 0; }
  .nums > div + div { border-top: 1px solid var(--rule-soft); }
  .reflect .panel { max-width: 18rem; }
  .lb-body { padding: 2rem 1.25rem; }
  .lb-meta { grid-template-columns: 1fr; gap: .8rem; }
  .idle-box { grid-template-columns: 1fr; }
  .idle-box img { height: 12rem; }
  .foot-mail { font-size: calc((100vw - 2.5rem) / 12.6); }
}
@media (max-width: 420px) {
  .bar-inner { gap: .8rem; }
  .bar-nav { gap: .8rem; }
  .bar .lang { font-size: .875rem; }
  .bar .lang span + span::before { margin: 0 .3rem 0 .15rem; }
}
@media (max-width: 359px) {
  .bar-inner { gap: .6rem; }
  .bar-nav { gap: .6rem; font-size: .875rem; }
  .bar .logo { width: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal.rv { opacity: 1; transform: none; transition: none; }
  .reveal .cs-media::before { transform: none; transition: none; }
  #go-top, .bar-nav a, .foot-mail { transition: none; }
}
