:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f2f4f7;
  --ink: #111318;
  --ink-soft: #303642;
  --muted: #667085;
  --border: #d7dde7;
  --hairline: rgb(17 19 24 / 10%);
  --blue: #0f6fff;
  --blue-strong: #004ec2;
  --green: #14805e;
  --amber: #9c6514;
  --rose: #b4233b;
  --code: #111318;
  --code-line: #98a2b3;
  --shadow-soft: 0 18px 50px rgb(17 19 24 / 10%);
  --shadow-strong: 0 32px 90px rgb(17 19 24 / 18%);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  padding: 10px 12px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgb(215 221 231 / 76%);
  background: rgb(246 247 249 / 82%);
  backdrop-filter: blur(20px);
}

.nav-shell {
  display: flex;
  width: min(var(--max), calc(100% - 32px));
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 820;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span {
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 690;
}

.nav-links a {
  text-decoration: none;
}

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

.nav-editor-link,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.nav-editor-link {
  padding: 0 14px;
  background: var(--ink);
  color: white;
}

.nav-editor-link:hover,
.button.primary:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 66px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: #f8f9fb;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 92px 24px 48px;
  opacity: 0.94;
}

.product-stage {
  display: grid;
  grid-template-columns: 180px minmax(420px, 1fr) minmax(260px, 0.56fr);
  grid-template-rows: minmax(340px, 54vh) 142px;
  gap: 12px;
  width: min(1240px, 100%);
  margin: 0 auto;
  transform: translateX(120px) rotateX(0deg);
}

.stage-sidebar,
.stage-editor,
.stage-preview,
.stage-inspector {
  border: 1px solid rgb(17 19 24 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.stage-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.stage-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
}

.stage-pill,
.stage-file,
.stage-divider {
  display: block;
}

.stage-pill {
  height: 9px;
  width: 70%;
  border-radius: 999px;
  background: #c5cedb;
}

.stage-pill.wide {
  width: 90%;
}

.stage-pill.short {
  width: 52%;
}

.stage-divider {
  height: 1px;
  margin: 10px 0 4px;
  background: var(--border);
}

.stage-file {
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.stage-file.active {
  background: #eef4ff;
  color: var(--blue-strong);
}

.stage-editor {
  overflow: hidden;
  background: #101217;
  color: #e7ebf2;
}

.stage-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  padding: 0 16px;
  color: #aeb8c8;
  font-size: 12px;
  font-weight: 720;
}

.stage-toolbar strong {
  color: #8fe0b6;
}

.stage-editor pre {
  margin: 0;
  padding: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.stage-preview {
  padding: 30px;
  background: #ffffff;
}

.paper-label {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.stage-preview h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.stage-preview p {
  color: #3b4250;
  font-family: Georgia, "Times New Roman", serif;
}

.paper-rule {
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}

.paper-lines {
  display: grid;
  gap: 10px;
}

.paper-lines span {
  height: 10px;
  border-radius: 999px;
  background: #d8dee8;
}

.paper-lines span:nth-child(2) {
  width: 72%;
}

.stage-inspector {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.check {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 760;
}

.check.good {
  border-color: rgb(20 128 94 / 34%);
  color: var(--green);
}

.check.warn {
  border-color: rgb(156 101 20 / 34%);
  color: var(--amber);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  align-self: end;
  margin: 0 auto;
  padding: 110px 0 92px;
}

.eyebrow {
  margin: 0;
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 96px;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.42;
}

.hero-actions,
.toolbar-actions,
.hero-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-bottom: 18px;
}

.button {
  min-width: 152px;
  padding: 0 18px;
}

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

.button.secondary {
  border-color: var(--hairline);
  background: rgb(255 255 255 / 78%);
  color: var(--ink);
  backdrop-filter: blur(16px);
}

.button.secondary:hover {
  border-color: rgb(17 19 24 / 22%);
  background: white;
  transform: translateY(-1px);
}

.hero-commands button {
  min-height: 34px;
  border: 1px solid rgb(17 19 24 / 14%);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 64%);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 760;
  backdrop-filter: blur(14px);
}

.hero-commands button.active,
.hero-commands button:hover {
  background: var(--ink);
  color: white;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.trust-strip div {
  min-height: 108px;
  padding: 24px;
  border-right: 1px solid var(--hairline);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.trust-strip span {
  color: var(--muted);
  font-size: 14px;
}

.section-band {
  padding: 98px 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--page);
}

.section-band:nth-of-type(even) {
  background: var(--surface);
}

.section-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.section-inner.wide {
  width: min(1360px, calc(100% - 32px));
}

.section-inner.narrow {
  width: min(820px, calc(100% - 32px));
}

.section-heading {
  display: grid;
  max-width: 790px;
  gap: 14px;
  margin-bottom: 30px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.section-heading a {
  color: var(--blue-strong);
  font-weight: 800;
  text-decoration: none;
}

.demo-workspace {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.workspace-topbar {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.traffic {
  display: flex;
  gap: 7px;
}

.traffic span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #e25d56;
}

.traffic span:nth-child(2) {
  background: #e6b240;
}

.traffic span:nth-child(3) {
  background: #35bc78;
}

.project-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.project-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta span {
  color: var(--muted);
  font-size: 12px;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #edf1f6;
}

.mode,
.icon-button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 780;
}

.mode.active {
  border-color: #ccd5e3;
  background: var(--surface);
  color: var(--blue-strong);
}

.icon-button {
  min-width: 48px;
  padding: 0 10px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}

.button.compact {
  min-width: 94px;
  min-height: 34px;
  padding: 0 14px;
}

.workspace-grid {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(360px, 1.1fr) minmax(340px, 0.92fr) minmax(
      250px,
      0.56fr
    );
}

.source-panel,
.preview-panel,
.inspector-panel {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.inspector-panel {
  display: flex;
  flex-direction: column;
  border-right: 0;
}

.panel-title {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.editor-shell {
  display: grid;
  height: calc(100% - 42px);
  min-height: 518px;
  grid-template-columns: 46px 1fr;
  background: var(--code);
}

.line-numbers {
  height: 100%;
  margin: 0;
  padding: 14px 0 14px 10px;
  overflow: hidden;
  border-right: 1px solid rgb(255 255 255 / 8%);
  color: var(--code-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 22px;
  list-style: none;
  text-align: right;
}

.line-numbers li {
  height: 22px;
  padding-right: 10px;
}

.line-numbers li.active {
  color: white;
  background: rgb(15 111 255 / 30%);
}

#source-editor {
  width: 100%;
  height: 100%;
  min-height: 518px;
  resize: none;
  border: 0;
  outline: none;
  padding: 14px 16px;
  color: #d9e3f3;
  background: var(--code);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 22px;
  white-space: pre;
  tab-size: 2;
}

.pdf-page {
  width: min(100% - 44px, 390px);
  min-height: 472px;
  margin: 22px auto;
  padding: 30px;
  border: 1px solid #d2d8e3;
  background: white;
  box-shadow: 0 18px 40px rgb(17 19 24 / 14%);
  cursor: pointer;
}

.pdf-page h3 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.pdf-abstract,
.pdf-sections p {
  color: #374151;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.55;
}

.pdf-sections h4 {
  margin: 18px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.pdf-section {
  padding: 3px 5px;
  margin-left: -5px;
  border-radius: 4px;
}

.pdf-section:hover,
.pdf-section.active {
  background: #e8f0ff;
}

.pdf-equation {
  margin: 22px 0;
  padding: 13px 10px;
  border: 1px solid #d8e0ec;
  background: #f8fafc;
  color: #24324a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  text-align: center;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.score-strip div {
  display: grid;
  min-height: 76px;
  align-content: center;
  justify-items: center;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.score-strip div:last-child {
  border-right: 0;
}

.metric {
  color: var(--ink);
  font-size: 22px;
  font-weight: 860;
}

.diagnostics {
  display: grid;
  gap: 10px;
  min-height: 250px;
  margin: 0;
  padding: 14px;
  list-style: none;
}

.diagnostics li {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfdff;
  cursor: pointer;
}

.diagnostics li.error {
  border-left-color: var(--rose);
}

.diagnostics li.warn {
  border-left-color: var(--amber);
}

.diagnostics li.ok {
  border-left-color: var(--green);
}

.diagnostics strong,
.diagnostics span {
  display: block;
}

.diagnostics strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.diagnostics span {
  color: var(--muted);
  font-size: 12px;
}

.install-panel {
  margin: auto 14px 14px;
  padding: 14px;
  border: 1px solid #cbd8e8;
  border-radius: var(--radius);
  background: #f8fbff;
}

.install-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.install-panel p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.install-panel a {
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.workspace-status {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.busy {
  background: var(--amber);
}

.status-dot.error {
  background: var(--rose);
}

.workflow-grid,
.feature-grid,
.download-grid {
  display: grid;
  gap: 16px;
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid,
.download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-card,
.feature-card,
.download-card,
.downloads-empty,
.downloads-meta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(17 19 24 / 7%);
}

.workflow-card,
.feature-card,
.download-card {
  padding: 22px;
}

.workflow-card span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 880;
}

.workflow-card p,
.feature-card p,
.download-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.download-card {
  display: grid;
  align-content: space-between;
  min-height: 190px;
}

.download-card a {
  width: fit-content;
  margin-top: 18px;
}

.download-card small,
.download-card span {
  display: block;
  color: #7a8596;
  font-size: 13px;
  font-weight: 720;
}

.cli-band {
  background: #eef3f7;
}

.cli-install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 12px 34px rgb(17 19 24 / 7%);
}

.command-line {
  min-width: 0;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--code);
  color: #f6f8fb;
  padding: 16px;
}

.command-line code {
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.cli-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 820;
}

.faq-list p {
  margin: 14px 0 0;
  color: var(--muted);
}

.faq-list a {
  color: var(--blue-strong);
  font-weight: 760;
}

.faq-list code {
  border-radius: 5px;
  background: #edf2f7;
  color: var(--ink-soft);
  padding: 2px 5px;
  font-size: 0.9em;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 24px;
  align-items: center;
  padding: 34px max(16px, calc((100% - var(--max)) / 2));
  background: var(--ink);
  color: #d2d8e3;
}

.site-footer p {
  margin: 10px 0 0;
  color: #98a2b3;
  font-size: 14px;
}

.site-footer .brand {
  color: white;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: #d2d8e3;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.downloads-page {
  width: min(1080px, calc(100% - 32px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  padding: 72px 0 86px;
}

.docs-page {
  width: min(var(--max), calc(100% - 32px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  padding: 72px 0 86px;
}

.docs-hero,
.downloads-hero {
  max-width: 760px;
  margin-bottom: 28px;
}

.docs-hero h1,
.downloads-hero h1 {
  margin: 8px 0 16px;
  font-size: 70px;
}

.legal-page h1 {
  margin: 8px 0 16px;
  font-size: 64px;
}

.docs-hero p,
.downloads-hero p,
.legal-page p,
.legal-page li,
.downloads-empty p,
.downloads-meta p {
  color: var(--muted);
  font-size: 18px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.docs-toc {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 12px 34px rgb(17 19 24 / 6%);
}

.docs-toc a {
  border-radius: 6px;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.docs-toc a:hover {
  background: #eef4ff;
  color: var(--blue-strong);
}

.docs-document {
  display: grid;
  gap: 18px;
}

.docs-document section {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 12px 34px rgb(17 19 24 / 7%);
}

.docs-document h2,
.docs-document h3,
.docs-document p,
.docs-document ul,
.docs-document ol {
  margin: 0;
}

.docs-document h2 {
  font-size: 34px;
}

.docs-document p,
.docs-document li {
  color: var(--muted);
  font-size: 17px;
}

.docs-document ul,
.docs-document ol {
  padding-left: 22px;
}

.docs-document code {
  border-radius: 5px;
  background: #edf2f7;
  color: var(--ink-soft);
  padding: 2px 5px;
  font-size: 0.9em;
}

.docs-document a {
  color: var(--blue-strong);
  font-weight: 760;
}

.docs-callout,
.docs-grid > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 16px;
}

.docs-callout p {
  margin-top: 6px;
}

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

.docs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-document {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 12px 34px rgb(17 19 24 / 7%);
}

.legal-document section {
  display: grid;
  gap: 10px;
}

.legal-document h2 {
  margin: 0;
  font-size: 24px;
}

.legal-document p,
.legal-document ul {
  margin: 0;
}

.legal-document ul {
  padding-left: 22px;
}

.legal-document a {
  color: var(--blue-strong);
  font-weight: 760;
}

.downloads-grid {
  display: grid;
  gap: 14px;
}

.downloads-grid .download-card {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.downloads-meta,
.downloads-empty {
  margin-top: 18px;
  padding: 22px;
}

.downloads-meta dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.downloads-meta dl div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
}

.downloads-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.downloads-meta dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 820;
}

.downloads-meta a {
  color: var(--blue-strong);
  font-weight: 820;
  text-decoration: none;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 76px;
  }

  h2 {
    font-size: 40px;
  }

  .product-stage {
    grid-template-columns: 130px minmax(320px, 1fr);
    grid-template-rows: 360px 130px;
    transform: translateX(80px);
  }

  .stage-preview {
    display: none;
  }

  .stage-inspector {
    grid-column: 1 / 3;
  }

  .workspace-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  }

  .inspector-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .feature-grid,
  .download-grid,
  .docs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    top: 66px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .nav-editor-link {
    width: 100%;
  }

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

  .docs-toc {
    position: static;
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-backdrop {
    align-items: end;
    padding: 250px 16px 34px;
  }

  .product-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 300px;
    transform: none;
  }

  .stage-sidebar,
  .stage-inspector {
    display: none;
  }

  .hero-content {
    align-self: start;
    padding: 70px 0 24px;
  }

  h1 {
    font-size: 60px;
  }

  h2,
  .downloads-hero h1,
  .legal-page h1 {
    font-size: 34px;
  }

  .hero-lede {
    font-size: 18px;
  }

  .trust-strip,
  .workflow-grid,
  .feature-grid,
  .download-grid,
  .downloads-meta dl {
    grid-template-columns: 1fr;
  }

  .cli-install {
    grid-template-columns: 1fr;
  }

  .cli-links {
    justify-content: flex-start;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .section-band {
    padding: 72px 0;
  }

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

  .mode-switch,
  .toolbar-actions {
    grid-column: 1 / -1;
  }

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

  .preview-panel,
  .source-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .downloads-grid .download-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    min-width: 0;
  }

  #source-editor,
  .line-numbers {
    font-size: 12px;
  }

  .pdf-page {
    width: calc(100% - 24px);
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
