.production-trend {
  --trend-ink: #1c584e; --trend-start: #74c996; --trend-end: #217d6d; --trend-tint: #e5f4ec;
  min-width: 0; margin: 0 0 20px; padding: clamp(15px, 2.5vw, 24px);
  border: 1px solid #d6e4d9; border-radius: 16px; color: #233e32;
  background: #fff; box-shadow: 0 4px 16px #1d452609;
}
.production-trend[data-interval="weeks"] {
  --trend-ink: #344d85; --trend-start: #96bdf3; --trend-end: #516ab7; --trend-tint: #edf0fa;
}
.trend-heading, .trend-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trend-heading h2 { margin: 0; font-size: clamp(18px, 2vw, 23px); letter-spacing: -.03em; }
.trend-heading p, .trend-message { margin: 5px 0 0; color: #52665a; font-size: 13px; }
.trend-switch { display: inline-flex; padding: 3px; border: 1px solid #d9e4dd; background: #f4f7f4; border-radius: 10px; }
.trend-switch button { border: 0; border-radius: 7px; padding: 8px 12px; background: transparent; color: #42584a; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.trend-switch button[aria-pressed="true"] { background: var(--trend-ink); color: #fff; }
.trend-unit { margin: 20px 0 9px; color: #56675c; font-size: 11px; }
.trend-plot { --plot-height: 132px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; }
.trend-axis { height: var(--plot-height); display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: #5e7062; font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
.trend-axis span:first-child { transform: translateY(-45%); }
.trend-axis span:last-child { transform: translateY(45%); }
.trend-columns { position: relative; display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); }
.trend-columns::before { content: ''; position: absolute; inset: 0 0 auto; height: var(--plot-height); pointer-events: none; background: linear-gradient(to bottom, #dde6df 1px, transparent 1px) 0 0 / 100% 50%; border-bottom: 1px solid #bccfc1; }
.production-trend .trend-column { position: relative; padding: 0; min-width: 0; border: 0; background: transparent; color: #536a5a; font: inherit; cursor: pointer; }
.trend-track { display: flex; align-items: flex-end; justify-content: center; height: var(--plot-height); }
.trend-bar { display: block; width: min(62%, 50px); height: var(--height); min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(0deg, var(--trend-end), var(--trend-start)); }
.trend-bar.is-zero { background: #b0c6b6; }
.trend-column[aria-pressed="true"] .trend-bar, .trend-column:hover .trend-bar { outline: 2px solid var(--trend-ink); outline-offset: -1px; }
.trend-column[aria-pressed="true"] .trend-tick { font-weight: 750; color: var(--trend-ink); }
.trend-tick { display: block; text-align: center; margin-top: 7px; white-space: nowrap; font-size: clamp(9px, 1.3vw, 12px); }
.trend-footer { align-items: stretch; margin-top: 15px; padding-top: 12px; border-top: 1px solid #e1e9e2; font-size: 12px; }
.trend-footer [data-trend-detail] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; padding: 6px 10px; border-radius: 7px; color: var(--trend-ink); background: var(--trend-tint); }
.trend-footer [data-trend-detail] span::first-letter { text-transform: uppercase; }
.trend-footer strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.trend-total { display: flex; gap: 3px; flex-direction: column; text-align: right; }
.trend-total span { color: #57665c; font-size: 11px; }
.trend-message { padding: 9px 0; }
.production-trend button:focus-visible { outline: 2px solid var(--trend-ink); outline-offset: 2px; }
@media (max-width: 660px) {
  .trend-plot { --plot-height: 112px; }
  .production-trend[data-interval="days"] .trend-tick { visibility: hidden; }
  .production-trend[data-interval="days"] .trend-column:is(:nth-child(3n + 1):not(:nth-child(13)), :last-child) .trend-tick { visibility: visible; }
}
@media (max-width: 450px) { .trend-heading { align-items: flex-start; } .trend-total { text-align: left; } }
.trend-lots { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e1e9e2; }
.trend-lots h3 { margin: 0 0 6px; color: var(--trend-ink); font-size: 12px; font-weight: 650; }
.trend-lots ul { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0; padding: 0; }
.trend-lots li { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; max-width: 100%; padding: 4px 8px; border-radius: 6px; background: var(--trend-tint); color: var(--trend-ink); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.trend-lots li span { font-variant-numeric: tabular-nums; }
