/* 2026-09-29 features: deals, price history, rankings, glossary, spec-label links */

/* spec labels that open the glossary */
.spec-row dt a.gl { color: inherit; border-bottom: 1px dashed var(--muted); }
.spec-row dt a.gl:hover { color: var(--accent); border-color: var(--accent); }

/* price history */
.hist-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.hist h3 { margin: 0 0 6px; font-size: 1rem; }
.ph-hist { width: 100%; height: auto; color: var(--accent); background: var(--surface-2); border-radius: 12px; }
.ph-hist .dots circle { fill: var(--accent); }
.ph-hist .lbl text { font-size: 12px; fill: var(--muted); }
.hist-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .88rem; }

/* deals */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.deal { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px; color: inherit; }
a.deal:hover { border-color: var(--accent); color: inherit; }
.deal-img { flex: none; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.deal-img img, .deal-img svg { width: 100%; height: 100%; object-fit: cover; }
.deal-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.deal-name { font-weight: 700; color: inherit; }
.deal-meta { font-size: .85rem; color: var(--muted); }
.deal-price s { color: var(--muted); font-size: .9rem; }
.deal-pct { display: inline-block; background: #dcfce7; color: #166534; font-weight: 700; font-size: .8rem; padding: 1px 8px; border-radius: 999px; }
.btn.small { padding: 6px 14px; font-size: .88rem; align-self: flex-start; margin-top: 4px; }

/* rankings */
.top-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.top-list li { position: relative; }
.top-n { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; background: var(--accent); color: #fff;
  font-weight: 800; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; }

/* glossary */
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gloss-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; color: inherit; }
.gloss-card:hover { border-color: var(--accent); color: inherit; }
.gloss-card span { font-size: .88rem; color: var(--text-2); line-height: 1.55; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .deal-pct { background: #14532d; color: #bbf7d0; }
}
@media (max-width: 760px) {
  .top-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .deal-img { width: 72px; height: 72px; }
}
