/* =========================================================
   modelmesh.top — reusable components
   ========================================================= */

/* ---------- Hero routing demo ---------- */

.route-demo {
  position: relative;
  border: 1px solid #2a2f3f;
  border-radius: 17px;
  background:
    linear-gradient(160deg, rgba(26, 30, 41, 0.75), rgba(12, 14, 20, 0.96) 54%),
    #0d0f15;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.015) inset;
  overflow: hidden;
  transform: translateZ(0);
}

.route-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
  pointer-events: none;
}

.route-demo::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(124, 107, 255, 0.1);
  filter: blur(70px);
  pointer-events: none;
}

.route-demo__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}
.route-demo__lights {
  display: flex;
  gap: 5px;
}
.route-demo__lights span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #343b4c;
}
.route-demo__lights span:first-child {
  background: #4c4657;
}
.route-demo__lights span:nth-child(2) {
  background: #454b46;
}
.route-demo__endpoint {
  margin-left: 4px;
  /* flex 子项默认 min-width:auto，长 URL 在窄视口会撑开父容器；显式允许收缩并省略号截断 */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
}
.route-demo__endpoint b {
  color: #a3f2dc;
  font-weight: 500;
}
.route-demo__bar-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.route-demo__bar-status .dot {
  color: var(--teal);
  width: 5px;
  height: 5px;
}

.route-demo__inner {
  position: relative;
  z-index: 1;
  padding: 16px;
}

.route-request {
  position: relative;
  padding: 11px 12px;
  border: 1px solid rgba(124, 107, 255, 0.16);
  border-radius: 8px;
  background: rgba(124, 107, 255, 0.035);
}
.route-request__line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.route-request__method {
  color: #c4bdff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.route-request__path {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-request__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.route-request__meta span + span {
  border-left: 1px solid var(--border);
  padding-left: 9px;
}
.route-request__model {
  color: #e0dcff;
  background: rgba(124, 107, 255, 0.11);
  border-radius: 4px;
  padding: 1px 5px;
}

.route-link {
  position: relative;
  width: 1px;
  height: 18px;
  margin: 0 auto;
  background: linear-gradient(to bottom, rgba(124, 107, 255, 0.5), rgba(124, 107, 255, 0.12));
}
.route-link::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: -1px;
  width: 5px;
  height: 5px;
  border-right: 1px solid rgba(124, 107, 255, 0.4);
  border-bottom: 1px solid rgba(124, 107, 255, 0.4);
  transform: rotate(45deg);
}
.route-link--short {
  height: 13px;
}

.route-gateway {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(35, 213, 171, 0.19);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(35, 213, 171, 0.06), rgba(35, 213, 171, 0.02));
}
.route-gateway__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(35, 213, 171, 0.22);
  border-radius: 6px;
  color: var(--teal);
  background: rgba(35, 213, 171, 0.06);
}
.route-gateway__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.route-gateway__copy strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.route-gateway__copy span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}
.route-gateway__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 8px;
}

.route-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}
.route-nodes::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 213, 171, 0.26) 18%, rgba(35, 213, 171, 0.26) 82%, transparent);
}
.route-nodes::after {
  content: "";
  position: absolute;
  top: -14px;
  left: 16.66%;
  width: 1px;
  height: 14px;
  background: rgba(124, 107, 255, 0.16);
  box-shadow:
    calc(33.33% - 0.5px) 0 0 rgba(124, 107, 255, 0.16),
    calc(66.66% - 0.5px) 0 0 rgba(124, 107, 255, 0.16);
}
.route-node {
  position: relative;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(8, 10, 14, 0.68);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.route-node::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 1px;
  height: 15px;
  background: rgba(124, 107, 255, 0.16);
}
.route-node.is-active {
  border-color: rgba(35, 213, 171, 0.42);
  background: rgba(35, 213, 171, 0.05);
  box-shadow: 0 0 0 1px rgba(35, 213, 171, 0.06), 0 0 26px rgba(35, 213, 171, 0.055);
}
.route-node.is-active::before {
  background: linear-gradient(to bottom, rgba(35, 213, 171, 0.2), rgba(35, 213, 171, 0.75));
}
.route-node__provider {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-node__provider .dot {
  width: 3px;
  height: 3px;
  color: var(--muted-2);
  box-shadow: none;
}
.route-node.is-active .route-node__provider .dot {
  color: var(--teal);
}
.route-node__name {
  color: var(--text-soft);
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-node__latency {
  margin-top: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
}
.route-node.is-active .route-node__latency {
  color: #87ead2;
}
.route-node__check {
  position: absolute;
  top: 7px;
  right: 7px;
  color: var(--teal);
  opacity: 0;
  transition: opacity 0.2s;
}
.route-node.is-active .route-node__check {
  opacity: 1;
}

.route-response {
  padding: 11px 12px;
  border: 1px solid rgba(35, 213, 171, 0.17);
  border-radius: 8px;
  background: rgba(35, 213, 171, 0.025);
}
.route-response__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.route-response__code {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}
.route-response__stream {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}
.route-response__time {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}
.route-response__text {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.55;
  min-height: 32px;
}
.route-response__cursor {
  display: inline-block;
  width: 5px;
  height: 11px;
  margin-left: 2px;
  vertical-align: -1px;
  background: var(--teal);
  opacity: 0.7;
  animation: cursor-blink 1.15s step-end infinite;
}
@keyframes cursor-blink {
  50% { opacity: 0; }
}

.route-metrics {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
}
.route-metrics b {
  color: var(--muted);
  font-weight: 500;
}
.route-metrics__cost {
  margin-left: auto;
  color: #98a1b4;
}
.route-metrics__tag {
  padding: 2px 5px;
  border: 1px solid rgba(124, 107, 255, 0.15);
  border-radius: 3px;
  color: #a9a0e9;
  background: rgba(124, 107, 255, 0.05);
  font-size: 7px;
}

.route-demo__footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--muted-2);
}
.route-demo__footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.route-demo__footer span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  padding-left: 14px;
}
.route-demo__footer b {
  color: #a7b0c2;
  font-weight: 500;
}

/* ---------- Provider strip ---------- */

.provider-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.provider-strip__label {
  max-width: 125px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.provider-strip__items {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.8vw, 38px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.provider-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f687b;
  font-size: 11.5px;
  font-weight: 540;
  transition: color 0.18s;
}
.provider-strip__item:hover {
  color: var(--muted);
}
.p-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pc, var(--muted));
  opacity: 0.65;
}

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(17, 19, 25, 0.56);
}

.feature-card {
  position: relative;
  min-height: 260px;
  padding: 26px 23px 23px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.013), transparent);
  transition: background 0.22s;
}
.feature-card + .feature-card {
  border-left: 1px solid var(--border);
}
.feature-card:hover {
  background: rgba(255, 255, 255, 0.022);
}
.feature-card__icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--purple);
  background: rgba(124, 107, 255, 0.06);
}
.feature-card:nth-child(2) .feature-card__icon {
  color: var(--teal);
  background: rgba(35, 213, 171, 0.05);
}
.feature-card:nth-child(3) .feature-card__icon {
  color: #f0c67a;
  background: rgba(228, 177, 92, 0.05);
}
.feature-card:nth-child(4) .feature-card__icon {
  color: #86b4ff;
  background: rgba(92, 150, 255, 0.05);
}
.feature-card h3 {
  margin-top: 31px;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.feature-card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.feature-card .link-arrow {
  position: absolute;
  bottom: 23px;
  left: 23px;
  color: var(--muted);
  font-size: 11.5px;
}
.feature-card:hover .link-arrow {
  color: var(--text-soft);
}
.feature-card__index {
  position: absolute;
  top: 28px;
  right: 22px;
  color: #343b4c;
  font-family: var(--font-mono);
  font-size: 9px;
}

/* ---------- Code blocks ---------- */

.code-block {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--code-bg);
  overflow: hidden;
}
.code-block__head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}
.code-block__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.code-block__label svg {
  color: var(--muted-2);
}
.code-tabs {
  display: flex;
  align-items: center;
  gap: 1px;
}
.code-tab {
  height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  transition: color 0.16s, background 0.16s;
}
.code-tab:hover {
  color: var(--text-soft);
}
.code-tab.is-active {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.055);
}
.code-block__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.code-copy:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
}
.code-block pre {
  margin: 0;
  padding: 16px 17px;
  overflow: auto;
  color: #bfc6d6;
  font-size: 11.5px;
  line-height: 1.75;
  tab-size: 2;
}
.code-block code {
  font-family: var(--font-mono);
}
.code-block pre .tok-key {
  color: #b6a7ff;
}
.code-block pre .tok-string {
  color: #8de5c8;
}
.code-block pre .tok-comment {
  color: #515b6c;
  font-style: italic;
}
.code-block pre .tok-number {
  color: #e5bf8a;
}
.code-block pre .tok-func {
  color: #88b7ff;
}
.code-block pre .tok-curl {
  color: #9da8ff;
}
.code-block--flush {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.code-block--hero {
  border-color: #2b3041;
  box-shadow: var(--shadow-md);
}
.code-block__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted-2);
  font-size: 10px;
}

/* ---------- Model cards ---------- */

.models-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.models-grid--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.models-grid--market {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(245, 247, 255, 0.014), rgba(17, 19, 25, 0.35));
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.model-card:hover {
  border-color: #343b4e;
  background: linear-gradient(160deg, rgba(245, 247, 255, 0.028), rgba(17, 19, 25, 0.4));
  transform: translateY(-2px);
}
.model-card.is-compared {
  border-color: rgba(124, 107, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(124, 107, 255, 0.06);
}
.model-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.model-card__identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.model-card__identity-copy {
  min-width: 0;
}
.model-card__vendor {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.model-card__name {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.16s;
}
.model-card__name:hover {
  color: #fff;
}
.model-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.model-card__tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 22px;
  margin-top: 10px;
}
.model-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.model-card__spec {
  min-width: 0;
}
.model-card__spec + .model-card__spec {
  padding-left: 12px;
  border-left: 1px solid var(--border-soft);
}
.model-card__spec-label {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.model-card__spec-value {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-card__prices {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.model-card__price {
  min-width: 0;
}
.model-card__price span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.4;
}
.model-card__price strong {
  display: inline-block;
  margin-top: 3px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.model-card__price small {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}
.model-card__price--out strong {
  color: #d7cfae;
}
.model-card__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--border-soft);
}
.model-card__actions .btn-detail {
  flex: 1;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.model-card__actions .btn-detail:hover {
  color: var(--text);
}
.model-card__compare {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.model-card__compare:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}
.model-card__compare.is-on {
  color: #b6adff;
  background: rgba(124, 107, 255, 0.09);
}
.model-card__status {
  flex: 0 0 auto;
}
.model-card__key-note {
  color: var(--muted-2);
  font-size: 8.5px;
}
.model-card__badge-new {
  position: absolute;
  top: -1px;
  right: 13px;
  padding: 2px 6px;
  border: 1px solid rgba(35, 213, 171, 0.2);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  color: var(--teal);
  background: rgba(35, 213, 171, 0.07);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

/* list view */
.models-grid.is-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.models-grid.is-list .model-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(180px, 1.8fr) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 14px 17px;
}
.models-grid.is-list .model-card:hover {
  transform: none;
}
.models-grid.is-list .model-card__top {
  align-items: center;
}
.models-grid.is-list .model-card__desc {
  display: none;
}
.models-grid.is-list .model-card__tags {
  display: none;
}
.models-grid.is-list .model-card__specs {
  margin: 0;
  padding: 0;
  border: 0;
}
.models-grid.is-list .model-card__prices {
  margin: 0;
  gap: 22px;
}
.models-grid.is-list .model-card__actions {
  margin: 0;
  padding: 0;
  border: 0;
  justify-content: flex-end;
}
.models-grid.is-list .model-card__actions .btn-detail {
  flex: 0;
  gap: 8px;
}
.models-grid.is-list .model-card__compare span {
  display: none;
}
.models-grid.is-list .model-card__status {
  display: none;
}

/* Loading card shimmer */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

/* ---------- Small model rows ---------- */

.mini-model-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mini-model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--panel);
  transition: background 0.16s;
}
.mini-model-row + .mini-model-row {
  border-top: 1px solid var(--border-soft);
}
.mini-model-row:hover {
  background: var(--panel-2);
}
.mini-model-row__name {
  min-width: 0;
  flex: 1;
}
.mini-model-row__name strong {
  display: block;
  font-size: 12.5px;
  font-weight: 550;
}
.mini-model-row__name span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.mini-model-row__price {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

/* ---------- Stat blocks ---------- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(17, 19, 25, 0.55);
}
.stat-block {
  padding: 17px 18px;
}
.stat-block + .stat-block {
  border-left: 1px solid var(--border);
}
.stat-block__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}
.stat-block__value {
  margin-top: 7px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 460;
  letter-spacing: -0.06em;
}
.stat-block__value small {
  margin-left: 3px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0;
}
.stat-block__meta {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
}

/* ---------- Sections inside cards ---------- */

.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-soft);
}
.definition {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.definition:nth-child(odd) {
  padding-right: 20px;
}
.definition:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--border-soft);
}
.definition dt {
  color: var(--muted);
}
.definition dd {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: right;
}

/* ---------- Accordion ---------- */

.accordion {
  border-top: 1px solid var(--border);
}
.accordion__item {
  border-bottom: 1px solid var(--border);
}
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 20px 2px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 540;
  text-align: left;
}
.accordion__trigger svg {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.accordion__item.is-open .accordion__trigger svg {
  transform: rotate(45deg);
  color: var(--teal);
}
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s var(--ease);
}
.accordion__item.is-open .accordion__panel {
  grid-template-rows: 1fr;
}
.accordion__panel-inner {
  overflow: hidden;
}
.accordion__panel p {
  max-width: 780px;
  padding: 0 2px 21px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- Data table ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
  font-size: 12.5px;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 43px;
  padding: 0 14px;
  color: var(--muted-2);
  background: #151821;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  height: 51px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
  white-space: nowrap;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.017);
}
.data-table td strong {
  color: var(--text-soft);
  font-weight: 500;
}
.data-table .cell-mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.data-table th.is-sortable {
  cursor: pointer;
  user-select: none;
}
.data-table th.is-sortable:hover {
  color: var(--text-soft);
}
.data-table .sort-ind {
  display: inline-flex;
  margin-left: 4px;
  color: var(--teal);
}
.data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* ---------- Tabs ---------- */

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
  transition: all 0.16s;
}
.segmented button:hover {
  color: var(--text-soft);
}
.segmented button.is-active {
  color: var(--text);
  background: #242936;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.step {
  position: relative;
  padding: 24px 24px 4px 0;
}
.step + .step {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.step__index {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(124, 107, 255, 0.25);
  border-radius: 50%;
  color: #b6adff;
  background: rgba(124, 107, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 9px;
}
.step h3 {
  margin-top: 15px;
  font-size: 16px;
}
.step p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.step .code-block {
  margin-top: 14px;
}
.step .code-block pre {
  padding: 12px;
  font-size: 10px;
}

/* ---------- Feature detail split ---------- */

.split-feature {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 60px;
  align-items: center;
}
.split-feature--reverse {
  grid-template-columns: 1.14fr 0.86fr;
}
.split-feature__copy h2 {
  margin-top: 14px;
  font-size: clamp(30px, 3.4vw, 43px);
}
.split-feature__copy p {
  max-width: 490px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}
.split-feature__points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 23px;
  list-style: none;
}
.split-feature__points li {
  display: flex;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12.5px;
}
.split-feature__points svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--teal);
}
.split-feature__actions {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ---------- Provider blocks ---------- */

.provider-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-size: 10.5px;
}

/* ---------- Logo / branding details ---------- */

.divider-label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Icons generic ---------- */

.icon-box {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
