/*
Theme Name: DailyNews Press
Description: DailyNews 合作發布站的新聞版型：頭條、分類專區、文章頁，文字為主的編輯風格，支援 DailyNews Connector 的品牌資訊與 FAQ。
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Author: DailyNews
License: GPL-2.0-or-later
Text Domain: dailynews-press
*/

:root {
  --ink: #0b0f17; --ink-2: #2b3442; --muted: #667085; --line: #e4e7ec; --paper: #fff; --canvas: #f6f5f1;
  --accent: #c8102e; --blue: #1d4ed8;
  --serif: "Noto Serif TC", "Songti TC", Georgia, serif;
  --sans: "Inter", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  --c1: #c8102e; --c2: #1d4ed8; --c3: #0f766e; --c4: #b45309; --c5: #7c3aed;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* masthead */
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 12px; }
.badge-test { padding: 2px 8px; border-radius: 999px; background: #fff4e5; color: #9a5b00; font-weight: 700; font-size: 12px; }
.masthead { background: var(--paper); border-bottom: 3px solid var(--ink); }
.masthead .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 0 18px; }
.site-title { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 48px); font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.site-desc { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.search-form { display: flex; gap: 6px; width: 100%; max-width: 320px; }
.search-form input[type=search] { flex: 1; min-width: 0; width: 200px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.search-form button { flex: none; white-space: nowrap; height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.catnav { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.catnav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.catnav li a { display: block; padding: 12px 14px; font-weight: 700; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
.catnav li.current-cat a, .catnav li.current-menu-item a, .catnav li a:hover { border-bottom-color: var(--accent); color: var(--ink); }

/* shared bits */
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--cat, var(--accent)); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.meta { color: var(--muted); font-size: 13px; }
.meta span + span::before { content: "·"; margin: 0 6px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 900; }
.section-head a { font-size: 14px; font-weight: 700; color: var(--muted); }

/* cards */
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.card h3 { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.4; font-weight: 800; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.tile { padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--cat, var(--accent)); border-radius: 4px; background: var(--paper); transition: transform .16s ease-out, box-shadow .16s; }
.card.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px rgba(11,15,23,.45); }
.card.compact h3 { font-size: 17px; }
.card.compact p { display: none; }

/* front page */
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; margin-top: 28px; }
.lead { padding: 30px; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--cat, var(--accent)); border-radius: 4px; }
.lead h2 { margin: 12px 0; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.2; font-weight: 900; letter-spacing: -.01em; }
.lead p { margin: 0 0 16px; font-size: 18px; color: var(--ink-2); }
.lead .brandline { display: inline-flex; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--canvas); font-size: 13px; font-weight: 700; }
.side-list { border-top: 2px solid var(--ink); }
.side-list .label { padding: 10px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.empty-state { margin: 60px auto; padding: 48px; text-align: center; background: var(--paper); border: 1px dashed #cfd4dc; border-radius: 8px; }
.empty-state h2 { font-family: var(--serif); }

/* article */
.article-wrap { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 300px); gap: 48px; justify-content: center; margin: 36px auto 80px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { font-weight: 700; }
.article h1 { margin: 14px 0 14px; font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); line-height: 1.25; font-weight: 900; letter-spacing: -.01em; }
.article .meta { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.entry { font-size: 18px; line-height: 1.95; color: var(--ink-2); }
.entry p { margin: 0 0 22px; }
.entry .dn-lede { margin-top: 26px; font-size: 19px; color: var(--ink); }
.entry .dn-lede strong { font-weight: 600; }
.entry h2 { margin: 44px 0 14px; padding-left: 14px; border-left: 5px solid var(--cat, var(--accent)); font-family: var(--serif); font-size: 26px; line-height: 1.35; color: var(--ink); }
.entry h3 { margin: 26px 0 8px; font-size: 19px; color: var(--ink); }
.entry ul { padding-left: 22px; }
.entry li { margin: 6px 0; }
.entry .dn-disclosure { margin-top: 40px; padding: 16px 18px; border-radius: 8px; background: #f2f4f7; font-size: 14px; line-height: 1.8; color: var(--muted); }
.entry .dn-disclosure a { color: var(--blue); font-weight: 700; }
.aside-box { position: sticky; top: 70px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.aside-box h2 { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.aside-box .brand { font-family: var(--serif); font-size: 22px; font-weight: 900; }
.aside-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0; font-size: 14px; }
.aside-box dt { color: var(--muted); }
.aside-box dd { margin: 0; }
.aside-box .btn { display: block; margin-top: 14px; padding: 11px 14px; border-radius: 8px; background: var(--ink); color: #fff; text-align: center; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.tags a { padding: 5px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; }
.related { margin-top: 48px; }

/* archive */
.archive-head { padding: 34px 0 18px; border-bottom: 2px solid var(--ink); }
.archive-head h1 { margin: 6px 0 0; font-family: var(--serif); font-size: 36px; }
.pager { display: flex; gap: 10px; margin: 30px 0 70px; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-weight: 700; }

/* footer */
.site-foot { margin-top: 60px; padding: 34px 0; background: var(--ink); color: #c7ccd5; font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-foot strong { color: #fff; font-family: var(--serif); font-size: 18px; }

@media (max-width: 900px) {
  .lead-grid, .article-wrap { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .aside-box { position: static; }
  .masthead .wrap { flex-direction: column; align-items: flex-start; }
  .search-form input[type=search] { width: 100%; }
  .entry { font-size: 17px; }
}
