:root {
  color-scheme: light;
  --ink: #10172f;
  --ink-2: #25304d;
  --muted: #65708b;
  --muted-2: #8992a8;
  --line: #dde3ef;
  --line-strong: #cbd5e7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3fb;
  --blue: #1769f5;
  --blue-dark: #0e4ec4;
  --blue-soft: #eaf2ff;
  --green: #079455;
  --green-soft: #eaf8f1;
  --purple: #6d4cf5;
  --purple-soft: #f1edff;
  --amber: #d97706;
  --amber-soft: #fff7e6;
  --red: #d92d20;
  --red-soft: #fff0ee;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --shadow-md: 0 18px 48px rgba(24, 39, 75, .08);
  --radius: 16px;
  --radius-sm: 11px;
  --header-height: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #fff 0, #f8fafd 430px, #f5f7fb 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--blue); }
img { max-width: 100%; }
[hidden], .is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.app-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center;
  min-height: var(--header-height); padding: 0 28px;
  background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(211,219,234,.86); backdrop-filter: blur(18px);
  box-shadow: 0 4px 18px rgba(20,31,60,.04);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: var(--ink); text-decoration: none; font-weight: 780; font-size: 22px; letter-spacing: -.02em; }
.brand img { filter: drop-shadow(0 6px 11px rgba(23,105,245,.22)); }
.primary-nav { display: flex; align-items: stretch; height: var(--header-height); }
.nav-item { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; border: 0; background: transparent; color: #44506c; font-weight: 650; cursor: pointer; }
.nav-item::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.nav-item:hover { color: var(--blue); }
.nav-item.is-active { color: var(--blue); }
.nav-item.is-active::after { background: var(--blue); }
.nav-icon { font-size: 18px; font-weight: 700; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 680; font-size: 12px; white-space: nowrap; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px rgba(148,163,184,.12); }
.status-pill--safe { color: #087a49; border-color: #bce5d0; background: var(--green-soft); }
.status-pill--safe i { background: var(--green); box-shadow: 0 0 0 4px rgba(7,148,85,.12); }
.status-pill--demo { color: #805500; border-color: #f3d68e; background: var(--amber-soft); }
.status-pill--demo i { background: var(--amber); }
.status-pill--error { color: #9f241b; border-color: #f4c7c3; background: var(--red-soft); }
.status-pill--error i { background: var(--red); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.mobile-only { display: none; }

main { min-height: calc(100vh - var(--header-height) - 70px); }
.view { display: none; }
.view.is-active { display: block; }
.page-shell { max-width: 1500px; margin: 0 auto; padding: 34px 28px 46px; }
.narrow-shell { max-width: 1240px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.page-heading--compact { margin-bottom: 20px; }
.eyebrow, .panel-kicker { margin: 0 0 6px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 3vw, 46px); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
h3 { margin: 0; }
.heading-copy { max-width: 760px; margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.heading-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.soft-badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #cfe0ff; font-size: 12px; font-weight: 750; }
.soft-badge--purple { color: #5937cc; border-color: #ded4ff; background: var(--purple-soft); }
.subtle-text { color: var(--muted-2); font-size: 12px; }

.category-tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: -1px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: #f9fbfe; }
.category-tab { display: inline-flex; align-items: center; gap: 9px; min-width: 155px; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #5b6680; font-weight: 720; cursor: pointer; white-space: nowrap; }
.category-tab:last-child { border-right: 0; }
.category-tab:hover { color: var(--blue); background: #f4f8ff; }
.category-tab.is-active { position: relative; color: var(--blue); background: white; }
.category-tab.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 2px 2px 0 0; background: var(--blue); }
.category-glyph { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--blue); font-size: 12px; font-weight: 900; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.search-panel { border-top-left-radius: 0; padding: 22px; }
.search-form { display: grid; grid-template-columns: minmax(360px, 1.35fr) minmax(280px, .85fr) auto; gap: 20px; align-items: end; }
.field-block label, .field-label { display: block; margin-bottom: 8px; color: var(--ink-2); font-weight: 730; font-size: 13px; }
.field-label em { color: var(--muted-2); font-style: normal; font-weight: 500; }
.search-input-wrap { position: relative; }
.search-input-wrap input { width: 100%; height: 56px; padding: 0 44px 0 46px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; outline: none; transition: border .15s, box-shadow .15s; }
.search-input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,105,245,.11); }
.search-symbol { position: absolute; left: 16px; top: 50%; transform: translateY(-52%); color: var(--blue); font-size: 22px; }
.input-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted-2); font-size: 23px; cursor: pointer; }
.field-hint { margin: 7px 0 0; color: var(--muted-2); font-size: 12px; }
.upload-dropzone { display: flex !important; align-items: center; gap: 13px; min-height: 56px; margin: 0 !important; padding: 8px 14px; border: 1.5px dashed #8eb5fb; border-radius: 12px; background: #f7faff; color: var(--blue); cursor: pointer; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: white; border: 1px solid #cfe0ff; font-size: 22px; }
.upload-dropzone strong, .upload-dropzone small { display: block; }
.upload-dropzone strong { font-size: 13px; }
.upload-dropzone small { margin-top: 2px; color: var(--muted); font-weight: 500; font-size: 11px; }
.search-actions { display: flex; flex-direction: column; gap: 8px; }
.primary-button, .secondary-button, .danger-button, .back-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; font-weight: 740; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 7px 18px rgba(23,105,245,.19); }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line-strong); background: white; color: var(--ink-2); }
.secondary-button:hover { border-color: #9fb3d2; background: var(--surface-2); }
.secondary-button:disabled, .is-disabled { opacity: .48; pointer-events: none; }
.danger-button { border: 1px solid #f2b9b4; background: var(--red-soft); color: var(--red); }
.back-button { padding-left: 0; border: 0; background: transparent; color: var(--blue); }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 730; cursor: pointer; padding: 6px; }
.link-button { min-height: 42px; }
.filter-bar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.filter-control, .compact-select { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-control select, .compact-select select { min-width: 155px; height: 40px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink-2); font-size: 13px; outline: none; }
.filter-control select:focus, .compact-select select:focus { border-color: var(--blue); }
.filter-control select:disabled { color: #6b748a; background: var(--surface-2); }

.message-banner { margin: 18px 0; padding: 13px 16px; border: 1px solid #ffd59a; border-radius: 12px; background: #fff8eb; color: #7a4b00; }
.message-banner--error { border-color: #fac9c5; background: var(--red-soft); color: #8e2119; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 20px; }
.main-column { display: grid; gap: 20px; min-width: 0; }
.insights-column { display: grid; align-content: start; gap: 16px; }
.estimate-panel, .listings-panel, .insight-panel, .limitation-panel, .session-panel-mini { padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-heading--table { align-items: end; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.metric-card { min-height: 126px; padding: 19px; border-right: 1px solid var(--line); background: #fff; }
.metric-card:last-child { border-right: 0; }
.metric-card--primary { background: linear-gradient(140deg, #f5fbf8, #fff); }
.metric-label { display: block; color: var(--muted); font-size: 12px; font-weight: 680; }
.metric-card > strong, .confidence-line > strong { display: block; margin-top: 10px; color: var(--ink); font-size: 27px; line-height: 1.1; letter-spacing: -.035em; }
.metric-card--primary > strong { color: var(--green); }
.metric-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.confidence-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.score-ring { width: 44px; height: 44px; display: grid !important; place-items: center; flex: 0 0 auto; margin: 4px 0 0 !important; border: 5px solid #d9e7ff; border-top-color: var(--blue); border-radius: 50%; color: var(--blue) !important; font-size: 12px !important; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f8fafd; color: #5b6680; font-size: 11px; font-weight: 760; letter-spacing: .02em; }
td { color: var(--ink-2); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdff; }
.item-cell { display: flex; align-items: center; gap: 11px; min-width: 280px; }
.item-thumb { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; background: var(--surface-3); border: 1px solid var(--line); }
.item-cell strong { display: block; max-width: 360px; color: var(--ink-2); line-height: 1.35; }
.item-cell small { display: block; margin-top: 3px; color: var(--muted-2); }
.condition-chip, .match-chip, .status-chip, .count-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: #087a49; border: 1px solid #c7ead7; font-size: 10px; font-weight: 800; white-space: nowrap; }
.match-chip { background: var(--blue-soft); color: var(--blue-dark); border-color: #d1e1ff; }
.row-action { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--blue); cursor: pointer; }
.empty-cell { padding: 40px; text-align: center; color: var(--muted); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 14px; color: var(--muted); font-size: 12px; }
.sparkle { color: var(--purple); font-size: 20px; }
.insights-list { display: grid; gap: 11px; }
.insight { display: flex; gap: 11px; padding: 13px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 11px; background: #fbfdff; }
.insight > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.insight strong { font-size: 12px; }
.insight p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.insight--green { border-left-color: var(--green); }
.insight--green > span { background: var(--green-soft); color: var(--green); }
.insight--purple { border-left-color: var(--purple); }
.insight--purple > span { background: var(--purple-soft); color: var(--purple); }
.insight--amber { border-left-color: var(--amber); }
.insight--amber > span { background: var(--amber-soft); color: var(--amber); }
.limitation-panel { display: flex; gap: 12px; background: #fffbf3; border-color: #f2dfb4; }
.warning-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #ffedc2; color: #9b6200; font-weight: 900; }
.limitation-panel strong { font-size: 13px; }
.limitation-panel p, .session-panel-mini p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.session-panel-mini > div { display: flex; align-items: center; gap: 8px; }
.mini-icon { color: var(--purple); }

.detail-topbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.detail-actions { display: flex; gap: 9px; }
.detail-layout { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 20px; }
.item-card-panel { padding: 18px; align-self: start; }
.item-image-frame { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.item-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.facts-list { margin: 18px 0 0; }
.facts-list > div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts-list > div:last-child { border-bottom: 0; }
.facts-list dt { color: var(--muted); font-size: 11px; }
.facts-list dd { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 650; word-break: break-word; }
.detail-main { display: grid; gap: 20px; }
.detail-estimate-panel, .audit-panel { padding: 22px; }
.detail-price-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 12px; }
.detail-price-grid > div { padding: 18px; border-right: 1px solid var(--line); }
.detail-price-grid > div:last-child { border-right: 0; }
.detail-price-grid span { display: block; color: var(--muted); font-size: 11px; }
.detail-price-grid strong { display: block; margin-top: 8px; font-size: 25px; }
.range-track { position: relative; height: 8px; margin: 32px 7px 0; border-radius: 999px; background: #e8edf6; }
.range-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9ec1ff, var(--blue)); }
.range-track i { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%,-50%); border: 4px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 2px 10px rgba(23,105,245,.3); }
.range-track i.range-pos-0 { left: 0%; }
.range-track i.range-pos-10 { left: 10%; }
.range-track i.range-pos-20 { left: 20%; }
.range-track i.range-pos-30 { left: 30%; }
.range-track i.range-pos-40 { left: 40%; }
.range-track i.range-pos-50 { left: 50%; }
.range-track i.range-pos-60 { left: 60%; }
.range-track i.range-pos-70 { left: 70%; }
.range-track i.range-pos-80 { left: 80%; }
.range-track i.range-pos-90 { left: 90%; }
.range-track i.range-pos-100 { left: 100%; }
.range-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 11px; }
.check-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.check-list li { position: relative; padding-left: 24px; color: var(--ink-2); font-size: 12px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 900; }
.exclusion-list { display: grid; gap: 8px; }
.exclusion-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.exclusion-row strong { font-size: 11px; }
.exclusion-row small { display: block; color: var(--muted); }
.reason-chip { padding: 3px 7px; border-radius: 999px; background: var(--red-soft); color: #9d241b; font-size: 9px; font-weight: 800; white-space: nowrap; }
.empty-copy { color: var(--muted); }

.session-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.architecture-card { position: relative; padding: 22px; min-height: 190px; }
.architecture-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 850; }
.architecture-card h2 { margin-top: 20px; }
.architecture-card p { color: var(--muted); font-size: 13px; }
.flow-arrow { position: absolute; right: -26px; top: 50%; z-index: 2; color: var(--blue); font-size: 24px; }
.session-snapshot { padding: 22px; }
.empty-state { display: grid; justify-items: center; padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state > span { font-size: 42px; color: var(--purple); }
.empty-state h3 { margin-top: 8px; color: var(--ink); }
.empty-state p { max-width: 430px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.snapshot-stat { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.snapshot-stat span { color: var(--muted); font-size: 10px; }
.snapshot-stat strong { display: block; margin-top: 6px; font-size: 18px; }

.sources-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 20px; }
.sources-main, .sources-side { display: grid; align-content: start; gap: 18px; }
.source-card, .gate-card, .mcp-card, .categories-card, .privacy-card { padding: 22px; }
.source-card { display: grid; grid-template-columns: 100px 1fr; gap: 22px; }
.source-card--primary { border-top: 3px solid var(--blue); }
.source-logo { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 20px; background: var(--surface-2); font-size: 26px; font-weight: 800; }
.source-logo--ebay { color: #e53238; }
.source-logo--ebay span:first-child { color: #0064d2; }
.source-logo--ebay span:last-child { color: #f5af02; }
.source-title-line { display: flex; align-items: center; gap: 10px; }
.source-copy > p { color: var(--muted); }
.source-meta { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 16px 0 0; }
.source-meta > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.source-meta dt { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.source-meta dd { margin: 4px 0 0; font-size: 12px; font-weight: 720; }
.gate-card { display: flex; gap: 14px; border-color: #f2d493; background: var(--amber-soft); }
.gate-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #ffe5aa; color: #9a6100; font-weight: 900; }
.gate-card p, .mcp-card > p { margin-bottom: 0; color: var(--muted); }
.mcp-flow { display: grid; grid-template-columns: repeat(7,auto); align-items: center; gap: 8px; margin: 18px 0; overflow-x: auto; }
.mcp-flow div { min-width: 130px; padding: 12px; border: 1px solid #d9d0fc; border-radius: 10px; background: var(--purple-soft); color: #5234b5; text-align: center; font-size: 11px; font-weight: 750; }
.mcp-flow span { color: var(--purple); }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tool-chips code { padding: 6px 9px; border-radius: 8px; background: #f2f0f9; color: #4f378f; font-size: 11px; }
.source-category-list { display: grid; gap: 9px; }
.source-category { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.source-category .category-glyph { width: 30px; height: 30px; }
.source-category div { flex: 1; }
.source-category strong { display: block; font-size: 12px; }
.source-category small { display: block; color: var(--muted); font-size: 10px; }
.shield-mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 900; }

.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 28px; border-top: 1px solid var(--line); color: var(--muted); background: white; font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 360px; padding: 12px 15px; border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow-md); font-size: 12px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.loading .metric-card strong, .loading #listings-body { opacity: .45; }
.loading #search-button { opacity: .7; cursor: wait; }

@media (max-width: 1120px) {
  .app-header { grid-template-columns: 1fr auto; }
  .primary-nav { position: absolute; left: 0; right: 0; top: var(--header-height); height: auto; display: none; padding: 8px; background: white; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .primary-nav.is-open { display: grid; grid-template-columns: repeat(4,1fr); }
  .nav-item { min-height: 48px; justify-content: center; }
  .nav-item::after { display: none; }
  .mobile-only { display: grid; }
  .results-layout, .sources-layout { grid-template-columns: 1fr; }
  .insights-column { grid-template-columns: repeat(3,1fr); }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-actions { grid-column: 1 / -1; flex-direction: row; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .app-header { padding: 0 15px; }
  .brand { font-size: 18px; }
  .brand img { width: 36px; height: 36px; }
  .status-pill { display: none; }
  .primary-nav.is-open { grid-template-columns: repeat(2,1fr); }
  .page-shell { padding: 25px 14px 36px; }
  .page-heading { display: block; }
  .heading-badges { justify-content: flex-start; margin-top: 10px; }
  .category-tab { min-width: 135px; padding: 12px; }
  .search-panel { padding: 15px; }
  .search-form { grid-template-columns: 1fr; }
  .search-actions { grid-column: auto; }
  .metrics-grid, .detail-price-grid, .session-grid, .snapshot-grid { grid-template-columns: 1fr; }
  .metric-card, .detail-price-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-card:last-child, .detail-price-grid > div:last-child { border-bottom: 0; }
  .insights-column { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-topbar { align-items: flex-start; }
  .detail-actions { flex-direction: column; }
  .flow-arrow { display: none; }
  .source-card { grid-template-columns: 1fr; }
  .source-meta { grid-template-columns: repeat(2,1fr); }
  .app-footer { display: grid; text-align: center; }
}
.status-chip--demo { background: var(--amber-soft); color: #8a5800; border-color: #f1d18c; }
.status-chip--error { background: var(--red-soft); color: #9f241b; border-color: #f4c7c3; }
