
:root {
  --acie-bg: #f6f5f1;
  --acie-surface: #ffffff;
  --acie-surface-2: #eef2ef;
  --acie-ink: #16181d;
  --acie-ink-muted: #5c6373;
  --acie-line: #dfe0da;
  --acie-accent: #1f5f4f;
  --acie-accent-strong: #174a3e;
  --acie-accent-ink: #ffffff;
  --acie-warn: #8a5a12;
  --acie-warn-bg: #fbf3e3;
  --acie-ok: #1f6f3f;
  --acie-radius: 10px;
  --acie-radius-lg: 16px;
  --acie-space: 8px;
  --acie-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --acie-measure: 68ch;
  --acie-shadow: 0 1px 2px rgba(22, 24, 29, 0.05), 0 8px 24px -16px rgba(22, 24, 29, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --acie-bg: #14161a;
    --acie-surface: #1c1f25;
    --acie-surface-2: #22282a;
    --acie-ink: #f2f1ee;
    --acie-ink-muted: #a7adba;
    --acie-line: #2c313a;
    --acie-accent: #6fd3b4;
    --acie-accent-strong: #8ee0c6;
    --acie-accent-ink: #10221d;
    --acie-warn: #e0b46a;
    --acie-warn-bg: #2b2415;
    --acie-ok: #7fd39a;
    --acie-shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--acie-font);
  color: var(--acie-ink);
  background: var(--acie-bg);
  line-height: 1.5;
}
a { color: var(--acie-accent); }
a:hover { color: var(--acie-accent-strong); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: 0 0 calc(var(--acie-space) * 2); }
h2 { font-size: 1.35rem; margin: calc(var(--acie-space) * 5) 0 calc(var(--acie-space) * 2); }
h3 { font-size: 1.05rem; margin: 0 0 var(--acie-space); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: calc(var(--acie-space) * 2); top: var(--acie-space); }
:focus-visible { outline: 2px solid var(--acie-accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 calc(var(--acie-space) * 3); }

header.site {
  border-bottom: 1px solid var(--acie-line);
  background: var(--acie-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: calc(var(--acie-space) * 2);
  align-items: center;
  padding-top: calc(var(--acie-space) * 1.5);
  padding-bottom: calc(var(--acie-space) * 1.5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--acie-ink);
}
.brand .mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--acie-accent);
  color: var(--acie-accent-ink);
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0;
}
header.site form.search { display: flex; gap: var(--acie-space); min-width: 0; }
header.site input[type="search"] { flex: 1; min-width: 0; }
header.site nav { display: flex; gap: calc(var(--acie-space) * 2); align-items: center; white-space: nowrap; }
header.site nav a, header.site nav button.link { color: var(--acie-ink); text-decoration: none; font-weight: 500; }
header.site nav a:hover { color: var(--acie-accent); }
.badge {
  background: var(--acie-accent);
  color: var(--acie-accent-ink);
  border-radius: 999px;
  padding: 0 6px;
  margin-left: 4px;
  font-size: 0.75rem;
}
@media (max-width: 640px) {
  header.site .wrap { grid-template-columns: 1fr auto; }
  header.site form.search { grid-column: 1 / -1; grid-row: 2; }
}

main { flex: 1; padding: calc(var(--acie-space) * 4) 0 calc(var(--acie-space) * 6); }
footer { border-top: 1px solid var(--acie-line); background: var(--acie-surface); color: var(--acie-ink-muted); font-size: 0.85rem; }
footer .wrap { padding-top: calc(var(--acie-space) * 3); padding-bottom: calc(var(--acie-space) * 3); }
footer p, .prose { max-width: var(--acie-measure); }
footer nav { display: flex; flex-wrap: wrap; gap: calc(var(--acie-space) * 2); }
footer nav a { color: var(--acie-ink); }

input, select, textarea, button {
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--acie-radius);
  border: 1px solid var(--acie-line);
  background: var(--acie-surface);
  color: var(--acie-ink);
  min-height: 44px;
}
textarea { min-height: 88px; width: 100%; }
label { display: block; font-weight: 500; }
label input, label select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
button { cursor: pointer; }
button.primary, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--acie-radius);
  background: var(--acie-accent);
  color: var(--acie-accent-ink);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
}
button.primary:hover, a.button:hover { background: var(--acie-accent-strong); color: var(--acie-accent-ink); }
a.button.secondary, button.secondary { background: var(--acie-surface); color: var(--acie-ink); border-color: var(--acie-line); }
a.button.secondary:hover, button.secondary:hover { border-color: var(--acie-ink-muted); background: var(--acie-surface); color: var(--acie-ink); }
button.link { background: none; border: none; padding: 0; min-height: 0; text-decoration: underline; color: var(--acie-accent); }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: var(--acie-space); align-items: center; margin: calc(var(--acie-space) * 2) 0; }

.hero {
  background: var(--acie-surface);
  border: 1px solid var(--acie-line);
  border-radius: var(--acie-radius-lg);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: var(--acie-shadow);
}
.hero h1 { max-width: 22ch; }
.hero .lede { font-size: 1.1rem; max-width: 60ch; color: var(--acie-ink-muted); margin: 0 0 calc(var(--acie-space) * 3); }
.hero form { display: flex; gap: var(--acie-space); max-width: 640px; }
.hero form input { flex: 1; min-width: 0; font-size: 1.05rem; }
.hero .hint { margin: var(--acie-space) 0 0; font-size: 0.9rem; color: var(--acie-ink-muted); }
.hero .hint a { margin-right: 8px; }
@media (max-width: 480px) {
  .hero form { flex-direction: column; }
  .hero form button { width: 100%; }
}
.pillars { display: grid; gap: calc(var(--acie-space) * 2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: calc(var(--acie-space) * 3); }
.pillar { padding: calc(var(--acie-space) * 2.5); border-radius: var(--acie-radius); background: var(--acie-surface-2); }
.pillar h3 { margin-bottom: 4px; }
.pillar p { margin: 0; color: var(--acie-ink-muted); font-size: 0.95rem; }

.page-head { margin-bottom: calc(var(--acie-space) * 3); }
.page-head h1 { margin-bottom: 4px; }
.page-head .meta { margin: 0; color: var(--acie-ink-muted); }
.meta-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; color: var(--acie-ink-muted); }

.card {
  background: var(--acie-surface);
  border: 1px solid var(--acie-line);
  border-radius: var(--acie-radius);
  padding: calc(var(--acie-space) * 2.5);
  margin-bottom: calc(var(--acie-space) * 2);
}
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: calc(var(--acie-space) * 2); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid .card { margin: 0; display: flex; flex-direction: column; }
.grid .card .actions { margin-top: auto; margin-bottom: 0; }
.product-card h3 a { color: var(--acie-ink); text-decoration: none; }
.product-card h3 a:hover { color: var(--acie-accent); text-decoration: underline; }
.product-card .price { margin: var(--acie-space) 0 4px; }
.product-card .from { font-size: 0.85rem; color: var(--acie-ink-muted); margin: 0; }
.muted { color: var(--acie-ink-muted); }
.price { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; }
.price small { font-size: 0.7em; font-weight: 500; color: var(--acie-ink-muted); margin-left: 2px; }
.rank {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--acie-surface-2);
  color: var(--acie-ink);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.offer.best { border-color: var(--acie-accent); box-shadow: 0 0 0 1px var(--acie-accent) inset; }
.offer.best .rank { background: var(--acie-accent); color: var(--acie-accent-ink); }
.offer-head { display: flex; gap: calc(var(--acie-space) * 1.5); align-items: flex-start; }
.offer-head h3 { margin: 0; flex: 1; }
.offer-merchant { font-weight: 600; color: var(--acie-ink); }
.offer-body { display: grid; grid-template-columns: 1fr auto; gap: calc(var(--acie-space) * 2); align-items: start; margin-top: calc(var(--acie-space) * 1.5); }
.offer-body .buy { text-align: right; }
.offer-body .buy .price { margin-bottom: var(--acie-space); }
@media (max-width: 560px) {
  .offer-body { grid-template-columns: 1fr; }
  .offer-body .buy { text-align: left; }
  .offer-body .buy a.button { width: 100%; }
}
.summary { margin: var(--acie-space) 0 0; }
.flash {
  margin: 0;
  padding: calc(var(--acie-space) * 1.5) calc(var(--acie-space) * 3);
  background: var(--acie-accent);
  color: var(--acie-accent-ink);
  text-align: center;
}
details { margin: var(--acie-space) 0; }
details summary { cursor: pointer; color: var(--acie-accent); font-weight: 500; }
.evidence { margin: var(--acie-space) 0 0; padding-left: 1.1rem; color: var(--acie-ink-muted); font-size: 0.9rem; }
.tag {
  display: inline-block;
  border: 1px solid var(--acie-line);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 0.78rem;
  color: var(--acie-ink-muted);
  background: var(--acie-surface);
}
.tag.ok { color: var(--acie-ok); border-color: currentColor; }
.tag.warn { color: var(--acie-warn); border-color: currentColor; background: var(--acie-warn-bg); }
.notice { padding: calc(var(--acie-space) * 1.5) calc(var(--acie-space) * 2); border-radius: var(--acie-radius); background: var(--acie-warn-bg); color: var(--acie-warn); }
.disclosure { font-size: 0.8rem; color: var(--acie-ink-muted); margin: var(--acie-space) 0 0; }
.empty { padding: calc(var(--acie-space) * 5) calc(var(--acie-space) * 3); text-align: center; border: 1px dashed var(--acie-line); border-radius: var(--acie-radius-lg); color: var(--acie-ink-muted); }
.empty h2 { margin-top: 0; font-size: 1.15rem; color: var(--acie-ink); }
.empty p { margin: 4px auto 0; max-width: 48ch; }
.bars { display: grid; gap: 4px; max-width: 320px; }
.bar { display: grid; grid-template-columns: 3ch 1fr 4ch; gap: var(--acie-space); align-items: center; }
.bar .track { background: var(--acie-line); border-radius: 999px; height: 8px; }
.bar .fill { background: var(--acie-accent); height: 8px; border-radius: 999px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--acie-line); border-radius: var(--acie-radius); background: var(--acie-surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: calc(var(--acie-space) * 1.5); border-bottom: 1px solid var(--acie-line); vertical-align: top; }
thead th { background: var(--acie-surface-2); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
tbody th { font-weight: 600; color: var(--acie-ink-muted); white-space: nowrap; }
.small { font-size: 0.85rem; }
.steps { margin-top: calc(var(--acie-space) * 5); }
.steps ol { display: grid; gap: var(--acie-space); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: calc(var(--acie-space) * 2); border: 1px solid var(--acie-line); border-radius: var(--acie-radius); color: var(--acie-ink-muted); font-size: 0.95rem; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-bottom: var(--acie-space); border-radius: 999px; background: var(--acie-accent); color: var(--acie-accent-ink); font-weight: 700; font-size: 0.85rem; }
.steps li strong { display: block; color: var(--acie-ink); }
.storefronts { margin-top: calc(var(--acie-space) * 5); }
.empty .storefronts { margin-top: calc(var(--acie-space) * 3); padding-top: calc(var(--acie-space) * 3); border-top: 1px solid var(--acie-line); text-align: left; }
.empty .storefronts h2 { font-size: 1.15rem; }
.storefront-grid { display: grid; gap: calc(var(--acie-space) * 2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: calc(var(--acie-space) * 2) 0; }
.storefront-card { display: flex; flex-direction: column; gap: var(--acie-space); }
.storefront-card p { flex: 1; margin: 0; }
.storefront-card a.button { align-self: flex-start; }
.disclosure { margin-top: var(--acie-space); }
.weights { margin-top: calc(var(--acie-space) * 5); }
.weight-list { display: grid; gap: calc(var(--acie-space) * 1.5); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: calc(var(--acie-space) * 2) 0; }
.weight-list dt { font-weight: 600; display: flex; justify-content: space-between; }
.weight-list dt .pct { color: var(--acie-ink-muted); font-variant-numeric: tabular-nums; }
.weight-list dd { margin: 4px 0 0; color: var(--acie-ink-muted); }
.weight-list .track { display: block; height: 8px; border-radius: 999px; background: var(--acie-line); margin-bottom: 4px; }
.weight-list .fill { display: block; height: 8px; border-radius: 999px; background: var(--acie-accent); }
.crumbs { font-size: 0.9rem; color: var(--acie-ink-muted); margin-bottom: var(--acie-space); }
.glance { display: grid; gap: calc(var(--acie-space) * 2); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: calc(var(--acie-space) * 2); border-radius: var(--acie-radius); background: var(--acie-surface-2); margin-bottom: calc(var(--acie-space) * 3); }
.glance > div { display: grid; gap: 2px; }
.glance .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--acie-ink-muted); }
.glance .value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.glance .sub { font-size: 0.85rem; color: var(--acie-ink-muted); }
.history { margin-top: var(--acie-space); }
.history summary .tag { margin-left: 6px; }
.sparkline { display: block; width: 100%; max-width: 320px; height: 64px; margin: var(--acie-space) 0 4px; }
.sparkline polyline { fill: none; stroke: var(--acie-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sparkline circle { fill: var(--acie-accent); }
.identity { margin: calc(var(--acie-space) * 2) 0; }
table.specs { min-width: 0; }
table.specs th { width: 40%; white-space: normal; }
.chips { margin: var(--acie-space) 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 4px 10px; border: 1px solid var(--acie-line); border-radius: 999px; font-size: 0.85rem; text-decoration: none; color: var(--acie-ink); background: var(--acie-surface-2); }
.with-facets { display: grid; gap: calc(var(--acie-space) * 3); grid-template-columns: 220px 1fr; align-items: start; }
.facets h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--acie-ink-muted); margin: 0 0 6px; }
.facets ul { list-style: none; padding: 0; margin: 0 0 calc(var(--acie-space) * 2); }
.facets li { display: flex; justify-content: space-between; gap: var(--acie-space); padding: 4px 0; font-size: 0.95rem; }
.facets a[aria-current="true"] { font-weight: 700; text-decoration: none; }
.facets .count { color: var(--acie-ink-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .with-facets { grid-template-columns: 1fr; }
  .facets ul { display: flex; flex-wrap: wrap; gap: 6px 14px; }
}
