/* Lightfeed app theme: matches lightfeed.ai (Inter body, Sora headings, blue primary, slate neutrals, light surfaces). */
:root {
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --line: #e2e8f0; --line-strong: #cbd5e1;
  --ink: #020817; --ink-2: #334155; --ink-3: #64748b;
  --accent: #2563eb; --accent-strong: #1d4ed8; --accent-ink: #ffffff; --accent-soft: #eff6ff;
  --brand-blue: #3e63dd; --brand-gold: #eeb523;
  --up: #dc2626; --up-soft: #fef2f2; --down: #059669; --down-soft: #ecfdf5; --promo: #b45309; --promo-soft: #fffbeb; --review: #6d28d9; --review-soft: #f5f3ff;
  --shadow: 0 1px 2px rgba(2, 8, 23, .04), 0 1px 3px rgba(2, 8, 23, .06);
  --radius: 8px;
  --display: "Sora", "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

/* shell */
header.top { display: flex; align-items: center; gap: 18px; padding: 0 24px; height: 56px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.brand svg { width: 24px; height: 24px; display: block; }
.brand small { font-family: var(--body); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-left: 10px; }
nav.main { display: flex; gap: 2px; margin-left: 12px; }
nav.main a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 500; font-size: 13.5px; }
nav.main a:hover { background: var(--surface-2); text-decoration: none; }
nav.main a.active { color: var(--accent-strong); background: var(--accent-soft); }
.top .grow { flex: 1; }
.top .meta { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.top .user { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
main { padding: 24px 24px 56px; display: grid; gap: 20px; max-width: 1480px; margin: 0 auto; align-content: start; }
h1 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 span { font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--ink-3); margin-left: 10px; letter-spacing: 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: -.01em; margin: 0 0 10px; color: var(--ink); }
h2 span { color: var(--ink-3); font-weight: 400; margin-left: 8px; font-family: var(--body); }
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagehead .grow { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.help { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; max-width: 1100px; margin: -6px 0 4px; }
.help b { color: var(--ink-2); font-weight: 600; }

/* controls */
.btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; line-height: 1.4; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ok:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--up); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; }
textarea { width: 100%; min-height: 140px; font-family: var(--mono); font-size: 12.5px; }
.field { display: grid; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.field > * { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input[type="search"] { height: 34px; padding: 0 10px; }
.toolbar .btn { height: 34px; display: inline-flex; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); height: 34px; }

/* tiles and panels */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.tile .who { font-weight: 600; font-size: 13px; line-height: 1.3; }
.tile .who small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; margin-top: 2px; }
.tile .big { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .big em { font-style: normal; font-size: 11px; font-family: var(--body); font-weight: 600; color: var(--ink-3); margin-left: 6px; letter-spacing: .06em; }
.tile .big.up { color: var(--up); } .tile .big.down { color: var(--down); } .tile .big.warn { color: var(--promo); }
.bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.bar i { display: block; height: 100%; }
.bar .h { background: var(--up); } .bar .p { background: var(--line-strong); } .bar .l { background: var(--down); } .bar .l.warn { background: var(--promo); }
.tile .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 12px; }
.tile .facts b { color: var(--ink); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel .head h2 { margin: 0; }
.panel .head .grow { flex: 1; }
.panel .body { padding: 14px 16px; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.empty-note { padding: 24px 16px; color: var(--ink-3); font-size: 13px; }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; background: var(--surface); position: sticky; top: 0; border-bottom: 1px solid var(--line-strong); }
th.c, td.c { text-align: right; }
td.item { min-width: 240px; }
td.item .t { font-weight: 500; }
.kvi { display: inline-block; font-size: 10px; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); margin-left: 6px; vertical-align: 1px; font-weight: 600; }
td.item .own { color: var(--ink-3); font-size: 12px; }
td.cell { min-width: 170px; cursor: pointer; vertical-align: top; }
td.cell:hover { background: var(--surface-2); }
.price { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; }
.price .now { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.price .was { color: var(--ink-3); text-decoration: line-through; font-size: 12px; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.chip { display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.chip.promo { background: var(--promo-soft); color: var(--promo); border-color: #fde68a; }
.chip.oos { background: var(--up-soft); color: var(--up); border-color: #fecaca; }
.chip.review { background: var(--review-soft); color: var(--review); border-color: #ddd6fe; }
.chip.gapup { background: var(--up-soft); color: var(--up); } .chip.gapdown { background: var(--down-soft); color: var(--down); } .chip.par { background: var(--surface-2); color: var(--ink-2); }
.chip.conf { background: var(--surface-2); color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.ok { background: var(--down-soft); color: var(--down); border-color: #a7f3d0; }
.chip.mkt { background: var(--promo-soft); color: var(--promo); border-color: #fcd34d; }
.chip.filter { background: var(--accent-soft); color: var(--accent-strong); border-color: #bfdbfe; font-weight: 500; font-size: 12px; padding: 3px 8px; }
.chip.filter button { border: 0; background: transparent; cursor: pointer; font-size: 13px; padding: 0 0 0 6px; color: inherit; line-height: 1; }
td.empty { color: var(--ink-3); font-size: 12px; text-align: right; }
.their { color: var(--ink-3); font-size: 11.5px; text-align: right; margin-top: 2px; max-width: 220px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td input[type="text"], td input[type="number"] { width: 100%; padding: 4px 6px; font-size: 13px; }
td input[type="number"] { width: 90px; }
table tr.group th { text-align: left; background: var(--bg); color: var(--ink-2); font-size: 11px; letter-spacing: .06em; padding: 8px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: static; }
table tr.group th span { margin-left: 6px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sortable.sorted { color: var(--accent-strong); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr.clickable.open td { background: var(--accent-soft); }
tr.detail > td { background: var(--bg); padding: 10px 16px 14px 60px; }
table.sub { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
table.sub th { position: static; background: var(--surface-2); }
table.sub th, table.sub td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.sub th.c, table.sub td.c { text-align: right; }
.mono { font-family: var(--mono); font-size: 12px; }
table#cat.editing input[type=text], table#cat.editing input[type=number] { width: 100%; box-sizing: border-box; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 8px; }

/* thumbnails */
img.thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); vertical-align: middle; margin-right: 8px; flex: none; }
img.thumb:not([src]), img.thumb[src=""] { display: none; }
td.thumbcell { width: 52px; padding-right: 0; }
td.cell img.thumb { float: left; margin: 0 8px 4px 0; width: 36px; height: 36px; }

/* review queue */
.queue { display: grid; gap: 1px; background: var(--line); }
.qcard { background: var(--surface); padding: 12px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.qcard .imgs { display: flex; gap: 4px; }
.qcard.compact { padding: 10px 14px; font-size: 12.5px; }
.qcard.compact img, .qcard.compact .noimg { width: 40px; height: 40px; }
.qcard img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.qcard .noimg { width: 56px; height: 56px; border-radius: 6px; background: var(--surface-2); }
.qcard .pair { display: grid; gap: 4px; font-size: 12.5px; }
.qcard .pair .lbl { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-right: 6px; }
.qcard .why { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.qcard .acts { display: flex; gap: 8px; margin-top: 8px; align-items: center; }

/* pairwise */
.pair-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.pair-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.pair-card .hdr { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.pair-card .hdr b { font-size: 13px; }
.pair-card .basket { font-family: var(--display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pair-card table { font-size: 12.5px; }
.pair-card td, .pair-card th { padding: 5px 8px; }

/* overview */
.banner { background: var(--accent-soft); border: 1px solid #bfdbfe; color: var(--ink); border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; }
.banner a { font-weight: 600; }
.series { display: grid; gap: 14px; }
.series-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
@media (max-width: 1000px) { .series-card { grid-template-columns: 1fr; } }
.series-card .left { padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.series-card .right { border-left: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
@media (max-width: 1000px) { .series-card .right { border-left: 0; border-top: 1px solid var(--line); } }
.series-card .title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.series-card .title b { font-size: 14px; }
.series-card .title a { font-size: 12.5px; }
.series-card .mini-table { width: 100%; border-collapse: collapse; margin-top: 4px; table-layout: auto; }
.series-card .mini-table th, .series-card .mini-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.series-card .mini-table th.c, .series-card .mini-table td.c { text-align: right; }
.series-card .mini-table th { position: static; }
tr.comp-row { cursor: pointer; }
tr.comp-row:hover td { background: var(--surface-2); }
tr.drivers td { background: var(--bg); padding: 12px 14px; }
.drivers-stack { display: grid; gap: 14px; }
.drivers-grid .h { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.drv .chip { white-space: nowrap; }
.trend { width: 100%; height: 150px; display: block; }
.change-list { display: grid; gap: 6px; font-size: 12.5px; }
.change-list .h { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-top: 6px; }
.change-list .c { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.change-list .c span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* drawer, toast, misc */
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px -16px rgba(2, 8, 23, .25); transform: translateX(100%); transition: transform .2s ease; z-index: 10; display: grid; grid-template-rows: auto 1fr; }
.drawer.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }
.drawer .head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.drawer .head .grow { flex: 1; }
.drawer .head .t { font-weight: 600; }
.drawer .head .s { color: var(--ink-3); font-size: 12px; }
.drawer .bodyx { padding: 16px; overflow: auto; display: grid; gap: 14px; align-content: start; }
.drawer svg { width: 100%; height: 140px; display: block; }
.drawer .obs { font-size: 12.5px; }
.drawer .obs td { padding: 4px 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; }
.kv span:nth-child(odd) { color: var(--ink-3); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; }
.progress { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.progress .log { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: pre-wrap; }
.storelist { display: grid; gap: 6px; }
.storelist label { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.storelist label:hover { background: var(--surface-2); }
.storelist .dist { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }

/* activity */
#activity { display: inline-flex; align-items: center; gap: 6px; }
#activity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
#activity.busy .dot { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #activity.busy .dot { animation: none; } }
.task { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.task .t { display: flex; gap: 8px; align-items: baseline; }
.task .t b { flex: 1; font-size: 13px; }
.task .t .chip { flex: none; }
.task .meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.task .cur { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .pbar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.task .pbar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.task.error .pbar i { background: var(--up); }
.task .log { font-family: var(--mono); font-size: 11px; color: var(--ink-3); max-height: 120px; overflow: auto; white-space: pre-wrap; border-top: 1px solid var(--line); padding-top: 6px; display: none; }
.task.open .log { display: block; }
.task .acts { display: flex; gap: 8px; align-items: center; }

.brand .wsel { font: inherit; font-family: var(--body); font-size: 12.5px; font-weight: 500; margin-left: 10px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); letter-spacing: 0; text-transform: none; }

.tile.clickable { cursor: pointer; }
.tile.clickable:hover { border-color: var(--line-strong); }
.tile.focused { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

td .src { font-weight: 400; white-space: nowrap; font-variant-numeric: normal; }
.drv.clickable:hover { background: var(--surface-2); }

img.logo { vertical-align: -3px; margin-right: 7px; border-radius: 3px; }
.tile .who img.logo { vertical-align: -4px; }
.chip img.logo { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; }

.tile.group { grid-column: span 2; }
.tile.group table.stores { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tile.group table.stores th { position: static; background: transparent; padding: 4px 8px; }
.tile.group table.stores td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tile.group table.stores tr:last-child td { border-bottom: 0; }
tr.store-row.clickable { cursor: pointer; }
tr.store-row.clickable:hover td { background: var(--surface-2); }
tr.store-row.focused td { background: var(--accent-soft); }
@media (max-width: 900px) { .tile.group { grid-column: auto; } }

.chip.oob { background: var(--review-soft); color: var(--review); border-color: #ddd6fe; }
.tile.group table.stores { margin-top: 6px; }
tr.drv td { vertical-align: middle; }
tr.drv .chips { justify-content: flex-end; }

tr.drow td { vertical-align: middle; }
tr.drow.clickable { cursor: pointer; }
tr.drow.clickable:hover td { background: var(--surface-2); }
tr.drow .chips { justify-content: flex-end; }
table.sub td.thumbcell { width: 52px; }
.tiles > .panel.inline { grid-column: 1 / -1; border-color: var(--accent); }
#drivers:not(.inline) #drivers-close { display: none; }
table.sub td.thumbcell img.thumb { width: 40px; height: 40px; object-fit: contain; display: block; }
table.sub td:last-child { white-space: nowrap; }
.tile .facts .sym.down { color: var(--down); } .tile .facts .sym.up { color: var(--up); } .tile .facts .sym.warn { color: var(--promo); }
.tile .facts .sym b { color: inherit; }
.drivers-stack summary.h { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.drivers-stack summary.h .sym { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); min-width: 42px; font-variant-numeric: tabular-nums; }
.drivers-stack summary.h .sym.down { color: var(--down); } .drivers-stack summary.h .sym.up { color: var(--up); } .drivers-stack summary.h .sym.warn { color: var(--promo); }
.drivers-stack summary.h:hover { color: var(--accent); }
.drivers-stack summary::-webkit-details-marker { display: none; }
.legend { margin-top: 8px; }
svg.hist { width: 100%; height: auto; display: block; margin: 10px 0 4px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row .sw.line { width: 18px; height: 0; border-top: 2px solid var(--ink-2); }
.legend-row .sw.line.promo { border-color: var(--promo); }
.legend-row .sw.line.ref { border-top-style: dashed; border-color: var(--accent); }
.legend-row .sw.box { width: 12px; height: 8px; border-radius: 2px; background: #059669; opacity: .85; }
.legend-row .sw.box.oos { background: #dc2626; }

/* Coverage by brand grid (run page) */
.covtable td.cov { font-variant-numeric: tabular-nums; }
.covtable td.cov b { font-weight: 600; } .covtable td.cov small { color: var(--ink-3); font-size: 11px; } .covtable td.cov i { font-style: normal; color: var(--review); font-size: 11px; font-weight: 500; }
.covtable td.cov.full { background: color-mix(in srgb, var(--down) 18%, var(--surface)); }
.covtable td.cov.part { background: color-mix(in srgb, var(--down) 9%, var(--surface)); }
.covtable td.cov.thin { background: color-mix(in srgb, var(--promo) 10%, var(--surface)); }
.covtable td.cov.none { color: var(--ink-3); }
.covtable tr.own td:first-child { font-weight: 600; }
.covtable tr.total td { border-top: 2px solid var(--line); font-weight: 600; }
.legend i.cov { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); }
.legend i.cov.full { background: color-mix(in srgb, var(--down) 18%, var(--surface)); } .legend i.cov.part { background: color-mix(in srgb, var(--down) 9%, var(--surface)); } .legend i.cov.thin { background: color-mix(in srgb, var(--promo) 10%, var(--surface)); } .legend i.cov.none { background: var(--surface); }

/* An index built on almost nothing should not read as confidently as one built on a full basket. */
.tile .big.thin { color: var(--ink-3); }
.tile .big.thin::after { content: "thin sample"; display: block; font-family: var(--body); font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--promo); margin-top: 2px; }

/* Drill-down tabs: the index card's own symbol+count vocabulary, used as navigation. */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs .tab { display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; padding: 7px 11px; margin-bottom: -1px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.tabs .tab:hover { background: var(--surface-2, rgba(0,0,0,.03)); }
.tabs .tab.on { background: var(--surface); border-color: var(--line); border-bottom: 1px solid var(--surface); color: var(--ink); font-weight: 600; }
.tabs .tab .sym { pointer-events: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs .tab .sym b { color: inherit; }
.tabs .tab .sym.up { color: var(--up); } .tabs .tab .sym.down { color: var(--down); }
.chip.gapup, .chip.gapdown { font-variant-numeric: tabular-nums; }
.tabpane[hidden] { display: none; }
