/* ==========================================================================
   台中質子治療・放射治療｜賴宥良醫師
   排版原則：行動裝置優先，任何情況下都不允許橫向溢出。
   ========================================================================== */

:root {
  --ink:        #16232b;
  --ink-soft:   #46606d;
  --ink-faint:  #6d8792;
  --line:       #dfe7ea;
  --line-soft:  #eef3f5;
  --bg:         #ffffff;
  --bg-tint:    #f5f9fa;
  --accent:     #0f6b7d;
  --accent-dk:  #0a4d5b;
  --accent-bg:  #e6f2f4;
  --warm:       #c25733;   /* 插圖中標示腫瘤／重點的暖色 */

  --wrap:  68rem;   /* 一般區塊最大寬度 */
  --prose: 38rem;   /* 內文可讀寬度，文章 HERO 圖也以此為上限 */

  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 50, .06), 0 8px 24px rgba(16, 40, 50, .05);

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e6eef1;
    --ink-soft:  #a9bfc8;
    --ink-faint: #7f98a3;
    --line:      #27383f;
    --line-soft: #1e2c32;
    --bg:        #0e171b;
    --bg-tint:   #142126;
    --accent:    #5fc2d4;
    --accent-dk: #8ad7e5;
    --accent-bg: #14323a;
    --warm:      #f0865c;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ---------- 重置 ---------- */

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

html {
  -webkit-text-size-adjust: 100%;   /* 避免 iOS 橫置時自動放大字級撐破版面 */
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.9;
  overflow-x: clip;                 /* 保險：任何意外都不會產生橫向捲軸 */
  overflow-wrap: break-word;        /* 長網址、長英文詞不撐破容器 */
  word-break: normal;
  line-break: strict;               /* 中文標點不落在行首 */
}

h1, h2, h3, h4 {
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;                     /* 等比例縮放，永不變形 */
}

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

ul, ol { padding-left: 1.25em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- 容器 ---------- */

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

@media (max-width: 24rem) {
  .wrap { width: min(100% - 1.5rem, var(--wrap)); }
}

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section__heading {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  margin: 0 0 .35em;
  letter-spacing: .02em;
}

.section__heading::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: .55rem;
  background: var(--accent);
  border-radius: 2px;
}

.section__note {
  margin: 0 0 2rem;
  color: var(--ink-faint);
  font-size: .875rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  flex-wrap: wrap;
  padding-block: .5rem;
}

.brand { text-decoration: none; color: inherit; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.brand__name { font-weight: 700; letter-spacing: .02em; }
.brand__desc { font-size: .78rem; color: var(--ink-faint); }

.site-nav { display: flex; align-items: center; gap: 1rem; font-size: .9rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.site-nav__cta {
  padding: .3em .95em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}

.site-nav__cta:hover { background: var(--accent); color: var(--bg) !important; }

/* 窄螢幕：收起品牌副標並縮小間距，讓 sticky 頁首維持單行高度 */
@media (max-width: 30rem) {
  .brand__desc { display: none; }
  .site-nav { gap: .75rem; font-size: .84rem; }
  .site-nav__cta { padding: .3em .8em; }
}

/* ---------- 首頁 HERO ----------
   橫幅左右滿版、上下壓扁；文字在圖片下方，不疊字。
   圖檔本身已裁成 8:3，寬螢幕再用 object-fit 做輕度垂直裁切，
   object-position 偏上以確保人像的頭部永遠在框內。          */

.hero {
  background:
    radial-gradient(80rem 40rem at 85% -10%, var(--accent-bg) 0%, transparent 60%),
    var(--bg-tint);
  border-bottom: 1px solid var(--line);
  padding-block: 0 clamp(1.75rem, 5vw, 3rem);
}

.hero__banner {
  width: 100%;
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
  border-bottom: 1px solid var(--line);
  background: var(--accent-bg);
}

.hero__banner img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 3;          /* 與圖檔一致，窄螢幕完全不裁切 */
  height: auto;
  object-fit: cover;
  object-position: 50% 38%;
}

/* 寬螢幕：左文字、右圖片並排，整體高度取兩者較大值而非相加，
   Hero 因此只佔約四成視窗高度。圖片改為橫向輕度裁切，
   object-position 偏左以保留人像，被裁掉的是右側牆面。      */
@media (min-width: 60rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    align-items: stretch;
    padding-block: 0;
    /* 用 % 而非 100vw：100vw 含捲軸寬度，會讓左緣比內容區多 8px 對不齊 */
    padding-inline: max(1rem, calc((100% - var(--wrap)) / 2)) 0;
    min-height: clamp(300px, 42vh, 440px);
  }

  .hero__banner {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }

  .hero__banner img {
    height: 100%;
    min-height: clamp(300px, 42vh, 440px);
    aspect-ratio: auto;
    object-position: 10% 42%;   /* 偏左：人像在圖片左側，優先保全 */
  }

  .hero__inner {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    /* 左邊距由 .hero 的 padding 負責（已對齊 .wrap），這裡只留與圖片的間距 */
    padding-inline: 0 clamp(1.5rem, 3vw, 2.75rem);
    padding-block: clamp(1.75rem, 4vw, 2.75rem);
  }
}

.hero__text { min-width: 0; }

.hero__title {
  margin: 0 0 .85rem;
  font-size: clamp(1.5rem, 1.05rem + 2.3vw, 2.4rem);
  letter-spacing: .01em;
}

/* 讓標題只在「｜」處換行，姓名不會被拆開 */
.hero__title-main,
.hero__title-name { display: inline-block; }
.hero__title-name { white-space: nowrap; }
.hero__title-sep  { color: var(--ink-faint); font-weight: 400; margin-inline: .1em; }

.hero__org {
  margin: 0 0 .2rem;
  font-size: clamp(.82rem, .78rem + .25vw, .95rem);
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 600;
  padding-left: .75rem;
  border-left: 3px solid var(--accent);
}

.hero__credential {
  margin: 0 0 1.1rem;
  font-size: clamp(.82rem, .78rem + .25vw, .95rem);
  line-height: 1.7;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .01em;
  padding-left: .75rem;
  border-left: 3px solid transparent;
}

.hero__lead {
  margin: 0 0 .4rem;
  max-width: 34em;
  font-size: clamp(.98rem, .93rem + .4vw, 1.12rem);
  line-height: 1.85;
}

.hero__lead--muted {
  color: var(--ink-soft);
  font-size: clamp(.88rem, .85rem + .3vw, 1rem);
  margin-bottom: 0;
}

/* ---------- 插圖內部樣式（SVG 內嵌，因此可跟著深色模式換色） ---------- */

.hero-scene text { font-family: var(--font); }

.hs-gantry        { fill: none; stroke: var(--accent); stroke-width: 11; opacity: .22; stroke-linecap: round; }
.hs-gantry-dot    { fill: var(--accent); opacity: .3; }

.hs-nozzle        { fill: var(--ink-soft); opacity: .8; }
.hs-nozzle-slit   { fill: var(--accent); }

.hs-beam          { fill: var(--accent); opacity: .16; }

.hs-proton circle { fill: var(--accent); }
.hs-plus          { fill: none; stroke: var(--bg); stroke-width: 1.9; stroke-linecap: round; }

.hs-couch         { fill: var(--ink-soft); opacity: .45; }
.hs-couch-leg,
.hs-couch-base    { fill: var(--ink-soft); opacity: .3; }

.hs-body          { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 2; stroke-opacity: .45; }
.hs-face          { fill: none; stroke: var(--ink-soft); stroke-width: 2.1; stroke-linecap: round; }

.hs-tumor         { fill: var(--warm); }
.hs-halo          { fill: none; stroke: var(--warm); stroke-width: 2; opacity: .32; }
.hs-halo--outer   { opacity: .15; }

.hs-lead          { stroke: var(--ink-faint); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .7; }
.hs-callout text  { fill: var(--ink); font-size: 15px; font-weight: 600; }
.hs-callout .hs-callout--sub { fill: var(--ink-faint); font-size: 12.5px; font-weight: 400; }

.hs-axis          { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; opacity: .55; stroke-linecap: round; }
.hs-axis-label    { fill: var(--ink-faint); font-size: 12.5px; }

.hs-depth-line    { stroke: var(--warm); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; }
.hs-depth-text    { fill: var(--warm); font-size: 12px; font-weight: 600; }

.hs-curve           { fill: none; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.hs-curve--proton   { stroke: var(--accent); }
.hs-curve--photon   { stroke: var(--ink-faint); opacity: .7; stroke-dasharray: 7 5; }

.hs-legend text     { fill: var(--ink-soft); font-size: 13px; }
.hs-legend-swatch   { stroke-width: 3.6; }

.hs-deco ellipse    { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .15; }
.hs-deco-core       { fill: var(--accent); opacity: .28; }

/* 插圖在窄螢幕會等比縮到約四成，原本 15px 的標註只剩 6px。
   這裡放大 SVG 內的字級（單位會跟著一起縮），並收起次要說明避免擁擠。 */
@media (max-width: 46rem) {
  .hs-callout text             { font-size: 27px; }
  .hs-callout .hs-callout--sub { display: none; }
  .hs-axis-label               { font-size: 22px; }
  .hs-depth-text               { font-size: 21px; }
  .hs-legend text              { font-size: 23px; }
  .hs-curve                    { stroke-width: 5; }
  .hs-lead                     { stroke-width: 2.2; stroke-dasharray: 6 5; }
}

/* ---------- 卡片 ---------- */

.cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.4rem 1.35rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
  min-width: 0;                     /* grid 子項目必備，否則長字串會撐破欄位 */
}

.card:hover { transform: translateY(-2px); border-color: var(--accent); }

.card__link { text-decoration: none; color: inherit; }
.card__title { margin: 0; font-size: 1.12rem; line-height: 1.55; }
.card__link:hover .card__title { color: var(--accent); }

.card__meta {
  margin: 0;
  font-size: .8rem;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

.card__sep { opacity: .5; }
.card__updated { color: var(--accent); }

.card__summary {
  margin: 0;
  font-size: .92rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.card__tags, .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: .15rem 0 0;
  padding: 0;
}

.card__tags li, .article-tags li {
  font-size: .72rem;
  padding: .18em .7em;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-dk);
  letter-spacing: .03em;
}

.card__foot {
  margin: auto 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  color: var(--ink-faint);
}

.card__author { font-weight: 600; color: var(--ink-soft); }

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

.article { padding-block: clamp(2rem, 5vw, 3.5rem); }

.article-head { max-width: var(--prose); }

.article-title {
  margin: .6rem 0 .5rem;
  font-size: clamp(1.5rem, 1.2rem + 1.8vw, 2.15rem);
}

.article-lead {
  margin: 0 0 1.1rem;
  font-size: clamp(.98rem, .94rem + .3vw, 1.1rem);
  color: var(--ink-soft);
  line-height: 1.85;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: .82rem;
  color: var(--ink-faint);
}

.article-meta__author { font-weight: 700; color: var(--ink); }
.article-meta__sep { opacity: .45; }

/* 文章 HERO 圖：等比例縮放，寬度不超過內文可讀寬度 */
.article-hero {
  margin: 0 0 2rem;
  max-width: var(--prose);
}

.article-hero img,
.article-hero svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-tint);
}

.article-hero svg { padding: .75rem .5rem; }

/* ---------- 文章內自繪插圖 ---------- */

.illus { display: block; width: 100%; height: auto; }
.illus text { font-family: var(--font); }

.il-t     { fill: var(--ink);      font-size: 16px;   font-weight: 600; }
.il-t-sub { fill: var(--ink-faint); font-size: 13.5px; }
.il-t-num { fill: var(--bg);       font-size: 14px;   font-weight: 700; text-anchor: middle; }
.il-t-rest { fill: var(--ink-faint); opacity: .65; }

.il-anchor-mid { text-anchor: middle; }
.il-anchor-end { text-anchor: end; }

.il-machine     { fill: var(--ink-soft); opacity: .75; }
.il-accent-fill { fill: var(--accent); }
.il-beam        { fill: var(--accent); opacity: .14; }
.il-lead        { fill: none; stroke: var(--ink-faint); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .7; }

.il-cell           { stroke-width: 2; }
.il-cell--warm     { fill: color-mix(in srgb, var(--warm) 12%, transparent); stroke: var(--warm); stroke-opacity: .5; }
.il-cell--accent   { fill: var(--accent-bg); stroke: var(--accent); stroke-opacity: .5; }

.il-dna         { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.il-dna--broken { stroke: var(--warm); }
.il-break       { fill: none; stroke: var(--warm); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.il-badge circle       { stroke: var(--bg); stroke-width: 3; }
.il-badge--warm circle   { fill: var(--warm); }
.il-badge--accent circle { fill: var(--accent); }
.il-mark { fill: none; stroke: var(--bg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* 流程圖 */
.il-flow-arrow { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.il-step       { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 2; stroke-opacity: .45; }
.il-icon       { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.il-icon-dot   { fill: var(--accent); stroke: none; }

/* 療程日曆 */
/* 同時涵蓋兩種寫法：class 掛在群組上（日曆格），或直接掛在 rect 上（圖例色塊） */
.il-day rect,        rect.il-day        { stroke-width: 1.5; }
.il-day--on rect,    rect.il-day--on    { fill: var(--accent); stroke: var(--accent); }
.il-day--off rect,   rect.il-day--off   { fill: var(--bg-tint); stroke: var(--line); }
.il-day--ghost rect, rect.il-day--ghost { fill: none; stroke: var(--line); stroke-dasharray: 5 5; }
.il-check           { fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* 窄螢幕：插圖等比縮到約四成，字級要放大才讀得到 */
@media (max-width: 46rem) {
  .il-t      { font-size: 27px; }
  .il-t-sub  { font-size: 23px; }
  .il-t-num  { font-size: 22px; }
  .il-dna, .il-break { stroke-width: 3.4; }
  .il-icon, .il-flow-arrow { stroke-width: 3; }
  .il-check  { stroke-width: 3.6; }
  /* 次要說明放大後會超出畫布，窄螢幕收起——圖說已完整交代同樣的內容 */
  .il-detail { display: none; }
}

/* 內文中的圖說區塊 */
.prose-figure { margin: 2rem 0; }

.prose-figure--illus img,
.prose-figure--illus svg {
  padding: 1rem .75rem;
  background: var(--bg);
}

.prose-figure svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.prose-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-tint);
}

.prose-figure figcaption {
  margin-top: .7rem;
  font-size: .8rem;
  line-height: 1.75;
  color: var(--ink-faint);
  padding-left: .7rem;
  border-left: 2px solid var(--line);
}

.article-hero figcaption {
  margin-top: .7rem;
  font-size: .8rem;
  line-height: 1.75;
  color: var(--ink-faint);
  padding-left: .7rem;
  border-left: 2px solid var(--line);
}

/* ---------- 內文 ---------- */

.prose { max-width: var(--prose); }

.prose > * + * { margin-top: 1.3em; }

.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(1.2rem, 1.1rem + .6vw, 1.45rem);
  padding-top: .9em;
  border-top: 1px solid var(--line-soft);
}

.prose h3 {
  margin-top: 1.9em;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.16rem);
  color: var(--accent-dk);
}

.prose p { margin-block: 0; }

.prose ul, .prose ol { margin-block: 0; padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }

.prose strong { font-weight: 700; color: var(--ink); }

.prose blockquote {
  margin: 1.8em 0;
  padding: 1.1em 1.3em;
  background: var(--accent-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}

.prose blockquote > * + * { margin-top: .8em; }
.prose blockquote p { margin: 0; font-weight: 600; }

.prose hr {
  margin: 2.6em 0 1.6em;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose em { color: var(--ink-faint); font-style: normal; font-size: .88em; line-height: 1.8; display: inline-block; }

.prose code {
  font-size: .88em;
  padding: .15em .4em;
  background: var(--bg-tint);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow-wrap: break-word;
}

.prose pre { overflow-x: auto; padding: 1em; background: var(--bg-tint); border-radius: var(--radius); }
.prose pre code { border: 0; padding: 0; background: none; }

/* 表格永遠可獨立橫向捲動，不撐破頁面 */
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .6em .8em; border: 1px solid var(--line); text-align: left; }

.prose__note {
  font-size: .85rem;
  color: var(--ink-faint);
  padding: .9rem 1.1rem;
  background: var(--bg-tint);
  border-radius: var(--radius);
}

/* ---------- 關於區塊 ---------- */

.icon-sprite { display: none; }

.icon, .acard__icon, .tile__icon, .info-item__icon, .cta__icon {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  stroke: currentColor;
  fill: none;
}

.about {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
  border-top: 1px solid var(--line-soft);
}

.about__eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  letter-spacing: .16em;
  color: var(--ink-faint);
  font-weight: 600;
}

.about__tagline {
  margin: 1.1rem 0 1.25rem;
  font-size: clamp(1.05rem, .95rem + .7vw, 1.4rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--accent);
  letter-spacing: .01em;
}

/* 導言橫跨整行，但仍保留可讀行長 */
.about__lead { max-width: 60rem; }
.about__lead p {
  margin: 0;
  font-size: clamp(.98rem, .94rem + .3vw, 1.08rem);
  line-height: 1.95;
  color: var(--ink-soft);
}

/* 三張卡片 */
.about__cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.acard {
  min-width: 0;
  padding: 1.5rem 1.4rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.acard__title {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1rem;
  font-size: 1.02rem;
  letter-spacing: .02em;
}

.acard__icon {
  width: 2.4rem;
  height: 2.4rem;
  padding: .55rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  box-sizing: border-box;
}

.acard__body > * + * { margin-top: .85rem; }
.acard__body p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.9;
  color: var(--ink-soft);
}

.acard__body ul {
  margin: 0;
  padding-left: 1.15em;
  font-size: .88rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.acard__body li + li { margin-top: .3em; }
.acard__body li::marker { color: var(--accent); }

/* 「專長領域」置中標題，兩側延伸細線 */
.about__rule {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.about__rule::before,
.about__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.about__rule-title {
  margin: 0;
  font-size: clamp(.95rem, .9rem + .3vw, 1.1rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .3em;
  text-indent: .3em;   /* 補回 letter-spacing 造成的右側空隙，維持視覺置中 */
  white-space: nowrap;
}

/* 專長領域磚 */
.tiles {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  padding: 1.1rem .6rem 1rem;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}

.tile:hover { border-color: var(--accent); transform: translateY(-2px); }

.tile__icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  margin-bottom: .15rem;
}

.tile__zh {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.tile__en {
  font-size: .7rem;
  line-height: 1.4;
  color: var(--ink-faint);
  letter-spacing: .01em;
}

/* 底部：掛號按鈕 + 資訊列 */
.about__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding-top: clamp(1.75rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}

.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .8em 1.5em;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(.95rem, .9rem + .3vw, 1.05rem);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color .18s ease, transform .18s ease;
  white-space: nowrap;
}

.cta__btn:hover { background: var(--accent-dk); color: var(--bg); transform: translateY(-1px); }
.cta__icon { width: 1.25em; height: 1.25em; }
.cta__arrow { transition: transform .18s ease; }
.cta__btn:hover .cta__arrow { transform: translateX(3px); }

.info-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  font-size: .84rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.info-item__icon { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.info-item__text { min-width: 0; }

@media (min-width: 48rem) {
  .info-item + .info-item { padding-left: 1.75rem; border-left: 1px solid var(--line); }
  .info-items { gap: 1rem 0; }
}

.about__note { margin-top: 2.5rem; max-width: 60rem; }

/* ---------- 上下篇 ---------- */

.pager {
  display: grid;
  gap: .8rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  max-width: var(--prose);
}

@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } }

.pager__item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color .18s ease;
}

.pager__item:hover { border-color: var(--accent); }
.pager__item--next { text-align: right; }
.pager__dir { font-size: .74rem; color: var(--ink-faint); letter-spacing: .04em; }
.pager__title { font-size: .92rem; font-weight: 600; line-height: 1.6; color: var(--accent); }

.article-back { margin-top: 2rem; font-size: .9rem; }
.article-back a { text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

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

.site-footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: clamp(2rem, 5vw, 3rem) 2rem;
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
}

.credits, .disclaimer { margin-bottom: 2rem; max-width: 52rem; }

.credits__heading {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .8rem;
  font-weight: 700;
}

.credits__list { margin: 0; padding-left: 1.15em; }
.credits__list li { margin-bottom: .7rem; line-height: 1.8; }
.credits__list a { overflow-wrap: anywhere; }   /* 長標題與網址不破框 */
.credit__use { color: var(--ink-faint); }
.credit__mod { color: var(--ink-faint); font-size: .92em; }

.credits__note { margin: .4rem 0 0; font-size: .8rem; color: var(--ink-faint); }

.disclaimer p { margin: 0; line-height: 1.85; }

.site-footer__meta {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.site-footer__meta p { margin: 0; }
.site-footer__org { font-weight: 600; color: var(--ink); }
.site-footer__copy, .site-footer__views { font-size: .8rem; color: var(--ink-faint); }

/* ---------- 計數器 ---------- */

.views[hidden] { display: none; }
.views__n { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 其他 ---------- */

.notfound { text-align: center; padding-block: clamp(3rem, 12vw, 7rem); }
.notfound .section__heading::after { margin-inline: auto; }
.notfound .prose { margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
