:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030711;
  color: #e7f1ff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 5%, #102743 0, #050b16 38%, #02050b 100%); }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px; }
a { color: #8ecaff; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 18px; font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.query-header { min-height: 58vh; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid #284b6f; }
.eyebrow { color: #62b8ff; font: 700 11px/1.3 ui-monospace, monospace; letter-spacing: .15em; }
h1 { max-width: 900px; margin: 14px 0; font-size: clamp(46px, 8vw, 108px); line-height: .9; letter-spacing: -.06em; }
h2 { margin: 8px 0 22px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.035em; }
.lede { max-width: 820px; color: #a8bed6; font-size: clamp(18px, 2vw, 25px); line-height: 1.45; }
.contract-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.contract-strip > * { border: 1px solid #2f608d; padding: 9px 12px; background: #071528; color: #a9d7ff; font: 700 11px/1 ui-monospace, monospace; }
.query-grid, .examples { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 34px; background: #244563; border: 1px solid #244563; }
.query-grid article, .examples article, .try-panel { background: #050c17; padding: clamp(22px, 4vw, 44px); }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid #17304a; }
dt { color: #6f8ca8; text-transform: uppercase; font: 700 10px/1.4 ui-monospace, monospace; letter-spacing: .12em; }
dd { margin: 0; overflow-wrap: anywhere; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-top: 1px solid #17304a; }
.tool-list span { color: #5f8bb4; font: 700 10px/1.4 ui-monospace, monospace; text-transform: uppercase; }
.boundary, .query-access-note { color: #92a9bf; line-height: 1.6; }
.try-panel { margin-top: 34px; border: 1px solid #28577e; }
.query-try { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.query-try label { grid-column: 1 / -1; color: #7fa8cc; font: 700 10px/1 ui-monospace, monospace; text-transform: uppercase; }
.query-try textarea { min-height: 180px; resize: vertical; padding: 14px; border: 1px solid #285576; background: #020710; color: #d9edff; font: 12px/1.55 ui-monospace, monospace; }
input, button { min-height: 46px; border: 1px solid #3475aa; background: #071426; color: #eaf5ff; padding: 0 14px; font: 700 13px/1 ui-monospace, monospace; }
button { cursor: pointer; background: #1478c8; }
button:disabled { opacity: .55; cursor: wait; }
.query-try-output, pre { max-height: 520px; overflow: auto; margin: 18px 0 0; padding: 18px; background: #020710; color: #a9d7ff; border: 1px solid #183a58; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }
.examples pre { margin-top: 0; }
footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 34px; color: #5f7c97; font: 700 10px/1.4 ui-monospace, monospace; letter-spacing: .08em; }

@media (max-width: 720px) {
  main { width: min(100% - 24px, 1180px); padding-top: max(18px, env(safe-area-inset-top)); }
  .query-header { min-height: 70vh; }
  .query-grid, .examples { grid-template-columns: 1fr; }
  .query-try { grid-template-columns: 1fr; }
  .query-try label { grid-column: auto; }
  .contract-strip code { width: 100%; overflow-wrap: anywhere; }
  footer { flex-direction: column; }
}
