/* =============================================================
   hdaigen — 慧燈中學學校首頁　公開端元件
   只用 hd/tokens 的變數，不自訂顏色。
   ============================================================= */

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--container-default); margin-inline: auto; padding-inline: var(--space-5); }
.wrap-wide { max-width: var(--container-wide); }
.wrap-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--space-9); }
.section-tight { padding-block: var(--space-7); }
.section-head { margin-bottom: var(--space-6); }
.section-head .hd-eyebrow { display: block; margin-bottom: var(--space-3); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--text-muted); margin: var(--space-3) 0 0; max-width: 60ch; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 100; background: var(--surface-card);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: var(--border-hairline) solid var(--border-subtle); }
.site-header-inner { display: flex; align-items: center; gap: var(--space-5); height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 18px; color: var(--text-strong); }
.brand-sub { font-size: 11px; letter-spacing: .18em; color: var(--text-subtle); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-1); }
.site-nav a { font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-body); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.site-nav a:hover { background: var(--surface-tint); color: var(--text-brand); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text-brand); font-weight: var(--fw-bold); }

.header-tools { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: var(--border-hairline) solid var(--border-subtle); background: var(--surface-card);
  color: var(--text-muted); cursor: pointer; transition: all var(--dur-fast) var(--ease-standard); }
.icon-btn:hover { border-color: var(--border-brand); color: var(--text-brand); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: var(--fw-bold);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); border: var(--border-thick) solid transparent;
  cursor: pointer; transition: all var(--dur-fast) var(--ease-standard); text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn-primary { background: var(--color-brand-strong); color: var(--text-on-brand); }
.btn-primary:hover { background: var(--color-brand-deep); box-shadow: var(--shadow-brand); }
.btn-accent { background: var(--color-accent); color: var(--violet-950); }
.btn-accent:hover { background: var(--gold-400); box-shadow: var(--glow-flame); }
.btn-ghost { background: transparent; color: var(--text-brand); border-color: var(--border-brand); }
.btn-ghost:hover { background: var(--surface-tint); }
.btn-on-dark { background: transparent; color: var(--text-on-dark); border-color: rgba(255,255,255,.4); }
.btn-on-dark:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-xs); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 560px; display: grid; align-items: center;
  background: var(--surface-brand-deep); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(32,15,35,.92) 0%, rgba(52,26,56,.78) 45%, rgba(52,26,56,.35) 100%); }
.hero-inner { position: relative; padding-block: var(--space-9); max-width: 680px; }
.hero h1 { font-size: var(--fs-display); color: #fff; margin: var(--space-4) 0 0; font-weight: var(--fw-black); }
.hero-lead { color: var(--text-on-dark); font-size: var(--fs-lead); margin: var(--space-5) 0 0; max-width: 52ch; }
.hero-actions { display: flex; gap: var(--space-3); margin-top: var(--space-7); flex-wrap: wrap; }
.hero-meta { display: flex; gap: var(--space-3); align-items: center; margin-top: var(--space-7);
  color: rgba(244,239,245,.72); font-size: var(--fs-xs); }

/* ---------- Audience cards（對象分眾） ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
.audience-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5);
  background: var(--surface-card); border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-lg); transition: all var(--dur-base) var(--ease-out); }
.audience-card:hover { text-decoration: none; transform: translateY(-3px);
  border-color: var(--border-brand); box-shadow: var(--shadow-md); }
.audience-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--surface-tint); color: var(--color-brand-strong); }
.audience-icon svg { width: 21px; height: 21px; }
.audience-card h3 { font-size: var(--fs-h4); }
.audience-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.audience-card .count { margin-top: auto; padding-top: var(--space-3); font-size: var(--fs-xs);
  color: var(--text-subtle); font-family: var(--font-ui); }

/* ---------- Announcement list ---------- */
.ann-list { display: flex; flex-direction: column; border-top: var(--border-hairline) solid var(--border-subtle); }
.ann-row { display: grid; grid-template-columns: 112px 1fr auto; align-items: baseline; gap: var(--space-4);
  padding: var(--space-4) var(--space-3); border-bottom: var(--border-hairline) solid var(--border-subtle);
  transition: background var(--dur-fast) var(--ease-standard); }
.ann-row:hover { background: var(--surface-tint); text-decoration: none; }
.ann-date { font-family: var(--font-ui); font-size: var(--fs-xs); color: var(--text-subtle);
  font-variant-numeric: tabular-nums; }
.ann-title { color: var(--text-strong); font-weight: var(--fw-medium); line-height: var(--lh-snug); }
.ann-row:hover .ann-title { color: var(--text-brand); }
.ann-row-meta { display: flex; gap: var(--space-2); align-items: center; flex-shrink: 0; }

/* ---------- Tags / chips ---------- */
.tag { display: inline-flex; align-items: center; gap: var(--space-1); font-family: var(--font-ui);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: 3px var(--space-3);
  border-radius: var(--radius-pill); background: var(--surface-tint); color: var(--text-brand); white-space: nowrap; }
.tag-accent { background: var(--surface-accent-tint); color: var(--gold-700); }
.tag-pin { background: var(--red-50); color: var(--red-500); }
.tag-muted { background: var(--surface-sunken); color: var(--text-muted); }
.tag-outline { background: transparent; border: var(--border-hairline) solid var(--border-subtle); color: var(--text-muted); }
/* 處室／性質／對象的前綴圖示（templates/_axis.html）。 */
.tag-axis svg, .axis-label svg { width: 12px; height: 12px; flex: none; opacity: .75; }
a.tag-axis:hover { text-decoration: none; filter: brightness(.95); }
.axis-label { display: flex; align-items: center; gap: var(--space-1); }
.axis-label svg { width: 13px; height: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Chip filter bar ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { font-family: var(--font-ui); font-size: var(--fs-sm); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--border-subtle);
  background: var(--surface-card); color: var(--text-muted); cursor: pointer; text-decoration: none;
  transition: all var(--dur-fast) var(--ease-standard); }
.chip:hover { border-color: var(--border-brand); color: var(--text-brand); text-decoration: none; }
.chip[aria-pressed="true"], .chip.is-active { background: var(--color-brand-strong); border-color: var(--color-brand-strong); color: #fff; }

/* ---------- Stat band（升學成果） ---------- */
.stat-band { background:
    radial-gradient(120% 80% at 50% -10%, rgba(178,115,182,.22), transparent 60%), var(--surface-brand-deep);
  color: var(--text-on-dark); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.stat { text-align: center; padding: var(--space-4); }
.stat-num { font-family: var(--font-display); font-size: 52px; font-weight: var(--fw-black);
  color: var(--color-accent-bright); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 22px; margin-left: 2px; }
.stat-label { margin-top: var(--space-3); font-size: var(--fs-sm); color: rgba(244,239,245,.86); }
.stat-sub { margin-top: var(--space-1); font-size: var(--fs-xs); color: rgba(244,239,245,.56); }

/* ---------- Feature cards（特色課程／校園） ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.feature-card { display: flex; flex-direction: column; background: var(--surface-card);
  border-radius: var(--radius-lg); overflow: hidden; border: var(--border-hairline) solid var(--border-subtle);
  transition: all var(--dur-base) var(--ease-out); }
.feature-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-media { aspect-ratio: 16/10; overflow: hidden; background: var(--surface-sunken); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.feature-card:hover .feature-media img { transform: scale(1.04); }
.feature-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.feature-body h3 { font-size: var(--fs-h4); }
.feature-body p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.social-card { display: flex; flex-direction: column; background: var(--surface-card); border-radius: var(--radius-lg);
  overflow: hidden; border: var(--border-hairline) solid var(--border-subtle);
  transition: all var(--dur-base) var(--ease-out); }
.social-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.social-media { position: relative; aspect-ratio: 1/1; background: var(--surface-sunken); overflow: hidden; }
.social-media img { width: 100%; height: 100%; object-fit: cover; }
.social-badge { position: absolute; top: var(--space-3); left: var(--space-3); display: inline-flex;
  align-items: center; gap: 6px; padding: 4px var(--space-3); border-radius: var(--radius-pill);
  background: rgba(32,15,35,.72); color: #fff; font-size: var(--fs-xs); font-family: var(--font-ui);
  backdrop-filter: blur(4px); }
.social-badge svg { width: 13px; height: 13px; }
.social-body { padding: var(--space-4); }
.social-body p { margin: 0; font-size: var(--fs-sm); color: var(--text-body); line-height: var(--lh-snug);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.social-body .meta { margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--text-subtle); }

/* Video facade — click to play（不載入任何第三方 JS） */
.video-facade { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; background: var(--surface-brand-deep); border: 0; padding: 0; width: 100%; display: block; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade::after { content: ""; position: absolute; inset: 0; background: rgba(32,15,35,.34);
  transition: background var(--dur-base) var(--ease-standard); }
.video-facade:hover::after { background: rgba(32,15,35,.18); }
.video-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; z-index: 2;
  display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--color-accent);
  color: var(--violet-950); box-shadow: var(--glow-flame); transition: transform var(--dur-base) var(--ease-out); }
.video-facade:hover .video-play { transform: scale(1.08); }
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: var(--space-5);
  background: linear-gradient(transparent, rgba(32,15,35,.88)); color: #fff; text-align: left; }
.video-caption strong { font-family: var(--font-display); font-size: var(--fs-h4); display: block; }
.video-caption span { font-size: var(--fs-xs); color: rgba(244,239,245,.72); }

/* ---------- Article body ---------- */
.article { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); }
.article > * + * { margin-top: var(--space-5); }
.article h2 { font-size: var(--fs-h3); margin-top: var(--space-8); }
.article h3 { font-size: var(--fs-h4); margin-top: var(--space-7); }
/* 小標是深層連結的落點（~/p/office-jiaowu#註冊組）。頁首是 sticky 的 73px，
   不留這段邊距，跳過去的小標就正好被頁首蓋住。 */
.article h2, .article h3 { scroll-margin-top: 90px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: var(--space-2); }
.article img { max-width: 100%; border-radius: var(--radius-md); }
.article blockquote { margin: 0; padding: var(--space-4) var(--space-5); border-left: 3px solid var(--color-accent);
  background: var(--surface-accent-tint); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--text-strong); }
.article table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.article th, .article td { padding: var(--space-3); border-bottom: var(--border-hairline) solid var(--border-subtle); text-align: left; }
.article th { background: var(--surface-sunken); font-family: var(--font-ui); }
/* 舊站搬過來的表格帶著 width:436px 之類的寫死尺寸，手機上會把版面撐破。
   匯入時已經把 style／width 屬性拔掉，這裡再補一層橫向捲動當保險。 */
.article table { display: block; overflow-x: auto; }
.article iframe { max-width: 100%; border: 0; }

/* ---------- 相簿（舊站靜態頁搬過來的照片） ---------- */
.gallery { display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface-sunken); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 0; transition: transform .35s var(--ease-out); }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { margin-top: var(--space-2); font-size: var(--fs-xs);
  line-height: var(--lh-snug); color: var(--text-muted); font-family: var(--font-ui); }

/* ---------- 下載清單（舊站搬過來的附件） ---------- */
.downloads { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column;
  gap: var(--space-2); }
.downloads a { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-3) var(--space-4);
  border: var(--border-hairline) solid var(--border-subtle); border-radius: var(--radius-md);
  background: var(--surface-card); font-family: var(--font-ui); font-size: var(--fs-sm); }
.downloads a:hover { border-color: var(--border-brand); background: var(--surface-tint);
  text-decoration: none; }
.downloads .size { color: var(--text-subtle); font-size: var(--fs-xs); flex: none;
  font-variant-numeric: tabular-nums; }

/* ---------- 子頁清單 ---------- */
.subpages { display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.subpage { display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-md);
  border: var(--border-hairline) solid var(--border-subtle);
  background: var(--surface-card); text-decoration: none; }
.subpage:hover { border-color: var(--border-brand); background: var(--surface-tint); }
.subpage-title { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); font-family: var(--font-ui); color: var(--text-strong); }
.subpage-title svg { width: 14px; height: 14px; flex: none; color: var(--color-brand); }
.subpage-sum { font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--text-muted); }

/* ---------- Breadcrumb ---------- */
.crumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs);
  color: var(--text-subtle); font-family: var(--font-ui); }
.crumb a { color: var(--text-muted); }
.crumb span { color: var(--text-subtle); }

/* ---------- Attachments ---------- */
.attach-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.attach { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: var(--border-hairline) solid var(--border-subtle); border-radius: var(--radius-md);
  background: var(--surface-card); transition: all var(--dur-fast) var(--ease-standard); }
.attach:hover { border-color: var(--border-brand); background: var(--surface-tint); text-decoration: none; }
.attach svg { width: 18px; height: 18px; color: var(--color-brand); flex-shrink: 0; }
.attach-name { flex: 1; font-size: var(--fs-sm); color: var(--text-strong); }
.attach-size { font-size: var(--fs-xs); color: var(--text-subtle); font-variant-numeric: tabular-nums; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: var(--space-2); margin-top: var(--space-7); }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; padding-inline: var(--space-2);
  border-radius: var(--radius-sm); font-family: var(--font-ui); font-size: var(--fs-sm);
  border: var(--border-hairline) solid var(--border-subtle); color: var(--text-muted); background: var(--surface-card); }
.pager a:hover { border-color: var(--border-brand); color: var(--text-brand); text-decoration: none; }
.pager .is-current { background: var(--color-brand-strong); border-color: var(--color-brand-strong); color: #fff; }
.pager .is-gap { border: 0; background: transparent; }

/* ---------- Search field ---------- */
.searchbox { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5);
  background: var(--surface-card); border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-pill); transition: all var(--dur-fast) var(--ease-standard); }
.searchbox:focus-within { border-color: var(--color-brand); box-shadow: var(--ring-focus); }
.searchbox svg { width: 18px; height: 18px; color: var(--text-subtle); flex-shrink: 0; }
.searchbox input { flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--font-body);
  font-size: var(--fs-body); color: var(--text-strong); }
.searchbox input::placeholder { color: var(--text-subtle); }

/* ---------- Sidebar ---------- */
.with-aside { display: grid; grid-template-columns: 1fr 280px; gap: var(--space-8); align-items: start; }
.aside-card { background: var(--surface-card); border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-5); }
.aside-card + .aside-card { margin-top: var(--space-4); }
.aside-card h3 { font-size: var(--fs-h4); margin-bottom: var(--space-4); }
.aside-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.aside-links a { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0;
  font-size: var(--fs-sm); color: var(--text-body); border-bottom: var(--border-hairline) solid var(--border-subtle); }
.aside-links li:last-child a { border-bottom: 0; }
.aside-links a:hover { color: var(--text-brand); text-decoration: none; }
.aside-links .n { color: var(--text-subtle); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* 空清單。原本只寫在 admin.css，前台的 /news 查無結果時 svg 沒有尺寸，會撐滿整欄。 */
.empty { text-align: center; padding: var(--space-9) var(--space-5); color: var(--text-subtle); }
.empty svg { width: 42px; height: 42px; color: var(--plum-300); margin-bottom: var(--space-4); }
.empty h3 { font-size: var(--fs-h4); color: var(--text-muted); margin-bottom: var(--space-2); }
.empty p { font-size: var(--fs-sm); margin: 0 0 var(--space-5); }
/* 目前所在的那一頁。側欄與頂端導覽是同一份選單，站在哪裡要一眼看得出來。 */
.aside-links a[aria-current="page"] { color: var(--text-brand); font-family: var(--font-ui); }
/* 展開的那一支子頁。縮排 + 左側細線，表示它們屬於上一列而不是與之並列。 */
.aside-sub { list-style: none; margin: 0 0 var(--space-2); padding: var(--space-2) 0 0 var(--space-4);
  border-left: var(--border-thick) solid var(--border-brand); margin-left: var(--space-1); }
.aside-sub a { border-bottom: 0; padding: var(--space-1) 0; color: var(--text-muted); }
.aside-sub a[aria-current="page"] { color: var(--text-brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-brand-deep); color: var(--text-on-dark); padding-block: var(--space-8) var(--space-6); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: var(--space-7); }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand strong { font-family: var(--font-display); font-size: 19px; color: #fff; }
.footer-motto { font-family: var(--font-display); color: var(--color-accent-bright); font-size: var(--fs-lead); }
.footer-col h4 { font-family: var(--font-ui); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: rgba(244,239,245,.82); font-size: var(--fs-sm); }
.footer-col a:hover { color: #fff; }
.footer-office { font-size: var(--fs-sm); color: rgba(244,239,245,.74); line-height: var(--lh-snug); }
.footer-office + .footer-office { margin-top: var(--space-4); padding-top: var(--space-4);
  border-top: var(--border-hairline) solid rgba(255,255,255,.12); }
.footer-office strong { display: block; color: #fff; font-family: var(--font-ui); font-size: var(--fs-xs);
  letter-spacing: .08em; margin-bottom: var(--space-2); }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-5); }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: var(--border-hairline) solid rgba(255,255,255,.22); color: rgba(244,239,245,.82); }
.footer-social a:hover { background: rgba(255,255,255,.12); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: var(--border-hairline) solid rgba(255,255,255,.12); display: flex; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; font-size: var(--fs-xs); color: rgba(244,239,245,.56); }

/* ---------- Mockup ribbon（只有 UI 稿用，改成 template 時刪掉） ---------- */
.mock-bar { background: var(--violet-950); color: var(--text-on-dark); font-family: var(--font-ui);
  font-size: var(--fs-xs); padding: var(--space-2) var(--space-5); display: flex; gap: var(--space-4);
  align-items: center; flex-wrap: wrap; }
.mock-bar strong { color: var(--color-accent-bright); letter-spacing: .1em; }
.mock-bar a { color: rgba(244,239,245,.72); }
.mock-bar a:hover { color: #fff; }
.mock-bar a.on { color: var(--color-accent-bright); font-weight: var(--fw-bold); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .audience-grid { grid-template-columns: repeat(3, 1fr); }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
@media (max-width: 860px) {
  .with-aside { grid-template-columns: 1fr; gap: var(--space-6); }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-7); }
  .nav-toggle { display: inline-grid; }
  .site-nav { position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch;
    background: var(--surface-card); padding: var(--space-4); gap: 0; margin: 0;
    border-bottom: var(--border-hairline) solid var(--border-subtle); box-shadow: var(--shadow-lg); display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: var(--space-4); border-bottom: var(--border-hairline) solid var(--border-subtle); }
  .hero { min-height: 480px; }
  .hero h1 { font-size: var(--fs-h1); }
  .audience-grid { grid-template-columns: 1fr 1fr; }
  .ann-row { grid-template-columns: 1fr; gap: var(--space-2); }
  .ann-row-meta { order: -1; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Nav dropdown（扁平：只有一層下拉） ---------- */
.nav-item { position: relative; }
.nav-drop { position: absolute; top: 100%; left: 0; min-width: 190px; padding: var(--space-2);
  background: var(--surface-card); border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); display: none; z-index: 60; }
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; white-space: nowrap; }

/* ---------- 社群嵌入 ---------- */
.fb-embed-wrap { background: var(--surface-card); border: var(--border-hairline) solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-4); overflow: hidden; }
.fb-embed-wrap iframe { border: 0; display: block; margin-inline: auto; max-width: 100%; }
.social-empty { text-align: center; padding: var(--space-8) var(--space-5); color: var(--text-subtle); }

/* ---------- 搜尋結果 ---------- */
.result { display: block; padding: var(--space-5) var(--space-3);
  border-bottom: var(--border-hairline) solid var(--border-subtle); }
.result:hover { background: var(--surface-tint); text-decoration: none; }
.result h3 { font-size: var(--fs-h4); color: var(--text-strong); }
.result:hover h3 { color: var(--text-brand); }
.result p { margin: var(--space-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.result .meta { margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-subtle);
  font-family: var(--font-ui); }

/* ---------- 錯誤頁 ---------- */
.err-page { text-align: center; padding-block: var(--space-10); }
.err-code { font-family: var(--font-display); font-size: 96px; font-weight: var(--fw-black);
  color: var(--color-brand-soft); line-height: 1; }

@media (max-width: 720px) {
  .nav-drop { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 var(--space-4); }
  .nav-drop a { font-size: var(--fs-sm); color: var(--text-muted); }
}

/* ---------- Hero 背景輪播 ---------- */
.hero-slides { position: absolute; inset: 0; }
.hero-slides .hero-photo { opacity: 0; transition: opacity 1200ms var(--ease-out); }
.hero-slides .hero-photo.is-active { opacity: 1; }
.hero-dots { display: flex; gap: 8px; margin-top: var(--space-7); }
.hero-dots button { width: 34px; height: 3px; padding: 0; border: 0; border-radius: 2px;
  cursor: pointer; background: rgba(244, 239, 245, .32);
  transition: background var(--dur-base) var(--ease-out); }
.hero-dots button:hover { background: rgba(244, 239, 245, .6); }
/* 作用中的圓點刻意用白而非燈火金：hero 裡已經有一顆金色 CTA，
   金色是火花不是色塊，同一個版位出現兩處會互相稀釋。 */
.hero-dots button[aria-selected="true"] { background: rgba(244, 239, 245, .95); }
.hero-dots button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .hero-slides .hero-photo { transition: none; }
}

/* ---------- 社群官方嵌入（沒有 Graph API token 時的退路） ---------- */
.social-embeds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5); align-items: start; }
.social-embed { display: flex; flex-direction: column; gap: var(--space-4);
  align-items: flex-start; background: var(--surface-card); border-radius: var(--radius-lg);
  border: var(--border-hairline) solid var(--border-subtle); padding: var(--space-4);
  overflow: hidden; }
.social-embed iframe { width: 100%; border-radius: var(--radius-md); }
/* IG 的個人檔案卡只有頭像列加兩排縮圖，比 FB 時間軸矮一截 */
.social-embed-ig iframe { height: 520px; }
@media (max-width: 860px) {
  .social-embeds { grid-template-columns: 1fr; }
  .social-embed-ig iframe { height: 470px; }
}
