.alpine-treatment-builder {
  --atb-green: #07251e;
  --atb-teal: #214f48;
  --atb-sage: #24413b;
  --atb-tan: #eee7d8;
  --atb-cream: #fffdf8;
  --atb-border: #d7d0c2;
  --atb-copper: #a1603e;
  color: #05251f;
  font-family: inherit;
}

html body.alpine-treatment-builder-page {
  margin: 0 !important;
  padding: 0 !important;
}

body.alpine-treatment-builder-page .alpine-treatment-builder {
  margin: 0 !important;
  padding: 0 !important;
}

.alpine-treatment-builder * {
  box-sizing: border-box;
}

.atb-app {
  min-height: 100vh;
  background: var(--atb-tan);
}

.atb-loading,
.atb-error {
  border: 1px solid var(--atb-border);
  background: var(--atb-cream);
  color: var(--atb-sage);
  margin: 24px auto;
  max-width: 780px;
  padding: 24px;
  text-align: center;
}

.atb-header {
  background: var(--atb-green);
  color: #f5f0e6;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.atb-header-inner {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto 1fr;
  height: 64px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 18px;
}

.atb-header-side {
  color: #cfc5b4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.atb-header-right {
  text-align: right;
}

.atb-header a,
.atb-ghost {
  background: transparent;
  border: 0;
  color: #f5f0e6;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.atb-logo {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.16em;
  max-width: min(340px, 48vw);
  overflow: hidden;
  text-align: center;
  text-transform: uppercase;
}

.atb-logo img {
  display: block;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  width: auto;
}

.atb-welcome {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: 0.95fr 1.05fr;
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 64px);
  padding: 44px 18px;
}

.atb-eyebrow {
  color: #8b897f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.atb-welcome h1,
.atb-contact h1,
.atb-results h1 {
  color: #000;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.04;
  margin: 0;
}

.atb-lede {
  color: var(--atb-sage);
  font-size: 17px;
  line-height: 1.65;
  margin: 22px 0 0;
  max-width: 680px;
}

.atb-note {
  background: rgba(255, 253, 248, 0.72);
  border-left: 2px solid var(--atb-copper);
  color: var(--atb-sage);
  line-height: 1.6;
  margin: 22px 0 0;
  max-width: 680px;
  padding: 13px 16px;
}

.atb-steps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin: 30px 0;
}

.atb-step {
  background: var(--atb-cream);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  padding: 16px;
}

.atb-step span {
  color: var(--atb-copper);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.atb-step p {
  color: #05251f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin: 12px 0 0;
}

.atb-primary {
  background: var(--atb-green);
  border: 0;
  border-radius: 6px;
  color: #f5f0e6;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 48px;
  padding: 13px 22px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.atb-primary:hover {
  background: #0b352b;
  transform: translateY(-1px);
}

.atb-primary:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.atb-full {
  width: 100%;
}

.atb-preview {
  align-items: center;
  background: var(--atb-cream);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.atb-preview::before {
  background: var(--atb-green);
  content: "";
  height: 64px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.atb-preview img {
  display: block;
  max-height: 520px;
  max-width: 86%;
  object-fit: contain;
  position: relative;
}

.atb-builder {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px 18px;
}

.atb-workspace {
  min-width: 0;
}

.atb-toolbar {
  align-items: center;
  background: var(--atb-cream);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px;
}

.atb-segment {
  background: #f6f0e4;
  border-radius: 6px;
  display: flex;
  gap: 4px;
  padding: 4px;
}

.atb-segment button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #52635e;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 14px;
}

.atb-segment button.is-active {
  background: var(--atb-green);
  color: #f5f0e6;
}

.atb-map-panel {
  background: var(--atb-cream);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1fr);
  padding: 16px;
}

.atb-map {
  align-items: center;
  background: #fbf6ec;
  border: 1px solid #eee7d8;
  border-radius: 6px;
  display: flex;
  height: 610px;
  justify-content: center;
  overflow: visible;
  position: relative;
}

.atb-map > img {
  display: block;
  max-height: 94%;
  max-width: 90%;
  object-fit: contain;
}

.atb-hotspot {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  height: 32px;
  justify-items: center;
  padding: 0;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
}

.atb-hotspot span {
  background: var(--atb-teal);
  border: 3px solid #f5f0e6;
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(33, 79, 72, 0.18);
  display: block;
  height: 18px;
  width: 18px;
}

.atb-hotspot strong {
  background: rgba(7, 37, 30, 0.92);
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  left: 50%;
  opacity: 0;
  padding: 5px 8px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.atb-hotspot:hover strong,
.atb-hotspot:focus strong {
  opacity: 1;
}

.atb-concern-panel,
.atb-selection-panel {
  background: var(--atb-cream);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  padding: 18px;
}

.atb-empty-panel {
  align-items: center;
  border-style: dashed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  text-align: center;
}

.atb-concern-panel h2,
.atb-selection-panel h2,
.atb-result-group h2 {
  color: #000;
  font-size: 25px;
  line-height: 1.14;
  margin: 0 0 10px;
}

.atb-concern-panel p,
.atb-empty-panel p {
  color: #52635e;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.atb-text-button,
.atb-area-list button,
.atb-selection-head button,
.atb-selection-item button,
.atb-results-actions button,
.atb-overlay-bar button {
  background: transparent;
  border: 0;
  color: #52635e;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.atb-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.atb-area-list button {
  background: #fff;
  border: 1px solid var(--atb-border);
  border-radius: 999px;
  color: #05251f;
  padding: 8px 12px;
  text-decoration: none;
}

.atb-concern-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.atb-concern {
  align-items: center;
  background: #fff;
  border: 1px solid var(--atb-border);
  border-radius: 999px;
  color: #05251f;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.3;
  min-height: 44px;
  padding: 10px 13px;
}

.atb-concern.is-checked {
  background: #f6f0e4;
  border-color: var(--atb-copper);
}

.atb-concern.is-added {
  background: #f7f4ed;
  color: #8b897f;
}

.atb-selection-panel {
  align-self: start;
  position: sticky;
  top: 88px;
}

.atb-selection-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.atb-selection-head h2 {
  font-size: 19px;
  margin: 0;
}

.atb-empty-selection {
  background: #f7f4ed;
  border: 1px dashed var(--atb-border);
  border-radius: 6px;
  color: #52635e;
  font-size: 14px;
  margin: 16px 0;
  padding: 16px;
}

.atb-empty-selection p {
  margin: 6px 0 0;
}

.atb-selection-list {
  max-height: 50vh;
  margin: 16px 0;
  overflow: auto;
  padding-right: 4px;
}

.atb-selection-list h3 {
  font-size: 14px;
  margin: 16px 0 8px;
}

.atb-selection-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 10px;
}

.atb-selection-item span {
  font-size: 14px;
}

.atb-selection-item button {
  font-size: 12px;
}

.atb-contact {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 48px 18px;
}

.atb-contact-inner {
  max-width: 390px;
  text-align: center;
  width: 100%;
}

.atb-contact h1 {
  font-size: 28px;
}

.atb-contact p {
  color: var(--atb-sage);
  line-height: 1.65;
  margin: 18px 0 0;
}

.atb-contact form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  text-align: left;
}

.atb-field {
  color: #000;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 7px;
}

.atb-field input {
  background: #fff;
  border: 1px solid #9da5a0;
  border-radius: 0;
  color: #05251f;
  font: inherit;
  font-size: 16px;
  min-height: 56px;
  padding: 0 14px;
  width: 100%;
}

.atb-check {
  align-items: flex-start;
  color: #05251f;
  display: flex;
  font-size: 12px;
  gap: 10px;
  line-height: 1.45;
}

.atb-honey {
  display: none !important;
}

.atb-form-error {
  background: #fff1f2;
  border-radius: 6px;
  color: #9f1239;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
}

.atb-results {
  margin: 0 auto;
  max-width: 1180px;
  padding: 48px 18px 72px;
}

.atb-results-head {
  margin: 0 auto;
  max-width: 760px;
  position: relative;
  text-align: center;
}

.atb-results-head h1 {
  font-size: clamp(34px, 6vw, 52px);
}

.atb-results-head p {
  color: var(--atb-sage);
  line-height: 1.65;
}

.atb-results-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.atb-result-groups {
  display: grid;
  gap: 38px;
  margin-top: 48px;
}

.atb-result-group {
  border-bottom: 1px solid var(--atb-border);
  display: grid;
  gap: 24px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding-bottom: 38px;
}

.atb-result-group aside p {
  color: var(--atb-sage);
  font-size: 14px;
  line-height: 1.55;
}

.atb-treatment-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.atb-treatment-card {
  background: var(--atb-cream);
  border: 1px solid #bdb9ae;
  border-radius: 6px;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex: 0 0 270px;
  flex-direction: column;
  min-height: 360px;
  padding: 20px;
  text-align: left;
}

.atb-treatment-card span {
  align-self: flex-start;
  background: #f6f0e4;
  border: 1px solid #c9c0ae;
  border-radius: 999px;
  color: #52635e;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 4px 12px;
}

.atb-treatment-card h3 {
  color: #000;
  font-size: 19px;
  line-height: 1.18;
  margin: 0;
}

.atb-treatment-card p {
  color: var(--atb-sage);
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  margin: 18px 0;
}

.atb-treatment-card strong {
  color: var(--atb-sage);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.atb-no-results {
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--atb-border);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
}

.atb-overlay {
  background: rgba(0, 0, 0, 0.62);
  bottom: 0;
  left: 0;
  overflow: auto;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.atb-overlay-close {
  align-items: center;
  background: #fff;
  border: 1px solid #ded8ca;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  color: #05251f;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  font-weight: 400;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 4px;
  position: fixed;
  right: 22px;
  top: 22px;
  width: 44px;
  z-index: 70;
}

.atb-overlay-close:hover {
  background: #f6f0e4;
}

.atb-overlay-bar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #ded8ca;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  min-height: 56px;
  padding: 0 18px;
  position: sticky;
  top: 0;
}

.atb-overlay-body {
  background: #fff;
  margin: 32px auto;
  max-width: 980px;
  padding: 44px;
}

.atb-overlay-body h2 {
  color: #000;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  margin: 0;
}

.atb-overlay-body p {
  color: #05251f;
  font-size: 16px;
  line-height: 1.7;
  margin: 28px 0;
}

.atb-overlay-body h3 {
  color: #000;
  font-size: 24px;
  line-height: 1.24;
  margin: 38px 0 16px;
}

.atb-overlay-body h3 span {
  color: var(--atb-copper);
}

.atb-additional {
  display: grid;
  gap: 0 32px;
  grid-template-columns: repeat(3, 1fr);
}

.atb-additional div {
  border-bottom: 1px solid #aeb1ad;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 0;
}

@media (max-width: 980px) {
  .atb-welcome,
  .atb-builder,
  .atb-map-panel,
  .atb-result-group {
    grid-template-columns: 1fr;
  }

  .atb-selection-panel {
    position: static;
  }

  .atb-preview {
    min-height: 430px;
  }

  .atb-map {
    height: 560px;
  }
}

@media (max-width: 640px) {
  .atb-header-inner {
    grid-template-columns: auto 1fr auto;
    padding: 0 12px;
  }

  .atb-header-side span {
    display: none;
  }

  .atb-logo {
    letter-spacing: 0.08em;
    max-width: 50vw;
  }

  .atb-welcome {
    gap: 28px;
    padding: 30px 14px;
  }

  .atb-steps,
  .atb-concern-grid,
  .atb-additional {
    grid-template-columns: 1fr;
  }

  .atb-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .atb-segment {
    overflow-x: auto;
  }

  .atb-map {
    height: 500px;
  }

  .atb-hotspot strong {
    display: none;
  }

  .atb-results-actions {
    justify-content: center;
  }

  .atb-overlay-body {
    margin: 0;
    min-height: calc(100vh - 56px);
    padding: 28px 18px;
  }
}

@media print {
  .atb-header,
  .atb-results-actions,
  .atb-overlay {
    display: none !important;
  }

  .atb-app,
  .atb-results {
    background: #fff;
    padding: 0;
  }

  .atb-treatment-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .atb-treatment-card {
    min-height: auto;
  }
}
