/* The Combine index (Sprint 8): the list of models (GET /index) and one model's page (GET /index/{slug}).
   Chart colours: the line #4F8AE0 and the ringed model year #B87C17 passed the dataviz palette check on the dark
   surface; sale dots are neutral grey (context, not a category). */

/* ---------------------------------------------------------------- shared */

/* The server-drawn charts (app/charts.py). Its line, band, rings and end label carry their colour inline, so they
   have no rule here (one would override it); everything else takes the theme's tokens, so both themes hold. Text
   sizes are in the SVG (14 px axis, 15 px labels at the drawn width). */
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); }
.chart .dot { fill: var(--muted); opacity: .5; }         /* a sale: neutral grey under the line */
.chart .hit { cursor: pointer; }                          /* the 12 px tap circle (iOS sends taps to a pointer) */
.chart .ad { fill: var(--text); stroke: var(--surface); stroke-width: 2; }  /* the marked ad's diamond, on a panel */
.chart .lab { fill: var(--text); font-weight: 500; }      /* "This ad" */
.chart .mkt { stroke: var(--muted); }                     /* the market line, the only dashed one */


/* ---------------------------------------------------------------- model page (index_model.html) */

/* the two chart colours as tokens for the legend swatches and the chosen model year (charts.LINE, charts.YEAR) */
.im-chart { --im-line: #4F8AE0; --im-year: #B87C17; }

.im-head { display: flex; flex-direction: column; gap: 2px; }
.im-crumb { font-size: var(--fs-small); color: var(--muted); }
.im-crumb a, .im-lead a, .im-after a { padding-block: 13px; }  /* a 44 pt target inside the line, the line unmoved */
.im-head-row { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.im-head-main { flex: 1 1 560px; min-width: 0; }
.im-name { font-size: var(--fs-title); font-weight: 600; }
.im-lead { margin-top: 6px; }
.im-big { font-size: var(--fs-price); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.im-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.im-sub { margin: 2px 0 10px; font-size: var(--fs-small); color: var(--muted); }
.im-sub.im-after { margin: 12px 0 0; }

/* the chart panel: 48 pt range segments, the model-year select, the market toggle, then the line's window */
.im-chart-title { margin-bottom: 12px; }
.im-controls { display: flex; align-items: center; flex-wrap: wrap; gap: var(--gap-tap); margin-bottom: 12px; }
.im-seg {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden;
}
.im-seg a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: var(--tap-lg);
  padding: 0 14px; border-right: 1px solid var(--line); color: var(--muted); font-weight: 500;
}
.im-seg a:last-child { border-right: 0; }
.im-seg a.on { background: var(--text); color: var(--on-accent); }
.im-seg a:focus-visible { outline-offset: -3px; }  /* the group clips an outside ring */
.im-year { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.im-year label { font-size: var(--fs-small); color: var(--muted); }
.im-year select.input { width: auto; min-width: 124px; }
.im-year.on select.input { border-color: var(--im-year); box-shadow: inset 0 0 0 1px var(--im-year); }
.im-toggle {
  display: inline-flex; align-items: center; height: var(--tap-lg); padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500;
}
.im-toggle.on { background: var(--tint-accent); border-color: var(--accent); color: var(--text); }
.im-note { margin-left: auto; font-size: var(--fs-small); color: var(--muted); }
.im-plot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.im-legend {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 0; padding: 0; list-style: none;
  font-size: var(--fs-small); color: var(--muted);
}
.im-legend li { display: inline-flex; align-items: center; gap: 8px; }
.im-sw { flex: none; display: inline-block; }
.im-sw.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); opacity: .6; }
.im-sw.line { width: 22px; height: 3px; border-radius: 2px; background: var(--im-line); }
.im-sw.band {
  width: 22px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--im-line) 30%, transparent);
}
.im-sw.ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--im-year); }
.im-sw.ad { width: 10px; height: 10px; margin: 0 2px; background: var(--text); transform: rotate(45deg); }
.im-sw.mkt { width: 22px; height: 0; border-top: 2px dashed var(--muted); }
/* the tap line: grey until a sale is tapped; the marked ad's line under it */
.im-tap {
  margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: var(--fs-small); color: var(--muted);
}
.im-tap.on { color: var(--text); }
.im-tap b { font-weight: 600; }
.chart .sale.on .dot { fill: var(--text); opacity: 1; }

/* Historical data: six tiles in three columns, then three quieter outlined ones */
.im-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.tile.im-tile {
  min-height: 0; gap: 0; padding: 14px 16px; border-radius: 12px; border-color: transparent;
  background: var(--surface-2);
}
.tile.im-tile.sec { background: transparent; border-color: var(--line); }
.im-tv { margin: 4px 0 2px; font-size: 24px; font-weight: 500; line-height: 1.25; }
.im-tv.none { font-size: var(--fs-body); color: var(--muted); }
.im-ts { font-size: var(--fs-small); color: var(--muted); }

/* Depreciation beside On the market now */
.im-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.im-ret th, .im-ret td { height: 44px; padding: 0 8px; text-align: center; vertical-align: middle; }
.im-ret thead th { padding-bottom: 0; }
.im-ret th[scope=row], .im-ret thead th:first-child {
  padding-left: 0; text-align: left; font-size: var(--fs-small); font-weight: 400; color: var(--muted);
  white-space: nowrap;
}
.im-ret td { font-size: var(--fs-body); font-weight: 500; }
.im-ret td.muted { font-weight: 400; }
.im-line { margin-top: 10px; font-size: var(--fs-small); }
.im-prem { margin-top: 10px; }
.im-prem b { font-weight: 600; }
.btn.im-go { min-height: var(--tap-lg); margin-top: 16px; }

/* Price new: the stored entries, then the form */
.im-flash { margin-bottom: 14px; }
.im-prices td { padding: 10px 14px; vertical-align: middle; }
.im-prices td.b { font-size: var(--fs-body); font-weight: 500; white-space: nowrap; }
.im-src { min-width: 220px; }
.im-src a { padding-block: 13px; }
.im-ps { display: block; margin-top: 2px; color: var(--muted); }
.im-add {
  display: flex; flex-direction: column; gap: 14px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.im-h3 { font-size: var(--fs-body); font-weight: 600; }
.im-add-grid { display: grid; grid-template-columns: 160px minmax(0, 240px) auto; gap: 14px 16px; align-items: end; }
.im-add-grid .im-span { grid-column: 1 / -1; max-width: 720px; }
.im-cur { margin: 0; padding: 0; border: 0; }
.im-cur > legend { float: left; width: 100%; margin: 0; padding: 0; }  /* laid out as a flex item, like .crit-set's */
.im-add .fb-sg { min-height: var(--tap-lg); }
.im-add .btn.primary { align-self: flex-start; min-height: var(--tap-lg); }

/* All sales, newest first; rows outside Canada and the US muted and marked */
.im-sales th, .im-sales td { white-space: nowrap; }
.im-sales td { height: 48px; padding: 0 14px; vertical-align: middle; }
.im-sales td.b { font-size: var(--fs-body); font-weight: 500; }
.im-sales tr.out td { color: var(--muted); }
.im-sales .chip { margin-left: 6px; }
.im-sales a { padding-block: 13px; }
.im-sales .im-more-row td { height: auto; padding: 12px 0 0; border-top: 0; }

.im-missing { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

@media (hover: hover) {
  .im-seg a:not(.on):hover, .im-toggle:hover { color: var(--text); background: var(--surface-3); }
}
@media (max-width: 1024px) {
  .im-cols { grid-template-columns: minmax(0, 1fr); }
  .im-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .im-note { margin-left: 0; }
}
@media (max-width: 720px) {
  .im-tiles, .im-add-grid { grid-template-columns: minmax(0, 1fr); }
  .im-plot .chart { min-width: 720px; }  /* narrower, the chart's text would shrink under 14 px: it scrolls instead */
}


/* ---------------------------------------------------------------- list page (index_list.html) */

/* The header: the page's title (the topbar shows none, so this one is visible) and what the index covers. */
.ix-head { display: flex; flex-direction: column; gap: 4px; }
.ix-title { font-size: var(--fs-title); font-weight: 600; line-height: 1.25; }
.ix-sub { font-size: var(--fs-small); color: var(--muted); }

/* The market block: its words and the 12-month change on the left, the 5-year chart on the right, the season note
   under both. The chart is drawn at 360 x 64 and shrinks with a narrow screen. */
.ix-market { display: flex; flex-direction: column; gap: 12px; }
.ix-mkt-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.ix-mkt-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ix-mkt-fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.ix-big { font-size: var(--fs-price); font-weight: 500; line-height: 1.1; }
.ix-mkt-chart {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; max-width: 100%; margin: 0;
}
.ix-mkt-chart svg { display: block; max-width: 100%; height: auto; }
.ix-mkt-chart figcaption, .ix-season { font-size: var(--fs-small); color: var(--muted); }

/* Find a model: the topbar's search pill (.search, 48 px), wider. */
.search.ix-find { flex: none; width: min(100%, 400px); }

.ix-results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* The models with a line: one card per model, outlined in the accent so it reads as something to tap, the whole card
   the model's link (.ix-name::after covers it) with a chevron at its end. Hover, press and keyboard focus light the
   outline and glow. The column heads that sort are 44 px links above. Heads and cards share the table's columns
   (subgrid), so every figure lines up, right-aligned on one line. Fits 1194 px without its box scrolling; narrower,
   the box scrolls (.table-wrap), with room above and below for the glow. */
.ix-wrap { padding-block: 4px 12px; margin-block: -4px -12px; }
.ix-tbl {
  display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(5, minmax(max-content, 1fr)) 120px 20px;
  column-gap: 20px; row-gap: 8px; font-size: var(--fs-small);
}
.ix-row {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center;
  padding: 0 14px 0 16px; border: 1px solid transparent; white-space: nowrap;
}
@supports not (grid-template-columns: subgrid) {
  .ix-row { grid-template-columns: minmax(150px, 1fr) 104px 140px 190px 64px 170px 120px 20px; column-gap: 20px; }
}
.ix-thead { align-items: end; font-size: var(--fs-label); font-weight: 500; color: var(--muted); }
.ix-row .rt { text-align: right; }
.ix-card {
  position: relative; min-height: 56px; border-radius: var(--radius-sm); background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ix-card:hover, .ix-card:has(.ix-name:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ix-card:active { background: var(--tint-accent); }
.ix-name {
  display: flex; align-items: center; min-height: 54px; font-size: var(--fs-body); font-weight: 500; white-space: normal;
}
.ix-name::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; }
.ix-name:focus-visible { outline: none; }  /* the card's outline shows it */
.ix-go { display: flex; justify-content: flex-end; color: var(--accent); }
.ix-go svg { transform: rotate(-90deg); }
.ix-sort { display: inline-flex; align-items: center; justify-content: flex-end; min-height: var(--tap); min-width: var(--tap); color: var(--muted); }
.ix-sort:hover, .ix-sort.on { color: var(--text); }
.ix-val b { font-size: var(--fs-body); font-weight: 500; }
.ix-spark-col .spark { display: block; }
.ix-rise { color: var(--good-text); }   /* up 2% or more over 12 months */
.ix-fall { color: var(--red-text); }    /* down 2% or more */

/* Fewer than 10 sales: smaller cards of the same kind in three columns (two, then one, on narrower screens). Each is
   the model's link over the whole card (at least 44 px tall): the name and its counts, wrapping under the name when
   they do not fit, the chevron on the right; for a new model, a 44 px link to its predecessor on a line of its own,
   lifted above the card's link so it opens the predecessor. */
.ix-few-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px;
  margin: 0; padding: 0; list-style: none;
}
.ix-few-list li {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  min-width: 0; padding: 0 12px 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: var(--radius-sm); background: var(--surface);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ix-few-list li:hover, .ix-few-list li:has(.ix-few-name:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ix-few-list li:active { background: var(--tint-accent); }
.ix-few-main {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; padding-block: 11px;
}
.ix-few-name { font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
.ix-few-name::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; }
.ix-few-name:focus-visible { outline: none; }
.ix-few-n { font-size: var(--fs-small); color: var(--muted); }
.ix-few-pred {
  position: relative; z-index: 1; grid-column: 1 / -1; margin-top: -8px;
  display: flex; align-items: center; min-height: var(--tap); font-size: var(--fs-small);
}

/* The tie-ins. The dashboard's Combine index panel (dashboard.html): the three makes' 12-month change and the
   expand icon of the KPI tiles in its head, then a card per make in three columns, each the list narrowed to that
   make and outlined like the list page's model cards (accent outline, soft glow, chevron; hover, press and focus
   light it): its name, its 12-month change, its chart (charts.brand_chart, drawn 320 px wide, just under the
   card's inside at 1194 px, so its text is 14 px or more), its facts; one legend under the three. At 1024 px and narrower each
   card is a row with the chart on the right at its own width; under 720 px the chart goes back under the words.
   (The detail panel's "Price history for S780s" link uses _detail.html's own .dp-note link.) */
.ix-dash { --im-line: #4F8AE0; display: flex; flex-direction: column; gap: 14px; }
.ix-dash-head { align-items: center; }
.ix-dash-open { flex: none; margin-left: auto; }
.ix-brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ix-brand {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 16px 14px; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ix-brand:hover, .ix-brand:focus-visible {
  color: var(--text); border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ix-brand:active { background: var(--tint-accent); }
.ixb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.ixb-name { font-size: var(--fs-body); font-weight: 600; color: var(--accent); }
.ixb-fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ixb-big { font-size: var(--fs-price); font-weight: 500; line-height: 1.1; }
.ixb-chart { display: block; margin-top: 4px; }
.ixb-chart svg { display: block; width: 100%; height: auto; }
.chart .bdots { fill: var(--muted); }   /* a brand chart's sales: the model chart's grey, each at 28% opacity */
.ixb-facts { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); color: var(--muted); }
.ix-dash-key { margin: 0; }

@media (max-width: 1024px) {
  .im-cols { grid-template-columns: minmax(0, 1fr); }
  .im-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .im-note { margin-left: 0; }
}
@media (max-width: 720px) {
  .im-tiles, .im-add-grid { grid-template-columns: minmax(0, 1fr); }
  .im-plot .chart { min-width: 720px; }  /* narrower, the chart's text would shrink under 14 px: it scrolls instead */
}


/* ---------------------------------------------------------------- list page (index_list.html) */

/* The header: the page's title (the topbar shows none, so this one is visible) and what the index covers. */
.ix-head { display: flex; flex-direction: column; gap: 4px; }
.ix-title { font-size: var(--fs-title); font-weight: 600; line-height: 1.25; }
.ix-sub { font-size: var(--fs-small); color: var(--muted); }

/* The market block: its words and the 12-month change on the left, the 5-year chart on the right, the season note
   under both. The chart is drawn at 360 x 64 and shrinks with a narrow screen. */
.ix-market { display: flex; flex-direction: column; gap: 12px; }
.ix-mkt-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.ix-mkt-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ix-mkt-fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.ix-big { font-size: var(--fs-price); font-weight: 500; line-height: 1.1; }
.ix-mkt-chart {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; max-width: 100%; margin: 0;
}
.ix-mkt-chart svg { display: block; max-width: 100%; height: auto; }
.ix-mkt-chart figcaption, .ix-season { font-size: var(--fs-small); color: var(--muted); }

/* Find a model: the topbar's search pill (.search, 48 px), wider. */
.search.ix-find { flex: none; width: min(100%, 400px); }

.ix-results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* The models with a line: one card per model, outlined in the accent so it reads as something to tap, the whole card
   the model's link (.ix-name::after covers it) with a chevron at its end. Hover, press and keyboard focus light the
   outline and glow. The column heads that sort are 44 px links above. Heads and cards share the table's columns
   (subgrid), so every figure lines up, right-aligned on one line. Fits 1194 px without its box scrolling; narrower,
   the box scrolls (.table-wrap), with room above and below for the glow. */
.ix-wrap { padding-block: 4px 12px; margin-block: -4px -12px; }
.ix-tbl {
  display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(5, minmax(max-content, 1fr)) 120px 20px;
  column-gap: 20px; row-gap: 8px; font-size: var(--fs-small);
}
.ix-row {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center;
  padding: 0 14px 0 16px; border: 1px solid transparent; white-space: nowrap;
}
@supports not (grid-template-columns: subgrid) {
  .ix-row { grid-template-columns: minmax(150px, 1fr) 104px 140px 190px 64px 170px 120px 20px; column-gap: 20px; }
}
.ix-thead { align-items: end; font-size: var(--fs-label); font-weight: 500; color: var(--muted); }
.ix-row .rt { text-align: right; }
.ix-card {
  position: relative; min-height: 56px; border-radius: var(--radius-sm); background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ix-card:hover, .ix-card:has(.ix-name:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ix-card:active { background: var(--tint-accent); }
.ix-name {
  display: flex; align-items: center; min-height: 54px; font-size: var(--fs-body); font-weight: 500; white-space: normal;
}
.ix-name::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; }
.ix-name:focus-visible { outline: none; }  /* the card's outline shows it */
.ix-go { display: flex; justify-content: flex-end; color: var(--accent); }
.ix-go svg { transform: rotate(-90deg); }
.ix-sort { display: inline-flex; align-items: center; justify-content: flex-end; min-height: var(--tap); min-width: var(--tap); color: var(--muted); }
.ix-sort:hover, .ix-sort.on { color: var(--text); }
.ix-val b { font-size: var(--fs-body); font-weight: 500; }
.ix-spark-col .spark { display: block; }
.ix-rise { color: var(--good-text); }   /* up 2% or more over 12 months */
.ix-fall { color: var(--red-text); }    /* down 2% or more */

/* Fewer than 10 sales: smaller cards of the same kind in three columns (two, then one, on narrower screens). Each is
   the model's link over the whole card (at least 44 px tall): the name and its counts, wrapping under the name when
   they do not fit, the chevron on the right; for a new model, a 44 px link to its predecessor on a line of its own,
   lifted above the card's link so it opens the predecessor. */
.ix-few-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px;
  margin: 0; padding: 0; list-style: none;
}
.ix-few-list li {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  min-width: 0; padding: 0 12px 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: var(--radius-sm); background: var(--surface);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ix-few-list li:hover, .ix-few-list li:has(.ix-few-name:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ix-few-list li:active { background: var(--tint-accent); }
.ix-few-main {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; padding-block: 11px;
}
.ix-few-name { font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
.ix-few-name::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; }
.ix-few-name:focus-visible { outline: none; }
.ix-few-n { font-size: var(--fs-small); color: var(--muted); }
.ix-few-pred {
  position: relative; z-index: 1; grid-column: 1 / -1; margin-top: -8px;
  display: flex; align-items: center; min-height: var(--tap); font-size: var(--fs-small);
}

/* The tie-ins. The dashboard's Combine index panel (dashboard.html) is one link: the market's 12-month change, the
   models that moved most, the expand icon of the KPI tiles. (The detail panel's "Price history for S780s" link uses
   _detail.html's own .dp-note link.) */
a.panel.ix-dash {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 16px 20px; color: var(--text);
  transition: border-color .15s;
}
a.panel.ix-dash:hover { color: var(--text); border-color: var(--line-hover); }
.ix-dash-moved { flex: 1 1 320px; min-width: 0; font-size: var(--fs-small); color: var(--muted); }
.ix-dash .icon-btn { margin-left: auto; }

@media (max-width: 1024px) {
  .ix-few-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ix-brands { grid-template-columns: minmax(0, 1fr); }
  .ix-brand {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-content: start; column-gap: 24px; row-gap: 6px;
    grid-template-areas: "head chart" "fig chart" "facts chart";
  }
  .ixb-head { grid-area: head; }
  .ixb-fig { grid-area: fig; }
  .ixb-facts { grid-area: facts; }
  .ixb-chart { grid-area: chart; align-self: center; margin-top: 0; }
}

@media (max-width: 720px) {
  .ix-few-list { grid-template-columns: minmax(0, 1fr); }
  .ix-brand { display: flex; }
  .ixb-chart { margin-top: 4px; }
  .ix-dash-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .ix-dash-head .panel-sub { grid-column: 1; }
  .ix-dash-open { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .ix-mkt-chart { align-items: flex-start; }
  .search.ix-find { width: 100%; }
}
