/* ==========================================================================
   永盛台南徵信社 — 設計系統
   概念：府城報刊。暖赭土 × 焦褐墨 × 沙米紙，無邊框、只靠留白與細線分區。

   刻意與集團其他站區隔（不只換色，三個軸都拉開）：
     站        色相                形狀                      字體
     ysdet     海軍藍 × 金         圓角 6/12/20              標題無襯線
     uic       紙墨米白 × 硃砂     銳角 2/4                  **標題**襯線
     daredit   林墨綠 × 琥珀銅     全直角 0                  無襯線 900 字重
     tnndet    深青碧 × 珊瑚橘     大圓角、膠囊按鈕          **內文**襯線
     本站      暖赭土 × 焦褐墨     無邊框、套版錯位陰影      標題**細字重 300** + 直排標籤

   跟 uic 的差別要特別講清楚，因為兩站都是暖色淺底：
     uic 的強調色是偏紅的硃砂，本站是偏橙褐的赭土；
     uic 用卡片與邊框分區，本站完全不畫框，靠留白、細線與直排標籤。

   五站長得一樣會被判定為同一組模板站群，對地域關鍵字是扣分的。
   後台則相反 —— 統一才對，客戶換站不用重學。

   單檔、無建置流程、無框架。
   ========================================================================== */
/* --------------------------------------------------------------------------
   1. 設計權杖
   -------------------------------------------------------------------------- */
:root {
  /* 焦褐墨（深色主調）
     命名沿用 ink-*，因為所有頁面模板都已經在用這組變數名。
     只換值不換名，改版才不會變成全站重寫。 */
  --ink-900: #241913;
  --ink-800: #2f2119;
  --ink-700: #43301f;
  --ink-600: #5b4330;
  --ink-500: #7a5c43;

  /* 沙米紙（淺色底）—— 比 uic 的米白更黃、更暗一階，像放久的報紙 */
  --paper-000: #fffdf8;
  --paper-100: #f8f2e7;
  --paper-200: #f1e8d8;
  --paper-300: #e6d9c3;
  --paper-400: #d4c2a4;

  /* 赭土（強調）
     500 會拿來當文字連結色，所以不能太亮：#9e4d1a 在沙米紙上是 4.89:1，
     過 WCAG AA。原本想用的 #b9622a 只有 3.57:1，當文字不及格。 */
  --seal-600: #843f13;
  --seal-500: #9e4d1a;
  --seal-400: #d98a4e;
  --seal-050: rgba(158, 77, 26, 0.08);

  /* 文字 */
  --text-strong: #241913;
  --text-body: #4a3b30;
  --text-muted: #6e5c4d;         /* #7a6858 只有 4.37:1，次要文字也要過 AA */
  --text-invert: #f5ecdc;
  --text-invert-muted: rgba(245, 236, 220, 0.70);

  /* 線 —— 這一站不畫框，線是唯一的分區工具，所以分三種用途 */
  --line-soft: #e0d2ba;
  --line-mid: #c9b595;
  --line-dark: rgba(245, 236, 220, 0.18);
  --rule: #241913;              /* 報頭與章節的實線 */

  /* 字體。
     標題用無襯線「細字重 300」加寬字距 —— 五站裡沒有人用過細字重。
     直排的章節標籤用襯線，那是本站唯一出現襯線的地方。 */
  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", -apple-system, "Segoe UI", "Microsoft JhengHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;

  /* 尺度 */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --gutter: 24px;

  /* 圓角歸零。這一站的形狀語言是「沒有框」，圓角沒有東西可以圓。 */
  --radius-sm: 0;
  --radius-md: 0;

  /* 陰影只留一種：套版印刷的錯位實影，不用柔和的模糊陰影 */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --press: 4px 4px 0 var(--ink-900);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. 基礎
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* topbar 40px + header 72px，再留一點呼吸空間，否則錨點會被 sticky 頁首蓋住 */
  scroll-padding-top: 124px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-body);
  background: var(--paper-200);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

a { color: var(--seal-500); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--seal-600); }

/* 標題的字體、字重、字距由最後的站別主題層決定 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.6em;
  letter-spacing: 0;
}

h4, h5, h6 { font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }

hr {
  border: 0;
  height: 1px;
  background: var(--line-soft);
  margin: 2.4rem 0;
}

::selection { background: var(--seal-500); color: #fff; }

:focus-visible {
  outline: 2px solid var(--seal-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--ink-800);
  color: var(--text-invert);
}
.skip-link:focus { left: 8px; top: 8px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. 版面容器
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--ink { background: var(--ink-800); color: var(--text-invert); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--text-invert); }
.section--paper { background: var(--paper-100); }
.section--rule { border-top: 1px solid var(--line-soft); }

/* 區塊標題：編號 + 細線 + 襯線標題 */
.sec-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.sec-head__index {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--seal-500);
}
.sec-head__index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-mid);
}
.section--ink .sec-head__index { color: var(--seal-400); }
.section--ink .sec-head__index::after { background: var(--line-dark); }

.sec-head__title {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.sec-head__lead {
  max-width: 62ch;
  color: var(--text-muted);
  margin: 0;
}
.section--ink .sec-head__lead { color: var(--text-invert-muted); }

/* --------------------------------------------------------------------------
   4. 按鈕
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  text-align: center;
}

.btn--seal {
  background: var(--seal-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--seal:hover {
  background: var(--seal-600);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ink {
  background: var(--ink-800);
  color: var(--text-invert);
}
.btn--ink:hover { background: var(--ink-900); color: var(--text-invert); transform: translateY(-1px); }

/* 描邊按鈕的顏色走變數，深底容器只要覆寫變數即可。
   原本是用 .section--ink .btn--ghost 這種祖先選擇器，結果 hero、cta、
   panel--ink 這些同樣是深底但 class 不同的容器全都漏掉，按鈕文字變成
   深色壓在深色底上，等於看不見。 */
.btn--ghost {
  background: transparent;
  border-color: var(--btn-ghost-border, var(--line-mid));
  color: var(--btn-ghost-fg, var(--text-strong));
}
.btn--ghost:hover {
  border-color: var(--btn-ghost-border-hover, var(--ink-800));
  color: var(--btn-ghost-fg, var(--text-strong));
  background: var(--btn-ghost-bg-hover, var(--paper-000));
}

/* 所有深底容器共用這組覆寫 */
.section--ink,
.cta,
.hero,
.page-head,
.panel--ink,
.mobile-nav,
.site-footer {
  --btn-ghost-fg: var(--text-invert);
  --btn-ghost-border: rgba(245, 242, 236, 0.34);
  --btn-ghost-border-hover: rgba(245, 242, 236, 0.62);
  --btn-ghost-bg-hover: rgba(245, 242, 236, 0.10);
}

.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* 文字連結（帶箭頭） */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.link-more::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 0.22s var(--ease);
}
.link-more:hover::after { width: 28px; }

/* --------------------------------------------------------------------------
   5. 頁首
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--ink-900);
  color: var(--text-invert-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar__note { margin: 0; }
.topbar__links { display: flex; align-items: center; gap: 6px; }
.topbar__links a {
  color: var(--text-invert-muted);
  padding: 9px 10px;          /* 觸控目標高度 */
  display: inline-flex;
  align-items: center;
}
.topbar__links a:hover { color: var(--text-invert); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper-100);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }

/* 頁首用比內容區更寬的容器：品牌 + 8 個中文選單 + 電話 + CTA 在 1160px
   裡塞不下，會擠成一團互相重疊。 */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  max-width: 1400px;
}

/* 可縮：品牌區在窄螢幕要讓位給選單鈕，否則整條 header 撐出畫面 */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark { height: 46px; width: auto; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__tag {
  font-size: .75rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav__link {
  position: relative;
  padding: 10px 10px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
}
.nav__link:hover { color: var(--text-strong); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--seal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s var(--ease);
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--text-strong); font-weight: 700; }

.header__cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.header__phone {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: right;
}
.header__phone-label {
  font-size: .75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.header__phone-num {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--seal-500);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 20px; height: 2px; background: var(--ink-800); display: block; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink-800);
  transition: transform 0.24s var(--ease), opacity 0.2s;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 行動選單
   關閉狀態刻意「不」用 translateX(100%) 推到畫面外：fixed 元素不受 body 的
   overflow-x 約束，會把 documentElement 的 scrollWidth 一起撐大，在每個斷點
   都造成假性橫向溢出。改用淡入 + 短距離位移，動畫還在，但不會超出畫面。 */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ink-900);
  color: var(--text-invert);
  padding: 20px var(--gutter) 40px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0s linear 0.26s;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0s;
}

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 18px;
}
.mobile-nav__close {
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  color: var(--text-invert);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.mobile-nav__list { list-style: none; margin: 0; padding: 0; }
.mobile-nav__list a {
  display: block;
  padding: 14px 4px;
  font-size: 1.05rem;
  color: var(--text-invert);
  border-bottom: 1px solid var(--line-dark);
}
.mobile-nav__sub { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; }
.mobile-nav__sub a {
  font-size: 0.9rem;
  padding: 11px 4px;
  min-height: 44px;            /* 選單項目要好按 */
  display: flex;
  align-items: center;
  color: var(--text-invert-muted);
}
.mobile-nav__foot { margin-top: 24px; display: grid; gap: 10px; }

/* 行動裝置底部固定聯絡列 */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  display: none;
  background: var(--ink-900);
  border-top: 1px solid var(--line-dark);
}
.mobile-bar a {
  flex: 1 1 0;
  min-width: 0;                /* 沒有這行，中文字會把三欄一起撐出畫面 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding-inline: 6px;
  color: var(--text-invert);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.mobile-bar a + a { border-left: 1px solid var(--line-dark); }
.mobile-bar a.is-seal { background: var(--seal-500); }

/* --------------------------------------------------------------------------
   6. 麵包屑
   -------------------------------------------------------------------------- */
.crumb {
  background: var(--paper-300);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.82rem;
}
.crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 12px 0;
}
.crumb li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.crumb li + li::before { content: "/"; color: var(--line-mid); }
.crumb a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 32px;            /* 觸控目標 */
}
.crumb a:hover { color: var(--seal-500); }
.crumb [aria-current] { color: var(--text-strong); font-weight: 500; }

/* --------------------------------------------------------------------------
   7. 頁首橫幅（內頁）
   -------------------------------------------------------------------------- */
.page-head {
  background: var(--ink-800);
  color: var(--text-invert);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--seal-050) 0%, transparent 46%),
    linear-gradient(0deg, rgba(20, 22, 26, 0.5) 0%, transparent 60%);
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-head__kicker {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--seal-400);
  margin-bottom: 12px;
}
.page-head__title {
  color: var(--text-invert);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 0.6rem;
}
.page-head__lead {
  max-width: 64ch;
  color: var(--text-invert-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. 卷宗卡（服務分類）
   -------------------------------------------------------------------------- */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 22px;
}

.dossier {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper-000);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.dossier:hover {
  transform: translateY(-4px);
  border-color: var(--line-mid);
  box-shadow: var(--shadow-md);
}

.dossier__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: var(--paper-300);
}
.dossier__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.dossier:hover .dossier__media img { transform: scale(1.05); }

/* 索引標籤：卷宗的分頁紙 */
.dossier__tab {
  position: absolute;
  top: 12px;
  left: 0;
  padding: 4px 12px 4px 14px;
  background: var(--seal-500);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.14em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  z-index: 1;
}

/* 無圖版式：舊站的分類圖上燒錄了別套服務的名稱，跟分類名對不上，
   所以預設不掛圖。改用透空大編號 + 硃砂頂邊的排版卡，
   後台傳了正確的圖之後會自動切回上面的有圖版式。 */
.dossier--plain { border-top: 3px solid var(--seal-500); }

.dossier__plate {
  position: relative;
  padding: 26px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.dossier__no {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-mid);
  transition: -webkit-text-stroke-color 0.25s var(--ease);
}
.dossier:hover .dossier__no { -webkit-text-stroke-color: var(--seal-400); }

.dossier__stamp {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line-mid);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.dossier--plain .dossier__body { padding-top: 14px; }

.dossier__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.dossier__title { font-size: 1.12rem; margin-bottom: 0.5rem; }
.dossier__title a { color: var(--text-strong); }
.dossier:hover .dossier__title a { color: var(--seal-500); }
.dossier__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}
.dossier__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 整張卡可點 */
.dossier__link::after { content: ""; position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   9. 卷宗清單（文章列表）
   -------------------------------------------------------------------------- */
.file-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }

.file-list__item {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s var(--ease);
}
.file-list__item:hover { background: var(--paper-000); }

.file-list__link {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 18px 14px;
  min-width: 0;
}

.file-list__no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--seal-500);
}
.file-list__title {
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1.6;
}
.file-list__item:hover .file-list__title { color: var(--seal-500); }
.file-list__meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 帶摘要的版本（經驗談／新聞） */
.entry-list { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 26px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}
.entry__aside { min-width: 0; }
.entry__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.entry__ref {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.14em;
  color: var(--seal-500);
}
.entry__body { min-width: 0; }
.entry__title { font-size: 1.16rem; margin-bottom: 0.45rem; }
.entry__title a { color: var(--text-strong); }
.entry:hover .entry__title a { color: var(--seal-500); }
.entry__excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. 內文排版
   -------------------------------------------------------------------------- */
.prose {
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text-body);
  min-width: 0;
}
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 2rem 0 1rem; }
.prose h2 {
  font-size: clamp(1.28rem, 2.6vw, 1.55rem);
  margin: 2.4rem 0 1rem;
  padding-left: 14px;
  border-left: 3px solid var(--seal-500);
}
.prose h3 { font-size: 1.16rem; margin: 1.9rem 0 0.8rem; color: var(--ink-700); }
.prose h4 { font-size: 1.04rem; margin: 1.6rem 0 0.7rem; }
.prose img {
  margin: 1.6rem auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
}
/* padding-block 不影響行高，但會把可點區撐到 WCAG 的 24px 門檻以上 */
.prose a { text-decoration: underline; text-underline-offset: 3px; padding-block: 3px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--text-strong); font-weight: 700; }
.prose blockquote {
  margin: 1.6rem 0;
  padding: 16px 22px;
  background: var(--paper-200);
  border-left: 3px solid var(--line-mid);
  color: var(--text-muted);
}
.prose hr { margin: 2rem 0; }

/* 舊站內容常有寬表格，必須能自己捲 */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.94rem;
}
.prose th, .prose td {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--paper-300); font-weight: 700; color: var(--text-strong); }
.prose caption { caption-side: top; text-align: left; padding-bottom: 10px; color: var(--text-muted); font-size: 0.88rem; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

/* 收費頁的價目表 */
.price-table {
  width: 100%;
  min-width: 720px;            /* 5 欄中文擠在手機上會不可讀，讓它橫向捲 */
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--paper-000);
}
.price-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.price-table th,
.price-table td {
  padding: 13px 16px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.price-table thead th {
  background: var(--ink-800);
  color: var(--text-invert);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-color: var(--ink-700);
}
.price-table tbody th {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-strong);
  background: var(--paper-100);
  white-space: nowrap;
}
.price-table tbody tr:hover td,
.price-table tbody tr:hover th { background: var(--paper-200); }
.price-table__price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--seal-500);
  white-space: nowrap;
}

/* 舊站的 .row / .col-* 殘留：避免版面爆開 */
.prose .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 20px;
  margin: 1.4rem 0;
}
.prose .row > [class*="col-"] { min-width: 0; }
.prose .card { min-width: 0; }

/* --------------------------------------------------------------------------
   11. 文章版面（內文 + 側欄）
   -------------------------------------------------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(30px, 5vw, 60px);
  align-items: start;
}
.article-main { min-width: 0; }

.article-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line-soft); }
.article-head__title { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin-bottom: 0.8rem; }
.article-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.article-head__meta .tag {
  padding: 3px 10px;
  background: var(--seal-050);
  color: var(--seal-500);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.sidebar { position: sticky; top: 92px; display: grid; gap: 24px; min-width: 0; }

.panel {
  background: var(--paper-000);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  min-width: 0;
}
.panel--ink { background: var(--ink-800); border-color: var(--ink-700); color: var(--text-invert); }
.panel__title {
  font-size: 1rem;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.panel--ink .panel__title { color: var(--text-invert); border-color: var(--line-dark); }
.panel__list { list-style: none; margin: 0; padding: 0; }
.panel__list li + li { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }
.panel__list a {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.65;
  display: block;
  padding-block: 4px;          /* 觸控目標 */
  min-height: 32px;
}
.panel__list a:hover { color: var(--seal-500); }
.panel__list a.is-active { color: var(--seal-500); font-weight: 700; }

/* 側欄的諮詢卡 */
.consult-card__num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 4px;
}
.consult-card p { color: var(--text-invert-muted); font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   12. 流程時間軸
   -------------------------------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--line-mid);
}
.timeline__step {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 22px;
  padding: 18px 0;
  min-width: 0;
}
.timeline__dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-200);
  border: 1px solid var(--line-mid);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--seal-500);
}
.timeline__body { min-width: 0; }
.timeline__title { font-size: 1.06rem; margin-bottom: 0.35rem; }
/* 內容來自後台編輯器，可能包成 <p>；把段落邊界收掉才不會多出空隙 */
.timeline__text { font-size: 0.93rem; color: var(--text-muted); }
.timeline__text > :first-child { margin-top: 0; }
.timeline__text > :last-child { margin-bottom: 0; }
.timeline__text p { margin-bottom: 0.5em; }

/* --------------------------------------------------------------------------
   13. 問與答手風琴
   -------------------------------------------------------------------------- */
.qa { border-top: 1px solid var(--line-soft); }
.qa__item { border-bottom: 1px solid var(--line-soft); }

.qa__q {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 20px 6px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.65;
}
.qa__q:hover { color: var(--seal-500); }
.qa__marker { font-family: var(--font-mono); font-size: 0.9rem; color: var(--seal-500); }
.qa__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 6px;
}
.qa__icon::before,
.qa__icon::after {
  content: "";
  position: absolute;
  background: var(--seal-500);
  transition: transform 0.24s var(--ease);
}
.qa__icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.qa__icon::after { top: 0; left: 8px; width: 2px; height: 18px; }
.qa__q[aria-expanded="true"] .qa__icon::after { transform: rotate(90deg); }

.qa__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.qa__a[data-open="true"] { grid-template-rows: 1fr; }
.qa__a > div { overflow: hidden; min-height: 0; }
.qa__a .prose { padding: 0 6px 22px 46px; font-size: 0.96rem; }

/* --------------------------------------------------------------------------
   14. 顧問團隊
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}
.team-card {
  background: var(--paper-000);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.team-card__photo { aspect-ratio: 1 / 1; background: var(--paper-300); }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__body { padding: 16px 18px 20px; }
.team-card__name { font-size: 1.04rem; margin-bottom: 4px; }
.team-card__role {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 9px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0.1em;
  background: var(--seal-050);
  color: var(--seal-500);
  border-radius: var(--radius-sm);
}
.team-card__expertise { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.team-card__expertise > :first-child { margin-top: 0; }
.team-card__expertise > :last-child { margin-bottom: 0; }
.team-card__expertise p { margin-bottom: 0.4em; }

/* --------------------------------------------------------------------------
   15. 表單
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { display: grid; gap: 7px; min-width: 0; }
.form-field--full { grid-column: 1 / -1; }

.form-label { font-size: 0.88rem; font-weight: 700; color: var(--text-strong); }
.form-label .req { color: var(--seal-500); margin-left: 3px; }

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-body);
  background: var(--paper-000);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-md);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--seal-500);
  box-shadow: 0 0 0 3px var(--seal-050);
}
textarea.form-control { min-height: 140px; resize: vertical; line-height: 1.75; }

.form-error { font-size: 0.82rem; color: var(--seal-500); }

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--seal-500);
  background: var(--seal-050);
  color: var(--text-strong);
  margin-bottom: 24px;
  font-size: 0.94rem;
}

/* --------------------------------------------------------------------------
   16. 分頁
   -------------------------------------------------------------------------- */
.pager { margin-top: 2.5rem; }
.pager nav > div:first-child { display: none; }   /* Laravel 的行動版簡易分頁 */
.pager .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.pager .page-link {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.9rem;
  color: var(--text-body);
  background: var(--paper-000);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.pager .page-link:hover { border-color: var(--ink-800); color: var(--text-strong); }
.pager .active .page-link { background: var(--ink-800); border-color: var(--ink-800); color: var(--text-invert); }
.pager .disabled .page-link { opacity: 0.4; pointer-events: none; }

/* --------------------------------------------------------------------------
   17. 結尾行動呼籲
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  background: var(--ink-900);
  color: var(--text-invert);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, var(--seal-050) 0, transparent 55%),
    radial-gradient(ellipse at 90% 100%, var(--seal-050) 0, transparent 50%);
}
.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
  padding-block: clamp(2.8rem, 6vw, 4.2rem);
}
.cta__title { color: var(--text-invert); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.6rem; }
.cta__text { color: var(--text-invert-muted); margin: 0; max-width: 56ch; }
.cta__actions { display: grid; gap: 12px; min-width: 220px; }

/* --------------------------------------------------------------------------
   18. 頁尾
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-800);
  color: var(--text-invert-muted);
  font-size: 0.88rem;
  padding-top: clamp(2.8rem, 5vw, 4rem);
}
.site-footer h3 {
  color: var(--text-invert);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-dark);
}
.site-footer a { color: var(--text-invert-muted); }
.site-footer a:hover { color: var(--text-invert); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 36px;
}
.footer-col { min-width: 0; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-list a { display: inline-flex; align-items: center; min-height: 32px; }

/* logo 是白底深字的點陣圖，brightness(0) invert(1) 會把整張洗成純白方塊。
   跟後台側欄一樣墊一層白底，維持原本的字樣。 */
.footer-brand__mark {
  height: 52px;
  width: auto;
  margin-bottom: 16px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 6px 10px;
}
.footer-brand p { margin: 0 0 14px; line-height: 1.8; }

.footer-contact { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-contact strong { color: var(--text-invert); display: block; font-size: 0.78rem; letter-spacing: 0.1em; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-contact .num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--seal-400);
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.8rem;
}
.footer-credits { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.footer-credits a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-credits span + span::before { content: "|"; margin-right: 10px; color: var(--line-dark); }

/* --------------------------------------------------------------------------
   19. 進場動畫（一定要 gate 在 .js 之下）
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   20. 響應式
   -------------------------------------------------------------------------- */
/* 1400px 以下先收掉頁首的電話區塊，把寬度讓給選單 */
@media (max-width: 1400px) {
  .header__phone { display: none; }
}

/* 1200px 以下連選單一起收進抽屜 */
@media (max-width: 1200px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  .cta__inner { grid-template-columns: minmax(0, 1fr); }
  .cta__actions { min-width: 0; }
  .entry { grid-template-columns: 96px 1fr; gap: 18px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }

  body { padding-bottom: 56px; }   /* 讓開底部固定聯絡列 */
  .mobile-bar { display: flex; }

  /* 底部固定列已經有電話與 LINE，header 只留選單鈕，把寬度讓給品牌名 */
  .header__cta .btn { display: none; }

  .topbar__inner { justify-content: center; }
  .topbar__note { display: none; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .entry { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0; }
  .entry__aside { display: flex; align-items: center; gap: 12px; }
  .entry__ref { margin-top: 0; }

  .file-list__link { grid-template-columns: 52px 1fr; gap: 12px; padding: 15px 6px; }
  .file-list__meta { grid-column: 2; }

  .dossier-grid { grid-template-columns: minmax(0, 1fr); }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 14px; }

  .qa__q { grid-template-columns: auto 1fr auto; gap: 10px; font-size: 0.96rem; padding: 17px 2px; }
  .qa__a .prose { padding-left: 30px; }

  .prose h2 { font-size: 1.18rem; }
}

@media (max-width: 380px) {
  .brand__mark { height: 34px; }
  .brand__name { font-size: 0.94rem; }
  .brand__tag { display: none; }
}

/* --------------------------------------------------------------------------
   21. 觸控裝置的點擊熱區
   -------------------------------------------------------------------------- */

/* 文字連結的視覺高度只有 20～30px，手指按容易按不準。目標 44px。
   分兩種做法，不能一律用疊的：

   (1) 上下有空間的孤立連結 → 用 ::before 疊一層透明熱區，完全不動版面。
   (2) 排在一起的列表連結 → 必須真的把行高撐開（見前面各處的 min-height）。
       這種如果用疊的，44px 熱區會蓋到上下相鄰的連結，
       結果是「按到隔壁那一個」，比熱區太小更糟。 */
@media (pointer: coarse) {
  .link-more,
  .crumb a,
  .topbar__links a,
  .footer-credits a,
  .footer-contact a { position: relative; }

  .link-more::before,
  .crumb a::before,
  .topbar__links a::before,
  .footer-credits a::before,
  .footer-contact a::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }

  /* .link-more 的箭頭本來就用 ::after，不衝突 */
}

@media print {
  .site-header, .mobile-bar, .site-footer, .cta, .crumb, .sidebar { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   22. 站別主題層 — 府城報刊
   --------------------------------------------------------------------------
   權杖換完之後，這裡處理「換色換不出來」的部分：分區方式、字重、形狀與母題。
   放在最後面，要調整識別只看這一段，不必翻遍整份檔案。

   從 tnndet 骨架複製過來時，上一站留著**兩層**主題（daredit 的「夜間勤務」
   被 tnndet 的「田野調查」蓋掉），互相覆寫。這一站整段刪掉重寫，只留一層。
   ========================================================================== */

/* --- 底：沙米紙，只加一點點右上角的暖光，不做格線 --------------------------
   tnndet 用田埂格線當底紋，這裡刻意不用任何規則圖樣 —— 報紙的紙就是一張紙。 */
body {
  font-family: var(--font-sans);
  background: var(--paper-200);
  background-image: radial-gradient(ellipse at 100% 0%, rgba(217, 138, 78, 0.07) 0, transparent 50%);
}

/* --- 標題：細字重 300 + 寬字距 --------------------------------------------
   五站裡沒有人用細字重。大標題用 300 靠字級撐氣勢，
   h3 以下字級小，300 會細到看不清，回到 500。 */
h1, h2 {
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.35;
}
h3, h4, h5, h6 {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 內文裡的 strong 不能跟著細：那是強調，不是標題 */
.prose strong { font-weight: 700; }

/* --- 頁首：報頭式 ----------------------------------------------------------
   底部一道雙線，像報紙報頭下的那兩條線。不做毛玻璃、不做陰影。 */
.topbar { background: var(--ink-900); }

.site-header {
  background: var(--paper-100);
  backdrop-filter: none;
  border-bottom: 3px double var(--rule);
}
.site-header.is-stuck { box-shadow: none; }

.brand__name {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.12em;
}
.brand__tag { letter-spacing: 0.24em; }

.nav__link { font-weight: 400; letter-spacing: 0.04em; }
.nav__link.is-active { font-weight: 500; }
/* 底線改成雙線的上半條那麼細，而不是 2px 色塊 */
.nav__link::after { height: 1px; background: var(--rule); bottom: 6px; }

.header__phone-num { color: var(--seal-500); }

.nav-toggle { border-color: var(--rule); }

/* --- 頁首桌機版：置中報頭 ----------------------------------------------
   其他五站的頁首都是「logo 靠左、選單、電話與按鈕靠右」一整排。
   這一站在桌機改成報紙報頭：品牌置中、選單在下一排、中間隔一道細線。

   只用 grid-template-areas 重排，不動 header.blade.php 的 HTML ——
   手機版（1200 以下收成抽屜）完全沿用共用的樣式，不必另外維護一份。

   頁首因此變高（兩排），錨點的捲動留白要一起調；首頁直排標籤的 sticky 位置
   在 home.css 調（home.css 比這支晚載入，寫在這裡會被蓋掉）。 */
@media (min-width: 1201px) {
  html { scroll-padding-top: 190px; }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      ".   brand cta"
      "nav nav   nav";
    align-items: center;
    column-gap: 24px;
    min-height: 0;
    padding-top: 14px;
  }
  .brand { grid-area: brand; justify-content: center; }
  .brand__text { align-items: center; text-align: center; }
  .brand__name { font-size: 1.25rem; letter-spacing: 0.24em; }
  .header__cta { grid-area: cta; justify-self: end; }

  .nav {
    grid-area: nav;
    justify-content: center;
    gap: clamp(4px, 1.4vw, 22px);
    margin-top: 12px;
    border-top: 1px solid var(--rule);
  }
  .nav__link { padding-block: 12px; }

}

/* --- 按鈕：直角 + 套版錯位實影 ---------------------------------------------
   主按鈕像印刷時沒對準的第二色版：底色往右下偏移一層焦褐。
   按下去時影子收回，有「壓下去」的實體感。 */
.btn {
  border-radius: 0;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease),
              background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn--seal {
  background: var(--seal-500);
  color: #fff;
  box-shadow: var(--press);
}
.btn--seal:hover {
  background: var(--seal-600);
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink-900);
}
.btn--seal:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink-900); }

/* 加入 LINE 免費諮詢：LINE 官方綠，跟主按鈕一樣有套版錯位的實影（2026-09-15） */
.btn--line {
  gap: 10px;
  background: #06C755;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--press);
}
.btn--line:hover,
.btn--line:focus-visible {
  background: #05B34C;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink-900);
}
.btn--line:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink-900); }
.btn--line__icon { flex-shrink: 0; }

/* 描邊按鈕：只畫底線，不畫四邊框 —— 呼應「不畫框」 */
.btn--ghost {
  border-width: 0 0 1px;
  padding-inline: 4px;
  min-height: 44px;
}
.btn--ghost:hover { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
}

/* --- 內頁頁首：淺底報頭，不用深色大色塊 ----------------------------------
   其他四站的內頁頁首都是深色滿版。這裡改成淺底 + 大細字標題 + 下方實線，
   深色只留給頁尾與結尾的行動呼籲。 */
.page-head {
  background: var(--paper-100);
  color: var(--text-body);
  border-bottom: 1px solid var(--rule);
  /* 深底容器共用的描邊按鈕變數，這裡是淺底，要改回深色字 */
  --btn-ghost-fg: var(--text-strong);
  --btn-ghost-border: var(--rule);
  --btn-ghost-border-hover: var(--seal-500);
  --btn-ghost-bg-hover: transparent;
}
.page-head::before { display: none; }
.page-head__kicker {
  color: var(--seal-500);
  letter-spacing: 0.3em;
}
.page-head__title {
  color: var(--text-strong);
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 300;
}
.page-head__lead { color: var(--text-muted); }

.crumb { background: transparent; border-bottom: 0; }

/* --- 區塊標題：實線在上，不在右 ------------------------------------------ */
.sec-head__index {
  color: var(--seal-500);
  letter-spacing: 0.3em;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.sec-head__index::after { display: none; }

.section--paper { background: var(--paper-100); }
.section--rule { border-top: 1px solid var(--rule); }

/* --- 卡片：拿掉框與陰影，改成頂端一條實線 ---------------------------------
   「卷宗卡」在其他站是一張有邊框的卡。這裡只剩一條頂線與留白，
   hover 不浮起，只改標題顏色 —— 報紙上的文章不會浮起來。 */
.dossier,
.team-card,
.panel {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}
.dossier:hover,
.team-card:hover { transform: none; box-shadow: none; border-color: var(--seal-500); }

.dossier--plain { border-top-width: 1px; }
.dossier__plate { padding-inline: 0; }
.dossier__body { padding-inline: 0; }
.dossier__foot { border-top-style: solid; }
.dossier__no { -webkit-text-stroke-color: var(--line-mid); font-weight: 300; }
.dossier__stamp { border-radius: 0; }
.dossier__tab { border-radius: 0; }

.team-card__body { padding-inline: 0; }
.team-card__photo { filter: sepia(0.12) saturate(0.92); }

/* 側欄的深色諮詢卡保留深底，但一樣不畫框 */
.panel { padding: 20px 0; }
.panel--ink { padding: 22px; border-top: 0; background: var(--ink-800); }
.panel__title { font-weight: 500; }

/* --- 內文：h2 左邊不要色條，改成上方細線 --------------------------------- */
.prose h2 {
  padding-left: 0;
  padding-top: 14px;
  border-left: 0;
  border-top: 1px solid var(--rule);
  font-weight: 400;
}
.prose img { border: 0; }
.prose blockquote {
  background: transparent;
  border-left: 0;
  border-top: 1px solid var(--line-mid);
  border-bottom: 1px solid var(--line-mid);
  padding-inline: 0;
  font-size: 1.08rem;
  color: var(--text-strong);
}

/* --- 表單：只畫底線 ------------------------------------------------------- */
.form-control {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding-inline: 2px;
}
.form-control:focus { box-shadow: none; border-bottom: 2px solid var(--seal-500); }
select.form-control { background: var(--paper-100); }
textarea.form-control { border: 1px solid var(--line-mid); padding: 12px; }

.alert { border-radius: 0; }
.pager .page-link { border-radius: 0; background: transparent; }

/* --- 流程時間軸：圓點改成方框 --------------------------------------------- */
.timeline::before { background: var(--rule); }
.timeline__dot { border-radius: 0; border-color: var(--rule); background: var(--paper-200); }

/* --- 結尾行動呼籲：深赭，不是深褐 ----------------------------------------
   頁尾已經是深褐，兩塊深色疊在一起分不出哪裡結束。CTA 改用深赭土。 */
.cta { background: var(--seal-600); }
.cta::before { background: radial-gradient(ellipse at 0% 0%, rgba(36, 25, 19, 0.35) 0, transparent 60%); }
.cta__title { font-weight: 300; }
.cta .btn--seal { background: var(--ink-900); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
.cta .btn--seal:hover { background: #000; }

/* --- 頁尾 ---------------------------------------------------------------- */
.site-footer { background: var(--ink-900); }
.site-footer h3 { font-weight: 500; letter-spacing: 0.16em; }
.footer-brand__mark { border-radius: 0; }
.footer-contact .num { color: var(--seal-400); }

.mobile-bar a.is-seal { background: var(--seal-500); }

/* --- 數字：等寬 ----------------------------------------------------------- */
.num,
.file-list__no,
.entry__date { font-variant-numeric: tabular-nums; }

/* --- 直排標籤（首頁與內頁共用的母題）------------------------------------
   台南是五站裡最「老」的城市，直排是這一站唯一用襯線的地方。
   手機上寬度不夠就轉回橫排，不要硬撐。 */
.v-label {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--seal-500);
}

@media (max-width: 860px) {
  .v-label { writing-mode: horizontal-tb; letter-spacing: 0.2em; }
}

/* --- 觸控目標（WCAG 2.2 AA 44px）----------------------------------------- */
@media (pointer: coarse) {
  .topbar__links a,
  .link-more { position: relative; }

  .topbar__links a::before,
  .link-more::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: 44px;
    transform: translateY(-50%);
    min-width: 44px;
  }
}

/* --- 分類頁橫幅 ----------------------------------------------------------- */
.svc-banner { margin: 0; padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.svc-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  box-shadow: var(--press);
}
