:root {
  color-scheme: light;
  --ink: #192a3c;
  --muted: #4d5c6c;
  --paper: #f5f6f8;
  --white: #fff;
  --line: #d6dee6;
  --night: #101c2c;
  --night-raised: #17283b;
  --cyan: #96e6ed;
  --teal: #075c72;
  --amber: #ffc38b;
  font-family: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
body { min-width: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
a { color: var(--teal); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #007997; outline-offset: 4px; }
.mast :focus-visible, .hero :focus-visible, .article-header :focus-visible { outline-color: var(--cyan); }
:target { scroll-margin-top: 1.25rem; }
.frame { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .13em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 1rem; left: 1rem; z-index: 4; background: var(--white); padding: .7rem 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }

.mast, .hero, .article-header { background: var(--night); color: #f5f9fc; }
.mast { border-bottom: 1px solid #334152; }
.mast-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; min-height: 4.6rem; }
.brand { display: flex; align-items: center; gap: .68rem; color: inherit; font-size: 1rem; font-weight: 800; letter-spacing: .03em; text-decoration: none; min-height: 44px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #466477; border-radius: 9px; color: var(--cyan); background: #192d40; }
.brand-mark svg, .search-button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mast nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .2rem 1.45rem; }
.mast nav a { color: #c2cfdb; display: grid; align-items: center; min-height: 44px; font-size: .92rem; text-decoration: none; position: relative; }
.mast nav a:hover, .mast nav a[aria-current] { color: var(--cyan); }
.mast nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 2px; height: 2px; background: var(--cyan); }
.search-button { min-height: 44px; padding: .42rem .76rem; display: flex; align-items: center; gap: .38rem; color: #f4f8fb; background: #223348; border: 1px solid #4c6276; border-radius: 7px; cursor: pointer; font-weight: 650; }
.search-button:hover { background: #304a62; }

.hero { background: radial-gradient(ellipse at 72% 30%, #203b50 0, var(--night) 60%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.7rem, 6vw, 5.25rem); }
.hero .eyebrow, .article-header .eyebrow { color: var(--cyan); margin-bottom: .9rem; }
.hero h1 { font-size: clamp(2.65rem, 5.35vw, 4.7rem); line-height: 1.13; letter-spacing: .035em; font-weight: 830; }
.hero-lead { margin-top: 1.3rem; max-width: 29rem; color: #d2deea; font-size: clamp(1rem, 1.55vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.hero-actions a { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; border-radius: 7px; padding: .6rem 1.15rem; text-decoration: none; font-weight: 780; }
.primary { color: #122938; background: var(--cyan); border: 1px solid var(--cyan); }
.primary:hover { background: #c0f5f8; }
.secondary { color: #f5f9fc; border: 1px solid #687e94; }
.secondary:hover { background: #263e55; }

.case-card { min-width: 0; background: var(--night-raised); border: 1px solid #426177; border-radius: 15px; padding: clamp(1rem, 2.55vw, 1.9rem); box-shadow: 0 16px 34px #07121e65; }
.case-meta { display: flex; align-items: center; justify-content: space-between; gap: .65rem; font-size: .77rem; font-weight: 760; letter-spacing: .07em; color: #c7d7e4; }
.case-meta span:first-child { border: 1px solid #55788c; padding: .12rem .55rem; border-radius: 4px; color: var(--cyan); }
.case-card h2 { margin-top: .65rem; font-size: clamp(1.18rem, 2vw, 1.55rem); letter-spacing: .025em; }
.chart-figure { margin: .75rem -.2rem .4rem; }
.case-chart { width: 100%; height: auto; display: block; }
.case-chart text { fill: #c6d6e4; font-size: 15px; font-variant-numeric: tabular-nums; }
.case-chart .value-label { fill: #f7fafc; font-size: 17px; font-weight: 730; }
.case-chart .grid-line { stroke: #4d657a; stroke-width: 1; }
.case-chart .low-line { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 5; }
.case-chart .trace { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.data-point, .low-point { stroke: var(--night-raised); stroke-width: 2; fill: var(--cyan); }
.low-point { fill: var(--amber); }
.case-card figcaption { display: grid; font-size: .83rem; gap: .5rem; color: #d0dce7; border-top: 1px solid #3e586d; padding-top: .8rem; }
.case-card a { width: fit-content; color: var(--cyan); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }

.safety { margin: 1.8rem 0 0; background: #fff3e5; border: 1px solid #e8cab0; border-left: 4px solid #9b4d1d; border-radius: 7px; padding: 1.15rem 1.35rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .65rem 1.05rem; }
.safety .eyebrow { color: #833b13; padding-top: .26rem; }
.safety h2 { font-size: 1.12rem; margin-bottom: .18rem; }
.safety p:not(.eyebrow) { color: #544b45; max-width: 42rem; }
.safety-links { display: grid; gap: .15rem; align-self: center; }
.safety-links a { color: #773a13; font-weight: 720; min-height: 44px; display: inline-flex; align-items: center; }
.directory { margin-block: clamp(2.7rem, 5vw, 4.25rem); }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .75rem 2rem; margin-bottom: 1.3rem; }
.section-heading .eyebrow, .evidence-link .eyebrow { color: var(--teal); }
.section-heading h2, .evidence-link h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.35; margin-top: .2rem; }
.section-heading > p { color: var(--muted); font-size: .92rem; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.chapter-group { border-top: 3px solid #376886; border-radius: 7px 7px 0 0; }
.chapter-group header { padding: .8rem .9rem; background: #e8eef4; min-height: 5rem; border-bottom: 1px solid var(--line); }
.chapter-group h3 { font-size: 1.08rem; }
.chapter-group header p, .chapter-group small { color: var(--muted); font-size: .83rem; }
.chapter-group ol { list-style: none; margin: 0; padding: 0; }
.chapter-group li { border-bottom: 1px solid var(--line); }
.chapter-group a { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; align-items: start; gap: .45rem; padding: .85rem .7rem; color: var(--ink); background: var(--white); text-decoration: none; }
.chapter-group a:hover { background: #edf5f8; color: var(--teal); }
.chapter-group small { display: block; margin-top: .17rem; }
.chapter-shortcuts { display: grid; border-bottom: 1px solid var(--line); background: #eaf1f6; padding: .3rem .85rem; }
.chapter-shortcuts a { display: flex; align-items: center; min-height: 44px; padding: .3rem 0; background: transparent; color: var(--teal); text-decoration: underline; font-size: .87rem; }
.chapter-shortcuts a + a { border-top: 1px solid var(--line); }
.chapter-number, .arrow { color: var(--teal); font-weight: 760; }
.chapter-number { font: 750 .82rem/1.9 ui-monospace, SFMono-Regular, monospace; }
.evidence-link { border-block: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1rem; padding-block: 1.35rem; margin-bottom: 3.25rem; }
.evidence-link p:not(.eyebrow) { margin-top: .35rem; color: var(--muted); }
.evidence-link a { font-weight: 780; min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; }

.article-header { padding: 1.2rem 0 clamp(1.8rem, 4vw, 3.15rem); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: center; font-size: .85rem; color: #c7d5e3; }
.breadcrumb a { color: var(--cyan); min-height: 44px; display: inline-flex; align-items: center; }
.article-header h1 { max-width: 53rem; font-size: clamp(1.9rem, 4.1vw, 3.1rem); line-height: 1.25; margin-top: .65rem; }
.article-header p:not(.eyebrow) { margin-top: .6rem; color: #d2dfeb; }
.article-header .eyebrow { margin: .55rem 0 0; }
.reading { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: start; gap: 1.65rem; padding-block: 1.7rem 3.2rem; }
.toc { position: sticky; top: 1rem; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.toc summary { cursor: pointer; font-weight: 780; min-height: 44px; padding: .55rem .85rem; }
.toc nav { max-height: calc(100dvh - 6rem); overflow: auto; border-top: 1px solid var(--line); }
.toc ol { list-style: none; padding: .35rem .85rem .7rem; margin: 0; }
.toc a { display: block; padding: .38rem 0; font-size: .86rem; line-height: 1.4; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc .level-3 { padding-left: .7rem; border-left: 1px solid var(--line); }
.prose { overflow-wrap: anywhere; min-width: 0; background: var(--white); padding: clamp(1.15rem, 3vw, 2.6rem); border: 1px solid var(--line); border-radius: 9px; font-size: 1.02rem; line-height: 1.82; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.4; padding-bottom: .42rem; border-bottom: 1px solid var(--line); margin: 2.15rem 0 .8rem; }
.prose h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); line-height: 1.45; margin: 1.65rem 0 .65rem; }
.prose h2:target, .prose h3:target { background: #e5f3f7; }
.prose p, .prose ul, .prose ol { margin: .8rem 0; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-block: .45rem; }
.prose li > ul { margin: .25rem 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, monospace; background: #edf1f6; border-radius: .25rem; padding: .08em .3em; font-size: .9em; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.1rem 0; border: 1px solid var(--line); border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 33rem; font-size: .91rem; line-height: 1.66; }
.prose :is(th, td) { text-align: start; vertical-align: top; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
.prose :is(th, td):not(:last-child) { border-right: 1px solid var(--line); }
.prose th { background: #e6eef4; }
.prose tbody tr:nth-child(even) { background: #f4f7fa; }
.prose tbody tr:last-child td { border-bottom: 0; }
.reading-end { display: flex; gap: 1.3rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 2.2rem; padding-top: .65rem; }
.reading-end a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 740; }
.not-found { padding-block: 3rem; }

.footer { background: #e7ecf1; color: #364a5e; border-top: 1px solid var(--line); font-size: .91rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.5rem; padding-block: 1.55rem; }
.footer p { margin-top: .2rem; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }
dialog { background: var(--white); color: var(--ink); border: 1px solid #9dafbf; border-radius: 11px; width: min(38rem, 100% - 1.5rem); max-height: 84dvh; padding: 1rem 1.2rem; box-shadow: 0 20px 70px #0005; }
dialog::backdrop { background: #101c2cb8; }
.search-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.search-head h2 { font-size: 1.28rem; }
.search-head button { width: 44px; height: 44px; font-size: 1.45rem; border: 1px solid var(--line); border-radius: 6px; background: #edf2f6; color: var(--ink); cursor: pointer; }
#search-input { width: 100%; min-height: 48px; border: 1px solid #7d92a6; border-radius: 6px; padding: .45rem .65rem; }
.search-status { margin: .7rem 0; color: var(--muted); font-size: .88rem; }
#search-results { list-style: none; margin: 0; padding: 0; }
#search-results a { display: block; border-top: 1px solid var(--line); padding: .65rem .3rem; text-decoration: none; overflow-wrap: anywhere; }
#search-results a:hover { background: #f0f6f8; }
#search-results small { display: block; color: var(--muted); margin-top: .15rem; }

@media (max-width: 949px) {
  .mast-inner { gap: 0 1rem; grid-template-columns: minmax(0, 1fr) auto; padding-top: .55rem; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 0 1.25rem; }
  .search-button { grid-column: 2; grid-row: 1; }
  .reading { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .toc { position: static; }
  .toc nav { max-height: 22rem; }
  .toc a { padding-block: .6rem; }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety { grid-template-columns: auto 1fr; }
  .safety-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: .15rem .9rem; }
}
@media (max-width: 660px) {
  .frame { width: calc(100% - 2rem); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.4rem); }
  .hero-lead { margin-top: .95rem; }
  .hero-actions { margin-top: 1.2rem; }
  .mast nav { gap: 0 .82rem; }
  .mast nav a { font-size: .82rem; }
  .safety { grid-template-columns: minmax(0, 1fr); padding: .85rem .95rem; gap: .25rem; }
  .safety-links { grid-column: auto; }
  .chapter-grid { grid-template-columns: minmax(0, 1fr); }
  .chapter-group header { min-height: 0; }
  .reading { padding-top: .95rem; }
  .prose { padding: 1rem; }
  .table-scroll::before { content: "比較表可左右滑動"; display: block; padding: .35rem .65rem; font-size: .78rem; color: var(--muted); background: #f1f5f8; }
}
@media print {
  .mast, .footer, .toc, dialog, .skip, .reading-end, .hero-actions { display: none !important; }
  .frame { width: 100%; }
  .article-header, .prose { background: #fff; color: #111; border: 0; padding: 0; }
  .article-header .eyebrow, .article-header p:not(.eyebrow) { color: #333; }
  .reading { display: block; }
  .table-scroll { overflow: visible; }
  .prose table { min-width: 0; }
  .prose :is(h2, h3) { break-after: avoid; }
}
