/*
Theme Name: Money Shortlist
Theme URI: https://moneyshortlist.com
Description: Motyw moneyshortlist.com wg projektu z Claude Design (23.09.2026). Komponenty rankingów jako klasy .msl-* — używają ich artykuły generowane w n8n.
Version: 1.0.0
Requires PHP: 8.2
License: Proprietary
Text Domain: msl
*/

/* ---------- tokeny (jedno miejsce na zmianę wyglądu) ---------- */
:root {
  --paper: #F6F4EE;
  --card: #FFFFFF;
  --ink: #15201B;
  --muted: #56605A;
  --green: #1F5B45;
  --green-d: #17463A;
  --gold: #E0A526;
  --gold-t: #FBF0D4;
  --mint: #E6EFEA;
  --line: #DDD8CC;
  --warn: #9A4B1F;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 18px;
  --wrap: 1280px;
  --read: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-d); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); margin-top: 1.4em; }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; clip: auto; width: auto; height: auto; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 5vw, 80px); }
.read { max-width: var(--read); }
em.verdict, .accent { font-style: italic; font-weight: 500; color: var(--green); }

/* ---------- nagłówek ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__name { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.brand__name i { font-weight: 500; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 12px 4px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--green); }
.header-tools { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; list-style: none; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang a { display: block; padding: 6px 12px; border-radius: 999px; font: 500 12px var(--mono); text-transform: uppercase; color: var(--ink); text-decoration: none; }
.lang .current-lang a { background: var(--ink); color: var(--paper); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
@media (max-width: 960px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 20; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav a { display: block; padding: 12px 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-tools .msl-btn { display: none; }
  .site-header { position: relative; }
}

/* ---------- przyciski, chipy ---------- */
.msl-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 22px; border-radius: 10px; border: 1.5px solid var(--green); background: var(--green); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; line-height: 1.2; }
.msl-btn:hover { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.msl-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.msl-btn--gold:hover { background: #cf9519; border-color: #cf9519; color: var(--ink); }
.msl-btn--ghost { background: transparent; color: var(--green); }
.msl-btn--ghost:hover { background: var(--mint); color: var(--green-d); }
.msl-btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.msl-btn svg { flex-shrink: 0; }

.msl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 12px/1.4 var(--mono); letter-spacing: .02em; text-transform: uppercase; background: var(--mint); color: var(--green-d); }
.msl-chip--top { background: var(--gold); color: var(--ink); }
.msl-chip--aff { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.msl-chip--warn { background: var(--gold-t); color: #6B4A00; }
.msl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* Wartość do ręcznej weryfikacji — zasada twarda nr 1: nigdy nie zgadujemy liczb. */
.msl-ph { font-family: var(--mono); font-size: .92em; background: var(--gold-t); padding: 1px 6px; border-radius: 4px; }

/* ---------- strona główna ---------- */
.hero { padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero__text { grid-column: span 7; }
.hero__side { grid-column: span 5; }
.hero h1 { font-size: clamp(44px, 6.5vw, 76px); line-height: 1.02; letter-spacing: -0.025em; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 600px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 960px) { .hero__text, .hero__side { grid-column: 1 / -1; } }

.section { padding: 16px 0 72px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.section__head h2 { margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card--featured { box-shadow: 0 18px 40px -24px rgba(21, 32, 27, .35); }
.card h3 { margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--green); }
.card .more { margin-top: auto; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.card p { color: var(--muted); margin: 0; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--card); }

.band { margin: 0 auto 88px; padding: clamp(28px, 5vw, 56px); border-radius: 24px; background: var(--mint); }
.band .eyebrow { font: 500 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--green-d); }
.band h2 { margin-top: 12px; max-width: 700px; }
.band .card { padding: 24px; }
.band .num { font: 500 13px var(--mono); color: var(--green); }

/* ---------- artykuł ---------- */
.article { padding: 40px 0 96px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin: 16px 0 28px; }
.entry-content > * { max-width: var(--read); }
.entry-content > .msl-wide, .entry-content > .msl-table-wrap, .entry-content > .msl-rank { max-width: 100%; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img { border-radius: 20px; }

.msl-disclosure { display: flex; gap: 12px; padding: 16px 18px; margin: 0 0 28px; border-radius: 14px; background: var(--gold-t); font-size: 15px; line-height: 1.55; }
.msl-disclosure::before { content: "i"; flex-shrink: 0; width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 50%; font: 600 12px/17px var(--mono); text-align: center; margin-top: 2px; }

.msl-rank { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 3vw, 32px); margin: 0 0 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.msl-rank--top { border: 2px solid var(--gold); }
.msl-rank__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.msl-rank__id { display: flex; gap: 18px; align-items: center; }
.msl-rank__num { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; font: 600 28px var(--serif); background: var(--mint); }
.msl-rank--top .msl-rank__num { background: var(--gold); }
.msl-rank__title { margin: 4px 0 0; font-size: clamp(22px, 2.4vw, 30px); }
.msl-rank__score { font: 600 40px/1 var(--serif); white-space: nowrap; }
.msl-rank__score small { font-size: 18px; color: var(--muted); font-weight: 400; }
.msl-rank__verdict { margin: 0; font: italic 500 20px/1.5 var(--serif); color: var(--green-d); }
.msl-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.msl-facts > div { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--paper); }
.msl-facts dt { font-size: 13px; color: var(--muted); }
.msl-facts dd { margin: 0; font-weight: 600; font-family: var(--mono); font-size: 15px; }
.msl-proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.msl-proscons h4 { font-family: var(--sans); font-size: 14px; margin: 0 0 8px; }
.msl-proscons ul { list-style: none; margin: 0; padding: 0; }
.msl-proscons li { position: relative; padding-left: 24px; font-size: 15px; }
.msl-pros li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.msl-cons li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 10px; border-top: 2px solid var(--warn); }
.msl-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.msl-cta__go { display: flex; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .msl-rank__head { flex-direction: column; gap: 12px; }
  .msl-facts, .msl-proscons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msl-proscons { grid-template-columns: 1fr; }
  .msl-cta, .msl-cta__go { flex-direction: column; align-items: stretch; }
  .msl-cta .msl-btn { justify-content: center; }
}

.msl-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin: 0 0 24px; }
.msl-table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.msl-table-wrap th, .msl-table-wrap td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.msl-table-wrap thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.msl-table-wrap tbody tr:first-child { background: var(--gold-t); }
.msl-table-wrap caption { caption-side: bottom; text-align: left; padding: 14px 16px; font-size: 13px; color: var(--muted); }

.msl-method { padding: clamp(20px, 3vw, 32px); margin: 32px 0; border-radius: 20px; background: var(--mint); }
.msl-method h2 { margin-top: 0; }
.msl-method ul { list-style: none; padding: 0; margin: 0; }
.msl-method li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }

.entry-content details { border-top: 1px solid var(--line); padding: 18px 0; }
.entry-content summary { font-weight: 600; font-size: 18px; cursor: pointer; }
.entry-content details p { margin: 12px 0 0; color: var(--muted); }
.msl-note { padding: 20px; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; color: var(--muted); }

/* ---------- listy wpisów, stopka ---------- */
.archive { padding: 48px 0 96px; }
.site-footer { background: var(--ink); color: #E9E6DD; padding: 56px 0 32px; margin-top: auto; }
.site-footer a { color: #F6F4EE; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-top p { max-width: 420px; color: #C9C5BA; font-size: 14px; margin: 14px 0 0; }
.footer-top .brand { color: #F6F4EE; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-legal { padding-top: 20px; border-top: 1px solid #34413B; font-size: 13px; color: #B8B4A8; }
.site { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- wykresy z danych (generuje Content w n8n) ---------- */
.msl-chart { margin: 8px 0 32px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.msl-chart figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- powiązane zestawienia, obrazki w kartach ---------- */
.related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }
.card__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
