/* QueryMind website: one stylesheet for the home, changelog and legal pages.
   Hand-written; the HTML is generated by `cargo run -p site-gen`. No third-party requests. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-Bold.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/JetBrainsMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/JetBrainsMono-Medium.ttf") format("truetype"); }

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0E1116;
  --bg-deep: #0B0E13;
  --surface: #151B23;
  --surface-head: #11161D;
  --surface-pro: #121B2A;
  --selected: #172338;
  --bubble: #1D3560;

  /* Lines */
  --line: #1A212B;
  --line-2: #222A36;
  --line-3: #2A3341;
  --line-frame: #263040;
  --line-warn: #5A4126;
  --line-info: #27406A;

  /* Text (all at least 4.5:1 on --bg and --bg-deep) */
  --text: #E6EAF0;
  --text-2: #C9D1DC;
  --muted: #AEB7C4;
  --dim: #8F99A8;
  --faint: #7D8999;

  /* Accent */
  --accent: #2F6FDB;
  --accent-hover: #3B7CEB;
  --accent-text: #5B9DFF;
  --link: #9DBEF5;
  --link-hover: #C9DBFA;
  --on-accent: #FFFFFF;
  --warn: #F2B36B;

  /* Code */
  --kw: #7AA7F5;
  --str: #9FD39A;
  --num: #E8B26F;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1160px;
  --gutter: 24px;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
h1, h2, h3, p, ul, figure, pre { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 8px; color: var(--on-accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.mono-link, .type { font-family: var(--font-mono); }
.scroll-x { overflow-x: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; border-radius: 8px;
  font-weight: 600; line-height: 1.2; padding: 10px 16px;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-3); color: var(--text); }
.btn-ghost:hover { border-color: var(--link); color: var(--text); }
.btn-lg { padding: 15px 26px; border-radius: 10px; font-size: 16px; }
.btn-block { width: 100%; padding: 13px; border-radius: 9px; margin-top: auto; }

/* ---- Header and footer ---- */
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 7px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-left: auto; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 500; }
@media (max-width: 560px) {
  .nav-links { margin-left: 0; width: 100%; gap: 10px 20px; }
  .nav-links .btn { margin-left: auto; }
}

.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-block: 28px; font-size: 14px; color: var(--dim); }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--text); }
.footer-name { color: var(--text-2); font-weight: 600; }
.footer-copy { margin-left: auto; }
@media (max-width: 560px) { .footer-copy { margin-left: 0; width: 100%; } }

/* ---- Shared section helpers ---- */
.band-top { border-top: 1px solid var(--line); }
.band-deep { background: var(--bg-deep); }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.section-head h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
.section-head p { font-size: 18px; color: var(--muted); }

/* ---- Hero ---- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding-top: 96px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 72px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; max-width: 920px; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 640px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.fineprint { font-size: 14px; color: var(--dim); }
@media (max-width: 640px) {
  .hero { padding-top: 56px; padding-bottom: 40px; }
  .lede { font-size: 18px; }
}

/* ---- Illustrations (HTML-drawn; replace with <img> screenshots later) ---- */
.hero-shot { padding-bottom: 40px; }
.shot { border: 1px solid var(--line-frame); border-radius: 14px; overflow: hidden; background: var(--bg-deep); }
.shot-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 6px; background: #3A424F; flex: none; }
.shot-pill {
  margin: 0 auto; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; color: var(--muted);
}
.shot-body { display: flex; flex-wrap: wrap; min-height: 460px; }
.shot-side {
  flex: 1 1 190px; max-width: 220px; border-right: 1px solid var(--line); padding: 14px;
  display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted);
}
.shot-filter { background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 10px; color: var(--faint); margin-bottom: 8px; }
.shot-item { padding: 6px 8px; }
.shot-item.is-active { background: var(--selected); color: var(--text); border-radius: 6px; }
.shot-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.shot-chat {
  flex: 1 1 280px; max-width: 320px; border-left: 1px solid var(--line); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; font-size: 13px;
}
@media (max-width: 900px) {
  .shot-side, .shot-chat { max-width: none; border: 0; border-bottom: 1px solid var(--line); }
  .shot-body { min-height: 0; }
}
.status-line { margin-top: auto; border-top: 1px solid var(--line); padding: 8px 20px; font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.chat-title { color: var(--dim); font-weight: 500; }
.chat-reply { color: var(--text-2); line-height: 1.5; }
.chat-result { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.mono-link { color: var(--link); }
.bubble { align-self: flex-end; background: var(--bubble); color: var(--text); padding: 9px 12px; border-radius: 10px 10px 2px 10px; max-width: 240px; }
.bubble-wide { max-width: 320px; padding: 10px 14px; border-radius: 12px 12px 2px 12px; }

.tag { font-size: 11px; font-weight: 600; border: 1px solid; border-radius: 4px; padding: 1px 6px; flex: none; }
.tag-prod { color: var(--warn); border-color: var(--line-warn); }
.tag-info { color: var(--link); border-color: var(--line-info); }
.tags { display: flex; gap: 6px; }
.warn { color: var(--warn); font-weight: 600; }

.code { font-family: var(--font-mono); line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.code-editor { padding: 18px 20px; font-size: 14px; border-bottom: 1px solid var(--line); }
.code-inset { background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.55; }
.code-plain { font-size: 12.5px; line-height: 1.5; }
.kw { color: var(--kw); }
.str { color: var(--str); }
.num { color: var(--num); }

.data-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.data-table th { text-align: left; font-weight: 500; color: var(--dim); background: var(--surface-head); padding: 9px 20px; white-space: nowrap; }
.data-table td { padding: 8px 20px; border-top: 1px solid var(--line); white-space: nowrap; }
.data-table .type { color: var(--faint); }
.data-table .null, .null { color: var(--faint); font-style: italic; }
.data-table-roomy th { padding: 10px 16px; }
.data-table-roomy td { padding: 9px 16px; }
.data-table tr.is-selected td { background: var(--selected); }

.features { display: flex; flex-direction: column; gap: 120px; padding-block: 96px; }
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.feature-flip { flex-wrap: wrap-reverse; }
.feature-text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.feature h2 { font-size: 36px; line-height: 1.12; letter-spacing: -0.02em; }
.feature-body { font-size: 17px; line-height: 1.6; color: var(--muted); }
.feature-note { font-size: 15px; line-height: 1.6; color: var(--dim); }
.illus { flex: 1.3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.illus figcaption { font-size: 13px; color: var(--dim); }
.illus-box { background: var(--bg-deep); border: 1px solid var(--line-frame); border-radius: 14px; }
.illus-center { padding: 40px 32px; display: flex; justify-content: center; }
.illus-chat { padding: 28px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.illus-split { overflow: hidden; display: flex; flex-wrap: wrap; }
@media (max-width: 640px) {
  .features { gap: 72px; padding-block: 56px; }
  .feature { gap: 28px; }
  .feature h2 { font-size: 30px; }
  .illus-center { padding: 24px 16px; }
  .illus-chat { padding: 16px; }
}

.mock-dialog { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line-3); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.mock-title { font-size: 16px; font-weight: 600; }
.mock-text { font-size: 13px; color: var(--muted); }
.mock-actions { display: flex; gap: 10px; justify-content: flex-end; }
.mock-btn { border: 1px solid var(--line-3); border-radius: 8px; padding: 9px 16px; font-size: 14px; }
.mock-btn-sm { border-radius: 7px; padding: 7px 14px; font-size: 13px; }
.mock-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.review-card { background: var(--surface); border: 1px solid var(--line-3); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.review-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }

.split-grid { flex: 999 1 280px; min-width: 0; }
.record { flex: 1 1 200px; border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.record-title { font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { color: var(--dim); }
.field-input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; font-family: var(--font-mono); overflow-wrap: anywhere; }
.field-input.is-focus { border-color: var(--accent); }
.record-save { align-self: flex-end; }
@media (max-width: 640px) { .record { border-left: 0; border-top: 1px solid var(--line); } }

.conn-grid { padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.conn-card { background: var(--surface); border: 1px solid var(--line-3); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.conn-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.conn-addr { font-family: var(--font-mono); font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.conn-time { font-size: 12px; color: var(--faint); }
@media (max-width: 640px) { .conn-grid { padding: 16px; } }

.engines-section { padding-top: 24px; padding-bottom: 80px; }
.engines { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 52px; font-weight: 500; color: var(--text-2); }
.engines li { display: flex; align-items: center; gap: 10px; }
@media (max-width: 640px) { .engines-section { padding-bottom: 48px; } .engines { gap: 16px 32px; } }

/* ---- Small features ---- */
.minis { display: flex; flex-direction: column; gap: 40px; padding-block: 88px; }
.minis h2 { font-size: 32px; letter-spacing: -0.015em; text-align: center; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; }
.mini { display: flex; flex-direction: column; gap: 6px; }
.mini h3 { font-size: 16px; }
.mini p { font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 640px) { .minis { padding-block: 56px; } .minis h2 { font-size: 26px; } }

/* ---- Pricing ---- */
.pricing { max-width: 920px; display: flex; flex-direction: column; gap: 36px; padding-block: 96px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.plan { border: 1px solid var(--line-2); border-radius: 14px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.plan-pro { background: var(--surface-pro); border-color: var(--accent); }
.plan-head { display: flex; flex-direction: column; gap: 6px; }
.plan-head h3 { font-size: 18px; }
.plan-price { font-size: 38px; font-weight: 700; }
.plan-per { font-size: 16px; font-weight: 400; color: var(--dim); }
.plan-sub { font-size: 14px; color: var(--dim); }
.plan ul { padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--text-2); line-height: 1.45; }
.pricing-note { text-align: center; font-size: 14px; color: var(--dim); }
@media (max-width: 640px) { .pricing { padding-block: 56px; } .section-head h2 { font-size: 32px; } .plan { padding: 24px; } }

/* ---- FAQ ---- */
.faq { max-width: 780px; padding-block: 88px; }
.faq h2 { font-size: 32px; letter-spacing: -0.015em; margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-size: 17px; font-weight: 600; cursor: pointer; }
.faq p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
@media (max-width: 640px) { .faq { padding-block: 56px; } .faq h2 { font-size: 26px; } }

/* ---- Closing call to action ---- */
.closing { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-block: 96px; }
.closing img { border-radius: 18px; }
.closing h2 { font-size: 40px; letter-spacing: -0.02em; }
@media (max-width: 640px) { .closing { padding-block: 56px; } .closing h2 { font-size: 30px; } }

/* ---- Download ---- */
.download { max-width: 820px; display: flex; flex-direction: column; gap: 32px; padding-block: 72px 96px; }
.os-picker { display: inline-flex; align-self: flex-start; max-width: 100%; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line-frame); border-radius: 10px; }
.os-picker[hidden], .os-panel[hidden] { display: none; }
.os-btn { font: inherit; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 9px 18px; cursor: pointer; }
.os-btn:hover { color: var(--text); }
.os-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.os-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; border-top: 1px solid var(--line); padding-top: 32px; }
.os-panel h2 { font-size: 28px; letter-spacing: -0.01em; }
.os-meta { color: var(--muted); }
.os-note { color: var(--dim); }
.os-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.btn-disabled { background: var(--surface); color: var(--dim); border-color: var(--line-3); cursor: not-allowed; }
@media (max-width: 640px) { .download { padding-block: 40px 56px; } .os-btn { padding: 9px 14px; } }

/* ---- Changelog ---- */
.changelog { max-width: 820px; display: flex; flex-direction: column; gap: 48px; padding-block: 72px 96px; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head h1 { font-size: 44px; letter-spacing: -0.02em; }
.page-head p { font-size: 17px; color: var(--muted); }
.release { display: flex; flex-wrap: wrap; gap: 12px 32px; border-top: 1px solid var(--line); padding-top: 32px; scroll-margin-top: 16px; }
.release:target .release-version a { color: var(--accent-text); }
.release-meta { flex: 0 0 140px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.release-version { font-family: var(--font-mono); font-size: 20px; font-weight: 500; }
.release-version a { color: var(--text); }
.release-meta time { font-size: 14px; color: var(--dim); }
.badge { font-size: 12px; font-weight: 600; color: var(--link-hover); background: var(--bubble); border-radius: 999px; padding: 3px 10px; }
.release-notes { flex: 1 1 420px; min-width: 0; padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.page-note { font-size: 14px; color: var(--faint); }
@media (max-width: 640px) { .changelog { padding-block: 40px 56px; } .page-head h1 { font-size: 34px; } }

/* ---- Legal pages ---- */
.legal { max-width: 780px; padding-block: 72px 96px; }
.prose { color: var(--text-2); line-height: 1.7; }
.prose h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); margin-bottom: 20px; }
.prose h2 { font-size: 22px; line-height: 1.3; color: var(--text); margin: 40px 0 12px; }
.prose h3 { font-size: 17px; color: var(--text); margin: 28px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface); border-radius: 4px; padding: 1px 5px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose table { border-collapse: collapse; margin-bottom: 14px; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
@media (max-width: 640px) { .legal { padding-block: 40px 56px; } .prose h1 { font-size: 30px; } }
