:root {
  --ink: #111111;
  --muted: #5f6673;
  --line: #dfe3ea;
  --paper: #ffffff;
  --soft: #f5f7fa;
  --yellow: #ffd42a;
  --yellow-dark: #e1b900;
  --green: #00a876;
  --blue: #3177ff;
  --red: #e24b4b;
  --radius: 8px;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
}

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

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

.nav-cta {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.nav-cta.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.hero {
  min-height: 680px;
  padding: 72px 32px 36px;
  background:
    linear-gradient(180deg, #fff9d8 0%, #ffffff 56%),
    var(--paper);
}

.hero-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 42px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(42px, 5.1vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 0;
  color: #303642;
  font-size: 21px;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 14px;
  color: #6c5a00;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.button.secondary {
  background: white;
}

.workspace-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 18px;
  min-height: 420px;
}

.messenger-panel,
.task-panel,
.chart-card,
.architecture {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.12);
}

.messenger-panel {
  padding: 18px;
}

.task-panel {
  align-self: center;
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.panel-head strong {
  margin-left: 8px;
}

.message {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--soft);
}

.message p {
  margin: 8px 0 14px;
  color: #303642;
  line-height: 1.45;
}

.message button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--yellow);
  font-weight: 760;
}

.message.muted {
  background: #ecf8f3;
}

.task-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
}

.task-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.context-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff7c2;
}

.context-card span {
  font-weight: 760;
}

.context-card p {
  margin: 8px 0 0;
  color: #4d4731;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.metric-band article {
  min-height: 160px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.metric-band span {
  display: block;
  margin-bottom: 12px;
  color: var(--yellow);
  font-size: 36px;
  font-weight: 800;
}

.metric-band p {
  max-width: 260px;
  margin: 0;
  color: #e8e8e8;
  line-height: 1.45;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 82px 32px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section h3 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.section p {
  color: #3d4450;
  line-height: 1.6;
}

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

.decision-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.decision-card.selected {
  border-color: var(--yellow-dark);
  background: #fff7c2;
}

.decision-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 36px;
  align-items: center;
}

.chart-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.chart-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
}

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

.layer-map article {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.layer-map b {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
}

.plain-list {
  padding-left: 20px;
  color: #3d4450;
  line-height: 1.7;
}

.competitor-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.competitor-table > div {
  display: grid;
  grid-template-columns: 0.75fr 1.2fr 1fr 1.35fr;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.competitor-table > div:last-child {
  border-bottom: 0;
}

.competitor-table .table-head {
  background: var(--ink);
  color: white;
  font-weight: 760;
}

.architecture {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 32px;
  overflow: hidden;
}

.node {
  display: grid;
  place-items: center;
  width: 150px;
  height: 70px;
  border-radius: var(--radius);
  font-weight: 800;
}

.node.core {
  background: var(--yellow);
}

.node.main {
  margin-top: 18px;
  background: var(--ink);
  color: white;
}

.spokes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.spokes span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--soft);
  font-weight: 700;
}

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

.timeline article {
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.timeline span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  font-weight: 800;
}

.timeline b {
  display: block;
  margin-top: 16px;
  font-size: 20px;
}

.prototype-flow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.prototype-flow span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  text-align: center;
  font-weight: 760;
}

.prototype-flow span:nth-child(odd) {
  background: #fff7c2;
}

.docs {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
}

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

.doc-links a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  font-weight: 760;
}

.doc-links .disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--ink);
  font-weight: 700;
}

.page-hero {
  padding: 74px 32px 42px;
  background: linear-gradient(180deg, #fff9d8 0%, #ffffff 74%);
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 760px;
  color: #303642;
  font-size: 21px;
  line-height: 1.5;
}

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

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px;
}

.content-section h2 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
}

.content-section h3 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.content-section p {
  max-width: 860px;
  color: #3d4450;
  line-height: 1.65;
}

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

.data-card {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.data-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 30px;
}

.data-card span {
  color: var(--muted);
  line-height: 1.45;
}

.figure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 24px;
  align-items: stretch;
}

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

.equal-card {
  min-height: 430px;
}

.equal-card canvas {
  flex: 1;
  min-height: 300px;
  object-fit: contain;
}

.explain-box {
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff7c2;
}

.explain-box h3 {
  margin-top: 0;
}

.strategy-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.strategy-table th {
  background: var(--ink);
  color: white;
}

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

.callout {
  padding: 22px;
  border-left: 6px solid var(--yellow-dark);
  background: #fff7c2;
}

.module-card {
  display: flex;
  min-height: 440px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.1);
}

.module-card h3 {
  margin-top: 0;
}

.module-card canvas {
  margin-top: auto;
}

.doc-body {
  max-width: 960px;
}

.doc-body h2,
.doc-body h3,
.doc-body h4,
.doc-body h5,
.doc-body h6 {
  max-width: 900px;
  margin-top: 34px;
}

.doc-body p,
.doc-body li {
  color: #303844;
  line-height: 1.65;
}

.doc-body ul,
.doc-body ol {
  max-width: 900px;
  padding-left: 24px;
}

.doc-body a {
  color: #1f5fcc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef2f7;
}

.full-doc-section {
  border-top: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  margin: 18px 0 26px;
  overflow-x: auto;
}

.prototype-shell {
  min-height: calc(100vh - 64px);
  background: #f7f8fb;
}

.prototype-layout {
  display: grid;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.prototype-sidebar,
.prototype-main,
.prototype-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.prototype-sidebar {
  position: sticky;
  top: 84px;
  height: fit-content;
  padding: 16px;
}

.prototype-sidebar h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.role-list,
.module-tabs {
  display: grid;
  gap: 8px;
}

.role-list button,
.module-tabs button,
.prototype-action {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.role-list button.active,
.module-tabs button.active,
.prototype-action.primary {
  border-color: #f0c800;
  background: var(--yellow);
}

.prototype-main {
  padding: 24px;
}

.prototype-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.prototype-title h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.prototype-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
}

.prototype-panel {
  padding: 18px;
}

.prototype-panel h3 {
  margin: 0 0 12px;
}

.message-stack,
.task-stack,
.knowledge-list,
.integration-list {
  display: grid;
  gap: 10px;
}

.proto-message,
.proto-task,
.knowledge-item,
.integration-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.proto-message strong,
.proto-task strong,
.knowledge-item strong,
.integration-item strong {
  display: block;
  margin-bottom: 5px;
}

.prototype-metrics {
  display: grid;
  margin: 16px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prototype-metrics span {
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff7c2;
  font-weight: 800;
}

.proto-top-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.proto-top-note span {
  color: var(--muted);
  font-weight: 700;
}

.prototype-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.module-result {
  min-height: 92px;
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: #eef8f4;
  color: #12382d;
  line-height: 1.55;
}

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

.access-grid span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  font-weight: 700;
}

.proto-message span,
.proto-task span,
.knowledge-item span,
.integration-item span {
  display: block;
  color: #3d4450;
  line-height: 1.5;
}

.proto-message.success {
  border-color: rgba(0, 168, 118, 0.28);
  background: #eef8f4;
}

.prototype-panel-wide {
  grid-column: 1 / -1;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

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

  .hero,
  .section,
  .content-section,
  .page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .workspace-visual {
    grid-template-columns: 1fr;
  }

  .metric-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .decision-grid,
  .layer-map,
  .timeline {
    grid-template-columns: 1fr;
  }

  .competitor-table > div {
    grid-template-columns: 1fr;
  }

  .prototype-flow {
    grid-template-columns: 1fr;
  }

  .doc-links {
    grid-template-columns: 1fr;
  }

  .data-grid,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .figure-grid.equal {
    grid-template-columns: 1fr;
  }

  .prototype-layout,
  .prototype-grid {
    grid-template-columns: 1fr;
  }

  .prototype-sidebar {
    position: static;
  }

  .prototype-title {
    flex-direction: column;
  }

  .prototype-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-copy h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 18px;
  }

  .metric-band {
    grid-template-columns: 1fr;
  }

  .metric-band article {
    min-height: 130px;
  }

  .prototype-metrics,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }

  .strategy-table,
  .strategy-table thead,
  .strategy-table tbody,
  .strategy-table tr,
  .strategy-table td {
    display: block;
    width: 100%;
  }

  .strategy-table {
    border: 0;
  }

  .strategy-table thead {
    height: 0;
    overflow: hidden;
  }

  .strategy-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
  }

  .strategy-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .strategy-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .strategy-table tr:last-child td,
  .strategy-table td:last-child {
    border-bottom: 0;
  }
}
