/*
 * 內容版型
 *
 * 與 header.css 搭配使用，變數與基本設定都在那一支。
 * 版面一律由 grid 與 flex 決定，欄數靠 auto-fit 自己收，
 * 字級用 clamp 跟著視窗縮放，所以不需要為個別寬度另外寫規則。
 */

main { display: block; }

section { padding: clamp(2.5rem, 1.6rem + 3.4vw, 5rem) 0; }
section + section { padding-top: 0; }

h2, h3 { letter-spacing: -.015em; }

.prose p {
  margin: 0 0 1.1rem;
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: var(--prose-max);
  text-align: var(--prose-align);
  /* 兩端對齊時字距容易拉出空洞，讓英文可以斷字補回來 */
  hyphens: var(--prose-hyphens);
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- 主視覺 ---------- */

.hero {
  padding: 0;
  background: var(--sand);
}
.hero-text {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2rem, 1.2rem + 3vw, 3.6rem) var(--gutter)
    clamp(1.6rem, 1rem + 2.4vw, 2.8rem);
  text-align: center;
}
.hero-text h2 {
  margin: 0 0 .9rem;
  font-size: clamp(1.6rem, 1rem + 2.5vw, 3rem);
  line-height: 1.14;
  font-weight: 700;
}
.hero-tagline {
  margin: 0 0 1.3rem;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: .01em;
  font-weight: 600;
  color: var(--ink);
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .92rem;
  color: var(--muted);
}
/* 項目之間用分隔線，換行時不會留下孤立的符號 */
.hero-points li { display: flex; align-items: center; gap: .9rem; }
.hero-points li::after {
  content: "";
  width: 1px; height: 1em;
  background: var(--sand-line);
}
.hero-points li:last-child::after { display: none; }

.hero-figure { margin: 0; }

/*
 * 三個裝置各一張時，<img> 外面多包一層 <picture>。
 * picture 預設是 inline，行框會在圖下面留一條空隙 ——
 * 滿版橫帶上那條空隙會露出底色，看起來像對不齊。
 */
.hero-figure picture { display: block; }
.hero-figure img {
  display: block;
  width: 100%;
  height: clamp(14rem, 8rem + 26vw, 34rem);
  object-fit: cover;
}

/*
 * 原始解析度不足的照片：不拉成滿版，收在版面內置中顯示，
 * 最寬只到 44rem，放大倍率有限才不會糊掉
 */
.hero-figure.inset {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(1.5rem, 1.1rem + 1.6vw, 2.6rem);
}
.hero-figure.inset img {
  width: auto;
  max-width: min(100%, 44rem);
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(28, 19, 18, .12);
}
/* 已經換成高解析的照片，放寬上限才不會小小一張擺在版面中間 */
.hero-figure.inset.wide img { max-width: min(100%, 62rem); }

/*
 * 設計稿用這一級：寬度跟著版面走，和下面的內容切齊。
 *
 * 設計稿不能裁 —— 上面的年份、活動日期、單位 logo 裁掉就沒了，
 * 而且沒有任何一個對齊位置能同時保住它們。所以整張顯示。
 *
 * 不用 wide 那一級（62rem）的原因：那比內容還窄，
 * 主視覺排起來會比它下面的統計卡片縮了一圈，看起來像沒做完。
 */
.hero-figure.inset.page img { max-width: min(100%, var(--wrap)); }

/* ---------- 課程清單 ---------- */

.courses-intro { text-align: center; }
.courses-intro .kicker {
  margin: 0 0 1.6rem;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
}

.courselist {
  display: grid;
  gap: .7rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 54rem;
}
.courselist li {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem 1.1rem;
  align-items: baseline;
  padding: .9rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  text-align: left;
}
.courselist b {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
/* 窄螢幕改成上下兩行，課程名稱才有完整寬度 */
@media (max-width: 480px) {
  .courselist li { grid-template-columns: 1fr; }
}

/* ---------- 重點數字 ---------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .7rem 1rem;
  margin: 2rem 0 1.2rem;
  padding: 0;
  list-style: none;
}
.facts .facts-label {
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.75rem);
  font-weight: 700;
  color: var(--gold-text);
}
.facts li.tag {
  padding: .55rem 1.3rem;
  background: var(--tag-bg);
  color: var(--tag-fg);
  border-radius: 2rem;
  font-weight: 600;
  font-size: clamp(.95rem, .92rem + .2vw, 1.05rem);
}

/* 原站的寫法：線條圖示擺左邊，右邊兩行字 */
.iconfacts { gap: 1.4rem clamp(2rem, 1rem + 4vw, 4.5rem); }
.facts li.fact {
  display: flex;
  align-items: center;
  gap: clamp(.7rem, .5rem + .8vw, 1.1rem);
  text-align: left;
}
.facts .fact img {
  flex: none;
  width: clamp(2.6rem, 2rem + 1.6vw, 3.6rem);
  height: auto;
}
.facts .fact-text { display: grid; gap: .1rem; }
.facts .fact-text b {
  font-size: clamp(1.05rem, .98rem + .5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
}
.facts .fact-text span {
  font-size: clamp(.9rem, .87rem + .2vw, 1rem);
  line-height: 1.3;
  color: var(--muted);
}

.facts-note {
  margin: 0;
  text-align: center;
  font-size: clamp(1.02rem, .96rem + .4vw, 1.3rem);
  color: var(--ink-soft);
}

/* ---------- 區段標題（左右各一條線） ---------- */

.band-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1rem, .5rem + 2vw, 2.5rem);
  margin: 0 0 clamp(1.4rem, 1rem + 1.4vw, 2.4rem);
}
.band-title::before,
.band-title::after {
  content: "";
  height: 1px;
  background: var(--sand-line);
}
.band-title h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.35rem, 1.05rem + 1.3vw, 2.1rem);
  line-height: 1.2;
  font-weight: 700;
}
/* 窄螢幕留一條線在下面就好，兩側的線會把標題擠成一欄字 */
@media (max-width: 640px) {
  .band-title {
    grid-template-columns: 1fr;
    gap: .8rem;
  }
  .band-title::before { display: none; }
}

/* ---------- 圖卡 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: clamp(1rem, .7rem + 1.2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}
.card img {
  display: block;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  object-fit: cover;
}
.card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .85rem 1.1rem;
  background: var(--cap-bg);
  color: #fff;
  font-size: clamp(1rem, .95rem + .3vw, 1.2rem);
  font-weight: 700;
}
.cardtext {
  margin: .9rem 0 0;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---------- 左文右圖 ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: clamp(1.4rem, .8rem + 2.4vw, 3rem);
  align-items: center;
}
.split h2 {
  margin: 0 0 .7rem;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
  line-height: 1.16;
  font-weight: 700;
}
.split .sub {
  margin: 0;
  font-size: clamp(1rem, .95rem + .4vw, 1.2rem);
  font-style: italic;
  color: var(--muted);
}
.split figure { margin: 0; }
.split img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ---------- 主題段落 ---------- */

.topic h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  /* 原站有些年度的段落標題是置中的，用變數各年度自己決定 */
  text-align: var(--topic-align);
}
.topic .sub {
  margin: 0 0 1.2rem;
  font-size: clamp(1rem, .96rem + .3vw, 1.12rem);
  font-weight: 700;
  color: var(--gold-text);
  text-align: var(--topic-align);
}
.topic .prose { margin-bottom: 1.6rem; }
.topic .prose:last-child { margin-bottom: 0; }

/* ---------- 圖片列 ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(.9rem, .7rem + .9vw, 1.5rem);
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}
.gallery:last-child { margin-bottom: 0; }
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}
/* 圖卡、表格這類不能裁切的圖，照原比例顯示 */
.gallery.natural img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

/* 簡報頁要看得清楚，格子開大一點 */
/* 單獨一張的資訊圖不必撐滿整個版面，置中限寬比較好讀 */
.gallery.natural:not(.slides) li:only-child {
  max-width: 48rem;
  margin-inline: auto;
}

.gallery.slides {
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
}
.gallery.slides img { border: 1px solid var(--line); }

/*
 * 一列幾張的切換
 *
 * 預設兩張一列，按鈕可以換成一張一列把投影片看大。
 * 窄螢幕本來就只排得下一張，按鈕收起來免得多此一舉。
 * 按鈕要有 JS 才有作用，所以只有 html.js 時才顯示。
 */
.gallery.slides[data-cols="1"] { grid-template-columns: 1fr; }

.galleryhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem 1.2rem;
  margin: 0 0 .5rem;
}
.galleryhead h2 { margin: 0; }
.colswitch { display: none; gap: .4rem; }
.js .colswitch { display: flex; }
.colswitch button {
  padding: .4rem .9rem;
  font: 600 .85rem/1.4 var(--font);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.colswitch button:hover { background: var(--sand); }
.colswitch button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--primary);
  border-color: var(--primary);
}
@media (max-width: 640px) {
  .js .colswitch { display: none; }
}

/* 點得開的圖，滑過去與鍵盤聚焦時給回饋 */
.gallery a {
  display: block;
  position: relative;
  border-radius: var(--radius);
}
.gallery a img { transition: opacity .15s ease; }
.gallery a:hover img,
.gallery a:focus-visible img { opacity: .85; }
/* 放大鏡提示，純裝飾 */
.gallery a::after {
  content: "";
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(28, 19, 18, .72)
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16 16l5 5M11 8v6M8 11h6'/%3E%3C/svg%3E")
    center / 1.1rem no-repeat;
  opacity: 0;
  transition: opacity .15s ease;
}
/*
 * 觸控螢幕沒有滑過這個動作，提示永遠不會出現，
 * 手機上的圖又小到看不清字，更需要知道點得開，所以直接顯示。
 */
@media (hover: none) {
  .gallery a::after {
    opacity: .9;
    width: 1.6rem;
    height: 1.6rem;
    right: .4rem;
    bottom: .4rem;
    background-size: .95rem;
  }
}
.gallery a:hover::after,
.gallery a:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .gallery a img, .gallery a::after { transition: none; }
}

/* ---------- 放大檢視 ---------- */

.lightbox {
  width: min(96vw, 76rem);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 14, 13, .82); }

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .9rem;
  background: var(--sand);
  border-bottom: 1px solid var(--sand-line);
}
.lb-count {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold-text);
  font-variant-numeric: tabular-nums;
}
.lightbox button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  font: 600 .92rem/1.4 var(--font);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.lightbox button:hover { background: var(--sand); border-color: var(--sand-line); }
.lightbox button[disabled] { opacity: .45; cursor: default; }

.lb-figure {
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: var(--paper);
}
.lb-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lb-figure figcaption {
  margin-top: .8rem;
  font-size: .93rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.lb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem .9rem 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .lightbox { width: 96vw; }
  .lb-figure { padding: .7rem; }
  .lb-figure img { max-height: 56vh; }
  .lightbox button { padding: .55rem .8rem; font-size: .88rem; }
}
.gallery figcaption {
  margin-top: .45rem;
  font-size: .88rem;
  color: var(--muted);
}

/* 整列一張的寬圖，例如排名表，照原比例顯示不裁切 */
.wideimage { margin: 0 0 1.6rem; }
.wideimage:last-child { margin-bottom: 0; }
.wideimage img {
  display: block;
  width: 100%;
  max-width: 54rem;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* ---------- 課程卡 ---------- */

.coursecard {
  margin: 0 0 clamp(2rem, 1.4rem + 2vw, 3.5rem);
  padding: 0 0 clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.coursecard:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.coursecard h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2.05rem);
  line-height: 1.2;
  font-weight: 700;
}
.coursecard .schedule { margin: 0 0 1.2rem; }
.coursecard .schedule img {
  display: block;
  margin-inline: auto;
  width: 100%;
  max-width: var(--schedule-max);
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.btn {
  display: inline-block;
  padding: .7rem 1.5rem;
  /* 預設跟著年度主色，年度另外寫 --btn-bg 才改掉。
     備用值寫在這裡而不是 :root，不然 var() 會在 :root 就定死 */
  background: var(--btn-bg, var(--primary));
  color: var(--btn-text);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius);
}
.btn:hover { background: var(--btn-bg-hover, var(--primary-soft)); }

/* ---------- 報名入口那張表 ---------- */

.ctableband { padding: clamp(2rem, 1.6rem + 1.8vw, 3.2rem) 0; }
.ctable-lede,
.ctable-note {
  max-width: 54rem;
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
  line-height: 1.8;
}
.ctable-note { margin: 1.2rem 0 0; }
.ctable {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
}
.ctable th,
.ctable td {
  padding: .9rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--sand-line);
}
.ctable thead th {
  padding-top: 0;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ctable tbody th { width: 30%; }
.ctable tbody th b,
.ctable tbody th span {
  display: block;
}
.ctable tbody th b { font-size: .86rem; color: var(--gold-text); }
.ctable tbody th span { font-weight: 400; color: var(--ink); }
.ctable td { color: var(--ink-soft); }
.ctable tbody tr:last-child th,
.ctable tbody tr:last-child td { border-bottom: 0; }

/*
 * 窄螢幕堆成一欄。
 *
 * 六欄在手機上一定擠成一團，所以整列改成卡片，每一格自己印出欄位名稱
 * （data-l）—— 欄位標題在 thead 裡，堆疊之後離得太遠，讀不出對應關係。
 * thead 用 .vh 的做法藏起來而不是 display:none，螢幕閱讀器仍然讀得到表頭。
 */
@media (max-width: 760px) {
  .ctable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .ctable,
  .ctable tbody,
  .ctable tr,
  .ctable th,
  .ctable td { display: block; width: auto; }
  .ctable tr {
    padding: 1rem 0;
    border-bottom: 1px solid var(--sand-line);
  }
  .ctable tr:last-child { border-bottom: 0; }
  .ctable th,
  .ctable td {
    padding: .2rem 0;
    border-bottom: 0;
  }
  /* 桌機版的 width:30% 比上面那條 width:auto 更明確，不蓋掉的話課名會擠成一直條 */
  .ctable tbody th {
    width: auto;
    margin-bottom: .5rem;
  }
  .ctable td::before {
    content: attr(data-l) ' ';
    display: inline-block;
    min-width: 6.5rem;
    font-weight: 700;
    color: var(--ink);
  }
}

/*
 * 只給訪客（或只給會員）看的東西，由 navstate 問完 /account/state 後切換。
 *
 * 一定要寫出來：`hidden` 屬性的 display:none 來自瀏覽器預設樣式表，
 * 而 .btn 的 display:inline-block 是作者樣式，優先序比它高 ——
 * 不寫的話設了 hidden 的按鈕照樣看得見。
 */
[data-auth][hidden] { display: none !important; }

/* ---------- 講師 ---------- */

.faculty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--faculty-col), 100%), 1fr));
  gap: clamp(1.2rem, .9rem + 1.4vw, 2.2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
/*
 * stack：一位老師一列。
 * 多位老師並排時每人只分到半欄，照片縮到很小、經歷擠成一長條。
 * 客戶（第 4 則註解）要的是「師資圖片在左、相關經歷在右」，
 * 那需要整列的寬度，所以 Course C 這種多位老師的頁面改成一位一列。
 */
.faculty.stack { grid-template-columns: 1fr; }
.faculty.stack > .person {
  grid-template-columns: var(--person-photo-solo) 1fr;
  gap: clamp(1.2rem, .8rem + 1.6vw, 2.2rem);
}

.person {
  display: grid;
  grid-template-columns: var(--person-photo) 1fr;
  gap: 1.1rem;
  align-items: start;
}
/* 整頁只有一位講師時，照片放大到原站那個份量 */
.faculty > .person:only-child {
  grid-template-columns: var(--person-photo-solo) 1fr;
  gap: clamp(1.2rem, .8rem + 1.6vw, 2.2rem);
}
.person img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--sand);
}
.person h3 {
  margin: 0 0 .4rem;
  font-size: var(--person-name);
  line-height: 1.35;
  font-weight: 700;
}
.person dl {
  margin: 0;
  font-size: var(--person-text);
  line-height: 1.6;
  color: var(--ink-soft);
}
.person dt {
  font-weight: 700;
  color: var(--gold-text);
  font-size: var(--person-label);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: .5rem;
}
.person dd { margin: 0; }

/*
 * 講師自己的課名與課程介紹（選填）。
 * 跟上面的經歷清單用一條細線分開 —— 不分開的話，
 * 課程介紹會被當成 Area 那一欄的續行讀下去。
 */
.person-course {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.person-course h4 {
  margin: 0 0 .35rem;
  font-size: var(--person-text);
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}
.person-course p {
  margin: 0 0 .5rem;
  font-size: var(--person-text);
  line-height: 1.7;
  color: var(--ink-soft);
}
.person-course p:last-child { margin-bottom: 0; }

/* 窄螢幕照片擺上方，文字才有完整寬度 */
@media (max-width: 420px) {
  /* 單人那條規則的指定度比較高，這裡要一起寫上才蓋得過去 */
  .person,
  .faculty > .person:only-child { grid-template-columns: 1fr; }
  .person img { max-width: 10rem; }
}

/* ---------- 課程說明 ---------- */

.detail {
  margin: 0 0 clamp(1.4rem, 1.1rem + 1.2vw, 2.2rem);
  padding: clamp(1.1rem, .9rem + .8vw, 1.7rem) clamp(1.1rem, .9rem + 1vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.detail:last-child { margin-bottom: 0; }
.detail h3 {
  margin: 0 0 .8rem;
  font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem);
  font-weight: 700;
  color: var(--gold-text);
}
.detail .prose p { max-width: none; }
.detail-list {
  margin: 0;
  padding-left: 1.4rem;
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
  line-height: 1.8;
  color: var(--ink-soft);
}
.detail-list li { margin-bottom: .45rem; }
.detail-list li:last-child { margin-bottom: 0; }
.detail .prose + .detail-list { margin-top: 1rem; }

/*
 * 2027 的內文：撐滿版面寬度，兩端對齊。
 *
 * 預設是 62rem 收窄、靠左 —— 首頁那兩段排出來只有 992px，
 * 上面的統計卡片是 1168px，右邊短一截，看起來像沒對齊。
 * 2023、2025、2026 原站都是兩端對齊，2027 跟著走。
 *
 * hyphens 一起開：兩端對齊沒有斷字的話，英文長字會把字距撐出白洞。
 */
[data-year="2027"] {
  --prose-max: none;
  --prose-align: justify;
  --prose-hyphens: auto;
}

/*
 * 主視覺和數據帶之間的距離。
 *
 * section + section 把下一段的上邊距歸零，而主視覺和數據帶的底色
 * 都是 --sand，中間只剩圖片自己的 2.6rem，兩塊看起來黏成一片。
 * 補回一般段落之間的距離。
 */
[data-year="2027"] .hero + .statband {
  padding-top: clamp(1.5rem, 1rem + 1.6vw, 2.6rem);
}

/*
 * 2027 起的課程說明：左邊一欄小標、右邊內容，不再用卡片加左側色條。
 *
 * 只掛在 2027 —— 2022–2026 的頁面是當年確認過的樣子，
 * 共用樣式改下去會連歷年一起變。
 */
[data-year="2027"] .detail {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: 0 clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
  margin: 0 0 clamp(1.7rem, 1.4rem + 1.2vw, 2.6rem);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
[data-year="2027"] .detail h3 {
  margin: .15rem 0 0;
  font-size: clamp(.82rem, .79rem + .12vw, .92rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  [data-year="2027"] .detail {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
}

/* 課程基本資料：後台填了哪幾欄就列哪幾欄 */
.detail-rows { margin: 0; }
.detail-rows > div {
  display: grid;
  /* 固定寬度而不是 max-content —— 每一列各自是一個 grid，
     用 max-content 的話每列的值會停在不同的位置 */
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: .2rem 1.4rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--sand-line);
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
  line-height: 1.75;
}
.detail-rows > div:first-child { padding-top: 0; }
.detail-rows > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.detail-rows dt {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}
.detail-rows dd {
  margin: 0;
  color: var(--ink-soft);
}
@media (max-width: 480px) {
  .detail-rows > div { grid-template-columns: 1fr; }
}
.detail .prose + .detail-rows,
.detail-rows + .detail-list { margin-top: 1rem; }

/* ---------- 說明圖 ---------- */

.figures { margin: 1.8rem 0 0; }
.figures figure { margin: 0 0 1.4rem; }
.figures figure:last-child { margin-bottom: 0; }
.figures img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.figures figcaption {
  margin-top: .5rem;
  font-size: .88rem;
  color: var(--muted);
}

/* ---------- 講座 ---------- */

.session {
  margin: 0 0 clamp(1.6rem, 1.2rem + 1.6vw, 2.8rem);
  padding: 0 0 clamp(1.6rem, 1.2rem + 1.6vw, 2.8rem);
  border-bottom: 1px solid var(--line);
}
.session:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.session > h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
}
/* 講師在左、說明在右；窄螢幕自動疊成上下 */
.session-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: clamp(1.2rem, .9rem + 1.4vw, 2.4rem);
  align-items: start;
}
.session-desc h3 {
  margin: 0 0 .5rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.session-desc + .session-desc { margin-top: 1.4rem; }
.session-desc p {
  margin: 0 0 .8rem;
  font-size: clamp(.97rem, .94rem + .15vw, 1.04rem);
  line-height: 1.8;
  color: var(--ink-soft);
}
.session-desc p:last-child { margin-bottom: 0; }
.session-desc ol {
  margin: .6rem 0 0;
  padding-left: 1.3rem;
  font-size: .97rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---------- 特色 ---------- */

.feature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: clamp(1.2rem, .9rem + 1.6vw, 2.6rem);
  /* 圖的上緣與標題切齊，不要讓文字被垂直置中浮在中間 */
  align-items: start;
  margin: 0 0 clamp(2rem, 1.5rem + 2vw, 3.4rem);
  padding: 0 0 clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.feature:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
/* 偶數項圖文對調，視覺上有節奏；窄螢幕一律文字在上 */
@media (min-width: 821px) {
  .feature.flip > :first-child { order: 2; }
}
/*
 * 直放的平板寬度勉強排得下兩欄，但文字欄只剩三百出頭，
 * 一行放不到十個字。圖文對調也是從 821 才開始，
 * 這裡一併讓它在同一個斷點以下改成上下排
 */
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
}
.feature h2 {
  margin: 0 0 .8rem;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.8rem);
  line-height: 1.25;
  font-weight: 700;
}
.feature p {
  margin: 0;
  font-size: clamp(.97rem, .94rem + .15vw, 1.04rem);
  line-height: 1.85;
  color: var(--ink-soft);
}
.feature.solo { grid-template-columns: 1fr; }
/*
 * 配圖比旁邊的文字矮的時候，圖下面會空一大塊。
 * 寫 fill 就讓圖長到整欄的高度，兩欄收在同一條線上
 */
.feature.fillpic { align-items: stretch; }
.feature.fillpic .featurepics,
.feature.fillpic .featurepics figure { height: 100%; }
.feature.fillpic .featurepics img { height: 100%; object-fit: cover; }
.featurepics { display: grid; gap: 1rem; }

/* ---------- 照片輪播 ---------- */

.carousel { display: grid; gap: .75rem; }
/*
 * 本體就是一條橫向捲動的清單，捲到哪張就停在哪張。
 * 沒有腳本時照樣滑得動，所以左右鈕等腳本跑起來才出現
 */
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  border-radius: var(--radius);
}
.carousel-track > li { scroll-snap-align: start; }
.carousel-track:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
/* 三張照片原始比例不一，裁成同一個比例切換時畫面才不會上下跳 */
.carousel-track img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}
.carousel-controls { display: none; }
.js .carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.carousel-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--sand-line);
  border-radius: 50%;
  background: var(--sand);
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.carousel-controls button:hover { background: var(--primary); color: var(--btn-text); }
.carousel-controls button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.carousel-count {
  margin: 0;
  min-width: 3.5rem;
  text-align: center;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
}
.feature figure { margin: 0; }
.feature img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* 合作單位標誌，等高置中並排 */
.logorow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 1rem + 1.4vw, 2.6rem);
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.logorow img {
  display: block;
  width: auto;
  height: auto;
  max-width: 9.5rem;
  max-height: 3.4rem;
  object-fit: contain;
}

/* ---------- 回饋 ---------- */

.rating {
  margin: 0 0 clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  padding: clamp(1.1rem, .9rem + .9vw, 1.7rem);
  background: var(--sand);
  border-radius: var(--radius);
  text-align: center;
}
.rating .score {
  display: block;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
}
.rating .stars { color: var(--stars); letter-spacing: .1em; }
.rating p { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }

.quotegroups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(1.1rem, .9rem + 1.2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.quotegroup h3 {
  margin: 0 0 .8rem;
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  font-weight: 700;
  color: var(--gold-text);
}
.quotegroup .quotes { display: grid; }
.quotegroup blockquote {
  margin: 0 0 1rem;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--sand-line);
}
.quotegroup blockquote:last-child { margin-bottom: 0; }

/*
 * 分組橫列：一組佔滿一列，組內的心得改成並排。
 * 附人像的心得照原站的做法，姓名壓在照片下緣那條色帶上。
 *
 * 選擇器從 .quotegroups.rows 改成 .feedbackband.lay-rows .quotegroups：
 * 這一種本來是版型函式自己判斷 s.layout 再加一個 class，
 * 和其他十幾種「後台選什麼、最外層就掛 lay-<值>」的做法不一樣。
 * 不一樣的後果是後台那張卡的自動檢查（AdminLayoutTest）找不到它的規則，
 * 而且日後想改成逐區塊設定時這一種又要另外處理。
 */
.feedbackband.lay-rows .quotegroups { grid-template-columns: 1fr; }
.feedbackband.lay-rows .quotes {
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: clamp(1.1rem, .9rem + 1.2vw, 2rem);
  align-items: start;
}
.feedbackband.lay-rows blockquote { margin-bottom: 0; }

.quotegroup blockquote.withphoto { padding: 0; border-left: 0; }
.quotegroup blockquote.withphoto figure {
  position: relative;
  margin: 0 0 .9rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}
/* 兩張照片原始比例不同，裁成正方形姓名那條色帶才會齊平；
   人物多半在畫面偏上，裁切基準往上挪一點 */
.quotegroup blockquote.withphoto img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: 50% 32%;
}
.quotegroup blockquote.withphoto figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .7rem 1rem;
  background: var(--cap-bg);
}
.quotegroup blockquote.withphoto cite {
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  font-weight: 700;
  font-style: normal;
  color: #fff;
}
.quotegroup p {
  margin: 0 0 .35rem;
  font-size: .97rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.quotegroup cite {
  font-size: .9rem;
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
}

/*
 * 署名後面的就讀學校。
 *
 * 比姓名輕一階：這一行要讀成「某某人，某某大學」，
 * 兩段一樣重的話會看成兩筆並列的資訊。
 *
 * 分隔的逗號用 ::before 產生，不寫在標記裡 ——
 * 沒有學校的那幾筆就不會留下一個孤零零的逗號。
 */
.quotegroup cite .at {
  font-weight: 400;
  color: var(--ink-faint, var(--muted));
}
.quotegroup cite .at::before { content: ", "; }

.valued {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: clamp(1rem, .8rem + 1vw, 1.7rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.valued > li {
  padding: clamp(1rem, .85rem + .7vw, 1.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}
.valued h3 {
  margin: 0 0 .6rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.valued ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- 問答 ---------- */

/*
 * 分類是 h2、問題是可點開的 details。
 * 收起來時整頁就是一份問題目錄，一眼看得出有幾個分類、每類幾題。
 */

.faqgroup { margin: 0 0 clamp(1.8rem, 1.4rem + 1.4vw, 2.8rem); }
.faqgroup:last-child { margin-bottom: 0; }
.faqgroup > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .8rem;
  margin: 0 0 1.1rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--sand-line);
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 700;
}
.faqcount {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.faqlist { margin: 0; padding: 0; list-style: none; }
.faqlist > li + li { margin-top: .6rem; }

.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq[open] { border-color: var(--sand-line); }

/* 整列都是點擊區，高度保證 44px 以上 */
.faq > summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 2.75rem;
  padding: clamp(.75rem, .65rem + .4vw, 1.05rem) clamp(1rem, .85rem + .7vw, 1.5rem);
  cursor: pointer;
  list-style: none;                 /* 拿掉瀏覽器預設的小三角 */
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::marker { content: ""; }
.faq > summary:hover { background: var(--sand); }
.faq > summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}
.faq > summary h3 {
  margin: 0;
  flex: 1 1 auto;
  font-size: clamp(1rem, .96rem + .3vw, 1.12rem);
  line-height: 1.45;
  font-weight: 700;
}

/* ＋／− 標記：用兩條線畫，展開時橫線轉成只剩一條 */
.faqmark {
  position: relative;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--sand-line);
  border-radius: 50%;
  background: var(--sand);
}
.faqmark::before,
.faqmark::after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  width: .7rem;
  height: 2px;
  margin: -1px 0 0 -.35rem;
  background: var(--primary);
}
.faqmark::after { transform: rotate(90deg); }
.faq[open] .faqmark::after { transform: rotate(0deg); }
.faq[open] .faqmark { background: var(--primary); border-color: var(--primary); }
.faq[open] .faqmark::before,
.faq[open] .faqmark::after { background: #fff; }

.faqbody {
  padding: 0 clamp(1rem, .85rem + .7vw, 1.5rem)
    clamp(.9rem, .8rem + .5vw, 1.3rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(.8rem, .7rem + .4vw, 1.1rem);
}
.faqbody p {
  margin: 0 0 .7rem;
  font-size: .97rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.faqbody p:last-child { margin-bottom: 0; }
.faqtags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  margin: .6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .92rem;
}
.faqtags li {
  padding: .25rem .7rem;
  background: var(--sand);
  border-radius: 2rem;
  color: var(--ink-soft);
}

/* 動畫只給不介意動態效果的人；列印時全部展開 */
@media (prefers-reduced-motion: no-preference) {
  .faqmark::after { transition: transform .18s ease; }
}
@media print {
  .faqbody { display: block !important; }
  .faqmark { display: none; }
}

/* ---------- 梯次方案 ---------- */

.plan {
  margin: 0 0 clamp(1.2rem, 1rem + 1vw, 2rem);
  padding: clamp(1.1rem, .9rem + .9vw, 1.8rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plan:last-child { margin-bottom: 0; }
.plan > h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem);
  line-height: 1.25;
  font-weight: 700;
}
.plan .courselist { max-width: none; }
.plan-note {
  margin: .9rem 0 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--muted);
}
.plan-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 2.2rem;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.plan-facts > div { display: flex; gap: .5rem; align-items: baseline; }
.plan-facts dt {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.plan-facts dd { margin: 0; font-size: .97rem; color: var(--ink-soft); }

/*
 * 梯次總表的深色版
 *
 * 2024 原站把兩個梯次做成一張深灰底的表格圖，兩列標題各一個顏色。
 * 這裡用同一組結構換底色重畫，字還是真文字，窄螢幕照樣會收。
 * 深灰底上只有純白字過得了 7:1，所以卡片裡一律白字，靠粗細與間距分層。
 */
.plan-teal,
.plan-rose {
  padding: 0;
  overflow: hidden;
  background: var(--slate);
  border-color: var(--slate-line);
  color: #fff;
}
.plan-teal > h2,
.plan-rose > h2 {
  margin: 0;
  padding: .65rem 1.2rem;
  text-align: center;
  font-size: clamp(1.05rem, .95rem + .55vw, 1.35rem);
}
.plan-teal > h2 { background: var(--plan-teal); color: #1C1312; }
.plan-rose > h2 { background: var(--plan-rose); color: #fff; }
/* 標題列要滿寬，所以內距改掛在其餘區塊上 */
.plan-teal > :not(h2),
.plan-rose > :not(h2) {
  margin-left: clamp(1.1rem, .9rem + .9vw, 1.8rem);
  margin-right: clamp(1.1rem, .9rem + .9vw, 1.8rem);
}
.plan-teal > .courselist,
.plan-rose > .courselist {
  margin-top: clamp(1rem, .85rem + .7vw, 1.5rem);
}
.plan-teal > .plan-facts,
.plan-rose > .plan-facts {
  margin-bottom: clamp(1rem, .85rem + .7vw, 1.5rem);
}
.plan-teal .courselist li,
.plan-rose .courselist li {
  background: transparent;
  border-color: var(--slate-line);
  color: #fff;
}
.plan-teal .courselist b,
.plan-rose .courselist b { color: #fff; }
.plan-teal .plan-note,
.plan-rose .plan-note { color: #fff; }
.plan-teal .plan-facts,
.plan-rose .plan-facts { border-top-color: var(--slate-line); }
.plan-teal .plan-facts dt,
.plan-rose .plan-facts dt,
.plan-teal .plan-facts dd,
.plan-rose .plan-facts dd { color: #fff; }

/* ---------- 頁首橫幅 ---------- */

/*
 * 原站每頁上方都有一條科技感底圖。底圖疊一層暗色，
 * 白字在整張圖上都還有 10:1 以上，不必挑位置擺字。
 */
.banner {
  padding: clamp(2.6rem, 1.6rem + 3.6vw, 5rem) 0;
  background-color: #2B2B2B;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
}
.banner-chip {
  background-image: linear-gradient(rgba(24, 24, 24, .62), rgba(24, 24, 24, .62)),
    url(2024-banner-chip.jpg);
}
.banner-ai {
  background-image: linear-gradient(rgba(24, 24, 24, .62), rgba(24, 24, 24, .62)),
    url(2024-banner-ai.jpg);
}
.banner h2 {
  margin: 0;
  font-size: clamp(1.45rem, 1.1rem + 1.7vw, 2.4rem);
  line-height: 1.2;
  font-weight: 700;
}
.banner-tagline {
  margin: .8rem 0 0;
  font-size: clamp(1.15rem, 1rem + .9vw, 1.7rem);
  line-height: 1.35;
  font-weight: 600;
  color: var(--banner-key);
}
.banner h2 + .banner-tagline { margin-top: .6rem; }
.banner-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .9rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .92rem;
}
.banner-points li { position: relative; padding-right: .9rem; }
.banner-points li::after {
  content: "";
  position: absolute;
  right: 0;
  top: .25em;
  bottom: .25em;
  width: 1px;
  background: rgba(255, 255, 255, .45);
}
.banner-points li:last-child { padding-right: 0; }
.banner-points li:last-child::after { display: none; }

/* ---------- 每日行程 ---------- */

.schedule-note {
  margin: 0 0 1.4rem;
  font-size: .95rem;
  color: var(--muted);
}
.schedule {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: day;
}
.schedule > li {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: .4rem 1.4rem;
  padding: clamp(.9rem, .8rem + .5vw, 1.3rem) clamp(1rem, .85rem + .7vw, 1.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.schedule h3 {
  margin: 0;
  font-size: clamp(.98rem, .95rem + .25vw, 1.08rem);
  font-weight: 700;
  color: var(--primary);
}
.schedule > li > ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .97rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.schedule > li > ul li { margin-bottom: .25rem; }
.schedule > li > ul li:last-child { margin-bottom: 0; }
/* 窄螢幕改成日期在上、行程在下 */
@media (max-width: 560px) {
  .schedule > li { grid-template-columns: 1fr; }
}

/* ---------- 重點數字 ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(1rem, .8rem + 1vw, 1.8rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stats > li {
  padding: clamp(1.1rem, .9rem + .8vw, 1.7rem);
  background: var(--sand);
  border-radius: var(--radius);
  text-align: center;
}
.stats .num {
  display: block;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--primary);
}
.stats .label {
  display: block;
  margin-top: .5rem;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- 影片 ---------- */

/*
 * 一欄一支。
 *
 * 原本是 auto-fit minmax(20rem) —— 影片一多就自己變成兩欄、三欄。
 * 後台的版面卡把「單支大圖」標成預設，於是只要某一年放了兩支影片，
 * 卡片上寫著「目前使用：單支大圖」、畫面卻是並排：
 * 預設必須就是「沒有設定過時的樣子」，否則那張卡從第一天就在說謊。
 *
 * 要並排是明確選的（.videoband.lay-pair），不是因為影片變多而自己發生。
 */
.videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.1rem, .9rem + 1.2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.videos h3 {
  margin: 0 0 .7rem;
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  font-weight: 700;
}
.videos video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius);
}

/* ---------- 連結列 ---------- */

.linklist {
  display: grid;
  gap: .5rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 34rem;
}
.linklist a {
  display: block;
  padding: .75rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.linklist a:hover { background: var(--sand); }

/* ---------- 歷年相簿 ---------- */

/*
 * 相簿封面列。每張卡是一個連結，整張卡都可以點 ——
 * 只讓文字可點的話，滑鼠使用者會一直點到圖片沒反應。
 */
.albumgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: clamp(.9rem, .6rem + 1vw, 1.5rem);
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.albumcard {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.albumcard img {
  display: block;
  width: 100%;
  /*
   * height: auto 不能省。
   * <img> 上的 width／height 屬性是留著預防版面跳動的，但 height 屬性
   * 等同於設了 height:267px，而 aspect-ratio 只有在某一邊是 auto 時才生效。
   * 少了這一行，五張封面會各自用原始高度，排起來高低參差。
   */
  height: auto;
  /* 封面比例統一，否則五張不同比例的照片排起來參差不齊 */
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.albumname {
  display: block;
  padding: .7rem 1rem .1rem;
  font-weight: 700;
}
.albumcount {
  display: block;
  padding: 0 1rem .8rem;
  font-size: .85rem;
  color: var(--muted);
}
.albumcard:hover { background: var(--sand); }
.albumcard:hover .albumname { text-decoration: underline; }

/* 相簿頁的縮圖格 */
.photogrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: clamp(.9rem, .6rem + 1vw, 1.4rem);
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.photogrid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.photogrid a {
  display: block;
  /*
   * 縮圖本身就是點擊目標，遠大於 44px，不另外設 min-height。
   * 但焦點外框要蓋在圖片上看得見，所以留 outline-offset 的空間。
   */
  line-height: 0;
}
.photogrid img {
  display: block;
  width: 100%;
  /* 同上：height 屬性會讓 aspect-ratio 失效，必須設回 auto */
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.photogrid figcaption {
  padding: .6rem .9rem .75rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.photogrid a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

/* ---------- 頁尾 ---------- */

.sitefoot {
  padding: clamp(2rem, 1.5rem + 2vw, 3.2rem) 0 1.6rem;
  background: var(--sand);
  border-top: 1px solid var(--sand-line);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.footgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(1.4rem, 1rem + 1.8vw, 2.8rem);
  margin-bottom: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
}
.footcol h2 {
  margin: 0 0 .9rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-text);
}
/* 主辦單位的校徽 */
.footmark {
  display: block;
  width: auto;
  height: 4.5rem;
  margin: 0 0 .9rem;
}
.footcol .org { margin: 0 0 .2rem; }
/*
 * 頁尾的承辦人姓名也用了 .person 這個 class，但 .person 是師資卡的版面
 * （display:grid，第一欄是 7.5rem 的照片欄），名字會被擠進那個窄欄換行。
 * 這裡要把版面屬性蓋回來，只留字重與顏色。
 */
.footcol .person {
  display: block;
  margin: 0 0 .9rem;
  font-weight: 700;
  color: var(--ink);
}

.contact-lines {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-lines a { color: var(--primary); }

.footlinks {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footlinks a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footlinks a:hover { color: var(--primary); text-decoration: underline; }

/*
 * 觸控裝置上頁尾的連結原本只有 20px 高，手指不好點。
 * 整列變成可按的區塊、補到 44px，連結之間的間距改由各自的留白撐開。
 * 滑鼠裝置不套用，游標比手指準，頁尾也不必跟著變高。
 */
@media (hover: none) {
  .contact-lines,
  .footlinks { gap: 0; }
  .contact-lines a,
  .footlinks a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

.footbottom {
  padding-top: 1.3rem;
  border-top: 1px solid var(--sand-line);
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
.footbottom p { margin: 0; }

/* ---------- 段落結尾的動作按鈕 ---------- */

/*
 * 報名之類的動作放在段落結尾。第一顆實心、其餘外框，
 * 一排都深色的話看不出要先按哪一顆。
 */
.topicacts {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.5rem 0 0;
}
/* 導流帶的按鈕是同一組樣式，不要再抄一份 —— 兩份一定會飄走 */
.topicacts .btn,
.ctaacts .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;          /* 點擊目標至少 44px */
}
.topicacts .btn.ghost,
.ctaacts .btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.topicacts .btn.ghost:hover,
.ctaacts .btn.ghost:hover { background: var(--sand); }
.topicacts .btn:focus-visible,
.ctaacts .btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 導流帶 ---------- */

/*
 * 一句話加一組按鈕，放在頁面結尾。
 *
 * 基本樣式就是設計稿上的「橫幅」：文字在左、按鈕在右。
 * 預設那一種刻意不寫 .ctaband.lay-band 規則 —— 寫了的話，
 * 沒設定過的區塊和選了「橫幅」的區塊會走不同的路徑產生同一個畫面，
 * 而後台卡片上的「目前使用」是照資料回報的，兩邊就對不起來。
 *
 * 用格線而不是彈性盒：三格（標題／說明／按鈕）在三種版面裡
 * 的相對位置都不一樣，格線區域名稱換一組就換一種排法，
 * 不必為了某一種再多包一層 DOM。
 */
.ctaband .cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head acts"
    "body acts";
  align-items: center;
  column-gap: clamp(1.2rem, .8rem + 1.6vw, 2.4rem);
  row-gap: .4rem;
}
.ctaband .ctahead { grid-area: head; }
.ctaband .ctabody { grid-area: body; }
.ctaband .ctaacts {
  grid-area: acts;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 0;
}
.ctaband .ctahead h2 {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
}
.ctaband .ctahead .sub {
  margin: .35rem 0 0;
  font-size: clamp(.95rem, .92rem + .2vw, 1.05rem);
  font-weight: 700;
  color: var(--gold-text);
}
.ctaband .ctabody p {
  margin: .4rem 0 0;
}

/* 置中：三格疊成一欄，整組置中。版面比較正式 */
.ctaband.lay-center .cta {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "body"
    "acts";
  justify-items: center;
  text-align: center;
}
.ctaband.lay-center .ctabody {
  max-width: 46rem;
}
.ctaband.lay-center .ctaacts {
  justify-content: center;
  margin-top: .8rem;
}

/* 左右分欄：左側標題、右側說明與按鈕 */
.ctaband.lay-split .cta {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "head body"
    "head acts";
  align-items: start;
}
.ctaband.lay-split .ctaacts {
  margin-top: .9rem;
}

/*
 * 窄螢幕一律疊成一欄。
 *
 * 要連「左右分欄」一起蓋掉：那一種的區域名稱是自己寫的，
 * 只蓋基本樣式的話，手機上標題會被擠成一條直的。
 */
@media (max-width: 760px) {
  .ctaband .cta,
  .ctaband.lay-split .cta {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "body"
      "acts";
    align-items: start;
  }
  .ctaband .ctaacts { margin-top: 1rem; }
}

/* ==================================================================
   版面樣式
   ==================================================================

   後台「版面」那張卡選的值，由 build.js 掛成最外層 <section> 的
   lay-<值> class。設計稿九頁共 26 種，這裡是其中七種區塊的 18 種。

   每一組的「預設」那一種不寫規則 —— 預設就是上面那些基本樣式，
   再寫一次只會多一份要同步維護的東西。class 仍然會輸出，
   所以看 HTML 就知道那一段現在是哪一種版面。

   窄螢幕一律讓位給可讀性：多欄的變化在手機上都收成一欄，
   否則一欄只剩一百多像素，字會一行兩個。
   ================================================================== */

/* ---------- 相簿：九宮格（預設）／輪播／大圖並排 ---------- */

/*
 * 輪播：同一份清單改成橫向捲動，一次看一到兩張。
 *
 * 不換成頁面上那個 .carousel 元件 —— 那一個要額外的標記與腳本，
 * 而這裡用原生捲動就做得到，沒有腳本也能滑，鍵盤也捲得動。
 * scroll-snap 讓它停在整張照片上，不會停在兩張中間。
 */
.photoband.lay-carousel .photogrid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 26rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  /* 捲動容器要留出焦點外框的空間，不然外框會被裁掉 */
  padding-block: 4px;
}

.photoband.lay-carousel .photogrid > li { scroll-snap-align: start; }

/* 捲動容器本身要能用鍵盤捲，所以它必須拿得到焦點，焦點也要看得見 */
.photoband.lay-carousel .photogrid:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* 大圖並排：兩欄，照片比例放寬一點，細節看得清楚 */
.photoband.lay-wide .photogrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photoband.lay-wide .photogrid img { aspect-ratio: 3 / 2; }

@media (max-width: 700px) {
  .photoband.lay-wide .photogrid { grid-template-columns: 1fr; }
  .photoband.lay-carousel .photogrid { grid-auto-columns: min(88%, 22rem); }
}

/* ---------- 關於頁區塊：左文右圖（預設）／左圖右文／圖片在上／滿版照片／純文字 ---------- */

/*
 * 左右對調。
 *
 * 內容裡本來就有 imageFirst 這個開關（匯出時決定圖文誰先輸出），
 * 但那是逐個區塊在內容檔裡設的；版面選項要能蓋過它，
 * 不然選了「左圖右文」而那一段的 imageFirst 是 false 就沒反應。
 * 用 order 調，不動 HTML 的順序 —— 讀螢幕照樣是先標題後圖片。
 */
.splitband.lay-image-text .wrap.split > figure { order: -1; }

/*
 * 「左文右圖」刻意不寫規則。
 *
 * 它是預設，也就是「沒有設定過的區塊長的樣子」—— 而沒有設定過的區塊
 * 本來就是文字在左、照片在右（order 的預設值就是 0）。
 * 再寫一條 order: 0 不會改變任何畫面，但會讓「預設＝基本樣式」這件事
 * 看起來是靠那一條規則成立的，而不是本來就成立。
 */

/* 圖片在上：照片橫跨整個區塊，文字在下 */
.splitband.lay-image-top .wrap.split {
  grid-template-columns: 1fr;
}

.splitband.lay-image-top .wrap.split > figure { order: -1; }

.splitband.lay-image-top .wrap.split img {
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

/*
 * 滿版照片：文字疊在照片上。
 *
 * 文字壓在照片上，對比會隨照片內容變 —— 無障礙上這是最容易失守的一種版面。
 * 所以文字區塊一定要有自己的半透明底色，不是只加 text-shadow：
 * 陰影在淺色照片上救不了對比，而且不同照片的結果不一樣。
 */
.splitband.lay-image-full .wrap.split {
  position: relative;
  grid-template-columns: 1fr;
}

.splitband.lay-image-full .wrap.split > figure {
  order: -1;
  grid-area: 1 / 1;
}

.splitband.lay-image-full .wrap.split img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.splitband.lay-image-full .wrap.split > div {
  grid-area: 1 / 1;
  align-self: end;
  margin: clamp(1rem, 3vw, 2.4rem);
  padding: clamp(1rem, .9rem + .6vw, 1.5rem);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
}

/* 窄螢幕不疊：照片變矮，文字壓上去就蓋掉整張圖了 */
@media (max-width: 700px) {
  .splitband.lay-image-full .wrap.split > figure,
  .splitband.lay-image-full .wrap.split > div { grid-area: auto; }
  .splitband.lay-image-full .wrap.split > div { margin: .9rem 0 0; background: none; padding: 0; }
}

/*
 * 純文字：不放照片，文字置中。
 *
 * 和回饋的「純文字」一樣，這裡是用樣式把圖藏起來，圖還是會下載。
 * 之後要改成建置時就不輸出（build.js），現在先讓畫面對。
 */
.splitband.lay-text-only .wrap.split {
  grid-template-columns: 1fr;
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.splitband.lay-text-only .wrap.split > figure { display: none; }

/* ---------- 課程卡：卡片（預設）／橫列清單 ---------- */

/*
 * 橫列清單：一列一門課，課名在左、按鈕在右。
 *
 * 課表圖不隱藏 —— 隱藏是把內容拿掉，承辦人會以為圖掉了。
 * 改成佔滿整列放在下面，窄螢幕本來就是這樣排。
 */
.courseband.lay-list .coursecard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.4rem;
  margin: 0 0 1rem;
  padding: clamp(1rem, .8rem + .6vw, 1.4rem);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.courseband.lay-list .coursecard:last-child { margin-bottom: 0; padding-bottom: clamp(1rem, .8rem + .6vw, 1.4rem); }

.courseband.lay-list .coursecard h2 {
  margin: 0;
  font-size: clamp(1.05rem, .98rem + .5vw, 1.35rem);
}

.courseband.lay-list .coursecard .plan-note { grid-column: 1; margin: 0; }

.courseband.lay-list .coursecard .schedule { grid-column: 1 / -1; margin: 0; }

@media (max-width: 700px) {
  .courseband.lay-list .coursecard { grid-template-columns: 1fr; }
  .courseband.lay-list .coursecard .btn { justify-self: start; }
}

/* ---------- 師資：大頭照卡片（預設）／橫列清單 ---------- */

/*
 * 橫列清單＝既有的 .faculty.stack（照片在左、資料在右）。
 * 那一組規則是客戶確認過的，這裡只是讓版面選項也走到同一個結果，
 * 不另外寫一份幾乎一樣的樣式。
 */
.facultyband.lay-list .faculty { grid-template-columns: 1fr; }

.facultyband.lay-list .faculty > .person {
  grid-template-columns: var(--person-photo-solo) 1fr;
  gap: clamp(1.2rem, .8rem + 1.6vw, 2.2rem);
}

/*
 * 「大頭照卡片」不需要規則 —— 它是預設，也就是基本樣式。
 *
 * 原本這裡有兩條 .facultyband.lay-cards .faculty.stack，用來蓋過內容裡的
 * stack（一位一列）。那是壓症狀：資料說一位一列、版面說並排，
 * 畫面要靠規則的先後順序決定，而後台卡片顯示的「目前使用」還是錯的。
 *
 * 現在改在源頭處理 —— 選過版面的區塊，build.js 就不輸出 stack；
 * 沒選過的維持原樣，而卡片會照 stack 回報「橫列清單」。
 */

/* ---------- 特色活動：左右圖文（預設）／滿版錯落／三欄卡片 ---------- */

/*
 * 三欄卡片：每一段變成一張卡，圖在上文字在下。
 *
 * 選擇器一律從區塊本身開始寫（.featureband.lay-cards），不是只寫 .lay-cards ——
 * cards、list 這幾個值在好幾種區塊裡都有，不鎖住區塊的話，
 * 師資選「大頭照卡片」會把特色活動的樣式也套上去。
 */
.featureband.lay-cards .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: clamp(1.2rem, .9rem + 1.4vw, 2rem);
  align-items: start;
}

/* 標題要佔滿整列，不然它會被當成第一張卡 */
.featureband.lay-cards .band-title { grid-column: 1 / -1; }

.featureband.lay-cards .feature {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
  margin: 0;
  padding: clamp(1rem, .8rem + .6vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.featureband.lay-cards .feature.flip > :first-child { order: 0; }

/*
 * 左右圖文：一列一個，文字與照片左右排列並交錯。
 *
 * 那正是 .feature 原本的樣子，所以這裡不寫規則 ——
 * 再寫一次只是多一份要同步維護的東西。class 還是會輸出，
 * 看 HTML 就知道這一段選的是哪一種。
 */

/*
 * 滿版錯落：照片橫跨整個區塊，文字卡疊在照片下緣，左右交錯。
 *
 * 和「左右圖文」的差別是照片不再只佔一半 —— 這是設計稿上
 * features 的預設樣子，之前前台沒有做，所以看起來一直是左右圖文。
 */
.featureband.lay-stagger .feature {
  grid-template-columns: 1fr;
  gap: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

/* 照片排到文字前面。標記上文字區在前，所以用 order 調，不動 HTML */
.featureband.lay-stagger .featurepics { order: -1; }

.featureband.lay-stagger .feature img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.featureband.lay-stagger .feature > div:not(.featurepics) {
  position: relative;
  width: min(100%, 36rem);
  margin-top: clamp(-4rem, -2rem - 2vw, -2rem);
  margin-inline: clamp(1rem, 3vw, 3rem) auto;
  padding: clamp(1.1rem, .9rem + .8vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

/* 交錯：偶數項的文字卡靠右 */
.featureband.lay-stagger .feature.flip > div:not(.featurepics) {
  margin-inline: auto clamp(1rem, 3vw, 3rem);
}

/* flip 在基本樣式裡是換欄位順序，滿版錯落只有一欄，那一條要關掉 */
@media (min-width: 821px) {
  .featureband.lay-stagger .feature.flip > :first-child { order: 0; }
}

/*
 * 窄螢幕不要疊。
 * 照片下緣只剩一點點空間，文字卡壓上去會蓋掉照片主體，而且兩邊留白不夠。
 */
@media (max-width: 700px) {
  .featureband.lay-stagger .feature > div:not(.featurepics),
  .featureband.lay-stagger .feature.flip > div:not(.featurepics) {
    width: 100%;
    margin: .9rem 0 0;
  }
}

/* ---------- 重點數字：橫向數據帶（預設）／數據帶配圖／卡片式 ---------- */

/* 卡片式：每個數字一張卡，左對齊，和整排置中的數據帶區分開 */
.statband.lay-cards .stats {
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
}

.statband.lay-cards .stats > li {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
}

/*
 * 數據帶配圖：數字收在左半邊，右半邊留給區塊的配圖。
 *
 * 目前 stats 這種區塊的資料裡沒有圖片欄位，所以沒有圖的時候
 * 看起來就和橫向數據帶一樣（數字佔滿整列）。要真的「配圖」
 * 得先在統計數字那一頁加一個圖片欄位，那是資料面的事。
 */
.statband.lay-bar-image .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(1.2rem, .9rem + 1.4vw, 2.2rem);
  align-items: center;
}

.statband.lay-bar-image .band-title { grid-column: 1 / -1; }

.statband.lay-bar-image .stats { grid-template-columns: 1fr; }

/* ---------- 影片：單支大圖（預設）／並排 ---------- */

/* 「單支大圖」是預設，不寫規則 —— 基本樣式（.videos）就是一欄一支 */

.videoband.lay-pair .videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .videoband.lay-pair .videos { grid-template-columns: 1fr; }
}

/* ---------- 學員回饋：基本款（預設）／特殊款／純文字 ---------- */

/*
 * 特殊款：心得變成卡片，滑鼠停留或鍵盤聚焦時浮起。
 *
 * 設計稿寫「滑鼠停留時浮起並顯示完整內容」。這裡只做浮起，
 * 不把內容收起來再用停留展開 —— 只有滑鼠能看到的內容，
 * 用鍵盤與觸控的人永遠看不到，那是無障礙的失敗項（AAA 更嚴）。
 * 所以全文一直都在，停留與聚焦時只是把那一張抬起來強調。
 */
.feedbackband.lay-hover .quotegroup blockquote {
  margin: 0 0 1rem;
  padding: clamp(1rem, .8rem + .6vw, 1.3rem);
  border-left: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .18s ease, box-shadow .18s ease;
}

.feedbackband.lay-hover .quotegroup blockquote:hover,
.feedbackband.lay-hover .quotegroup blockquote:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(58, 46, 42, .14);
}

/* 會暈眩的人把動畫關掉之後就不要動 */
@media (prefers-reduced-motion: reduce) {
  .feedbackband.lay-hover .quotegroup blockquote { transition: none; }
  .feedbackband.lay-hover .quotegroup blockquote:hover,
  .feedbackband.lay-hover .quotegroup blockquote:focus-within { transform: none; }
}

/*
 * 純文字：不放照片。
 *
 * 用 display:none 只是視覺上拿掉，圖還是會下載。
 * 這一項之後要改成建置時就不輸出那張圖（build.js），
 * 現在先讓畫面對，並在這裡記著。
 */
.feedbackband.lay-plain .quotegroup blockquote.withphoto figure { display: none; }

.feedbackband.lay-plain .quotegroup blockquote.withphoto {
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--sand-line);
}


/* ---------- 行程月曆 ---------- */

/*
 * 逐日清單本身（.agenda／.day／.daytable／.tag／.callegend）的樣式在
 * forms.css，那一份是原型時就寫好的，這裡不重複一次 ——
 * 兩邊各寫一份的話，改了一邊畫面會在不同頁面長得不一樣。
 *
 * 這裡只補「區塊外框」與「課程切換鈕」，那是搬進 build.js 之後才有的東西。
 * .calband 與 .calpick 在歷年頁面不存在，所以不必限定年度。
 */

.calband { padding: clamp(2rem, 1.6rem + 1.8vw, 3.2rem) 0; }

.cal-lede {
  max-width: 54rem;
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
  line-height: 1.8;
}

/* 切換鈕排成一列，窄螢幕換行 —— 橫向捲動的工具列在手機上很容易被漏看 */
.calpick {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.4rem;
}

.calpick-b {
  padding: .5rem .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}

.calpick-b:hover { border-color: var(--ink-soft); }

/*
 * 選中的那一顆不只換顏色，還加一條底線。
 * 只靠顏色區分的話，色盲與高對比模式下看不出現在選的是哪一門。
 */
.calpick-b.on {
  background: var(--btn-bg, var(--primary));
  border-color: var(--btn-bg, var(--primary));
  color: var(--btn-text);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.calpick-b:focus-visible {
  outline: 3px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

/* 被篩掉的那幾天與那幾列要真的消失 —— table 的 display 會蓋掉 hidden */
.calband [hidden] { display: none !important; }

@media (forced-colors: active) {
  .calpick-b.on {
    background: Highlight;
    color: HighlightText;
  }
}

/* 行政／其他沒有自己的顏色，用最淡的一種，不要憑空生一個 */
.calband .tag.other {
  border-left-color: var(--muted);
  background: var(--line-soft);
}

/*
 * 圖例的色塊要看得出邊界。
 * 抵離與其他這兩種的底色幾乎是白的，色塊在白底上等於不存在 ——
 * 旁邊寫著一行說明卻看不到它在說哪一塊。
 */
.calband .callegend .tag {
  border: 1px solid var(--line);
  border-left-width: 4px;
}

/* ---------- 月曆本體 ---------- */

/*
 * 這幾條原本在 forms.css。那一份是照「parts/ 裡用到哪些 class」產生的，
 * 月曆搬進 build.js 之後 parts 不再用這些 class，規則就被整批刪掉了，
 * 畫面上是整塊沒有樣式 —— 所以規則要跟著搬過來。
 *
 * 全部收在 .calband 底下：.tag、.agenda 這種名字太通用，
 * 不限定範圍的話會波及別的區塊與歷年頁面。
 */

/* 標記。色塊一律配深字，不用淺字壓色塊 */
.calband .tag {
  display: block;
  margin-top: .15rem;
  padding: .12rem .3rem;
  border-radius: 3px;
  font-size: .74rem;
  line-height: 1.3;
  border-left: 3px solid var(--muted);
  background: var(--line-soft);
  color: var(--ink);
  /* 長字要能斷開，否則窄螢幕會被切掉 */
  overflow-wrap: break-word;
}

.calband .tag.course { border-left-color: var(--primary); background: #F0E4E6; }
.calband .tag.tour { border-left-color: var(--gold); background: #F7EEDF; }
.calband .tag.extra { border-left-color: #35525C; background: #E6EDEF; }
.calband .tag.key {
  border-left-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.calband .tag.travel { border-left-color: var(--muted); background: var(--line-soft); }

.calband .callegend {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  font-size: .82rem;
  color: var(--muted);
}
.calband .callegend li { display: flex; gap: .55rem; align-items: center; margin-top: .4rem; }
.calband .callegend .tag { margin: 0; flex: none; width: 2.2rem; }
.calband .calnote { margin: .9rem 0 0; font-size: .8rem; color: var(--muted); }

/* 逐日清單。客戶要的是每日詳細課表，不是月份格狀月曆 */
.calband .agenda { list-style: none; margin: 0; padding: 0; }
.calband .agenda > li { border-bottom: 1px solid var(--line-soft); }
.calband .agenda > li:last-child { border-bottom: 0; }
.calband .agenda b { font-size: .9rem; color: var(--ink); }
.calband .agenda .tag { margin: 0; }

.calband .agenda .day > summary {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: .6rem;
  align-items: center;
  /* 點擊目標 44px */
  min-height: 2.75rem;
  padding: .6rem .2rem;
  cursor: pointer;
}
.calband .agenda .day > summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -2px;
}
.calband .agenda .day > summary span { display: flex; flex-wrap: wrap; gap: .3rem; }
.calband .agenda .day[open] > summary { font-weight: 600; }

.calband .daytable {
  width: 100%;
  border-collapse: collapse;
  margin: .2rem 0 .9rem;
  font-size: .86rem;
}
.calband .daytable th,
.calband .daytable td {
  text-align: left;
  padding: .45rem .7rem;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
}
.calband .daytable thead th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.calband .daytable tbody th { white-space: nowrap; font-weight: 400; color: var(--ink); }
.calband .daytable .venue { color: var(--muted); }

/* 窄螢幕：日期與標記上下排，每日課表一列一塊 */
@media (max-width: 560px) {
  .calband .agenda .day > summary { grid-template-columns: 1fr; gap: .25rem; }
  .calband .daytable thead { display: none; }
  .calband .daytable tbody th,
  .calband .daytable td { display: block; border-top: 0; padding: .1rem .2rem; }
  .calband .daytable tbody tr {
    display: block;
    border-top: 1px solid var(--line-soft);
    padding: .5rem 0;
  }
}

/* ---------- 金額表 ---------- */

/*
 * 歷年的費用表是圖片，這一塊是把它換成真表格。
 * 類名在歷年頁面不存在，所以不必限定年度。
 */

.feeband { padding: clamp(2rem, 1.6rem + 1.8vw, 3.2rem) 0; }

.feetable {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: clamp(.95rem, .92rem + .16vw, 1.04rem);
}

.feetable caption {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.08rem;
  padding-bottom: .6rem;
}

.feetable th,
.feetable td {
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.feetable thead th {
  background: var(--hero-bg);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}

/* 第一欄是「哪一種申請人」，字多，其餘是金額，右對齊比較好比 */
.feetable tbody th { width: 34%; font-weight: 600; }
.feetable tbody td { white-space: nowrap; }

.feetable-note {
  margin: -.4rem 0 1.6rem;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.7;
}

/*
 * 窄螢幕堆成一欄。
 * 五欄在手機上每欄不到 70px，USD 1,310 會斷成兩行，等於不能讀。
 */
@media (max-width: 760px) {
  .feetable thead { display: none; }
  .feetable tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .7rem .85rem;
    margin-bottom: .9rem;
  }
  .feetable tbody th,
  .feetable tbody td {
    display: block;
    width: auto;
    border: 0;
    padding: .15rem 0;
    white-space: normal;
  }
  .feetable tbody th {
    font-size: 1rem;
    padding-bottom: .45rem;
    margin-bottom: .45rem;
    border-bottom: 1px solid var(--line-soft);
  }
  /* 堆疊之後欄位標題離得很遠，每一格自己帶上名稱 */
  .feetable tbody td::before {
    content: attr(data-l) '：';
    color: var(--muted);
    font-size: .85rem;
  }
}

/*
 * 說明區塊裡的圖片（費用說明用複合文字編輯器插的圖）。
 *
 * 不限寬的話，一張 2400 寬的圖會把整個區塊撐出視窗，
 * 而且只有在那一筆說明真的有圖的時候才看得出來。
 * height:auto 是配 width/height 屬性用的 —— 屬性留著是為了預留空間
 * （載圖時不要整頁跳動），但縮放之後高度必須跟著算。
 *
 * 六個年度共用這個檔案，而歷年的說明都是純文字、沒有圖，
 * 所以這幾條對舊年度不會有任何作用。
 */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.prose figure {
  margin: 1.2rem 0;
}
.prose figcaption {
  margin-top: .5rem;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}