/**
 * Fresh produce index — all colors from design-tokens.css (--fp-*, --color-revenue-*, etc.)
 */

.produce-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 0 1.25rem;
}

.produce-page-info-box {
  margin: 0 0 1rem;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
}

.produce-page-info-box .produce-hero {
  margin-bottom: 0.6rem;
  align-items: flex-start;
  text-align: left;
}

.produce-page-info-box .produce-alert:last-child {
  margin-bottom: 0;
}

.produce-page-info-box .produce-breadcrumb {
  justify-content: flex-start;
}

.produce-page-info-box .produce-meta {
  justify-content: flex-start;
}

.produce-page-info-box .produce-next-update {
  justify-content: flex-start;
}

.produce-page-info-box .produce-alert {
  text-align: left;
}

.produce-page-info-box .produce-meta--tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
  width: 100%;
  margin: 0 0 0.9rem;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  min-height: 88px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile-value,
.produce-page-info-box .produce-meta--tiles .produce-meta__last-update,
.produce-page-info-box .produce-meta--tiles .produce-meta__market-day {
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile-note {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text-secondary);
  opacity: 0.9;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__market-day {
  display: block;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__market-day-select {
  width: 100%;
  max-width: none;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile--next .produce-next-update {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  gap: 4px 8px;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile--next .produce-next-update__label,
.produce-page-info-box .produce-meta--tiles .produce-meta__tile--next .produce-next-update__meta {
  font-size: 0.78rem;
}

.produce-page-info-box .produce-meta--tiles .produce-meta__tile--next .produce-next-update__progress,
.produce-page-info-box .produce-meta--tiles .produce-meta__tile--next .produce-next-update__refresh {
  display: none !important;
}

.produce-next-update {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 12px;
  padding: 10px 14px;
  max-width: 28rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  touch-action: manipulation;
}

.produce-next-update__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.produce-next-update__countdown {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.produce-next-update__meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-next-update__meta time {
  font-weight: 600;
  color: var(--text-primary);
}

.produce-next-update.is-due .produce-next-update__countdown {
  color: var(--accent-solid);
}

.produce-next-update__progress {
  flex: 1 1 100%;
  height: 4px;
  margin-top: 2px;
  border-radius: 999px;
  background-color: var(--border-color);
  overflow: hidden;
}

.produce-next-update__progress-bar {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--accent-solid),
    #9b51e0,
    var(--accent-solid)
  );
  background-size: 200% 100%;
  animation: produce-next-update-progress 1.2s ease-in-out infinite;
}

@keyframes produce-next-update-progress {
  0% {
    transform: translateX(-100%);
    background-position: 0% 50%;
  }
  100% {
    transform: translateX(350%);
    background-position: 100% 50%;
  }
}

.produce-next-update.is-updating {
  border-color: var(--input-focus-border);
}

.produce-next-update.is-updating .produce-next-update__countdown {
  color: var(--accent-solid);
}

.produce-next-update.is-updating .produce-next-update__meta {
  opacity: 0.65;
}

.produce-next-update__refresh {
  flex: 1 1 100%;
  margin-top: 4px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.produce-next-update__refresh:hover {
  background-color: var(--btn-primary-hover);
}

.produce-next-update__refresh:active {
  transform: scale(0.98);
}

.produce-next-update.is-ready {
  border-color: var(--input-focus-border);
}

.produce-next-update.is-ready .produce-next-update__countdown {
  color: var(--accent-solid);
}

.produce-line-detail-page .produce-next-update,
.produce-market-detail-page .produce-next-update,
.produce-explorer-page .produce-next-update,
.produce-product-hub-page .produce-hero .produce-next-update {
  justify-content: flex-start;
  margin-left: 0;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .produce-catalog-page .produce-hero .produce-next-update {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: auto;
  }
}

.produce-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin: 0 0 0.5rem;
  padding: 8px 12px 8px 8px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-secondary);
  text-decoration: none;
  touch-action: manipulation;
  transition:
    background-color 0.12s ease,
    color 0.12s ease,
    opacity 0.08s ease,
    transform 0.08s ease;
}

.produce-back-link:hover {
  color: var(--text-primary);
  background-color: var(--btn-icon-hover);
}

.produce-back-link__icon {
  font-size: 0.75rem;
  opacity: 0.85;
}

.produce-back-link__label {
  max-width: min(70vw, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.produce-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1rem;
  row-gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0 0 1.25rem;
}

.produce-meta__last-update {
  display: inline-flex;
  align-items: center;
}

.produce-meta strong {
  color: var(--text-primary);
}

.produce-meta__market-day {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.produce-meta__market-day-label {
  flex-shrink: 0;
  margin: 0;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.produce-meta__market-day-select {
  flex: 0 1 auto;
  width: auto;
  min-width: 7.5rem;
  max-width: min(100%, 11.5rem);
  min-height: 0;
  height: 2.05rem;
  padding: 0.2rem 2rem 0.2rem 0.55rem;
  border-radius: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.2;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
}

.produce-meta__market-day-select:focus {
  outline: none;
  border-color: var(--input-focus-border);
}

@media (max-width: 420px) {
  .produce-meta__market-day {
    flex-basis: 100%;
    justify-content: center;
  }

  .produce-meta__market-day-select {
    max-width: min(100%, 16rem);
  }
}

.produce-hero-compare {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.produce-hero-compare strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (min-width: 1024px) {
  .produce-catalog-page .produce-hero-compare {
    align-self: flex-start;
    text-align: left;
  }
}

.produce-hub-card--no-compare-trade .produce-hub-card__price-value {
  color: var(--text-secondary);
  font-weight: 600;
}

.produce-hub-card--no-compare-trade [data-compare-no-trade] {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.produce-hub-card--listed-no-sales .produce-hub-card__price-value,
.produce-hub-card--listed-no-sales [data-compare-listed-no-sales] {
  color: var(--text-secondary);
}

.produce-hub-card--listed-no-sales [data-compare-listed-no-sales] {
  font-size: 0.8125rem;
}

.produce-hub-card--loadshedding {
  position: relative;
  overflow: hidden;
  border-color: var(--fp-loadshedding-band-border);
}

.produce-hub-card--loadshedding .produce-hub-card__title,
.produce-hub-card--loadshedding .produce-hub-card__code,
.produce-hub-card--loadshedding .produce-hub-card__stat,
.produce-hub-card--loadshedding .produce-hub-card__cta {
  position: relative;
  z-index: 2;
}

.produce-loadshedding-band {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 1;
  width: 155%;
  margin: 0;
  padding: 14px 8px;
  transform: translate(-50%, -50%) rotate(-32deg);
  transform-origin: center center;
  text-align: center;
  pointer-events: none;
  background: var(--fp-loadshedding-band-bg);
  border-block: 2px solid var(--fp-loadshedding-band-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.produce-loadshedding-band__title {
  display: block;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--fp-loadshedding-title);
}

.produce-loadshedding-band__sub {
  display: block;
  margin-top: 4px;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fp-loadshedding-sub);
}

.produce-hub-card--loadshedding .produce-hub-card__stat--secondary {
  font-size: 0.8125rem;
}

.produce-alert--partial-feed,
.produce-alert--loadshedding {
  background: var(--fp-loadshedding-band-bg);
  border-color: var(--fp-loadshedding-band-border);
  color: var(--fp-loadshedding-sub);
}

.produce-alert--loadshedding strong {
  color: var(--fp-loadshedding-title);
}

.produce-empty--loadshedding .produce-empty__loadshedding-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fp-loadshedding-title);
}

.produce-explorer-day-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.produce-explorer-day-controls__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.produce-explorer-day-controls__chip {
  touch-action: manipulation;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  font-size: 0.8125rem;
  font-weight: 600;
  transition:
    background-color 0.12s ease,
    border-color 0.15s ease;
}

.produce-explorer-day-controls__chip:hover {
  background-color: var(--btn-secondary-hover);
  border-color: var(--border-color);
}

.produce-explorer-day-controls__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}

.produce-explorer-day-controls__input:focus {
  outline: none;
  border-color: var(--input-focus-border);
}

.produce-explorer-empty-layout .produce-explorer-empty--page {
  margin: 0;
}

.produce-alert--historical-day {
  background: var(--fp-alert-bg);
  border-color: var(--fp-alert-border);
  color: var(--fp-alert-text);
}

.produce-alert--historical-day a {
  color: var(--accent-solid);
  font-weight: 600;
}

.produce-alert--historical-day a:hover {
  text-decoration: underline;
}

.produce-alert {
  background: var(--fp-alert-bg);
  border: 1px solid var(--fp-alert-border);
  color: var(--fp-alert-text);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.produce-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.produce-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--fp-market-card-border);
  background: var(--fp-chip-bg);
  color: var(--fp-chip-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.produce-chip:hover {
  background: var(--fp-chip-hover-bg);
  color: var(--text-primary);
}

.produce-chip.is-active {
  background: var(--btn-brand-bg);
  border-color: var(--btn-brand-bg);
  color: var(--btn-brand-text);
}

.produce-chip-rev {
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-revenue);
  letter-spacing: -0.02em;
}

.produce-chip:hover .produce-chip-rev {
  color: var(--color-revenue-strong);
}

.produce-chip.is-active .produce-chip-rev {
  color: var(--btn-brand-text-subtle);
}

.produce-market-top {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.produce-market-top a {
  display: block;
  background: var(--fp-market-card-bg);
  border: 1px solid var(--fp-market-card-border);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--fp-market-card-shadow);
  touch-action: manipulation;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.produce-market-top a:hover {
  border-color: var(--brand-farm);
  box-shadow: 0 2px 6px var(--brand-farm-muted-bg);
}

.produce-market-top .mt-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-farm);
  letter-spacing: 0.01em;
  margin: 0 0 2px;
  line-height: 1.25;
}

.produce-market-top .mt-code {
  font-size: 0.62rem;
  color: var(--text-secondary);
  margin: 0 0 4px;
}

.produce-market-top .mt-revenue {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-revenue);
  margin: 0 0 4px;
  line-height: 1.2;
}

.produce-market-top .mt-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 2px;
  line-height: 1.2;
}

.produce-market-top .mt-sub {
  font-size: 0.62rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.25;
}

.produce-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  text-align: left;
}

.produce-catalog-section {
  margin: 0 0 2rem;
}

.produce-catalog-section:last-child {
  margin-bottom: 0;
}

/* —— Index catalog: wide desktop + filter rail —— */

.produce-catalog-filters {
  display: none;
}

.produce-catalog-filters__divider {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.produce-catalog-filters__fieldset {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.produce-catalog-filters__compare-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.produce-catalog-filters__compare-hint strong {
  color: var(--text-primary);
  font-weight: 600;
}

.produce-catalog-wide {
  display: block;
}

@media (min-width: 1024px) {
  #app-content:has(.produce-catalog-page) {
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
  }

  .produce-catalog-page.container {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .produce-catalog-page .produce-hero {
    text-align: left;
  }

  .produce-catalog-wide {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .produce-catalog-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: calc(var(--app-header-height) + 12px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    touch-action: manipulation;
  }

  body.has-verification-banner .produce-catalog-filters {
    top: calc(var(--app-header-height) + var(--site-banner-height, 50px) + 12px);
  }

  .produce-catalog-filters__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .produce-catalog-filters__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
  }

  .produce-catalog-filters__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .produce-catalog-filters__radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
  }

  .produce-catalog-filters__radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    touch-action: manipulation;
  }

  .produce-catalog-filters__radio input {
    accent-color: var(--accent-solid);
  }

  .produce-catalog-filters__status {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    min-height: 1.2em;
  }

  .produce-catalog-main .produce-hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

[data-catalog-card][hidden] {
  display: none;
}

/* Collapsible filter shell: tablet + mobile (< 1024px) */
.produce-catalog-filters-shell {
  margin: 0 0 1.25rem;
}

.produce-catalog-filters-shell__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 0.12s ease,
    opacity 0.08s ease,
    transform 0.08s ease;
}

.produce-catalog-filters-shell__toggle:hover {
  background-color: var(--btn-icon-hover);
}

.produce-catalog-filters-shell__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.produce-catalog-filters-shell.is-open .produce-catalog-filters-shell__chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.produce-catalog-filters-shell__panel {
  display: block;
}

.produce-catalog-filters-shell__panel-inner {
  min-height: 0;
}

@media (max-width: 1023px) {
  .produce-catalog-filters-shell__toggle {
    display: flex;
  }

  .produce-catalog-filters-shell__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: grid-template-rows;
  }

  .produce-catalog-filters-shell__panel-inner {
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .produce-catalog-filters-shell.is-open .produce-catalog-filters-shell__panel {
    grid-template-rows: 1fr;
  }

  .produce-catalog-filters-shell.is-open .produce-catalog-filters-shell__panel-inner {
    opacity: 1;
  }

  .produce-catalog-filters-shell .produce-catalog-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    touch-action: manipulation;
  }

  .produce-catalog-filters-shell .produce-catalog-filters__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .produce-catalog-filters-shell .produce-catalog-filters__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
  }

  .produce-catalog-filters-shell .produce-catalog-filters__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .produce-catalog-filters-shell .produce-catalog-filters__radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
  }

  .produce-catalog-filters-shell .produce-catalog-filters__radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    touch-action: manipulation;
  }

  .produce-catalog-filters-shell .produce-catalog-filters__status {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    min-height: 1.2em;
  }

  .produce-catalog-filters-shell .produce-catalog-filters__compare-hint {
    margin: 0 0 12px;
  }
}

@media (pointer: coarse) {
  .produce-catalog-filters-shell__toggle:active {
    transform: scale(0.99);
    opacity: 0.92;
  }

}

.produce-breadcrumb--truncate {
  flex-wrap: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.produce-breadcrumb--truncate a,
.produce-breadcrumb--truncate > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 42%;
}

.produce-breadcrumb__sep {
  flex-shrink: 0;
}

/* —— Trading line detail page —— */

.produce-line-detail-page .produce-hero {
  text-align: left;
}

.produce-line-section {
  margin: 0 0 2rem;
}

.produce-line-history-cta {
  margin: 0 0 1.15rem;
}

.produce-line-history-cta--bottom {
  margin: 0 0 1.35rem;
}

.produce-line-history-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.produce-line-history-cta__button:hover {
  background-color: var(--btn-primary-hover);
}

.produce-line-history-cta__button:active {
  transform: scale(0.98);
}

.produce-line-history-cta__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.produce-line-history-shell {
  margin: 0 0 1rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.produce-line-history-shell .produce-breadcrumb {
  justify-content: flex-start;
  margin: 0;
}

.produce-line-history-shell__filters-label {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.produce-line-history-page .produce-line-section {
  margin-bottom: 1.5rem;
}

.produce-line-history-heading {
  margin-bottom: 0.95rem;
}

.produce-line-history-heading__sub {
  margin: -0.5rem 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--text-secondary);
}

.produce-line-history-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 1rem;
}

.produce-line-history-filters > * {
  min-width: 0;
}

.produce-line-history-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.produce-line-history-filters__field > span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-line-history-filters__field select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.produce-line-history-mobile-picker__trigger {
  display: none;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-primary);
  text-align: left;
  padding: 10px 12px;
  font-size: 0.88rem;
}

.produce-line-history-mobile-picker {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.produce-line-history-mobile-picker__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
}

.produce-line-history-mobile-picker__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 70vh;
  background: var(--bg-surface);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.produce-line-history-mobile-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.produce-line-history-mobile-picker__head h3 {
  margin: 0;
  font-size: 0.92rem;
}

.produce-line-history-mobile-picker__close {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.produce-line-history-mobile-picker__list {
  margin: 0;
  padding: 8px;
  list-style: none;
  overflow: auto;
  max-height: calc(70vh - 56px);
}

.produce-line-history-mobile-picker__option {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 10px 11px;
  text-align: left;
  margin-bottom: 8px;
  font-size: 0.84rem;
}

.produce-line-history-mobile-picker__option.is-active {
  border-color: var(--accent-solid);
}

body.produce-history-line-picker-open {
  overflow: hidden;
}

.produce-line-history-filters__actions {
  display: flex;
  align-items: flex-end;
}

.produce-line-history-filters__actions .produce-line-history-cta__button {
  width: 100%;
}

.text-right {
  text-align: right;
}

.produce-line-history-page .app-data-table-card__toolbar {
  align-items: center;
  gap: 0.75rem;
}

.produce-line-history-page .app-data-table-card__title {
  margin: 0;
}

.produce-line-history-presets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.produce-line-history-preset-card {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  touch-action: manipulation;
}

.produce-line-history-preset-card__badge {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-inverse);
  background-color: var(--accent-solid);
}

.produce-line-history-preset-card__title {
  margin-bottom: 0.35rem;
}

.produce-line-history-sparkline-wrap {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--input-bg);
  padding: 12px;
  margin: 0 0 1.2rem;
  position: relative;
}

.produce-line-history-sparkline-wrap__title {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.produce-line-history-sparkline-wrap__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.55rem;
}

.produce-line-history-sparkline-wrap__head .produce-line-history-sparkline-wrap__title {
  margin: 0;
}

.produce-line-history-range-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.produce-line-history-range-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}

.produce-line-history-range-switch__btn.is-active {
  border-color: var(--accent-solid);
  background: color-mix(in srgb, var(--accent-solid) 18%, var(--bg-surface));
  color: var(--text-primary);
}

.produce-line-history-sparkline-wrap__hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-line-history-sparkline-stage {
  position: relative;
  --history-cross-x: 50%;
  touch-action: none;
}

.produce-line-history-sparkline {
  width: 100%;
  height: 130px;
  display: block;
}

.produce-line-history-chart-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.produce-line-history-chart-crosshair__v,
.produce-line-history-chart-crosshair__h {
  position: absolute;
  background-color: var(--text-secondary);
  opacity: 0.8;
  pointer-events: none;
}

.produce-line-history-chart-crosshair__v {
  top: 0;
  bottom: 0;
  left: var(--history-cross-x);
  width: 2px;
  transform: translateX(-50%);
}

.produce-line-history-chart-crosshair__h {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.produce-line-history-chart-crosshair__knob {
  position: absolute;
  left: var(--history-cross-x);
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--accent-solid);
  background-color: var(--bg-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: manipulation;
}

.produce-line-history-sparkline polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.produce-line-history-sparkline__clearance {
  stroke: var(--state-selected-border);
}

.produce-line-history-sparkline__price {
  stroke: var(--color-warn-border);
}

.produce-line-history-sparkline__price-marker {
  fill: var(--color-warn-border);
  stroke: var(--bg-surface);
  stroke-width: 1.5;
}

.produce-line-history-sparkline__cursor {
  stroke: var(--text-secondary);
  stroke-width: 1.25;
  stroke-dasharray: 4 3;
  opacity: 0.75;
  pointer-events: none;
}

.produce-line-history-sparkline__hover-dot {
  fill: var(--color-warn-border);
  stroke: var(--bg-surface);
  stroke-width: 1.75;
  pointer-events: none;
}

.produce-line-history-chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 180px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-surface) 96%, black);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.produce-line-history-chart-tooltip__date {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.produce-line-history-chart-tooltip__metric {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
}

.produce-line-history-chart-tooltip__metric span {
  color: var(--text-secondary);
}

.produce-line-history-chart-tooltip__metric strong {
  color: var(--text-primary);
  font-weight: 700;
}

.produce-line-history-sparkline__turnover {
  stroke: var(--accent-solid);
}

.produce-line-history-sparkline-wrap__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 0.7rem 0 0;
}

.produce-line-history-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-line-history-legend::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.produce-line-history-legend--clearance {
  color: var(--state-selected-border);
}

.produce-line-history-legend--price {
  color: var(--color-warn-border);
}

.produce-line-history-legend--turnover {
  color: var(--accent-solid);
}

.produce-line-section__intro {
  margin: -0.35rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.produce-line-section__intro[data-history-loading] {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
}

.produce-line-section__intro[data-history-loading]::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-solid);
  animation: produce-history-spinner 0.7s linear infinite;
}

@keyframes produce-history-spinner {
  to {
    transform: rotate(360deg);
  }
}

.produce-line-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  margin: 0;
}

.produce-line-stat {
  margin: 0;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
}

.produce-line-stat dt {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-line-stat dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.produce-line-stat__muted {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.produce-line-stat--highlight dd {
  color: var(--accent-solid);
}

.produce-line-stat--revenue dd {
  color: var(--color-revenue-strong);
}

.produce-line-table-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.12s ease;
}

.produce-line-table-link:hover {
  color: var(--accent-solid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.produce-row--linked[data-line-href] {
  cursor: pointer;
  touch-action: manipulation;
}

.produce-row--linked[data-line-href]:active td {
  opacity: 0.92;
}

.produce-td-line {
  vertical-align: middle;
  max-width: 200px;
}

.produce-line-history-table__current {
  outline: 2px solid var(--accent-solid);
  outline-offset: -2px;
}

.produce-line-history-table__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-inverse);
  background-color: var(--accent-solid);
}

.produce-line-history-table__link a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
}

.produce-line-history-table__link a:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}

@media (max-width: 767px) {
  .produce-line-history-page.container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .produce-line-history-page .produce-back-link {
    margin-bottom: 0.35rem;
  }

  .produce-line-history-page .produce-breadcrumb {
    font-size: 0.78rem;
  }

  .produce-line-history-heading {
    font-size: 1.06rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .produce-line-history-filters {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 0.75rem;
  }

  .produce-line-history-filters__actions {
    align-items: stretch;
  }

  .produce-line-history-filters__field > span {
    font-size: 0.74rem;
  }

  .produce-line-history-filters__field select {
    min-height: 44px;
    width: 100%;
    max-width: 100%;
    font-size: 0.84rem;
  }

  .produce-line-history-filters__field[data-mobile-picker-ready] select {
    display: none;
  }

  .produce-line-history-filters__field[data-mobile-picker-ready] .produce-line-history-mobile-picker__trigger {
    display: block;
  }

  .produce-line-history-sparkline-wrap {
    padding: 12px 10px;
    margin-bottom: 1rem;
  }

  .produce-line-history-sparkline-wrap__title {
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
  }

  .produce-line-history-sparkline-wrap__head {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0.65rem;
  }

  .produce-line-history-range-switch {
    justify-content: flex-start;
  }

  .produce-line-history-range-switch__btn {
    min-height: 34px;
    font-size: 0.8rem;
    padding: 5px 11px;
  }

  .produce-line-history-sparkline-wrap__hint {
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
  }

  .produce-line-history-sparkline {
    height: min(52vw, 220px);
    min-height: 200px;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-sparkline-stage {
    min-height: 200px;
    border-radius: 10px;
    background-image: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--border-color) 55%, transparent) 0,
      color-mix(in srgb, var(--border-color) 55%, transparent) 1px,
      transparent 1px,
      transparent 33.33%,
      color-mix(in srgb, var(--border-color) 55%, transparent) 33.33%,
      color-mix(in srgb, var(--border-color) 55%, transparent) calc(33.33% + 1px),
      transparent calc(33.33% + 1px),
      transparent 66.66%,
      color-mix(in srgb, var(--border-color) 55%, transparent) 66.66%,
      color-mix(in srgb, var(--border-color) 55%, transparent) calc(66.66% + 1px),
      transparent calc(66.66% + 1px)
    );
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-sparkline polyline {
    stroke-width: 4.5;
    vector-effect: non-scaling-stroke;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-sparkline__price-marker {
    stroke-width: 2;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-crosshair__v {
    width: 3px;
    opacity: 0.95;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-crosshair__h {
    height: 3px;
    opacity: 0.95;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-crosshair__knob {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-tooltip {
    display: block;
    position: static;
    width: 100%;
    max-width: none;
    margin: 0 0 0.65rem;
    padding: 10px 12px;
    box-shadow: none;
    border-radius: 12px;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-tooltip__date {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-tooltip__metric {
    font-size: 0.86rem;
    margin-bottom: 4px;
  }

  .produce-line-history-sparkline-wrap--mobile-cross .produce-line-history-chart-tooltip__metric strong {
    font-size: 0.92rem;
  }

  .produce-line-history-sparkline-wrap__legend {
    gap: 0.55rem 1rem;
    margin-top: 0.7rem;
    font-size: 0.86rem;
  }

  .produce-line-history-sparkline-wrap__legend .produce-line-history-legend::before {
    width: 12px;
    height: 12px;
  }

  .produce-line-history-page .app-data-table-card {
    border-radius: 12px;
  }

  .produce-line-history-page .app-data-table-card__toolbar {
    padding: 10px 12px;
  }

  .produce-line-history-page .app-data-table-card__title {
    width: 100%;
  }

  .produce-line-history-page .app-data-table-card__scroll {
    overflow: visible;
    height: auto;
  }

  .produce-line-history-page .app-data-table {
    min-width: 0;
  }

  .produce-line-history-page .produce-line-history-table__badge {
    margin-left: 6px;
    padding: 2px 7px;
  }

  .produce-line-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

}

@media (min-width: 768px) and (max-width: 1023px) {
  .produce-line-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .produce-line-history-filters__actions {
    grid-column: 1 / -1;
  }
}

/* Shorter table toolbar title on phones (full title still available to screen readers) */
.produce-table-card-title {
  min-width: 0;
}

.produce-table-card-title__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.produce-table-card-title__compact {
  display: none;
}

.produce-table-card-title__full {
  display: inline;
}

@media (max-width: 767px) {
  .produce-table-card-title__full {
    display: none;
  }

  .produce-table-card-title__compact {
    display: inline;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  #app-content .produce-table-card-title.app-data-table-card__title {
    font-size: 0.88rem;
  }
}

.market-panel {
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + var(--app-header-height, 56px) + 8px);
  border: 1px solid var(--fp-panel-border);
  border-radius: 14px;
  margin-bottom: 12px;
  background: var(--fp-panel-bg);
  overflow: visible;
  box-shadow: var(--fp-market-card-shadow);
}

.market-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 10px;
  background: var(--fp-panel-summary-bg);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  touch-action: manipulation;
  transition:
    background 0.12s ease,
    opacity 0.08s ease,
    transform 0.08s ease;
}

body.has-verification-banner .market-panel {
  scroll-margin-top: calc(
    env(safe-area-inset-top, 0px) + var(--app-header-height, 56px) + var(--site-banner-height, 50px) + 8px
  );
}

.market-panel[open] summary {
  border-bottom: 1px solid var(--fp-panel-border);
}

.market-panel summary::after {
  content: '+';
  font-size: 1.05rem;
  line-height: 1;
  color: var(--brand-farm);
  font-weight: 700;
  flex-shrink: 0;
  margin-left: auto;
}

.market-panel[open] summary::after {
  content: '−';
}

.market-panel summary:hover {
  background: var(--fp-panel-summary-hover);
}

@media (pointer: coarse) {
  .market-panel summary:active {
    transform: scale(0.995);
    opacity: 0.94;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-panel summary {
    transition: background 0.12s ease;
  }

  .market-panel summary:active {
    transform: none;
    opacity: 1;
  }
}

.market-summary-name {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.market-summary-name span {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.72rem;
  margin-left: 4px;
}

.market-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
}

.market-summary-stats em {
  font-style: normal;
  color: var(--text-primary);
  font-weight: 700;
}

.market-panel__body {
  padding: 0 8px 12px;
}

.produce-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.produce-table.app-data-table thead th {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.produce-table th,
.produce-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fp-table-border);
  text-align: left;
  vertical-align: top;
}

.produce-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--table-header-bg);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.produce-table tbody tr:nth-child(odd) {
  background-color: var(--table-row-bg);
}

.produce-table tbody tr:nth-child(even) {
  background-color: var(--table-row-zebra);
}

.produce-table tbody tr:hover {
  background: var(--table-row-hover);
}

.produce-td-line,
.produce-td-variety {
  vertical-align: middle;
}

.produce-td-class {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
}

@media (max-width: 767px) {
  /* Line column already shows variety · class · size on mobile cards */
  .produce-table tbody td.produce-td-class {
    display: none;
  }
}

.produce-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.produce-table .price,
.produce-table .rev {
  text-align: right;
  font-weight: 600;
  color: var(--color-revenue);
  font-variant-numeric: tabular-nums;
}

.produce-table tfoot td {
  background: var(--fp-tfoot-bg);
  border-bottom: none;
  border-top: 2px solid var(--fp-tfoot-border);
  vertical-align: middle;
}

.produce-table tfoot .produce-tfoot-label {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.produce-table tfoot .produce-tfoot-revenue {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-revenue-strong);
  font-variant-numeric: tabular-nums;
}

.produce-table .variety {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 140px;
}

.produce-footnote {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.produce-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  background: var(--fp-empty-bg);
  border-radius: 14px;
  border: 1px dashed var(--fp-empty-border);
}

.produce-desktop-only {
  display: block;
}

.produce-mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .produce-market-top {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Sticky market header: flex + order is more reliable than grid + ::after on <summary> (esp. iOS). */
  .market-panel summary {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  }

  .market-summary-name {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 48px);
    font-size: 0.875rem;
    line-height: 1.3;
    padding: 6px 8px 6px 0;
    align-self: center;
  }

  .market-summary-name > span {
    display: inline;
  }

  .market-panel summary::after {
    order: 2;
    flex: 0 0 auto;
    align-self: center;
    margin-left: auto;
    width: 40px;
    height: 40px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--btn-icon-hover);
    font-size: 1.15rem;
    line-height: 1;
  }

  .market-summary-stats {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    margin: 6px 0 0;
    padding: 8px 0 2px;
    border-top: 1px solid var(--fp-panel-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 0.6875rem;
    line-height: 1.25;
    align-items: baseline;
  }

  .market-summary-stats > span {
    min-width: 0;
  }

  .produce-desktop-only {
    display: none !important;
  }

  .produce-mobile-only.produce-mobile-line-cards,
  .produce-mobile-only.produce-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .produce-catalog-page.container,
  .produce-line-detail-page.container {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .produce-market-detail-page .produce-hero,
  .produce-line-detail-page .produce-hero {
    margin-bottom: 0.85rem;
  }

  .produce-history-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .produce-history-mobile__item {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    touch-action: manipulation;
  }

  .produce-history-mobile__item--current {
    outline: 2px solid var(--accent-solid);
    outline-offset: -2px;
  }

  .produce-history-mobile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .produce-history-mobile__date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .produce-history-mobile__badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-inverse);
    background-color: var(--accent-solid);
  }

  .produce-history-mobile__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 10px;
  }

  .produce-history-mobile__stats > div {
    margin: 0;
    text-align: center;
  }

  .produce-history-mobile__stats dt {
    margin: 0 0 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .produce-history-mobile__stats dd {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
  }

  .produce-history-mobile__stats dd.rev {
    color: var(--color-revenue-strong);
  }

  .produce-history-mobile__link {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--link-color);
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
  }

  .produce-history-mobile__link:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
  }

  .produce-line-history-desktop.app-data-table-card {
    overflow: visible;
    height: auto;
  }

  .produce-mobile-cards {
    padding-bottom: 4px;
  }

  .plc-revenue-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 10px 0 12px;
    padding: 8px 10px;
    background: var(--color-revenue-muted-bg);
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .plc-revenue-row .plc-revenue-val {
    font-weight: 800;
    color: var(--color-revenue-strong);
    font-variant-numeric: tabular-nums;
  }

  .produce-mobile-market-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding: 12px 14px;
    background: var(--btn-primary-text);
    border: 1px solid var(--fp-mobile-total-border);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-inverse);
  }

  .produce-mobile-market-total strong {
    font-size: 1rem;
    color: var(--text-inverse);
    font-variant-numeric: tabular-nums;
  }

  .produce-market-detail-page .produce-line-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 11px 11px 10px;
    background: var(--input-bg);
    box-shadow: none;
    color: var(--text-primary);
    text-decoration: none;
  }

  .produce-market-detail-page .produce-line-card:active {
    opacity: 0.94;
    transform: scale(0.985);
  }

  .produce-market-detail-page .produce-line-card .plc-title {
    margin: 0 0 7px;
    padding: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.25;
    word-break: break-word;
  }

  .produce-market-detail-page .produce-line-card .plc-meta {
    margin: 0 0 10px;
    padding: 0;
    text-align: left;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.4;
  }

  .produce-market-detail-page .produce-line-card .plc-meta span {
    display: inline;
  }

  .produce-market-detail-page .produce-line-card .plc-meta span + span::before {
    content: ' · ';
    font-weight: 500;
    color: var(--fp-plc-meta-sep);
  }

  .produce-market-detail-page .produce-line-card .plc-footer {
    border-top: 1px solid var(--fp-plc-footer-border);
    padding-top: 9px;
    margin-top: 2px;
  }

  .produce-market-detail-page .produce-line-card .plc-revenue-row {
    margin: 8px 0 8px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .produce-market-detail-page .produce-line-card .plc-price {
    text-align: left;
    font-size: 1.03rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
  }

  .produce-market-detail-page .produce-line-card .plc-qty-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    text-align: left;
    font-size: 0.78rem;
    color: var(--text-primary);
  }

  .produce-market-detail-page .produce-line-card .plc-qty-grid > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
  }

  .produce-market-detail-page .produce-line-card .plc-qty-label {
    font-size: 0.61rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
  }

  .produce-market-detail-page .produce-line-card .plc-qty-val {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    font-size: 0.81rem;
  }

  .produce-market-detail-page .produce-line-card .plc-qty-val--rev {
    color: var(--color-revenue-strong);
  }

  .produce-market-detail-page .produce-line-card,
  .produce-market-detail-page .produce-line-card * {
    text-decoration: none !important;
  }

  .produce-table th {
    white-space: normal;
    line-height: 1.25;
  }
}

/* —— Drill-down routing: product hub + breadcrumbs —— */

.produce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.produce-breadcrumb a {
  color: var(--link-color);
  text-decoration: none;
}

.produce-breadcrumb a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

.produce-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.produce-hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-primary);
  text-decoration: none;
  touch-action: manipulation;
  box-shadow: none;
  transform: none;
  transition:
    background-color 0.12s ease,
    border-color 0.15s ease,
    opacity 0.08s ease,
    transform 0.12s ease;
}

.produce-hub-card:hover {
  background-color: var(--btn-icon-hover);
  border-color: var(--brand-farm-muted-border);
  box-shadow: none;
  transform: none;
}

.produce-hub-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.produce-hub-card__code {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-hub-card__stat {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.produce-hub-card__stat strong {
  color: var(--text-primary);
  font-weight: 600;
}

.produce-hub-card__revenue {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-revenue);
  line-height: 1.35;
}

.produce-hub-card__revenue strong {
  font-weight: 800;
  color: var(--color-revenue-strong);
}

.produce-hub-card__cta {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-solid);
}

.produce-hub-card__sparkline {
  margin: 4px 0 2px;
  height: 26px;
}

.produce-hub-card__sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

.produce-hub-card__sparkline polyline {
  fill: none;
  stroke: var(--accent-solid);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.produce-hub-card__trend {
  margin: 2px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.produce-hub-card__trend--up {
  color: var(--color-price-positive);
}

.produce-hub-card__trend--down {
  color: var(--color-price-negative);
}

.produce-hub-card__trend--flat {
  color: var(--text-secondary);
}

.produce-hub-card__trend-arrow {
  display: inline-block;
  min-width: 0.7em;
  text-align: center;
}

/* Price per pack as primary metric — same card size as standard hub cards */
.produce-hub-card--price-led .produce-hub-card__price {
  margin: 0;
  line-height: 1.35;
}

.produce-hub-card--price-led .produce-hub-card__price-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--color-revenue-strong);
}

.produce-hub-card--price-led .produce-hub-card__price-detail {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

@media (pointer: coarse) {
  .produce-back-link:active {
    transform: scale(0.98);
    opacity: 0.88;
  }

  .produce-hub-card:active {
    transform: scale(0.99);
    opacity: 0.92;
  }
}

@media (max-width: 767px) {
  .produce-hub-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .produce-hub-card {
    padding: 16px 14px;
  }
}

@media (max-width: 390px) {
  [data-market-section] .produce-hub-card .produce-hub-card__stat ~ .produce-hub-card__stat {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .produce-hub-card {
    transition: none;
  }

  .produce-hub-card,
  .produce-hub-card:hover,
  .produce-hub-card:active {
    transform: none;
  }
}

/* —— Price explorer (analyst workbench) —— */
.produce-explorer-page .produce-explorer-hero {
  align-items: flex-start;
  text-align: left;
  margin: 0 0 0.5rem;
}

.produce-product-hub-page .produce-product-hub-hero {
  align-items: flex-start;
  text-align: left;
  margin: 0 0 0.75rem;
}

.produce-product-hub-page .produce-product-hub-hero__title {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.produce-product-hub-page .produce-product-hub-hero__subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
}

.produce-explorer-page .produce-explorer-hero__title {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.produce-explorer-page .produce-explorer-hero__subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
}

.produce-catalog-filters__explorer {
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.produce-catalog-filters__explorer-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.produce-explorer-cta {
  margin-top: 14px;
}

.produce-explorer-cta__lede {
  margin: 0 0 12px;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.produce-explorer-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  touch-action: manipulation;
}

.produce-explorer-cta__btn:active {
  opacity: 0.92;
  transform: scale(0.98);
}

.produce-explorer-cta--compact {
  margin-top: 0;
}

.produce-explorer-cta--compact .produce-explorer-cta__btn--block {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.produce-catalog-filters__explorer .produce-explorer-cta__lede {
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.produce-explorer-snapshot {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
}

.produce-explorer-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 20px;
  margin: 0;
}

.produce-explorer-snapshot__grid dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-explorer-snapshot__grid dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.produce-explorer-snapshot__spec {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.produce-explorer-workbench-metrics {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.produce-explorer-workbench-metrics__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px 20px;
  margin: 0;
}

.produce-explorer-workbench-metrics__grid dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-explorer-workbench-metrics__grid dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.produce-explorer-workbench-metrics__hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.produce-explorer-filters__intro {
  margin: 0 0 12px;
}

.produce-explorer-market-day-field {
  margin-bottom: 4px;
}

.produce-explorer-market-day-select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  border-radius: 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.3;
  touch-action: manipulation;
  cursor: pointer;
}

.produce-explorer-market-day-select:focus {
  outline: none;
  border-color: var(--input-focus-border);
}

.produce-explorer-filters__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.produce-explorer-app.is-loading.is-cache-hit #produce-explorer-dynamic {
  opacity: 0.85;
}

.produce-explorer-filters__apply {
  width: 100%;
  margin-top: 4px;
}

.produce-explorer-filters__apply.is-saved {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

.produce-explorer-save-hint {
  margin: 8px 0 0;
  min-height: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.produce-explorer-save-hint--error {
  color: #e57373;
}

.produce-explorer-app.is-loading #produce-explorer-dynamic {
  opacity: 0.55;
  pointer-events: none;
}

.produce-explorer-app.produce-explorer-app--transaction-busy [data-explorer-filter-host],
.produce-explorer-app.produce-explorer-app--transaction-busy #produce-explorer-dynamic {
  pointer-events: none;
}

.produce-explorer-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.produce-explorer-loading__label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
}

.produce-explorer-loading__grid {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 16px;
}

.produce-explorer-skeleton {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: linear-gradient(
    90deg,
    var(--input-bg) 0%,
    var(--table-row-zebra) 50%,
    var(--input-bg) 100%
  );
  background-size: 200% 100%;
  animation: produce-explorer-shimmer 1.2s ease-in-out infinite;
}

.produce-explorer-loading__snapshot {
  min-height: 88px;
}

.produce-explorer-loading__filters {
  min-height: 280px;
}

.produce-explorer-loading__matrix {
  min-height: 320px;
}

@keyframes produce-explorer-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 1023px) {
  .produce-explorer-loading__grid {
    grid-template-columns: 1fr;
  }
}

.produce-explorer-markets {
  margin: 0;
  padding: 0;
  border: none;
}

.produce-explorer-markets__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 8px;
}

.produce-explorer-markets__action {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--link-color);
  cursor: pointer;
  touch-action: manipulation;
}

.produce-explorer-markets__action:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

.produce-explorer-markets__sep {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.produce-explorer-markets__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background-color: var(--input-bg);
}

@media (min-width: 1024px) {
  .produce-explorer-page .produce-explorer-markets__list {
    max-height: min(40vh, 240px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1023px) {
  .produce-explorer-page .produce-explorer-markets__list {
    max-height: none;
    overflow: visible;
  }
}

.produce-explorer-markets__item-wrap {
  margin: 0;
  border-bottom: 1px solid var(--border-color);
}

.produce-explorer-markets__item-wrap:last-child {
  border-bottom: none;
}

.produce-explorer-markets__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.produce-explorer-markets__item:active {
  opacity: 0.92;
}

.produce-explorer-markets__checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent-solid);
}

.produce-explorer-markets__name {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.produce-explorer-markets__code {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.produce-explorer-matrix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.produce-explorer-matrix-head .produce-section-title {
  margin-bottom: 0;
}

.produce-explorer-refresh-pulse {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--btn-primary-text);
  background-color: var(--accent-solid);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  touch-action: manipulation;
}

.produce-explorer-refresh-pulse.is-visible {
  opacity: 1;
  transform: scale(1);
}

.produce-explorer-refresh-pulse.is-fading {
  opacity: 0;
  transform: scale(0.98);
}

.produce-explorer-main.is-matrix-pulse .produce-analyst-matrix-card,
.produce-explorer-main.is-matrix-pulse .produce-analyst-cards {
  animation: produce-explorer-matrix-glow 0.55s ease;
}

@keyframes produce-explorer-matrix-glow {
  0% {
    box-shadow: 0 0 0 0 transparent;
  }
  35% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-solid) 35%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.produce-catalog-filters__hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.produce-catalog-filters__hint code {
  font-size: 0.85em;
}

.produce-explorer-spec-option--narrow {
  opacity: 0.72;
}

.produce-explorer-spec-option__hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-explorer-narrow-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--btn-icon-hover);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.produce-explorer-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
}

.produce-explorer-empty--page {
  padding: 24px 16px;
  border-radius: 14px;
  border: 1px dashed var(--border-color);
}

.produce-analyst-table .produce-analyst-market-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.produce-analyst-table .produce-analyst-market-code {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.produce-analyst-state {
  font-size: 0.82rem;
  font-weight: 600;
}

.produce-analyst-state--traded {
  color: var(--color-revenue);
}

.produce-analyst-state--listed_no_sales,
.produce-analyst-state--no_trade {
  color: var(--text-secondary);
}

.produce-analyst-row--listed_no_sales,
.produce-analyst-row--no_trade {
  opacity: 0.78;
}

.produce-analyst-row--cheapest .price {
  box-shadow: inset 3px 0 0 var(--accent-solid);
}

.produce-analyst-row--dearest .price {
  box-shadow: inset 3px 0 0 var(--color-warn);
}

.produce-analyst-detail-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  white-space: nowrap;
}

.produce-analyst-detail-link:hover {
  text-decoration: underline;
}

.produce-analyst-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.produce-analyst-card {
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  overflow: hidden;
}

.produce-analyst-card--muted,
.produce-analyst-card--empty {
  opacity: 0.82;
}

.produce-analyst-card--cheapest {
  border-color: var(--state-selected-border);
}

.produce-analyst-card--dearest {
  border-color: var(--color-warn-border);
}

.produce-analyst-card__link,
.produce-analyst-card__tap {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.produce-analyst-card__tap:active {
  opacity: 0.92;
  transform: scale(0.98);
}

.produce-analyst-card__stats-preview {
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.produce-analyst-card__stat-sep {
  margin: 0 0.2em;
  opacity: 0.65;
}

.produce-analyst-card__hint {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-solid);
  letter-spacing: 0.01em;
}

.produce-analyst-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.produce-analyst-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.produce-analyst-card__code {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.produce-analyst-card__state {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.produce-analyst-card__price {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.produce-analyst-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.produce-analyst-card__stats dt {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.produce-analyst-card__stats dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .produce-explorer-page .produce-mobile-only {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .produce-explorer-page {
    --explorer-sheet-scroll-padding: calc(
      env(safe-area-inset-top, 0px) + var(--app-header-height, 56px) + 12px
    );
    --explorer-sheet-toggle-height: 44px;
  }

  body.has-verification-banner .produce-explorer-page {
    --explorer-sheet-scroll-padding: calc(
      env(safe-area-inset-top, 0px) + var(--app-header-height, 56px) +
        var(--site-banner-height, 50px) + 12px
    );
  }

  .produce-explorer-page .produce-desktop-only {
    display: none !important;
  }

  .produce-explorer-page .produce-explorer-filters__title--desktop {
    display: none;
  }

  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters-shell__toggle {
    display: none !important;
  }

  .produce-explorer-page .produce-catalog-wide {
    display: flex;
    flex-direction: column;
  }

  .produce-explorer-page .produce-catalog-main {
    order: 1;
    padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
  }

  .produce-explorer-page .produce-explorer-filter-host {
    order: 2;
  }

  /* Explorer workbench bypasses catalog shell accordion (is-open) — host uses is-sheet-open. */
  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters-shell__panel {
    display: flex !important;
    grid-template-rows: none !important;
    transition: none;
  }

  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters-shell__panel-inner {
    opacity: 1 !important;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters,
  .produce-explorer-page .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
  }

  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters-shell__panel {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    pointer-events: none;
    background-color: var(--bg-surface);
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters-shell__panel,
  .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters-shell__panel {
    pointer-events: auto;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters-shell__panel {
    transform: translateY(0);
  }

  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters-shell__panel-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    border: none;
    border-radius: 0;
    background-color: var(--bg-surface);
    box-shadow: none;
    padding: 0;
    scroll-padding-top: var(--explorer-sheet-scroll-padding);
    transform: none;
  }

  /* Scrollable lead-in: moves under the fixed header so the list can reach the bottom. */
  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters-shell__panel-inner::before,
  .produce-explorer-page .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters-shell__panel-inner::before {
    content: '';
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: var(--explorer-sheet-scroll-padding);
    pointer-events: none;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters-shell__panel-inner,
  .produce-explorer-page .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters-shell__panel-inner {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scroll-padding-top: var(--explorer-sheet-scroll-padding);
  }

  .produce-explorer-filter-host.is-sheet-dragging .produce-catalog-filters-shell__panel {
    transition: none;
  }

  .produce-explorer-page .produce-explorer-filter-host .produce-catalog-filters {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0 16px calc(32px + env(safe-area-inset-bottom, 0px));
    border: none;
    border-radius: 0;
    background-color: transparent;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-catalog-filters,
  .produce-explorer-page .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters {
    padding-bottom: calc(
      40px + var(--explorer-sheet-toggle-height) + 20px + env(safe-area-inset-bottom, 0px)
    );
  }

  .produce-explorer-page .produce-explorer-filters__intro {
    display: none;
  }

  .produce-explorer-sheet-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 8px;
    padding: 8px 16px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
    touch-action: pan-y;
  }

  .produce-explorer-sheet-bar__handle {
    flex: 0 0 100%;
    width: 40px;
    height: 4px;
    margin: 0 auto 6px;
    border-radius: 999px;
    background-color: var(--border-color);
    touch-action: none;
    cursor: grab;
  }

  .produce-explorer-sheet-bar__title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .produce-explorer-filter-host.is-sheet-swiping .produce-catalog-filters-shell__panel {
    pointer-events: auto;
  }

  .produce-explorer-sheet-bar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .produce-explorer-sheet-bar__done {
    display: none;
  }

  .produce-explorer-sheet-footer {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 20vh;
    margin-top: 8px;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    touch-action: pan-y;
  }

  .produce-explorer-sheet-footer__handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background-color: var(--border-color);
    touch-action: none;
  }

  .produce-explorer-sheet-toggle {
    position: fixed;
    z-index: 151;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: min(22rem, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 6px 14px 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--bg-main) 55%, transparent);
    cursor: pointer;
    touch-action: manipulation;
    text-align: left;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    will-change: transform, opacity;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
      opacity 0.24s ease,
      visibility 0.24s ease;
  }

  .produce-explorer-filter-host.is-sheet-toggle-hidden:not(.is-sheet-open):not(.is-sheet-swiping)
    .produce-explorer-sheet-toggle {
    transform: translateX(-50%) translateY(calc(100% + 28px + env(safe-area-inset-bottom, 0px)));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .produce-explorer-sheet-toggle:active {
    transform: translateX(-50%) translateY(0) scale(0.98);
  }

  .produce-explorer-filter-host.is-sheet-toggle-hidden:not(.is-sheet-open):not(.is-sheet-swiping)
    .produce-explorer-sheet-toggle:active {
    transform: translateX(-50%) translateY(calc(100% + 28px + env(safe-area-inset-bottom, 0px)));
  }

  @media (prefers-reduced-motion: reduce) {
    .produce-explorer-sheet-toggle {
      transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    }

    .produce-explorer-filter-host.is-sheet-toggle-hidden:not(.is-sheet-open):not(.is-sheet-swiping)
      .produce-explorer-sheet-toggle {
      transform: translateX(-50%);
      opacity: 0;
    }
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-explorer-sheet-toggle,
  .produce-explorer-filter-host.is-sheet-swiping .produce-explorer-sheet-toggle {
    background-color: color-mix(in srgb, var(--accent-solid) 22%, var(--bg-surface));
    border-color: var(--input-focus-border);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-solid) 25%, transparent);
  }

  .produce-explorer-sheet-toggle__track {
    flex: 0 0 auto;
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--bg-main) 35%, var(--btn-secondary-bg));
    border: 1px solid var(--border-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-explorer-sheet-toggle__track,
  .produce-explorer-filter-host.is-sheet-swiping .produce-explorer-sheet-toggle__track {
    background-color: color-mix(in srgb, var(--accent-solid) 35%, var(--bg-surface));
    border-color: color-mix(in srgb, var(--input-focus-border) 70%, var(--border-color));
  }

  .produce-explorer-sheet-toggle__thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--btn-primary-bg);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--bg-main) 40%, transparent);
    transform: translateY(-50%);
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-explorer-sheet-toggle__thumb,
  .produce-explorer-filter-host.is-sheet-swiping .produce-explorer-sheet-toggle__thumb {
    transform: translate(18px, -50%);
  }

  .produce-explorer-sheet-toggle__copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .produce-explorer-sheet-toggle__state {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-explorer-sheet-toggle__state,
  .produce-explorer-filter-host.is-sheet-swiping .produce-explorer-sheet-toggle__state {
    color: color-mix(in srgb, var(--accent-solid) 80%, var(--text-secondary));
  }

  .produce-explorer-sheet-toggle__summary {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .produce-explorer-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 130;
    margin: 0;
    padding: 0;
    border: none;
    background-color: color-mix(in srgb, var(--bg-main) 58%, transparent);
    cursor: pointer;
    touch-action: manipulation;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s cubic-bezier(0.25, 1, 0.5, 1),
      visibility 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .produce-explorer-page .produce-explorer-filter-host.is-sheet-open .produce-explorer-sheet-backdrop,
  .produce-explorer-filter-host.is-sheet-swiping .produce-explorer-sheet-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .produce-explorer-page .produce-explorer-filters__apply {
    display: none;
  }

  html.app-layout:has(body.produce-explorer-sheet-open) {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.produce-explorer-sheet-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.produce-explorer-sheet-open #app-content {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.produce-explorer-sheet-open .produce-explorer-page .produce-hero,
  body.produce-explorer-sheet-open .produce-explorer-page .produce-catalog-main,
  body:has(.produce-explorer-filter-host.is-sheet-swiping) .produce-explorer-page .produce-hero,
  body:has(.produce-explorer-filter-host.is-sheet-swiping) .produce-explorer-page .produce-catalog-main {
    touch-action: none;
  }

  /* Compact market comparison cards — two per row on phone/tablet */
  .produce-explorer-page .produce-analyst-cards.produce-mobile-only {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .produce-explorer-page .produce-analyst-card {
    border-radius: 10px;
  }

  .produce-explorer-page .produce-analyst-card__link,
  .produce-explorer-page .produce-analyst-card__tap {
    padding: 10px 8px;
  }

  .produce-explorer-page .produce-analyst-card__stats-preview {
    font-size: 0.62rem;
    line-height: 1.2;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .produce-explorer-page .produce-analyst-card__hint {
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .produce-explorer-page .produce-analyst-card__head {
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
  }

  .produce-explorer-page .produce-analyst-card__title {
    font-size: 0.82rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .produce-explorer-page .produce-analyst-card__code {
    flex-shrink: 0;
    font-size: 0.62rem;
  }

  .produce-explorer-page .produce-analyst-card__state {
    margin: 0 0 2px;
    font-size: 0.64rem;
    line-height: 1.2;
  }

  .produce-explorer-page .produce-analyst-card__price {
    margin: 0 0 4px;
    font-size: 0.94rem;
    line-height: 1.15;
  }

  .produce-explorer-page .produce-analyst-card__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 4px;
  }

  .produce-explorer-page .produce-analyst-card__stats > div {
    min-width: 0;
  }

  .produce-explorer-page .produce-analyst-card__stats dt {
    font-size: 0.58rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .produce-explorer-page .produce-analyst-card__stats dd {
    font-size: 0.72rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .produce-explorer-page .produce-explorer-matrix-head {
    margin-bottom: 8px;
  }

  .produce-explorer-page .produce-explorer-workbench-metrics {
    margin-bottom: 10px;
  }

  .produce-explorer-page .produce-explorer-hero {
    margin-bottom: 0.35rem;
  }

  .produce-explorer-page .produce-explorer-hero__title {
    font-size: 1.18rem;
  }

  .produce-explorer-page .produce-explorer-hero__subtitle {
    margin-top: 2px;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .produce-explorer-page .produce-analyst-cards.produce-mobile-only {
    grid-template-columns: 1fr;
  }
}

/* Explorer mobile market detail sheet */
.produce-explorer-market-dialog {
  position: fixed;
  inset: 0;
  z-index: 155;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.produce-explorer-market-dialog.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.produce-explorer-market-dialog__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  touch-action: manipulation;
}

.produce-explorer-market-dialog__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  max-height: min(88vh, 640px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border-color);
  border-bottom: 0;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.produce-explorer-market-dialog.is-open .produce-explorer-market-dialog__panel {
  transform: translateY(0);
}

.produce-explorer-market-dialog__handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background-color: var(--border-color);
}

.produce-explorer-market-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.produce-explorer-market-dialog__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.produce-explorer-market-dialog__meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.produce-explorer-market-dialog__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.produce-explorer-market-dialog__close:active {
  opacity: 0.9;
  transform: scale(0.96);
}

.produce-explorer-market-dialog__tags {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-solid);
}

.produce-explorer-market-dialog__tags--cheapest {
  color: var(--state-selected-border);
}

.produce-explorer-market-dialog__tags--dearest {
  color: var(--color-warn-border);
}

.produce-explorer-market-dialog__state {
  margin: 0 0 6px;
}

.produce-explorer-market-dialog__price {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.produce-explorer-market-dialog__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 16px;
}

.produce-explorer-market-dialog__stats dt {
  margin: 0 0 2px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.produce-explorer-market-dialog__stats dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.produce-explorer-market-dialog__detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}

.produce-explorer-market-dialog__detail:active {
  background-color: var(--btn-primary-hover);
  transform: scale(0.98);
}

.produce-explorer-market-dialog__panel--muted {
  opacity: 0.9;
}

.produce-explorer-market-dialog__panel--empty .produce-explorer-market-dialog__price {
  color: var(--text-secondary);
}

.produce-explorer-market-dialog__panel--cheapest {
  box-shadow: inset 0 0 0 1px var(--state-selected-border);
}

.produce-explorer-market-dialog__panel--dearest {
  box-shadow: inset 0 0 0 1px var(--color-warn-border);
}

body.produce-explorer-market-dialog-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.produce-explorer-market-dialog-open #app-content {
  overflow: hidden;
  overscroll-behavior: none;
}

body.produce-market-line-dialog-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.produce-market-line-dialog-open #app-content {
  overflow: hidden;
  overscroll-behavior: none;
}

.produce-market-line-dialog__nav {
  display: flex;
  gap: 10px;
  margin: 14px 0 10px;
}

.produce-market-line-dialog__nav-btn {
  flex: 1 1 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  padding: 10px 12px;
  font-weight: 600;
  touch-action: manipulation;
}

.produce-market-line-dialog__nav-btn:disabled {
  opacity: 0.5;
}

