:root {
  --bg: #f4efe8;
  --panel: #fffdf9;
  --panel-strong: #ffffff;
  --line: #e6ddd3;
  --line-soft: #efe8df;
  --ink: #171717;
  --ink-soft: #463e3a;
  --muted: #857a72;
  --brand: #e64b43;
  --brand-2: #efb84f;
  --brand-dark: #b52f2d;
  --brand-soft: #fff0eb;
  --brand-line: #f0c2b9;
  --teal: #2f7378;
  --teal-soft: #e8f5f3;
  --up: #d83c3c;
  --up-soft: #fff0ed;
  --down: #287b72;
  --down-soft: #e8f6f2;
  --warn: #965c17;
  --warn-bg: #fff8e6;
  --warn-line: #efd18e;
  --danger: #9f3037;
  --danger-bg: #fff0f0;
  --danger-line: #efbcc0;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(23, 23, 23, .05);
  --shadow-sm: 0 10px 24px -20px rgba(23, 23, 23, .32), 0 1px 3px rgba(23, 23, 23, .06);
  --shadow-md: 0 20px 42px -24px rgba(23, 23, 23, .42), 0 5px 14px -8px rgba(23, 23, 23, .12);
  --ring: 0 0 0 4px rgba(230, 75, 67, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 92% -8%, rgba(239, 184, 79, .19), transparent 64%),
    radial-gradient(760px 460px at -10% 12%, rgba(47, 115, 120, .11), transparent 62%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(230, 75, 67, .22); }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.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; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  overflow: hidden;
  color: #fffaf3;
  padding: 15px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  background:
    radial-gradient(420px 180px at 84% -30%, rgba(239, 184, 79, .22), transparent 68%),
    radial-gradient(360px 180px at 4% 120%, rgba(47, 115, 120, .34), transparent 70%),
    #171717;
  box-shadow: 0 18px 42px -28px rgba(23, 23, 23, .92);
  backdrop-filter: blur(8px);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  opacity: .9;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 48%, var(--teal));
}
.topbar .inner, .wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.brand-mark { display: flex; width: 66px; height: 66px; flex: none; overflow: hidden; border-radius: 19px; border: 2px solid rgba(255, 250, 243, .56); background: #f5eadd; box-shadow: 0 12px 28px -13px rgba(0, 0, 0, .9); }
.brand-logo { width: 100%; height: 100%; object-fit: cover; object-position: center; padding: 0; background: #f5eadd; }
.brand-copy { min-width: 0; }
.brand-kicker { color: #efb84f; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; line-height: 1; text-transform: uppercase; }
.brand h1 { margin: 6px 0 0; color: #fffaf3; font-size: 21px; font-weight: 800; line-height: 1.12; letter-spacing: -.03em; max-width: min(720px, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand h1 span { color: rgba(255, 250, 243, .55); font-weight: 500; }
.brand h1 .brand-name {
  font-family: "Comic Neue", "Segoe UI", Tahoma, cursive;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: .01em;
  color: var(--brand-2);
  background: linear-gradient(95deg, #ff8a6d 0%, var(--brand-2) 52%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand h1 .brand-name {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--brand-2);
  }
}
.brand-tagline { margin: 5px 0 0; color: rgba(255, 250, 243, .67); font-size: 12px; }
.brand-context { margin-top: 5px; color: rgba(255, 250, 243, .78); font-size: 13px; font-weight: 650; max-width: min(620px, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; line-height: 1; padding: 6px 10px; border-radius: 999px; background: rgba(255, 250, 243, .09); border: 1px solid rgba(255, 250, 243, .14); color: rgba(255, 250, 243, .78); white-space: nowrap; }
.pill strong { color: #fffaf3; font-weight: 800; }
.pill a { color: #f4c86e; font-weight: 700; text-decoration: none; }
.pill a:hover { color: #fffaf3; text-decoration: none; }
#totalitems-top { color: #fffaf3; font-weight: 800; }
.source-form { display: flex; align-items: center; gap: 9px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.source-form label { color: #efb84f; font-weight: 800; }
.source-form select { min-width: 165px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255, 250, 243, .28); background: rgba(255, 250, 243, .10); color: #fffaf3; font-size: 13px; letter-spacing: 0; text-transform: none; transition: background .15s ease, border-color .15s ease; }
.source-form select:hover { background: rgba(255, 250, 243, .17); }
.source-form select:focus { outline: none; border-color: #f4c86e; box-shadow: 0 0 0 4px rgba(244, 200, 110, .20); }
.source-form select option { color: var(--ink); background: #fffdf9; }
.source-form button { padding: 8px 14px; }

.wrap { padding-top: 28px; padding-bottom: 64px; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel > h2 { margin: 0 0 16px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel > h2::before { content: ""; width: 5px; height: 17px; align-self: center; border-radius: 5px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); flex: none; }
.panel > h2 .hint { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.panel > h2 .spacer { flex: 1; }
.row { margin-top: 0; }
.row > * > .panel { margin-bottom: 0; }
.cards { margin-bottom: 20px; }
.card { position: relative; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow-xs); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.card .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .75px; color: var(--muted); font-weight: 800; }
.card .value { font-size: 28px; font-weight: 820; margin-top: 7px; line-height: 1.08; letter-spacing: -.04em; }
.card .sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.card.accent { background: linear-gradient(145deg, #fff1eb 0%, #fffaf3 100%); border-color: var(--brand-line); }
.card.accent::after { content: ""; position: absolute; right: -32px; top: -44px; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 75, 67, .18), transparent 68%); }
.card.up-card { border-left: 4px solid var(--up); }
.card.down-card { border-left: 4px solid var(--down); }
.card .value .sep { color: var(--muted); font-weight: 400; margin: 0 2px; }
.card.wide { padding: 16px 21px; }
.card.wide .wide-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 26px; }
.card.wide .wide-text { min-width: 0; }
.card.wide .value { margin-top: 0; font-size: 29px; }

.result-line { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.result-line strong { color: var(--ink); font-size: 14.5px; font-weight: 800; }
.table-note { margin: 10px 2px 0; }
.is-loading { opacity: .42; pointer-events: none; transition: opacity .14s ease-in; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .is-loading { transition: none; } .card, .grow-card { transition: none !important; } .card:hover, .grow-card:hover { transform: none; } }

.mini { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; font-weight: 750; }
.mini input, .mini select { padding: 7px 9px; font-size: 13px; border-radius: 9px; }
.mini input[type="number"] { width: 86px; }
.mini.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 7px; white-space: nowrap; }
.mini.check input { padding: 0; }
.grow-form { font-size: 12px; gap: 10px; }
.grow-form button { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

.table-wrap { max-height: 720px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-strong); box-shadow: var(--shadow-xs); }
.table-wrap, .catlist { scrollbar-width: thin; scrollbar-color: #c8bbae transparent; }
.table-wrap::-webkit-scrollbar, .catlist::-webkit-scrollbar { width: 9px; height: 9px; }
.table-wrap::-webkit-scrollbar-thumb, .catlist::-webkit-scrollbar-thumb { background: #c8bbae; border-radius: 99px; border: 2px solid #fffdf9; }
.table-wrap::-webkit-scrollbar-track, .catlist::-webkit-scrollbar-track { background: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
thead th { background: rgba(249, 244, 238, .96); font-size: 10.5px; text-transform: uppercase; letter-spacing: .65px; color: var(--muted); font-weight: 800; white-space: nowrap; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
tbody tr { transition: background .12s ease; }
tbody tr:hover td { background: #fff8f2; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.item-cell { display: flex; gap: 11px; align-items: center; min-width: 0; }
.product-head { flex-wrap: wrap; }
.product-text { flex: 1 1 0; min-width: 0; }
.item-cell img, .grow-card img { width: 42px; height: 42px; object-fit: contain; background: #faf7f1; border: 1px solid var(--line); border-radius: 10px; flex: none; }
.product-image-link { display: block; position: relative; flex: none; border-radius: 18px; line-height: 0; }
.product-image-link::after { content: "↗"; position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255, 253, 249, .88); border-radius: 50%; background: rgba(23, 23, 23, .72); color: #fffaf3; font-size: 15px; line-height: 1; opacity: .82; transition: transform .15s ease, opacity .15s ease; }
.product-image-link:hover::after { opacity: 1; transform: scale(1.08); }
.product-img { width: 150px !important; height: 150px !important; border-radius: 16px !important; padding: 10px; }
.item-cell a.item-name, .item-name { font-weight: 700; color: var(--ink); }
.item-cell a.item-name:hover, .item-name:hover { color: var(--brand-dark); text-decoration: none; }
.item-cell .muted, .muted { color: var(--muted); font-size: 12px; }
.muted a { color: var(--muted); }

.tag { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .1px; }
.tag.yes { background: var(--down-soft); color: #176e66; box-shadow: inset 0 0 0 1px #b6e3d9; }
.tag.no { background: #f5f1ec; color: #766d66; box-shadow: inset 0 0 0 1px #e5ddd4; }
.tag.promo { background: #fff7df; color: #9d6310; box-shadow: inset 0 0 0 1px #f0d28b; }
.tag.flag { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.tag.info { background: #edf4f5; color: #2f6b75; box-shadow: inset 0 0 0 1px #c5dde0; }
.up { color: var(--up); font-weight: 750; }
.down { color: var(--down); font-weight: 750; }
.flat { color: var(--muted); font-weight: 600; }
a.up:hover, a.down:hover { text-decoration: none; filter: brightness(.85); }

.filters label { display: flex; flex-direction: column; font-size: 10.5px; font-weight: 800; color: var(--muted); gap: 5px; text-transform: uppercase; letter-spacing: .55px; }
.filters input:not([type="checkbox"]), .filters select { width: 100%; }
input, select, button, textarea { font: inherit; padding: 9px 12px; border: 1px solid #ddd3c9; border-radius: var(--radius-sm); background: #fffefa; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input::placeholder { color: #aaa097; }
input:hover, select:hover { border-color: #cbbdb0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { appearance: none; width: 18px; height: 18px; padding: 0; margin: 0; border: 1.5px solid #cabbad; border-radius: 5px; background: #fffefa; cursor: pointer; flex: none; transition: background .13s ease, border-color .13s ease, box-shadow .13s ease; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--brand); }
input[type="checkbox"]:checked { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; box-shadow: inset 0 0 0 3px #fffefa; }
input[type="checkbox"]:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
button, .btn { background: linear-gradient(135deg, var(--brand), #d9363e); color: #fffaf3; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-block; font-size: 14px; font-weight: 700; border-radius: var(--radius-sm); padding: 9px 16px; box-shadow: 0 10px 20px -12px rgba(216, 60, 60, .85); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
button:hover, .btn:hover { filter: brightness(1.06); box-shadow: 0 14px 24px -12px rgba(216, 60, 60, .9); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); box-shadow: 0 7px 14px -10px rgba(216, 60, 60, .8); }
.btn.ghost { background: #fffefa; color: var(--brand-dark); border: 1px solid var(--brand-line); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand); filter: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); border-left-width: 4px; border-radius: 13px; padding: 13px 16px; font-size: 13.5px; line-height: 1.55; margin-bottom: 17px; }
.notice.danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.notice strong { font-weight: 800; }
.notice a { font-weight: 700; }
.notice code, code { background: rgba(23, 23, 23, .07); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

.grow-card { position: relative; border: 1px solid var(--line); border-radius: 15px; padding: 15px 16px 15px 18px; background: #fffefa; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-xs); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.grow-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--up), var(--brand-2)); }
.grow-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #edc875; }
.grow-card.suspect { background: #fffdf4; }
.grow-card.suspect::before { background: linear-gradient(180deg, #e49a1d, #f2c35c); }
.grow-card .head { display: flex; gap: 11px; align-items: flex-start; }
.grow-card .head img { width: 46px; height: 46px; background: #fffefa; }
.grow-card .name { font-weight: 750; font-size: 14px; line-height: 1.35; color: var(--ink); }
.grow-card .name:hover { color: var(--brand-dark); text-decoration: none; }
.grow-card .where { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.grow-card .where a { text-decoration: none; }
.grow-card .where a:hover { text-decoration: underline; }
.grow-card .prices { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; background: #faf6f0; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; }
.grow-card .prices .p { font-variant-numeric: tabular-nums; font-weight: 800; }
.grow-card .prices .when { color: var(--muted); font-size: 11.5px; }
.grow-card .prices .arrow { color: var(--brand-dark); font-weight: 800; }
.grow-card .foot { display: flex; align-items: center; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: auto; flex-wrap: wrap; }
.grow-card .diff { font-weight: 800; font-size: 15px; color: var(--up); font-variant-numeric: tabular-nums; }
.grow-card .pctval { font-weight: 800; font-size: 13px; color: var(--up); font-variant-numeric: tabular-nums; background: var(--up-soft); padding: 3px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--brand-line); }
.grow-card .more { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 30px; }
.spark-bar { display: block; width: 5px; background: #d8cfc5; border-radius: 3px 3px 0 0; }
.spark-bar:last-child { background: linear-gradient(180deg, var(--brand), var(--brand-2)); }

.bar-row { margin-bottom: 12px; }
.bar-row .bl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.bar-row .bl span:last-child { font-variant-numeric: tabular-nums; font-weight: 800; }
.bar-track { height: 9px; background: #eee7df; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(23, 23, 23, .06); }
.bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.bar-fill.up { background: linear-gradient(90deg, #ef766c, var(--up)); }
.bar-fill.down { background: linear-gradient(90deg, #74b8aa, var(--down)); }
.bar-fill.flat { background: linear-gradient(90deg, #d4cbc1, #9e958c); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }

.catlist { max-height: 580px; overflow: auto; font-size: 13.5px; margin: 0 -8px; padding: 0 4px; }
.catlist .cat { font-size: 10.5px; font-weight: 850; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .75px; margin: 15px 8px 5px; }
.catlist .cat:first-child { margin-top: 4px; }
.catlist a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-weight: 600; transition: background .13s ease, color .13s ease, transform .13s ease; }
.catlist a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; transform: translateX(2px); }
.catlist a.active { background: linear-gradient(135deg, var(--brand), #d9363e); color: #fffaf3; font-weight: 750; box-shadow: 0 8px 16px -11px rgba(216, 60, 60, .9); }
.catlist a.active .n { color: rgba(255, 250, 243, .82); }
.catlist a .n { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; font-weight: 700; }
.catlist a.sub { padding-left: 21px; color: var(--muted); font-weight: 550; }
.catlist a.sub.active { color: #fffaf3; }

.pager { display: flex; gap: 7px; align-items: center; justify-content: center; margin-top: 17px; font-size: 13.5px; }
.pager a { text-decoration: none; color: var(--brand-dark); background: #fffefa; border: 1px solid var(--brand-line); padding: 7px 13px; border-radius: 9px; font-weight: 700; transition: background .13s ease, transform .13s ease; }
.pager a:hover { background: var(--brand-soft); transform: translateY(-1px); text-decoration: none; }
.pager span { color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 6px; }
.empty { padding: 38px 26px; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 17px 0 0; margin-top: 10px; border-top: 1px solid var(--line); }

.overview .result-line { margin: 0 0 13px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 17px; }
.chart-box { border: 1px solid var(--line-soft); border-radius: 14px; padding: 13px 13px 9px; background: linear-gradient(180deg, #fffefa, #fbf6ef); min-width: 0; }
.chart-title { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .65px; margin: 0 0 4px 2px; }
.chart { width: 100%; height: 252px; }
.chart-note { font-size: 11px; color: var(--muted); padding: 3px 2px 4px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 2px 4px 6px; font-size: 12px; color: var(--ink-soft); font-weight: 650; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }
.dot.flat { background: #9e958c; }
.dot.noprice { background: #d8cfc5; }
.insights { display: grid; gap: 9px; margin-top: 17px; }
.insight { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 11px 14px; background: #fffefa; }
.insight.info { border-left-color: var(--teal); background: #f1f8f7; }
.insight.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.insight-title { font-weight: 800; font-size: 13px; color: var(--ink); }
.insight-body { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }

.compare-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 5px; }
.compare-label { font-size: 10.5px; font-weight: 850; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .7px; }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 999px; padding: 5px 12px; text-decoration: none; transition: background .13s ease, border-color .13s ease; }
.chip:hover { background: #ffe1d9; border-color: var(--brand); text-decoration: none; }
.chip[aria-current="true"] { background: linear-gradient(135deg, var(--brand), #d9363e); border-color: transparent; color: #fffaf3; box-shadow: 0 6px 14px -9px rgba(216, 60, 60, .9); }
.compare-now { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#chart-categories { cursor: pointer; }
#items-panel { scroll-margin-top: 108px; }
#items-panel.is-focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-line), var(--shadow-md); transition: box-shadow .2s ease, border-color .2s ease; }

@media (max-width: 900px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .chart { height: 224px; }
}
@media (max-width: 760px) {
  .topbar { padding: 11px 0 13px; }
  .topbar .inner, .wrap { padding: 0 14px; }
  .topbar-row { gap: 13px; }
  .brand { gap: 11px; }
  .brand-mark { width: 52px; height: 52px; border-radius: 15px; }
  .brand h1 { font-size: 17px; max-width: 78vw; }
  .brand-tagline { font-size: 11px; }
  .brand-context { max-width: 78vw; }
  .pill { font-size: 11px; padding: 5px 8px; }
  .brand-meta .pill:nth-child(2) { display: none; }
  .wrap { padding-top: 17px; }
  .panel { padding: 16px 14px; border-radius: 15px; }
  .card { padding: 13px 14px; border-radius: 14px; }
  .card .value { font-size: 23px; }
  .card.wide { padding: 14px 15px; }
  .card.wide .value { font-size: 25px; }
  .product-head { flex-direction: column; align-items: flex-start !important; }
  .product-img { width: 112px !important; height: 112px !important; }
  .table-wrap { max-height: 60vh; }
  th, td { padding: 9px 10px; }
  .source-form { width: 100%; justify-content: space-between; }
  .source-form select { flex: 1; max-width: none; }
  .compare-now { margin-left: 0; width: 100%; }
  .insight { padding: 9px 12px; }
}

.chaos-strip {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 154px;
  overflow: hidden;
  padding: 17px 20px 17px 16px;
  margin-bottom: 20px;
  border: 1px solid #ead0a3;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #fff5e9 0%, #fffdf9 53%, #edf5f3 100%);
  box-shadow: var(--shadow-sm);
}
.chaos-strip::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: 92px;
  top: -120px;
  border: 2px solid rgba(230, 75, 67, .12);
  border-radius: 46% 54% 49% 51%;
  transform: rotate(17deg);
  pointer-events: none;
}
.chaos-strip-art {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  overflow: hidden;
  flex: none;
  border: 3px solid #171717;
  border-radius: 24px;
  background: #f5eadd;
  transform: rotate(-3deg);
  box-shadow: 7px 7px 0 rgba(230, 75, 67, .14);
}
.chaos-strip-art img { width: 100%; height: 100%; object-fit: cover; }
.chaos-strip-thief { position: relative; z-index: 1; align-self: end; width: 132px; height: 132px; margin: 0 0 -9px -3px; transform: rotate(3deg); filter: drop-shadow(7px 9px 0 rgba(47, 115, 120, .12)); }
.chaos-strip-thief img { width: 100%; height: 100%; object-fit: contain; }
.chaos-strip-copy { position: relative; z-index: 1; min-width: 0; }
.chaos-kicker { display: block; color: var(--brand-dark); font-size: 10px; font-weight: 850; letter-spacing: 1.05px; text-transform: uppercase; }
.chaos-slides { min-height: 31px; margin-top: 5px; }
.chaos-slide { display: none; margin: 0; color: var(--ink); font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.chaos-slide.is-active { display: block; animation: chaos-slide-in .32s ease both; }
.chaos-slide em { color: var(--brand-dark); font-style: normal; }
.chaos-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.chaos-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #d7c1a4; box-shadow: none; }
.chaos-dot:hover, .chaos-dot.is-active { background: var(--brand); box-shadow: 0 0 0 3px rgba(230, 75, 67, .14); }
.chaos-stamp { position: relative; z-index: 1; min-width: 88px; padding-left: 15px; border-left: 1px dashed rgba(23, 23, 23, .22); text-align: right; }
.chaos-stamp span, .chaos-stamp small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.chaos-stamp strong { display: block; color: var(--brand-dark); font-size: 30px; line-height: 1.05; letter-spacing: -.05em; }
@keyframes chaos-slide-in { from { opacity: 0; transform: translateY(5px) rotate(-.5deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }

.mobile-items { display: none; }
.mobile-item { border: 1px solid var(--line); border-radius: 14px; background: #fffefa; box-shadow: var(--shadow-xs); overflow: hidden; }
.mobile-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; cursor: pointer; list-style: none; }
.mobile-summary::-webkit-details-marker { display: none; }
.mobile-summary::after { content: "+"; display: grid; place-items: center; width: 23px; height: 23px; flex: none; border: 1px solid var(--brand-line); border-radius: 50%; color: var(--brand-dark); font-size: 18px; line-height: 1; }
.mobile-item[open] .mobile-summary { background: #fff8f2; }
.mobile-item[open] .mobile-summary::after { content: "−"; background: var(--brand-soft); }
.mobile-summary-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-summary-main img { width: 46px; height: 46px; flex: none; object-fit: contain; border: 1px solid var(--line); border-radius: 11px; background: #faf7f1; }
.mobile-item-copy { display: grid; min-width: 0; gap: 2px; }
.mobile-item-name { overflow: hidden; color: var(--ink); font-size: 13.5px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.mobile-item-name:hover { color: var(--brand-dark); text-decoration: none; }
.mobile-item-meta { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-summary-metrics { display: grid; justify-items: end; gap: 3px; flex: none; padding-right: 2px; }
.mobile-price { font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; }
.mobile-change { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mobile-summary-metrics .tag { font-size: 9px; padding: 2px 7px; }
.mobile-item-details { padding: 13px; border-top: 1px solid var(--line-soft); }
.mobile-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 13px; }
.mobile-detail { display: grid; gap: 2px; min-width: 0; }
.mobile-label { color: var(--muted); font-size: 9.5px; font-weight: 850; letter-spacing: .55px; text-transform: uppercase; }
.mobile-detail strong, .mobile-detail a { overflow: hidden; color: var(--ink); font-size: 12.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mobile-detail a.up { color: var(--up); }
.mobile-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--line); }
.mobile-item-footer .btn { padding: 6px 10px; font-size: 11px; }

.route-loader[hidden] { display: none; }
.route-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(23, 23, 23, .72); backdrop-filter: blur(5px); }
.route-loader-card { display: flex; align-items: center; gap: 13px; max-width: 320px; padding: 17px 19px; border: 1px solid rgba(255, 250, 243, .18); border-radius: 16px; background: #fffaf3; color: var(--ink); box-shadow: 0 24px 56px -24px rgba(0, 0, 0, .8); }
.route-loader-spinner { width: 27px; height: 27px; flex: none; border: 3px solid #efcfbf; border-top-color: var(--brand); border-right-color: var(--brand-2); border-radius: 50%; animation: route-spin .72s linear infinite; }
.route-loader-title { font-size: 13px; font-weight: 850; }
.route-loader-copy { margin-top: 1px; color: var(--muted); font-size: 11px; }
@keyframes route-spin { to { transform: rotate(360deg); } }
body.is-transitioning { overflow: hidden; }

.responsive-panel > summary { list-style: none; }
.responsive-panel > summary::-webkit-details-marker { display: none; }
.responsive-panel-heading { display: flex; align-items: baseline; gap: 10px; min-height: 22px; margin: 0 0 16px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.responsive-panel-heading::before { content: ""; width: 5px; height: 17px; align-self: center; flex: none; border-radius: 5px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.responsive-panel-heading .hint { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.panel-toggle { display: none; }
.responsive-panel-content { min-width: 0; }
#items-panel > #items-body { min-width: 0; }
#items-panel.is-focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-line), var(--shadow-md); transition: box-shadow .2s ease, border-color .2s ease; }

@media (min-width: 761px) {
  .responsive-panel > summary { pointer-events: none; }
  .responsive-panel:not([open]) > .responsive-panel-content,
  .responsive-panel:not([open]) > #items-body { display: block !important; }
}

@media (max-width: 760px) {
  .chaos-strip { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; min-height: 124px; padding: 13px 12px 12px; }
  .chaos-strip-art { width: 56px; height: 56px; border-radius: 16px; box-shadow: 5px 5px 0 rgba(230, 75, 67, .14); }
  .chaos-strip-thief { width: 69px; height: 69px; margin: 0 0 -4px -4px; }
  .chaos-slide { font-size: 15px; }
  .chaos-stamp { display: none; }
  .mobile-items { display: grid; gap: 10px; }
  .table-wrap { display: none; }
  .responsive-panel { padding: 14px; }
  .responsive-panel-heading { align-items: center; margin: 0; min-height: 25px; cursor: pointer; }
  .responsive-panel-heading .hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .panel-toggle { position: relative; display: grid; place-items: center; width: 25px; height: 25px; flex: none; margin-left: auto; border: 1px solid var(--brand-line); border-radius: 50%; color: var(--brand-dark); }
  .panel-toggle::before, .panel-toggle::after { content: ""; position: absolute; width: 10px; height: 2px; border-radius: 3px; background: currentColor; transition: transform .16s ease; }
  .panel-toggle::after { transform: rotate(90deg); }
  .responsive-panel[open] .panel-toggle::after { transform: rotate(0); }
  .responsive-panel[open] .responsive-panel-heading { margin-bottom: 16px; }
  .responsive-panel-content, #items-panel > #items-body { animation: panel-open .18s ease both; }
  @keyframes panel-open { from { opacity: .2; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
}

/* ── Floating assistant shortcut ─────────────────────────────────────── */
.ai-fab {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 16px 34px -8px rgba(230, 75, 67, .55), 0 4px 12px rgba(23, 23, 23, .12);
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.ai-fab:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 20px 40px -8px rgba(230, 75, 67, .6);
}
.ai-fab:focus-visible {
  outline: none;
  box-shadow: var(--ring), 0 16px 34px -8px rgba(230, 75, 67, .55);
}
.ai-fab:active { transform: scale(.95); }
.ai-fab svg { width: 26px; height: 26px; }
.ai-fab::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(230, 75, 67, .35);
  animation: ai-fab-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes ai-fab-pulse {
  0% { opacity: .65; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.28); }
  100% { opacity: 0; transform: scale(1.28); }
}
@media (max-width: 520px) {
  .ai-fab {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
  }
  .ai-fab svg { width: 23px; height: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-fab,
  .ai-fab::before { animation: none; transition: none; }
}
