/* Crypto trading strategies: popular strategies backtested on BTC and ETH, plus the evidence for the rest. */
:root {
    --primary: #f7931a;
    --bg-dark: #0f111a;
    --card-bg: rgba(var(--fg), 0.03);
    --card-border: rgba(var(--fg), 0.08);
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --accent: #00ccff;
    --green: #26e6a4;
    --red: #ff5c5c;
    --amber: #ffc94a;
    --violet: #a78bfa;
    --ink: #fff;
    --fg: 255, 255, 255;
    --bg-rgb: 15, 17, 26;
    --grid: rgba(255, 255, 255, 0.07);
}

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

html, body { width: 100%; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Figtree', sans-serif;
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% -20%, #1e2130, #0f111a);
    min-height: 100vh;
}

.top-nav {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--bg-rgb), 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo-link { display: flex; align-items: center; text-decoration: none; color: var(--text-main); gap: 12px; transition: transform 0.2s ease; }
.logo-link:hover { transform: scale(1.02); }
.nav-logo { height: 32px; width: auto; }
.nav-date { font-size: 0.85rem; color: var(--text-dim); letter-spacing: 1px; }

.container { width: 100%; max-width: 1680px; min-width: 0; margin: 0 auto; padding: 40px 24px; }

header { text-align: center; margin-bottom: 40px; animation: fadeInDown 0.8s ease-out; }

.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.75rem; letter-spacing: 2px; color: var(--primary);
    border: 1px solid rgba(247, 147, 26, 0.3); background: rgba(247, 147, 26, 0.07);
    padding: 6px 16px; border-radius: 20px; margin-bottom: 16px;
}

h1 {
    font-size: 3.2rem; font-weight: 300;
    background: linear-gradient(135deg, var(--primary), #ffc107);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 10px; letter-spacing: -1px;
}

.subheader { font-size: 1.1rem; color: var(--text-dim); max-width: 760px; margin: 0 auto; }
.subheader strong { color: var(--text-main); font-weight: 400; }

/* KPIs */
.kpis { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.kpi {
    min-width: 170px; padding: 16px 22px; text-align: center;
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px;
}
.kpi-num { font-size: 1.9rem; font-weight: 600; color: var(--ink); line-height: 1.2; display: flex; align-items: center; justify-content: center; gap: 8px; }
.kpi-num i { font-size: 1.3rem; color: var(--primary); }
.kpi-num .up { color: var(--green); }
.kpi-num .down { color: var(--red); }
.kpi-label { font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
.kpi-split { display: flex; justify-content: center; gap: 6px; font-size: 1.25rem; }
.kpi-split span { display: inline-flex; align-items: center; gap: 4px; }

/* quick nav */
.quick-nav {
    position: sticky; top: 72px; z-index: 900;
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 36px;
    background: rgba(var(--bg-rgb), 0.85); backdrop-filter: blur(10px);
    border: 1px solid var(--card-border); border-radius: 30px;
}
.quick-nav a {
    font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-dim); text-decoration: none;
    padding: 7px 16px; border: 1px solid var(--card-border); border-radius: 20px;
    transition: all 0.25s ease; display: inline-flex; align-items: center; gap: 6px;
}
.quick-nav a:hover { color: var(--accent); border-color: var(--accent); background: rgba(0, 204, 255, 0.07); }

.section { margin-bottom: 60px; scroll-margin-top: 150px; }
#section-faq { scroll-margin-top: 150px; }
.section-title {
    font-size: 1.7rem; font-weight: 300; color: var(--accent); letter-spacing: 1px;
    margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.section-title.gold { color: var(--primary); }
.section-desc { color: var(--text-dim); font-size: 0.95rem; margin: 0 auto 24px; max-width: 860px; text-align: center; }
.section-desc strong { color: var(--text-main); font-weight: 400; }
.count-badge {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; color: var(--accent);
    border: 1px solid rgba(0, 204, 255, 0.35); background: rgba(0, 204, 255, 0.07);
    padding: 2px 12px; border-radius: 14px;
}

.chart-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; padding: 22px 26px; }
.chart-head { display: flex; justify-content: center; margin-bottom: 8px; }
.chart-title { font-size: 0.95rem; font-weight: 600; color: var(--ink); text-align: center; }
.chart-title small { font-weight: 400; color: var(--text-dim); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }

/* legend */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-dim); }
.lg-item { display: inline-flex; align-items: center; gap: 8px; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; }
.lg-sw { width: 18px; height: 4px; border-radius: 2px; }
.lg-sw.nq { background: var(--nq); }
.lg-sw.btc { background: var(--btc); }
.lg-rule { width: 22px; height: 0; border-top: 1px solid var(--text-dim); }

/* svg marks */
.ax-line { stroke: var(--grid); stroke-width: 1; }
.ax-zero { stroke: rgba(var(--fg), 0.28); stroke-width: 1; }
.ax-text { fill: var(--text-dim); font-size: 12px; font-family: 'Figtree', sans-serif; }
.ax-text.mid { text-anchor: middle; }
.ax-text.end { text-anchor: end; }
.ax-title { fill: var(--text-dim); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; text-anchor: middle; font-family: 'Figtree', sans-serif; }
.ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln.btc { stroke: var(--btc); }
.ln.nq { stroke: var(--nq); }
.dot { stroke: rgba(var(--bg-rgb), 1); stroke-width: 2; cursor: pointer; }
.dot:hover { stroke: var(--ink); }
.ref-line { stroke: var(--text-dim); stroke-width: 1; opacity: 0.6; }
.bar.btc { fill: var(--btc); }
.bar.nq { fill: var(--nq); }
.bar-hit { fill: transparent; cursor: pointer; }
.bar-hit:hover { fill: rgba(var(--fg), 0.05); }
.bar-label { fill: var(--text-main); font-size: 12px; font-weight: 600; text-anchor: middle; font-family: 'Figtree', sans-serif; }
.cross { stroke: rgba(var(--fg), 0.35); stroke-width: 1; pointer-events: none; }
.end-label { fill: var(--text-main); font-size: 12px; font-weight: 600; font-family: 'Figtree', sans-serif; }

/* tooltip */
.tooltip {
    position: fixed; z-index: 2000; pointer-events: none; max-width: 360px;
    font-size: 0.85rem; color: var(--text-main); text-align: center; line-height: 1.45;
    background: rgba(var(--bg-rgb), 0.97); border: 1px solid var(--card-border);
    padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
.tooltip[hidden] { display: none; }
.tooltip b { color: var(--ink); font-weight: 600; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 18px; }
.tooltip .tt-k { color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.tooltip .sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tooltip .sw.btc { background: var(--btc); }
.tooltip .sw.nq { background: var(--nq); }
.tooltip .tt-note { color: var(--text-dim); font-size: 0.8rem; margin-top: 4px; }

/* filter bar */
.filter-bar {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
    margin: 0 auto 22px; width: fit-content; padding: 14px 18px; max-width: 1400px;
    border: 1px solid var(--card-border); border-radius: 22px; background: var(--card-bg);
}
.chip-sep { font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin: 0 4px 0 14px; }
.chip-sep:first-child { margin-left: 0; }
.f-chip {
    font-family: inherit; font-size: 0.85rem; color: var(--text-dim); cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 20px; border: 1px solid var(--card-border); background: transparent;
    transition: all 0.2s ease;
}
.f-chip:hover { color: var(--ink); border-color: rgba(var(--fg), 0.25); }
.f-chip.on { color: var(--ink); border-color: var(--accent); background: rgba(0, 204, 255, 0.12); }

/* stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { text-align: center; padding: 18px 16px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.stat-num small { font-size: 1rem; font-weight: 400; color: var(--text-dim); }
.stat-label { font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
.stat-sub { font-size: 0.85rem; color: var(--text-dim); margin-top: 6px; }
.stat-sub b { color: var(--text-main); font-weight: 600; }
.up { color: var(--green); }
.down { color: var(--red); }
.dim { color: var(--text-dim); }

/* tables */
.table-wrap { overflow: clip; border-radius: 20px; border: 1px solid var(--card-border); background: var(--card-bg); }
.year-wrap { margin-top: 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
    position: sticky; top: 0; z-index: 2; text-align: center; white-space: nowrap;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-dim);
    padding: 12px 10px; background: rgba(var(--bg-rgb), 0.98); border-bottom: 1px solid var(--card-border);
}
.data-table th small { display: block; font-size: 0.66rem; letter-spacing: 0.5px; text-transform: none; font-weight: 400; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover, .data-table th.on { color: var(--accent); }
.data-table td { text-align: center; padding: 9px 10px; border-bottom: 1px solid var(--card-border); vertical-align: middle; white-space: nowrap; }
.data-table td small { display: block; font-size: 0.74rem; color: var(--text-dim); }

.data-table td b { color: var(--ink); font-weight: 600; }

/* status badges (icon + label, never colour alone) */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; padding: 2px 10px; border-radius: 12px; border: 1px solid; white-space: nowrap; }
.st-good { color: var(--green); border-color: rgba(38, 230, 164, 0.4); background: rgba(38, 230, 164, 0.08); }
.st-mid { color: var(--amber); border-color: rgba(255, 201, 74, 0.4); background: rgba(255, 201, 74, 0.08); }
.st-bad { color: var(--red); border-color: rgba(255, 92, 92, 0.4); background: rgba(255, 92, 92, 0.08); }
.st-dim { color: var(--text-dim); border-color: var(--card-border); }

/* events table */
.ev-table tbody tr.ev { cursor: pointer; transition: background 0.15s ease; }
.ev-table tbody tr.ev:hover, .ev-table tbody tr.ev.open { background: rgba(var(--fg), 0.04); }
.ev-table td.name { white-space: normal; min-width: 170px; max-width: 240px; }
.ev-table td.name b { color: var(--ink); font-weight: 600; }
.ev-table td.amt b { color: var(--ink); font-weight: 700; }
.ev-table td.txt { white-space: normal; text-align: left; min-width: 260px; max-width: 420px; font-size: 0.82rem; color: var(--text-dim); line-height: 1.4; }
.ev-table .chev { display: inline-block; transition: transform 0.2s ease; color: var(--text-dim); }
.ev-table tr.open .chev { transform: rotate(90deg); }
.ev-table tr.detail td { padding: 18px 22px 22px; background: rgba(var(--fg), 0.02); white-space: normal; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.story-block { padding: 10px 14px; border-radius: 12px; background: rgba(var(--fg), 0.03); }
.story-block h4 { font-size: 0.72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); font-weight: 600; text-align: center; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.story-block p { font-size: 0.9rem; color: var(--text-main); line-height: 1.5; text-align: left; }
.story-block.full { grid-column: 1 / -1; }
.src-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.src-list a { font-size: 0.8rem; color: var(--accent); text-decoration: none; padding: 3px 10px; border-radius: 10px; border: 1px solid var(--card-border); }
.src-list a:hover { border-color: var(--accent); }
.f-chip .lg-dot { width: 9px; height: 9px; }
.f-search {
    font-family: inherit; font-size: 0.85rem; color: var(--text-main); text-align: center;
    padding: 7px 16px; border-radius: 20px; border: 1px solid var(--card-border); background: transparent;
    min-width: 240px; margin-left: 14px; outline: none;
}
.f-search:focus { border-color: var(--accent); }

/* tips */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.why-card { padding: 22px 24px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); border-top: 4px solid var(--c, var(--card-border)); }
.why-head { text-align: center; margin-bottom: 10px; }
.why-head i { font-size: 1.6rem; color: var(--c, var(--primary)); }
.why-head h3 { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin-top: 4px; }
.why-card ul { list-style: none; display: grid; gap: 8px; }
.why-card li { position: relative; padding-left: 22px; font-size: 0.9rem; color: var(--text-dim); text-align: left; }
.why-card li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 1px; color: var(--green); }
.why-card li.no::before { content: '\F623'; color: var(--red); }
.why-card li b { color: var(--text-main); font-weight: 600; }

/* method */
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.method-card { text-align: center; padding: 22px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); }
.method-card i { font-size: 1.8rem; color: var(--primary); }
.method-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 8px 0 6px; }
.method-card p { font-size: 0.9rem; color: var(--text-dim); text-align: left; }
@media (max-width: 1100px) { .method-grid { grid-template-columns: 1fr; } }

.source-note { text-align: center; font-size: 0.82rem; color: var(--text-dim); max-width: 960px; margin: 0 auto; }
.source-note a { color: var(--accent); }
.empty { text-align: center; color: var(--text-dim); padding: 40px; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

@media (max-width: 1400px) {
    .rank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .rank-grid, .cmp-grid { grid-template-columns: 1fr; }
    .top-nav { padding: 16px 18px; }
    h1 { font-size: 2.3rem; }
}

/* light skin */
:root[data-theme="light"] {
    --bg-dark: #f4f6fa;
    --card-bg: #ffffff;
    --card-border: rgba(20, 24, 40, 0.12);
    --text-main: #1a1d29;
    --text-dim: #4a5068;
    --accent: #0277b5;
    --green: #047857;
    --red: #dc2626;
    --amber: #b45309;
    --ink: #0b0d14;
    --fg: 20, 24, 40;
    --bg-rgb: 255, 255, 255;
    --grid: rgba(20, 24, 40, 0.08);
    --crypto: #c2610a;
    --bank: #0277b5;
    --broker: #6d4fd8;
    --exch: #0f8a73;
}
:root[data-theme="light"] body { background: radial-gradient(circle at 50% -20%, #ffffff, #eef1f6); }
:root[data-theme="light"] h1 { background: linear-gradient(135deg, #c2410c, #e88a00); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .status-badge,
:root[data-theme="light"] .section-title.gold,
:root[data-theme="light"] .kpi-num i,
:root[data-theme="light"] .method-card i { color: #b45f06; }
:root[data-theme="light"] .kpi,
:root[data-theme="light"] .chart-card,
:root[data-theme="light"] .stat,
:root[data-theme="light"] .filter-bar,
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .method-card,
:root[data-theme="light"] .rank,
:root[data-theme="light"] .cmp,
:root[data-theme="light"] .why-card { box-shadow: 0 1px 3px rgba(20, 24, 40, 0.06); }
:root[data-theme="light"] .tooltip { box-shadow: 0 10px 26px rgba(20, 24, 40, 0.16); }

/* phones: shortcut bar scrolls away with the page and fits on one swipeable row */
@media (max-width: 700px) {
    .quick-nav { position: static; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; border-radius: 22px; padding: 10px 12px; }
    .quick-nav::-webkit-scrollbar { display: none; }
    .quick-nav a { flex: none; }
    .section, #section-faq { scroll-margin-top: 80px; }
}

/* flags and company logos */
.flag { display: inline-block; width: 1.35em; height: 0.95em; margin-right: 5px; vertical-align: -0.12em; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(var(--fg), 0.18); }
.ctry-name { display: inline-flex; align-items: center; gap: 4px; }
.ctry-name .flag { width: 26px; height: 18px; border-radius: 3px; }
.data-table td small.ctry-line { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2px; }
.co-logos { display: flex; justify-content: center; gap: 6px; margin-bottom: 5px; }
.co-logo { display: block; height: 26px; max-width: 120px; object-fit: contain; padding: 3px 6px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(var(--fg), 0.12); }
.ev-table td.name .ex-logo.lg { display: block; margin: 0 auto 5px; width: 26px; height: 26px; }
.tt-head { margin-bottom: 6px; }
.tt-head .co-logos { margin-bottom: 4px; }
.tt-head .co-logo { height: 24px; }
.tt-head .ex-logo { width: 1.4em; height: 1.4em; vertical-align: -0.35em; margin-right: 4px; }
.tt-ctry { font-size: 0.8rem; color: var(--text-dim); display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: 2px; }
.row-mark { pointer-events: none; }


/* ---- Trading strategies page ---- */
:root { --btc: #cf7714; --eth: #7b8cff; --grid-c: #1fb5a0; --hold: rgba(255, 255, 255, 0.55); }
:root[data-theme="light"] { --btc: #c2610a; --eth: #4f5fd6; --grid-c: #0f8a73; --hold: rgba(20, 24, 40, 0.5); }
.answer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.verdict-card { padding: 22px 26px; border-radius: 22px; background: var(--card-bg); border: 1px solid var(--card-border); border-top: 4px solid var(--c, var(--primary)); text-align: center; }
.verdict-card .v-label { font-size: 0.75rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }
.verdict-card .v-num { font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin: 6px 0 2px; }
.verdict-card .v-sub { font-size: 0.85rem; color: var(--text-dim); }
.verdict-card .v-name { font-size: 1.15rem; font-weight: 600; color: var(--c, var(--ink)); display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.verdict-card ul { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.verdict-card li { position: relative; padding-left: 20px; font-size: 0.9rem; color: var(--text-dim); text-align: left; line-height: 1.45; }
.verdict-card li::before { content: '\F285'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 1px; color: var(--c, var(--primary)); font-size: 0.8rem; }
.verdict-card li b { color: var(--text-main); font-weight: 600; }
.v-blue { --c: var(--accent); } .v-gold { --c: var(--primary); } .v-green { --c: var(--green); } .v-red { --c: var(--red); } .v-amber { --c: var(--amber); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 22px; }
.chart-sub { font-size: 0.85rem; color: var(--text-dim); text-align: center; margin-bottom: 12px; }
.inv-chips { margin-bottom: 14px; }
.table-wrap.flat { border: none; background: transparent; border-radius: 0; }
.pc { font-weight: 600; }
.data-table td { font-variant-numeric: tabular-nums; }
.data-table tr.base td { background: rgba(var(--fg), 0.03); }
.data-table tr.base td b { color: var(--primary); }
.data-table td.name { white-space: normal; min-width: 190px; }
.data-table td.name b { color: var(--ink); font-weight: 600; }
.data-table td.name small { white-space: normal; }
.data-table td.txt { white-space: normal; text-align: left; min-width: 280px; max-width: 520px; font-size: 0.85rem; color: var(--text-dim); line-height: 1.45; }
.data-table td.txt b { color: var(--text-main); font-weight: 600; }
.cell-good { background: rgba(38, 230, 164, 0.10); }
.cell-bad { background: rgba(255, 92, 92, 0.09); }
.tag-src { font-size: 0.68rem; letter-spacing: 0.5px; padding: 1px 8px; border-radius: 8px; border: 1px solid var(--card-border); color: var(--text-dim); white-space: nowrap; }
.tag-src.ours { color: var(--primary); border-color: rgba(247, 147, 26, 0.4); }
.tag-src.study { color: var(--accent); border-color: rgba(0, 204, 255, 0.35); }
.lg-sw.btc { background: var(--btc); } .lg-sw.eth { background: var(--eth); } .lg-sw.grid { background: var(--grid-c); }
.ln.c0 { stroke: var(--hold); stroke-width: 2.5; stroke-dasharray: 6 4; }
.bar.btc { fill: var(--btc); } .bar.eth { fill: var(--eth); } .bar.grid { fill: var(--grid-c); } .bar.hold { fill: var(--btc); opacity: 0.55; }
.bar.pos { fill: var(--green); } .bar.neg { fill: var(--red); }
.row-label { fill: var(--text-main); font-size: 13px; text-anchor: end; font-family: 'Figtree', sans-serif; }
.val-label { fill: var(--text-main); font-size: 12px; font-weight: 600; font-family: 'Figtree', sans-serif; }
.hit { fill: transparent; cursor: crosshair; }
.f-chip .lg-dot { width: 9px; height: 9px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { padding: 14px; border-radius: 14px; background: rgba(var(--fg), 0.03); text-align: center; }
.fact b { display: block; font-size: 1.4rem; color: var(--ink); font-weight: 700; }
.fact span { font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.fact.full { grid-column: 1 / -1; }
.fact p { font-size: 0.88rem; color: var(--text-dim); text-align: left; margin-top: 4px; line-height: 1.45; }
.fact p b { display: inline; font-size: inherit; color: var(--text-main); font-weight: 600; }
.score { display: inline-flex; gap: 3px; vertical-align: middle; }
.score i { width: 9px; height: 9px; border-radius: 50%; background: rgba(var(--fg), 0.14); }
.score i.on { background: var(--c, var(--green)); }
.vars { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.var { font-size: 0.78rem; padding: 3px 9px; border-radius: 10px; border: 1px solid var(--card-border); white-space: nowrap; }
.var.good { border-color: rgba(38, 230, 164, 0.45); color: var(--green); }
.var.bad { border-color: rgba(255, 92, 92, 0.4); color: var(--red); }
.var b { color: var(--text-main); font-weight: 600; margin-right: 4px; }
.vol { font-weight: 600; color: var(--ink); }
.detail-grid .story-block p + p { margin-top: 6px; }
.ev-table tr.detail ul { list-style: none; display: grid; gap: 6px; }
.ev-table tr.detail li { position: relative; padding-left: 18px; font-size: 0.9rem; color: var(--text-main); line-height: 1.5; text-align: left; }
.ev-table tr.detail li::before { content: '\F285'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 2px; font-size: 0.75rem; color: var(--accent); }
.ev-table tr.detail li a { color: var(--accent); }
@media (max-width: 1200px) { .answer-grid, .two-col { grid-template-columns: 1fr; } }
.bar-row-hit { fill: transparent; cursor: pointer; }
.bar-row-hit:hover { fill: rgba(var(--fg), 0.05); }
.ev-table tr.detail .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#section-cycle .two-col { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
#halvTable th, #halvTable td { white-space: normal; padding: 9px 6px; }
@media (max-width: 1200px) { #section-cycle .two-col, .ev-table tr.detail .detail-grid { grid-template-columns: 1fr; } }

/* ---- phones: everything fits the screen width; tables become stacked cards, nothing scrolls sideways ---- */
@media (max-width: 1200px) {
    .answer-grid, .two-col, #section-cycle .two-col, .ev-table tr.detail .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .container { padding: 24px 12px; }
    h1 { font-size: 1.9rem; letter-spacing: -0.5px; }
    .subheader { font-size: 0.98rem; }
    .kpis { gap: 10px; }
    .kpi { min-width: 0; flex: 1 1 42%; padding: 12px 10px; }
    .kpi-num { font-size: 1.45rem; }
    .kpi-label { font-size: 0.66rem; }
    .quick-nav { flex-wrap: wrap; justify-content: center; overflow: visible; gap: 6px; }
    .quick-nav a { flex: none; padding: 5px 11px; font-size: 0.68rem; }
    .section-title { font-size: 1.35rem; flex-wrap: wrap; text-align: center; }
    .verdict-card { padding: 18px 14px; }
    .verdict-card .v-num { font-size: 2.1rem; }
    .chart-card { padding: 14px 10px; border-radius: 16px; }
    .filter-bar { width: auto; padding: 10px; }
    .f-chip { padding: 6px 11px; font-size: 0.8rem; }
    .chip-sep { flex-basis: 100%; text-align: center; margin: 0; }
    .stat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .stat { padding: 14px 10px; }
    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.68rem; }
    .facts { grid-template-columns: minmax(0, 1fr); }
    .method-grid { grid-template-columns: minmax(0, 1fr); }
    .legend { gap: 12px; font-size: 0.8rem; }

    .table-wrap { border-radius: 16px; }
    .data-table, .data-table tbody { display: block; width: 100%; }
    .data-table thead { display: none; }
    .data-table tr { display: flex; flex-wrap: wrap; justify-content: center; padding: 10px 6px; border-bottom: 1px solid var(--card-border); }
    .data-table td { display: flex; flex-direction: column; align-items: center; flex: 1 1 30%; min-width: 0; padding: 5px 4px; border: none; white-space: normal; text-align: center; }
    .data-table td[data-label]::before { content: attr(data-label); font-size: 0.6rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
    .data-table td.name, .data-table td.txt, .data-table td:has(.vars) { flex-basis: 100%; }
    .data-table td.name { min-width: 0; font-size: 1rem; }
    .data-table td.name::before, .data-table td:has(.chev)::before { display: none; }
    .data-table td:has(.chev) { display: none; }
    .data-table td.txt { max-width: none; min-width: 0; text-align: left; align-items: stretch; }
    .data-table td.txt::before { text-align: center; }
    .data-table td.cell-good, .data-table td.cell-bad { border-radius: 10px; margin: 2px; }
    .ev-table tr.ev::after { content: 'Tap for details \F282'; font-family: 'Figtree', 'bootstrap-icons', sans-serif; flex-basis: 100%; text-align: center; font-size: 0.72rem; color: var(--accent); margin-top: 2px; }
    #robustTable tr::after { display: none; }
    .ev-table tr.ev.open::after { content: 'Tap to close \F286'; }
    .ev-table tr.detail { padding: 0; }
    .ev-table tr.detail td { flex-basis: 100%; padding: 10px 8px 14px; }
    .story-block p, .ev-table tr.detail li { font-size: 0.86rem; }
    .vars { gap: 4px; }
    .var { font-size: 0.72rem; padding: 2px 7px; }
    #halvTable th, #halvTable td { padding: 5px 4px; }
    .tooltip { max-width: calc(100vw - 24px); }
}
@media (max-width: 700px) {
    .data-table td.txt { display: block; }
    .data-table td.txt::before { display: block; margin-bottom: 4px; }
    #listTable td:first-child, #listTable td:nth-child(4) { display: none; }
    #listTable td.name { order: 0; }
    #listTable td.txt { order: 1; }
    #listTable td:nth-child(3), #listTable td:nth-child(6), #listTable td:nth-child(7) { order: 2; flex: 1 1 30%; }
    #listTable tr.ev::after { order: 3; }
    #listTable td.name small { font-size: 0.7rem; }
}
/* tablets too: stacked table cards up to 1100px so no column is ever cut off */
@media (max-width: 1100px) {
    .data-table, .data-table tbody { display: block; width: 100%; }
    .data-table thead { display: none; }
    .data-table tr { display: flex; flex-wrap: wrap; justify-content: center; padding: 10px 6px; border-bottom: 1px solid var(--card-border); }
    .data-table td { display: flex; flex-direction: column; align-items: center; flex: 1 1 30%; min-width: 0; padding: 5px 4px; border: none; white-space: normal; text-align: center; }
    .data-table td[data-label]::before { content: attr(data-label); font-size: 0.6rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
    .data-table td.name, .data-table td.txt, .data-table td:has(.vars) { flex-basis: 100%; }
    .data-table td.name { min-width: 0; font-size: 1rem; }
    .data-table td.name::before, .data-table td:has(.chev)::before { display: none; }
    .data-table td:has(.chev) { display: none; }
    .data-table td.txt { display: block; max-width: none; min-width: 0; text-align: left; }
    .data-table td.txt::before { display: block; text-align: center; margin-bottom: 4px; }
    .data-table td.cell-good, .data-table td.cell-bad { border-radius: 10px; margin: 2px; }
    .ev-table tr.ev::after { content: 'Tap for details \F282'; font-family: 'Figtree', 'bootstrap-icons', sans-serif; flex-basis: 100%; order: 3; text-align: center; font-size: 0.72rem; color: var(--accent); margin-top: 2px; }
    .ev-table tr.ev.open::after { content: 'Tap to close \F286'; }
    #robustTable tr::after { display: none; }
    .ev-table tr.detail { padding: 0; }
    .ev-table tr.detail td { flex-basis: 100%; padding: 10px 8px 14px; }
    #listTable td:first-child, #listTable td:nth-child(4) { display: none; }
    #listTable td.name { order: 0; }
    #listTable td.txt { order: 1; }
    #listTable td:nth-child(3), #listTable td:nth-child(6), #listTable td:nth-child(7) { order: 2; flex: 1 1 30%; }
    #btTable td, #dcaTable td { flex: 1 1 22%; }
}
@media (max-width: 700px) { #btTable td, #dcaTable td { flex: 1 1 30%; } }
