:root {
  --ink: #142033;
  --muted: #5d697a;
  --line: #d7dee8;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --blue: #1f6feb;
  --cyan: #0f9fb3;
  --green: #24865a;
  --amber: #b56a17;
  --red: #b43b3b;
  --shadow: 0 18px 55px rgba(20, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(215, 222, 232, 0.8);
  background: rgba(246, 248, 251, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 218px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

nav a:hover {
  color: var(--ink);
  background: #e9eef6;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.7fr);
  gap: 28px;
  align-items: stretch;
  padding: 48px 0 22px;
}

.workspace-main {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.search-panel {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.search-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #c8d2df;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(31, 111, 235, 0.16);
  border-color: var(--blue);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
}

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

.secondary-action {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.filter {
  color: var(--ink);
  background: #edf2f8;
}

.filter.is-active,
.filter:hover {
  color: #fff;
  background: var(--blue);
}

.signal-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.signal-canvas {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    #ffffff;
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.signal-canvas::before,
.signal-canvas::after {
  position: absolute;
  inset: 56px 38px;
  content: "";
  border: 1px solid rgba(31, 111, 235, 0.2);
  transform: rotate(-9deg);
}

.signal-canvas::after {
  inset: 92px 76px;
  border-color: rgba(36, 134, 90, 0.25);
  transform: rotate(13deg);
}

.node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(20, 32, 51, 0.18);
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(20, 32, 51, 0.15);
}

.node-a { left: 44px; top: 52px; background: var(--blue); }
.node-b { right: 44px; top: 84px; background: var(--cyan); }
.node-c { left: 92px; bottom: 82px; background: var(--green); }
.node-d { right: 54px; bottom: 68px; background: var(--amber); }
.node-e { left: 50%; top: 48%; transform: translate(-50%, -50%); background: var(--ink); }

.metrics {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metrics div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 16px;
}

.metrics div + div {
  border-top: 1px solid var(--line);
}

.metrics dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metrics dd {
  margin: 0;
  font-weight: 800;
}

.content-band,
.route-section,
.article-section,
.consult-section {
  padding: 44px 0;
}

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

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

.card {
  min-height: 244px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.code {
  font-size: 24px;
  font-weight: 900;
}

.tag {
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.tag.alt { background: var(--green); }
.tag.warn { background: var(--amber); }
.tag.deep { background: var(--blue); }

.card p {
  color: var(--muted);
  line-height: 1.65;
}

.facts {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 13px;
}

.facts span {
  display: block;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
}

.card-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 900;
}

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

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-list a {
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.article-list a:hover {
  border-color: rgba(31, 111, 235, 0.42);
  color: var(--blue);
}

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
  margin-bottom: 18px;
}

.brief-lead,
.brief-stack article,
.method-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.brief-lead {
  padding: 26px;
}

.brief-lead span {
  color: var(--green);
  font-weight: 900;
}

.brief-lead p,
.brief-stack p,
.method-panel li {
  color: var(--muted);
  line-height: 1.75;
}

.brief-lead a,
.brief-stack a {
  color: var(--blue);
  font-weight: 900;
}

.brief-stack {
  display: grid;
  gap: 14px;
}

.brief-stack article {
  padding: 18px;
}

.brief-stack h3 {
  margin-bottom: 8px;
}

.method-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: 20px;
  margin: 18px 0 34px;
  padding: 24px;
}

.method-panel ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 0;
  padding-left: 22px;
}

.route-grid article,
.consult-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.route-grid article {
  padding: 20px;
}

.route-grid span {
  color: var(--blue);
  font-weight: 900;
}

.route-grid p,
.consult-section p,
footer p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-main {
  width: min(960px, calc(100% - 32px));
  padding: 44px 0;
}

.detail-hero,
.detail-section,
.detail-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-hero {
  padding: clamp(26px, 5vw, 44px);
  box-shadow: var(--shadow);
}

.detail-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 56px);
}

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

.meta-grid div {
  padding: 14px;
  border-radius: 8px;
  background: #f3f6fa;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.meta-grid dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.detail-section {
  margin-top: 16px;
  padding: 24px;
}

.detail-section p,
.detail-section li {
  color: var(--muted);
  line-height: 1.75;
}

.detail-section ul {
  padding-left: 22px;
}

.detail-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 20px 24px;
}

.detail-cta p {
  margin: 0;
}

.contact-box {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  background: #fbfcfe;
}

.contact-box h3 {
  margin-bottom: 8px;
}

.contact-box dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.contact-box div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #e7edf5;
}

.contact-box dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.contact-box dd {
  margin: 0;
  font-weight: 900;
}

.consult-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 48px;
  padding: 28px;
}

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

.consult-form label {
  display: grid;
  gap: 8px;
}

.consult-form button {
  grid-column: 1 / -1;
}

footer {
  padding: 28px clamp(18px, 4vw, 56px) 40px;
  border-top: 1px solid var(--line);
}

footer p {
  width: min(1180px, 100%);
  margin: 0 auto 6px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .workspace,
  .consult-section,
  .brief-grid,
  .method-panel {
    grid-template-columns: 1fr;
  }

  .cards,
  .route-grid,
  .article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  nav a {
    padding-inline: 8px;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .workspace {
    padding-top: 18px;
  }

  .search-row,
  .cards,
  .route-grid,
  .article-list,
  .meta-grid,
  .consult-form {
    grid-template-columns: 1fr;
  }

  .method-panel ol {
    grid-template-columns: 1fr;
  }

  .signal-canvas {
    min-height: 300px;
  }

  .section-head {
    display: block;
  }
}
