:root {
  --bg: #070b14;
  --bg-2: #0c1322;
  --panel: #10182a;
  --line: #22304a;
  --text: #e8eefc;
  --muted: #8b9bb8;
  --accent: #3ee0a3;
  --accent-2: #6ea8ff;
  --gold: #e8c36a;
  --down: #ff6b8a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(62, 224, 163, 0.08), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(110, 168, 255, 0.08), transparent 45%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.86);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.brand-mark {
  font-family: ui-monospace, "Cascadia Code", monospace;
  background: var(--accent); color: #062016; font-weight: 800;
  padding: 0.35rem 0.5rem; border-radius: 0.4rem; letter-spacing: 0.08em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--muted); font-size: 0.75rem; }
.nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 0.45rem 0.75rem; border-radius: 999px; text-decoration: none;
}
.nav a.is-active, .nav a:hover { color: var(--text); background: #18233a; }

main.shell { padding: 1.6rem 0 3rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-size: 0.72rem; margin: 0 0 0.4rem; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 0.5rem; }
.lede { color: var(--muted); max-width: 46rem; margin: 0; }
.hero-panel {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start;
  margin-bottom: 1.4rem;
}
.meta-grid { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.meta-grid div, .detail-grid div {
  background: var(--panel); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.85rem 1rem;
}
dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
dd { margin: 0.2rem 0 0; font-size: 1.05rem; }
.banner {
  background: #1b2438; border: 1px solid #3d4d72; color: #d7e3ff;
  padding: 0.8rem 1rem; border-radius: 0.7rem;
}
.indicator-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin: 1rem 0 1.4rem; }
.indicator, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow);
}
.indicator { padding: 1rem; }
.indicator h2, .panel-head h2 { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.08em; }
.indicator-value { font-size: 1.35rem; margin: 0.35rem 0 0.15rem; }
.indicator-value small { color: var(--muted); font-size: 0.8rem; }
.indicator-ref { margin: 0; color: var(--muted); font-size: 0.78rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
.panel { padding: 1rem 1.1rem 0.4rem; margin-bottom: 1.2rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; }
.panel-head span { color: var(--muted); font-size: 0.8rem; }
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { border-top: 1px solid var(--line); padding: 0.85rem 0; }
.event-list h3 { margin: 0.15rem 0 0.25rem; font-size: 1rem; }
.event-list p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.event-cat { color: var(--accent) !important; font-size: 0.72rem !important; text-transform: uppercase; letter-spacing: 0.08em; }
.empty { color: var(--muted); padding: 0.4rem 0 1rem; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.ticker { font-family: ui-monospace, "Cascadia Code", monospace; color: var(--accent); font-weight: 700; }
.muted { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.up { color: var(--accent); }
.down { color: var(--down); }
.filters, .sync-form { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; gap: 0.3rem; color: var(--muted); font-size: 0.8rem; }
input, select {
  background: #0b1220; color: var(--text); border: 1px solid var(--line); border-radius: 0.55rem;
  padding: 0.55rem 0.7rem; min-width: 12rem;
}
.btn {
  background: var(--accent); color: #062016; border: 0; border-radius: 999px;
  padding: 0.65rem 1rem; font-weight: 700; cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.hint { margin: 0; color: var(--muted); font-size: 0.8rem; }
.pager { display: flex; gap: 1rem; align-items: center; margin: 1rem 0 2rem; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; margin: 1.2rem 0; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; padding: 1.4rem 0 2rem; }
.foot p { margin: 0.2rem 0; }
.notice {
  background: #121a2c; border: 1px solid var(--line); color: var(--muted);
  padding: 0.85rem 1rem; border-radius: 0.7rem; font-size: 0.88rem;
}
.legal h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.legal p, .legal li { color: var(--muted); line-height: 1.55; }
.legal ul { padding-left: 1.2rem; }

.countdown-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.countdown, .prob-mini {
  background: var(--panel); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.85rem 1rem;
}
.countdown h2, .prob-mini .indicator-value { font-size: 1rem; margin: 0.2rem 0; }
.countdown p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.countdown.is-hot { border-color: var(--gold); }
.prob-stack { display: grid; gap: 0.7rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1.2rem; }
.chip {
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; text-decoration: none; font-size: 0.85rem;
}
.chip.is-active, .chip:hover { color: var(--text); background: #18233a; text-decoration: none; }
.faixa { margin-bottom: 1.4rem; }
.faixa-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; }
.faixa-head h2 { font-size: 1.05rem; margin: 0; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
tr.is-divergent td { color: var(--gold); }

@media (max-width: 860px) {
  .topbar-inner, .hero-panel, .split { grid-template-columns: 1fr; display: grid; }
  .topbar-inner { display: flex; flex-direction: column; align-items: flex-start; }
  input, select { min-width: 0; width: 100%; }
}

/* --- Modern refinements (investing.rockmah.com) ------------------------ */
body { font-family: 'Inter', ui-sans-serif, system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.brand-mark { font-family: 'JetBrains Mono', ui-monospace, monospace; box-shadow: 0 8px 20px -10px rgba(62, 224, 163, .8); }
.brand-text strong { letter-spacing: -.01em; }
.topbar { background: rgba(7, 11, 20, 0.72); }
.nav a { font-weight: 500; transition: background .15s, color .15s; }
.nav a.is-active { background: linear-gradient(90deg, rgba(62, 224, 163, .18), rgba(110, 168, 255, .14)); box-shadow: inset 0 0 0 1px rgba(62, 224, 163, .25); }
h1 { font-weight: 800; letter-spacing: -.025em; }
h2 { letter-spacing: -.01em; }
.indicator, .panel { border-radius: 1.1rem; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; background: linear-gradient(180deg, rgba(255,255,255,.025), transparent), var(--panel); }
.indicator:hover { transform: translateY(-3px); border-color: rgba(62, 224, 163, .4); }
.indicator-value { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; letter-spacing: -.02em; font-size: 1.5rem; }
.num, .ticker { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.table-scroll { border-radius: 1rem; border: 1px solid var(--line); background: var(--panel); }
table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
table tbody tr { transition: background .12s; }
table tbody tr:hover { background: rgba(110, 168, 255, .06); }
.btn { border-radius: .7rem; font-weight: 600; transition: transform .12s, filter .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.chip { border-radius: 999px; font-weight: 600; }
.kicker { font-weight: 700; }
.banner, .notice { border-radius: .9rem; backdrop-filter: blur(8px); }
.foot { border-top: 1px solid var(--line); background: rgba(7, 11, 20, .6); }
.up { color: var(--accent); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
