:root {
  --bg: #0d0f12;
  --panel: #14171c;
  --line: #23272f;
  --text: #e6e8eb;
  --muted: #8b929c;
  --faint: #5c636d;
  --red: #f0524f;
  --amber: #e8a33d;
  --green: #4bb57a;
  --blue: #6a9fe8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "IBM Plex Sans", system-ui, sans-serif;
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgba(13, 15, 18, .92); backdrop-filter: blur(8px); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 16px; }
.logo { font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.logo span { color: var(--red); }
nav { display: flex; gap: 18px; font-size: 13px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
.hright { display: flex; align-items: center; gap: 14px; }
.updated { color: var(--muted); font-size: 13px; }
.lang { font: 12px "IBM Plex Mono", monospace; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 3px; text-decoration: none; }
.coffee { font-size: 12px; color: #1a1a1a; background: #ffdd00; padding: 3px 10px; border-radius: 3px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.coffee:hover { background: #ffe94d; }
.lang:hover { color: var(--text); border-color: var(--faint); }

.alert { margin-top: 18px; border-left: 2px solid var(--red); padding: 2px 0 2px 16px; }
.alert .tag { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.02em; margin: 4px 0 6px; font-weight: 600; }
.lede { color: var(--muted); max-width: 110ch; margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--faint); }
.share a, .share button { color: var(--muted); border: 1px solid var(--line); background: none; padding: 2px 9px; border-radius: 3px; text-decoration: none; font: inherit; cursor: pointer; }
.share a:hover, .share button:hover { color: var(--text); border-color: var(--faint); }
.lede.open { -webkit-line-clamp: unset; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 16px 0; }
.stat { padding: 12px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 500 22px/1.2 "IBM Plex Mono", monospace; }
.stat small { color: var(--muted); font-size: 13px; }

h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 28px 0 10px; scroll-margin-top: 60px; }
.panel > h2:first-child { margin-top: 0; }
h2.sub { margin: 16px 0 8px; }
h2 .live { color: var(--red); margin-left: 8px; text-transform: none; letter-spacing: 0; }
section { scroll-margin-top: 60px; }

/* quadro das últimas 72 h */
.board { margin: 4px 0 20px; }
.board h2 { margin-top: 0; }
.brow { display: grid; grid-template-columns: 1.1fr .9fr .7fr 1.6fr 1.6fr; gap: 14px; align-items: baseline; padding: 9px 12px; border: 1px solid var(--line); border-top: 0; text-decoration: none; font-size: 13px; color: var(--muted); }
.brow:hover { background: var(--panel); }
.bhead { border-top: 1px solid var(--line); background: var(--panel); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.bname b { display: block; color: var(--text); font-size: 15px; }
.bname small { color: var(--faint); font-size: 12px; }
.bloss { color: var(--text); font-size: 14px; white-space: nowrap; }
.bstatus .status { margin: 0; }

/* painel: duas colunas lado a lado, cada caixa com rolagem própria */
.dash > * { min-width: 0; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-top: 8px; }
.dash.even { grid-template-columns: 1fr 1fr; }
.dash + .dash { margin-top: 24px; }
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#feed { max-height: 290px; }
#news { max-height: 640px; }
.recipients .scroll { max-height: 300px; border: 1px solid var(--line); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button {
  background: none; border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; border-radius: 3px;
}
.filters button[aria-pressed="true"] { color: var(--text); border-color: var(--faint); }

.incident { border-top: 1px solid var(--line); padding: 12px 0; }
.incident summary { cursor: pointer; list-style: none; }
.incident summary::-webkit-details-marker { display: none; }
.incident summary .amount::after { content: "+"; color: var(--faint); margin-left: 12px; }
.incident[open] summary .amount::after { content: "−"; }
.incident:last-child { border-bottom: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.incident h3 { margin: 0; font-size: 16px; font-weight: 600; }
.meta { color: var(--muted); font-size: 13px; }
.amount { font: 500 18px "IBM Plex Mono", monospace; white-space: nowrap; }
.status { font-size: 12px; font-family: "IBM Plex Mono", monospace; margin-left: 8px; font-weight: 400; }
.status::before, .dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.s-active, .dot { color: var(--red); }
.s-active::before, .dot::before { animation: pulse 1.6s infinite; }
.s-monitoring { color: var(--amber); }
.s-contained { color: var(--blue); }
.s-resolved { color: var(--green); }
@keyframes pulse { 50% { opacity: .25; } }

.incident p { margin: 8px 0 0; max-width: 70ch; }
.vector { color: var(--muted); font-size: 14px; }
.vector em { font-style: normal; color: var(--faint); }
.incident ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.incident li { margin: 3px 0; }
.chips { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 12px "IBM Plex Mono", monospace; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 3px; }
.src { margin-top: 10px; font-size: 13px; color: var(--faint); }
.src a { color: var(--muted); }

/* carteiras */
.wallets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.wallet { border: 1px solid var(--line); background: var(--panel); padding: 10px 14px; }
.wtop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.wtop .wlinks { margin: 0 0 0 auto; }
.wallet .addr { font: 13px "IBM Plex Mono", monospace; color: var(--muted); }
.wallet .addr button { background: none; border: 0; color: var(--faint); font: inherit; cursor: pointer; padding: 0 0 0 6px; }
.wallet .addr button:hover { color: var(--text); }
.wallet .role { font-size: 13px; color: var(--faint); margin: 2px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wnums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wnums b { display: block; font: 500 17px "IBM Plex Mono", monospace; white-space: nowrap; }
.wnums small { color: var(--muted); font-size: 12px; }
.delta { font: 12px "IBM Plex Mono", monospace; margin-left: 6px; }
.delta.down { color: var(--green); }
.delta.up { color: var(--red); }
.holdings { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; max-height: 22px; overflow: hidden; }
.holdings .chip b { color: var(--text); font-weight: 500; }
.holdings .chip.frozen { border-style: dashed; }
.wlinks { font-size: 12px; color: var(--faint); }
.wlinks a { color: var(--muted); }

.feed { border: 1px solid var(--line); font-size: 13px; }
.feed-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line); align-items: baseline; }
.feed-row:last-child { border-bottom: 0; }
.feed-row time { color: var(--faint); font-family: "IBM Plex Mono", monospace; }
.feed-row .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.feed-row .what .mono { color: var(--text); }
.feed-row .val { font-family: "IBM Plex Mono", monospace; text-align: right; white-space: nowrap; text-decoration: none; }
.feed-row .val.out { color: var(--amber); }
.feed-row .val.in { color: var(--muted); }
.feed-row.new { animation: flash 2s ease-out; }
@keyframes flash { from { background: rgba(240, 82, 79, .15); } to { background: transparent; } }
.feed-empty { padding: 16px 12px; color: var(--faint); }
.tick { color: var(--faint); font-size: 12px; margin-top: 8px; font-family: "IBM Plex Mono", monospace; }

/* notícias */
.news { list-style: none; margin: 0; padding: 0; }
.news { border: 1px solid var(--line); }
.news li { border-top: 1px solid var(--line); padding: 8px 12px; font-size: 14px; }
.news li:first-child { border-top: 0; }
.news a { text-decoration: none; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.news a:hover { text-decoration: underline; }
.news .meta { margin-top: 2px; font-size: 12px; }
.news .hot { color: var(--red); }
.news-more { margin-top: 10px; background: none; border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: 13px; padding: 5px 12px; cursor: pointer; border-radius: 3px; }
.news-more:hover { color: var(--text); border-color: var(--faint); }


.box { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; margin-bottom: 16px; }
.box h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.box ol, .box ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.box li { margin: 6px 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td { padding: 5px 0; border-bottom: 1px solid var(--line); }
td:first-child { color: var(--faint); width: 2.5em; font-family: "IBM Plex Mono", monospace; }
td:last-child { text-align: right; font-family: "IBM Plex Mono", monospace; }
tr.hl td { color: var(--red); }
.bar { height: 3px; background: var(--line); margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--faint); }
tr.hl .bar i { background: var(--red); }
.foot td { border: 0; color: var(--faint); font-size: 12px; text-align: left; font-family: inherit; }

.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-family: "IBM Plex Mono", monospace; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 8px 0 0; color: var(--muted); max-width: 70ch; overflow-wrap: anywhere; }

.recipients h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 8px; }
.recipients table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recipients td { padding: 5px 10px; border-top: 0; border-bottom: 1px solid var(--line); }
.recipients td:last-child { text-align: right; }
.recipients td:first-child { white-space: nowrap; }
.recipients td:nth-child(2) { color: var(--muted); }
.context { list-style: none; padding: 0; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.context li { padding: 6px 0; border-top: 1px solid var(--line); }
.context b { color: var(--text); font: 500 13px "IBM Plex Mono", monospace; }
.ad { margin: 20px 0; min-height: 90px; }
.ad.side { min-height: 250px; margin: 0 0 16px; }
.ad.aads iframe { display: block; width: 100%; height: 90px; border: 0; overflow: hidden; background: transparent; }
.ad.side.aads iframe { height: 250px; }
/* abaixo de ~380px de largura o bloco adaptativo da A-Ads precisa de 150px para mostrar mais que o título */
@media (max-width: 420px) { .ad.aads iframe { height: 150px; } }
.ad.placeholder { border: 1px dashed var(--line); color: var(--faint); font-size: 12px; display: grid; place-items: center; }

.legal { max-width: 720px; padding-bottom: 48px; }
.legal h1 { margin-top: 24px; }
.legal h2 { margin-top: 32px; }
.legal p { color: var(--muted); }
.legal p a { color: var(--text); }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--faint); font-size: 13px; }
footer p { max-width: 75ch; margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .s-active::before, .dot::before, .feed-row.new { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 980px) {
  .dash, .dash.even { grid-template-columns: 1fr; }
  #news { max-height: 420px; }
}
@media (max-width: 860px) {
  .bhead { display: none; }
  .brow { grid-template-columns: 1fr auto; gap: 4px 12px; border-top: 1px solid var(--line); margin-top: 8px; }
  .brow .btext { grid-column: 1 / -1; }
  .brow .btext::before { content: attr(data-label) ": "; color: var(--faint); }
  .bstatus { grid-column: 2; grid-row: 2; text-align: right; }
  .bloss { grid-column: 2; grid-row: 1; text-align: right; }
  header .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; }
  nav { order: 3; width: 100%; overflow-x: auto; white-space: nowrap; gap: 16px; padding: 6px 0 8px; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .wtop .wlinks { margin: 0; width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .updated { display: none; }
  .feed-row { grid-template-columns: 44px 1fr auto; gap: 8px; }
  .wnums b { font-size: 14px; }
  .wnums { gap: 8px; }
  .stat b { font-size: 18px; }
}
