/* Page roles resolve from the canonical brand stylesheet. Editor illustrations
   resolve from the generated native themes, not a hand-painted lookalike. */
:root {
  --page: var(--memql-bg);
  --ink: var(--memql-fg);
  --muted: var(--memql-fg-muted);
  --accent: var(--memql-accent);
  --pale: var(--memql-accent-subtle);
  --line: var(--memql-border-strong);
  --code: var(--editor-bg);
  font-family: var(--memql-font-sans);
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
p {
  line-height: 1.7;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 650;
}
h3 {
  font-size: 1.13rem;
  letter-spacing: -0.02em;
}
.wrap {
  width: min(1216px, calc(100% - 96px));
  margin-inline: auto;
}
.header {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 102px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1px;
}
.product-name {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  font-size: 13px;
  color: var(--muted);
}
nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header nav {
  margin-left: auto;
  font-size: 13px;
}
nav a {
  text-decoration: none;
  color: var(--ink);
}
.nav-cta {
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
}
.hero > * {
  min-width: 0;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 54px;
  padding-block: 94px 74px;
}
.product-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 26px;
}
.file-icon {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}
h1 {
  font-size: clamp(3.8rem, 6.4vw, 5.6rem);
  line-height: 1.025;
  letter-spacing: -0.065em;
  font-weight: 680;
  margin-bottom: 26px;
}
.lead {
  font-size: 17px;
  max-width: 450px;
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: center;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.primary {
  background: var(--accent);
  color: var(--memql-accent-fg);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 12%, transparent);
}
.primary:hover {
  background: color-mix(in srgb, var(--accent) 90%, var(--ink));
}
.text-link {
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
.text-link span {
  margin-left: 4px;
}
.hero-detail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}
.code-figure {
  position: relative;
  padding: 22px 0 0 19px;
}
.code-figure::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -20px 40px 0;
  background: var(--pale);
  border-radius: 16px;
}
.editor {
  background: var(--code);
  color: var(--editor-fg);
  border-radius: 9px;
  box-shadow: 0 26px 44px -26px color-mix(in srgb, var(--ink) 25%, transparent);
  overflow: hidden;
}
.editor-title {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--editor-rail);
  padding: 17px 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.file-dot {
  width: 8px;
  height: 10px;
  border: 1px solid var(--editor-comment);
  border-radius: 1px;
}
.editor-mode {
  margin-left: auto;
  color: var(--editor-comment);
  font-size: 10px;
}
pre,
code {
  /* Keep DSL operators identical to their source and copied text. */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
}
pre {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.9;
  font-size: 12px;
  overflow-x: auto;
  tab-size: 2;
}
code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}
pre code {
  font-size: inherit;
}
.editor-code {
  padding: 25px 24px 28px;
}
.comment {
  color: var(--editor-comment);
}
.annotation {
  color: var(--editor-keyword);
}
.keyword {
  color: var(--editor-keyword);
}
.string {
  color: var(--editor-string);
}
.type {
  color: var(--editor-number);
}
.editor-explanation {
  display: flex;
  gap: 15px;
  border-top: 1px solid var(--editor-line);
  padding: 19px 24px;
}
.annotation-sign {
  color: var(--editor-keyword);
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
}
.editor-explanation strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
  margin-bottom: 6px;
}
.editor-explanation span:not(.annotation-sign) {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: var(--editor-comment);
  max-width: 300px;
}
.editor-footer {
  border-top: 1px solid var(--editor-line);
  display: flex;
  gap: 20px;
  padding: 10px 24px;
  background: var(--editor-rail);
  font-size: 10px;
  color: var(--editor-comment);
}
.editor-footer span:last-child {
  margin-left: auto;
}
.code-figure figcaption {
  font-size: 10px;
  color: var(--muted);
  margin: 17px 0 0;
  line-height: 1.5;
}
.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-block: 31px 38px;
  border-block: 1px solid var(--line);
  gap: 50px;
}
.capabilities > div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px 13px;
}
.capability-icon {
  white-space: nowrap;
  grid-row: span 2;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.1;
  font-family: "JetBrains Mono", monospace;
}
.capabilities h2 {
  font-size: 15px;
  letter-spacing: -0.025em;
  line-height: 1.4;
  font-weight: 650;
}
.capabilities p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 290px;
}
.section {
  padding-block: 104px;
}
.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 60px;
  margin-bottom: 55px;
}
.section-intro > p {
  color: var(--muted);
  max-width: 370px;
  font-size: 15px;
  padding-top: 3px;
}
.workflow-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 130px;
}
.workflow-story {
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.workflow-story h3 {
  margin-bottom: 10px;
}
.workflow-story p {
  font-size: 14px;
  color: var(--muted);
  max-width: 450px;
}
.workflow-story a,
.fact {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
}
.fact {
  color: var(--accent);
}
.view-map {
  border: 1px solid var(--line);
  align-self: center;
  border-radius: 10px;
  background: var(--memql-surface);
}
.view-map-head {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 27px 30px;
  border-bottom: 1px solid var(--line);
}
.view-map-head h3 {
  font-size: 15px;
}
.view-map dl {
  margin: 0;
  padding: 4px 30px;
}
.view-map dl div {
  display: flex;
  gap: 22px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.view-map dl div:last-child {
  border: 0;
}
.view-map dt {
  font-weight: 600;
  min-width: 94px;
  font-size: 13px;
}
.view-map dd {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.view-map > p {
  padding: 20px 30px 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.example-section {
  background: var(--memql-surface-raised);
  border-block: 1px solid var(--line);
}
.example-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 44px;
}
.example-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.example-tabs button {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  padding: 17px 18px;
  color: var(--ink);
  cursor: pointer;
}
.example-tabs button[aria-selected="true"] {
  background: var(--memql-surface);
  border-color: var(--line);
  border-left-color: var(--accent);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--ink) 3%, transparent);
}
.example-tabs span {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.example-tabs small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.example-tabs button:hover {
  background: var(--memql-surface);
}
.example-note {
  margin-top: 23px;
  padding-left: 21px;
  font-size: 11px;
  color: var(--muted);
}
.example-code {
  background: var(--editor-bg);
  color: var(--editor-fg);
  border: 1px solid var(--editor-line);
  border-radius: 9px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.example-code-title {
  background: var(--editor-rail);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
}
.copy {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--memql-surface);
  color: var(--ink);
  font-size: 11px;
  padding: 5px 9px;
  cursor: pointer;
}
.example-code pre {
  padding: 24px 28px;
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.8;
}
.example-code .comment {
  color: var(--editor-comment);
}
.example-code .annotation {
  color: var(--editor-keyword);
}
.example-code .keyword {
  color: var(--editor-keyword);
}
.example-code .string {
  color: var(--editor-string);
}
.example-code .type {
  color: var(--editor-number);
}
#example-description,
#core-description {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 17px 28px;
  background: var(--editor-rail);
}
.example-next {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 29px;
}
.example-next > a:not(.text-link) {
  font-size: 11px;
  color: var(--muted);
}
.install {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 115px;
}
.install h2 {
  margin-bottom: 24px;
}
.install > div > p {
  font-size: 15px;
  color: var(--muted);
  max-width: 350px;
}
.install .install-requirements {
  font-size: 12px;
  margin: 22px 0;
  line-height: 1.85;
}
.install > div > a {
  font-size: 13px;
}
.install-steps ol {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}
.install-steps li {
  counter-increment: steps;
  position: relative;
  padding-left: 44px;
  margin-bottom: 30px;
}
.install-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: -2px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: var(--pale);
  color: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}
.install-steps h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.install-steps p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.install-steps pre {
  background: var(--memql-surface);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 6px;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.95;
}
.install-steps .build-note {
  font-size: 11px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
  max-width: none;
}
.closing {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: center;
  padding: 42px 48px;
  background: var(--pale);
  border-radius: 12px;
  margin-bottom: 70px;
}
.closing > div {
  max-width: 690px;
}
.closing h2 {
  font-size: 25px;
  letter-spacing: -0.035em;
  margin-bottom: 15px;
  padding-top: 5px;
}
.closing p {
  font-size: 13px;
  color: var(--muted);
  clear: both;
  max-width: 570px;
}
.secondary {
  border: 1px solid var(--line);
  white-space: nowrap;
  background: var(--memql-surface);
}
.footer {
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-block: 28px 34px;
  font-size: 11px;
  color: var(--muted);
}
.footer nav {
  margin-left: auto;
  font-size: 11px;
}
.footer p {
  flex-basis: 100%;
  font-size: 10px;
}
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: var(--memql-surface);
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 1450px) {
  .hero {
    padding-block: 105px 85px;
  }
}
@media (max-width: 1050px) {
  .wrap {
    width: calc(100% - 64px);
  }
  .header {
    gap: 15px;
  }
  .product-name {
    font-size: 11px;
    padding-left: 15px;
  }
  .header nav {
    gap: 17px;
  }
  .hero {
    gap: 30px;
    padding-block: 66px;
  }
  .hero .lead {
    font-size: 15px;
  }
  h1 {
    font-size: 64px;
  }
  .code-figure {
    padding-left: 8px;
  }
  .code-figure::before {
    right: -8px;
  }
  .editor-code {
    padding: 24px 17px;
  }
  .editor-code pre {
    font-size: 10px;
  }
  .actions {
    gap: 18px;
  }
  .text-link {
    font-size: 12px;
  }
  .workflow-body {
    gap: 50px;
  }
  .install {
    gap: 60px;
  }
  .section {
    padding-block: 78px;
  }
  .capabilities {
    gap: 25px;
  }
  .section-intro {
    gap: 40px;
  }
  .section-intro > p {
    max-width: 330px;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .header {
    min-height: 82px;
    gap: 12px;
    flex-wrap: wrap;
    padding-block: 19px;
  }
  .brand {
    font-size: 23px;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .product-name {
    border: 0;
    padding: 0;
    font-size: 11px;
  }
  .header nav {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    font-size: 12px;
    gap: 12px;
  }
  .nav-cta {
    padding: 8px 11px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-block: 44px;
  }
  .product-note {
    font-size: 11px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: clamp(48px, 16vw, 64px);
    margin-bottom: 22px;
  }
  .lead {
    font-size: 16px;
    max-width: 500px;
  }
  .code-figure {
    padding-left: 12px;
    padding-right: 8px;
  }
  .code-figure::before {
    right: 0;
  }
  .editor-code {
    padding: 22px;
  }
  .editor-code pre {
    font-size: 11px;
  }
  .capabilities {
    grid-template-columns: 1fr;
    gap: 27px;
    padding-block: 30px;
  }
  .capabilities > div {
    column-gap: 18px;
  }
  .capabilities p {
    max-width: none;
  }
  .capabilities h2 {
    font-size: 16px;
  }
  .section {
    padding-block: 58px;
  }
  .section-intro {
    display: block;
    margin-bottom: 32px;
  }
  .section-intro > p {
    max-width: 500px;
    margin-top: 19px;
    font-size: 14px;
  }
  .section-intro h2 {
    font-size: 34px;
  }
  .workflow-body {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .workflow-story {
    gap: 26px;
  }
  .workflow-story p {
    max-width: none;
  }
  .example-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .example-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .example-tabs button {
    padding: 13px 12px;
  }
  .example-tabs small {
    font-size: 10px;
  }
  .example-tabs span {
    font-size: 13px;
  }
  .example-note {
    font-size: 10px;
    margin-top: 12px;
    padding-left: 0;
  }
  .example-note br {
    display: none;
  }
  .example-code pre {
    padding: 20px;
    font-size: 11px;
  }
  .example-code {
    min-height: 370px;
  }
  .example-next {
    gap: 18px;
  }
  .install {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .install h2 {
    font-size: 40px;
  }
  .install > div > p {
    max-width: none;
  }
  .closing {
    display: block;
    padding: 28px;
    margin-bottom: 40px;
  }
  .closing h2 {
    font-size: 23px;
    padding-top: 0;
  }
  .closing img {
    width: 34px;
    height: 34px;
    margin-right: 15px;
  }
  .closing p {
    margin-top: 20px;
  }
  .closing .button {
    margin-top: 23px;
  }
  .footer {
    gap: 18px;
  }
  .footer nav {
    margin: 0;
    flex-basis: 100%;
    gap: 25px;
  }
  .footer p {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.run-guide {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 13px;
  line-height: 1.8;
  max-width: 850px;
}
.run-guide summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.run-guide summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.run-guide ol {
  padding-left: 22px;
  color: var(--muted);
}
.run-guide li {
  padding-left: 6px;
  margin-block: 12px;
}
.run-guide p {
  color: var(--muted);
}
.run-guide code {
  overflow-wrap: anywhere;
}

/* The canonical SVG's geometry is the mask; current accent follows appearance. */
.brand-mark {
  display: inline-block;
  flex: none;
  width: 32px;
  height: 32px;
  background: var(--accent);
  mask: url("brand/mark.svg") center / contain no-repeat;
}
.view-map .brand-mark {
  width: 24px;
  height: 24px;
}
.closing .brand-mark {
  float: left;
  width: 44px;
  height: 44px;
  margin-right: 20px;
}
.appearance-controls {
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  flex: none;
  font-size: 11px;
}
.appearance-controls[hidden] {
  display: none;
}
.appearance-controls label {
  cursor: pointer;
}
.appearance-controls span {
  display: block;
  padding: 7px 9px;
  border-radius: 4px;
  color: var(--muted);
}
.appearance-controls input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.appearance-controls input:checked + span {
  background: var(--pale);
  color: var(--ink);
}
.appearance-controls label:hover span {
  color: var(--ink);
}
.appearance-controls input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.editor-appearance {
  padding-block: 0 70px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 70px;
}
.editor-appearance h2 {
  font-size: 30px;
}
.editor-appearance p {
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 1120px) {
  .header {
    flex-wrap: wrap;
    gap: 18px;
    padding-block: 20px;
  }
  .header nav {
    margin-left: auto;
  }
  .appearance-controls {
    margin-left: auto;
  }
}
@media (max-width: 760px) {
  .appearance-controls {
    margin-left: 0;
  }
  .editor-appearance {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 45px;
  }
}

.showcase-setup,
.showcase-links {
  font-size: 12px;
  color: var(--muted);
  max-width: 850px;
  margin-top: 20px;
}

.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.core-language {
  border-bottom: 1px solid var(--line);
  padding-bottom: 56px;
  margin-bottom: 56px;
}
#core-panel {
  min-height: 300px;
}
.core-bridge {
  font-size: 13px;
  color: var(--muted);
  max-width: 840px;
  margin-top: 24px;
}
.core-bridge strong {
  color: var(--ink);
}
