:root {
  --bg: #fff;
  --surface: #fff;
  --ink: #1c2128;
  --muted: #5c6570;
  --line: #e4e7ec;
  --teal: #1d4ed8;
  --teal-deep: #1e3a8a;
  --foam: #eef1f6;
  --amber: #b45309;
  --amber-deep: #92400e;
  --sand: #f3f4f6;
  --footer: #2a2f36;
  --on: #fff;
  --scrim: #101318;
  --shadow: 0 16px 40px -28px rgba(16, 19, 24, 0.55);
  --radius: 0.875rem;
  color-scheme: light;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

html.dark {
  --bg: #101318;
  --surface: #1a1f27;
  --ink: #f3f4f6;
  --muted: #a7b0bb;
  --line: #2d3541;
  --teal: #3b82f6;
  --teal-deep: #bfdbfe;
  --foam: #243044;
  --amber: #fbbf24;
  --amber-deep: #fcd34d;
  --sand: #242a33;
  --footer: #0b0d11;
  --shadow: 0 16px 40px -28px #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
#app { min-height: 100vh; display: flex; flex-direction: column; }
#content { flex: 1 0 auto; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .price { font-weight: 600; letter-spacing: -0.02em; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  z-index: 50;
}
.skip:focus { transform: none; }

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(10px);
}
.header-inner, .wrap { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; gap: 0.75rem; }
.brand { display: flex; align-items: center; flex: 0 0 auto; width: max-content; }
.brand img { display: block; flex: none; width: 209.03px; height: 36px; max-width: none; }
.brand img.logo-night { display: none; }
html.dark .brand img.logo-day { display: none; }
html.dark .brand img.logo-night { display: block; }
.nav { display: none; margin-left: 1.5rem; gap: 0.25rem; }
.nav-link, .icon-button, .btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-link { padding: 0 0.75rem; font-size: 0.875rem; font-weight: 500; }
.nav-link:hover, .icon-button:hover { background: var(--sand); }
.nav-link.active { background: var(--foam); color: var(--teal-deep); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.account-link { padding: 0 0.75rem; font-weight: 600; color: var(--teal); }
.icon-button { width: 2.75rem; }
.icon { width: 1.25rem; height: 1.25rem; }
.menu-button { display: grid; }
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem 1rem;
  background: var(--surface);
}
.mobile-nav.open { display: grid; }
.mobile-nav a, .mobile-nav button { justify-content: flex-start; padding: 0 0.25rem; font-weight: 500; background: none; border: 0; text-align: left; }

.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--scrim); color: var(--on); }
.hero-slides, .hero-slides img, .hero-scrim { position: absolute; inset: 0; }
.hero-slides img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.7s; }
.hero-scrim { background: color-mix(in srgb, var(--scrim) 60%, transparent); }
.hero-copy { position: relative; z-index: 1; padding: 2rem 0 2.5rem; }
.kicker { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--on) 80%, transparent); }
.hero h1 { margin-top: 0.5rem; max-width: 36rem; font-size: clamp(2.25rem, 5vw, 3rem); }
.hero-lead { margin-top: 0.75rem; max-width: 36rem; color: color-mix(in srgb, var(--on) 85%, transparent); }
.dots { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; display: flex; }
.dot { width: 2.75rem; height: 2.75rem; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.dot span { width: 0.625rem; height: 0.625rem; border-radius: 999px; background: color-mix(in srgb, var(--on) 55%, transparent); }
.dot[aria-current="true"] span { background: var(--on); }

.search-card, .panel, .card, .auth-card, .note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-card { margin-top: 2rem; padding: 1rem; color: var(--ink); box-shadow: var(--shadow); }
.grid-4, .form-grid, .cost-grid, .promo-grid { display: grid; gap: 0.75rem; }
[hidden] { display: none !important; }
.field { display: grid; gap: 0.25rem; }
.field span, .check { font-size: 0.875rem; font-weight: 500; }
input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: var(--teal); }
.row-actions, .tools, .pager, .card-actions, .inline-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-actions { margin-top: 1rem; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.check input { width: 1rem; min-height: 0; accent-color: var(--teal); }
.btn { padding: 0 1rem; font-weight: 600; gap: 0.4rem; }
.btn.primary { background: var(--teal); color: var(--on); }
.btn.line { border: 1px solid var(--line); background: var(--surface); }
.btn.ghost { color: var(--teal); }
.btn.small { min-height: 2.25rem; font-size: 0.875rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.line:hover { border-color: var(--teal); }

.section { padding: 2rem 0; }
.section h2, .panel h2, .screen h1 { font-size: 1.75rem; }
.screen h1 { font-size: clamp(2rem, 4vw, 2.5rem); }
.h-scroll { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; margin-top: 1rem; }
.cat-card, .brand-pill, .promo {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}
.cat-card { min-width: 11rem; padding: 1rem; display: flex; flex-direction: column; align-items: stretch; }
.cat-card:hover, .promo:hover, .brand-pill:hover { border-color: var(--teal); }
.cat-card strong, .brand-pill { font-weight: 600; }
.cat-card p, .muted, .meta { color: var(--muted); }
.cat-count { margin-top: auto; padding-top: 0.75rem; color: var(--teal); font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.brand-pill { border-radius: 999px; padding: 0.55rem 0.9rem; white-space: nowrap; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.section-head a { color: var(--teal); font-weight: 600; font-size: 0.875rem; }

.cards { display: grid; gap: 1rem; }
.cards.cols-3 { grid-template-columns: 1fr; }
.card { overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.photo { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--sand); }
.photo img, .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.badge.none, .badge.fair { background: var(--sand); color: var(--muted); }
.badge.fair { color: var(--ink); }
.badge.lower, .badge.good { background: var(--foam); color: var(--teal-deep); }
.badge.great { background: var(--teal); color: var(--on); }
.badge.higher { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber-deep); }
.photo .badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.card-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; flex: 1; }
.price { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.card-title { font-weight: 600; }
.card-title:hover, .text-link { color: var(--teal); }
.card-top { display: flex; justify-content: space-between; gap: 0.75rem; }
.heart.on { fill: var(--teal); color: var(--teal); }
.compare-on { color: var(--teal); }
.highlights { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.highlights li { background: var(--foam); color: var(--teal-deep); border-radius: 999px; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 600; }
.meta { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; margin-top: auto; }
.seller-tag { margin-left: auto; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.promo-grid { margin: 0 auto 2rem; }
.plan-grid { display: grid; gap: 1rem; margin-top: 1.5rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; box-shadow: none; }
.plan-grid .plan { margin-top: 0; }
.plan.current { border-color: var(--teal); }
.plan h2 { font-size: 1.35rem; }
.plan ul { margin: 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.35rem; }
.plan .btn { margin-top: auto; }
.promo { padding: 1.25rem; box-shadow: none; }
.promo h3 { font-size: 1.25rem; }
.promo p { margin-top: 0.5rem; color: var(--muted); font-size: 0.875rem; }

.footer { margin-top: 4rem; background: var(--footer); color: var(--on); }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
.footer img { display: block; width: 209.03px; height: 36px; max-width: none; }
.footer p, .footer a { color: color-mix(in srgb, var(--on) 75%, transparent); font-size: 0.875rem; }
.footer strong { display: block; margin-bottom: 0.5rem; }
.footer li { margin: 0.5rem 0; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a:hover { text-decoration: underline; color: var(--on); }
.legal { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: nowrap; border-top: 1px solid color-mix(in srgb, var(--on) 15%, transparent); font-size: 0.75rem; line-height: 1.4; padding: 1rem 0; color: color-mix(in srgb, var(--on) 75%, transparent); white-space: nowrap; overflow-x: auto; }

.search-layout { display: grid; gap: 1.5rem; padding-top: 1.5rem; }
.filters { display: none; }
.filters form, .stack { display: grid; gap: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { border: 0; border-radius: 999px; min-height: 2.25rem; padding: 0 0.75rem; background: var(--sand); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--teal); color: var(--on); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.results-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; flex-wrap: wrap; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem; background: var(--surface); }
.view-toggle button[aria-pressed="true"] { color: var(--teal); }
.pager { justify-content: center; margin: 1.5rem 0; }
.empty, .dashed { border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; background: var(--surface); }
.filters-open { display: inline-flex; }
.sheet { border: 0; padding: 0; width: min(28rem, 100%); max-height: 100%; background: var(--surface); color: var(--ink); }
.sheet::backdrop { background: color-mix(in srgb, var(--scrim) 55%, transparent); }
.sheet-body { padding: 1rem 1rem 2rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }

.crumbs { color: var(--muted); font-size: 0.875rem; }
.crumbs a { color: var(--teal); }
.detail { display: grid; gap: 1.5rem; padding-top: 1rem; }
.detail > .crumbs { grid-column: 1 / -1; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); margin-top: 0.75rem; }
.spec-grid div { background: var(--surface); padding: 0.75rem; }
.spec-grid dt { color: var(--muted); font-size: 0.75rem; }
.cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.cost-grid .panel { margin-top: 0; }
.cost-grid div, .panel { padding: 1rem 1.25rem; }
.panel { box-shadow: none; }
.panel + .panel { margin-top: 1rem; }
.plan-grid .panel + .panel { margin-top: 0; }
.aside .panel:first-child { box-shadow: var(--shadow); }
.price.xl { font-size: 2.25rem; margin-top: 0.75rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.thumb { position: relative; aspect-ratio: 3 / 2; border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--sand); cursor: pointer; }
.thumb.on { border-color: var(--teal); }
.zoom { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--scrim) 92%, transparent); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 78vh; max-width: min(64rem, 100%); object-fit: contain; }
.lightbox figcaption { color: var(--on); text-align: center; margin-top: 0.75rem; }
.map { width: 100%; height: 16rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); }
.split { display: grid; gap: 2rem; }
.form-grid { grid-template-columns: 1fr; }
.error { color: #b91c1c; font-size: 0.875rem; min-height: 1.1rem; }
html.dark .error { color: #fca5a5; }
.photo-row { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0.75rem 0 0; }
.photo-row li { position: relative; }
.photo-row img { width: 7rem; height: 5rem; object-fit: cover; border-radius: 0.75rem; }
.photo-row button { position: absolute; top: 0.25rem; right: 0.25rem; border: 0; border-radius: 999px; background: var(--surface); font-size: 0.75rem; padding: 0.1rem 0.4rem; cursor: pointer; }
.preview-photo { position: relative; aspect-ratio: 3 / 2; background: var(--sand); }
.preview-photo img { width: 100%; height: 100%; object-fit: cover; }
.tabs { display: flex; gap: 0.5rem; overflow-x: auto; margin-top: 1.5rem; }
.tabs a, .tabs button { display: inline-flex; align-items: center; border-radius: 999px; min-height: 2.75rem; padding: 0 1rem; background: var(--surface); border: 0; font-weight: 600; font-size: 0.875rem; cursor: pointer; white-space: nowrap; }
.admin-stats { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin-top: 1rem; }
.admin-stats strong { display: block; font-size: 1.5rem; }
.admin-stats .panel + .panel { margin-top: 0; }
.admin-table-wrap { overflow-x: auto; margin-top: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table .row-actions { margin-top: 0; }
.stat-note { margin-top: 0.75rem; }
.stat-charts { display: grid; gap: 1rem; margin-top: 1rem; }
.stat-charts .panel + .panel { margin-top: 0; }
.stat-chart h3 { margin-bottom: 0.75rem; font-size: 1.05rem; }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr auto; gap: 0.5rem; align-items: center; margin-top: 0.45rem; font-size: 0.875rem; }
.bar-label { overflow-wrap: anywhere; }
.bar-track { display: block; height: 0.7rem; background: var(--sand); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.bar-value { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.sign-chart { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin: 0; color: var(--ink); }
.sign-chart svg { width: 8rem; height: 8rem; }
.sign-chart figcaption { display: grid; gap: 0.4rem; font-size: 0.875rem; }
.swatch { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 0.2rem; margin-right: 0.4rem; vertical-align: -0.05rem; }
.swatch.teal { background: var(--teal); }
.swatch.sand { background: var(--sand); border: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-weight: 600; }
.tabs .on, .tabs a.primary { background: var(--teal); color: var(--on); }
@media (min-width: 860px) {
  .stat-charts { grid-template-columns: 1fr 1fr; }
  .sign-panel { grid-column: 1 / -1; }
}
.account-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.account-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0.5rem; text-align: left; font-size: 0.875rem; }
.compare th { font-weight: 600; color: var(--muted); }
.compare td { background: var(--surface); border-radius: 0.75rem; padding: 0.5rem 0.75rem; font-variant-numeric: tabular-nums; }
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 2rem 0; }
.auth-card { width: min(28rem, 100%); padding: 1.5rem; }
.auth-providers { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.btn.auth-provider { width: 100%; border: 1px solid var(--line); background: var(--surface); justify-content: center; }
.auth-mark { width: 1.15rem; height: 1.15rem; flex: none; }
.auth-email { margin-top: 0.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--surface); }
.auth-email summary { min-height: 2.75rem; padding: 0 0.9rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; cursor: pointer; font-weight: 600; list-style: none; }
.auth-email summary::-webkit-details-marker { display: none; }
.auth-email summary::after { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -0.2rem; flex: none; }
.auth-email[open] summary::after { transform: rotate(225deg); margin-top: 0.15rem; }
.auth-email form { padding: 0 0.9rem 0.9rem; }
.or { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 1.25rem 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  z-index: 70;
  max-width: min(36rem, calc(100% - 2rem));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.narrow { width: min(40rem, 100%); }
.advice-list { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.advice-list a { display: block; padding: 1.25rem; }
.prose p + p { margin-top: 1rem; }
.history-dl { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.history-dl div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.875rem; }

@media (min-width: 640px) {
  .cards.grid { grid-template-columns: 1fr 1fr; }
  .cost-grid { grid-template-columns: repeat(4, 1fr); }
  .cards.list .card { display: grid; grid-template-columns: 240px 1fr; }
  .cards.list .photo { aspect-ratio: auto; min-height: 100%; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-copy { padding: 3rem 0; }
  .search-card { padding: 1.25rem; }
}
@media (min-width: 768px) {
  .nav { display: flex; }
  .menu-button, .mobile-nav { display: none !important; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .filters { display: block; position: sticky; top: 5rem; }
  .filters-open { display: none; }
  .search-layout { grid-template-columns: 16rem 1fr; align-items: start; }
}
@media (min-width: 1024px) {
  .cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .detail, .split { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
  .aside { position: sticky; top: 5rem; }
  .zoom { display: block; position: absolute; inset: 0; border: 0; background: transparent; cursor: zoom-in; }
  .promo-grid { grid-template-columns: repeat(3, 1fr); }
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides img { transition: none; }
}
