/* ════════════════════════════════════════════════════════════════
   RESUMO SEMANAL — Copa do Judiciário 2026 (TEMA CLARO)
   ════════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #0c1e45;
  --ink-soft: #51607a;
  --ink-mute: #7a89a3;
  --navy: #0c1e45;
  --panel: #ffffff;
  --panel2: #f7faff;
  --gold: #b07d10;          /* dourado p/ texto em fundo claro */
  --gold-bright: #f4c12e;   /* preenchimentos / selecionado */
  --gold-l: #fff0bf;
  --line: rgba(12, 30, 69, .12);
  --shadow: 0 6px 22px rgba(12, 30, 69, .08);
}

body { background: var(--bg); font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }

.rs-page { position: relative; min-height: 100vh; overflow: hidden; }

/* Fundo claro com leves gradientes + dots + moldura dourada */
.rs-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 22% 20%, rgba(36, 94, 168, .10), transparent 32%),
    radial-gradient(circle at 78% 68%, rgba(216, 170, 47, .10), transparent 32%),
    linear-gradient(135deg, #f4f7fd 0%, #eef2f7 56%, #e7edf6 100%);
}
.rs-dots {
  position: fixed; inset: 0; z-index: 0; opacity: .05;
  background: radial-gradient(circle, #0c1e45 1px, transparent 1px);
  background-size: 32px 32px;
}
.rs-frame {
  position: fixed; inset: 20px; z-index: 1;
  border: 1px solid rgba(217, 164, 0, .4); border-radius: 34px;
  pointer-events: none;
}

.rs-wrap { position: relative; z-index: 2; max-width: 1560px; margin: 0 auto; padding: 32px 40px 48px; }

/* ── Header ── */
.rs-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; padding: 18px 28px;
  border: 1px solid var(--line); border-radius: 28px;
  background: var(--card); box-shadow: var(--shadow);
}
.rs-head-left { display: flex; align-items: center; gap: 18px; }
.rs-badge {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid var(--gold-bright); background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 18px; color: var(--gold-bright);
}
.rs-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 4px; color: var(--gold); }
.rs-title { font-size: 30px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; color: var(--navy); }
.rs-head-right { display: flex; align-items: center; gap: 14px; }
.rs-week-pill {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #f5f8fd;
  border-radius: 16px; padding: 11px 18px; font-size: 14px; color: var(--ink-soft);
}
.rs-back-btn {
  border: none; border-radius: 16px; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, var(--gold-l), var(--gold-bright) 55%, #c9920f);
  color: #4a3a05; font-weight: 900; text-transform: uppercase; font-size: 13px;
  padding: 13px 22px; letter-spacing: .5px;
  transition: transform .12s, box-shadow .12s;
}
.rs-back-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(216, 170, 47, .35); }

/* ── Hero row ── */
.rs-hero { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 28px; align-items: start; }

/* Card principal */
.rs-main-card {
  border: 1px solid var(--line); border-radius: 34px;
  background: var(--card);
  padding: 32px; box-shadow: var(--shadow);
}
.rs-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.rs-main-kicker { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 5px; color: var(--gold); margin-bottom: 12px; }
.rs-main-h2 { font-size: 40px; font-weight: 900; text-transform: uppercase; line-height: 1.08; max-width: 720px; color: var(--navy); }
.rs-main-h2 span { color: var(--gold); }
.rs-main-sub { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--ink-soft); max-width: 640px; }
.rs-main-trophy {
  flex-shrink: 0; width: 100px; height: 100px; border-radius: 50%;
  border: 2px solid var(--gold-bright); background: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 46px;
}

/* Highlights */
.rs-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rs-hl {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 26px; padding: 20px; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.rs-hl:hover { transform: translateY(-4px); border-color: rgba(217, 164, 0, .6); box-shadow: 0 12px 30px rgba(12, 30, 69, .14); }
.rs-hl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rs-hl-ico {
  width: 50px; height: 50px; border-radius: 16px;
  border: 1px solid rgba(217, 164, 0, .4); background: #fffaf0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.rs-hl-tag {
  border: 1px solid rgba(217, 164, 0, .4); border-radius: 20px;
  padding: 4px 12px; font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 2px; color: var(--gold);
}
.rs-hl-title { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; color: var(--ink-mute); }
.rs-hl-unit { margin-top: 12px; font-size: 19px; font-weight: 900; line-height: 1.2; min-height: 46px; color: var(--navy); }
.rs-hl-detail { margin-top: 12px; font-size: 15px; font-weight: 700; color: var(--gold); }

/* Liderança */
.rs-leaders {
  border: 1px solid var(--line); border-radius: 34px;
  background: var(--card);
  padding: 26px; box-shadow: var(--shadow);
}
.rs-leaders-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.rs-leaders-title { font-size: 34px; font-weight: 900; text-transform: uppercase; color: var(--navy); }
.rs-leaders-sub { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.rs-leaders-trophy { font-size: 38px; }
.rs-leaders-list { display: flex; flex-direction: column; gap: 12px; max-height: 760px; overflow-y: auto; padding-right: 6px; }
.rs-leaders-list::-webkit-scrollbar { width: 5px; }
.rs-leaders-list::-webkit-scrollbar-thumb { background: rgba(217, 164, 0, .35); border-radius: 3px; }

.rs-grp {
  border: 1px solid var(--line); background: #f7faff;
  border-radius: 22px; padding: 16px 18px;
}
.rs-grp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rs-grp-badge {
  border: 1px solid var(--gold-bright); background: var(--navy);
  border-radius: 14px; padding: 7px 14px;
  font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 700; color: var(--gold-bright);
}
.rs-grp-name { flex: 1; font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--navy); }
.rs-grp-tag { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; color: var(--ink-mute); }
.rs-grp-list { display: flex; flex-direction: column; }
.rs-lead {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.rs-lead:first-child { border-top: none; padding-top: 2px; }
.rs-lead-pos {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
}
.rs-pos-1 { background: var(--gold-bright); color: #4a3a05; }
.rs-pos-2 { background: #c2ccda; color: #1e293b; }
.rs-pos-3 { background: #cd7f32; color: #fff; }
.rs-lead-name { font-size: 13px; font-weight: 800; line-height: 1.2; color: var(--navy);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rs-lead-city { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }
.rs-lead-fig { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }

.rs-loading { text-align: center; color: var(--ink-mute); font-size: 14px; padding: 30px; grid-column: 1 / -1; }

/* ── Responsivo ── */
@media (max-width: 1080px) {
  .rs-hero { grid-template-columns: 1fr; }
  .rs-main-h2 { font-size: 32px; }
  .rs-highlights { grid-template-columns: 1fr; }
  .rs-leaders-list { max-height: none; }
}
@media (max-width: 640px) {
  .rs-wrap { padding: 20px; }
  .rs-frame { inset: 10px; border-radius: 22px; }
  .rs-header { flex-direction: column; gap: 14px; align-items: flex-start; }
  .rs-main-trophy { display: none; }
}

/* Botão "Ver top 10 / todos" nos cards de destaque */
.rs-hl-more {
  margin-top: 14px; width: 100%;
  background: #fff7e2; border: 1px solid rgba(217, 164, 0, .4);
  color: #8a6608; font-family: inherit; font-size: 13px; font-weight: 800;
  padding: 9px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s;
}
.rs-hl-more:hover { background: #ffeeba; }

/* Botão voltar agora é <button> */
button.rs-back-btn { font-family: 'Inter', sans-serif; }

/* ── Modal top 10 / todos ── */
.rs-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(12, 30, 69, .42);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.rs-modal-overlay.open { display: flex; }
.rs-modal-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; width: min(620px, 96vw); max-height: 84vh;
  overflow: hidden; position: relative; display: flex; flex-direction: column;
  box-shadow: 0 28px 70px rgba(12, 30, 69, .3);
}
.rs-modal-close {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  background: #eef3fb; border: 1px solid var(--line); color: var(--navy);
  width: 32px; height: 32px; border-radius: 50%; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rs-modal-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.rs-modal-title { font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 700; color: var(--navy); }
.rs-modal-sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.rs-modal-body { padding: 8px 16px 18px; overflow-y: auto; }
.rs-modal-row {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 8px; border-bottom: 1px solid var(--line);
}
.rs-modal-row:last-child { border-bottom: none; }
.rs-modal-pos {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff3cf; color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 15px;
}
.rs-modal-row:nth-child(1) .rs-modal-pos { background: var(--gold-bright); color: #4a3a05; }
.rs-modal-name { font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--navy); }
.rs-modal-city { font-size: 12px; color: var(--ink-mute); margin-top: 1px; }
.rs-modal-val { font-size: 13px; font-weight: 700; color: var(--gold); text-align: right; white-space: nowrap; }
