/* =========================================================================
   長照機構營運管理 — 版型樣式
   設計重點：行動裝置優先；任何內容都不得撐破容器（需求 1）；
   HERO 圖等比例縮放且寬度不超過內容文字區寬度（需求 4）。
   ========================================================================= */

:root {
  --content: 42rem;        /* 內容文字區寬度：HERO 圖的寬度上限也是它 */
  --wrap: 60rem;           /* 外層容器（卡片區可以比文字區寬一些） */
  --gap: 1.25rem;

  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a2433;
  --text-muted: #5b6b80;
  /* 標題色。文章用深綠、首頁用藍，兩者都遠高於 AA 的 4.5:1。
     #0f5132 對 --bg-soft 8.72:1；#123a6b 對 --bg-soft 10.55:1。 */
  --heading: #0f5132;
  --heading-home: #123a6b;
  --accent: #0f6f5c;
  --accent-soft: #e6f4f0;
  /* 放在 --accent 上的前景色。淺色模式 #ffffff 對 #0f6f5c 是 6.09:1（AA 通過）。 */
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px rgba(16, 32, 48, .06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --bg-soft: #121922;
    --surface: #161e29;
    --border: #26313f;
    --text: #e6ecf3;
    --text-muted: #9bacc0;
    /* 深色模式不能用深綠／深藍——對深底都只有 1.5 左右，等於看不見。
       改用同色相的淺色版：#8ed7b8 對 --bg-soft 10.45:1、#9dc2f0 是 9.6:1。
       綠色刻意與連結色 --accent #5ecbb0 拉開，避免標題看起來像連結。 */
    --heading: #8ed7b8;
    --heading-home: #9dc2f0;
    --accent: #5ecbb0;
    --accent-soft: #14312a;
    /* 深色模式的 --accent 是淺薄荷綠，白字只有 1.97:1（遠低於 AA 的 4.5:1）。
       改用深色前景 #0b1a16 對 #5ecbb0 是 11.20:1。 */
    --on-accent: #0b1a16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* ------------------------------------------------------------- 基礎 --- */

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

html {
  -webkit-text-size-adjust: 100%;   /* iOS 橫置時不要自己放大字級 */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* .topbar 是 sticky，錨點跳轉後目標會被它壓住。
     加了區塊導覽後，中等寬度時導覽會換到第二列，頁首最高約 90px，
     所以留 6.5rem（104px）才蓋得住。桌機只是多一點上方留白，無妨。 */
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
               system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  /* 中文長字串、英文長網址都不得撐破版面 */
  overflow-wrap: break-word;
  word-break: break-word;
}

img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;    /* 等比例縮放的關鍵 */
  display: block;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* 全域焦點指示器。以前只有 .hero__zoom 有，其餘全靠瀏覽器預設環
   （各家不一致，Safari 是淡藍細框），卡片標題連結又刻意拿掉底線與顏色，
   鍵盤使用者在卡片間 Tab 幾乎沒有定位線索。
   --accent 對 --bg-soft：淺色 5.67:1、深色 8.96:1，都超過 WCAG 2.4.11 的 3:1。 */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 跳過連結把焦點送進 <main>，但不要因此畫一個滿版外框 */
main:focus { outline: none; }

/* 視覺隱藏、但仍在無障礙樹裡（不可用 display:none / visibility:hidden） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  text-wrap: balance;
  color: var(--heading);
}

/* 首頁與四個介紹頁用藍色系標題（含文章卡片標題）；文章內頁維持綠色。
   直接覆寫變數，底下所有吃 --heading 的規則自動跟著換。 */
.page-home,
.page-standalone { --heading: var(--heading-home); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left));
}

.dot { color: var(--text-muted); margin-inline: .45em; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);   /* 寫死 #fff 在深色模式只有 1.97:1 */
  padding: .6rem 1rem;
  border-radius: 8px;
}

/* ------------------------------------------------------------ 頁首 --- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;          /* 窄螢幕時換行，不會擠爆 */
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  min-height: 3.5rem;
  padding-block: .6rem;
}

.topbar__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;             /* flex 子元素允許收縮，避免溢出 */
}
.topbar__brand:hover { color: var(--accent); }

.topbar__views {
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 區塊導覽。窄螢幕時橫向捲動，不換行擠爆頁首。 */
.topnav {
  order: 3;                    /* 手機：換到第二列，桌機再拉回中間 */
  flex-basis: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }

.topnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(.9rem, 3vw, 1.6rem);
  white-space: nowrap;
}

/* padding-block .55rem 把命中框從 32px 撐到約 43px。
   .topnav 是 overflow-x: auto 的橫向捲軸容器，加高只影響頁首高度，
   不會造成水平溢出；sticky 頁首變高後 scroll-padding-top 仍蓋得住。 */
.topnav a {
  display: inline-block;
  padding-block: .55rem;
  font-size: .88rem;
  color: var(--text-muted);
  text-decoration: none;
}
.topnav a:hover { color: var(--accent); text-decoration: underline; }

/* build 端一直有輸出 aria-current="page"，但沒有任何對應樣式，
   等於這個資訊只給輔助科技、沒給明眼使用者。
   粗體＋底線同時提供非色彩線索，不單靠顏色區分。 */
.topnav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

@media (min-width: 52rem) {
  .topnav { order: 0; flex-basis: auto; margin-inline: auto; }
}

/* ------------------------------------------------------------ HERO --- */

.hero {
  padding: clamp(1.5rem, 5vw, 3rem) max(1rem, env(safe-area-inset-left));
  text-align: center;
}

.hero__figure { margin: 0 auto; }

/* 需求 4：寬度不超過內容文字區寬度，且等比例 */
.hero__img {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  /* 長寬比由 <img> 的 width/height 屬性決定，不寫死。
     寫死會讓不同比例的文章專屬 HERO 圖被裁切。 */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--border);
}

/* 可放大的主視覺 */
.hero__zoom {
  display: block;
  max-width: var(--content);
  margin-inline: auto;
  border-radius: var(--radius);
}
.hero__zoom .hero__img { cursor: zoom-in; }
.hero__zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.hero__hint {
  max-width: var(--content);
  margin: .55rem auto 0;
  font-size: .78rem;
  color: var(--text-muted);
}

.hero__text {
  max-width: var(--content);
  margin: clamp(1.25rem, 4vw, 2rem) auto 0;
}

.hero__eyebrow {
  margin: 0 0 .5rem;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  letter-spacing: -.01em;
}

.hero__lede {
  margin: .85rem 0 0;
  color: var(--text-muted);
  font-size: clamp(.98rem, 2.6vw, 1.1rem);
}

/* ------------------------------------------------- 首頁：信任區塊 --- */

.profile__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  padding-block: clamp(2rem, 6vw, 3.5rem);
}

@media (min-width: 46rem) {
  .profile__inner { flex-direction: row; text-align: left; }
}

.profile__photo {
  width: clamp(9.5rem, 28vw, 13rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;                 /* 窄螢幕時不要被文字擠扁 */
  box-shadow: var(--shadow);
  background: var(--border);
}

.profile__text { min-width: 0; }

.profile__name {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  letter-spacing: -.01em;
}

/* h1 的副標，吃的是 profile.headline（領域）。
   原本這裡放品牌標語，但標語裡沒有任何會被搜尋的詞，
   等於浪費全頁最強的主題訊號；標語移到底下的 .profile__tagline。 */
.profile__field {
  display: block;
  margin-top: .55rem;
  font-size: clamp(1.05rem, 2.9vw, 1.25rem);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent);
}

/* 品牌標語。子句包成 inline-block（clauses()），換行只落在全形逗號後。 */
.profile__tagline {
  margin: .55rem 0 0;
  font-size: clamp(.98rem, 2.6vw, 1.1rem);
  font-weight: 600;
  color: var(--text-muted);
}
.profile__tagline span { display: inline-block; }

.profile__role {
  margin: .7rem 0 0;
  font-size: .92rem;
  color: var(--text-muted);
}

.profile__lede {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
}

/* --------------------------------------------------- 獨立頁面的頁首 --- */

.page-head { padding-block: clamp(2rem, 6vw, 3.25rem) 0; }

/* 麵包屑在左、精簡分享鈕在右；窄螢幕自動換行 */
.page-head__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
}

.page-head__title {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

/* 不壓在 --content：這幾句都在 42rem 的邊緣，卡住就被迫換行。
   子句各自 inline-block，寬度不夠時只斷在逗號之後，不斷在詞語中間。 */
.page-head__lede {
  margin: .8rem 0 0;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.9;
  text-wrap: pretty;
}

.page-head__lede span[data-clause] { display: inline-block; }

/* 介紹頁的麵包屑在 h1 上方，跟文章頁共用 .crumbs 樣式 */
.page-head .crumbs { margin-bottom: .7rem; }

.listing__more {
  margin: clamp(1.5rem, 4vw, 2rem) 0 0;
  text-align: center;
  font-size: .95rem;
  font-weight: 600;
}

/* ------------------------------------------------------- 首頁：區塊 --- */

/* 留白優先：區塊之間拉開距離，比塞滿資訊更像專業服務網站 */
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section + .section { padding-top: 0; }

.section__head {
  margin: 0 0 .5rem;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  letter-spacing: .01em;
}

/* 標題底下一道短線，比整條分隔線安靜 */
.section__head::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: .6rem;
  background: var(--accent);
  opacity: .55;
}

.section__lede {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: .95rem;
}

/* 置中版本：標題底下那道短線也要跟著置中，否則會歪在左邊 */
.section__head--center { text-align: center; }
.section__head--center::after { margin-inline: auto; }
.section__lede--center { text-align: center; }

.section__head + .tiles,
.section__head + .results,
.section__head + .section__intro,
.section__head + .client,
.section__head + .howto__list,
.section__head + .placeholder { margin-top: 1.75rem; }

/* --------------------------------------- 聯絡頁：合作流程與主題範圍 --- */

.howto + .howto { margin-top: clamp(2rem, 5vw, 2.75rem); }

.howto__list {
  max-width: var(--content);
  margin: 1.25rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: .6rem;
  font-size: .93rem;
  line-height: 1.9;
  color: var(--text-muted);
}
.howto__list li { text-wrap: pretty; }

/* ------------------------------------------------- 頁尾的行動呼籲 --- */

/* 介紹頁原本是連結拓撲上的死路：進來之後除了頁首導覽沒有任何出口。 */
.cta {
  max-width: var(--content);
  margin: 0;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  font-size: .93rem;
  line-height: 1.85;
}
.cta__text { color: var(--text); }
.cta__link {
  font-weight: 700;
  display: inline-block;
  padding-block: .4rem;
  margin-block: -.25rem;
}

/* 卡片：只用細框與大留白，不加彩色邊條 */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tile {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3.2vw, 1.75rem);
}

.tile__title {
  margin: 0 0 .6rem;
  font-size: 1rem;
  line-height: 1.5;
}

.tile__detail {
  margin: 0;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--text-muted);
  /* 卡片欄位窄，避免最後一行只剩一兩個字的孤字 */
  text-wrap: pretty;
}

/* 服務卡底下的「適用機構類型／常見合作方式／產出物」。
   用 <dl> 而不是再多開標題層級——這些是卡片的屬性，不是新的章節。 */
.tile__meta {
  margin: 1rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  font-size: .84rem;
  line-height: 1.8;
}
.tile__meta dt {
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}
.tile__meta dd {
  margin: .15rem 0 .8rem;
  color: var(--text-muted);
  text-wrap: pretty;
}
.tile__meta dd:last-child { margin-bottom: 0; }

/* 區塊開頭的說明段落。h1 底下直接接卡片時，中間缺一段承接的本文。 */
.section__intro {
  max-width: var(--content);
  margin: 0 0 clamp(1.5rem, 4vw, 2rem);
}
.section__intro p {
  margin: 0 0 1rem;
  font-size: .95rem;
  line-height: 1.95;
  color: var(--text-muted);
}
.section__intro p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------ 關於我：故事 --- */

/* 文字在左、形象照在右。窄螢幕改成上下排。 */
.story__inner {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 52rem) {
  .story__inner { grid-template-columns: minmax(0, 1fr) 18rem; }
}

.story__body {
  max-width: var(--content);
  font-size: clamp(1rem, 2.6vw, 1.08rem);
  line-height: 2.05;          /* 敘事文字放寬行距，讀起來比較不緊 */
}
.story__body p { margin: 0 0 1.4rem; }
.story__body p:last-child { margin-bottom: 0; }

.story__figure {
  margin: 0;
  justify-self: center;       /* 窄螢幕置中，桌機靠右欄自然對齊 */
  max-width: 18rem;
  width: 100%;
}

.story__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--border);
}

.story__mission {
  max-width: var(--content);
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding-top: clamp(1.25rem, 3.5vw, 1.75rem);
  border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 3vw, 1.22rem);
  font-weight: 600;
  line-height: 1.9;
  color: var(--heading);
}

/* 兩個子句各自 inline-block：寬度夠時併成完整一行，
   不夠時優先斷在分號之後，而不是斷在句子中間。 */
.story__mission span { display: inline-block; }
.story__mission { max-width: none; text-wrap: pretty; }

/* ------------------------------------------------------- 外部連結 --- */

.external__list {
  list-style: none;
  margin: clamp(1.5rem, 4vw, 2rem) auto 0;
  padding: 0;
  max-width: var(--content);
  display: grid;
  gap: 0;
}

.external__item {
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}
.external__item:last-child { border-bottom: 0; }

.external__item a {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
}

.external__meta {
  margin: .35rem 0 0;
  font-size: .82rem;
  color: var(--text-muted);
}

.external__site { font-weight: 600; }

/* --------------------------------------------------- 團隊領導成果 --- */

.leadership__inner {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 52rem) {
  .leadership__inner { grid-template-columns: minmax(0, 1fr) 26rem; }
}

.award {
  margin: 0;
  justify-self: center;
  max-width: 26rem;
  width: 100%;
}

.award__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--border);
}

.award__caption {
  margin-top: .65rem;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}

/* ----------------------------------------------------- 品牌時間軸 --- */

.journey__list {
  list-style: none;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.25rem);
}

/* 手機：直式，連接線沿著圖示中心往下 */
.journey__list::before {
  content: "";
  position: absolute;
  left: 1.71875rem;           /* 圖示寬 3.5rem 的一半，減去線寬 */
  top: 3.5rem;
  bottom: 3.5rem;
  width: 1px;
  background: var(--border);
}

.journey__step {
  position: relative;
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
}

.journey__icon {
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  position: relative;         /* 蓋住底下的連接線 */
  z-index: 1;
}
.journey__icon svg { width: 1.5rem; height: 1.5rem; }

.journey__body { min-width: 0; padding-top: .35rem; }

/* 編號 01-05。刻意不用 opacity 再壓一層：--text-muted 疊 opacity: .7 之後
   對 --bg-soft 只剩淺色 2.83:1、深色 4.39:1，兩套配色都低於 AA 對小字要求的
   4.5:1（.72rem ≈ 11.5px，即使 700 字重也遠低於大字門檻 18.66px bold）。
   而且 opacity 在 DevTools 的對比檢查上看不出來。
   單獨使用 --text-muted：淺色 5.07:1、深色 7.62:1，都通過。 */
.journey__num {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-muted);
}

.journey__stage {
  margin: .3rem 0 .2rem;
  font-size: 1.02rem;
}

.journey__role {
  margin: 0 0 .45rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--accent);
}

.journey__detail {
  margin: 0;
  font-size: .88rem;
  line-height: 1.85;
  color: var(--text-muted);
  /* 欄位很窄，避免最後一行只剩一兩個字的孤字 */
  text-wrap: pretty;
}

/* 桌機：橫式流程，連接線穿過圖示中心 */
@media (min-width: 52rem) {
  .journey__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .journey__list::before {
    left: 10%;
    right: 10%;
    top: 1.75rem;             /* 圖示垂直中心 */
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .journey__step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
  }

  .journey__body { padding-top: 1rem; }
  .journey__icon { margin-bottom: 0; }
}

/* ------------------------------------------------------- 顧問成果 --- */

.client {
  max-width: var(--content);
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 客戶名稱以前是這一頁唯一的 h2，等於把頁面第二強的主題訊號讓給一間公司名，
   從標題大綱看這頁像是在講那間公司而不是「顏和平的顧問成果」。
   降為 <p>，主題詞交給上面的 section__head。字級與字重刻意維持原本 h2 的樣子。 */
.client__name {
  margin: 0 0 .75rem;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--heading);
}

.client__role {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--accent);
}

.client__role-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .1rem .6rem;
}

.client__summary {
  margin: 0;
  font-size: .95rem;
  line-height: 1.95;
  color: var(--text-muted);
}

/* 區塊內的小標。比 section__head 輕，用來分隔頁面內的段落。 */
.subhead {
  margin: clamp(2.25rem, 5vw, 3rem) 0 1rem;
  font-size: 1.05rem;
}

/* 打勾清單 */
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--content);
  display: grid;
  gap: .7rem;
}

.checks li {
  position: relative;
  padding-left: 1.9rem;
  font-size: .95rem;
  line-height: 1.85;
}

.checks li::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: .62em;
  width: .7rem;
  height: .38rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* 工作內容標籤 */
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.chips li {
  font-size: .88rem;
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

/* 「我相信」 */
/* 不壓在 --content：這兩句本來就長，給滿版寬度才有機會一行放完 */
.belief {
  margin: 0;
  padding-left: 1.15rem;
  border-left: 2px solid var(--accent);
}

/* 子句各自 inline-block，換行只會發生在逗號之後，不會斷在詞語中間 */
.belief span { display: inline-block; }

.belief p {
  margin: 0 0 .9rem;
  font-size: clamp(1rem, 2.7vw, 1.1rem);
  line-height: 1.95;
}
.belief p:last-child { margin-bottom: 0; }

/* 視覺化數據 */
.stats {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: clamp(1.5rem, 4vw, 2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: center;
}

@media (min-width: 52rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat__value {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin: .5rem 0 0;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* 結語／品牌宣言。置中、放大、用主色。
   （這段樣式先前重構區塊時被誤刪，導致宣言變成一般靠左的文字。） */
/* 不壓在 --content：這句 36 個字，42rem 放不下會被迫換行。
   給滿版寬度才有機會一行放完。 */
.motto {
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  text-align: center;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 700;
  line-height: 1.85;
  color: var(--accent);
  text-wrap: pretty;
}

/* 子句各自 inline-block：換行只會落在逗號之後，不會斷在詞語中間 */
.motto span { display: inline-block; }

/* ------------------------------------------------------- 聯絡方式 --- */

/* 聯絡資訊在左、QR 在右；窄螢幕上下排 */
.contact__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 46rem) {
  .contact__grid { grid-template-columns: minmax(0, 1fr) 13rem; }
}

.qr {
  margin: 0;
  justify-self: center;
  max-width: 13rem;
  width: 100%;
  text-align: center;
}

/* QR 一定要白底：深色模式下若透出深色，掃描器會讀不到 */
.qr__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: .6rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.qr__caption {
  margin-top: .7rem;
  display: grid;
  gap: .15rem;
}

.qr__label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text);
}

.qr__note { font-size: .78rem; color: var(--text-muted); }

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .85rem;
  max-width: var(--content);
}

.contact__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border);
}
.contact__item:last-child { border-bottom: 0; padding-bottom: 0; }

.contact__label {
  flex: 0 0 5.5rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
}

/* inline-block + padding 把命中框從 29px 撐到 44px 以上。
   Email 與電話是這一頁唯二的操作目標，手指按得到比較重要。 */
.contact__value {
  min-width: 0;
  overflow-wrap: anywhere;
  display: inline-block;
  padding-block: .4rem;
}

/* 尚未填入真實內容的版位。刻意做得明顯，避免誤上線。 */
.placeholder {
  margin: 0;
  padding: clamp(1.25rem, 3.2vw, 1.75rem);
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.85;
}
.placeholder code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .05rem .35rem;
  font-size: .88em;
}

/* ---------------------------------------------------------- 文章列表 --- */

.listing { padding-bottom: 3rem; }

.listing__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}
.listing__head h2 { margin: 0; font-size: 1.25rem; }
.listing__meta { margin: 0; font-size: .84rem; color: var(--text-muted); }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 首頁最多放三篇，排成一列比兩張大卡收斂。
   用 auto-fit 而非固定三欄：文章只有兩篇時會填滿兩欄，
   不會空一格出來看起來像少了東西。 */
@media (min-width: 58rem) {
  .page-home .cards { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

.card {
  min-width: 0;              /* grid 子元素允許收縮 */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.4rem);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); }
/* 滑鼠有 hover 回饋，鍵盤也要有對等的回饋 */
.card:focus-within { transform: translateY(-2px); border-color: var(--accent); }
.card > article { min-width: 0; }

/* 卡片縮圖：滿版切齊卡片上緣，與卡片圓角對齊。
   用固定 3/2 裁切讓每張卡的圖高度一致，網格才不會參差。 */
.card__thumb {
  display: block;
  margin: calc(-1 * clamp(1rem, 3vw, 1.4rem)) calc(-1 * clamp(1rem, 3vw, 1.4rem)) clamp(.8rem, 2.5vw, 1.1rem);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  overflow: hidden;
  background: var(--border);
}

.card__thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.card__title { margin: 0 0 .5rem; font-size: 1.12rem; }
/* padding 撐高命中框（26px → 約 37px），負邊距抵銷掉多出來的高度，
   卡片版面與改動前完全一致（CLS 仍為 0）。 */
.card__title a {
  color: var(--heading);
  text-decoration: none;
  display: inline-block;
  padding-block: .42rem;
  margin-block: -.42rem;
}
.card__title a:hover { color: var(--accent); text-decoration: underline; }
.card__title a:focus-visible { text-decoration: underline; }

.card__summary {
  margin: 0 0 .75rem;
  color: var(--text-muted);
  font-size: .93rem;
  line-height: 1.7;
}

.card__tags { margin: 0 0 .7rem; display: flex; flex-wrap: wrap; gap: .4rem; }

.tag {
  font-size: .74rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.card__meta,
.post__meta {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.card__author, .post__author { font-weight: 600; color: var(--text); }

.empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ 文章 --- */

.post {
  max-width: var(--content);
  margin: 0 auto;
  padding-bottom: 3rem;
}

.post__meta {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

/* 麵包屑：與 BreadcrumbList 結構化資料對應的可見內容 */
.crumbs {
  margin: 0 0 .9rem;
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .45rem;
}
.crumbs a {
  display: inline-block;
  padding-block: .35rem;
  margin-block: -.35rem;
}
.crumbs [aria-current="page"] {
  color: var(--text-muted);
  min-width: 0;
}

/* 轉載聲明：明確、但不搶走內文的注意力 */
.reprint {
  margin: 0 0 1.75rem;
  padding: .85rem 1.1rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
}
.reprint p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.75;
  color: var(--text);
}
/* 命中框：行動裝置上單行連結只有 20px 高，遠低於建議的 48px */
.reprint a {
  font-weight: 600;
  display: inline-block;
  padding-block: .5rem;
  margin-block: -.35rem;
}

.prose { font-size: 1.02rem; }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin: 2.4rem 0 .9rem;
  font-size: 1.4rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--accent-soft);
}
.prose h3 { margin: 1.9rem 0 .7rem; font-size: 1.15rem; }
.prose p  { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }

.prose blockquote {
  margin: 1.5rem 0;
  padding: .85rem 1.15rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1rem .35rem;
  font-size: .88em;
  /* 長字串在行內也要能斷 */
  overflow-wrap: anywhere;
}

.prose pre {
  overflow-x: auto;          /* 程式碼自己橫向捲，不撐破版面 */
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin: 0 0 1.15rem;
}
.prose pre code { background: none; border: 0; padding: 0; white-space: pre; }

/* 表格：橫向捲動交給外層容器負責。
   直接在 <table> 上寫 display: block 會讓它在無障礙樹裡不再是表格，
   欄列關聯與 th 的對應全部消失；white-space: nowrap 也等於放棄 1.4.10 回流。 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.15rem;
}
.table-scroll:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 0;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: .55rem .75rem;
  text-align: left;
}
.prose th { background: var(--bg-soft); font-weight: 700; }

.prose img { border-radius: 10px; margin: 1.5rem auto; }

/* 文章內的資訊圖：等比例縮放、可點擊放大、附圖說 */
.prose figure {
  margin: 1.75rem 0;
  /* figure 預設有左右 margin，會讓寬圖看起來偏移 */
}

.prose figure img {
  width: 100%;
  margin: 0;
  border: 1px solid var(--border);
  background: #fff;   /* 資訊圖多為白底，深色模式下才不會透出深色 */
}

.prose figure a { display: block; }

.prose figcaption {
  margin-top: .6rem;
  font-size: .82rem;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
}

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.25rem 0; }

/* 其他文章：文章之間的水平互連 */
.related {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.related__head {
  margin: 0 0 .6rem;
  font-size: 1.05rem;
}
.related__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: .95rem;
}
.related__list li { margin-bottom: .25rem; }
.related__list a {
  display: inline-block;
  padding-block: .4rem;
  margin-block: -.3rem;
}

/* ------------------------------------------------------- 分享列 --- */

/* 作者列在左、精簡分享鈕在右；窄螢幕自動換行到下一列 */
.post__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

/* 邊框改由 .post__head 承擔，避免出現兩條線 */
.post__head .post__meta {
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

/* 首頁版：接在定位句下方，沒有上分隔線；
   窄螢幕時 .profile__inner 是置中排版，分享列要跟著置中。 */
/* 用 .share.share--profile 提高權重：修飾規則寫在基底 .share 之前，
   同權重時後者會贏，border-top 會被基底的 1px 蓋回去。 */
.share.share--profile {
  margin: clamp(1.5rem, 4vw, 2rem) 0 0;
  padding-top: 0;
  border-top: 0;
  justify-content: center;
}

@media (min-width: 46rem) {
  .share.share--profile { justify-content: flex-start; }
}

/* 精簡版：只有圖示，可及名稱由 aria-label 提供 */
.share.share--compact {
  margin: 0;
  padding-top: 0;
  border-top: 0;
  gap: .4rem;
}

.share--compact .share__btn {
  padding: .45rem;
  min-width: 2.5rem;
  justify-content: center;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding-top: clamp(1.25rem, 3.5vw, 1.75rem);
  border-top: 1px solid var(--border);
}

.share__label {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: .2rem;
}

/* 命中框 ≥ 40px：手指按得到，也符合觸控目標的無障礙建議 */
.share__btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: .45rem .9rem;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.share__btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.share__btn svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

.share__status {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}

/* 複製失敗時才由 JS 插入：把網址攤出來讓人自己選 */
.share__fallback {
  flex-basis: 100%;
  display: grid;
  gap: .35rem;
  margin-top: .5rem;
}

.share__fallback label {
  font-size: .8rem;
  color: var(--text-muted);
}

.share__fallback input {
  width: 100%;
  font: inherit;
  font-size: .85rem;
  padding: .5rem .7rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.post__back {
  margin: 2rem 0 0;
  font-size: .93rem;
}
.post__back a {
  display: inline-block;
  padding-block: .5rem;
  margin-block: -.35rem;
}

/* ------------------------------------------------------------ 頁尾 --- */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  margin-top: auto;
}

.credit {
  max-width: var(--content);
  margin: 0 auto 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.credit__head {
  margin: 0 0 .5rem;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.credit__body {
  margin: 0;
  font-size: .84rem;
  /* 連結加了 padding 撐高命中框，行距要跟著放寬才不會互相重疊 */
  line-height: 2.2;
  color: var(--text-muted);
}
.credit__body cite { font-style: italic; }

/* 授權連結在 375px 上原本只有 20px 高，"CC BY 4.0" 還會被換行拆成兩個
   client rect（第一段 17×20px，實際上按不到）。
   body 已有 overflow-wrap: break-word，nowrap 不會造成水平溢出。 */
.credit__body a {
  display: inline-block;
  padding-block: .5rem;
  margin-block: -.35rem;
  white-space: nowrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 次要導覽：長頁面捲到底時不必再回到頁首，也讓每一頁多一批可被爬取的
   站內連結（全站的內部連結原本只有頁首那一組）。 */
.footer__nav {
  max-width: var(--content);
  margin: 0 auto 1.5rem;
}
.footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem clamp(.9rem, 3vw, 1.6rem);
}
.footer__nav a {
  display: inline-block;
  padding-block: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer__nav a:hover { color: var(--accent); text-decoration: underline; }

.footer__meta {
  margin: 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------- 404 --- */

.notfound {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(2.5rem, 10vw, 5rem) 0 4rem;
}
.notfound h1 { margin: 0 0 .9rem; font-size: clamp(1.5rem, 5vw, 2.2rem); }
.notfound p { margin: 0 0 1rem; color: var(--text-muted); }
.notfound__back a {
  display: inline-block;
  padding-block: .5rem;
  font-weight: 600;
}

/* 動畫偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
