/* ==========================================================================
   名字研究所 — 青綠學院主題
   顏色都集中在 :root 的變數，想微調色調只要改這裡。
   ========================================================================== */

:root {
  --bg: #f5fdfc;
  --bg-2: #ecfdf5;
  --surface: #ffffff;
  --surface-2: #d1fae5;
  --line: #c6ece0;
  --line-strong: #99d9c4;

  --gold: #0d9488;
  --gold-light: #2dd4bf;
  --gold-dark: #0f766e;

  --text: #042f2e;
  --text-dim: #1a5c54;
  --text-mute: #4d8a82;

  --danger: #dc2626;
  --ok: #16a34a;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(39, 26, 16, .06);
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  --container: 1120px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(13, 148, 136, .18); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover, a:focus-visible { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.4; color: var(--text); margin: 0 0 .6em; font-weight: 700; }
body:not(.admin) :is(h1, h2, h3, h4) { text-wrap: balance; overflow-wrap: anywhere; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--gold); color: #111; padding: 8px 14px; border-radius: 6px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

.site-nav .nav-admin > a { color: var(--gold-dark); border: 1px solid var(--gold-dark); border-radius: 999px; padding: 6px 14px; }
.site-nav .nav-admin > a:hover { border-color: var(--gold); text-decoration: none; }
.site-nav .nav-admin .sub-nav { left: auto; right: 0; }
.site-nav .nav-admin .sub-nav a { border: 0; border-radius: 6px; padding: 8px 12px; color: var(--text-dim); }
.site-nav .nav-admin .sub-nav a:hover { color: var(--gold-dark); }

/* ---------- 頁首 / 導覽 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; }
.brand:hover { color: var(--gold-dark); text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; background: var(--gold); transform: rotate(45deg);
  border-radius: 3px;
}
.brand-name { color: var(--gold-dark); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a { display: block; padding: 8px 14px; color: var(--text-dim); font-size: .95rem; border-radius: 6px; }
.site-nav a:hover, .site-nav a.is-active { color: var(--gold-dark); text-decoration: none; background: rgba(13, 148, 136, .08); }
.site-nav a.is-active { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 6px 6px 0 0; }

.site-nav .has-sub { position: relative; }
.sub-nav {
  display: none !important; position: absolute; top: 100%; left: 0; min-width: 190px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 6px !important; box-shadow: var(--shadow); flex-direction: column; align-items: stretch !important; gap: 0 !important;
}
.has-sub:hover > .sub-nav, .has-sub:focus-within > .sub-nav { display: flex !important; }
.sub-nav a { padding: 8px 12px; font-size: .9rem; }

.nav-toggle { display: none; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: var(--gold); margin: 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: 0 18px 30px rgba(0, 0, 0, .5); }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a.is-active { box-shadow: none; }
  .site-nav .nav-admin > a { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 8px; }
  .site-nav .nav-admin .sub-nav a { border-radius: 0; border-bottom: 1px solid var(--line); padding: 12px 8px; }
  .sub-nav { display: flex !important; position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 14px !important; }
  .sub-nav a { padding: 10px 8px; font-size: .92rem; }
  .no-js .site-nav { width: 100%; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- 版面 ---------- */

.site-main { min-height: 60vh; padding-bottom: 72px; overflow-x: clip; }

.section { padding: 56px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-title { font-size: 1.55rem; margin: 0; position: relative; padding-left: 16px; }
.section-title::before { content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: 4px; border-radius: 2px; background: var(--gold); }
.section-more { font-size: .9rem; }
.muted { color: var(--text-mute); }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem; letter-spacing: .04em;
  border: 1px solid var(--gold); color: var(--gold-dark); background: transparent; cursor: pointer; font-family: inherit; line-height: 1.4;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: rgba(13, 148, 136, .12); color: var(--gold-dark); text-decoration: none; transform: translateY(-1px); }
.btn-gold, .btn-brand { background: var(--gold); color: #fff; border-color: transparent; }
.btn-gold:hover, .btn-brand:hover { background: var(--gold-dark); color: #fff; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
/* hero 坐在深色照片上，按鈕文字要維持亮色，跟頁面其他地方（淺色底）的 .btn 分開處理 */
.hero .btn { color: var(--gold-light); }
.hero .btn:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.hero .btn-brand, .hero .btn-brand:hover { color: #fff; }

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

.hero {
  position: relative; overflow: hidden; text-align: center; padding: 120px 0 128px;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, .62) 0%, rgba(10, 10, 11, .74) 55%, var(--bg) 100%),
    url("../../img/sites/mingzi/home/hero.jpg") center 40% / cover no-repeat,
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 220px; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow { color: var(--gold); letter-spacing: .4em; font-size: .8rem; margin: 0 0 18px; text-transform: uppercase; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 0 0 18px; letter-spacing: .05em; color: var(--gold-light); }
.hero-lead { max-width: 640px; margin: 0 auto 32px; color: #fef3ea; opacity: .92; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-ghost { background: rgba(10, 10, 11, .35); backdrop-filter: blur(4px); }
.hero-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin: 34px 0 0; padding: 0; list-style: none; color: var(--gold-light); font-size: .88rem; letter-spacing: .12em; }
.hero-points li { display: inline-flex; align-items: center; gap: 10px; }
.hero-points li + li::before { content: ""; width: 4px; height: 4px; transform: rotate(45deg); background: var(--gold); margin-right: 16px; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -64px; position: relative; z-index: 2; }
.trust-item { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px 24px 22px; background: var(--surface); box-shadow: var(--shadow); }
.trust-no { position: absolute; top: 14px; right: 18px; font-family: var(--font-serif); font-size: 1.6rem; line-height: 1; color: var(--gold); opacity: .4; }
.trust-item h2 { font-size: 1.05rem; color: var(--gold-dark); margin: 0 0 8px; }
.trust-item p { margin: 0; color: var(--text-dim); font-size: .93rem; line-height: 1.75; }

/* ---------- 主題卡片 ---------- */

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; counter-reset: hub; }
.hub-card {
  display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); position: relative; overflow: hidden;
  transition: border-color .2s;
}
.hub-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold); opacity: .5; }
.hub-card::after { counter-increment: hub; content: counter(hub, decimal-leading-zero); position: absolute; right: 20px; top: 16px; font-family: var(--font-serif); font-size: 2rem; line-height: 1; color: var(--gold); opacity: .16; }
.hub-card:hover { border-color: var(--gold-dark); }
.hub-card h3 { margin: 0; font-size: 1.2rem; }
.hub-card h3 a { color: var(--text); }
.hub-card h3 a:hover { color: var(--gold-dark); text-decoration: none; }
.hub-count { color: var(--text-mute); font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 12px; font-size: .85rem; color: var(--text-dim); }
.chips a:hover { border-color: var(--gold); color: var(--gold-dark); text-decoration: none; }

/* ---------- 文章卡片 ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: var(--gold-dark); box-shadow: var(--shadow); }
.card-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-cover-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-family: var(--font-serif); font-size: 2.2rem; letter-spacing: .12em; color: var(--gold-light); text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
  background:
    linear-gradient(180deg, rgba(10, 10, 11, .45), rgba(10, 10, 11, .78)),
    url("../../img/sites/mingzi/home/card-bg.jpg") center / cover no-repeat,
    var(--surface-2);
}
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.card-meta { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .75rem; letter-spacing: .05em; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold); }
.tag-pillar { background: rgba(13, 148, 136, .14); border-color: var(--gold-dark); color: var(--gold-dark); }
.card-title { font-size: 1.1rem; margin: 2px 0; overflow-wrap: anywhere; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--gold-dark); text-decoration: none; }
.card-desc { margin: 0; color: var(--text-dim); font-size: .92rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin: auto 0 0; padding-top: 8px; color: var(--text-mute); font-size: .8rem; }

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rank-list li { counter-increment: rank; display: flex; gap: 16px; align-items: baseline; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before { content: counter(rank); font-family: var(--font-serif); font-size: 1.3rem; color: var(--gold-dark); min-width: 1.2em; }
.rank-list a { color: var(--text); }
.rank-list a:hover { color: var(--gold-dark); }

.empty-note { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 36px 20px; text-align: center; color: var(--text-mute); background: var(--bg-2); }

/* ---------- 頁面標題 / 麵包屑 ---------- */

.page-head { padding: 44px 0 30px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 10px; }
.page-head .lead { margin: 0; max-width: 720px; color: var(--text-dim); }

.breadcrumb { padding: 18px 0 0; font-size: .85rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { color: var(--text-mute); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--gold-dark); }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--gold-dark); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 26px 0 22px; }
.toolbar .label { color: var(--text-mute); font-size: .9rem; margin-right: 4px; }
.pill { display: inline-block; padding: 4px 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-dim); font-size: .88rem; }
.pill:hover { border-color: var(--gold); color: var(--gold-dark); text-decoration: none; }
.pill.is-active { background: rgba(13, 148, 136, .14); border-color: var(--gold); color: var(--gold-dark); }

/* ---------- 分頁 ---------- */

.pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 44px 0 0; }
.pager a, .pager span { min-width: 40px; padding: 6px 14px; text-align: center; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text-dim); font-size: .92rem; }
.pager a:hover { border-color: var(--gold); color: var(--gold-dark); text-decoration: none; }
.pager .is-current { background: var(--gold); color: #fff; border-color: transparent; font-weight: 700; }

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

.article-wrap { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.article-head { padding: 12px 0 8px; }
.article-head h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); margin: 10px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-mute); font-size: .85rem; margin: 0 0 20px; }
.article-meta a { color: var(--text-dim); }
.article-lead, .answer-block { font-size: 1.1rem; color: var(--text); padding: 18px 22px; border-left: 3px solid var(--gold); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 26px; }
.article-cover { margin: 0 0 30px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.preview-banner { margin: 18px 0 0; padding: 10px 16px; border: 1px dashed var(--gold); border-radius: 8px; color: var(--gold-dark); background: rgba(13, 148, 136, .08); font-size: .9rem; }

.toc { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 22px; background: var(--surface); margin: 0 0 34px; }
.toc-title { font-family: var(--font-serif); color: var(--gold-dark); margin: 0 0 8px; font-size: 1.02rem; }
.toc ol { margin: 0; padding-left: 1.4em; color: var(--text-mute); }
.toc li { margin: 4px 0; }
.toc a { color: var(--text-dim); }
.toc a:hover { color: var(--gold-dark); }

.article-content section { margin: 0 0 40px; }
.article-content h2 { font-size: 1.45rem; margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); scroll-margin-top: calc(var(--header-h) + 16px); position: relative; }
.article-content h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 2px; background: var(--gold); }
.article-content h3 { font-size: 1.15rem; margin: 30px 0 10px; color: var(--gold-dark); scroll-margin-top: calc(var(--header-h) + 16px); }
.article-content p { margin: 0 0 1.2em; color: var(--text); }
.article-content ul, .article-content ol { margin: 0 0 1.3em; padding-left: 1.5em; }
.article-content li { margin: .35em 0; }
.article-content li::marker { color: var(--gold); }
.article-content strong { color: var(--gold-dark); }
.article-content blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--gold-dark); background: var(--surface); color: var(--text-dim); border-radius: 0 8px 8px 0; }
.article-content img { border-radius: 8px; margin: 1.2em 0; }
.article-content { overflow-wrap: anywhere; }
.article-content pre { margin: 1.4em 0; padding: 14px 16px; overflow-x: auto; max-width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; font-size: .88rem; line-height: 1.65; -webkit-overflow-scrolling: touch; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.article-content :not(pre) > code { padding: 1px 6px; background: var(--surface-2); border-radius: 4px; color: var(--gold-dark); }
.article-content pre code { white-space: pre; overflow-wrap: normal; }
.article-content figure { margin: 1.2em 0; }
.article-content iframe, .article-content video, .article-content embed, .article-content object { max-width: 100%; }
.article-content .table-wrap, .article-content table { width: 100%; }
.article-content table { border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.article-content th, .article-content td { border: 1px solid var(--line-strong); padding: 10px 14px; text-align: left; vertical-align: top; }
.article-content th { background: var(--surface-2); color: var(--gold-dark); white-space: nowrap; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 34px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.faq { margin-top: 12px; }
.faq h3 { border-left: 3px solid var(--gold); padding-left: 12px; }

.notice { margin: 34px 0 0; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-2); color: var(--text-mute); font-size: .88rem; line-height: 1.75; }

.related { margin-top: 56px; }

/* ---------- 一般文字頁 (about / contact / privacy / disclaimer) ---------- */

.prose { max-width: 800px; margin: 0 auto; padding: 36px 20px 0; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; padding-left: 14px; border-left: 3px solid var(--gold); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { padding-left: 1.4em; }
.prose li::marker { color: var(--gold); }
.prose .updated { color: var(--text-mute); font-size: .88rem; }
.info-box { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px 26px; background: var(--surface); margin: 26px 0; }
.info-box p { margin: 0; }
.info-box strong { color: var(--gold-dark); }

/* ---------- 網站導覽 ---------- */

.sitemap-tree { list-style: none; padding: 0; margin: 0; }
.sitemap-tree > li { margin-bottom: 30px; }
.sitemap-tree h2 { font-size: 1.25rem; margin: 0 0 8px; }
.sitemap-tree h3 { font-size: 1.02rem; margin: 18px 0 6px; color: var(--gold-dark); }
.sitemap-tree ul { margin: 0; padding-left: 1.3em; }
.sitemap-tree ul li { margin: 4px 0; }
.sitemap-tree ul li::marker { color: var(--gold-dark); }
.fixed-links { columns: 2; padding-left: 1.3em; }

/* ---------- 錯誤頁 ---------- */

.error-page { text-align: center; padding: 100px 0 40px; }
.error-code { font-family: var(--font-serif); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; margin: 0 0 10px; color: var(--gold); }
.error-page h1 { font-size: 1.6rem; }
.error-page p { color: var(--text-dim); max-width: 480px; margin: 0 auto 28px; }

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

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer-brand { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 10px; color: var(--gold-dark); display: inline-block; }
.footer-col p { color: var(--text-mute); font-size: .9rem; margin: 0; line-height: 1.8; }
.footer-title { font-size: .95rem; letter-spacing: .1em; color: var(--gold); margin: 0 0 12px; font-family: var(--font-sans); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: var(--text-dim); font-size: .92rem; }
.footer-col a:hover { color: var(--gold-dark); }
.footer-bottom { margin-top: 36px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--text-mute); font-size: .875rem; }

/* ---------- 首頁：閱讀指南 ---------- */

.guide { display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: center; }
.guide-photo { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.guide-photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(13, 148, 136, .18); background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 11, .55)); pointer-events: none; }
.guide-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.guide-body .hero-eyebrow { margin-bottom: 10px; }
.guide-title { font-size: 1.7rem; margin: 0 0 22px; }
.guide-steps { list-style: none; margin: 0 0 26px; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.guide-steps li { counter-increment: step; position: relative; padding-left: 52px; display: flex; flex-direction: column; gap: 2px; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); color: var(--gold-dark); background: rgba(13, 148, 136, .08); }
.guide-steps strong { color: var(--text); font-size: 1.02rem; }
.guide-steps span { color: var(--text-dim); font-size: .93rem; line-height: 1.7; }

/* ---------- 響應式 ---------- */

@media (max-width: 860px) {
  .trust { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding: 72px 0 96px; }
  .trust { margin-top: -44px; }
  .guide { grid-template-columns: 1fr; gap: 26px; }
  .fixed-links { columns: 1; }
}
/* 觸控 / 窄螢幕：放大可點擊範圍（至少約 40–44px）；整張卡片都可點 */
@media (max-width: 860px), (pointer: coarse) {
  body:not(.admin) .breadcrumb { padding-top: 8px; }
  body:not(.admin) .breadcrumb ol { gap: 0 6px; }
  body:not(.admin) .breadcrumb li { display: inline-flex; align-items: center; min-height: 40px; }
  body:not(.admin) .breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 3px; }
  body:not(.admin) .section-more { display: inline-flex; align-items: center; min-height: 44px; }
  body:not(.admin) .toc li { margin: 0; }
  body:not(.admin) .toc a { display: inline-block; padding: 6px 0; }
  body:not(.admin) .footer-col li { margin: 0; }
  body:not(.admin) .footer-col a { display: inline-block; padding: 8px 0; }
  body:not(.admin) .pill { padding: 9px 18px; }
  body:not(.admin) .chips { gap: 10px; }
  body:not(.admin) .chips a { position: relative; z-index: 1; padding: 8px 15px; }
  body:not(.admin) .pager a, body:not(.admin) .pager span { min-width: 44px; padding: 10px 14px; }
  body:not(.admin) .card { position: relative; }
  body:not(.admin) .card-title a::after, body:not(.admin) .hub-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
  body:not(.admin) .rank-list a { display: block; padding: 4px 0; }
  body:not(.admin) .brand { min-height: 44px; }
}

/* 觸控裝置沒有 hover：不要讓卡片「點了之後卡在浮起的狀態」 */
@media (hover: none) {
  body:not(.admin) .card:hover, body:not(.admin) .hub-card:hover, body:not(.admin) .btn:hover { transform: none; }
  body:not(.admin) .card:hover .card-cover img { transform: none; }
  body:not(.admin) .card:hover { box-shadow: none; }
}

@media (max-width: 640px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(10, 10, 11, .62) 0%, rgba(10, 10, 11, .74) 55%, var(--bg) 100%),
      url("../../img/sites/mingzi/home/hero-m.jpg") center 40% / cover no-repeat,
      var(--bg);
  }
}

@media (max-width: 520px) {
  :root { --header-h: 60px; }
  body:not(.admin) .container { padding: 0 16px; }
  body:not(.admin) .article-wrap { padding: 0 16px; }
  body:not(.admin) .prose { padding: 24px 16px 0; }
  body:not(.admin) .header-inner { gap: 10px; }
  body:not(.admin) .brand { min-width: 0; gap: 10px; font-size: 1.05rem; letter-spacing: .03em; }
  body:not(.admin) .card-grid, body:not(.admin) .hub-grid { grid-template-columns: 1fr; }
  body:not(.admin) .section { padding-top: 40px; }
  body:not(.admin) .section-title { font-size: 1.35rem; }
  body:not(.admin) .hero { padding: 56px 0 84px; }
  body:not(.admin) .hero-eyebrow { font-size: .78rem; letter-spacing: .2em; margin-bottom: 14px; }
  body:not(.admin) .hero h1 { font-size: clamp(1.6rem, 7.4vw, 2.2rem); }
  body:not(.admin) .hero-lead { font-size: 1rem; margin-bottom: 26px; }
  body:not(.admin) .hero-actions { gap: 12px; }
  body:not(.admin) .hero-actions .btn { flex: 1 1 0; min-width: 132px; text-align: center; padding: 13px 16px; }
  body:not(.admin) .hero-points { gap: 8px 18px; margin-top: 26px; font-size: .82rem; letter-spacing: .08em; }
  body:not(.admin) .hero-points li + li::before { margin-right: 10px; }
  body:not(.admin) .trust { margin-top: -36px; gap: 14px; }
  body:not(.admin) .trust-item { padding: 20px 20px 18px; }
  body:not(.admin) .hub-card { padding: 22px 20px; }
  body:not(.admin) .card-body { padding: 16px 18px 18px; }
  body:not(.admin) .guide-title { font-size: 1.45rem; margin-bottom: 18px; }
  body:not(.admin) .guide-photo img { aspect-ratio: 16 / 10; }
  body:not(.admin) .page-head { padding: 30px 0 22px; }
  body:not(.admin) .page-head h1 { font-size: 1.6rem; }
  body:not(.admin) .article-head h1 { font-size: 1.6rem; }
  body:not(.admin) .article-lead, body:not(.admin) .answer-block { font-size: 1.02rem; padding: 14px 16px; }
  body:not(.admin) .article-content h2 { font-size: 1.3rem; margin-top: 36px; }
  body:not(.admin) .article-content h3 { font-size: 1.1rem; }
  body:not(.admin) .article-content table { font-size: .9rem; }
  body:not(.admin) .article-content th, body:not(.admin) .article-content td { padding: 8px 10px; }
  body:not(.admin) .article-content td { min-width: 6.5em; }
  body:not(.admin) .toc { padding: 16px 18px; }
  body:not(.admin) .info-box { padding: 18px; }
  body:not(.admin) .prose h2 { font-size: 1.2rem; }
  body:not(.admin) .rank-list li { padding: 10px 16px; }
  body:not(.admin) .error-page { padding: 64px 0 24px; }
  body:not(.admin) .site-footer { padding-top: 36px; }
  body:not(.admin) .footer-grid { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .pager, .toc, .related { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- 導覽列的「免費諮詢」CTA（跟其他項目分開，用實心底凸顯） ---------- */

.nav-cta > a { background: var(--gold); color: #fff !important; border-radius: 999px; padding: 8px 18px !important; }
.nav-cta > a:hover { background: var(--gold-dark); }

/* ---------- 首頁：登記前文件檢查清單 ---------- */

.checklist-section { margin-bottom: 8px; }
.doc-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.doc-checklist li {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.doc-check {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 6px; background: var(--gold); color: #fff; font-weight: 700; font-size: .9rem; margin-top: 2px;
}
.doc-checklist li strong { display: block; font-size: .98rem; color: var(--text); }
.doc-checklist li span { display: block; margin-top: 4px; color: var(--text-dim); font-size: .88rem; line-height: 1.7; }

/* ---------- 首頁：三種登記類型（CSS-only radio/label tabs，不用 JS） ---------- */

.entity-tabs-section { margin-bottom: 8px; }
.entity-tabs { position: relative; }
.entity-tab-input { position: absolute; left: -9999px; opacity: 0; }
.entity-tab-labels { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.entity-tab-labels label {
  cursor: pointer; padding: 10px 20px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .9rem; font-weight: 700; color: var(--text-dim); background: var(--surface); transition: background .15s, color .15s, border-color .15s;
}
.entity-tab-panels { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 24px 26px; }
.entity-tab-panel { display: none; color: var(--text-dim); font-size: .95rem; line-height: 1.85; }
.entity-tab-panel p { margin: 0; }
#tab-sole:checked ~ .entity-tab-labels label[for="tab-sole"],
#tab-ltd:checked ~ .entity-tab-labels label[for="tab-ltd"],
#tab-corp:checked ~ .entity-tab-labels label[for="tab-corp"] {
  background: var(--gold); color: #fff; border-color: transparent;
}
#tab-sole:checked ~ .entity-tab-panels .panel-sole,
#tab-ltd:checked ~ .entity-tab-panels .panel-ltd,
#tab-corp:checked ~ .entity-tab-panels .panel-corp { display: block; }

/* ---------- 免費諮詢 (quote) 頁 ---------- */

.quote-layout { display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: start; padding: 36px 20px 64px; }
.quote-form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.quote-form label { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--text-dim); font-weight: 700; }
.quote-form .req { color: var(--danger); font-weight: 400; font-size: .82rem; }
.quote-form input, .quote-form textarea, .quote-form select {
  font: inherit; font-weight: 400; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg); color: var(--text); resize: vertical;
}
.quote-form input:focus, .quote-form textarea:focus, .quote-form select:focus { outline: 2px solid var(--gold-light); outline-offset: 1px; border-color: var(--gold); }
.quote-form .consent-field {
  flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text-dim); font-size: .88rem; line-height: 1.6;
}
.quote-form .consent-field input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }
.quote-form .consent-field a { color: var(--gold-dark); text-decoration: underline; }
.quote-form .btn { align-self: flex-start; margin-top: 4px; }
.quote-disclosure { margin: 6px 0 0; padding: 14px 16px; border-radius: 8px; background: var(--bg-2); color: var(--text-mute); font-size: .875rem; line-height: 1.75; }
.quote-disclosure strong { color: var(--text-dim); }
/* 誘餌欄位：一般使用者看不到，機器人常見的自動填表才會填到 */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius); font-size: .92rem; line-height: 1.7; }
.notice-ok { background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .35); color: #166534; }
.notice-error { background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .35); color: #991b1b; }
.notice p { margin: 4px 0 0; }

.quote-side-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.quote-side-col h2 { font-size: 1.1rem; margin: 0 0 14px; padding-left: 12px; border-left: 3px solid var(--gold); }
.quote-recap-list { margin: 0 0 16px; padding-left: 1.2em; color: var(--text-dim); font-size: .92rem; }
.quote-recap-list li { margin: 8px 0; }

@media (max-width: 860px) {
  .quote-layout { grid-template-columns: 1fr; }
  .doc-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body:not(.admin) .quote-layout { padding: 24px 16px 48px; gap: 24px; }
  body:not(.admin) .quote-form { padding: 20px; }
  body:not(.admin) .entity-tab-panels { padding: 20px; }
}

/* 文章 HTML 規格：內文 AI 配圖 */
.article-content .article-ai-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.spec-issues ul, .ai-img-status ul { margin: 6px 0 12px 1.2em; padding: 0; }

/* ==========================================================================
   公司登記站：深色 header；首頁為檢查清單 hero、比較表、階段卡、文章雙欄、問答
   ========================================================================== */
.site-mingzi .site-header { background: #27211c; border-bottom: 0; }
.site-mingzi .site-header .brand, .site-mingzi .site-header .brand-name { color: #fff; }
.site-mingzi .site-header .brand-mark { border-radius: 50%; transform: none; }
@media (min-width: 861px) {
  .site-mingzi .site-nav > ul > li > a { color: #f5e6da; }
  .site-mingzi .site-nav > ul > li > a:hover, .site-mingzi .site-nav > ul > li > a.is-active { color: #fff; background: rgba(255, 255, 255, .1); }
}
.site-mingzi .nav-toggle-bar { background: #fff; }
.cl-top { padding: 56px 0; background: var(--bg-2); }
.cl-top-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.cl-label { display: inline-block; margin: 0 0 14px; padding: 4px 12px; background: var(--gold); color: #fff; font-size: .82rem; border-radius: 4px; }
.cl-top h1 { margin: 0 0 14px; font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: left; }
.cl-lead { color: var(--text-dim); line-height: 1.85; margin: 0 0 24px; max-width: 560px; }
.cl-checklist { background: var(--surface); border: 2px solid var(--text); padding: 22px 24px; box-shadow: 8px 8px 0 var(--gold-light); }
.cl-checklist-title { margin: 0 0 12px; font-weight: 700; }
.cl-checklist ol { list-style: none; margin: 0; padding: 0; }
.cl-checklist li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dotted var(--line-strong); }
.cl-checklist li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border: 2px solid var(--gold); border-radius: 3px; }
.cl-section { padding-top: 56px; }
.cl-h2 { font-size: 1.4rem; margin: 0 0 20px; padding-left: 14px; border-left: 5px solid var(--gold); }
.cl-table-wrap { overflow-x: auto; }
.cl-table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--surface); }
.cl-table th, .cl-table td { border: 1px solid var(--line-strong); padding: 12px 14px; text-align: left; vertical-align: top; }
.cl-table thead th { background: var(--text); color: #fff; }
.cl-table tbody th { background: var(--bg-2); white-space: nowrap; }
.cl-note { color: var(--text-mute); font-size: .85rem; margin: 10px 0 0; }
.cl-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cl-phase { position: relative; padding: 22px 20px 18px 20px; background: var(--surface); border-top: 4px solid var(--gold); }
.cl-phase-no { position: absolute; right: 16px; top: 12px; font-size: 2rem; font-weight: 700; color: var(--line-strong); }
.cl-phase h3 { margin: 0 0 8px; font-size: 1.1rem; }
.cl-phase p { margin: 0; color: var(--text-dim); font-size: .92rem; line-height: 1.9; }
.cl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; list-style: none; margin: 0; padding: 0; }
.cl-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cl-list a { font-weight: 700; color: var(--text); }
.cl-list p { margin: 6px 0 0; color: var(--text-dim); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-qa dl { margin: 0; }
.cl-qa dt { font-weight: 700; margin-top: 18px; }
.cl-qa dt::before { content: "Q. "; color: var(--gold); }
.cl-qa dd { margin: 6px 0 0; color: var(--text-dim); line-height: 1.8; }
@media (max-width: 860px) {
  .cl-top-grid, .cl-phases, .cl-list { grid-template-columns: 1fr; }
}

/* 桌機版導覽列：主題名稱較長，避免換行成兩行 */
@media (min-width: 861px) {
  .site-mingzi .brand { white-space: nowrap; font-size: 1rem; gap: 8px; }
  .site-mingzi .site-nav ul { gap: 0; }
  .site-mingzi .site-nav > ul > li > a { white-space: nowrap; padding: 8px 9px; font-size: .88rem; }
  .site-mingzi .nav-cta > a { padding: 7px 14px !important; }
}

/* ---------- 主站導流區塊（mainsite-cta.jspf，2026-10-25） ---------- */
.mainsite-cta { margin: 40px 0 0; padding: 24px 26px; border: 1px solid var(--line-strong); border-left: 4px solid var(--gold); border-radius: var(--radius); background: var(--surface); }
.mainsite-cta-title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.mainsite-cta-text { margin: 0 0 16px; color: var(--text-dim); line-height: 1.8; }
.mainsite-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0; }
.mainsite-cta-btn { display: inline-block; padding: 11px 24px; border-radius: 999px; background: var(--gold); color: #fff !important; font-weight: 700; text-decoration: none; }
.mainsite-cta-btn:hover { background: var(--gold-dark); }
.mainsite-cta-link { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.mainsite-cta-link:hover { text-decoration: underline; }
.cl-section + .mainsite-cta { margin-bottom: 8px; }
@media (max-width: 640px) {
  .mainsite-cta { padding: 20px 18px; }
  .mainsite-cta-btn { display: block; width: 100%; text-align: center; }
}

/* ---------- 舊站頁首選單（views/sites/tazi/header.jspf，沿用 tazi 文章頁 tazi-nav，2026-10-25） ---------- */
.tz-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 250, 246, .96); border-bottom: 1px solid #e7d9cb; }
.tz-header-inner { height: 88px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; }
.tz-logo { border-bottom: 0; }
.tz-logo img { width: 185px; height: auto; display: block; }
.tz-nav { display: flex; align-items: center; gap: 38px; }
.tz-nav a { border-bottom: 0; color: #3b342f; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; }
.tz-nav a:hover { color: #b8895f; }
@media (max-width: 550px) {
  .tz-header-inner { height: 70px; padding: 0 18px; }
  .tz-logo img { width: 130px; }
  .tz-nav { gap: 14px; }
  .tz-nav a { font-size: 11px; letter-spacing: .12em; }
}
@media (max-width: 400px) {
  .tz-header-inner { padding: 0 12px; }
  .tz-logo img { width: 104px; }
  .tz-nav { gap: 10px; }
  .tz-nav a { letter-spacing: .06em; }
}
