/* Quelora landing — page-specific styles.
   Relies on tokens.css for variables. */

/* ── Nav ─────────────────────────────────────────────── */
.ql-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.ql-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--gap-5);
}
.ql-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-3);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: var(--fs-16);
}
.ql-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: var(--gap-4);
}
.ql-nav__link {
  font-size: var(--fs-14);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--r-2);
  font-weight: 500;
}
.ql-nav__link:hover { color: var(--ink); background: var(--surface-2); }
.ql-nav__spacer { flex: 1; }
.ql-nav__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hamburger button — hidden by default, shown on mobile */
.ql-nav__menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--r-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s ease;
}
.ql-nav__menu-btn:hover { background: var(--surface-2); }
.ql-nav__menu-btn svg { width: 18px; height: 18px; }
.ql-nav__menu-btn .ql-icon-open { display: block; }
.ql-nav__menu-btn .ql-icon-close { display: none; }
html[data-nav-open="true"] .ql-nav__menu-btn .ql-icon-open { display: none; }
html[data-nav-open="true"] .ql-nav__menu-btn .ql-icon-close { display: block; }

/* Mobile menu drawer */
.ql-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 49;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  padding-bottom: 24px;
}
html[data-nav-open="true"] .ql-mobile-menu { display: block; }

.ql-mobile-menu__list {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.ql-mobile-menu__list a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.ql-mobile-menu__list a:active,
.ql-mobile-menu__list a:hover { color: var(--brand); background: var(--surface-2); }

.ql-mobile-menu__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
}

.ql-mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 0;
}
.ql-mobile-menu__actions .q-btn {
  height: 46px;
  justify-content: center;
  font-size: 15px;
}

@media (min-width: 761px) {
  .ql-mobile-menu { display: none !important; }
}

@media (max-width: 1180px) {
  .ql-nav__links a:nth-child(n+6) { display: none; }
}
@media (max-width: 980px) {
  .ql-nav__links a:nth-child(n+4) { display: none; }
}
@media (max-width: 760px) {
  .ql-nav__links { display: none; }
  .ql-nav__controls .ql-nav__link { display: none; }
  .ql-nav__controls .ql-lang-pill { display: none; }
  .ql-nav__controls .ql-icon-btn[data-action="toggle-theme"] { display: none; }
  .ql-nav__controls .q-btn--ghost { display: none; }
  .ql-nav__menu-btn { display: inline-flex; }
}
.ql-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-2);
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ql-icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.ql-icon-btn svg { width: 16px; height: 16px; }
.ql-lang-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 3px;
  background: var(--surface);
}
.ql-lang-pill button {
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--r-full);
  color: var(--muted);
}
.ql-lang-pill button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* ── Hero ────────────────────────────────────────────── */
.ql-hero {
  padding: var(--gap-5) 0 var(--gap-8);
  position: relative;
  overflow: hidden;
}
.ql-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 400px at 50% -10%, var(--brand-soft), transparent 60%),
    linear-gradient(180deg, transparent 80%, var(--surface-2) 100%);
}
.ql-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--gap-7);
  align-items: center;
}
@media (max-width: 920px) { .ql-hero__grid { grid-template-columns: 1fr; } }

.ql-hero__copy h1 { margin-top: var(--gap-4); }
.ql-hero__copy .q-h1 strong {
  font-weight: 600;
  background: linear-gradient(180deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 65%, var(--brand)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ql-hero__lead {
  margin-top: var(--gap-5);
  font-size: var(--fs-20);
  line-height: 1.5;
  color: var(--muted);
  max-width: 58ch;
}
.ql-hero__lead em { font-style: normal; color: var(--ink); }
.ql-hero__ctas {
  display: flex;
  gap: var(--gap-3);
  margin-top: var(--gap-6);
  flex-wrap: wrap;
}
.ql-hero__meta {
  margin-top: var(--gap-5);
  display: flex;
  gap: var(--gap-5);
  font-size: var(--fs-13);
  color: var(--muted);
  flex-wrap: wrap;
}
.ql-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Hero visual: a widget mockup card stacked with a small code block */
.ql-hero__visual {
  position: relative;
  display: grid;
  gap: var(--gap-4);
}
.ql-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-2);
}
.ql-card--mock {
  padding: var(--gap-5);
  position: relative;
  overflow: hidden;
}
.ql-card--mock::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(220px 110px at 90% -10%, var(--brand-soft), transparent 70%);
  pointer-events: none;
}

/* Hero image card — real product screenshot */
.ql-card--shot {
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-4);
  background: var(--surface);
  position: relative;
}
.ql-card--shot img {
  display: block;
  width: 100%;
  height: auto;
}
.ql-card--shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.05);
  border-radius: inherit;
}

/* widget mockup */
.qw {
  position: relative;
  font-size: var(--fs-14);
}
.qw__head {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  padding-bottom: var(--gap-4);
  border-bottom: 1px solid var(--line);
}
.qw__head h4 {
  margin: 0;
  font-size: var(--fs-13);
  letter-spacing: -0.01em;
  color: var(--muted);
  font-weight: 500;
}
.qw__head .q-chip { margin-left: auto; }

.qw__bar {
  display: flex;
  align-items: center;
  gap: var(--gap-4);
  padding: var(--gap-3) 0;
  border-bottom: 1px solid var(--line);
}
.qw__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-13);
  color: var(--muted);
  font-weight: 500;
}
.qw__action svg { width: 16px; height: 16px; }
.qw__action--active { color: var(--brand); }

.qw__list {
  display: grid;
  gap: var(--gap-4);
  padding-top: var(--gap-4);
}
.qw__item { display: flex; gap: var(--gap-3); }
.qw__avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 60%, transparent), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--fs-12);
  font-weight: 600;
}
.qw__avatar--alt {
  background: linear-gradient(135deg, #7a5cff, #4a90e2);
}
.qw__avatar--alt2 {
  background: linear-gradient(135deg, #16a34a, #4a90e2);
}
.qw__body { min-width: 0; flex: 1; }
.qw__meta {
  display: flex;
  align-items: baseline;
  gap: var(--gap-2);
  font-size: var(--fs-12);
  color: var(--muted);
}
.qw__meta strong { color: var(--ink); font-weight: 600; font-size: var(--fs-13); }
.qw__meta .qw__lvl {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: var(--r-1);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.qw__text {
  margin: 4px 0 6px;
  font-size: var(--fs-13);
  color: var(--ink-2);
  line-height: 1.5;
}
.qw__row {
  display: flex;
  gap: var(--gap-4);
  font-size: var(--fs-12);
  color: var(--muted);
}
.qw__row a { color: var(--muted); }
.qw__row a:hover { color: var(--ink); }
.qw__row .qw__liked { color: var(--brand); font-weight: 500; }

.qw__compose {
  margin-top: var(--gap-4);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--gap-3);
}
.qw__input {
  flex: 1;
  height: 34px;
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0 12px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: var(--fs-13);
}

/* hero code preview */
.ql-snippet {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--r-3);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  line-height: 1.6;
  padding: var(--gap-4) var(--gap-5);
  overflow: auto;
  position: relative;
}
.ql-snippet__bar {
  display: flex;
  align-items: center;
  gap: var(--gap-2);
  margin: calc(-1 * var(--gap-2)) calc(-1 * var(--gap-3)) var(--gap-3);
  padding: var(--gap-2) var(--gap-3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  color: #71717a;
}
.ql-snippet__dot {
  width: 10px; height: 10px; border-radius: 50%; background: #3f3f46;
}
.ql-snippet__copy {
  margin-left: auto;
  color: #a1a1aa;
  font-size: var(--fs-12);
  padding: 4px 8px;
  border-radius: var(--r-2);
}
.ql-snippet__copy:hover { color: #f4f4f5; background: rgba(255,255,255,0.06); }
.ql-snippet pre { margin: 0; white-space: pre; overflow-x: auto; max-width: 100%; }
.ql-snippet .tk-key { color: #93c5fd; }
.ql-snippet .tk-str { color: #fcd34d; }
.ql-snippet .tk-com { color: #71717a; }
.ql-snippet .tk-tag { color: #f472b6; }
.ql-snippet .tk-attr { color: #93c5fd; }
.ql-snippet .tk-punc { color: #a1a1aa; }

/* ── Logos / consumers row (honest: integrations only) ─ */
.ql-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-7);
  flex-wrap: wrap;
  margin-top: var(--gap-7);
  color: var(--muted-2);
  font-size: var(--fs-13);
}
.ql-trust span { display: inline-flex; align-items: center; gap: 8px; }

/* ── Problem section ──────────────────────────────────── */
.ql-problem {
  padding: var(--gap-9) 0;
  border-top: 1px solid var(--line);
}
.ql-problem__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-5);
  margin-top: var(--gap-6);
}
@media (max-width: 820px) { .ql-problem__grid { grid-template-columns: 1fr; } }
.ql-problem__card {
  padding: var(--gap-5);
  border-radius: var(--r-4);
  border: 1px solid var(--line);
  background: var(--surface);
}
.ql-problem__card h4 {
  margin: 0 0 var(--gap-2) 0;
  font-size: var(--fs-15);
  font-weight: 600;
}
.ql-problem__card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.55;
}
.ql-problem__card .ql-xmark {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  margin-bottom: var(--gap-3);
}
.ql-problem__card--solution .ql-xmark {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ── Features grid ──────────────────────────────────── */
.ql-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-4);
  margin-top: var(--gap-6);
}
@media (max-width: 920px) { .ql-features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ql-features__grid { grid-template-columns: 1fr; } }
.ql-feature {
  position: relative;
  padding: var(--gap-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ql-feature:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.ql-feature__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gap-4);
}
.ql-feature__icon svg { width: 18px; height: 18px; }
.ql-feature h3 {
  margin: 0 0 var(--gap-2);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ql-feature p {
  margin: 0;
  font-size: var(--fs-14);
  color: var(--muted);
  line-height: 1.55;
}

/* ── Widget showcase ─────────────────────────────────── */
.ql-showcase {
  padding: var(--gap-9) 0;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ql-showcase__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: var(--gap-7);
  align-items: center;
}
@media (max-width: 920px) { .ql-showcase__grid { grid-template-columns: 1fr; } }
.ql-showcase__bullets {
  display: grid;
  gap: var(--gap-4);
  margin-top: var(--gap-6);
}
.ql-bullet {
  display: flex;
  gap: var(--gap-3);
  align-items: flex-start;
}
.ql-bullet__dot {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.ql-bullet__dot svg { width: 12px; height: 12px; }
.ql-bullet h4 { margin: 0 0 2px; font-size: var(--fs-15); font-weight: 600; }
.ql-bullet p { margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.5; }

/* ── Get started ────────────────────────────────────── */
.ql-start__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap-7);
  align-items: flex-start;
  margin-top: var(--gap-6);
}
@media (max-width: 920px) { .ql-start__layout { grid-template-columns: 1fr; } }

.ql-start__tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--r-3);
  width: fit-content;
  margin-bottom: var(--gap-4);
  border: 1px solid var(--line);
}
.ql-start__tab {
  padding: 6px 14px;
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-2);
}
.ql-start__tab[aria-selected="true"] {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.ql-start__panel { display: none; }
.ql-start__panel[aria-current="true"] { display: block; }

.ql-start__steps {
  display: grid;
  gap: var(--gap-5);
}
.ql-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--gap-3);
  align-items: flex-start;
}
.ql-step__num {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: var(--fs-12);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.ql-step h4 {
  margin: 0 0 4px;
  font-size: var(--fs-15);
  font-weight: 600;
}
.ql-step p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-14);
}
.ql-step a { color: var(--brand); }
.ql-step a:hover { text-decoration: underline; }

/* ── WordPress callout ──────────────────────────────── */
.ql-wp {
  display: flex;
  align-items: center;
  gap: var(--gap-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: var(--gap-5);
  margin-top: var(--gap-7);
}
.ql-wp__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ql-wp__icon svg { width: 26px; height: 26px; }
.ql-wp h4 { margin: 0 0 4px; font-size: var(--fs-15); font-weight: 600; }
.ql-wp p { margin: 0; font-size: var(--fs-14); color: var(--muted); }
.ql-wp__cta { margin-left: auto; }
@media (max-width: 720px) {
  .ql-wp { flex-wrap: wrap; }
  .ql-wp__cta { margin-left: 0; width: 100%; }
}

/* ── Editions teaser ─────────────────────────────────── */
.ql-editions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-4);
  margin-top: var(--gap-6);
}
@media (max-width: 720px) { .ql-editions { grid-template-columns: 1fr; } }
.ql-edition {
  padding: var(--gap-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  position: relative;
}
.ql-edition--enterprise {
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand-soft) 70%, var(--surface)) 100%);
  border-color: var(--brand-line);
}
.ql-edition__chip {
  position: absolute;
  top: var(--gap-4);
  right: var(--gap-4);
}
.ql-edition h3 {
  margin: 0 0 var(--gap-2);
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.ql-edition p.ql-edition__lead {
  margin: 0 0 var(--gap-4);
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.5;
}
.ql-edition ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: var(--fs-14);
}
.ql-edition li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--ink-2);
}
.ql-edition li::before {
  content: "";
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 3px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230055d4' stroke-width='2'><path d='M3 8.5L6.5 12L13 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── OSS section ────────────────────────────────────── */
.ql-oss__repos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-3);
  margin-top: var(--gap-6);
}
@media (max-width: 820px) { .ql-oss__repos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ql-oss__repos { grid-template-columns: 1fr; } }
.ql-repo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--gap-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ql-repo:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.ql-repo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-2);
}
.ql-repo__name {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ql-repo__lang {
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ql-repo__lang::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lang-color, var(--brand));
}
.ql-repo[data-lang-color="js"] { --lang-color: #f1e05a; }
.ql-repo[data-lang-color="ts"] { --lang-color: #3178c6; }
.ql-repo[data-lang-color="php"] { --lang-color: #4F5D95; }
.ql-repo[data-lang-color="rust"] { --lang-color: #dea584; }
.ql-repo[data-lang-color="docker"] { --lang-color: #384d54; }

.ql-repo p {
  margin: 0;
  font-size: var(--fs-13);
  color: var(--muted);
  line-height: 1.45;
}

/* ── Final CTA ──────────────────────────────────────── */
.ql-final {
  padding: var(--gap-10) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.ql-final::before {
  content: "";
  position: absolute;
  inset: -20% -20% auto -20%;
  height: 70%;
  background: radial-gradient(800px 200px at 50% 0%, var(--brand-soft), transparent 70%);
  pointer-events: none;
}
.ql-final h2 { position: relative; }
.ql-final p { position: relative; margin: var(--gap-4) auto 0; }
.ql-final__ctas {
  position: relative;
  margin-top: var(--gap-6);
  display: flex;
  gap: var(--gap-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────────────────────── */
.ql-footer {
  padding: var(--gap-7) 0 var(--gap-6);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.ql-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--gap-6);
  margin-bottom: var(--gap-7);
}
@media (max-width: 720px) { .ql-footer__grid { grid-template-columns: 1fr 1fr; } }
.ql-footer__brand { display: flex; flex-direction: column; gap: var(--gap-3); }
.ql-footer__brand p { margin: 0; color: var(--muted); font-size: var(--fs-13); max-width: 32ch; }
.ql-footer__col h5 {
  margin: 0 0 var(--gap-3);
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ql-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-14); }
.ql-footer__col a { color: var(--ink-2); }
.ql-footer__col a:hover { color: var(--brand); }
.ql-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-13);
  color: var(--muted);
  padding-top: var(--gap-5);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: var(--gap-3);
}

/* ── Tweaks panel ───────────────────────────────────── */
.ql-tweaks {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 60;
}
.ql-tweaks__toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-2);
}
.ql-tweaks__panel {
  position: absolute;
  bottom: 52px;
  right: 0;
  width: 260px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-3);
  padding: var(--gap-4);
  display: none;
}
.ql-tweaks.is-open .ql-tweaks__panel { display: block; }
.ql-tweaks__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: var(--fs-13);
}
.ql-tweaks__row + .ql-tweaks__row { border-top: 1px solid var(--line); }
.ql-tweaks__row label { color: var(--muted); font-weight: 500; }
.ql-tweaks__seg {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: var(--r-2);
  padding: 2px;
  border: 1px solid var(--line);
}
.ql-tweaks__seg button {
  padding: 3px 10px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-2);
}
.ql-tweaks__seg button[aria-pressed="true"] {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* ── Tiny utilities ─────────────────────────────────── */
.ql-grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Hero phone-frame for the portrait demo video ───────────────────── */
.ql-card--phone {
  /* Constrain a vertical mobile recording so it doesn't dominate the column.
     Desktop sizing scales with viewport via clamp so it feels prominent on
     wide screens but never spills off the column. (Sized −20% vs previous.) */
  width: clamp(256px, 28.8vw, 368px);
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
  border: 10px solid #111418;
  border-radius: 38px;
  background: #111418;
  box-shadow:
    0 40px 80px -28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}
.ql-card--phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  background: #000;
}
/* Kill the generic .ql-card--shot inset outline if it ever gets reused */
.ql-card--phone::after { content: none; }

@media (max-width: 960px) {
  .ql-card--phone {
    width: 240px;
    border-width: 8px;
    border-radius: 32px;
  }
  .ql-card--phone video { border-radius: 24px; }
}
@media (max-width: 560px) {
  .ql-card--phone {
    width: 192px;
    border-width: 6px;
    border-radius: 26px;
  }
  .ql-card--phone video { border-radius: 20px; }
}

/* ── Mobile overflow safety ─────────────────────────────────────────────
 * Long single-line content (URLs in code blocks, long pre snippets, tables)
 * must scroll INSIDE their card, not push the viewport wider on mobile.
 * Without min-width:0, grid/flex children refuse to shrink below content
 * width — which is what was making the page render twice as wide as the
 * viewport on phones.
 */
html, body { overflow-x: hidden; max-width: 100vw; }
.ql-snippet  { min-width: 0; max-width: 100%; }
.ql-hero__visual,
.ql-hero__copy,
.qp-section,
.qp-2col > *,
.container   { min-width: 0; }

/* As a defense in depth: any direct child of <main> or <header> shouldn't
 * be allowed to push past the viewport. */
main > *, header > * { max-width: 100vw; }

/* Hero snippet — sits inside the copy column now. Cap width so it
   doesn't stretch full when the column is wide, and give it a bit
   of breathing room above. */
.ql-hero__snippet {
  margin-top: var(--gap-5);
  max-width: 560px;
}
@media (max-width: 960px) {
  .ql-hero__snippet { max-width: 100%; }
}
