/* Crypto Exchanges: on top of ai-analysis.css + top-models.css + debit-cards.css */

/* rank | exchange | trust | volume | reserves | followers | trustpilot | scale | card */
.board-head, .b-row { grid-template-columns: 36px minmax(220px, 1.5fr) repeat(5, minmax(0, 1fr)) 92px 150px 84px 110px 86px; gap: 10px; }
.board-head > span, .board-head .sort-btn { justify-self: center; text-align: center; }
.board-head .sort-btn[data-sort="age"] { justify-self: start; }
.head-card { font-size: 0.68rem; letter-spacing: 0.5px; white-space: nowrap; }
.b-fill.vol { background: var(--lane-1); }
.b-fill.res { background: var(--lane-2); }
.b-inst, .b-card { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.b-inst small, .b-card small { font-size: 0.7rem; color: var(--text-muted); }
.card-link { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; color: var(--primary); border: 1px solid rgba(247, 147, 26, 0.45); white-space: nowrap; cursor: pointer; }
.card-link:hover { background: rgba(247, 147, 26, 0.12); }

/* Show all / top 100 */
.board-more {
    display: block; margin: 18px auto 4px; padding: 12px 28px; border-radius: 30px; cursor: pointer; font-family: inherit; font-size: 0.95rem; font-weight: 600;
    color: var(--primary); background: transparent; border: 1px solid rgba(247, 147, 26, 0.5); transition: background 0.2s ease;
}
.board-more:hover { background: rgba(247, 147, 26, 0.12); }
.board-more[hidden] { display: none; }

/* FAQ */
.faq-item { background: var(--surface); border: 1px solid rgba(0, 204, 255, 0.18); border-radius: 12px; margin-bottom: 14px; padding: 20px 24px; text-align: center; }
.faq-question { background: none; border: none; color: var(--accent); font-size: 1.08em; font-family: 'Figtree', sans-serif; font-weight: 600; cursor: pointer; width: 100%; text-align: center; padding: 0; }
.faq-answer { display: none; color: var(--ink); font-size: 1em; margin-top: 10px; line-height: 1.65; text-align: left; }
.faq-item.open .faq-answer { display: block; }

@media (max-width: 768px) {
    .board-head, .b-row { grid-template-columns: 26px 1fr 1fr 1fr; }
    .b-row { min-height: 150px; grid-template-areas: "rank name name name" "rank iq vol res" "rank spd task scale"; }
    .b-bar.vol-bar { grid-area: vol; }
    .b-bar.res-bar { grid-area: res; }
    .b-card { display: none; }
    .head-card { display: none; }
}
:root[data-theme="light"] .card-link { color: #b45309; border-color: rgba(180, 83, 9, 0.45); }
.b-inst small { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inst-badge { font-size: 0.8rem; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: rgba(38, 230, 164, 0.14); color: #26e6a4; white-space: nowrap; }
:root[data-theme="light"] .inst-badge { background: rgba(16, 185, 129, 0.12); color: #047857; }
@media (max-width: 768px) {
    .b-inst { display: none; }
}
/* Partly regulated: half shield in amber next to the name */
.b-provider .guard.part { color: #ffaa00; }
:root[data-theme="light"] .b-provider .guard.part { color: #b45309; }
/* LOCAL / REGIONAL badge: exchanges for residents of one or a few countries */
.tag.local { border-color: rgba(124, 140, 255, 0.5); color: #9ea9f5; font-weight: 700; letter-spacing: 0.4px; }
.tag.local .flag { width: 12px; margin: 0 1px 0 2px; }
:root[data-theme="light"] .tag.local { border-color: rgba(68, 82, 194, 0.45); color: #4452c2; }
/* Spot fee cell (reuses the .fee colour tiers from Crypto Cards) */
.b-spot { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.b-spot small { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 768px) { .b-spot { display: none; } }
/* High point: the exchange's strongest point */
.b-high { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.b-high .high { font-size: 0.74rem; font-weight: 600; line-height: 1.25; color: #ffd34d; max-width: 150px; }
.b-high .high i { margin-right: 3px; }
.b-high small { font-size: 0.68rem; color: var(--text-muted); }
:root[data-theme="light"] .b-high .high { color: #a16207; }
@media (max-width: 768px) { .b-high { display: none; } }
/* 12 columns: use the width of big screens */
.container { max-width: min(2200px, 96vw); }
/* Why use it: one line under the name, click opens the details */
.b-name .why { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; margin: 3px 0 4px; padding: 2px 9px; border-radius: 10px; font-size: 0.76rem; font-weight: 600; line-height: 1.3; color: #7fe3ff; background: rgba(0, 204, 255, 0.08); border: 1px solid rgba(0, 204, 255, 0.3); cursor: pointer; text-align: center; }
.b-name .why:hover, .b-name .why:focus-visible { background: rgba(0, 204, 255, 0.16); outline: none; }
.b-name .why.none { color: var(--text-muted); background: transparent; border-color: rgba(var(--fg), 0.18); font-weight: 500; }
.b-name .why .why-more { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.75; text-decoration: underline; }
:root[data-theme="light"] .b-name .why { color: #0369a1; background: rgba(3, 105, 161, 0.06); border-color: rgba(3, 105, 161, 0.3); }
:root[data-theme="light"] .b-name .why.none { color: var(--text-muted); background: transparent; border-color: rgba(0, 0, 0, 0.15); }
/* Why modal: one scroll area, the card */
.why-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 12, 0.72); backdrop-filter: blur(3px); }
.why-modal[hidden] { display: none; }
.why-card { position: relative; width: min(900px, 100%); max-height: 88vh; overflow-y: auto; background: rgb(20, 23, 34); border: 1px solid rgba(var(--fg), 0.15); border-radius: 18px; padding: 30px 34px 28px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55); text-align: center; }
.why-title { margin: 0 34px 12px; font-size: 1.45rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; }
.why-title .logo { width: 28px; height: 28px; border-radius: 6px; }
.why-aud { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 14px; font-size: 0.85rem; font-weight: 700; color: #7fe3ff; background: rgba(0, 204, 255, 0.1); border: 1px solid rgba(0, 204, 255, 0.35); }
.why-aud.none { color: var(--text-muted); background: transparent; border-color: rgba(var(--fg), 0.2); }
.why-short { margin: 16px 0 10px; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.why-text { margin: 0 auto 14px; max-width: 760px; font-size: 1rem; line-height: 1.65; color: var(--text-dim); text-align: left; }
.why-verdict { margin: 0 auto 14px; max-width: 760px; padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; line-height: 1.5; color: var(--text-dim); background: rgba(255, 170, 0, 0.07); border: 1px solid rgba(255, 170, 0, 0.25); text-align: left; }
.why-verdict i { color: #ffaa00; margin-right: 4px; }
.why-src { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 18px; word-break: break-word; }
.why-src a { color: var(--accent); }
.why-go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; border-radius: 26px; font-weight: 700; color: var(--primary); border: 1px solid rgba(247, 147, 26, 0.5); text-decoration: none; }
.why-go:hover { background: rgba(247, 147, 26, 0.12); }
.why-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(var(--fg), 0.15); background: transparent; color: var(--text-dim); font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
body.why-open { overflow: hidden; }
:root[data-theme="light"] .why-card { background: #fff; box-shadow: 0 18px 48px rgba(20, 24, 40, 0.2); }
:root[data-theme="light"] .why-aud { color: #0369a1; background: rgba(3, 105, 161, 0.07); border-color: rgba(3, 105, 161, 0.3); }
:root[data-theme="light"] .why-verdict { background: rgba(180, 83, 9, 0.06); border-color: rgba(180, 83, 9, 0.25); }
@media (max-width: 768px) { .why-card { padding: 24px 18px 20px; } .why-title { font-size: 1.15rem; } }
