:root {
  color-scheme: dark;
  --bg: #090b0a;
  --surface: #111311;
  --surface-2: #171a17;
  --line: #30352f;
  --text: #f3f2ec;
  --muted: #999c91;
  --accent: #70dc99;
  --olive: #bacb91;
  --accent-ink: #07130c;
  --amber: #f2be5c;
  --danger: #ff8d81;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(9 11 10 / 94%);
  backdrop-filter: blur(12px);
}
.header-inner, .page {
  width: min(1380px, 100%);
  margin: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.brand {
  font: 800 1.55rem/1 system-ui, sans-serif;
  text-decoration: none;
  letter-spacing: -.04em;
}
.brand span, .kicker, .eyebrow, .clear, .menu-link { color: var(--accent); }
.location {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .78rem;
}
.location::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(105 227 151 / 12%);
}
.primary-nav { display: flex; gap: .35rem; overflow-x: auto; }
.nav-link {
  padding: .75rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.nav-link:hover, .nav-link.selected { color: var(--text); border-color: var(--accent); }
.page { padding-block: clamp(1.25rem, 3vw, 2.5rem); }
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kicker, .eyebrow {
  margin: 0;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.intro h1 {
  margin: .25rem 0 0;
  font: 800 clamp(1.75rem, 4vw, 3.2rem)/1.05 system-ui, sans-serif;
  letter-spacing: -.05em;
}
.freshness { color: var(--muted); font-size: .75rem; text-align: right; }
.refresh-warning { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--amber); background: #201c13; color: #f6d99b; font-size: .78rem; }
.refresh-warning strong { color: var(--amber); }
.filters {
  display: grid;
  grid-template-columns: minmax(15rem, 2fr) repeat(4, minmax(8rem, 1fr)) auto;
  gap: .65rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(18 22 19 / 92%);
}
label {
  display: grid;
  gap: .35rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
input, select, button {
  min-height: 46px;
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid #39463d;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.submit {
  align-self: end;
  width: auto;
  padding-inline: 1.3rem;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  cursor: pointer;
}
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: .8rem;
}
.result-bar strong { color: var(--text); }
.clear, .menu-link { font-weight: 800; }
.market-belt { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 1rem; border: 1px solid var(--line); border-bottom: 0; background: #101210; }
.market-belt div { min-width: 0; padding: .9rem 1rem; border-right: 1px solid var(--line); }
.market-belt div:last-child { border-right: 0; }
.market-belt span, .market-belt small { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.market-belt span { font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.market-belt strong { display: block; margin: .15rem 0; font-size: 1.35rem; }
.market-belt div:nth-child(2) strong { color: var(--accent); }
.market-belt small { font-size: .68rem; }
.results { overflow-x: auto; border: 1px solid var(--line); background: #0f110f; }
.results table { width: 100%; border-collapse: collapse; }
.results th { padding: .75rem .8rem; border-bottom: 1px solid var(--accent); color: var(--muted); font-size: .63rem; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.product-row tr:first-child { border-bottom: 1px solid #20241f; }
.product-row:hover tr:first-child { background: #151914; }
.product-row td { padding: .72rem .8rem; vertical-align: middle; }
.product-row td:first-child { min-width: 20rem; }
.product-name { display: block; font: 750 .82rem/1.25 system-ui, sans-serif; }
.variant { display: inline-block; margin-top: .15rem; color: var(--text); font-size: .72rem; }
.row-meta { display: block; margin-top: .18rem; color: #6f756b; font-size: .64rem; }
.store-link { color: var(--olive); font-size: .75rem; font-weight: 700; text-decoration: none; }
.price { font-weight: 900; white-space: nowrap; }
.potency { color: var(--accent); font-weight: 800; white-space: nowrap; }
.muted { color: var(--muted); }
.deal-badge, .stock {
  display: inline-flex;
  width: max-content;
  align-items: center;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 850;
}
.deal-badge { border: 1px solid #d99c18; border-radius: 2px; color: #f2b72f; background: transparent; }
.stock { color: var(--muted); background: #2a322d; }
.stock.in_stock { color: var(--accent); background: rgb(105 227 151 / 11%); }
.stock.out_of_stock { color: var(--danger); background: rgb(255 141 129 / 10%); }
.deal-details { margin: 0; }
.deal-details summary { color: var(--amber); font-size: .75rem; font-weight: 800; cursor: pointer; }
.detail-row td { padding: 0 .8rem .8rem; background: #11150f; }
.deals { display: grid; gap: .7rem; padding: 0; list-style: none; }
.deal { padding: .7rem; border-left: 3px solid var(--amber); background: #201c13; font-size: .75rem; }
.deal h4, .deal p { margin: .25rem 0; }
.deal-flag { color: var(--amber); font-size: .65rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
dl { display: grid; grid-template-columns: minmax(7rem, 1fr) 2fr; gap: .2rem .5rem; }
dt { font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
.menu-link { color: var(--olive); font-size: .72rem; text-decoration: none; white-space: nowrap; }
.empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.pagination a, .pagination span { padding: .7rem; border: 1px solid var(--line); border-radius: 9px; text-align: center; text-decoration: none; }
.pagination span { color: #526057; }
.pagination strong { font-size: .75rem; text-align: center; }
.notice { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }

@media (max-width: 64rem) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters label:first-child { grid-column: 1 / -1; }
  .submit { width: 100%; }
  .market-belt { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .market-belt div { border-bottom: 1px solid var(--line); }
}

@media (max-width: 42rem) {
  .brand-row { padding-block: .8rem; }
  .page { padding-inline: .75rem; }
  .intro, .result-bar { align-items: start; flex-direction: column; }
  .freshness { text-align: left; }
  .filters { grid-template-columns: 1fr; padding: .75rem; }
  .filters label:first-child { grid-column: auto; }
  .results { overflow: visible; border: 0; background: transparent; }
  .results table, .results tbody, .results tr, .results td { display: block; width: 100%; }
  .results thead { display: none; }
  .product-row { display: block; margin-bottom: .75rem; border: 1px solid var(--line); background: var(--surface); }
  .product-row tr:first-child { padding: .45rem .75rem; }
  .product-row td { display: grid; grid-template-columns: 6rem 1fr; gap: .5rem; padding: .45rem 0; }
  .product-row td::before { content: attr(data-label); color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .product-row td:first-child { display: block; min-width: 0; padding-top: .7rem; }
  .product-row td:first-child::before, .detail-row td::before { display: none; }
  .detail-row td { display: block; padding: .75rem; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination strong { grid-column: 1 / -1; grid-row: 1; }
  .primary-nav { margin-inline: -.75rem; padding-inline: .75rem; }
}
