
/* Talk to 5Dragon — Phase 1 */
#talk5dragon-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: #111;
  color: #fff;
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
  font-size: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
#talk5dragon-toggle:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,.3); }

#talk5dragon-panel {
  position: fixed;
  right: 24px;
  bottom: 98px;
  z-index: 9999;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 130px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}
#talk5dragon-panel.is-open { display: flex; }

.t5d-header {
  display:flex; align-items:center; justify-content:space-between;
  padding: 17px 18px; background:#111; color:#fff;
}
.t5d-brand { display:flex; align-items:center; gap:11px; }
.t5d-logo { width:38px; height:38px; border-radius:50%; object-fit:cover; background:#fff; }
.t5d-title { font-weight:700; font-size:15px; }
.t5d-status { font-size:11px; opacity:.72; margin-top:2px; }
.t5d-close { border:0; background:transparent; color:#fff; cursor:pointer; font-size:21px; }

.t5d-messages {
  flex:1; overflow:auto; padding:18px 14px; background:#f6f7f8;
}
.t5d-message {
  max-width:86%; padding:11px 13px; margin:0 0 10px;
  border-radius:15px; font-size:14px; line-height:1.55;
  white-space:pre-wrap; word-break:break-word;
}
.t5d-message.bot { background:#fff; border:1px solid #e8e8e8; margin-right:auto; }
.t5d-message.user { background:#111; color:#fff; margin-left:auto; border-bottom-right-radius:5px; }
.t5d-message.bot { border-bottom-left-radius:5px; }

.t5d-composer {
  display:flex; gap:8px; padding:11px; background:#fff; border-top:1px solid #eee;
}
.t5d-input {
  flex:1; min-width:0; resize:none; border:1px solid #ddd; outline:none;
  border-radius:13px; padding:11px 12px; font:inherit; font-size:14px;
}
.t5d-input:focus { border-color:#111; }
.t5d-send {
  width:45px; border:0; border-radius:13px; background:#111; color:#fff;
  cursor:pointer; font-size:16px;
}
.t5d-send:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width:600px) {
  #talk5dragon-toggle { right:16px; bottom:16px; }
  #talk5dragon-panel { right:8px; bottom:88px; width:calc(100vw - 16px); height:calc(100vh - 105px); border-radius:18px; }
}

/* v8.4 Build 2 — Visual Polish & Mobile Readability */
.t5d-message.bot.is-structured {
  width: min(94%, 560px);
  max-width: min(94%, 560px);
  padding: 0;
  overflow: hidden;
  white-space: normal;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

.t5d-message.bot.is-structured > * {
  box-sizing: border-box;
}

.t5d-response-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(180deg, #171717, #242424);
}

.t5d-response-title-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #d71920;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}

.t5d-response-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 750;
}

.t5d-response-introduction {
  margin: 0 !important;
  padding: 14px 16px 2px;
  color: #3a3a3a;
  font-size: 13px;
  line-height: 1.65;
}

.t5d-response-section {
  margin: 14px 16px 0;
  padding-top: 14px;
  border-top: 1px solid #ededed;
}

.t5d-response-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.t5d-response-heading-marker {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #f3f3f3;
  color: #d71920;
  font-size: 15px;
  font-weight: 800;
}

.t5d-response-heading {
  margin: 0;
  color: #181818;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
  letter-spacing: .01em;
}

.t5d-response-text {
  margin: 0;
  color: #4b4b4b;
  font-size: 12.75px;
  line-height: 1.65;
}

.t5d-product-list {
  display: grid;
  gap: 10px;
}

.t5d-product-card {
  position: relative;
  padding: 12px 13px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: 0 3px 10px rgba(0,0,0,.035);
}

.t5d-product-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: #d71920;
}

.t5d-product-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
}

.t5d-product-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.t5d-product-title {
  margin: 0;
  padding: 0;
  color: #141414;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.t5d-product-title::before {
  content: none;
}

.t5d-product-description {
  margin: 0 0 0 28px !important;
  color: #5a5a5a;
  font-size: 12.25px;
  line-height: 1.6;
}

.t5d-response-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.t5d-response-list li {
  position: relative;
  margin: 0;
  padding: 9px 10px 9px 30px;
  border-radius: 9px;
  background: #f7f7f7;
  color: #414141;
  font-size: 12.5px;
  line-height: 1.5;
}

.t5d-response-list li::before {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 9px;
  color: #d71920;
  font-weight: 800;
}

.t5d-response-next-step {
  margin: 15px 16px 16px;
  padding: 12px 13px;
  border: 1px solid rgba(215,25,32,.16);
  border-radius: 12px;
  background: rgba(215,25,32,.055);
}

.t5d-response-next-step .t5d-response-heading-marker {
  background: #d71920;
  color: #fff;
}

.t5d-response-next-step .t5d-response-text {
  color: #2f2f2f;
  font-weight: 600;
}

@media (max-width: 600px) {
  .t5d-message.bot.is-structured {
    width: 96%;
    max-width: 96%;
    border-radius: 14px;
  }

  .t5d-response-title-row {
    padding: 13px 14px 12px;
  }

  .t5d-response-title {
    font-size: 15px;
  }

  .t5d-response-introduction {
    padding: 13px 14px 1px;
    font-size: 12.75px;
  }

  .t5d-response-section {
    margin: 13px 14px 0;
    padding-top: 13px;
  }

  .t5d-product-card {
    padding: 11px 12px;
  }

  .t5d-product-description {
    margin-left: 28px !important;
  }

  .t5d-response-next-step {
    margin: 14px;
  }
}

@media (max-width: 380px) {
  .t5d-message.bot.is-structured {
    width: 98%;
    max-width: 98%;
  }

  .t5d-response-title-icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .t5d-response-title {
    font-size: 14px;
  }

  .t5d-product-title {
    font-size: 12.5px;
  }

  .t5d-product-description,
  .t5d-response-text,
  .t5d-response-list li {
    font-size: 12px;
  }
}


/* v8.4 Build 3 — Project-Specific Response Templates */
.t5d-message.template-stormwater-line-recommendation .t5d-response-title-icon,
.t5d-message.template-drainage-line-recommendation .t5d-response-title-icon,
.t5d-message.template-sewerage-line-recommendation .t5d-response-title-icon {
  border-radius: 50%;
}

.t5d-message.template-water-supply-recommendation .t5d-response-title-icon {
  border-radius: 50% 50% 50% 8px;
}


/* v8.4 Build 4 — Human Writing Polish */
.t5d-response-paragraphs {
  display: grid;
  gap: 9px;
}

.t5d-response-paragraphs .t5d-response-text {
  max-width: 62ch;
}

.t5d-product-description,
.t5d-response-introduction,
.t5d-response-text,
.t5d-response-list li {
  text-wrap: pretty;
}


/* v8.5 Build 5 — Engineering Recommendation Intelligence */
.t5d-product-groups {
  display: grid;
  gap: 14px;
}

.t5d-product-group {
  display: grid;
  gap: 8px;
}

.t5d-product-group-title {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #666;
}

.t5d-product-group.role-primary .t5d-product-card {
  border-color: rgba(215,25,32,.28);
  background: linear-gradient(180deg, #fff, #fff8f8);
}

.t5d-product-card.role-primary .t5d-product-icon {
  background: #d71920;
}

.t5d-product-card.role-alternative {
  border-style: dashed;
}

.t5d-product-card.role-optional {
  background: #fcfcfc;
  opacity: .96;
}

.t5d-product-card.role-alternative::after,
.t5d-product-card.role-optional::after {
  background: #777;
}

.t5d-engineering-note {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f7f7f7;
}

.t5d-engineering-note-title {
  margin: 0 0 7px;
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
}


/* v8.7 — Premium Sales Experience */
.t5d-response-title-icon::before {
  content: "5";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.t5d-response-heading-marker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d71920;
}

.t5d-response-next-step .t5d-response-heading-marker::before {
  width: 8px;
  height: 8px;
  background: #fff;
}

.t5d-product-icon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.t5d-product-icon.role-alternative::before {
  border-radius: 2px;
}

.t5d-product-icon.role-optional::before {
  background: transparent;
  border: 2px solid #fff;
}

.t5d-project-summary {
  display: grid;
  gap: 8px;
  margin: 0;
}

.t5d-project-summary-row {
  display: grid;
  grid-template-columns: minmax(120px, .9fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f7f7f7;
}

.t5d-project-summary-row dt {
  margin: 0;
  color: #666;
  font-size: 11.5px;
  font-weight: 700;
}

.t5d-project-summary-row dd {
  margin: 0;
  color: #1d1d1d;
  font-size: 12.5px;
  font-weight: 650;
  text-align: right;
}

.t5d-next-step-preface {
  margin-bottom: 8px !important;
  font-weight: 400 !important;
}

.t5d-next-step-question {
  font-weight: 700 !important;
}

.t5d-response-next-step {
  box-shadow: inset 3px 0 0 #d71920;
}

@media (max-width: 430px) {
  .t5d-project-summary-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .t5d-project-summary-row dd {
    text-align: left;
  }
}

/* v8.9 Build 2.1 — Package Copy Polish */
.t5d-product-condition {
  margin: 7px 0 0 28px;
  padding-top: 7px;
  border-top: 1px solid #ececec;
  color: #505050;
  font-size: 12px;
  line-height: 1.55;
}

.t5d-product-condition-label {
  color: #303030;
  font-weight: 750;
}

/* v8.9 Build 3 — Consultant Advice Engine */
.t5d-consultant-advice {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dedede;
  border-radius: 12px;
  background: #fafafa;
}

.t5d-consultant-advice-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.t5d-consultant-advice-summary {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
}

.t5d-consultant-advice-groups {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.t5d-consultant-advice-group {
  padding-top: 10px;
  border-top: 1px solid #e6e6e6;
}

.t5d-consultant-advice-group-title {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 800;
}

.t5d-consultant-advice-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
}

.t5d-consultant-advice-list li + li {
  margin-top: 5px;
}

/* v8.9 Build 5 — Sales Opportunity Intelligence */
.t5d-sales-opportunities {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
}

.t5d-sales-opportunities-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.t5d-sales-opportunities-summary {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #505050;
}

.t5d-sales-opportunities-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.t5d-sales-opportunity-card {
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
}

.t5d-sales-opportunity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.t5d-sales-opportunity-title {
  margin: 0;
  font-size: 12.75px;
  line-height: 1.4;
  font-weight: 800;
}

.t5d-sales-opportunity-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
  color: #555;
  background: #fff;
}

.t5d-sales-opportunity-reason,
.t5d-sales-opportunity-products,
.t5d-sales-opportunity-condition {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #505050;
}

@media (max-width: 560px) {
  .t5d-sales-opportunity-header {
    display: block;
  }

  .t5d-sales-opportunity-badge {
    display: inline-block;
    margin-top: 6px;
  }
}



/* v8.9 Build 5.1 — Product Finish & Design Selection Intelligence */
.t5d-product-variants {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #fafafa;
}

.t5d-product-variants-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.t5d-product-variants-summary,
.t5d-product-variants-prompt {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #4d4d4d;
}

.t5d-product-variants-prompt {
  font-weight: 750;
  color: #252525;
}

.t5d-product-variants-list {
  display: grid;
  gap: 9px;
  margin-top: 11px;
}

.t5d-product-variant-card {
  padding: 11px 12px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #fff;
}

.t5d-product-variant-product {
  margin: 0;
  font-size: 12.75px;
  line-height: 1.4;
  font-weight: 800;
}

.t5d-product-variant-selected,
.t5d-product-variant-options,
.t5d-product-variant-guidance {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #505050;
}

/* v8.9 Build 5.1.3 — Finalization Section Deduplication & Resolved-Field Cleanup */
.t5d-product-variant-details {
  margin: 7px 0 0 18px;
  padding: 0;
  color: #4f4f4f;
  font-size: 11.75px;
  line-height: 1.55;
}

.t5d-product-variant-details li + li {
  margin-top: 3px;
}


/* v8.9 Build 6 — Consultant Confidence Intelligence */
.t5d-consultant-confidence {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dedede;
  border-left: 3px solid #d71920;
  border-radius: 12px;
  background: #fff;
}

.t5d-consultant-confidence.is-strongly-supported {
  border-left-width: 4px;
}

.t5d-consultant-confidence.is-preliminary {
  border-left-color: #707070;
  background: #fafafa;
}

.t5d-consultant-confidence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.t5d-consultant-confidence-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.t5d-consultant-confidence-badge {
  flex: 0 0 auto;
  max-width: 55%;
  padding: 4px 7px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #f4f4f4;
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
}

.t5d-consultant-confidence-summary {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #454545;
}

.t5d-consultant-confidence-group {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e8e8e8;
}

.t5d-consultant-confidence-group-title {
  margin: 0 0 5px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}

.t5d-consultant-confidence-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11.75px;
  line-height: 1.55;
}

.t5d-consultant-confidence-list li + li {
  margin-top: 4px;
}

@media (max-width: 430px) {
  .t5d-consultant-confidence-header {
    display: grid;
  }

  .t5d-consultant-confidence-badge {
    max-width: 100%;
    justify-self: start;
  }
}


/* v8.9 Build 6.0.1 — Confidence & Finalization Consistency */
.t5d-consultant-confidence-group.is-verification {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
}

/* v8.9 Build 7 — Quotation Intake & Lead Qualification Intelligence */


/* v8.9 Build 10.0.1 — Responsive Chat Layout & Message Presentation Polish */
#talk5dragon-panel,
#talk5dragon-panel * {
  box-sizing: border-box;
}

#talk5dragon-panel {
  width: min(430px, calc(100vw - 32px));
  height: min(720px, calc(100dvh - 124px));
  min-height: min(520px, calc(100dvh - 124px));
  isolation: isolate;
}

#talk5dragon-toggle[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(.88);
}

.t5d-header {
  flex: 0 0 auto;
  min-height: 66px;
  padding: 13px 15px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}

.t5d-logo {
  width: 36px;
  height: 36px;
}

.t5d-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  transition: background .18s ease, transform .18s ease;
}

.t5d-close:hover,
.t5d-close:focus-visible {
  background: rgba(255,255,255,.12);
  transform: scale(1.04);
}

.t5d-messages {
  min-height: 0;
  padding: 16px 14px 24px;
  scroll-padding-block: 14px 120px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(20,20,20,.28) transparent;
}

.t5d-messages::-webkit-scrollbar {
  width: 8px;
}

.t5d-messages::-webkit-scrollbar-track {
  background: transparent;
}

.t5d-messages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(20,20,20,.28);
  background-clip: padding-box;
}

.t5d-message {
  width: fit-content;
  max-width: 91%;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.58;
}

.t5d-message.bot {
  padding: 12px 13px;
  box-shadow: 0 4px 14px rgba(0,0,0,.045);
}

.t5d-message.user {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 16px 16px 5px 16px;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.t5d-message.bot.is-structured,
.t5d-message.bot.is-pipeline-status {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
}

.t5d-message.bot.is-pipeline-status {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.t5d-composer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  align-items: flex-end;
  padding: 10px 11px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #e8e8e8;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -10px 24px rgba(0,0,0,.055);
  backdrop-filter: blur(14px);
}

.t5d-input {
  display: block;
  min-height: 44px;
  max-height: 120px;
  overflow-y: hidden;
  padding: 11px 13px;
  border-color: #d8d8d8;
  border-radius: 14px;
  line-height: 1.45;
  scrollbar-width: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.t5d-input::-webkit-scrollbar {
  display: none;
}

.t5d-input.is-scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
}

.t5d-input.is-scrollable::-webkit-scrollbar {
  display: block;
  width: 6px;
}

.t5d-input:focus {
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}

.t5d-send {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.t5d-send:hover:not(:disabled),
.t5d-send:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  background: #d71920;
}

.t5d-message.is-typing {
  min-width: 58px;
  padding: 13px 15px;
}

.t5d-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.t5d-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #777;
  animation: t5d-typing-pulse 1.1s infinite ease-in-out;
}

.t5d-typing-dots i:nth-child(2) { animation-delay: .13s; }
.t5d-typing-dots i:nth-child(3) { animation-delay: .26s; }

@keyframes t5d-typing-pulse {
  0%, 70%, 100% { opacity: .3; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.t5d-message.is-formatted-text {
  white-space: normal;
}

.t5d-plain-heading {
  margin: 0 0 9px;
  font-size: 14px;
  line-height: 1.35;
}

.t5d-plain-paragraph {
  margin: 0;
}

.t5d-plain-paragraph + .t5d-plain-paragraph,
.t5d-plain-list + .t5d-plain-paragraph,
.t5d-plain-paragraph + .t5d-plain-list {
  margin-top: 8px;
}

.t5d-plain-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.t5d-plain-list li {
  position: relative;
  padding-left: 17px;
}

.t5d-plain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d71920;
}

.t5d-message a {
  color: inherit;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.t5d-pipeline-card {
  overflow: hidden;
  border: 1px solid #dedede;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.09);
}

.t5d-pipeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  color: #fff;
  background: linear-gradient(135deg, #171717, #2a2a2a);
}

.t5d-pipeline-heading-group {
  min-width: 0;
}

.t5d-pipeline-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.66);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.t5d-pipeline-heading {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.t5d-pipeline-badge {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(215,25,32,.92);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.t5d-pipeline-description {
  margin: 0;
  padding: 14px 16px 4px;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
}

.t5d-pipeline-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 16px 0;
}

.t5d-pipeline-fact {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f6f6f6;
}

.t5d-pipeline-fact.is-wide {
  grid-column: 1 / -1;
}

.t5d-pipeline-fact dt {
  margin: 0 0 3px;
  color: #777;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.t5d-pipeline-fact dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #202020;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.t5d-pipeline-next-step {
  margin: 12px 16px 0;
  padding: 11px 12px;
  border: 1px solid rgba(215,25,32,.16);
  border-radius: 11px;
  background: rgba(215,25,32,.055);
}

.t5d-pipeline-next-step > span {
  display: block;
  margin-bottom: 3px;
  color: #b1151b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.t5d-pipeline-next-step p {
  margin: 0;
  color: #292929;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 650;
}

.t5d-pipeline-safe-state {
  margin: 12px 16px 0;
  padding-left: 19px;
  color: #3e3e3e;
  font-size: 11.5px;
  line-height: 1.5;
  position: relative;
}

.t5d-pipeline-safe-state::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16803c;
  font-weight: 900;
}

.t5d-pipeline-details {
  margin: 13px 16px 15px;
  border-top: 1px solid #ececec;
}

.t5d-pipeline-details summary {
  position: relative;
  padding: 11px 22px 4px 0;
  color: #555;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 750;
  list-style: none;
}

.t5d-pipeline-details summary::-webkit-details-marker,
.t5d-response-section.is-collapsible > summary::-webkit-details-marker {
  display: none;
}

.t5d-pipeline-details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 9px;
  font-size: 17px;
  line-height: 1;
}

.t5d-pipeline-details[open] summary::after {
  content: "−";
}

.t5d-pipeline-details-body {
  display: grid;
  gap: 6px;
  padding: 7px 0 2px;
}

.t5d-pipeline-detail-line {
  margin: 0;
  color: #666;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.t5d-response-section.is-collapsible {
  padding-top: 0;
}

.t5d-response-section.is-collapsible > .t5d-response-heading-row {
  position: relative;
  margin: 0;
  padding: 13px 28px 13px 0;
  cursor: pointer;
  list-style: none;
}

.t5d-response-section.is-collapsible[open] > .t5d-response-heading-row {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ededed;
}

.t5d-section-toggle-label {
  margin-left: auto;
  color: #777;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.t5d-response-section.is-collapsible[open] .t5d-section-toggle-label {
  font-size: 0;
}

.t5d-response-section.is-collapsible[open] .t5d-section-toggle-label::after {
  content: "Hide";
  font-size: 10px;
}

@media (max-width: 600px) {
  #talk5dragon-panel {
    inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) 8px;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 18px;
  }

  .t5d-header {
    min-height: 60px;
    padding: 11px 13px;
  }

  .t5d-logo {
    width: 34px;
    height: 34px;
  }

  .t5d-title {
    font-size: 14px;
  }

  .t5d-status {
    font-size: 10.5px;
  }

  .t5d-messages {
    padding: 13px 11px 22px;
  }

  .t5d-message {
    max-width: 93%;
  }

  .t5d-message.user {
    max-width: 82%;
  }

  .t5d-message.bot.is-structured,
  .t5d-message.bot.is-pipeline-status {
    width: 100%;
    max-width: 100%;
  }

  .t5d-composer {
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  }

  .t5d-pipeline-card-header {
    padding: 13px 14px;
  }

  .t5d-pipeline-description {
    padding: 12px 14px 3px;
  }

  .t5d-pipeline-facts,
  .t5d-pipeline-next-step,
  .t5d-pipeline-safe-state,
  .t5d-pipeline-details {
    margin-left: 14px;
    margin-right: 14px;
  }
}

@media (max-width: 420px) {
  #talk5dragon-panel {
    inset: auto 0 auto 0;
    top: var(--t5d-visual-offset-top, 0px);
    width: 100%;
    height: var(--t5d-visual-height, 100dvh);
    min-height: 0;
    max-height: var(--t5d-visual-height, 100dvh);
    border: 0;
    border-radius: 0;
  }

  .t5d-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .t5d-pipeline-facts {
    grid-template-columns: 1fr;
  }

  .t5d-pipeline-fact.is-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #talk5dragon-panel *,
  #talk5dragon-toggle {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


.t5d-starter-actions {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 6px 0 8px;
}

.t5d-starter-title {
  margin: 0;
  color: #2b2b2b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.t5d-starter-primary {
  display: grid;
  gap: 8px;
}

.t5d-starter-action {
  appearance: none;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(171, 0, 0, .18);
  border-radius: 12px;
  background: #fff;
  color: #7f0000;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.t5d-starter-action-primary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .035);
}

.t5d-starter-icon {
  flex: 0 0 24px;
  width: 24px;
  text-align: center;
  font-size: 17px;
  line-height: 1;
}

.t5d-starter-label {
  flex: 1;
  min-width: 0;
}

.t5d-starter-action-primary:hover,
.t5d-starter-action-primary:focus-visible {
  background: #fff7f7;
  border-color: rgba(171, 0, 0, .42);
  box-shadow: 0 4px 12px rgba(90, 0, 0, .07);
  outline: none;
  transform: translateY(-1px);
}

.t5d-starter-hint {
  margin: 0;
  color: #707070;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.t5d-starter-track {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border-color: rgba(0, 0, 0, .14);
  background: #fafafa;
  color: #444;
  text-align: center;
}

.t5d-starter-track:hover,
.t5d-starter-track:focus-visible {
  background: #f3f3f3;
  border-color: rgba(0, 0, 0, .24);
  outline: none;
  transform: translateY(-1px);
}
/* Build 10.0.10: visible privacy-safe cross-device verification notice. */
.t5d-pipeline-verification-notice {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.t5d-pipeline-verification-notice .t5d-pipeline-detail-line {
  margin: 4px 0 0;
}

/* ==================================================
   Astraea - New Chat header control
   ================================================== */

.t5d-new-chat {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 82px;
  height: 34px;
  padding: 0 13px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;

  background: rgba(255, 255, 255, .07);
  color: #fff;

  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;

  cursor: pointer;
  white-space: nowrap;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.t5d-new-chat:hover {
  background: rgba(183, 0, 0, .22);
  border-color: rgba(255, 74, 74, .7);
  transform: translateY(-1px);
}

.t5d-new-chat:focus-visible {
  outline: 2px solid rgba(255, 78, 78, .9);
  outline-offset: 2px;
  background: rgba(183, 0, 0, .22);
  border-color: rgba(255, 74, 74, .75);
}

.t5d-new-chat:active {
  transform: translateY(0);
}

.t5d-new-chat:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}

.t5d-new-chat + .t5d-close {
  margin-left: 5px;
}

@media (max-width: 600px) {
  .t5d-new-chat {
    min-width: 74px;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 11.5px;
  }

  .t5d-new-chat + .t5d-close {
    margin-left: 3px;
  }
}

@media (max-width: 360px) {
  .t5d-new-chat {
    min-width: 0;
    padding: 0 9px;
    font-size: 11px;
  }
}
