/* QUANTUM MINER — direcao "STUDIO" (escolhida 09/10/2026): fundo cinza de estudio emendando com a foto de produto do
   cryostat, etiquetas pretas presas na foto com dado real, titulo condensado gigante (Anton), placar em numeros enormes,
   folhas brancas com borda de 2px para tabelas. Azul = chip quantico, ambar = humanos. Abas sem rolagem. */
:root {
  --fundo: #e3e4e3;
  --folha: #ffffff;
  --tinta: #111111;
  --cinza: #6b6b70;
  --linha: #d2d2d6;
  --azul: #1f5eff;
  --azul-escuro: #1443c9;
  --ambar: #f08a00;
  --ambar-escuro: #b56600;
  --verde: #0f9d58;
  --vermelho: #d93025;
  --topo-h: 64px;
  --rodape-h: 28px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; margin: 0; }
body { background: var(--fundo); color: var(--tinta); font-family: "Inter Tight", system-ui, sans-serif; font-weight: 400; line-height: 1.4; -webkit-font-smoothing: antialiased; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
a { color: inherit; text-decoration: none; }
b { font-weight: 700; }
h1, h2 { font-family: "Anton", "Inter Tight", sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }

/* ---------- topo ---------- */
.topo { height: var(--topo-h); background: var(--folha); border-bottom: 1px solid #d4d4d8; display: flex; align-items: center; gap: 40px; padding: 0 40px; }
.logo { font-family: "Anton", sans-serif; font-size: 26px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.logo span { color: var(--azul); }
.abas { display: flex; gap: 26px; height: 100%; }
.abas a { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--cinza); border-bottom: 3px solid transparent; padding-top: 3px; }
.abas a.ativa { color: var(--tinta); border-bottom-color: var(--ambar); }
.topo-dir { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.ticker { display: flex; gap: 20px; font-size: 11px; color: var(--cinza); letter-spacing: .04em; white-space: nowrap; }
.ticker b { color: var(--tinta); font-weight: 700; }
.ca { background: var(--tinta); color: #fff; padding: 7px 12px; font-size: 11px; display: flex; align-items: center; gap: 8px; font-family: "JetBrains Mono", monospace; max-width: 40vw; }
.ca-rotulo { color: var(--ambar); font-weight: 700; }
.ca-texto { overflow: hidden; white-space: nowrap; text-overflow: clip; }
.ca-copiar { border-left: 1px solid #555; padding-left: 8px; cursor: pointer; }
.x-link { border: 2px solid var(--tinta); padding: 5px 11px; font-size: 13px; font-weight: 800; }

/* ---------- abas ---------- */
main { height: calc(100% - var(--topo-h) - var(--rodape-h)); position: relative; }
.aba { display: none; height: 100%; padding: 0 40px; }
.aba.ativa { display: flex; flex-direction: column; }
.so-celular { display: none !important; }
.olho { font-size: 12px; color: var(--ambar); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 0 0 8px; }
h1 { font-size: min(104px, 11vh); line-height: .92; margin: 0 0 14px; }
h1 span { color: var(--azul); }
h2 { font-size: clamp(30px, 4.4vh, 44px); line-height: 1; margin: 0; }
.chamada { font-size: 16px; line-height: 1.5; color: #3d3d42; max-width: 58ch; margin: 0 0 18px; }

/* ---------- live ---------- */
.live-grade { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 36px; flex: 1; min-height: 0; min-width: 0; padding-top: 18px; padding-bottom: 14px; }
.foto { grid-column: 1; grid-row: 1 / 3; margin: 0; position: relative; height: 100%; aspect-ratio: 1120 / 1390; }
.foto img { width: 100%; height: 100%; display: block; }
.foto figcaption { position: absolute; left: 0; right: 0; bottom: -2px; font-size: 10px; color: var(--cinza); letter-spacing: .04em; text-align: center; }
.pin { position: absolute; display: flex; align-items: center; }
.pin .cx { background: var(--tinta); color: #fff; padding: 7px 11px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pin .cx b { color: #ffb84d; font-weight: 700; } .pin .cx i { color: #8fb0ff; font-style: normal; } .pin .cx u { color: #7ee0a8; text-decoration: none; }
.pin .linha { width: 64px; height: 1px; background: var(--tinta); }
.pin .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--tinta); flex: none; }
.pin.inv .linha { width: 56px; }
.live-p1 { grid-column: 2; grid-row: 1; padding-top: 14px; min-width: 0; }
.placar { display: flex; gap: 40px; align-items: flex-end; margin-bottom: 14px; }
.placar .n { font-family: "Anton", sans-serif; font-size: min(92px, 9.6vh); line-height: .9; display: block; }
.placar .n small { font-size: .38em; letter-spacing: .04em; }
.placar .t { font-size: 12px; color: var(--cinza); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; display: block; margin-top: 8px; }
.placar .q .n { color: var(--azul); } .placar .h .n { color: var(--ambar); }
.chip-status { font-size: 14px; margin: 0; display: flex; align-items: center; gap: 10px; color: #3d3d42; }
.chip-status b { color: var(--tinta); }
.luz { width: 10px; height: 10px; border-radius: 50%; background: var(--cinza); flex: none; }
.luz.fila { background: var(--ambar); animation: pisca 1.4s infinite; }
.luz.roda { background: var(--azul); animation: pisca .6s infinite; }
.luz.ok { background: var(--verde); }
.luz.ruim { background: var(--vermelho); }
@keyframes pisca { 50% { opacity: .25; } }
.live-p3 { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; min-height: 0; min-width: 0; }
.meu { background: var(--folha); border: 2px solid var(--tinta); padding: 12px 18px 10px; min-width: 0; }
.meu .cab { display: flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.meu .cab span:nth-child(2) { margin-left: auto; color: var(--ambar); }
.bt-mini { font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--tinta); color: #fff; border: 0; padding: 5px 10px; cursor: pointer; }
.meu-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 4px; }
.meu-grade .n { font-family: "Anton", sans-serif; font-size: 30px; line-height: 1; display: block; }
.meu-grade .t { font-size: 11px; color: var(--cinza); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.meu-linha { font-size: 11px; color: var(--cinza); margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meu.achou { animation: brilha .9s; }
@keyframes brilha { 0% { background: #fff1d6; } 100% { background: var(--folha); } }
.cab2 { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--cinza); font-weight: 700; margin-bottom: 10px; }
.blocos { display: flex; gap: 12px; align-items: stretch; overflow: hidden; min-width: 0; }
.bl { flex: 0 0 150px; height: 92px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.14); min-width: 0; }
.bl b { font-family: "Anton", sans-serif; font-size: 20px; font-weight: 400; display: block; letter-spacing: .02em; }
.bl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.bl.q { background: var(--azul); } .bl.h { background: var(--ambar); color: #1a1200; } .bl.f { background: var(--ambar); color: #1a1200; outline: 2px dashed #7a4d08; outline-offset: -5px; } .bl.g { background: #555; }
.bl.min { background: var(--folha); color: var(--tinta); border: 2px dashed var(--ambar); box-shadow: none; }
.bl.novo { animation: brilha .9s; }
.divisor { border-left: 2px dashed #9a9a9f; margin: 0 4px; flex: none; }

/* ---------- folhas (chain, log, how) ---------- */
.duas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; flex: 1; min-height: 0; padding: 18px 0 16px; }
.folha { background: var(--folha); border: 2px solid var(--tinta); padding: 18px 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.folha-cab { margin-bottom: 12px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; font-weight: 700; color: var(--cinza); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-bottom: 2px solid var(--tinta); }
.tabela td { padding: 8px 8px; border-bottom: 1px solid var(--linha); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.tabela td.num { font-family: "Anton", sans-serif; font-size: 18px; }
.tabela tbody tr { cursor: pointer; }
.tabela tbody tr:hover, .tabela tbody tr.sel { background: #f3f3f5; }
.q-txt { color: var(--azul); font-weight: 700; } .h-txt { color: var(--ambar-escuro); font-weight: 700; } .ok-txt { color: var(--verde); font-weight: 700; } .ruim-txt { color: var(--vermelho); font-weight: 700; }
.pager-controles { display: flex; justify-content: center; align-items: center; gap: 16px; padding-top: 10px; font-size: 12px; color: var(--cinza); margin-top: auto; }
.seta { background: var(--folha); border: 2px solid var(--tinta); color: var(--tinta); font: inherit; padding: 3px 12px; cursor: pointer; }
.seta:disabled { opacity: .3; cursor: default; }
.det-titulo { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.det-sub { font-size: 12px; color: var(--cinza); margin: 0 0 10px; }
.det-lista { font-size: 13px; margin: 0; padding: 0; list-style: none; }
.det-lista li { padding: 6px 0; border-bottom: 1px solid var(--linha); display: flex; justify-content: space-between; gap: 12px; }
.det-lista li span:first-child { color: var(--cinza); font-family: "JetBrains Mono", monospace; font-size: 11px; }
.det-nota { font-size: 12px; color: var(--cinza); margin: 8px 0 0; }
.det-nonces { margin-top: 10px; }
.chip-nonce { display: inline-block; border: 1px solid var(--linha); padding: 2px 6px; margin: 2px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--cinza); }
.chip-nonce.ok { border-color: var(--azul); color: var(--azul); }
.chip-nonce.sel { background: var(--azul); color: #fff; border-color: var(--azul); }
.det-circuito { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #111; padding: 8px; }
.det-circuito img { max-width: 100%; max-height: 100%; }
#det-hist { width: 100%; height: 110px; margin-top: 10px; }
.barra { fill: #cfcfd4; } .barra.valida { fill: #8fb0ff; } .barra.vence { fill: var(--azul); }
.eixo-txt { fill: var(--cinza); font-size: 11px; font-family: "JetBrains Mono", monospace; }

/* ---------- how ---------- */
.duas.how { grid-template-columns: 1.2fr 1fr; }
.passos { margin: 0; padding: 0; list-style: none; }
.passos li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linha); font-size: 14px; color: #3d3d42; line-height: 1.45; }
.passos li:last-child { border-bottom: 0; }
.passos .num { font-family: "Anton", sans-serif; font-size: 34px; color: var(--azul); line-height: 1; flex: none; width: 54px; }
.passos b { color: var(--tinta); display: block; font-size: 16px; margin-bottom: 2px; }
.perguntas details { border-bottom: 1px solid var(--linha); padding: 8px 0; }
.perguntas summary { cursor: pointer; font-size: 15px; font-weight: 700; list-style: none; }
.perguntas summary::before { content: "+ "; color: var(--ambar); }
.perguntas details[open] summary::before { content: "– "; }
.perguntas p { margin: 6px 0 0; color: #3d3d42; font-size: 13px; line-height: 1.45; }

/* telas baixas (laptop): tira a chamada para a aba Live caber sem rolagem */
@media (max-height: 790px) and (min-width: 861px) {
  .chamada { display: none; }
  .live-grade { padding-top: 12px; }
  .placar { margin-bottom: 10px; }
  .live-p3 { gap: 12px; }
}

/* ---------- rodape ---------- */
.rodape { height: var(--rodape-h); display: flex; align-items: center; gap: 28px; padding: 0 40px; font-size: 11px; color: var(--cinza); border-top: 1px solid #d4d4d8; white-space: nowrap; overflow: hidden; }
.rodape span:last-child { margin-left: auto; }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  :root { --topo-h: 48px; --rodape-h: 54px; }
  .topo { padding: 0 12px; gap: 10px; }
  .logo { font-size: 20px; }
  .ticker { display: none; }
  .abas { position: fixed; left: 0; right: 0; bottom: 0; height: 54px; background: var(--folha); border-top: 2px solid var(--tinta); z-index: 5; }
  .abas a { flex: 1; justify-content: center; padding: 0; font-size: 12px; border-bottom: none; border-top: 3px solid transparent; }
  .abas a.ativa { border-top-color: var(--ambar); }
  .rodape { display: none; }
  .ca { max-width: 56vw; font-size: 11px; }
  main { height: calc(100% - var(--topo-h) - var(--rodape-h)); }
  .aba { padding: 0 14px; }
  .so-celular { display: flex !important; }
  /* live vira 3 paginas: [titulo+placar+status] [foto] [seu minerador+corrente] */
  /* a aba e a janela de recorte; o grid e o trilho que desliza (overflow hidden no trilho cortaria as colunas 2 e 3) */
  #aba-live { overflow: hidden; padding: 0; }
  .live-p1, .live-p3 { padding-left: 14px; padding-right: 14px; }
  .foto { width: calc(100% - 28px); margin: 0 14px; }
  .pin .cx { white-space: normal; max-width: 62vw; }
  .cab2 { flex-direction: column; gap: 2px; }
  .blocos { flex-wrap: wrap; }
  .live-grade { display: grid; grid-template-columns: none; grid-template-rows: minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: 100%; gap: 0; overflow: visible; transition: transform .35s; padding: 12px 0 0; }
  .live-p1, .foto, .live-p3 { grid-column: auto; grid-row: auto; min-height: 0; overflow: hidden; }
  .live-p1 { padding-top: 0; }
  h1 { font-size: min(72px, 9vh); }
  .chamada { font-size: 14px; margin-bottom: 14px; }
  .placar { gap: 22px; }
  .placar .n { font-size: 60px; }
  .placar .t { font-size: 10px; }
  .chip-status { font-size: 13px; }
  .foto { height: auto; aspect-ratio: 1120 / 1390; align-self: start; }
  .pin .cx { font-size: 11px; padding: 6px 9px; }
  .pin .linha { width: 36px; }
  .live-p3 { justify-content: flex-start; gap: 14px; }
  .meu-grade { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .meu-grade .n { font-size: 32px; }
  .bl { flex: 0 0 calc(50% - 6px); }
  .bl:nth-child(n+9) { display: none; }
  .duas, .duas.how { grid-template-columns: 100%; padding: 12px 0 10px; }
  .detalhe, .perguntas-folha { display: none; }
  .folha { padding: 14px 14px; }
  .passos li { font-size: 13px; }
  .passos .num { font-size: 26px; width: 40px; }
  .tabela { font-size: 12px; }
  .tabela td { padding: 8px 5px; max-width: 110px; }
  #chain-tabela th:nth-child(2), #chain-tabela td:nth-child(2), #chain-tabela th:nth-child(6), #chain-tabela td:nth-child(6), #chain-tabela th:nth-child(8), #chain-tabela td:nth-child(8) { display: none; }
  #log-tabela th:nth-child(3), #log-tabela td:nth-child(3), #log-tabela th:nth-child(4), #log-tabela td:nth-child(4), #log-tabela th:nth-child(7), #log-tabela td:nth-child(7) { display: none; }
}
