:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --paper: #fffef9;
  --ink: #18201d;
  --muted: #5f6b65;
  --line: #d9ded8;
  --accent: #0f766e;
  --accent-2: #b45309;
  --soft: #eaf4f1;
  --max: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.72;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(24, 32, 29, 0.12);
  background: rgba(247, 247, 243, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small { display: block; line-height: 1.2; }

.brand small { color: var(--muted); font-size: 12px; margin-top: 3px; }

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}

nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--accent); }

.hub, .article-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hub-hero {
  padding: clamp(48px, 8vw, 90px) 0 32px;
  max-width: 820px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 64px);
  max-width: 940px;
  overflow-wrap: anywhere;
}

.hub-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 18px 0 48px;
}

.proof-strip div {
  min-height: 92px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.proof-strip div:last-child { border-right: 0; }

.proof-strip strong {
  display: block;
  color: var(--accent);
  font-size: 24px;
}

.proof-strip span { color: var(--muted); font-size: 14px; }

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.meta-strip span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}

.toc {
  position: sticky;
  top: 76px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px;
  padding: 12px 0;
  background: rgba(247, 247, 243, 0.96);
  border-bottom: 1px solid var(--line);
}

.toc a {
  padding: 6px 9px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.authority-page {
  --max: 1120px;
}

.authority-hero {
  max-width: 980px;
}

.authority-section {
  max-width: 920px;
  margin: 0 0 54px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.authority-section h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3.2vw, 38px);
}

.authority-section h3 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.authority-section p,
.authority-section li {
  color: #2f3b37;
  font-size: 17px;
}

.answer-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  background: var(--soft);
}

.answer-panel h2 {
  font-size: clamp(28px, 3.5vw, 42px);
}

.section-label {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-note {
  margin: 18px 0;
  padding: 15px 16px;
  border-left: 4px solid var(--accent-2);
  background: #fff7e8;
  color: #3c3328;
}

.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 15px;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  background: #edf3ef;
  color: #22302b;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 10px;
}

.cluster-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.cluster-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.cluster-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.cluster-card h3 a:hover {
  color: var(--accent);
}

.cluster-card p {
  margin: 0;
  color: var(--muted);
}

.video-grid article {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px;
}

.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #111;
}

.video-grid h3 {
  margin-top: 12px;
}

.source-ledger {
  max-width: 1040px;
}

.topic-list, .method-note {
  padding: 20px 0 64px;
}

.topic-list > h2, .method-note h2 {
  margin-bottom: 18px;
  font-size: 26px;
}

.topic-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.topic-row h2 {
  font-size: 24px;
}

.topic-row h2 a {
  color: var(--ink);
  text-decoration: none;
}

.topic-row h2 a:hover { color: var(--accent); }

.topic-row p {
  color: var(--muted);
  margin: 10px 0 0;
}

.topic-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9ded8;
}

.topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 72px) 0 80px;
}

.article h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  margin-bottom: 18px;
}

.answer {
  padding: 18px 20px;
  background: var(--soft);
  border-left: 5px solid var(--accent);
  color: #24312d;
  font-size: 18px;
}

.video-card {
  margin: 28px 0 36px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.article-section {
  margin: 42px 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.article-section h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.article-section h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 21px;
}

.article-section p, .article-section li {
  color: #2f3b37;
}

.article-section ul {
  padding-left: 22px;
}

.faq-block details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 750;
}

.source-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
}

.related-links {
  margin-top: 50px;
}

.related-links h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.related-links > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-links a {
  display: block;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.related-links a:hover { border-color: var(--accent); }

.related-links span {
  display: block;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.draft-label {
  display: inline-block;
  padding: 6px 10px;
  background: #fff4d8;
  color: #684400;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(16px, 4vw, 44px) 42px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav { justify-content: flex-start; }

  .proof-strip {
    grid-template-columns: 1fr;
  }

  .proof-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topic-row {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .cluster-grid {
    grid-template-columns: 1fr;
  }

  .related-links > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  html,
  body {
    max-width: 100%;
  }

  .site-header {
    gap: 12px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  nav {
    width: 100%;
    gap: 10px 14px;
  }

  nav a {
    font-size: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: 31px;
    word-break: break-all;
  }

  .hub, .article-shell {
    width: min(calc(100% - 32px), var(--max));
  }

  .hub-hero {
    padding-top: 42px;
    max-width: 100%;
  }

  .hub-hero h1,
  .hub-hero p,
  .kicker,
  .cluster-card h3,
  .topic-row h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hub-hero p,
  .authority-section p,
  .authority-section li {
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  .meta-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .meta-strip span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .toc {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .toc a {
    text-align: center;
    width: 100%;
  }

  .answer-panel,
  .evidence-note {
    padding: 16px;
  }
}
