/* 分秒 — 新聞網站版面
   設計取向：密度高、資訊優先、髮絲線分隔、無裝飾性卡片，
   對齊港式新聞網（字體為主、欄目清楚、資訊密度高） */

:root {
  --ink: #0a0c0f;
  --paper: #ffffff;
  --soft: #f5f6f7;
  --line: #d8dbdf;
  --line-2: #eceef0;
  --text: #1a1d21;
  --muted: #6b7280;
  --red: #c8102e;
  --blue: #14508c;
  --maxw: 1180px;
  --serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- 工具列 ---------- */
.utilbar { background: var(--ink); color: #9aa4b0; font-size: 12px; }
.utilbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 30px; gap: 14px; }
.utilbar .r { display: flex; gap: 16px; align-items: center; }
.utilbar b { color: #e6edf3; font-weight: 600; }

/* ---------- 報頭 ---------- */
.masthead { border-bottom: 3px double var(--ink); padding: 16px 0 12px; }
.masthead .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.name { font-family: var(--serif); font-size: 44px; font-weight: 900; letter-spacing: .12em; line-height: 1; }
.name span { color: var(--red); }
.mast-right { text-align: right; font-size: 12px; color: var(--muted); line-height: 1.7; }
.mast-right b { color: var(--text); }

/* ---------- 導航 ---------- */
.nav { border-bottom: 1px solid var(--ink); position: sticky; top: 0; background: #fff; z-index: 30; }
.nav .wrap { display: flex; align-items: center; gap: 0; overflow-x: auto; }
.nav a {
  font-size: 15px; font-weight: 700; letter-spacing: .06em; padding: 10px 16px;
  border-bottom: 3px solid transparent; white-space: nowrap; color: var(--text);
}
.nav a:first-child { padding-left: 0; }
.nav a:hover { color: var(--red); }
.nav a.on { border-bottom-color: var(--red); color: var(--red); }
.nav .feeds { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); padding-right: 0; }

/* ---------- 即時條 ---------- */
.tickerbar { background: var(--red); color: #fff; font-size: 13.5px; font-weight: 700; }
.tickerbar .wrap { display: flex; align-items: center; gap: 12px; height: 34px; }
.tickerbar .lb { font-size: 10.5px; letter-spacing: .16em; background: #fff; color: var(--red); padding: 2px 7px; flex: none; }

/* ---------- 版面 ---------- */
main { padding-bottom: 40px; }
.rule { border: 0; border-top: 1px solid var(--ink); margin: 22px 0 16px; }
.rule.thin { border-top: 1px solid var(--line); }

.colhead { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 5px; margin-bottom: 12px; }
.colhead h2 { font-size: 17px; font-weight: 800; letter-spacing: .1em; }
.colhead .more { font-size: 12px; color: var(--red); font-weight: 700; }

/* 頭條區 */
.leadbox { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; padding: 18px 0 4px; }
.lead-kick { font-size: 12px; font-weight: 800; color: var(--red); letter-spacing: .1em; }
.lead-title { font-family: var(--serif); font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; line-height: 1.24; margin: 8px 0 10px; }
.lead-title a:hover { color: var(--red); }
.lead-exp { font-size: 15.5px; color: #454b55; line-height: 1.7; }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.meta .au { color: var(--text); font-weight: 700; }
.lead-fig { position: relative; aspect-ratio: 4/3; background: #0d1117; overflow: hidden; }
.lead-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.lead-fig .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(to top, rgba(6,10,15,.92), rgba(6,10,15,0)); color: #fff; font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.4; }

/* 條目列表（主要排版） */
.feed { display: block; }
.row {
  display: grid; grid-template-columns: 1fr 128px; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line-2); align-items: start;
}
.row.reverse { grid-template-columns: 128px 1fr; }
.row.reverse .r-thumb { order: -1; }
.row h3 { font-family: var(--serif); font-size: 16.5px; font-weight: 700; line-height: 1.45; }
.row h3 a:hover { color: var(--red); }
.row .ex { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .lm { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 10px; }
.row .lm .k { color: var(--blue); font-weight: 700; }
.r-thumb { aspect-ratio: 4/3; background: #0d1117; position: relative; overflow: hidden; }
.r-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }

/* 兩欄／三欄 */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.cols3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 26px; }

/* 條目標籤 */
.tagk { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--blue); }
.tagk.gov { color: var(--red); }
.tagk.ai { color: #8a5a12; }

/* 條目清單（無圖，極密） */
.dense { display: flex; flex-direction: column; }
.dense a { display: block; padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 15px; font-family: var(--serif); line-height: 1.45; }
.dense a:hover { color: var(--red); }
.dense .dt { font-size: 11.5px; color: var(--muted); font-family: var(--sans); margin-right: 8px; }

/* 政府公報專區 */
.pressbox { border: 1px solid var(--ink); padding: 0 14px; }
.pressbox .ph { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 2px solid var(--ink); }
.pressbox .ph b { font-size: 13px; letter-spacing: .1em; }
.pressbox .ph span { font-size: 12px; color: var(--muted); }
.pressrow { display: grid; grid-template-columns: 1fr 132px; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.pressrow:last-child { border-bottom: 0; }
.pressrow h4 { font-family: var(--serif); font-size: 15.5px; line-height: 1.45; }
.pressrow h4 a:hover { color: var(--red); }
.pressrow .pm { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pressrow .pm b { color: var(--blue); }

/* 工具列：搜尋／篩選 */
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.tools input[type=search] { flex: 1; min-width: 200px; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); }
.tools select { font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); background: #fff; }
.btn { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 15px; border: 1px solid var(--ink); background: #fff; cursor: pointer; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.pri { background: var(--ink); color: #fff; }
.btn.pri:hover { background: var(--red); border-color: var(--red); }
.hint { font-size: 12px; color: var(--muted); }
.empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* 訂閱 */
.sub { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
.sub .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sub h3 { font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.sub p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sub form { display: flex; gap: 8px; }
.sub input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); width: 220px; }
.feedlist { display: flex; flex-wrap: wrap; gap: 8px; }
.feedlist a { font-size: 12px; padding: 5px 10px; border: 1px solid var(--line); font-weight: 600; }
.feedlist a:hover { border-color: var(--red); color: var(--red); }

/* ---------- 頁尾 ---------- */
footer { background: var(--ink); color: #8b949e; font-size: 12.5px; padding: 24px 0 20px; margin-top: 34px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer h5 { color: #e6edf3; font-size: 12px; letter-spacing: .12em; margin-bottom: 7px; }
footer a:hover { color: #fff; }
footer .fcols { display: flex; gap: 34px; flex-wrap: wrap; }

/* ---------- 文章頁 ---------- */
.crumb { font-size: 12px; color: var(--muted); padding: 12px 0 0; }
.crumb a:hover { color: var(--red); }
.ahead { padding: 12px 0 0; max-width: 900px; }
.ahead .k { font-size: 12px; font-weight: 800; color: var(--red); letter-spacing: .1em; }
.ahead h1 { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; line-height: 1.3; margin: 8px 0 10px; }
.ahead .sf { font-size: 16.5px; color: #454b55; line-height: 1.7; }
.ameta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 0; margin: 14px 0 18px; }
.ameta .au { color: var(--text); font-weight: 700; }
.ahero { position: relative; aspect-ratio: 16/9; background: #0d1117; overflow: hidden; margin: 0 0 20px; }
.ahero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.ahero .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 12px; background: linear-gradient(to top, rgba(6,10,15,.93), rgba(6,10,15,0)); color: #fff; font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.4; }
.abody { max-width: 700px; font-size: 17px; line-height: 1.95; }
.abody p + p { margin-top: 18px; }
.srclink { display: block; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted, #666); }
/* 粵語電台廣播播放器 */
.audio-broadcast { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent, #8a1c1c); background: #fff; max-width: 700px; }
.audio-broadcast .ab-head { font-family: var(--serif); font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--accent, #8a1c1c); margin-bottom: 10px; }
.audio-broadcast audio { width: 100%; display: block; }
.audio-broadcast .ab-note { margin-top: 8px; font-size: 12px; color: var(--muted, #666); }
.share { display: flex; gap: 8px; max-width: 700px; margin: 18px 0; }
.share button { font: inherit; font-size: 12.5px; padding: 6px 12px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.share button:hover { border-color: var(--red); color: var(--red); }

/* ---------- 語音版 ---------- */
.audiobox { max-width: 700px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--ink); padding: 9px 13px; margin: 16px 0; }
.playbtn { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border: 1px solid var(--ink); background: #fff; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.playbtn:hover { background: var(--ink); color: #fff; }
.playbtn.playing { background: var(--red); border-color: var(--red); color: #fff; }
.dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .leadbox, .cols2, .cols3 { grid-template-columns: 1fr; }
  .row, .row.reverse, .pressrow { grid-template-columns: 1fr 100px; }
  .name { font-size: 32px; }
  .mast-right { display: none; }
  .nav .feeds { display: none; }
}
@media (max-width: 560px) {
  .row, .row.reverse, .pressrow { grid-template-columns: 1fr; }
  .r-thumb { display: none; }
}
