/* ======================================================================
   stats.css - Stats page specific elements that sit on top of docs.css.
   The page reuses doc-page/doc-shell/doc-section primitives, this file
   only adds the stat grid, market 24h split and details accordion that
   are unique to /stats.
   ====================================================================== */

.st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0 0;
}

.st-card {
    padding: 20px 22px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.15s ease-out;
}

.st-card:hover {
    background: color-mix(in srgb, var(--text) 3%, var(--bg));
}

.st-card-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
    opacity: 0.9;
}

.st-card-icon svg {
    width: 100%;
    height: 100%;
}

.st-card-label {
    font-family: var(--doc-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.st-card-value {
    font-family: var(--doc-mono);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.st-card-hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ======================================================================
   Market 24h split
   ====================================================================== */

.st-market {
    margin: 24px 0 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.st-market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}

.st-market-cell {
    padding: 22px 22px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.st-market-label {
    font-family: var(--doc-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.st-market-big {
    font-family: var(--doc-mono);
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.st-market-cell.positive .st-market-big { color: #22c55e; }
.st-market-cell.negative .st-market-big { color: #ef4444; }
.st-market-cell.neutral  .st-market-big { color: var(--text); }

.st-market-extra {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.st-market-extra strong {
    color: var(--text);
    font-family: var(--doc-mono);
    font-weight: 600;
}

@media (max-width: 720px) {
    .st-market-grid { grid-template-columns: 1fr; }
}

/* ======================================================================
   Empty state
   ====================================================================== */

.st-empty {
    margin: 24px 0 0;
    padding: 28px 22px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ======================================================================
   Native details accordion (for "Como interpretar" section)
   ====================================================================== */

.st-faq {
    margin: 12px 0 0;
    border-top: 1px solid var(--border);
}

.st-faq details {
    border-bottom: 1px solid var(--border);
}

.st-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color 0.15s ease-out;
}

.st-faq summary::-webkit-details-marker { display: none; }

.st-faq summary::after {
    content: '+';
    font-family: var(--doc-mono);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.2s ease-out;
    flex-shrink: 0;
}

.st-faq details[open] summary::after { transform: rotate(45deg); }

.st-faq summary:hover { color: var(--accent); }

.st-faq-body {
    padding: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: var(--doc-read);
}

.st-faq-body p { margin: 0 0 10px; }
.st-faq-body p:last-child { margin-bottom: 0; }

.st-faq-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.st-faq-body a:hover { color: var(--accent-hover); }

.st-faq-body strong { color: var(--text); font-weight: 600; }
