/* ============================================================
   Wybór FX — design system (pl-PL)
   Polish financial media: sober, factual, white + navy + crimson.
   Cards are border-based, no SaaS shadows, no neon, no glassmorphism.
   ============================================================ */

@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/css/fonts/roboto-400.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/css/fonts/roboto-500.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/css/fonts/roboto-700.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('/css/fonts/roboto-900.woff2') format('woff2'); }

:root {
  --ink: #1b2434;
  --ink-soft: #3c4657;
  --navy: #16233b;
  --navy-2: #0f1a2e;
  --brand: #c8102e;
  --brand-dark: #9d0c24;
  --brand-soft: #fdf0f2;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --border: #e2e7ee;
  --border-strong: #c9d2de;
  --muted: #5c667a;
  --amber-bg: #fdf6e9;
  --amber-border: #ecd9ab;
  --amber-ink: #7a5a1e;
  --radius: 10px;
  --radius-sm: 7px;
  --maxw: 1180px;
  --shadow-sm: 0 1px 3px rgba(22,35,59,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; color: var(--navy); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.site-logo { display: inline-flex; align-items: center; gap: 10px; }
.site-logo .mark { flex: none; }
.site-logo-text { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #202124; }
.site-logo-text .logo-fx { color: var(--brand); font-weight: 900; }
.logo-fx { color: var(--brand); }
.main-nav { display: flex; gap: 4px; }
.nav-link {
  display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; color: var(--ink-soft);
  transition: background-color .15s, color .15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--navy); }
.nav-link.nav-active { color: var(--brand); font-weight: 700; }
.nav-link.nav-active:hover { background: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
.main-nav-mobile { display: none; }
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav-mobile.open { display: flex; flex-direction: column; padding: 8px 20px 14px; border-top: 1px solid var(--border); background: #fff; }
  .main-nav-mobile .nav-link { padding: 12px 8px; font-size: 16px; border-bottom: 1px solid var(--bg-soft); border-radius: 0; }
  .main-nav-mobile .nav-link:last-child { border-bottom: 0; }
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  padding: 14px 0 0; font-size: 13px; color: var(--muted);
  max-width: var(--maxw); margin: 0 auto; padding-left: 20px; padding-right: 20px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); text-decoration: none; }
.breadcrumbs span + span::before, .breadcrumbs a + a::before, .breadcrumbs a + span::before {
  content: "›"; margin: 0 8px; color: var(--border-strong);
}

/* ---------- hero (home) ---------- */
.hero { background: linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%); border-bottom: 1px solid var(--border); }
.hero-inner { padding-top: 56px; padding-bottom: 48px; }
.hero h1 { font-size: 40px; font-weight: 900; letter-spacing: -.02em; max-width: 780px; }
.hero h1 .accent { color: var(--brand); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.hero-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 6px; }
.hero-panel h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.hero-check { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-check li { font-size: 14px; color: var(--ink-soft); padding-left: 26px; position: relative; line-height: 1.45; }
.hero-check li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand-soft); border: 1px solid var(--brand);
}
.hero-check li::after {
  content: ""; position: absolute; left: 5px; top: 8px; width: 7px; height: 4px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg);
}
.hero-panel-note { font-size: 12.5px; color: var(--muted); margin: 0; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }
.hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 720px; margin: 14px 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-notes { margin-top: 18px; font-size: 13px; color: var(--muted); max-width: 760px; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 26px; font-weight: 900; color: var(--navy); line-height: 1.1; }
.hero-stat span { font-size: 13px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; text-align: center; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--navy); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 13px 26px; font-size: 16px; }

/* ---------- sections ---------- */
.section { padding: 44px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-title { font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.section-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 6px; }
.section-link { font-size: 14px; font-weight: 500; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* ---------- broker card ---------- */
.broker-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: border-color .15s, box-shadow .15s;
}
.broker-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.bc-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.broker-logo {
  flex: none; width: 72px; height: 72px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; display: flex; align-items: center; justify-content: center; padding: 5px;
}
.broker-logo-img { width: 100%; height: 100%; object-fit: contain; }
.bc-name { font-size: 17px; font-weight: 700; margin: 2px 0 3px; }
.bc-tagline { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.bc-facts { list-style: none; margin: 4px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.bc-facts li { font-size: 13.5px; color: var(--ink-soft); display: flex; gap: 8px; line-height: 1.4; }
.bc-facts li b { font-weight: 500; color: var(--navy); min-width: 118px; flex: none; }
.bc-actions { margin-top: auto; display: flex; flex-direction: row; gap: 8px; }
.bc-actions .btn { flex: 1; padding: 10px 14px; font-size: 14px; justify-content: center; white-space: nowrap; }

/* ---------- ranking ---------- */
.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-row {
  display: grid; grid-template-columns: 56px 84px 1fr auto; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.rank-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rank-no { font-size: 22px; font-weight: 900; color: var(--border-strong); text-align: center; }
.rank-row:nth-child(1) .rank-no { color: var(--brand); }
.rank-row:nth-child(2) .rank-no { color: #b3541e; }
.rank-row:nth-child(3) .rank-no { color: #8a7a12; }
.rank-logo { width: 64px; height: 64px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; justify-content: center; padding: 4px; }
.rank-logo img { width: 100%; height: 100%; object-fit: contain; }
.rank-main { min-width: 0; }
.rank-actions { align-self: start; }
.rank-name { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.rank-tagline { font-size: 13.5px; color: var(--muted); margin: 0; }
.rank-facts { display: flex; gap: 18px; margin-top: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); }
.rank-facts b { font-weight: 500; color: var(--navy); }
.rank-actions { display: flex; gap: 8px; flex-direction: row; min-width: 220px; }
.rank-actions .btn { flex: 1; padding: 9px 12px; font-size: 13.5px; justify-content: center; white-space: nowrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.cmp { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
table.cmp th, table.cmp td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.cmp thead th { background: var(--bg-soft); font-weight: 700; color: var(--navy); font-size: 13px; }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp .mini-logo { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 3px; vertical-align: middle; }
table.cmp .mini-logo img { width: 100%; height: 100%; object-fit: contain; }
table.cmp .cell-actions { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
table.cmp .cell-actions .btn { padding: 8px 10px; font-size: 13px; width: 100%; }
@media (max-width: 767px) {
  table.cmp thead { display: none; }
  table.cmp, table.cmp tbody, table.cmp tr, table.cmp td { display: block; width: 100%; }
  table.cmp tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  table.cmp tr:last-child { border-bottom: 0; }
  table.cmp td { border: 0; padding: 5px 14px; display: flex; gap: 10px; align-items: flex-start; }
  table.cmp td::before { content: attr(data-label); flex: none; width: 118px; font-weight: 500; color: var(--navy); font-size: 13px; }
  table.cmp td[data-label=""]::before { display: none; }
}

/* ---------- broker detail ---------- */
.detail-hero { background: linear-gradient(180deg, #f7f9fc, #eef2f8); border-bottom: 1px solid var(--border); }
.detail-hero-inner { padding-top: 30px; padding-bottom: 26px; display: grid; grid-template-columns: 110px 1fr; gap: 22px; align-items: start; }
.bh-logo { width: 104px; height: 104px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; display: flex; align-items: center; justify-content: center; padding: 8px; }
.bh-logo img { width: 100%; height: 100%; object-fit: contain; }
.bh-title { font-size: 30px; font-weight: 900; letter-spacing: -.01em; margin: 0 0 6px; }
.bh-sub { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; max-width: 720px; }
.bh-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border-strong); background: #fff; font-size: 12.5px; color: var(--ink-soft); }
.chip b { color: var(--navy); font-weight: 500; }
.bh-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; padding: 34px 0 50px; }
.detail-main { min-width: 0; max-width: 760px; }
.detail-main h2 { font-size: 23px; font-weight: 800; margin-top: 1.6em; }
.detail-main h3 { font-size: 18px; font-weight: 700; margin-top: 1.3em; }
.detail-main p, .detail-main li { font-size: 15.5px; }

.facts-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.facts-table td { padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts-table tr:last-child td { border-bottom: 0; }
.facts-table td:first-child { color: var(--muted); width: 42%; padding-right: 14px; }

.sidebar { display: flex; flex-direction: column; gap: 18px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.side-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { padding: 6px 0; border-bottom: 1px solid var(--bg-soft); font-size: 13.5px; }
.side-card li:last-child { border-bottom: 0; }
.side-cta .btn { width: 100%; margin-top: 8px; }
.side-mini { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.side-mini img { width: 34px; height: 34px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; padding: 2px; background: #fff; }
.side-mini a { color: var(--ink-soft); font-weight: 500; }
.side-mini a:hover { color: var(--brand); }

/* ---------- notices ---------- */
.notice { border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; font-size: 14.5px; }
.notice p { margin: 0; }
.notice h3 { margin: 0 0 6px; font-size: 15px; }
.notice-risk { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber-ink); }
.notice-info { background: var(--bg-soft); border: 1px solid var(--border); color: var(--ink-soft); }
.notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.aff-disclosure { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.aff-disclosure a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- articles ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article-bc { margin: 0 0 14px; font-size: 13px; padding: 0; }
.article h1 { font-size: 34px; font-weight: 900; letter-spacing: -.015em; margin-bottom: 10px; }
.article-meta { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.article h2 { font-size: 26px; font-weight: 800; margin-top: 1.8em; }
.article h3 { font-size: 19px; margin-top: 1.4em; }
.article p, .article li { font-size: 16.5px; }
.article .toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 18px 0 24px; }
.article .toc h3 { margin: 0 0 8px; font-size: 15px; }
.article .toc ol { margin: 0; padding-left: 20px; font-size: 14.5px; }
.article .toc a { color: var(--ink-soft); }
.article .toc a:hover { color: var(--brand); }

/* guide / article cards */
.article-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .15s, box-shadow .15s; }
.article-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.article-card .ac-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); margin-bottom: 6px; }
.article-card h3 { font-size: 17px; margin: 0 0 6px; color: var(--navy); }
.article-card p { font-size: 14px; color: var(--muted); margin: 0; }
.article-card:hover h3 { color: var(--brand); }

/* ---------- page head (subpages) ---------- */
.page-head { background: linear-gradient(180deg, #f7f9fc, #eef2f8); border-bottom: 1px solid var(--border); }
.page-head .container { padding: 40px 20px 34px; }
.page-head h1 { font-size: 32px; font-weight: 900; letter-spacing: -.015em; margin-bottom: 10px; }
.page-sub { font-size: 16px; color: var(--ink-soft); max-width: 820px; margin: 0; }
.page-head a { color: var(--brand); }

/* ---------- broker grid ---------- */
.broker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1024px) { .broker-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .broker-grid { grid-template-columns: 1fr; } }

/* ---------- how it works (home) ---------- */
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.how-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.how-item h3 { font-size: 16px; margin-bottom: 8px; }
.how-item p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
@media (max-width: 767px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------- rank why ---------- */
.rank-why { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #c9d2de; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 34px; padding: 44px 20px 34px; }
.footer-brand .site-logo-text { color: #fff; }
.footer-brand .logo-fx { color: #ffb3bd; }
.footer-about { font-size: 13.5px; color: #9aa6ba; margin-top: 14px; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #c9d2de; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { padding: 18px 20px; font-size: 12.5px; color: #8a95a9; }
.footer-bottom-inner p { margin: 0; }
.risk-bar { background: var(--bg-soft); border-top: 1px solid var(--border); }
.risk-bar .container { padding: 14px 20px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1 1 240px; }
  .rank-row { grid-template-columns: 44px 72px 1fr; }
  .rank-actions { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero h1 { font-size: 32px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .bc-actions, .rank-actions, .bh-actions { flex-direction: column; }
  .bc-actions .btn, .rank-actions .btn, .bh-actions .btn { width: 100%; }
  .hero-inner { padding-top: 36px; padding-bottom: 30px; }
  .hero h1 { font-size: 27px; }
  .hero-sub { font-size: 16px; }
  .hero-stats { gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; padding: 34px 20px 24px; }
  .detail-hero-inner { grid-template-columns: 84px 1fr; gap: 14px; }
  .bh-logo { width: 78px; height: 78px; padding: 6px; }
  .bh-title { font-size: 23px; }
  .section { padding: 32px 0; }
  .rank-row { grid-template-columns: 36px 56px 1fr; gap: 10px; padding: 12px; }
  .rank-no { font-size: 18px; }
  .rank-logo { width: 52px; height: 52px; }
  .rank-tagline { font-size: 12.5px; }
  .article h1 { font-size: 27px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { height: 58px; }
  .site-logo-text { font-size: 19px; }
  .bc-top { gap: 10px; }
  .broker-logo { width: 62px; height: 62px; }
}
