/* ==========================================================================
   文章專欄・設計提案 A / B（參考用，文字層級比照首頁 index2）
     英文小字 → 等寬字、藍綠、全大寫      大標題 → 華康龍門石碑、深藍
     小標     → 華康徽宗宮體、粉紅        內文   → 黑體、灰藍、行高 2
   ========================================================================== */
@font-face {
  font-family: 'UDot';
  src: local('Microsoft JhengHei'), local('微軟正黑體'), local('PingFang TC'), local('Noto Sans CJK TC'), local('Noto Sans TC'), local('Noto Sans CJK JP');
  unicode-range: U+30FB, U+2022, U+00B7, U+FF1A;
}
.jp {
  --jp-pink: #E27AA6;
  --jp-muted: #53616a;
  --jp-line: rgba(24, 54, 93, .14);
  padding: calc(var(--header-h) + 2.2rem) 0 7rem;
  color: var(--jp-muted);
  font-family: var(--font-sans);
}
.jp-panel {
  width: min(1480px, calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(2rem, 4.4vw, 4.5rem) clamp(1.4rem, 5vw, 5.5rem) clamp(2.4rem, 5vw, 5rem);
  background: rgba(255, 253, 248, .82);
  border: 1px solid rgba(138, 158, 146, .34);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(24, 42, 54, .07);
}
.jp-eyebrow {
  display: block;
  font: 500 .72rem/1.5 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-teal);
}
.jp-title {
  margin: .5rem 0 0;
  font: 500 clamp(2rem, 4vw, 3rem)/1.4 var(--font-title-longmen);
  letter-spacing: .09em;
  color: var(--brand-navy);
}
.jp-lead {
  margin: .5rem 0 0;
  font: 400 clamp(1.4rem, 2.4vw, 1.83rem)/1.6 'UDot', var(--font-brand-gong);
  color: var(--jp-pink);
}
.jp-intro {
  margin: 1rem 0 0;
  max-width: 44rem;
  font-size: 1rem;
  line-height: 2;
  color: var(--jp-muted);
}
.jp [hidden] { display: none !important; }

/* 提案切換列（正式採用後可整段移除） */
.jp-switch {
  width: min(1480px, calc(100% - 56px));
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .12em;
  color: var(--jp-muted);
}
.jp-switch a {
  padding: .55rem .9rem;
  border: 1px solid var(--jp-line);
  border-radius: 999px;
  color: var(--brand-navy);
  text-decoration: none;
  background: rgba(255, 255, 255, .6);
}
.jp-switch a[aria-current="page"] { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* 分類標籤（A、B 共用的篩選鈕） */
.jp-filter {
  font: 400 .95rem/1 var(--font-serif);
  color: var(--jp-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.jp-more {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font: 500 .92rem/1 var(--font-serif);
  letter-spacing: .06em;
  color: var(--brand-navy);
  text-decoration: none;
}
.jp-more::after { content: "↗"; color: var(--brand-teal); transition: transform .2s; }
a:hover > .jp-more::after, .jp-more:hover::after { transform: translate(2px, -2px); }

/* ============================ 提案 A：卷首精選＋卡片 ============================ */
.jpa-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--jp-line);
}
.jpa-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; max-width: 30rem; }
.jpa-filters .jp-filter {
  padding: .7rem 1.05rem;
  border: 1px solid var(--jp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}
.jpa-filters .jp-filter.is-active { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

.jpa-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
  margin-top: 2.6rem;
  color: inherit;
  text-decoration: none;
}
.jpa-feature-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #d9502b 0%, #e07d55 42%, #dcb08a 100%);
}
.jpa-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.jpa-feature:hover .jpa-feature-media img { transform: scale(1.03); }
.jpa-feature-flag {
  position: absolute;
  left: 0;
  top: 1.4rem;
  padding: .55rem 1rem .55rem 1.2rem;
  background: linear-gradient(90deg, #d9502b, #e07d55);
  color: #1d1512;
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .14em;
}
.jpa-meta { display: flex; align-items: center; gap: 1rem; }
.jpa-meta time, .jpb-row time {
  font: 500 .72rem/1.5 var(--font-mono);
  letter-spacing: .1em;
  color: rgba(83, 97, 106, .75);
}
.jpa-feature h2 {
  margin: .9rem 0 0;
  font: 500 clamp(1.75rem, 3vw, 2.4rem)/1.45 var(--font-title-longmen);
  letter-spacing: .06em;
  color: var(--brand-navy);
}
.jpa-feature .jpa-sub, .jpa-card .jpa-sub {
  margin: .5rem 0 0;
  font: 500 clamp(1.265rem, 2.2vw, 1.595rem)/1.45 'UDot', var(--font-brand-gong);
  color: var(--jp-pink);
}
.jpa-feature p.jpa-text { margin: 1rem 0 1.6rem; font-size: 1rem; line-height: 2; }

.jpa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.2rem clamp(1.4rem, 2.6vw, 2.4rem);
  margin-top: 3.4rem;
  padding-top: 2.8rem;
  border-top: 1px solid var(--jp-line);
}
.jpa-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.jpa-card-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #e9e4d6; }
.jpa-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.jpa-card:hover .jpa-card-media img { transform: scale(1.04); }
.jpa-card .jpa-meta { margin-top: 1.1rem; justify-content: space-between; }
.jpa-card .jpa-sub { font-size: clamp(1.2rem, 1.9vw, 1.45rem); margin-top: .45rem; }
.jpa-card p.jpa-text { margin: .6rem 0 1.1rem; font-size: .95rem; line-height: 1.85; }
.jpa-card .jp-more { margin-top: auto; }

/* ============================ 提案 B：目錄式長卷 ============================ */
.jpb-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: start;
}
.jpb-side { position: sticky; top: calc(var(--header-h) + 2rem); }
.jpb-side .jp-intro { font-size: .95rem; line-height: 1.9; }
.jpb-filters { display: grid; margin-top: 2rem; border-top: 1px solid var(--jp-line); }
.jpb-filters .jp-filter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: .95rem 0;
  border-bottom: 1px solid var(--jp-line);
  text-align: left;
  font-size: 1rem;
  transition: padding .2s, color .2s;
}
.jpb-filters .jp-filter span { font: 500 .72rem/1 var(--font-mono); letter-spacing: .1em; color: var(--brand-teal); }
.jpb-filters .jp-filter:hover, .jpb-filters .jp-filter.is-active { padding-left: .7rem; color: var(--brand-teal); }   /* 選中項目：與編號 01、02 同藍綠 */
.jpb-filters .jp-filter.is-active { border-bottom-color: var(--brand-teal); }

.jpb-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) clamp(9rem, 15vw, 13.5rem);
  gap: clamp(1rem, 2.4vw, 2.4rem);
  align-items: center;
  padding: 2.1rem 0;
  border-bottom: 1px solid var(--jp-line);
  color: inherit;
  text-decoration: none;
}
.jpb-list .jpb-row:first-child { padding-top: .4rem; }
.jpb-num {
  align-self: start;
  font: 300 2.8rem/1 'Outfit', sans-serif;
  color: var(--brand-teal);
}
.jpb-row h2 {
  margin: .45rem 0 0;
  font: 500 clamp(1.5rem, 2.4vw, 2rem)/1.45 var(--font-title-longmen);
  letter-spacing: .05em;
  color: var(--brand-navy);
  transition: color .2s;
}
.jpb-row:hover h2 { color: var(--brand-teal); }
.jpb-sub {
  margin: .35rem 0 0;
  font: 500 clamp(1.2rem, 1.9vw, 1.45rem)/1.45 'UDot', var(--font-brand-gong);
  color: var(--jp-pink);
}
.jpb-row p.jpb-text { margin: .7rem 0 0; font-size: 1rem; line-height: 2; }
.jpb-row .jpa-meta { gap: 1.1rem; }
.jpb-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #e9e4d6; }
.jpb-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.jpb-row:hover .jpb-media img { transform: scale(1.04); }

/* 分頁：左右箭頭＋頁碼方格 */
.jpb-pager { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 2.6rem; }
.jpb-page-nums { display: flex; gap: .6rem; }
.jpb-page, .jpb-page-arrow {
  min-width: 2.8rem;
  height: 2.8rem;
  padding: 0 .6rem;
  border: 1px solid var(--jp-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .6);
  font: 500 .82rem/1 var(--font-mono);
  letter-spacing: .08em;
  color: var(--brand-navy);
  cursor: pointer;
  transition: .2s;
}
.jpb-page-arrow { font: 400 1.35rem/1 var(--font-sans); color: var(--brand-teal); }
.jpb-page:hover, .jpb-page-arrow:not(:disabled):hover { border-color: var(--brand-teal); color: var(--brand-teal); }
.jpb-page.is-active { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
.jpb-page-arrow:disabled { opacity: .35; cursor: default; }

@media (max-width: 960px) {
  .jpa-head { grid-template-columns: 1fr; align-items: start; }
  .jpa-filters { justify-content: flex-start; max-width: none; }
  .jpa-feature { grid-template-columns: 1fr; }
  .jpa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jpb-layout { grid-template-columns: 1fr; }
  .jpb-side { position: static; }
  .jpb-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.2rem; }
}
@media (max-width: 680px) {
  .jp-panel, .jp-switch { width: calc(100% - 20px); }
  .jpa-grid { grid-template-columns: 1fr; }
  .jpb-row { grid-template-columns: 3rem minmax(0, 1fr); }
  .jpb-num { font-size: 2rem; }
  .jpb-media { grid-column: 2; }
}
