/* 自由分類前台：沿用數位觀點的色彩、字體與卡片，本檔只補分類頁特有的區塊。 */

/* 分類頁主視覺 */
.category_hero { padding: 150px var(--insights_gutter) 40px; }
@media (max-width: 1000px) {
    .category_hero { padding-top: 135px; }
}
@media (max-width: 640px) {
    .category_hero { padding-top: 112px; padding-bottom: 45px; }
}

/* 編輯器頁的主視覺已在內頁容器內，不再重複左右留白 */
.category_editor_page .category_hero { padding: 0 0 55px; }
@media (max-width: 640px) {
    .category_editor_page .category_hero { padding-bottom: 32px; }
}

/* 麵包屑 */
.category_breadcrumb { margin-bottom: 48px; }
.category_breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; padding: 0; list-style: none; font: 400 10px/1.7 'Manrope', 'Microsoft JhengHei', sans-serif; letter-spacing: .08em; color: var(--insights_muted); }
.category_breadcrumb li { display: flex; align-items: center; min-width: 0; }
.category_breadcrumb li + li::before { content: '/'; margin: 0 12px; color: var(--insights_line); }
.category_breadcrumb a { overflow-wrap: anywhere; transition: color .25s; }
.category_breadcrumb a:hover { color: var(--insights_accent); }
.category_breadcrumb a[aria-current="page"] { color: var(--insights_ink); }
@media (max-width: 640px) {
    .category_breadcrumb { margin-bottom: 30px; }
    .category_breadcrumb ol { font-size: 9px; }
    .category_breadcrumb li + li::before { margin: 0 8px; }
}

/* 內頁的麵包屑放在返回連結上方，間距較小 */
.category_content_page .category_breadcrumb { margin-bottom: 26px; }

/* 主視覺標題與引言 */
.category_hero_intro { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 70px; }
.category_hero_has_intro .category_hero_intro { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.category_hero_intro h1 { margin: 0; font-size: clamp(34px, 4.6vw, 72px); font-weight: 400; line-height: 1.35; letter-spacing: .09em; overflow-wrap: anywhere; text-wrap: balance; }
.category_hero_intro .insights_eyebrow { color: var(--insights_accent); }
@media (max-width: 1000px) {
    .category_hero_intro { gap: 35px; }
}
@media (max-width: 640px) {
    .category_hero_has_intro .category_hero_intro { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .category_hero_intro h1 { font-size: 31px; line-height: 1.5; letter-spacing: .05em; }
    .category_hero_intro .insights_eyebrow { margin-bottom: 15px; font-size: 9px; }
}

/* 標題右側引言(後台分類內容)，不使用 insight_prose，避免被閱讀進度當成內文範圍 */
.category_hero_editorial { justify-self: end; max-width: 430px; padding-bottom: 6px; font-size: 14px; line-height: 1.95; letter-spacing: .04em; color: var(--insights_muted); overflow-wrap: anywhere; }
.category_hero_editorial p { margin: 0 0 .9em; }
.category_hero_editorial > :last-child { margin-bottom: 0; }
.category_hero_editorial a { color: var(--insights_accent); border-bottom: 1px solid var(--insights_accent); }
@media (max-width: 640px) {
    .category_hero_editorial { justify-self: start; max-width: none; font-size: 13px; }
}

/* 主視覺底部說明列 */
.category_hero_note { margin-top: 50px; }
@media (max-width: 640px) {
    .category_hero_note { margin-top: 28px; }
}

/* 側欄分類樹 */
.category_sidebar .insights_eyebrow { margin-bottom: 22px; font-size: 9px; }
.category_sidebar .category_tree_list { margin: 0; padding: 0; list-style: none; }
.category_sidebar .category_tree_list .category_tree_list { margin: 6px 0 4px 8px; padding-left: 10px; border-left: 1px solid var(--insights_line); }
.category_sidebar .category_tree_item + .category_tree_item { margin-top: 10px; }
.category_sidebar .category_tree_row { display: flex; align-items: flex-start; gap: 6px; }
.category_sidebar .category_tree_row a { flex: 1 1 auto; min-width: 0; padding: 2px 0 2px 10px; border-left: 1px solid transparent; font-size: 12px; line-height: 1.65; color: var(--insights_muted); overflow-wrap: anywhere; transition: color .25s, border-color .25s; }
.category_sidebar .category_tree_row a:hover, .category_sidebar .category_tree_row a.is_active { color: var(--insights_ink); border-left-color: var(--insights_accent); }
.category_sidebar .category_tree_toggle { order: 2; flex: 0 0 20px; height: 20px; margin-top: 2px; padding: 0; display: grid; place-items: center; border: 1px solid var(--insights_line); border-radius: 50%; background: transparent; color: var(--insights_muted); font-size: 8px; line-height: 1; cursor: pointer; transition: color .25s, border-color .25s; }
.category_sidebar .category_tree_toggle:hover { color: var(--insights_accent); border-color: var(--insights_accent); }
.category_sidebar .category_tree_toggle_placeholder { display: none; }
.category_sidebar .is_hidden_by_collapse { display: none; }
.category_sidebar .insights_reading_progress { margin-top: 45px; }
@media (max-width: 1000px) {
    .category_sidebar .category_tree_row a { font-size: 11px; padding-left: 8px; }
}

/* 列表頁側欄：手機改為內容上方的區塊，不使用數位觀點的橫向捲動分類列 */
@media (max-width: 640px) {
    .category_editorial .category_sidebar_wrap { position: static; padding: 18px 0 20px; margin-bottom: 30px; background: transparent; }
    .category_editorial .insights_category_sticky .insights_eyebrow { display: block; margin-bottom: 14px; }
    .category_sidebar .insights_reading_progress { display: none; }
}

/* 編輯器頁與內頁側欄：桌機黏在左側，手機移到內文之後 */
.category_rail { font: inherit; letter-spacing: normal; }
@media (max-width: 640px) {
    .category_article_body { display: flex; flex-direction: column; }
    .category_article_body .category_rail { display: block; position: static; order: 2; margin-top: 45px; padding: 22px 0 0; border-top: 1px solid var(--insights_line); }
}

/* 編輯器頁內容區與頁尾不設最大寬度，與主視覺左右對齊 */
.category_editor_page .insight_article_body, .category_editor_page .insight_article_end { max-width: none; }
/* 內文限制行長，維持舒適的閱讀寬度 */
.category_editor_page .insight_prose { max-width: 780px; }

/* 列表分頁：外框沿用數位觀點分頁，連結由 Pager 的 pagination_view 輸出 */
.category_pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 70px; padding-top: 23px; border-top: 1px solid var(--insights_line); }
.category_pagination > span { font: 400 10px/1.7 'Manrope', sans-serif; color: var(--insights_muted); }
.category_pagination .pagination_list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.category_pagination .pagination_list a, .category_pagination .pagination_list span { min-width: 38px; min-height: 38px; display: grid; place-items: center; border: 1px solid transparent; font: 400 11px/1 'Manrope', sans-serif; }
.category_pagination .pagination_list a:hover { border-color: var(--insights_line); }
.category_pagination .pagination_list .is_active a { border-color: var(--insights_ink); border-radius: 50%; }
.category_pagination .pagination_list .is_disabled a, .category_pagination .pagination_list .is_disabled span { color: var(--insights_line); pointer-events: none; }
@media (max-width: 640px) {
    .category_pagination { margin-top: 43px; }
    .category_pagination .pagination_list a, .category_pagination .pagination_list span { min-width: 34px; min-height: 40px; }
}
