/* ==========================================================================
   CHOYS brand tokens + marketing page primitives
   Single source of truth. Consumed by home_page_v2.html, pricing.html,
   how_it_works.html. Replaces the duplicated :root blocks that previously
   lived in static/css/style.css and inline in home_page_v2.html.
   ========================================================================== */

:root {
  /* ── Type ─────────────────────────────────────────────────────────── */
  --ch-font: 'Poppins', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* ── Surfaces ─────────────────────────────────────────────────────── */
  --ch-bg: #ffffff;
  --ch-surface: #f7f7fe;          /* pale periwinkle wash */
  --ch-surface-warm: #fffaf7;     /* cream, matches the app background */
  --ch-surface-alt: #fff5f2;      /* coral wash */

  /* ── Primary — periwinkle / indigo ────────────────────────────────── */
  --ch-primary: #5262af;
  --ch-primary-light: #6374cb;
  --ch-primary-pale: #e5e8fc;
  --ch-primary-deep: #2c3566;     /* dark band background */
  --ch-primary-deeper: #1d2447;

  /* ── Accent — brand orange. Reserved for CTAs. ───────────────────
     --ch-cta is THE brand orange: the same #F98560 the mobile app uses as
     its primary (AppColors.darkOrangeColor), and the same value the
     ai-builder page's .cb2-btn--outlineCta ("See a Demo") uses for both its
     border and its label. Every orange fill, border, label and gradient
     stop on the site comes from this one value — no darkened text variant,
     so nothing can drift into being a second orange. */
  --ch-cta: #f98560;
  --ch-cta-hover: #ffa07a;
  --ch-cta-deep: #de5030;

  /* ── Text ─────────────────────────────────────────────────────────── */
  --ch-title: #1e2433;
  --ch-body: #4a4a5a;
  --ch-muted: #6b6b7b;
  --ch-faint: #6b6b7b;   /* 5.23:1 on white; #8a9299 was 3.16:1 */
  --ch-on-dark: #f4f5fb;
  --ch-on-dark-muted: rgba(244, 245, 251, 0.66);

  /* ── Lines & shadows ─────────────────────────────────────────────── */
  --ch-line: rgba(80, 95, 171, 0.14);
  --ch-line-strong: rgba(80, 95, 171, 0.28);
  --ch-shadow-sm: 0 2px 8px rgba(30, 36, 51, 0.06);
  --ch-shadow-md: 0 12px 32px rgba(30, 36, 51, 0.10);
  --ch-shadow-lg: 0 32px 80px rgba(30, 36, 51, 0.16);

  /* ── Rhythm ───────────────────────────────────────────────────────── */
  --ch-radius: 16px;
  --ch-radius-lg: 24px;
  --ch-radius-pill: 999px;
  --ch-gutter: 24px;
  --ch-max: 1200px;

  /* ── Legacy aliases — keep old templates working ─────────────────── */
  --primary: #5262af;
  --secondary: #f98560;
  --bgcolor: #ffffff;
  --primaryLighter: #e5e8fc;
  --primaryLighterTwo: #f7f7fe;
  --primaryLighterThree: #fff5f2;
  --navTextColor: #505fab;
  --navBtnLinerColor: #6374cb;
  --navBtnBoxShadow: rgba(80, 95, 171, 0.24);
  --titleColor: #2e2e30;
  --titleColorTwo: rgba(46, 46, 48, 0.5);
  --productCardBorder: rgba(80, 95, 171, 0.6);
  --color-brand-primary: #5262af;
  --color-brand-secondary: #f98560;
  --color-brand-cta: #f98560;
  --color-brand-cta-hover: #ffa07a;
  --color-brand-surface: #f7f7fe;
  --color-brand-title: #2e2e30;
  --color-brand-body: #4a4a5a;
  --color-brand-blue: #6374cb;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.ch-container {
  width: 100%;
  max-width: var(--ch-max);
  margin-inline: auto;
  padding-inline: var(--ch-gutter);
}

.ch-container--wide { max-width: 1400px; }

/* Generous vertical rhythm — the single biggest visual difference from the
   old page, which crammed 12 sections together. */
.ch-section { padding-block: clamp(64px, 9vw, 128px); }
.ch-section--tight { padding-block: clamp(40px, 5vw, 72px); }

.ch-band-surface { background: var(--ch-surface); }
.ch-band-warm    { background: var(--ch-surface-warm); }

.ch-band-dark {
  background: var(--ch-primary-deep);
  color: var(--ch-on-dark);
}
.ch-band-dark .ch-h2,
.ch-band-dark .ch-h3,
.ch-band-dark .ch-stat__value { color: var(--ch-on-dark); }
.ch-band-dark .ch-lead,
.ch-band-dark .ch-body,
.ch-band-dark .ch-stat__label { color: var(--ch-on-dark-muted); }
.ch-band-dark .ch-eyebrow { color: var(--ch-cta); }

/* ==========================================================================
   Typography
   ========================================================================== */

.ch-eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ch-primary);
  margin-bottom: 1rem;
}

/* Hero. Large, light, tight — Cursor's proportions, CHOYS' colour. */
.ch-h1 {
  font-family: var(--ch-font);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ch-title);
  margin: 0;
  text-wrap: balance;
}

.ch-h2 {
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ch-title);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.ch-h3 {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--ch-title);
  margin: 0 0 0.5rem;
}

.ch-lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ch-body);
  margin: 0;
  max-width: 62ch;
  text-wrap: pretty;
}

.ch-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ch-body);
  margin: 0;
  max-width: 66ch;
}

.ch-fine {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ch-muted);
}

.ch-accent { color: var(--ch-primary); }

/* ==========================================================================
   Buttons — pill, two weights only
   ========================================================================== */

.ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9375rem 1.75rem;
  border-radius: var(--ch-radius-pill);
  font-family: var(--ch-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ch-btn:hover { text-decoration: none; transform: translateY(-1px); }
.ch-btn:focus-visible { outline: 3px solid var(--ch-primary); outline-offset: 3px; }

.ch-btn--primary {
  /* Dark label on brand coral = 6.31:1. White on coral was 2.46:1, which
     fails WCAG AA on the site's most important element. */
  background: var(--ch-cta);
  color: var(--ch-title);
  box-shadow: 0 6px 20px rgba(249, 133, 96, 0.34);
}
.ch-btn--primary:hover {
  background: var(--ch-cta-hover);
  color: var(--ch-title);
  box-shadow: 0 10px 28px rgba(249, 133, 96, 0.42);
}

/* Secondary CTA ("Book a demo"). Same treatment as .cb2-btn--outlineCta on
   the ai-builder page: brand orange for the label AND the border. This used
   to be a neutral outline that home_page_v2.html and how_it_works.html each
   overrode with their own copy, which is how the demo button ended up a
   different orange from every other CTA. One definition, here. */
.ch-btn--secondary {
  background: transparent;
  color: var(--ch-cta);
  border-color: var(--ch-cta);
}
.ch-btn--secondary:hover {
  background: var(--ch-surface-alt);
  color: var(--ch-cta);
  border-color: var(--ch-cta-hover);
}

.ch-band-dark .ch-btn--secondary {
  color: var(--ch-on-dark);
  border-color: rgba(244, 245, 251, 0.32);
}
.ch-band-dark .ch-btn--secondary:hover {
  background: rgba(244, 245, 251, 0.12);
  color: var(--ch-on-dark);
  border-color: transparent;
}

.ch-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}

/* Text link with arrow — the section-level secondary CTA */
.ch-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  /* Orange, not periwinkle — arrow links are CTAs and carry the same brand
     orange as .ch-btn--secondary and the ai-builder outline button. */
  color: var(--ch-cta);
  text-decoration: none;
}
.ch-arrow:hover { color: var(--ch-cta-deep); text-decoration: none; }
.ch-arrow svg { transition: transform 0.18s ease; }
.ch-arrow:hover svg { transform: translateX(3px); }
.ch-band-dark .ch-arrow { color: var(--ch-cta); }

/* ==========================================================================
   Product screenshot frame
   The screenshot is the argument — give it room and a real frame.
   ========================================================================== */

.ch-shot {
  border-radius: var(--ch-radius-lg);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--ch-line);
  box-shadow: var(--ch-shadow-lg);
  line-height: 0;
}

.ch-shot img { width: 100%; height: auto; display: block; }

.ch-shot--flat { box-shadow: var(--ch-shadow-md); }

/* Tinted stage the hero screenshot sits on, so it separates from the page */
.ch-stage {
  background: linear-gradient(180deg, var(--ch-surface) 0%, var(--ch-primary-pale) 100%);
  border-radius: var(--ch-radius-lg);
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px) 0;
}

.ch-stage--dark {
  background: linear-gradient(180deg, var(--ch-primary-deep) 0%, var(--ch-primary) 100%);
}

/* ==========================================================================
   Section layouts
   ========================================================================== */

/* Heading block above a full-width screenshot */
.ch-section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 56px); }
.ch-section-head--center { margin-inline: auto; text-align: center; }
.ch-section-head--center .ch-lead { margin-inline: auto; }

/* Alternating text / screenshot rows */
.ch-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.ch-split--reverse .ch-split__media { order: -1; }

.ch-split__copy > * + * { margin-top: 1rem; }

/* Card grids */
.ch-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.ch-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ch-grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.ch-card {
  background: #ffffff;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  padding: clamp(20px, 2.5vw, 32px);
  box-shadow: var(--ch-shadow-sm);
}
.ch-band-dark .ch-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(244, 245, 251, 0.14);
  box-shadow: none;
}

.ch-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.875rem;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.ch-stat__value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ch-primary);
  display: block;
}
.ch-stat__label {
  font-size: 0.9375rem;
  color: var(--ch-muted);
  margin-top: 0.5rem;
  display: block;
}

/* ==========================================================================
   Trust strip — logos
   ========================================================================== */

.ch-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
}
.ch-trust img {
  height: clamp(22px, 2.6vw, 32px);
  width: auto;
  opacity: 0.62;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.ch-trust img:hover { opacity: 1; filter: grayscale(0); }

.ch-trust-label {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ch-faint);
  margin-bottom: 2rem;
}

/* Inline proof chips under the hero CTA */
.ch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--ch-muted);
}
.ch-chips > span { display: inline-flex; align-items: center; gap: 0.4375rem; }

/* ==========================================================================
   FAQ / accordion
   ========================================================================== */

.ch-faq { border-top: 1px solid var(--ch-line); max-width: 820px; }
.ch-faq details { border-bottom: 1px solid var(--ch-line); }
.ch-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.375rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ch-title);
  list-style: none;
}
.ch-faq summary::-webkit-details-marker { display: none; }
.ch-faq summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ch-primary);
  flex-shrink: 0;
  line-height: 1;
}
.ch-faq details[open] summary::after { content: '\2013'; }
.ch-faq details > div { padding-bottom: 1.375rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .ch-split { grid-template-columns: 1fr; }
  .ch-split--reverse .ch-split__media { order: 0; }
  .ch-btn-row .ch-btn { width: 100%; max-width: 22rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-btn, .ch-arrow svg, .ch-trust img { transition: none; }
  .ch-btn:hover { transform: none; }
}

/* ==========================================================================
   Navbar
   Code-owned (see templates/includes/navbar.html). The nav is no longer
   generated from NavTopLevelItem snippets — the structure is hardcoded in the
   template, so everything it needs is styled here rather than in style.css.

   Layout: logo left, up to 5 flat links centre, Sign in + Start free right.
   Collapses to a Bootstrap 5.3 hamburger below 992px.
   ========================================================================== */

.ch-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--ch-bg);
  border-bottom: 1px solid var(--ch-line);
  font-family: var(--ch-font);
}

/* Neutralise Bootstrap's default .navbar padding — we control the rhythm. */
.ch-nav__bar { padding: 0; }

.ch-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 0.75rem var(--ch-gutter);
}

/* ── Brand ────────────────────────────────────────────────────────────── */

.ch-nav__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
  text-decoration: none;
  border-radius: var(--ch-radius);
}
.ch-nav__brand img {
  display: block;
  height: 40px;
  width: auto;
}
.ch-nav__brand:focus-visible {
  outline: 3px solid var(--ch-primary);
  outline-offset: 4px;
}

/* ── Hamburger ────────────────────────────────────────────────────────── */

.ch-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--ch-line);
  border-radius: 12px;
  background: transparent;
  color: var(--ch-title);
  line-height: 0;
}
.ch-nav__toggle:hover { background: var(--ch-surface); }
.ch-nav__toggle:focus-visible {
  outline: 3px solid var(--ch-primary);
  outline-offset: 2px;
  box-shadow: none;
}
.ch-nav__toggle-icon { display: block; }

/* ── Links ────────────────────────────────────────────────────────────── */

.ch-nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ch-nav__link {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: var(--ch-radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ch-body);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.ch-nav__link:hover {
  color: var(--ch-primary);
  background: var(--ch-surface);
  text-decoration: none;
}
.ch-nav__link.is-active {
  color: var(--ch-primary);
  font-weight: 600;
}
.ch-nav__link:focus-visible {
  outline: 3px solid var(--ch-primary);
  outline-offset: 2px;
}

/* ── Right-hand actions ───────────────────────────────────────────────── */

.ch-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ch-nav__signin {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ch-body);
  text-decoration: none;
  padding: 0.5rem 0.375rem;
  border-radius: var(--ch-radius);
  transition: color 0.18s ease;
}
.ch-nav__signin:hover { color: var(--ch-primary); text-decoration: none; }
.ch-nav__signin:focus-visible {
  outline: 3px solid var(--ch-primary);
  outline-offset: 2px;
}

/* Nav CTA is a smaller variant of .ch-btn--primary */
.ch-nav__cta {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

/* ── Desktop ──────────────────────────────────────────────────────────── */

@media (min-width: 992px) {
  /* Centre the links, push the actions to the right. Bootstrap's
     .navbar-expand-lg .navbar-collapse already forces display:flex here. */
  .ch-nav__collapse {
    justify-content: space-between;
    gap: 1rem;
  }
  .ch-nav__links { margin-inline: auto; }
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
  .ch-nav__collapse {
    padding-block: 0.5rem 1.25rem;
  }
  .ch-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.125rem;
    border-top: 1px solid var(--ch-line);
    padding-top: 0.75rem;
  }
  .ch-nav__link {
    border-radius: var(--ch-radius);
    padding: 0.75rem 0.5rem;
    font-size: 1.0625rem;
  }
  .ch-nav__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  .ch-nav__signin { padding: 0.5rem; }
  .ch-nav__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-nav__link, .ch-nav__signin { transition: none; }
}

/* ==========================================================================
   Footer
   Code-owned (see templates/includes/footer.html).
   ========================================================================== */

.ch-ft {
  background: var(--ch-primary-deep);
  color: var(--ch-on-dark);
  font-family: var(--ch-font);
  padding-block: clamp(48px, 6vw, 80px) clamp(24px, 3vw, 32px);
  margin-top: 0;
}

.ch-ft a { color: var(--ch-on-dark-muted); text-decoration: none; }
.ch-ft a:hover { color: var(--ch-on-dark); text-decoration: underline; }

.ch-ft__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) 3fr;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.ch-ft__logo { height: 40px; width: auto; margin-bottom: 1.25rem; }

.ch-ft__tagline {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ch-on-dark-muted);
  max-width: 32ch;
  margin: 0 0 1.75rem;
}

.ch-ft__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #a5aac2;   /* 5.05:1 on --ch-primary-deep */
  margin: 0 0 0.875rem;
}

.ch-ft__stores { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.ch-ft__stores img { height: 40px; width: auto; display: block; }
.ch-ft__stores a:hover { opacity: 0.85; }

.ch-ft__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.ch-ft__col ul { list-style: none; padding: 0; margin: 0; }
.ch-ft__col li { margin-bottom: 0.625rem; }
.ch-ft__col a { font-size: 0.9375rem; line-height: 1.45; }

.ch-ft__bottom {
  border-top: 1px solid rgba(244, 245, 251, 0.16);
  padding-top: clamp(20px, 2.5vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.ch-ft__social { display: flex; gap: 1rem; align-items: center; }
.ch-ft__social img { height: 22px; width: auto; display: block; }
.ch-ft__social a:hover { opacity: 0.8; }

.ch-ft__legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.ch-ft__copy {
  font-size: 0.875rem;
  color: #a5aac2;   /* 5.05:1 on --ch-primary-deep */
  margin: 0;
}

@media (max-width: 900px) {
  .ch-ft__top { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ch-ft__cols { grid-template-columns: repeat(2, 1fr); }
  .ch-ft__bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Help centre
   Used by templates/help/*.html and templates/help/blocks/*.html
   ========================================================================== */

.hc-hero { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }

.hc-search { max-width: 560px; margin-top: 1.75rem; position: relative; }
.hc-search input {
  width: 100%;
  font-family: var(--ch-font);
  font-size: 1rem;
  color: var(--ch-title);
  background: #fff;
  border: 1px solid var(--ch-line-strong);
  border-radius: var(--ch-radius-pill);
  padding: 0.9375rem 1.375rem 0.9375rem 3rem;
}
.hc-search input:focus { outline: 2px solid var(--ch-primary); outline-offset: 1px; border-color: transparent; }
.hc-search svg { position: absolute; left: 1.125rem; top: 50%; transform: translateY(-50%); color: var(--ch-faint); }

/* Category cards */
.hc-cats { display: grid; gap: clamp(14px, 2vw, 20px); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hc-cat {
  display: block;
  background: #fff;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  padding: clamp(20px, 2.4vw, 28px);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.hc-cat:hover { text-decoration: none; border-color: var(--ch-primary); box-shadow: var(--ch-shadow-md); transform: translateY(-2px); }
.hc-cat__icon { font-size: 1.75rem; line-height: 1; display: block; margin-bottom: 0.875rem; }
.hc-cat__title { font-size: 1.0625rem; font-weight: 600; color: var(--ch-title); margin: 0 0 0.375rem; }
.hc-cat__summary { font-size: 0.9375rem; line-height: 1.5; color: var(--ch-muted); margin: 0 0 0.75rem; }
.hc-cat__count { font-size: 0.8125rem; font-weight: 600; color: var(--ch-primary); }

/* Article list */
.hc-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ch-line); max-width: 820px; }
.hc-list li { border-bottom: 1px solid var(--ch-line); }
.hc-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1875rem 0;
  text-decoration: none;
}
.hc-list a:hover { text-decoration: none; }
.hc-list a:hover .hc-list__title { color: var(--ch-primary); }
.hc-list__title { font-size: 1.0625rem; font-weight: 600; color: var(--ch-title); display: block; margin-bottom: 0.1875rem; }
.hc-list__summary { font-size: 0.9375rem; line-height: 1.5; color: var(--ch-muted); display: block; }
.hc-list__chev { color: var(--ch-faint); flex-shrink: 0; }

/* Breadcrumbs */
.hc-crumbs { font-size: 0.875rem; color: var(--ch-muted); margin-bottom: 1.25rem; }
.hc-crumbs a { color: var(--ch-primary); text-decoration: none; }
.hc-crumbs a:hover { text-decoration: underline; }
.hc-crumbs span { margin-inline: 0.4375rem; color: var(--ch-faint); }

/* Article body */
.hc-article { max-width: 780px; }
.hc-prose { font-size: 1.0625rem; line-height: 1.7; color: var(--ch-body); }
.hc-prose > * + * { margin-top: 1.125rem; }
.hc-prose h3 { font-size: 1.25rem; font-weight: 600; color: var(--ch-title); margin-top: 2.25rem; }
.hc-prose h4 { font-size: 1.0625rem; font-weight: 600; color: var(--ch-title); margin-top: 1.75rem; }
.hc-prose a { color: var(--ch-primary); }
.hc-prose ul, .hc-prose ol { padding-left: 1.375rem; }
.hc-prose li { margin-bottom: 0.4375rem; }
.hc-prose b, .hc-prose strong { color: var(--ch-title); font-weight: 600; }
.hc-prose hr { border: 0; border-top: 1px solid var(--ch-line); margin-block: 2rem; }

/* Numbered step */
.hc-step { display: flex; gap: 1.25rem; counter-increment: hc-step; margin-top: 2.25rem; }
.hc-step__marker {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ch-cta);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.125rem;
}
.hc-step__marker::before { content: counter(hc-step); }
.hc-step__body { flex: 1; min-width: 0; }
.hc-step__heading { font-size: 1.1875rem; font-weight: 600; color: var(--ch-title); margin: 0.25rem 0 0.625rem; }
.hc-article-body { counter-reset: hc-step; }

/* Screenshot figure */
.hc-figure { margin: 1.5rem 0 0; }
.hc-figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--ch-radius);
  border: 1px solid var(--ch-line);
  box-shadow: var(--ch-shadow-md);
}
.hc-figure figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--ch-muted); }

/* Callouts */
.hc-callout {
  margin-top: 1.5rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--ch-radius);
  border-left: 4px solid;
  background: var(--ch-surface);
}
.hc-callout .hc-prose { font-size: 1rem; }
.hc-callout__heading { font-weight: 700; margin: 0 0 0.375rem; font-size: 0.9375rem; }
.hc-callout--tip { border-color: var(--ch-primary); background: var(--ch-primary-pale); }
.hc-callout--tip .hc-callout__heading { color: var(--ch-primary); }
.hc-callout--note { border-color: var(--ch-faint); background: var(--ch-surface); }
.hc-callout--note .hc-callout__heading { color: var(--ch-body); }
.hc-callout--warning { border-color: var(--ch-cta); background: var(--ch-surface-alt); }
.hc-callout--warning .hc-callout__heading { color: var(--ch-cta-deep); }

/* Feedback + related */
.hc-feedback {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 1.75rem;
  border-top: 1px solid var(--ch-line);
}
.hc-feedback__btns { display: flex; gap: 0.625rem; margin-top: 0.875rem; }
.hc-feedback__btns button {
  font-size: 1.375rem;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--ch-line-strong);
  border-radius: var(--ch-radius-pill);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.hc-feedback__btns button:hover { border-color: var(--ch-primary); transform: translateY(-1px); }

.hc-empty { padding: 2.5rem 0; color: var(--ch-muted); }

/* ==========================================================================
   Navbar mega-dropdown
   One dropdown only ("Product"). Contents come from NAV_GROUPS in
   choys/helpers.py — the same source the footer columns read.
   ========================================================================== */

.ch-nav__item { position: relative; }

.ch-nav__link--toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.ch-nav__link--toggle svg { transition: transform 0.18s ease; }
.ch-nav__item--has-menu.is-open .ch-nav__link--toggle svg { transform: rotate(180deg); }

.ch-mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(760px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius-lg);
  box-shadow: var(--ch-shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 1200;
  overflow: hidden;
}
.ch-nav__item--has-menu.is-open .ch-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Bridges the gap between the trigger and the panel so hover does not drop. */
.ch-nav__item--has-menu::after {
  content: '';
  position: absolute;
  inset: 100% 0 auto 0;
  height: 14px;
}

.ch-mega__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 2.4vw, 28px);
}

.ch-mega__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ch-faint);
  margin: 0 0 0.75rem;
}

.ch-mega__col ul { list-style: none; padding: 0; margin: 0; }
.ch-mega__col li + li { margin-top: 0.125rem; }
.ch-mega__col a {
  display: block;
  padding: 0.5rem 0.625rem;
  margin-inline: -0.625rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.14s ease;
}
.ch-mega__col a:hover { background: var(--ch-surface); text-decoration: none; }

.ch-mega__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ch-title);
  margin: 0;
}
.ch-mega__desc {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ch-muted);
  margin-top: 0.125rem;
}

.ch-mega__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(16px, 2vw, 20px) clamp(20px, 2.4vw, 28px);
  background: var(--ch-surface);
  border-top: 1px solid var(--ch-line);
}
.ch-mega__cta { flex-shrink: 0; padding: 0.625rem 1.125rem; font-size: 0.9375rem; }

/* Inside the collapsed mobile menu the panel is always open and inline. */
@media (max-width: 991.98px) {
  .ch-mega {
    position: static;
    transform: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border: 0;
    box-shadow: none;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease;
  }
  .ch-nav__item--has-menu.is-open .ch-mega { max-height: 1200px; transform: none; }
  .ch-mega__inner { grid-template-columns: 1fr; padding: 0.5rem 0 0; gap: 1.25rem; }
  .ch-mega__foot { display: none; }
  .ch-nav__item--has-menu::after { display: none; }
}
