/* Sniper — dealwatch web UI. Mobile-first; two panes from 900px. */

:root {
  color-scheme: light dark;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #dde2e9;
  --border-strong: #c3cad4;
  --text: #19202a;
  --muted: #5c6776;
  --accent: #2458d6;
  --accent-hover: #1b47b3;
  --accent-fg: #ffffff;
  --accent-soft: #e4ecfd;
  --ok: #178a43;
  --ok-soft: #dff4e7;
  --warn: #9a5b00;
  --warn-soft: #fdf0d5;
  --danger: #c62828;
  --danger-soft: #fde6e6;
  --idle: #9aa3b0;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%);
  --radius: 12px;
  --radius-sm: 8px;
  --tap: 44px;
  --topbar-h: 56px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1318;
    --surface: #171c23;
    --surface-2: #202731;
    --border: #2a323d;
    --border-strong: #3a4452;
    --text: #e7ebf0;
    --muted: #98a3b2;
    --accent: #6ea2ff;
    --accent-hover: #8bb5ff;
    --accent-fg: #0a1220;
    --accent-soft: #1b2a47;
    --ok: #4cd081;
    --ok-soft: #14301f;
    --warn: #f0b24a;
    --warn-soft: #34270d;
    --danger: #ff7b7b;
    --danger-soft: #3a1818;
    --idle: #6b7482;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.boot { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand user" "nav nav";
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.25rem 1rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  grid-area: brand;
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em;
  color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: var(--tap);
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--accent);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent);
}
.nav { grid-area: nav; display: flex; gap: 0.25rem; overflow-x: auto; }
.nav a {
  display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 0.85rem;
  color: var(--muted); text-decoration: none; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.userbox { grid-area: user; display: flex; align-items: center; gap: 0.5rem; justify-self: end; min-width: 0; }
.username { font-weight: 600; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 700px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav user";
    padding: 0 1.25rem;
    gap: 0 1.5rem;
    min-height: var(--topbar-h);
  }
  .nav a { min-height: var(--topbar-h); }
}

/* ---------- Layout ---------- */

.main { padding: 1rem; }
.page { max-width: 880px; margin: 0 auto; display: grid; gap: 1rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }

.split { display: grid; gap: 1rem; max-width: 1400px; margin: 0 auto; }
.split[data-view="detail"] .pane-list { display: none; }
.split[data-view="list"] .pane-detail { display: none; }
.back { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; font-weight: 600; }

@media (min-width: 900px) {
  .main { padding: 1.25rem; }
  .split { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); align-items: start; }
  .split[data-view] .pane-list, .split[data-view] .pane-detail { display: block; }
  .pane-list {
    position: sticky; top: calc(var(--topbar-h) + 1.25rem);
    max-height: calc(100vh - var(--topbar-h) - 2.5rem);
    overflow-y: auto; padding-right: 0.25rem;
  }
  .back { display: none; }
}

.empty-detail {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 2rem 1rem; text-align: center; color: var(--muted);
}

/* ---------- Cards, fieldsets ---------- */

.card, fieldset.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0;
  min-width: 0;
}
fieldset.card { display: grid; gap: 0.9rem; }
fieldset.card > legend {
  float: left; width: 100%; padding: 0; margin: 0 0 0.1rem;
  font-weight: 700; font-size: 1.02rem;
}
fieldset.card > legend + * { clear: both; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.card > * + * { margin-top: 0.75rem; }
fieldset.card > * + * { margin-top: 0; }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 0.92rem; }
.hint { color: var(--muted); font-size: 0.85rem; }
.grid-2 { display: grid; gap: 0.9rem; }
@media (min-width: 520px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

input[type="text"], input[type="url"], input[type="number"], input[type="password"],
input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap);
  padding: 0.55rem 0.7rem;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; }

.check { display: inline-flex; align-items: center; gap: 0.6rem; min-height: var(--tap); cursor: pointer; font-weight: 500; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; min-height: var(--tap); cursor: pointer; }
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.switch .track {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px;
  background: var(--border-strong); transition: background 0.15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 30%); transition: transform 0.15s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch input:disabled { cursor: progress; }
.switch input:disabled + .track { opacity: 0.55; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0 1rem;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { min-height: 36px; padding: 0 0.7rem; font-size: 0.9rem; }
.btn-icon { min-width: var(--tap); padding: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

.actions {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  margin: 0 -1rem -1rem; padding: 0.75rem 1rem;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.actions .spacer { flex: 1; }

.spinner {
  display: inline-block; width: 1.1em; height: 1.1em; flex: none;
  border: 3px solid var(--border-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.5s; }
  .switch .track, .switch .track::after { transition: none; }
}

/* ---------- Messages ---------- */

.notice {
  padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 0.92rem;
}
.notice.info { background: var(--accent-soft); border-color: transparent; }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.notice.error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.notice.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.notice ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }

.toasts {
  position: fixed; z-index: 100; left: 0; right: 0; bottom: 0;
  display: grid; gap: 0.5rem; justify-items: center;
  padding: 0.75rem; pointer-events: none;
}
.toast {
  pointer-events: auto; cursor: pointer;
  max-width: min(32rem, 100%);
  padding: 0.7rem 1rem; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg);
  box-shadow: 0 6px 20px rgb(0 0 0 / 25%);
  font-weight: 500;
}
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) {
  .toast.ok { color: #06210f; }
  .toast.error { color: #2a0808; }
}

/* ---------- Login ---------- */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 1rem; }
.login-card .brand { min-height: 0; font-size: 1.4rem; }

/* ---------- List pane ---------- */

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.groups { display: grid; gap: 0.75rem; }
.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.25rem; padding-right: 0.5rem; background: var(--surface-2); }
.group-head > .btn { margin-left: auto; }
.group-head > .btn + .btn { margin-left: 0; }
.group-toggle {
  flex: 1 1 9rem; min-width: 0; display: flex; align-items: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0 0.75rem;
  font: inherit; font-weight: 700; color: var(--text); text-align: left;
  background: transparent; border: 0; cursor: pointer;
}
.group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev {
  flex: none; width: 0.55rem; height: 0.55rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.12s;
}
.group-toggle[aria-expanded="false"] .chev { transform: rotate(-45deg); }
.count {
  flex: none; min-width: 1.6rem; padding: 0 0.45rem; text-align: center;
  font-size: 0.8rem; font-weight: 600; line-height: 1.5rem;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.group-body { display: grid; }
.group-empty { padding: 0.75rem 1rem; color: var(--muted); font-size: 0.92rem; }

.srow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.85rem;
  border-top: 1px solid var(--border);
}
.srow[data-active="true"] { background: var(--accent-soft); }
.row-main {
  display: grid; gap: 0.15rem; min-width: 0; padding: 0.45rem 0;
  color: var(--text); text-decoration: none; min-height: var(--tap);
}
.row-main:hover { color: var(--text); }
.row-top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; min-width: 0; }
.row-name { font-weight: 600; overflow-wrap: anywhere; }
.row-meta { color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }

.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--idle); flex: none; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--danger); }

.badge {
  display: inline-block; padding: 0 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4rem;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.ka { color: #0b6b3a; background: #dff4e7; border-color: transparent; }
.badge.ebay { color: #1d4ed8; background: #e4ecfd; border-color: transparent; }
.badge.zoll { color: #7a3b00; background: #fdebd0; border-color: transparent; }
.badge.vb { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .badge.ka { color: #6ee7a0; background: #14301f; }
  .badge.ebay { color: #9ec0ff; background: #1b2a47; }
  .badge.zoll { color: #f0b24a; background: #34270d; }
}

.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 10rem; }

/* ---------- Chips ---------- */

.chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  min-height: var(--tap); padding: 0.3rem 0.45rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.chips:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.chip {
  display: inline-flex; align-items: center; gap: 0.1rem;
  padding: 0 0 0 0.6rem; min-height: 32px;
  background: var(--accent-soft); color: var(--text); border-radius: 999px; font-size: 0.92rem;
  max-width: 100%;
}
.chip span { overflow-wrap: anywhere; }
.chip button {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  font: inherit; font-size: 1.1rem; line-height: 1; color: var(--muted); background: transparent; cursor: pointer;
}
.chip button:hover { color: var(--danger); }
.chips input.chip-input {
  flex: 1; min-width: 7rem; width: auto; min-height: 36px; padding: 0 0.25rem;
  border: 0; background: transparent; border-radius: 0;
}
.chips input.chip-input:focus-visible { outline: none; }

/* ---------- Rubric adjust rows ---------- */

.adjusts { display: grid; gap: 0.6rem; }
.adjust {
  display: grid; gap: 0.6rem; padding: 0.75rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.adjust-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
@media (min-width: 600px) {
  .adjust-fields { display: grid; grid-template-columns: 7rem 1fr; gap: 0.6rem; }
  .adjust-fields .span-all { grid-column: 1 / -1; }
}
.adjust-fields { display: grid; gap: 0.6rem; }

/* ---------- Prompt layers ---------- */

.layers { display: grid; gap: 0.6rem; }
.layer { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; background: var(--surface-2); }
.layer-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.25rem; }
.layer pre {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.88rem/1.4 var(--mono);
  max-height: 9rem; overflow: auto;
}

/* ---------- Test run results ---------- */

.results { display: grid; gap: 0.75rem; }
.results-head { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
.rcard {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.75rem;
  padding: 0.75rem; background: var(--surface); border: 1px solid var(--border);
  border-left-width: 5px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.rcard.match { border-left-color: var(--ok); }
.rcard.nomatch { border-left-color: var(--idle); }
.rcard.err { border-left-color: var(--danger); }
.thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border);
}
.thumb.empty { display: grid; place-items: center; color: var(--muted); font-size: 1.4rem; }
.rbody { display: grid; gap: 0.35rem; min-width: 0; }
.rtitle { font-weight: 600; overflow-wrap: anywhere; }
.rmeta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; align-items: center; font-size: 0.88rem; color: var(--muted); }
.rprice { color: var(--text); font-weight: 700; font-size: 1rem; }
.verdict { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.verdict-big { font-size: 1.3rem; font-weight: 800; }
.verdict-conf { color: var(--muted); font-weight: 600; }
.offer { font-weight: 600; }
.reason { overflow-wrap: anywhere; }
.rerr { color: var(--danger); font-weight: 600; overflow-wrap: anywhere; }

details.drops { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
details.drops > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; padding: 0 1rem; font-weight: 600; }
.drop-list { list-style: none; margin: 0; padding: 0; }
.drop-list li { padding: 0.55rem 1rem; border-top: 1px solid var(--border); display: grid; gap: 0.1rem; }
.drop-list a { overflow-wrap: anywhere; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.tbl td { padding: 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .cell-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.usage { display: grid; gap: 0.2rem; min-width: 9rem; }
progress.bar {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 5px;
  background: var(--surface-2); overflow: hidden;
}
progress.bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 5px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
progress.bar.high::-webkit-progress-value { background: var(--warn); }
progress.bar.high::-moz-progress-bar { background: var(--warn); }
progress.bar.full::-webkit-progress-value { background: var(--danger); }
progress.bar.full::-moz-progress-bar { background: var(--danger); }
.err-cell { max-width: 22rem; overflow-wrap: anywhere; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem; border: 0; padding: 0.25rem 0.1rem; align-items: center; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; font-weight: 600; }
  .tbl td.no-label { grid-template-columns: 1fr; }
  .tbl td.no-label::before { display: none; }
}

/* ---------- Market card ---------- */

.market-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.6rem; }
.market-stat { display: grid; gap: 0.1rem; padding: 0.5rem 0.7rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.market-stat .label { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.market-stat strong { font-size: 1.15rem; }
.hist { display: grid; gap: 0.25rem; }
.hist-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2rem; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.hist-row .hist-label { color: var(--muted); text-align: right; white-space: nowrap; }
.hist-row .hist-count { color: var(--muted); }
.hist-track { background: var(--surface-2); border-radius: 4px; height: 0.9rem; overflow: hidden; }
.hbar { height: 100%; background: var(--accent); border-radius: 4px; }
.hbar.w0 { width: 0; }
.hbar.w1 { width: 10%; }
.hbar.w2 { width: 20%; }
.hbar.w3 { width: 30%; }
.hbar.w4 { width: 40%; }
.hbar.w5 { width: 50%; }
.hbar.w6 { width: 60%; }
.hbar.w7 { width: 70%; }
.hbar.w8 { width: 80%; }
.hbar.w9 { width: 90%; }
.hbar.w10 { width: 100%; }
/* LLM usage per-day chart: heights come from classes, the CSP allows no inline styles */
.vchart { display: flex; align-items: flex-end; gap: 2px; height: 7rem; padding: 0.3rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.vcol { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; }
.vbar { width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; }
.vbar.h0 { height: 0; }
.vbar.h1 { height: 10%; }
.vbar.h2 { height: 20%; }
.vbar.h3 { height: 30%; }
.vbar.h4 { height: 40%; }
.vbar.h5 { height: 50%; }
.vbar.h6 { height: 60%; }
.vbar.h7 { height: 70%; }
.vbar.h8 { height: 80%; }
.vbar.h9 { height: 90%; }
.vbar.h10 { height: 100%; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-suggest {
  min-height: 36px; padding: 0 0.8rem; border: 1px dashed var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.92rem; cursor: pointer;
}
.chip-suggest:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chip-suggest:disabled { opacity: 0.5; cursor: default; }
.field-error { color: var(--danger); font-size: 0.85rem; }

/* snipes */
.snipe-list { display: grid; gap: 0.75rem; }
.snipe-list > details > summary { cursor: pointer; padding: 0.5rem 0; }
.snipe-list > details > article { margin-top: 0.6rem; }
.snipe-left { font-variant-numeric: tabular-nums; font-weight: 600; }
.snipe-panel { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.snipe-panel[hidden], .snipe-preview:empty { display: none; }
.snipe-preview { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.timeline li { display: block; }

/* Gixen account panel */
.gixen-panel { margin-top: 1.25rem; }
.gixen-panel > summary { cursor: pointer; list-style: revert; }
.gixen-panel[open] > summary { margin-bottom: 0.75rem; }
.gixen-list { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.gixen-row { display: grid; gap: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--border, rgba(127,127,127,.25)); }
.gixen-row:first-child { border-top: 0; padding-top: 0; }

/* Recent listings */
details.recent-card > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }
details.recent-card > summary h2 { margin: 0; }
details.recent-card[open] > summary { margin-bottom: 0.75rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-suggest.filter.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.badge.idle { color: var(--muted); background: var(--surface-2); border-color: transparent; }
.rcard.recent .reason { margin: 0.35rem 0 0; }
.word-chips { margin-top: 0.5rem; }
.word-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.5rem; padding: 0.5rem; background: var(--surface-2); border-radius: var(--radius-sm); }
