/* ============================================================
   全站共用表頭與頁尾的樣式 (內容由 Worker 依 site.json 產生，見 src/chrome.js)
   class 一律以 site-header / site-footer / sc- 開頭，不會和各頁面的樣式互相影響
   ============================================================ */
.site-header, .site-footer {
  --sc-navy: #1e3a8a;
  --sc-blue: #2563eb;
  --sc-sky: #eff6ff;
  --sc-line: #e2e8f0;
  --sc-header-h: 68px;
  font-family: -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
}
.site-header *, .site-footer * { box-sizing: border-box; }
.site-header [hidden], .site-footer [hidden] { display: none !important; }
.sc-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== 表頭與選單 ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sc-line);
}
/* 表頭比內文寬一些：完整網站名稱 + 全部選單 + 兩個登入按鈕才排得下 */
.site-header .sc-wrap { max-width: 1440px; }
.sc-header-in { height: var(--sc-header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sc-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; font-weight: 800; font-size: 18px; color: var(--sc-navy); }
.sc-brand img { height: 40px; width: auto; display: block; object-fit: contain; }
.sc-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-nav { display: flex; align-items: center; gap: 4px; }
.sc-nav a { text-decoration: none; padding: 8px 11px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #334155; white-space: nowrap; transition: background .15s, color .15s; }
.sc-nav a:hover, .sc-nav a.active { background: var(--sc-sky); color: var(--sc-blue); }
.sc-nav a.cta { background: var(--sc-navy); color: #fff; margin-left: 8px; }
.sc-nav a.cta:hover { background: var(--sc-blue); color: #fff; }
.sc-nav a.cta-green { background: #16a34a; }
.sc-nav a.cta-green:hover { background: #15803d; }
.sc-burger { display: none; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--sc-line); background: #fff; border-radius: 12px; cursor: pointer; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.sc-burger span { display: block; width: 20px; height: 2px; background: var(--sc-navy); border-radius: 2px; }

@media (max-width: 1400px) {
  .sc-burger { display: flex; }
  .sc-nav { position: absolute; left: 0; right: 0; top: var(--sc-header-h); background: #fff; border-bottom: 1px solid var(--sc-line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; display: none; box-shadow: 0 14px 30px rgba(15, 23, 42, .1); max-height: calc(100vh - var(--sc-header-h)); overflow-y: auto; }
  .sc-nav.open { display: flex; }
  .sc-nav a { padding: 12px 14px; border-radius: 12px; }
  .sc-nav a.cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 480px) {
  .sc-brand { font-size: 15px; }
  .sc-brand img { height: 34px; }
}

/* ===== 頁尾 ===== */
.site-footer { background: var(--sc-navy); color: #cbd5e1; padding: 34px 0; margin-top: 30px; font-size: 14px; text-align: left; }
.sc-foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.sc-foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.sc-foot-brand img { height: 28px; width: auto; display: block; object-fit: contain; }
.sc-foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sc-foot-links a { color: #e2e8f0; text-decoration: none; }
.sc-foot-links a:hover { color: #fff; text-decoration: underline; }

@media print {
  .site-header, .site-footer { display: none !important; }
}
