:root {
  /* 鼠尾草綠：與電子書、實戰系統同色系，但官網更淡、留白更多，
     綠色只當點綴（按鈕／連結／標題），不當大面積底色 */
  --background: #fbfcf9;
  --foreground: #333930;
  --surface: #fff;
  --surface-strong: #e4e9e1;
  --surface-muted: #eef1eb;
  --border: #6b755f45;
  --accent: #a7b3a0;
  --accent-deep: #5c6956;
  --ink-soft: #696f62;
  --shadow-soft: 0 18px 52px #7a856e14;
  --hero-glow: radial-gradient(circle at top left, #d6e2cc85, transparent 40%),
    radial-gradient(circle at top right, #f4f6f2f5, transparent 35%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fbfcf9e6;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 20px; letter-spacing: 2px; color: var(--foreground); font-weight: 700; }
.brand span { font-size: 13px; color: var(--ink-soft); letter-spacing: 3px; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  padding: 6px 12px; border-radius: 999px;
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
}
.site-nav a:hover { background: var(--surface-muted); color: var(--foreground); text-decoration: none; }
.site-nav a.active { color: var(--accent-deep); background: var(--surface-strong); }
.site-nav a.nav-cta {
  background: var(--accent-deep); color: #fff; margin-left: 6px;
}
.site-nav a.nav-cta:hover { background: #485243; color: #fff; }

.nav-toggle { display: none; }

/* Hero */
.hero {
  background: var(--hero-glow);
  padding: 48px 0 40px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 0.6fr;
  gap: 40px; align-items: center;
}
.hero h1 { font-size: 40px; line-height: 1.3; font-weight: 700; letter-spacing: 1px; }
.hero .subtitle { font-size: 20px; color: var(--accent-deep); font-weight: 500; margin-top: 8px; }
.hero .lead { margin-top: 20px; color: var(--ink-soft); }
.hero-points { list-style: none; margin-top: 20px; display: grid; gap: 10px; }
.hero-points li {
  padding-left: 26px; position: relative; color: var(--foreground);
  text-wrap: pretty;
}
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
.hero-photo img {
  border-radius: 28px; box-shadow: var(--shadow-soft);
  border: 1px solid var(--border); background: var(--surface);
}
.hero-avatar { display: flex; justify-content: center; }
.hero-avatar img {
  width: min(208px, 70%); border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-soft);
  background: var(--surface-strong);
}

.btn-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 999px;
  font-size: 16px; font-weight: 500; line-height: 1.5;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: #485243; }
.btn-secondary {
  background: var(--surface); color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-muted); }

/* Sections */
.section { padding: 32px 0; }
.section-alt { background: var(--surface-muted); }
.section h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; letter-spacing: 1px; }
.section .section-note { color: var(--ink-soft); margin-bottom: 28px; }

.page-head { padding: 56px 0 8px; background: var(--hero-glow); }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: 1px; }
.page-head p { color: var(--ink-soft); margin-top: 10px; max-width: 640px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; box-shadow: var(--shadow-soft);
  padding: 28px;
}
.card + .card { margin-top: 24px; }

.card-grid { display: grid; gap: 24px; }
.card-grid .card { margin-top: 0; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-3 > .card { display: flex; flex-direction: column; align-items: flex-start; }
.cols-3 > .card .btn { margin-top: auto; }

/* 首頁精選：可替換的視覺區塊，補上首頁缺少的圖像重量。
   刻意不放日期或「最新」字樣——內容產出是低頻的，標了時效反而會顯得久未更新。 */
.feature-section { padding-bottom: 8px; }
/* 字級與字重都對齊 Hero 的副標題（.hero .subtitle）。
   需要兩個 class 才蓋得過 `.section h2`（0,1,1）的預設 28px/700。 */
.feature-section .feature-heading {
  font-size: 20px; font-weight: 500; color: var(--accent-deep); margin-bottom: 18px;
}
.feature-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
/* 圖片請依 1200×675（16:9）製作。卡片最寬 504px，1200px 在 2 倍螢幕上仍銳利。
   比例不符時會被裁切上下或左右，所以務必照規格出圖。
   flex:none — 卡片是 flex column，不鎖住的話高度會被圖片撐開、aspect-ratio 失效。 */
.feature-cover { flex: none; aspect-ratio: 16 / 9; background: var(--surface-muted); overflow: hidden; }
.feature-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.feature-body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.feature-body p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin-bottom: 18px; }
.feature-body .btn { margin-top: auto; }

/* Course cards */
/* 課程主圖資訊量大，間距比一般卡片再拉開，避免整頁看起來擁擠 */
.course-card + .course-card { margin-top: 40px; }
.course-card[id] { scroll-margin-top: 88px; }
.course-card:target {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}
.course-card {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0;
  overflow: hidden; align-items: stretch; padding: 0;
}
.course-card .cover { aspect-ratio: 16 / 9; width: 100%; height: 100%; min-height: 0; }
.course-card > div:not(.cover) { align-self: center; }
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card > div:not(.cover) { padding: 16px 26px; }
.course-card h3 { font-size: 20px; margin-bottom: 4px; }
.course-card .meta { margin-bottom: 8px; }
.course-card .badge { margin-bottom: 8px; }
.course-card p { font-size: 15px; line-height: 1.65; }
.course-card .btn { margin-top: 12px; padding: 8px 20px; font-size: 15px; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 500;
  background: var(--surface-strong); color: var(--accent-deep);
  border-radius: 999px; padding: 3px 12px; margin-bottom: 10px;
}
.course-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.course-card .meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 12px; }
.course-card p { color: var(--foreground); }
.course-card .btn { margin-top: 18px; }

/* Book cards */
.book-card { text-align: center; padding: 24px; }
.book-card .cover {
  height: 300px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; padding: 20px;
}
.book-card .cover img { max-height: 100%; width: auto; }
.book-card h3 { font-size: 19px; font-weight: 700; }
/* 書籍簡介：多行文字靠左比置中好讀，但用 max-width 收窄維持卡片的置中節奏 */
.book-card .book-desc {
  color: var(--foreground); font-size: 14.5px; line-height: 1.7;
  text-align: left; max-width: 34em; margin: 10px auto 14px;
}
.book-card .meta { color: var(--ink-soft); font-size: 14px; margin: 4px 0 14px; }

/* Lists on about page */
.info-list { list-style: none; display: grid; gap: 8px; }
.info-list li { padding-left: 22px; position: relative; text-wrap: pretty; }
.info-list li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 16px; font-size: 14.5px;
}
.chip-list li a { color: var(--accent-deep); }
.two-col { columns: 2; column-gap: 40px; }
.two-col li { break-inside: avoid; }

/* Media interview grid */
.media-grid .two-col { columns: 1; }

/* Download cards */
.dl-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 22px 28px;
}
.dl-card .dl-thumb {
  width: 150px; flex: none;
  background: var(--surface-muted); border-radius: 14px; padding: 12px;
}

/* 免費資源的說明段落 */
.free-intro { max-width: 100%; margin-bottom: 12px; }
.free-intro:last-of-type { margin-bottom: 0; }

/* 主打資源卡：左側一張大書封，右側多個選項 */
.feat-card {
  display: flex; align-items: stretch; gap: 34px;
  padding: 30px 34px; margin-top: 24px;
}
.feat-cover {
  flex: none; width: 210px; display: flex; align-items: center; justify-content: center;
}
.feat-cover img { width: 100%; }
.feat-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.feat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px;
}
.feat-row h3 { font-size: 17px; font-weight: 700; }
.feat-row .dl-info p { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.feat-row .btn { white-space: nowrap; }
@media (max-width: 860px) {
  .feat-card { flex-direction: column; gap: 22px; padding: 22px; }
  .feat-cover { width: 100%; max-width: 240px; margin: 0 auto; }
  .feat-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
.dl-card .dl-info { flex: 1; }
.dl-card .dl-info h3 { font-size: 17px; font-weight: 700; }
.dl-card .dl-info p { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.dl-card .btn { white-space: nowrap; }

/* Video list
   50＋ 部影片比較像索引而非逐則介紹，所以不套白卡片外框：
   縮圖本身即是卡片，標題與日期放在下方（同 YouTube／Vimeo 的列表慣例）。 */
.video-card { padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
.video-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.5; margin-top: 10px; }
.video-card .meta { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
/* 縮圖是節目方的素材，風格不一且多半很搶眼。整頁並排會很吵，
   所以壓成近黑白、降對比並提亮，讓 50＋ 張縮圖成為安靜的網格。
   滑過時「不」恢復原色——那會讓吵雜的縮圖又有機會喊出來——只提亮一點。 */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: var(--surface-strong);
  border: 1px solid var(--border);
}
.video-embed a.thumb { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed img {
  filter: grayscale(0.82) contrast(0.62) brightness(1.3);
  transition: filter .25s ease;
}
.video-embed:hover img, .video-embed:focus-within img {
  filter: grayscale(0.62) contrast(0.76) brightness(1.3);
}
/* 從 /video/<slug> 舊網址導進來時，標示出目標那一則 */
.video-card { position: relative; }
.video-card:target .video-embed { outline: 2px solid var(--accent-deep); outline-offset: 3px; filter: none; }
/* 每年第一張卡片內的隱形錨點；上移是為了讓捲動後不被固定頁首擋住 */
.yr-anchor { position: absolute; top: -100px; left: 0; width: 0; height: 0; }
.year-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.year-jump a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px;
}
.year-jump a:hover { background: var(--surface-strong); color: var(--accent-deep); text-decoration: none; }
/* 手機上 9 個年份會擠成三行、佔掉太多高度，改成單行橫向捲動 */
@media (max-width: 620px) {
  .year-jump { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .year-jump a { flex: none; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 30px; margin-top: 20px;
  color: var(--ink-soft); font-size: 14px;
}
.site-footer .container {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a { font-weight: 500; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 30px; }
  .hero-photo { max-width: 380px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .course-card { grid-template-columns: 1fr; }
  .course-card .cover { min-height: 0; max-height: 240px; }
  .two-col { columns: 1; }
  .site-header .container { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .site-nav { gap: 2px; }
  .site-nav a { font-size: 14px; padding: 5px 10px; }
  .dl-card { flex-direction: column; align-items: flex-start; }
}
