/* Pareto: the plot, and beside it the one sentence the plot is for. */
.pareto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  padding: 20px;
}

.pareto__legend {
  flex-wrap: wrap;
  margin-bottom: 10px;
  white-space: normal;
}

.pareto__legend i:not(:first-child) {
  margin-inline-start: 12px;
}

.pareto-swatch--core {
  background: var(--k-color-violet);
}

.pareto-swatch--line {
  background: var(--k-color-ink);
}

.pareto-swatch--threshold {
  height: 0;
  background: none;
  border-top: 2px dashed var(--k-color-warning);
}

.pareto__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.pareto__grid {
  stroke: var(--k-color-line);
  stroke-width: 1;
}

.pareto__label {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--k-color-muted);
}

.pareto__label--crossing {
  font-weight: 600;
  fill: var(--k-color-ink);
}

/* Ink let down onto paper: a ceiling, not a series. */
.pareto__unmapped {
  fill: color-mix(in srgb, var(--k-color-ink) 6%, var(--k-color-paper));
}

.pareto__drop {
  stroke: var(--k-color-ink);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.5;
}

.pareto__threshold {
  stroke: var(--k-color-warning);
  stroke-dasharray: 5 5;
  opacity: 0.6;
}

/* The tail is the core's colour let down onto paper, so the two read as one
   series cut at a line rather than as two series. */
.pareto__bar {
  fill: color-mix(in srgb, var(--k-color-violet) 26%, var(--k-color-paper));
}

.pareto__bar--core {
  fill: var(--k-color-violet);
}

.pareto__line {
  fill: none;
  stroke: var(--k-color-ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.pareto__dot {
  fill: var(--k-color-ink);
  stroke: var(--k-color-ink);
}

/* The crossing product. Paper, ringed in ink — the mock-up's lime would sit
   on a light surface, which the system does not allow. */
.pareto__dot--crossing {
  fill: var(--k-color-paper);
  stroke-width: 2.5;
}

.pareto__aside {
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--k-color-line);
}

.pareto__aside strong {
  display: block;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--k-color-violet);
}

.pareto__aside p {
  margin: 10px 0 0;
  font-size: 15px;
}

.pareto__aside small {
  display: block;
  margin: 12px 0 14px;
  font-size: 12px;
  color: var(--k-color-muted);
}

.report-footnote {
  display: block;
  margin: 0 20px 16px;
  font-size: 12px;
  line-height: 1.5;
}

.report-empty {
  padding: 48px 20px;
  text-wrap: balance;
}

.report-method {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--k-color-muted);
  border-top: 1px solid var(--k-color-line);
}

.report-method summary {
  cursor: pointer;
}

.report-method p {
  max-width: 75ch;
  margin: 8px 0 4px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .pareto {
    grid-template-columns: 1fr;
  }

  .pareto__aside {
    padding: 16px 0 0;
    border-top: 1px solid var(--k-color-line);
    border-inline-start: 0;
  }

}

/* One product's page: its picture beside the heading, at the heading's
   scale, and its images in the merchant's order, each opening the full
   picture. The dashed square is a product without a picture. */
.product-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}

.product-head__picture {
  flex-shrink: 0;
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--k-color-line);
  border-radius: 10px;
  background: var(--k-color-line);
}

.product-head__picture--none {
  background: none;
  border-style: dashed;
}

.product-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product-head__meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--k-color-line);
  text-underline-offset: 3px;
}

.product-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 16px 20px;
  list-style: none;
}

.product-media a {
  display: block;
  border-radius: 8px;
}

.product-media img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--k-color-line);
  border-radius: 8px;
  background: var(--k-color-line);
}

.product-media a:hover img {
  border-color: var(--k-color-muted);
}

.product-media a:focus-visible {
  outline: 2px solid var(--k-color-ink);
  outline-offset: 2px;
}

/* The merchant's description, as text, in the text's own direction. */
.product-description {
  max-width: 70ch;
  margin: 0;
  padding: 10px 20px 18px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}

/* The tags DeepSeek suggests for the product: quiet pills, since nothing
   here needs attention, and the line under them saying where they go. The
   frame they load into is lazy, and Turbo loads a lazy frame when it
   scrolls into view; a turbo-frame is inline by default, which with block
   children is a box of no size that never does, so it is made a block. */
.product-tags-frame {
  display: block;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px 20px 0;
  list-style: none;
}

.product-tags__note {
  margin: 0;
  padding: 10px 20px 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--k-color-muted);
}

.product-tags__note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--k-color-line);
  text-underline-offset: 3px;
}

.product-tags__note a:hover {
  text-decoration-color: currentColor;
}
