/* Beef Hunter — self-hosted static site */
:root {
  --accent: #c62828;          /* standout red: Price Alert tab, hero CTA, names */
  --accent-dark: #a51f1f;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f7f5f2;
  --card: #ffffff;
  --line: #e8e2da;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.lang-toggle button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.lang-toggle button:first-child { border-radius: 8px 0 0 8px; }
.lang-toggle button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.lang-toggle button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a {
  text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.tabs a:hover { background: #f0ece6; }
.tabs a.tab-alert { background: var(--accent); color: #fff; }
.tabs a.tab-alert:hover { background: var(--accent-dark); }

/* ---- hero ---- */
.hero { text-align: center; padding: 56px 16px 36px; }
.hero h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: .5px; }
.hero .subtitle { font-size: 19px; color: var(--muted); margin: 0 0 22px; }
.cta {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 700; text-decoration: none;
  padding: 13px 30px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(198,40,40,.35);
}
.cta:hover { background: var(--accent-dark); }
.updated { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---- cards / sections ---- */
main { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card h2 { margin: 0 0 4px; font-size: 22px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.unit-toggle button {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.unit-toggle button:first-child { border-radius: 7px 0 0 7px; }
.unit-toggle button:last-child { border-radius: 0 7px 7px 0; border-left: 0; }
.unit-toggle button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- ranking rows ---- */
.rank-list { display: flex; flex-direction: column; }
.rank-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: 0; }
.rank-num {
  flex: 0 0 30px; color: var(--muted); font-size: 13px; font-weight: 700;
}
.rank-main { flex: 1; min-width: 0; }
.rank-name {
  font-size: 17px; font-weight: 800; color: var(--accent);
  margin-bottom: 5px; line-height: 1.3;
}
.rank-detail { font-size: 14px; color: var(--muted); }
.rank-price { text-align: right; white-space: nowrap; }
.rank-price .p { font-size: 19px; font-weight: 800; }
.rank-price .u { font-size: 12px; color: var(--muted); display: block; }
.badge-sale {
  display: inline-block; font-size: 11px; font-weight: 800; color: #fff;
  background: #2e7d32; border-radius: 5px; padding: 1px 7px; margin-right: 6px;
  vertical-align: 1px;
}
.valid-until { font-size: 12px; color: var(--muted); }

/* locked (subscribe-gated) rows */
.rank-row.locked { opacity: .85; cursor: pointer; }
.rank-row.locked .rank-name { color: var(--accent); }
.lock-msg { font-size: 14px; color: var(--accent); font-weight: 700; }

.search-wrap { margin-bottom: 8px; }
.search-wrap input {
  width: 100%; padding: 10px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 9px; background: #fbfaf8;
}
.more-stores { text-align: center; margin: 14px 0 0; font-size: 14px; }
.more-stores a { color: var(--accent); font-weight: 700; }

/* ---- trend ---- */
.range-label { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.range-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.range-pills button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.range-pills button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 2px; }
.fineprint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* ---- subscribe ---- */
.subscribe { border-top: 4px solid var(--accent); }
.sub-cta { font-size: 16px; margin: 10px 0 6px; }
.sub-weekly { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.field input {
  width: 100%; padding: 11px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 9px;
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 16px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.cuts { border: 1px dashed var(--line); border-radius: 9px; padding: 12px 14px; margin: 0 0 18px; }
.cuts legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.cuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.cuts-grid label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.cuts-grid input { width: 16px; height: 16px; accent-color: var(--accent); }
.submit {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 13px; font-size: 17px; font-weight: 800; cursor: pointer;
}
.submit:hover { background: var(--accent-dark); }
.form-err { color: var(--accent); font-size: 14px; font-weight: 600; }
.form-ok {
  background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20;
  border-radius: 9px; padding: 12px 16px; font-weight: 700;
}

/* ---- footer ---- */
footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 26px 16px 40px; color: var(--muted); font-size: 13px;
}
.flogo { display: inline-flex; }

/* ---- print: full readable PDF, gate stays locked ---- */
@media print {
  body { background: #fff; color: #000; }
  .topbar, .cta, .unit-toggle, .search-wrap, .range-pills,
  #subForm, .more-stores a { display: none !important; }
  .hero { padding: 12px 0; }
  .hero h1 { font-size: 30px; }
  main { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; border: 1px solid #999; margin-bottom: 14px; }
  .rank-name { color: #000 !important; }
  .rank-row.locked .rank-name { color: #000 !important; }
  .lock-msg { color: #000 !important; }
  .tabs a.tab-alert { background: none !important; color: #000 !important; }
  .badge-sale { background: none !important; color: #000 !important; border: 1px solid #000; }
  .chart svg text { fill: #000 !important; }
  a { color: #000 !important; text-decoration: none !important; }
  footer { color: #000; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
  .cuts-grid { grid-template-columns: 1fr; }
  .rank-price .p { font-size: 17px; }
}
