:root {
  --fg: #1c1c1f;
  --muted: #6b6b73;
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e3e3e8;
  --accent: #1f6feb;
  --fresh: #2f9e44;
  --aging: #b58105;
  --stale: #888;
  --conflict: #d6336c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header nav { display: flex; gap: 1rem; align-items: baseline; }
.site-header nav .brand { font-weight: 600; color: var(--fg); margin-right: 0.5rem; }
.site-header .env-note { margin: 0; color: var(--muted); font-size: 0.8rem; }

.site-main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }

.page-head h1 { margin: 0 0 0.2rem; font-size: 1.6rem; }
.page-head .muted { margin: 0 0 1rem; }
.muted { color: var(--muted); }

.search-form { margin-bottom: 1rem; }
.search-form input {
  width: 100%; max-width: 420px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table th { background: #f3f3f6; font-weight: 600; font-size: 0.85rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.load-more {
  margin: 1rem 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.load-more:hover { background: #f0f0f4; }

.bottle-results { list-style: none; padding: 0; margin: 0; }
.bottle-results li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
}
.bottle-results li a { font-weight: 600; }
.bottle-results .sku-list { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

.skus { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skus li {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

#map {
  height: 70vh;
  min-height: 420px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #eee;
}
.map-small {
  height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #eee;
  margin-bottom: 1rem;
}

.freshness-pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #eee;
  color: #555;
}
.freshness-pill.fresh    { background: #e3f4e6; color: var(--fresh); }
.freshness-pill.aging    { background: #fcf3d6; color: var(--aging); }
.freshness-pill.stale    { background: #ececf0; color: var(--stale); }
.freshness-pill.conflict { background: #fde2eb; color: var(--conflict); }

.price-category { margin-top: 1.2rem; }
.price-category h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }

.empty {
  border: 1px dashed var(--border);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  border-radius: 6px;
  background: var(--card);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Legal documents (privacy policy, terms of service) */
.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
  line-height: 1.7;
}
.legal-doc h1 { margin-bottom: 0.25rem; }
.legal-meta { color: var(--muted); margin-bottom: 2rem; }
.legal-doc h2 { margin-top: 2rem; }
.legal-doc h3 { margin-top: 1.25rem; }
.legal-doc ul { padding-left: 1.5rem; }
.legal-doc li { margin-bottom: 0.4rem; }

.site-footer {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--muted); margin: 0 0.5rem; }
.site-footer a:hover { color: var(--fg); }

/* Landing page */
.landing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 4rem 2rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.landing-copy { flex: 1; min-width: 0; }

.landing-wordmark {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.landing-tagline {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--fg);
}

.landing-desc {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 380px;
  line-height: 1.6;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--fg);
  color: #fff;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  cursor: default;
  opacity: 0.45;
  user-select: none;
  text-decoration: none;
}

.badge-apple { width: 22px; height: 22px; flex-shrink: 0; }

.badge-line1 { display: block; font-size: 0.65rem; line-height: 1; opacity: 0.85; }
.badge-line2 { display: block; font-size: 1rem; font-weight: 600; line-height: 1.2; }

.badge-soon {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* Screenshot slot */
.landing-screenshot-wrap { flex: 0 0 auto; }

.landing-screenshot-placeholder {
  width: 220px;
  aspect-ratio: 9 / 19.5;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* When a real screenshot is added, swap out the placeholder div for an <img> */
.landing-screenshot-wrap img {
  width: 220px;
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  display: block;
}

.landing-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.landing-footer a { color: var(--muted); }
.landing-footer a:hover { color: var(--fg); text-decoration: none; }

@media (max-width: 600px) {
  .landing { flex-direction: column; gap: 2.5rem; padding: 3rem 1.5rem; }
  .landing-screenshot-wrap { order: -1; }
  .landing-screenshot-placeholder, .landing-screenshot-wrap img { width: 160px; }
  .landing-desc { max-width: none; }
}
