/* Editorial Civic base — variables, navbar/footer, base typography, inner-page wrapper */

:root {
  --ink-deep:    #1A1530;
  --ink:         #2A2240;
  --ink-soft:    #4A3F6B;
  --ink-mute:    #6E6388;
  --paper:       #F8F4ED;
  --paper-cream: #EFE8DA;
  --paper-edge:  #E2D9C4;
  --gold:        #C8A45C;
  --gold-deep:   #8B6F2E;
  --gold-soft:   #E8D7A8;
  --rose:        #C44536;
  --leaf:        #5B7C5A;
  --violet:      #5C3D90;

  --font-display: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", "STKaiti", "DFKai-SB", "Cambria", Georgia, serif;
  --font-body:    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
  /* 逐字 fallback：拉丁字走手寫（Caveat 已於 _GoogleFonts 載入）；中文走楷體（Windows 標楷體 / macOS·iOS Kaiti TC），
     無楷體的 Android 退到已載入的 Noto Serif TC 典雅襯線，不再掉回黑體。年度主題（.theme-text）等強調文字適用 */
  --font-hand:    "Caveat", "Brush Script MT", "Segoe Script", "Lucida Handwriting",
                  "DFKai-SB", "標楷體", "BiauKai", "TW-Kai", "Kaiti TC", "KaiTi", "STKaiti", "楷体",
                  "Noto Serif TC", cursive, serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter-x: clamp(24px, 5vw, 40px);
  --container-max: 1280px;
  --navbar-height: 70px;   /* sticky 元素參考用（如 .page-subnav top） */
}

@media (max-width: 1199.98px) {
  :root { --navbar-height: 60px; }
}

body.editorial {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.editorial img { max-width: 100%; height: auto; }

/* 內文閱讀欄寬度（measure）──────────────────────────────────
   閱讀舒適度由「行長」決定，不是螢幕尺寸：17px 中英混排內文，
   一行約 35–42 個中文字最舒適 → 內文欄上限 52rem（約 832px）。
   單一 max-width + 置中即涵蓋全裝置，不需逐裝置斷點：
     6吋手機 / 10吋平板  → 欄寬＝可用寬（滿欄，padding 留白）
     13吋筆電 / 32吋螢幕  → 收斂在 832 置中、超寬螢幕大留白，不再撐滿
   直式內文圖因 max-width:100% 自然被框在 832 內（不改圖、符合 WYSIWYG）。
   左右 padding 用 clamp 流式：手機 16px → 桌機 32px。 */
body.editorial .rich-content {
  max-width: 52rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

body.editorial .watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 38vw;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--paper-edge);
  letter-spacing: -0.04em;
  /* -1：沉到內文之下、頁面紙色底之上。
     原本 0 是「有定位元素」，依堆疊規則會畫在無定位的一般圖文之上 → 壓到照片/人臉。
     旁邊已配套 .page-wrapper 透明 + .site-footer z-index:1，浮水印改 -1 即從留白區透出而不擋前景。 */
  z-index: -1;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0.5;
}
body.editorial .page-wrapper { background: transparent !important; }
body.editorial .site-footer { position: relative; z-index: 1; }

/* Site header / navbar */
body.editorial .site-header {
  background: var(--paper) !important;
  border-bottom: 1px solid var(--paper-edge);
  box-shadow: none !important;
}
body.editorial .site-header .navbar {
  padding-top: 14px;
  padding-bottom: 14px;
}
body.editorial .site-header .navbar-brand {
  font-family: var(--font-display);
  color: var(--ink-deep);
  font-weight: 700;
  letter-spacing: 0.01em;
}
body.editorial .site-header .site-name {
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1em;
}
body.editorial .site-header .site-logo {
  filter: contrast(1.05);
}
/* 三段式 header：logo 與漢堡（navbtn）固定不縮、恆在同一排；只有中間標題容器彈性伸縮。
   標題永不換行，超出允許寬度時以來回橫移跑馬燈呈現（避免長站名把漢堡擠到第二排）。 */
body.editorial .site-header .navbar-brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
body.editorial .site-header .site-logo { flex: 0 0 auto; }
body.editorial .site-header .navbar-toggler { flex: 0 0 auto; }
body.editorial .site-header .site-name {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
body.editorial .site-header .site-name-text { display: inline-block; white-space: nowrap; }
@keyframes site-name-marquee {
  0%, 14%   { transform: translateX(0); }
  86%, 100% { transform: translateX(var(--marquee-shift, 0)); }
}
body.editorial .site-header .site-name.is-marquee .site-name-text {
  animation: site-name-marquee var(--marquee-duration, 9s) ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  body.editorial .site-header .site-name.is-marquee .site-name-text { animation: none; }
}
body.editorial .site-header .navbar-nav .nav-link {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.95em;
  font-weight: 500;
  position: relative;
  padding-bottom: 6px;
  border-bottom: none;   /* 排除 body.editorial a 的 typography border（v2.8 副作用） */
  transition: color 0.3s var(--ease-out);
}
body.editorial .site-header .navbar-nav .nav-link.dropdown-toggle::after {
  display: none;
}
body.editorial .site-header .navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem;
  bottom: 2px;
  height: 1px;
  width: 0;
  background: var(--gold-deep);
  transition: width 0.4s var(--ease-out);
}
body.editorial .site-header .navbar-nav .nav-link:hover {
  color: var(--gold-deep);
}
body.editorial .site-header .navbar-nav .nav-link:hover::before {
  width: calc(100% - 1.7rem);
}
body.editorial .site-header .dropdown-menu {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(26, 21, 48, 0.08);
  font-family: var(--font-display);
}
body.editorial .site-header .dropdown-item {
  color: var(--ink);
  padding: 10px 18px;
  font-size: 0.95em;
  transition: all 0.3s var(--ease-out);
}
body.editorial .site-header .dropdown-item:hover,
body.editorial .site-header .dropdown-item:focus {
  background: var(--paper-cream);
  color: var(--gold-deep);
}
body.editorial .site-header .navbar-toggler {
  border: 1px solid var(--gold);
  border-radius: 0;
  padding: 8px 10px;
  color: var(--gold-deep);
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
body.editorial .site-header .navbar-toggler:hover {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
body.editorial .site-header .navbar-toggler:focus {
  box-shadow: none;
}
body.editorial .site-header .navbar-toggler:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
body.editorial .site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%238B6F2E' stroke-linecap='round' stroke-miterlimit='10' stroke-width='1.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

body.editorial .site-footer {
  background: var(--ink-deep) !important;
  color: var(--paper);
}
body.editorial .site-footer h2 {
  color: var(--gold) !important;
  font-family: var(--font-display);
  font-weight: 700;
}
body.editorial .site-footer hr {
  border-color: rgba(248, 244, 237, 0.08);
  opacity: 1;
}
body.editorial .site-footer .subfooter {
  border-top-color: rgba(248, 244, 237, 0.08) !important;
}
body.editorial .site-footer p,
body.editorial .site-footer li,
body.editorial .site-footer .text-muted {
  color: rgba(248, 244, 237, 0.75) !important;
}
body.editorial .site-footer a {
  color: rgba(248, 244, 237, 0.85) !important;
  transition: color 0.3s var(--ease-out);
}
body.editorial .site-footer a:hover {
  color: var(--gold) !important;
}
body.editorial .site-footer .footer-social {
  margin-top: 0.5rem;
}
body.editorial .site-footer .footer-social-link {
  width: 34px;
  height: 34px;
  font-size: 1.15rem;
  background: rgba(248, 244, 237, 0.08);
  border-color: rgba(248, 244, 237, 0.15);
}
body.editorial .site-footer .footer-social-link:hover {
  background: var(--gold);
  color: var(--ink-deep);
}

@media (max-width: 1199.98px) {
  body.editorial .site-header .navbar-nav .nav-link::before { display: none; }
  /* 漢堡（navbtn）可見的斷點：限制 brand 最大寬度並預留漢堡空間，避免長標題把漢堡擠到第二排。
     flex-wrap:wrap 下 flex-shrink 不會壓縮 brand（會直接把漢堡換行），故須用 max-width 明確保留。 */
  body.editorial .site-header .navbar-brand { max-width: calc(100% - 84px); flex: 0 1 auto; }
  /* 展開的漢堡選單限制在視窗高度內、內部可捲動：組織架構等長清單（節點多）展開時仍能滑到底。
     header 為 sticky-top（約 70px），扣掉後留給選單捲動；overscroll-behavior 避免捲到底連動整頁。 */
  body.editorial .site-header .navbar-collapse {
    max-height: calc(100vh - var(--navbar-height, 70px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 14px;
  }
}

@media (max-width: 575.98px) {
  body.editorial .site-header .navbar { padding-top: 10px; padding-bottom: 10px; }
  body.editorial .site-header .navbar-brand {
    gap: 8px !important;
    min-width: 0;
    max-width: calc(100% - 84px);
    flex: 1 1 auto;
  }
  body.editorial .site-header .site-logo { height: 36px; flex: 0 0 auto; }
  body.editorial .site-header .site-name {
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  body.editorial .site-header .navbar-toggler { flex: 0 0 auto; padding: 6px 8px; }
}

@media (max-width: 575.98px) {
  body.editorial { font-size: 18.5px; line-height: 1.7; }
}

/* Inner page wrapper */
.editorial-inner-page {
  font-family: var(--font-body);
  color: var(--ink);
  padding-bottom: 60px;
}

/* Editorial generic typography — scope 提升為 body.editorial（v2.8）
   讓 HomePage（home-editorial-page）、InnerPage（editorial-inner-page）、TinyMCE iframe
   三邊只要 body 有 editorial class 就自動套，編輯與前台行為一致。
   既有專屬 selector（.theme-text / .page-hero h1 / .stats-num 等）specificity 更高，不會被覆蓋。 */
body.editorial h1,
body.editorial h2,
body.editorial h3,
body.editorial h4,
body.editorial h5,
body.editorial h6 {
  font-family: var(--font-display);
  color: var(--ink-deep);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
body.editorial h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 1.5em; margin-bottom: 0.6em; }
body.editorial h3 { font-size: clamp(20px, 2.4vw, 26px); margin-top: 1.3em; margin-bottom: 0.5em; }
body.editorial h4 { font-size: clamp(18px, 2vw, 22px); margin-top: 1.1em; margin-bottom: 0.4em; }
body.editorial h5 { font-size: clamp(18px, 2vw, 20px); margin-top: 1em; margin-bottom: 0.35em; }

body.editorial p {
  font-size: 1em;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.1em;
}
body.editorial p.lead,
body.editorial .lead {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ⚠️ 反覆踩的雷：這條的 border-bottom(hover 變金線的 typography 底線)specificity=(0,0,1,2)，
   會蓋過任何「單一 class 的 <a> 元件」(chip / pill / tab / 卡片連結，(0,0,1,0))的 border 下緣，
   使其下緣邊線被吃成透明、或 hover 冒出非預期金線。
   任何 body.editorial 底下、以 <a> 做的「有外框」元件，CSS 必須以 body.editorial 前綴自我 scope
   (拉到 ≥(0,0,2,1))才蓋得過。詳見 skill-frontend-templates「editorial <a> border 陷阱」。 */
body.editorial a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
body.editorial a:hover {
  color: var(--ink-deep);
  border-bottom-color: var(--gold);
}

body.editorial ul:not(.navbar-nav):not(.dropdown-menu):not(.pagination):not(.nav):not(.list-unstyled):not(.dl-list):not(.select2-results__options):not(.select2-selection__rendered),
body.editorial ol:not(.navbar-nav):not(.dropdown-menu):not(.pagination):not(.nav):not(.list-unstyled):not(.select2-results__options):not(.select2-selection__rendered) {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}
body.editorial ul:not(.navbar-nav):not(.dropdown-menu):not(.pagination):not(.nav):not(.list-unstyled):not(.dl-list):not(.select2-results__options):not(.select2-selection__rendered) > li,
body.editorial ol:not(.navbar-nav):not(.dropdown-menu):not(.pagination):not(.nav):not(.list-unstyled):not(.select2-results__options):not(.select2-selection__rendered) > li {
  margin-bottom: 0.3em;
  line-height: 1.8;
}
body.editorial ul li::marker {
  color: var(--gold);
}
body.editorial ol li::marker {
  color: var(--gold-deep);
  font-family: var(--font-mono);
  font-weight: 600;
}

body.editorial table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.92em;
}
body.editorial table thead {
  border-bottom: 2px solid var(--gold-deep);
}
body.editorial table th {
  font-family: var(--font-display);
  color: var(--ink-deep);
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  letter-spacing: 0.04em;
}
body.editorial table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--paper-edge);
  color: var(--ink);
}
body.editorial table tr:hover td {
  background: rgba(248, 244, 237, 0.5);
}

body.editorial blockquote {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 19px);
  font-style: italic;
  background: var(--paper-cream);
  border-left: 3px solid var(--gold);
  padding: 18px 24px;
  margin: 1.5em 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

body.editorial code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-cream);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--rose);
}
body.editorial pre {
  background: var(--ink-deep);
  color: var(--paper);
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1.6;
}
body.editorial pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

body.editorial hr {
  border: none;
  border-top: 1px solid var(--paper-edge);
  margin: 2em 0;
}

/* 只給「內文 / 段落 / figure 內的 img」上下留白（編輯者在 RichContent 插的圖）
   避免污染功能性圖（.slide-img / hero / logo 等容器 fit 圖）導致 layout 偏移 */
body.editorial p > img,
body.editorial figure > img,
body.editorial li > img {
  margin: 1em 0;
}

/* Inner page hero / breadcrumb */
.page-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
  padding: 36px 0 30px;
  margin-bottom: 28px;
  position: relative;
  text-align: center;
}

.page-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78em;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 22px;
  line-height: 1.6;
}
.page-breadcrumb .breadcrumb {
  --bs-breadcrumb-divider: "/";
  --bs-breadcrumb-divider-color: var(--paper-edge);
  --bs-breadcrumb-item-padding-x: 10px;
  --bs-breadcrumb-item-active-color: var(--ink-deep);
  background: transparent;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
}
.page-breadcrumb .breadcrumb-item {
  color: var(--ink-soft);
}
.page-breadcrumb .breadcrumb-item a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out);
}
.page-breadcrumb .breadcrumb-item a:hover {
  border-bottom-color: var(--gold);
}
.page-breadcrumb .breadcrumb-item.active {
  color: var(--ink-deep);
  font-weight: 600;
}

/* inline-block + ::after underline 跟文字同寬 */
.page-hero .page-title {
  font-family: var(--font-display);
  color: var(--ink-deep);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  margin: 0;
  display: inline-block;
  position: relative;
  padding-bottom: 16px;
}
.page-hero .page-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
}

.page-hero .page-subtitle {
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-size: clamp(16px, 1.6vw, 19px);
  margin-top: 14px;
  margin-bottom: 0;
  line-height: 1.6;
}

.page-hero .page-eyebrow-caveat {
  font-family: var(--font-hand);
  color: var(--gold-deep);
  font-size: clamp(20px, 2.2vw, 28px);
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1;
  font-style: italic;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 28px 0 22px;
    margin-bottom: 20px;
  }
  .page-breadcrumb {
    margin-bottom: 16px;
  }
  .page-hero .page-title {
    padding-bottom: 12px;
  }
}

/* Page sub-nav — sticky 切齊 navbar 底緣 */
.page-subnav {
  background: var(--paper-cream);
  border-bottom: 1px solid var(--paper-edge);
  margin-top: -28px;  /* 抵消 .page-hero margin-bottom，緊接 hero */
  margin-bottom: 28px;
  position: sticky;
  top: var(--navbar-height, 65px);
  z-index: 1010;  /* 比 .sticky-top（1020）低一階，stack 在 navbar 下方 */
}
.page-subnav > .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
/* prefix .editorial-inner-page 蓋過 .editorial-inner-page a:hover 的 border */
.editorial-inner-page .page-subnav-item {
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-size: 0.92em;
  font-weight: 500;
  padding: 14px 22px;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s var(--ease-out);
  scroll-snap-align: start;
  border-bottom: none;  /* 明確去掉，避免被 .editorial-inner-page a 規則繼承 */
}
.editorial-inner-page .page-subnav-item::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 8px;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}
.editorial-inner-page .page-subnav-item:hover {
  color: var(--gold-deep);
  border-bottom: none;
}
.editorial-inner-page .page-subnav-item:hover::before {
  width: calc(100% - 44px);
}
.editorial-inner-page .page-subnav-item.active {
  color: var(--ink-deep);
  font-weight: 700;
}
.editorial-inner-page .page-subnav-item.active::before {
  width: calc(100% - 44px);
  height: 2px;
  background: var(--gold);
}

@media (max-width: 768px) {
  .page-subnav {
    margin-top: -20px;
    margin-bottom: 20px;
  }
  .page-subnav > .container {
    justify-content: flex-start;
    /* 手機改單排橫向捲動（配合既有 overflow-x/scroll-snap），不再換行成兩排 */
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox 藏捲軸 */
  }
  .page-subnav > .container::-webkit-scrollbar {
    display: none;                    /* WebKit 藏捲軸 */
  }
  .editorial-inner-page .page-subnav-item {
    padding: 12px 16px;
    flex: 0 0 auto;                   /* 不收縮，維持原寬 → 橫向捲動而非擠扁 */
  }
  .editorial-inner-page .page-subnav-item::before {
    left: 16px;
    right: 16px;
  }
  .editorial-inner-page .page-subnav-item:hover::before,
  .editorial-inner-page .page-subnav-item.active::before {
    width: calc(100% - 32px);
  }
}

/* ── ConfigurableList layout=list 條列（如數位電子報）：保留原結構，只上主題配色 ──
   不改版型 / 不動圖片尺寸（維持原 160×106 縮圖），純粹把灰階 Bootstrap 配色換成
   金 / 墨 / 紙的 editorial 視覺：襯線標題、金色 mono 日期、紙邊分隔、hover 紙底＋標題轉金。 */
.editorial-inner-page .cl-news-row {
  border-bottom-color: var(--paper-edge) !important;
  transition: background .3s var(--ease-out);
}
.editorial-inner-page .cl-news-row:hover { background: var(--paper-cream); }
.editorial-inner-page .cl-news-row .bg-light {
  background: var(--paper-cream) !important;
  border: 1px solid var(--paper-edge);
}
.editorial-inner-page .cl-news-row .card-title { font-family: var(--font-display); }
.editorial-inner-page .cl-news-row .card-title a,
.editorial-inner-page .cl-news-row .card-title .text-body {
  color: var(--ink-deep);
  border-bottom: none;
}
.editorial-inner-page .cl-news-row:hover .card-title a { color: var(--gold-deep); }
.editorial-inner-page .cl-news-row p.text-secondary {
  color: var(--gold-deep) !important;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}
.editorial-inner-page .cl-news-row .card-text { color: var(--ink-soft) !important; }

body.editorial .line-oa-section {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  background: linear-gradient(to bottom, transparent 0%, var(--ink-deep) 100%);
}
body.editorial .line-oa-section > .container {
  position: relative;
  z-index: 2;
}
body.editorial .line-oa-card {
  background: #06C755;
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 10px 30px rgba(6, 199, 85, 0.18);
}
body.editorial .line-oa-info {
  flex: 1;
  min-width: 0;
}
body.editorial .line-oa-eyebrow {
  font-size: 0.82em;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88) !important;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
body.editorial .line-oa-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
body.editorial .line-oa-desc {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.92) !important;
  margin: 0 0 1rem;
  line-height: 1.55;
}
body.editorial .line-oa-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
body.editorial .line-oa-id {
  display: inline-block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 700;
  font-size: 0.95em;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
body.editorial .line-oa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff !important;
  color: #06C755 !important;
  font-weight: 700;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  font-size: 1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
body.editorial .line-oa-btn:hover {
  background: #f3f3f3 !important;
  color: #058a3d !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}
body.editorial .line-oa-btn .mdi {
  font-size: 1.15em;
}
body.editorial .line-oa-qr {
  position: relative;
  background: #f8f4ed;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--gold, #b48a3c), 0 6px 20px rgba(0, 0, 0, 0.18);
}
body.editorial .line-oa-qr::before,
body.editorial .line-oa-qr::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-deep, #8b6914);
  border-style: solid;
  border-width: 0;
}
body.editorial .line-oa-qr::before {
  top: 4px; left: 4px;
  border-top-width: 2px;
  border-left-width: 2px;
}
body.editorial .line-oa-qr::after {
  bottom: 4px; right: 4px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}
body.editorial .line-oa-qr .line-oa-qr-img {
  display: block;
  width: 140px;
  height: 140px;
}

@media (max-width: 767.98px) {
  body.editorial .line-oa-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.25rem;
    gap: 1rem;
  }
  body.editorial .line-oa-actions {
    justify-content: center;
  }
  body.editorial .line-oa-qr {
    display: none;
  }
  body.editorial .line-oa-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 1.05em;
  }
}

/* ============================================================
   Select2 (Bootstrap 5 theme) — editorial 主題覆寫
   預設 BS5 用 --bs-primary（藍），這裡改成 gold 系與 paper 系
   ============================================================ */
body.editorial .select2-container--bootstrap-5 .select2-selection {
  background-color: var(--paper) !important;
  border: 1px solid var(--paper-edge) !important;
  color: var(--ink) !important;
  min-height: calc(1.5em + 0.75rem + 2px) !important;
  border-radius: 0.375rem !important;
}
body.editorial .select2-container--bootstrap-5.select2-container--focus .select2-selection,
body.editorial .select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 0.2rem rgba(200, 164, 92, 0.18) !important;
}
body.editorial .select2-container--bootstrap-5 .select2-selection__rendered {
  color: var(--ink) !important;
}
body.editorial .select2-container--bootstrap-5 .select2-selection__placeholder {
  color: var(--ink-mute) !important;
}
body.editorial .select2-container--bootstrap-5 .select2-selection__arrow b {
  border-color: var(--ink-soft) transparent transparent transparent !important;
}

/* dropdown 浮層：Select2 把 dropdown 掛到 <body> 末尾（不在 body.editorial 內），
   所以這段 selector 不能加 body.editorial scope，否則 match 不到。
   view 把 select2 theme css inline 載在 body（比 head 的本檔晚載入），所以 !important 確保覆寫順序。
   子站如需不同主題 dropdown，在 init 時加 dropdownCssClass 各自覆寫。 */
.select2-container--bootstrap-5 .select2-dropdown {
  background-color: var(--paper, #F8F4ED) !important;
  border-color: var(--gold, #C8A45C) !important;
  box-shadow: 0 8px 24px rgba(26, 21, 48, 0.12) !important;
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  background: #fff !important;
  border: 1px solid var(--paper-edge, #E2D9C4) !important;
  border-radius: 0.25rem !important;
  color: var(--ink, #2A2240) !important;
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--gold, #C8A45C) !important;
  outline: none !important;
  box-shadow: 0 0 0 0.15rem rgba(200, 164, 92, 0.2) !important;
}

/* option 列表 */
.select2-container--bootstrap-5 .select2-results__option {
  color: var(--ink, #2A2240) !important;
  padding: 0.5rem 0.9rem !important;
  font-family: var(--font-body) !important;
  background-color: transparent !important;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
  background-color: var(--gold-soft, #E8D7A8) !important;
  color: var(--ink-deep, #1A1530) !important;
}
.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
  background-color: var(--paper-cream, #EFE8DA) !important;
  color: var(--gold-deep, #8B6F2E) !important;
  font-weight: 500 !important;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected="true"] {
  background-color: var(--gold, #C8A45C) !important;
  color: #fff !important;
}

/* multi-select tag chips */
body.editorial .select2-container--bootstrap-5 .select2-selection__choice {
  background-color: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--ink-deep);
}
body.editorial .select2-container--bootstrap-5 .select2-selection__choice__remove {
  color: var(--gold-deep);
}
body.editorial .select2-container--bootstrap-5 .select2-selection__choice__remove:hover {
  color: var(--ink-deep);
  background: transparent;
}

/* ── 桌機分頁器（skill-pagination；Frontend 共用 _Pager.cshtml）──
   footprint 固定：≤5 數字鈕 / >5 input 跳頁。圖示鈕外框用 box-shadow 環，
   避開上方 `body.editorial a { border-bottom: 1px solid transparent }` 把 <a> 下緣邊線蓋透明。 */
.st-pager { margin-top: 2rem; }
.st-pager .pagination { gap: 0.3rem; flex-wrap: nowrap; align-items: center; }
.st-pager .page-item { margin: 0; }
.st-pager .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 2rem;
    min-width: 2rem;
    margin: 0;
    padding: 0 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: inset 0 0 0 1px var(--pg-border, rgba(26, 21, 48, 0.16));
    background: #fff;
    color: var(--pg-ink, #1A1530);
    font-size: 0.85rem;
    line-height: 1;
    transition: box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.st-pager .page-link .mdi { font-size: 1.05rem; line-height: 1; }
.st-pager .page-link:hover {
    box-shadow: inset 0 0 0 1px var(--pg-border-hi, rgba(200, 164, 92, 0.72));
    color: var(--pg-gold, #C8A45C);
}
.st-pager .page-item.active .page-link {
    background: var(--pg-ink, #1A1530);
    color: var(--pg-paper, #F8F4ED);
    box-shadow: inset 0 0 0 1px var(--pg-ink, #1A1530);
}
.st-pager .page-item.disabled .page-link {
    color: color-mix(in srgb, var(--pg-ink, #1A1530) 28%, transparent);
    background: transparent;
}
/* 跳頁元件：第 [ ‹ input › ] / N 頁（自訂 stepper 膠囊，藏原生 spinner，點箭頭換頁不必鍵盤） */
.st-pager-jumper {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.35rem;
    font-size: 0.85rem;
    white-space: nowrap;
    color: color-mix(in srgb, var(--pg-ink, #1A1530) 70%, transparent);
}
.st-pager-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 2rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--pg-border, rgba(26, 21, 48, 0.16));
    overflow: hidden;
}
.st-pager-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pg-ink, #1A1530);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.st-pager-step .mdi { font-size: 1.05rem; line-height: 1; }
.st-pager-step:hover:not(:disabled) {
    background: color-mix(in srgb, var(--pg-ink, #1A1530) 7%, transparent);
    color: var(--pg-gold, #C8A45C);
}
.st-pager-step:disabled { color: color-mix(in srgb, var(--pg-ink, #1A1530) 22%, transparent); cursor: default; }
.st-pager-input {
    width: 2.6rem;
    box-sizing: border-box;
    text-align: center;
    border: 0;
    background: transparent;
    color: var(--pg-ink, #1A1530);
    font-size: 0.9rem;
    font-weight: 700;
    /* 左右分隔線（segmented look） */
    box-shadow: inset 1px 0 0 var(--pg-border, rgba(26, 21, 48, 0.16)), inset -1px 0 0 var(--pg-border, rgba(26, 21, 48, 0.16));
    -moz-appearance: textfield;
    appearance: textfield;
}
.st-pager-input:focus { outline: none; background: color-mix(in srgb, var(--pg-gold, #C8A45C) 9%, transparent); }
.st-pager-input::-webkit-outer-spin-button,
.st-pager-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ============================================================
   電子報金色刊頭範本 .nl-masthead
   由 Admin TinyMCE「主題刊頭」按鈕插入；自足元件，不依賴 body.editorial /
   .editorial-inner-page scope，故前台 .rich-content 詳情頁與編輯器 content_css
   （本檔亦被 st-editor content_css 載入）渲染一致，所見即所得。
   ============================================================ */
.nl-masthead { margin: 0 0 1.8em; font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
.nl-masthead .nl-eyebrow {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: #8B6F2E;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.6em;
}
.nl-masthead .nl-head {
    font-family: 'Noto Serif TC', 'Source Han Serif TC', serif;
    font-weight: 900;
    color: #1A1530;
    font-size: 1.6rem;
    line-height: 1.42;
    margin: 0;
}
.nl-masthead .nl-rule { height: 2px; width: 56px; background: #C8A45C; margin: 1em 0 1.15em; border-radius: 2px; }
.nl-masthead .nl-info {
    background: #F8F4ED;
    border-left: 4px solid #C8A45C;
    border-radius: 0 12px 12px 0;
    padding: 1.05em 1.25em;
    box-shadow: 0 3px 14px rgba(139, 111, 46, 0.12);
}
.nl-masthead .nl-info-cap {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: #8B6F2E;
    text-transform: uppercase;
    margin-bottom: 0.85em;
    display: flex;
    align-items: center;
    gap: 0.6em;
}
.nl-masthead .nl-info-cap::after { content: ""; flex: 1; height: 1px; background: #E2D9C4; }
.nl-masthead .nl-meta { display: grid; gap: 0.55em; }
.nl-masthead .nl-row { display: grid; grid-template-columns: 6em 1fr; gap: 0.9em; align-items: baseline; }
.nl-masthead .nl-k { color: #8B6F2E; font-weight: 700; font-family: 'Noto Serif TC', 'Source Han Serif TC', serif; font-size: 0.92rem; }
.nl-masthead .nl-v { color: #2A2240; font-weight: 500; font-size: 0.95rem; }
@media (max-width: 480px) {
    .nl-masthead .nl-head { font-size: 1.35rem; }
    .nl-masthead .nl-row { grid-template-columns: 5em 1fr; gap: 0.6em; }
}
