/* ============================================================= */
/* Section: 03-services */
/* ============================================================= */
/* ===== Our Auto Injury and No-Fault Billing Services — Figma node 12183:514 (1440 x 1124) =====
   Header 12183:525, tabs 12183:544, panels 12183:594 / 4455 / 4644 / 4834.
   Tabs: script-v2.js [data-bh-tabs]; panel entrance replays on every switch (.is-active re-added,
   .is-switched drops the reveal delay). Phones: the tab strip is display: contents, which turns
   it into an accordion (script-v2.js checks for that). */
.ai-services {
  position: relative;
  overflow: hidden;
  background: #fff;
}

/* ---------- Decorative art (12183:515–524) ---------- */
.ai-services-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-services-ring {
  position: absolute;
  border-radius: 50%;
}

.ai-services-ring--lg {
  left: -180px;
  top: -220px;
  width: 560px;
  height: 560px;
  border: 1px solid #dce3f2;
}

.ai-services-ring--dash {
  left: -120px;
  top: -160px;
  width: 440px;
  height: 440px;
  border: 1px dashed #e1e7f4;
}

.ai-services-ring--br {
  right: -60px;
  bottom: -59.72px;
  width: 300px;
  height: 300px;
  border: 1px solid #dce3f2;
}

.ai-services-dot {
  position: absolute;
  border-radius: 50%;
}

.ai-services-dot--orange {
  left: 88px;
  top: 62px;
  width: 12px;
  height: 12px;
  background: var(--ai-orange);
}

.ai-services-dot--sm {
  left: 236px;
  top: 212px;
  width: 8px;
  height: 8px;
  background: var(--ai-blue);
  opacity: 0.55;
}

.ai-services-dot--blue {
  left: 30px;
  top: 268px;
  width: 16px;
  height: 16px;
  background: var(--ai-blue);
}

.ai-services-glow {
  position: absolute;
  right: -140px;
  top: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(227, 233, 248, 0.2) 0%, rgba(227, 233, 248, 0) 70%);
}

.ai-services-tile {
  position: absolute;
  right: 120px;
  top: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  filter: drop-shadow(0 14px 15px rgba(39, 55, 117, 0.1));
  rotate: -8deg;
}

.ai-services-tile img {
  display: block;
  width: 30.0012px;
  height: 30.0012px;
}

/* ---------- Header (12183:525) ---------- */
.ai-services .ai-container {
  z-index: 1;
}

.ai-services-accent {
  color: var(--ai-orange);
}

.ai-services-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 21px;
  text-align: center;
}

.ai-services .ai-services-title {
  color: var(--ai-blue);
  font-size: 32px;
  font-weight: 700;
  line-height: 45px;
  letter-spacing: -0.8px;
}

.ai-services-rule {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.ai-services-rule > span {
  display: block;
  height: 4px;
  border-radius: 4px;
  transform-origin: left center;
}

.ai-services-rule > span:first-child {
  width: 44px;
  background: var(--ai-orange);
}

.ai-services-rule > span:last-child {
  width: 12px;
  background: var(--ai-blue);
}

.ai-services .ai-services-lead {
  max-width: 900px;
  margin-top: 18.75px;
  padding: 0 3.27px 0 3.25px;
  color: var(--ai-text);
  font-size: 16px;
  line-height: 29.75px;
}

/* ---------- Tabs + panel (12183:543) ---------- */
.ai-services-main {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 56px;
}

.ai-services-tabs {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 0 0 380px;
  width: 380px;
}

.ai-services .ai-services-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 51.75px 22px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(39, 55, 117, 0.05);
  color: var(--ai-blue);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform 0.3s var(--ai-ease), box-shadow 0.3s var(--ai-ease), background-color 0.3s, border-color 0.3s;
}

.ai-services-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 17.41px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--ai-orange);
  opacity: 0;
  transition: opacity 0.3s;
}

.ai-services .ai-services-tab:hover {
  border-color: #d6def0;
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(39, 55, 117, 0.1);
}

.ai-services-tab:focus-visible {
  outline: 2px solid var(--ai-orange);
  outline-offset: 3px;
}

.ai-services .ai-services-tab.is-active {
  border-color: #d9e1f4;
  background: #eff2ff;
  box-shadow: 0 16px 34px rgba(39, 55, 117, 0.12);
}

.ai-services-tab.is-active::before {
  opacity: 1;
  animation: ai-services-grow-y 0.45s var(--ai-ease) backwards;
}

.ai-services-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  filter: drop-shadow(0 8px 10px rgba(39, 55, 117, 0.1));
  transition: scale 0.3s var(--ai-ease);
}

.ai-services-tab-icon img {
  display: block;
  width: 30px;
  height: 30px;
}

.ai-services-tab:hover .ai-services-tab-icon {
  scale: 1.06;
}

.ai-services-tab-label {
  flex: 0 0 204px;
  width: 204px;
  padding-bottom: 0.69px;
  color: var(--ai-blue);
  font-size: 17px;
  font-weight: 600;
  line-height: 23.8px;
}

/* Figma lets "Payment Reconciliation" run 7px past the 204px label box (12183:579). */
.ai-services-tab-label--wide {
  flex-basis: 211px;
  width: 211px;
  margin-right: -7px;
}

.ai-services-tab-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  filter: drop-shadow(0 4px 6px rgba(39, 55, 117, 0.1));
  transition: background-color 0.3s, translate 0.3s var(--ai-ease);
}

.ai-services-tab-arrow img {
  display: block;
  width: 14px;
  height: 14px;
}

.ai-services-tab-arrow-on,
.ai-services-tab.is-active .ai-services-tab-arrow-off {
  display: none !important;
}

.ai-services-tab.is-active .ai-services-tab-arrow-on {
  display: block !important;
}

.ai-services-tab.is-active .ai-services-tab-arrow {
  background: var(--ai-blue);
}

.ai-services-tab:hover .ai-services-tab-arrow {
  translate: 3px 0;
}

/* Panel card (12183:594) */
.ai-services-panel {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 33px;
  min-width: 0;
  padding: 28px 20px 36px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(39, 55, 117, 0.08);
}

.ai-services-panel[hidden] {
  display: none;
}

.ai-services-panel:focus-visible {
  outline: 2px solid var(--ai-orange);
  outline-offset: 3px;
}

.ai-services-panel-blob {
  position: absolute;
  right: -30px;
  bottom: -29.96px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: #f3f6fc;
  pointer-events: none;
}

.ai-services-doc {
  position: absolute;
  right: 34px;
  bottom: 34.04px;
  width: 110px;
  height: 136px;
  border: 1px solid #e1e7f4;
  border-radius: 14px;
  background: #fff;
  filter: drop-shadow(0 14px 15px rgba(39, 55, 117, 0.1));
  rotate: 6deg;
  pointer-events: none;
}

.ai-services-doc > span {
  position: absolute;
  left: 14px;
  border-radius: 4px;
}

.ai-services-doc-bar {
  top: 18px;
  width: 40px;
  height: 6px;
  background: var(--ai-blue);
  opacity: 0.8;
}

.ai-services-doc-line {
  height: 5px;
  background: #e1e7f4;
}

.ai-services-doc-line:nth-child(2) { top: 33px; width: 72px; }
.ai-services-doc-line:nth-child(3) { top: 47px; width: 60px; }
.ai-services-doc-line:nth-child(4) { top: 61px; width: 66px; }

.ai-services-doc > .ai-services-doc-badge {
  left: 60px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ai-orange);
}

.ai-services-doc-badge img {
  display: block;
  width: 17.9985px;
  height: 17.9985px;
}

/* Status strip (12186:620): four steps + status box */
.ai-services-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  height: 212px;
  padding: 16px;
  border: 1px solid #e6eaf5;
  border-radius: 20px;
  background: #fff;
  filter: drop-shadow(0 14px 17px rgba(39, 55, 117, 0.07));
}

.ai-services-steps {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  align-self: stretch;
  min-width: 0;
}

.ai-services-step {
  display: flex;
  flex: 0 0 126.25px;
  flex-direction: column;
  align-items: center;
  height: 153.59px;
  border-right: 1px solid #eff2ff;
}

.ai-services-step:last-child {
  flex-basis: 125.25px;
  border-right: 0;
}

.ai-services-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #eff2ff;
  transition: scale 0.3s var(--ai-ease);
}

.ai-services-step-icon img {
  display: block;
  width: 32px;
  height: 32px;
}

.ai-services-step:hover .ai-services-step-icon {
  scale: 1.08;
}

.ai-services-step-label {
  margin-top: 8.9px;
  padding-bottom: 0.69px;
  color: var(--ai-blue);
  font-size: 14px;
  font-weight: 500;
  line-height: 20.8px;
  text-align: center;
  white-space: nowrap;
}

.ai-services-step-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10.41px;
  padding: 1px 0;
  color: var(--ai-blue);
  font-size: 17px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
}

.ai-services-step-dot {
  display: block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
}

.ai-services-summary {
  display: flex;
  flex: 0 0 250px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 250px;
  height: 100%;
  padding: 22px;
  border-radius: 14px;
  background: #eff2ff;
}

.ai-services .ai-services-summary-kicker {
  padding-bottom: 1px;
  color: var(--ai-orange);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ai-services .ai-services-summary-title {
  color: var(--ai-blue);
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.ai-services .ai-services-summary-text {
  color: var(--ai-text);
  font-size: 16px;
  line-height: 24px;
}

/* Detail copy (12183:658) */
.ai-services-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.ai-services .ai-services-body-title {
  color: var(--ai-blue);
  font-size: 28px;
  font-weight: 700;
  line-height: 36.4px;
  letter-spacing: -0.3px;
}

.ai-services .ai-services-body-text {
  padding-bottom: 8px;
  color: var(--ai-text);
  font-size: 16px;
  line-height: 28px;
}

/* Callout pill: full width on tabs 2–4, hugging its text on tab 1 (as in Figma). */
.ai-services .ai-services-note {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 22px 12px 12px;
  border: 1px solid #dde4f4;
  border-radius: 999px;
  background: #eff2ff;
}

.ai-services .ai-services-note--fit {
  width: fit-content;
  max-width: 100%;
}

.ai-services-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ai-orange);
}

.ai-services-note-icon img {
  display: block;
  width: 18px;
  height: 18px;
}

.ai-services-note-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ai-blue);
  font-size: 15px;
  font-weight: 600;
  line-height: 21.75px;
}

.ai-services .ai-services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 10px 0 20px;
}

.ai-services-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ai-text);
  font-size: 16px;
  line-height: 24px;
}

.ai-services-list-item img {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.ai-services .ai-services-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 26px;
  border-radius: 999px;
  background: var(--ai-blue);
  filter: drop-shadow(0 14px 15px rgba(39, 55, 117, 0.28));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s var(--ai-ease), filter 0.3s;
}

.ai-services .ai-services-cta:hover,
.ai-services .ai-services-cta:focus-visible {
  background: #1c2858;
  color: #fff;
  transform: translateY(-3px);
  filter: drop-shadow(0 18px 18px rgba(39, 55, 117, 0.34));
}

.ai-services-cta:focus-visible {
  outline: 2px solid var(--ai-orange);
  outline-offset: 3px;
}

.ai-services-cta-icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.ai-services-cta-text {
  padding: 1px 0;
}

.ai-services-cta-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ai-orange);
  transition: translate 0.3s var(--ai-ease);
}

.ai-services-cta-arrow img {
  display: block;
  width: 16px;
  height: 16px;
}

.ai-services-cta:hover .ai-services-cta-arrow {
  translate: 4px 0;
}

/* ---------- Animation ---------- */
@keyframes ai-services-grow-x {
  from { scale: 0 1; }
  to   { scale: 1 1; }
}

@keyframes ai-services-grow-y {
  from { scale: 1 0; }
  to   { scale: 1 1; }
}

@keyframes ai-services-zoom {
  from { opacity: 0; scale: 0.6; }
  to   { opacity: 1; scale: 1; }
}

@keyframes ai-services-spin {
  to { rotate: 360deg; }
}

@keyframes ai-services-pulse {
  0%, 100% { scale: 1; }
  50%      { scale: 1.35; }
}

.ai-services.is-armed:not(.is-in) :is(
  .ai-services-head > *,
  .ai-services-ring,
  .ai-services-dot,
  .ai-services-glow,
  .ai-services-tile,
  .ai-services-tab,
  .ai-services-panel
) {
  opacity: 0;
}

.ai-services.is-in .ai-services-glow {
  animation: ai-fade 1.4s var(--ai-ease) backwards;
}

.ai-services.is-in .ai-services-ring--lg {
  animation: ai-services-zoom 1.2s var(--ai-ease) backwards;
}

.ai-services.is-in .ai-services-ring--dash {
  animation: ai-services-zoom 1.2s var(--ai-ease) 0.15s backwards, ai-services-spin 90s linear 1.4s infinite;
}

.ai-services.is-in .ai-services-ring--br {
  animation: ai-services-zoom 1.2s var(--ai-ease) 0.4s backwards;
}

.ai-services.is-in .ai-services-dot {
  animation: ai-pop 0.6s var(--ai-ease) 0.3s backwards, ai-services-pulse 3.2s ease-in-out 1.2s infinite;
}

.ai-services.is-in .ai-services-dot--sm { animation-delay: 0.45s, 1.6s; }
.ai-services.is-in .ai-services-dot--blue { animation-delay: 0.6s, 2s; }

.ai-services.is-in .ai-services-tile {
  animation: ai-pop 0.7s var(--ai-ease) 0.35s backwards, ai-float 5s ease-in-out 1.2s infinite;
}

.ai-services.is-in .ai-services-head > * {
  animation: ai-rise 0.7s var(--ai-ease) backwards;
}

.ai-services.is-in .ai-services-head > :nth-child(2) { animation-name: ai-fade; animation-delay: 0.15s; }
.ai-services.is-in .ai-services-head > :nth-child(3) { animation-delay: 0.25s; }

.ai-services.is-in .ai-services-rule > span {
  animation: ai-services-grow-x 0.6s var(--ai-ease) 0.3s backwards;
}

.ai-services.is-in .ai-services-rule > span:last-child {
  animation-delay: 0.45s;
}

.ai-services.is-in .ai-services-tab {
  animation: ai-slide-left 0.7s var(--ai-ease) 0.35s backwards;
}

.ai-services.is-in .ai-services-tab:nth-child(2) { animation-delay: 0.45s; }
.ai-services.is-in .ai-services-tab:nth-child(3) { animation-delay: 0.55s; }
.ai-services.is-in .ai-services-tab:nth-child(4) { animation-delay: 0.65s; }

.ai-services.is-in .ai-services-tab-icon img {
  animation: ai-pop 0.55s var(--ai-ease) 0.7s backwards;
}

/* Panel entrance: plays on reveal and again on every tab switch. */
.ai-services-panel {
  --ai-services-d: 0.55s;
}

.ai-services-panel.is-switched {
  --ai-services-d: 0s;
}

.ai-services.is-in .ai-services-panel.is-active {
  animation: ai-slide-right 0.8s var(--ai-ease) 0.35s backwards;
}

.ai-services.is-in .ai-services-panel.is-active.is-switched {
  animation: ai-fade 0.4s var(--ai-ease) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-status {
  animation: ai-rise 0.6s var(--ai-ease) var(--ai-services-d) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-step-icon {
  animation: ai-pop 0.55s var(--ai-ease) calc(var(--ai-services-d) + 0.15s + var(--i) * 0.08s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active :is(.ai-services-step-label, .ai-services-step-status) {
  animation: ai-fade 0.5s var(--ai-ease) calc(var(--ai-services-d) + 0.25s + var(--i) * 0.08s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-summary > * {
  animation: ai-slide-right 0.6s var(--ai-ease) calc(var(--ai-services-d) + 0.3s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-summary > :nth-child(2) { animation-delay: calc(var(--ai-services-d) + 0.38s); }
.ai-services.is-in .ai-services-panel.is-active .ai-services-summary > :nth-child(3) { animation-delay: calc(var(--ai-services-d) + 0.46s); }

.ai-services.is-in .ai-services-panel.is-active :is(.ai-services-body-title, .ai-services-body-text, .ai-services-note, .ai-services-cta) {
  animation: ai-rise 0.65s var(--ai-ease) calc(var(--ai-services-d) + 0.15s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-body-text { animation-delay: calc(var(--ai-services-d) + 0.25s); }
.ai-services.is-in .ai-services-panel.is-active .ai-services-note { animation-delay: calc(var(--ai-services-d) + 0.35s); }
.ai-services.is-in .ai-services-panel.is-active .ai-services-cta { animation-delay: calc(var(--ai-services-d) + 0.8s); }

.ai-services.is-in .ai-services-panel.is-active .ai-services-note-icon {
  animation: ai-pop 0.55s var(--ai-ease) calc(var(--ai-services-d) + 0.5s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-list-item {
  animation: ai-slide-left 0.55s var(--ai-ease) calc(var(--ai-services-d) + 0.45s + var(--i) * 0.08s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-list-item img {
  animation: ai-pop 0.5s var(--ai-ease) calc(var(--ai-services-d) + 0.55s + var(--i) * 0.08s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-panel-blob {
  animation: ai-services-zoom 0.9s var(--ai-ease) calc(var(--ai-services-d) + 0.3s) backwards;
}

.ai-services.is-in .ai-services-panel.is-active .ai-services-doc {
  animation: ai-rise 0.8s var(--ai-ease) calc(var(--ai-services-d) + 0.5s) backwards, ai-float 6s ease-in-out calc(var(--ai-services-d) + 1.4s) infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  /* The 1240 content column shrinks: let the status strip's steps share the space. */
  .ai-services-step,
  .ai-services-step:last-child {
    flex: 1 1 0;
    min-width: 0;
  }

  .ai-services-step-label {
    white-space: normal;
  }
}

@media (max-width: 1199px) {
  .ai-services-main {
    gap: 24px;
  }

  .ai-services-tabs {
    flex-basis: 320px;
    width: 320px;
  }

  .ai-services .ai-services-tab {
    gap: 14px;
    padding: 40px 18px;
  }

  .ai-services-tab-icon {
    width: 52px;
    height: 52px;
  }

  .ai-services-tab-label,
  .ai-services-tab-label--wide {
    flex: 1 1 auto;
    width: auto;
    margin-right: 0;
    font-size: 16px;
    line-height: 22px;
  }

  /* Status strip: steps on top, status box below. */
  .ai-services-status {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    height: auto;
    padding: 14px;
  }

  .ai-services-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
  }

  .ai-services-step {
    height: auto;
    padding: 0 4px;
  }

  .ai-services-step-icon {
    width: 56px;
    height: 56px;
  }

  .ai-services-step-icon img {
    width: 28px;
    height: 28px;
  }

  .ai-services-step-label {
    font-size: 13px;
    line-height: 19px;
  }

  .ai-services-step-status {
    gap: 6px;
    font-size: 15px;
    line-height: 22px;
  }

  .ai-services-summary {
    flex: none;
    width: 100%;
    height: auto;
    gap: 4px;
    padding: 16px 20px;
  }

  .ai-services-doc {
    display: none;
  }

  .ai-services .ai-services-body-title {
    font-size: 24px;
    line-height: 32px;
  }

  .ai-services-tile {
    right: 40px;
  }
}

@media (max-width: 991px) {
  .ai-services .ai-services-title {
    font-size: 30px;
    line-height: 40px;
  }

  .ai-services-main {
    flex-direction: column;
    align-items: stretch;
    margin-top: 40px;
  }

  .ai-services-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    flex: none;
    width: 100%;
  }

  .ai-services .ai-services-tab {
    padding: 20px 18px;
  }

  .ai-services-panel {
    flex: none;
    width: 100%;
  }

  .ai-services-tile,
  .ai-services-dot--sm {
    display: none;
  }

  /* Keep the dots clear of the (now wider-wrapping) header copy. */
  .ai-services-dot--orange {
    left: 24px;
    top: 16px;
  }

  .ai-services-ring--lg {
    width: 420px;
    height: 420px;
  }

  .ai-services-ring--dash {
    width: 320px;
    height: 320px;
  }
}

/* Mobile-only chip (hidden above phones). */
.ai-services-m {
  display: none;
}

/* ---------- Mobile — Figma node 12183:2795 (440 frame, 400px column) ----------
   Accordion: the tab strip is display: contents (script-v2.js checks for that), so every tab
   and panel is a flex item of .ai-services-main and `order` drops each panel under its tab.
   Header items 20px apart; 32px to the list; tabs / panel 14px apart. Figma strokes sit inside
   the boxes, so 1px borders take 1px off each 20px padding to keep content on Figma's x. */
@media (max-width: 767px) {
  /* Decor: two orbits and two dots only (12183:2796–2799). */
  .ai-services-glow,
  .ai-services-tile,
  .ai-services-ring--br,
  .ai-services-dot--sm,
  .ai-services-panel-blob,
  .ai-services-doc {
    display: none;
  }

  .ai-services-ring--lg {
    left: -205px;
    top: -155px;
    width: 360px;
    height: 360px;
  }

  .ai-services-ring--dash {
    left: -175px;
    top: -125px;
    width: 300px;
    height: 300px;
  }

  .ai-services-dot--orange {
    left: 28px;
    top: 21px;
    width: 8px;
    height: 8px;
  }

  .ai-services-dot--blue {
    left: 9px;
    top: 179px;
    width: 10px;
    height: 10px;
  }

  /* Header (12183:2800) */
  .ai-services-head {
    gap: 20px;
    padding-top: 0;
  }

  .ai-services .ai-services-m {
    display: inline-flex;
  }

  .ai-services-chip {
    order: -1;
    align-items: center;
    gap: 10px;
    padding: 8px 17px; /* 9 / 18 minus the 1px stroke */
    border: 1px solid #e1e7f4;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(39, 55, 117, 0.05);
    color: var(--ai-blue);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
  }

  .ai-services-chip img {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
  }

  .ai-services .ai-services-title {
    font-size: 24px;
    line-height: 35px;
    letter-spacing: -0.8px;
  }

  .ai-services-rule {
    margin-top: 0;
  }

  .ai-services .ai-services-lead {
    margin-top: 0;
    padding: 0;
    font-size: 14px;
    line-height: 28px;
  }

  /* Accordion list (12183:2812) */
  .ai-services-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
  }

  .ai-services-tabs {
    display: contents;
  }

  .ai-services-tab:nth-child(1)   { order: 0; }
  .ai-services-panel:nth-child(2) { order: 1; }
  .ai-services-tab:nth-child(2)   { order: 2; }
  .ai-services-panel:nth-child(3) { order: 3; }
  .ai-services-tab:nth-child(3)   { order: 4; }
  .ai-services-panel:nth-child(4) { order: 5; }
  .ai-services-tab:nth-child(4)   { order: 6; }
  .ai-services-panel:nth-child(5) { order: 7; }

  /* Service option (12183:2813 active, 12183:2916 idle) */
  .ai-services .ai-services-tab,
  .ai-services .ai-services-tab.is-active {
    gap: 16px;
    min-height: 96px;
    padding: 19px;
    border-radius: 18px;
    box-shadow: 0 8px 11px rgba(39, 55, 117, 0.05);
  }

  .ai-services .ai-services-tab.is-active {
    border-color: #eff2ff;
  }

  .ai-services .ai-services-tab:hover {
    transform: none;
    box-shadow: 0 8px 11px rgba(39, 55, 117, 0.05);
  }

  .ai-services-tab::before {
    top: 15px;
    bottom: 15px;
  }

  .ai-services-tab-icon {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 6.667px 8.333px rgba(39, 55, 117, 0.1));
  }

  .ai-services-tab-icon img {
    width: 25px;
    height: 25px;
  }

  .ai-services-tab-label,
  .ai-services-tab-label--wide {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
    padding-bottom: 0;
    font-size: 16px;
    line-height: 24px;
  }

  .ai-services-tab-arrow {
    width: 32px;
    height: 32px;
    filter: none;
    box-shadow: 0 8px 22px rgba(39, 55, 117, 0.05);
  }

  .ai-services-tab:hover .ai-services-tab-arrow {
    translate: none;
  }

  /* Panel (12183:2827): overview, description, callout, checks, button 24px apart. */
  .ai-services-panel {
    gap: 24px;
    padding: 19px;
    border-radius: 24px;
  }

  /* Billing readiness overview (12183:2828): two status rows + summary. */
  .ai-services-status {
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-color: #e5e7eb;
    border-radius: 18px;
    background: #fbfcff;
    filter: none;
  }

  .ai-services-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  /* Each row has a bottom rule; no rule between the two cells. */
  .ai-services-step,
  .ai-services-step:last-child {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e1e7f4;
  }

  .ai-services-step-icon {
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    background: #eff2ff;
  }

  .ai-services-step-icon img {
    width: 22px;
    height: 22px;
  }

  .ai-services-step-label {
    margin-top: 0;
    padding-bottom: 0;
    color: var(--ai-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-align: left;
    white-space: normal;
  }

  .ai-services-step-label br {
    display: none;
  }

  .ai-services-step-status {
    gap: 6px;
    height: 22px;
    margin-top: 0;
    padding: 0;
    font-size: 14px;
    line-height: 16px;
  }

  .ai-services-step-dot {
    width: 8px;
    height: 8px;
    background: #2dac46;
  }

  /* Clean claim readiness (12183:2874): 16px around the 22px-padded box. */
  .ai-services-summary {
    flex: none;
    gap: 6px;
    width: auto;
    height: auto;
    margin: 16px;
    padding: 22px;
  }

  .ai-services .ai-services-summary-kicker {
    padding-bottom: 1px;
    font-size: 14px;
  }

  .ai-services .ai-services-summary-title {
    font-size: 18px;
    line-height: 26px;
  }

  .ai-services .ai-services-summary-text {
    font-size: 16px;
    line-height: 24px;
  }

  /* Service description, callout, checks, button (12183:2886–2911). */
  .ai-services-body {
    gap: 24px;
  }

  .ai-services .ai-services-body-title {
    margin-bottom: -8px; /* 16px to the text */
    font-size: 24px;
    line-height: 33px;
    letter-spacing: 0;
  }

  .ai-services .ai-services-body-text {
    padding-bottom: 0;
    font-size: 14px;
    line-height: 28px;
  }

  .ai-services .ai-services-note,
  .ai-services .ai-services-note--fit {
    gap: 12px;
    width: 100%;
    padding: 13px;
    border-color: #eff2ff;
    border-radius: 20px;
  }

  .ai-services-note-text {
    font-size: 14px;
    line-height: 22px;
  }

  .ai-services .ai-services-list {
    gap: 14px;
    padding: 0;
  }

  .ai-services-list-item {
    align-items: center;
    gap: 14px;
    font-size: 14px;
    line-height: 24px;
  }

  .ai-services-list-item img {
    width: 20px;
    height: 20px;
  }

  /* Button (12183:2911): one line. The label keeps Figma's 14px while it fits and shrinks only
     as far as needed. Room for the text = 100vw - 40 (page gutters) - 40 (panel padding + border)
     - 90 (button padding, icon, gaps, arrow) - 2 (safety); 270 = label width at 14px. */
  .ai-services .ai-services-cta {
    gap: 10px;
    max-width: 100%;
    padding: 12px 10px 12px 16px;
    font-size: min(14px, calc((100vw - 172px) * 14 / 270));
    line-height: 21px;
    white-space: nowrap;
  }

  .ai-services-cta-icon {
    display: block;
    width: 20px;
    height: 20px;
  }

  .ai-services-cta-text {
    padding: 0;
  }

  .ai-services-cta-arrow {
    width: 24px;
    height: 24px;
  }

  .ai-services-cta-arrow img {
    width: 10.105px;
    height: 10.105px;
  }
}

/* Narrow phones: the 2-up status cells get tight below ~400px. */
@media (max-width: 399px) {
  .ai-services-step,
  .ai-services-step:last-child {
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 8px;
    padding: 12px 10px;
  }

  .ai-services-step-icon {
    width: 32px;
    height: 32px;
  }

  .ai-services-step-icon img {
    width: 20px;
    height: 20px;
  }

  .ai-services-step-status {
    font-size: 13px;
  }
}
