/* How we build: auto-advancing build steps on The Build page (Divi Tabs module with class "am-bs").
   Source: prototypes/am-build-steps.html + am-build-steps-brief.md (Claude Design). Port, not a redesign. */
/* =========================================================
   AUTOMAGENCY · THE BUILD · "How we build" step section
   Prefix: am-bs-   ·   Enhances a Divi Tabs module (CSS class: am-bs)
   ========================================================= */
.am-bs-section,
.am-bs {
  --am-bs-ink: #101010;
  --am-bs-paper: #fbfbfa;
  --am-bs-sand: #f6f5f1;
  --am-bs-accent: #2338ec;
  --am-bs-accent-soft: #8b96ff;
  --am-bs-muted: #5d5d57;
  --am-bs-faint: #8a8a83;
  --am-bs-rule: #e4e3df;
  --am-bs-hair: #c9c7c0;
  --am-bs-white: #ffffff;
  --am-bs-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --am-bs-mono: var(--am-mono, ui-monospace, Menlo, Monaco, monospace);
  --am-bs-ease: cubic-bezier(.22, .61, .36, 1);   /* ease-out-ish, quick start, soft landing */
  --am-bs-enter: 360ms;                            /* panel slide/fade in */
}

/* ---------- Section shell (in Divi: Section + Row settings) ---------- */
.am-bs-section {
  background: var(--am-bs-paper);
  color: var(--am-bs-ink);
  font-family: var(--am-bs-sans);
  padding: 128px 0 136px;
  -webkit-font-smoothing: antialiased;
}
.am-bs-wrap { max-width: 1360px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }
.am-bs-section *, .am-bs-section *::before, .am-bs-section *::after { box-sizing: border-box; }

/* ---------- Section header (Divi Text module above the Tabs) ---------- */
.am-bs-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  margin-bottom: 72px;
}
.am-bs-eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  font: 500 12px/1 var(--am-bs-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--am-bs-accent);
}
.am-bs-title {
  grid-column: 1 / span 8;
  margin: 0;
  font: 600 56px/1.04 var(--am-bs-sans);
  letter-spacing: -.028em;
  color: var(--am-bs-ink);
  max-width: 15.5em;
}
.am-bs-intro {
  grid-column: 9 / -1;
  align-self: end;
  margin: 0;
  font: 400 18px/1.55 var(--am-bs-sans);
  color: var(--am-bs-muted);
}

/* ---------- Neutralise Divi Tabs chrome ---------- */
.am-bs.et_pb_tabs { border: 0 !important; background: none !important; overflow: visible; }
.am-bs .et_pb_tabs_controls[hidden] { display: none !important; }
.am-bs .et_pb_all_tabs { padding: 0 !important; background: none !important; border: 0 !important; }
.am-bs.am-bs-ready .am-bs-panel { display: none !important; padding: 0 !important; }
.am-bs.am-bs-ready .am-bs-panel.is-active { display: block !important; }

/* ---------- Top bar: label + pause control ---------- */
.am-bs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  font: 500 11px/1 var(--am-bs-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--am-bs-muted);
}
.am-bs-topbar-r { display: flex; align-items: center; gap: 16px; }
.am-bs-status { color: var(--am-bs-muted); }
.am-bs-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px;
  background: transparent; color: var(--am-bs-ink);
  border: 1px solid var(--am-bs-hair); border-radius: 0;
  font: 500 11px/1 var(--am-bs-mono); letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
}
.am-bs-toggle:hover { border-color: var(--am-bs-ink); }
.am-bs-toggle-ic { position: relative; width: 8px; height: 9px; display: inline-block; }
.am-bs-toggle-ic::before, .am-bs-toggle-ic::after { content: ""; position: absolute; top: 0; width: 3px; height: 9px; background: currentColor; }
.am-bs-toggle-ic::before { left: 0; } .am-bs-toggle-ic::after { right: 0; }
.am-bs-toggle[aria-pressed="true"] .am-bs-toggle-ic::before { width: 0; height: 0; background: none; border-left: 8px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.am-bs-toggle[aria-pressed="true"] .am-bs-toggle-ic::after { display: none; }

/* ---------- Track: rail + timeline (scrolls together on tablet) ---------- */
.am-bs-track { position: relative; }
.am-bs-track-in { min-width: 0; }
.am-bs-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, .9fr);
}
.am-bs-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "num label" "num wk";
  column-gap: 12px; row-gap: 6px;
  align-items: baseline;
  margin: 0; padding: 22px 16px 20px 0;
  background: none; border: 0; border-radius: 0;
  text-align: left; cursor: pointer;
  color: var(--am-bs-muted);
  font-family: var(--am-bs-sans);
}
.am-bs-bar {
  position: absolute; top: 0; left: 0; right: 10px;
  height: 3px; background: var(--am-bs-rule); overflow: hidden;
}
.am-bs-bar i {
  display: block; height: 100%; width: 100%;
  background: var(--am-bs-accent);
  transform: scaleX(0); transform-origin: 0 50%;
}
.am-bs-step--after .am-bs-bar { background: none; border-top: 3px dotted var(--am-bs-hair); height: 0; right: 0; }
.am-bs-step--after .am-bs-bar i { display: none; }
.am-bs-num { grid-area: num; font: 500 12px/1 var(--am-bs-mono); letter-spacing: .1em; padding-top: 3px; }
.am-bs-label { grid-area: label; font: 500 17px/1.2 var(--am-bs-sans); letter-spacing: -.005em; }
.am-bs-wk { grid-area: wk; font: 400 11px/1 var(--am-bs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--am-bs-muted); }
.am-bs-step:hover .am-bs-label { color: var(--am-bs-ink); }
.am-bs-step.is-done { color: var(--am-bs-accent); }
.am-bs-step.is-done .am-bs-bar i { transform: scaleX(1); }
.am-bs-step.is-active { color: var(--am-bs-ink); }
.am-bs-step.is-active .am-bs-num { color: var(--am-bs-accent); }
.am-bs-step.is-active .am-bs-label { font-weight: 600; }
.am-bs-step--after.is-active .am-bs-bar { border-top-color: var(--am-bs-accent); }
.am-bs-step:focus-visible, .am-bs-toggle:focus-visible, .am-bs-next:focus-visible, .am-bs-cta:focus-visible, .am-bs-seg:focus-visible, .am-bs-arrow:focus-visible, .am-bs-mcta-link:focus-visible, .am-bs-panel:focus-visible {
  outline: 2px solid var(--am-bs-accent); outline-offset: 3px;
}

/* Timeline: 12-week scale + one bar per step (staircase) */
.am-bs-scale {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, .9fr);
  margin-top: 4px;
}
.am-bs-gantt, .am-bs-weeks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.am-bs-gantt { row-gap: 3px; padding: 10px 10px 10px 0; border-top: 1px solid var(--am-bs-rule); }
.am-bs-g { height: 5px; background: var(--am-bs-rule); transition: background-color 300ms var(--am-bs-ease); }
.am-bs-g.is-done { background: var(--am-bs-accent-soft); }
.am-bs-g.is-active { background: var(--am-bs-accent); }
.am-bs-weeks span {
  border-left: 1px solid var(--am-bs-hair);
  padding: 6px 0 0 6px; height: 22px;
  font: 400 10px/1 var(--am-bs-mono); letter-spacing: .08em; color: var(--am-bs-faint);
}
.am-bs-weeks span:last-child { border-right: 1px solid var(--am-bs-hair); }
.am-bs-ongoing {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: 10px 0 0 12px; border-top: 1px solid var(--am-bs-rule);
  font: 400 10px/1 var(--am-bs-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--am-bs-faint);
}
.am-bs-ongoing-line { display: block; border-top: 5px dotted var(--am-bs-rule); margin-bottom: 5px; }
.am-bs-ongoing.is-active { color: var(--am-bs-accent); }
.am-bs-ongoing.is-active .am-bs-ongoing-line { border-top-color: var(--am-bs-accent); }

/* ---------- Panels ---------- */
.am-bs-stage { margin-top: 36px; }
.am-bs-panel:focus { outline: none; }
/* mobile-only elements, hidden above 767px */
.am-bs-mnav, .am-bs-chead, .am-bs-mini-lbl, .am-bs-mcta { display: none; }
.am-bs-panel-in {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  background: var(--am-bs-white);
  border: 1px solid var(--am-bs-hair);
  transition: opacity var(--am-bs-enter) var(--am-bs-ease), transform var(--am-bs-enter) var(--am-bs-ease);
}
.am-bs-panel.is-entering .am-bs-panel-in { opacity: 0; transform: translateX(18px); transition: none; }

.am-bs-aside {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 40px;
  border-right: 1px solid var(--am-bs-rule);
}
.am-bs-kicker { font: 500 11px/1 var(--am-bs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--am-bs-muted); }
.am-bs-big {
  margin: 28px 0 24px;
  font: 500 168px/.8 var(--am-bs-sans); letter-spacing: -.055em;
  color: var(--am-bs-accent);
}
.am-bs-formal { font: 500 13px/1.3 var(--am-bs-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--am-bs-ink); }
.am-bs-mini { display: grid; grid-template-columns: repeat(12, 12px); gap: 3px; margin-top: auto; padding-top: 40px; }
.am-bs-mini i { display: block; height: 12px; background: var(--am-bs-rule); }
.am-bs-mini i.is-on { background: var(--am-bs-accent); }
.am-bs-mini i.is-past { background: var(--am-bs-accent-soft); }
.am-bs-weeks-txt { margin-top: 10px; font: 400 11px/1 var(--am-bs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--am-bs-muted); }

.am-bs-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 48px;
  align-content: start;
  padding: 40px 48px 40px !important;
  color: var(--am-bs-ink);
}
.am-bs-body > * { grid-column: 1 / -1; }
.am-bs-body h3 {
  margin: 0 0 16px; padding: 0;
  font: 600 36px/1.1 var(--am-bs-sans); letter-spacing: -.02em; color: var(--am-bs-ink);
  max-width: 20em;
}
.am-bs-body > p:first-of-type {
  margin: 0 0 40px; padding: 0;
  font: 400 18px/1.55 var(--am-bs-sans); color: var(--am-bs-muted); max-width: 40em;
}
.am-bs-body h4 {
  margin: 0 0 14px; padding: 0;
  font: 500 11px/1 var(--am-bs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--am-bs-ink);
}
.am-bs-body h4::before { content: "// "; color: var(--am-bs-accent); }
.am-bs-body h4:first-of-type { grid-column: 1; grid-row: 3; }
.am-bs-body > ul { grid-column: 1; grid-row: 4; }
.am-bs-body h4:last-of-type { grid-column: 2; grid-row: 3; }
.am-bs-body > p:last-of-type:not(:first-of-type) {
  grid-column: 2; grid-row: 4; align-self: start;
  margin: 0; padding: 14px 0 0; border-top: 1px solid var(--am-bs-rule);
  font: 400 16px/1.5 var(--am-bs-sans); color: var(--am-bs-ink);
}
.am-bs-body ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.am-bs-body li {
  position: relative; margin: 0; padding: 13px 0 13px 30px !important;
  border-top: 1px solid var(--am-bs-rule);
  font: 400 16px/1.4 var(--am-bs-sans); color: var(--am-bs-ink);
}
.am-bs-body li:last-child { border-bottom: 1px solid var(--am-bs-rule); }
.am-bs-body li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 14px;
  border: 1.5px solid var(--am-bs-accent); background: none;
}
.am-bs-body li::after {
  content: ""; position: absolute; left: 4.5px; top: 18.5px; width: 4px; height: 7px;
  border: solid var(--am-bs-accent); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.am-bs-body--after > p:first-of-type { margin-bottom: 32px; }
.am-bs-body--after h4,
.am-bs-body--after > p:last-of-type:not(:first-of-type) {
  grid-column: 1 / -1 !important; grid-row: auto !important;
  max-width: 520px; background: var(--am-bs-sand); border: 0;
}
.am-bs-body--after h4 { margin: 0; padding: 16px 16px 8px; }
.am-bs-body--after > p:last-of-type:not(:first-of-type) { padding: 0 16px 16px; }

.am-bs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 40px; grid-row: auto; }
.am-bs-next {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--am-bs-ink); color: var(--am-bs-white);
  border: 1px solid var(--am-bs-ink); border-radius: 0;
  font: 500 15px/1 var(--am-bs-sans); cursor: pointer;
  transition: background-color 160ms var(--am-bs-ease), border-color 160ms var(--am-bs-ease);
}
.am-bs-next:hover { background: var(--am-bs-accent); border-color: var(--am-bs-accent); }
.am-bs-cta {
  font: 500 15px/1 var(--am-bs-sans); color: var(--am-bs-ink);
  text-decoration: underline; text-decoration-color: var(--am-bs-accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  padding: 14px 0;
}
.am-bs-cta:hover { color: var(--am-bs-accent); }

/* ---------- Tablet: rail scrolls, panel stacks ---------- */
@media (max-width: 1100px) {
  .am-bs-section { padding: 96px 0 104px; }
  .am-bs-head { margin-bottom: 56px; }
  .am-bs-title { grid-column: 1 / -1; font-size: 44px; }
  .am-bs-intro { grid-column: 1 / span 9; }
  .am-bs-track {
    overflow-x: auto; overscroll-behavior-x: contain;
    margin: 0 -40px; padding: 0 40px;
    scrollbar-width: thin; scrollbar-color: var(--am-bs-hair) transparent;
  }
  .am-bs-track-in { min-width: 1000px; padding-right: 40px; }
  .am-bs-panel-in { grid-template-columns: 1fr; }
  .am-bs-aside {
    flex-direction: row; flex-wrap: wrap; align-items: flex-end; column-gap: 28px; row-gap: 12px;
    padding: 28px 32px; border-right: 0; border-bottom: 1px solid var(--am-bs-rule);
  }
  .am-bs-kicker { flex-basis: 100%; }
  .am-bs-big { margin: 8px 0 0; font-size: 96px; }
  .am-bs-formal { padding-bottom: 6px; }
  .am-bs-mini { margin: 0 0 0 auto; padding: 0 0 6px; }
  .am-bs-weeks-txt { display: none; }
  .am-bs-body { padding: 32px !important; column-gap: 32px; }
  .am-bs-body h3 { font-size: 30px; }
}

/* ---------- Mobile: its own layout, swipe cards, no auto-advance ---------- */
@media (max-width: 767px) {
  .am-bs-section { padding: 72px 0 80px; }
  .am-bs-wrap { padding: 0 20px; }
  .am-bs-head { margin-bottom: 40px; row-gap: 16px; }
  .am-bs-title { font-size: 34px; line-height: 1.06; letter-spacing: -.03em; }
  .am-bs-intro { grid-column: 1 / -1; font-size: 16px; }
  .am-bs-topbar, .am-bs-track { display: none !important; }

  /* nav: segmented bar + label + arrows */
  .am-bs-mnav { display: block; }
  .am-bs-segs { display: flex; gap: 4px; }
  .am-bs-seg {
    flex: 1 1 0; height: 32px; margin: 0; padding: 0;
    display: flex; align-items: center;
    background: none; border: 0; border-radius: 0; cursor: pointer;
  }
  .am-bs-seg i { display: block; width: 100%; height: 3px; background: var(--am-bs-rule); transition: background-color 300ms var(--am-bs-ease); }
  .am-bs-seg.is-done i { background: var(--am-bs-accent-soft); }
  .am-bs-seg.is-active i { background: var(--am-bs-accent); height: 4px; }
  .am-bs-seg--after { flex: .7 1 0; }
  .am-bs-seg--after i, .am-bs-seg--after.is-active i { height: 0; background: none; border-top: 3px dotted var(--am-bs-hair); }
  .am-bs-seg--after.is-active i { border-top-color: var(--am-bs-accent); }
  .am-bs-mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
  .am-bs-mtxt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .am-bs-mcount { font: 500 11px/1 var(--am-bs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--am-bs-accent); }
  .am-bs-mlabel { font: 600 20px/1.1 var(--am-bs-sans); letter-spacing: -.015em; color: var(--am-bs-ink); }
  .am-bs-arrows { display: flex; gap: 8px; flex: none; }
  .am-bs-arrow {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 0; background: transparent; color: var(--am-bs-ink);
    border: 1px solid var(--am-bs-hair); border-radius: 0; cursor: pointer;
  }
  .am-bs-arrow--next { background: var(--am-bs-ink); border-color: var(--am-bs-ink); color: var(--am-bs-white); }
  .am-bs-arrow[disabled] { opacity: .35; cursor: default; }

  /* card track: bleeds to the right screen edge, next card peeks 36px */
  .am-bs-viewport { overflow: hidden; margin: 20px -20px 0 0; }
  .am-bs .am-bs-stage {
    position: relative; display: flex; align-items: stretch; gap: 12px; margin: 0;
    transition: transform 360ms var(--am-bs-ease); touch-action: pan-y;
  }
  .am-bs.am-bs-ready .am-bs-panel,
  .am-bs.am-bs-ready .am-bs-panel.is-active { display: flex !important; flex: none; width: calc(100% - 48px); }
  .am-bs-panel-in {
    display: flex; flex-direction: column; flex: 1 1 auto;
    background: var(--am-bs-white); border: 1px solid var(--am-bs-rule);
    transition: border-color 300ms var(--am-bs-ease);
  }
  .am-bs-panel.is-active .am-bs-panel-in { border-color: var(--am-bs-hair); }
  .am-bs-panel.is-entering .am-bs-panel-in { opacity: 1; transform: none; }

  /* card header + number block */
  .am-bs-chead {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--am-bs-rule);
    font: 500 11px/1 var(--am-bs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--am-bs-muted);
  }
  .am-bs-aside {
    flex-direction: row; flex-wrap: wrap; align-items: flex-end;
    column-gap: 14px; row-gap: 0; padding: 24px 20px 0; border: 0;
  }
  .am-bs-kicker, .am-bs-weeks-txt { display: none; }
  .am-bs-big { margin: 0; font-size: 88px; line-height: .78; }
  .am-bs-formal { font-size: 11px; line-height: 1.35; padding: 0 0 2px; }
  .am-bs-mini { flex-basis: 100%; margin: 22px 0 0; padding: 0; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
  .am-bs-mini i { height: 6px; }
  .am-bs-mini-lbl {
    display: flex; flex-basis: 100%; justify-content: space-between; margin-top: 6px;
    font: 400 10px/1 var(--am-bs-mono); letter-spacing: .08em; color: var(--am-bs-faint);
  }

  /* card body: text, checklist, "your part" box pinned to the bottom */
  .am-bs-body { display: flex !important; flex-direction: column; flex: 1 1 auto; padding: 24px 20px 20px !important; }
  .am-bs-body h3 { font-size: 26px; line-height: 1.12; margin: 0 0 12px; }
  .am-bs-body > p:first-of-type { font-size: 16px; margin: 0 0 24px; }
  .am-bs-body h4:first-of-type { margin: 0 0 12px; }
  .am-bs-body > ul { margin: 0 0 20px !important; }
  .am-bs-body li { font-size: 15px; padding: 11px 0 11px 26px !important; }
  .am-bs-body li:last-child { border-bottom: 0; }
  .am-bs-body li::before { top: 14px; }
  .am-bs-body li::after { top: 16.5px; }
  .am-bs-body h4:last-of-type { margin: auto 0 0; padding: 16px 16px 8px; background: var(--am-bs-sand); max-width: none; }
  .am-bs-body > p:last-of-type:not(:first-of-type) {
    margin: 0; padding: 0 16px 16px; border: 0; background: var(--am-bs-sand);
    font-size: 15px; line-height: 1.45; max-width: none;
  }
  .am-bs-body--after > p:first-of-type { margin-bottom: 24px; }
  .am-bs-foot { display: none !important; }

  /* one CTA under the cards */
  .am-bs-mcta { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
  .am-bs-mcta-link {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 56px; padding: 0 20px;
    background: var(--am-bs-ink); color: var(--am-bs-white) !important; text-decoration: none;
    font: 500 16px/1 var(--am-bs-sans);
  }
  .am-bs-mhint { font: 400 11px/1.4 var(--am-bs-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--am-bs-muted); }
}

/* ---------- Reduced motion: nothing moves on its own ---------- */
@media (prefers-reduced-motion: reduce) {
  .am-bs *, .am-bs *::before, .am-bs *::after { transition: none !important; animation: none !important; }
  .am-bs-panel.is-entering .am-bs-panel-in { opacity: 1; transform: none; }
}

/* ---------- Scroll mode (desktop/tablet): compact so the whole block fits one screen,
   pinned under the site header while scrolling moves through the steps. ---------- */
@media (min-width: 768px) {
  .am-bs-scroll { position: relative; }
  .am-page .am-bs.et_pb_tabs { position: sticky; z-index: 2; background: var(--am-bs-paper) !important; }
  .am-bs-toggle { display: none !important; }
  .am-bs-step { padding: 16px 16px 14px 0; }
  .am-bs-stage { margin-top: 20px; }
  .am-bs-aside { padding: 28px 32px; }
  .am-bs-big { margin: 18px 0 16px; font-size: 120px; }
  .am-bs-mini { padding-top: 24px; }
  .am-bs-body { padding: 28px 36px !important; }
  .am-bs-body h3 { font-size: 28px; margin-bottom: 10px; }
  .am-bs-body > p:first-of-type { font-size: 16px; margin-bottom: 22px; }
  .am-bs-body li { padding: 9px 0 9px 30px !important; font-size: 15px; }
  .am-bs-body li::before { top: 12px; }
  .am-bs-body li::after { top: 14.5px; }
  .am-bs-foot { margin-top: 22px; }
  .am-bs-next { min-height: 42px; }
}

/* Desktop/tablet: the step name sits above the big number (kicker); no week label under rail steps. */
@media (min-width: 768px) {
  .am-bs-kicker { font: 500 13px/1.3 var(--am-bs-mono); letter-spacing: .1em; color: var(--am-bs-ink); }
  .am-bs-aside .am-bs-formal { display: none; }
}

/* ---------- Desktop: steps as a vertical list on the left of the card ----------
   (2026-10-25) One horizontal bar was too much: the rail moves next to the card,
   the 12-week Gantt goes (each card keeps its own week strip). */
@media (min-width: 1101px) {
  .am-bs.am-bs-ready {
    display: grid; grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 40px; align-items: start;
  }
  .am-bs.am-bs-ready > .et_pb_tabs_controls,
  .am-bs.am-bs-ready > .am-bs-topbar,
  .am-bs.am-bs-ready > .am-bs-mnav,
  .am-bs.am-bs-ready > .am-bs-mcta { grid-column: 1 / -1; }
  .am-bs.am-bs-ready > .am-bs-track { grid-column: 1; grid-row: 2; }
  .am-bs.am-bs-ready > .am-bs-viewport { grid-column: 2; grid-row: 2; }
  .am-bs.am-bs-ready .am-bs-stage { margin-top: 0; }
  .am-bs.am-bs-ready .am-bs-scale { display: none; }

  .am-bs.am-bs-ready .am-bs-rail { display: flex; flex-direction: column; }
  .am-bs.am-bs-ready .am-bs-step {
    grid-template-areas: "num label"; padding: 15px 0 15px 20px; row-gap: 0;
    border-bottom: 1px solid var(--am-bs-rule);
  }
  .am-bs.am-bs-ready .am-bs-step .am-bs-wk { display: none; }
  .am-bs.am-bs-ready .am-bs-label { font-size: 16px; }
  .am-bs.am-bs-ready .am-bs-bar { top: 0; bottom: 0; left: 0; right: auto; width: 2px; height: auto; background: var(--am-bs-rule); }
  .am-bs.am-bs-ready .am-bs-bar i { display: none; }
  .am-bs.am-bs-ready .am-bs-step.is-done .am-bs-bar { background: var(--am-bs-accent-soft); }
  .am-bs.am-bs-ready .am-bs-step.is-active .am-bs-bar { background: var(--am-bs-accent); }
  .am-bs.am-bs-ready .am-bs-step--after .am-bs-bar { border-top: 0; border-left: 2px dotted var(--am-bs-hair); width: 0; background: none; }
  .am-bs.am-bs-ready .am-bs-step--after.is-active .am-bs-bar { border-left-color: var(--am-bs-accent); }
  .am-bs.am-bs-ready .am-bs-aside { padding: 36px; }
  .am-bs.am-bs-ready .am-bs-big { font-size: 140px; }
}

/* (2026-10-25, follow-up) Keep the 12-week Gantt as a full-width bar on top;
   the step index sits left of the card and stretches to the card's height. */
@media (min-width: 1101px) {
  .am-bs.am-bs-ready > .am-bs-track,
  .am-bs.am-bs-ready .am-bs-track-in { display: contents; }
  .am-bs.am-bs-ready .am-bs-scale { display: grid; grid-column: 1 / -1; grid-row: 2; margin-bottom: 28px; }
  .am-bs.am-bs-ready .am-bs-rail { grid-column: 1; grid-row: 3; align-self: stretch; }
  .am-bs.am-bs-ready > .am-bs-viewport { grid-column: 2; grid-row: 3; }
  .am-bs.am-bs-ready .am-bs-step { flex: 1 1 0; align-items: center; align-content: center; min-height: 0; }
  .am-bs.am-bs-ready .am-bs-step:last-child { border-bottom: 0; }
}
@media (min-width: 1101px) {
  .am-bs.am-bs-ready .am-bs-step { padding-top: 6px; padding-bottom: 6px; }
}

/* One card size for every step: all panels share one grid cell (the tallest sets
   the height), only the active one is visible, and every card fills that height. */
@media (min-width: 768px) {
  .am-bs.am-bs-ready .am-bs-stage { display: grid; min-height: 0 !important; }
  .am-bs.am-bs-ready .am-bs-panel {
    display: block !important; grid-area: 1 / 1;
    visibility: hidden; pointer-events: none;
  }
  .am-bs.am-bs-ready .am-bs-panel.is-active { visibility: visible; pointer-events: auto; }
  .am-bs.am-bs-ready .am-bs-panel .am-bs-panel-in { height: 100%; }
}
@media (min-width: 768px) {
  .am-bs.am-bs-ready .am-bs-panel { display: flex !important; flex-direction: column; }
  .am-bs.am-bs-ready .am-bs-panel .am-bs-panel-in { flex: 1 1 auto; height: auto; }
}
@media (min-width: 768px) {
  .am-bs.am-bs-ready .am-bs-panel.is-active { display: flex !important; }
  .am-bs.am-bs-ready .am-bs-panel { align-self: stretch; padding-bottom: 0 !important; }
}
@media (min-width: 768px) {
  .am-bs.am-bs-ready .am-bs-panel,
  .am-bs.am-bs-ready .am-bs-panel.is-active { display: grid !important; grid-template-rows: minmax(0, 1fr); }
  .am-bs.am-bs-ready .am-bs-panel .am-bs-panel-in { align-self: stretch; height: auto; }
  .am-bs.am-bs-ready .am-bs-panel::after { display: none; }
}
@media (min-width: 768px) {
  .am-bs.am-bs-ready .am-bs-stage { align-items: stretch; }
  .am-bs.am-bs-ready .am-bs-panel { height: 100% !important; min-height: 100%; margin: 0 !important; }
}
/* No "Scroll to move through the steps" hint: scrolling is the only way through anyway. */
.am-bs .am-bs-status { display: none !important; }

/* Responsive fixes (audit 2026-10-26): Next step inside the card on phones, bigger segment targets. */
@media (max-width: 767px) {
  .am-bs-foot { display: flex !important; margin-top: 28px; }
  .am-bs-seg { min-height: 44px; }
}

/* ---------- Phones: compact cards that fit one screen (2026-10-26) ----------
   The step count already sits in the nav above, so the card header goes; the
   number, step name and week strip share one row; smaller type; slimmer list;
   one "Next step" link instead of the button pair. */
@media (max-width: 767px) {
  .am-bs-chead { display: none !important; }
  .am-bs-aside {
    display: grid !important; grid-template-columns: auto 1fr; align-items: center;
    column-gap: 14px; row-gap: 8px; padding: 18px 18px 0;
  }
  .am-bs-big { grid-row: 1 / span 2; font-size: 52px; line-height: .8; }
  .am-bs-formal { align-self: end; font-size: 11px; padding: 0; }
  .am-bs-mini { align-self: start; flex-basis: auto; margin: 0; }
  .am-bs-mini i { height: 4px; }
  .am-bs-mini-lbl { display: none; }
  .am-bs-body { padding: 16px 18px 18px !important; }
  .am-bs-body h3 { font-size: 21px; line-height: 1.15; margin: 0 0 8px; }
  .am-bs-body > p:first-of-type { font-size: 14.5px; line-height: 1.5; margin: 0 0 16px; }
  .am-bs-body h4:first-of-type { margin: 0 0 6px; font-size: 10.5px; }
  .am-bs-body > ul { margin: 0 0 14px !important; }
  .am-bs-body li { font-size: 14px; line-height: 1.35; padding: 6px 0 6px 24px !important; border-top: 0; }
  .am-bs-body li::before { top: 8px; width: 13px; height: 13px; }
  .am-bs-body li::after { top: 10.5px; left: 4.5px; }
  .am-bs-body h4:last-of-type { padding: 12px 14px 4px; font-size: 10.5px; }
  .am-bs-body > p:last-of-type:not(:first-of-type) { padding: 0 14px 12px; font-size: 14px; line-height: 1.4; }
  .am-bs-foot { margin-top: 14px !important; gap: 0; }
  .am-bs-foot .am-bs-cta { display: none; }
  .am-bs-next {
    min-height: 44px; padding: 0; background: none; color: var(--am-bs-ink); border: 0;
    font-size: 15px; text-decoration: underline; text-decoration-color: var(--am-bs-accent);
    text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  }
  .am-bs-next:hover { background: none; color: var(--am-bs-accent); }
  .am-bs-viewport { margin-top: 12px; }
}
@media (max-width: 767px) {
  .am-bs.am-bs-ready .am-bs-panel,
  .am-bs.am-bs-ready .am-bs-panel.is-active { width: calc(100% - 24px); }
  .am-bs-aside { padding: 16px 16px 0; }
  .am-bs-body { padding: 14px 16px 16px !important; }
  .am-bs-body > p:first-of-type { font-size: 14px; }
}
@media (max-width: 767px) {
  /* the arrows sit right above the card now, so no second Next inside it */
  .am-bs-foot { display: none !important; }
  .am-bs-big { font-size: 46px; }
}

/* ---------- Tablet (768-1100px): fit one screen (2026-10-26) ----------
   The rail keeps the step names only (each card has its own week strip),
   the number block becomes one slim row, tighter body. */
@media (min-width: 768px) and (max-width: 1100px) {
  .am-bs-topbar, .am-bs.am-bs-ready .am-bs-scale { display: none !important; }
  .am-bs-step { padding: 14px 14px 12px 0; row-gap: 0; }
  .am-bs-step .am-bs-wk { display: none; }
  .am-bs-label { font-size: 15px; }
  .am-bs-stage { margin-top: 14px; }
  .am-bs-aside { align-items: center; padding: 16px 28px; column-gap: 18px; }
  .am-bs-kicker { flex-basis: auto; order: 2; }
  .am-bs-big { order: 1; margin: 0; font-size: 56px; line-height: .8; }
  .am-bs-mini { order: 3; padding: 0; }
  .am-bs-body { padding: 22px 28px !important; }
  .am-bs-body h3 { font-size: 24px; }
  .am-bs-body > p:first-of-type { font-size: 15px; margin-bottom: 18px; }
  .am-bs-body li { padding: 7px 0 7px 28px !important; font-size: 14.5px; }
  .am-bs-body li::before { top: 9px; }
  .am-bs-body li::after { top: 11.5px; }
  .am-bs-foot { margin-top: 16px; }
}

/* Laptops with short screens (e.g. 1280x720): trim so the block still fits under the header. */
@media (min-width: 1101px) and (max-height: 820px) {
  .am-bs.am-bs-ready .am-bs-scale { margin-bottom: 10px; }
  .am-bs-gantt { padding: 6px 10px 6px 0; }
  .am-bs.am-bs-ready .am-bs-aside { padding: 28px; }
  .am-bs.am-bs-ready .am-bs-big { font-size: 112px; }
  .am-bs-body { padding: 24px 32px !important; }
  .am-bs-body h3 { font-size: 26px; }
  .am-bs-body > p:first-of-type { margin-bottom: 14px; font-size: 15px; }
  .am-bs-body li { padding: 6px 0 6px 30px !important; font-size: 14.5px; }
  .am-bs-body li::before { top: 10px; }
  .am-bs-body li::after { top: 12.5px; }
  .am-bs-foot { margin-top: 16px; }
}
