:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #61706a;
  --paper: #f7f4ec;
  --panel: #ffffff;
  --line: #d9d5c8;
  --green: #1f7a5c;
  --blue: #2d5f9a;
  --red: #b64a3d;
  --gold: #b8872d;
  --shadow: 0 18px 60px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(23, 32, 27, 0.12);
  background: rgba(247, 244, 236, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
}

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

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 56px;
  padding: 56px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

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

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: 58px;
  line-height: 1.03;
  font-weight: 820;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.16;
}

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

.lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

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

.primary-action,
.secondary-action,
.tool-row button,
.chip,
.card-action {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}

.primary-action {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.secondary-action,
.tool-row button {
  background: var(--panel);
  color: var(--ink);
}

.hero-panel {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
}

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

.panel-grid > div {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(23, 32, 27, 0.06);
}

.stat-number {
  display: block;
  font-size: 38px;
  line-height: 1;
  font-weight: 820;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

.radar {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 32, 27, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 27, 0.06) 1px, transparent 1px),
    #fffdf7;
  background-size: 42px 42px;
}

.radar::before,
.radar::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(31, 122, 92, 0.24);
  border-radius: 50%;
}

.radar::after {
  inset: 28%;
  border-color: rgba(45, 95, 154, 0.24);
}

.radar span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(22px * var(--s));
  height: calc(22px * var(--s));
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 10px rgba(31, 122, 92, 0.12);
}

.section {
  padding: 72px 0;
  border-top: 1px solid rgba(23, 32, 27, 0.12);
}

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

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

.insight-grid article,
.method-body,
.company-card,
.timeline-item,
.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.insight-grid p,
.method-body,
.company-card p,
.dialog-dialog p {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 12px;
  font-weight: 760;
}

.method-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.method-body p {
  margin-bottom: 0;
}

.landscape-heading {
  align-items: start;
}

.search-wrap {
  width: min(430px, 100%);
}

.search-wrap label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search-wrap input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
}

.filter-bar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: var(--panel);
  color: var(--muted);
}

.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.muted-row .chip.active {
  background: var(--blue);
  border-color: var(--blue);
}

.tool-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

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

.company-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  box-shadow: 0 10px 30px rgba(23, 32, 27, 0.06);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.company-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e8e3d6;
}

.company-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(31, 122, 92, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(45, 95, 154, 0.18), transparent 48%),
    #f6efe0;
  color: var(--ink);
  font-size: 36px;
  font-weight: 820;
}

.image-fallback.dialog {
  min-height: 300px;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 760;
}

.card-body h3 {
  margin-bottom: 0;
}

.company-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
}

.funding-snippet {
  margin-top: auto;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.funding-snippet strong {
  color: var(--ink);
}

.card-action {
  margin: 0 18px 18px;
  background: #f8f6ef;
  color: var(--ink);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 18px;
}

.timeline-date {
  color: var(--green);
  font-weight: 820;
}

.timeline-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.timeline-title span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf6f0;
  color: var(--green);
  font-size: 12px;
}

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

.timeline-investors {
  font-size: 13px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.source-card {
  min-height: 128px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.source-card:hover {
  border-color: var(--green);
}

.source-card span,
.source-card small {
  color: var(--muted);
  font-size: 12px;
}

.source-card strong {
  line-height: 1.25;
}

.company-dialog {
  width: min(1060px, calc(100% - 28px));
  max-height: 88vh;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.company-dialog::backdrop {
  background: rgba(23, 32, 27, 0.42);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: sticky;
  top: 12px;
  left: calc(100% - 56px);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
}

#dialogContent {
  padding: 0 28px 32px;
}

.dialog-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.dialog-media {
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8e3d6;
}

.dialog-media img {
  min-height: 300px;
}

.dialog-hero h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.dialog-meta,
.portrait-note,
.event-note {
  color: var(--muted);
  font-size: 13px;
}

.portrait-note a {
  color: var(--blue);
  word-break: break-word;
}

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

.dialog-grid section,
.dialog-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.dialog-grid ul,
.dialog-section ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.dialog-section {
  margin-top: 8px;
}

.funding-events {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.funding-event {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfaf5;
}

.funding-event > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--green);
}

.funding-event p {
  margin: 8px 0 0;
  color: var(--muted);
}

.event-amount {
  color: var(--ink) !important;
  font-weight: 760;
}

.dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dialog-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--blue);
  background: #f9fbff;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero,
  .section-heading,
  .method-body,
  .dialog-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 42px;
  }

  .insight-grid,
  .company-grid,
  .source-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .dialog-grid,
  .funding-events {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  main,
  .nav,
  .footer {
    width: min(100% - 22px, 1180px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: 34px;
    gap: 28px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .panel-grid,
  .insight-grid,
  .company-grid,
  .source-list,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  #dialogContent {
    padding: 0 18px 26px;
  }
}
