.sc-phone-status, .sc-phone-header {
  display: flex;
  align-items: center;
  background: #fcfcfa;
  color: #1c2622;
}

.sc-phone-status {
  justify-content: space-between;
  padding: 4px 16px 2px;
  font: 650 10px/1.1 "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

.sc-phone-header {
  gap: 7px;
  min-height: 43px;
  padding: 6px 11px 7px 8px;
  border-bottom: 1px solid #dcded9;
}

.sc-phone-header svg, .sc-phone-avatar, .sc-phone-footer svg { flex: none; }
.sc-phone-back, .sc-phone-call, .sc-phone-footer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sc-phone-avatar, .sc-phone-mic {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.sc-phone-avatar {
  width: 30px;
  height: 30px;
  background: #d6eae2;
  color: #577969;
}

.sc-phone-avatar-assistant { background: #e4eee8; }
.sc-phone-contact { flex: 1; min-width: 0; }
.sc-phone-contact strong, .sc-phone-contact small { display: block; }
.sc-phone-contact strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.sc-phone-contact small {
  margin-top: 2px;
  color: #56645d;
  font-size: 11px;
  line-height: 1.2;
}

.sc-phone-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 7px;
}

.sc-phone-compose {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(30 36 28 / 15%);
  color: #68746d;
  font-size: 13px;
  line-height: 1.2;
}

.sc-phone-compose span { flex: 1; }
.sc-phone-mic {
  flex: none;
  width: 29px;
  height: 29px;
  background: #138458;
  color: white;
}

@container (max-width: 270px) {
  .sc-phone-call, .sc-phone-camera { display: none; }
}

.lp-scenarios {
  padding-bottom: clamp(24px, 2.6vw, 40px);
}

.scenario-explorer {
  border: 1px solid #cddbd2;
  border-radius: 16px;
  overflow: clip;
}

.scenario-tabs {
  display: flex;
  border-bottom: 1px solid #cddbd2;
  background: #fafcf9;
}

.scenario-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 14px/1.25 "DM Sans", "Segoe UI", sans-serif;
  cursor: pointer;
}

.scenario-tab + .scenario-tab { border-left: 1px solid var(--line); }
.scenario-tab:hover { background: #f0f5ef; color: var(--brand); }
.scenario-tab[aria-selected="true"] {
  background: #e3efe7;
  color: #104f40;
  box-shadow: inset 0 -3px var(--brand);
}

.scenario-tab svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scenario-explorer :is(.scenario-tab, .scenario-panel, .sc-rule summary):focus-visible {
  outline-offset: -3px;
}

.scenario-panel {
  display: grid;
  grid-template-columns: minmax(0, .94fr) repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  padding: clamp(16px, 1.7vw, 24px);
  background-color: #edf3ed;
  background-image: radial-gradient(#cbdacc .8px, transparent .9px);
  background-size: 12px 12px;
}

.scenario-panel[hidden] { display: none; }
.sc-step {
  display: grid;
  min-width: 0;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 10px;
}
.sc-step-heading {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 8px;
  margin: 0;
  color: #284b3e;
  font-size: 15px;
  font-weight: 660;
  line-height: 1.35;
}

.sc-step-heading > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid #a5c0ae;
  background: #fff;
  color: #205c46;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.sc-output .sc-step-heading > span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.sc-step-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #bccfc0;
}

.sc-rule {
  overflow: clip;
  border: 1px solid #c5d5c9;
  border-radius: 12px;
  background: #fbfcfa;
  box-shadow: 0 2px 4px rgb(23 57 39 / 5%);
}

.sc-rule summary {
  display: block;
  padding: 14px;
  background: #fff;
  list-style: none;
  cursor: pointer;
}

.sc-rule summary::-webkit-details-marker { display: none; }
.sc-rule summary:hover { background: #f7faf6; }
.sc-rule-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sc-rule-name strong {
  display: block;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.25;
}

.sc-rule-name img { flex: none; }
.sc-rule-name .sc-chevron {
  margin-left: auto;
  width: 15px;
  height: 15px;
  color: #526b5d;
}

.sc-rule[open] .sc-chevron { transform: rotate(180deg); }
.sc-condition {
  display: block;
  margin: 12px 0 0;
  padding-left: 10px;
  border-left: 3px solid #6fa78c;
  color: #243e32;
  font-size: 14px;
  line-height: 1.45;
}

.sc-rule-settings {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid #dae4dc;
}

.sc-rule-settings dt, .sc-rule-action small {
  color: #51665a;
  font-size: 12px;
  line-height: 1.35;
}

.sc-rule-settings dt { margin-bottom: 3px; }
.sc-rule-settings dd { margin: 0; font-size: 13px; font-weight: 580; }
.sc-rule-settings > div + div { margin-top: 10px; }
.sc-rule-action { display: flex; gap: 6px; align-items: flex-start; }
.sc-rule-action + .sc-rule-action { margin-top: 6px; }
.sc-rule-action .lp-icon { width: 15px; height: 18px; color: var(--brand); }
.sc-rule-action strong { font-weight: 640; }
.sc-rule-action small { display: block; font-weight: 450; overflow-wrap: anywhere; }

.sc-phone {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-height: 254px;
  overflow: hidden;
  border: 3px solid #303737;
  border-radius: 21px;
  background: #efeae2 url("branding/chat-wallpaper.svg") repeat;
  background-size: 172px auto;
  color: #202525;
  font-family: "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 2px 5px rgb(24 37 30 / 14%);
}
.sc-phone::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin: 0 auto 4px;
  border-radius: 4px;
  background: #4b5050;
}
.sc-transcript {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 11px 10px 15px;
}
.sc-bubble {
  position: relative;
  width: fit-content;
  max-width: 93%;
  padding: 6px 9px;
  border-radius: 0 9px 9px 9px;
  background: white;
  box-shadow: 0 1px 1px rgb(30 39 33 / 16%);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sc-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  border-top: 7px solid white;
  border-left: 6px solid transparent;
}
.sc-bubble p { display: flow-root; margin: 0; }
.sc-bubble time {
  float: right;
  margin: 5px 0 0 8px;
  color: #5c666b;
  font-size: 10px;
  line-height: 1.25;
}
.sc-author, .sc-subject { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 650; }
.sc-author { color: #235d91; }
.sc-first-message .sc-author { color: #98542b; }
.sc-bot-reply .sc-author { color: #087257; }
.sc-bubble blockquote {
  margin: 4px 0 5px;
  padding: 5px 7px;
  border-left: 3px solid #6192ac;
  border-radius: 4px;
  background: #f0f3f4;
  color: #414b4e;
  font-size: 12px;
}
.sc-bubble blockquote strong { display: block; color: #295e79; }
.sc-bubble .sc-reference {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  margin-top: 6px;
  color: #365d68;
  font-size: 12px;
}
.sc-bubble .sc-link-preview {
  flex: 1;
  padding: 5px 7px;
  border-radius: 4px;
  background: #f0f3f3;
}
.sc-link-preview small { display: block; color: #53676c; font-size: 11px; }

@media (max-width: 959px) {
  .scenario-tabs {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .scenario-tab {
    flex: 1 0 auto;
    padding-inline: 14px;
    white-space: nowrap;
  }
  .scenario-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: clamp(8px, 1.8vw, 14px);
  }
  .sc-setup { grid-column: 1 / -1; }
  .sc-step { row-gap: 6px; }
  .sc-rule summary, .sc-rule-settings { padding: 10px 12px; }
  .sc-condition { margin-top: 7px; }
  .sc-rule-settings {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 10px;
  }
  .sc-rule-settings > div + div { margin: 0; }
}

@media (max-width: 519px) {
  .scenario-panel { column-gap: 7px; padding-inline: 6px; }
  .sc-step-heading { gap: 5px; font-size: 13px; }
  .sc-step-heading > span { width: 19px; height: 19px; font-size: 11px; }
  .sc-phone { border-width: 2px; border-radius: 15px; }
}

@container (max-width: 220px) {
  .sc-phone-status { padding-inline: 9px; }
  .sc-phone-header { gap: 4px; padding: 5px; }
  .sc-phone-back { width: 13px; }
  .sc-phone-avatar { width: 21px; height: 21px; }
  .sc-phone-avatar > :is(img, svg) { width: 17px; height: 17px; }
  .sc-phone-contact strong { font-size: 12px; }
  .sc-phone-contact small { font-size: 10px; }
  .sc-transcript { padding: 7px 5px 7px 8px; }
  .sc-bubble { max-width: 100%; padding: 5px 6px; font-size: 13px; }
  .sc-author, .sc-subject { font-size: 12px; }
  .sc-bubble .sc-reference { flex-wrap: wrap; font-size: 11px; }
  .sc-reference time { margin-left: auto; }
  .sc-phone-footer { gap: 3px; padding-inline: 4px; }
  .sc-phone-compose { min-height: 24px; gap: 3px; padding: 3px 5px; font-size: 12px; }
  .sc-phone-compose svg { width: 13px; height: 13px; }
  .sc-phone-mic { width: 24px; height: 24px; }
}
