:root {
  color-scheme: light;
  --paper: #f8f9fb;
  --ink: #273247;
  --muted: #5e6980;
  --line: #dce1e9;
  --accent: #e3eaf6;
  --primary: #21316c;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
a:focus-visible { outline: 3px solid #667dac; outline-offset: 5px; }
p { line-height: 1.7; }
pre, code { font-family: var(--mono); }
pre { overflow-x: auto; line-height: 1.8; font-size: 13px; }
pre code { font-size: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 12px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 750; letter-spacing: -.7px; color: var(--primary); }
.brand-mark { width: 32px; height: 32px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 550; }
.nav-cta { border: 1px solid var(--line); padding: 11px 17px; border-radius: 5px; }
.nav-cta span { margin-left: 15px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; padding-top: 86px; padding-bottom: 90px; }
.eyebrow { display: block; margin: 0 0 20px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1.1px; line-height: 1.6; text-transform: uppercase; color: #52658f; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--primary); border-radius: 50%; margin-right: 7px; }
h1, h2, h3 { margin: 0; font-weight: 600; color: #202940; }
h1 { font-size: clamp(42px, 5vw, 64px); line-height: 1.06; letter-spacing: -3.3px; }
h1 span { position: relative; z-index: 0; white-space: nowrap; }
h1 span::after { position: absolute; content: ""; inset: 56% -5px -2px; background: var(--accent); z-index: -1; transform: rotate(-2deg); }
.hero-description { max-width: 430px; margin: 24px 0 28px; font-size: 18px; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 27px; background: var(--primary); color: #fff; border-radius: 5px; padding: 16px 20px; font-size: 14px; font-weight: 550; }
.button:hover { background: #192851; text-decoration: none; }
.text-link { font-size: 14px; font-weight: 550; }
.text-link span { margin-left: 8px; }
.hero-note { margin: 24px 0 0; font-size: 12px; color: var(--muted); }
.message-example { margin: 0; min-width: 0; border: 1px solid #dce1e9; border-radius: 10px; background: #fff; box-shadow: 0 16px 40px -24px #21316c66; }
.example-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #e1e5ef; background: #edf0f4; border-radius: 10px 10px 0 0; font-family: var(--mono); font-size: 10px; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 6px; height: 6px; background: #97a1b0; border-radius: 50%; }
.sample-label { color: var(--muted); }
.example-body { padding: 25px 23px 16px; }
.example-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.example-heading .eyebrow { margin: 0; font-size: 10px; }
.protocol-label { padding: 4px 7px; background: #eaf0f9; border-radius: 3px; font-family: var(--mono); font-size: 10px; white-space: nowrap; color: var(--primary); }
.order-flow { list-style: none; margin: 22px 0 26px; padding: 0; }
.order-flow li { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; position: relative; }
.order-flow li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 23px; bottom: -14px; width: 1px; background: var(--line); }
.event-dot { flex-shrink: 0; position: relative; z-index: 1; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.event-dot.order { background: #9473b8; }
.event-dot.ack { background: #6a92c1; }
.event-dot.fill { background: #699958; }
.order-flow div { flex: 1; }
.order-flow strong { display: block; font-size: 13px; font-weight: 600; }
.order-flow div span { display: block; font-size: 11px; margin-top: 5px; color: var(--muted); }
.order-flow time { margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.field-heading { display: flex; justify-content: space-between; padding: 14px 0 10px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; }
.field-heading span:last-child { color: var(--muted); font-weight: 400; }
.field-table { width: 100%; text-align: left; border-collapse: collapse; font-family: var(--mono); font-size: 10px; }
.field-table th { font-weight: 400; color: var(--muted); padding: 8px 5px; border-bottom: 1px solid #e2e6ef; }
.field-table td { padding: 10px 5px; }
.field-table td:first-child { color: var(--muted); }
.field-table th:last-child { width: 50%; }
.enum { color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding-left: 8px; }
figcaption { padding: 11px 18px; border-top: 1px solid #e2e6ef; text-align: center; font-size: 10px; color: var(--muted); }
.screenshot-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding-top: 55px; padding-bottom: 55px; align-items: start; }
.app-screenshot { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.app-screenshot > a { display: block; }
.app-screenshot > a:focus-visible { outline-offset: -3px; }
.app-screenshot img { display: block; width: 100%; height: auto; }
.app-screenshot figcaption { text-align: left; font-size: 12px; line-height: 1.6; padding: 14px 18px; }
.format-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.format-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-top: 22px; padding-bottom: 22px; }
.format-strip .eyebrow { margin: 0; color: var(--muted); }
.format-strip ul { display: flex; flex-wrap: wrap; gap: 44px; list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 13px; }
.workflow-section { padding-top: 86px; padding-bottom: 86px; }
h2 { font-size: clamp(32px, 4vw, 43px); line-height: 1.14; letter-spacing: -1.8px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; column-gap: 80px; align-items: end; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading > p:last-child { margin: 0; max-width: 440px; color: var(--muted); font-size: 16px; }
.workflow-grid { margin: 42px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.workflow-grid li { padding-top: 22px; border-top: 1px solid #aab7d1; }
.step-number { font-family: var(--mono); font-size: 11px; color: var(--muted); }
h3 { font-size: 19px; line-height: 1.4; letter-spacing: -.45px; }
.workflow-grid h3 { margin-top: 17px; }
.workflow-grid p, .feature-grid p { font-size: 14px; color: var(--muted); margin: 13px 0 0; }
.features-section { background: #edf0f4; padding: 75px 0; }
.features-intro > p:last-child { color: var(--muted); margin-bottom: 0; font-size: 16px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 38px 65px; margin-top: 43px; }
.feature-grid article { border-top: 1px solid #dce1e9; padding-top: 22px; }
.feature-symbol { display: block; font-family: var(--mono); font-size: 21px; margin-bottom: 12px; color: var(--primary); }
.feature-grid .feature-detail { font-size: 11px; font-family: var(--mono); }
.version-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding: 0; margin: 16px 0 0; list-style: none; font-size: 13px; color: var(--muted); line-height: 1.6; }
.analytics-section { background: #fff; padding: 105px 0 75px; }
.analytics-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 45px; margin: 32px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.analytics-note { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.sql-example { display: grid; grid-template-columns: .8fr 1.2fr; gap: 45px; margin-top: 56px; padding: 30px; background: var(--primary); color: #fff; border-radius: 8px; align-items: center; }
.sql-example .eyebrow { color: var(--accent); margin-bottom: 10px; }
.sql-example h3 { font-size: 25px; line-height: 1.2; color: #fff; }
.sql-example p:last-child { font-size: 12px; color: #dce3ef; margin-bottom: 0; }
.sql-example pre { margin: 0; padding: 20px 0 20px 30px; border-left: 1px solid #52658f; color: #e7edf8; }
.sql-keyword { color: #bbcdff; }
.sql-string { color: #e2c58c; }
.download-section { background: var(--paper); padding-top: 85px; padding-bottom: 85px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 42px; }
.download-card { min-width: 0; border: 1px solid var(--line); padding: 28px; background: #fff; border-radius: 8px; }
.download-card .eyebrow { color: var(--muted); margin-bottom: 14px; }
.download-card h3 { font-size: 24px; }
.download-requirement { font-size: 14px; color: var(--muted); margin: 10px 0 22px; }
.download-meta { font-size: 12px; color: var(--muted); margin: 16px 0 24px; }
.download-section a:not(.button) { text-decoration: underline; text-underline-offset: 4px; }
.install-note { border-top: 1px solid var(--line); padding-top: 22px; }
.install-note h4 { font-size: 14px; margin: 0; font-weight: 600; }
.install-note p { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.install-note pre { margin: 16px 0 0; padding: 14px; border-radius: 4px; background: var(--paper); font-size: 11px; }
.download-help { font-size: 13px; color: var(--muted); margin: 25px 0 0; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: 28px; }
.site-footer .brand { font-size: 16px; }
.site-footer p, .site-footer > a:last-child { font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 1000px) {
  .hero { gap: 30px; }
  h1 { font-size: 47px; letter-spacing: -2.5px; }
  .hero-description { font-size: 16px; }
  .hero-actions { gap: 16px; }
  .section-heading { gap: 35px; }
  .sql-example { gap: 25px; }
  .sql-example pre { font-size: 11px; padding-left: 20px; }
}

@media (max-width: 760px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .site-header { min-height: 82px; }
  nav { gap: 16px; font-size: 12px; }
  .nav-cta { padding: 9px 11px; }
  .nav-cta span { margin-left: 5px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding-top: 55px; padding-bottom: 55px; }
  h1 { font-size: clamp(43px, 8.5vw, 62px); }
  .hero-description { max-width: 500px; }
  .message-example { width: 100%; max-width: 540px; }
  .screenshot-gallery { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
  .format-strip .wrap { align-items: flex-start; flex-direction: column; gap: 12px; }
  .format-strip ul { gap: 22px; font-size: 12px; }
  .workflow-section, .download-section { padding-top: 55px; padding-bottom: 55px; }
  .section-heading { grid-template-columns: 1fr; gap: 0; }
  .section-heading > p:last-child { margin-top: 18px; }
  .workflow-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .workflow-grid h3 { margin-top: 12px; }
  .features-section, .analytics-section { padding: 55px 0; }
  .analytics-section { padding-top: 75px; }
  .analytics-list { grid-template-columns: 1fr; gap: 10px; }
  .feature-grid { gap: 28px; }
  .sql-example { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .sql-example pre { border-left: 0; border-top: 1px solid #52658f; padding: 20px 0 0; font-size: 12px; }
  .download-grid { grid-template-columns: 1fr; gap: 25px; margin-top: 32px; }
  .site-footer { flex-wrap: wrap; gap: 15px; }
  .site-footer p { flex-basis: 100%; order: 1; }
}

@media (max-width: 430px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .site-header { flex-wrap: wrap; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
  nav > a:first-child { display: none; }
  nav { gap: 12px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .eyebrow { font-size: 10px; letter-spacing: .7px; }
  .example-body { padding: 20px 14px 12px; }
  .order-flow time { font-size: 9px; }
  .order-flow div span { font-size: 10px; }
  .field-table { font-size: 9px; }
  .enum { padding-left: 4px; }
  .format-strip ul { gap: 17px; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-card { padding: 20px; }
  .sql-example pre { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
