@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap");
:root {
  color: #20212a;
  background: #f4f3f8;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #20212a;
  --muted: #686a77;
  --line: #dedde6;
  --purple: #7256d8;
  --purple-light: #f0eafb;
  --teal: #109386;
  --teal-light: #e6f6f4;
  --blue: #2d6cc4;
  --blue-light: #e8f1fc;
  --orange: #c86918;
  --orange-light: #fdf2e8;
  --green: #258356;
  --green-light: #e9f7ee;
  --paper: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #b8a7ef; outline-offset: 4px; }
::selection { background: #dcd2fb; }

/* ── Header & Navigation ── */
.site-header {
  width: min(1180px, calc(100% - 48px));
  height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand img {
  border-radius: 10px;
  box-shadow: 0 4px 12px #4e33ae2e;
}
nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #555764;
  font-size: 14px;
  font-weight: 600;
}
nav a:hover:not(.nav-cta) {
  color: var(--ink);
}
.nav-results-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #5d43be;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-results-btn:hover {
  background: #f0eafb;
  border-color: #d1c5f6;
  color: #4b32a7;
}
.nav-cta {
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 9px;
  transition: background 0.15s;
}
.nav-cta:hover { background: #363842; }

/* ── Hero Section ── */
main { overflow: hidden; }
.hero {
  width: min(1180px, calc(100% - 48px));
  min-height: 640px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 72px;
  padding: 78px 0 86px;
}
.status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: #61636e;
  font-size: 13px;
  font-weight: 600;
}
.status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38a875;
  box-shadow: 0 0 0 4px #dcefe7;
}
h1 {
  margin: 0;
  font-size: clamp(48px, 6.1vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 600;
}
.intro {
  max-width: 630px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: 0.16s;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  color: #fff;
  background: var(--purple);
  box-shadow: 0 10px 24px #5c43be38;
}
.button.secondary {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}
.button.secondary:hover {
  background: #fafafc;
}

/* ── Interactive Workflow Visual Stage ── */
.workflow-stage {
  position: relative;
  min-height: 470px;
  border: 1px solid #dad9e3;
  border-radius: 24px;
  overflow: hidden;
  background-color: #ecebf1;
  background-image: radial-gradient(#c9c8d2 1.15px, transparent 1.15px);
  background-size: 22px 22px;
  box-shadow: 0 24px 70px #322d4d1f;
}
.stage-label {
  position: absolute;
  top: 22px;
  left: 24px;
  padding: 7px 11px;
  border-radius: 20px;
  background: #ffffffc7;
  color: #777986;
  font-size: 11px;
  font-weight: 600;
}
.node {
  position: absolute;
  left: 50%;
  width: 248px;
  min-height: 88px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 24px #312d481a, 0 0 0 1px #2623350f;
}
.node span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.node strong { font-size: 14px; }
.node small { color: #838591; font-size: 12px; }
.node-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-weight: 700;
}
.blue { color: #3d6db5; background: #e8f1fb; }
.purple { color: #7244bc; background: #f0eafb; }
.orange { color: #c0722a; background: #fdf0e4; }
.node i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 0 0 17px 17px;
}
.upload-node { top: 74px; }
.upload-node i { background: linear-gradient(90deg, #5890d0, #8bbef5); }
.process-node { top: 190px; }
.process-node i { background: linear-gradient(90deg, #9260d0, #c48ff5); }
.download-node { top: 306px; }
.download-node i { background: linear-gradient(90deg, #e08a38, #f5b85a); }
.connector {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 28px;
  transform: translateX(-50%);
  background: #a9a6b5;
}
.first { top: 162px; }
.second { top: 278px; }
.connector b {
  position: absolute;
  left: -3px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8e8b9b;
  border-bottom: 2px solid #8e8b9b;
  transform: rotate(45deg);
}
.stage-note {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  margin: 0;
  text-align: center;
  color: #777986;
  font-size: 11px;
}

/* ── Capabilities Bar ── */
.capabilities {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.capabilities article {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.capabilities article:first-child { padding-left: 0; }
.capabilities article:last-child { border: 0; }
.capabilities span { color: #898b96; font-size: 12px; }
.capabilities strong { font-size: 14px; line-height: 1.5; font-weight: 600; }

/* ── Generic MCP Section ── */
.mcp-section {
  width: min(1180px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 84px;
  align-items: start;
  padding-bottom: 110px;
}
.mcp-copy h2 {
  margin: 0;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}
.mcp-copy > p:not(.status) {
  margin: 24px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5d43be;
  font-weight: 700;
  transition: color 0.15s;
}
.text-link:hover { color: #432a9e; }

/* Prerequisites box */
.prereq-box {
  margin: 22px 0 26px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}
.prereq-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b7e8c;
  margin-bottom: 8px;
}
.prereq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prereq-tags code {
  font-size: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  background: #ecebf2;
  padding: 3px 8px;
  border-radius: 6px;
  color: #2b2c36;
}

/* ── Front Page Testing Overview Card (Clean, Uncluttered) ── */
.testing-section {
  padding-top: 100px;
  border-top: 1px solid var(--line);
}
.front-test-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin-top: 24px;
  box-shadow: 0 4px 18px #2b284408;
}
.front-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0eef5;
  margin-bottom: 18px;
}
.front-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.front-stat-item strong {
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.front-stat-item .stat-highlight {
  color: var(--purple);
}
.front-stat-item span {
  font-size: 12px;
  color: var(--muted);
}
.front-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.front-card-actions .button {
  min-height: 42px;
  font-size: 13px;
  padding: 0 16px;
}

/* ── Terminal Styles ── */
.terminal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ebeaf0;
  overflow-x: auto;
}
.terminal-tabs button {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #686a77;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s;
}
.terminal-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px #302b4814;
}
.terminal {
  overflow: hidden;
  border-radius: 18px;
  color: #eeeef2;
  background: #202129;
  box-shadow: 0 22px 60px #1d1b2a30;
}
.terminal-head, .terminal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #a9aab3;
  font-size: 12px;
}
.terminal-head { border-bottom: 1px solid #34353e; }
.terminal-foot { border-top: 1px solid #34353e; }
.terminal button {
  border: 0;
  border-radius: 7px;
  padding: 6px 10px;
  color: #d8d8de;
  background: #343640;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.terminal button:hover {
  background: #444754;
  color: #fff;
}
.terminal button.copied { color: #8ce0b8; }
.terminal pre {
  margin: 0;
  padding: 24px 22px 26px;
  min-height: 180px;
  overflow: auto;
  font: 13px/1.85 "Cascadia Code", Consolas, monospace;
}
.terminal code { white-space: pre-wrap; word-break: break-word; }
.terminal-foot a { color: #fff; }
.test-status-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8ce0b8;
  font-weight: 600;
  font-size: 11px;
}
.test-status-ready::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38a875;
}

/* ── Benchmark Section ── */
.benchmark-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 120px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 24px #2b284408;
}
.benchmark-intro {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: end;
}
.benchmark-intro h2 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}
.benchmark-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 36px 0 32px;
  border-block: 1px solid var(--line);
}
.metric-grid article {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px 24px;
  border-right: 1px solid var(--line);
}
.metric-grid article:last-child { border: 0; }
.metric-grid strong {
  font-size: 30px;
  letter-spacing: -0.04em;
}
.metric-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.benchmark-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #eeeef2;
  background: #202129;
}
.benchmark-actions code {
  min-width: 0;
  overflow: auto;
  font: 13px "Cascadia Code", Consolas, monospace;
}
.benchmark-actions button {
  margin-left: auto;
  flex: none;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  color: #d8d8de;
  background: #343640;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.benchmark-modal-btn {
  background: transparent !important;
  color: #c4b2ff !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin-left: 10px;
}
.benchmark-modal-btn:hover {
  text-decoration: underline;
}
.benchmark-caveat {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ── Agent Setup Section ── */
.client-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 130px;
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 84px;
  align-items: start;
  padding-top: 90px;
  border-top: 1px solid var(--line);
}
.client-heading h2 {
  max-width: 480px;
  margin: 0;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}
.client-heading > p:not(.status) {
  max-width: 470px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.client-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ebeaf0;
}
.client-tabs button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #686a77;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s;
}
.client-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px #302b4814;
}
.client-terminal pre { min-height: 146px; }

/* ── Footer ── */
footer {
  width: min(1180px, calc(100% - 48px));
  min-height: 110px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  border-top: 1px solid var(--line);
  color: #777986;
  font-size: 12px;
}
footer p { text-align: center; }
footer > a:last-child { justify-self: end; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   ── TEST RESULTS & LATENCY MODAL DIALOG (Appears On Click) ──
   ══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(18, 19, 27, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-window {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  width: min(1080px, 94%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 84px rgba(18, 16, 32, 0.32);
  overflow: hidden;
  position: relative;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-window {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fdfdfe;
  flex-wrap: wrap;
  gap: 14px;
}
.modal-title-group h2 {
  margin: 4px 0 2px;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #694ac5;
  background: #f0eafb;
  padding: 2px 8px;
  border-radius: 6px;
}
.modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 8px;
  transition: background 0.15s;
}
.modal-download-btn:hover {
  background: #5f42c4;
}
.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #555764;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-close-btn:hover {
  background: #f2f1f6;
  color: var(--ink);
}

/* Modal Internal Tabs */
.modal-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  background: #f7f6fa;
  overflow-x: auto;
}
.modal-tab-btn {
  border: 0;
  background: transparent;
  color: #686a77;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
}
.modal-tab-btn.active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 2px 6px #2b284414;
}
.tab-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
}
.tab-purple { background: #7c5be6; }
.tab-teal { background: #109386; }
.tab-orange { background: #c86918; }

/* ── Custom Smooth Scrollbar for Modal Content (No Windows Glitches) ── */
.modal-content {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #d2cee2 transparent;
}
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #d2cee2;
  border-radius: 10px;
  border: 2px solid #ffffff;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a9a3c2;
}

.modal-tab-panel {
  display: none;
}
.modal-tab-panel.active {
  display: block;
}

/* ── Modal Tab 1: Compact Summary Cards Grid ── */
.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.summary-card {
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}
.summary-card-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 2px;
}
.summary-card-label {
  font-size: 11px;
  font-weight: 700;
  color: #434552;
  margin-bottom: 1px;
}
.summary-card-sub {
  font-size: 10px;
  color: var(--muted);
}

/* ── Modal Tab 1: Charts Grid ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.chart-header h3 {
  margin: 0 0 2px;
  font-size: 15px;
  letter-spacing: -0.03em;
}
.chart-subtitle {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.chart-controls {
  display: flex;
  gap: 3px;
  background: #ebeaf0;
  padding: 2px;
  border-radius: 7px;
}
.chart-filter-btn {
  border: 0;
  background: transparent;
  color: #686a77;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}
.chart-filter-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #00000018;
}

/* ── Latency Bar Chart (Smooth Internal Scrollable Track) ── */
.chart-body {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #dcd7ea transparent;
}
.chart-body::-webkit-scrollbar {
  width: 5px;
}
.chart-body::-webkit-scrollbar-track {
  background: transparent;
}
.chart-body::-webkit-scrollbar-thumb {
  background: #dcd7ea;
  border-radius: 6px;
}
.chart-body::-webkit-scrollbar-thumb:hover {
  background: #b8b1ce;
}

.latency-chart-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.latency-row {
  display: grid;
  grid-template-columns: 145px 1fr 50px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 2px 0;
}
.latency-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.latency-label code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #3b3d4a;
}
.latency-track {
  height: 14px;
  background: #f0eef5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.latency-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-purple { background: linear-gradient(90deg, #7c5be6, #9b7cf5); }
.bar-teal { background: linear-gradient(90deg, #109386, #2bc0b0); }
.bar-blue { background: linear-gradient(90deg, #2d6cc4, #5793e5); }
.bar-orange { background: linear-gradient(90deg, #c86918, #e58b41); }
.latency-val {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #555766;
  text-align: right;
  font-weight: 600;
}
.chart-legend {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0eef5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-purple { background: #7c5be6; }
.dot-teal { background: #109386; }
.dot-blue { background: #2d6cc4; }
.dot-orange { background: #c86918; }

/* ── Donut & Engine Health Card ── */
.donut-and-engines {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0eef5;
}
.donut-wrapper {
  position: relative;
  width: 105px;
  height: 105px;
  flex: none;
}
.donut-wrapper svg {
  width: 105px;
  height: 105px;
}
.donut-svg {
  transform: rotate(-90deg);
}
.donut-bg {
  fill: none;
  stroke: #ece9f3;
  stroke-width: 16;
}
.donut-segment {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}
.pass-segment {
  stroke: #258356;
  stroke-dasharray: 402.12;
  stroke-dashoffset: 22.5;
}
.optional-segment {
  stroke: #e09438;
  stroke-dasharray: 402.12;
  stroke-dashoffset: 380;
  transform-origin: 50% 50%;
  transform: rotate(340deg);
}
.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.donut-center strong {
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.donut-center small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: #3b3d4a;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
}
.legend-pill {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}
.pill-pass { background: #258356; }
.pill-optional { background: #e09438; }
.pill-zero { background: #c5c4d0; }

.engine-status-list {
  margin-top: 12px;
}
.engine-status-list h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b7e8c;
}
.engine-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.engine-item {
  background: #f7f6fa;
  border: 1px solid #e9e7f0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.engine-item-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.engine-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-ok { background: #258356; box-shadow: 0 0 0 2px #d6efe1; }
.status-warn { background: #d9882b; box-shadow: 0 0 0 2px #faebd7; }
.engine-item-desc {
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}
.engine-badge {
  font-size: 9px;
  font-weight: 700;
  color: #258356;
}

/* ── Modal Tab 2: Test Matrix Card ── */
.matrix-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.matrix-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.matrix-header h3 {
  margin: 0 0 3px;
  font-size: 16px;
  letter-spacing: -0.03em;
}
.matrix-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pills {
  display: flex;
  gap: 3px;
  background: #ebeaf0;
  padding: 3px;
  border-radius: 8px;
  overflow-x: auto;
}
.pill-btn {
  border: 0;
  background: transparent;
  color: #686a77;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.pill-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #00000018;
}
.table-search-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: inherit;
  background: #fafafc;
  outline: none;
  width: 170px;
  transition: border-color 0.15s;
}
.table-search-input:focus {
  border-color: var(--purple);
  background: #fff;
}
.table-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #dcd7ea transparent;
}
.table-container::-webkit-scrollbar {
  height: 6px;
}
.table-container::-webkit-scrollbar-thumb {
  background: #dcd7ea;
  border-radius: 6px;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}
.results-table th {
  padding: 9px 11px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b7e8c;
  border-bottom: 2px solid #edeaf2;
  background: #fbfafc;
}
.results-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #f0eef5;
  color: #3b3d4a;
}
.results-table tr:hover td {
  background: #faf9fd;
}
.badge-id {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #6a53ba;
  background: #f0eafb;
  padding: 2px 5px;
  border-radius: 4px;
}
.cat-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.cat-document { background: #f0eafb; color: #6a4ab8; }
.cat-filesystem { background: #e6f6f4; color: #0d8376; }
.cat-image { background: #e8f1fc; color: #235fae; }
.cat-audiovideo { background: #fdf2e8; color: #af5710; }
.cat-security { background: #feebeb; color: #b72b2b; }
.status-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.status-pass { background: #e9f7ee; color: #217d50; }
.status-optional { background: #fef4e8; color: #b86e14; }
.time-cell {
  font-family: "Cascadia Code", Consolas, monospace;
  font-weight: 600;
  color: #2b2c36;
}
.engine-tag {
  font-size: 11px;
  color: #636674;
}
.desc-cell {
  color: #636674;
  font-size: 11px;
}
.empty-table-msg {
  text-align: center;
  padding: 28px 0 !important;
  color: var(--muted);
}

/* ── Modal Tab 3: Token Comparison ── */
.token-comparison-container {
  background: #faf9fd;
  border: 1px solid #eae7f2;
  border-radius: 14px;
  padding: 20px;
}
.token-comparison-header h3 {
  margin: 0 0 3px;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.token-comparison-header p {
  margin: 0 0 16px;
  font-size: 11px;
  color: var(--muted);
}
.token-comparison-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.token-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.token-task-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.token-bars-duo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.token-subrow {
  display: grid;
  grid-template-columns: 82px 1fr 110px;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}
.token-sublabel {
  color: var(--muted);
}
.token-bar-track {
  height: 10px;
  background: #eeeaf5;
  border-radius: 3px;
  overflow: hidden;
}
.token-fill {
  height: 100%;
  border-radius: 3px;
}
.token-fill-baseline {
  background: #9fa2b2;
}
.token-fill-flowkit {
  background: #7256d8;
}
.token-subval {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #494b59;
}
.badge-saving {
  background: #e9f7ee;
  color: #217d50;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 700;
}

/* ── Responsive Adaptations ── */
@media (max-width: 900px) {
  .hero, .mcp-section, .client-section, .charts-grid { grid-template-columns: 1fr; }
  .summary-cards-grid { grid-template-columns: 1fr 1fr; }
  .token-comparison-bars { grid-template-columns: 1fr; }
  .benchmark-intro { grid-template-columns: 1fr; gap: 24px; }
  .benchmark-section { padding: 42px; }
  .hero { gap: 60px; padding-top: 64px; }
  .workflow-stage { width: min(100%, 570px); justify-self: center; }
  .capabilities { grid-template-columns: 1fr 1fr; }
  .capabilities article:nth-child(2) { border-right: 0; }
  .capabilities article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .site-header, .hero, .capabilities, .mcp-section, .client-section, .benchmark-section, footer {
    width: calc(100% - 30px);
  }
  .site-header { height: 68px; }
  nav > a:not(.nav-cta), .nav-results-btn { display: none; }
  .hero { padding: 58px 0 70px; }
  h1 { font-size: clamp(44px, 14vw, 62px); }
  .intro { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .workflow-stage { min-height: 450px; border-radius: 18px; }
  .node { width: min(248px, calc(100% - 52px)); }
  .capabilities { grid-template-columns: 1fr; margin-bottom: 90px; }
  .capabilities article { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 4px; }
  .front-stats-row { grid-template-columns: 1fr; }
  .front-card-actions { flex-direction: column; }
  .summary-cards-grid { grid-template-columns: 1fr; }
  .donut-and-engines { flex-direction: column; text-align: center; }
  .latency-row { grid-template-columns: 100px 1fr 44px; }
  .matrix-header { flex-direction: column; align-items: stretch; }
  .matrix-filters { flex-direction: column; align-items: stretch; }
  .table-search-input { width: 100%; }
  .token-subrow { grid-template-columns: 75px 1fr 85px; }
  .mcp-section { gap: 42px; padding-bottom: 90px; }
  .client-section { gap: 38px; margin-bottom: 90px; padding-top: 70px; }
  .benchmark-section { margin-bottom: 90px; padding: 28px 20px; border-radius: 18px; }
  .terminal-tabs, .client-tabs { display: grid; }
  .metric-grid { grid-template-columns: 1fr; margin-top: 30px; }
  .metric-grid article { min-height: 86px; border-right: 0; border-bottom: 1px solid var(--line); }
  .benchmark-actions { align-items: stretch; flex-direction: column; }
  .benchmark-actions button { width: 100%; margin: 0; }
  .terminal pre { font-size: 11px; padding-inline: 16px; }
  .modal-window { width: 96%; max-height: 94vh; border-radius: 16px; }
  .modal-header, .modal-tabs, .modal-content { padding-inline: 16px; }
  footer { grid-template-columns: 1fr auto; }
  footer p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ── 2026-11 refresh: five capabilities, tool groups, charts, gallery ── */
.capabilities-5 { grid-template-columns: repeat(5, 1fr); }
.metric-grid-4 { grid-template-columns: repeat(4, 1fr); }
.status-fail { background: #fdecec; color: #b42828; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; }
.intro code, .mcp-copy code, .tools-heading code, .client-heading code, .stage-note code { padding: 1px 5px; border-radius: 5px; background: var(--purple-light); color: #4b32a7; }

.tools-section, .gallery-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 120px;
}
.tools-heading { max-width: 760px; margin-bottom: 36px; }
.tools-heading h2 { margin: 0; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.05em; }
.tools-heading > p:not(.status) { margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-group { padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.tool-group header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool-group h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.tool-group header code { padding: 3px 8px; border-radius: 999px; background: var(--purple-light); color: #4b32a7; font-size: 11px; white-space: nowrap; }
.tool-group p { margin: 8px 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.tool-group ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tool-group li code { display: inline-block; padding: 3px 7px; border-radius: 6px; background: #f4f3f8; color: #3a3b46; font-size: 11.5px; }

.benchmark-charts { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 30px; }
.status b { font-weight: 600; }
.benchmark-charts figure { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fcfcfb; }
.benchmark-charts img { display: block; width: 100%; height: auto; }
a.benchmark-modal-btn { display: inline-flex; align-items: center; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 6px 24px #2b284410; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.gallery-main { grid-column: 1 / -1; }

footer nav { display: flex; gap: 8px; justify-self: end; color: var(--muted); font-size: 13px; }
footer nav a { font-weight: 600; color: var(--ink); }

@media (max-width: 900px) {
  .capabilities-5 { grid-template-columns: 1fr 1fr; }
  .capabilities-5 article { border-bottom: 1px solid var(--line); }
  .metric-grid-4 { grid-template-columns: 1fr 1fr; }
  .tool-groups, .benchmark-charts { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .tools-section, .gallery-section { width: calc(100% - 30px); margin-bottom: 90px; }
  .capabilities-5, .metric-grid-4, .gallery { grid-template-columns: 1fr; }
  footer nav { display: none; }
}

/* Agent skill callout (Agent setup section) */
.skill-callout { max-width: 470px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.skill-callout strong { display: block; font-size: 15px; }
.skill-callout p { margin: 6px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.skill-callout a { color: #5d43be; font-weight: 600; font-size: 14px; }
.skill-callout a:hover { text-decoration: underline; }
