/*
 * quikdown-site.css — single shared stylesheet for the entire quikdown site.
 *
 * Used by every surface (/, /edit/, /examples/, /docs/, /changelog/) and every
 * example page. Light/dark/auto themes via body class + duplicated selectors.
 *
 * No frameworks, no Google Fonts, no icon libraries, no CSS variables.
 * System fonts only.
 */

/* ============================================================
 * 1. Reset and base (light theme is default)
 * ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
               sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1f2937;
  background: #f5f5f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a {
  color: #6c47b8;
  text-decoration: none;
  transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover { color: #4a2d8f; }

/* Scoped heading/paragraph styles so they don't cascade into .qde-preview */
.qd-page h1, .qd-page h2, .qd-page h3, .qd-page h4, .qd-page h5, .qd-page h6,
.qd-section h1, .qd-section h2, .qd-section h3, .qd-section h4 {
  font-weight: 700;
  line-height: 1.2;
  color: #1f2937;
  margin: 0 0 1rem 0;
}
.qd-page h1, .qd-section h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.qd-page h2, .qd-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.qd-page h3, .qd-section h3 { font-size: 1.35rem; }
.qd-page h4, .qd-section h4 { font-size: 1.1rem; }

.qd-page p, .qd-section p { margin: 0 0 1rem 0; }

/* Inline code outside the editor preview */
:where(:not(.qde-preview, .qde-preview *)) > code {
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: #f3e6ff;
  color: #6c47b8;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Code blocks outside the editor preview */
:where(:not(.qde-preview, .qde-preview *)) > pre,
.qd-page pre,
.qd-section pre,
.ex-pane pre,
pre.qd-code {
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  background: #1e1e2e;
  color: #e6e6f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}
.qd-page pre code,
.qd-section pre code,
.ex-pane pre code,
pre.qd-code code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* The editor's own injectStyles() handles all preview styling including
   pre, code, headings, paragraphs, lists, and blockquotes. No site-level
   overrides needed. */

kbd {
  display: inline-block;
  padding: 0.15em 0.5em;
  background: #1f2937;
  color: #ffffff;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.85em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================================
 * 2. Layout primitives
 * ============================================================ */

.qd-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.qd-page-content,
.ex-page,
.docs-wrap,
.cl-wrap,
.ap-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.qd-footer-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.qd-section {
  padding: 4rem 0;
}
/* Use on the first section after a hero to reduce the gap */
.qd-hero + .qd-section {
  padding-top: 1.5rem;
}
.qd-section-tight {
  padding: 1.5rem 0;
}
.qd-section-soft { background: #f8f9fb; }

.qd-grid {
  display: grid;
  gap: 1.5rem;
}
.qd-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qd-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qd-grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 880px) {
  .qd-grid-3, .qd-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
 * 3. Navbar
 * ============================================================ */

.qd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #e6e8ee;
  padding: 0;
}

.qd-nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.qd-nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  color: #1f2937;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.qd-nav-brand:hover { color: #1f2937; }

.qd-nav-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  transform: translateY(5px);
}

.qd-nav-brand-text {
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
}

.qd-nav-brand-version {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  letter-spacing: 0;
}

.qd-nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-left: auto;
}

.qd-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 7px;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-nav-link:hover {
  color: #1f2937;
  background: #f8f9fb;
}
.qd-nav-link.active {
  color: #9550bb;
  background: #f3e6ff;
}

.qd-nav-link.qd-nav-cta {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
}
.qd-nav-link.qd-nav-cta:hover {
  background: linear-gradient(135deg, #5a6ed0, #6a3f96);
  color: white;
  transform: translateY(-1px);
}

.qd-nav-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e6e8ee;
  background: transparent;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  margin-left: 0.5rem;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-nav-theme-btn:hover {
  border-color: #9550bb;
  color: #9550bb;
}

/* Hamburger toggle — hidden on desktop */
.qd-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  margin-left: auto;
  background: transparent;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-nav-toggle:hover { border-color: #9550bb; }
.qd-nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #4b5563;
  border-radius: 1px;
  transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 720px) {
  .qd-nav-inner { flex-wrap: wrap; gap: 0.5rem; }
  .qd-nav-toggle { display: flex; }
  .qd-nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-left: 0;
    padding-top: 0.5rem;
    border-top: 1px solid #e6e8ee;
  }
  .qd-nav.open .qd-nav-links { display: flex; }
  .qd-nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    border-radius: 8px;
  }
  .qd-nav-link.qd-nav-cta {
    margin-left: 0;
    margin-top: 0.25rem;
    text-align: center;
    justify-content: center;
  }
  .qd-nav-theme-btn { margin-left: 0; align-self: flex-start; margin-top: 0.25rem; }
}

/* ============================================================
 * 4. Hero
 * ============================================================ */

.qd-hero {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 4rem 0;
  overflow: hidden;
}

.qd-hero.qd-hero-compact {
  padding: 1.5rem 0 0.75rem 0;
}
.qd-hero.qd-hero-compact h1 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}
@media (max-width: 760px) {
  .qd-hero.qd-hero-compact h1 {
    white-space: normal;
    font-size: 1.35rem;
  }
}
.qd-hero.qd-hero-compact .qd-hero-sub {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  max-width: 75ch;
}
.qd-hero.qd-hero-compact .qd-hero-meta {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.qd-hero.qd-hero-compact .qd-hero-cta-row {
  margin-top: 0.4rem;
}

.qd-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.qd-hero-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.qd-hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.qd-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: white;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.qd-hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 60ch;
  margin: 0 0 2.5rem 0;
  line-height: 1.55;
}

.qd-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}
.qd-hero-meta strong { color: white; font-weight: 700; }
.qd-hero-meta-dot { opacity: 0.5; }

.qd-hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
}

.qd-cta-primary,
.qd-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.qd-cta-primary {
  background: white;
  color: #764ba2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.qd-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  color: #764ba2;
}

.qd-cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.9rem;
}
.qd-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.qd-cta-secondary .qd-copy-icon { opacity: 0.7; }
.qd-cta-secondary.copied {
  background: rgba(46, 213, 115, 0.3);
  border-color: rgba(46, 213, 115, 0.6);
}

/* ============================================================
 * 5. Cards
 * ============================================================ */

.qd-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(149, 80, 187, 0.15);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(118, 75, 162, 0.3);
}

.qd-card h3 {
  margin: 0 0 0.4rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.qd-card-size {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9550bb;
  background: #f3e6ff;
  padding: 0.2em 0.6em;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.qd-card-desc {
  color: #4b5563;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  flex: 1;
}

.qd-card-code {
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  background: #1e1e2e;
  color: #e6e6f0;
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.qd-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #9550bb;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: auto;
}
.qd-card-link:hover { color: #4a2d8f; }

/* Feature cards (smaller, icon-based) */
.qd-feature {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(149, 80, 187, 0.15);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.qd-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 0.75rem;
}
.qd-feature h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
  color: #1f2937;
}
.qd-feature p {
  margin: 0;
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.55;
}

/* Feature list (two-column, just facts) */
.qd-feature-list h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: #1f2937;
}
.qd-feature-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.qd-feature-list li {
  padding: 0.45rem 0;
  padding-left: 1.5em;
  position: relative;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.4;
}
.qd-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2ecc71;
  font-weight: 700;
}

/* ============================================================
 * 6. Install strip
 * ============================================================ */

.qd-install-strip {
  background: linear-gradient(135deg, #1e1e2e 0%, #2a1f3d 100%);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  color: white;
}

.qd-install-strip-cmd {
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code",
               "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 1.05rem;
  color: #d9b3ff;
  flex: 1;
  min-width: 200px;
  user-select: all;
}
.qd-install-strip-cmd::before { content: "$ "; opacity: 0.5; }

.qd-install-strip-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.qd-install-strip-actions a,
.qd-install-strip-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-install-strip-actions a:hover,
.qd-install-strip-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.qd-install-strip-actions .copied {
  background: rgba(46, 213, 115, 0.3);
  border-color: rgba(46, 213, 115, 0.6);
}

/* ============================================================
 * 7. Section eyebrow + heading
 * ============================================================ */

.qd-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.qd-section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9550bb;
  margin-bottom: 0.5rem;
}
.qd-section-head h2 {
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.qd-section-head p {
  color: #4b5563;
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 auto;
}

/* ============================================================
 * 8. Footer
 * ============================================================ */

.qd-footer {
  background: #ffffff;
  border-top: 1px solid #e6e8ee;
  padding: 2.5rem 0 1.5rem 0;
  margin-top: 4rem;
  color: #4b5563;
  font-size: 0.9rem;
}
.qd-footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 720px) {
  .qd-footer-cols { grid-template-columns: 1fr 1fr; }
}
.qd-footer-col h5 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
}
.qd-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.qd-footer-col li { margin: 0.3rem 0; }
.qd-footer-col a {
  color: #4b5563;
  text-decoration: none;
}
.qd-footer-col a:hover { color: #9550bb; }

.qd-footer-bottom {
  border-top: 1px solid #e6e8ee;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}
.qd-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1f2937;
  font-weight: 700;
  text-decoration: none;
}
.qd-footer-brand .qd-nav-brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

/* ============================================================
 * 10. Embedded editor (landing page mini)
 * ----
 * Direct-mounted QuikdownEditor (NOT an iframe). The editor fills its
 * container, so .qd-editor-wrap has an explicit height. The editor's
 * own internal panes scroll their content.
 * ============================================================ */

.qd-editor-wrap {
  position: relative;
  width: 100%;
  height: clamp(420px, 60vh, 640px);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.qd-editor-wrap > #landing-demo-editor {
  width: 100%;
  height: 100%;
}
.qd-editor-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  z-index: -1;
  opacity: 0.4;
}

@media (max-width: 720px) {
  .qd-editor-wrap { height: clamp(380px, 70vh, 540px); }
}

/* ============================================================
 * 11. Code tabs
 * ============================================================ */

.qd-tabs {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(149, 80, 187, 0.15);
}
.qd-tabs-header {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem 0 0.5rem;
  background: #f8f9fb;
  border-bottom: 1px solid #e6e8ee;
}
.qd-tab-btn {
  padding: 0.65rem 1.1rem;
  border: none;
  background: transparent;
  color: #4b5563;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.qd-tab-btn:hover { color: #1f2937; }
.qd-tab-btn.active {
  color: #9550bb;
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: #9550bb;
}
.qd-tab-pane {
  display: none;
  padding: 0;
}
.qd-tab-pane.active { display: block; }
.qd-tab-pane pre {
  margin: 0;
  border-radius: 0;
}

/* ============================================================
 * 12. In-production callout
 * ============================================================ */

.qd-callout {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(149, 80, 187, 0.15);
  border-left: 4px solid #9550bb;
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.qd-callout-img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.qd-callout h3 { margin: 0 0 0.4rem 0; }
.qd-callout p {
  color: #4b5563;
  margin: 0 0 0.75rem 0;
}
@media (max-width: 720px) {
  .qd-callout { grid-template-columns: 1fr; }
}

/* ============================================================
 * 13. Utility
 * ============================================================ */

.qd-text-center { text-align: center; }
.qd-mt-0 { margin-top: 0; }
.qd-mt-md { margin-top: 1.5rem; }
.qd-mt-lg { margin-top: 2.5rem; }
.qd-mb-md { margin-bottom: 1.5rem; }
.qd-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * 14. Dark theme overrides
 * ============================================================ */

body.qd-theme-dark {
  color: #e6e6f0;
  background: #0f0f1a;
}

body.qd-theme-dark .qd-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.qd-theme-dark a { color: #c9aeff; }
body.qd-theme-dark a:hover { color: #e2cfff; }

body.qd-theme-dark .qd-page h1,
body.qd-theme-dark .qd-page h2,
body.qd-theme-dark .qd-page h3,
body.qd-theme-dark .qd-page h4,
body.qd-theme-dark .qd-page h5,
body.qd-theme-dark .qd-page h6,
body.qd-theme-dark .qd-section h1,
body.qd-theme-dark .qd-section h2,
body.qd-theme-dark .qd-section h3,
body.qd-theme-dark .qd-section h4 {
  color: #e6e6f0;
}

body.qd-theme-dark :where(:not(.qde-preview, .qde-preview *)) > code {
  background: rgba(179, 136, 221, 0.18);
  color: #d9b3ff;
}

body.qd-theme-dark kbd {
  background: #e6e6f0;
  color: #181828;
}

body.qd-theme-dark .qd-section-soft { background: #1f1f30; }

body.qd-theme-dark .qd-nav {
  background: rgba(24, 24, 40, 0.96);
  border-bottom-color: #2a2a3a;
}
body.qd-theme-dark .qd-nav-brand { color: #e6e6f0; }
body.qd-theme-dark .qd-nav-brand:hover { color: #e6e6f0; }
body.qd-theme-dark .qd-nav-brand-version { color: #888898; }
body.qd-theme-dark .qd-nav-link { color: #b8b8c8; }
body.qd-theme-dark .qd-nav-link:hover {
  color: #e6e6f0;
  background: #1f1f30;
}
body.qd-theme-dark .qd-nav-link.active {
  color: #9550bb;
  background: rgba(179, 136, 221, 0.18);
}
body.qd-theme-dark .qd-nav-toggle { border-color: #2a2a3a; }
body.qd-theme-dark .qd-nav-toggle:hover { border-color: #9550bb; }
body.qd-theme-dark .qd-nav-toggle-bar { background: #b8b8c8; }
body.qd-theme-dark .qd-nav-links { border-top-color: #2a2a3a; }
body.qd-theme-dark .qd-nav-theme-btn {
  border-color: #2a2a3a;
  color: #b8b8c8;
}

body.qd-theme-dark .qd-card {
  background: rgba(24, 24, 40, 0.96);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(179, 136, 221, 0.18);
}
body.qd-theme-dark .qd-card:hover {
  box-shadow: 0 16px 50px rgba(118, 75, 162, 0.3);
}
body.qd-theme-dark .qd-card-size {
  background: rgba(179, 136, 221, 0.18);
}
body.qd-theme-dark .qd-card-desc { color: #b8b8c8; }

body.qd-theme-dark .qd-feature {
  background: rgba(24, 24, 40, 0.96);
  border-color: rgba(179, 136, 221, 0.18);
}
body.qd-theme-dark .qd-feature:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
body.qd-theme-dark .qd-feature h4 { color: #e6e6f0; }
body.qd-theme-dark .qd-feature p { color: #b8b8c8; }
body.qd-theme-dark .qd-feature-list h4 { color: #e6e6f0; }
body.qd-theme-dark .qd-feature-list li { color: #b8b8c8; }

body.qd-theme-dark .qd-install-strip {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

body.qd-theme-dark .qd-section-head p { color: #b8b8c8; }

body.qd-theme-dark .qd-footer {
  background: #181828;
  border-top-color: #2a2a3a;
  color: #b8b8c8;
}
body.qd-theme-dark .qd-footer-col h5 { color: #e6e6f0; }
body.qd-theme-dark .qd-footer-col a { color: #b8b8c8; }
body.qd-theme-dark .qd-footer-col a:hover { color: #9550bb; }
body.qd-theme-dark .qd-footer-bottom {
  border-top-color: #2a2a3a;
  color: #888898;
}
body.qd-theme-dark .qd-footer-brand { color: #e6e6f0; }

body.qd-theme-dark .qd-editor-wrap {
  background: rgba(24, 24, 40, 0.96);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

body.qd-theme-dark .qd-tabs {
  background: rgba(24, 24, 40, 0.96);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(179, 136, 221, 0.18);
}
body.qd-theme-dark .qd-tabs-header {
  background: #1f1f30;
  border-bottom-color: #2a2a3a;
}
body.qd-theme-dark .qd-tab-btn { color: #b8b8c8; }
body.qd-theme-dark .qd-tab-btn:hover { color: #e6e6f0; }
body.qd-theme-dark .qd-tab-btn.active {
  background: rgba(24, 24, 40, 0.96);
}

body.qd-theme-dark .qd-callout {
  background: rgba(24, 24, 40, 0.96);
  border-color: rgba(179, 136, 221, 0.18);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
body.qd-theme-dark .qd-callout p { color: #b8b8c8; }

/* ============================================================
 * 15. Auto theme (mirrors dark when system prefers dark)
 * ============================================================ */

@media (prefers-color-scheme: dark) {
  body.qd-theme-auto {
    color: #e6e6f0;
    background: #0f0f1a;
  }
  body.qd-theme-auto .qd-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  }
  body.qd-theme-auto a { color: #c9aeff; }
  body.qd-theme-auto a:hover { color: #e2cfff; }
  body.qd-theme-auto .qd-page h1,
  body.qd-theme-auto .qd-page h2,
  body.qd-theme-auto .qd-page h3,
  body.qd-theme-auto .qd-page h4,
  body.qd-theme-auto .qd-page h5,
  body.qd-theme-auto .qd-page h6,
  body.qd-theme-auto .qd-section h1,
  body.qd-theme-auto .qd-section h2,
  body.qd-theme-auto .qd-section h3,
  body.qd-theme-auto .qd-section h4 {
    color: #e6e6f0;
  }
  body.qd-theme-auto :where(:not(.qde-preview, .qde-preview *)) > code {
    background: rgba(179, 136, 221, 0.18);
    color: #d9b3ff;
  }
  body.qd-theme-auto kbd {
    background: #e6e6f0;
    color: #181828;
  }
  body.qd-theme-auto .qd-section-soft { background: #1f1f30; }
  body.qd-theme-auto .qd-nav {
    background: rgba(24, 24, 40, 0.96);
    border-bottom-color: #2a2a3a;
  }
  body.qd-theme-auto .qd-nav-brand { color: #e6e6f0; }
  body.qd-theme-auto .qd-nav-brand:hover { color: #e6e6f0; }
  body.qd-theme-auto .qd-nav-brand-version { color: #888898; }
  body.qd-theme-auto .qd-nav-link { color: #b8b8c8; }
  body.qd-theme-auto .qd-nav-link:hover {
    color: #e6e6f0;
    background: #1f1f30;
  }
  body.qd-theme-auto .qd-nav-link.active {
    color: #9550bb;
    background: rgba(179, 136, 221, 0.18);
  }
  body.qd-theme-auto .qd-nav-toggle { border-color: #2a2a3a; }
  body.qd-theme-auto .qd-nav-toggle:hover { border-color: #9550bb; }
  body.qd-theme-auto .qd-nav-toggle-bar { background: #b8b8c8; }
  body.qd-theme-auto .qd-nav-links { border-top-color: #2a2a3a; }
  body.qd-theme-auto .qd-nav-theme-btn {
    border-color: #2a2a3a;
    color: #b8b8c8;
  }
  body.qd-theme-auto .qd-card {
    background: rgba(24, 24, 40, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    border-color: rgba(179, 136, 221, 0.18);
  }
  body.qd-theme-auto .qd-card:hover {
    box-shadow: 0 16px 50px rgba(118, 75, 162, 0.3);
  }
  body.qd-theme-auto .qd-card-size {
    background: rgba(179, 136, 221, 0.18);
  }
  body.qd-theme-auto .qd-card-desc { color: #b8b8c8; }
  body.qd-theme-auto .qd-feature {
    background: rgba(24, 24, 40, 0.96);
    border-color: rgba(179, 136, 221, 0.18);
  }
  body.qd-theme-auto .qd-feature:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
  body.qd-theme-auto .qd-feature h4 { color: #e6e6f0; }
  body.qd-theme-auto .qd-feature p { color: #b8b8c8; }
  body.qd-theme-auto .qd-feature-list h4 { color: #e6e6f0; }
  body.qd-theme-auto .qd-feature-list li { color: #b8b8c8; }
  body.qd-theme-auto .qd-install-strip {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
  body.qd-theme-auto .qd-section-head p { color: #b8b8c8; }
  body.qd-theme-auto .qd-footer {
    background: #181828;
    border-top-color: #2a2a3a;
    color: #b8b8c8;
  }
  body.qd-theme-auto .qd-footer-col h5 { color: #e6e6f0; }
  body.qd-theme-auto .qd-footer-col a { color: #b8b8c8; }
  body.qd-theme-auto .qd-footer-col a:hover { color: #9550bb; }
  body.qd-theme-auto .qd-footer-bottom {
    border-top-color: #2a2a3a;
    color: #888898;
  }
  body.qd-theme-auto .qd-footer-brand { color: #e6e6f0; }
  body.qd-theme-auto .qd-editor-wrap {
    background: rgba(24, 24, 40, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
  body.qd-theme-auto .qd-tabs {
    background: rgba(24, 24, 40, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    border-color: rgba(179, 136, 221, 0.18);
  }
  body.qd-theme-auto .qd-tabs-header {
    background: #1f1f30;
    border-bottom-color: #2a2a3a;
  }
  body.qd-theme-auto .qd-tab-btn { color: #b8b8c8; }
  body.qd-theme-auto .qd-tab-btn:hover { color: #e6e6f0; }
  body.qd-theme-auto .qd-tab-btn.active {
    background: rgba(24, 24, 40, 0.96);
  }
  body.qd-theme-auto .qd-callout {
    background: rgba(24, 24, 40, 0.96);
    border-color: rgba(179, 136, 221, 0.18);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
  body.qd-theme-auto .qd-callout p { color: #b8b8c8; }
}
