:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #667085;
  --line: #d9dee8;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --green: #24b47e;
  --blue: #2f6fed;
  --gold: #d89b22;
  --rose: #cf4f69;
  --violet: #7257d8;
  --shadow: 0 18px 50px rgba(24, 32, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.hero {
  min-height: 620px;
  background: #18202f;
  color: #fff;
  position: relative;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  border-radius: 5px;
  box-shadow: 14px 0 0 rgba(255, 255, 255, 0.24);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.76);
}

.nav-links a:hover {
  color: #fff;
}

.hero-body {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-weight: 800;
}

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

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.hero-panel > div {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border-radius: 8px;
}

.panel-number {
  display: block;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
}

.panel-label {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.insight-grid article,
.project-card,
.agent-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 32, 47, 0.05);
}

.insight-grid article {
  padding: 22px;
}

.insight-grid strong {
  font-size: 18px;
}

.insight-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.legend,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend span,
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-btn {
  cursor: pointer;
}

.filter-btn.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.high {
  background: var(--rose);
}

.mid {
  background: var(--gold);
}

.low {
  background: var(--green);
}

.agent {
  background: var(--violet);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 13px;
  color: var(--muted);
  background: #f1f4f8;
}

td {
  font-size: 14px;
  line-height: 1.55;
}

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

.tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.project-grid {
  display: grid;
  gap: 22px;
}

.projects-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.project-menu {
  position: sticky;
  top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(24, 32, 47, 0.05);
}

.menu-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  font-size: 14px;
  font-weight: 900;
}

.menu-list {
  display: grid;
  padding: 8px;
  gap: 6px;
}

.menu-item {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3d4757;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.menu-item:hover,
.menu-item.active {
  color: #fff;
  background: var(--ink);
}

.menu-item small {
  color: inherit;
  opacity: 0.68;
  font-size: 11px;
  white-space: nowrap;
}

.project-card {
  overflow: hidden;
  scroll-margin-top: 22px;
}

.project-head {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.project-title {
  display: block;
}

.project-title h3 {
  margin: 0;
  font-size: 26px;
}

.project-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.meta-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #3d4757;
  font-size: 12px;
  font-weight: 800;
}

.project-body {
  padding: 22px;
  display: block;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.content-split {
  margin-top: 16px;
}

.content-module > .content-split {
  margin-top: 0;
  padding: 16px;
}

.module-stack {
  display: grid;
  gap: 18px;
}

.content-module {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.treasure-module {
  border-color: #dce6f3;
}

.agent-module {
  margin-top: 18px;
  border-color: #ddd7f7;
  background: #fbfaff;
}

.module-stack .agent-module {
  margin-top: 0;
}

.module-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.treasure-module .module-head {
  background: #eef6ff;
}

.agent-module .module-head {
  background: #f1edff;
}

.module-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-module .module-head span {
  color: var(--violet);
}

.module-head h4 {
  margin: 0;
  font-size: 22px;
}

.read-guide {
  border: 0;
  border-bottom: 1px solid #dce5f2;
  border-radius: 0;
  background: #f7fbff;
  overflow: hidden;
}

.read-guide h4 {
  margin: 0;
  padding: 14px 16px;
  font-size: 17px;
  border-bottom: 1px solid #dce5f2;
  background: #eaf3ff;
}

.read-guide ul {
  margin: 0;
  padding: 14px 18px 16px 34px;
  color: #344054;
  line-height: 1.8;
}

.read-guide li + li {
  margin-top: 8px;
}

.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.detail-block h4 {
  margin: 0;
  padding: 14px 16px;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.reward-list,
.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reward-list li,
.rule-list li {
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f5;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  line-height: 1.45;
}

.reward-list li:last-child,
.rule-list li:last-child {
  border-bottom: 0;
}

.reward-amount {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.rule-label {
  color: var(--muted);
  flex: 0 0 auto;
}

.rule-value {
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: #fff8ea;
  color: #735015;
  line-height: 1.65;
  border-radius: 0 8px 8px 0;
}

figure {
  margin: 0;
}

.screenshot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.screenshot-card img,
.agent-card img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.agent-inline {
  margin-top: 18px;
  border: 1px solid #dcd7f7;
  border-radius: 8px;
  background: #fbfaff;
  overflow: hidden;
}

.agent-inline-head {
  padding: 16px 18px;
  border-bottom: 1px solid #e4e0fa;
  background: #f1edff;
}

.agent-inline-head h4 {
  margin: 4px 0 0;
  font-size: 20px;
}

.agent-kicker {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-summary {
  margin: 0;
  padding: 16px 20px 0 36px;
  color: #3d4757;
  line-height: 1.75;
}

.agent-inline .content-split {
  padding: 16px;
}

.combined-body {
  padding: 22px;
}

.combined-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.mini-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.treasure-panel {
  border-color: #dce6f3;
}

.agent-panel {
  border-color: #ddd7f7;
}

.mini-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.treasure-panel .mini-head {
  background: #eef6ff;
}

.agent-panel .mini-head {
  background: #f1edff;
}

.mini-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-panel .mini-head span {
  color: var(--violet);
}

.mini-head h4 {
  margin: 0;
  font-size: 22px;
}

.mini-summary {
  margin: 0;
  padding: 16px 20px 0 34px;
  color: #3d4757;
  line-height: 1.72;
}

.mini-summary li + li {
  margin-top: 8px;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
}

.compact-agent {
  margin: 18px 0 0;
}

.plain-agent {
  margin: 16px;
  border: 1px solid #e3e0f5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.plain-agent h5 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #ece9fb;
  background: #faf8ff;
  color: #2b2358;
  font-size: 17px;
}

.plain-agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.plain-agent article {
  padding: 15px 16px;
  border-bottom: 1px solid #f0eef8;
}

.plain-agent article:last-child {
  border-bottom: 0;
}

.plain-agent strong {
  display: block;
  margin-bottom: 6px;
  color: #2f294f;
  font-size: 15px;
}

.plain-agent p {
  margin: 0;
  color: #4d5565;
  line-height: 1.75;
}

.inline-image-card {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.inline-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.inline-image-grid .inline-image-card {
  border-top: 0;
}

.inline-image-grid .inline-image-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.inline-image-grid .inline-image-card:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.inline-image-card > .image-open {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.image-open {
  position: relative;
  width: 100%;
  height: 300px;
  padding: 0;
  border: 0;
  background: #eef2f7;
  cursor: zoom-in;
  overflow: hidden;
}

.image-open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-open span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(24, 32, 47, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.inline-image-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.inline-image-card figcaption strong {
  color: #3d4757;
}

.inline-image-card figcaption a,
.modal-download,
.modal-close {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.image-modal[aria-hidden="true"] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 32, 0.78);
}

.modal-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-toolbar > div {
  display: flex;
  gap: 8px;
}

.modal-close {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

#modalImage {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  background: #f1f4f8;
}

.agent-section {
  padding-bottom: 80px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.agent-card {
  padding: 22px;
}

.agent-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.agent-card ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.reference-section {
  padding-bottom: 80px;
}

.section-note {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.reference-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.reference-grid a {
  min-height: 58px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(24, 32, 47, 0.05);
  font-weight: 800;
  color: var(--ink);
}

.reference-grid a:hover {
  border-color: var(--green);
  color: var(--green);
}

.reference-grid span {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecf7f2;
  color: #16845c;
  font-size: 12px;
  font-weight: 900;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 28px max(20px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  background: #e9edf4;
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero-body,
  .project-body,
  .projects-layout,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .insight-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .project-menu {
    position: static;
  }

  .combined-overview {
    grid-template-columns: 1fr;
  }

  .image-open {
    height: 240px;
  }

  .inline-image-grid {
    grid-template-columns: 1fr;
  }

  .inline-image-grid .inline-image-card:nth-child(odd) {
    border-right: 0;
  }

  .inline-image-grid .inline-image-card:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .menu-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto;
  }

  .menu-item {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .topbar,
  .row-heading,
  .project-head,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-direction: column;
  }

  .project-head {
    display: flex;
  }

  .project-meta {
    justify-content: flex-start;
  }

  .rule-list li {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rule-value {
    text-align: left;
  }
}
