/* QuillBot-inspired homepage — Gautam CodeFach AI branding (green) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

.qb-home {
  font-family: 'DM Sans', Inter, system-ui, sans-serif;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem 0 3rem;
  position: relative;
  overflow-x: hidden;
}
.qb-home::before {
  content: '';
  position: absolute;
  inset: -2rem -1rem auto;
  height: 420px;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(16, 185, 129, 0.18), transparent 70%),
    radial-gradient(ellipse 45% 40% at 90% 20%, rgba(14, 165, 233, 0.12), transparent 65%),
    radial-gradient(ellipse 40% 35% at 10% 30%, rgba(15, 118, 110, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.qb-home > * { position: relative; z-index: 1; }

.qb-fade {
  animation: qbUp .55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes qbUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Top badges */
.qb-top-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: center;
  margin-bottom: 1.5rem;
}
.qb-pill-badge {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(236, 253, 245, 0.85);
  border: 1px solid #a7f3d0;
  backdrop-filter: blur(10px);
  color: #047857; font-size: 12px; font-weight: 600;
}
.qb-leaf { color: #10b981; }
.qb-star { color: #f59e0b; font-weight: 800; }
.qb-dot { color: #86efac; }
.qb-chrome-cta {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 999px;
  background: #0f172a; color: #fff; font-size: 12px; font-weight: 700;
  text-decoration: none; transition: transform .15s, background .15s;
}
.qb-chrome-cta:hover { background: #1e293b; transform: translateY(-1px); }

/* Hero */
.qb-hero { text-align: center; margin-bottom: 2rem; }
.qb-hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #0f766e;
}
.qb-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 800; letter-spacing: -0.035em;
  color: #0f172a; line-height: 1.12;
  word-break: break-word;
  overflow-wrap: break-word;
}
.qb-grad {
  background: linear-gradient(120deg, #059669 10%, #0ea5e9 55%, #0f766e 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.qb-hero p {
  margin: .75rem auto 0;
  max-width: 560px;
  font-size: clamp(.98rem, 2vw, 1.12rem);
  color: #64748b; font-weight: 500;
  word-break: break-word;
}
.qb-hero-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 1.15rem;
}
.qb-btn-primary {
  display: inline-flex; align-items: center;
  padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #059669, #0d9488);
  color: #fff; font-size: 13px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.3);
  transition: transform .15s, box-shadow .15s;
}
.qb-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(5, 150, 105, 0.38); }
.qb-btn-ghost {
  display: inline-flex; align-items: center;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid #d1d5db;
  backdrop-filter: blur(8px);
  color: #334155; font-size: 13px; font-weight: 700;
  text-decoration: none; transition: .15s;
}
.qb-btn-ghost:hover { border-color: #10b981; color: #047857; }

/* Trust strip */
.qb-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 auto 2.25rem;
  max-width: 1240px;
}
.qb-trust-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.45);
}
.qb-trust-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.qb-trust-item span {
  display: block;
  margin-top: 0.2rem;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}
@media (max-width: 800px) {
  .qb-trust { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .qb-trust { grid-template-columns: 1fr; }
}
html.dark .qb-trust-item {
  background: rgba(30, 41, 59, 0.85);
  border-color: #334155;
}
html.dark .qb-trust-item strong { color: #f8fafc; }
html.dark .qb-trust-item span { color: #94a3b8; }

/* Flagship AI Suite */
.qb-flagship {
  margin: 0 auto 2rem;
  padding: 1.25rem 0 0.25rem;
}
.qb-flagship-head {
  text-align: center;
  margin-bottom: 1.15rem;
}
.qb-flagship-kicker {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 0.55rem;
}
.qb-flagship-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800; letter-spacing: -0.02em; color: #0f172a;
}
.qb-flagship-head p {
  margin: 0.4rem auto 0;
  max-width: 520px;
  font-size: 0.92rem; color: #64748b; font-weight: 500;
}
.qb-flagship-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.qb-flag-card {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  padding: 1.05rem 0.95rem 0.95rem;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.35);
  transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s, border-color .22s;
  overflow: hidden;
  min-height: 210px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.qb-flag-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--flag-a), var(--flag-b));
  opacity: 0.95;
}
.qb-flag-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.4);
  border-color: color-mix(in srgb, var(--flag-a) 45%, #e2e8f0);
}
.qb-flag-badge {
  align-self: flex-start;
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  padding: 2px 7px; border-radius: 6px;
  margin-bottom: 0.7rem;
}
.qb-flag-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: 0.65rem;
  background: color-mix(in srgb, var(--flag-a) 14%, #fff);
  color: var(--flag-b);
}
.qb-flag-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem; font-weight: 800; color: #0f172a;
}
.qb-flag-card p {
  margin: 0;
  flex: 1;
  font-size: 12px; line-height: 1.45; color: #64748b; font-weight: 500;
}
.qb-flag-cta {
  margin-top: 0.75rem;
  font-size: 12px; font-weight: 700;
  color: var(--flag-b);
}
.qb-flag-violet { --flag-a: #8b5cf6; --flag-b: #6d28d9; }
.qb-flag-sky { --flag-a: #38bdf8; --flag-b: #0284c7; }
.qb-flag-teal { --flag-a: #2dd4bf; --flag-b: #0f766e; }
.qb-flag-green { --flag-a: #4ade80; --flag-b: #15803d; }
.qb-flag-orange { --flag-a: #fb923c; --flag-b: #c2410c; }
.qb-flag-emerald { --flag-a: #34d399; --flag-b: #047857; }

@media (max-width: 1200px) {
  .qb-flagship-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .qb-flagship-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-flag-card { min-height: 190px; }
}

html.dark .qb-flag-card {
  background: #1e293b; border-color: #334155; color: #e2e8f0;
}
html.dark .qb-flag-card h3 { color: #f8fafc; }
html.dark .qb-flag-card p { color: #94a3b8; }
html.dark .qb-flagship-head h2 { color: #f8fafc; }

/* Search card */
.qb-search-wrap { max-width: 920px; margin: 0 auto 2rem; }
.qb-search-card {
  background: linear-gradient(160deg, #0f172a 0%, #13251f 55%, #151b18 100%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 1.1rem 1.15rem 0.85rem;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(16, 185, 129, 0.08);
  transition: box-shadow .2s, border-color .2s;
  backdrop-filter: blur(12px);
}
.qb-search-card.drag {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.25), 0 24px 60px -20px rgba(0,0,0,.35);
}
.qb-search-card textarea {
  width: 100%; min-height: 110px; resize: none; border: none; outline: none;
  background: transparent; color: #f8fafc;
  font-size: 1.05rem; font-weight: 500; line-height: 1.5;
  font-family: inherit;
}
.qb-search-card textarea::placeholder { color: #94a3b8; }
.qb-search-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: .35rem; margin-bottom: .75rem;
  border-top: 1px solid rgba(148,163,184,.15);
}
.qb-search-left { display: flex; align-items: center; gap: 8px; }
.qb-icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: #cbd5e1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
}
.qb-icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.qb-icon-btn svg { width: 18px; height: 18px; }
.qb-file-label { font-size: 11px; font-weight: 600; color: #4ade80; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-go {
  width: 42px; height: 42px; border-radius: 999px; border: none;
  background: #22c55e; color: #052e16; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(34,197,94,.35);
  transition: transform .15s, filter .15s;
}
.qb-go:hover { transform: scale(1.06); filter: brightness(1.05); }
.qb-go svg { width: 18px; height: 18px; }

.qb-tool-pills {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.qb-tool-pills::-webkit-scrollbar { display: none; }
.qb-pill {
  flex-shrink: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: #e2e8f0;
  font-size: 12px; font-weight: 700; padding: 7px 12px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: .15s;
}
.qb-pill:hover { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4); color: #86efac; }
.qb-pill.active {
  background: rgba(34,197,94,.22); border-color: #22c55e; color: #4ade80;
}
.qb-disclaimer {
  margin: .65rem 0 0; font-size: 10px; color: #64748b; line-height: 1.4;
}

/* Ideas — pushed well below compose + suite for visual balance */
.qb-ideas {
  max-width: 920px;
  margin: 6.5rem auto 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e2e8f0;
}
.qb-ideas-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #94a3b8; margin: 0 0 .9rem;
}
.qb-ideas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.qb-idea {
  text-align: left; border-radius: 16px; padding: 14px;
  background: #fff; border: 1px solid #e2e8f0;
  cursor: pointer; transition: .2s; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.qb-idea:hover {
  transform: translateY(-2px);
  border-color: #86efac;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.qb-idea > span:last-child { font-size: 12px; font-weight: 500; color: #475569; line-height: 1.4; }
.qb-idea-tag {
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
}
.qb-c-blue { color: #2563eb; }
.qb-c-violet { color: #7c3aed; }
.qb-c-green { color: #059669; }
.qb-c-teal { color: #0d9488; }
.qb-c-red { color: #dc2626; }
.qb-c-amber { color: #d97706; }

/* Other AI Tools */
.qb-suite { margin-bottom: 3rem; }
.qb-suite-head { text-align: center; margin-bottom: 1.25rem; }
.qb-suite-head h2 {
  margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800;
  letter-spacing: -0.02em; color: #0f172a;
}
.qb-suite-head p { margin: .4rem 0 0; color: #64748b; font-size: 14px; }

.qb-cats {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.qb-cat {
  border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: .15s;
}
.qb-cat:hover { border-color: #86efac; color: #047857; }
.qb-cat.active {
  background: #022c22; color: #fff; border-color: #022c22;
}

.qb-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.qb-tool-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 16px;
  background: #fff; border: 1px solid #e2e8f0;
  text-decoration: none; color: inherit;
  transition: .2s cubic-bezier(.22,1,.36,1);
}
.qb-tool-card:hover {
  transform: translateY(-3px);
  border-color: #bbf7d0;
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}
.qb-tool-card.hidden-cat { display: none; }
.qb-tool-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.qb-tool-card h3 {
  margin: 0 0 4px; font-size: 14px; font-weight: 750; color: #0f172a;
  display: flex; align-items: center; gap: 6px;
}
.qb-tool-card p { margin: 0; font-size: 12px; color: #64748b; line-height: 1.4; }
.qb-mini-pro {
  font-size: 8px; font-weight: 800; letter-spacing: .4px;
  background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #78350f;
  padding: 1px 5px; border-radius: 4px;
}

.qb-bg-blue { background: #dbeafe; color: #1d4ed8; }
.qb-bg-red { background: #fee2e2; color: #dc2626; }
.qb-bg-violet { background: #ede9fe; color: #7c3aed; }
.qb-bg-teal { background: #ccfbf1; color: #0f766e; }
.qb-bg-indigo { background: #e0e7ff; color: #4338ca; }
.qb-bg-amber { background: #fef3c7; color: #d97706; }
.qb-bg-green { background: #dcfce7; color: #15803d; }
.qb-bg-orange { background: #ffedd5; color: #ea580c; }
.qb-bg-emerald { background: #d1fae5; color: #047857; }
.qb-bg-sky { background: #e0f2fe; color: #0284c7; }
.qb-bg-pink { background: #fce7f3; color: #db2777; }
.qb-bg-cyan { background: #cffafe; color: #0891b2; }
.qb-bg-slate { background: #f1f5f9; color: #475569; }
.qb-bg-gold { background: #fef3c7; color: #b45309; }

/* Pillars */
.qb-pillars { margin-bottom: 2.75rem; text-align: center; }
.qb-pillars h2 {
  margin: 0; font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 800;
  letter-spacing: -0.02em; color: #0f172a;
}
.qb-pillars-sub { margin: .4rem 0 1.25rem; color: #64748b; font-size: 14px; }
.qb-pillars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left;
}
.qb-pillar {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 18px;
  padding: 16px; overflow: hidden;
  transition: .2s;
}
.qb-pillar:hover { box-shadow: 0 16px 36px rgba(15,23,42,.08); transform: translateY(-2px); }
.qb-pillar-visual {
  height: 110px; border-radius: 12px; margin-bottom: 14px;
}
.qb-v1 { background: linear-gradient(135deg, #ecfdf5, #d1fae5 40%, #86efac); }
.qb-v2 { background: linear-gradient(135deg, #f0fdfa, #99f6e4 45%, #5eead4); }
.qb-v3 { background: linear-gradient(135deg, #fff7ed, #fed7aa 40%, #fdba74); }
.qb-pillar h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: #0f172a; }
.qb-pillar p { margin: 0 0 12px; font-size: 13px; color: #64748b; line-height: 1.45; }
.qb-pillar a {
  font-size: 13px; font-weight: 700; color: #059669; text-decoration: none;
}
.qb-pillar a:hover { color: #047857; }

/* Stats */
.qb-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 2rem;
  background: #0f172a; color: #fff; border-radius: 20px; padding: 1.4rem 1rem;
}
.qb-stats div { text-align: center; }
.qb-stats strong {
  display: block; font-size: 1.5rem; font-weight: 800; color: #4ade80; margin-bottom: 4px;
}
.qb-stats span { font-size: 11px; color: #94a3b8; font-weight: 500; }

/* CTA */
.qb-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #16a34a, #059669);
  border-radius: 20px; padding: 1.5rem 1.6rem; color: #fff;
  box-shadow: 0 16px 40px rgba(22,163,74,.28);
}
.qb-cta h2 { margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; }
.qb-cta p { margin: 0; font-size: 13px; color: #dcfce7; }
.qb-cta-btn {
  background: #fff; color: #14532d; font-weight: 800; font-size: 13px;
  padding: 11px 18px; border-radius: 999px; text-decoration: none;
  transition: transform .15s;
}
.qb-cta-btn:hover { transform: scale(1.04); }

/* Modal */
.qb-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.qb-modal[hidden] { display: none !important; }
.qb-modal-card {
  width: min(480px, 100%); background: #fff; border-radius: 16px;
  padding: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: qbUp .3s ease;
}
.qb-modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.qb-modal-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.qb-modal-head button {
  border: none; background: #f1f5f9; width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
}
.qb-modal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.qb-modal-grid a {
  padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 12px; font-weight: 700; color: #334155; text-decoration: none;
}
.qb-modal-grid a:hover { border-color: #86efac; background: #ecfdf5; color: #047857; }
/* ═══════ DARK MODE ═══════ */
html.dark .qb-home::before {
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(16, 185, 129, 0.08), transparent 70%),
    radial-gradient(ellipse 45% 40% at 90% 20%, rgba(14, 165, 233, 0.06), transparent 65%),
    radial-gradient(ellipse 40% 35% at 10% 30%, rgba(15, 118, 110, 0.05), transparent 60%);
}
html.dark .qb-hero h1,
html.dark .qb-suite-head h2,
html.dark .qb-pillars h2,
html.dark .qb-tool-card h3,
html.dark .qb-pillar h3,
html.dark .qb-flagship-head h2,
html.dark .qb-ideas-label { color: #f1f5f9; }
html.dark .qb-hero p,
html.dark .qb-hero-eyebrow { color: #94a3b8; }
html.dark .qb-flagship-head p,
html.dark .qb-suite-head p,
html.dark .qb-pillars-sub { color: #94a3b8; }
html.dark .qb-idea,
html.dark .qb-tool-card,
html.dark .qb-pillar,
html.dark .qb-cat,
html.dark .qb-modal-card { background: #1e293b; border-color: #334155; }
html.dark .qb-idea > span:last-child,
html.dark .qb-tool-card p,
html.dark .qb-pillar p { color: #94a3b8; }
html.dark .qb-pill-badge { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
html.dark .qb-chrome-cta { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html.dark .qb-trust-item {
  background: rgba(30, 41, 59, 0.85);
  border-color: #334155;
}
html.dark .qb-trust-item strong { color: #f8fafc; }
html.dark .qb-trust-item span { color: #94a3b8; }
html.dark .qb-btn-ghost {
  background: rgba(30, 41, 59, 0.7);
  border-color: #475569;
  color: #e2e8f0;
}
html.dark .qb-btn-ghost:hover { border-color: #10b981; color: #6ee7b7; }
html.dark .qb-search-card {
  background: linear-gradient(160deg, #0f172a 0%, #13251f 55%, #151b18 100%);
  border-color: rgba(255,255,255,.08);
}
html.dark .qb-search-card textarea { color: #f8fafc; }
html.dark .qb-search-card textarea::placeholder { color: #64748b; }
html.dark .qb-disclaimer { color: #64748b; }
html.dark .qb-stats {
  background: #1e293b;
  border-color: #334155;
}
html.dark .qb-stats strong { color: #4ade80; }
html.dark .qb-stats span { color: #94a3b8; }
html.dark .qb-cta {
  background: linear-gradient(135deg, #134e4a, #0f172a);
  box-shadow: none;
}
html.dark .qb-cta p { color: #94a3b8; }
html.dark .qb-cat:hover { border-color: #059669; color: #6ee7b7; }
html.dark .qb-cat.active {
  background: #059669; color: #fff; border-color: #059669;
}
html.dark .qb-idea-tag { color: inherit; }
html.dark .qb-modal-grid a { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html.dark .qb-modal-grid a:hover { border-color: #059669; background: #134e4a; color: #6ee7b7; }
html.dark .qb-flagship-kicker { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); color: #6ee7b7; }

@media (max-width: 900px) {
  .qb-ideas-grid,
  .qb-tools-grid,
  .qb-pillars-grid { grid-template-columns: 1fr 1fr; }
  .qb-stats { grid-template-columns: 1fr 1fr; }
}

/* ═══════ MOBILE HORIZONTAL CAROUSELS ═══════ */
@media (max-width: 768px) {
  .qb-home {
    padding: 0.35rem 0 2.5rem;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .qb-top-badges {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 0 0.75rem;
  }
  .qb-pill-badge,
  .qb-chrome-cta {
    justify-content: center;
    text-align: center;
  }
  .qb-hero {
    padding: 0 0.75rem;
  }
  .qb-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .qb-btn-primary,
  .qb-btn-ghost {
    justify-content: center;
  }
  .qb-search-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }
  .qb-search-left {
    justify-content: space-between;
  }
  .qb-go {
    align-self: flex-end;
  }
  .qb-search-card {
    padding: 1rem 0.95rem 0.85rem;
  }
  .qb-search-card textarea {
    min-height: 80px;
  }
  .qb-search-wrap {
    padding: 0 0.75rem;
  }
  .qb-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .qb-flagship-head,
  .qb-suite-head,
  .qb-pillars,
  .qb-ideas-label {
    padding: 0 0.75rem;
  }
  .qb-cats {
    padding: 0 0.75rem;
  }

  /* ──── Trust strip → horizontal carousel ──── */
  .qb-trust {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 0 0.75rem 0.5rem;
    scrollbar-width: none;
  }
  .qb-trust::-webkit-scrollbar { display: none; }
  .qb-trust-item {
    flex: 0 0 42%;
    min-width: 42%;
    scroll-snap-align: start;
    padding: 0.7rem 0.6rem;
  }
  .qb-trust-item strong {
    font-size: 0.82rem;
  }

  /* ──── Flagship cards → horizontal carousel ──── */
  .qb-flagship-grid {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 0 0.75rem 0.75rem;
    scrollbar-width: none;
  }
  .qb-flagship-grid::-webkit-scrollbar { display: none; }
  .qb-flag-card {
    flex: 0 0 72%;
    min-width: 72%;
    min-height: 180px;
    scroll-snap-align: start;
  }

  /* ──── Other AI Tools → horizontal carousel ──── */
  .qb-tools-grid {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 0 0.75rem 0.75rem;
    scrollbar-width: none;
  }
  .qb-tools-grid::-webkit-scrollbar { display: none; }
  .qb-tool-card {
    flex: 0 0 78%;
    min-width: 78%;
    scroll-snap-align: start;
  }
  .qb-tool-card.hidden-cat { display: none; }

  /* ──── Ideas grid → horizontal carousel ──── */
  .qb-ideas {
    padding-left: 0;
    padding-right: 0;
  }
  .qb-ideas-grid {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 0 0.75rem 0.5rem;
    scrollbar-width: none;
  }
  .qb-ideas-grid::-webkit-scrollbar { display: none; }
  .qb-idea {
    flex: 0 0 72%;
    min-width: 72%;
    scroll-snap-align: start;
  }

  /* ──── Pillars → horizontal carousel ──── */
  .qb-pillars-grid {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 0 0.75rem 0.75rem;
    scrollbar-width: none;
    text-align: left;
  }
  .qb-pillars-grid::-webkit-scrollbar { display: none; }
  .qb-pillar {
    flex: 0 0 80%;
    min-width: 80%;
    scroll-snap-align: start;
  }

  /* ──── Stats → horizontal carousel ──── */
  .qb-stats {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 1.4rem 0.75rem;
    scrollbar-width: none;
  }
  .qb-stats::-webkit-scrollbar { display: none; }
  .qb-stats div {
    flex: 0 0 40%;
    min-width: 40%;
    scroll-snap-align: start;
  }

  /* ──── Category pills → horizontal scroll ──── */
  .qb-cats {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .qb-cats::-webkit-scrollbar { display: none; }
  .qb-cat {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* ──── Modal grid → horizontal carousel ──── */
  .qb-modal-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    scrollbar-width: none;
  }
  .qb-modal-grid::-webkit-scrollbar { display: none; }
  .qb-modal-grid a {
    flex: 0 0 45%;
    min-width: 45%;
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .qb-search-card { border-radius: 18px; }
  .qb-hero h1 {
    font-size: clamp(1.6rem, 7.5vw, 2.2rem);
  }
  .qb-hero p {
    font-size: 0.92rem;
  }
  .qb-flag-card {
    min-height: 160px;
  }
  .qb-tool-card {
    padding: 0.8rem;
  }
  .qb-pill-badge {
    font-size: 11px;
    padding: 6px 10px;
    flex-wrap: wrap;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
}
