.htlab-chat{max-width:960px;margin:24px auto;border:1px solid #d1d7db;border-radius:16px;overflow:hidden;background:#efeae2;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
.htlab-chat__header{display:flex;gap:12px;align-items:center;padding:14px 16px;background:#075e54;color:#fff}
.htlab-chat__avatar{width:38px;height:38px;border-radius:50%;background:#fff;color:#075e54;display:flex;align-items:center;justify-content:center;font-weight:700}
.htlab-chat__title{font-weight:700}.htlab-chat__status{font-size:12px;opacity:.85}
.htlab-chat__messages{height:520px;overflow-y:auto;padding:20px;background:#efeae2}
.htlab-chat__row{display:flex;margin:8px 0}.htlab-chat__row--user{justify-content:flex-end}.htlab-chat__row--bot{justify-content:flex-start}
.htlab-chat__bubble{max-width:72%;padding:10px 13px;border-radius:8px;line-height:1.45;font-size:15px;white-space:pre-wrap;word-break:break-word;box-shadow:0 1px 1px rgba(0,0,0,.12)}
.htlab-chat__bubble--user{background:#dcf8c6}.htlab-chat__bubble--bot{background:#fff}
.htlab-chat__suggestions{display:flex;gap:8px;flex-wrap:wrap;padding:10px 12px;background:#f0f2f5;border-top:1px solid #d1d7db}
.htlab-chat__suggestions button{color:#075e54;background:#fff;border:1px solid #7bbcb3;border-radius:999px;padding:8px 12px;font-weight:600;cursor:pointer}
.htlab-chat__form{display:flex;gap:10px;align-items:flex-end;padding:12px;background:#f0f2f5;border-top:1px solid #d1d7db}
.htlab-chat__input{flex:1;resize:none;border:0;border-radius:22px;padding:12px 16px;font:inherit;background:#fff;outline:none}
.htlab-chat__send{width:46px;height:46px;border:0;border-radius:50%;background:#128c7e;color:#fff;cursor:pointer;font-size:0}
.htlab-chat__send:before{content:"➜";font-size:22px}
.htlab-chat__send:disabled{opacity:.5}
@media(max-width:640px){.htlab-chat{margin:0;border-radius:0}.htlab-chat__messages{height:calc(100vh - 180px)}.htlab-chat__bubble{max-width:86%}}

.htlab-chat__bubble{
  white-space:normal!important;
}

.htlab-chat__send{
  width:auto!important;
  min-width:72px!important;
  height:44px!important;
  border-radius:22px!important;
  padding:0 18px!important;
  font-size:14px!important;
  font-weight:700!important;
}

.htlab-chat__send:before{
  content:"Send"!important;
  font-size:14px!important;
}

.htlab-chat__send:before{
  content:none!important;
}


/* Logged-out visitors: hide member-only pages */

/* Logged-in users: hide join/login pages */


.htlab-chat__bubble--typing{
  color:#667085;
  font-style:italic;
}

.htlab-chat__thinking span{
  display:inline-block;
  width:6px;
  height:6px;
  margin-left:4px;
  border-radius:50%;
  background:currentColor;
  animation:htlabThinking 1.2s infinite ease-in-out;
}

.htlab-chat__thinking span:nth-child(2){
  animation-delay:.15s;
}

.htlab-chat__thinking span:nth-child(3){
  animation-delay:.3s;
}

@keyframes htlabThinking{
  0%,80%,100%{
    opacity:.25;
    transform:translateY(0);
  }
  40%{
    opacity:1;
    transform:translateY(-4px);
  }
}

/* Hide PMS logout menu item */
.pms-account-navigation-link--logout {
  display: none !important;
}


/* Hide PMS subscription actions row */
.pms-account-subscription-details-table__actions {
  display: none !important;
}


/* Disable chatbot prompt chips */
.htlab-chat__suggestions {
  display: none !important;
}


.htlab-md-dropzone {
  border: 3px dashed #ccc;
  padding: 40px;
  text-align: center;
  background: #fff;
  max-width: 800px;
}

.htlab-md-dropzone.htlab-md-dropzone--active {
  border-color: #2271b1;
  background: #f0f6fc;
}

/* Inline code-style chatbot chips */
.htlab-chat__inline-chip {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 2px;
  border-radius: 999px;
  background: #eef6f4;
  border: 1px solid #b7d8d2;
  color: #075e54;
  font-size: 0.92em;
  font-weight: 700;
  white-space: nowrap;
}

.htlab-chat__md-heading {
  font-weight: 800;
  margin: 8px 0 6px;
}

.htlab-chat__md-p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.htlab-chat__md-p:last-child {
  margin-bottom: 0;
}

.htlab-chat__md-h1 {
  font-size: 1.28rem;
  font-weight: 850;
  margin: 4px 0 12px;
  line-height: 1.25;
}

.htlab-chat__md-h2 {
  display: block;
  font-size: 1.08rem;
  font-weight: 800;
  margin: 14px 0 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.12);
  line-height: 1.3;
}

.htlab-chat__md-heading {
  font-weight: 800;
  margin: 10px 0 6px;
}

.htlab-chat__md-p {
  margin: 0 0 9px;
  line-height: 1.48;
}

.htlab-chat__md-p:last-child {
  margin-bottom: 0;
}

.htlab-chat__code {
  display: block;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: #f6f7f7;
  border-left: 4px solid #2271b1;
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 6px;
  font-size: .92em;
}

.htlab-chat__doc-chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 3px;
  border-radius: 999px;
  background: #eef6f4;
  border: 1px solid #b7d8d2;
  color: #075e54;
  font-size: .92em;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.htlab-chat__doc-chip:hover {
  background: #dff0ec;
}

.htlab-chat__md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: .92em;
  background: #fff;
}

.htlab-chat__md-table th,
.htlab-chat__md-table td {
  border: 1px solid rgba(0,0,0,.14);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.htlab-chat__md-table th {
  font-weight: 800;
  background: #f3f6f6;
}

.htlab-chat__md-list {
  margin: 6px 0 10px 22px;
  padding: 0;
}

.htlab-chat__md-list li {
  margin: 4px 0;
  line-height: 1.45;
}

.htlab-chat__md-p{
  white-space:pre-wrap;
}

/* Mermaid diagrams */
.htlab-chat__row--bot .htlab-chat__bubble:has(.htlab-mermaid){
  width:95%;
  max-width:95%;
}

.htlab-mermaid{
  width:100%;
  max-width:none;
  margin:20px auto;
  text-align:center;
  overflow-x:auto;
}

.htlab-mermaid svg{
  display:block;
  width:100% !important;
  height:auto !important;
  max-width:none !important;
  margin:0 auto;
}

.htlab-chat__pre{
  white-space:pre;
  overflow-x:auto;
  max-width:100%;
  padding:14px 16px;
  border-radius:12px;
  background:#111827;
  color:#f9fafb;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:13px;
  line-height:1.45;
}

.htlab-chat__pre code{
  white-space:pre;
}

.htlab-chat__pre{
  margin:12px 0;
  padding:14px 16px;
  border-radius:10px;
  background:#111827;
  color:#f9fafb;
  overflow-x:auto;
  white-space:pre;
  max-width:100%;
  font-size:13px;
  line-height:1.45;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

.htlab-chat__pre code{
  white-space:pre;
}

.htlab-chat__pre--ascii{
  background:#f8fafc;
  color:#374151;
  border:1px solid #d1d5db;
}

/* HomeTwinLab AI menu subscription themes */
.htlab-ai-menu > a,
a.htlab-ai-menu {
    display:inline-block;
    padding:7px 14px;
    border-radius:999px;
    font-weight:700;
    text-decoration:none;
    line-height:1;
}

.htlab-ai-menu--basic > a,
a.htlab-ai-menu--basic {
    background:#0d6efd;
    color:#fff !important;
}

.htlab-ai-menu--starter > a,
a.htlab-ai-menu--starter {
    background:#198754;
    color:#fff !important;
}

.htlab-ai-menu--expert > a,
a.htlab-ai-menu--expert {
    background:linear-gradient(135deg,#f5d76e,#d4af37);
    color:#222 !important;
}

/* HomeTwinLab AI menu subscription themes */
.htlab-ai-menu > a,
a.htlab-ai-menu {
    display:inline-block;
    padding:7px 14px;
    border-radius:999px;
    font-weight:700;
    line-height:1;
}

.htlab-ai-menu--basic > a,
a.htlab-ai-menu--basic {
    background:#0d6efd;
    color:#fff !important;
}

/* Compact HomeTwinLab AI menu button */
.htlab-ai-menu > a,
a.htlab-ai-menu {
    display:inline-block !important;
    padding:4px 10px !important;
    border-radius:6px !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    text-decoration:none !important;
    font-size:inherit !important;
}

.htlab-ai-menu--basic > a,
a.htlab-ai-menu--basic {
    background:#0d6efd !important;
    color:#fff !important;
}

.htlab-ai-menu--starter > a,
a.htlab-ai-menu--starter {
    background:#198754 !important;
    color:#fff !important;
}

.htlab-ai-menu--expert > a,
a.htlab-ai-menu--expert {
    background:linear-gradient(135deg,#f5d76e,#d4af37) !important;
    color:#222 !important;
}

/* Final compact AI menu button override */
li.htlab-ai-menu {
    display:inline-flex !important;
    align-items:center !important;
    background:transparent !important;
}

li.htlab-ai-menu > a,
.htlab-ai-menu > a,
a.htlab-ai-menu {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    padding:4px 10px !important;
    margin:0 0 0 4px !important;

    border-radius:7px !important;
    line-height:1.2 !important;
    font-size:14px !important;
    font-weight:700 !important;

    text-decoration:none !important;
}

li.htlab-ai-menu--basic > a,
.htlab-ai-menu--basic > a,
a.htlab-ai-menu--basic {
    background:#0d6efd !important;
    color:#fff !important;
}

li.htlab-ai-menu--starter > a,
.htlab-ai-menu--starter > a,
a.htlab-ai-menu--starter {
    background:#198754 !important;
    color:#fff !important;
}

li.htlab-ai-menu--expert > a,
.htlab-ai-menu--expert > a,
a.htlab-ai-menu--expert {
    background:linear-gradient(135deg,#f5d76e,#d4af37) !important;
    color:#222 !important;
}

/* Twin Assistant button +10% */
li.htlab-ai-menu > a,
.htlab-ai-menu > a,
a.htlab-ai-menu {
    padding:5px 11px !important;
    font-size:18px !important;
    border-radius:8px !important;
}

/* Product cards shortcode */
.htlab-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 980px;
  margin: 32px auto;
}

.htlab-product-card {
  background: #fff;
  border: 1px solid #d8dee3;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.htlab-product-card--featured {
  border-color: #0f766e;
}

.htlab-product-kicker {
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.htlab-product-card h2 {
  margin: 8px 0 10px;
  font-size: 30px;
}

.htlab-product-card p {
  font-size: 17px;
  line-height: 1.5;
  color: #475569;
}

.htlab-product-card ul {
  margin: 20px 0;
  padding-left: 20px;
}

.htlab-product-card li {
  margin: 8px 0;
}

.htlab-product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 13px 20px;
  border-radius: 10px;
  background: #0f766e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.htlab-product-button:hover {
  background: #115e59;
  color: #fff;
}

@media (max-width: 760px) {
  .htlab-products {
    grid-template-columns: 1fr;
  }
}

/* HomeTwinLab source attribution chips */
.htlab-source-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.htlab-source-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid #b7d7d2;
    background: #ecfdf5;
    color: #0f766e;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
}

.htlab-source-chip:hover {
    background: #d1fae5;
    color: #115e59;
}
