* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe4ef;
  --blue: #2563eb;
  --sky: #0ea5e9;
  --orange: #f97316;
  --green: #10b981;
  --red: #ef4444;
  --violet: #7c3aed;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 8px;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--ink);
  background: #e8f0fb;
  outline: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.68fr);
  gap: 30px;
  align-items: center;
  padding: 34px 0 26px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 800;
}

.eyebrow::before {
  width: 10px;
  height: 10px;
  content: "";
  background: var(--orange);
  border-radius: 50%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.toolbar,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover,
.btn:focus-visible {
  border-color: #b7c8dd;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.btn.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: #1d4ed8;
}

.visual-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.visual-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.stats-grid,
.content-grid,
.two-column,
.three-column,
.four-column,
.report-grid,
.insight-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 30px;
}

.stat-card,
.panel,
.data-card,
.topic-card,
.case-card,
.summary-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stat-card:hover,
.panel:hover,
.data-card:hover,
.topic-card:hover,
.case-card:hover,
.summary-card:hover,
.matrix-card:hover,
.rule-card:hover,
.artifact-card:hover {
  border-color: #bfd0e5;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.stat-card {
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-value {
  margin: 6px 0;
  font-size: clamp(1.6rem, 3.3vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
}

.stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 42px 0 10px;
}

.section-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
}

.content-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.panel {
  padding: 20px;
}

.panel.muted {
  background: var(--surface-soft);
}

.metric-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}

.metric-row span:first-child {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
}

.bar-fill {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--color);
  border-radius: inherit;
}

.metric-row strong {
  text-align: right;
}

.chart-wrap {
  position: relative;
  min-height: 310px;
}

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

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #e8f0fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab-btn {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.tab-btn[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tag-cloud button,
.keyword {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  color: var(--ink);
  font-weight: 800;
  background: #edf4ff;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  cursor: pointer;
}

.tag-cloud button:hover,
.tag-cloud button:focus-visible {
  color: #fff;
  background: var(--blue);
  outline: none;
}

.keyword.red {
  background: #fff1f2;
  border-color: #fecdd3;
}

.keyword.green {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.step {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--blue);
  border-radius: 8px;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.topic-list {
  display: grid;
  gap: 12px;
}

.topic-card {
  padding: 16px;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pill.hot {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.pill.good {
  color: #065f46;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.9rem;
  background: #f1f5f9;
}

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

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-ring {
  display: grid;
  width: 190px;
  height: 190px;
  margin: 10px auto 18px;
  place-items: center;
  background:
    conic-gradient(var(--green) 0 52%, var(--orange) 52% 84%, var(--red) 84% 100%);
  border-radius: 50%;
}

.progress-ring::after {
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  color: var(--ink);
  content: attr(data-label);
  background: var(--surface);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  white-space: pre-line;
  text-align: center;
}

.callout {
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}

.callout p {
  margin-bottom: 0;
  color: #7c2d12;
}

.data-card,
.case-card,
.summary-card,
.matrix-card,
.rule-card {
  padding: 18px;
}

.data-card p,
.case-card p,
.summary-card p,
.matrix-card p,
.rule-card p {
  color: var(--muted);
}

.data-card p:last-child,
.case-card p:last-child,
.summary-card p:last-child,
.matrix-card p:last-child,
.rule-card p:last-child {
  margin-bottom: 0;
}

.matrix-card,
.rule-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.matrix-card {
  position: relative;
  overflow: hidden;
}

.matrix-card::before {
  display: block;
  width: 100%;
  height: 4px;
  margin: -18px -18px 16px;
  content: "";
  background: var(--accent, var(--blue));
}

.mini-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mini-metric:last-child {
  border-bottom: 0;
}

.mini-metric strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.mini-metric span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.evidence-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  padding: 12px 12px 12px 14px;
  color: var(--muted);
  background: #f8fafc;
  border-left: 4px solid var(--accent, var(--blue));
  border-radius: 8px;
}

.rule-card {
  display: grid;
  gap: 10px;
}

.rule-level {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  background: var(--accent, var(--blue));
  border-radius: 8px;
}

.requirement-card,
.artifact-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.requirement-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.requirement-no {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--accent, var(--blue));
  border-radius: 8px;
}

.artifact-card {
  display: grid;
  gap: 10px;
}

.artifact-card a {
  width: fit-content;
}

.status-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
}

.status-list li::before {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.hero-badges span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  background: #eef4fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.network {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}

.network svg {
  display: block;
  width: 100%;
  height: 340px;
}

.network text {
  font-family: inherit;
  font-weight: 800;
}

.accordion {
  display: grid;
  gap: 10px;
}

.accordion-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.accordion-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  background: transparent;
  border: 0;
}

.accordion-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  transition: transform 180ms ease;
}

.accordion-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 0 16px 16px;
  color: var(--muted);
}

.accordion-panel.open {
  display: block;
}

.footer {
  margin-top: 52px;
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer p {
  margin-bottom: 0;
}

.page-title {
  padding: 28px 0 18px;
}

.page-title h1 {
  max-width: 940px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.report-grid {
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.1fr);
}

.toc {
  position: sticky;
  top: 82px;
  align-self: start;
}

.toc a {
  display: block;
  padding: 9px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--blue);
  outline: none;
}

.doc-section {
  margin-bottom: 20px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-section p {
  color: var(--muted);
}

.doc-section ul,
.doc-section ol {
  margin: 0;
  padding-left: 1.25rem;
}

.doc-section li {
  margin: 6px 0;
}

.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.screenshot-strip figure {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.screenshot-strip img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.screenshot-strip figcaption {
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-only {
  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: 920px) {
  .hero,
  .content-grid,
  .two-column,
  .insight-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .three-column,
  .four-column,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    inset: 63px 14px auto 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    justify-content: flex-start;
  }

  .page-shell {
    padding: 24px 14px 44px;
  }

  .hero {
    padding-top: 18px;
  }

  .stats-grid,
  .three-column,
  .four-column,
  .insight-grid,
  .filter-grid,
  .screenshot-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .metric-row {
    grid-template-columns: 82px minmax(0, 1fr) 48px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

  .table-wrap {
    margin-inline: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
