/* Respiro — ritmo de espaçamento único do site.
   Carregado por último. Só altera margens, paddings e gaps; não muda cores, fontes nem ordem das seções.
   Para reverter: remover o <link> de respiro.css em build.mjs. */
:root{--bh-section:40px;--bh-card:28px;--bh-card-y:28px;--bh-stack:16px;--bh-grid:24px}
@media(max-width:700px){:root{--bh-section:28px;--bh-card:20px;--bh-card-y:22px;--bh-stack:14px;--bh-grid:20px}}

/* 1. Distância entre os blocos principais da página */
html body main>:is(section,aside,div,nav,article,details)+:is(section,aside,div,nav,article,details){margin-top:var(--bh-section)!important}
html body main>:first-child{margin-top:0}
html body .workspace-grid{gap:var(--bh-grid)!important}

/* 2. Margem interna dos cartões */
html body :is(.data-section,.chart-panel,.calculator,.quick-converter,.coins-section,.favorites-panel,.pro-panel):not(.news-editorial-page *):not(.news-editorial-page){padding:var(--bh-card-y) var(--bh-card)!important}
html body .workspace-grid>.market{padding:0!important}

/* 3. Ritmo dentro dos cartões: título → texto → controles */
html body :is(.data-section,.chart-panel,.calculator,.coins-section,.pro-panel)>:is(h2,h3){margin-bottom:12px}
html body :is(.data-section,.chart-panel,.calculator,.coins-section,.pro-panel)>p{margin-top:0;margin-bottom:var(--bh-stack)}
html body :is(.data-section,.calculator)>:is(label,details,form,.table-scroll,.metric-grid)+:is(label,details,form,.table-scroll,.metric-grid,p){margin-top:var(--bh-stack)}

/* 4. Listas de atalhos e grades de cartões */
html body .topic-shortcuts{gap:16px!important}
html body .metric-grid{gap:16px}

/* 5. Página de moeda */
html body .token-detail .token-header{margin:8px 0 20px}
html body .token-detail .token-nav{margin:24px 0}
html body .token-detail .token-layout{gap:32px}
html body .token-detail .token-panel{margin-bottom:32px;padding-bottom:28px}
@media(max-width:900px){html body .token-detail .token-layout{gap:24px}}

/* 6. Coins: ferramenta de busca separada da tabela */
html body .coins-toolbar{margin-bottom:20px!important;gap:16px!important}

/* 7. Seletores de período não quebram linha com o cartão mais espaçado */
html body .periods button{white-space:nowrap}

/* Faixa de cotações do topo: cada dado como um bloco (rótulo em cima, valor embaixo). */
html body .header-quotes{display:grid!important;grid-template-columns:repeat(7,minmax(0,auto));justify-content:stretch!important;gap:0!important;padding:10px clamp(16px,3vw,40px)!important;overflow:visible!important;font-size:14px!important;line-height:1.25!important;flex-wrap:initial!important}
html body .header-quotes .hq-item{display:flex;flex-direction:column;gap:3px;min-width:0;padding:2px 18px;border-left:1px solid var(--hq-line,#e3e8df);white-space:nowrap}
html body .header-quotes .hq-item:first-child{border-left:0;padding-left:0}
html body .header-quotes .hq-label{font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--hq-muted,#66746b)}
html body .header-quotes .hq-value{font-size:14px;font-weight:700;color:var(--hq-text,#101411);font-variant-numeric:tabular-nums}
html body .header-quotes .hq-btc .hq-value{font-size:15px}
html body .header-quotes .hq-value small{font-size:12px;margin-left:4px;font-weight:650}
html body .header-quotes .hq-value.quote-discount{color:#236745}
html body .header-quotes .hq-value.quote-premium{color:#a0312b}
html[data-theme=dark] body .header-quotes{--hq-line:#2b323b;--hq-muted:#8f98a4;--hq-text:#eaecef}
html[data-theme=dark] body .header-quotes .hq-value.quote-discount{color:#3bdaa2}
html[data-theme=dark] body .header-quotes .hq-value.quote-premium{color:#ff7180}
@media(max-width:1100px){html body .header-quotes .hq-item{padding:2px 12px}html body .header-quotes .hq-value{font-size:13px}}
@media(max-width:900px){
 html body .header-quotes{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:10px!important;padding:10px 16px!important}
 html body .header-quotes .hq-item{padding:0 10px;white-space:normal}
 html body .header-quotes .hq-item:nth-child(4n+1){border-left:0;padding-left:0}
 html body .header-quotes .hq-implied{border-left:0;padding-left:0}
 html body .header-quotes .hq-usd{padding-left:10px;border-left:1px solid var(--hq-line,#e3e8df)}
 html body .header-quotes .hq-range{grid-column:span 2}
 html body .header-quotes .hq-label{font-size:10px}
 html body .header-quotes .hq-value,html body .header-quotes .hq-btc .hq-value{font-size:13px}
}
@media(max-width:420px){html body .header-quotes .hq-item{padding:0 7px}html body .header-quotes .hq-value,html body .header-quotes .hq-btc .hq-value{font-size:12px}html body .header-quotes .hq-value small{font-size:11px;margin-left:2px}}
/* A faixa começa depois da barra lateral fixa (mesmo recuo do conteúdo). */
html body .header-quotes{margin-left:190px;padding-left:24px!important}
@media(max-width:1100px){html body .header-quotes{margin-left:150px}}
@media(max-width:700px){html body .header-quotes{margin-left:0;padding-left:16px!important}}

/* Sugestões de busca (autocomplete.js) */
.bh-ac{position:absolute;z-index:1200;max-height:min(380px,60vh);overflow:auto;padding:6px;background:#fff;border:1px solid #d9dfd5;border-radius:14px;box-shadow:0 18px 40px -18px rgba(16,20,17,.35);font-size:14px}
.bh-ac[hidden]{display:none}
.bh-ac-item{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:10px;color:#101411;text-decoration:none;cursor:pointer;min-width:0}
.bh-ac-item[aria-selected=true]{background:#f3ffc2;outline:1px solid #cfe63a}
.bh-ac-item img,.bh-ac-glyph{flex:0 0 24px;width:24px;height:24px;border-radius:50%;object-fit:cover}
.bh-ac-glyph{display:grid;place-items:center;background:#101411;color:#dfff19;font-size:12px;font-weight:800}
.bh-ac-text{display:flex;flex-direction:column;min-width:0;flex:1}
.bh-ac-text strong{font-weight:650;line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.bh-ac-text small{color:#5c6a61;font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bh-ac mark{background:#dfff19;color:#101114;border-radius:3px;padding:0 1px}
.bh-ac-empty{margin:0;padding:12px;color:#5c6a61}
html[data-theme=dark] .bh-ac{background:#181a20;border-color:#2e3440;box-shadow:0 18px 40px -18px rgba(0,0,0,.8)}
html[data-theme=dark] .bh-ac-item{color:#eaecef}
html[data-theme=dark] .bh-ac-item[aria-selected=true]{background:#262b1a;outline-color:#6b7a1a}
html[data-theme=dark] .bh-ac-text small,html[data-theme=dark] .bh-ac-empty{color:#9aa3ae}
/* Respiro extra (auditoria de espaçamento): títulos colados em listas, botão colado em tabela, cards de notícia no celular. */
html body .coins-columns-toggle{margin-bottom:12px!important}
html body .mv-grid h3{margin-bottom:10px!important}
html body .mv-status{margin-top:12px!important}
@media(max-width:700px){html body .home-news-card+.home-news-card{margin-top:4px}html body .home-news-list,html body .home-news-grid{gap:16px!important}}
