/**
 * Blog Archive — Design Token Override
 *
 * Loaded on is_category() / is_tag() / is_author() / is_date() / is_home() / is_search().
 * Covers all article-listing-like archive pages (cards + sidebar layout).
 * Uses per-role Typography CSS Variables (--hz-typo-XX-*).
 *
 * Token mapping:
 * - Page title:     typo.03 (Heading Large) + color.07
 * - Card title:     typo.04 (Heading Small) + color.07
 * - Card excerpt:   typo.06 (Body) + color.09
 * - Card meta:      typo.14 (Meta) + color.10
 * - Card image:     surface.02 radius
 * - Read more:      typo.06 + color.14
 * - Sidebar:        typo.28 (Panel Heading) / typo.06 (Body)
 * - Pagination:     typo.06 + color.09/14
 *
 * Selector 使用 :is(...) 列舉 6 個 WP body class(category/tag/author/date/blog/search)。
 * 未涵蓋 .archive 是為了避免誤套 WC shop(它的 body 也帶 .archive class)。
 */

/* 覆蓋 Blocksy --color-primary */
:is(.category, .tag, .author, .date, .blog, .search) {
    --color-primary: var(--hz-color-14);
}

/* ===========================
   Hero / Page Title Area
   隱藏 Hero,避免標題溢出問題;分類/標籤/作者名稱在卡片 meta 中已有顯示
   =========================== */
:is(.category, .tag, .author, .date, .blog, .search) .hero-section {
    display: none;
}

/* ===========================
   Article Cards
   =========================== */

/* Card title — typo.04 + color.07
   Blocksy inline style 用 .entries .entry-card .entry-title a { color: inherit } */
:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-title a {
    font-family: var(--hz-typo-typo-04-ff);
    font-size: var(--hz-typo-typo-04-fs);
    font-weight: var(--hz-typo-typo-04-fw);
    line-height: var(--hz-typo-typo-04-lh);
    color: var(--hz-color-07) !important;
    text-decoration: none;
}

:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-title a:hover {
    color: var(--hz-color-14) !important;
}

/* Card excerpt — typo.06 + color.09 */
:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-excerpt,
:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-summary {
    font-family: var(--hz-typo-typo-06-ff);
    font-size: var(--hz-typo-typo-06-fs);
    font-weight: var(--hz-typo-typo-06-fw);
    line-height: var(--hz-typo-typo-06-lh);
    color: var(--hz-color-09);
}

/* Card meta (date, category, author) — typo.14 + color.10
   Blocksy inline style 用 .entries .entry-card .entry-meta { color: rgb(136,136,136) } */
:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-meta {
    font-family: var(--hz-typo-typo-14-ff);
    font-size: var(--hz-typo-typo-14-fs);
    font-weight: var(--hz-typo-typo-14-fw);
    line-height: var(--hz-typo-typo-14-lh);
    color: var(--hz-color-10) !important;
}

:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-meta a {
    color: var(--hz-color-10);
    text-decoration: none;
}

:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .entry-meta a:hover {
    color: var(--hz-color-14);
}

/* Card image */
:is(.category, .tag, .author, .date, .blog, .search) .entries .entry-card .ct-media-container {
    border-radius: var(--hz-surface-02-radius);
    overflow: hidden;
}

/* ===========================
   Sidebar
   =========================== */

/* aside#sidebar::after 灰背景移除已收到 page-bg.css(全站基底) */

/* Widget title — typo.28 (Panel Heading) */
:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar .ct-widget .widget-title,
:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar .ct-widget h2,
:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar .ct-widget h3 {
    font-family: var(--hz-typo-typo-28-ff);
    font-size: var(--hz-typo-typo-28-fs) !important;
    font-weight: 600 !important;
    line-height: var(--hz-typo-typo-28-lh);
    color: var(--hz-color-07) !important;
    border-left: none !important;
    padding-left: 0 !important;
}

/* Sidebar text / links */
:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar,
:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar *:not(i):not(svg) {
    font-family: var(--hz-typo-typo-06-ff) !important;
}

:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar a {
    color: var(--hz-color-09) !important;
    text-decoration: none;
}

:is(.category, .tag, .author, .date, .blog, .search) aside#sidebar a:hover {
    color: var(--hz-color-14) !important;
}

/* ===========================
   Pagination
   =========================== */
:is(.category, .tag, .author, .date, .blog, .search) .ct-pagination {
    font-family: var(--hz-typo-typo-06-ff);
}

:is(.category, .tag, .author, .date, .blog, .search) .ct-pagination a {
    color: var(--hz-color-09);
}

:is(.category, .tag, .author, .date, .blog, .search) .ct-pagination .current {
    background-color: var(--hz-color-04);
    color: var(--hz-color-11);
}
