/* CityJabber Homepage Prototype (product-style)
   - Light = clean, subtle color accents
   - Dark = Facebook-like
*/

:root{
  --bg:#f6f7f8;
  --bg2:#f3f4f6;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;

  --brand:#2e7d32;  /* green accent in light */
  --brand2:#1f6f3a;
  --ink:#0f172a;    /* dark button */
  --ink2:#111827;

  --shadow: 0 10px 30px rgba(17,24,39,.08);
  --shadow2: 0 14px 44px rgba(17,24,39,.10);
  --radius:16px;
  --radius2:18px;
  --focus: 0 0 0 4px rgba(37,99,235,.12);
}

/* Inline icon baseline (matches the prototype's Tabler-style icons) */
.cj-ico{display:inline-block; vertical-align:-.18em}
.cj-ico *{vector-effect:non-scaling-stroke}

/* Theme toggle icon swap */
.cj-theme-ico{display:inline-flex; align-items:center; justify-content:center}
.cj-theme-ico.sun{display:none}
html[data-theme="dark"] .cj-theme-ico.moon{display:none}
html[data-theme="dark"] .cj-theme-ico.sun{display:inline-flex}

/* -------------------------------------------------
   CityJabber "Example" UI blocks (leaderboard + listing)
   Additive styles to match the provided mockups.
-------------------------------------------------- */

.pagehead .h1{font-size:28px; font-weight:800; letter-spacing:-.02em}
.pagehead .eyebrow{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em}

.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--line); background:var(--card);
  color:var(--text); font-size:12px; font-weight:600;
}
.pill.muted{color:var(--muted)}
.pill.dark{background:#0f172a; border-color:#0f172a; color:#fff}

.btn{display:inline-flex; align-items:center; gap:8px; border-radius:12px; padding:10px 14px; border:1px solid var(--line); background:var(--card); color:var(--text); font-weight:700; text-decoration:none}
.btn:hover{filter:brightness(.99)}
.btn.primary{background:#0f172a; border-color:#0f172a; color:#fff}
.btn.icon{padding:10px 12px}
.btn.sm{padding:8px 12px; border-radius:10px; font-weight:700}

.grid-2{display:grid; grid-template-columns:1fr 360px; gap:18px}
@media (max-width: 980px){ .grid-2{grid-template-columns:1fr} }

.card{background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:0 1px 2px rgba(16,24,40,.06)}
.card.pad{padding:18px}
.card .card-title{display:flex; align-items:center; gap:10px; font-size:20px; font-weight:800; letter-spacing:-.01em}
.card .card-sub{margin-top:2px; color:var(--muted); font-size:13px}

.kpi-row{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:14px}
@media (max-width: 980px){ .kpi-row{grid-template-columns:repeat(2,1fr)} }
.kpi{border:1px solid var(--line); background:var(--bg2); border-radius:14px; padding:14px}
.kpi .k-label{color:var(--muted); font-size:12px; margin-bottom:6px}
.kpi .k-value{font-size:20px; font-weight:900}
.kpi .k-value.sm{font-size:16px; font-weight:800}

.chart-box{margin-top:14px; border:1px solid var(--line); border-radius:14px; background:#fff; overflow:hidden}
[data-theme="dark"] .chart-box{background:#0b1220}
.chart-box svg{display:block; width:100%; height:auto}

/* Chart colors like the prototype (blue line + soft fill + muted labels) */
.cj-chart-stroke{stroke:#2563eb; stroke-width:3; opacity:.9}
.cj-chart-fill{fill:#2563eb; opacity:.18}
.cj-chart-label{font-size:12px; fill:var(--muted)}
.cj-chart-axis{stroke:var(--line); stroke-width:1}

.list{margin-top:14px; display:flex; flex-direction:column; gap:12px}
.row{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--card); text-decoration:none; color:inherit}
.row:hover{filter:brightness(.99)}
.row .left{min-width:0}
.row .title{font-weight:800}
.row .meta{color:var(--muted); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

.rank{width:34px; height:34px; border-radius:999px; background:var(--bg2); border:1px solid var(--line); display:grid; place-items:center; font-weight:900; flex:0 0 auto}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin-left:10px}
.chip{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:var(--card); font-size:12px; font-weight:700}
.chip.soft{background:var(--bg2)}

.delta-pill{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:900; border:1px solid var(--line); background:var(--bg2)}
.delta-pill.up{color:#0f766e}
.delta-pill.down{color:#b42318}

.vote-small{min-width:72px; justify-content:center}
.filters{display:flex; align-items:center; gap:12px; margin-top:14px}
.select{display:inline-flex; align-items:center; gap:10px; border:1px solid var(--line); background:var(--card); border-radius:12px; padding:10px 12px; font-weight:700}
.select select{border:0; background:transparent; font-weight:700; color:inherit; outline:none}

.two-cards{display:grid; grid-template-columns:1fr 1fr; gap:18px}
@media (max-width: 980px){ .two-cards{grid-template-columns:1fr} }

.muted{color:var(--muted)}
.split-actions{display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap}

.btn-wide{width:100%; justify-content:center}


html[data-theme="dark"]{
  --bg:#18191a;
  --bg2:#111827;
  --card:#242526;
  --text:#e4e6eb;
  --muted:#b0b3b8;
  --line:#3a3b3c;

  --brand:#1b74e4;     /* FB blue primary */
  --brand2:#166fe5;
  --ink:#1b74e4;
  --ink2:#166fe5;

  --shadow: 0 12px 40px rgba(0,0,0,.55);
  --shadow2: 0 18px 60px rgba(0,0,0,.65);
  --focus: 0 0 0 4px rgba(27,116,228,.22);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
html[data-theme="dark"] body{
  background: linear-gradient(180deg, #18191a, #0f1012);
}
a{color:inherit; text-decoration:none}
.wrap{max-width:1200px; margin:0 auto; padding:0 26px}
@media (max-width: 980px){ .wrap{padding:0 18px} }

/* Header */
.topbar{
  position:sticky; top:0; z-index:40;
  background: rgba(255,255,255,.92);
  border-bottom:1px solid var(--line);
}
html[data-theme="dark"] .topbar{background: rgba(36,37,38,.92)}
.topbar-inner{
  display:flex; align-items:center; gap:14px;
  padding:16px 0;
}
.brand{display:flex; align-items:center; gap:10px; min-width:220px}
.logo{
  width:34px; height:34px; border-radius:12px;
  display:grid; place-items:center;
  background: var(--ink);
  color:#fff; font-weight:600;
}
.brand-title{font-weight:600; line-height:1}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.nav{display:flex; align-items:center; gap:10px; width:100%}
.nav .spacer{flex:1}
.hide-sm{display:inline-flex}
@media (max-width: 940px){ .hide-sm{display:none} }

/* Buttons */
.btn{
  border:1px solid var(--line);
  background: var(--card);
  color:var(--text);
  padding:10px 14px;
  border-radius: 12px;
  font-weight:600;
  font-size:14px;
  display:inline-flex; align-items:center; gap:8px;
  cursor:pointer;
}
.btn:hover{filter: brightness(0.98)}
html[data-theme="dark"] .btn:hover{filter: brightness(1.05)}
.btn.primary{
  border-color: transparent;
  background: var(--ink);
  color:#fff;
}
.btn.ghost{background: transparent}
.btn.tab{
  padding:9px 12px;
  border-radius: 10px;
  background: transparent;
}
.btn.tab:hover{background: rgba(15,23,42,.04)}
html[data-theme="dark"] .btn.tab:hover{background: rgba(255,255,255,.06)}
.btn.icon{width:40px; height:40px; padding:0; justify-content:center; border-radius:999px}
.btn.wide{padding:10px 16px}
.btn.mini{padding:8px 12px; border-radius: 12px; font-size:13px; font-weight:700}
.arrow{opacity:.9}
.chev{opacity:.8}

/* Cards */
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.block{padding:18px}
.card-h{margin-bottom:12px}
.card-title{font-size:18px; font-weight:600; letter-spacing:-.01em}
.card-sub{font-size:13px; color:var(--muted); margin-top:4px}

/* Page */
.page{padding:34px 0 70px}

/* Hero */
.hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:28px;
  align-items:start;
}
@media (max-width: 980px){ .hero{grid-template-columns:1fr} }
.h1{font-size:56px; letter-spacing:-.02em; line-height:1.05; margin:0 0 14px; font-weight:600;}
@media (max-width: 980px){ .h1{font-size:56px; letter-spacing:-.02em; line-height:1.05; margin:0 0 14px; font-weight:600;} }
.lead{font-size:16px; line-height:1.6; color:var(--muted); margin:0 0 18px; max-width:620px}

.search-card{
  padding:16px;
  border-radius: var(--radius2);
  border:1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.search-row{
  display:grid;
  grid-template-columns: 1fr 240px;
  gap:12px;
}
@media (max-width: 560px){ .search-row{grid-template-columns:1fr} }
.field{
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  border-radius: 12px;
  padding:10px 12px;
  background: rgba(15,23,42,.02);
}
html[data-theme="dark"] .field{background: rgba(255,255,255,.03)}
.field .icon{opacity:.7}
.input{
  width:100%;
  border:0;
  outline:none;
  background: transparent;
  color: var(--text);
  font-size:14px;
}
.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.tags{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin-top:10px}
.tags.tight{justify-content:flex-start}
.pill{
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(15,23,42,.03);
}
html[data-theme="dark"] .pill{background: rgba(255,255,255,.06)}

.bullets{display:grid; gap:10px; margin-top:14px; max-width:520px}
.bullet{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: var(--card);
}
.bullet .muted{color:var(--muted); font-weight:700}
.b-ico{width:18px; text-align:center}

/* Trending list */
.trend-list{display:grid; gap:10px}
.trend-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(15,23,42,.02);
}
html[data-theme="dark"] .trend-row{background: rgba(255,255,255,.03)}
.trend-name{font-weight:700}
.trend-cat{font-size:12px; color:var(--muted); margin-top:2px}
.trend-actions{display:flex; align-items:center; gap:10px}
.delta{
  font-size:12px; font-weight:600;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
}
.delta.up{background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.25)}
.delta.down{background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25)}

/* Countdown */
.count-row{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px}
.count-big{font-size:14px}
.progress{
  height:10px;
  border-radius:999px;
  background: rgba(15,23,42,.06);
  border:1px solid var(--line);
  overflow:hidden;
  margin-top:12px;
}
html[data-theme="dark"] .progress{background: rgba(255,255,255,.06)}
.progress .bar{
  height:100%;
  background: linear-gradient(90deg, var(--brand2), var(--brand));
}

/* Features */
.features{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
  margin-top:26px;
}
@media (max-width: 980px){ .features{grid-template-columns:1fr} }
.feature{padding:18px}
.ftitle{font-weight:600; font-size:18px}
.fsub{color:var(--muted); font-weight:600; font-size:13px; margin-top:4px}
.ftext{color:var(--muted); margin:12px 0 0; line-height:1.6}

/* Two column */
.two{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
  margin-top:18px;
}
@media (max-width: 980px){ .two{grid-template-columns:1fr} }

.city-list{display:grid; gap:10px}
.city-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 14px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(15,23,42,.02);
}
html[data-theme="dark"] .city-row{background: rgba(255,255,255,.03)}
.city-name{font-weight:700}
.city-sub{font-size:12px; color:var(--muted); margin-top:2px}

/* Steps */
.steps{display:grid; gap:12px; margin-top:12px}
.step{display:flex; gap:12px; align-items:flex-start}
.num{
  width:30px; height:30px;
  border-radius:999px;
  display:grid; place-items:center;
  border:1px solid var(--line);
  background: rgba(15,23,42,.03);
  font-weight:600;
}
html[data-theme="dark"] .num{background: rgba(255,255,255,.06)}
.s-title{font-weight:700}
.s-sub{color:var(--muted); margin-top:2px; font-size:13px; line-height:1.5}

/* Footer */
.footer{
  padding:30px 0;
  color:var(--muted);
  font-size:12px;
  border-top:1px solid var(--line);
  background: var(--card);
  margin-top:30px;
}
.footer-inner{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap}

/* ---------- Shared page components (City + Category + Business) ---------- */
.pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin: 4px 0 16px;
}
@media (max-width: 980px){ .pagehead{flex-direction:column} }

.breadcrumb{
  display:flex; gap:8px; flex-wrap:wrap;
  color: var(--muted);
  font-size:12px;
  font-weight:600;
}
.breadcrumb a{color:inherit}
.breadcrumb .sep{opacity:.6}

.h2{
  font-size:28px;
  letter-spacing:-.02em;
  margin: 8px 0 6px;
  font-weight:700;
}
.subline{color:var(--muted); font-size:14px; line-height:1.5}

.tools{display:flex; gap:10px; flex-wrap:wrap}

.section-title{
  font-weight:700;
  letter-spacing:-.01em;
  font-size:16px;
  margin:0 0 10px;
}
.mini-note{color:var(--muted); font-size:12px; margin-top:6px}

.cols{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  margin-top:16px;
}
@media (max-width: 980px){ .cols{grid-template-columns:1fr} }

.list-block{display:grid; gap:10px}
.list-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 14px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(15,23,42,.02);
}
html[data-theme="dark"] .list-row{background: rgba(255,255,255,.03)}
.list-row .left{min-width:0}
.list-row .name{font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.list-row .meta{font-size:12px; color:var(--muted); margin-top:2px}
.list-row .right{display:flex; gap:10px; align-items:center}

.chip{
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(15,23,42,.03);
}
html[data-theme="dark"] .chip{background: rgba(255,255,255,.06)}

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
@media (max-width: 980px){ .kpi-grid{grid-template-columns:1fr} }
.kpi-card{padding:14px}
.kpi-label{color:var(--muted); font-size:12px; font-weight:600}
.kpi-value{font-size:20px; font-weight:700; margin-top:6px}

.badge-winner{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(46,125,50,.10);
  color: color-mix(in srgb, var(--brand2) 70%, var(--text));
  font-weight:700;
}
html[data-theme="dark"] .badge-winner{
  background: rgba(27,116,228,.14);
  color: var(--text);
}

.vote-btn{
  border:0;
  padding:10px 14px;
  border-radius: 12px;
  font-weight:700;
  cursor:pointer;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  color:#fff;
}
.vote-btn:disabled{
  opacity:.6; cursor:not-allowed;
}

.split3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
  margin-top:12px;
}
@media (max-width: 980px){ .split3{grid-template-columns:1fr} }

/* =============================
   Prototype fidelity overrides
   (keep at end so it wins)
   ============================= */

/* Pagehead titles like the prototype */
.pagehead .h1{font-size:32px; line-height:1.15; font-weight:800; letter-spacing:-.02em}

/* Keep the home hero big without affecting inner pages */
.hero .h1{font-size:56px; line-height:1.05; font-weight:800; letter-spacing:-.02em}

/* Card typography */
.card{border-radius:16px; box-shadow:0 1px 2px rgba(16,24,40,.06)}
.card.pad{padding:18px}
.card .card-title{font-size:22px; font-weight:800; letter-spacing:-.01em}
.card .card-sub{margin-top:2px; font-size:13px; color:var(--muted)}

/* Chips */
.chip{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:var(--card); font-size:12px; font-weight:700}
.chip.soft{background:var(--bg2)}

/* Buttons (pill + icon alignment) */
.btn{border-radius:999px}
.btn svg{display:block}
.split-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end}

/* Share button should be pill, not icon-only */
.btn.icon{width:auto; height:auto; padding:10px 14px; justify-content:flex-start}

/* Chart container fidelity */
.chart-box{margin-top:14px; border:1px solid var(--line); border-radius:14px; padding:10px 12px}
.cj-chart-axis{stroke:rgba(15,23,42,.35); stroke-width:1}
html[data-theme="dark"] .cj-chart-axis{stroke:rgba(255,255,255,.25)}

