:root{
  --bg:#0F1117;
  --panel:#1A1D26;
  --panel2:#151821;
  --text:#F1F1F1;
  --muted:rgba(255,255,255,.75);
  --muted2:rgba(255,255,255,.55);

  /* Paleta */
  --p1:#1E293B;   /* azul escuro */
  --p2:#2563EB;   /* azul principal */
  --p3:#7C3AED;   /* roxo detalhe */

  --border: rgba(255,255,255,.10);
  --shadow: 0 12px 30px rgba(0,0,0,.28);
  --radius: 16px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  font-family: Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(37,99,235,.14), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(124,58,237,.10), transparent 60%),
    var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
a:hover{color:var(--p3)}

.container{width:92%;max-width:1200px;margin:0 auto}

/* ===== Topbar ===== */
.topbar{
  position:sticky; top:0; z-index:50;
  background: linear-gradient(90deg, rgba(30,41,59,.92), rgba(37,99,235,.30));
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
}

.topbar-inner{
  display:flex; gap:14px; align-items:center; justify-content:space-between;
  padding:14px 0;
}

.brand{
  display:flex; align-items:center; gap:10px; min-width: 210px;
}
.logo{
  width:40px;height:40px;border-radius:12px;
  background: linear-gradient(135deg, var(--p2), var(--p3));
  display:grid;place-items:center;
  font-weight:800;
  box-shadow: var(--shadow);
}
.brand h1{font-size:16px;margin:0}
.brand p{font-size:12px;margin:2px 0 0; opacity:.9}

/* ===== Nav ===== */
.nav{
  display:flex; gap:10px; flex-wrap:wrap; justify-content:center;
}
.nav a{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.08);
  font-size:13px;
  font-weight:700;
}
.nav a.active{background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.22)}

/* ===== Search ===== */
.search{
  display:flex; gap:8px; align-items:center;
  min-width: 280px;
}
.search input{
  width:100%;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(15,17,23,.55);
  color:var(--text);
  outline:none;
}
.search input::placeholder{color:rgba(255,255,255,.68)}

.btn{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.14);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.btn.primary{
  background: linear-gradient(135deg, var(--p2), var(--p3));
  border-color:rgba(255,255,255,.18);
}

/* ===== Hero ===== */
.hero{padding:26px 0 14px}
.hero-inner{
  background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.08));
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.hero h2{margin:0;font-size:22px}
.hero p{margin:8px 0 0; color: var(--muted); line-height:1.6; max-width: 72ch}

.chips{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}
.chip{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.10);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.chip.active{background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22)}

/* ===== Grid ===== */
.grid{
  display:grid;
  grid-template-columns: 1.55fr .85fr;
  gap:18px;
  padding: 14px 0 28px;
}
@media (max-width: 980px){
  .grid{grid-template-columns: 1fr}
  .search{min-width: unset; width: 100%}
  .brand{min-width: unset}
  .topbar-inner{flex-wrap:wrap}
}

/* ===== Panels ===== */
.panel{
  background: rgba(26,29,38,.92);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-header{
  padding:14px 14px 0;
  display:flex; align-items:flex-end; justify-content:space-between; gap:10px; flex-wrap:wrap;
}
.panel-header h3{margin:0;font-size:16px}
.panel-header .small{margin:0;color:var(--muted2); font-size:12px}

/* ===== Cards ===== */
.cards{
  padding:14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 680px){
  .cards{grid-template-columns: 1fr}
}

.card{
  background: linear-gradient(180deg, rgba(21,24,33,.92), rgba(26,29,38,.92));
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  overflow:hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover{transform: translateY(-2px); border-color: rgba(37,99,235,.30)}

.thumb{
  height:150px;
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(124,58,237,.10));
  display:flex; align-items:flex-end; justify-content:space-between;
  padding:10px;
}

.badge{
  font-size:12px; font-weight:800;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
}
.score{
  font-size:12px; font-weight:900;
  padding:6px 10px; border-radius:999px;
  background: linear-gradient(135deg, var(--p2), var(--p3));
  border:1px solid rgba(255,255,255,.16);
}

.card-body{padding:12px}
.card-body h4{margin:0 0 6px; color: var(--text)}
.meta{font-size:12px; color: var(--muted2); margin:0 0 8px}
.excerpt{margin:0; color: var(--muted); line-height:1.55; font-size:13px}
.card-actions{padding:0 12px 12px}
.card-actions a{display:inline-block}

/* ===== Featured (atual do app.js: featured-inner + featured-media + featured-body) ===== */
.featured{
  margin:14px;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.06));
}
.featured-inner{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:0;
}
@media (max-width: 820px){
  .featured-inner{grid-template-columns: 1fr}
}
.featured-media{
  min-height: 220px;
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(124,58,237,.10));
  padding:14px;
  display:flex; align-items:flex-end; justify-content:space-between;
}
.featured-body{padding:14px}
.featured-body h3{margin:0 0 8px}
.featured-body p{margin:0 0 12px; color: var(--muted); line-height:1.6}

/* ===== Sidebar ===== */
.sidebar{padding:14px}
.side-block{margin-bottom:14px}
.side-block h4{margin:0 0 10px}
.list{display:flex; flex-direction:column; gap:10px}
.item{
  padding:10px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}
.item .t{font-weight:800; margin:0 0 4px}
.item .m{margin:0; color: var(--muted2); font-size:12px}

/* ===== Footer ===== */
.footer{
  border-top: 1px solid rgba(255,255,255,.10);
  padding:18px 0;
  color: var(--muted2);
  font-size:12px;
}

/* ===== Post page ===== */
.article{padding:14px}
.article h1{margin:6px 0 8px; color: var(--text)}
.article .meta{margin-bottom:12px}
.article .body{
  line-height:1.8;
  color: rgba(255,255,255,.88);
}
.article .body img{max-width:100%; height:auto; border-radius: 14px}
.backlink{display:inline-block; margin:14px 14px 0}

/* KPI chips (usado em tags/nota) */
.kpis{display:flex; gap:10px; flex-wrap:wrap}
.kpi{
  padding:8px 10px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  font-size:12px;
  color: var(--muted);
}