
/* the home's figure band, as Shopify's home metrics: today against yesterday, a chart card on hover or focus */
section[data-home-band][data-demo-band] { position: relative; z-index: 20;
  /* the app's type scale: its text-* utilities carry these sizes inline (no variables), so the band names them once */
  --db-t-body: 0.84375rem; --db-t-body-sm: 0.78125rem; --db-t-title: 0.9375rem; --db-t-metric: 1.5rem; }
section[data-home-band][data-demo-band] .db-row { display: flex; justify-content: center; align-items: stretch; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
section[data-home-band][data-demo-band] .db-m { position: relative; display: flex; min-width: 0;
  --db-ink: var(--text-faint); --db-spark: var(--chart-neutral-2); --db-spark-on: var(--text-muted); }
section[data-home-band][data-demo-band] .db-m[data-dir="up"] { --db-spark-on: var(--chart-success); }
section[data-home-band][data-demo-band] .db-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; min-width: 8.75rem;
  padding: 0.5rem 0.875rem; border-radius: var(--radius-lg); cursor: default; outline: none;
  transition: background-color var(--duration-sm) var(--ease-out); }
section[data-home-band][data-demo-band] .db-m:hover > .db-hit,
section[data-home-band][data-demo-band] .db-m:focus-within > .db-hit { background-color: var(--row-hover); }
section[data-home-band][data-demo-band] .db-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
section[data-home-band][data-demo-band] .db-label { font-size: var(--db-t-body); line-height: var(--text-body--line-height); color: var(--db-ink);
  text-decoration: underline dotted var(--border-strong); text-decoration-thickness: 1px; text-underline-offset: 0.25rem;
  white-space: nowrap; transition: color var(--duration-sm) var(--ease-out); }
section[data-home-band][data-demo-band] .db-line { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
section[data-home-band][data-demo-band] .db-value { font-size: var(--db-t-title); line-height: var(--text-title--line-height); font-weight: 600;
  letter-spacing: -0.006em; font-variant-numeric: tabular-nums; color: var(--db-ink); transition: color var(--duration-sm) var(--ease-out); }
section[data-home-band][data-demo-band] .db-spark { width: 3rem; height: 1.125rem; flex: none; overflow: visible; }
section[data-home-band][data-demo-band] .db-spark path { fill: none; stroke: var(--db-spark); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke var(--duration-sm) var(--ease-out); }
section[data-home-band][data-demo-band] .db-delta { display: inline-flex; align-items: center; gap: 0.125rem; font-size: var(--db-t-body); line-height: 1;
  font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-faint); white-space: nowrap; }
section[data-home-band][data-demo-band] .db-delta[data-dir="up"] { color: var(--pos); }
section[data-home-band][data-demo-band] .db-arrow { width: 0.75rem; height: 0.75rem; flex: none; }
section[data-home-band][data-demo-band] .db-arrow path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
section[data-home-band][data-demo-band] .db-row:has(> .db-m:hover) > .db-m:hover,
section[data-home-band][data-demo-band] .db-row:not(:has(> .db-m:hover)) > .db-m:focus-within,
section[data-home-band][data-demo-band] .db-row:not(:has(> .db-m:hover, > .db-m:focus-within)) > .db-m:first-child { --db-ink: var(--text); --db-spark: var(--db-spark-on); }

/* the card: below its metric, over the greeting and the cards, never past the page's column */
section[data-home-band][data-demo-band] .db-pop { position: absolute; top: 100%; left: 50%; z-index: 1; width: 34rem; max-width: calc(100vw - 2rem);
  padding-top: 0.5rem; translate: -50% 0; pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(0.25rem);
  transition: opacity var(--duration-sm) var(--ease-out), transform var(--duration-sm) var(--ease-out), visibility 0s linear var(--duration-sm); }
section[data-home-band][data-demo-band] .db-m:first-child > .db-pop { left: 0; translate: 0 0; }
section[data-home-band][data-demo-band] .db-m:last-child > .db-pop { left: auto; right: 0; translate: 0 0; }
section[data-home-band][data-demo-band] .db-row:has(> .db-m:hover) > .db-m:hover > .db-pop,
section[data-home-band][data-demo-band] .db-row:not(:has(> .db-m:hover)) > .db-m:focus-within > .db-pop { pointer-events: auto; visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
section[data-home-band][data-demo-band] .db-card { padding: 1.25rem 1.25rem 1rem; border: 1px solid var(--card-line); border-radius: var(--card-corner);
  background: var(--surface); box-shadow: var(--card-rest-hover), var(--shadow-md); text-align: left; }
section[data-home-band][data-demo-band] .db-fig { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
section[data-home-band][data-demo-band] .db-fig-value { font-size: var(--db-t-metric); line-height: var(--text-metric--line-height); font-weight: 650;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
section[data-home-band][data-demo-band] .db-fig .db-delta { font-size: var(--db-t-body); }
section[data-home-band][data-demo-band] .db-title { margin: 0.625rem 0 0; font-size: var(--db-t-body); line-height: var(--text-body--line-height); font-weight: 600; color: var(--text); }
section[data-home-band][data-demo-band] .db-sub { margin: 0.125rem 0 0; font-size: var(--db-t-body-sm); line-height: var(--text-body-sm--line-height); color: var(--text-muted); }

/* the chart: an inline SVG stretched to the card for its lines and grid, the axis words in the page's own type */
section[data-home-band][data-demo-band] .db-chart { --db-plot-h: 10.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--db-plot-h) auto;
  column-gap: 0.625rem; margin-top: 1.25rem; }
section[data-home-band][data-demo-band] .db-y { position: relative; min-width: 2rem; height: var(--db-plot-h); }
section[data-home-band][data-demo-band] .db-y span, section[data-home-band][data-demo-band] .db-x span { position: absolute; font-size: var(--text-meta); line-height: 1; color: var(--text-faint);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
section[data-home-band][data-demo-band] .db-y span { right: 0; translate: 0 -50%; }
section[data-home-band][data-demo-band] .db-plot { position: relative; height: var(--db-plot-h); }
section[data-home-band][data-demo-band] .db-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
section[data-home-band][data-demo-band] .db-plot path { fill: none; vector-effect: non-scaling-stroke; }
section[data-home-band][data-demo-band] .db-grid { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
section[data-home-band][data-demo-band] .db-now { stroke: var(--chart-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
section[data-home-band][data-demo-band] .db-prev { stroke: var(--chart-blue-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 4.5; }
section[data-home-band][data-demo-band] .db-x { position: relative; grid-column: 2; height: 1.75rem; }
section[data-home-band][data-demo-band] .db-x span { top: 0.75rem; translate: -50% 0; }
section[data-home-band][data-demo-band] .db-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.375rem 1.25rem; margin: 0.875rem 0 0; padding: 0; list-style: none;
  font-size: var(--text-meta); line-height: var(--text-meta--line-height); color: var(--text-muted); }
section[data-home-band][data-demo-band] .db-legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
section[data-home-band][data-demo-band] .db-key { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--chart-blue); }
section[data-home-band][data-demo-band] .db-key[data-series="prev"] { background: var(--chart-blue-2); }

/* phones and narrow tablets: the four as two rows of two, the card across the band's width under them */
@media (width < 48rem) {
  section[data-home-band][data-demo-band] .db-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem; max-width: 30rem; margin-inline: auto; }
  section[data-home-band][data-demo-band] .db-m { position: static; }
  section[data-home-band][data-demo-band] .db-hit { width: 100%; min-width: 0; padding: 0.5rem 0.75rem; }
  section[data-home-band][data-demo-band] .db-line { flex-wrap: wrap; row-gap: 0.25rem; }
  section[data-home-band][data-demo-band] .db-pop, section[data-home-band][data-demo-band] .db-m:first-child > .db-pop, section[data-home-band][data-demo-band] .db-m:last-child > .db-pop {
    left: 50%; right: auto; width: min(34rem, 100%); max-width: none; translate: -50% 0; }
  section[data-home-band][data-demo-band] .db-card { padding: 1rem 1rem 0.875rem; }
  section[data-home-band][data-demo-band] .db-chart { --db-plot-h: 8.5rem; margin-top: 1rem; }
}
@media (width < 30rem) {
  section[data-home-band][data-demo-band] .db-x-minor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  section[data-home-band][data-demo-band] .db-pop, section[data-home-band][data-demo-band] .db-hit, section[data-home-band][data-demo-band] .db-label, section[data-home-band][data-demo-band] .db-value, section[data-home-band][data-demo-band] .db-spark path { transition: none; }
  section[data-home-band][data-demo-band] .db-pop { transform: none; }
}
