:root {
  --paper: #ffffff;
  --on-color: #ffffff;
  --paper-sticky: rgba(255, 255, 255, 0.98);
  --ink: #101a2d;
  --muted: #526174;
  --teal: #006d70;
  --teal-hover: #004f52;
  --teal-active: #00595c;
  --teal-soft: #e6f2f2;
  --blue: #315c8c;
  --blue-soft: #e7eff8;
  --orange: #b54718;
  --orange-soft: #fff0e8;
  --green: #287d52;
  --green-soft: #e5f3eb;
  --red: #a33a3a;
  --red-soft: #f9e5e5;
  --line: #d9e1ea;
  --soft: #f5f7fa;
  --focus: #8f3f16;
  --backdrop: rgba(16, 26, 45, 0.45);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--teal-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -80px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-color);
}

.skip-link:focus {
  top: 12px;
}

.reading-progress {
  position: fixed;
  z-index: 1001;
  inset: 0 0 auto;
  height: 4px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-sticky);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 34px);
}

.top-nav a,
.text-version {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease-out;
}

.text-version {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.top-nav a:hover,
.text-version:hover {
  color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.toc-button,
.toc-dialog button {
  min-width: 48px;
  min-height: 46px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 16px/1 var(--sans);
  cursor: pointer;
}

.toc-button {
  display: none;
  padding: 0 16px;
}

.hero {
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  padding: clamp(70px, 8vw, 132px) 0 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.72fr);
  gap: clamp(52px, 8vw, 120px);
  align-items: end;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(46px, 5.5vw, 82px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 24px 0 0;
  color: var(--teal);
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 31px);
  line-height: 1.55;
}

.hero-context {
  max-width: 720px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 27px;
  background: var(--teal);
  color: var(--on-color);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease-out, transform 120ms ease-out;
}

.primary-action:hover {
  background: var(--teal-active);
  color: var(--on-color);
}

.primary-action:active {
  transform: translateY(1px);
}

.hero-thesis {
  padding: 22px 0 4px;
  border-top: 1px solid var(--teal);
}

.thesis-kicker {
  margin: 0 0 9px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-thesis h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.45;
}

.hero-thesis p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.evidence-rule {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.evidence-rule p {
  margin: 0;
  padding: 20px 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.evidence-rule p + p {
  border-left: 1px solid var(--line);
}

.evidence-rule strong {
  color: var(--ink);
}

.reading-paths {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto 96px;
}

.reading-paths-intro h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.45;
}

.reading-paths-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.reading-paths ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-paths li {
  border-top: 1px solid var(--teal);
}

.reading-paths a {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  padding: 14px 0 12px;
  color: var(--ink);
  text-decoration: none;
}

.reading-paths a:hover strong {
  color: var(--teal);
}

.reading-paths span {
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.reading-paths strong {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  transition: color 180ms ease-out;
}

.reading-paths small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.visual-key {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  width: min(1240px, calc(100% - 80px));
  margin: -30px auto 104px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.visual-key-intro h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.45;
}

.visual-key-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.visual-key ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.visual-key li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-content: start;
  column-gap: 10px;
  min-height: 78px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.visual-key-mark {
  position: relative;
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  justify-self: center;
}

.visual-key-mark::before {
  position: absolute;
  content: "";
}

.visual-key-mark--neutral {
  color: var(--muted);
}

.visual-key-mark--neutral::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.visual-key-mark--primary {
  color: var(--teal);
}

.visual-key-mark--primary::before {
  inset: 3px;
  border-radius: 50%;
  background: currentColor;
}

.visual-key-mark--comparison {
  color: var(--blue);
}

.visual-key-mark--comparison::before {
  inset: 8px 1px auto;
  height: 4px;
  background: currentColor;
}

.visual-key-mark--verified {
  color: var(--green);
}

.visual-key-mark--verified::before {
  inset: 3px;
  background: currentColor;
}

.visual-key-mark--assumption {
  color: var(--orange);
}

.visual-key-mark--assumption::before {
  left: 2px;
  top: 2px;
  width: 0;
  height: 0;
  border-right: 8px solid transparent;
  border-bottom: 15px solid currentColor;
  border-left: 8px solid transparent;
}

.visual-key-mark--risk {
  color: var(--red);
}

.visual-key-mark--risk::before {
  inset: 4px;
  background: currentColor;
  transform: rotate(45deg);
}

.visual-key strong {
  font-size: 15px;
  line-height: 1.45;
}

.visual-key small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.reading-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 940px);
  gap: 56px;
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
  align-items: start;
}

.desktop-toc-inner {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  max-height: calc(100vh - var(--header-height) - 52px);
  overflow-y: auto;
  padding: 0 18px 24px 0;
  scrollbar-width: thin;
}

.toc-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  margin: 0;
  border-left: 2px solid var(--line);
}

.toc-list a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  padding: 7px 0 7px 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.toc-list a span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.toc-list a:hover,
.toc-list a[aria-current="true"] {
  color: var(--teal);
}

.toc-list li:has(a[aria-current="true"]) {
  border-left-color: var(--teal);
}

.toc-download {
  display: block;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.report-body {
  min-width: 0;
  padding-bottom: 120px;
}

.report-body > p,
.report-body > h1,
.report-body > h2,
.report-body > h3,
.report-body > h4,
.report-body > ul,
.report-body > ol,
.report-body > blockquote,
.report-body > hr {
  max-width: 760px;
}

.report-body > h1 {
  margin: 122px 0 46px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.report-body > h1:first-of-type {
  margin-top: 0;
}

.report-body > h1[tabindex="-1"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 8px;
}

.report-body > h2 {
  margin: 70px 0 22px;
  color: var(--teal);
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.45;
}

.report-body > h3 {
  margin: 44px 0 14px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.5;
}

.report-body > h4 {
  margin: 34px 0 10px;
  font-size: 19px;
}

.report-body p {
  margin: 0 0 1.25em;
}

.report-body ul,
.report-body ol {
  margin-top: 0.4em;
  margin-bottom: 1.8em;
  padding-left: 1.55em;
}

.report-body li {
  margin: 0.48em 0;
}

.report-body blockquote {
  margin: 38px 0;
  padding: 24px 28px;
  border: 0;
  border-top: 2px solid var(--teal);
  background: var(--teal-soft);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.65;
}

.report-body blockquote p:last-child {
  margin-bottom: 0;
}

.report-body hr {
  margin: 78px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.report-body table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
}

.table-scroll {
  max-width: 100%;
  margin: 34px 0 52px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

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

.report-body thead th {
  border-top: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
}

.report-body tbody tr:nth-child(even) {
  background: var(--soft);
}

.mobile-table {
  display: none;
}

.report-figure {
  width: 100%;
  margin: 54px 0 74px;
  padding: 26px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chart-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.chart-link img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}

.chart-link:focus-visible {
  outline-offset: 8px;
}

.report-figure figcaption {
  max-width: 760px;
  margin-top: 20px;
}

.figure-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 4px solid currentColor;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.figure-status--verified {
  color: var(--green);
}

.figure-status--mixed {
  color: var(--teal);
}

.figure-status--assumption {
  color: var(--orange);
}

.figure-status--risk {
  color: var(--red);
}

.figure-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.figure-subtitle,
.figure-source,
.figure-caveat {
  display: block;
  font-size: 14px;
  line-height: 1.65;
}

.figure-subtitle {
  margin-bottom: 9px;
  color: var(--muted);
}

.figure-source {
  color: var(--muted);
}

.figure-caveat {
  color: var(--orange);
  font-weight: 600;
}

.figure-evidence {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.chart-description {
  max-width: 760px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dotted var(--line);
  font-size: 14px;
}

.chart-description summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.external-link::after {
  content: " ↗";
  font-size: 0.78em;
  text-decoration: none;
}

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

.chart-reading-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin: 12px 0 2px;
}

.chart-reading-guide > div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chart-reading-guide dt {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.chart-reading-guide dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.toc-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: 14px 14px auto auto;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.toc-dialog::backdrop {
  background: var(--backdrop);
}

.toc-dialog-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.toc-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
}

.toc-dialog nav {
  padding: 14px 20px 28px;
}

.toc-dialog .toc-list a {
  min-height: 44px;
  align-items: center;
  font-size: 15px;
}

.site-footer {
  margin-top: 40px;
  padding: 44px max(40px, calc((100% - 1240px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.site-footer p {
  margin: 0 0 10px;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-right: 16px;
}

.noscript {
  margin: 20px;
  padding: 14px;
  border: 2px solid var(--orange);
}

@media (max-width: 1080px) {
  .top-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-actions {
    grid-column: 2;
  }

  .js-enabled .toc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .desktop-toc {
    display: none;
  }

  .reading-layout {
    display: block;
    width: min(940px, calc(100% - 64px));
  }

  .reading-paths {
    display: block;
    width: min(940px, calc(100% - 64px));
  }

  .reading-paths-intro {
    max-width: 620px;
    margin-bottom: 26px;
  }

  .visual-key {
    display: block;
    width: min(940px, calc(100% - 64px));
  }

  .visual-key-intro {
    max-width: 620px;
    margin-bottom: 26px;
  }
}

@media (max-width: 900px) {
  .hero {
    display: block;
    width: min(720px, calc(100% - 64px));
    padding: 64px 0 62px;
  }

  .hero-thesis {
    max-width: 680px;
    margin-top: 50px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 17px;
    line-height: 1.85;
  }

  .site-header {
    min-height: var(--header-height);
    gap: 12px;
    padding: 0 18px;
  }

  .brand {
    max-width: 190px;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .text-version {
    display: none;
  }

  .hero {
    width: calc(100% - 40px);
    padding: 56px 0 50px;
    display: block;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 57px);
    line-height: 1.18;
  }

  .hero-title-zh {
    display: block;
  }

  .hero-title-mobile-line {
    display: block;
  }

  .hero-subtitle {
    margin-top: 20px;
    font-size: 22px;
  }

  .hero-context {
    margin-bottom: 28px;
    font-size: 15px;
  }

  .primary-action {
    width: 100%;
    min-height: 56px;
  }

  .hero-thesis {
    margin-top: 54px;
    padding-left: 0;
  }

  .hero-thesis h2 {
    font-size: 22px;
  }

  .evidence-rule {
    display: block;
    width: calc(100% - 40px);
    margin-bottom: 64px;
  }

  .reading-paths {
    width: calc(100% - 40px);
    margin-bottom: 72px;
  }

  .visual-key {
    width: calc(100% - 40px);
    margin-top: -24px;
    margin-bottom: 76px;
    padding-top: 24px;
  }

  .visual-key ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .visual-key li {
    min-height: 68px;
  }

  .reading-paths ol {
    display: block;
  }

  .reading-paths li + li {
    margin-top: 14px;
  }

  .reading-paths a {
    min-height: 0;
    padding: 14px 0 16px;
  }

  .evidence-rule p {
    padding: 14px 0;
  }

  .evidence-rule p + p {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .reading-layout {
    width: calc(100% - 40px);
  }

  .report-body > h1 {
    margin-top: 92px;
    padding-top: 18px;
    font-size: 34px;
  }

  .report-body > h2 {
    margin-top: 58px;
    font-size: 27px;
  }

  .report-body > h3 {
    margin-top: 38px;
    font-size: 22px;
  }

  .report-body blockquote {
    margin: 30px 0;
    padding: 20px;
    font-size: 21px;
  }

  .report-body hr {
    margin: 60px 0;
  }

  .table-scroll:not(.has-mobile-table) table {
    min-width: 680px;
  }

  .table-scroll.has-mobile-table {
    overflow: visible;
  }

  .table-scroll.has-mobile-table table {
    display: none;
  }

  .table-scroll.has-mobile-table .mobile-table {
    display: grid;
    gap: 22px;
    margin: 0;
  }

  .mobile-table-record {
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-table-record dl {
    margin: 0;
  }

  .mobile-table-record div {
    display: grid;
    grid-template-columns: minmax(105px, 0.8fr) 1.4fr;
    gap: 12px;
    padding: 7px 0;
  }

  .mobile-table-record dt {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-table-record dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
  }

  .report-figure {
    margin: 46px 0 62px;
    padding-top: 20px;
  }

  .figure-title {
    font-size: 17px;
  }

  .chart-description {
    font-size: 14px;
  }

  .chart-reading-guide {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-footer {
    padding: 36px 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #36465a;
    --line: #8796a8;
  }

  .report-figure,
  .visual-key,
  .reading-paths li,
  .visual-key li {
    border-color: var(--ink);
  }
}

@media (forced-colors: active) {
  .figure-status,
  .visual-key-mark {
    color: CanvasText;
  }

  .figure-status {
    border-left-color: CanvasText;
  }
}

@media print {
  .site-header,
  .reading-progress,
  .desktop-toc,
  .toc-dialog,
  .primary-action,
  .chart-description,
  .site-footer {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .hero,
  .evidence-rule,
  .reading-layout {
    width: 100%;
  }

  .hero {
    padding: 30px 0;
  }

  .report-body > h1,
  .report-body > h2,
  .report-figure {
    break-inside: avoid;
  }
}
