:root {
  --xb-red: #e94a16;
  --xb-red-dark: #a93613;
  --page: #fbfbfd;
  --surface: #ffffff;
  --sidebar: #f5f5f7;
  --ink: #1d1d1f;
  --text: #424245;
  --muted: #6e6e73;
  --subtle: #86868b;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --callout-bg: #fff7f4;
  --callout-line: #f0d5ca;
  --code-bg: #1d1d1f;
  --code-text: #f5f5f7;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --sidebar-width: 292px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--xb-red);
  text-decoration: none;
}

a:hover {
  color: var(--xb-red-dark);
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.report-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.report-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 28px 20px 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 9px;
  height: 28px;
  border-radius: 999px;
  background: var(--xb-red);
  flex: 0 0 auto;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.3;
}

.sidebar-report-meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  margin-bottom: 18px;
}

.sidebar-report-title {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.sidebar-report-detail {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.45;
}

.toc-search {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  margin-bottom: 22px;
  outline: none;
  font-size: 12px;
}

.toc-search:focus {
  border-color: var(--xb-red);
  box-shadow: 0 0 0 3px rgba(233, 74, 22, 0.12);
}

.toc-label {
  margin: 0 0 10px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}

.toc {
  display: grid;
  gap: 2px;
}

.toc-group {
  display: grid;
  gap: 2px;
}

.toc-link {
  display: block;
  border-radius: 7px;
  color: #424245;
  font-size: 13px;
  line-height: 1.45;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}

.toc-link:hover {
  background: #ececf1;
  color: var(--ink);
  text-decoration: none;
}

.toc-link.active {
  background: #e9e9ee;
  color: var(--xb-red);
  font-weight: 700;
}

.toc-link.depth-3 {
  margin-left: 15px;
  color: var(--muted);
  font-size: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.toc-link.depth-3.active {
  color: var(--xb-red);
}

.toc-empty {
  display: none;
  color: var(--subtle);
  font-size: 12px;
  padding: 8px;
}

.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.sidebar-action:hover {
  border-color: var(--xb-red);
  color: var(--xb-red);
  text-decoration: none;
}

.mobile-bar {
  display: none;
}

.report-main {
  min-width: 0;
  background: var(--surface);
}

.article-wrap {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 38px 48px 68px;
}

.breadcrumbs {
  margin-bottom: 20px;
  color: var(--subtle);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--subtle);
}

.report-hero {
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.accent-rule {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--xb-red);
  margin-bottom: 22px;
}

.report-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(31px, 3.35vw, 42px);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: 0;
}

.report-description {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 21px;
}

.meta-chip {
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
}

.meta-label {
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.4;
}

.meta-value {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.metric-section {
  margin-bottom: 28px;
}

.section-label {
  margin: 0 0 13px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.metric-value {
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1;
  font-weight: 750;
}

.metric-card.primary .metric-value {
  color: var(--xb-red);
}

.metric-label {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.5;
}

.conclusion-card {
  border: 1px solid var(--callout-line);
  border-radius: 10px;
  background: var(--callout-bg);
  padding: 17px 19px;
  margin: 0 0 30px;
}

.conclusion-title {
  margin: 0 0 6px;
  color: var(--xb-red-dark);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.conclusion-card p {
  margin: 0;
  color: #3f302b;
  font-size: 14px;
  line-height: 1.78;
}

.report-content {
  color: var(--text);
}

.report-content h2,
.report-content h3,
.report-content h4 {
  color: var(--ink);
  letter-spacing: 0;
}

.report-content h2 {
  margin: 38px 0 14px;
  padding-top: 2px;
  font-size: 26px;
  line-height: 1.24;
  font-weight: 740;
}

.report-content h2:first-child {
  margin-top: 0;
}

.report-content h3 {
  margin: 26px 0 11px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
}

.report-content h4 {
  margin: 24px 0 10px;
  font-size: 16px;
  line-height: 1.45;
}

.report-content p {
  margin: 12px 0;
}

.report-content strong {
  color: var(--ink);
  font-weight: 700;
}

.report-content ul,
.report-content ol {
  padding-left: 1.35em;
  margin: 12px 0;
}

.report-content li {
  margin: 5px 0;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.report-content table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}

.report-content th,
.report-content td {
  padding: 10px 12px;
  border-bottom: 1px solid #eeeef2;
  text-align: left;
  vertical-align: top;
}

.report-content th {
  background: var(--sidebar);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-content tr:last-child td {
  border-bottom: 0;
}

.report-content code {
  border: 1px solid #eeeef2;
  border-radius: 5px;
  background: #f5f5f7;
  color: var(--xb-red);
  padding: 0.12em 0.32em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.code-block {
  position: relative;
  margin: 14px 0 22px;
  border-radius: 9px;
  background: var(--code-bg);
  overflow: hidden;
}

.code-lang {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #b8b8bd;
  font-size: 11px;
}

.copy-code {
  border: 0;
  background: transparent;
  color: #d6d6dc;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
}

.copy-code:hover {
  color: #fff;
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
  padding: 15px 17px 18px;
}

.code-block code {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--code-text);
  padding: 0;
  font-size: 12px;
  line-height: 1.75;
}

.report-content blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--xb-red);
  border-radius: 0 8px 8px 0;
  background: var(--callout-bg);
  padding: 12px 16px;
  color: #3f302b;
}

.report-content blockquote p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 15;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--xb-red);
  color: var(--xb-red);
}

.drawer-backdrop {
  display: none;
}

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

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 251, 253, 0.88);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-brand .brand-mark {
    height: 22px;
  }

  .toc-toggle {
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 6px 11px;
    font-size: 12px;
    cursor: pointer;
  }

  .report-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(86vw, 320px);
    transform: translateX(-102%);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease;
  }

  body.toc-open .report-sidebar {
    transform: translateX(0);
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(0, 0, 0, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.toc-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .article-wrap {
    padding: 34px 20px 62px;
  }

  .report-meta-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Executive summary (总结) ===== */
.exec-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 22px 24px 24px;
  margin: 0 0 30px;
}

.exec-summary .section-label {
  color: var(--xb-red-dark);
  margin-bottom: 14px;
}

.exec-verdict {
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.exec-verdict li {
  position: relative;
  margin: 9px 0;
  padding-left: 16px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.75;
}

.exec-verdict li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xb-red);
}

.exec-verdict strong {
  color: var(--xb-red-dark);
  font-weight: 700;
}

.exec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.exec-block h4 {
  margin: 0 0 8px;
  color: var(--xb-red-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.exec-block p {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.72;
}

.exec-block ul {
  margin: 0;
  padding-left: 1.15em;
}

.exec-block li {
  margin: 5px 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.7;
}

.exec-block strong {
  color: var(--ink);
  font-weight: 700;
}

/* ===== Paged reading mode ===== */
.doc-mode-wrap {
  margin-top: 18px;
}

.doc-mode-label {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 10.5px;
  font-weight: 600;
}

.doc-mode {
  display: inline-flex;
  width: 100%;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.doc-mode button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.doc-mode button svg {
  flex: 0 0 auto;
}

.doc-mode button:hover {
  color: var(--ink);
}

.doc-mode button.active {
  background: #ececf1;
  color: var(--ink);
}

/* Collapsible TOC */
.toc-item {
  display: flex;
  align-items: center;
  gap: 2px;
}

.toc-item > .toc-link {
  flex: 1 1 auto;
  min-width: 0;
}

.toc-caret {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}

.toc-caret:hover {
  background: #ececf1;
  color: var(--ink);
}

.toc-caret svg {
  transition: transform 0.16s ease;
}

.toc-group.open > .toc-item .toc-caret svg {
  transform: rotate(90deg);
}

.toc-children {
  display: grid;
  gap: 2px;
}

.toc-group:not(.open) > .toc-children {
  display: none;
}

.toc.searching .toc-group > .toc-children {
  display: grid;
}

.doc-section {
  scroll-margin-top: 28px;
}

body.doc-paged .report-content > .doc-section {
  display: none;
}

body.doc-paged .report-content > .doc-section.active {
  display: block;
}

body.doc-paged .report-content > .doc-section > hr {
  display: none;
}

.doc-page-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

body.doc-paged .doc-page-nav {
  display: flex;
}

.doc-page-nav button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 44%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  cursor: pointer;
  line-height: 1.35;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease, color 0.18s ease;
}

.doc-page-nav button:hover:not(:disabled) {
  border-color: var(--xb-red);
  color: var(--xb-red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.doc-page-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.doc-page-nav .nav-arrow {
  flex: 0 0 auto;
  color: var(--xb-red);
}

.doc-page-nav button:disabled .nav-arrow {
  color: var(--subtle);
}

.doc-page-nav .nav-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-page-nav [data-next] .nav-text {
  align-items: flex-end;
}

.doc-page-nav .nav-dir {
  font-size: 11px;
  color: var(--subtle);
}

.doc-page-nav .nav-title {
  max-width: 15ch;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-page-nav .nav-count {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.doc-page-nav .nav-count b {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .exec-grid {
    grid-template-columns: 1fr;
  }

  .doc-page-nav .nav-title {
    display: none;
  }

  .doc-page-nav button {
    max-width: none;
  }

  .article-wrap {
    padding: 28px 16px 58px;
  }

  .report-hero {
    padding-bottom: 24px;
    margin-bottom: 26px;
  }

  .report-title {
    font-size: 30px;
  }

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

  .report-meta-grid,
  .metric-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .report-content h2 {
    font-size: 23px;
  }

  .report-content h3 {
    font-size: 18px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}
