/* ChatQT site design system (2026 redesign).
   Generated pages use it whole; legacy pages load it for the header and footer.
   Every class is prefixed q- so it never collides with the old Tailwind build. */

@font-face { font-family: "Archivo Black"; src: url("/assets/fonts/ArchivoBlack-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("/assets/fonts/Estedad-VF.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --q-bg: #ffffff;
  --q-bg-soft: #f6f6f7;
  --q-bg-softer: #fbfbfc;
  --q-ink: #0b0b0c;
  --q-ink-2: #3c3c43;
  --q-muted: #6e6e76;
  --q-line: rgba(11, 11, 12, 0.09);
  --q-line-2: rgba(11, 11, 12, 0.16);
  --q-card: #ffffff;
  --q-btn: #0b0b0c;
  --q-btn-ink: #ffffff;
  --q-accent: #0b0b0c;
  --q-second: #86868b;
  --q-accent-2: #3a3a3c;
  --q-ok: #12a150;
  --q-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
  --q-radius: 20px;
  --q-radius-sm: 12px;
  --q-max: 1200px;
  --q-header: 64px;
  --q-font: "Estedad", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
html.dark {
  --q-bg: #0a0a0b;
  --q-bg-soft: #141416;
  --q-bg-softer: #101012;
  --q-ink: #f4f4f5;
  --q-ink-2: #d4d4d8;
  --q-muted: #9a9aa3;
  --q-line: rgba(255, 255, 255, 0.09);
  --q-line-2: rgba(255, 255, 255, 0.18);
  --q-card: #141416;
  --q-btn: #f4f4f5;
  --q-btn-ink: #0b0b0c;
  --q-accent: #f4f4f5;
  --q-second: #8e8e93;
  --q-accent-2: #d4d4d8;
  --q-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
html[lang="en"] {
  --q-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base (generated pages only) ---------- */
body.q-page {
  margin: 0;
  background: var(--q-bg);
  color: var(--q-ink);
  font-family: var(--q-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.q-page *, .q-page *::before, .q-page *::after { box-sizing: border-box; }
.q-page img, .q-page video { max-width: 100%; display: block; }
.q-page a { color: inherit; text-decoration: none; }
.q-page h1, .q-page h2, .q-page h3, .q-page h4, .q-page p { margin: 0; }
.q-page main { padding-top: var(--q-header); }
.q-wrap { max-width: var(--q-max); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .q-wrap { padding-inline: 32px; } }
.q-skip { position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 100; background: var(--q-btn); color: var(--q-btn-ink); padding: 8px 14px; border-radius: 999px; }
.q-skip:focus { inset-inline-start: 12px; }
.q-page :focus-visible { outline: 2px solid var(--q-accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Type ---------- */
.q-eyebrow { font-size: 14px; font-weight: 600; color: var(--q-muted); letter-spacing: 0.01em; margin-bottom: 14px; display: inline-flex; gap: 8px; align-items: center; }
.q-h1 { font-size: clamp(40px, 7.2vw, 84px); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
html[lang="fa"] .q-h1, html[lang="ar"] .q-h1 { line-height: 1.35; letter-spacing: 0; }
.q-h2 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; }
html[lang="fa"] .q-h2, html[lang="ar"] .q-h2 { line-height: 1.4; letter-spacing: 0; }
.q-h3 { font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.q-lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--q-ink-2); max-width: 680px; }
.q-muted { color: var(--q-muted); }
.q-grad { color: var(--q-second); }
.q-center { text-align: center; }
.q-center .q-lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.q-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; border: 1px solid transparent; transition: transform .15s ease, background .15s ease, opacity .15s ease; white-space: nowrap; cursor: pointer; font-family: inherit; }
.q-btn:active { transform: scale(0.98); }
.q-btn-primary { background: var(--q-btn); color: var(--q-btn-ink) !important; }
.q-btn-primary:hover { opacity: 0.86; }
.q-btn-ghost { background: transparent; color: var(--q-ink) !important; border-color: var(--q-line-2); }
.q-btn-ghost:hover { background: var(--q-bg-soft); }
.q-btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.q-arrow { display: inline-block; transition: transform .15s ease; }
[dir="rtl"] .q-arrow { transform: scaleX(-1); }
.q-btn:hover .q-arrow { transform: translateX(3px); }
[dir="rtl"] .q-btn:hover .q-arrow { transform: scaleX(-1) translateX(3px); }
.q-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.q-center .q-actions { justify-content: center; }
.q-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, #0071e3 12%, transparent); color: #0066cc; }
.q-badge-soon { background: var(--q-bg-soft); color: var(--q-muted); }

/* ---------- Header ---------- */
.q-header { position: fixed; inset-inline: 0; top: 0; z-index: 60; height: var(--q-header); background: color-mix(in srgb, var(--q-bg) 82%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease; font-family: var(--q-font); color: var(--q-ink); }
.q-header.is-scrolled, .q-header.is-open { border-bottom-color: var(--q-line); }
.q-header.is-open { background: var(--q-bg); }
@media (max-width: 1023px) { .q-header.is-open .q-header-end > .q-btn { display: none; } }
.q-header *, .q-header *::before, .q-header *::after { box-sizing: border-box; }
.q-header a { color: inherit; text-decoration: none; }
.q-header-in { height: 100%; max-width: var(--q-max); margin-inline: auto; padding-inline: 20px; display: flex; align-items: center; gap: 28px; }
@media (min-width: 768px) { .q-header-in { padding-inline: 32px; } }
.q-logo { font-family: "Archivo Black", Impact, system-ui, sans-serif; font-size: 22px; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1; color: var(--q-ink); }
.q-nav { display: none; align-items: center; gap: 2px; height: 100%; }
@media (min-width: 1024px) { .q-nav { display: flex; } }
.q-nav-item { height: 100%; display: flex; align-items: center; }
.q-header .q-nav-link { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--q-ink-2); background: none; border: 0; cursor: pointer; font-family: inherit; transition: color .15s ease, background .15s ease; }
.q-header .q-nav-link:hover, .q-nav-item.is-open > .q-nav-link, .q-header .q-nav-link[aria-current="page"] { color: var(--q-ink); background: var(--q-bg-soft); }
.q-header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.q-login { display: none; font-size: 14.5px; font-weight: 500; color: var(--q-ink-2); padding: 0 10px; }
.q-login:hover { color: var(--q-ink); }
@media (min-width: 640px) { .q-login { display: inline-flex; } }
.q-icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 999px; border: 0; background: none; color: var(--q-ink-2); cursor: pointer; }
.q-icon-btn:hover { background: var(--q-bg-soft); color: var(--q-ink); }
.q-icon-btn svg { width: 20px; height: 20px; }
.q-burger { display: inline-grid; }
@media (min-width: 1024px) { .q-burger { display: none; } }
.q-lang { position: relative; display: none; }
@media (min-width: 1024px) { .q-lang { display: block; } }
.q-lang-menu { position: absolute; inset-inline-end: 0; top: 44px; min-width: 160px; background: var(--q-card); border: 1px solid var(--q-line); border-radius: 14px; box-shadow: var(--q-shadow); padding: 6px; display: none; }
.q-lang.is-open .q-lang-menu { display: block; }
.q-lang-menu a, .q-lang-menu button { display: flex; width: 100%; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--q-ink-2); background: none; border: 0; cursor: pointer; font-family: inherit; text-align: start; }
.q-lang-menu a:hover, .q-lang-menu button:hover, .q-lang-menu [aria-current="true"] { background: var(--q-bg-soft); color: var(--q-ink); }
.q-lang-menu hr { border: 0; border-top: 1px solid var(--q-line); margin: 6px 4px; }

/* Mega panel: full width, plain text columns */
.q-panel { position: fixed; inset-inline: 0; top: var(--q-header); background: var(--q-bg); border-bottom: 1px solid var(--q-line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.q-nav-item.is-open > .q-panel { opacity: 1; visibility: visible; transform: none; }
.q-panel-in { max-width: var(--q-max); margin-inline: auto; padding: 28px 32px 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); gap: 32px; }
.q-col-title { font-size: 12.5px; font-weight: 600; color: var(--q-muted); margin: 0 0 10px; }
.q-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.q-col a { display: block; padding: 8px 10px; margin-inline: -10px; border-radius: 10px; }
.q-col a:hover { background: var(--q-bg-soft); }
.q-col .q-name { font-size: 15px; font-weight: 600; color: var(--q-ink); display: flex; gap: 8px; align-items: center; }
.q-col .q-desc { font-size: 13px; color: var(--q-muted); line-height: 1.45; }
.q-feat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; padding: 22px; border-radius: 16px; background: var(--q-bg-soft); border: 1px solid var(--q-line); }
.q-feat strong { font-size: 18px; line-height: 1.3; color: var(--q-ink); }
.q-feat span { font-size: 14px; color: var(--q-ink-2); margin-top: 6px; }

/* Mobile sheet */
.q-sheet { position: fixed; inset: var(--q-header) 0 0 0; background: var(--q-bg); overflow-y: auto; padding: 18px 20px 40px; display: none; z-index: 59; font-family: var(--q-font); color: var(--q-ink); }
.q-sheet.is-open { display: block; }
.q-sheet a { color: inherit; text-decoration: none; }
.q-sheet-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.q-sheet-cta .q-btn { width: 100%; }
.q-acc { border-bottom: 1px solid var(--q-line); }
.q-acc > button, .q-acc > a { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 2px; font-size: 19px; font-weight: 600; background: none; border: 0; color: var(--q-ink); cursor: pointer; font-family: inherit; }
.q-acc > button svg { width: 18px; height: 18px; transition: transform .2s ease; color: var(--q-muted); }
.q-acc.is-open > button svg { transform: rotate(180deg); }
.q-acc-body { display: none; padding: 0 2px 14px; }
.q-acc.is-open .q-acc-body { display: grid; gap: 2px; }
.q-acc-body a { padding: 9px 0; font-size: 16px; color: var(--q-ink-2); display: flex; gap: 8px; align-items: center; }
.q-sheet-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.q-sheet-foot a, .q-sheet-foot button { font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--q-line-2); background: none; color: var(--q-ink-2); cursor: pointer; font-family: inherit; }
.q-sheet-foot [aria-current="true"] { background: var(--q-btn); color: var(--q-btn-ink); border-color: var(--q-btn); }
html.q-lock, html.q-lock body { overflow: hidden; }

/* ---------- Sections ---------- */
.q-sec { padding-block: 88px; }
@media (min-width: 768px) { .q-sec { padding-block: 128px; } }
.q-sec-tight { padding-block: 64px; }
.q-sec-soft { background: var(--q-bg-soft); }
.q-head { margin-bottom: 48px; }
.q-head .q-lead { margin-top: 16px; }

/* Hero */
.q-hero { padding-top: 64px; padding-bottom: 48px; }
@media (min-width: 768px) { .q-hero { padding-top: 96px; } }
.q-hero .q-lead { margin-top: 22px; }
.q-hero .q-actions { margin-top: 34px; }
.q-hero .q-hero-note { margin-top: 28px; font-size: 14px; color: var(--q-muted); }
.q-hero-home { text-align: center; position: relative; overflow: hidden; }
.q-hero-home::before { content: none; }
.q-hero-home .q-lead { margin-inline: auto; }
.q-hero-home .q-actions { justify-content: center; }
.q-crumbs { font-size: 14px; color: var(--q-muted); margin-bottom: 18px; display: flex; gap: 8px; }
.q-crumbs a:hover { color: var(--q-ink); }

/* Model logos */
.q-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px 44px; align-items: center; margin-top: 26px; }
.q-logos img { height: 26px; width: auto; opacity: .55; filter: grayscale(1); }
html.dark .q-logos img { filter: grayscale(1) invert(1); }
.q-logos-cap { text-align: center; font-size: 14px; color: var(--q-muted); }

/* Product mock */
.q-stage { margin-top: 56px; border-radius: 28px; padding: clamp(14px, 3vw, 36px); background: var(--q-bg-soft); }
.q-mock { background: var(--q-card); border: 1px solid var(--q-line); border-radius: 18px; box-shadow: var(--q-shadow); overflow: hidden; max-width: 860px; margin-inline: auto; }
.q-mock-bar { height: 42px; border-bottom: 1px solid var(--q-line); display: flex; align-items: center; gap: 7px; padding-inline: 16px; }
.q-mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--q-line-2); }
.q-mock-bar span { margin-inline-start: 10px; font-size: 13px; color: var(--q-muted); }
.q-mock-body { padding: clamp(16px, 3vw, 28px); display: grid; gap: 16px; }
.q-msg-user { justify-self: end; max-width: 82%; background: var(--q-bg-soft); border-radius: 18px; padding: 12px 16px; font-size: 15.5px; }
.q-msg-ai { display: grid; gap: 10px; font-size: 15.5px; }
.q-msg-ai strong { font-size: 16px; }
.q-msg-ai ul { margin: 0; padding-inline-start: 20px; color: var(--q-ink-2); display: grid; gap: 4px; }
.q-file { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--q-line); border-radius: 12px; font-size: 14px; font-weight: 600; width: max-content; max-width: 100%; }
.q-file i { width: 28px; height: 34px; border-radius: 6px; background: linear-gradient(160deg, #1fa463, #0f7a45); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; }
.q-file i[data-k="pdf"] { background: linear-gradient(160deg, #ef4444, #b91c1c); }
.q-file i[data-k="doc"], .q-file i[data-k="docx"] { background: linear-gradient(160deg, #3b82f6, #1d4ed8); }
.q-file i[data-k="mp4"], .q-file i[data-k="mp3"], .q-file i[data-k="wav"], .q-file i[data-k="srt"], .q-file i[data-k="txt"] { background: linear-gradient(160deg, var(--q-accent), var(--q-accent-2)); }
.q-steps-live { display: grid; gap: 10px; }
.q-step-live { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--q-ink-2); }
.q-step-live b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--q-ok) 15%, transparent); color: var(--q-ok); font-size: 12px; flex: none; }
.q-wave { display: flex; align-items: center; gap: 3px; height: 64px; }
.q-wave span { flex: 1; border-radius: 3px; background: var(--q-ink); opacity: .75; }
.q-wave.is-noisy span { background: var(--q-line-2); }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--q-line); font-size: 14px; font-weight: 500; background: var(--q-card); }
.q-chip i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--q-ink); }
.q-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 4px 0; border-bottom: 1px solid var(--q-line); }
.q-chart span { flex: 1; border-radius: 6px 6px 0 0; background: var(--q-ink); opacity: .85; }
.q-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: var(--q-bg-soft); border-radius: 12px; padding: 12px 14px; color: var(--q-ink-2); direction: ltr; text-align: left; white-space: pre; overflow-x: auto; }
.q-sched { display: grid; gap: 12px; }
.q-sched-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--q-line); border-radius: 14px; font-size: 15px; }
.q-sched-row em { font-style: normal; font-size: 12px; color: var(--q-muted); display: block; }
.q-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--q-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--q-ok) 18%, transparent); flex: none; }

/* Gallery */
.q-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .q-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--q-bg-soft); aspect-ratio: 1; position: relative; }
.q-gallery.is-video figure { aspect-ratio: 16 / 10; }
.q-gallery img, .q-gallery video { width: 100%; height: 100%; object-fit: cover; }
.q-phone { width: min(300px, 70vw); aspect-ratio: 9 / 18.5; margin-inline: auto; border-radius: 40px; padding: 10px; background: #0b0b0c; box-shadow: var(--q-shadow); position: relative; }
.q-phone video, .q-phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }
.q-phone-cap { position: absolute; inset-inline: 22px; bottom: 54px; color: #fff; font-weight: 800; font-size: 19px; line-height: 1.35; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); text-align: center; }

/* Steps, benefits, detail */
.q-grid-3 { display: grid; gap: 18px; }
@media (min-width: 900px) { .q-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.q-grid-2 { display: grid; gap: 18px; }
@media (min-width: 768px) { .q-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.q-card { background: var(--q-card); border: 1px solid var(--q-line); border-radius: var(--q-radius); padding: 28px; }
.q-sec-soft .q-card { border-color: transparent; }
.q-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--q-btn); color: var(--q-btn-ink); font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.q-card p { color: var(--q-ink-2); margin-top: 8px; font-size: 16px; }
.q-prose { max-width: 760px; display: grid; gap: 18px; }
.q-prose p { color: var(--q-ink-2); font-size: 18px; line-height: 1.75; }

/* FAQ */
.q-faq { max-width: 820px; border-top: 1px solid var(--q-line); }
.q-faq details { border-bottom: 1px solid var(--q-line); }
.q-faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 18px; font-weight: 600; }
.q-faq summary::-webkit-details-marker { display: none; }
.q-faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--q-muted); transition: transform .2s ease; }
.q-faq details[open] summary::after { transform: rotate(45deg); }
.q-faq details p { padding-bottom: 22px; color: var(--q-ink-2); font-size: 16.5px; max-width: 700px; }

/* Related + tiles */
.q-tile { display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--q-radius); background: var(--q-bg-soft); transition: transform .2s ease, background .2s ease; min-height: 168px; }
.q-tile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--q-bg-soft) 70%, var(--q-line)); }
.q-tile strong { font-size: 19px; display: flex; gap: 8px; align-items: center; }
.q-tile span { color: var(--q-ink-2); font-size: 15.5px; }
.q-tile .q-more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--q-ink); }
.q-tiles { display: grid; gap: 14px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .q-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .q-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-tiles-3 { display: grid; gap: 14px; }
@media (min-width: 900px) { .q-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-media-tile { position: relative; border-radius: var(--q-radius); overflow: hidden; background: var(--q-bg-soft); aspect-ratio: 4 / 5; display: block; }
.q-media-tile img, .q-media-tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.q-media-tile:hover img, .q-media-tile:hover video { transform: scale(1.03); }
.q-media-tile figcaption { position: absolute; inset: auto 0 0 0; padding: 18px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); font-weight: 700; font-size: 18px; }
.q-media-tile figcaption small { display: block; font-weight: 500; font-size: 14px; opacity: .85; }

/* Tabs (home) */
.q-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--q-bg-soft); margin: 28px auto 0; }
.q-tabs button { height: 38px; padding: 0 20px; border-radius: 999px; border: 0; background: none; font-weight: 600; font-size: 15px; color: var(--q-muted); cursor: pointer; font-family: inherit; }
.q-tabs button[aria-selected="true"] { background: var(--q-card); color: var(--q-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.q-tabpanel[hidden] { display: none; }

/* Split feature row */
.q-split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .q-split { grid-template-columns: 1fr 1.1fr; gap: 72px; } }
.q-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.q-list li strong { display: block; font-size: 17px; }
.q-list li span { color: var(--q-ink-2); font-size: 16px; }

/* Stats */
.q-stats { display: grid; gap: 28px; grid-template-columns: repeat(1, minmax(0, 1fr)); text-align: center; }
@media (min-width: 640px) { .q-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-stat b { display: block; font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.q-stat span { color: var(--q-muted); }

/* Pricing teaser */
.q-price { display: grid; gap: 14px; margin-top: 30px; }
.q-price li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.q-price li::before { content: "✓"; color: var(--q-ok); font-weight: 800; }

/* CTA band */
.q-cta { text-align: center; border-radius: 32px; padding: clamp(48px, 8vw, 96px) 24px; background: var(--q-btn); color: var(--q-btn-ink); }
.q-cta .q-lead { color: color-mix(in srgb, var(--q-btn-ink) 75%, transparent); margin: 16px auto 0; }
.q-cta .q-btn-primary { background: var(--q-btn-ink); color: var(--q-btn) !important; margin-top: 30px; }

/* ---------- Footer ---------- */
.q-footer { border-top: 1px solid var(--q-line); padding: 64px 0 40px; font-family: var(--q-font); background: var(--q-bg); color: var(--q-ink); font-size: 14px; }
.q-footer a { color: var(--q-ink-2); text-decoration: none; }
.q-footer a:hover { color: var(--q-ink); }
.q-footer-in { max-width: var(--q-max); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .q-footer-in { padding-inline: 32px; } }
.q-footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .q-footer-grid { grid-template-columns: 1.6fr repeat(6, minmax(0, 1fr)); } }
.q-footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .q-footer-brand { grid-column: auto; } }
.q-footer-brand p { color: var(--q-muted); margin-top: 14px; max-width: 280px; line-height: 1.6; }
.q-footer h4 { font-size: 13px; font-weight: 600; color: var(--q-ink); margin: 0 0 14px; }
.q-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.q-footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--q-line); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; color: var(--q-muted); }
.q-social { display: flex; gap: 16px; }

/* ---------- Motion ---------- */
.js-ready .q-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js-ready .q-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-ready .q-reveal { opacity: 1; transform: none; transition: none; }
  .q-page * { scroll-behavior: auto !important; }
}

/* Legacy pages: keep their main clear of the new fixed header */
body:not(.q-page) .q-header { font-size: 16px; line-height: 1.5; }

/* Legacy pages style [dir="ltr"] runs with their own font; the shell keeps its own */
.q-header [dir="ltr"], .q-footer [dir="ltr"], .q-sheet [dir="ltr"] { font-family: inherit; }
.q-header .q-logo, .q-footer .q-logo { font-family: "Archivo Black", Impact, system-ui, sans-serif; }

/* ---------- Living examples (driven by site.js) ---------- */
.q-typing { display: none; gap: 5px; padding: 6px 2px; }
.q-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--q-muted); animation: q-blink 1s infinite ease-in-out; }
.q-typing span:nth-child(2) { animation-delay: .15s; }
.q-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes q-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.js-ready [data-seq].is-seq .q-typing.is-on { display: flex; }
.js-ready [data-seq].is-seq [data-step] { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.js-ready [data-seq].is-seq [data-step].is-on { opacity: 1; transform: none; }
.js-ready [data-seq].is-seq .q-pop.is-on { animation: q-pop .5s ease; }
@keyframes q-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.q-wave.is-live span { animation: q-eq 1.1s ease-in-out infinite alternate; transform-origin: center; }
@keyframes q-eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.q-clean { display: grid; gap: 10px; }
.q-clean .q-wave.is-noisy { animation: q-fadeout 4s ease-in-out infinite; }
@keyframes q-fadeout { 0%, 35% { opacity: 1; } 55%, 100% { opacity: .15; } }
.q-grow.is-on span, .q-grow:not([data-step]) span { animation: q-grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
@keyframes q-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Dubbing: captions cycle through the three languages */
.q-dub { position: relative; }
.q-dub-cap { position: absolute; inset-inline: 0; bottom: 16px; display: grid; place-items: center; }
.q-dub-cap span { grid-area: 1 / 1; background: rgba(0, 0, 0, .62); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; opacity: 0; animation: q-cap3 9s infinite; }
.q-dub-cap span:nth-child(2) { animation-delay: 3s; }
.q-dub-cap span:nth-child(3) { animation-delay: 6s; }
@keyframes q-cap3 { 0% { opacity: 0; transform: translateY(6px); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; } }
.q-dub-chips .q-chip { animation: q-chip3 9s infinite; }
.q-dub-chips .q-chip:nth-child(2) { animation-delay: 3s; }
.q-dub-chips .q-chip:nth-child(3) { animation-delay: 6s; }
@keyframes q-chip3 { 0%, 33% { background: var(--q-btn); color: var(--q-btn-ink); border-color: var(--q-btn); } 34%, 100% { background: var(--q-card); color: var(--q-ink); border-color: var(--q-line); } }

/* Motion reel */
.q-reel { overflow: hidden; }
.q-reel-screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; color: #fff; isolation: isolate; }
.q-reel-tile { position: absolute; inset: 0; }
.q-reel-tile .q-reel-screen { border-radius: 0; }
.q-reel-bg { position: absolute; inset: -30%; z-index: -1; background: radial-gradient(35% 35% at 30% 30%, #6d5efc, transparent 70%), radial-gradient(35% 35% at 70% 65%, #00a6ff, transparent 70%), radial-gradient(30% 30% at 60% 20%, #ff4fa3, transparent 70%), #0b0b16; animation: q-drift 9s ease-in-out infinite alternate; }
@keyframes q-drift { from { transform: rotate(0deg) scale(1); } to { transform: rotate(25deg) scale(1.15); } }
.q-reel-prog { position: absolute; top: 14px; inset-inline: 16px; display: flex; gap: 4px; z-index: 2; }
.q-reel-prog i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.q-reel-prog i.is-done::after, .q-reel-prog i.is-on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; }
[dir="rtl"] .q-reel-prog i.is-done::after, [dir="rtl"] .q-reel-prog i.is-on::after { transform-origin: right; }
.q-reel-prog i.is-on::after { animation: q-prog var(--q-scene, 2600ms) linear both; }
@keyframes q-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.q-scene { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 46px 22px 30px; text-align: center; }
.q-scene.is-on { display: flex; }
.q-k1, .q-k2 { font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
.q-k1 { font-size: 30px; opacity: .85; animation: q-in .5s ease both; }
.q-k2 { font-size: 36px; animation: q-zoom .7s cubic-bezier(.2,.9,.2,1.2) .35s both; background: linear-gradient(90deg, #fff, #c9c2ff 50%, #8fe3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes q-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes q-zoom { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.q-rlabel { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; animation: q-in .5s ease both; }
.q-rprompt { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); border-radius: 18px; padding: 14px 16px; font-size: 16px; font-weight: 600; line-height: 1.5; text-align: start; animation: q-in .4s ease both; }
.q-type { display: inline-block; clip-path: inset(0 100% 0 0); animation: q-type 1.6s steps(28, end) .3s forwards; }
[dir="rtl"] .q-type { clip-path: inset(0 0 0 100%); animation-name: q-type-rtl; }
@keyframes q-type { to { clip-path: inset(0 0 0 0); } }
@keyframes q-type-rtl { to { clip-path: inset(0 0 0 0); } }
.q-sc-voice .q-wave { width: 100%; height: 90px; }
.q-sc-voice .q-wave span { background: linear-gradient(#fff, #8fe3ff); }
.q-rcap { font-size: 22px; font-weight: 800; line-height: 1.4; }
.q-rcap span { display: inline-block; opacity: .2; animation: q-word .3s ease forwards; }
@keyframes q-word { to { opacity: 1; transform: translateY(-2px); } }
.q-rtitle { font-size: 22px; font-weight: 800; animation: q-in .4s ease both; }
.q-rchart { display: flex; align-items: flex-end; gap: 14px; height: 210px; width: 100%; padding-top: 30px; }
.q-rbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; position: relative; }
.q-rbar span { width: 100%; height: var(--h); border-radius: 10px 10px 4px 4px; background: linear-gradient(#fff, #8b7dff); animation: q-grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.q-rbar b { position: absolute; bottom: calc(var(--h, 50%) + 8px); font-size: 18px; animation: q-in .4s ease .7s both; }
.q-rbar:nth-child(1) b { bottom: calc(34% + 26px); } .q-rbar:nth-child(2) b { bottom: calc(64% + 26px); } .q-rbar:nth-child(3) b { bottom: calc(96% + 26px); }
.q-rbar em { font-style: normal; font-size: 12px; opacity: .8; }
.q-rtypes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.q-rtypes span { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); font-weight: 700; font-size: 15px; animation: q-zoom .45s cubic-bezier(.2,.9,.2,1.3) both; }
.q-rlogo { font-family: "Archivo Black", Impact, system-ui, sans-serif; font-size: 34px; text-transform: uppercase; animation: q-zoom .6s ease both; }
@media (prefers-reduced-motion: reduce) {
  .q-wave.is-live span, .q-reel-bg, .q-dub-cap span, .q-dub-chips .q-chip, .q-clean .q-wave.is-noisy { animation: none; }
  .q-dub-cap span:first-child { opacity: 1; }
}
.q-tw { display: inline-block; opacity: 0; animation: q-in .25s ease forwards; }

/* Connectors */
.q-app img { width: 20px; height: 20px; }
.q-app-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .q-app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .q-app-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.q-app-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--q-card); border: 1px solid var(--q-line); position: relative; }
.q-app-tile img { width: 32px; height: 32px; flex: none; }
.q-app-tile span { font-weight: 600; font-size: 15px; }
.q-app-tile em { font-style: normal; margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--q-ok); background: color-mix(in srgb, var(--q-ok) 12%, transparent); padding: 3px 8px; border-radius: 999px; }
.q-app-tile.is-lib { background: transparent; }
.q-app-tile.is-lib img { filter: grayscale(.4); opacity: .85; }
.q-app-tile.is-lib span { color: var(--q-ink-2); font-weight: 500; }
html.dark .q-app-tile img[src$="github.svg"], html.dark .q-app-tile img[src$="notion.svg"], html.dark .q-recipe img[src$="github.svg"], html.dark .q-recipe img[src$="notion.svg"], html.dark .q-app img[src$="github.svg"], html.dark .q-app img[src$="notion.svg"] { filter: invert(1); }
.q-recipes { display: grid; gap: 14px; }
@media (min-width: 768px) { .q-recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .q-recipes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-recipe { padding: 24px; border-radius: var(--q-radius); background: var(--q-bg-soft); display: grid; gap: 14px; align-content: start; }
.q-recipe-apps { display: flex; gap: 8px; }
.q-recipe-apps img { width: 28px; height: 28px; padding: 4px; background: var(--q-card); border-radius: 8px; box-sizing: content-box; }
.q-recipe p { font-size: 17px; line-height: 1.55; font-weight: 500; }
@media (min-width: 1024px) { .q-app-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Home: connectors showcase */
.q-marquee { overflow: hidden; margin-top: 36px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); direction: ltr; }
.q-marquee + .q-marquee { margin-top: 12px; }
.q-marquee-track { display: flex; gap: 12px; width: max-content; animation: q-mq 48s linear infinite; }
.q-marquee-rev .q-marquee-track { animation-direction: reverse; }
.q-marquee:hover .q-marquee-track { animation-play-state: paused; }
@keyframes q-mq { to { transform: translateX(-50%); } }
.q-mq-item { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; background: var(--q-card); border: 1px solid var(--q-line); white-space: nowrap; }
.q-mq-item img { width: 28px; height: 28px; }
.q-mq-item b { font-weight: 600; font-size: 15px; }
html.dark .q-mq-item img[src$="github.svg"], html.dark .q-mq-item img[src$="notion.svg"] { filter: invert(1); }
.q-callout { margin-top: 36px; display: grid; gap: 20px; align-items: center; padding: 28px; border-radius: var(--q-radius); background: var(--q-card); border: 1px solid var(--q-line); box-shadow: var(--q-shadow); }
@media (min-width: 900px) { .q-callout { grid-template-columns: auto 1fr auto; gap: 28px; } }
.q-callout-logos { display: flex; }
.q-callout-logos img { width: 44px; height: 44px; padding: 6px; border-radius: 12px; background: var(--q-bg-soft); border: 2px solid var(--q-card); margin-inline-end: -10px; box-sizing: content-box; }
@media (prefers-reduced-motion: reduce) { .q-marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .q-marquee { mask-image: none; -webkit-mask-image: none; } }
.q-usecase { gap: 12px; }
.q-usecase .q-h3 { margin-top: 2px; }
.q-when { display: inline-flex; width: max-content; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--q-card); color: var(--q-ink-2); border: 1px solid var(--q-line); }
.q-when::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--q-ok); }
.q-secure { margin-top: 22px; display: flex; gap: 18px; align-items: flex-start; padding: 28px; border-radius: var(--q-radius); background: var(--q-bg-soft); }
.q-secure .q-lock { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--q-btn); color: var(--q-btn-ink); }
.q-secure .q-lock svg { width: 22px; height: 22px; }
.q-secure .q-more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Section pages: code, tables, packs, rates ---------- */
.q-hero-split { align-items: start; }
@media (min-width: 960px) { .q-hero-split { grid-template-columns: 1fr 1fr; } }
.q-codecard { border-radius: 16px; overflow: hidden; background: #0d0d10; color: #e8e8ee; box-shadow: var(--q-shadow); text-align: left; }
.q-codecard-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; color: #a1a1aa; border-bottom: 1px solid rgba(255, 255, 255, .08); direction: ltr; }
.q-copy { background: rgba(255, 255, 255, .08); color: #e8e8ee; border: 0; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
.q-copy:hover { background: rgba(255, 255, 255, .16); }
.q-codecard pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 13px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; direction: ltr; text-align: left; }
.q-mini-code { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--q-bg-soft); font: 12.5px/1.6 ui-monospace, Menlo, monospace; overflow-x: auto; direction: ltr; text-align: left; color: var(--q-ink-2); white-space: pre; }
.q-sec-soft .q-mini-code { background: var(--q-bg); }
.q-tablewrap { overflow-x: auto; border: 1px solid var(--q-line); border-radius: 16px; background: var(--q-card); }
.q-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.q-table th { text-align: start; font-size: 13px; font-weight: 600; color: var(--q-muted); padding: 12px 16px; border-bottom: 1px solid var(--q-line); white-space: nowrap; }
.q-table td { padding: 12px 16px; border-bottom: 1px solid var(--q-line); vertical-align: top; }
.q-table tr:last-child td { border-bottom: 0; }
.q-table td:not(:first-child) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-mname { font-weight: 600; }
.q-mname small { display: block; font-weight: 400; color: var(--q-muted); font-size: 12.5px; }
.q-orgs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; margin-top: 18px; }
.q-orglogo { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--q-ink-2); opacity: .8; }
.q-checks { list-style: none; padding: 0; margin: 0; }
.q-packs { display: grid; gap: 14px; }
@media (min-width: 640px) { .q-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .q-packs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-pack { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--q-radius); background: var(--q-card); border: 1px solid var(--q-line); }
.q-pack.is-featured { border: 2px solid var(--q-ink); box-shadow: var(--q-shadow); }
.q-pack-name { font-weight: 700; font-size: 16px; color: var(--q-ink-2); }
.q-pack-price b { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.q-pack-toman { font-size: 14px; color: var(--q-muted); min-height: 1.2em; }
.q-pack .q-btn { margin-top: auto; }
.q-includes { margin-top: 26px; display: grid; gap: 10px; }
@media (min-width: 768px) { .q-includes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.q-search { width: 100%; max-width: 420px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--q-line-2); background: var(--q-card); color: var(--q-ink); font: inherit; font-size: 15px; margin-bottom: 22px; }
.q-rate-group { margin-top: 26px; }
.q-rate-group .q-h3 { margin-bottom: 12px; }
.q-rate-group.is-collapsed tbody tr:nth-child(n+9) { display: none; }
[data-rates-body].is-searching .q-rate-group.is-collapsed tbody tr:nth-child(n+9):not([hidden]) { display: table-row; }
[data-rates-body].is-searching .q-rates-more { display: none; }
.q-rates-more { margin-top: 12px; }

/* ---------- Phone fit: grid and flex children may shrink; long code scrolls inside its card ---------- */
.q-split > *, .q-grid-3 > *, .q-grid-2 > *, .q-tiles > *, .q-tiles-3 > *, .q-recipes > *, .q-packs > *, .q-app-grid > * { min-width: 0; }
.q-card, .q-tile, .q-recipe, .q-pack, .q-faq summary, .q-faq p, .q-prose p, .q-lead, .q-h1, .q-h2, .q-h3 { overflow-wrap: anywhere; }
.q-codecard, .q-tablewrap, .q-mock, .q-mini-code, .q-code { max-width: 100%; }
.q-codecard pre, .q-mini-code, .q-code { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.q-app-tile { min-width: 0; }
.q-app-tile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-app-tile em { flex: none; }
@media (max-width: 480px) {
  .q-app-tile { padding: 12px; gap: 10px; }
  .q-app-tile img { width: 26px; height: 26px; }
  .q-app-tile em { display: none; }
  .q-header-in { gap: 12px; }
  .q-header-end { gap: 4px; }
  .q-header .q-btn-sm { padding: 0 12px; }
  .q-card, .q-tile, .q-recipe, .q-pack { padding: 22px; }
  .q-table { font-size: 14px; }
  .q-table th, .q-table td { padding: 10px 12px; }
  .q-stage { border-radius: 22px; }
  .q-msg-user { max-width: 92%; }
}
.q-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.q-tabs::-webkit-scrollbar { display: none; }
.q-tabs button { flex: none; white-space: nowrap; }
[data-tabs] { min-width: 0; max-width: 100%; }
.q-table td:not(:first-child) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

/* Buy pages, models hub, download */
.q-model-logo { width: 40px; height: 40px; margin-bottom: 14px; }
html.dark .q-model-logo, html.dark .q-vendor img { filter: invert(1) grayscale(1); }
.q-models { display: grid; gap: 10px; }
@media (min-width: 640px) { .q-models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .q-models { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-model { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: var(--q-card); border: 1px solid var(--q-line); min-width: 0; }
.q-model b { font-size: 16px; }
.q-model span { font-size: 14px; color: var(--q-muted); }
.q-model strong { color: var(--q-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.q-vendors { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .q-vendors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .q-vendors { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.q-vendor { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--q-radius); background: var(--q-card); border: 1px solid var(--q-line); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.q-vendor:hover { transform: translateY(-2px); box-shadow: var(--q-shadow); }
.q-vendor img { width: 36px; height: 36px; }
.q-vendor b { font-size: 17px; }
.q-vendor span { font-size: 14px; color: var(--q-muted); }
.q-olist { margin: 14px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--q-ink-2); font-size: 15.5px; }
html:not(.tz-iran) .q-iran-only { display: none; }

/* ---------- Reading pages: legal, blog posts, blog index ---------- */
.q-narrow { max-width: 860px; }
.q-doc-hero { padding-bottom: 24px; }
.q-h1-doc { font-size: clamp(34px, 5.2vw, 60px); }
.q-doc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: var(--q-muted); }
.q-doc-one { max-width: 760px; margin-inline: auto; }
.q-doc-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .q-doc-grid { grid-template-columns: 240px minmax(0, 760px); justify-content: center; gap: 64px; } }
.q-doc-grid > * { min-width: 0; }
.q-toc nav { position: sticky; top: calc(var(--q-header) + 24px); display: grid; gap: 2px; }
.q-toc a { font-size: 14px; color: var(--q-ink-2); padding: 6px 10px; margin-inline: -10px; border-radius: 8px; }
.q-toc a:hover { background: var(--q-bg-soft); color: var(--q-ink); }
@media (max-width: 1023px) { .q-toc nav { position: static; padding: 18px 20px; border-radius: 16px; background: var(--q-bg-soft); } }
.q-doc { font-size: 18px; line-height: 1.8; color: var(--q-ink-2); min-width: 0; overflow-wrap: anywhere; }
.q-doc > * + * { margin-top: 18px; }
.q-doc h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; font-weight: 800; color: var(--q-ink); margin-top: 52px; letter-spacing: -0.01em; scroll-margin-top: calc(var(--q-header) + 20px); }
.q-doc h3 { font-size: 21px; line-height: 1.4; font-weight: 700; color: var(--q-ink); margin-top: 34px; scroll-margin-top: calc(var(--q-header) + 20px); }
.q-doc h4 { font-size: 18px; font-weight: 700; color: var(--q-ink); margin-top: 26px; }
.q-doc p, .q-doc ul, .q-doc ol { margin-bottom: 0; }
.q-doc ul, .q-doc ol { padding-inline-start: 24px; display: grid; gap: 8px; }
.q-doc a { color: var(--q-ink); text-decoration: underline; text-decoration-color: var(--q-line-2); text-underline-offset: 3px; }
.q-doc a:hover { text-decoration-color: currentColor; }
.q-doc strong, .q-doc b { color: var(--q-ink); }
.q-doc blockquote { margin: 0; padding: 20px 22px; border-radius: 16px; background: var(--q-bg-soft); color: var(--q-ink-2); font-size: 17px; }
.q-doc blockquote > p:first-child { font-weight: 700; color: var(--q-ink); }
.q-doc img { max-width: 100%; height: auto; border-radius: 16px; }
.q-doc figure { margin: 0; }
.q-doc figcaption { font-size: 14px; color: var(--q-muted); margin-top: 8px; }
.q-doc pre { margin: 0; padding: 16px 18px; border-radius: 14px; background: #0d0d10; color: #e8e8ee; font: 14px/1.65 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre-wrap; direction: ltr; text-align: left; }
.q-doc code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--q-bg-soft); padding: 1px 6px; border-radius: 6px; }
.q-doc pre code { background: none; padding: 0; font-size: inherit; }
.q-doc table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15.5px; }
.q-doc th, .q-doc td { padding: 10px 14px; border-bottom: 1px solid var(--q-line); text-align: start; vertical-align: top; }
.q-doc th { color: var(--q-ink); font-weight: 700; }
.q-doc hr { border: 0; border-top: 1px solid var(--q-line); margin: 36px 0; }
.q-posts { display: grid; gap: 18px; }
@media (min-width: 700px) { .q-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .q-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-post { display: flex; flex-direction: column; border-radius: var(--q-radius); overflow: hidden; background: var(--q-card); border: 1px solid var(--q-line); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.q-post:hover { transform: translateY(-2px); box-shadow: var(--q-shadow); }
.q-post-img { aspect-ratio: 16 / 9; background: var(--q-bg-soft); overflow: hidden; }
.q-post-img img { width: 100%; height: 100%; object-fit: cover; }
.q-post-body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.q-post-meta { font-size: 13px; color: var(--q-muted); }
.q-post h2, .q-post h3 { font-size: 19px; line-height: 1.4; font-weight: 700; color: var(--q-ink); }
.q-post p { font-size: 15px; color: var(--q-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.q-model-empty { grid-column: 1 / -1; }
.q-model-empty a { color: var(--q-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* First-visit language chooser (site.js) */
.q-chooser { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .5); }
.q-chooser-card { width: 100%; max-width: 360px; background: var(--q-card); color: var(--q-ink); border: 1px solid var(--q-line); border-radius: 20px; padding: 26px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Estedad, sans-serif; }
.q-chooser-title { font-size: 19px; font-weight: 700; margin: 0; }
.q-chooser-sub { font-size: 13.5px; color: var(--q-muted); margin: 6px 0 0; font-family: Estedad, system-ui, sans-serif; }
.q-chooser-opts { margin-top: 20px; display: grid; gap: 10px; }
.q-chooser-opts button { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--q-line-2); background: transparent; color: var(--q-ink); font-size: 16px; font-weight: 600; cursor: pointer; font-family: Estedad, -apple-system, sans-serif; }
.q-chooser-opts button:hover, .q-chooser-opts button:focus-visible { background: var(--q-btn); color: var(--q-btn-ink); border-color: var(--q-btn); }
