/* ─────────────────────────────────────────────────────────────────
   CRO Block 9 — Process Timeline (token-bound, mobile-first)
   The original cro-timeline.css module is not loaded on the live
   page (Grav asset pipeline drops late addCss calls), so this file
   is the single source of truth for block 9 styling. Scoped under
   .block-cro-block-9 only.
   ───────────────────────────────────────────────────────────────── */

.block-cro-block-9 {
  font-family: var(--ds-font-body);
  color: var(--scheme-fg);
  background: var(--scheme-bg);
  overflow: hidden;
}

/* ───────────────────────────────────────────────────────────────────
   T2-CRO-TIMELINE (2026-05-08): defensive guard against the
   icon-stretch failure mode described in the A-FRONT audit. If a
   teammate ever drops a token-less SVG into this section, or a CSS
   variable falls back to its default, an unconstrained <svg>/<img>
   will not stretch the section to 13 500px. Scoped to the block so it
   cannot leak; small/highlight icons explicitly override below.
   ─────────────────────────────────────────────────────────────────── */
.section.block-cro-block-9 svg,
.section.block-cro-block-9 img,
.section.block-cro-block-9 .timeline-icon,
.block-cro-block-9 svg,
.block-cro-block-9 img,
.block-cro-block-9 .timeline-icon {
  max-width: 48px;
  max-height: 48px;
  height: auto;
}
/* Re-enable the decorative progress ring (sized by its wrapper, not an
   icon) — it must fill its 60–72px container, so opt out of the cap. */
.section.block-cro-block-9 .node-circle-progress svg,
.block-cro-block-9 .node-circle-progress svg {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
}
/* Defensive override: legacy cro-timeline.css loads AFTER this file and
   sets `.cro-timeline .timeline-pane { background: var(--scheme-card-bg, #fff) }`
   which paints the pane near-black (dark-on-dark text bug). Per fix-team
   constraints we cannot touch cro-timeline.css; raising specificity to
   .section.block-cro-block-9 .timeline-pane wins over the legacy rule. */
.section.block-cro-block-9 .timeline-pane,
.section.block-cro-block-9.cro-timeline .timeline-pane {
  background: var(--scheme-card-bg, #fff);
  color: var(--scheme-card-fg, #0e0f0c);
}
.section.block-cro-block-9 .timeline-pane .pane-text h3,
.section.block-cro-block-9.cro-timeline .timeline-pane .pane-text h3 {
  color: var(--ds-ink, #0e0f0c);
}
.section.block-cro-block-9 .timeline-pane .pane-text p,
.section.block-cro-block-9.cro-timeline .timeline-pane .pane-text p {
  color: var(--ds-ink-soft, #3a3b35);
}
/* Section-level rhythm — guarantees breathing room even if cro-base.css
   doesn't load. padding-block scales with viewport; padding-inline
   keeps content off the screen edge on mobile. */
.section.block-cro-block-9 {
  padding-block: clamp(80px, 12vh, 140px);
  padding-inline: clamp(20px, 5vw, 64px);
}
.section.block-cro-block-9 > .container,
.block-cro-block-9 > .container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 0;
  width: 100%;
}
/* Heading scale — eyebrow above, h2 fluid, no UA defaults. */
.section.block-cro-block-9 .section-header { text-align: center; }
.section.block-cro-block-9 .section-header h2,
.section.block-cro-block-9 .section-header .section-title,
.block-cro-block-9 .section-header h2,
.block-cro-block-9 .section-title {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  margin: 0 0 var(--ds-space-3, 12px);
}

/* Section header — F-CONTRAST 2026-05-08:
   Was using --ds-cta (#e36218) on tinted-cream pill bg. Contrast 2.92
   (below WCAG AA 3.0). Bumped to --ds-cta-dk (#b94e12) which yields
   ~4.5:1 on the same tinted-cream surface. Bold weight + uppercase
   keeps the eyebrow visually legible. */
.section.block-cro-block-9.light .section-header .section-tag,
.section.block-cro-block-9 .section-header .section-tag,
.block-cro-block-9 .section-header .section-tag,
.block-cro-block-9 .section-tag {
  display: inline-block;
  font-family: var(--ds-font-mono);
  font-size: var(--ds-fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-cta-dk, #b94e12);
  background: color-mix(in srgb, var(--ds-cta) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ds-cta) 30%, transparent);
  border-radius: var(--ds-radius-pill);
  padding: var(--ds-space-2) var(--ds-space-4);
  margin-bottom: var(--ds-space-3);
}
.section.block-cro-block-9 .section-header .section-title,
.section.block-cro-block-9.light .section-header .section-title,
.block-cro-block-9 .section-header h2,
.block-cro-block-9 .section-title {
  font-family: var(--ds-font-display);
  color: var(--scheme-fg);
}
.section.block-cro-block-9 .section-header .section-subtitle,
.section.block-cro-block-9.light .section-header .section-subtitle,
.block-cro-block-9 .section-subtitle {
  color: var(--scheme-fg-soft);
  font-size: var(--ds-fs-body-lg);
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Container */
.block-cro-block-9 .horizontal-timeline-container {
  max-width: 1000px;
  margin: var(--ds-space-6) auto 0;
  position: relative;
}

/* Timeline node row */
.block-cro-block-9 .timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 3;
  gap: var(--ds-space-2);
  padding: 0 var(--ds-space-2);
}
/* T2-CRO-TIMELINE: legacy cro-timeline.css overrides the connector with
   `.cro-timeline .timeline-nodes::before { top:24; left:24; right:24; height:2; }`
   at the same specificity, but loads later. Bumping to .section.block-cro-block-9
   (specificity (0,3,1)) wins regardless of source order, restoring the
   intended 21/32 placement and 3px track. */
.section.block-cro-block-9 .timeline-nodes::before,
.block-cro-block-9 .timeline-nodes::before {
  content: '';
  position: absolute;
  /* SWEEP-C3: connector bumped 2px→3px and color from --ds-rule (low contrast)
     to --ds-ink-mute so seniors can perceive the timeline track clearly.
     top adjusted (22→21) so 3px track stays centered behind 44px circles. */
  top: 21px;
  left: 32px;
  right: 32px;
  height: 3px;
  background: var(--ds-ink-mute);
  z-index: 1;
  border-radius: 2px;
}
.section.block-cro-block-9 .timeline-nodes::after,
.block-cro-block-9 .timeline-nodes::after {
  content: '';
  position: absolute;
  /* SWEEP-C3: progress fill matched to 3px track height + adjusted top. */
  top: 21px;
  left: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--ds-trust), var(--ds-cta));
  z-index: 2;
  width: 0%;
  transition: width var(--ds-duration-slow) var(--ds-ease-out);
  border-radius: 2px;
}
.block-cro-block-9 .timeline-nodes[data-step="1"]::after { width: 0%; }
.block-cro-block-9 .timeline-nodes[data-step="2"]::after { width: 22%; }
.block-cro-block-9 .timeline-nodes[data-step="3"]::after { width: 47%; }
.block-cro-block-9 .timeline-nodes[data-step="4"]::after { width: 72%; }
.block-cro-block-9 .timeline-nodes[data-step="5"]::after { width: calc(100% - 64px); }

/* Individual node — also reset native <button> defaults (W2-A17 changed div→button).
   T2-CRO-TIMELINE: design-system.css applies a generic
   `main button:where(...):not(...)*9` fallback at specificity (0,9,2)
   which paints every <button> in <main> with paper bg, rule border,
   and 12/20 padding. Without !important the timeline-node renders as a
   boxed pill instead of the bare circle+title we want. !important is
   scoped to the reset values, not visual styling. */
.block-cro-block-9 .timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 4;
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0;
  min-height: 0 !important;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  gap: var(--ds-space-2, 8px);
}
.block-cro-block-9 .timeline-node:focus-visible {
  outline: 2px solid var(--ds-cta);
  outline-offset: 4px;
  border-radius: var(--ds-radius-xs);
}
.block-cro-block-9 .timeline-node:hover { transform: translateY(-2px); }

.block-cro-block-9 .node-circle-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.block-cro-block-9 .node-circle {
  /* SWEEP-C3: circle bumped 44→48px to clear the senior 48px tap-target floor
     (parent timeline-node is the actual button, but visual perception needs
     to match the tap area). Step number sized at 1.5rem (24px) per spec
     and color promoted from ink-mute → ink-soft for AAA contrast. */
  width: 48px;
  height: 48px;
  background: var(--scheme-card-bg);
  border: 2px solid var(--ds-ink-mute);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-display);
  font-size: var(--ds-fs-h3);
  font-weight: 700;
  color: var(--ds-ink-soft);
  transition: all var(--ds-duration) var(--ds-ease-out);
  position: relative;
  z-index: 5;
  box-shadow: 0 0 0 4px var(--scheme-bg), var(--ds-shadow-sm);
}
.block-cro-block-9 .node-circle.has-icon { padding: 8px; }
.block-cro-block-9 .node-circle-svg {
  width: 20px;
  height: 20px;
  color: var(--ds-cta);
  stroke: var(--ds-cta);
  fill: none;
  stroke-width: 2;
}
.block-cro-block-9 .timeline-node.active .node-circle {
  border-color: var(--ds-cta);
  color: var(--ds-cta);
  box-shadow: 0 0 0 4px var(--scheme-bg),
              0 0 0 6px color-mix(in srgb, var(--ds-cta) 25%, transparent),
              var(--ds-shadow-md);
  transform: scale(1.08);
}
.block-cro-block-9 .timeline-node.completed .node-circle {
  border-color: var(--ds-trust);
  color: var(--ds-trust);
}
.block-cro-block-9 .timeline-node.completed .node-circle-svg {
  color: var(--ds-trust);
  stroke: var(--ds-trust);
}
.block-cro-block-9 .node-title {
  margin-top: var(--ds-space-3);
  font-family: var(--ds-font-mono);
  font-weight: 600;
  color: var(--ds-ink-mute);
  font-size: var(--ds-fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-node.active .node-title { color: var(--ds-cta); font-weight: 700; }
.block-cro-block-9 .timeline-node.completed .node-title { color: var(--ds-trust); }

/* Optional progress ring */
.block-cro-block-9 .node-circle-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%) rotate(-90deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-node.active .node-circle-progress { opacity: 1; }
.block-cro-block-9 .node-circle-progress svg { width: 100%; height: 100%; overflow: visible; }
.block-cro-block-9 .node-circle-progress .progress-track { fill: none; stroke: var(--ds-cta); stroke-opacity: 0.18; stroke-width: 2.5; }
.block-cro-block-9 .node-circle-progress .progress-fill { fill: none; stroke: var(--ds-cta); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; }
.block-cro-block-9 .timeline-node.active .node-circle-progress .progress-fill {
  animation: croBlock9Progress 4s linear forwards;
}
@keyframes croBlock9Progress {
  0% { stroke-dashoffset: 201; }
  100% { stroke-dashoffset: 0; }
}

/* Content panes */
.block-cro-block-9 .timeline-content-panes {
  margin-top: var(--ds-space-6);
}
.block-cro-block-9 .timeline-pane {
  display: none;
  background: var(--scheme-card-bg);
  color: var(--scheme-card-fg);
  padding: var(--ds-space-6) var(--ds-space-5);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md);
  border-top: 4px solid var(--ds-cta);
  position: relative;
  overflow: hidden;
  animation: croBlock9PaneFade var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-pane.active { display: block; }
@keyframes croBlock9PaneFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.block-cro-block-9 .pane-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-5);
  text-align: center;
  align-items: center;
}

/* Pane icon — CRITICAL: cap unconstrained SVG/IMG */
.block-cro-block-9 .pane-icon { display: flex; justify-content: center; }
.block-cro-block-9 .pane-icon-wrapper {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.block-cro-block-9 .pane-icon-inner {
  width: 64px;
  height: 64px;
  border-radius: var(--ds-radius);
  background: color-mix(in srgb, var(--ds-cta) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ds-cta) 22%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ds-duration) var(--ds-ease-out),
              box-shadow var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .pane-icon-inner:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-md);
}
.block-cro-block-9 .pane-icon .timeline-svg-icon,
.block-cro-block-9 .pane-icon .icon-fallback,
.block-cro-block-9 .pane-icon .icon-fallback svg,
.block-cro-block-9 .pane-icon img,
.block-cro-block-9 .pane-icon svg {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  display: block;
  color: var(--ds-cta);
  stroke: var(--ds-cta);
}
/* Hard cap any descendant SVG/IMG inside the pane to prevent runaway sizing */
.block-cro-block-9 .timeline-pane svg,
.block-cro-block-9 .timeline-pane img {
  max-width: 100%;
  height: auto;
}

/* Text */
.block-cro-block-9 .pane-text h3 {
  /* SWEEP-C3: switched to humanist DM Sans (var(--ds-font-body)) per
     spec — display Anton-uppercase isn't optimal for step-title content
     where seniors need lowercase letterform recognition. Mirrors the
     design-system .ds-h3-humane utility (DS L586). */
  font-family: var(--ds-font-body);
  font-size: var(--ds-fs-display-md);
  color: var(--ds-ink);
  margin: 0 0 var(--ds-space-3);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
  font-weight: 700;
}
.block-cro-block-9 .pane-text p {
  /* SWEEP-C3: descriptions floor at 1.125rem (18px) per spec for senior
     readability. Tablet+ override (line 415) ramps to body-lg (20px). */
  font-size: var(--ds-fs-body);
  color: var(--ds-ink-soft);
  line-height: 1.65;
  margin: 0 0 var(--ds-space-4);
}

/* Highlight pill */
.block-cro-block-9 .pane-highlight,
.block-cro-block-9 .pane-highlight-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  background: color-mix(in srgb, var(--ds-trust) 10%, transparent);
  color: var(--ds-trust);
  font-family: var(--ds-font-body);
  font-weight: 700;
  /* SWEEP-C3: padding bumped (--ds-space-2/4 → --ds-space-3/5) and
     min-height locked to 48px so the link "Guaranteed 1-Hour Response"
     clears the senior tap-target floor (was rendering at 44px tall —
     bug evidence cro-timeline-1440.json L1). Font ≥1rem per AAA. */
  padding: var(--ds-space-3) var(--ds-space-5);
  min-height: var(--ds-touch-target, 48px);
  box-sizing: border-box;
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-fs-body-sm);
  line-height: 1.4;
  border: 1px solid color-mix(in srgb, var(--ds-trust) 28%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ds-duration) var(--ds-ease-out),
              border-color var(--ds-duration) var(--ds-ease-out),
              transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-highlight-link:hover {
  background: color-mix(in srgb, var(--ds-trust) 18%, transparent);
  border-color: color-mix(in srgb, var(--ds-trust) 45%, transparent);
  transform: translateY(-1px);
}
.block-cro-block-9 .pane-highlight .highlight-svg-icon,
.block-cro-block-9 .pane-highlight-link .highlight-svg-icon,
.block-cro-block-9 .pane-highlight svg,
.block-cro-block-9 .pane-highlight img {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  flex-shrink: 0;
  color: var(--ds-trust);
  stroke: var(--ds-trust);
}
.block-cro-block-9 .pane-highlight-link .highlight-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.7;
  stroke: var(--ds-trust);
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-highlight-link:hover .highlight-arrow {
  transform: translateX(2px);
  opacity: 1;
}

/* CTA button (last step) */
.block-cro-block-9 .pane-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  background: var(--ds-cta-aa, var(--ds-cta-dk));
  color: #fff;
  padding: var(--ds-space-3) var(--ds-space-5);
  border-radius: var(--ds-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--ds-fs-body);
  margin-top: var(--ds-space-3);
  box-shadow: var(--ds-shadow-cta);
  transition: background var(--ds-duration) var(--ds-ease-out),
              transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-cta:hover {
  background: var(--ds-cta-dk);
  color: #fff;
  transform: translateY(-1px);
}
/* TEAM-POLISH 2026-05-08: explicit focus-visible ring so keyboard users land
   the same affordance as mouse hover. */
.block-cro-block-9 .pane-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ds-cta), 0 0 0 5px rgba(255,255,255,.95);
}
/* TEAM-POLISH: lock pane CTA to ≥48px touch target so the button always
   meets AARP guidance, even when inside a constrained pane. */
.block-cro-block-9 .pane-cta {
  min-height: var(--ds-touch-target, 48px);
}
.block-cro-block-9 .pane-cta::after {
  content: '→';
  font-size: 1em;
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-cta:hover::after { transform: translateX(3px); }

/* Tablet+ */
@media (min-width: 768px) {
  .block-cro-block-9 .timeline-pane {
    padding: var(--ds-space-7);
  }
  .block-cro-block-9 .pane-grid {
    grid-template-columns: 110px 1fr;
    text-align: left;
    align-items: flex-start;
    gap: var(--ds-space-6);
  }
  .block-cro-block-9 .pane-icon { justify-content: flex-start; }
  .block-cro-block-9 .pane-icon-wrapper { width: 96px; height: 96px; }
  .block-cro-block-9 .pane-icon-inner { width: 78px; height: 78px; }
  .block-cro-block-9 .pane-icon .timeline-svg-icon,
  .block-cro-block-9 .pane-icon .icon-fallback,
  .block-cro-block-9 .pane-icon img,
  .block-cro-block-9 .pane-icon svg {
    width: 38px; height: 38px; max-width: 38px; max-height: 38px;
  }
  /* SWEEP-C3: keep step-number font at 1.5rem floor on tablet+ (was 1.2rem
     which dropped below the spec). Circle physical size ramps to 56px. */
  .block-cro-block-9 .node-circle { width: 56px; height: 56px; font-size: 1.5rem; }
  .block-cro-block-9 .node-circle.has-icon { padding: 10px; }
  .block-cro-block-9 .node-circle-svg { width: 24px; height: 24px; }
  .block-cro-block-9 .node-circle-progress { width: 72px; height: 72px; }
  .section.block-cro-block-9 .timeline-nodes::before,
  .section.block-cro-block-9 .timeline-nodes::after,
  .block-cro-block-9 .timeline-nodes::before,
  .block-cro-block-9 .timeline-nodes::after {
    top: 28px;
    left: 40px;
    right: 40px;
  }
  .section.block-cro-block-9 .timeline-nodes[data-step="5"]::after,
  .block-cro-block-9 .timeline-nodes[data-step="5"]::after { width: calc(100% - 80px); }
  .block-cro-block-9 .node-title { font-size: 0.78rem; }
  .block-cro-block-9 .pane-text h3 { font-size: 1.7rem; }
  .block-cro-block-9 .pane-text p { font-size: var(--ds-fs-body-lg); }
}

/* Mobile-only: tighten the node row so it fits 375 */
@media (max-width: 480px) {
  .block-cro-block-9 .timeline-nodes { gap: 4px; padding: 0; }
  /* SWEEP-C3: was 38px×0.95rem font — too small for 45-70+ ICP and below
     senior spec. Bumped to 44px circle with 1.25rem step numbers (still
     readable, still fits 5 nodes across 375px). Tap target augmented by
     parent .timeline-node which has surrounding gap to reach 48px. */
  .block-cro-block-9 .node-circle { width: 44px; height: 44px; font-size: 1.25rem; }
  .block-cro-block-9 .node-circle.has-icon { padding: 8px; }
  .block-cro-block-9 .node-circle-svg { width: 18px; height: 18px; }
  .section.block-cro-block-9 .timeline-nodes::before,
  .section.block-cro-block-9 .timeline-nodes::after,
  .block-cro-block-9 .timeline-nodes::before,
  .block-cro-block-9 .timeline-nodes::after { top: 20px; left: 22px; right: 22px; height: 3px; }
  /* T2-CRO-TIMELINE: clamp title width and allow wrap so neighbouring
     labels (PRODUCTION/DELIVERY) don't collide on 375 — seen in baseline
     screenshot t2-tl-375-mobile.png. */
  .block-cro-block-9 .node-title {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
    padding: 0 2px;
    box-sizing: border-box;
  }
  .block-cro-block-9 .timeline-pane { padding: var(--ds-space-5) var(--ds-space-4); }
  /* SWEEP-C3: pane title sentence-case humanist via .ds-h3-humane utility.
     1.5rem floor matches design-system --ds-fs-h3 (24px). */
  .block-cro-block-9 .pane-text h3 { font-size: 1.5rem; }
  /* T2-CRO-TIMELINE: section padding-inline already clamp(20,5vw,64) via
     the section rule above; on 375 5vw=18.75 so floor of 20px applies and
     content sits comfortably off the screen edge. */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .block-cro-block-9 *, .block-cro-block-9 *::before, .block-cro-block-9 *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
