/* ============================================================
   VXJ TERMINAL — Bloomberg-style news clipping
   Via Extrajudicial · Regularização de Imóveis
   Fonte: Bergoom (dchest) — SIL OFL 1.1, inspirada no Bloomberg
   ============================================================ */

@font-face {
  font-family: 'Bergoom';
  src: url('fonts/Bergoom-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bergoom';
  src: url('fonts/Bergoom-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Bergoom';
  src: url('fonts/Bergoom-Semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bergoom';
  src: url('fonts/Bergoom-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bergoom';
  src: url('fonts/Bergoom-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --bg:        #000000;
  --panel:     #0a0a0a;
  --panel-2:   #0d0f12;
  --line:      #1b1f24;
  --line-2:    #272c33;

  --amber:     #ff9e1b;   /* primary accent */
  --amber-dim: #b87f16;
  --orange:    #ff7a00;
  --green:     #4af626;
  --red:       #ff3b3b;
  --cyan:      #00b0ff;
  --violet:    #b388ff;

  --txt:       #e8e6e0;
  --txt-dim:   #9aa0a6;
  --txt-mute:  #5f666d;

  --mono: 'Bergoom', 'IBM Plex Mono', ui-monospace, 'Consolas', monospace;
  --sans: 'Roboto', 'Noto Sans', -apple-system, system-ui, 'Segoe UI', sans-serif;

  --row-h: 26px;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: #000; }

/* Scrollbars */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #000; }
*::-webkit-scrollbar-thumb { background: #222; border-radius: 0; }
*::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ===================== BOOT SCREEN ===================== */
.boot {
  position: fixed; inset: 0; z-index: 100;
  background: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.boot-icon {
  width: clamp(56px, 14vw, 88px); height: clamp(56px, 14vw, 88px); margin-bottom: 8px;
  filter: drop-shadow(0 0 18px rgba(255,158,27,.55));
  animation: pulse 1.8s ease-in-out infinite;
}
.boot-art {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(48px, 12vw, 120px); letter-spacing: 8px;
  color: var(--amber); text-shadow: 0 0 24px rgba(255,158,27,.5);
}
.boot-lines {
  font-size: 12px; color: var(--green); min-height: 120px;
  width: min(420px, 86vw); white-space: pre-wrap;
}
.boot-lines .ok { color: var(--green); }
.boot-lines .amb { color: var(--amber); }
.boot.hide { opacity: 0; pointer-events: none; transition: opacity .4s ease; }

/* ===================== LAYOUT ===================== */
.terminal {
  height: 100vh; display: grid;
  grid-template-rows: auto auto auto 1fr auto;
}

/* ===================== TOP BAR ===================== */
.topbar {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  background: linear-gradient(#0c0c0c, #060606);
  border-bottom: 1px solid var(--amber);
  padding: 0 12px; height: 40px;
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-logo { display: inline-flex; align-items: center; }
.brand-icon { width: 22px; height: 22px; margin-right: 8px; flex-shrink: 0; }
.brand-mark {
  background: var(--amber); color: #000; font-weight: 700;
  padding: 3px 7px; letter-spacing: 1px; font-size: 14px;
}
.brand-go {
  color: var(--amber); font-weight: 700; font-size: 14px; letter-spacing: .5px;
  margin-left: 4px;
}
.brand-name { font-weight: 600; letter-spacing: 1.5px; font-size: 13px; color: var(--txt-dim); }
.brand-name em { color: var(--amber); font-style: normal; }
.topbar-tagline { display: none; }   /* aparece só no mobile, no lugar da busca */

.cmdline {
  display: flex; align-items: center; gap: 8px;
  background: #000; border: 1px solid var(--line-2);
  height: 26px; padding: 0 10px; max-width: 640px; width: 100%; margin: 0 auto;
}
.cmd-prompt { color: var(--amber); font-weight: 700; }
#cmdInput {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--txt); font-family: var(--mono); font-size: 12px; letter-spacing: .3px;
}
#cmdInput::placeholder { color: var(--txt-mute); }

.status { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 12px; }
.live { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; }
.live .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.clock { color: var(--amber); font-weight: 600; font-variant-numeric: tabular-nums; }
.tz { color: var(--txt-mute); }

/* ===================== TICKER ===================== */
.ticker {
  background: #060606; border-bottom: 1px solid var(--line);
  overflow: hidden; height: 28px; display: flex; align-items: stretch;
}
.ticker-flash {
  display: flex; align-items: center; padding: 0 10px; flex-shrink: 0;
  background: var(--red); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: 1px;
}
/* live currency quotes (fixed) */
.ticker-quotes {
  display: flex; align-items: center; gap: 18px; flex-shrink: 0;
  padding: 0 14px; border-right: 1px solid var(--line-2);
  font-size: 11.5px; white-space: nowrap;
}
.ticker-quotes.off { display: none; }
.ticker-quotes .q { display: inline-flex; align-items: baseline; gap: 6px; }
.ticker-quotes .q b { color: var(--amber); font-weight: 700; letter-spacing: .5px; }
.ticker-quotes .q .q-v { color: var(--txt); font-variant-numeric: tabular-nums; }
.ticker-quotes .q i { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker-quotes .q i.up { color: var(--green); }
.ticker-quotes .q i.down { color: var(--red); }

.ticker-scroll { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.ticker-track {
  display: inline-flex; align-items: center; gap: 0; white-space: nowrap;
  padding-left: 24px; will-change: transform;
  animation: scroll-left 60s linear infinite;
}
.ticker-scroll:hover .ticker-track { animation-play-state: paused; }
.ticker-item { padding: 0 22px; font-size: 12px; color: var(--txt-dim); }
.ticker-item b { color: var(--amber); font-weight: 600; }
.ticker-item .sep { color: var(--line-2); margin-left: 22px; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===================== FUNCTION KEYS ===================== */
.fkeys {
  display: flex; gap: 1px; background: var(--line);
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.fkey {
  flex: 1 0 auto; background: #0a0a0a; border: 0; cursor: pointer;
  color: var(--txt-dim); font-family: var(--mono); font-size: 11px;
  padding: 6px 12px; white-space: nowrap; letter-spacing: .5px;
  display: flex; align-items: center; gap: 7px; transition: background .12s, color .12s;
}
.fkey .fk { color: var(--amber); font-weight: 700; }
.fkey:hover { background: #141414; color: var(--txt); }
.fkey.active { background: var(--amber); color: #000; }
.fkey.active .fk { color: #000; }
.fkey .cnt {
  background: #000; color: var(--txt-mute); padding: 0 5px; font-size: 10px; border-radius: 2px;
}
.fkey.active .cnt { background: rgba(0,0,0,.25); color: #000; }

/* ===================== GRID ===================== */
.grid {
  display: grid; grid-template-columns: 260px 1fr 380px;
  gap: 1px; background: var(--line); overflow: hidden; min-height: 0;
}
.panel { background: var(--panel); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #101215; border-bottom: 1px solid var(--line);
  padding: 5px 10px; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--amber);
  flex-shrink: 0;
}
.panel-sub { color: var(--txt-mute); font-weight: 500; }

/* ---- MONITOR (left) ---- */
.panel-monitor { overflow-y: auto; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.stat { background: var(--panel-2); padding: 9px 10px; }
.stat .v { font-size: 22px; font-weight: 700; color: var(--txt); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v.amber { color: var(--amber); }
.stat .v.green { color: var(--green); }
.stat .v.red { color: var(--red); }
.stat .l { font-size: 10px; color: var(--txt-mute); letter-spacing: .5px; margin-top: 4px; }

.dist { padding: 8px 10px; display: flex; flex-direction: column; gap: 7px; }
.dist-row { display: grid; grid-template-columns: 92px 1fr 26px; align-items: center; gap: 8px; font-size: 11px; cursor: pointer; }
.dist-row:hover .dist-label { color: var(--txt); }
.dist-label { color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-bar { height: 8px; background: #111; position: relative; }
.dist-bar > i { position: absolute; left: 0; top: 0; bottom: 0; display: block; }
.dist-val { text-align: right; color: var(--txt-mute); font-variant-numeric: tabular-nums; }

.movers { list-style: none; padding: 4px 0 10px; }
.mover { padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mover:hover { background: #111; }
.mover .m-top { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 3px; }
.mover .m-src { color: var(--amber); font-weight: 600; }
.mover .m-time { color: var(--txt-mute); }
.mover .m-hl { font-size: 11px; color: var(--txt-dim); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- NEWS WIRE (center) — duas colunas: ATIVOS | CLIPPING ---- */
.panel-wire { min-width: 0; }
.wire-cols { display: flex; flex: 1; min-height: 0; }
.wire-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wire-col.wire-col-clip { border-left: 1px solid var(--line); }
.wire-col .panel-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.wire-col .panel-head span:first-child { color: var(--green); line-height: 1.25; }
.wire-col.wire-col-clip .panel-head span:first-child { color: var(--txt-mute); }
.clip-desc { color: var(--amber); font-weight: 600; }
.nota-hint { font-size: 9.5px; font-weight: 500; letter-spacing: .3px; color: var(--txt-mute); }
.live-mini { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 9px; font-weight: 700; margin-left: 5px; letter-spacing: .5px; }
.live-mini .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 1.6s infinite; }

/* "NO AR" = feed verificado a cada 30s (batimento contínuo, honesto) */
.feed-live { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; letter-spacing: .4px; }
.feed-live .fc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 1.5s infinite; }
.feed-live.scanning .fc-dot { animation: scanflare .9s ease; }
@keyframes scanflare {
  0%   { transform: scale(1);   box-shadow: 0 0 6px var(--green); }
  40%  { transform: scale(1.9); box-shadow: 0 0 16px var(--green), 0 0 6px var(--green); }
  100% { transform: scale(1);   box-shadow: 0 0 6px var(--green); }
}
.sync-ago { color: var(--txt-mute); font-variant-numeric: tabular-nums; }
.sync-ago.stale { color: var(--amber); }

/* notas mais altas pulsando (destaque de "ativo quente") */
@keyframes notaglow {
  0%, 100% { text-shadow: 0 0 6px currentColor; }
  50%      { text-shadow: 0 0 15px currentColor, 0 0 5px currentColor; opacity: .82; }
}
.nota-hot { animation: notaglow 1.4s ease-in-out infinite; }
.wire { list-style: none; overflow-y: auto; flex: 1; min-height: 0; }
.wire-row {
  display: grid; grid-template-columns: 62px 4px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; padding: 7px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s;
}
.wire-row:hover { background: #101215; }
.wire-row.sel { background: #14161a; box-shadow: inset 3px 0 0 var(--amber); }
.wire-time { color: var(--txt-mute); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wire-cat {
  width: 4px; height: 16px; border-radius: 2px; align-self: center;
}
.wire-hl { font-family: var(--sans); font-weight: 500; font-size: 12.5px; color: var(--txt); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wire-row:hover .wire-hl { color: #fff; }
.wire-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wire-src { color: var(--amber); font-size: 10px; font-weight: 600; }
.wire-nq { color: var(--txt-mute); font-size: 12px; }
.wire-note { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wire-sec {
  padding: 7px 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--green); background: #0b140f;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2);
}
.wire-sec-static { color: var(--txt-mute); background: #0d0f12; }
.prio { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.prio.p1 { background: var(--red); box-shadow: 0 0 6px var(--red); }
.prio.p2 { background: var(--amber); }
.prio.p3 { background: var(--txt-mute); }

/* ---- READER (right) ---- */
.panel-reader { min-width: 0; }
.reader { overflow-y: auto; flex: 1; min-height: 0; padding: 14px; }
.reader-empty { color: var(--txt-mute); font-size: 12px; text-align: center; margin-top: 40px; line-height: 1.7; }
.reader-empty strong { color: var(--amber); }
.reader-hint { margin-top: 12px; font-size: 11px; }

.r-cat { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 7px; color: #000; margin-bottom: 12px; letter-spacing: .5px; }
.r-headline { font-family: var(--sans); font-size: 19px; font-weight: 700; line-height: 1.28; color: #fff; margin-bottom: 12px; }
.r-metaline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--txt-mute); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.r-metaline b { color: var(--amber); font-weight: 600; }
.r-summary { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--txt-dim); }
.r-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.r-tag { font-size: 10px; color: var(--cyan); border: 1px solid var(--line-2); padding: 2px 7px; }
.r-open {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  background: var(--amber); color: #000; font-weight: 700; font-size: 12px;
  padding: 9px 16px; text-decoration: none; letter-spacing: .5px; border: 0; cursor: pointer;
  transition: filter .12s;
}
.r-open:hover { filter: brightness(1.12); }

/* ===================== STATUS BAR ===================== */
.statusbar {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(#0a0a0a, #050505); border-top: 1px solid var(--amber);
  height: 26px; padding: 0 12px; font-size: 11px; color: var(--txt-dim);
}
.sb-item { white-space: nowrap; }
.sb-item.sb-msg { color: var(--green); }
.sb-spacer { flex: 1; }
.statusbar .sb-item:first-child { background: var(--amber); color: #000; font-weight: 700; padding: 2px 8px; }

/* ===== lista mesclada + selos + botões (usados no mobile) ===== */
.wire-merged { display: none; }                 /* só aparece no mobile */
.src-badge { display: inline-block; font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: .5px; padding: 1px 5px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.sb-live { background: rgba(74,246,38,.16); color: var(--green); }
.sb-team { background: rgba(255,158,27,.14); color: var(--amber); }
.ticker-flash { border: 0; cursor: pointer; font-family: inherit; }
.tf-mobile { display: none; }
@keyframes trendsBlink {
  0%, 100% { filter: brightness(1);    box-shadow: 0 0 0 rgba(255,158,27,0); }
  50%      { filter: brightness(1.35); box-shadow: 0 0 14px 3px rgba(255,158,27,.9); }
}
.reader-close { display: none; margin-left: auto; background: transparent; border: 0;
  color: var(--txt-dim); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.reader-close:hover { color: var(--amber); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr 360px; }
  .panel-monitor { display: none; }
}
@media (max-width: 780px) {
  html { overflow-x: clip; }
  html, body { height: auto; max-width: 100%; }   /* deixa a página rolar na vertical */
  body { overflow: visible; }   /* body não pode ser scroll container, senão o sticky do cabeçalho quebra */
  .terminal { display: block; height: auto; min-height: 100vh; }
  .statusbar { flex-wrap: wrap; height: auto; row-gap: 4px; padding: 5px 10px; }
  .sb-spacer { display: none; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; height: auto; padding: 8px 10px; gap: 6px 10px;
    position: sticky; top: 0; z-index: 40; }
  .topbar > * { min-width: 0; }
  .brand { min-width: 0; overflow: hidden; }
  .brand-name { display: none; }               /* economiza espaço no header estreito */
  .cmdline { display: none; }   /* no mobile a busca dá lugar à tagline */
  .topbar-tagline { display: flex; align-items: center; justify-content: center; order: 3; grid-column: 1 / -1;
    min-width: 0; color: var(--amber); font-weight: 700; font-size: 12px; letter-spacing: 1.5px;
    text-align: center; padding: 3px 0; border-top: 1px solid var(--line); }
  /* mobile: mostra o câmbio ao lado do FLASH e esconde as manchetes rolantes (já estão nas listas) */
  .ticker-scroll { display: none; }
  .ticker-quotes:not(.off) { display: flex; flex: 1; min-width: 0; overflow-x: auto;
    gap: 12px; padding: 0 10px; font-size: 10.5px; border-right: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .wire-cols { display: none; }                 /* mobile usa a lista única */
  .wire-merged { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .tf-desktop { display: none; }
  .tf-mobile { display: inline; }               /* FLASH vira "★ DESTAQUES" */
  .panel-reader { display: none; }
  .panel-reader.mobile-open { display: flex; position: fixed; inset: 0; z-index: 50; }
  /* barra de topo do leitor no mobile: botão VOLTAR prominente à esquerda */
  .panel-reader.mobile-open .panel-head { justify-content: flex-start; gap: 10px; padding: 10px 12px; }
  .panel-reader.mobile-open .reader-close { display: inline-flex; align-items: center; order: -1; margin: 0;
    font-size: 13px; font-weight: 700; letter-spacing: .5px; color: #000; background: var(--amber);
    padding: 8px 14px; border-radius: 4px; }
  .panel-reader.mobile-open .r-back { display: none; }  /* evita botão de voltar duplicado */
  /* botão DESTAQUES pisca pra chamar atenção */
  .ticker-flash { animation: trendsBlink 1.3s ease-in-out infinite; }
  .wire { max-height: none; overflow: visible; }   /* a página rola, não a lista internamente */
  .panel-wire, .wire-merged, .grid { overflow: visible; }
  /* cabeçalho fixo no mobile: topbar + ticker + filtros grudam no topo ao rolar */
  .ticker { position: sticky; top: var(--topbar-h, 56px); z-index: 39; }
  .fkeys { position: sticky; top: var(--stack-h, 84px); z-index: 38; }
  /* mais espaço para o título: data mais estreita, menos gap e menos recuo lateral */
  .wire-row { grid-template-columns: 40px 4px minmax(0, 1fr) auto; gap: 7px; padding: 8px 8px; }
  .wire-time { font-size: 11px; }
  .wire-meta { gap: 5px; }
}

/* ============================================================
   ESCALA DE FONTE  (+~15%) — "aumentar um pouco tudo"
   Para reverter ao denso original, basta apagar este bloco.
   Para aumentar mais, suba os valores abaixo.
   ============================================================ */
body            { font-size: 16px; }
.brand-name     { font-size: 15px; }
#cmdInput       { font-size: 13px; }
.status         { font-size: 13px; }
.boot-lines     { font-size: 13px; }

.ticker-item    { font-size: 13px; }
.ticker-quotes  { font-size: 13px; }

.fkey           { font-size: 13px; }
.panel-head     { font-size: 13px; }

.stat .v        { font-size: 27px; }
.stat .l        { font-size: 11px; }
.dist-row       { font-size: 13px; }
.mover .m-top   { font-size: 11px; }
.mover .m-hl    { font-size: 12px; }

.wire-time      { font-size: 13px; }
.wire-cat       { font-size: 10px; }
.wire-hl        { font-size: 16px; }
.wire-src       { font-size: 11px; }
.wire-note      { font-size: 16px; }

.reader-empty   { font-size: 13px; }
.r-cat          { font-size: 11px; }
.r-headline     { font-size: 27px; }
.r-metaline     { font-size: 12px; }
.r-summary      { font-size: 17px; }
.r-tag          { font-size: 11px; }
.r-open         { font-size: 13px; }

.statusbar      { font-size: 12px; }

/* ---- Botão ATUALIZAR + alerta de novas manchetes ---- */
.sb-btn {
  background: transparent; border: 1px solid var(--line-2); color: var(--txt-dim);
  font-family: inherit; font-size: 11px; letter-spacing: .5px; padding: 2px 10px;
  cursor: pointer; transition: .12s;
}
.sb-btn:hover { border-color: var(--amber); color: var(--amber); }
.sb-btn:active { transform: scale(.96); }
.sb-btn.spin { pointer-events: none; opacity: .6; }
.sb-msg.flash {
  color: #000 !important; background: var(--amber); padding: 1px 8px; font-weight: 700;
  animation: flashpulse .45s ease;
}
#wireCount.pulse { color: var(--amber); animation: flashpulse .45s ease; }
@keyframes flashpulse { from { transform: scale(1.1); } to { transform: scale(1); } }

/* ---- Botões de ação do leitor ---- */
.r-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.r-actions .r-open { margin-top: 0; }
.r-examples { background: transparent; border: 1px solid var(--amber); color: var(--amber); }
.r-examples:hover { background: var(--amber); color: #000; }
.r-post { box-shadow: 0 0 0 1px rgba(255,158,27,.45), 0 0 16px rgba(255,158,27,.4); }

/* Botão voltar aos destaques */
.r-back { display: block; width: 100%; background: var(--amber); border: 0; color: #000;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .5px; padding: 8px 12px;
  cursor: pointer; margin-bottom: 14px; transition: filter .12s; text-align: left; }
.r-back:hover { filter: brightness(1.1); }

/* Painel de DESTAQUES (top ativos por pontuação) */
.hl-list { list-style: none; }
.hl-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start;
  padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.hl-item:hover { background: #101215; }
.hl-rank { font-size: 21px; font-weight: 700; color: var(--txt-mute); font-variant-numeric: tabular-nums; text-align: center; line-height: 1.2; }
.hl-item:first-child .hl-rank { color: var(--amber); }
.hl-item:nth-child(2) .hl-rank, .hl-item:nth-child(3) .hl-rank { color: var(--txt-dim); }
.hl-body { min-width: 0; }
.hl-hl { font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--txt); line-height: 1.35; }
.hl-item:hover .hl-hl { color: #fff; }

/* cabeçalho de cotação (pontuação + seta) ACIMA da headline — estilo home-broker */
.hl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hl-q { display: inline-flex; align-items: baseline; gap: 6px; }
.hl-score { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.hl-arrow { font-style: normal; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl-when { font-size: 11.5px; color: var(--txt-mute); font-variant-numeric: tabular-nums; }
/* destaque "entre os recentes" (forma atual) */
.hl-rec { margin-left: 8px; font-size: 11px; font-weight: 700; color: #5ab0ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rq-rec { font-size: 12px; color: var(--txt-mute); margin-top: 2px; }
.rq-rec b { font-variant-numeric: tabular-nums; }

/* ---- Pop-up (modal) de exemplos ---- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.modal-box {
  position: relative; width: min(700px, 96vw); max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--amber);
  box-shadow: 0 0 50px rgba(0,0,0,.8);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #101215; border-bottom: 1px solid var(--line);
  padding: 10px 14px; font-size: 12px; letter-spacing: 1px; color: var(--amber); font-weight: 600;
}
.modal-close { background: transparent; border: 0; color: var(--txt-dim); font-size: 16px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--red); }
.modal-body { overflow-y: auto; padding: 16px; }

.ex-cat { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 7px; color: #000; letter-spacing: .5px; margin-bottom: 10px; }
.ex-ref { font-family: var(--sans); font-size: 14px; color: var(--txt-dim); line-height: 1.4; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ex-sec { margin-top: 20px; }
.ex-sec-h { font-size: 11px; letter-spacing: 1px; color: var(--amber); font-weight: 600; margin-bottom: 10px; }
.ex-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ex-text { flex: 1; font-family: var(--sans); font-size: 14px; color: var(--txt); line-height: 1.4; }
.ex-copy {
  flex-shrink: 0; background: transparent; border: 1px solid var(--line-2); color: var(--txt-dim);
  font-family: var(--mono); font-size: 10px; letter-spacing: .5px; padding: 4px 9px; cursor: pointer;
  transition: .12s; white-space: nowrap;
}
.ex-copy:hover { border-color: var(--amber); color: var(--amber); }
.ex-copy.done { background: var(--green); border-color: var(--green); color: #000; }
.ex-postpre {
  font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--txt);
  white-space: pre-wrap; word-wrap: break-word;
  background: #000; border: 1px solid var(--line); padding: 12px; max-height: 300px; overflow-y: auto;
}
.ex-post .ex-copy { margin-top: 10px; }
.ex-source { font-size: 12px; color: var(--txt-dim); word-break: break-all; }
.ex-src-row { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ex-src-row:last-child { border-bottom: 0; }
.ex-src-row b { color: var(--amber); font-weight: 700; margin-right: 6px; }
.ex-source a { color: var(--cyan); text-decoration: none; }
.ex-source a:hover { text-decoration: underline; }

/* ============================================================
   MERCADO — notícias como ativos (avaliação -> cotação)
   ============================================================ */
.q-up   { color: var(--green); }
.q-down { color: var(--red); }
.q-flat { color: var(--amber); }

/* valor = cor da qualidade (nota); variação = cor da direção */
.mvdir-up   { color: var(--green); }
.mvdir-down { color: var(--red); }
.mvdir-flat { color: var(--txt-mute); }
.wire-quote b, .m-quote b, .hl-q b { font-weight: 700; }
.wire-quote i, .m-quote i, .hl-q i { font-style: normal; font-size: 10px; font-weight: 700; }
/* destaque para ativos em ascensão */
.rising b { text-shadow: 0 0 8px currentColor; }
.rising i { text-shadow: 0 0 7px currentColor; animation: mvblink 1.3s ease-in-out infinite; }
.r-quote .rq-val, .r-quote .rq-chg, .r-quote .rq-label { transition: none; }
.q-strong { text-shadow: 0 0 8px currentColor; }
.mvpulse { animation: mvblink 1.8s ease-in-out infinite; }
.mvpulse.q-strong { animation-duration: .8s; }
@keyframes mvblink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* cotação na lista (wire) — pontuação + seta (home-broker) */
.wire-quote { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wq-score { font-weight: 700; font-size: 16px; }
.wq-arrow { font-style: normal; font-size: 11px; }
.wire-row.mv-up   { box-shadow: inset 3px 0 0 rgba(74,246,38,.5); }
.wire-row.mv-down { box-shadow: inset 3px 0 0 rgba(255,59,59,.55); }
.wire-row.mv-flat { box-shadow: inset 3px 0 0 rgba(255,158,27,.5); }
.wire-row.sel { box-shadow: inset 3px 0 0 var(--amber); }

/* cotação no board (monitor) */
.m-quote { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* cotação em destaque no leitor (STORY) */
.r-quote {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--line); background: #000; padding: 12px 14px; margin: 0 0 6px;
}
.r-quote .rq-score { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.r-quote .rq-score i { font-size: 13px; font-style: normal; color: var(--txt-mute); margin-left: 2px; }
.rq-info { display: flex; flex-direction: column; gap: 3px; }
.rq-info .rq-label { font-size: 10px; letter-spacing: 1.5px; color: var(--txt-mute); font-weight: 700; }
.rq-info .rq-chg { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rq-when { margin-left: auto; align-self: center; font-size: 12px; color: var(--txt-mute); font-variant-numeric: tabular-nums; }

/* ícone de selo na lista */
.wq-ic { font-style: normal; font-size: 11px; margin-right: 3px; }

/* Monitor — mini-gráficos (índices) estilo Bloomberg */
.stat { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; }
.stat .l { font-size: 10px; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: 17px; }
.stat .v small { font-size: 9px; color: var(--txt-mute); font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.spark { width: 100%; height: 22px; display: block; margin-top: 1px; }
.spark.breadth { height: 9px; }
