/* PricesMap – „kantor i banknot”: papier w kolorze kości słoniowej, zieleń banknotu, miedziany akcent.
   Nagłówki Fraunces, tekst IBM Plex Sans, liczby IBM Plex Mono. Jasny i ciemny motyw według systemu. */

:root {
  --paper: #f5f1e6;
  --paper-2: #ece6d6;
  --card: #fffdf6;
  --ink: #1d2a24;
  --ink-2: #47554d;
  --muted: #727b70;
  --line: #d8d0bb;
  --line-2: #e6dfcc;
  --green: #1f5c45;
  --green-2: #2d7a5b;
  --accent: #b4652a;
  --accent-soft: #e7bf94;
  --focus: #b4652a;
  --shadow: 0 1px 0 rgba(29, 42, 36, 0.04), 0 8px 24px -12px rgba(29, 42, 36, 0.22);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: 10px;
  --wrap: 1240px;
  color-scheme: light dark;
}

/* Ciemny motyw: według systemu, chyba że wybrano jasny przełącznikiem w nagłówku (<html data-theme>); te same
   zmienne przy wymuszonym ciemnym. Pozostałe reguły „ciemne” niżej mają tę samą parę selektorów. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1613;
    --paper-2: #151f1a;
    --card: #19241f;
    --ink: #ece5d2;
    --ink-2: #c2bba7;
    --muted: #8f968a;
    --line: #2c3b33;
    --line-2: #22302a;
    --green: #7ccaa3;
    --green-2: #5fb08a;
    --accent: #e3a15e;
    --accent-soft: #7a5533;
    --focus: #e3a15e;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme='dark'] {
  --paper: #0f1613;
  --paper-2: #151f1a;
  --card: #19241f;
  --ink: #ece5d2;
  --ink-2: #c2bba7;
  --muted: #8f968a;
  --line: #2c3b33;
  --line-2: #22302a;
  --green: #7ccaa3;
  --green-2: #5fb08a;
  --accent: #e3a15e;
  --accent-soft: #7a5533;
  --focus: #e3a15e;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  font-feature-settings: 'tnum' 0;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.4rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.1rem; }
small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 48px; }
main > section, main > div { margin-top: 32px; }

/* ---------------------------------------------------------------- nagłówek */

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; color: var(--accent); }
.brand-name { font: 600 1.35rem/1 var(--serif); }
.brand-tag { color: var(--muted); font-size: 0.85rem; border-left: 1px solid var(--line); padding-left: 10px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a, .maps-menu summary {
  display: block; padding: 6px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; cursor: pointer;
}
.site-nav a:hover, .maps-menu summary:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a[aria-current='page'] { background: var(--green); color: var(--paper); }
.maps-menu { position: relative; }
.maps-menu summary { list-style: none; }
.maps-menu summary::-webkit-details-marker { display: none; }
.maps-menu summary::after { content: ' ▾'; font-size: 0.8em; }
.maps-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px !important; display: block !important; min-width: 230px; z-index: 30; }
.maps-list a { border-radius: 6px; }
.maps-list .maps-more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.maps-list .maps-more a { color: var(--green); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.lang-switch { margin: 0; display: flex; gap: 2px; font: 500 0.8rem var(--mono); }
.lang-switch a { padding: 4px 7px; border-radius: 6px; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.lang-switch a[aria-current] { border-color: var(--line); color: var(--ink); }
/* Przełącznik motywu: słońce / auto / księżyc – moduł theme (assets/theme/theme.css) na zmiennych projektu */
.site-header {
  --theme-switch-gap-left: 0; --theme-switch-gap-left-compact: 0;
  --theme-switch-bg: var(--card); --theme-switch-border: var(--line); --theme-switch-bg-compact: transparent;
  --theme-switch-fg-active: var(--green); --theme-switch-active: var(--paper-2); --theme-switch-focus: var(--focus);
}
.site-header .theme-switch { flex: none; }

/* Pasek kursów – jak tablica w kantorze */
.ticker {
  display: flex; align-items: center; gap: 14px;
  background: var(--green); color: #f3eedd;
  font: 500 0.85rem/1 var(--mono);
  padding: 9px max(16px, calc((100% - var(--wrap)) / 2 + 16px));
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ticker { background: #13261e; color: var(--ink); border-block: 1px solid var(--line); } }
:root[data-theme='dark'] .ticker { background: #13261e; color: var(--ink); border-block: 1px solid var(--line); }
.ticker-date { margin: 0; opacity: 0.75; }
.ticker ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.ticker a { color: inherit; text-decoration: none; }
.ticker a:hover { color: var(--accent-soft); }
.ticker b { color: #f0c58f; font-weight: 500; margin-right: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ticker b { color: var(--accent); } }
:root[data-theme='dark'] .ticker b { color: var(--accent); }

/* ---------------------------------------------------------------- nagłówki stron */

.hero { margin-top: 28px; position: relative; }
.hero-home { padding: 28px 0 8px; }
.hero-home::before {
  /* giloszowanie – delikatny wzór jak na banknocie */
  content: ''; position: absolute; inset: -10px -16px auto auto; width: min(520px, 70%); height: 230px; z-index: -1; opacity: 0.55;
  background:
    repeating-radial-gradient(circle at 80% 40%, transparent 0 9px, var(--line-2) 9px 10px),
    repeating-radial-gradient(circle at 60% 70%, transparent 0 13px, var(--line-2) 13px 14px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 40%);
          mask: linear-gradient(90deg, transparent, #000 40%);
}
.kicker { font: 500 0.78rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 10px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 760px; margin: 0; }
.note { color: var(--ink-2); font-size: 0.95rem; border-left: 3px solid var(--accent-soft); padding-left: 10px; max-width: 700px; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.symbol { font-family: var(--mono); color: var(--accent); font-size: 0.6em; font-weight: 500; vertical-align: 0.15em; margin-left: 6px; }
.hero-split { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 24px; align-items: center; }
.locator { aspect-ratio: 2 / 1; }
.big-rate { font: 500 clamp(1.4rem, 3vw, 2.2rem)/1.2 var(--mono); margin: 6px 0 0; }
.big-rate b { color: var(--green); font-weight: 500; }
.big-rate small { display: block; font: 400 0.85rem var(--sans); margin-top: 6px; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.unit { margin: 0; font: 500 0.85rem var(--mono); color: var(--muted); }

.button {
  display: inline-flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500;
}
.button:hover { background: var(--green); color: var(--paper); }

/* ---------------------------------------------------------------- eksplorator */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--green-2); color: var(--ink); }
.chip[aria-current] { background: var(--green); border-color: var(--green); color: var(--paper); }
.cur-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
select, input[type='text'], input[type='search'] {
  font: 500 1rem var(--mono); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 40px;
}

.stage { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; margin-top: 16px; align-items: start; }
.map-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.world-map { width: 100%; }
.world-map.wm {
  --wm-ocean: var(--paper-2); --wm-sphere-stroke: var(--line); --wm-land: #dcd4bf; --wm-land-hover: #cbc1a6; --wm-land-inactive: #e4dcc8;
  --wm-border: var(--card); --wm-border-width: 0.5px; --wm-selected: var(--accent); --wm-selected-outline: var(--ink);
  --wm-hover-outline: var(--ink); --wm-dot-stroke: var(--muted); --wm-font: var(--sans);
  --wm-tooltip-bg: var(--ink); --wm-tooltip-fg: var(--paper);
  --wm-control-bg: var(--card); --wm-control-fg: var(--ink); --wm-control-border: var(--line);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .world-map.wm { --wm-land: #2a3832; --wm-land-hover: #3a4b43; --wm-land-inactive: #1e2a25; }
}
:root[data-theme='dark'] .world-map.wm { --wm-land: #2a3832; --wm-land-hover: #3a4b43; --wm-land-inactive: #1e2a25; }
.world-map .wm-country.is-hot { stroke: var(--ink); stroke-width: 1.4px; }
.legend { padding: 10px 6px 0; }
.legend-title { margin: 0 0 6px; font: 500 0.8rem var(--mono); color: var(--ink-2); }
.legend-scale { display: flex; max-width: 520px; }
.legend-scale span { flex: 1; height: 12px; background: var(--c); position: relative; }
.legend-scale span:first-child { border-radius: 3px 0 0 3px; }
.legend-scale span:last-child { border-radius: 0 3px 3px 0; }
.legend-scale em { position: absolute; left: 0; top: 15px; transform: translateX(-50%); font: 500 0.72rem var(--mono); font-style: normal; color: var(--muted); }
.legend-ends { display: flex; justify-content: space-between; max-width: 520px; margin: 22px 0 0; font-size: 0.78rem; color: var(--muted); }
.legend-none::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 5px; background: #dcd4bf; border-radius: 2px; vertical-align: -1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .legend-none::before { background: #2a3832; } }
:root[data-theme='dark'] .legend-none::before { background: #2a3832; }
.data-note { margin: 8px 6px 2px; font-size: 0.82rem; color: var(--muted); }

/* Obrazek PNG (moduł export – assets/export/export.css): przycisk w rogu mapy, menu formatów otwiera się w górę;
   przy wykresie kursu – w nagłówku sekcji. Wygląd na zmiennych projektu. */
:root { --export-surface: var(--card); --export-line: var(--line); --export-hover: var(--paper-2); --export-radius: 8px; --export-font: var(--sans); }
.map-box { position: relative; }
.map-box > .map-export-wrap { position: absolute; z-index: 4; left: 10px; bottom: 10px; }
.hero-split .map-box > .map-export-wrap { left: auto; right: 4px; bottom: 4px; }
.section-head .map-export-wrap { position: relative; align-self: center; }

/* Paragon */
.receipt { position: sticky; top: 12px; scroll-margin-top: 12px; }
.receipt-paper {
  background: var(--card); padding: 18px 18px 26px; font-family: var(--mono); font-size: 0.86rem; box-shadow: var(--shadow);
  border: 1px solid var(--line); border-bottom: 0;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x;
}
.receipt-head { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); text-align: center; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--muted); }
.receipt-hint { font-family: var(--sans); color: var(--ink-2); margin: 0 0 12px; }
.receipt-sum { margin: 0; }
.receipt-sum div { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.receipt-sum dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.receipt-sum dd { margin: 2px 0 0; font-family: var(--sans); }
.receipt-sum b { font-family: var(--mono); font-weight: 500; float: right; }
.receipt-cur { margin: 0 0 10px; }
.receipt-cur a { color: var(--ink); text-decoration: none; font-family: var(--sans); font-weight: 600; }
.receipt-cur b { font-family: var(--mono); color: var(--accent); }
.receipt-lines { list-style: none; padding: 0; margin: 0; }
.receipt-lines li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.receipt-lines li.is-current .r-name { color: var(--green); }
.r-name { font-family: var(--sans); font-weight: 600; grid-column: 1 / -1; }
.r-name small { font-weight: 400; }
.r-local { font-size: 1rem; }
.r-conv { text-align: right; color: var(--ink-2); }
.r-meta { grid-column: 1 / -1; font-family: var(--sans); font-size: 0.75rem; }
.receipt-foot { margin: 14px 0 0; text-align: center; font-family: var(--sans); }
.receipt-foot .button { font-size: 0.85rem; }

/* Ranking */
.ranking { margin-top: 32px; }
.rank-list { list-style: none; padding: 0; margin: 0; columns: 2 340px; column-gap: 32px; }
.rank-list li {
  break-inside: avoid; display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; grid-template-rows: auto 5px; align-items: baseline;
  column-gap: 8px; padding: 5px 4px 6px; border-bottom: 1px solid var(--line-2); cursor: default;
}
.rank-list li:hover, .rank-list li.is-selected { background: var(--paper-2); }
.rank-no { font: 500 0.78rem var(--mono); color: var(--muted); text-align: right; }
.rank-list a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a:hover { color: var(--green); text-decoration: underline; }
.rank-v { font: 500 0.92rem var(--mono); text-align: right; }
.rank-local { grid-column: 2 / -1; grid-row: 3; font: 400 0.74rem var(--mono); color: var(--muted); text-align: right; margin-top: -2px; }
.rank-bar { grid-column: 2 / -1; grid-row: 2; height: 4px; width: var(--w); background: var(--c, var(--green-2)); border-radius: 2px; opacity: 0.85; }
.rank-list.is-short li:not(:nth-child(-n + 8)):not(:nth-last-child(-n + 8)) { display: none; }
.rank-list.is-short li:nth-child(8) { margin-bottom: 0; }
.more { margin-top: 18px; }

/* ---------------------------------------------------------------- strona główna: mapa na cały ekran */
/* Pierwszy ekran = okno minus nagłówek i pasek kursów (wysokości tylko w CSS – bez skoku układu): mapa z wyborem
   produktu i waluty nad nią i legendą pod nią, po prawej panel (tytuł, opis, paragon) przewijany w środku.
   Dalsza część strony (ranking, kalkulator, liczby) – pod mapą, w .below. Na telefonie: mapa, potem panel. */
.page-home { --top-h: 99px; }
.page-home main { max-width: none; padding: 0; }
.page-home main > .explorer-home { margin-top: 0; }
.map-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 380px); gap: 18px;
  padding: 14px 16px 14px;
  height: calc(100vh - var(--top-h));
  height: calc(100dvh - var(--top-h));
  min-height: 580px;
}
.map-area {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.map-area .toolbar { flex: none; gap: 8px 12px; padding: 2px 2px 10px; }
.map-area .chip { padding: 6px 12px; font-size: 0.93rem; gap: 6px; }
.map-area .map-box { flex: 1; min-height: 0; }
.map-area .world-map { height: 100%; }
.map-foot { flex: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 24px; }
.map-foot .legend { flex: 1 1 340px; max-width: 520px; padding-top: 8px; }
.map-foot .legend-ends { margin-top: 20px; }
.map-foot .data-note { flex: 0 1 380px; margin: 0 6px 2px; }
/* Dyskretna wskazówka, że pod mapą jest dalsza część strony */
.more-hint {
  position: absolute; z-index: 4; left: 50%; bottom: 10px; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink-2);
  font: 500 0.78rem/1.2 var(--mono); text-decoration: none; white-space: nowrap; box-shadow: var(--shadow);
}
.more-hint:hover { color: var(--accent); border-color: var(--accent); }

.side { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 2px 12px; }
.side-intro { position: relative; padding: 10px 2px 18px; }
.side-intro::before {
  /* giloszowanie – delikatny wzór jak na banknocie */
  content: ''; position: absolute; inset: 0 0 auto auto; width: 75%; height: 170px; z-index: -1; opacity: 0.55;
  background:
    repeating-radial-gradient(circle at 80% 40%, transparent 0 9px, var(--line-2) 9px 10px),
    repeating-radial-gradient(circle at 60% 70%, transparent 0 13px, var(--line-2) 13px 14px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 40%);
          mask: linear-gradient(90deg, transparent, #000 40%);
}
.side-intro h1 { font-size: 2.15rem; margin-bottom: 0.4em; }
.side-intro .lead { font-size: 0.98rem; }
.side .receipt { position: static; }
.below { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; scroll-margin-top: 12px; }
.below > section { margin-top: 32px; }

@media (max-width: 1100px) { .page-home .brand-tag { display: none; } }
@media (max-width: 900px) {
  .map-stage { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; padding: 12px 12px 4px; gap: 14px; }
  .map-area .toolbar { flex-wrap: nowrap; flex-direction: column; align-items: stretch; }
  .map-area .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px 2px; }
  .map-area .chip { flex: none; }
  .map-area .cur-pick { align-self: flex-start; }
  /* Wysokość (ok. połowa ekranu) i przewijanie pasa mapy w bok – tryb phone modułu world-map (explorer.js) */
  .map-area .map-box { flex: none; }
  .map-foot .data-note { flex-basis: 100%; }
  .side { overflow: visible; padding: 0; }
  .side-intro { padding-top: 6px; }
  .side-intro h1 { font-size: 1.9rem; }
  .more-hint { display: none; }
}
@media print { .more-hint { display: none; } .map-stage { height: auto; } }

/* ---------------------------------------------------------------- kalkulator („kantor”) */

.kantor { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kantor > h2 { margin-bottom: 14px; }
.calc { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.3fr) auto minmax(0, 1.3fr); gap: 10px; align-items: end; }
.calc label span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.calc input, .calc select { width: 100%; }
.calc-swap { height: 40px; width: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); cursor: pointer; }
.calc-swap:hover { background: var(--accent); color: var(--card); border-color: var(--accent); }
.calc-swap .icon { width: 20px; height: 20px; }
.calc-out { grid-column: 1 / -1; display: block; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.calc-result { display: block; font: 500 clamp(1.6rem, 4vw, 2.4rem)/1.15 var(--mono); color: var(--green); }
.calc-rate, .calc-date { display: block; font: 400 0.82rem var(--mono); color: var(--ink-2); margin-top: 4px; }
.calc-date { color: var(--muted); font-family: var(--sans); }
.cols .kantor .calc { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.cols .kantor .calc-amount { grid-column: 1 / -1; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fact { display: block; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); text-decoration: none; }
.fact:hover { border-color: var(--accent); color: var(--ink); }
.fact b { display: block; font: 600 2.2rem/1 var(--serif); color: var(--accent); margin-bottom: 6px; }
.fact span { color: var(--ink-2); }

/* ---------------------------------------------------------------- strony kraju i waluty */

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.banknote {
  position: relative; overflow: hidden; padding: 22px; border-radius: 14px; border: 1px solid var(--line);
  background:
    repeating-linear-gradient(115deg, transparent 0 7px, var(--line-2) 7px 8px),
    var(--card);
  background-blend-mode: normal;
}
.banknote::before { content: ''; position: absolute; inset: 8px; border: 1px solid var(--line); border-radius: 9px; pointer-events: none; }
.banknote > * { position: relative; }
.banknote-code { position: absolute; right: 18px; top: 6px; margin: 0; font: 600 4.5rem/1 var(--serif); color: var(--accent); opacity: 0.22; }
.banknote h2 a { color: var(--ink); text-decoration: none; }
.banknote h2 a:hover { color: var(--green); }
.facts-list { margin: 0; display: grid; gap: 0; }
.facts-list div { display: grid; grid-template-columns: 11em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); background: var(--card); }
.facts-list dt { color: var(--muted); font-size: 0.86rem; }
.facts-list dd { margin: 0; }
.rates-box, .chart-box, .basket, .users { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rate-meta { font-size: 0.82rem; color: var(--muted); margin: 10px 0 0; }

.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; font: 500 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: baseline; }
.table .num { text-align: right; font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.basket-table td:first-child a { color: var(--ink); font-weight: 600; }
.empty { color: var(--muted); }

.chart-bases { display: flex; gap: 6px; margin-bottom: 8px; }
.chart-bases button { font: 500 0.8rem var(--mono); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); cursor: pointer; }
.chart-bases button[aria-pressed='true'] { background: var(--green); color: var(--paper); border-color: var(--green); }
.chart-svg { position: relative; }
.chart-svg svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line-2); }
.chart .tick { fill: var(--muted); font: 500 12px var(--mono); }
.chart .line { fill: none; stroke: var(--green); stroke-width: 2; }
.chart .area { fill: var(--green); opacity: 0.08; }
.chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--paper); font: 500 0.78rem var(--mono); padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.chart-meta { font: 500 0.85rem var(--mono); color: var(--ink-2); margin: 8px 0 0; }

.users-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tags { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: block; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--card); text-decoration: none; font-size: 0.9rem; }
.tags-soft a { background: var(--accent-soft); color: var(--ink); }

/* ---------------------------------------------------------------- lista walut, o projekcie */

.filter input { min-width: 260px; }
.cur-table td:first-child b { font-family: var(--mono); font-weight: 500; }
.countries-cell { color: var(--ink-2); font-size: 0.88rem; }
.badge { font: 500 0.72rem var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); margin-left: 4px; }
.peg-list { columns: 2 360px; column-gap: 32px; padding-left: 18px; }
.peg-list li { break-inside: avoid; margin-bottom: 6px; }
.country-index { list-style: none; padding: 0; columns: 4 200px; column-gap: 24px; }
.country-index li { padding: 3px 0; break-inside: avoid; }
.country-index small { font-family: var(--mono); }

.prose { max-width: 860px; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }
.sources-table td { font-size: 0.88rem; }
.about-data { margin-top: 40px; }
.error-page { padding: 60px 0; }

/* ---------------------------------------------------------------- kontakt */

.contact-form { display: grid; gap: 16px; margin-top: 22px; max-width: 640px; }
.contact-form .field { display: grid; gap: 6px; margin: 0; }
.contact-form label { font-weight: 500; }
.contact-form input[type='text'], .contact-form input[type='email'], .contact-form textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-height: 42px;
}
.contact-form textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.contact-form [aria-invalid='true'] { border-color: #b3261e; }
.contact-form .field-check { grid-template-columns: auto 1fr; align-items: start; gap: 4px 10px; }
.contact-form .field-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--green); }
.contact-form .field-check label { font-weight: 400; font-size: 0.95rem; color: var(--ink-2); }
.contact-form .field-check .field-error { grid-column: 2; }
.contact-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 500; }
.req { color: var(--accent); }
.field-error { margin: 0; color: #b3261e; font-size: 0.9rem; }
.form-required { margin: 0; color: var(--muted); font-size: 0.85rem; }
.form-notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); max-width: 640px; }
.form-notice.is-ok { border-color: var(--green); color: var(--green); font-weight: 500; }
.form-notice.is-error { border-color: #b3261e; color: #b3261e; }
.form-info { margin-top: 26px; font-size: 0.85rem; color: var(--muted); max-width: 640px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .contact-form [aria-invalid='true'], :root:not([data-theme='light']) .form-notice.is-error { border-color: #f2b8b5; }
  :root:not([data-theme='light']) .field-error, :root:not([data-theme='light']) .form-notice.is-error { color: #f2b8b5; }
}
:root[data-theme='dark'] .contact-form [aria-invalid='true'], :root[data-theme='dark'] .form-notice.is-error { border-color: #f2b8b5; }
:root[data-theme='dark'] .field-error, :root[data-theme='dark'] .form-notice.is-error { color: #f2b8b5; }

/* ---------------------------------------------------------------- stopka */

.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 40px; }
/* Ikonki kanałów marki w stopce (Series::socialLinks, moduł series): kolor tekstu stopki, przy najechaniu i fokusie jaśniej */
.series-social-link { transition: opacity .15s; }
.series-social-link:hover, .series-social-link:focus-visible { opacity: .7; }
.footer-cols { max-width: var(--wrap); margin: 0 auto; padding: 22px 16px 30px; display: grid; gap: 6px; font-size: 0.88rem; color: var(--ink-2); }
.footer-cols p { margin: 0; }
.footer-copy { color: var(--muted); }

/* ---------------------------------------------------------------- telefon i tablet */

@media (max-width: 980px) {
  .stage, .cols, .users-grid, .hero-split { grid-template-columns: minmax(0, 1fr); }
  .receipt { position: static; }
  .calc { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .calc-amount { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .brand-tag { display: none; }
  .nav-toggle { display: block; }
  .site-nav { position: static; }
  .site-nav ul#nav-list { display: none; position: absolute; left: 16px; right: 16px; top: 60px; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; z-index: 40; box-shadow: var(--shadow); }
  .site-nav.is-open ul#nav-list { display: flex; }
  .maps-list { position: static; box-shadow: none; border: 0; }
  .site-header { position: relative; }
  .facts-list div { grid-template-columns: 1fr; gap: 2px; }
  .filter input { min-width: 0; width: 100%; }
  .table { font-size: 0.85rem; }
  .basket-table th:nth-child(4), .basket-table td:nth-child(4) { display: none; }
}

/* ---------- Quiz (/quiz – moduł quiz z assets; mapa – kolory .world-map) ---------- */
.quiz-stage { margin: 18px 0 28px; }
.quiz-stage .quiz { --quiz-accent: var(--accent); --quiz-accent-ink: var(--paper); --quiz-surface: var(--card); --quiz-ok: var(--green); --quiz-radius: var(--radius); }
.quiz-map { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.quiz-about { max-width: 70ch; color: var(--ink-2); margin-bottom: 32px; }
