:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-2: #262626;
  --line: rgba(255,255,255,.1);
  --ink: #fafafa;
  --muted: #a1a1a1;
  --home: #4f8bff;      /* zůstává v Česku */
  --abroad: #ff7a2f;    /* odchází do zahraničí */
  --tax: #2fd18a;       /* daně státu */
  --est: #b99cff;       /* odhad */
  --abroad-soft: rgba(255,122,47,.12);
  --home-soft: rgba(79,139,255,.12);
  --tax-soft: rgba(47,209,138,.12);
  --est-soft: rgba(185,156,255,.12);
  --grid: rgba(255,255,255,.06);
  --bar-muted: #3f3f46;
  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-data: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.wrap { max-width: 1180px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--home); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--home); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); line-height: 1.15; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
b { font-weight: 600; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(10,10,10,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 54px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--abroad); box-shadow: 0 0 0 4px var(--abroad-soft), 0 0 18px var(--abroad); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: .93rem; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }

main { display: flex; flex-direction: column; gap: 28px; padding-block: 28px 56px; }
section { display: flex; flex-direction: column; gap: 14px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 66ch; }
.lead b { color: var(--ink); }
.note { color: var(--muted); font-size: .88rem; max-width: 72ch; }
.eyebrow { font-family: var(--font-data); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tax); }
@media (prefers-reduced-motion: no-preference) { .live::before { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(61,220,151,.5); } 50% { box-shadow: 0 0 0 5px rgba(61,220,151,0); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }

/* hero counters */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.counter { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.counter.out { border-color: rgba(255,138,61,.45); background: linear-gradient(180deg, var(--abroad-soft), var(--panel) 70%); }
.counter.tax { border-color: rgba(61,220,151,.35); background: linear-gradient(180deg, var(--tax-soft), var(--panel) 70%); }
.counter .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, .8rem + 2.1vw, 2.15rem); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.counter .big small { font-family: var(--font-body); font-size: 1rem; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.counter.out .big { color: var(--abroad); }
.counter.tax .big { color: var(--tax); }
.counter .sub { font-size: .86rem; color: var(--muted); }

/* stat strip */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .lab { font-size: .82rem; color: var(--muted); }
.stat .val { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .val small { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .sub { font-size: .8rem; color: var(--muted); }

/* fun facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.fact { border-left: 3px solid var(--abroad); background: var(--panel); border-radius: 0 var(--r) var(--r) 0; padding: 14px 16px; font-size: .98rem; color: var(--muted); }
.fact b { color: var(--ink); font-family: var(--font-data); font-weight: 500; }
.fact.tax { border-left-color: var(--tax); }
.fact.home { border-left-color: var(--home); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.out { background: var(--abroad-soft); color: var(--abroad); }
.chip.home { background: var(--home-soft); color: var(--home); }
.chip.mix { background: var(--panel-2); color: var(--muted); }
.chip.est { background: var(--est-soft); color: var(--est); }
.chip.ok { background: var(--tax-soft); color: var(--tax); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* charts */
.chart { width: 100%; min-height: 200px; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-family: var(--font-data); font-size: 11px; }
.chart .lbl { fill: var(--ink); font-family: var(--font-body); font-size: 13px; }
.chart .grid line { stroke: var(--grid); }
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); padding: 6px 10px; font-size: .84rem; max-width: 300px; }
.tip .t { color: var(--muted); font-size: .76rem; }

/* tables / leaderboard */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; font-family: var(--font-data); font-size: .86rem; font-variant-numeric: tabular-nums; }
td.na { color: var(--muted); }
td.rank { font-family: var(--font-data); color: var(--muted); width: 2.2rem; }
.est { color: var(--est); font-family: var(--font-data); font-size: .72rem; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--panel-2); }
tr.hl td { background: rgba(91,156,255,.06); }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell span.b { height: 8px; border-radius: 4px; background: var(--home); display: inline-block; }
.bar-cell span.b.out { background: var(--abroad); }
.bar-cell span.b.muted { background: var(--bar-muted); }
.bar-cell span.b.tax { background: var(--tax); }
.bar-cell span.b.est { background: var(--est); }
.name { font-weight: 600; color: var(--ink); text-decoration: none; }
a.name:hover { color: var(--home); }
.dim { color: var(--muted); font-size: .82rem; }

/* stacked cost bar */
.stack { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; }
.stack span { display: block; min-width: 2px; }

/* bank list */
.banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.bank { text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.bank:hover { border-color: var(--home); }
.bank .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bank .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bank .small { font-size: .84rem; color: var(--muted); }
.spark { width: 100%; height: 44px; display: block; }

/* bank detail */
.bank-head { display: flex; flex-direction: column; gap: 10px; }
.bank-head .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .95rem; }
.back { font-size: .9rem; text-decoration: none; }
.switch { display: flex; gap: 6px; flex-wrap: wrap; }
.switch a { font-size: .84rem; text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel); }
.switch a[aria-current="true"] { color: var(--ink); border-color: var(--home); }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.flow .box { border-radius: var(--r); padding: 14px 16px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.flow .box.out { border-color: rgba(255,138,61,.5); background: var(--abroad-soft); }
.flow .box.home { border-color: rgba(91,156,255,.5); background: var(--home-soft); }
.flow .box.tax { border-color: rgba(61,220,151,.45); background: var(--tax-soft); }
.flow .box.est { border-color: rgba(199,166,255,.45); background: var(--est-soft); }
.flow .box .val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.sources { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; word-break: break-word; }
.meth { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 8px; max-width: 78ch; color: var(--muted); }
.meth b { color: var(--ink); }
.cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }

.foot { padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; display: flex; flex-direction: column; gap: 4px; }
.big-stat { font-size: 1.05rem; margin: 0 0 12px; }
.big-stat b { font-family: var(--font-data); font-size: 2rem; display: block; line-height: 1.1; }
.fact .fh { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }

.tiles { margin: 0 0 22px; }
.tiles .stat { text-decoration: none; color: inherit; }
.tiles .stat:hover .val { color: var(--abroad); }
.how { display: grid; gap: 10px; }
.how-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border-left: 3px solid var(--abroad); }
.how-step.home { border-left-color: var(--home); }
.how-step.tax { border-left-color: var(--tax); }
.how-step p { margin: 0; }
.how-step .n { font-family: var(--font-data); font-size: 1.1rem; color: var(--muted); min-width: 1.2em; }

/* dashboard */
.card > h2, .card-head h2 { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.card h3 { font-size: .95rem; }
.hero-top { gap: 16px; }
.h1-sub { color: #6b6b6b; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills button { font: 500 .88rem var(--font-body); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.pills button i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pills button em { font-style: normal; font-family: var(--font-data); font-size: .78rem; color: #737373; }
.pills button:hover { color: var(--ink); border-color: rgba(255,255,255,.25); }
.pills button[aria-pressed="true"] { color: var(--ink); background: var(--panel-2); border-color: rgba(255,255,255,.35); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; animation: kfade .35s ease; }
@keyframes kfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kpi { animation: none; } }
.kh { font-size: .8rem; color: var(--muted); }
.kv { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kv small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.kv.out { color: var(--abroad); } .kv.tax { color: var(--tax); }
.kf { display: flex; gap: 10px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); align-items: center; }
.kf span { display: inline-flex; align-items: center; gap: 5px; }
.kf i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.kf i.rest, .waffle i.rest { background: #2e2e2e; }
.kpi-more { grid-column: 1 / -1; justify-self: start; font-weight: 600; text-decoration: none; font-size: .9rem; }
.delta { align-self: flex-start; font-family: var(--font-data); font-size: .74rem; padding: 2px 8px; border-radius: 999px; }
.delta.up { background: var(--tax-soft); color: var(--tax); }
.delta.down { background: rgba(255,90,90,.12); color: #ff6b6b; }
.waffle { display: grid; grid-template-columns: repeat(auto-fill, 7px); gap: 3px; margin-top: 6px; }
.waffle i { width: 7px; height: 7px; border-radius: 2px; display: block; }
.mbars { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin-top: 8px; }
.mb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.mb span { width: 100%; max-width: 26px; border-radius: 3px 3px 1px 1px; display: block; }
.mb em { font-style: normal; font-size: .62rem; color: var(--muted); font-family: var(--font-data); white-space: nowrap; }
.ratio { height: 10px; border-radius: 999px; background: #2e2e2e; overflow: hidden; margin-top: 8px; }
.ratio span { display: block; height: 100%; background: var(--tax); border-radius: 999px; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 .72rem var(--font-body); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.ava.out { box-shadow: inset 0 0 0 2px rgba(255,122,47,.55); }
.ava.home { box-shadow: inset 0 0 0 2px rgba(79,139,255,.55); }
.avas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.avas a { text-decoration: none; }
.who { display: flex; gap: 10px; align-items: center; }
.counter { border-color: var(--line); }
.fact { background: var(--panel); border: 1px solid var(--line); border-left-width: 3px; }
@media (max-width: 760px) {
  .top-in { gap: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

.ceo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ceo-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ceo-row:last-child { border-bottom: 0; }
.ceo-row .cn { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.ceo-row .cn b { font-size: .92rem; }
.ceo-row .cv { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.ceo-row .cv small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.cookies { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px)); width: min(680px, calc(100% - 32px)); background: var(--panel-2); border: 1px solid rgba(255,255,255,.18); border-radius: var(--r); box-shadow: 0 16px 40px rgba(0,0,0,.6); padding: 16px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cookies[hidden] { display: none; }
.cookies p { flex: 1 1 280px; font-size: .88rem; color: var(--muted); }
.cookies p b { color: var(--ink); }
.cookies .btns { display: flex; gap: 8px; }
.cookies button { font: 600 .88rem var(--font-body); border-radius: 999px; padding: 8px 16px; cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--ink); }
.cookies button.primary { background: var(--ink); color: #0a0a0a; border-color: var(--ink); }
.ceo-row .rk { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 .85rem var(--font-data); color: var(--tax); background: var(--tax-soft); flex: none; }
.since { font-size: 1rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.since b { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--abroad); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.news li { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.news a:hover { color: var(--home); }
.card h3.sub-h { margin: 20px 0 2px; }
/* kompaktní seznam (5 šéfů v kartě na přehledu) */
.ceo-list.compact { gap: 2px; }
.ceo-list.compact .ceo-row { padding: 4px 0; }
.ceo-list.compact .ava { width: 26px; height: 26px; font-size: .66rem; }
.ceo-list.compact .cn b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ceo-list.compact .cn .dim { font-size: .76rem; }
.ceo-list.compact .cv { flex-direction: row; align-items: baseline; gap: 4px; font-size: .95rem; }
/* hot news na přehledu */
.card.hot .hot-lead { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.25; letter-spacing: -.01em; color: var(--ink); text-decoration: none; margin-top: 6px; text-wrap: balance; }
.card.hot .hot-lead:hover { text-decoration: underline; }
.card.hot .hot-meta { display: block; margin: 6px 0 4px; }
.card.hot .news { border-top: 1px solid var(--line); margin-top: 8px; }
/* TOP 5 bank podle zisku v kartě na přehledu */
.top5 { display: flex; flex-direction: column; margin-top: 6px; border-top: 1px solid var(--line); }
.t5 { display: grid; grid-template-columns: 16px 8px 1fr auto auto; align-items: center; gap: 8px; padding: 4px 0; color: inherit; text-decoration: none; font-size: .86rem; border-bottom: 1px solid var(--line); }
.t5:last-child { border-bottom: 0; }
.t5:hover b { text-decoration: underline; }
.t5 .rk { font: 600 .75rem var(--font-data); color: var(--muted); }
.t5 i { width: 8px; height: 8px; border-radius: 2px; }
.t5 .v { font-family: var(--font-data); text-align: right; }
.t5 .v small { color: var(--muted); margin-left: 3px; font-size: .72rem; }
.t5 .delta { font-size: .68rem; padding: 1px 6px; min-width: 64px; text-align: center; }
@media (max-width: 600px) { .kpi .waffle { grid-template-columns: repeat(auto-fill, 5px); gap: 2px; } .kpi .waffle i { width: 5px; height: 5px; } }
