:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #15212e;
  --muted: #566579;
  --rule: #d6dde4;
  --accent: #b3122e;
  --wrap: 68rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #2b59c3; outline-offset: 2px; border-radius: 2px; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .25rem 1.5rem;
  padding: .7rem max(1.25rem, calc((100vw - var(--wrap)) / 2));
  background: rgba(244,246,248,.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; border-radius: 50%; background: var(--accent); }
.top nav { display: flex; gap: 1.25rem; }
.top nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .1rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { border-bottom-color: var(--accent); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem 3rem; }

.hero { padding: 3rem 0 1.5rem; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.3; margin: 0 0 1rem; letter-spacing: .01em; font-weight: 700; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 44rem; margin: 0 0 1.25rem; }

/* 導覽卡片與網格 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; margin: 2.2rem 0 2.5rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-2px); text-decoration: none; }
.card-badge { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; margin-bottom: .45rem; }
.card h2 { font-size: 1.35rem; margin: 0 0 .5rem; color: var(--ink); }
.card p { font-size: .95rem; color: var(--muted); margin: 0 0 1.25rem; line-height: 1.6; }
.card .cta { font-weight: 600; color: var(--accent); font-size: .95rem; display: inline-flex; align-items: center; gap: .3rem; }
.key { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; padding: 0; margin: .75rem 0 0; font-size: .875rem; color: var(--muted); }
.key li { display: inline-flex; align-items: center; gap: .4rem; }
.legend { font-size: .875rem; color: var(--muted); margin: .25rem 0 0; }

.strip-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .75rem .5rem .25rem; margin-top: 1.5rem; }
.strip { width: 100%; height: auto; display: block; }
.strip .lane { stroke: #e6ebf0; stroke-width: 1; }
.strip .tick { stroke: #eef1f4; stroke-width: 1; }
.strip .tl { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.strip .ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.strip .dot { cursor: pointer; }
.strip .dot:hover .pt, .strip .dot:focus-visible .pt { stroke: var(--ink); stroke-width: 2; }
.strip .dot.off { opacity: .12; }

.block { padding: 2.5rem 0 1rem; }
h2 { font-size: 1.6rem; line-height: 1.35; margin: 0 0 .5rem; }
.note { font-size: .95rem; color: var(--muted); max-width: 52rem; margin: 0 0 1.25rem; }
.note strong { color: var(--ink); }

/* 路線圖表格 */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; }
.road th, .road td { padding: .9rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); font-size: .95rem; line-height: 1.7; }
.road thead th { border-top: 0; font-size: .9rem; color: var(--muted); font-weight: 600; background: #eef2f5; }
.road tbody th { width: 13rem; font-weight: 700; }
.road td { min-width: 15rem; }
.theme { display: block; margin-bottom: .35rem; }
.mat { display: inline-block; font-size: .8rem; font-weight: 600; padding: 0 .55rem; border-radius: 999px; line-height: 1.6; }
.m-成熟 { background: #e2f0e0; color: #2c6127; }
.m-成長 { background: #e3eaf9; color: #1f4599; }
.m-研究 { background: #f3e5f7; color: #6a2f96; }

/* 歷史時間軸 */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.chip { font: inherit; font-size: .9rem; display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .8rem; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="false"] { color: var(--muted); background: transparent; text-decoration: line-through; }
.chip:hover { border-color: var(--ink); }
.sw { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: none; }

.dec { font-size: 1.05rem; color: var(--muted); font-weight: 600; margin: 2rem 0 0; padding-bottom: .4rem; border-bottom: 2px solid var(--ink); }
.entry { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--rule); }
.entry.hide, .dec.hide { display: none; }
.yr { font-size: 1.5rem; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.entry.same .yr { visibility: hidden; }
.entry :target, .entry:target { background: #fff6d6; }
.entry:target { outline: 6px solid #fff6d6; }
.cat { margin: 0 0 .1rem; font-size: .875rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.entry h4 { margin: 0 0 .25rem; font-size: 1.2rem; line-height: 1.5; }
.entry .body > p { margin: 0 0 .5rem; max-width: 46rem; }
.entry .body > p.cat { margin: 0 0 .1rem; }
.nobel { font-size: .95rem; color: var(--ink); display: flex; gap: .55rem; align-items: baseline; }
.ringicon { flex: none; width: .75rem; height: .75rem; border: 1.6px solid var(--ink); border-radius: 50%; transform: translateY(.1rem); }
.ref { font-size: .85rem; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }

/* 文章 */
.article { max-width: 46rem; padding-top: 2rem; }
.article h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.article h2 { font-size: 1.35rem; margin: 2.2rem 0 .5rem; }
.article p, .article li { max-width: 44rem; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li { margin: .3rem 0; }
.crumb { font-size: .9rem; margin: 0 0 .5rem; }
.artlist { list-style: none; padding: 0 !important; margin: 1.5rem 0 0; }
.artlist li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.artlist a { font-size: 1.2rem; font-weight: 700; }
.artlist p { margin: .2rem 0 0; color: var(--muted); }
table.plain { font-size: .95rem; }
table.plain th, table.plain td { text-align: left; padding: .7rem .9rem; border-top: 1px solid var(--rule); vertical-align: top; line-height: 1.65; }
table.plain thead th { border-top: 0; background: #eef2f5; color: var(--muted); font-size: .9rem; }
table.plain tbody th { font-weight: 700; white-space: nowrap; }
.article .table-wrap { max-width: none; margin: 1rem 0; }

.foot { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.25rem 3rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.foot p { margin: 0; }

@media (max-width: 760px) {
  .hero { padding-top: 2rem; }
  .road thead { position: absolute; left: -9999px; }
  .road, .road tbody, .road tr, .road th, .road td { display: block; width: auto; min-width: 0; }
  .road tr { padding: .5rem 0; border-top: 1px solid var(--rule); }
  .road tr:first-child { border-top: 0; }
  .road tbody th { width: auto; padding-bottom: .2rem; border-top: 0; }
  .road td { border-top: 0; padding-top: .35rem; padding-bottom: .35rem; }
  .road td::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
  .entry { grid-template-columns: 1fr; }
  .entry.same .yr { display: none; }
  .yr { font-size: 1.25rem; }
  table.plain thead { position: absolute; left: -9999px; }
  table.plain, table.plain tbody, table.plain tr, table.plain th, table.plain td { display: block; }
  table.plain tr { padding: .5rem 0; border-top: 1px solid var(--rule); }
  table.plain th, table.plain td { border-top: 0; padding: .15rem .9rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
