/*
 * Live model card, rendered as content rather than a screenshot.
 * Mirrors the portal's own model-card panel for the deployed bundle so the two
 * cannot drift apart visually while quoting the same numbers.
 *
 * Banding matches the portal: for AUC, strong >= .80 and mid >= .70; for R²,
 * strong >= .65 and mid >= .30. Colour is redundant here - every row prints its
 * own value - so the band is an at-a-glance cue, never the only encoding.
 */

.model-card {
  padding: 26px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.model-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
}

.model-card__head h3 {
  margin: 0;
  color: #153f3c;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.model-card__version {
  padding: 4px 12px;
  border: 1px solid rgba(13, 88, 82, 0.22);
  border-radius: 999px;
  background: #eef4f2;
  color: #0f5a52;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.model-card__sub {
  margin: 4px 0 0;
  width: 100%;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.model-card__meta {
  margin: 2px 0 0;
  width: 100%;
  color: #8a9793;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
}

.model-card__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 22px 0 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
}

.model-card__stats li {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.model-card__stats li:last-child { border-right: 0; }

.model-card__stats strong {
  display: block;
  color: #0f7d70;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.model-card__stats span {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.model-card__group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 10px;
}

.model-card__group h4 {
  margin: 0;
  color: #153f3c;
  font-size: 0.98rem;
  font-weight: 780;
}

.model-card__group span {
  color: #8a9793;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.model-card__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-card__rows li {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 62px;
  gap: 14px;
  align-items: center;
  min-height: 32px;
  border-top: 1px solid rgba(13, 88, 82, 0.08);
  color: #3f524e;
  font-size: 0.82rem;
}

.model-card__rows li:first-child { border-top: 0; }

.model-card__rows li > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-card__track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: #edf1ef;
}

.model-card__track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct);
  border-radius: 999px;
  background: var(--band);
}

.model-card__rows li > strong {
  color: #17211d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* Performance bands. Site palette, not the portal's brighter ramp, so the card
   sits inside the page rather than looking pasted in from another product. */
.model-card__rows li { --band: #0f7d70; }
.model-card__rows li[data-band="mid"]  { --band: #c08a12; }
.model-card__rows li[data-band="weak"] { --band: #cf8a78; }

.model-card__foot {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .model-card { padding: 20px 18px 24px; }

  .model-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-card__stats li {
    border-bottom: 1px solid var(--line);
  }

  .model-card__stats li:nth-child(2n) { border-right: 0; }
  .model-card__stats li:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .model-card__rows li {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 4px 10px;
    padding: 8px 0;
  }

  .model-card__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
