/* Page-only styles for /solar-business-automation-software/ (prefix sba-). Concept: every automation is a recipe of
   WHEN (amber) -> IF (blue) -> THEN (green) -> CHECK (navy); the same four colours run through the strip, tabs and labels. */

.sba { --sba-when: #B45309; --sba-when-bg: #FEF3E2; --sba-if: #236EB4; --sba-if-bg: #EEF4FB; --sba-then: #2B7A0B; --sba-then-bg: #EDF7E6;
  --sba-check: #0F2742; --sba-check-bg: #E8EDF4; }

/* hero art */
.sba-hero__art { position: relative; }
.sba-hero__art::before { content: ""; position: absolute; inset: -14px -14px 14px 14px; border-radius: 28px; background: linear-gradient(135deg, #FDE7B4, #DCEBD2);
  z-index: -1; }
.sba-art { box-shadow: 0 30px 70px -40px rgba(15, 39, 66, .55); border: 1px solid #F1E3C8; }

/* recipe strip under the hero */
.sba-recipe-strip { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.sba-recipe-strip li { position: relative; display: grid; gap: 4px; padding: 16px 18px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  border-top: 5px solid var(--c, var(--sba-when)); box-shadow: 0 14px 30px -26px rgba(15, 39, 66, .5); }
.sba-recipe-strip li:nth-child(1) { --c: var(--sba-when); --cb: var(--sba-when-bg); }
.sba-recipe-strip li:nth-child(2) { --c: var(--sba-if); --cb: var(--sba-if-bg); }
.sba-recipe-strip li:nth-child(3) { --c: var(--sba-then); --cb: var(--sba-then-bg); }
.sba-recipe-strip li:nth-child(4) { --c: var(--sba-check); --cb: var(--sba-check-bg); }
.sba-recipe-strip li:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 50%; width: 10px; height: 10px; z-index: 1;
  border-top: 2.5px solid #94A3B8; border-right: 2.5px solid #94A3B8; transform: translateY(-50%) rotate(45deg); }
.sba-recipe-strip i { justify-self: start; font: 800 11.5px/1 var(--font-ui); letter-spacing: .12em; font-style: normal; color: var(--c); background: var(--cb);
  padding: 6px 9px; border-radius: 999px; }
.sba-recipe-strip b { font: 700 16.5px/1.3 var(--font-ui); color: var(--ink); margin-top: 4px; }
.sba-recipe-strip span { font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* where to start: symptom tabs */
.sba-sym { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 24px; align-items: start; }
.sba-sym__tabs { display: grid; gap: 10px; }
.sba-sym__tabs button { -webkit-appearance: none; appearance: none; position: relative; display: grid; gap: 2px; text-align: left; width: 100%; min-height: 64px;
  padding: 14px 44px 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: var(--ink);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; }
.sba-sym__tabs button b { font: 700 16px/1.3 var(--font-ui); }
.sba-sym__tabs button small { font: 500 13.5px/1.35 var(--font-ui); color: var(--muted); }
.sba-sym__tabs button::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-top: 2px solid #94A3B8; border-right: 2px solid #94A3B8;
  transform: translateY(-50%) rotate(45deg); transition: border-color .2s, right .2s; }
.sba-sym__tabs button:hover { border-color: #F1C98B; }
.sba-sym__tabs button[aria-selected="true"] { border-color: var(--sba-when); background: var(--sba-when-bg); transform: translateX(6px);
  box-shadow: 0 14px 28px -20px rgba(146, 64, 14, .55); }
.sba-sym__tabs button[aria-selected="true"]::after { border-color: var(--sba-when); right: 14px; }
.sba-sym__tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sba-sym__panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; box-shadow: 0 24px 48px -36px rgba(15, 39, 66, .5);
  border-top: 5px solid var(--sba-when); }
.sba-sym__panel h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.sba-sym__panel > p { margin: 0 0 16px; }
.sba-sym__meta { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sba-sym__meta li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.45; }
.sba-sym__meta b { font: 800 11.5px/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--sba-when); }
.sba-sym__meta li:nth-child(2) b { color: var(--sba-if); }
.sba-sym__meta li:nth-child(3) b { color: #B91C1C; }
.sba-sym__go { margin: 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 15px; color: var(--muted); }
.sba-sym__go a { font-weight: 600; }

/* recipe library */
.sba-lib__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sba-lib__tabs button { -webkit-appearance: none; appearance: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font: 600 15px/1.2 var(--font-ui); color: var(--ink); transition: background .2s, border-color .2s, color .2s; }
.sba-lib__tabs button:hover { border-color: var(--blue); color: var(--blue); }
.sba-lib__tabs button[aria-selected="true"] { background: var(--sba-check); border-color: var(--sba-check); color: #fff; }
.sba-lib__tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sba-lib__panel:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sba-rec { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; transition: transform .2s, box-shadow .2s; }
.sba-rec:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -26px rgba(15, 39, 66, .55); }
.sba-rec__k { margin: 0; font: 800 11.5px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--sba-when); }
.sba-rec h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; }
.sba-rec p { margin: 0; font-size: 15px; line-height: 1.5; }
.sba-rec p b { display: block; font: 800 11.5px/1.4 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--sba-then); }
.sba-rec p:nth-of-type(3) b { color: var(--sba-check); }
.sba-rec .sba-lab { margin-top: auto; align-self: flex-start; }
.sba-lab { display: inline-block; padding: 5px 10px; border-radius: 999px; font: 700 12.5px/1.2 var(--font-ui); }
.sba-lab--native { background: var(--sba-then-bg); color: #1F5A08; }
.sba-lab--config { background: var(--sba-if-bg); color: #1E4F80; }
.sba-lab--custom { background: var(--sba-when-bg); color: #92400E; }

/* toolbox flips */
.sba-flip__k { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.2 var(--font-ui); background: var(--sba-then-bg); color: #1F5A08; }
.sba-flips .k-flip:nth-child(2) .sba-flip__k, .sba-flips .k-flip:nth-child(5) .sba-flip__k { background: var(--sba-if-bg); color: #1E4F80; }
.sba-flips .k-flip:nth-child(4) .sba-flip__k { background: var(--sba-when-bg); color: #92400E; }
.sba-flips .k-flip__front b { font: 700 19px/1.3 var(--font-ui); color: var(--ink); }
.sba-flip__who { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* boundary lanes */
.sba-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sba-lane { border-radius: 16px; padding: 22px; border: 1px solid var(--line); background: #fff; border-top: 5px solid var(--sba-then); }
.sba-lane h3 { margin: 0 0 12px; font-size: 19px; }
.sba-lane ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sba-lane li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; }
.sba-lane li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center;
  background: var(--sba-then-bg); color: #1F5A08; font: 800 11px/1 var(--font-ui); }
.sba-lane--c { border-top-color: var(--sba-when); }
.sba-lane--c li::before { content: "{ }"; background: var(--sba-when-bg); color: #92400E; font-size: 9px; }
.sba-lane--o { border-top-color: #94A3B8; background: var(--paper); }
.sba-lane--o li::before { content: "↗"; background: #E2E8F0; color: #475569; }
.sba-callout { margin: 20px 0 0; padding: 16px 18px; border-left: 4px solid var(--sba-when); background: var(--sba-when-bg); border-radius: 0 12px 12px 0;
  font-size: 15px; line-height: 1.55; color: var(--ink); }
.sba-callout b { color: #92400E; }

/* shared bits */
.sba-note { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.sba-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.sba-split .sec__head { position: sticky; top: 100px; margin-bottom: 0; }
.sba-ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.sba-ticks li { position: relative; padding-left: 28px; font: 500 15px/1.5 var(--font-ui); color: var(--ink); }
.sba-ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  background: var(--sba-then-bg); color: #1F5A08; font: 800 12px/1 var(--font-ui); }

/* price table */
.sba-price table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  font: 500 15px/1.4 var(--font-ui); }
.sba-price th, .sba-price td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.sba-price thead th { background: var(--sba-check); color: #fff; font-size: 13px; letter-spacing: .04em; font-weight: 700; }
.sba-price tbody th { font-weight: 600; color: var(--ink); }
.sba-price tbody td:nth-child(2) { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sba-price tbody td:last-child { color: var(--muted); white-space: nowrap; }
.sba-price tbody tr:last-child th, .sba-price tbody tr:last-child td { border-bottom: 0; }
.sba-price tbody tr:nth-child(even) { background: var(--paper); }

/* three offers */
.sba-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: sba-off; }
.sba-offer { position: relative; padding: 24px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sba-offer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--sba-when); }
.sba-offer:nth-child(2)::before { background: var(--sba-if); }
.sba-offer:nth-child(3)::before { background: var(--brand); }
.sba-offer__k { margin: 0 0 8px; font: 800 12px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sba-offer h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
.sba-offer p:last-child { margin: 0; font-size: 15px; line-height: 1.55; }

/* local cards */
.sba-local { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sba-local > div { padding: 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.sba-local > div:first-child { background: var(--sba-check); border-color: var(--sba-check); color: #CBD5E1; }
.sba-local > div:first-child h3 { color: #fff; }
.sba-local h3 { margin: 0 0 8px; font-size: 18px; }
.sba-local p { margin: 0; font-size: 15px; line-height: 1.55; }

@media (max-width: 1040px) {
  .sba-local { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sba-lib__panel:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sba-recipe-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sba-recipe-strip li:nth-child(2)::after { display: none; }
  .sba-sym, .sba-split { grid-template-columns: 1fr; gap: 20px; }
  .sba-split .sec__head { position: static; }
  .sba-sym__tabs { grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
  .sba-sym__tabs button { scroll-snap-align: start; }
  .sba-sym__tabs button[aria-selected="true"] { transform: none; }
  .sba-sym__tabs button::after { display: none; }
  .sba-lanes, .sba-offers { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sba-recipe-strip, .sba-lib__panel:not([hidden]), .sba-local, .sba-sym__meta { grid-template-columns: 1fr; }
  .sba-recipe-strip li::after { display: none; }
  .sba-sym__panel { padding: 20px 18px; }
  .sba-sym__panel h3 { font-size: 19px; }
  .sba-hero__art::before { inset: -8px -8px 8px 8px; }
  .sba-price th, .sba-price td { padding: 11px 12px; }
  .sba-price tbody td:last-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .sba-sym__tabs button, .sba-rec, .sba-lib__tabs button { transition: none; }
  .sba-sym__tabs button[aria-selected="true"], .sba-rec:hover { transform: none; }
}
