:root {
  --paper: #f3efe6;
  --card: #fffdf8;
  --ink: #1d1a16;
  --muted: #5c564c;
  --line: #ddd4c4;
  --spruce: #1e3d36;
  --spruce-deep: #132823;
  --clay: #b85a3d;
  --clay-deep: #8c3d2f;
  --mark: #c46b4a;
  --good: #e7f0ea;
  --warn: #f8ebe4;
  --shadow: 0 16px 40px rgba(30, 24, 16, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(184, 90, 61, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font: 17px/1.5 "Avenir Next", "Segoe UI", sans-serif;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a { color: var(--spruce); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
}

.skip:focus { top: 12px; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 28px 7vw 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--clay-deep);
}

.wordmark {
  margin: 4px 0 0;
  font-size: 40px;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-mock {
  background: var(--clay);
  border-color: var(--clay-deep);
  color: white;
}

.badge-live {
  background: var(--spruce);
  border-color: var(--spruce-deep);
  color: white;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.wrap { padding: 28px 7vw 80px; max-width: 1240px; }

.privacy, .disclaimer, .note {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--card);
  border-left: 4px solid var(--spruce);
  color: var(--ink);
}

.disclaimer { border-left-color: var(--clay); font-size: 15px; color: var(--muted); }

.lede {
  max-width: 68ch;
  font-size: 19px;
}

.steps {
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
  flex-wrap: wrap;
}

.steps li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.steps li[aria-current="step"] {
  background: var(--spruce);
  border-color: var(--spruce);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel h2 { margin: 0 0 8px; font-size: 28px; }

.actions, .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button, .file-button {
  appearance: none;
  border: 1px solid var(--spruce);
  background: var(--spruce);
  color: white;
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
}

button.secondary, .file-button {
  background: transparent;
  color: var(--spruce);
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
}

.file-button { display: inline-block; }

input[type="file"] { display: none; }

video, canvas, img.preview, img.mask {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #ebe4d8;
  border: 1px solid var(--line);
}

.hidden { display: none !important; }

.status { min-height: 1.4em; color: var(--clay-deep); font-weight: 600; }

.concern {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.concern header, .product header, .gap header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.meter {
  position: relative;
  height: 8px;
  margin: 8px 0;
  background: #ece4d6;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--spruce);
}

.meter i {
  position: absolute;
  left: 75%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--mark);
}

.concern.active { border-left: 4px solid var(--clay); padding-left: 10px; }

.concern p, .product p, .gap p { margin: 6px 0; color: var(--muted); }

.product, .gap, .receipt-line {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 7px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.why { color: var(--ink) !important; }

.not-buy { background: var(--warn); margin: 0 -20px; padding: 4px 20px 12px; }

.receipt {
  background: var(--good);
  margin: 16px -20px -20px;
  padding: 16px 20px 20px;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-family: Georgia, serif;
}

.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 12px; }

.checks label { font-size: 14px; }

.merchant-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.gap.uncovered { background: var(--warn); padding: 10px; border: 1px solid #efd2c6; }

details { margin-top: 16px; }

summary { cursor: pointer; font-weight: 600; }

code { font-size: 14px; }

@media (max-width: 860px) {
  .grid, .merchant-grid { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
  .wordmark { font-size: 34px; }
  .wrap { padding: 20px 16px 64px; }
  .top { padding: 20px 16px 14px; }
}
