:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1d1b16;
  --muted: #6b665b;
  --line: #e4dfd2;
  --gold: #a8841c;
  --gold-soft: #f4ead0;
  --silver: #5f6b78;
  --silver-soft: #e6eaef;
  --good: #1f7a4a;
  --good-soft: #e1f2e8;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --shadow: 0 1px 2px rgba(30, 25, 10, 0.06), 0 4px 16px rgba(30, 25, 10, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --surface: #1b1a16;
    --ink: #eeeadf;
    --muted: #a39d8e;
    --line: #2e2b24;
    --gold: #e0b94a;
    --gold-soft: #2f2715;
    --silver: #b8c3cf;
    --silver-soft: #23282e;
    --good: #5fd08f;
    --good-soft: #15281d;
    --warn: #f0b45a;
    --warn-soft: #2e2313;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.live {
  width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none;
}
.live.on { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }

.spots { display: flex; gap: 10px; }
.spot {
  display: grid; padding: 8px 14px; border-radius: 10px; min-width: 130px;
  font-variant-numeric: tabular-nums;
}
.spot-or { background: var(--gold-soft); }
.spot-ag { background: var(--silver-soft); }
.spot-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.spot strong { font-size: 18px; }
.spot-or strong { color: var(--gold); }
.spot-ag strong { color: var(--silver); }
.spot-g { font-size: 12px; color: var(--muted); }

.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 14px;
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--bg); }
.meta { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; }

.deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.deal {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; box-shadow: var(--shadow);
}
.deal.fresh { animation: flash 2.4s ease-out; }
@keyframes flash { from { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); } }

.thumb { width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--line); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.body { min-width: 0; }
.title { font-weight: 600; text-decoration: none; display: block; overflow-wrap: anywhere; }
.title:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.chip {
  font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--line); color: var(--muted);
}
.chip.or { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.argent { background: var(--silver-soft); color: var(--silver); border-color: transparent; }
.detail { margin: 0; color: var(--muted); font-size: 13px; }
.alerts { margin: 6px 0 0; font-size: 13px; color: var(--warn); }
.alerts:empty { display: none; }

.figures {
  display: grid; justify-items: end; align-content: start; gap: 2px; text-align: right;
  font-variant-numeric: tabular-nums; min-width: 170px;
}
.discount { font-size: 24px; font-weight: 700; color: var(--good); line-height: 1.1; }
.saving { font-size: 13px; color: var(--good); }
.figures dl { margin: 8px 0 6px; display: grid; gap: 2px; }
.figures dl div { display: flex; gap: 8px; justify-content: flex-end; font-size: 13px; }
.figures dt { color: var(--muted); }
.figures dd { margin: 0; font-weight: 600; }
.go {
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--gold);
}
.go:hover { text-decoration: underline; }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty-title { color: var(--ink); font-weight: 600; font-size: 16px; }

.foot { color: var(--muted); font-size: 12px; padding-top: 28px; padding-bottom: 40px; }

@media (max-width: 640px) {
  .deal { grid-template-columns: 72px 1fr; }
  .thumb { width: 72px; height: 72px; }
  .figures { grid-column: 1 / -1; justify-items: start; text-align: left; grid-template-columns: auto auto; align-items: baseline; column-gap: 12px; }
  .figures dl { grid-column: 1 / -1; margin: 4px 0; }
  .figures dl div { justify-content: flex-start; }
  .meta { margin-left: 0; width: 100%; }
  .spots { width: 100%; }
  .spot { flex: 1; min-width: 0; }
}
