:root {
  color-scheme: light;
  --ink: #002b49;
  --muted: #364151;
  --blue: #00558c;
  --bright: #0086bf;
  --deep: #002b49;
  --paper: #f8fcff;
  --line: #d1dae5;
  --sky: #e7f6ff;
  --serif: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  font-family: var(--sans);
  font-size: 100%;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-underline-offset: .25em; }
img { display: block; width: 100%; height: auto; }
p, h1, h2, h3, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.site-footer :focus-visible { outline-color: #bce9ff; }
.shell { width: min(1160px, 100% - 80px); margin-inline: auto; }
.skip { position: absolute; top: .75rem; left: .75rem; z-index: 5; transform: translateY(-180%); padding: .55rem 1rem; background: white; }
.skip:focus { transform: none; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand-mark {
  flex: 0 0 55px;
  width: 55px;
  aspect-ratio: 47 / 52;
  overflow: hidden;
}
.brand-mark img { width: 145%; margin-left: -22.5%; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.32rem; letter-spacing: .045em; line-height: 1.3; }
.brand small { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.header-nav, .site-footer nav { display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2.1rem); }
.header-nav a, .site-footer a { text-decoration: none; font-weight: 700; font-size: .94rem; white-space: nowrap; }
.header-nav a { font-size: 1rem; }
.header-nav a:hover, .site-footer a:hover { text-decoration: underline; }
.official-link { border: 1px solid #adc7db; padding: .62rem 1.05rem; border-radius: 5px; color: var(--blue); }

.hero {
  background: #fff;
  color: var(--deep);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(24px, 4vw, 54px);
  padding-block: 33px 22px;
}
.hero h1 { font: 700 clamp(2rem, 4.65vw, 3.75rem)/1.15 var(--serif); letter-spacing: .025em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1::after { content: ""; display: block; width: 4rem; border-bottom: 3px solid var(--bright); margin-top: 1rem; }
.hero-intro { color: var(--muted); font-size: 1.05rem; margin: .85rem 0 1.2rem; line-height: 1.7; }
.button { width: fit-content; display: inline-flex; align-items: center; min-height: 45px; padding: .58rem 1.12rem; border: 1px solid transparent; border-radius: 5px; font-weight: 700; line-height: 1.45; text-decoration: none; }
.button:hover { text-decoration: underline; }
.button-blue { color: #fff; background: var(--blue); }
.button-blue:hover { background: var(--deep); }
.hero-action { display: grid; grid-template-columns: max-content minmax(0, 1fr); row-gap: 4px; }
.hero-action .button { grid-area: 1 / 1; }
.hero-action::before, .hero-action::after { content: ""; height: 4px; }
.hero-action::before { grid-area: 2 / 1; margin-top: 1.15rem; background: #0083c2; }
.hero-action::after { grid-area: 3 / 1 / 4 / -1; background: #0a548b; }
.mascot-stage {
  justify-self: center;
  width: min(100%, 288px);
}
.mascot-stage img { transition: transform .24s ease; }
@media (hover: hover) {
  .mascot-stage:hover img { transform: translateY(-3px) rotate(-2deg); }
}

.library { padding-block: 52px 72px; }
.topic-library { padding-top: 60px; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.3rem; }
.library-heading h1, .library-heading h2, .related h2, .missing h1 { font: 700 clamp(1.95rem, 3.5vw, 2.9rem)/1.2 var(--serif); letter-spacing: .025em; }
#article-count { color: var(--muted); margin-top: .35rem; font-size: .9rem; }
.search { display: flex; position: relative; align-items: center; width: min(280px, 100%); }
.search-icon { position: absolute; left: 1rem; width: .78rem; height: .78rem; border-radius: 100%; border: 1.6px solid var(--blue); pointer-events: none; }
.search-icon::after { content: ""; width: .4rem; height: 1.5px; position: absolute; transform: rotate(45deg); top: .6rem; left: .5rem; background: var(--blue); }
.search input { width: 100%; border: 1px solid #adc7db; border-radius: 5px; background: #fff; padding: .65rem .8rem .65rem 2.4rem; font: inherit; color: var(--ink); min-height: 45px; }
.search input::placeholder { color: #526378; }
.topics { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1.45rem; }
.topics a {
  padding: .46rem .9rem;
  border: 1px solid #adc7db;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: .94rem;
  font-weight: 700;
  text-decoration: none;
}
.topics a:hover { border-color: var(--bright); background: var(--sky); }
.topics a[aria-current] { background: var(--blue); color: #fff; border-color: var(--blue); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card { min-width: 0; }
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s;
}
.card-link:hover { border-color: var(--bright); box-shadow: 0 6px 22px rgb(0 43 73 / 9%); }
.card-link:hover h3 { text-decoration: underline; }
.card-image img { aspect-ratio: 1.95; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.25rem; }
.card-meta, .article-meta { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; color: var(--blue); font-size: .86rem; font-weight: 700; }
.draft { border: 1px solid #bdddf0; background: var(--sky); color: var(--deep); border-radius: 4px; padding: .08rem .42rem; }
.card-body h3 { margin-top: .42rem; font: 700 1.37rem/1.5 var(--serif); }
.card-body p { margin: .43rem 0 .85rem; color: var(--muted); line-height: 1.7; }
.card-footer { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: auto; }
.read-more { font-size: .9rem; color: var(--blue); font-weight: 700; }
.empty { padding: 2rem 1rem; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-align: center; }

.article-shell {
  --article-font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  padding-block: 28px 70px;
  font-family: var(--article-font);
}
.breadcrumbs { display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: var(--muted); }
.article-text, .related { max-width: 980px; margin-inline: auto; }
.article-heading { padding-block: 2rem 1.6rem; }
.article-title { display: grid; grid-template-columns: minmax(0, 1fr) clamp(74px, 15vw, 160px); align-items: center; gap: clamp(.5rem, 2vw, 1.4rem); }
.article-title-mascot { aspect-ratio: 1; object-fit: contain; }
.publication-date { color: var(--muted); font-size: .8rem; line-height: 1.35; white-space: nowrap; }
.article-title-aside .publication-date { display: block; margin-top: .2rem; text-align: center; }
.publication-date small { display: block; font-size: .72rem; }
.category-label { color: var(--blue); font-size: .91rem; font-weight: 700; letter-spacing: .1em; margin-bottom: .65rem; }
.article-heading h1 { font: 700 clamp(1.8rem, 4vw, 2.85rem)/1.27 var(--article-font); letter-spacing: .017em; overflow-wrap: anywhere; }
.article-summary { max-width: 46em; color: var(--muted); font-size: clamp(1.03rem, 2.2vw, 1.2rem); margin-top: .85rem; }
.article-meta { margin-top: 1rem; }
.detail-image { width: min(92%, 690px); margin-inline: auto; border-radius: 8px; overflow: hidden; }
.detail-image img { aspect-ratio: 2.35; object-fit: cover; }
.article-text { padding-top: 1.45rem; }
.article-text section { margin-top: 1.45rem; }
.article-text h2 { font: 700 1.42rem/1.5 var(--article-font); margin-bottom: .45rem; }
.article-text p, .article-text li { color: var(--muted); line-height: 1.9; font-size: 1.05rem; }
.article-text ul { padding-left: 1.3rem; margin: 0; }
.article-emphasis { color: #a12626; }
.article-text section > p + ul { margin-top: .45rem; }
.article-table { width: 100%; margin-block: .9rem .5rem; border-collapse: collapse; table-layout: fixed; background: #fff; }
.article-table caption { padding-bottom: .4rem; color: var(--ink); font-weight: 700; text-align: left; }
.article-table th, .article-table td { border: 1px solid var(--line); padding: .65rem .85rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.article-table thead th { background: var(--deep); color: #fff; text-align: center; }
.article-table thead th:first-child { width: 26%; }
.article-table thead th:nth-child(2):nth-last-child(2) { width: 48%; }
.article-table tbody th { background: var(--sky); }
.article-table td { color: var(--muted); }
@media (min-width: 900px) {
  .table-citation-compact { letter-spacing: -.065em; }
}
.table-note { margin-top: 1rem; }
.table-note-label { display: block; }
.table-note-link { margin-inline-start: .25em; font-size: .78em; }
.table-note-link a, .article-table a { color: var(--blue); }
.table-note-scroll { overflow-x: auto; }
.table-note-scroll .article-table { min-width: 35rem; }
.table-note-scroll .article-table thead th:first-child { width: 22%; }
.table-note-scroll .article-table thead th:nth-child(2) { width: 34%; }
.table-note-threshold { display: block; white-space: nowrap; }
.table-note-scroll-hint { display: none; }
@media (max-width: 680px) {
  .table-note-scroll .article-table thead th:nth-child(2) { width: 39%; }
}
@media (max-width: 610px) {
  .table-note-scroll-hint { display: block; margin-top: .4rem; font-size: .9rem; }
}
.sources { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.sources a { overflow-wrap: anywhere; }
.contact-box { margin-top: 1.85rem; padding: 1.1rem 1.25rem; border-radius: 6px; background: var(--sky); display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.contact-intro { display: flex; align-items: center; gap: .8rem; }
.contact-mascot { flex: 0 0 64px; border-radius: 50%; background: #fff; overflow: hidden; }
.contact-box strong { font-size: 1.12rem; }
.contact-box p { font-size: .94rem; }
.related { margin-top: 2.9rem; }
.related h2 { font-family: var(--article-font); font-size: 1.65rem; }
.related ul { list-style: none; padding: 0; margin: .75rem 0 0; border-top: 1px solid var(--line); }
.related a { display: grid; gap: .22rem; border-bottom: 1px solid var(--line); padding-block: .8rem; text-decoration: none; }
.related a:hover strong { text-decoration: underline; }
.related a span { color: var(--blue); font-size: .85rem; }
.missing { padding-block: 64px; }
.missing p { margin: .8rem 0 1rem; }
.site-footer { background: var(--deep); color: #fff; }
.footer-inner { padding-block: 27px; }
.footer-inner strong { font-size: 1.15rem; }
.footer-inner p { color: var(--sky); font-size: .9rem; }

@media (max-width: 860px) {
  .shell { width: calc(100% - 48px); }
  .hero-inner { gap: 1.6rem; padding-block: 30px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 73px; gap: .65rem; }
  .brand { gap: .52rem; }
  .brand-mark { flex-basis: 40px; width: 40px; }
  .brand strong { font-size: 1.11rem; }
  .brand small { font-size: .79rem; }
  .header-nav a:first-child { display: none; }
  .header-nav a { font-size: .86rem; }
  .official-link { padding: .4rem .52rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 27px 23px; }
  .hero h1 { font-size: clamp(1.85rem, 8.4vw, 3.15rem); }
  .hero-intro { margin: .75rem 0 1rem; font-size: 1rem; }
  .mascot-stage { width: min(80%, 205px); }
  .library { padding-block: 35px 50px; }
  .library-heading { align-items: stretch; flex-direction: column; gap: .65rem; }
  .search { width: 100%; }
  .topics { gap: .43rem; }
  .topics a { padding-inline: .65rem; font-size: .88rem; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-shell { padding-top: 19px; padding-bottom: 42px; }
  .article-heading { padding-block: 1.35rem; }
  .article-title { grid-template-columns: minmax(0, 1fr) clamp(88px, 17vw, 105px); }
  .article-title-aside .publication-date { font-size: .69rem; }
  .publication-date small { font-size: .66rem; }
  .article-heading h1 { font-size: clamp(1.55rem, 6.7vw, 2.15rem); }
  .article-table th, .article-table td { padding: .5rem .55rem; }
  .article-table thead th:first-child { width: 31%; }
  .article-table thead th:first-child:nth-last-child(3) { width: 24%; }
  .detail-image img { aspect-ratio: 1.8; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card-link, .mascot-stage img { transition: none; }
  .mascot-stage:hover img { transform: none; }
}
