/* News Lens - dark, clean, responsive */
:root{
  --bg:#0b1220;
  --panel:#0f1a2e;
  --panel2:#101f38;
  --text:#e8eefc;
  --muted:#a9b6d6;
  --border:rgba(255,255,255,0.08);
  --accent:#8CBC57;
  --warn:#f6c945;
  --blue:#5aa7ff;
  --orange:#ff9b3d;
  --red:#ff5a6b;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(140,188,87,0.08), transparent 50%),
              radial-gradient(900px 700px at 80% 10%, rgba(90,167,255,0.10), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit}
.wrap{max-width:1200px;margin:0 auto;padding:0 18px}

.topbar{
  position:sticky;top:0;z-index:10;
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.75);
}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;padding:14px 18px}
.brand{display:flex;align-items:center;gap:12px}
.logo-dot{width:14px;height:14px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 4px rgba(140,188,87,0.12)}
.brand-title{font-weight:700;letter-spacing:0.2px}
.brand-sub{font-size:12px;color:var(--muted);margin-top:2px}
.topbar-right{display:flex;gap:10px;align-items:center}

.chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  text-decoration:none;
  background: rgba(255,255,255,0.04);
}
.chip.subtle{background:transparent}

.main{padding:18px 0 36px}
.hero{padding:20px 0 12px}
h1{margin:0 0 10px;font-size:28px;line-height:1.15}
.muted{color:var(--muted)}
.small{font-size:12px}

.searchRow{margin-top:16px;display:grid;grid-template-columns: 1.3fr 1fr;gap:14px;align-items:start}
.searchForm{
  display:flex;gap:10px;
  padding:12px;
  background: rgba(255,255,255,0.03);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.searchForm input{
  flex:1;
  background: transparent;
  border:0;
  outline:none;
  color:var(--text);
  font-size:14px;
}
.btn{
  appearance:none;border:0;cursor:pointer;
  padding:10px 12px;
  border-radius: 12px;
  background: var(--accent);
  color:#07110a;
  font-weight:700;
}
.btn.ghost{
  background: transparent;
  border:1px solid var(--border);
  color:var(--text);
  font-weight:600;
}
.btn:disabled{opacity:0.45;cursor:not-allowed}

.filters{
  display:grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap:12px;
}
.filter{
  padding:12px;
  background: rgba(255,255,255,0.03);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filter label{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
.filter select{
  width:100%;
  background: rgba(0,0,0,0.35);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  padding-right: 38px;
  border-radius: 12px;
  outline:none;

  /* Helps browsers render dropdown UI in dark mode */
  color-scheme: dark;

  /* More consistent native styling */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Subtle inner depth */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,238,252,0.85) 50%),
    linear-gradient(135deg, rgba(232,238,252,0.85) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.filter select:focus{
  border-color: rgba(140,188,87,0.45);
  box-shadow: 0 0 0 3px rgba(140,188,87,0.12), inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* Dropdown list (option styling is browser-dependent, but this improves most) */
.filter select option{
  background: #0f1a2e;
  color: var(--text);
}
.strictRow{display:flex;align-items:center;justify-content:space-between;gap:10px}
.strictRow input[type="checkbox"]{transform:scale(1.1)}
#minConf{width:100%;margin-top:10px}

.statsRow{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
.statCard{
  padding:12px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}
.statLabel{font-size:12px;color:var(--muted)}
.statValue{font-size:20px;font-weight:800;margin-top:6px}

.toolbar{
  margin-top:16px;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.pill{
  display:inline-flex;align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-weight:700;
}
.content{margin-top:10px}

.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:14px;
}
.card{
  padding:14px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
}
.cardHead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.cardTitle{font-size:16px;font-weight:800;line-height:1.2}
.cardMeta{margin-top:6px;display:flex;gap:8px;flex-wrap:wrap}
.badge{
  font-size:12px;
  padding:6px 8px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.badge.green{border-color: rgba(140,188,87,0.35)}
.badge.yellow{border-color: rgba(246,201,69,0.35)}
.badge.blue{border-color: rgba(90,167,255,0.35)}
.badge.orange{border-color: rgba(255,155,61,0.35)}
.badge.red{border-color: rgba(255,90,107,0.35)}

.scoreRow{margin-top:10px;display:grid;grid-template-columns: repeat(3, 1fr);gap:10px}
.score{
  padding:10px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,0.10);
}
.scoreLabel{font-size:12px;color:var(--muted)}
.scoreValue{font-size:18px;font-weight:900;margin-top:4px}

.explain{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.45}
.articles{margin-top:10px;border-top:1px solid var(--border);padding-top:10px}
.article{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed rgba(255,255,255,0.08)}
.article:last-child{border-bottom:0}
.article a{text-decoration:none}
.article a:hover{text-decoration:underline}
.articleSrc{font-size:12px;color:var(--muted)}
.articleTime{font-size:12px;color:var(--muted);white-space:nowrap}

.detailsBtn{
  margin-top:10px;
  width:100%;
  background: transparent;
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:700;
}

.empty{margin-top:14px}
.emptyCard{
  padding:16px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}
.emptyTitle{font-weight:900;font-size:14px}
.emptyText{margin-top:8px;color:var(--muted);line-height:1.55}

.footer{margin-top:24px;border-top:1px solid var(--border);padding-top:16px}

@media (max-width: 980px){
  .searchRow{grid-template-columns: 1fr; }
  .filters{grid-template-columns: 1fr 1fr; }
  .grid{grid-template-columns: 1fr;}
  .statsRow{grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 520px){
  h1{font-size:22px}
  .filters{grid-template-columns: 1fr;}
  .topbar .wrap{padding:12px 16px}
}


.why{margin:6px 0 12px; max-width: 920px;}




/* Confidence colour coding (no blue) */
.score.conf-green-strong{ border-color: rgba(140,188,87,0.55); background: rgba(140,188,87,0.16); }
.score.conf-green-soft{   border-color: rgba(140,188,87,0.35); background: rgba(140,188,87,0.09); }
.score.conf-yellow{       border-color: rgba(246,201,69,0.45);  background: rgba(246,201,69,0.10); }
.score.conf-red{          border-color: rgba(255,90,107,0.45);  background: rgba(255,90,107,0.10); }
.score.conf-orange{       border-color: rgba(255,155,61,0.45);  background: rgba(255,155,61,0.10); }
