/* OFFSET Search Beta — production consumer styles.
 * Built on the OFFSET light/dark token system (:root in index.html).
 * No staging/debug/developer surfaces exist in this bundle. */

:root {
  --text: var(--ink); /* alias consumed by inline styles from consumer-ui.js */
}

/* ── base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

/* ── beta chrome ──────────────────────────────────────────────── */
.beta-nav { border-bottom: 1px solid var(--line); }
.beta-nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  justify-content: flex-end;
}
.beta-pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  background: var(--soft);
}
.beta-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}
.beta-hero { padding: 2.5rem 0 1rem; }
.beta-wordmark { max-width: 420px; }
.beta-wordmark img,
.beta-wordmark picture { display: block; width: 100%; height: auto; }
.beta-question {
  margin: 1.6rem 0 1rem;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
form#search-form { display: flex; gap: 0.6rem; }
#q {
  flex: 1;
  padding: 0.85rem 1.1rem;
  font-size: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  min-width: 0;
}
#q:focus { outline: 2px solid var(--signal); border-color: var(--signal); }
#q::placeholder { color: var(--muted); }
form#search-form button {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius);
  background: var(--reverse);
  color: var(--reverse-ink);
  cursor: pointer;
  white-space: nowrap;
}
form#search-form button:hover { filter: brightness(1.12); }
.beta-tagline {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.beta-disclosure {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 44rem;
}
#cache-line {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 1rem;
  min-height: 1.2em;
}
#stages { margin-top: 0.5rem; }

/* ── verdict hero ─────────────────────────────────────────────── */
.verdict-card {
  background: var(--card);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.verdict-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.verdict-headline { font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; }
.verdict-sub { font-size: 1.02rem; margin-top: 0.15rem; }
.verdict-merchant { font-size: 0.95rem; color: var(--muted); }
.verdict-range { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.verdict-note { font-size: 0.88rem; color: var(--green); margin-top: 0.5rem; font-weight: 600; }
.verdict-foot { font-size: 0.8rem; color: var(--muted); margin-top: 0.7rem; }

/* ── offers ───────────────────────────────────────────────────── */
.offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}
.offer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.offer.winner { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.offer-img {
  background: var(--soft);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.offer-img img { width: 100%; height: 100%; object-fit: contain; }
.offer-body { padding: 0.7rem 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.offer-merchant { font-weight: 700; font-size: 0.95rem; }
.offer-price { font-size: 1.25rem; font-weight: 800; }
.offer-price .cur { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.offer-price .ref { font-size: 0.8rem; font-weight: 400; color: var(--muted); text-decoration: line-through; margin-left: 0.4rem; }
.offer-variant { font-size: 0.82rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.15rem; }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 0.3rem;
  padding: 0.18rem 0.5rem;
  text-transform: uppercase;
}
.b-llp { background: var(--green); color: #fff; }
.b-verified { background: var(--green); color: #fff; }
.b-listed { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.b-fresh { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); border: 1px solid var(--green); }
.b-unavail { background: color-mix(in srgb, var(--signal) 12%, transparent); color: var(--signal); border: 1px solid var(--signal); }
.b-exact { background: color-mix(in srgb, #2f6fed 12%, transparent); color: #2f6fed; border: 1px solid #2f6fed; }
.offer-link { margin-top: auto; font-size: 0.85rem; color: var(--signal); text-decoration: none; padding-top: 0.3rem; font-weight: 600; }
.offer-link:hover { text-decoration: underline; }
.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1rem 0 0.2rem;
  font-weight: 700;
}
details.counts { margin-top: 0.9rem; }
details.counts summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
details.counts .note { margin-top: 0.4rem; }

/* ── generic panels / empty / notes ───────────────────────────── */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.9rem;
}
.panel h2 { font-size: 1.02rem; margin: 0 0 0.5rem; }
.empty {
  border: 1px dashed var(--signal);
  border-radius: var(--radius);
  padding: 1.2rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--signal-soft) 35%, transparent);
  margin-bottom: 0.9rem;
}
.note { font-size: 0.85rem; color: var(--muted); }
.cand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  margin: 0.35rem 0;
  background: var(--card);
}
.cand .score { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ── ambiguity ────────────────────────────────────────────────── */
.ambig-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.ambig-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 400;
}
.ambig-card:hover { border-color: var(--signal); }
.ambig-title { font-weight: 700; }
.ambig-detail { font-size: 0.82rem; color: var(--muted); font-weight: 400; }

/* ── loading ──────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; gap: 0.7rem; font-size: 1.05rem; font-weight: 600; }
.pulse {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.1s ease-in-out infinite;
  flex: none;
}
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
.dots::after { content: ""; animation: dots 1.2s steps(1) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ── footer ───────────────────────────────────────────────────── */
.beta-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 1.25rem 2.5rem;
}
.beta-footer p {
  max-width: 980px;
  margin: 0 auto 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.beta-footer .beta-fine { font-family: var(--mono); font-size: 0.72rem; }

/* ── mobile ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  form#search-form { flex-direction: column; }
  form#search-form button { width: 100%; }
  .offers { grid-template-columns: 1fr; }
  .verdict-headline { font-size: 1.7rem; }
  .beta-hero { padding-top: 1.8rem; }
}
