* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #0a0a0a;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

.muted {
  color: #737373;
}

.inline-code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 1px 5px;
  border-radius: 5px;
  color: #0a0a0a;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wrap {
  width: 100%;
  max-width: 608px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.header {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0a0a0a;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #737373;
}

.nav a:hover {
  color: #0a0a0a;
}

/* Main */
.main {
  padding-top: 52px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #525252;
  max-width: 48ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.pill-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 0;
  background: #0a0a0a;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease;
}

.pill-primary:hover {
  background: #262626;
}

.pill-status {
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  color: #a3a3a3;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.pill-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color 140ms ease, background 140ms ease;
}

.pill-secondary:hover {
  border-color: #a3a3a3;
  background: #fafafa;
}

/* Demo card */
.demo-card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.demo-head,
.code-head {
  padding: 10px 16px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #a3a3a3;
  flex-wrap: wrap;
}

.demo-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.demo-tab,
.code-tab {
  border: 0;
  background: transparent;
  color: #737373;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.demo-tab:hover,
.code-tab:hover {
  color: #0a0a0a;
}

.demo-tab.is-active,
.code-tab.is-active {
  background: #0a0a0a;
  color: #ffffff;
}

.replay-btn {
  border: 0;
  background: transparent;
  color: #a3a3a3;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 140ms ease;
}

.replay-btn:hover {
  color: #0a0a0a;
}

.demo-body {
  padding: 18px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trace-row {
  animation: msgIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.trace-center {
  display: flex;
  justify-content: center;
}

.meta-pill {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  color: #737373;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 999px;
  padding: 4px 11px;
  text-align: center;
}

.stage-box {
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 11px 13px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stage-box.is-dark {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #ffffff;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.stage-title {
  font-weight: 600;
}

.stage-stat {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11.5px;
  color: #525252;
}

.stage-box.is-dark .stage-stat {
  color: #d4d4d4;
}

.stage-desc {
  font-size: 12.5px;
  color: #525252;
  line-height: 1.45;
}

.stage-box.is-dark .stage-desc {
  color: #a3a3a3;
}

.tag-pass {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
}

.tag-fail {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b42318;
}

.stage-box.is-dark .tag-pass {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.fork-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Feature list */
.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.list-item h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.list-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.58;
  color: #525252;
}

/* Expandable details */
.more-features {
  margin-top: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fafafa;
  overflow: hidden;
}

.more-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #0a0a0a;
  user-select: none;
  transition: background 140ms ease;
}

.more-summary::-webkit-details-marker {
  display: none;
}

.more-summary:hover {
  background: #f5f5f5;
}

.more-summary::after {
  content: "+";
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  color: #737373;
  margin-left: auto;
}

.more-features[open] .more-summary {
  border-bottom: 1px solid #ececec;
  background: #ffffff;
}

.more-features[open] .more-summary::after {
  content: "-";
}

.more-meta {
  font-size: 12px;
  font-weight: 400;
  color: #a3a3a3;
}

.more-list {
  padding: 18px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.more-item h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0a0a0a;
}

.more-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.56;
  color: #525252;
}

/* Results */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-head .mono {
  font-size: 12px;
}

.section-note {
  margin: 0;
  font-size: 14px;
  color: #525252;
  line-height: 1.55;
}

.section-note a {
  color: #0a0a0a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #737373;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sw {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.sw-1 {
  background: #0a0a0a;
}

.sw-2 {
  background: #737373;
}

.sw-3 {
  background: #d4d4d4;
}

.bars-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 15px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
}

.bar-seg {
  height: 100%;
  transition: width 240ms ease;
}

.table-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  overflow-x: auto;
  background: #ffffff;
}

.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.8px;
}

.bench-table th,
.bench-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid #f5f5f5;
  white-space: nowrap;
}

.bench-table th {
  font-size: 11.5px;
  font-weight: 500;
  color: #737373;
  background: #fafafa;
}

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

/* Code card */
.code-card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  background: #fafafa;
}

.code-card .code-head {
  background: #ffffff;
}

.code-pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 12.2px;
  line-height: 1.65;
  color: #171717;
}

.tok-kw {
  color: #b42318;
  font-weight: 500;
}

.tok-str {
  color: #166534;
}

.tok-num {
  color: #0369a1;
}

.tok-fn {
  color: #1d4ed8;
}

.tok-key {
  color: #525252;
}

.tok-cmt {
  color: #a3a3a3;
}

/* Footer */
.footer {
  padding-top: 8px;
  padding-bottom: 32px;
  font-size: 12px;
  color: #a3a3a3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.footer-links a:hover {
  color: #404040;
}

@media (max-width: 540px) {
  .nav a:nth-child(1),
  .nav a:nth-child(2),
  .more-meta {
    display: none;
  }

  .fork-grid {
    grid-template-columns: 1fr;
  }

  .demo-body {
    min-height: 430px;
  }
}
