/* ==========================================================================
   Challenges, /new-practice/, /practice-report/
   Loaded after main.css. The pages are built from homepage blocks (.hero,
   .hipaa, .stories, .midcta); this file only adds what the homepage has no
   equivalent for, using the :root tokens from main.css.
   ========================================================================== */

/* ---- Hero ------------------------------------------------------------- */
.ch-hero { min-height: 88vh; }
.ch-hero .hero-bg img { object-position: center; }
.ch-hero .hero-content { align-items: flex-end; padding-bottom: 88px; }
.ch-hero-left { max-width: 820px; gap: 22px; }
.ch-hero-h1 { text-wrap: balance; }
.ch-hero-sub { max-width: 600px; }

.ch-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0; font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, 0.72); }
.ch-crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(255, 255, 255, 0.4); }
.ch-crumbs a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.ch-crumbs a:hover { color: var(--white); }
.ch-crumbs [aria-current] { color: var(--white); }

.ch-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ch-hero-ctas + .hero-btn-note { margin-top: -6px; }

/* Second button: the homepage .hero-btn, outlined. */
.ch-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 31px;
  font-family: var(--sans); font-weight: 400; font-size: 18px;
  color: var(--white); background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 8px;
  transition: background 0.3s, border-color 0.3s; white-space: nowrap;
}
.ch-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

.ch-ticks { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 2px 0 0; }
.ch-ticks li { position: relative; padding-left: 22px; font-size: 17px; font-weight: 400; line-height: 1.4; color: var(--white); }
.ch-ticks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; background: var(--cyan); transform: rotate(45deg); }

/* Hero with a form on the right (/practice-report/). */
.ch-hero--aside .hero-content { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; align-items: center; padding-top: 150px; }
.ch-hero--aside .ch-hero-left { max-width: 640px; }
.ch-hero-aside .lp-form-card { background: var(--bg); box-shadow: 0 30px 60px -30px rgba(10, 17, 26, 0.6); }
.ch-hero-aside .lp-form-title { margin-top: 10px; }

/* ---- Sections --------------------------------------------------------- */
/* Plain sections keep the warm boxes' padding so every block shares one edge. */
.ch-plain .hipaa-inner { background: transparent; }
/* Cards on a plain band take the warm fill, as on the homepage (.hv-plain) and service pages (.sv-plain). */
.ch-plain .hipaa-pillar { background: var(--warm); }
.ch-page .hipaa-copy { max-width: var(--measure-head); }
.ch-page .hipaa-heading { text-wrap: balance; }
.ch-p { font-size: var(--fs-lead); line-height: 1.5; }
.ch-p + .ch-p { margin-top: 2px; }
.ch-split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: var(--grid-gap-wide); align-items: start; }
.ch-split-body { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.ch-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ch-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Example / fact tiles: the homepage featured story card + snap metrics. */
.ch-tiles { gap: 22px; }
.ch-tiles:hover { border-color: var(--border2); }
.ch-snap-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch-snap-1 { grid-template-columns: minmax(0, 1fr); }
.ch-tiles .snap-metric-value { font-size: clamp(34px, 3.4vw, 48px); }

/* Pillar grids: 3 or 4 across. */
.ch-pillars--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ch-pillars .hipaa-pillar { height: 100%; }
.ch-pillar-link { transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease; }
.ch-pillar-link:hover { border-color: var(--border); transform: translateY(-3px); }
.ch-card-link { margin-top: auto; padding-top: 6px; }
.ch-num { font-family: var(--serif); font-weight: 300; font-size: 26px; line-height: 1; }

/* Hub cards: the eight challenges. */
.ch-hub-card { gap: 14px; }
.ch-hub-n { font-family: var(--serif); font-weight: 300; font-size: 30px; line-height: 1; color: var(--cyan); }

/* ---- Proof ------------------------------------------------------------ */
.ch-stories-heading { margin-bottom: var(--stack-content); }
.ch-stories-heading h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.ch-proof--plain .stories-inner { background: transparent; }
.ch-proof .story-snap .ch-snap-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Mid CTA: two actions instead of the email pill ------------------- */
.ch-midcta-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.ch-midcta .midcta-copy { max-width: var(--measure-head); }
.ch-midcta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.ch-btn-light {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 14px 13px 26px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  color: var(--ink); background: var(--white); border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}
.ch-btn-light:hover { transform: translateY(-2px); }
.ch-midcta .ch-btn-ghost { border-radius: 999px; padding: 13px 26px; font-size: 16px; font-weight: 600; }

/* ---- FAQ -------------------------------------------------------------- */
.ch-faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: var(--grid-gap-wide); align-items: start; }
.ch-faq { border-top: 1px solid var(--border); }
.ch-faq-item { border-bottom: 1px solid var(--border); }
.ch-faq-q {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 22px 0;
  font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1.4; letter-spacing: -0.2px; color: var(--ink);
}
.ch-faq-q::-webkit-details-marker { display: none; }
.ch-faq-q::after { content: "+"; font-weight: 300; font-size: 28px; line-height: 0.9; color: var(--muted); flex-shrink: 0; transition: transform 0.25s; }
.ch-faq-item[open] .ch-faq-q::after { transform: rotate(45deg); color: var(--ink); }
.ch-faq-a { padding: 0 40px 24px 0; }
.ch-faq-a p { font-size: 16px; line-height: 1.6; color: var(--muted2); max-width: 70ch; }

/* ---- Link lists (related challenges, specialties, who it's for) ------- */
.ch-related-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--grid-gap-wide); align-items: start; }
.ch-related-grid--one { grid-template-columns: minmax(0, 1fr); }
.ch-related-h { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.2; margin-bottom: 16px; }
.ch-links { list-style: none; border-top: 1px solid var(--border2); }
.ch-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 17px; font-weight: 400; color: var(--ink);
  transition: color 0.2s ease;
}
.ch-links a svg { flex-shrink: 0; transition: transform 0.2s ease; }
.ch-links a:hover svg { transform: translateX(4px); }
.ch-links--cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; border-top: 0; }
.ch-links--cols li { border-top: 1px solid var(--border2); }
/* Four across: the longest name ("Plastic surgery marketing") fits on one line, so the row stays even. */
.ch-links--cols a { gap: 12px; font-size: 16px; }
@media (max-width: 1399px) { .ch-links--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- /new-practice/: timeline ----------------------------------------- */
.ch-timeline { list-style: none; border-top: 1px solid var(--border); }
.ch-timeline-item { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--border2); }
.ch-timeline-when {
  display: flex; align-items: center; gap: 10px; align-self: start; padding-top: 6px;
  font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.ch-timeline-when::before { content: ""; width: 8px; height: 8px; background: var(--cyan); transform: rotate(45deg); flex-shrink: 0; }
.ch-timeline-body { display: flex; flex-direction: column; gap: 8px; max-width: var(--measure-text); }
.ch-timeline-item:last-child .ch-timeline-when { color: var(--muted); }

/* ---- /new-practice/: apply -------------------------------------------- */
.ch-apply-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: var(--grid-gap-wide); align-items: start; }
.ch-apply-card { background: var(--bg); border: 1px solid var(--border2); }
.ch-next { list-style: none; counter-reset: chnext; display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.ch-next li { counter-increment: chnext; position: relative; padding-left: 40px; font-size: 16.5px; line-height: 1.5; color: var(--muted2); }
.ch-next li::before {
  content: counter(chnext); position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(6, 182, 212, 0.12); color: var(--ink); font-family: var(--serif); font-size: 16px;
}
.ch-next strong { font-weight: 600; color: var(--ink); }
.ch-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ch-pair > div { display: flex; flex-direction: column; min-width: 0; }
.ch-select { appearance: auto; -webkit-appearance: menulist; }
.ch-btn-ink { background: var(--ink); color: var(--white); margin-top: 8px; }
.ch-btn-ink:hover { background: var(--ink); opacity: 0.9; }

/* ---- /practice-report/ ------------------------------------------------ */
.ch-report-head { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.ch-report-head .lp-cover { flex-shrink: 0; margin-right: 24px; }

/* Two-step form chrome (same rules as lp-agency.css, which these pages don't load). */
.ch-page .ag-form-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ch-page .ag-form-steps li { display: flex; align-items: center; gap: 8px; }
.ch-page .ag-form-steps li + li::before { content: ""; width: 26px; height: 1px; background: var(--border); margin-right: 2px; }
.ch-page .ag-form-steps span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--border); background: var(--white); }
.ch-page .ag-form-steps li.is-on { color: var(--ink); }
.ch-page .ag-form-steps li.is-on span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.ch-page .ag-form-steps li.is-done span { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.ch-page .ag-form-got { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.ch-page .ag-form-got i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.ch-page .ag-form-cal { margin-top: 18px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--white); }
.ch-page .ag-form-cal iframe { display: block; width: 100%; height: 620px; border: 0; }
.ch-page .ag-form-cal-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.ch-page .lp-form-trust { margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1200px) {
  .ch-hero--aside .hero-content { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; padding-top: 140px; }
  .ch-pillars--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  /* stacked split: the body is the lead under the h2 */
  .ch-split { gap: var(--stack-lead); }
  .ch-split-body { padding-top: 0; }
  .ch-hero .hero-content { padding-top: 120px; padding-bottom: 64px; }
  .ch-hero--aside .hero-content { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ch-hero--aside .ch-hero-aside { max-width: 560px; }
  .ch-split, .ch-faq-grid, .ch-related-grid, .ch-apply-grid { grid-template-columns: minmax(0, 1fr); }
  .ch-links--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-midcta-row { flex-direction: column; align-items: flex-start; }
  .ch-timeline-item { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .ch-hero { min-height: 86vh; min-height: 86svh; }
  .ch-hero .hero-content { padding: 110px 16px 40px; align-items: flex-end; }
  .ch-hero--aside { min-height: 0; }
  .ch-hero-left { gap: 16px; }
  .ch-crumbs ol { font-size: 13px; }
  .ch-hero-ctas { flex-direction: column; align-items: stretch; width: 100%; }
  .ch-hero-ctas .hero-btn, .ch-hero-ctas .ch-btn-ghost { justify-content: center; padding-top: 14px; padding-bottom: 14px; font-size: 16px; }
  .ch-hero-ctas + .hero-btn-note { margin-top: -2px; }
  .ch-ticks li { font-size: 15.5px; }
  .ch-hero--aside .hero-content { padding-top: 96px; gap: 28px; }
  .ch-hero-aside .lp-form-card { padding: 22px; }

  .ch-pillars--4 { grid-template-columns: minmax(0, 1fr); }
  .ch-hub-n { font-size: 24px; }
  .ch-tiles { padding: 22px; }
  .ch-tiles .snap-metrics { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 18px; }
  .ch-tiles .snap-metric { grid-template-rows: auto auto; grid-row: auto; gap: 8px; }
  .ch-tiles .snap-metric-value { font-size: 34px; }

  .ch-midcta-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .ch-btn-light, .ch-midcta .ch-btn-ghost { justify-content: center; min-height: 48px; }
  .ch-midcta .midcta-copy { align-items: flex-start; text-align: left; }

  .ch-faq-q { font-size: 16.5px; padding: 18px 0; }
  .ch-faq-a { padding-right: 0; }
  .ch-links--cols { grid-template-columns: minmax(0, 1fr); }
  .ch-links a { font-size: 16px; }

  .ch-timeline-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 22px 0; }
  .ch-report-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .ch-report-head .lp-cover { display: none; }
  .ch-pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ch-apply-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-pillar-link, .ch-pillar-link:hover, .ch-btn-light:hover { transition: none; transform: none; }
}

/* In-page targets (Apply, the report form) clear the pinned nav. */
#apply, #report { scroll-margin-top: 88px; }
/* Step 2 of the report form: js/landing.js centres the card with scrollIntoView. The card is taller
   than the screen with a 620px calendar, so its top went under the nav. The scroll margin keeps the
   nav's height clear, and the calendar shrinks to what fits (it scrolls inside). */
.ch-page [data-lp-form] { scroll-margin-top: 92px; }
.ch-page .ag-form-cal iframe { height: clamp(360px, calc(100vh - 450px), 620px); }
@media (max-width: 768px) {
  .ch-page .ag-form-cal iframe { height: clamp(360px, calc(100svh - 370px), 620px); }
}

/* The footer's mobile "Book a call" pill steps aside while a form is on
   screen, so it never covers the form's own submit button (same treatment
   main.css gives it over the footer CTA: body.cta-in-view). */
body.ch-form-in-view .tely-sticky-cta { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }

@media (max-width: 768px) {
  .ch-hero .hero-bg img { object-position: 70% center; }
}

/* A photo whose subject sits where the headline goes is mirrored, so the
   subject lands on the open right side the way the homepage hero's does. */
.ch-hero .hero-bg img.ch-flip { transform: scaleX(-1); }

/* Tap targets: inline text links get a 44px hit area without moving the text. */
@media (max-width: 1024px) {
  .ch-crumbs a, .ch-note a, .ch-proof .story-card-link, .ch-proof .stories-viewall-link { display: inline-flex; align-items: center; min-height: 44px; }
  .ch-crumbs a { margin: -12px 0; }
}
@media (max-width: 768px) {
  .ch-hero .hero-bg img.ch-flip { object-position: 30% center; }
}

/* ---- Hero photo placement (images pass) --------------------------------
   Desktop: per-page --hero-pos keeps the subject right of the headline.
   Phone: the photo is a band across the top and the copy starts below it,
   so the subject is never under the H1 (--hero-pos-m per page). */
.ch-hero .hero-bg img { object-position: var(--hero-pos, center); }
@media (max-width: 768px) {
  .ch-hero { background: var(--ink); }
  .ch-hero .hero-bg { bottom: auto; height: 400px; }
  .ch-hero .hero-bg img, .ch-hero .hero-bg img.ch-flip { object-position: var(--hero-pos-m, 70% center); }
  .ch-hero .hero-gradient {
    background: linear-gradient(180deg, rgba(10,17,26,0.5) 0%, rgba(10,17,26,0) 26%, rgba(10,17,26,0) 58%, rgba(10,17,26,0.82) 88%, rgba(10,17,26,1) 100%);
  }
  .ch-hero .hero-content, .ch-hero--aside .hero-content { padding-top: 340px; }
}

/* Headings never end on a single short word (card titles, section heads, footer CTA). */
.ch-page :is(h2, h3, h4), .cta-content h2 { text-wrap: balance; }
