/* ============================================================
   Micronix · Price monitor — modern theme
   Palette: #ffed00 (yellow), #000 (black), #fff (white background)
   ============================================================ */

:root {
    --yellow:        #ffed00;
    --yellow-soft:   #fff8a8;
    --yellow-glow:   rgba(255, 237, 0, 0.45);

    --ink:           #0a0a0a;
    --ink-soft:      #1a1a1a;

    --paper:         #ffffff;
    --paper-2:       #fafafa;
    --paper-3:       #f4f4f4;

    --line:          #ececec;
    --line-strong:   #d8d8d8;

    --muted:         #6b6b6b;
    --muted-2:       #9a9a9a;

    --good:          #15803d;
    --good-bg:       #ecfdf3;
    --bad:           #b91c1c;
    --bad-bg:        #fef2f2;
    --info:          #1e40af;
    --info-bg:       #eff6ff;

    --shadow-sm:     0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.04);
    --shadow-md:     0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
    --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.05);
    --shadow-pop:    0 0 0 4px var(--yellow-glow);

    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  14px;
    --r-xl:  20px;

    --t-fast: 120ms cubic-bezier(.4,0,.2,1);
    --t-base: 200ms cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper-2);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--muted); }

/* Material Symbols sizing */
.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.material-symbols-rounded.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.material-symbols-rounded.sm { font-size: 16px; }
.material-symbols-rounded.lg { font-size: 28px; }
.material-symbols-rounded.xl { font-size: 40px; }

/* ===== App shell with sidebar ===== */
.app {
    display: block;
    min-height: 100vh;
}

:root { --sidebar-w: 248px; }

aside.sidebar {
    background: var(--paper);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform var(--t-base);
    box-shadow: var(--shadow-lg);
}
body.menu-open aside.sidebar { transform: translateX(0); }

/* content shifts to make room for the sidebar when it is open (desktop) */
.content-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    transition: margin-left var(--t-base);
}
@media (min-width: 961px) {
    body.menu-open .content-area { margin-left: var(--sidebar-w); }
    aside.sidebar { box-shadow: var(--shadow-sm); }
}

/* dimmed backdrop behind the drawer (overlay mode on mobile) */
.nav-scrim {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 45;
    opacity: 0; visibility: hidden;
    transition: opacity var(--t-base), visibility var(--t-base);
}
@media (max-width: 960px) {
    body.menu-open .nav-scrim { opacity: 1; visibility: visible; }
}

aside.sidebar .brand {
    padding: 22px 22px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
}
aside.sidebar .brand a { display: block; line-height: 0; }
aside.sidebar .brand img {
    max-height: 44px;
    max-width: 100%;
    width: auto;
    display: block;
    height: 64px;
}

aside.sidebar .nav-section {
    padding: 14px 12px;
    flex: 1;
    overflow-y: auto;
}
aside.sidebar .nav-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted-2);
    font-weight: 600;
    padding: 8px 14px 6px;
}
aside.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
aside.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    position: relative;
}
aside.sidebar nav a:hover {
    background: var(--paper-3);
    color: var(--ink);
}
aside.sidebar nav a.active {
    background: var(--yellow);
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
aside.sidebar nav a.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 6px; bottom: 6px;
    width: 3px;
    background: var(--ink);
    border-radius: 0 3px 3px 0;
}
aside.sidebar nav a .material-symbols-rounded { font-size: 20px; }
aside.sidebar nav a .badge {
    margin-left: auto;
    background: var(--ink);
    color: var(--paper);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
aside.sidebar nav a.active .badge {
    background: var(--ink);
    color: var(--yellow);
}

aside.sidebar .side-foot {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 11.5px;
    line-height: 1.5;
}
aside.sidebar .side-foot strong { color: var(--ink); font-weight: 600; }

/* menu toggle — always visible, collapses/expands the sidebar; slides with the drawer */
.menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 60;
    background: var(--ink);
    color: var(--paper);
    border: none;
    width: 42px; height: 42px;
    border-radius: var(--r-md);
    cursor: pointer;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    transition: left var(--t-base), background var(--t-fast);
}
.menu-toggle:hover { background: #222; }
@media (min-width: 961px) {
    /* park the handle at the open drawer's edge so it reads as a collapse control */
    body.menu-open .menu-toggle { left: calc(var(--sidebar-w) - 52px); }
}

/* ===== Layout ===== */
main {
    padding: 32px 36px 64px;
    width: 100%;
}
/* when the sidebar is collapsed on desktop, clear the floating toggle button */
@media (min-width: 961px) {
    body:not(.menu-open) main { padding-left: 72px; }
}

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }

.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-head .titles h2 { display: flex; align-items: center; gap: 10px; }
.page-head .titles .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.muted { color: var(--muted); font-size: 13px; }

/* ===== KPI cards ===== */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.kpi {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base);
}
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi .icon-wrap {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper-3);
    margin-bottom: 12px;
}
.kpi.accent .icon-wrap { background: var(--yellow); color: var(--ink); }
.kpi.good   .icon-wrap { background: var(--good-bg); color: var(--good); }
.kpi.bad    .icon-wrap { background: var(--bad-bg);  color: var(--bad);  }
.kpi.info   .icon-wrap { background: var(--info-bg); color: var(--info); }
.kpi .label {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--muted); font-weight: 600;
    margin-bottom: 2px;
}
.kpi .value {
    font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.kpi .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px;
    background: var(--yellow);
    color: var(--ink);
    border: 1px solid var(--yellow);
    border-radius: var(--r-md);
    font-weight: 600; font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--t-fast);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover {
    color: var(--ink);
    background: #fff35a;
    border-color: #fff35a;
    box-shadow: var(--shadow-md), var(--shadow-pop);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.dark:hover { background: var(--ink-soft); color: var(--yellow); border-color: var(--ink-soft); box-shadow: var(--shadow-md); }

.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.btn.danger { background: var(--paper); color: var(--bad); border-color: #f4cccc; }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); border-color: #e8a5a5; box-shadow: none; }

.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.sm .material-symbols-rounded { font-size: 16px; }

.btn.icon-only { padding: 8px; }
.btn.icon-only .material-symbols-rounded { font-size: 18px; }

/* ===== Flash ===== */
.flash {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: var(--yellow-soft);
    color: var(--ink);
    border: 1px solid #f0d800;
    font-size: 14px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-sm);
}
.flash.error { background: var(--bad-bg); border-color: #f5d5d5; color: var(--bad); }
.flash.ok    { background: var(--good-bg); border-color: #c5e9d2; color: var(--good); }
.flash.info  { background: var(--info-bg); border-color: #cfe0fb; color: var(--info); }
.flash.info a, .flash.error a { color: inherit; text-decoration: underline; }

/* ===== Toolbar ===== */
.toolbar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.search {
    position: relative;
    flex: 1; min-width: 280px;
}
.search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--paper);
    font-family: inherit;
    transition: all var(--t-fast);
    box-shadow: var(--shadow-sm);
}
.search input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--shadow-pop), var(--shadow-sm);
}
.search .material-symbols-rounded {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    pointer-events: none;
}

/* ===== Card ===== */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.card.padded-lg { padding: 28px; }
.card .row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.card .row:last-child { border: none; padding-bottom: 0; }
.card .row span:first-child { color: var(--muted); }
.card .row span:last-child  { font-weight: 600; }

.empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--paper);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
}
.empty-state .material-symbols-rounded.xl {
    color: var(--muted-2);
    margin-bottom: 12px;
}
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 18px; }

/* ===== Table ===== */
.table-wrap {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    /* scroll in both axes when the table is larger than the screen; header stays pinned */
    overflow: auto;
    max-height: calc(100vh - 90px);
    box-shadow: var(--shadow-sm);
}
table.grid {
    width: 100%;
    border-collapse: collapse;
}
/* the multi-source comparison table needs room; below this it scrolls horizontally */
table.grid.compare { min-width: 1080px; }
table.grid th, table.grid td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.grid th {
    background: var(--paper-2);
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    position: sticky; top: 0;
}
table.grid tbody tr { transition: background var(--t-fast); }
table.grid tbody tr:hover { background: var(--paper-2); }
table.grid tr:last-child td { border-bottom: none; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid td.thumb img {
    width: 44px; height: 44px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    padding: 2px;
}
table.grid td.actions { text-align: right; white-space: nowrap; }
table.grid td.actions .btn { margin-left: 4px; }

table.grid td .cell-stack { display: flex; flex-direction: column; gap: 2px; }
table.grid td .cell-stack .name { font-weight: 500; color: var(--ink); }
table.grid td .cell-stack .meta { font-size: 11.5px; color: var(--muted); }

.price-our { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-min { font-weight: 600; color: var(--good); font-variant-numeric: tabular-nums; }
.price-max { font-weight: 600; color: var(--bad);  font-variant-numeric: tabular-nums; }
.price-na  { color: var(--muted-2); font-style: italic; }

.delta-good, .delta-bad {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600; font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.delta-good { background: var(--good-bg); color: var(--good); }
.delta-bad  { background: var(--bad-bg);  color: var(--bad);  }
.delta-good .material-symbols-rounded,
.delta-bad  .material-symbols-rounded { font-size: 14px; }
.delta-pct {
    margin-left: 4px;
    padding-left: 6px;
    border-left: 1px solid currentColor;
    opacity: 0.85;
    font-weight: 600;
    font-size: 11.5px;
}

/* ===== Badges ===== */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--paper-3);
    color: var(--ink);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    margin-right: 4px;
    border: 1px solid var(--line);
}
.tag.ok    { background: var(--yellow); border-color: #f0d800; color: var(--ink); font-weight: 600; }
.tag.good  { background: var(--good-bg); color: var(--good); border-color: #c5e9d2; }
.tag.bad   { background: var(--bad-bg);  color: var(--bad);  border-color: #f5d5d5; }
.tag .material-symbols-rounded { font-size: 13px; }

/* ===== Detail page ===== */
.product-head {
    display: flex; gap: 24px; align-items: flex-start;
    margin-bottom: 28px;
    background: var(--paper);
    padding: 24px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.product-head .image {
    width: 120px; height: 120px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.product-head .image img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
}
.product-head .meta { flex: 1; min-width: 220px; }
.product-head .meta h2 { margin-bottom: 4px; }
.product-head .meta .sub {
    display: flex; flex-wrap: wrap; gap: 8px;
    color: var(--muted); font-size: 13px;
    margin-bottom: 10px;
}
.product-head .meta .sub > span {
    display: inline-flex; align-items: center; gap: 4px;
}

.product-head .price-block {
    background: var(--yellow);
    padding: 16px 20px;
    border-radius: var(--r-md);
    color: var(--ink);
    text-align: right;
    box-shadow: 0 2px 0 #d4c500;
    flex-shrink: 0;
    min-width: 180px;
}
.product-head .price-block .label {
    font-size: 11px; text-transform: uppercase;
    font-weight: 700; letter-spacing: 0.7px;
    opacity: 0.7;
}
.product-head .price-block .value {
    font-size: 28px; font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* ===== Detail form ===== */
form.detail label {
    display: flex; align-items: center; gap: 6px;
    font-weight: 600;
    margin: 16px 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ink);
}
form.detail label .material-symbols-rounded { font-size: 16px; color: var(--muted); }
form.detail input[type="url"],
form.detail input[type="text"],
form.detail textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font-family: inherit;
    background: var(--paper);
    transition: all var(--t-fast);
    box-shadow: var(--shadow-sm);
}
form.detail input:focus, form.detail textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--shadow-pop), var(--shadow-sm);
}

form.detail .actions {
    margin-top: 22px;
    display: flex; gap: 10px; flex-wrap: wrap;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

/* ===== Scrape results ===== */
.scrape-results {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.scrape-results .source {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base);
}
.scrape-results .source:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.scrape-results .source > header {
    background: var(--ink);
    color: var(--paper);
    padding: 12px 18px;
    font-weight: 700;
    font-size: 13px;
    display: flex; justify-content: space-between; align-items: center;
}
.scrape-results .source > header .src-name {
    display: flex; align-items: center; gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.scrape-results .source > header a {
    color: var(--yellow);
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.scrape-results .source > header a:hover { color: var(--paper); }
.scrape-results .source .body { padding: 18px; }
.scrape-results .source .stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.scrape-results .source .stats .stat {
    padding: 12px 14px;
    background: var(--paper-2);
    border-radius: var(--r-md);
    border: 1px solid var(--line);
}
.scrape-results .source .stats .stat .label {
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}
.scrape-results .source .stats .stat .value {
    font-size: 20px; font-weight: 700;
    margin-top: 2px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.scrape-results .source .footer-meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line-strong);
    color: var(--muted);
    font-size: 12px;
}
.scrape-results .source .samples {
    margin-top: 6px;
    display: flex; flex-wrap: wrap; gap: 4px;
}
.scrape-results .source .samples .chip {
    background: var(--paper-3);
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* ===== Settings page ===== */
.callout {
    background: linear-gradient(135deg, var(--yellow-soft), #fffce0);
    border: 1px solid #f0d800;
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.callout h3 { display: flex; align-items: center; gap: 8px; }
.callout ol { margin: 8px 0 0; padding-left: 22px; }
.callout li { margin-bottom: 4px; }
.callout code {
    background: rgba(0,0,0,0.07);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}
.callout kbd {
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
}

textarea.code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12.5px;
    resize: vertical;
}

/* ===== Footer ===== */
footer.foot {
    text-align: center;
    padding: 24px;
    color: var(--muted-2);
    font-size: 12px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    /* sidebar overlays content (drawer + scrim handled by the base rules above) */
    main { padding: 70px 16px 40px; }
    .table-wrap { max-height: calc(100vh - 84px); }
    .scrape-results { grid-template-columns: 1fr; }
    .product-head { flex-direction: column; }
    .product-head .price-block { width: 100%; }
    table.grid td.thumb { display: none; }
    table.grid th, table.grid td { padding: 10px 8px; }
    .kpi .value { font-size: 20px; }
}

/* ===== Competitiveness UI (v2) ===== */
.material-symbols-rounded.xs { font-size: 13px; vertical-align: -2px; }

/* dashboard offer cells */
.offer-cell { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.offer-cell .offer-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-cell.win .offer-price { color: var(--good); }
.offer-cell .offer-shop { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.shop-link { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.shop-link:hover { color: var(--info); }
.src-tag {
    font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px;
    background: var(--paper-3); border: 1px solid var(--line);
    color: var(--muted); padding: 0 5px; border-radius: 999px; font-weight: 600;
}
.src-tag.own-tag { background: var(--yellow); border-color: #f0d800; color: var(--ink); }

/* verdict banner */
.verdict {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    flex-wrap: wrap;
    padding: 18px 22px; margin-bottom: 20px;
    border-radius: var(--r-lg); border: 1px solid var(--line);
    background: var(--paper);
}
.verdict.good { background: var(--good-bg); border-color: #c5e9d2; }
.verdict.bad  { background: var(--bad-bg);  border-color: #f5d5d5; }
.verdict.even { background: var(--info-bg); border-color: #cfe0fb; }
.verdict-main { display: flex; align-items: center; gap: 16px; }
.verdict-main > .material-symbols-rounded { font-size: 34px; }
.verdict.good .material-symbols-rounded { color: var(--good); }
.verdict.bad  .material-symbols-rounded { color: var(--bad); }
.verdict-main strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.verdict-main span { color: var(--muted); font-size: 13px; }
.verdict-offers { display: flex; gap: 22px; }
.verdict-offers .vo .lbl {
    font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--muted); font-weight: 600; margin-bottom: 3px;
    display: flex; align-items: center; gap: 4px;
}
.verdict-offers .vo .lbl .material-symbols-rounded { font-size: 14px; }

/* per-source stat highlight */
.scrape-results .source .stats .stat.win { background: var(--good-bg); border-color: #c5e9d2; }
.scrape-results .source .stats .stat .who { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 500; }

/* full offer table */
.offers-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.offers-table th {
    text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line);
}
.offers-table th.num, .offers-table td.num { text-align: right; }
.offers-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.offers-table td.rank { color: var(--muted-2); font-weight: 700; width: 34px; font-variant-numeric: tabular-nums; }
.offers-table tr.win    td { background: var(--good-bg); }
.offers-table tr.win    td.rank { color: var(--good); }
.offers-table tr.second td { background: #fafff5; }
.offers-table tr.own    td { background: var(--yellow-soft); }
.offers-table tr.own    td.rank .material-symbols-rounded { color: var(--ink); }
.offers-table tr:hover td { background: var(--paper-3); }
.offers-table tr.win:hover td { background: #e3f7ea; }

/* search helper link in detail form */
.find-link { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--info); }
.detail label { display: flex; align-items: center; gap: 6px; }

/* sparkline */
svg.spark { width: 100%; height: 90px; display: block; }
.spark-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-line.down { stroke: var(--good); }
.spark-line.up   { stroke: var(--bad); }
.spark-dot { fill: var(--muted); }
.spark-dot.down { fill: var(--good); }
.spark-dot.up   { fill: var(--bad); }
.spark-our { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .5; }
.spark-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink); }
.spark-legend i { display: inline-block; width: 14px; height: 0; border-top-width: 2px; border-top-style: solid; vertical-align: middle; margin-right: 4px; }
.spark-legend .sw-min { border-top-color: var(--muted); }
.spark-legend .sw-our { border-top-color: var(--ink); border-top-style: dashed; }

@media (max-width: 960px) {
    .verdict { flex-direction: column; align-items: flex-start; }
    .offers-table td:nth-child(5), .offers-table th:nth-child(5) { display: none; }
}

/* ===== VAT (s/bez DPH) + per-source comparison ===== */
.p-vat { display: block; }
.p-net { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.offer-cell .offer-net { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.product-head .price-block .value-sub {
    font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums; opacity: .8;
}
.scrape-results .source .stats .stat .net {
    font-size: 11.5px; color: var(--muted); font-weight: 500;
    font-variant-numeric: tabular-nums; margin-top: 1px;
}

/* per-source dashboard cell: two cheapest offers as an aligned ranked list */
.ofr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.ofr li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}
.ofr li + li { padding-top: 6px; border-top: 1px dashed var(--line); }
.ofr .rk {
    width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
    background: var(--paper-2); color: var(--muted); border: 1px solid var(--line);
}
.ofr li.r1 .rk { background: var(--good-bg); color: var(--good); border-color: #c5e9d2; }
.ofr .sh {
    min-width: 0; font-size: 12.5px; color: var(--muted); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ofr .sh a { color: var(--muted); text-decoration: none; }
.ofr .sh a:hover { color: var(--ink); text-decoration: underline; }
.ofr .pr { text-align: right; display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.ofr .pr b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ofr li.r1 .pr b { color: var(--good); }
.ofr .pr i { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-err { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

table.grid.compare th, table.grid.compare td { vertical-align: top; }
table.grid.compare td.price-our { vertical-align: top; }
table.grid.compare td .cell-stack { padding-top: 2px; }
