/* Remodel chip card: a paint-chip strip of real median remodel costs */
.chipcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
@media (min-width: 820px) {
  .chipcard { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); padding: 1.5rem; }
}
.chipcard__strip {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.chip {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 56px;
  padding: .8rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  background: color-mix(in srgb, var(--brand) var(--t, 8%), var(--surface));
  transition: box-shadow .15s ease;
}
.chip:last-child { border-bottom: 0; }
.chip--1 { --t: 5%; }
.chip--2 { --t: 10%; }
.chip--3 { --t: 15%; }
.chip--4 { --t: 21%; }
.chip--5 { --t: 28%; }
.chip:hover { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--brand) 50%, transparent); }
.chip[aria-pressed="true"] { box-shadow: inset 5px 0 0 var(--brand); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.chip__n {
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--ink);
  min-width: 1.5rem;
}
.chip__name { flex: 1; }
.chipcard__panel .result-value { margin: .25rem 0; }
.chipscale {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: .6rem;
}
.chipscale li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem .75rem;
  font-size: .9rem;
  color: var(--muted);
}
.chipscale li.is-active { color: var(--ink); font-weight: 600; }
.chipscale__track {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 60%, var(--surface));
  overflow: hidden;
}
.chipscale__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 35%, var(--surface));
  transition: background .2s ease;
}
.chipscale li.is-active .chipscale__fill { background: var(--brand); }
@media (prefers-reduced-motion: reduce) {
  .chip, .chipscale__fill { transition: none; }
}

/* Stats grid: one consistent grid of 8 tiles, uniform 16px gaps */
.section--tight:has(> lg-stats) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 820px) {
  .section--tight:has(> lg-stats) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.section--tight:has(> lg-stats) > .section__head { grid-column: 1 / -1; margin: 0; }
.section--tight:has(> lg-stats) > lg-stats {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  gap: 16px;
  margin: 0;
  padding: 0;
}
@media (min-width: 820px) {
  .section--tight:has(> lg-stats) > lg-stats { grid-column: span 2; }
  .section--tight:has(> lg-stats) > lg-stats:first-of-type { grid-column: 1 / -1; }
}
.section--tight:has(> lg-stats) > lg-stats > :only-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.section--tight:has(> lg-stats) > lg-stats > :only-child > * { margin: 0; }