/* SonarDeals — design system (MASTERPLAN §4a). Light-first, data-forward.
   One job per color; green == money, never decorative. */
:root {
  --ink: #0F172A; --body: #475569; --muted: #94A3B8;
  --surface: #FFFFFF; --bg: #F8FAFC; --border: #E2E8F0;
  --brand: #2563EB; --brand-ink: #1D4ED8;
  --deal: #059669; --deal-bg: #ECFDF5; --deal-border:#A7F3D0;
  --amber: #D97706; --amber-bg:#FFFBEB; --red: #DC2626;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.06);
  --radius: 14px; --radius-sm: 9px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
h1,h2,h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; margin: 0; }
a { color: var(--brand); text-decoration: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border);
}
.hrow { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--deal); box-shadow: 0 0 0 4px var(--deal-bg); }
nav.main { display: flex; gap: 20px; margin-left: 8px; }
nav.main a { color: var(--body); font-weight: 500; font-size: 14px; }
nav.main a:hover { color: var(--ink); }
.spacer { flex: 1; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--sans); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-ink); }
.lang { color: var(--muted); font-size: 13px; display: flex; gap: 6px; }
.lang b { color: var(--ink); }

/* mobile header: collapse secondary nav, keep brand + primary CTA (no overflow) */
@media (max-width: 760px){
  nav.main, .lang, .hrow .btn:not(.primary) { display: none; }
  .hrow { gap: 10px; padding: 11px 16px; }
  .brand { font-size: 18px; }
  .hero { padding: 24px 16px 6px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15.5px; }
  .crow { padding: 10px 14px; gap: 7px 10px; }
  .doc { padding: 26px 16px 60px; }
  .doc h1 { font-size: 27px; }
}

/* ---------- hero ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 34px 20px 8px; display: flex; gap: 44px; align-items: center; }
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-showcase { flex: 0 0 372px; }
@media (max-width: 900px){ .hero { flex-direction: column; align-items: stretch; gap: 22px; } .hero-showcase { flex-basis: auto; } }
.hero h1 { font-size: 34px; line-height: 1.08; max-width: 18ch; }
.hero p { color: var(--body); font-size: 17px; margin: 12px 0 0; max-width: 60ch; }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--body);
  background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); }
.live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--deal); position: relative; }
.live .pulse::after { content:""; position:absolute; inset:-4px; border-radius:50%; background:var(--deal); opacity:.35; animation: pulse 2s infinite; }
@keyframes pulse { 0%{transform:scale(1);opacity:.35} 70%{transform:scale(2.4);opacity:0} 100%{opacity:0} }
.live b { color: var(--ink); font-weight: 700; }
.pledge { color: var(--muted); font-size: 12.5px; margin-top: 10px; }

/* hero showcase — "today's top find" */
.showcase { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 30px rgba(15,23,42,.08); overflow: hidden; }
.showcase .sc-h { display:flex; align-items:center; gap:8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing:.05em; color: var(--deal); }
.showcase .sc-body { padding: 16px; display:flex; flex-direction:column; gap: 12px; }
.showcase .sc-top { display:flex; align-items:center; gap: 14px; }
.showcase .sc-score { width: 58px; height: 58px; border-radius: 14px; background: var(--deal); color:#fff; font-family: var(--display); font-weight:700; font-size: 26px; display:flex; align-items:center; justify-content:center; box-shadow: 0 4px 14px rgba(5,150,105,.35); flex:none; }
.showcase .sc-tt { min-width:0; }
.showcase .sc-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height:1.15; }
.showcase .sc-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.showcase .sc-nums { display:flex; align-items:baseline; gap: 10px; }
.showcase .sc-price { font-family: var(--display); font-weight: 700; font-size: 24px; }
.showcase .sc-mkt { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.showcase .sc-save { margin-left:auto; background: var(--deal-bg); border:1px solid var(--deal-border); color:#047857; font-weight:700; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; }
.showcase .sc-foot { display:flex; gap: 8px; align-items:center; color: var(--body); font-size: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.showcase .sc-cta { background: var(--brand); color:#fff; text-align:center; padding: 11px; font-weight:700; font-size: 13.5px; cursor:pointer; }
.showcase .sc-cta:hover { background: var(--brand-ink); }

/* ---------- controls / filter bar ---------- */
.controls { position: sticky; top: 57px; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 1px 0 rgba(15,23,42,.02); }
.crow { max-width: 1200px; margin: 0 auto; padding: 11px 20px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.fgroup { display: flex; align-items: center; gap: 6px; }
.fgroup > label { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.chip { white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--body);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.sm { padding: 5px 10px; font-size: 12.5px; }
.chip.toggle.on { background: var(--amber); border-color: var(--amber); }
.crow .sep { width:1px; height: 22px; background: var(--border); flex: none; }
select.f, input.f { border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-family: var(--sans);
  padding: 6px 9px; border-radius: 8px; font-size: 13px; font-weight: 500; }
select.f:focus, input.f:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
input.f.num { width: 78px; text-align: right; font-variant-numeric: tabular-nums; }
input.f.yr { width: 62px; text-align: center; }
.crow .count { margin-left: auto; font-size: 13px; color: var(--body); font-weight: 600; white-space: nowrap; }
.crow .count b { color: var(--ink); }
.reset { border: none; background: none; color: var(--brand); font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ---------- feed ---------- */
.feed { max-width: 1200px; margin: 0 auto; padding: 20px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); }
@media (max-width: 620px){ .feed { grid-template-columns: 1fr; padding: 14px; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); display: grid; grid-template-columns: 168px 1fr; overflow: hidden; transition: box-shadow .15s, transform .15s; cursor: pointer; }
.card:hover { box-shadow: 0 6px 20px rgba(15,23,42,.10); transform: translateY(-1px); }
@media (max-width: 620px){ .card { grid-template-columns: 1fr; } }

.thumb { position: relative; background: linear-gradient(135deg,#EEF2F7,#E2E8F0); min-height: 150px; display:flex; align-items:center; justify-content:center; }
.thumb .ph { display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px; }
.thumb .ph-ico { font-size: 34px; opacity: .55; filter: grayscale(.3); }
.thumb .ph-make { color: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing:.02em; text-transform: uppercase; }
.scorechip { position: absolute; top: 10px; left: 10px; background: var(--deal); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 19px; width: 46px; height: 46px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center; box-shadow: 0 2px 8px rgba(5,150,105,.4); }
.scorechip.mid { background: #0EA5A4; box-shadow:0 2px 8px rgba(14,165,164,.4); }
.flagpill { position:absolute; bottom: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(15,23,42,.72); color:#fff; }

.body { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.titlerow { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.title { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.2; }
.flag { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.specs { color: var(--body); font-size: 13.5px; }
.specs b { color: var(--ink); font-weight: 600; }

.dealline { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.band { display: inline-flex; align-items: center; gap: 7px; background: var(--deal-bg); border: 1px solid var(--deal-border);
  color: #047857; font-weight: 700; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; }
.band .pct { font-family: var(--display); font-size: 14px; }
.price { margin-left: auto; text-align: right; }
.price .now { font-family: var(--display); font-weight: 700; font-size: 20px; }
.price .mkt { color: var(--muted); font-size: 12px; text-decoration: line-through; }

.xborder { display:flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--body); margin-top: 2px; }
.xborder .pw { font-weight: 600; }
.pw.easy { color: var(--deal); } .pw.moderate { color: var(--amber); } .pw.complex { color: var(--red); }
/* intelligence badges (from lifecycle moat) */
.intel { display:flex; flex-wrap:wrap; gap:6px 8px; margin-top:3px; }
.warn { display:inline-flex; align-items:center; gap:5px; background:#FEF2F2; border:1px solid #FECACA; color:var(--red);
  font-size:11.5px; font-weight:700; padding:3px 9px; border-radius:7px; }
.drop { display:inline-flex; align-items:center; gap:4px; background:var(--deal-bg); border:1px solid var(--deal-border);
  color:#047857; font-size:11.5px; font-weight:700; padding:3px 9px; border-radius:7px; }
.nego { display:inline-flex; align-items:center; gap:4px; background:#EFF6FF; border:1px solid #BFDBFE; color:var(--brand-ink);
  font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:7px; }
.age { color:var(--muted); font-size:11.5px; }
.price .now .strike { color: var(--muted); text-decoration: line-through; font-size: 13px; font-weight: 500; margin-right: 6px; }

.meta { display:flex; align-items:center; gap: 8px; margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.meta .src { font-weight: 600; color: var(--body); }
.unlock { margin-left: auto; }
.unlock button { border: 1px solid var(--brand); color: var(--brand); background: #fff; font-weight: 700; font-size: 12.5px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; display:inline-flex; gap:6px; align-items:center; font-family: var(--sans); }
.unlock button:hover { background: var(--brand); color:#fff; }
.conf { font-size: 11px; color: var(--muted); }
.dot-sep::before { content: "·"; margin: 0 2px; color: var(--muted); }

/* damaged card accent */
.card.damaged .scorechip { background: var(--amber); box-shadow:0 2px 8px rgba(217,119,6,.4); }
.card.damaged .band { background: var(--amber-bg); border-color:#FDE68A; color:#B45309; }

footer.site { border-top: 1px solid var(--border); margin-top: 30px; background: var(--surface); }
.frow { max-width:1200px; margin:0 auto; padding: 22px 20px; color: var(--muted); font-size: 13px; display:flex; gap: 18px; flex-wrap: wrap; }
.frow .pledge2 { color: var(--body); font-weight: 600; }

.empty { text-align:center; color: var(--muted); padding: 50px 20px; }

/* documentation / methodology page */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 22px 70px; }
.doc h1 { font-size: 34px; letter-spacing: -.02em; }
.doc .lead { font-size: 18px; color: var(--body); margin: 14px 0 8px; line-height: 1.55; }
.doc section { padding: 22px 0; border-bottom: 1px solid var(--border); }
.doc h2 { font-size: 20px; margin-bottom: 8px; }
.doc p { color: var(--body); font-size: 15.5px; line-height: 1.62; margin: 10px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul.bands { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.doc ul.bands li { color: var(--body); font-size: 14.5px; }
.b { display: inline-block; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: 7px; margin-right: 8px; min-width: 132px; }
.b-exc { background: var(--deal-bg); color: #047857; border: 1px solid var(--deal-border); }
.b-grt { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.b-good { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.b-fair { background: #F8FAFC; color: var(--body); border: 1px solid var(--border); }
.pledge-box { background: var(--deal-bg); border: 1px solid var(--deal-border); border-radius: var(--radius); padding: 22px; margin-top: 24px; }
.pledge-box h2 { color: #047857; }
.pledge-box .fresh { color: #047857; font-size: 13.5px; }
.btn.big { display: inline-block; margin-top: 28px; padding: 13px 22px; font-size: 15px; text-decoration: none; }

/* pricing page */
.pricing .p-hero { text-align: center; padding: 10px 0 20px; }
.p-badge { display:inline-block; background: var(--deal-bg); border:1px solid var(--deal-border); color:#047857;
  font-weight:700; font-size:12.5px; padding:5px 14px; border-radius:999px; letter-spacing:.02em; }
.pricing .p-hero h1 { font-size: 32px; margin-top: 14px; }
.pricing .p-hero .lead { max-width: 62ch; margin: 12px auto 0; }
.tiers { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0; }
@media (max-width: 820px){ .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display:flex; flex-direction: column; }
.tier.live { border-color: var(--deal); box-shadow: 0 8px 30px rgba(5,150,105,.12); }
.tier.soon { opacity: .92; }
.tier-tag { font-size: 11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color: var(--muted); }
.tier.live .tier-tag { color: var(--deal); }
.tier h2 { font-size: 24px; margin: 8px 0 4px; }
.tier-price { font-family: var(--display); font-weight:700; font-size: 30px; color: var(--ink); }
.tier-price span { display:block; font-family: var(--sans); font-weight:500; font-size: 12px; color: var(--muted); margin-top:2px; }
.tier ul { list-style:none; padding:0; margin: 16px 0; display:flex; flex-direction:column; gap: 9px; flex: 1; }
.tier li { font-size: 14px; color: var(--body); }
.tier.live li { color: var(--ink); }
.tier .btn { width: 100%; padding: 11px; text-align:center; text-decoration:none; }
.tier .btn[disabled] { opacity:.5; cursor:not-allowed; }
.tier-note { font-size: 12px; color: var(--muted); margin-top: 12px; line-height:1.45; }
.p-how { background: var(--bg); border:1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-top: 8px; }
.p-how h2 { font-size: 19px; margin-bottom: 8px; }

/* deal-detail overlay (the decision page) */
.detail-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); display:none; z-index: 70; padding: 0; }
.detail-bg.on { display: block; }
.detail-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 100%); background: var(--surface);
  box-shadow: -10px 0 40px rgba(15,23,42,.25); overflow-y: auto; padding: 0; animation: slidein .18s ease; }
@keyframes slidein { from { transform: translateX(24px); opacity: .4 } to { transform: none; opacity: 1 } }
.dh { padding: 20px 22px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
.dh .x { float: right; cursor: pointer; color: var(--muted); font-size: 24px; line-height: 1; border:none; background:none; }
.dh h2 { font-size: 22px; }
.dh .sub { color: var(--body); font-size: 13.5px; margin-top: 4px; }
.dh .hprice { display:flex; align-items:baseline; gap: 12px; margin-top: 12px; }
.dh .hprice .now { font-family: var(--display); font-weight: 700; font-size: 28px; }
.dh .hprice .mkt { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.dh .hprice .badge { margin-left:auto; }
.dsec { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.dsec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 12px; font-family: var(--sans); font-weight: 700; }
.specgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.specgrid .k { color: var(--muted); font-size: 12.5px; }
.specgrid .v { color: var(--ink); font-weight: 600; font-size: 14px; }
.chart { width: 100%; }
.chart .cap { display:flex; justify-content:space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }
.why { display:flex; flex-direction: column; gap: 9px; }
.why .row { display:flex; justify-content: space-between; font-size: 13.5px; }
.why .row .k { color: var(--body); } .why .row .v { font-weight: 600; }
.bar { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.bar > i { display:block; height:100%; background: var(--deal); border-radius: 4px; }
.landgrid { display:flex; flex-direction: column; gap: 10px; }
.landrow { display:flex; align-items:center; gap: 10px; padding: 10px 12px; background: var(--bg); border:1px solid var(--border); border-radius: 10px; }
.landrow .cc { font-size: 20px; }
.landrow .lc { flex:1; }
.landrow .lc .tot { font-family: var(--display); font-weight: 700; font-size: 15px; }
.landrow .lc .br { color: var(--muted); font-size: 11.5px; }
.dcta { padding: 18px 22px 30px; }
.dcta .btn { width: 100%; padding: 12px; font-size: 15px; }
.disc { color: var(--muted); font-size: 11.5px; margin-top: 10px; text-align:center; }

/* unlock modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); display:none; align-items:center; justify-content:center; z-index: 80; padding: 20px; }
.modal-bg.on { display:flex; }
.modal { background:#fff; border-radius: var(--radius); max-width: 440px; width: 100%; padding: 26px; box-shadow: 0 20px 60px rgba(15,23,42,.3); }
.modal h3 { font-size: 20px; }
.modal p { color: var(--body); margin: 10px 0 0; font-size: 14px; }
.modal .count { font-family: var(--display); font-weight:700; color: var(--brand); }
.modal .actions { margin-top: 18px; display:flex; gap: 10px; }
.modal .x { float:right; cursor:pointer; color:var(--muted); font-size: 20px; line-height:1; }
