:root {
  --ink: #1b1e1f;
  --ink-soft: #4c5353;
  --charcoal: #15191a;
  --charcoal-2: #242a2b;
  --paper: #f5f7f4;
  --surface: #ffffff;
  --line: #c9cfcb;
  --line-dark: #3c4445;
  --green: #267a54;
  --green-soft: #dcece3;
  --yellow: #e6b938;
  --yellow-soft: #f8edc8;
  --red: #a84337;
  --content: 1180px;
  --reading: 820px;
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8.5rem;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

body,
button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.report-article a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

button,
select,
input {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: #fff;
  background: var(--charcoal);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  background: transparent;
}

.reading-progress::-webkit-progress-bar {
  background: transparent;
}

.reading-progress::-webkit-progress-value,
.reading-progress::-moz-progress-bar {
  background: var(--yellow);
}

.site-header {
  position: relative;
  z-index: 50;
  color: #f5f7f4;
  background: var(--charcoal);
  border-bottom: 1px solid var(--line-dark);
}

.report-tabs,
.publication-bar {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
}

.report-tabs {
  min-height: 4.2rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  text-decoration: none;
}

.wordmark span {
  color: #aeb8b5;
  font-size: 0.72rem;
  font-weight: 600;
}

.report-tabs nav {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}

.report-tabs nav a,
.report-tab-future {
  min-width: 12rem;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  border-inline-start: 1px solid var(--line-dark);
  font-size: 0.82rem;
  line-height: 1.3;
  text-decoration: none;
}

.report-tabs nav a[aria-current="page"] {
  color: var(--charcoal);
  background: var(--yellow);
}

.report-tab-future {
  color: #7f8988;
  border-inline-end: 1px solid var(--line-dark);
}

.publication-bar {
  min-height: 3.1rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
  border-top: 1px solid var(--line-dark);
}

.publication-status,
.publication-nav,
.language-control {
  display: flex;
  align-items: center;
}

.publication-status {
  gap: 1rem;
  color: #b9c2c0;
  font-size: 0.75rem;
}

.publication-status b {
  color: #fff;
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-live i,
.evidence-line i {
  width: 0.55rem;
  height: 0.55rem;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.publication-nav a {
  padding: 0.78rem 0.9rem;
  color: #d9dddc;
  font-size: 0.82rem;
  text-decoration: none;
}

.publication-nav a[aria-current="page"] {
  color: #fff;
  box-shadow: inset 0 -3px var(--yellow);
}

.language-control {
  border: 1px solid #596262;
  border-radius: 4px;
  overflow: hidden;
}

.language-control a {
  min-width: 2.6rem;
  padding: 0.25rem 0.55rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
}

.language-control a[aria-current="page"] {
  color: var(--charcoal);
  background: #fff;
}

.translation-notice {
  padding: 0.7rem max(1rem, calc((100% - var(--content)) / 2));
  display: flex;
  gap: 1rem;
  color: #3b3420;
  background: var(--yellow-soft);
  border-bottom: 1px solid #d5bd6a;
  font-size: 0.85rem;
}

.section-nav {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: 3.25rem;
  display: flex;
  justify-content: center;
  color: #eef1ef;
  background: var(--charcoal-2);
  border-bottom: 1px solid #3d4646;
}

.section-nav-toggle {
  display: none;
}

.section-nav > div {
  width: min(100% - 2rem, var(--content));
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.section-nav a {
  padding: 0.7rem 1rem;
  color: #c9d0ce;
  font-size: 0.8rem;
  text-decoration: none;
  border-inline-start: 1px solid #3d4646;
}

.section-nav a:hover {
  color: #fff;
  background: #303737;
}

.section-band {
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.section-inner,
.record-inner {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 4rem 0;
}

.eyebrow,
.report-kicker,
.conclusion-index,
.option-id,
.source-id {
  margin: 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 20ch;
  font-size: 3rem;
}

.report-overview {
  background: var(--surface);
}

.report-overview .section-inner {
  padding-top: 3.4rem;
}

.report-kicker {
  margin-bottom: 1.2rem;
  display: flex;
  gap: 1.4rem;
  color: var(--ink-soft);
}

.report-deck,
.page-deck {
  max-width: 58rem;
  margin: 1.4rem 0;
  color: var(--ink-soft);
  font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 1.08rem;
}

.evidence-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.evidence-line span {
  padding: 0.35rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.78rem;
}

.evidence-line .evidence-watch i {
  background: var(--yellow);
}

.conclusion-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.conclusion-grid section {
  min-height: 14rem;
  padding: 1.5rem;
  border-inline-start: 1px solid var(--line);
}

.conclusion-grid section:first-child {
  border-inline-start: 0;
}

.conclusion-grid h2 {
  margin: 1rem 0 0.8rem;
  font-size: 1.35rem;
}

.conclusion-grid p:last-child {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section-heading {
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr);
  gap: 3rem;
  align-items: end;
}

.section-heading h2,
.article-heading h2 {
  margin: 0.35rem 0 0;
  font-size: 2rem;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
}

.score-explorer {
  background: #edf1ee;
}

.weight-toolbar {
  padding: 1.25rem 0 1.5rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.weight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.5rem;
}

.weight-grid label > span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.weight-grid output {
  min-width: 3.5rem;
  text-align: end;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.command-button,
.section-nav-toggle {
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.weight-toolbar .command-button {
  margin-top: 1rem;
}

.score-chart {
  min-height: 28rem;
  padding-top: 2rem;
}

.scenario-ranking {
  margin-bottom: 2.25rem;
}

.scenario-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}

.scenario-heading h3 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

.scenario-heading span {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.table-scroll {
  overflow-x: auto;
}

.table-scroll table {
  min-width: 42rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.82rem;
}

th,
td {
  padding: 0.7rem 0.75rem;
  vertical-align: top;
  text-align: start;
  border-bottom: 1px solid var(--line);
}

thead th {
  color: #edf0ef;
  background: var(--charcoal-2);
  font-size: 0.7rem;
  text-transform: uppercase;
}

tbody th {
  font-weight: 650;
}

.option-id,
.source-id {
  display: block;
  font-family: ui-monospace, "Cascadia Mono", monospace;
}

meter {
  width: 7rem;
  height: 0.55rem;
  display: block;
  accent-color: var(--green);
}

[data-score-value] {
  min-width: 4.5rem;
  display: block;
  font-variant-numeric: tabular-nums;
}

.evidence-grade {
  min-width: 2rem;
  padding: 0.12rem 0.4rem;
  display: inline-flex;
  justify-content: center;
  border-radius: 3px;
  font-weight: 800;
}

.grade-a,
.grade-b {
  color: #16593c;
  background: var(--green-soft);
}

.grade-c,
.grade-d {
  color: #604b0f;
  background: var(--yellow-soft);
}

.score-exclusions {
  border-top: 1px solid var(--ink);
}

.score-exclusions summary {
  padding: 1rem 0;
  font-weight: 700;
  cursor: pointer;
}

.timeline {
  color: #f1f3f1;
  background: var(--charcoal);
}

.timeline .eyebrow {
  color: var(--yellow);
}

.timeline-switch {
  display: inline-flex;
  border: 1px solid #596261;
  border-radius: 4px;
  overflow: hidden;
}

.timeline-switch button {
  min-width: 8.5rem;
  padding: 0.65rem 1rem;
  color: #dce1df;
  background: transparent;
  border: 0;
  border-inline-start: 1px solid #596261;
  cursor: pointer;
}

.timeline-switch button:first-child {
  border-inline-start: 0;
}

.timeline-switch button[aria-selected="true"] {
  color: var(--charcoal);
  background: var(--yellow);
}

.timeline-stage {
  min-height: 20rem;
  padding-top: 2.5rem;
}

.timeline-stage > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #5b6463;
}

.timeline-route {
  min-height: 12rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-inline-start: 1px solid #5b6463;
}

.timeline-route:first-child {
  border-inline-start: 0;
}

.timeline-route span {
  color: #aab3b1;
  font-size: 0.72rem;
}

.timeline-route strong {
  max-width: 18rem;
  font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 1.25rem;
}

.detailed-report {
  background: var(--surface);
}

.report-article {
  width: min(100% - 2rem, var(--reading));
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.article-heading {
  margin-bottom: 3rem;
  padding-bottom: 1.2rem;
  border-bottom: 3px solid var(--ink);
}

.report-article h2 {
  margin-top: 3.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ink);
}

.report-article h3 {
  margin-top: 2.2rem;
}

.report-article p,
.report-article li {
  font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
}

.report-article blockquote {
  margin-inline: 0;
  padding: 1rem 1.2rem;
  background: var(--yellow-soft);
  border-inline-start: 4px solid var(--yellow);
}

.report-article pre,
.report-article code,
.manifest-command code {
  font-family: ui-monospace, "Cascadia Mono", monospace;
}

.report-article pre {
  overflow-x: auto;
  padding: 1rem;
  color: #eef1ef;
  background: var(--charcoal-2);
}

.library-intro,
.downloads-intro {
  background: var(--surface);
}

.source-filters {
  padding: 1rem 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.source-filters label > span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.source-filters select {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.5rem;
  background: var(--surface);
  border: 1px solid #929b98;
  border-radius: 4px;
}

.source-filters .check-filter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.source-filters .check-filter span {
  margin: 0;
}

.source-filters .command-button {
  align-self: end;
}

.library-result-line {
  padding: 1rem 0;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

.library-result-line strong {
  min-width: 3ch;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.source-table {
  min-width: 920px;
}

.source-table th:nth-child(2) {
  width: 38%;
}

.source-table small,
.download-row small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 400;
}

.availability {
  color: #6c5b28;
}

.availability.available {
  color: var(--green);
  font-weight: 700;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button img {
  width: 1.1rem;
  height: 1.1rem;
}

.source-record {
  background: var(--surface);
}

.record-inner {
  max-width: 980px;
}

.record-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--ink);
}

.record-heading h1 {
  max-width: 26ch;
  margin-top: 0.45rem;
  font-size: 2.35rem;
}

.record-original {
  color: var(--ink-soft);
  font-style: italic;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.record-grid div {
  min-height: 7rem;
  padding: 1rem;
  border-inline-start: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.record-grid div:nth-child(3n + 1) {
  border-inline-start: 0;
}

dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0.4rem 0 0;
}

.record-narrative {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--green-soft);
  border-inline-start: 4px solid var(--green);
}

.record-narrative h2,
.record-columns h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.record-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.record-columns section {
  padding: 1.5rem 0;
}

.record-columns section + section {
  padding-inline-start: 1.5rem;
  border-inline-start: 1px solid var(--line);
}

.record-links {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.command-link {
  padding: 0.55rem 0.75rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.manifest-command {
  margin-top: 2rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.manifest-command code {
  margin-inline-end: auto;
}

.download-list {
  border-top: 2px solid var(--ink);
}

.download-row {
  min-height: 4rem;
  padding: 0.7rem 0;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto 2.5rem;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.download-row > img {
  width: 1.2rem;
}

.download-row strong {
  overflow-wrap: anywhere;
}

.source-drawer {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 0 0 0 auto;
  padding: 1.5rem;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-inline-start: 1px solid var(--line-dark);
}

.source-drawer::backdrop {
  background: rgb(16 20 20 / 72%);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-drawer h2 {
  font-size: 1.55rem;
}

.drawer-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.drawer-facts div {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  padding: 2rem max(1rem, calc((100% - var(--content)) / 2));
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: #bdc5c3;
  background: var(--charcoal);
  font-size: 0.75rem;
}

.site-footer p {
  max-width: 44rem;
  margin: 0.35rem 0 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .report-tabs {
    display: block;
  }

  .wordmark {
    min-height: 3rem;
  }

  .report-tabs nav a,
  .report-tab-future {
    min-width: 10rem;
  }

  .publication-bar {
    grid-template-columns: 1fr auto;
    padding: 0.5rem 0;
  }

  .publication-status {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .section-nav {
    display: block;
    padding: 0.45rem 1rem;
  }

  .section-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #fff;
    border-color: #65706e;
  }

  .section-nav-toggle img {
    width: 1rem;
    filter: invert(1);
  }

  .section-nav > div {
    width: 100%;
    padding-top: 0.4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .section-nav[data-collapsed="true"] > div {
    display: none;
  }

  .conclusion-grid,
  .timeline-stage > div,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .conclusion-grid section,
  .timeline-route,
  .record-grid div,
  .record-grid div:nth-child(3n + 1) {
    min-height: auto;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .weight-grid,
  .source-filters {
    grid-template-columns: 1fr 1fr;
  }

  .source-drawer {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border: 0;
    border-top: 3px solid var(--yellow);
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.15rem;
  }

  .publication-nav a {
    padding-inline: 0.55rem;
  }

  .publication-status span:nth-child(2) {
    display: none;
  }

  .section-inner,
  .record-inner {
    padding: 2.75rem 0;
  }

  .weight-grid,
  .source-filters,
  .record-columns,
  .drawer-facts {
    grid-template-columns: 1fr;
  }

  .record-columns section + section {
    padding-inline-start: 0;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .timeline-switch {
    width: 100%;
  }

  .timeline-switch button {
    min-width: 0;
    flex: 1;
    padding-inline: 0.35rem;
    font-size: 0.75rem;
  }

  .manifest-command {
    flex-wrap: wrap;
  }

  .manifest-command code {
    width: 100%;
  }

  .download-row {
    grid-template-columns: 1.25rem minmax(0, 1fr) 2.5rem;
  }

  .download-row > a {
    grid-column: 2;
  }

  .site-footer {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
