.result_text {
    --tw-text-opacity: 1;
    color: rgb(100 116 139 / var(--tw-text-opacity, 1));
    font-size: 0.75rem;
    line-height: 1rem;
    margin-bottom: 1rem;
  }

  .form-box textarea,
  .form-box select,
  .form-box input {
    margin: 0px
  }

  .btn:not(.full-width)+.btn:not(.full-width) {
    margin-left: 5px;
  }

  .btn-sm {
    padding: 5px 15px;
    font-size: 0.8rem;
  }

  /* Compare tray aligned to your theme */
  .xcompare-tray {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background:
      linear-gradient(180deg, rgba(0, 71, 103, .98), rgba(0, 118, 142, .94)),
      #004767;
    border-right: 1px solid rgba(48, 215, 230, .5);
    border-top: 1px solid rgba(48, 215, 230, .3);
    border-bottom: 1px solid rgba(48, 215, 230, .3);
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 28px rgba(0, 71, 103, .22);
    padding: 14px 10px;
    width: 210px;
  }

  .xcompare-tray.hidden {
    display: none;
  }

  .xcompare-tray .tray-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .xcompare-tray .tray-title {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(48, 215, 230, .3);
    margin-bottom: 2px;
  }

  .xcompare-tray .tray-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
  }

  .xcompare-tray .tray-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid rgba(48, 215, 230, .55);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 10px;
    width: 100%;
  }

  .xcompare-tray .tray-chip-img {
    width: 42px;
    height: 34px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background: #fff;
  }

  .xcompare-tray .tray-chip-initials {
    width: 42px;
    height: 34px;
    border-radius: 3px;
    flex-shrink: 0;
    background: rgba(0, 188, 212, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
  }

  .xcompare-tray .tray-chip-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .xcompare-tray .tray-chip-model {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .xcompare-tray .tray-chip-manu {
    font-size: 9px;
    color: rgba(255, 255, 255, .65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .xcompare-tray .tray-chip > button {
    flex-shrink: 0;
    margin-left: auto;
  }

  .xcompare-tray .tray-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(48, 215, 230, .3);
  }

  .xcompare-tray .tray-chip button {
    border: none;
    background: none;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
  }

  /* Nav rules handled globally in head.css */

  body.no-hero main {
    padding-top: 110px;
    /* tweak 90–120px if needed to sit perfectly */
  }

  main>section>.container {
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .cnt-call,
  .comment-list li,
  .timeline .panel,
  .header-base,
  main>section.section-base.section-color,
  .section-color .input-text,
  .section-color .input-select,
  .section-color .input-textarea,
  .section-color .form-box,
  .section-color .cnt-box {
    background: #ffffffff;
  }

  h1+p,
  h2+p,
  h3+p,
  h4+p,
  h2+h4,
  h1+h4,
  h2+ul.icon-list,
  h3+ul.icon-list,
  p+h3,
  p+.btn,
  p+h4,
  h4+.btn,
  h4+.btn-text,
  h4+input,
  h4+select,
  h4+textarea,
  p+ul.icon-list,
  p+.btn-text,
  p+table,
  p+pre,
  p+img,
  p+.row,
  p+.img-box,
  p+.media-box,
  p+.cnt-box,
  p+.icon-links,
  p+ul.icon-list,
  .container>.row+.row,
  .container>div+p,
  p+.text-list,
  .container>div+.btn,
  .table+.btn,
  .table+.btn-text,
  h4+div,
  h4+ul,
  h4+ul.icon-list,
  h4+a,
  .slimScrollDiv+.btn,
  h3+.grid-list,
  h3+.slider,
  .text-list+.btn,
  .text-list+.btn-text {
    margin-top: 5px;
  }

  .form-box {
    margin-bottom: 15px;
  }

  /* Make the X-Compare section a positioning context */
  section.section-base {
    position: relative;
  }

  /* Results count bottom-right of the section */
  /* Position context for both bottom items */
  section.section-base {
    position: relative;
  }

  /* Results count stays bottom-right */
  #results-count {
    position: absolute;
    right: 40px;
    bottom: 15px;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1rem;
    color: rgb(100 116 139 / 1);
  }

  /* Disclaimer bottom-left */
  #disclaimer {
    padding-left: 60px;
    font-size: 0.50rem;
    line-height: 1rem;
    color: rgb(100 116 139 / 1);
    text-align: left;
  }

  /* === Uniform card layout for X-Compare === */
  .model-card .img-box {
    position: relative;
    width: 100%;
    display: block;
  }

  /* Image container: square (1:1) — matches 400×400 generated thumbnails */
  .model-card .img-box,
  .model-card .img- {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }

  /* Image fills the container */
  .model-card .img-box > img,
  .model-card .img- > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
  }

  /* Fallback placeholder matches same size */
  .model-card .img-box > .thumb-fallback,
  .model-card .img- > .thumb-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  .xcompare-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
  }

  .xcompare-header-tools {
    display: grid;
    justify-items: end;
    gap: 8px;
  }

  .xcompare-premium-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .xcompare-icon-tool {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 188, 212, .95);
    border-radius: 999px;
    color: #00bcd4;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 71, 103, .08);
  }

  .xcompare-icon-tool:hover {
    background: #00bcd4;
    color: #fff;
  }

  .xcompare-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 92px;
    margin: 10px 0 16px;
    border: 1px solid rgba(0, 188, 212, .22);
    border-radius: 8px;
    background: rgba(239, 250, 252, .8);
    color: #004767;
  }

  .xcompare-loading.is-visible {
    display: flex;
  }

  .xcompare-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(0, 188, 212, .22);
    border-top-color: #00bcd4;
    animation: xcompare-spin .75s linear infinite;
  }

  @keyframes xcompare-spin {
    to { transform: rotate(360deg); }
  }

  .xcompare-title-row h1,
  .xcompare-title-row h4 {
    margin-left: 0;
  }

  .xcompare-token-pill {
    margin-top: 6px;
    flex: 0 0 auto;
    border: 1px solid #bfeaf1;
    background: #eefcff;
    color: #006b7a;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
  }

  @media (max-width: 760px) {
    .xcompare-title-row {
      display: block;
    }

    .xcompare-token-pill {
      display: inline-flex;
      margin-top: 12px;
    }
  }

  .xcompare-access-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #bdeff3;
    border-radius: 8px;
    background: #f0fcfd;
    color: #0f172a;
  }

  .xcompare-access-note strong {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
  }

  .xcompare-access-note span {
    font-size: 12px;
    color: #475569;
  }

  .xcompare-access-actions,
  .xcompare-modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

  .xcompare-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .52);
  }

  .xcompare-modal-backdrop.is-visible {
    display: flex;
  }

  .xcompare-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  }

  .xcompare-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .xcompare-modal h2 {
    margin: 0 32px 8px 0;
    font-size: 24px;
  }

  .xcompare-modal p {
    color: #475569;
  }

  .xcompare-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0;
  }

  .xcompare-tray .tray-actions .btn-border {
    border-color: rgba(255, 255, 255, .68);
    color: #fff;
  }

  .xcompare-tray .tray-actions .btn {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 8px;
  }

  .model-card {
    transition: border-color .18s ease, box-shadow .18s ease;
  }

  .model-card.is-selected {
    border-color: rgba(48, 215, 230, .85) !important;
    box-shadow: 0 0 0 2px rgba(48, 215, 230, .85), 0 14px 32px rgba(0, 71, 103, .16) !important;
  }

  .xcompare-modal-grid > div {
    display: flex;
    flex-direction: column;
    min-height: 158px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
  }

  .xcompare-modal-grid > div.is-featured {
    border-color: rgba(0, 188, 212, .42);
    background: #f3fdff;
    box-shadow: 0 12px 26px rgba(0, 71, 103, .08);
  }

  .xcompare-modal-grid h3 {
    margin: 0 0 8px;
    font-size: 16px;
  }

  .xcompare-modal-grid p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
  }

  .xcompare-modal-grid ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
  }

  .xcompare-modal-more {
    margin-top: auto;
    padding-top: 12px;
    color: #00aabb;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .xcompare-modal-more:hover {
    color: #004767;
    text-decoration: underline;
  }

  .xcompare-library-counts {
    margin: 10px 0 18px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
  }

  .xcompare-library-counts div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .xcompare-library-counts span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #e6fbfd;
    color: #004767;
    font-size: 11px;
  }

  @media (max-width: 720px) {
    .xcompare-access-note,
    .xcompare-modal-grid {
      display: block;
    }

    .xcompare-access-actions,
    .xcompare-modal-grid > div + div {
      margin-top: 12px;
    }
  }

  /* (object-fit is already set per-image in the .model-card rules above) */

  /* Placeholder if no thumbnail exists */
  .model-card .thumb-fallback {
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Caption must be allowed to grow (prevents cut buttons) */
  .model-card .caption {
    overflow: visible;
    /* important: avoid clipping */
    padding-bottom: 16px;
    /* room for the buttons */
  }

  /* Stable horizontal button row */
  .card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  @media (max-width: 600px) {
    .card-actions {
      flex-wrap: wrap;
    }
  }

  /* Optional: nicer grid on large screens, still fine with 1 result */
  @media (min-width: 1200px) {
    .xcompare-col {
      width: 25%;
    }
  }

  /* 4-up */
  @media (min-width: 992px) and (max-width:1199.98px) {
    .xcompare-col {
      width: 33.333%;
    }
  }

  /* 3-up */
  @media (min-width: 768px) and (max-width: 991.98px) {
    .xcompare-col {
      width: 50%;
    }
  }

  /* 2-up */
  @media (max-width: 767.98px) {
    .xcompare-col {
      width: 100%;
    }
  }

  /* 1-up */

  .xcompare-col {
    float: left;
    padding: 0 15px;
  }

  /* works with your bootstrap-grid */

  /* === Customizable grid for results === */
  #results-grid .row {
    display: grid;
    /* default 3 columns, overridable via --grid-cols */
    grid-template-columns: repeat(var(--grid-cols, 3), minmax(260px, 1fr));
    gap: 24px;
    margin: 0;
    /* kill bootstrap's row negative margins */
  }

  /* neutralize bootstrap column sizing inside our grid */
  #results-grid .row>[class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
  }

  /* stretch cards to fill cell and avoid clipped buttons */
  #results-grid .cnt-box {
    height: 100%;
  }

  #results-grid .cnt-box .caption {
    overflow: visible;
  }

  /* Ensure the form wrapper doesn't break the layout */
  #results-grid .cnt-box > form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* keep images neat even when cells change width — square matches 400×400 thumbs */
  #results-grid .cnt-box .img-box,
  #results-grid .cnt-box .img- {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  #results-grid .cnt-box .img-box img,
  #results-grid .cnt-box .img- img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* mobile safety: collapse to 1–2 cols automatically */
  @media (max-width: 768px) {
    #results-grid .row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 520px) {
    #results-grid .row {
      grid-template-columns: 1fr;
    }
  }
  .btn + .btn {
    margin-top: 0px;
}

/* Give the caption some breathing room left/right */
#results-grid .cnt-box .caption{
  padding: 14px 20px 18px;   /* ↑ top | → right | ↓ bottom | ← left */
}

/* Make the button row a true flex row with gap */
#results-grid .cnt-box .caption .mt-3{
  display: flex;
  align-items: center;
  gap: 10px;                 /* spacing between buttons */
  flex-wrap: nowrap;
}

/* (Optional) prevent button text wrapping that can push edges */
#results-grid .cnt-box .caption .mt-3 .btn{
  white-space: nowrap;
}

.model-card .img-box.has-thumb{
  background: #fff !important;
}

.model-card .img-box {
  background: #fff;
}

/* ── Upgrade modal ─────────────────────────────────────────────── */
.xcompare-upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .55);
}
.xcompare-upgrade-modal-backdrop.is-visible {
  display: flex;
}
.xcompare-upgrade-modal {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 71, 103, .22);
}
.xcompare-upgrade-modal-icon {
  font-size: 36px;
  margin-bottom: 10px;
  color: #00bcd4;
}
.xcompare-upgrade-modal h3 {
  font-size: 18px;
  color: #004767;
  margin: 0 0 8px;
}
.xcompare-upgrade-modal p {
  font-size: 14px;
  color: #475569;
  margin: 0 0 22px;
}
.xcompare-upgrade-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.xcompare-upgrade-modal-actions .btn {
  margin: 0;
}


