:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --text: #16201a;
  --muted: #5c6b62;
  --border: #e1e7e2;
  --brand: #0f7b4a;
  --brand-dark: #0a5a36;
  --accent: #f2b705;
  --shadow: 0 1px 2px rgba(16, 32, 24, .06), 0 4px 16px rgba(16, 32, 24, .06);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1512;
    --surface: #17201b;
    --text: #e6ede8;
    --muted: #93a39a;
    --border: #26322b;
    --brand: #22a565;
    --brand-dark: #0d6b40;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1512;
  --surface: #17201b;
  --text: #e6ede8;
  --muted: #93a39a;
  --border: #26322b;
  --brand: #22a565;
  --brand-dark: #0d6b40;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- topo ---------- */
.topbar { background: var(--brand-dark); color: #d7efe2; font-size: .8rem; }
.topbar__inner { display: flex; justify-content: space-between; padding: 6px 16px; }

.header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header__inner { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand); color: #fff; font-family: "Merriweather", serif; font-weight: 900;
  box-shadow: inset 0 -4px 0 var(--accent);
}
.logo__text { font-family: "Merriweather", serif; font-size: 1.3rem; font-weight: 700; }
.logo__text strong { color: var(--brand); }

.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; outline: none;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); display: grid; place-items: center; flex-shrink: 0;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2; }

.nav { border-top: 1px solid var(--border); }
.nav__inner { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.nav__inner::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 500; white-space: nowrap;
  transition: .15s;
}
.chip:hover { color: var(--brand); border-color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- ticker ---------- */
.ticker { background: var(--surface); border-bottom: 1px solid var(--border); }
.ticker__inner { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.ticker__label {
  background: #c0262d; color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 10px; border-radius: 4px; flex-shrink: 0;
}
.ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__move { display: inline-flex; gap: 18px; white-space: nowrap; font-size: .88rem; animation: rolar 60s linear infinite; }
.ticker__move:hover { animation-play-state: paused; }
.ticker__move a:hover { color: var(--brand); text-decoration: underline; }
.ticker .dot { color: var(--accent); }
@keyframes rolar { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__move { animation: none; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(16, 32, 24, .12); }
.card:hover h1, .card:hover h3 { color: var(--brand); }
.card > a { display: block; height: 100%; }
.card__body { padding: 16px; }
.card h3 { font-size: 1.02rem; line-height: 1.35; font-weight: 700; margin-bottom: 8px; transition: color .15s; }
.card p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

.thumb {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--c) 55%, #fff) 0, transparent 50%),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #000));
}
.thumb svg { width: 56px; height: 56px; fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.thumb--lg svg { width: 96px; height: 96px; }
.tag {
  position: absolute; left: 12px; top: 12px; background: #fff; color: var(--c);
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 4px;
}

.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--muted); }

/* ---------- destaques ---------- */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin: 28px 0; }
.hero__main h1 { font-family: "Merriweather", serif; font-size: 1.7rem; line-height: 1.25; margin-bottom: 10px; transition: color .15s; }
.hero__main .card__body { padding: 20px 22px 22px; }
.hero__main p { font-size: 1rem; }
.hero__side { display: grid; gap: 20px; }
.card--row { display: grid; grid-template-columns: 42% 1fr; }
.card--row .thumb { aspect-ratio: auto; height: 100%; min-height: 140px; }
.card--row .thumb svg { width: 44px; height: 44px; }
.card--row h3 { font-size: .98rem; }

/* ---------- lista + lateral ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-bottom: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 3px solid var(--brand); padding-bottom: 8px; margin-bottom: 20px; }
.section-head h2 { font-family: "Merriweather", serif; font-size: 1.35rem; }
.count { font-size: .85rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }

.sidebar { display: flex; flex-direction: column; gap: 20px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.box h3 { font-family: "Merriweather", serif; font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

.recent { list-style: none; counter-reset: r; }
.recent li { counter-increment: r; display: grid; grid-template-columns: 32px 1fr; gap: 0 8px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.recent li:last-child { border-bottom: 0; }
.recent li::before { content: counter(r); grid-row: span 2; font-family: "Merriweather", serif; font-weight: 900; font-size: 1.5rem; color: var(--brand); line-height: 1; }
.recent a { font-size: .88rem; font-weight: 600; line-height: 1.35; }
.recent a:hover { color: var(--brand); }
.recent small { color: var(--muted); font-size: .75rem; }

.box--city { background: linear-gradient(160deg, var(--brand), var(--brand-dark)); color: #fff; border: 0; }
.box--city h3 { border-color: rgba(255, 255, 255, .25); }
.facts { list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: .88rem; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.facts li:last-child { border: 0; }
.facts span { opacity: .8; }

.sources { list-style: none; display: grid; gap: 8px; }
.sources a { font-size: .9rem; color: var(--brand); font-weight: 500; }
.sources a:hover { text-decoration: underline; }

/* ---------- rodapé ---------- */
.footer { background: #0c1310; color: #b9c7bf; padding: 36px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer p { font-size: .88rem; max-width: 460px; margin-top: 12px; }
.logo--footer .logo__text { color: #fff; }
.footer__copy { font-size: .8rem; opacity: .7; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header__inner { flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .theme-toggle { margin-left: auto; }
  .logo__text { font-size: 1.1rem; }
  .hero { margin: 20px 0; }
  .hero__main h1 { font-size: 1.3rem; }
  .thumb--lg { aspect-ratio: 2 / 1; }
  .card--row { grid-template-columns: 110px 1fr; }
  .card--row .thumb { min-height: 110px; }
  .card--row .tag { display: none; }
  .topbar__inner span:last-child { display: none; }
}
