/* Reset + typography + layout primitives */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--qv-bg);
  color: var(--qv-text);
  font-family: var(--qv-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 5vw, 49px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3.2vw, 31px); }
h3 { font-size: clamp(18px, 2vw, 20px); }
p { margin: 0 0 1em; }
a { color: var(--qv-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
code, kbd, samp { font-family: var(--qv-mono); font-size: .92em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--qv-border); margin: 2rem 0; }

:focus-visible { outline: none; box-shadow: var(--qv-focus); border-radius: 4px; }

.qv-wrap { width: 100%; max-width: var(--qv-max); margin-inline: auto; padding-inline: var(--qv-gutter); }
.qv-main { flex: 1 0 auto; padding-bottom: 4rem; }
.qv-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.qv-section--tight { padding: clamp(1.5rem, 3vw, 2.5rem) 0; }
.qv-muted { color: var(--qv-muted); }
.qv-small { font-size: 13px; }
.qv-center { text-align: center; }
.qv-stack > * + * { margin-top: 1rem; }
.qv-grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.qv-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.qv-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.qv-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.qv-max-60 { max-width: 62ch; }
.qv-mono { font-family: var(--qv-mono); font-size: .88em; }
.qv-nowrap { white-space: nowrap; }
.qv-tabular { font-variant-numeric: tabular-nums; }

.qv-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--qv-primary); color: var(--qv-on-primary); padding: .75rem 1rem; border-radius: 0 0 8px 0;
}
.qv-skip:focus { left: 0; }
.qv-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .qv-header, .qv-topbar, .qv-footer, .qv-chat, .qv-burger { display: none !important; }
  body { background: #fff; color: #000; }
}
