/* Food price pages */
.viz-root, body { --series-1: #2a78d6; --rise: #d0453f; --fall: #2a78d6; --viz-neutral: #f0efec; --viz-grid: #e8eaf1; }
@media (prefers-color-scheme: dark) { body { --series-1: #3987e5; --rise: #e66767; --fall: #3987e5; --viz-neutral: #383835; --viz-grid: #232a4a; } }
.crumbs span { color: #7d84a8; }
.stat-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: 1fr 1fr; } }
.stat-tile { padding: 20px; box-shadow: var(--shadow); }
.stat-tile .label { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-tile strong { display: block; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat-tile strong.small { font-size: 18px; line-height: 1.3; }
.stat-tile.main { border-top: 4px solid var(--purple); }
.stat-tile.main strong { font-size: clamp(28px, 4vw, 38px); }
.stat-tile small { color: var(--muted); font-size: 13px; }
.up { color: var(--rise); }
.down { color: var(--fall); }
.chart-card { margin-bottom: 18px; box-shadow: var(--shadow); }
.chart-card h2, .facts h2 { font-size: 19px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head .fine { margin: 4px 0 0; }
.small-btn { padding: 7px 12px !important; font-size: 13px !important; }
.viz-host { position: relative; width: 100%; margin-top: 8px; }
.viz { display: block; width: 100%; height: auto; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { fill: var(--muted); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.viz-line { fill: none; stroke: var(--series-1); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.viz-area { fill: color-mix(in srgb, var(--series-1) 10%, transparent); }
.viz-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.viz-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-host rect:focus-visible { outline: none; }
.viz-host:focus-within { outline: 2px solid var(--purple); outline-offset: 4px; border-radius: 8px; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow); white-space: nowrap; }
.viz-tip strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.viz-tip div + div { color: #b8bedb; }
.viz-bars, .viz-div { display: grid; gap: 10px; margin-top: 14px; }
.viz-bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.viz-bar-label { color: var(--muted); }
.viz-bar-track { height: 14px; }
.viz-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--series-1) 55%, transparent); }
.viz-bar.high { background: var(--series-1); }
.viz-bar.low { background: color-mix(in srgb, var(--series-1) 30%, transparent); }
.viz-bar-value { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.viz-div-row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; gap: 12px; align-items: center; font-size: 14px; color: inherit; text-decoration: none; border-radius: 8px; padding: 2px 4px; }
a.viz-div-row:hover { background: var(--surface-2); color: inherit; }
.viz-div-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-div-track { position: relative; height: 14px; background: linear-gradient(90deg, transparent calc(50% - 1px), var(--viz-neutral) calc(50% - 1px), var(--viz-neutral) calc(50% + 1px), transparent calc(50% + 1px)); }
.viz-div-bar { position: absolute; top: 0; height: 100%; }
.viz-div-bar.up { left: 50%; background: var(--rise); border-radius: 0 4px 4px 0; }
.viz-div-bar.down { right: 50%; background: var(--fall); border-radius: 4px 0 0 4px; }
.viz-div-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .viz-div-row { grid-template-columns: 110px 1fr 58px; gap: 8px; font-size: 13px; } .viz-bar-row { grid-template-columns: 92px 1fr auto; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.facts p { color: var(--text); margin: 12px 0; }
.data-table { margin-top: 14px; }
.data-table td small { display: block; color: var(--muted); font-size: 12.5px; }
.prices-table-card { box-shadow: var(--shadow); }
.table-tools { display: grid; grid-template-columns: 1fr 220px; gap: 10px; }
.table-tools input, .table-tools select { margin-top: 0; }
@media (max-width: 600px) { .table-tools { grid-template-columns: 1fr; } }
.prices-table td:first-child a { font-weight: 600; text-decoration: none; color: var(--text); }
.prices-table td:first-child a:hover { color: var(--purple); }
.prices-table td:nth-child(n+2), .prices-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.prices-table td.up, .prices-table td.down { font-weight: 600; }
.spark { display: inline-block; vertical-align: middle; }
.spark polyline { fill: none; stroke: var(--series-1); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 640px) { .trend-col { display: none; } .prices-table td:last-of-type:not(.trend-col) { padding-right: 0; } }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
a.card.price-card { display: grid; gap: 2px; text-decoration: none; color: inherit; padding: 16px 18px; }
.price-card:hover { color: inherit; border-color: color-mix(in srgb, var(--purple) 40%, var(--line)); }
.pc-name { font-weight: 600; }
.pc-unit { color: var(--muted); font-size: 12.5px; }
.price-card strong { font-size: 20px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.pc-change { font-size: 13px; font-weight: 600; }
.pc-change:not(.up):not(.down) { color: var(--muted); }
.source { margin-top: 24px; }
.faq { margin-top: 24px; }
.stat-tile strong.up, .pc-change.up, .prices-table td.up { color: var(--rise); }
.stat-tile strong.down, .pc-change.down, .prices-table td.down { color: var(--fall); }
.stat-tile.states p { display: grid; grid-template-columns: 1fr; justify-items: start; gap: 2px; margin: 10px 0 0; }
.stat-tile.states b { font-size: 17px; }
.stat-tile.states em { font-style: normal; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tag-cheap, .tag-dear { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; }
.tag-cheap { background: color-mix(in srgb, var(--fall) 14%, transparent); color: var(--fall); }
.tag-dear { background: color-mix(in srgb, var(--rise) 14%, transparent); color: var(--rise); }
.per { font-weight: 600; color: var(--muted); }
.stat-tile.main small.per { font-size: 15px; color: var(--text); }
.price-card strong small.per { font-size: 13px; }
.prices-table td small { font-weight: 500; }
.qty-card { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px 24px; align-items: center; margin-bottom: 18px; box-shadow: var(--shadow); }
@media (max-width: 900px) { .qty-card { grid-template-columns: 1fr; } }
.qty-card h2 { font-size: 19px; }
.qty-card .fine { margin: 4px 0 0; }
.bags { display: flex; gap: 12px; flex-wrap: wrap; }
.bag { flex: 1 1 140px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bag span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.bag strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.qty { margin: 0; font-weight: 600; font-size: 14px; }
.qty span { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.qty input { flex: 0 1 140px; min-width: 0; }
.qty input { max-width: 140px; margin-top: 6px; }
.qty output { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 6px; }
.prices-table-card { overflow-x: auto; }
@media (max-width: 640px) {
  .prices-table { font-size: 13.5px; }
  .prices-table th { font-size: 10.5px; white-space: normal; letter-spacing: .03em; }
  .prices-table td:nth-child(n+2), .prices-table th:nth-child(n+2) { white-space: normal; }
  .prices-table td:nth-child(3), .prices-table td:nth-child(4) { min-width: 74px; }
  .prices-table td + td, .prices-table th + th { padding-left: 8px; }
}
