* {
  box-sizing: border-box;
}

:root {
  --canvas-width: 1600px;
  --canvas-height: 1280px;
  --bg: #f3f5f7;
  --paper: #ffffff;
  --ink: #182230;
  --muted: #5a6573;
  --line: #d8dde3;
  --soft-line: #e7eaee;
  --economic: #187a62;
  --supply: #2f6fa8;
  --curation: #b56b12;
  --validation: #b44848;
  --accent: var(--economic);
  --accent-soft: #eef7f3;
  --radius: 6px;
  --radius-small: 4px;
}

html,
body {
  width: var(--canvas-width);
  height: var(--canvas-height);
  margin: 0;
  overflow: hidden;
}

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

.canvas {
  position: relative;
  width: var(--canvas-width);
  height: var(--canvas-height);
  padding: 32px 58px 54px;
  overflow: hidden;
  background: var(--bg);
}

.page-head {
  height: 100px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.title-wrap {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
}

.subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.25;
}

.page-context {
  flex: 0 0 460px;
  padding: 9px 0 0 18px;
  border-left: 5px solid var(--accent);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: var(--radius-small);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 780;
  white-space: nowrap;
}

.tag-nb {
  border: 1px solid #637083;
  color: #344054;
  background: var(--paper);
}

.tag-cl {
  border: 1px dashed #637083;
  color: #344054;
  background: #f8f9fa;
}

.tag-analysis {
  border-left: 4px solid #7a8595;
  color: #465161;
  background: #eef1f4;
}

.tag-parameter {
  border: 1px solid #637083;
  color: #344054;
  background: var(--paper);
}

.leaf-grid {
  height: calc(100% - 114px);
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
}

.leaf-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 11px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

.leaf-grid.five .leaf-card:last-child {
  grid-column: 1 / -1;
  width: calc((100% - 20px) / 2);
  justify-self: center;
}

.leaf-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-kind {
  color: #687384;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 760;
}

.leaf-id {
  color: var(--accent);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.leaf-card h2 {
  margin: 7px 0 7px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.26;
  font-weight: 800;
}

.leaf-story {
  display: grid;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--soft-line);
}

.leaf-story p {
  margin: 0;
  color: #303a48;
  font-size: 16px;
  line-height: 1.43;
}

.leaf-action {
  padding: 7px 9px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.leaf-action strong,
.leaf-boundary strong {
  color: var(--ink);
  font-weight: 820;
}

.leaf-action .tag {
  margin-right: 6px;
  vertical-align: 1px;
}

.leaf-boundary {
  color: var(--muted);
}

.leaf-boundary .tag {
  margin: 0 3px;
  vertical-align: 1px;
}

.parameter {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid #637083;
  border-radius: 3px;
  color: #344054;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
  white-space: nowrap;
}

.code {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.leaf-card__foot {
  margin-top: auto;
  padding-top: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--soft-line);
  color: #687384;
  font-size: 14px;
  line-height: 1.3;
}

.leaf-source {
  text-align: right;
}

.source-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.source-link--unavailable {
  color: var(--muted);
  text-decoration-style: dotted;
  cursor: help;
}

.cl-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.cl-empty {
  color: #7a8594;
}

.dependency-band {
  margin-top: 16px;
  min-height: 96px;
  display: grid;
  grid-template-columns: 190px repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px dashed #778291;
  border-radius: var(--radius);
  background: var(--paper);
}

.dependency-band h2 {
  margin: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.25;
}

.dependency-item {
  padding-left: 12px;
  border-left: 3px dashed #9099a6;
  color: #465161;
  font-size: 16px;
  line-height: 1.38;
}

.validation-layout {
  height: calc(100% - 114px);
  margin-top: 14px;
  display: grid;
  grid-template-rows: 820px 170px;
  align-content: start;
  gap: 0;
}

.validation-layout .leaf-grid {
  height: auto;
  margin-top: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.route-grid {
  height: calc(100% - 118px);
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.route-block {
  min-width: 0;
  min-height: 0;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

a.route-block {
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

a.route-block:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 10px 26px rgba(24, 34, 48, 0.10);
}

a.route-block:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
  outline-offset: 3px;
}

a.route-block:hover .route-count {
  color: var(--accent);
}

.route-block.economic {
  --accent: var(--economic);
}

.route-block.supply {
  --accent: var(--supply);
}

.route-block.curation {
  --accent: var(--curation);
}

.route-block.validation {
  --accent: var(--validation);
}

.route-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.route-head h2 {
  margin: 0;
  color: var(--accent);
  font-size: 26px;
  line-height: 1.2;
}

.route-count {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.route-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 31px;
  padding: 3px 7px 3px 10px;
  border-left: 4px solid var(--accent);
  color: #344050;
  font-size: 16px;
  line-height: 1.25;
}

.route-id {
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
}

.route-arrow {
  color: #687384;
  text-align: center;
  font-size: 18px;
  font-weight: 850;
}

.route-solution {
  color: var(--ink);
  font-weight: 730;
}

.page-foot {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.research-state {
  color: #3f4957;
  font-weight: 800;
  white-space: nowrap;
}

.economic-page {
  --accent: var(--economic);
  --accent-soft: #eef7f3;
}

.supply-page {
  --accent: var(--supply);
  --accent-soft: #eef5fb;
}

.curation-page {
  --accent: var(--curation);
  --accent-soft: #fff6e9;
}

.validation-page {
  --accent: var(--validation);
  --accent-soft: #fff1f1;
}

.index-page {
  --accent: #344054;
}
