:root {
  --bg: #f5f7f4;
  --surface: #f8faf6;
  --surface-strong: #ffffff;
  --text: #1b211e;
  --muted: #66716b;
  --line: #d7ded6;
  --accent: #0f7b63;
  --accent-dark: #0a5948;
  --accent-blue: #315f7d;
  --gold: #bd8524;
  --warn: #a65e12;
  --danger: #9a3324;
  --ink: #17221d;
  --shadow: 0 18px 46px rgba(27, 33, 30, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background:
    linear-gradient(rgba(15, 123, 99, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 95, 125, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  display: block;
  height: 6px;
  content: "";
  background: linear-gradient(90deg, var(--accent), var(--accent-blue), var(--gold));
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(27, 33, 30, 0.1);
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px 28px;
  align-items: center;
  margin-bottom: 14px;
  padding: 28px;
  border: 1px solid rgba(23, 34, 29, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(125deg, rgba(15, 123, 99, 0.94), rgba(49, 95, 125, 0.92)),
    var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.public-hero .eyebrow {
  color: #b9eadb;
}

.public-hero h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.public-hero p:not(.eyebrow, .preview-banner) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.55;
}

.public-trust {
  display: grid;
  gap: 9px;
}

.public-trust span {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px 10px 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 800;
}

.public-trust span::before {
  width: 10px;
  height: 10px;
  margin-left: -24px;
  margin-right: 14px;
  border-radius: 999px;
  background: #b9eadb;
  content: "";
}

.preview-banner {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffe5ad;
  font-size: 12px;
  font-weight: 800;
}

.freshness-banner {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  color: #dff4ec;
  background: rgba(4, 45, 37, 0.28);
  font-size: 13px;
  font-weight: 800;
}

.freshness-banner[data-state="fresh"] {
  color: #dff4ec;
  border-color: rgba(120, 220, 180, 0.45);
  background: rgba(4, 55, 42, 0.42);
}

.freshness-banner[data-state="aging"] {
  color: #ffe8b8;
  border-color: rgba(230, 180, 70, 0.5);
  background: rgba(70, 48, 8, 0.38);
}

.freshness-banner[data-state="stale"] {
  color: #ffd0c8;
  border-color: rgba(220, 110, 90, 0.55);
  background: rgba(70, 20, 14, 0.4);
}

.freshness-banner[data-state="unknown"] {
  color: #e6e8ef;
  border-color: rgba(200, 205, 220, 0.35);
  background: rgba(30, 34, 48, 0.35);
}

.consumer-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.consumer-footer > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.consumer-footer strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.consumer-footer p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.consumer-footer a {
  color: var(--accent-dark);
  font-weight: 800;
}

.native-review-note {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px dashed rgba(166, 94, 18, 0.45);
  border-radius: 8px;
  color: var(--warn);
  background: #fff9ee;
  font: 700 11px/1.3 ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.console-mode .public-hero,
.console-mode .consumer-footer {
  display: none;
}

.consumer-mode .status,
.consumer-mode .market-overview,
.consumer-mode .stats-grid,
.consumer-mode .market-pulse,
.consumer-mode .view-tabs,
.consumer-mode [data-view-panel="admin"],
.consumer-mode [data-view-panel="intake"] {
  display: none !important;
}

.consumer-mode .topbar {
  margin-bottom: 14px;
}

.consumer-mode .workspace {
  grid-template-columns: minmax(310px, 0.8fr) minmax(0, 1.7fr);
}

.consumer-mode .results-panel,
.consumer-mode .detail-panel {
  min-height: 520px;
}

.brand-block {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  align-items: end;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 9px;
  border: 1px solid rgba(15, 123, 99, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(15, 123, 99, 0.13), rgba(255, 255, 255, 0.72)),
    var(--surface-strong);
  box-shadow: 0 10px 26px rgba(27, 33, 30, 0.08);
}

.brand-mark span {
  display: block;
  border-radius: 999px 999px 4px 4px;
  background: var(--accent);
}

.brand-mark span:nth-child(1) {
  height: 22px;
}

.brand-mark span:nth-child(2) {
  height: 34px;
  background: var(--accent-blue);
}

.brand-mark span:nth-child(3) {
  height: 16px;
  background: var(--gold);
}

.brand-copy {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.language-wrap {
  min-width: 118px;
}

.language-wrap select {
  height: 38px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: 0;
}

.status {
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.status.ready {
  color: var(--accent-dark);
  border-color: rgba(15, 123, 99, 0.32);
  background: #edf7f3;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(27, 33, 30, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 123, 99, 0.06), transparent 38%),
    var(--surface-strong);
  box-shadow: 0 10px 28px rgba(27, 33, 30, 0.05);
}

.select-wrap,
.search-wrap {
  position: relative;
}

.search-wrap input {
  padding-right: 116px;
}

.search-signal {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: end;
  width: 78px;
  height: 26px;
  pointer-events: none;
}

.search-signal i {
  display: block;
  border-radius: 999px 999px 3px 3px;
  background: rgba(15, 123, 99, 0.4);
}

.search-signal i:nth-child(1) {
  height: 13px;
}

.search-signal i:nth-child(2) {
  height: 22px;
  background: rgba(49, 95, 125, 0.52);
}

.search-signal i:nth-child(3) {
  height: 9px;
  background: rgba(189, 133, 36, 0.58);
}

.search-signal i:nth-child(4) {
  height: 18px;
  background: rgba(15, 123, 99, 0.52);
}

.market-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(23, 34, 29, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 99, 0.22), transparent 42%),
    linear-gradient(90deg, var(--ink), #21352d);
  box-shadow: var(--shadow);
}

.market-overview,
.overview-main,
.overview-side,
.signal-grid {
  min-width: 0;
}

.overview-main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 18px;
  align-items: center;
  min-height: 160px;
}

.overview-main .eyebrow {
  color: #8bd0ba;
}

.overview-main h2 {
  max-width: 520px;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 126px;
}

.signal-grid span {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.signal-grid span:nth-child(3n + 1) {
  min-height: 82px;
  background: rgba(139, 208, 186, 0.52);
}

.signal-grid span:nth-child(4n + 2) {
  min-height: 56px;
  background: rgba(189, 133, 36, 0.58);
}

.signal-grid span:nth-child(5n) {
  min-height: 108px;
  background: rgba(49, 95, 125, 0.7);
}

.overview-side {
  display: grid;
  gap: 12px;
  min-height: 160px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.coverage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.coverage-head span,
.coverage-metrics span,
.coverage-bar-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.coverage-head strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.coverage-metrics {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 8px;
}

.coverage-metrics div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.coverage-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.15;
}

.coverage-bars {
  display: grid;
  gap: 8px;
}

.coverage-bar-row {
  display: grid;
  grid-template-columns: 74px 1fr 90px;
  gap: 8px;
  align-items: center;
}

.coverage-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe4;
}

.coverage-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.coverage-track .hot {
  background: var(--accent);
}

.coverage-track .cool {
  background: var(--accent-blue);
}

.coverage-track .calm {
  background: var(--gold);
}

.skeleton-bars .hot {
  width: 88%;
}

.skeleton-bars .cool {
  width: 58%;
}

.skeleton-bars .calm {
  width: 34%;
}

.coverage-bar-row strong {
  font-size: 12px;
  text-align: right;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

select {
  padding: 0 12px;
}

input {
  padding: 0 14px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 123, 99, 0.14);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.market-pulse {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.9fr) minmax(270px, 0.9fr);
  gap: 10px;
  margin-bottom: 14px;
}

.pulse-card {
  min-width: 0;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 28px rgba(27, 33, 30, 0.05);
}

.pulse-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(15, 123, 99, 0.11), transparent 52%),
    var(--surface-strong);
}

.pulse-main h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.08;
}

.pulse-main p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pulse-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: end;
  min-height: 124px;
}

.pulse-map span {
  min-height: 42px;
  border: 1px solid rgba(15, 123, 99, 0.14);
  border-radius: 8px;
  background: #e5ebe4;
}

.pulse-map .mid {
  min-height: 78px;
  background: rgba(189, 133, 36, 0.62);
}

.pulse-map .tall {
  min-height: 112px;
  background: rgba(49, 95, 125, 0.72);
}

.pulse-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.pulse-card-head strong {
  font-size: 14px;
}

.pulse-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pulse-products,
.pulse-lanes {
  display: grid;
  gap: 8px;
}

.pulse-product,
.pulse-lane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pulse-product {
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.pulse-product:hover {
  border-color: rgba(15, 123, 99, 0.36);
  background: #edf7f3;
}

.pulse-product strong,
.pulse-product small,
.pulse-lane strong,
.pulse-lane small {
  display: block;
  overflow-wrap: anywhere;
}

.pulse-product strong,
.pulse-lane strong {
  font-size: 13px;
}

.pulse-product small,
.pulse-lane small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.pulse-product b,
.pulse-lane b {
  min-width: 52px;
  color: var(--accent-dark);
  font-size: 11px;
  text-align: right;
  text-transform: uppercase;
}

.pulse-product.fresh {
  border-left: 4px solid var(--accent);
}

.pulse-product.dairy {
  border-left: 4px solid var(--accent-blue);
}

.pulse-product.basket {
  border-left: 4px solid var(--gold);
}

.pulse-lane {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.pulse-lane i {
  width: 10px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent);
}

.pulse-lane i.cool {
  background: var(--accent-blue);
}

.pulse-lane i.calm {
  background: var(--gold);
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab,
.primary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.tab {
  padding: 0 14px;
}

.tab.active {
  color: #ffffff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.primary-button {
  width: fit-content;
  padding: 0 16px;
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(27, 33, 30, 0.04);
}

.stat::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 100%;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(15, 123, 99, 0.08)),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(49, 95, 125, 0.1) 9px 10px);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.55fr);
  gap: 14px;
  align-items: start;
}

.results-panel,
.detail-panel {
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 16px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-actions select {
  width: 150px;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.results {
  max-height: 690px;
  overflow: auto;
}

.result-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 96px;
  padding: 14px 16px 14px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(15, 123, 99, 0.035), transparent 42%),
    transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.result-button::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 8px;
  width: 4px;
  border-radius: 999px;
  content: "";
  background: #dce6dc;
}

.result-button:hover,
.result-button.active {
  background:
    linear-gradient(90deg, rgba(15, 123, 99, 0.09), transparent 46%),
    #f3f8f2;
}

.result-button.active::before {
  background: var(--accent);
}

.result-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-main,
.result-price {
  min-width: 0;
}

.result-price {
  display: grid;
  justify-items: end;
  gap: 3px;
  align-self: stretch;
  place-content: center end;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 123, 99, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.result-price strong {
  color: var(--accent-dark);
  font-size: 14px;
  line-height: 1.18;
  text-align: right;
}

.result-price small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill.green {
  color: var(--accent-dark);
  border-color: rgba(15, 123, 99, 0.28);
  background: #edf7f3;
}

.pill.warn {
  color: var(--warn);
  border-color: rgba(169, 95, 18, 0.28);
  background: #fff5e7;
}

.pill.danger {
  color: var(--danger);
  border-color: rgba(154, 51, 36, 0.3);
  background: #fff0ed;
}

.pill.save {
  color: var(--accent-dark);
  border-color: rgba(15, 123, 99, 0.38);
  background: #e4f4ee;
}

.pill.stable {
  color: var(--accent-dark);
  border-color: rgba(15, 123, 99, 0.28);
  background: #eff8ee;
}

.pill.muted {
  color: var(--muted);
  background: #f7f5ef;
}

.detail-inner {
  padding: 18px;
}

.detail-title {
  position: relative;
  margin: -18px -18px 0;
  padding: 22px 22px 10px 88px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.16;
  background:
    linear-gradient(135deg, rgba(15, 123, 99, 0.92), rgba(49, 95, 125, 0.94)),
    var(--ink);
}

.detail-title::before {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78) 0 18%, transparent 18% 28%, rgba(255, 255, 255, 0.46) 28% 58%, transparent 58% 70%, rgba(255, 255, 255, 0.62) 70% 100%),
    rgba(255, 255, 255, 0.08);
}

.detail-subtitle {
  margin: 0 -18px 0;
  padding: 0 22px 18px 88px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.45;
  background: linear-gradient(135deg, rgba(15, 123, 99, 0.92), rgba(49, 95, 125, 0.94));
}

.detail-subtitle .pill {
  margin-left: 8px;
  color: #fff5e7;
  border-color: rgba(255, 245, 231, 0.32);
  background: rgba(255, 245, 231, 0.11);
}

.detail-inner > .meta-row {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.section-title {
  margin: 18px 0 10px;
  font-size: 14px;
  text-transform: uppercase;
}

.spread-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.spread-summary div {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 26px rgba(27, 33, 30, 0.05);
}

.spread-summary div::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 54px;
  height: 26px;
  border-radius: 999px;
  content: "";
  background:
    linear-gradient(90deg, var(--accent) 0 56%, transparent 56% 64%, var(--gold) 64% 100%),
    #e5ebe4;
  opacity: 0.18;
}

.spread-summary div:first-child {
  color: #ffffff;
  border-color: rgba(15, 123, 99, 0.28);
  background:
    linear-gradient(135deg, var(--accent-dark), var(--accent-blue)),
    var(--accent-dark);
}

.spread-summary div:first-child span,
.spread-summary div:first-child strong {
  color: #ffffff;
}

.spread-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.spread-summary strong {
  display: block;
  max-width: 260px;
  font-size: 15px;
  line-height: 1.25;
}

.history-signal.stable {
  color: var(--accent-dark);
}

.history-signal.warn {
  color: var(--warn);
}

.history-signal.danger {
  color: var(--danger);
}

.history-signal.muted {
  color: var(--muted);
}

.truth-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 123, 99, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 123, 99, 0.08), rgba(49, 95, 125, 0.05));
}

.truth-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
}

.truth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.truth-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.truth-grid span,
.truth-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.truth-grid span {
  margin-bottom: 5px;
  font-weight: 800;
  text-transform: uppercase;
}

.truth-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.28;
}

.truth-warning {
  margin-top: 10px;
  padding: 10px;
  border-left: 4px solid var(--warn);
  color: var(--warn);
  background: #fff5e7;
  font-size: 13px;
  font-weight: 800;
}

.evidence-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.evidence-panel summary {
  padding: 13px 14px;
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 900;
}

.evidence-panel > p,
.evidence-row {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.evidence-row strong,
.evidence-row span {
  display: block;
}

.evidence-row strong {
  margin-bottom: 3px;
  color: var(--text);
}

.offers {
  display: grid;
  gap: 8px;
}

.offer {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 123, 99, 0.05), transparent 48%),
    var(--surface);
}

.offer::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 8px;
  width: 4px;
  border-radius: 999px;
  content: "";
  background: var(--accent);
}

.offer strong {
  display: block;
  margin-bottom: 4px;
  padding-left: 10px;
  font-size: 15px;
}

.offer span {
  display: block;
  padding-left: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.offer-price {
  min-width: 116px;
  text-align: right;
}

.promo-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-bottom: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff5e7;
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

button.review-row,
.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

button.review-row {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

button.review-row:hover,
button.review-row.active {
  background: #f3f8f2;
}

.load-more {
  width: calc(100% - 24px);
  min-height: 42px;
  margin: 12px;
  border: 1px solid rgba(15, 123, 99, 0.28);
  border-radius: 8px;
  background: #edf7f3;
  color: var(--accent-dark);
  font-weight: 900;
  cursor: pointer;
}

.load-more:hover {
  background: #dff0e9;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.bulk-actions .small-button {
  flex: 1 1 150px;
}

.review-row strong,
.source-row strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 5px;
  font-size: 14px;
}

.review-row span,
.source-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-list .source-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.source-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.source-actions select {
  width: 150px;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
}

.small-button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.danger-button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(154, 51, 36, 0.3);
  border-radius: 8px;
  background: #fff0ed;
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

.danger-button:hover {
  background: #ffe2dc;
}

.receipt-form,
.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.receipt-lines-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.receipt-lines-head > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.receipt-lines {
  display: grid;
  gap: 10px;
}

.receipt-line {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(76px, 0.6fr) minmax(92px, 0.7fr) minmax(92px, 0.7fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.receipt-line .small-button {
  height: 42px;
}

.admin-form {
  max-width: 440px;
}

.form-subtitle {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-link-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-decision-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-decision-panel textarea {
  min-height: 76px;
  resize: vertical;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-actions > button {
  flex: 1 1 150px;
}

.product-candidates {
  display: grid;
  gap: 8px;
}

.product-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.product-candidate:hover,
.product-candidate.active {
  border-color: rgba(15, 123, 99, 0.42);
  background: #edf7f3;
}

.product-candidate strong,
.product-candidate small {
  display: block;
  overflow-wrap: anywhere;
}

.product-candidate strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.product-candidate small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: start;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.checkbox-row span {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.inline-notice {
  min-height: 22px;
  padding: 12px 0 0;
}

.price {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.history {
  display: grid;
  gap: 10px;
}

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

.history-snapshot div {
  min-height: 66px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf6;
}

.history-snapshot span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-snapshot strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.history-move.down {
  color: var(--accent-dark);
}

.history-move.up {
  color: var(--warn);
}

.history-move.flat {
  color: var(--muted);
}

.history-chart {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 123, 99, 0.06) 1px, transparent 1px),
    var(--surface);
  background-size: 25% 100%;
}

.history-day {
  display: grid;
  grid-template-columns: 84px minmax(120px, 1fr) minmax(154px, auto);
  gap: 12px;
  align-items: center;
  min-height: 46px;
}

.history-date strong,
.history-values strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.history-date span,
.history-values span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.history-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee7;
}

.history-range {
  position: absolute;
  top: 5px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.history-avg {
  position: absolute;
  top: 2px;
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.78);
  transform: translateX(-1px);
}

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

.empty-state {
  display: grid;
  min-height: 540px;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.rich-empty {
  gap: 14px;
}

.empty-visual {
  position: relative;
  width: min(100%, 380px);
  min-height: 170px;
  margin: 0 auto 4px;
}

.price-card {
  position: absolute;
  width: 190px;
  height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 14px 30px rgba(27, 33, 30, 0.09);
}

.price-card::before,
.price-card::after {
  position: absolute;
  left: 16px;
  right: 16px;
  content: "";
  border-radius: 999px;
}

.price-card::before {
  top: 18px;
  height: 12px;
  background: var(--accent);
}

.price-card::after {
  top: 46px;
  height: 30px;
  background:
    linear-gradient(90deg, var(--accent-blue) 0 36%, #e5ebe4 36% 100%);
}

.mini-a {
  left: 14px;
  top: 52px;
  transform: rotate(-4deg);
}

.mini-b {
  left: 96px;
  top: 18px;
  z-index: 2;
}

.mini-c {
  right: 12px;
  top: 70px;
  transform: rotate(4deg);
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 2px;
}

.empty-ticker {
  display: grid;
  grid-template-columns: 1fr 1.25fr 0.9fr;
  gap: 8px;
  width: min(100%, 360px);
  margin: -4px auto 2px;
}

.empty-ticker span {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe4;
}

.empty-ticker span::before {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  content: "";
  background: var(--accent);
}

.empty-ticker span:nth-child(2)::before {
  width: 82%;
  background: var(--accent-blue);
}

.empty-ticker span:nth-child(3)::before {
  width: 48%;
  background: var(--gold);
}

.quick-searches span {
  flex-basis: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-searches button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 123, 99, 0.24);
  border-radius: 999px;
  background: #edf7f3;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.quick-searches button:hover {
  border-color: var(--accent);
  background: #dff1ea;
}

.empty-list {
  display: grid;
  gap: 10px;
  min-height: 220px;
  align-content: center;
  padding: 20px;
  text-align: center;
}

.list-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 260px);
  margin: 0 auto;
  align-items: end;
}

.list-visual span {
  display: block;
  min-height: 52px;
  border-radius: 8px;
  background: #e5ebe4;
}

.list-visual span:nth-child(1) {
  min-height: 86px;
  background: rgba(15, 123, 99, 0.72);
}

.list-visual span:nth-child(2) {
  min-height: 118px;
  background: rgba(49, 95, 125, 0.72);
}

.list-visual span:nth-child(3) {
  min-height: 68px;
  background: rgba(189, 133, 36, 0.72);
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.empty-state p,
.notice {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.notice {
  padding: 16px;
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 20px);
    max-width: 680px;
    padding-top: 14px;
  }

  .shell > *,
  .topbar > *,
  .brand-block,
  .brand-copy,
  .public-hero,
  .public-hero > *,
  .public-trust,
  .public-trust span,
  .toolbar > *,
  .workspace > * {
    min-width: 0;
    max-width: 100%;
  }

  .brand-copy h1,
  .public-hero h2,
  .public-hero p,
  .public-trust span {
    overflow-wrap: anywhere;
  }

  .topbar,
  .topbar-actions,
  .toolbar,
  .market-overview,
  .overview-main,
  .market-pulse,
  .pulse-main,
  .coverage-metrics,
  .workspace,
  .stats-grid,
  .spread-summary,
  .coverage-bar-row,
  .pulse-product,
  .pulse-lane,
  .result-button,
  .offer,
  .product-candidate,
  .review-row,
  .source-row,
  .source-actions,
  .review-actions,
  .receipt-line {
    grid-template-columns: 1fr;
  }

  .public-hero,
  .consumer-footer,
  .consumer-mode .workspace {
    grid-template-columns: 1fr;
  }

  .public-hero {
    gap: 18px;
    padding: 20px 16px;
  }

  .public-hero h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .preview-banner {
    grid-column: auto;
  }

  .freshness-banner {
    grid-column: auto;
  }

  .consumer-mode .topbar-actions {
    width: 100%;
  }

  .consumer-mode .results-panel,
  .consumer-mode .detail-panel,
  .consumer-mode .empty-state {
    min-height: 0;
  }

  .consumer-mode .results {
    max-height: none;
  }

  .market-overview {
    width: 100%;
    max-width: calc(100vw - 20px);
    overflow: hidden;
    padding: 12px;
  }

  .overview-main {
    min-height: 0;
  }

  .signal-grid {
    display: none;
  }

  .overview-main::after {
    display: block;
    width: 100%;
    height: 92px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    content: "";
    background:
      linear-gradient(90deg, rgba(139, 208, 186, 0.72) 0 32%, transparent 32% 36%, rgba(189, 133, 36, 0.72) 36% 64%, transparent 64% 68%, rgba(49, 95, 125, 0.76) 68% 100%),
      repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 20px);
  }

  .coverage-bar-row strong {
    text-align: left;
  }

  .coverage-head {
    display: grid;
  }

  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .panel-actions select,
  .source-actions select {
    width: 100%;
  }

  .topbar {
    display: grid;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .topbar-actions {
    display: grid;
    align-items: stretch;
  }

  .status {
    min-width: 0;
    width: 100%;
  }

  .language-wrap {
    min-width: 0;
    width: 100%;
  }

  .search-wrap input {
    padding-right: 14px;
  }

  .search-signal {
    display: none;
  }

  .result-price {
    justify-items: start;
    place-content: center start;
  }

  .result-price strong {
    text-align: left;
  }

  .detail-title {
    padding: 18px 16px 8px 72px;
    font-size: 21px;
  }

  .detail-title::before {
    top: 18px;
    left: 16px;
    width: 40px;
    height: 40px;
  }

  .detail-subtitle {
    padding: 0 16px 16px 72px;
  }

  .results-panel,
  .detail-panel,
  .empty-state {
    min-height: 320px;
  }

  .history-snapshot,
  .history-day,
  .truth-grid {
    grid-template-columns: 1fr;
  }

  .history-values {
    text-align: left;
  }

  .offer-price {
    text-align: left;
  }
}
