/**
 * Model wholesale trend — additive only on top of UI_SYSTEM / page-ms / market-intel.
 * Do not invent a Carmu-app chrome. Tokens: --ink --muted --blue --line --bg --price-size.
 */

body.page-model-trend .modelTrend-layout {
  display: grid;
  gap: 16px;
}

/* Trim switcher styles live in styles.css (body.page-ms) — shared with specs. */

/* Price lives in chart card head (right), not hero — keeps aside btns aligned with specs */
body.page-model-trend .marketChartHead {
  align-items: flex-start;
}
body.page-model-trend .modelTrend-price {
  display: grid;
  gap: 2px;
  text-align: right;
  justify-items: end;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 18rem;
}
body.page-model-trend .modelTrend-priceLabel {
  margin: 0;
  color: var(--muted, #5c6168);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
body.page-model-trend .modelTrend-priceMain {
  color: var(--ink, #17181a);
  font-size: 22px;
  font-weight: var(--price-weight, 800);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
body.page-model-trend .modelTrend-priceSub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0 6px;
  margin: 0;
  color: var(--muted, #5c6168);
  font-size: var(--price-sub-size, 12px);
  font-weight: 550;
  line-height: 1.4;
}
body.page-model-trend .modelTrend-priceDot {
  color: color-mix(in srgb, var(--muted, #5c6168) 50%, transparent);
  font-weight: 700;
}
body.page-model-trend .modelTrend-priceMeta {
  margin: 0;
  color: var(--muted, #5c6168);
  font-size: var(--price-sub-size, 12px);
  line-height: 1.4;
  text-align: right;
}
@media (max-width: 640px) {
  body.page-model-trend .marketChartHead {
    flex-direction: column;
    align-items: stretch;
  }
  body.page-model-trend .modelTrend-price,
  body.page-model-trend .modelTrend-priceMeta {
    text-align: left;
    justify-items: start;
    max-width: none;
  }
  body.page-model-trend .modelTrend-priceSub {
    justify-content: flex-start;
  }
}

body.page-model-trend .modelTrend-msrp {
  margin: 0 0 10px;
}

body.page-model-trend .modelTrend-gateNote {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e5e6e8);
  border-radius: var(--radius, 4px);
  background: var(--tint, #d7e6f4);
  color: var(--ink, #17181a);
  font-size: 13px;
  line-height: 1.45;
}

body.page-model-trend .modelTrend-chartWrap {
  position: relative;
}

body.page-model-trend .modelTrend-chartWrap .marketChart {
  min-height: 360px;
  height: 400px;
  padding: 2px;
}

body.page-model-trend .modelTrend-chartWrap.is-locked .marketChart {
  opacity: 0.92;
}

body.page-model-trend .modelTrend-chartGate {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e5e6e8);
  border-radius: var(--radius, 4px);
  background: var(--bg, #f4f5f6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

body.page-model-trend .modelTrend-chartGate strong {
  color: var(--ink, #17181a);
  font-size: 13px;
  font-weight: 800;
}

body.page-model-trend .modelTrend-chartGate span {
  flex: 1 1 12rem;
  color: var(--muted, #5c6168);
  font-size: 12px;
  line-height: 1.4;
}

body.page-model-trend .modelTrend-explore {
  margin-top: 8px;
}

body.page-model-trend .modelTrend-explore--linksOnly {
  padding: 4px 0 8px;
}

body.page-model-trend .modelTrend-explore .sectionHead {
  margin-bottom: 14px;
}

/* Same table language as intelligence / marketBoard — .tableWrap + .table + marketTrimAct */
body.page-model-trend .modelTrend-exploreBlocks {
  display: grid;
  gap: 16px;
}

body.page-model-trend .modelTrend-exploreBlocks.is-split {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  body.page-model-trend .modelTrend-exploreBlocks.is-split {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
}

body.page-model-trend .modelTrend-exploreBlock {
  min-width: 0;
}

body.page-model-trend .modelTrend-colTitle {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--ink, #17181a);
  line-height: 1.3;
}

body.page-model-trend .modelTrend-exploreBlock .tableWrap {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 12px;
  overflow: hidden;
}

body.page-model-trend .modelTrend-exploreBlock .table {
  margin: 0;
}

body.page-model-trend .modelTrend-exploreBlock .table thead th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted, #667085);
  background: #f8fafc;
  border-bottom: 1px solid var(--line, #e4e7ec);
}

body.page-model-trend .modelTrend-exploreBlock .table tbody tr:hover td {
  background: rgba(var(--blue-rgb), 0.04);
}

body.page-model-trend .modelTrend-exploreBlock .table td {
  vertical-align: middle;
}

body.page-model-trend .modelTrend-brandCell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

body.page-model-trend span.brandLogo.modelTrend-brandLogo {
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--blue, #243f55);
}

@media (max-width: 720px) {
  body.page-model-trend .heroActions {
    display: grid;
    gap: 8px;
  }

  body.page-model-trend .heroActions .btn {
    width: 100%;
    text-align: center;
  }
}
