:root {
  --ink: #2d2925;
  --muted: #746a61;
  --paper: #fffaf3;
  --paper-deep: #f7eee3;
  --line: #e8d9c8;
  --orange: #c45d22;
  --orange-dark: #8e3d16;
  --orange-soft: #fff0df;
  --shadow: 0 12px 30px rgba(79, 50, 28, .08);
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: var(--orange-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid #1f6d91; outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .5rem .8rem; background: #fff; border: 2px solid var(--orange); }
.skip-link:focus { top: 1rem; }
.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; }
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 250, 243, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.header-inner, .site-main, .footer-inner { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px 12px 12px 4px; color: #fff; background: var(--orange); font-weight: 800; letter-spacing: -.08em; }
.brand strong, .brand small { display: block; line-height: 1.25; }
.brand strong { font-size: 1.1rem; }
.brand small { color: var(--muted); font-size: .75rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav a { padding: .4rem .7rem; color: var(--muted); text-decoration: none; border-radius: 8px; }
.site-nav a:hover, .site-nav a.is-active { color: var(--orange-dark); background: var(--orange-soft); }
.site-main { min-height: calc(100vh - 190px); padding: 2.5rem 0 4rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--orange); font-size: .8rem; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }
h1 { margin: 0 0 .7rem; font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin: 2.5rem 0 .8rem; font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { margin: 0 0 .45rem; font-size: 1.15rem; }
.lede { max-width: 62ch; margin: 0; color: var(--muted); font-size: 1.05rem; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; }
.stat-card { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 1.65rem; color: var(--orange-dark); }
.stat-card span { color: var(--muted); font-size: .86rem; }
.quick-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail-grid > * { min-width: 0; }
.panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: #fffdf9; box-shadow: var(--shadow); }
.panel > :first-child { margin-top: 0; }
.quick-link { display: block; padding: .8rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.quick-link strong, .quick-link small { display: block; }
.quick-link small { color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.page-heading h1 { margin-bottom: 0; }
.page-heading .result-count { margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin: 0 0 1.2rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-deep); }
.filter-field { display: grid; gap: .25rem; min-width: 170px; }
.filter-field label { color: var(--muted); font-size: .8rem; font-weight: 700; }
.filter-field input, .filter-field select { min-height: 2.5rem; padding: .45rem .65rem; border: 1px solid #cdbba8; border-radius: 8px; color: var(--ink); background: #fffdf9; font: inherit; }
.checkbox-field { display: flex; align-items: center; gap: .45rem; min-height: 2.5rem; color: var(--ink); }
.checkbox-field input { width: 1.1rem; height: 1.1rem; accent-color: var(--orange); }
.clear-button, .page-button, .sort-button { font: inherit; cursor: pointer; }
.clear-button { min-height: 2.5rem; padding: .45rem .8rem; border: 1px solid var(--orange); border-radius: 8px; color: var(--orange-dark); background: transparent; }
.clear-button:hover { color: #fff; background: var(--orange); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9; box-shadow: var(--shadow); }
.table-host, .table-wrap { width: 100%; min-width: 0; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.data-table th, .data-table td { padding: .72rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); background: var(--paper-deep); font-size: .82rem; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fff8ef; }
.data-table .highlight-row td { background: var(--orange-soft); }
.data-table .highlight-row td:first-child { border-left: 4px solid var(--orange); }
.sort-button { padding: 0; border: 0; color: inherit; background: transparent; font-weight: 800; text-align: left; }
.sort-marker { color: var(--orange); font-weight: 900; }
.link-list { display: flex; flex-wrap: wrap; gap: .25rem .65rem; }
.tag { display: inline-block; padding: .1rem .45rem; border-radius: 999px; color: var(--orange-dark); background: var(--orange-soft); font-size: .8rem; white-space: nowrap; }
.muted { color: var(--muted); }
.source-note { margin-top: .8rem; color: var(--muted); font-size: .85rem; }
.empty-cell { padding: 2rem !important; color: var(--muted); text-align: center !important; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.result-count { color: var(--muted); font-size: .9rem; }
.page-buttons { display: flex; gap: .25rem; align-items: center; }
.page-button { min-width: 2.25rem; min-height: 2.25rem; border: 1px solid var(--line); border-radius: 7px; color: var(--orange-dark); background: #fffdf9; }
.page-button:hover, .page-button.is-current { color: #fff; background: var(--orange); border-color: var(--orange); }
.page-ellipsis { padding: 0 .3rem; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 1rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin: .7rem 0 0; color: var(--muted); }
.detail-meta span { display: inline-flex; gap: .25rem; }
.callout { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid var(--orange); background: var(--orange-soft); }
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer-inner { padding: 1.5rem 0 2rem; color: var(--muted); font-size: .85rem; }
.footer-inner p { margin: .25rem 0; }
.source-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.error-page { padding: 3rem 0; text-align: center; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: .8rem 0; }
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .site-nav a { flex: 0 0 auto; }
  .site-main { width: calc(100% - 1rem); padding-top: 1.5rem; }
  .quick-grid, .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .filters { align-items: stretch; flex-direction: column; }
  .filter-field { min-width: 0; }
  .pager { align-items: flex-start; flex-direction: column; }
  .data-table { min-width: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
