:root {
  color-scheme: light;
  --text: #1f2328;
  --muted: #57606a;
  --border: #d7dce3;
  --soft-border: #e5e7eb;
  --panel: #f6f8fa;
  --accent: #217346;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--accent);
  fill: currentColor;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 14px;
}

nav a,
.toc a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
}

nav svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: 0 0 auto;
}

.nav-separator {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: var(--border);
}

nav a:hover,
.brand:hover,
.toc a:hover {
  color: var(--accent);
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero {
  max-width: none;
  padding: 44px 0 32px;
}

.home-hero {
  display: grid;
  justify-items: center;
  text-align: center;
}

.pricing-hero {
  padding-bottom: 10px;
}

.docs-hero {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 980px;
  color: #111827;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.03;
  letter-spacing: 0;
}

.lede {
  margin: 16px 0 0;
  max-width: 860px;
  color: #4f5b67;
  font-size: 18px;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 22px;
}

.home-hero .actions {
  justify-content: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.home-hero .hero-meta {
  justify-content: center;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta span:not(:last-child)::after {
  content: "/";
  margin: 0 9px;
  color: #9aa4b2;
  font-weight: 600;
}

.badges span,
.metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  margin: 30px 0 0;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(31, 35, 40, 0.04);
}

.home-hero .install {
  justify-content: center;
}

.install span {
  color: var(--accent);
  font:
    700 13px/1 "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.install code,
.markdown code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.install code {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.demo {
  display: grid;
  gap: 20px;
  margin: 0 0 46px;
  padding: 26px 0 36px;
  border-top: 1px solid var(--soft-border);
  border-bottom: 1px solid var(--soft-border);
}

.demo-copy {
  max-width: 760px;
}

.demo-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

.demo-copy p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #4f5b67;
  font-size: 15px;
  line-height: 1.65;
}

.demo-panel {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 580px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.demo-controls {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 16px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.sample-file-row {
  display: grid;
  gap: 10px;
}

.sample-buttons {
  display: grid;
  gap: 8px;
}

.sample-button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.sample-button:hover,
.sample-button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.local-file-row {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.theme-toggle-row {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.local-file-title {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.local-file-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.local-file-button {
  width: 100%;
  border-color: var(--accent);
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
}

.local-file-button:hover {
  background: #eef5ff;
}

.theme-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  background: #ffffff;
}

.theme-toggle-button {
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.theme-toggle-button:hover,
.theme-toggle-button.active {
  background: var(--accent);
  color: #ffffff;
}

#workbook-input {
  display: none;
}

.viewer-frame {
  min-width: 0;
  min-height: 580px;
  background: #ffffff;
}

.pillars,
.developer-experience,
.performance,
.pricing-cta,
.faq {
  margin: 0 0 46px;
  padding: 32px 0;
  border-bottom: 1px solid var(--soft-border);
}

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

.pillars article,
.pricing-cta,
.faq details {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.pillars article {
  padding: 20px;
}

.pillars h2,
.developer-experience h2,
.performance h2,
.pricing-cta h2,
.faq h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

.pillars p,
.developer-experience p,
.performance p,
.faq p {
  margin: 10px 0 0;
  color: #4f5b67;
  font-size: 15px;
  line-height: 1.65;
}

.developer-experience,
.performance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 28px;
  align-items: start;
}

.badges,
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.code-panel {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
  font:
    500 13px/1.65 "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.pricing-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 22px;
}

.pricing-cta .button {
  white-space: nowrap;
}

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

.section-note a {
  color: var(--accent);
  text-decoration: none;
}

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

.faq details {
  overflow: hidden;
}

.faq summary {
  display: block;
  min-height: 54px;
  padding: 16px 18px;
  cursor: pointer;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  list-style: none;
}

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

.faq details[open] summary {
  border-bottom: 1px solid var(--soft-border);
}

.faq details p {
  padding: 0 18px 16px;
}

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

.docs-layout {
  padding-top: 28px;
  border-top: 1px solid var(--soft-border);
}

.toc {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  padding-top: 6px;
  font-size: 13px;
}

.markdown {
  max-width: 780px;
}

.markdown h1 {
  display: none;
}

.markdown h2 {
  margin: 34px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--soft-border);
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

.markdown h3 {
  margin: 24px 0 8px;
  color: #111827;
  font-size: 18px;
}

.markdown p,
.markdown li {
  color: #374151;
  font-size: 15px;
  line-height: 1.72;
}

.markdown p {
  margin: 0 0 14px;
}

.markdown ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

.markdown pre {
  overflow-x: auto;
  margin: 14px 0 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
}

.markdown pre code {
  font-size: 13px;
  line-height: 1.65;
}

.markdown p code,
.markdown li code {
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--panel);
  color: #111827;
  font-size: 13px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.plan {
  display: grid;
  gap: 22px;
  align-content: space-between;
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.plan h2 {
  margin: 0;
  font-size: 20px;
}

.price {
  margin: 12px 0 0;
  color: #111827;
  font-size: 34px;
  font-weight: 800;
}

.price span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.description {
  margin: 10px 0 0;
  color: #4f5b67;
  font-size: 14px;
  line-height: 1.55;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #374151;
  font-size: 14px;
  line-height: 1.45;
}

.checkout-panel {
  max-width: 680px;
  margin: 72px auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  text-align: center;
}

.checkout-panel h1 {
  max-width: none;
  font-size: clamp(30px, 5vw, 44px);
}

.checkout-panel p:not(.eyebrow) {
  margin: 14px auto 0;
  max-width: 520px;
  color: #4f5b67;
  font-size: 15px;
  line-height: 1.65;
}

.checkout-panel .button {
  margin-top: 22px;
}

.checkout-fallback a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 840px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .layout,
  .pricing-grid,
  .demo-panel,
  .pillars,
  .developer-experience,
  .performance {
    grid-template-columns: 1fr;
  }

  .pricing-cta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .demo-controls {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .viewer-frame,
  .demo-panel {
    min-height: 520px;
  }

  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--soft-border);
  }

  .hero {
    padding-top: 38px;
  }
}
