/* Dealfinder dashboard. Zinc neutrals in the shadcn/ui manner, one emerald brand accent, semantic
   status colours. Light is the base; dark comes from the OS or a manual [data-theme] override. */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-2: #e4e4e7;
  --border: #e4e4e7;
  --input: #d4d4d8;
  --fg: #09090b;
  --fg-muted: #71717a;
  --primary: #047857;
  --primary-hover: #065f46;
  --primary-fg: #ffffff;
  --success: #047857;
  --danger: #dc2626;
  --warning: #b45309;
  --info: #2563eb;
  --violet: #7c3aed;
  --ring: #059669;
  --overlay: rgb(9 9 11 / .4);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  /* charts: one fixed colour per shop (validated for colour-vision deficiency, every pair) */
  --s-plaisio: #2a78d6;
  --s-eshop: #e0552a;
  --s-kotsovolos: #1baf7a;
  --s-public: #eda100;
  --s-skroutz: #c2417f;
  --s-default: #2a78d6;
  --rise: #e34948;  /* price went up */
  --fall: #1c5cab;  /* price went down */
  --grid: #f0f0f2;
  --axis: #d4d4d8;
  color-scheme: light;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --font: ui-sans-serif, system-ui, "Segoe UI Variable Text", "Segoe UI", -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sidebar-w: 232px;
  --topbar-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --card: #111113; --muted: #1c1c1f; --muted-2: #27272a; --border: #232326; --input: #2e2e33;
    --fg: #fafafa; --fg-muted: #a1a1aa;
    --primary: #10b981; --primary-hover: #34d399; --primary-fg: #022c22;
    --success: #34d399; --danger: #f87171; --warning: #fbbf24; --info: #60a5fa; --violet: #a78bfa; --ring: #34d399;
    --overlay: rgb(0 0 0 / .6); --shadow-sm: none; --shadow-lg: 0 10px 30px rgb(0 0 0 / .5);
    --s-plaisio: #3987e5; --s-eshop: #d6432f; --s-kotsovolos: #199e70; --s-public: #c18900; --s-skroutz: #d6589a; --s-default: #3987e5;
    --rise: #e66767; --fall: #6da7ec; --grid: #1c1c1f; --axis: #3f3f46;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --card: #111113; --muted: #1c1c1f; --muted-2: #27272a; --border: #232326; --input: #2e2e33;
  --fg: #fafafa; --fg-muted: #a1a1aa;
  --primary: #10b981; --primary-hover: #34d399; --primary-fg: #022c22;
  --success: #34d399; --danger: #f87171; --warning: #fbbf24; --info: #60a5fa; --violet: #a78bfa; --ring: #34d399;
  --overlay: rgb(0 0 0 / .6); --shadow-sm: none; --shadow-lg: 0 10px 30px rgb(0 0 0 / .5);
  --s-plaisio: #3987e5; --s-eshop: #d6432f; --s-kotsovolos: #199e70; --s-public: #c18900; --s-skroutz: #d6589a; --s-default: #3987e5;
  --rise: #e66767; --fall: #6da7ec; --grid: #1c1c1f; --axis: #3f3f46;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 14px/20px var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
[hidden] { display: none !important; }
/* a friend's account (accounts.py): the owner's pages and buttons aren't theirs */
[data-role="friend"] [data-owner] { display: none !important; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.icon { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.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; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-muted); }
.small { font-size: 12px; line-height: 16px; }
.mono { font-family: var(--mono); font-size: .92em; }
.good { color: var(--success); }
.bad { color: var(--danger); }
.warn { color: var(--warning); }
.nowrap { white-space: nowrap; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 12px; border-right: 1px solid var(--border); background: var(--card);
}
.brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { font-size: 12px; font-weight: 500; color: var(--fg-muted); padding: 0 8px 4px; }
.nav-bottom { margin-top: auto; }
.nav-link {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: var(--radius-sm);
  color: var(--fg-muted); font-weight: 500; text-decoration: none; position: relative;
}
button.nav-link { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.nav-link:hover { background: var(--muted); color: var(--fg); }
.nav-link[aria-current="page"] { background: var(--muted); color: var(--fg); }
.nav-link[aria-current="page"] .icon { color: var(--primary); }
.nav-link .nav-dot { margin-left: auto; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px; font-weight: 600;
  line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; color: #fff; background: var(--danger); }
.nav-badge.warn { background: var(--warning); color: #1c1917; }
.nav-badge.new { background: var(--primary); color: var(--primary-fg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: none; }
.topbar-spacer { flex: 1; }
.scan-status {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin-left: -10px;
  border-radius: var(--radius); color: var(--fg-muted); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.scan-status:hover { background: var(--muted); color: var(--fg); }
.ai-status { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; color: var(--fg-muted); font-weight: 500; white-space: nowrap; }
.ai-status[data-on="true"] .icon { color: var(--primary); }
.scan-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.scan-bar > div { height: 100%; background: var(--info); transition: width .6s ease; }
.view { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 32px 48px; }
.view.narrow { max-width: 880px; }

.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--fg-muted); flex-shrink: 0; display: inline-block; }
.dot-ok { background: var(--success); }
.dot-busy { background: var(--info); }
.dot-warn { background: var(--warning); }
.dot-err { background: var(--danger); }
.dot-off { background: var(--muted-2); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* mobile tab bar + nav sheet */
.tabbar { display: none; }
.nav-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 45; }

/* tablet: icon rail */
@media (max-width: 1023px) and (min-width: 768px) {
  :root { --sidebar-w: 60px; }
  .sidebar { padding: 12px 10px; align-items: center; }
  .brand { padding: 0; }
  .brand-name, .nav-group-label, .nav-link .label, .nav-link .nav-dot { display: none; }
  .nav-group { border-top: 1px solid var(--border); padding-top: 12px; }
  .nav-group:first-of-type, .nav-bottom { border-top: 0; padding-top: 0; }
  .nav-link { width: 40px; height: 40px; justify-content: center; padding: 0; }
  .nav-link .icon { width: 18px; height: 18px; }
  .nav-link:hover::after, .nav-link:focus-visible::after {
    content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: var(--radius-sm);
    white-space: nowrap; pointer-events: none; z-index: 60;
  }
  .view { padding: 24px; }
}
/* phone: bottom tab bar, the full nav slides in as a sheet */
@media (max-width: 767px) {
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; max-width: 85vw;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  .nav-link { height: 40px; }
  .topbar { padding: 0 16px; }
  .topbar-brand { display: flex; }
  .topbar-brand .brand-name { display: none; }
  .scan-status { margin-left: 0; padding: 0 6px; }
  .ai-status .label, #scan-now .label { display: none; }
  .view { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(60px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; border-radius: var(--radius); color: var(--fg-muted); text-decoration: none;
    font-size: 11px; font-weight: 500; cursor: pointer;
  }
  .tab .icon { width: 20px; height: 20px; }
  .tab[aria-current] { color: var(--fg); }
  .tab[aria-current] .icon { color: var(--primary); }
  .tab { position: relative; }
  .tab-dot { position: absolute; top: 8px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 999px;
    background: var(--primary); box-shadow: 0 0 0 2px var(--card); }
}

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--fg-muted); max-width: 70ch; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* a hub page's tabs: links, one per sub-page, above that sub-page's own header */
.page-tabs { display: flex; gap: 4px; margin: -8px 0 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.page-tabs a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; margin-bottom: -1px; white-space: nowrap;
  color: var(--fg-muted); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent;
}
.page-tabs a:hover { color: var(--fg); }
.page-tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--primary); }
.page-tabs a:focus-visible { outline-offset: -2px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-muted); text-decoration: none; font-weight: 500; margin-bottom: 12px; }
.back-link:hover { color: var(--fg); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar-row { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar-meta { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--input); background: var(--card); color: var(--fg);
  font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--muted); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: var(--muted); border-color: transparent; }
.btn-secondary:hover { background: var(--muted-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--muted); color: var(--fg); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn-xs { height: 28px; padding: 0 8px; font-size: 12px; gap: 4px; border-radius: var(--radius-sm); }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 28px; }
.btn.is-busy .icon { animation: spin 1s linear infinite; }
.link { color: var(--fg); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-muted { color: var(--fg-muted); font-size: 13px; }
.link-muted:hover { color: var(--fg); }

/* ---------- form controls ---------- */
input[type=text], input[type=number], input[type=password], input[type=search], select, textarea {
  height: 36px; padding: 0 12px; min-width: 0;
  background: var(--card); border: 1px solid var(--input); border-radius: var(--radius);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 8px 12px; line-height: 20px; }
input::placeholder, textarea::placeholder { color: var(--fg-muted); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
select option { background: var(--card); color: var(--fg); }
input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.search { position: relative; display: inline-flex; align-items: center; }
.search .icon { position: absolute; left: 10px; color: var(--fg-muted); pointer-events: none; }
.search input { padding-left: 34px; width: 240px; }
/* "€ min – max": one bordered control holding two bare number inputs */
.price-range {
  display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px 0 12px;
  background: var(--card); border: 1px solid var(--input); border-radius: var(--radius); color: var(--fg-muted);
  transition: border-color .12s, box-shadow .12s;
}
.price-range:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.price-range input[type=number] {
  width: 64px; height: 32px; padding: 0 4px; border: 0; background: transparent; box-shadow: none; color: var(--fg);
  -moz-appearance: textfield; appearance: textfield;
}
.price-range input[type=number]:focus-visible { box-shadow: none; }
.price-range input::-webkit-outer-spin-button, .price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.spec-row { margin: -6px 0 16px; padding: 10px 12px; background: var(--muted); border-radius: var(--radius-lg); }
.spread-card { margin-bottom: 16px; }
.spread-card > summary { list-style: none; cursor: pointer; }
.spread-card > summary::-webkit-details-marker { display: none; }
.spread-card .card-title { display: inline-flex; align-items: center; gap: 6px; }
.spread-card .card-title .icon { transition: transform .15s; }
.spread-card[open] .card-title .icon { transform: rotate(90deg); }
.spec-row-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; margin-right: 4px; }
.price-range.active { border-color: color-mix(in srgb, var(--primary) 55%, var(--input)); }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--fg); font-weight: 500; white-space: nowrap; }

/* ---------- segmented control (tabs) ---------- */
.seg { display: inline-flex; height: 36px; padding: 3px; gap: 2px; background: var(--muted); border-radius: var(--radius); }
.seg button {
  border: 0; background: transparent; padding: 0 12px; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--fg-muted); font-weight: 500; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--border); }
.seg .count { color: var(--fg-muted); font-weight: 400; }

/* ---------- badges, shop labels ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; white-space: nowrap; text-decoration: none;
  background: var(--muted); color: var(--fg);
}
.badge .icon { width: 12px; height: 12px; }
.badge-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--fg-muted); }
.badge-success { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
.badge-info { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.badge-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.badge-danger { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.badge-violet { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
a.badge:hover { filter: brightness(1.1); text-decoration: underline; text-underline-offset: 2px; }
.badge-score { opacity: .75; font-variant-numeric: tabular-nums; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.shop { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.shop::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--c, var(--fg-muted)); flex-shrink: 0; }
.shop.subtle { font-weight: 400; color: var(--fg-muted); }
.shop-plaisio { --c: var(--s-plaisio); }
.shop-eshop { --c: var(--s-eshop); }
.shop-kotsovolos { --c: var(--s-kotsovolos); }
.shop-public { --c: var(--s-public); }
.shop-skroutz { --c: var(--s-skroutz); }
.shop-insomnia { --c: var(--violet); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.status .icon { width: 14px; height: 14px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-pad { padding: 20px 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-head + .card-body { padding-top: 16px; }
.card-title { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.card-desc { color: var(--fg-muted); margin-top: 2px; font-size: 13px; }
.card-body { padding: 20px 24px 24px; }
.card-body.flush { padding: 12px 0 8px; }
.card-foot { border-top: 1px solid var(--border); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1199px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-12 > [class*="span-"] { grid-column: span 12; }
  .grid-12 > .span-4.pair { grid-column: span 6; }
}
@media (max-width: 899px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-12 > .span-4.pair { grid-column: span 12; }
}

/* KPI tiles */
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; text-decoration: none; position: relative; min-height: 116px; }
a.kpi:hover { border-color: var(--input); }
a.kpi:hover .kpi-label { color: var(--fg); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--fg-muted); font-weight: 500; }
.kpi-value { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-value.text { font-size: 22px; line-height: 36px; letter-spacing: -.02em; }
.kpi-meta { color: var(--fg-muted); font-size: 12px; line-height: 16px; min-height: 16px; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kpi .spark { width: 112px; height: 32px; flex-shrink: 0; }
@media (max-width: 767px) {
  .kpi { padding: 16px; min-height: 0; }
  .kpi-value { font-size: 24px; line-height: 32px; }
  .kpi .spark { width: 72px; }
}

/* stat strip (several figures in one container, separated by rules) */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.stat-strip > div { padding: 12px 16px; border-left: 1px solid var(--border); margin-left: -1px; }
.stat-strip .k { color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.stat-strip .v { font-size: 18px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-strip .v.lead { font-size: 22px; }
.stat-strip .s { font-size: 12px; color: var(--fg-muted); }

/* ---------- lists inside cards ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 24px; position: relative; min-height: 56px; }
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-item.interactive { cursor: pointer; }
.list-item.interactive:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list-meta { color: var(--fg-muted); font-size: 12px; line-height: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta .sep { margin: 0 4px; }
.list-meta .shop, .list-meta .icon { vertical-align: middle; }
.list-end { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.list-end .price { font-weight: 600; }
.rank-n { width: 20px; color: var(--fg-muted); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; flex-shrink: 0; }

/* product title that opens the drawer: a real button, stretched over its row or card */
.row-link {
  all: unset; cursor: pointer; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-muted); }
.row-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.lift { position: relative; z-index: 1; }

.thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); background: #fff; object-fit: contain; flex-shrink: 0; border: 1px solid var(--border); }
.thumb-ph { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--muted); flex-shrink: 0; display: grid; place-items: center; color: var(--fg-muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-sm); }
.card .table-wrap { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th { height: 40px; font-size: 12px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; background: var(--card); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.name-cell { max-width: 480px; }
td.name-cell.fit { max-width: 0; width: 100%; }
.cell-meta { color: var(--fg-muted); font-size: 12px; line-height: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prod > div { min-width: 0; flex: 1; }
.change { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.change .icon { width: 14px; height: 14px; }
.change.down { color: var(--success); }
.change.up { color: var(--danger); }
.strike { color: var(--fg-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.filter-table input { width: 100%; min-width: 90px; }
.filter-table td.num input { width: 90px; min-width: 0; }
.table-empty { padding: 0 !important; }

/* price drops table */
.drops .rank { width: 44px; color: var(--fg-muted); font-variant-numeric: tabular-nums; text-align: right; }
.drops tbody tr:nth-child(-n+3) .rank b { color: var(--fg); }
.drops .rank b { font-weight: 600; display: block; }
.move { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.move .icon { width: 11px; height: 11px; stroke-width: 2.5; }
.move.up { color: var(--success); } .move.down { color: var(--danger); } .move.new { color: var(--info); }
.drop-cell { min-width: 150px; }
.drop-amt { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.drop-amt b { font-weight: 600; color: var(--success); }
.drop-amt span { color: var(--fg-muted); font-size: 12px; }
.meter { height: 4px; border-radius: 999px; background: var(--muted); margin-top: 6px; overflow: hidden; max-width: 140px; }
.meter > div { height: 100%; border-radius: 999px; background: var(--success); }
.meter.info > div { background: var(--info); }
.new-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--info); display: inline-block; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.name-line { display: flex; align-items: center; min-width: 0; }

/* ---------- empty / error / loading ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; gap: 4px; }
.empty-state.compact { padding: 32px 16px; }
.empty-icon { width: 40px; height: 40px; border-radius: 999px; background: var(--muted); display: grid; place-items: center; color: var(--fg-muted); margin-bottom: 8px; }
.empty-icon .icon { width: 20px; height: 20px; }
.empty-title { font-weight: 600; font-size: 15px; }
.empty-body { color: var(--fg-muted); max-width: 420px; }
.empty-state .btn { margin-top: 12px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.alert > .icon { margin-top: 2px; }
.alert-title { font-weight: 600; }
.alert-body { color: var(--fg-muted); }
.alert-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.alert-error > .icon, .alert-error .alert-title { color: var(--danger); }
.alert-warn { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.alert-warn > .icon { color: var(--warning); }
.alert-info > .icon { color: var(--info); }
.alert .btn { margin-left: auto; flex-shrink: 0; }
.sk { background: var(--muted); border-radius: var(--radius-sm); animation: pulse 1.6s ease-in-out infinite; }
.sk-line { height: 12px; }
.sk-block { height: 116px; border-radius: var(--radius-lg); }
.fade-in { animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }

/* ---------- deals ---------- */
.deals { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.deal { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: border-color .12s; }
.deal:hover { border-color: var(--input); }
.deal.passed { opacity: .65; }
.deal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.deal-body { display: flex; gap: 12px; align-items: flex-start; }
.deal-img { width: 56px; height: 56px; border-radius: var(--radius); background: #fff; object-fit: contain; flex-shrink: 0; border: 1px solid var(--border); }
.deal-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 20px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.price-big { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; color: var(--fg-muted); font-size: 13px; }
.reasons li { display: flex; gap: 8px; align-items: flex-start; }
.reasons li::before { content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--fg-muted); margin-top: 8px; flex-shrink: 0; }
.ai-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--muted); font-size: 13px; line-height: 19px; }
.ai-note > .icon { color: var(--violet); margin-top: 2px; }
.ai-body { min-width: 0; flex: 1; }
/* two lines until More: the full text stays in the page for screen readers */
.ai-note:not(.open) .ai-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ai-note .more { border: 0; background: none; padding: 0; margin-top: 2px; font: inherit; font-size: 12px; font-weight: 500;
  color: var(--fg-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ai-note .more:hover { color: var(--fg); }
.deal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); color: var(--fg-muted); font-size: 12px; }

/* ---------- tracked products ---------- */
.track-form textarea { width: 100%; min-height: 72px; resize: vertical; font-size: 15px; line-height: 22px; padding: 12px 14px; }
.track-form .toolbar { margin-top: 12px; }
.track-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.track-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: border-color .12s; }
.track-card:hover { border-color: var(--input); }
.track-card.paused { opacity: .7; }
.track-title { font-weight: 600; font-size: 15px; line-height: 22px; text-decoration: none; }
.track-query { color: var(--fg-muted); font-size: 12px; margin-top: 2px; }
.shop-prices { display: flex; flex-direction: column; gap: 6px; }
.shop-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.shop-price b { font-weight: 500; font-variant-numeric: tabular-nums; }
.shop-price.best b { font-weight: 600; }
.target-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); padding-top: 12px; border-top: 1px solid var(--border); margin-top: auto; }
.target-line.met { color: var(--success); }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.match-actions { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius); background: var(--muted); }
.match-actions button { width: 30px; height: 28px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--fg-muted); cursor: pointer; display: grid; place-items: center; }
.match-actions button:hover { color: var(--fg); }
.match-actions button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 0 0 1px var(--border); }
.match-actions button[data-v="same"][aria-pressed="true"] { color: var(--success); }
.match-actions button[data-v="different"][aria-pressed="true"] { color: var(--danger); }
.note-cell { min-width: 180px; color: var(--fg-muted); font-size: 13px; }
details.disclosure > summary { cursor: pointer; color: var(--fg-muted); font-size: 13px; font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform .15s; }
details.disclosure[open] > summary .icon { transform: rotate(90deg); }
details.disclosure > summary:hover { color: var(--fg); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; }
.dl dt { color: var(--fg-muted); }
.dl dd { margin: 0; }

/* ---------- scanner ---------- */
.progress { height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.progress > div { height: 100%; background: var(--info); border-radius: 999px; transition: width .5s; }
.shop-progress { display: grid; grid-template-columns: 120px 1fr minmax(160px, auto); gap: 16px; align-items: center; padding: 8px 0; }
.shop-progress .small { text-align: right; }
.matrix th, .matrix td { text-align: center; padding: 6px 8px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 16px; }
.matrix td:first-child { font-weight: 500; }
.cell-btn { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 6px 8px; border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.cell-btn:hover { background: var(--muted); }
.cell-btn:focus-visible { outline: 2px solid var(--ring); }
.cell-btn .small { color: var(--fg-muted); }
.cell-btn.err { color: var(--danger); font-weight: 500; }
.cell-na { color: var(--muted-2); }
.log {
  font: 12px/1.65 var(--mono); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; height: 340px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.log .WARNING { color: var(--warning); }
.log .ERROR { color: var(--danger); }
.log .t { color: var(--fg-muted); }
.meta-list { display: flex; flex-direction: column; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.meta-list > div:first-child { border-top: 0; padding-top: 0; }
.meta-list dt, .meta-list .k { color: var(--fg-muted); }
.meta-list .v { font-variant-numeric: tabular-nums; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- forms / settings ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.field small { color: var(--fg-muted); font-size: 12px; line-height: 16px; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.section-title { font-size: 16px; line-height: 24px; font-weight: 600; }
.section-desc { color: var(--fg-muted); margin: 2px 0 0; font-size: 13px; }
.save-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 24px;
}
@media (max-width: 767px) { .save-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.save-bar .btn { box-shadow: var(--shadow-lg); }
.shop-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-checks label { height: 36px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--radius); }
.shop-checks label:has(input:checked) { border-color: var(--ring); background: color-mix(in srgb, var(--primary) 6%, transparent); }

.watch-row { display: grid; grid-template-columns: 1.3fr 1.5fr 1fr 110px 1fr 36px; gap: 8px; align-items: center; padding: 10px 24px; border-top: 1px solid var(--border); }
.watch-row.head { border-top: 0; padding-top: 0; padding-bottom: 8px; color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.watch-row input, .watch-row select { width: 100%; }
.wl-label { display: none; }
@media (max-width: 899px) {
  .watch-row { grid-template-columns: 1fr 1fr; padding: 16px; }
  .watch-row.head { display: none; }
  .watch-row > label { display: flex; flex-direction: column; gap: 4px; }
  .watch-row > label:first-child { grid-column: 1 / -1; }
  .wl-label { display: block; font-size: 12px; font-weight: 500; color: var(--fg-muted); }
  .watch-row [data-del] { justify-self: end; align-self: end; }
}

/* ---------- drawer (sheet) ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 40; animation: fade .2s ease-out; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(680px, 100vw);
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: slide .22s cubic-bezier(.2, .8, .2, 1);
}
.drawer:focus { outline: none; }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--border); background: var(--card); }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.drawer-title { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.drawer-foot { display: flex; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--border); background: var(--card); flex-wrap: wrap; }
.drawer .section { margin-top: 28px; }
.drawer .section-title { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--fg-muted); margin-top: 10px; }
.note .icon { margin-top: 2px; width: 14px; height: 14px; }
@media (max-width: 767px) {
  .drawer-scroll { padding: 16px; }
  .drawer-head, .drawer-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .ref-line { stroke: var(--fg-muted); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .ref-label { fill: var(--fg-muted); font-size: 11px; font-weight: 500; }
.chart .band { fill: var(--fall); opacity: .09; }
/* price histogram */
.chart .hbin { cursor: pointer; outline: none; }
.chart .hbin .bin { fill: var(--s-default); transition: opacity .12s; }
.chart .hbin.dim .bin { opacity: .28; }
.chart .hbin:hover .bin, .chart .hbin:focus-visible .bin { filter: brightness(1.15); }
.chart .hbin:focus-visible .hit { stroke: var(--ring); stroke-width: 2; }
.chart .iqr { fill: var(--muted); }
.chart .median-line { stroke: var(--fg-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
/* "where it sits" meter in the product drawer: today's price within its recent low-high range */
.range-meter { min-width: 120px; margin-top: 6px; }
.range-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--success) 45%, var(--muted)), var(--muted-2) 50%, color-mix(in srgb, var(--danger) 40%, var(--muted))); }
.range-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin-left: -6px; margin-top: -6px; border-radius: 999px; background: var(--fg); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--border); }
.range-dot.low { background: var(--success); }
.range-dot.high { background: var(--danger); }
.range-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.chart .band-label { fill: var(--fg-muted); font-size: 11px; font-weight: 500; }
.chart .end-dot { stroke: var(--card); stroke-width: 2; }
.chart .end-label { font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.chart .axis-label { fill: var(--fg-muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .hover-line { stroke: var(--axis); stroke-width: 1; }
.chart .hover-dot { stroke: var(--card); stroke-width: 2; }
.chart .col:hover .col-bg, .chart .col:focus .col-bg { fill: var(--muted); }
.chart .col:focus { outline: none; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 140px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; font-size: 12px; line-height: 18px; box-shadow: var(--shadow-lg); white-space: nowrap;
}
.chart-tip .tip-head { color: var(--fg-muted); margin-bottom: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; font-size: 12px; color: var(--fg-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 12px; height: 2px; border-radius: 2px; background: var(--c); }
.legend span.box::before { width: 8px; height: 8px; border-radius: 2px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row b { margin-left: auto; padding-left: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.swatch { width: 12px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.swatch.box { width: 8px; height: 8px; }
.table-view { margin-top: 12px; }
.table-view table { margin-top: 8px; font-size: 13px; }
.table-view td, .table-view th { padding: 6px 12px; height: auto; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--fg-muted); text-align: center; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); font-size: 13px; }
.spark { display: block; overflow: visible; }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 2px; }
.hbar-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 150px; gap: 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-sm); }
.hbar-row:hover, .hbar-row:focus { background: var(--muted); outline: none; }
.hbar-row:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.hbar-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { position: relative; height: 12px; }
.hbar-track.div::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1px; background: var(--axis); }
.hbar-fill { position: absolute; top: 0; bottom: 0; border-radius: 0 3px 3px 0; }
.hbar-fill.neg { border-radius: 3px 0 0 3px; }
.hbar-value { font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 70; width: 360px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 12px 12px 14px; box-shadow: var(--shadow-lg); animation: slide .2s ease-out;
}
.toast > .icon { margin-top: 2px; color: var(--success); }
.toast.error > .icon { color: var(--danger); }
.toast.deal > .icon { color: var(--primary); }
.toast-body { flex: 1; min-width: 0; }
.toast-body .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.toast .btn { margin: -4px -4px 0 0; }
@media (max-width: 767px) { .toasts { left: 16px; right: 16px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 72px); max-width: 820px; margin: 0 auto; }
@media (max-width: 767px) { .chat { height: calc(100vh - var(--topbar-h) - 120px); } }
.chat .page-head { margin-bottom: 12px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 2px 16px; }
.msg { max-width: 85%; line-height: 22px; }
.msg.user { align-self: flex-end; background: var(--muted); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; display: flex; gap: 12px; max-width: 100%; }
.msg-avatar { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; color: var(--violet); background: var(--card); }
.msg-avatar .icon { width: 14px; height: 14px; }
.msg-body { min-width: 0; padding-top: 3px; }
.msg-body p { margin: 0 0 10px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 4px 0 10px; padding-left: 20px; }
.msg-body a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-muted); }
.msg-body code { font-family: var(--mono); font-size: 12.5px; background: var(--muted); padding: 1px 5px; border-radius: 4px; }
.msg-body h4 { margin: 12px 0 4px; font-size: 14px; font-weight: 600; }
.msg.error { align-self: stretch; }
.tool-steps { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tool-step { font-size: 13px; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; }
.tool-step .icon { width: 14px; height: 14px; }
.tool-step.ok .icon { color: var(--success); }
.tool-step.fail .icon { color: var(--danger); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 8px; border: 1px solid var(--input); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-sm); }
.chat-input:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 18%, transparent); }
.chat-input textarea { flex: 1; resize: none; border: 0; background: transparent; min-height: 36px; max-height: 180px; padding: 8px; box-shadow: none !important; }
.chat-input textarea:focus-visible { outline: none; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; max-width: 600px; }
.suggestions button { border-radius: 999px; height: 32px; font-size: 13px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; text-align: center; margin: auto 0; padding: 32px 8px; }

/* ---------- insights ---------- */
.chart-card .card-body { padding-top: 16px; }

/* ---------- overview ---------- */
.ov-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; margin-top: 16px; }
.ov-grid > * { grid-column: span 12; }
@media (min-width: 900px) { .ov-grid > .ov-side { grid-column: span 6; } }
@media (min-width: 1200px) {
  .ov-grid > .ov-main { grid-column: span 8; }
  .ov-grid > .ov-side { grid-column: span 4; }
}
.history-meter { margin-top: 8px; }
.span-full { grid-column: 1 / -1; }

/* ---------- responsive tables and lists ---------- */
@media (max-width: 767px) {
  .hide-m { display: none; }
  .drops .thumb, .drops .thumb-ph { display: none; }
  .drops .row-link { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 18px; font-size: 13px; }
  .drops td, .drops th { padding-left: 8px; padding-right: 8px; }
  .drops .rank { width: 28px; }
  .sk-list .row-link { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 18px; font-size: 13px; }
  .sk-list td, .sk-list th { padding-left: 8px; padding-right: 8px; }
  .drop-cell { min-width: 84px; }
  .drop-amt { flex-direction: column; gap: 0; }
  .list-item { padding: 10px 16px; gap: 10px; }
  .list-item .thumb, .list-item .thumb-ph, .hide-s { display: none; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 16px; }
  .card-foot { padding: 12px 16px; }
  .kpi .spark { display: none; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 20px; line-height: 28px; }
  .page-tabs { margin: -4px -16px 16px; padding: 0 12px; }
  .page-actions .seg { overflow-x: auto; max-width: 100%; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .toolbar-row .toolbar > select { flex: 1 1 104px; }
  .toolbar-row .toolbar > .price-range { flex: 1 1 100%; }
  .price-range input[type=number] { flex: 1; width: 0; }
  .spec-row > select { flex: 1 1 140px; }
  .spec-row > .muted { flex-basis: 100%; }
  .shop-progress { grid-template-columns: 1fr; gap: 6px; }
  .shop-progress .small { text-align: left; }
}
.thumb-ph .icon { opacity: .6; }
@media (max-width: 767px) {
  .list-item .list-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 18px; }
}
.nav-close { display: none; }
@media (max-width: 767px) {
  /* closed sheet: off screen and out of the tab order */
  .sidebar { visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  body.nav-open .sidebar { visibility: visible; transition: transform .2s ease; }
  .nav-close { display: inline-flex; position: absolute; top: 16px; right: 12px; }
  .ai-status .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hbar-row { grid-template-columns: minmax(64px, 96px) 1fr 112px; gap: 8px; }
  .suggestions button:nth-child(n+4) { display: none; }
  td.name-cell.fit { max-width: none; width: auto; min-width: 140px; }
  td.name-cell.fit .cell-meta, td.name-cell.fit a { white-space: normal; }
  .watch-row > label { justify-content: flex-end; }
}
.spread-card:not([open]) > summary { padding-bottom: 20px; }
.spread-card[open] > .card-body { padding-top: 12px; }

/* ---------- console (log + errors) ---------- */
.console { height: min(68vh, 760px); overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-family: var(--mono); font-size: 12px; line-height: 18px; padding: 8px 0; }
.console:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.console-more { display: flex; justify-content: center; padding: 4px 0 8px; }
.console-more:has(> [hidden]) { display: none; }
.console-empty { padding: 24px; color: var(--fg-muted); font-family: var(--font, inherit); font-size: 13px; text-align: center; }
.log-day { position: sticky; top: -8px; z-index: 1; padding: 4px 14px; background: var(--muted); color: var(--fg-muted);
  font-family: var(--font, inherit); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.log-row { display: grid; grid-template-columns: 64px 72px minmax(80px, 140px) 1fr; gap: 0 10px; align-items: baseline;
  padding: 1px 14px; border-left: 3px solid transparent; }
.log-row:hover { background: var(--muted); }
.log-row .t { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.log-row .lvl { justify-self: start; font-family: var(--font, inherit); font-size: 10px; padding: 0 6px; line-height: 16px; }
.log-row .src { color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .msg { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.log-row.lvl-warning { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 5%, transparent); }
.log-row.lvl-error, .log-row.lvl-critical { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, transparent); }
.log-row.lvl-debug { opacity: .7; }
.log-row .tb { grid-column: 1 / -1; margin: 4px 0 6px; }
.tb-toggle { font: inherit; font-size: 11px; color: var(--fg-muted); background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 0 6px; margin-left: 6px; cursor: pointer; }
.tb-toggle:hover { color: var(--fg); }
pre.code, .log-row .tb { font-family: var(--mono); font-size: 12px; line-height: 18px; white-space: pre; overflow: auto; max-height: 420px;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0 0; }
.errors .err-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.errors .err-title .row-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.errors td .spark { display: block; }
.err-msg { word-break: break-word; }
.stat-strip .v.small-v { font-size: 14px; line-height: 22px; font-weight: 500; }
.plain-list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; word-break: break-word; }
.copy-fallback { width: 100%; height: 160px; margin-bottom: 12px; font-family: var(--mono); font-size: 12px; }
@media (max-width: 767px) {
  .log-row { grid-template-columns: 58px 1fr; }
  .log-row .lvl { display: none; }
  .log-row .src { grid-column: 2; }
  .log-row .msg { grid-column: 1 / -1; }
  .console { height: 62vh; }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .nav-link .nav-badge { position: absolute; top: 5px; right: 5px; min-width: 8px; height: 8px; padding: 0; font-size: 0; }
}

/* ---------- PC builder ---------- */
:root {
  --bd-new: color-mix(in srgb, var(--primary) 24%, var(--card));
  --bd-used: color-mix(in srgb, var(--violet) 32%, var(--card));
}
.bd-label { display: block; font-weight: 600; font-size: 15px; line-height: 22px; margin-bottom: 8px; }
.bd-describe textarea { width: 100%; min-height: 76px; resize: vertical; font-size: 15px; line-height: 22px; padding: 12px 14px; }
.bd-describe textarea:disabled { background: var(--muted); cursor: not-allowed; }
.bd-describe-foot { margin-top: 12px; }
.bd-describe-foot > .muted { max-width: 70ch; }
.bd-progress { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--muted); font-size: 13px; }
.bd-progress > .icon { color: var(--info); margin-top: 2px; }
.bd-progress [data-since] { font-variant-numeric: tabular-nums; }
.bd-inline-msg { margin: 10px 0 0; }
.bd-summary, .bd-missing { margin-top: 12px; }
.bd-assume { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 10px; }
.bd-assume ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bd-assume li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; color: var(--fg-muted); max-width: 100%; }
.bd-assume li .btn { width: 22px; height: 22px; flex-shrink: 0; }

/* settings */
.bd-settings .card-body { transition: opacity .15s; }
.bd-settings.is-loading .card-body { opacity: .5; pointer-events: none; }
.bd-set-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
@media (max-width: 1099px) { .bd-set-body { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.bd-general { display: flex; flex-direction: column; gap: 18px; }
.bd-euro {
  display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px; max-width: 240px;
  background: var(--card); border: 1px solid var(--input); border-radius: var(--radius);
  font-size: 18px; font-weight: 600; color: var(--fg-muted); transition: border-color .12s, box-shadow .12s;
}
.bd-euro:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.bd-euro input[type=number] { flex: 1; width: 0; height: 40px; padding: 0 2px; border: 0; background: transparent; box-shadow: none !important;
  font-size: 18px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.bd-euro input::placeholder { font-weight: 400; }
.bd-euro input::-webkit-outer-spin-button, .bd-euro input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bd-budget.need .bd-euro { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.bd-budget.need small { color: var(--danger); }
.bd-checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.bd-selects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 16px; }
.bd-selects select { width: 100%; }

/* radio groups drawn as segmented controls */
.rseg { display: inline-flex; padding: 3px; gap: 2px; background: var(--muted); border-radius: var(--radius); max-width: 100%; }
.rseg label { position: relative; display: flex; min-width: 0; }
.rseg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rseg span {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--fg-muted); font-size: 13px; font-weight: 500; white-space: nowrap; pointer-events: none;
}
.rseg label:hover span { color: var(--fg); }
.rseg input:checked + span { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--border); }
.rseg input[value="used"]:checked + span { color: var(--violet); }
.rseg input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 1px; }
.rseg input:disabled { cursor: not-allowed; }
.rseg input:disabled + span { opacity: .4; text-decoration: line-through; text-decoration-color: var(--fg-muted); }

.bd-parts { border: 0; margin: 0; padding: 0; min-width: 0; }
.bd-parts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.bd-legend { font-size: 14px; font-weight: 600; }
.bd-parts-desc { margin: 4px 0 8px; }
#bd-preset-note.note { margin: 0 0 8px; color: var(--fg); }
.bd-slot { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.bd-slot-name { display: flex; flex-direction: column; font-weight: 500; }
.bd-slot-name small { color: var(--fg-muted); font-size: 12px; line-height: 16px; font-weight: 400; }
/* every row on the same 5-column grid, so New/Used/Either/Owned line up whether or not the row has a 5th choice */
.bd-slot .rseg { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); width: calc(100% * var(--n, 5) / 5 + (5 - var(--n, 5)) * .4px); }
.bd-general .field > .rseg { align-self: flex-start; }
.bd-owned { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 12px; margin-top: 6px;
  padding: 10px 12px; border-radius: var(--radius); background: var(--muted); }
.bd-owned .field > span { font-size: 12px; font-weight: 500; color: var(--fg-muted); }
.bd-owned input, .bd-owned select { width: 100%; height: 32px; }
.bd-owned-help { grid-column: 1 / -1; }
.bd-slot.need { box-shadow: inset 3px 0 0 var(--warning); margin: 0 -12px; padding: 10px 12px; background: color-mix(in srgb, var(--warning) 6%, transparent); }
.bd-need-tag { display: none; color: var(--warning); font-weight: 400; font-size: 12px; }
.bd-slot.need .bd-need-tag { display: block; }
.bd-owned > .small:only-child { grid-column: 1 / -1; }
.bd-foot { flex-wrap: wrap; }
.bd-build-msg { flex: 1; min-width: 0; font-size: 13px; }
.bd-build-msg .icon { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.bd-build-err { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); font-weight: 500; }
.bd-build-err .icon { margin: 2px 0 0; flex-shrink: 0; }
@media (max-width: 599px) {
  .bd-slot { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bd-slot-name { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
  .bd-owned { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rseg span { padding: 0 4px; font-size: 12.5px; }
  .bd-general .rseg { width: 100%; }
  .bd-general .rseg label { flex: 1; }
  .bd-euro { max-width: none; }
  .bd-foot .btn-primary { flex: 1; }
}

/* results */
.bd-results { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.bd-res-head { margin-bottom: 12px; }
.bd-res-title { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
#bd-changed { display: inline-flex; align-items: center; gap: 6px; color: var(--warning); white-space: normal; }
#bd-changed[hidden] { display: none; }
.bd-tabs { max-width: 100%; overflow-x: auto; }
.bd-pick { display: inline-flex; color: var(--violet); }
.bd-pick .icon { width: 14px; height: 14px; }
.bd-res-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1099px) { .bd-res-grid { grid-template-columns: minmax(0, 1fr); } }
.bd-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.bd-bar-wrap { padding: 2px 0; }
.bd-bar { position: relative; display: flex; gap: 2px; height: 30px; }
.bd-seg { flex: 1 1 0; min-width: 3px; display: grid; place-items: center; overflow: hidden; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: var(--fg); }
.bd-seg:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.bd-seg:last-of-type { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.bd-seg.new { background: var(--bd-new); }
.bd-seg.used { background: var(--bd-used); }
.bd-seg.left { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--border) 5px 6px); box-shadow: inset 0 0 0 1px var(--border); }
.bd-limit { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--danger); border-radius: 2px; }
.bd-legend-row { margin: 8px 0 0; }
.bd-legend-row span.bd-left-key::before { background: transparent; box-shadow: inset 0 0 0 1px var(--fg-muted); }

.bd-table td { vertical-align: middle; }
.bd-table td.bd-part { max-width: 0; width: 100%; }
/* price and Swap line up with the part's name, so a long AI note under it doesn't push them down */
.bd-table td.bd-price { vertical-align: top; padding-top: 32px; }
.bd-table td.bd-act { vertical-align: top; padding-top: 26px; }
.bd-tweak.is-stale { opacity: .55; }
.bd-warnings .plain-list { padding-left: 16px; }
.bd-part .prod { align-items: flex-start; }
.bd-part .thumb, .bd-part .thumb-ph { margin-top: 2px; }
.bd-slotline { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.bd-slot-label { font-size: 12px; font-weight: 500; color: var(--fg-muted); }
.bd-slotline .badge { height: 20px; padding: 0 6px; font-size: 11px; }
.bd-name { display: block; font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.bd-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-muted); }
.bd-meta { white-space: normal; }
.bd-meta .sep, .bd-swaps .sep { margin: 0 6px; color: var(--fg-muted); opacity: .6; }
.bd-meta .shop, .bd-swaps .shop { font-size: 12px; }
.bd-score { display: inline-flex; align-items: center; gap: 3px; color: var(--fg); font-weight: 500; cursor: help; }
.bd-score .icon { width: 12px; height: 12px; color: var(--success); }
tr.bd-row.is-used > td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
tr.bd-row.is-open > td { border-bottom-color: transparent; }
.bd-tweak { margin-top: 8px; font-size: 12.5px; line-height: 18px; padding: 8px 10px; }
.bd-price, .bd-act { width: 1%; }
.bd-price b { font-weight: 600; }
.bd-swap-row > td { background: color-mix(in srgb, var(--muted) 55%, transparent); padding-top: 12px; padding-bottom: 14px; }
.bd-swaps-head { margin-bottom: 8px; }
.bd-swaps .bd-build-err { margin-bottom: 8px; }
.bd-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bd-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .12s;
}
.bd-opt:hover { border-color: var(--ring); }
.bd-opt:disabled { cursor: wait; opacity: .6; }
.bd-opt.is-busy { opacity: 1; border-color: var(--ring); }
.bd-opt-main { flex: 1; min-width: 0; }
.bd-opt-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-opt .cell-meta { white-space: normal; display: flex; flex-wrap: wrap; align-items: center; }
.bd-opt .badge { height: 20px; padding: 0 6px; font-size: 11px; }
.bd-opt-price { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: 12px; line-height: 18px; }
.bd-opt-price b { font-size: 14px; font-weight: 600; line-height: 20px; }
.bd-table-note { padding: 12px; border-bottom: 1px solid var(--border); }

.bd-ai-title { display: flex; align-items: center; gap: 8px; }
.bd-ai-title .icon { color: var(--violet); }
.bd-review .card-head .badge { margin-top: 2px; }
.bd-stale { flex-wrap: wrap; margin-bottom: 14px; }
.bd-pickline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bd-verdict { margin: 10px 0 0; font-size: 15px; line-height: 23px; }
.bd-review.is-stale .bd-verdict, .bd-review.is-stale .bd-pcs, .bd-review.is-stale .bd-warnings { opacity: .6; }
.bd-warnings { margin-top: 14px; }
.bd-warnings .alert-body, .bd-missing .plain-list { color: var(--fg); }
.bd-pcs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bd-pc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 19px; }
.bd-pc li { display: flex; gap: 8px; align-items: flex-start; }
.bd-pc .icon { width: 14px; height: 14px; margin-top: 3px; }
.bd-pc.pros .icon { color: var(--success); }
.bd-pc.cons .icon { color: var(--warning); }
.bd-review .small .icon { width: 13px; height: 13px; color: var(--violet); vertical-align: -2px; }

.bd-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bd-checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.bd-checklist li:first-child { border-top: 0; padding-top: 0; }
.bd-checklist li > .icon { margin-top: 2px; }
.bd-checklist li.ok > .icon { color: var(--success); }
.bd-checklist li.unk > .icon { color: var(--fg-muted); }
.bd-checklist li.bad { margin: 0 -12px; padding: 8px 12px; border-radius: var(--radius); border-top-color: transparent;
  background: color-mix(in srgb, var(--danger) 9%, transparent); }
.bd-checklist li.bad + li { border-top-color: transparent; }
.bd-checklist li.bad > .icon, .bd-checklist li.bad .bd-check-label { color: var(--danger); }
.bd-check-label { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bd-unk { font-size: 11px; line-height: 16px; font-weight: 500; color: var(--fg-muted); padding: 0 6px; border: 1px dashed var(--input); border-radius: 4px; }
.bd-checks-card .card-desc .icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
@media (max-width: 767px) {
  .bd-table td { padding-left: 10px; padding-right: 10px; }
  .bd-part .thumb, .bd-part .thumb-ph { display: none; }
  .bd-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 18px; }
  .bd-act .label { display: none; }
  .bd-act .btn { width: 32px; padding: 0; }
  .bd-opt { flex-direction: column; align-items: stretch; gap: 4px; }
  .bd-opt-name { white-space: normal; }
  .bd-opt-price { flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* platform, kept and changed marks on the parts */
.bd-platform { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; background: var(--muted);
  color: var(--fg); font-size: 11.5px; font-weight: 500; white-space: nowrap; cursor: help; }
.bd-kept .icon { width: 11px; height: 11px; }
.bd-chg { font-size: 11px; line-height: 16px; font-weight: 600; color: var(--info); }
tr.bd-row.is-changed > td { background: color-mix(in srgb, var(--info) 6%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  tr.bd-row.flash > td { animation: bd-flash 2.4s ease-out both; animation-delay: var(--bd-flash-at, 0s); }
}
@keyframes bd-flash { from { background: color-mix(in srgb, var(--info) 24%, transparent); } to { background: color-mix(in srgb, var(--info) 6%, transparent); } }

/* versions and undo */
.bd-history { display: flex; align-items: flex-start; gap: 8px; }
.bd-versions { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.bd-versions > summary { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 10px; cursor: pointer; list-style: none; border-radius: var(--radius); }
.bd-versions > summary::-webkit-details-marker { display: none; }
.bd-versions > summary:hover { background: var(--muted); }
.bd-versions > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.bd-ver-badge { flex-shrink: 0; padding: 0 7px; border-radius: 999px; background: var(--fg); color: var(--card); font-size: 12px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-ver-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.bd-ver-more { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--fg-muted); font-size: 12px; }
.bd-ver-more .icon { width: 14px; height: 14px; transition: transform .15s; }
.bd-versions[open] .bd-ver-more .icon { transform: rotate(180deg); }
.bd-ver-list { list-style: none; margin: 0; padding: 4px 10px 8px; border-top: 1px solid var(--border); }
.bd-ver-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 6px 0; font-size: 13px; line-height: 18px; }
.bd-ver-list li + li { border-top: 1px dashed var(--border); }
.bd-ver-n { color: var(--fg-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-ver-list li.is-current .bd-ver-n { color: var(--fg); }
.bd-ver-note .badge { height: 18px; padding: 0 6px; font-size: 11px; vertical-align: 1px; }
.bd-ver-total { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: 12px; }
.bd-ver-total b { font-size: 13px; font-weight: 600; }
.bd-ver-time { grid-column: 2; color: var(--fg-muted); font-size: 12px; }
.bd-history > .btn { flex-shrink: 0; height: 36px; }
.bd-history + .bd-build-err { font-size: 13px; }
.bd-alt-note { flex-wrap: wrap; }
.bd-alt-note > div { flex: 1 1 220px; }
.bd-alt-note .alert-body { color: var(--fg); }

/* the conversation */
.bd-chat { display: flex; flex-direction: column; }
.bd-chat-log { display: flex; flex-direction: column; gap: 14px; max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 24px 4px; font-size: 14px; }
.bd-chat-log:empty { display: none; }
.bd-chat-log:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.bd-chat .msg { max-width: 92%; line-height: 21px; }
.bd-chat .msg.assistant { max-width: 100%; gap: 10px; }
.bd-chat .msg-avatar { width: 26px; height: 26px; }
.bd-chat .msg-body { flex: 1; overflow-wrap: anywhere; }
.bd-chat .msg.user { overflow-wrap: anywhere; }
.bd-thinking, .bd-stopped { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--fg-muted); }
.bd-thinking .icon { width: 14px; height: 14px; color: var(--info); }
.bd-stopped { margin-top: 6px; font-size: 13px; }
.bd-tools, .msg-body .bd-tools { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bd-tool { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--fg-muted); font-size: 12px; white-space: nowrap; max-width: 100%; }
.bd-tool > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.bd-tool .icon { width: 12px; height: 12px; flex-shrink: 0; }
.bd-tool.running { color: var(--fg); border-color: color-mix(in srgb, var(--info) 45%, var(--border)); }
.bd-tool.running .icon { color: var(--info); }
.bd-tool.ok .icon { color: var(--success); }
.bd-tool.fail .icon { color: var(--danger); }
.bd-tool-n { font-variant-numeric: tabular-nums; opacity: .8; }
.bd-ver-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--info) 40%, var(--border)); background: color-mix(in srgb, var(--info) 8%, var(--card));
  color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.bd-ver-chip:hover { border-color: var(--info); }
.bd-ver-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.bd-ver-chip .icon { width: 13px; height: 13px; color: var(--info); }
.bd-ver-chip.is-gone { cursor: default; border-style: dashed; background: transparent; color: var(--fg-muted); }
.bd-ver-chip.is-gone .icon { color: var(--fg-muted); }
.bd-chat-err { margin-top: 10px; flex-wrap: wrap; padding: 10px 12px; }
.bd-chat-err > div { flex: 1 1 160px; }
.bd-chat-err .alert-body { color: var(--fg); overflow-wrap: anywhere; }
.bd-chat-empty p { margin: 0 0 10px; color: var(--fg-muted); font-size: 13px; }
.bd-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-suggest .btn { border-radius: 999px; height: 32px; font-size: 13px; }
.bd-chat-form { padding: 12px 24px 20px; }
.bd-chat-input { padding: 6px; }
.bd-chat-input textarea { min-height: 36px; max-height: 160px; font-size: 14px; line-height: 20px; }
.bd-chat-input textarea:read-only { color: var(--fg-muted); }
.bd-chat-input textarea:disabled { cursor: not-allowed; }
.bd-chat.is-off .bd-chat-input { background: var(--muted); box-shadow: none; }
.bd-chat-status { min-height: 18px; margin-top: 6px; font-size: 12px; line-height: 18px; color: var(--fg-muted); }
.bd-chat-working { display: inline-flex; align-items: center; gap: 6px; }
.bd-chat-working .icon { width: 13px; height: 13px; color: var(--info); flex-shrink: 0; }
.bd-chat-working [data-since] { font-variant-numeric: tabular-nums; }
.bd-keys kbd { font-family: var(--font); font-size: 11px; padding: 0 4px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--card); color: var(--fg); }
@media (hover: none) { .bd-keys { display: none; } }
@media (max-width: 767px) {
  .bd-chat-log { padding: 12px 16px 4px; max-height: 70vh; }
  .bd-chat-form { padding: 10px 16px 16px; }
  .bd-chat-input textarea { font-size: 16px; } /* below 16px phones zoom in on focus */
  .bd-ver-time { display: none; }
  .bd-history > .btn { padding: 0 10px; }
}

/* tracking: the strip above the build, its suggestions, parts you bought */
.bd-track { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); box-shadow: inset 3px 0 0 var(--primary); }
.bd-track-off { flex-direction: row; flex-wrap: wrap; align-items: center; box-shadow: none; border-style: dashed; padding: 12px 16px; }
.bd-track-off .bd-track-main { flex: 1 1 260px; }
.bd-track-off > .bd-build-err { flex-basis: 100%; font-size: 13px; }
.bd-track-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bd-track-ic { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0; background: var(--muted); color: var(--fg-muted); }
.bd-track-ic.is-on { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.bd-track-main { flex: 1 1 240px; min-width: 0; }
.bd-track-title { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bd-track-name { font-size: 15px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bd-track-title .btn { flex-shrink: 0; }
.bd-track-rename { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.bd-track-rename input { flex: 1 1 200px; height: 32px; }
.bd-track-acts { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.bd-track-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.bd-track-figs[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
.bd-track-figs .k { color: var(--fg-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.bd-track-figs .v { font-size: 18px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bd-track-figs .v-sm { display: flex; align-items: center; gap: 6px; font-weight: 500; line-height: 26px; }
.bd-track-figs .v-sm .icon { width: 15px; height: 15px; }
.bd-track-figs .s { font-size: 12px; line-height: 16px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.bd-track-figs .s.good { color: var(--success); }
.bd-track-figs .s.bad { color: var(--danger); }
.bd-track-hist .spark { display: block; margin-top: 2px; max-width: 100%; }
.bd-track-note { margin: 0; color: var(--fg); }
.bd-track-set { border-top: 1px solid var(--border); padding-top: 10px; }
.bd-track-set > summary { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; list-style: none; font-size: 13px; color: var(--fg-muted); border-radius: 4px; }
.bd-track-set > summary::-webkit-details-marker { display: none; }
.bd-track-set > summary > .icon { width: 14px; height: 14px; margin-top: 3px; transition: transform .15s; }
.bd-track-set[open] > summary > .icon { transform: rotate(90deg); }
.bd-track-set > summary:hover { color: var(--fg); }
.bd-track-set-edit { margin-left: auto; padding-left: 8px; color: var(--fg); font-weight: 500; white-space: nowrap; }
.bd-track-set[open] .bd-track-set-edit { display: none; }
.bd-thr { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; margin-top: 12px; }
.bd-thr fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bd-thr legend { padding: 0; margin-bottom: 6px; font-weight: 500; }
.bd-thr small { color: var(--fg-muted); font-size: 12px; line-height: 16px; }
.bd-thr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bd-unit { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius);
  background: var(--card); color: var(--fg-muted); font-weight: 500; transition: border-color .12s, box-shadow .12s; }
.bd-unit:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.bd-unit:has(input[aria-invalid]) { border-color: var(--danger); }
.bd-unit input[type=number] { width: 52px; height: 30px; padding: 0 2px; border: 0; background: transparent; box-shadow: none !important; color: var(--fg);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.bd-unit input::-webkit-outer-spin-button, .bd-unit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bd-thr-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.bd-thr-msg { flex: 1; min-width: 0; }
.bd-thr-msg .icon { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.bd-track > .bd-build-err { font-size: 13px; }

.bd-suggs { display: flex; flex-direction: column; gap: 8px; }
.bd-suggs-title { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.bd-suggs-title .small { font-weight: 400; }
.bd-sugg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bd-sugg { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.bd-sugg.is-warn { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.bd-sugg.is-good { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.bd-sugg-ic { margin-top: 2px; display: inline-flex; }
.bd-sugg.is-warn .bd-sugg-ic { color: var(--warning); }
.bd-sugg.is-good .bd-sugg-ic { color: var(--success); }
.bd-sugg-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bd-sugg-title { font-weight: 600; }
.bd-sugg-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.bd-sugg-line .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--fg-muted); }
.bd-sugg-line .badge { height: 18px; padding: 0 6px; font-size: 11px; vertical-align: 1px; }
.bd-sugg-main p { margin: 2px 0 0; }
.bd-sugg-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.bd-sugg-price b { font-size: 14px; font-weight: 600; }
.bd-sugg-acts { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.bd-sugg-parts { margin-top: 6px; font-size: 13px; }
.bd-sugg-parts > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; color: var(--fg-muted); font-weight: 500; border-radius: 4px; }
.bd-sugg-parts > summary::-webkit-details-marker { display: none; }
.bd-sugg-parts > summary:hover { color: var(--fg); }
.bd-sugg-parts > summary .icon { width: 14px; height: 14px; transition: transform .15s; }
.bd-sugg-parts[open] > summary .icon { transform: rotate(90deg); }
.bd-sugg-parts ul { list-style: none; margin: 8px 0 0; padding: 0; }
.bd-sugg-parts li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px dashed var(--border); }
.bd-sugg-parts li.is-diff { background: color-mix(in srgb, var(--info) 6%, transparent); }
.bd-sugg-slot { color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.bd-sugg-pname { overflow-wrap: anywhere; }
.bd-sugg-pname .bd-chg { margin-left: 6px; }
.bd-sugg-pname .badge { height: 18px; padding: 0 6px; font-size: 11px; }
.bd-sugg-pp { font-variant-numeric: tabular-nums; white-space: nowrap; }

.bd-acts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.bd-buy-btn { color: var(--fg-muted); }
.bd-buy-btn[aria-expanded="true"] { background: var(--muted); color: var(--fg); }
tr.bd-row.is-bought > td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.bd-buy { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.bd-buy-text { flex: 1 1 280px; min-width: 0; }
.bd-buy-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bd-buy-title .icon { color: var(--success); }
.bd-buy p { margin: 4px 0 0; font-size: 13px; line-height: 19px; color: var(--fg-muted); max-width: 72ch; }
.bd-buy .bd-build-err { margin-top: 8px; font-size: 13px; }
.bd-buy-acts { display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }

.bd-tcard-parts { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 13px; color: var(--fg-muted); min-width: 0; }
.bd-tcard-parts span { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-tcard-parts .icon { width: 14px; height: 14px; }
.bd-tcard-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bd-tcard-price .spark { flex-shrink: 0; }
.bd-tcard.is-warn { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
@media (max-width: 767px) {
  .bd-track { padding: 12px; }
  .bd-track-acts { width: 100%; }
  .bd-track-acts .btn { flex: 1; }
  .bd-sugg { padding: 12px; }
  .bd-sugg-acts { width: 100%; }
  .bd-sugg-acts .btn { flex: 1; }
  .bd-buy-acts { width: 100%; }
  .bd-buy-acts .btn { flex: 1; }
  .bd-act .bd-acts .btn { width: 32px; height: 32px; padding: 0; }
  .bd-track-set-edit { display: none; }
}

/* used ads on the Deals page */
.deal-used .deal-new { font-size: 13px; margin-top: 2px; }
.deal-used .deal-new .link { font: inherit; padding: 0; border: 0; background: none; cursor: pointer; }
/* the AI's estimate and its short note: at most two lines */
.deal-est { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.deal-seller { font-size: 12px; line-height: 16px; margin-top: 4px; overflow-wrap: anywhere; }

/* watchlist: match PC parts by specs */
.watch-row .wl-spec { grid-column: 1 / -1; border-top: 1px dashed var(--border); padding-top: 8px; }
.watch-row .wl-spec > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.watch-row .wl-spec > summary .icon { width: 14px; height: 14px; }
.watch-row .wl-spec-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; padding: 10px 0 4px; align-items: end; }
.watch-row .wl-spec-body .wl-label { display: block; }
.watch-row .wl-spec-body p { grid-column: 1 / -1; margin: 0; }

/* rating the AI's verdicts on deal cards */
.rate { display: inline-flex; gap: 2px; margin-right: 4px; }
.rate .btn.is-on.good { color: var(--success); }
.rate .btn.is-on.bad { color: var(--danger); }
.deal-save[aria-pressed="true"] { color: var(--primary); }
.deal-save[aria-pressed="true"] .icon { fill: currentColor; }
.deal-src { display: inline-flex; align-items: center; min-width: 0; }
/* the card's buttons stay on one row; the time, category and seller text beside them wraps instead */
.deal-foot > .lift:first-child { min-width: 0; }
.deal-foot > .lift:last-child { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; white-space: nowrap; }
.rate-hint { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.rate-hint .icon { width: 14px; height: 14px; }
.rate-summary { margin-bottom: 16px; }
.rate-summary > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; cursor: pointer; list-style: none; }
.rate-summary > summary .icon { width: 16px; height: 16px; color: var(--fg-muted); }
.rate-summary tr.is-current td { font-weight: 600; }
