@font-face {
  font-family: Archivo;
  src: url(../fonts/archivo-v1.woff2) format("woff2");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url(../fonts/inter-v1.woff2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-v1.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0c0c0e;
  --panel: #151518;
  --tile: #1e1e23;
  --line: #34343c;
  --ink: #f7f5ef;
  --muted: #b5b1a7;
  --yellow: #ffcc37;
  --yellow-soft: #ffe08a;
  --red: #ff6b6b;
  --green: #8fe3b8;
  --sans: Inter, system-ui, sans-serif;
  --display: Archivo, Inter, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --radius: 16px;
  background: var(--night);
  accent-color: var(--yellow);
  scrollbar-color: #55555f var(--night);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--night); font: 16px/1.55 var(--sans); }
::selection { color: var(--night); background: var(--yellow); }
a { color: inherit; text-underline-offset: 0.25em; }
a:hover { color: var(--yellow-soft); }
button, input, select { font: inherit; color: inherit; }
input { caret-color: var(--yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
[hidden] { display: none !important; }

.sr-only, .pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  z-index: 5;
  top: 10px;
  left: var(--gutter);
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--night);
  font-weight: 700;
}
.skip:focus { transform: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar { position: relative; z-index: 2; border-bottom: 1px solid #2b2b31; background: var(--night); }
.bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; gap: 24px; }
.home, .bar .jump a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.crumbs { display: flex; align-items: center; gap: 10px; justify-self: start; min-width: 0; }
.crumbs .site { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.crumbs .site:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.crumbs .sep { color: #55555f; font-size: 15px; }
.home { gap: 10px; font-size: 15px; font-weight: 750; white-space: nowrap; }
.home svg { flex: none; width: 24px; height: 24px; color: var(--yellow); }
.bar .jump { display: flex; gap: 28px; }
.bar .jump a { color: var(--muted); font-size: 14px; font-weight: 600; }
.bar .jump a:hover { color: var(--ink); }
.bar-end { display: flex; align-items: center; justify-self: end; gap: 18px; }
.cta { min-height: 40px; padding: 6px 14px; }
.stamp { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.stamp i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }

/* ---------- hero ---------- */
.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night);
}
.hero-band::before {
  /* receipt-paper stripes, very faint */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, #ffffff05 22px 23px);
  mask-image: linear-gradient(90deg, transparent 30%, #000 85%);
}
.hero { position: relative; padding-block: clamp(44px, 4.3vw, 64px) clamp(90px, 7vw, 110px); }

/* Price tag on the right, hanging at an angle. */
.tag {
  position: absolute;
  right: clamp(8px, 5vw, 96px);
  top: clamp(34px, 4vw, 56px);
  width: clamp(190px, 18vw, 260px);
  aspect-ratio: 1 / 1.3;
  transform: rotate(9deg);
  transform-origin: 50% 0;
  filter: drop-shadow(0 26px 40px #000c);
}
.tag::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--yellow);
  clip-path: polygon(50% 0, 100% 19%, 100% 100%, 0 100%, 0 19%);
  border-radius: 10px;
}
.tag .hole { position: absolute; left: 50%; top: 12%; width: 9%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: var(--night); }
.tag .string { position: absolute; left: 50%; bottom: 87%; width: 2px; height: 70px; background: linear-gradient(#0000, #b5b1a7); }
.tag .pct { position: absolute; inset: 27% 0 auto; text-align: center; color: var(--night); font: 900 clamp(52px, 5.4vw, 78px)/1 var(--display); letter-spacing: -.05em; }
.tag .off { position: absolute; inset: 52% 0 auto; text-align: center; color: var(--night); font: 900 clamp(22px, 2.1vw, 30px)/1 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
.tag .ca { position: absolute; inset: auto 12% 10%; padding-top: 10px; border-top: 2px dashed #0c0c0e66; text-align: center; color: var(--night); font: 700 clamp(12px, 1vw, 14px)/1.25 var(--sans); }
@media (min-width: 641px) {
  .hero { padding-right: calc(clamp(190px, 18vw, 260px) + clamp(8px, 5vw, 96px) + 36px); }
}

.kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--night);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  font: 900 clamp(38px, 5.6vw, 80px)/.98 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero-description { max-width: 60ch; margin: 22px 0 0; color: #dedad0; font-size: clamp(15px, 1.4vw, 19px); }

.verdict {
  position: relative;
  width: fit-content;
  max-width: min(100%, 600px);
  margin-top: 22px;
  padding: 13px 17px 13px 36px;
  border: 1px solid #5b5a52;
  border-radius: 12px;
  background: #16161a;
  color: var(--green);
}
.verdict::before { content: ""; position: absolute; top: 20px; left: 16px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict strong { display: block; color: var(--ink); font-size: 16px; line-height: 1.45; }
.verdict p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- controls ---------- */
.tracker { position: relative; margin-top: -64px; }
.controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid #44444d;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 20px 36px -24px #000b;
}
.controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.controls legend, .controls h2, .controls .lbl { display: block; margin: 0 0 12px; padding: 0; font: 700 16px/1.35 var(--sans); }

.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.pick label { position: relative; min-width: 0; cursor: pointer; }
.cat-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  padding: 9px 10px;
  border: 1px solid #44444f;
  border-radius: 11px;
  background: var(--tile);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.cat-tile svg { flex: none; width: 20px; height: 20px; color: var(--yellow); }
.cat-tile b { display: block; font-size: 13.5px; line-height: 1.2; }
.cat-tile small { display: block; color: var(--muted); font-size: 12px; }
.pick label:hover .cat-tile { background: #28282f; border-color: #8a877c; }
.pick input:checked + .cat-tile { border-color: var(--yellow); background: #2a2718; box-shadow: inset 0 0 0 1px var(--yellow); }
.pick input:focus-visible + .cat-tile { outline: 2px solid var(--yellow); outline-offset: 4px; }

.opts { display: flex; flex-wrap: wrap; column-gap: 18px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.opts label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.opts input { width: 17px; height: 17px; margin: 0; }

.control-side { display: grid; gap: 16px; min-width: 0; padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #5a5a64;
  border-radius: 10px;
  background: var(--night);
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field select { appearance: none; background: var(--night) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b5b1a7' stroke-width='1.6'/%3E%3C/svg%3E") right 14px center no-repeat; padding-right: 36px; cursor: pointer; }
.field p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.budget { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #55555f;
  border-radius: 999px;
  background: var(--tile);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { border-color: #8a877c; }
.chip[aria-pressed="true"] { border-color: var(--yellow); background: var(--yellow); color: var(--night); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid #5a5a64;
  border-radius: 10px;
  background: var(--tile);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.btn:hover { border-color: var(--yellow); background: #2a2a31; color: var(--ink); }
.btn.go { border-color: var(--yellow); background: var(--yellow); color: var(--night); }
.btn.go:hover { background: var(--yellow-soft); color: var(--night); }

/* ---------- blocks ---------- */
.block { margin-top: clamp(38px, 4.4vw, 60px); }
#controls, .block { scroll-margin-top: 20px; }
.block h2 { margin: 0 0 8px; font: 900 clamp(27px, 3vw, 39px)/1.12 var(--display); letter-spacing: -.035em; }
.block h2 .n { margin-left: 8px; color: var(--muted); font: 600 16px var(--sans); letter-spacing: 0; vertical-align: middle; }
.lede { max-width: 70ch; margin: 0 0 19px; color: var(--muted); }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 16px; }
.results-heading .reset { color: var(--yellow); font-size: 14px; font-weight: 600; background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* best picks: horizontal cards */
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pickcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #4c4733;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #1d1b14, var(--panel));
}
.pickcard .thumb { display: grid; place-items: center; height: 120px; margin-bottom: 10px; border-radius: 10px; background: #fff; }
.pickcard .thumb img { max-width: 86%; max-height: 104px; object-fit: contain; }
.pickcard .cat { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pickcard h3 { margin: 2px 0 6px; font-size: 15.5px; line-height: 1.3; }
.pickcard h3 a { text-decoration: none; }
.pickcard h3 a::after { content: ""; position: absolute; inset: 0; }
.pickcard .why { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.pickcard .burst { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 999px; background: var(--red); color: #1a0606; font: 900 15px/1 var(--display); letter-spacing: -.02em; }

/* deal rows */
.hits { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hit {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow-wrap: anywhere;
  position: relative;
}
.hit:hover { border-color: #5d5a4c; }
.hit:hover .btn.go { background: var(--yellow-soft); }
.hit:has(.stretch:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 3px; }
.hit h3 a { text-decoration: none; }
.hit h3 a:focus-visible { outline: none; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.hit .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 7px; }
.chev { display: none; color: var(--muted); }
.hit .thumb { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 10px; background: #fff; }
.hit .thumb img { max-width: 74px; max-height: 74px; object-fit: contain; }
.hit h3 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.hit .why { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.hit .flag { margin: 4px 0 0; color: var(--yellow-soft); font-size: 13px; font-weight: 600; }
.priceline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 5px; }
.priceline strong { font: 700 19px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.priceline s { color: var(--muted); font-family: var(--mono); font-size: 14px; }
.save { color: var(--muted); font-size: 13px; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #2a2a31; color: #dcd8ce; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.pct { background: #4a1f22; color: #ffb3b3; }
.pill.bf { background: var(--ink); color: var(--night); }
.pill.amz { background: #1d3b30; color: var(--green); }
.pill.new { background: #3a3215; color: var(--yellow); }

.empty { padding: 17px 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--muted); }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); }
.more { margin-top: 10px; }

/* table */
.tblwrap summary { list-style: none; width: fit-content; margin-bottom: 12px; }
.tblwrap summary::-webkit-details-marker { display: none; }
.tblwrap .when-open, .tblwrap[open] .when-closed { display: none; }
.tblwrap[open] .when-open { display: inline; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
tbody tr.group th { background: var(--tile); font-weight: 750; }
td.prod a { font-weight: 700; text-decoration: none; }
td.prod a:hover { text-decoration: underline; }
td.r { text-align: right; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td small, .muted { color: var(--muted); }

.nos { columns: 2 320px; column-gap: 36px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.nos li { break-inside: avoid; padding: 9px 0; border-top: 1px solid var(--line); }
.nos b { color: var(--ink); font-weight: 650; }

.how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 36px; color: var(--muted); font-size: 15px; }
.how p { max-width: 68ch; margin: 0; }
.how strong { color: var(--ink); }

footer { margin-top: clamp(46px, 7vw, 90px); padding-block: 24px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
footer p { max-width: 78ch; margin: 0; }

@media (max-width: 1000px) {
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 910px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  .control-side { grid-template-columns: 1fr 1fr; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
  .control-side .field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .bar-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; gap: 12px; }
  .bar .jump, .stamp { display: none; }
  .crumbs { gap: 7px; overflow: hidden; min-width: 0; }
  .crumbs .site { font-size: 13px; }
  .home { font-size: 14px; min-width: 0; }
  .home svg, .home .long { display: none; }
  .home span { overflow: hidden; text-overflow: ellipsis; }
  .cta { min-height: 40px; padding: 6px 12px; font-size: 13px; }

  .hero { padding-block: 26px 76px; }
  .tag { right: -10px; top: 78px; width: 88px; }
  .tag .pct { font-size: 28px; }
  .tag .off { font-size: 12px; }
  .tag .ca { display: none; }
  .tag .string { height: 36px; }
  .kicker { margin-bottom: 14px; font-size: 12px; }
  .hero h1 { max-width: calc(100% - 80px); font-size: clamp(31px, 9vw, 44px); }
  .hero-description { margin-top: 14px; font-size: 15px; }
  .verdict { margin-top: 16px; padding: 11px 14px 11px 32px; }
  .verdict::before { top: 18px; left: 14px; }
  .verdict strong { font-size: 15px; }
  .verdict p { font-size: 13px; }

  /* Filters: one compact panel. Categories and budgets scroll sideways. */
  .tracker { margin-top: -50px; }
  .controls { gap: 14px; padding: 16px 0 16px 16px; border-radius: var(--radius); overflow: hidden; }
  .controls legend, .controls .lbl { margin-bottom: 8px; font-size: 14px; }
  .controls fieldset, .control-side { padding-right: 16px; }
  .pick, .budget {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-right: -16px;
    padding: 2px 16px 4px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .pick::-webkit-scrollbar, .budget::-webkit-scrollbar { display: none; }
  .pick label, .budget .chip { flex: none; scroll-snap-align: start; }
  .cat-tile { gap: 7px; min-height: 44px; padding: 6px 12px 6px 10px; border-radius: 999px; }
  .cat-tile svg { width: 18px; height: 18px; }
  .cat-tile span { display: flex; align-items: baseline; gap: 6px; }
  .cat-tile b { font-size: 14px; white-space: nowrap; }
  .cat-tile small { font-size: 12px; }
  .cat-tile small { font-variant-numeric: tabular-nums; }
  .opts { margin-top: 2px; }
  .control-side { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 14px; }
  .field { min-width: 0; }
  .chip { min-height: 40px; white-space: nowrap; }

  /* Best picks: a swipeable row instead of 8 stacked cards. */
  .picks {
    display: flex;
    gap: 10px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .picks::-webkit-scrollbar { display: none; }
  .pickcard { flex: 0 0 min(72%, 260px); scroll-snap-align: start; padding: 12px; }
  .pickcard .thumb { height: 104px; }
  .pickcard .thumb img { max-height: 92px; }
  .pickcard .cat { font-size: 11px; }
  .pickcard .burst { top: 18px; right: 18px; }

  /* Deal rows: compact, whole card taps through to Amazon. */
  .block { margin-top: 32px; }
  .hit { grid-template-columns: 64px minmax(0, 1fr) 16px; align-items: start; gap: 4px 12px; padding: 12px 10px 12px 12px; }
  .hit .thumb { width: 64px; height: 64px; border-radius: 8px; }
  .hit .thumb img { max-width: 56px; max-height: 56px; }
  .hit h3 { font-size: 15px; line-height: 1.28; }
  .priceline { margin-top: 3px; gap: 2px 8px; }
  .priceline strong { font-size: 17px; }
  .priceline s { font-size: 13px; }
  .hit .why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 13px; line-height: 1.4; }
  .hit .why .save { display: none; }
  .hit .tags { gap: 4px 6px; margin-top: 6px; }
  .hit .tags .save { font-size: 12px; }
  .pill { padding: 2px 8px; font-size: 11px; }
  .hit .btn.go { display: none; }
  .chev { display: block; align-self: center; }
  .more { width: 100%; }
  .how { grid-template-columns: 1fr; gap: 14px; font-size: 14.5px; }

  table, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr { border-top: 1px solid var(--line); padding: 10px 14px; }
  tbody tr:first-child { border: 0; }
  tbody tr.group { padding: 0; }
  tbody tr.group th { border: 0; padding: 12px 14px; }
  td { border: 0; padding: 2px 0; }
  td.prod a { display: inline-block; padding: 4px 0; }
  td.r { display: inline-block; margin-right: 14px; text-align: left; }
  td.r[data-h]::before { content: attr(data-h) " "; color: var(--muted); font: 600 12px var(--sans); }
  .tblwrap summary { width: 100%; }
}

@media (max-width: 360px) {
  .crumbs .site, .crumbs .sep { display: none; }
  .hero h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
