:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --surface: #fff;
  --ink: #151b2c;
  --muted: #566075;
  --line: #d9dce0;
  --subtle: #eef0ed;
  --blue: #1f43d4;
  --blue-hover: #1735ad;
  --blue-soft: #e9edff;
  --code: #151d2d;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p, pre, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: var(--blue); }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid #3459ef; outline-offset: 3px; }
section[id] { scroll-margin-top: 1rem; }
.shell { width: min(100% - 5rem, 1240px); margin-inline: auto; }
.skip-link { position: fixed; inset: 0 auto auto 1rem; z-index: 3; padding: 0.8rem; background: white; transform: translateY(-120%); }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 65px; }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.05em; white-space: nowrap; }
.wordmark img { flex: none; }
.wordmark-type { margin-left: 0.35rem; color: var(--muted); font: 600 0.65rem var(--mono); letter-spacing: 0.06em; vertical-align: 0.15em; }
.site-header nav, .site-footer nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); font-size: 0.875rem; font-weight: 600; }
.site-header nav a, .site-footer nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--blue); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border: 1px solid #cdd2da;
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { border-color: #a8b4d0; color: var(--blue); background: #f4f6ff; }
.button:disabled { color: #5e6779; background: #f3f4f6; border-color: #dce0e7; }
.button-small { min-height: 34px; padding: 0.42rem 0.7rem; font-size: 0.8125rem; }
.button-primary { border-color: var(--blue); color: white; background: var(--blue); }
.button-primary:hover { border-color: var(--blue-hover); color: white; background: var(--blue-hover); }
.button-primary:disabled { border-color: var(--blue); color: white; background: var(--blue-hover); opacity: 0.75; }

.hero { padding: clamp(2.75rem, 6vw, 5.5rem) 0 4.5rem; }
.hero-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 0.26fr); align-items: end; gap: clamp(2rem, 6vw, 5rem); margin-bottom: 2.35rem; }
.eyebrow { display: flex; align-items: center; gap: 0.55rem; color: var(--blue); font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.095em; text-transform: uppercase; }
.square { width: 7px; height: 7px; flex: none; background: currentColor; }
.hero h1 { max-width: 900px; margin: 0.85rem 0 1rem; font-size: clamp(2.65rem, 5.55vw, 5.35rem); line-height: 0.98; letter-spacing: -0.075em; font-weight: 800; }
.hero h1 span { display: block; color: var(--blue); }
.hero-copy { max-width: 645px; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.16rem); }
.hero-metrics { display: grid; border-top: 1px solid #aeb8d9; }
.hero-metrics > div { display: flex; flex-direction: column; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.hero-metrics dt { color: var(--muted); font: 0.75rem/1.5 var(--mono); }
.hero-metrics dd { margin-top: 0.15rem; color: var(--ink); font: 700 clamp(1.55rem, 2.8vw, 2.3rem)/1.15 var(--mono); letter-spacing: -0.08em; }
.hero-metrics dd span { color: var(--muted); font-size: 0.51em; font-weight: 400; letter-spacing: 0; }

.workbench { overflow: hidden; border: 1px solid #cdd2da; border-radius: 9px; background: var(--surface); box-shadow: 0 6px 20px #151b2c0b, 0 1px 2px #151b2c0f; }
.workbench-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 51px; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); }
.workbench-heading h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9375rem; letter-spacing: -0.015em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.endpoint { color: #4a566c; font: 0.75rem var(--mono); white-space: nowrap; }
.endpoint span { color: var(--blue); font-weight: 700; }
.workbench-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 0.7rem 0.85rem; padding: 0.75rem 1rem 0.85rem; }
.control { display: grid; gap: 0.25rem; min-width: 5.5rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.template-control { flex: 1 1 14rem; min-width: 0; max-width: 18rem; margin-right: auto; }
select {
  appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 0.35rem 1.8rem 0.35rem 0.65rem;
  border: 1px solid #cdd2da;
  border-radius: 4px;
  color: var(--ink);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23566075' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  font-size: 0.875rem;
  font-weight: 600;
}
select:hover { border-color: #a6adc0; }
.switch-control { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 38px; color: var(--ink); font-size: 0.875rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; width: 32px; height: 20px; margin: 0; }
.switch-track { display: inline-flex; align-items: center; width: 32px; height: 18px; padding: 2px; border: 1px solid #a4adbf; border-radius: 12px; background: #edf0f4; }
.switch-track::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #5b6883; }
.switch-control input:checked + .switch-track { border-color: var(--blue); background: var(--blue); }
.switch-control input:checked + .switch-track::before { margin-left: auto; background: white; }
.switch-control input:focus-visible + .switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.render-button { min-height: 38px; }
.play-icon { font-size: 0.65rem; }
.render-button kbd { padding: 0.1rem 0.25rem; border: 1px solid #ffffff61; border-radius: 3px; font-size: 0.72rem; }

.workbench-panes { display: grid; grid-template-columns: 1fr 1fr; }
.source-pane, .preview-pane { min-width: 0; }
.source-pane { background: var(--code); color: #dce4f3; }
.pane-heading { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0.45rem 1rem; font: 0.75rem/1.4 var(--mono); }
.pane-heading label { font-weight: 600; }
.source-pane .pane-heading { border-bottom: 1px solid #354056; }
.source-pane .pane-heading > span { color: #a9b5ca; }
.file-icon { margin-right: 0.25rem; color: #a9bcff; }
.preview-pane .pane-heading { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f2f4f8; color: #39455e; font-weight: 600; }
.preview-state { padding: 0.18rem 0.43rem; border-radius: 3px; color: #4b566d; background: #e5e9f0; font-weight: 400; text-align: right; }
.preview-state[data-state="complete"] { color: #1c5941; background: #dcefe6; }

.editor { --editor-line: 21px; --editor-padding: 14px; --gutter-width: 3.15rem; position: relative; height: 414px; font: 0.8125rem/var(--editor-line) var(--mono); }
.editor-gutter { position: absolute; inset: 0 auto 0 0; width: var(--gutter-width); overflow: hidden; padding: var(--editor-padding) 0.8rem; border-right: 1px solid #2c384d; color: #8a9ab6; text-align: right; user-select: none; }
.editor-highlight, .editor-input { position: absolute; inset: 0 0 0 var(--gutter-width); width: calc(100% - var(--gutter-width)); min-height: 100%; padding: var(--editor-padding); border: 0; border-radius: 0; font: inherit; font-variant-ligatures: none; tab-size: 2; white-space: pre; }
.editor-highlight { overflow: hidden; color: #dce4f3; pointer-events: none; }
.editor-input { resize: none; color: transparent; caret-color: white; background: transparent; -webkit-text-fill-color: transparent; }
.editor-input::selection { color: transparent; background: #587be970; }
.editor-input:focus-visible { outline: 2px solid #9caeff; outline-offset: -2px; }
.syntax-tag { color: #9eb5ff; }
.syntax-string { color: #a4e0bb; }
.syntax-comment { color: #93a4be; }
.syntax-property { color: #bccbff; }
@media (forced-colors: active) {
  .editor-highlight { display: none; }
  .editor-input { color: CanvasText; -webkit-text-fill-color: CanvasText; caret-color: CanvasText; }
}

.preview-body {
  position: relative;
  height: 414px;
  background-color: #edf0f5;
  background-image: radial-gradient(#bdc6d7 0.75px, transparent 0.75px);
  background-size: 15px 15px;
}
.sample-scroll { height: 100%; overflow: auto; padding: 24px clamp(10px, 4.4vw, 64px); }
.sample-sheet { position: relative; width: 100%; max-width: 450px; margin: 0 auto; overflow: hidden; background: white; box-shadow: 0 2px 15px #17284b25; }
.sample-sheet iframe { position: absolute; inset: 0; display: block; width: 690px; height: 976px; border: 0; transform-origin: top left; pointer-events: none; }
.rendered-preview { height: 100%; overflow: auto; }
.rendered-preview iframe { display: block; width: 100%; height: 100%; border: 0; }
.rendered-preview img { display: block; max-width: calc(100% - 2rem); height: auto; margin: 1rem auto; box-shadow: 0 2px 15px #17284b25; }

.workbench-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.7rem 1rem 0.35rem; border-top: 1px solid var(--line); }
.telemetry, .workbench-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.telemetry div { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.36rem 0.62rem; border: 1px solid #e0e3eb; border-radius: 4px; background: #f4f5f8; font: 0.75rem/1.45 var(--mono); }
.telemetry dt { color: var(--muted); }
.telemetry dd { font-weight: 700; color: var(--ink); }
.render-status { min-height: 2rem; padding: 0.16rem 1rem 0.6rem; color: var(--muted); font-size: 0.8125rem; }
.render-status[data-error="true"] { color: #9b242e; }

.section { padding: clamp(3.75rem, 7vw, 6.75rem) 0; border-top: 1px solid var(--line); }
.section-header { display: grid; grid-template-columns: 1fr minmax(230px, 0.47fr); align-items: end; gap: 1.5rem clamp(2rem, 7vw, 5rem); margin-bottom: 1.75rem; }
.section h2, .migration-section h2, dialog h2 { margin-top: 0.5rem; font-size: clamp(2.1rem, 4vw, 3.65rem); line-height: 1.02; letter-spacing: -0.063em; }
.section-header > p, .docs-grid > div > p:not(.eyebrow) { color: var(--muted); font-size: 1rem; }
.benchmark-section { background: var(--surface); }
.benchmark-meta { margin-bottom: 0.65rem; color: var(--muted); font: 0.75rem/1.55 var(--mono); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.comparison { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 0.875rem; }
.comparison th, .comparison td { padding: 0.9rem 1rem; border-bottom: 1px solid #e7e9ee; text-align: left; vertical-align: top; }
.comparison tr:last-child > * { border-bottom: 0; }
.comparison thead tr > * { border-bottom: 1px solid var(--line) !important; }
.comparison thead { background: #f3f4f8; }
.comparison thead th { color: #28334b; }
.comparison th:nth-child(2), .comparison td:nth-child(2) { background: #eef1fe; }
.comparison td[data-metric] { font: 0.875rem/1.55 var(--mono); }
.comparison td[data-measured="true"] { font-weight: 700; }
.comparison th small, .comparison td small { display: block; margin-top: 0.2em; color: var(--muted); font: 0.75rem/1.4 var(--mono); }
.methodology { margin-top: 1rem; border-bottom: 1px solid var(--line); }
.methodology summary { padding: 0.55rem 0 0.7rem; color: var(--ink); font-size: 0.875rem; font-weight: 700; }
.method-body { display: grid; gap: 0.7rem; padding-bottom: 1rem; color: var(--muted); font-size: 0.875rem; }
.method-body code { white-space: pre-wrap; overflow-wrap: anywhere; }
.method-body pre { padding: 0.7rem 0.9rem; border-radius: 4px; color: var(--ink); background: var(--subtle); }
.method-body h3 { margin: 1rem 0 0.4rem; color: var(--ink); }
.method-body ul { margin: 0.75rem 0 0; padding-left: 1.2rem; }
.detail-table { width: 100%; min-width: 550px; border-collapse: collapse; font: 0.75rem/1.4 var(--mono); }
.detail-table th, .detail-table td { padding: 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
.detail-table tbody tr:last-child > * { border: 0; }

.docs-grid { display: grid; grid-template-columns: minmax(0, 0.69fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 6vw, 5rem); }
.docs-grid h2 { max-width: 440px; margin-bottom: 1rem; }
.docs-grid p code { color: var(--blue); font-size: 0.84em; font-weight: 700; }
.cli-card { display: grid; justify-items: start; gap: 0.75rem; margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.cli-card h3 { font-size: 0.875rem; }
.cli-card pre { max-width: 100%; padding-bottom: 0.25rem; overflow-x: auto; font-size: 0.8125rem; }
.code-panel { overflow: hidden; border-radius: 7px; color: #e3e9fa; background: var(--code); }
.code-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.7rem; border-bottom: 1px solid #3b455b; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.tabs button { min-height: 32px; padding: 0.35rem 0.55rem; border: 1px solid transparent; border-radius: 4px; color: #abb8d2; background: transparent; font: 0.8125rem/1.2 var(--mono); }
.tabs button:hover { color: white; }
.tabs button[aria-selected="true"] { border-color: #526286; color: white; background: #2b3856; }
.tabs button:focus-visible, .code-top button:focus-visible { outline-color: #a9bcff; }
.code-top .button { border-color: #526286; color: #e3e9fa; background: transparent; }
.code-top .button:hover { color: white; background: #2b3856; }
.code-panel pre { min-height: 220px; max-height: 360px; padding: 1.2rem; overflow: auto; font: 0.8125rem/1.65 var(--mono); scrollbar-color: #566589 var(--code); }

.pricing-section { background: white; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.plan { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; padding: clamp(0.95rem, 1.6vw, 1.4rem); border: 1px solid var(--line); border-radius: 6px; }
.plan-pro { border-color: #a0afea; background: #f5f7ff; }
.plan h3 { font-size: 1.03rem; letter-spacing: -0.025em; }
.price { color: var(--ink); font: 700 clamp(1.8rem, 3vw, 2.55rem)/1.1 var(--mono); letter-spacing: -0.095em; }
.price span, .annual { color: var(--muted); font: 0.75rem/1.3 var(--mono); letter-spacing: 0; }
.price span { margin-left: 0.35em; }
.annual { margin-top: -0.45rem; }
.plan ul { display: grid; gap: 0.45rem; margin: 0.15rem 0 1rem; padding: 0; list-style: none; }
.plan li { display: grid; grid-template-columns: 0.55rem 1fr; gap: 0.5rem; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.plan li::before { content: ""; width: 0.3rem; height: 0.3rem; margin-top: 0.45rem; background: var(--blue); }
.plan li:has(code) { display: block; padding-left: 1.05rem; position: relative; }
.plan li:has(code)::before { position: absolute; left: 0; }
.plan .button { width: 100%; margin-top: auto; white-space: normal; }

.migration-section { padding: clamp(2.7rem, 6vw, 5rem) 0; background: var(--blue); color: white; }
.migration-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.75rem; }
.migration-section .eyebrow { color: #e2e8ff; }
.migration-section p:last-child { max-width: 720px; margin-top: 0.85rem; color: #eef1ff; font-size: 1rem; }
.button-light { border-color: white; color: var(--blue); background: white; }
.button-light:hover { border-color: #d8e0ff; }
.migration-section :focus-visible { outline-color: white; }
.site-footer { border-top: 1px solid #1636bd; }
.footer-inner { min-height: 76px; }

dialog { width: min(calc(100% - 2rem), 480px); max-height: calc(100% - 2rem); padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 20px 70px #101e5259; }
dialog::backdrop { background: #151b2c91; }
.dialog-inner { position: relative; padding: 1.5rem; }
dialog h2 { margin-bottom: 0.55rem; font-size: 1.9rem; }
dialog p:not(.eyebrow) { color: var(--muted); font-size: 0.875rem; }
.dialog-close { position: absolute; top: 0.8rem; right: 0.85rem; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; font-size: 1.3rem; line-height: 1; }
.request-form { display: grid; gap: 0.65rem; margin-top: 1rem; }
.request-form label { display: grid; gap: 0.2rem; font-size: 0.875rem; font-weight: 700; }
.request-form input, .request-form textarea { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid #cdd2da; border-radius: 4px; color: var(--ink); background: white; font-weight: 400; }
.request-form textarea { resize: vertical; }
.request-status:empty { display: none; }
.toast { position: fixed; z-index: 2; right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); padding: 0.7rem 1rem; border: 1px solid #3c4867; border-radius: 5px; color: white; background: var(--code); font-size: 0.875rem; }

@media (max-width: 980px) {
  .shell { width: calc(100% - 3rem); }
  .hero-intro { gap: 2rem; }
  .template-control { flex-basis: 100%; max-width: none; }
  .render-button { margin-left: auto; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: auto; flex-wrap: wrap; gap: 0.55rem; padding: 0.65rem 0; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 0.4rem; padding: 0.25rem 0 0; }
  .hero { padding-bottom: 3.25rem; }
  .hero-intro, .section-header, .docs-grid, .migration-inner { grid-template-columns: 1fr; }
  .hero-intro { gap: 1.25rem; margin-bottom: 1.4rem; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .hero-metrics > div { padding: 0.55rem 0; }
  .workbench-heading { padding-inline: 0.7rem; }
  .endpoint { font-size: 0.67rem; }
  .workbench-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 0.4rem; padding-inline: 0.7rem; }
  .control { min-width: 0; }
  .control select { padding-left: 0.45rem; padding-right: 1.3rem; background-position: right 0.38rem center; background-size: 9px; font-size: 0.8125rem; }
  .template-control { grid-column: 1 / -1; margin: 0; }
  .switch-control { min-width: 0; }
  .render-button { grid-column: span 2; }
  .workbench-panes { grid-template-columns: 1fr; }
  .editor { height: 244px; --gutter-width: 2.45rem; --editor-padding: 10px; }
  .editor-gutter { padding-inline: 0.55rem; }
  .preview-body { height: 330px; }
  .workbench-footer { padding-inline: 0.7rem; }
  .render-status { padding-inline: 0.7rem; }
  .telemetry { gap: 0.3rem; }
  .telemetry div { gap: 0.3rem; padding: 0.32rem 0.4rem; font-size: 0.69rem; }
  .section-header { gap: 0.85rem; }
  .migration-inner { justify-items: start; }
  .footer-inner { flex-wrap: wrap; gap: 0.6rem; padding: 0.75rem 0; }
}

@media (max-width: 420px) {
  .plans { grid-template-columns: 1fr; }
  .pane-heading { padding-inline: 0.65rem; }
  .code-top { padding: 0.45rem; }
  .tabs button { padding-inline: 0.36rem; }
  .site-footer nav { gap: 0.75rem; }
}
