/* 報紙風格樣式。主色與各區段顏色由 build 時依 site.config.json 附加在檔案尾端。 */
:root {
  --bg: #faf8f3;
  --fg: #1b1a17;
  --muted: #58534a;
  --rule: #1b1a17;
  --soft: #d9d3c5;
  --card: #fffdf8;
  --accent: #9b1c1c;
  --accent-ink: var(--accent);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "Noto Serif CJK TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Source Han Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311; --fg: #ece8df; --muted: #b3ac9d; --rule: #ece8df; --soft: #3a372f; --card: #1b1a17;
    --accent-ink: color-mix(in srgb, var(--accent) 45%, #fff);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .sec { --sec-ink: color-mix(in srgb, var(--sec) 50%, #fff); }
}
:root[data-theme="dark"] {
  --bg: #141311; --fg: #ece8df; --muted: #b3ac9d; --rule: #ece8df; --soft: #3a372f; --card: #1b1a17;
  --accent-ink: color-mix(in srgb, var(--accent) 45%, #fff);
  color-scheme: dark;
}
:root[data-theme="dark"] .sec { --sec-ink: color-mix(in srgb, var(--sec) 50%, #fff); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 1.0625rem/1.75 var(--sans);
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 2px; }
.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 { position: absolute; left: 8px; top: -60px; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 10; }
.skip:focus { top: 8px; }
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 48rem) { .wrap { padding-inline: 24px; } }

/* 報頭 */
.masthead { padding-top: 12px; text-align: center; }
.mast-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); min-height: 44px; }
.mast-top .ed { color: var(--accent-ink); font-weight: 700; }
.paper-name { margin: 4px 0 0; font: 900 clamp(2.25rem, 10vw, 4.75rem)/1.15 var(--serif); letter-spacing: .06em; }
.paper-name a { text-decoration: none; color: inherit; }
.tagline { margin: 0 0 12px; font: 500 .9375rem/1.5 var(--serif); color: var(--muted); }
.mast-nav { border-block: 3px double var(--rule); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; padding: 0; margin: 0; list-style: none; }
.mast-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 500; text-decoration: none; }
.mast-nav a[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
.icon-btn { appearance: none; border: 1px solid var(--soft); background: transparent; color: var(--fg); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { border-color: var(--fg); }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn[aria-pressed="true"] .i-sun, .icon-btn[aria-pressed="false"] .i-moon { display: none; }

/* 頭條與導讀 */
.front { display: grid; gap: 24px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
@media (min-width: 52rem) { .front { grid-template-columns: 2fr 1fr; gap: 40px; } .front .brief { border-left: 1px solid var(--soft); padding-left: 32px; } }
.kicker { margin: 0 0 8px; font: 700 .875rem/1.4 var(--sans); letter-spacing: .12em; color: var(--accent-ink); }
.lead h2 { margin: 0 0 12px; font: 900 clamp(1.75rem, 6.2vw, 2.875rem)/1.28 var(--serif); text-wrap: balance; }
.lead h2 a { text-decoration: none; }
.lead h2 a:hover { text-decoration: underline; }
.lead-sum { font-size: 1.1875rem; line-height: 1.85; margin: 0 0 12px; }
.lead figure { margin: 0 0 16px; }
.lead img, .item img { display: block; width: 100%; height: auto; max-height: 26rem; object-fit: cover; border: 1px solid var(--soft); }
.lead.no-image { border-left: 6px solid var(--accent); padding-left: 16px; }
.brief h2 { margin: 0 0 10px; font: 700 1.125rem/1.4 var(--serif); letter-spacing: .1em; }
.brief ol { margin: 0; padding-left: 1.4em; }
.brief li { margin-bottom: 8px; }
.brief p { margin: 0; }

.why { margin: 6px 0; color: var(--muted); font-size: .96875rem; line-height: 1.7; }
.why b { color: var(--fg); font-weight: 700; margin-right: .5em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 0; font-size: .875rem; color: var(--muted); }
.meta a.src { font-weight: 700; color: var(--fg); }
.meta a.src:hover { color: var(--accent-ink); }
.imp { letter-spacing: .1em; color: var(--accent-ink); }
.tags { display: contents; list-style: none; }
.tags li { display: inline; }
.orig { margin: 4px 0 0; font-size: .8125rem; color: var(--muted); font-style: italic; }

/* 區段導覽 */
.jump { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 16px 0 0; margin: 0; list-style: none; }
.jump a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--soft); border-radius: 999px; font-size: .9375rem; text-decoration: none; }
.jump a:hover { border-color: var(--fg); color: inherit; }
.dot { width: .65em; height: .65em; border-radius: 50%; background: var(--sec, var(--accent)); display: inline-block; }

/* 各區段 */
.sec { --sec: var(--accent); --sec-ink: var(--sec); padding-block: 28px 8px; scroll-margin-top: 8px; }
.sec > h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; padding-top: 10px; border-top: 5px solid var(--sec-ink); font: 900 1.625rem/1.3 var(--serif); color: var(--sec-ink); }
.sec > h2 small { font: 400 .875rem var(--sans); color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; }
@media (min-width: 44rem) { .items { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); } .items > li.imp-5 { grid-column: 1 / -1; } }
.items > li { padding-block: 16px; border-bottom: 1px solid var(--soft); min-width: 0; }
.item h3 { margin: 0 0 6px; font: 700 1.1875rem/1.5 var(--serif); text-wrap: balance; }
.item h3 a { text-decoration: none; }
.item h3 a:hover { text-decoration: underline; }
.item p.sum { margin: 0; }
.imp-5 h3 { font-size: clamp(1.5rem, 4.6vw, 2rem); line-height: 1.35; font-weight: 900; }
.imp-5 p.sum { font-size: 1.125rem; }
.imp-1 h3, .imp-2 h3 { font-size: 1.0625rem; }

/* 往期 / 換頁 */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 24px; margin-top: 16px; border-top: 1px solid var(--rule); }
.pager a { display: inline-flex; align-items: center; min-height: 44px; }
.page-title { font: 900 clamp(1.75rem, 6vw, 2.5rem)/1.3 var(--serif); margin: 28px 0 8px; }
.archive h2 { font: 700 1.25rem/1.4 var(--serif); margin: 28px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--rule); }
.archive ul { list-style: none; padding: 0; margin: 0; }
.archive li a { display: grid; grid-template-columns: 6.5rem 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); text-decoration: none; }
.archive li a:hover { color: inherit; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.archive .d { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9375rem; }
.archive .d b { display: block; color: var(--accent-ink); font-weight: 700; }
.archive .t { font-family: var(--serif); font-weight: 700; }
.empty { text-align: center; padding: 48px 0; }
.empty .big { font: 900 5rem/1 var(--serif); color: var(--accent-ink); margin: 0; }

/* 頁尾 */
.site-footer { margin-top: 32px; padding-block: 24px 40px; border-top: 3px double var(--rule); color: var(--muted); font-size: .9375rem; text-align: center; }
.site-footer p { margin: 4px 0; }
.site-footer .stats { color: var(--fg); font-weight: 500; }

@media print { .mast-nav, .jump, .icon-btn, .pager, .skip { display: none; } body { background: #fff; color: #000; } }

/* generated from site.config.json */
:root{--accent:#9b1c1c}
.sec-ai{--sec:#1d4ed8}
.sec-automation{--sec:#b45309}
.sec-biotech{--sec:#047857}
.sec-taiwan{--sec:#be123c}
.sec-world{--sec:#6d28d9}
.sec-sports{--sec:#c2410c}
