/* theme-a.css — 方向 A「智庫典藏」語義層 + 組件（依 DESIGN.md §4.2 A 欄 / §8.1）
   底色紙白 · 襯線 display · 藍主強調 · 首屏焦點=大標題 · 視頻=簡報行
   禁：深底、carousel、等大瓷磚、裝飾動效 */

.t-a {
  /* 語義 token（A） */
  --color-bg: #FFFFFF;
  --color-surface: #FBFCFD;
  --color-text: #2A2E33;
  --color-muted: #6B737A;
  --color-accent: var(--blue);
  --color-accent-2: var(--mint);
  --color-highlight: var(--gold);
  --color-video: var(--cyan);
  --color-line: #E4E9EA;
  --color-footer: var(--aub);
  --focus: var(--blue);

  --font-display: "Noto Serif TC", "Songti TC", serif;
  --font-body: "Noto Sans TC", "PingFang TC", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── 報頭 masthead ─────────────────────────────────── */
.t-a .mh { background: var(--color-bg); border-bottom: 3px solid var(--ink); }
.t-a .mh-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding-block: var(--s3); }
.t-a .mh-brand img { height: 62px; width: auto; display: block; }
.t-a .mh-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); }
.t-a .mh-folio { display: flex; gap: var(--s5); font-size: 11px; letter-spacing: .18em; color: var(--color-muted); }
.t-a .mh-actions { display: flex; align-items: center; gap: var(--s4); font-size: 12px; }
.t-a .ask { color: var(--color-accent); text-decoration: none; border-bottom: 1px dotted var(--color-accent); padding-bottom: 1px; }
.t-a .ask:hover { border-bottom-style: solid; }
.t-a .lang { color: var(--color-muted); letter-spacing: .06em; }
.t-a .mh-nav { border-top: 1px solid var(--color-line); }
.t-a .mh-nav .wrap { display: flex; gap: var(--s6); overflow-x: auto; }
.t-a .mh-nav a { text-decoration: none; font-size: 15px; padding: var(--s3) 0; color: var(--color-text); white-space: nowrap; border-bottom: 2px solid transparent; }
.t-a .mh-nav a:hover { color: var(--color-accent); }
.t-a .mh-nav a.on { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: 500; }

/* ── 首頁 hero（不對稱 60/40：左大標題 / 右視頻簡報海報） ── */
.t-a .hero { border-bottom: 1px solid var(--color-line); }
.t-a .hero-grid { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s7); padding-block: var(--s7) var(--s6); align-items: center; }
.t-a .kicker { font-size: 11px; letter-spacing: .3em; color: var(--color-accent); font-weight: 500; margin-bottom: var(--s3); }
.t-a .hero-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.8vw, 42px); line-height: 1.32; margin: 0 0 var(--s4); }
.t-a .hero-dek { font-size: 16px; color: var(--color-muted); max-width: 34em; margin: 0 0 var(--s4); }
.t-a .hero-meta { font-size: 12px; color: var(--color-muted); display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.t-a .hero-meta a { color: var(--color-accent); text-decoration: none; border-bottom: 1px solid transparent; }
.t-a .hero-meta a:hover { border-bottom-color: var(--color-accent); }
.t-a .hero-brief { text-decoration: none; color: inherit; display: block; }
.t-a .hb-poster { position: relative; border: 1px solid var(--color-line); }
.t-a .hb-poster img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.t-a .hb-play { position: absolute; inset: 0; display: grid; place-items: center; }
.t-a .hb-play svg { width: 64px; height: auto; opacity: .96; }
.t-a .hero-brief:hover .hb-play svg { opacity: 1; transform: scale(1.03); transition: transform var(--dur) var(--ease); }
.t-a .hb-cap { font-size: 11px; letter-spacing: .18em; color: var(--color-muted); border-top: 1px solid var(--color-line); margin-top: var(--s2); padding-top: var(--s2); }

/* ── 首欄結構：左索引欄 + 主欄 ─────────────────────── */
.t-a .cols { display: grid; grid-template-columns: 260px 1fr; gap: var(--s7); padding-block: var(--s6); }
.t-a .rail-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; font-weight: 500; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: var(--s2); margin: 0 0 var(--s3); }
.t-a .rail section + section { margin-top: var(--s6); }
.t-a .rail-ix, .t-a .rail-tp { list-style: none; margin: 0; padding: 0; }
.t-a .rail-ix a { display: grid; grid-template-columns: 26px 1fr auto; gap: var(--s2); align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--color-line); text-decoration: none; font-size: 13.5px; line-height: 1.5; }
.t-a .rail-ix .rfolio, .t-a .rail-ix .rdate { font-size: 11px; color: var(--color-muted); }
.t-a .rail-ix a:hover span:nth-child(2) { color: var(--color-accent); }
.t-a .rail-tp a { display: block; padding: 9px 0; border-bottom: 1px solid var(--color-line); text-decoration: none; font-family: var(--font-display); font-size: 15px; }
.t-a .rail-tp a:hover { color: var(--color-accent); }

/* ── 區塊標題（欄線） ──────────────────────────────── */
.t-a .sec + .sec { margin-top: var(--s7); }
.t-a .sec-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: var(--s3); margin-bottom: var(--s1); }
.t-a .sec-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0; }
.t-a .sec-more { font-family: var(--font-mono); font-size: 12px; color: var(--color-accent); text-decoration: none; }
.t-a .sec-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 文章索引行（頁碼 + 日期 + 標題，欄線分隔） ────── */
.t-a .ixrow { display: grid; grid-template-columns: 44px 100px 1fr; gap: var(--s3); align-items: baseline; padding: var(--s4) 0; border-bottom: 1px solid var(--color-line); text-decoration: none; color: inherit; }
.t-a .ixrow .folio { font-size: 12px; color: var(--color-muted); }
.t-a .ixrow .ix-date { font-size: 12px; color: var(--color-muted); }
.t-a .ixrow h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 0 0 var(--s1); line-height: 1.5; }
.t-a .ixrow .ix-tags { font-size: 11px; letter-spacing: .1em; color: var(--color-muted); }
.t-a .ixrow:hover h3 { color: var(--color-accent); }

/* ── 視頻簡報行（海報 + 信息，非縮略圖瓷磚） ────────── */
.t-a .brief { display: grid; grid-template-columns: 280px 1fr; gap: var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--color-line); text-decoration: none; color: inherit; align-items: center; }
.t-a .brief .kicker { margin-bottom: var(--s2); }
.t-a .b-poster { position: relative; border: 1px solid var(--color-line); }
.t-a .b-poster img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.t-a .b-play { position: absolute; inset: 0; display: grid; place-items: center; }
.t-a .b-play svg { width: 44px; height: auto; opacity: .95; }
.t-a .brief h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0 0 var(--s2); line-height: 1.5; }
.t-a .b-meta { font-size: 11px; letter-spacing: .15em; color: var(--color-muted); }
.t-a .brief:hover h3 { color: var(--color-accent); }
.t-a .brief.hidden { display: none; }

/* ── 列表頁（視頻/文章） ───────────────────────────── */
.t-a .page { max-width: 920px; padding-block: var(--s7) var(--s8); }
.t-a .page-h { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 36px); font-weight: 700; margin: 0 0 var(--s2); }
.t-a .page-sub { font-size: 12px; color: var(--color-muted); margin-bottom: var(--s5); }
.t-a .tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s4); font-size: 12px; border-bottom: 1px solid var(--color-line); margin-bottom: var(--s4); }
.t-a .tabs button { appearance: none; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: var(--s2) 0; margin-right: var(--s3); font: inherit; color: var(--color-muted); cursor: pointer; }
.t-a .tabs button:hover { color: var(--color-text); }
.t-a .tabs button.on { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: 500; }
.t-a .page .tabs + .tabs { margin-top: calc(-1 * var(--s3)); }

/* ── 分頁 ──────────────────────────────────────────── */
.t-a .pager { display: flex; gap: var(--s2); padding-top: var(--s5); font-size: 12px; }
.t-a .pager button { appearance: none; background: none; border: 1px solid var(--color-line); border-radius: var(--r-btn); padding: 4px 10px; font: inherit; color: var(--color-muted); cursor: pointer; }
.t-a .pager button:hover:not(:disabled) { color: var(--color-accent); border-color: var(--color-accent); }
.t-a .pager button:disabled { opacity: .45; cursor: default; }
.t-a .pager .cur { color: var(--color-accent); border-color: var(--color-accent); }

/* ── 文章頁（襯線長文 + 首字下沉 + 引文） ───────────── */
.t-a .post { max-width: 720px; padding-block: var(--s6) var(--s8); }
.t-a .crumb { font-size: 11px; letter-spacing: .18em; color: var(--color-muted); margin-bottom: var(--s4); }
.t-a .crumb a { color: var(--color-muted); text-decoration: none; }
.t-a .crumb a:hover { color: var(--color-accent); }
.t-a .post-h { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.4; margin: 0 0 var(--s3); }
.t-a .post-meta { font-size: 12px; color: var(--color-muted); display: flex; flex-wrap: wrap; gap: var(--s2); }
.t-a .post-meta a { color: var(--color-accent); }
.t-a .rule { border: none; border-top: 2px solid var(--ink); margin: var(--s4) 0 var(--s5); }
.t-a .post-body { font-size: 17px; line-height: 1.9; }
.t-a .post-body p { margin: 0 0 1.3em; }
.t-a .post-body > p:first-child::first-letter {
  font-family: var(--font-display); font-weight: 700; font-size: 3em;
  float: left; line-height: 1; padding: .06em .14em 0 0; color: var(--color-accent);
}
.t-a .post-body h2, .t-a .post-body h3, .t-a .post-body h4 { font-family: var(--font-display); line-height: 1.5; margin: 1.6em 0 .6em; }
.t-a .post-body h2 { font-size: 24px; } .t-a .post-body h3 { font-size: 20px; }
.t-a .post-body a { color: var(--color-accent); }
.t-a .post-body blockquote {
  margin: 1.8em 0; padding: var(--s3) var(--s4);
  border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line);
  font-family: var(--font-display); font-size: 1.06em; color: var(--ink);
}
.t-a .post-body img { display: block; margin: 1.5em auto; }
.t-a .pn { border-top: 1px solid var(--color-line); margin-top: var(--s7); padding-top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); font-size: 13px; }
.t-a .pn a { color: var(--color-accent); text-decoration: none; }
.t-a .pn a:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-a .ask-note { margin-top: var(--s7); border-top: 2px solid var(--ink); padding-top: var(--s4); }
.t-a .ask-note p { font-size: 15px; color: var(--color-muted); margin: var(--s2) 0 0; }

/* ── 視頻播放頁 ────────────────────────────────────── */
.t-a .watch { max-width: 880px; padding-block: var(--s6) var(--s8); }
.t-a .player { position: relative; cursor: pointer; border: 1px solid var(--color-line); }
.t-a .player img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.t-a .player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.t-a .play-btn { position: absolute; inset: 0; display: grid; place-items: center; }
.t-a .play-btn svg { width: 84px; height: auto; }
.t-a .player:hover .play-btn svg { opacity: .9; }
.t-a .vnote { margin-top: var(--s5); padding: var(--s3) var(--s4); background: var(--color-surface); border-left: 3px solid var(--color-highlight); }
.t-a .vnote p { margin: 0; font-size: 14px; color: var(--color-muted); }

/* ── 頁腳（深紫灰，欄線收口） ───────────────────────── */
.t-a .ft { background: var(--color-footer); color: #C9C6D4; }
.t-a .ft-in { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-block: var(--s6); flex-wrap: wrap; }
.t-a .ft-brand strong { font-family: var(--font-display); font-size: 18px; color: #F5F3FA; font-weight: 700; }
.t-a .ft-brand span { margin-left: var(--s4); font-size: 12px; color: #9A93AA; }
.t-a .ft-note { font-size: 11px; color: #9A93AA; }
.t-a .ft-note a { color: #9A93AA; }
.t-a .ft-note a:hover { color: #F5F3FA; }

/* ── 動效層（DESIGN.md D-P1-3：A 簽名=欄線繪製；僅進門與瀏覽，閱讀/播放頁零 data-rv） ── */
html.js .t-a [data-rv] {
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.js .t-a [data-rv].rv-in { opacity: 1; transform: none; transition-delay: var(--rvd, 0s); }
html.js .t-a [data-rv].rv-done { transition-delay: 0s; }  /* 入場後清錯峰延遲，hover 不遲滯 */

/* 欄線繪製：帶 draw-rule 的標題欄，底線從左向右畫出（無 JS 時保留靜態底線） */
html.js .t-a .draw-rule[data-rv] { position: relative; border-bottom-color: transparent; }
html.js .t-a .draw-rule[data-rv]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left center;
  transition: transform .6s var(--ease); transition-delay: calc(var(--rvd, 0s) + .08s);
}
html.js .t-a .draw-rule[data-rv].rv-in::after { transform: scaleX(1); }
html.js .t-a .draw-rule[data-rv].rv-done::after { transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  html.js .t-a [data-rv] { opacity: 1; transform: none; transition: none; }
  html.js .t-a .draw-rule[data-rv] { border-bottom-color: var(--ink); }
  html.js .t-a .draw-rule[data-rv]::after { content: none; }
}

/* ── 響應式 ────────────────────────────────────────── */
@media (max-width: 980px) {
  .t-a .hero-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .t-a .cols { grid-template-columns: 1fr; gap: var(--s6); }
  .t-a .rail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .t-a .brief { grid-template-columns: 220px 1fr; }
}
@media (max-width: 640px) {
  .t-a .mh-top { flex-wrap: wrap; }
  .t-a .mh-brand img { height: 48px; }
  .t-a .mh-folio span:first-child { display: none; }
  .t-a .rail { grid-template-columns: 1fr; }
  .t-a .ixrow { grid-template-columns: 40px 1fr; row-gap: 2px; }
  .t-a .ixrow .ix-date { grid-column: 2; }
  .t-a .ixrow .ix-main { grid-column: 2; }
  .t-a .brief { grid-template-columns: 1fr; gap: var(--s3); }
  .t-a .b-poster { max-width: 420px; }
  .t-a .ft-in { flex-direction: column; gap: var(--s2); }
}
