:root {
  --bg: #f4f7fb;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-strong: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe3ee;
  --accent: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #0f172a;
  --warm: #1e40af;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
  --radius-card: 18px;
  --radius-button: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.14), transparent 28%),
    radial-gradient(circle at top right, rgba(15,23,42,.08), transparent 24%),
    linear-gradient(180deg, #eef4fb 0%, #f8fbff 44%, #f4f7fb 100%);
  padding-top: 92px;
}

a { color: inherit; }
.wrap { width: min(1200px, calc(100vw - 32px)); margin: 0 auto; }
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 251, 255, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.brand {
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
}
.topnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a,
.chip,
.button {
  border: 1px solid rgba(148, 163, 184, .22);
  text-decoration: none;
}
.topnav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-button);
  background: rgba(255,255,255,.72);
  white-space: nowrap;
}
.topnav a:hover,
.topnav a:focus-visible {
  background: var(--paper-strong);
  border-color: rgba(37, 99, 235, .24);
  color: var(--accent-strong);
  outline: none;
}
.hero, .panel, .card, .modal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.hero {
  padding: 32px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.08), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  box-shadow: var(--shadow-sm);
}
.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 16px 0 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -.03em;
}
h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
h3 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.lead, .muted { color: var(--muted); }
.lead {
  max-width: 840px;
  font-size: 18px;
}
.hero-grid, .stats, .section-grid {
  display: grid;
  gap: 18px;
}
.hero-grid {
  grid-template-columns: 1.2fr .8fr;
  align-items: stretch;
}
.hero-side {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}
.stat {
  padding: 22px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: var(--shadow-sm);
}
.num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-strong);
  margin-bottom: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-button);
  background: var(--paper-strong);
  font-weight: 700;
  min-height: 46px;
}
.button.primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #1d4ed8;
  color: #fff;
}
.button-row, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  padding: 8px 12px;
  border-radius: var(--radius-button);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-weight: 700;
}
.section {
  padding: 18px 0;
}
section[id] { scroll-margin-top: 108px; }
.panel {
  padding: 28px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.filter-btn {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: var(--radius-button);
  background: rgba(255,255,255,.72);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}
.filter-btn.active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border-color: #1d4ed8;
}
.section-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  overflow: hidden;
}
.thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, rgba(29,78,216,.08), rgba(255,255,255,.4));
  display: block;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 18px;
}
.meta {
  color: var(--muted);
  font-size: 14px;
}
.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 16px;
  color: var(--muted);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  padding: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal.open { display: flex; }
.modal-card {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
}
.modal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-close {
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255,255,255,.82);
  color: var(--ink);
  border-radius: var(--radius-button);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}
.modal-figure {
  margin: 0;
}
.modal-figure img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #fff;
}
.footer {
  padding: 28px 0 48px;
  color: var(--muted);
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}
.list-search {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.credential-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.credential-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.credential-table th,
.credential-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.credential-table th {
  position: sticky;
  top: 88px;
  z-index: 2;
  background: #eef4fb;
  color: var(--accent-strong);
  font-size: 14px;
}
.credential-table tr:last-child td { border-bottom: 0; }
.credential-table .date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.credential-thumb {
  width: 112px;
  height: 78px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.credential-name {
  min-width: 250px;
  font-weight: 750;
  line-height: 1.5;
}
.credential-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.list-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}
.summary-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 28px;
  line-height: 1.1;
}
.method-note {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
}
@media (max-width: 960px) {
  body { padding-top: 108px; }
  .hero-grid, .stats { grid-template-columns: 1fr; }
  .topbar, .section-head, .modal-top { display: block; }
  .topnav { margin-top: 12px; }
  .modal-close { margin-top: 10px; }
  .list-toolbar { grid-template-columns: 1fr; }
  .list-summary { grid-template-columns: 1fr; }
  .credential-table th { top: 108px; }
}
