:root {
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #f3efe4;
  --card: #fffdf8;
  --line: #e2d9c8;
  --kraj: #1f6b45;
  --gospodarka: #1d4e89;
  --technologie: #0e6e6a;
  --kultura: #7a3e62;
  --sport: #b8431f;
  --zdrowie: #3e6b32;
  --swiat: #3d5270;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
button, input { font: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--ink); color: white; padding: 8px 12px;
}
.skip:focus { top: 12px; }

.stripes { display: grid; grid-template-columns: repeat(7, 1fr); height: 8px; }
.stripes::before { content: ""; grid-column: 1 / -1; height: 8px;
  background: linear-gradient(90deg, var(--kraj) 0 14.2%, var(--gospodarka) 14.2% 28.4%, var(--technologie) 28.4% 42.6%, var(--kultura) 42.6% 56.8%, var(--sport) 56.8% 71%, var(--zdrowie) 71% 85.2%, var(--swiat) 85.2% 100%);
}

.mast { background: var(--card); border-bottom: 1px solid var(--line); }
.mast-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; padding: 18px 0 14px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { font-family: var(--serif); font-size: 34px; letter-spacing: -0.04em; color: var(--kraj); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 14px; }
.brand-text em { font-style: normal; color: var(--muted); font-size: 13px; }
.mast-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.today { margin: 0; color: var(--muted); font-size: 14px; }
.auth { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-solid { background: var(--kraj); color: white; }
.btn-ghost { background: transparent; border-color: var(--line); }
.me { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 650; }
.ava {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--kultura); color: white; font-size: 12px; font-weight: 700; object-fit: cover;
}
.ava.lg { width: 72px; height: 72px; font-size: 22px; }

.nav { background: #17261f; }
.nav-row { display: flex; align-items: center; min-height: 48px; }
.nav-toggle { display: none; background: transparent; color: white; border: 0; padding: 10px 0; }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: #f6f1e6; text-decoration: none; font-size: 15px; padding: 12px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: #e7c27a; }

.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 8px;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 18px;
  overflow: hidden;
  min-height: 420px;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.hero-copy { background: #173528; color: #f7f3ea; padding: 36px 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-copy h1 { font-size: clamp(32px, 4vw, 52px); margin: 0; }
.hero-copy h1 a, .hero-copy a { color: inherit; }
.hero-copy h1 a { text-decoration: none; }
.hero-copy h1 a:hover { text-decoration: underline; text-underline-offset: 0.14em; text-decoration-thickness: 1px; }
.hero-copy p { margin: 0; font-size: 18px; }
.kicker { letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: #e7c27a; }

.chip {
  display: inline-block; color: white; text-decoration: none; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.chip-kraj { background: var(--kraj); }
.chip-gospodarka { background: var(--gospodarka); }
.chip-technologie { background: var(--technologie); }
.chip-kultura { background: var(--kultura); }
.chip-sport { background: var(--sport); }
.chip-zdrowie { background: var(--zdrowie); }
.chip-swiat { background: var(--swiat); }

.home-grid { display: grid; grid-template-columns: 1.7fr 0.8fr; gap: 28px; padding: 28px 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border-radius: 16px; overflow: hidden; border-top: 4px solid var(--kraj); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-gospodarka { border-top-color: var(--gospodarka); }
.card-technologie { border-top-color: var(--technologie); }
.card-kultura { border-top-color: var(--kultura); }
.card-sport { border-top-color: var(--sport); }
.card-zdrowie { border-top-color: var(--zdrowie); }
.card-swiat { border-top-color: var(--swiat); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { margin: 0; font-size: 22px; }
.card-body h3 a { text-decoration: none; }
.card-body p { margin: 0; color: var(--muted); }
.card-body time { color: var(--muted); font-size: 13px; }
.rank { font-family: var(--serif); font-size: 28px; color: var(--sport); line-height: 1; }

.most { background: #241c2b; color: #f6f1e6; border-radius: 16px; padding: 18px 18px 8px; }
.most h2 { margin: 0 0 8px; font-size: 28px; }
.most ol { margin: 0; padding: 0; list-style: none; counter-reset: read; }
.most li { counter-increment: read; border-top: 1px solid rgba(255,255,255,0.12); }
.most a { display: grid; grid-template-columns: 28px auto; gap: 8px 10px; align-items: start; text-decoration: none; padding: 12px 0; }
.most .num { grid-row: span 2; font-family: var(--serif); font-size: 26px; color: #e7c27a; line-height: 1; }

.bands { display: grid; gap: 16px; padding-bottom: 12px; }
.band { display: grid; grid-template-columns: 280px 1fr; gap: 18px; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.band-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; }
.band-copy { padding: 18px 18px 18px 0; }
.band-copy h2 { margin: 10px 0; font-size: 30px; }
.band-copy h2 a { text-decoration: none; }
.band-copy ul { margin: 0 0 8px; padding-left: 18px; }
.more { font-weight: 700; }
.band-kraj { box-shadow: inset 6px 0 0 var(--kraj); }
.band-gospodarka { box-shadow: inset 6px 0 0 var(--gospodarka); }
.band-technologie { box-shadow: inset 6px 0 0 var(--technologie); }
.band-kultura { box-shadow: inset 6px 0 0 var(--kultura); }
.band-sport { box-shadow: inset 6px 0 0 var(--sport); }
.band-zdrowie { box-shadow: inset 6px 0 0 var(--zdrowie); }
.band-swiat { box-shadow: inset 6px 0 0 var(--swiat); }

.letter { background: #1d4e89; color: white; margin-top: 22px; }
.letter-row { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 28px 0; }
.letter h2 { margin: 0 0 6px; font-size: 36px; }
.letter p { margin: 0; }
.letter .btn-solid { background: #e7c27a; color: #1c1915; }
.form-msg { min-height: 1.2em; margin-top: 8px; }
.form-msg.ok { color: #d9f5e4; }
.letter .form-msg.bad, .form-msg.bad { color: #9c2f2f; }

.latest { padding: 28px 0 40px; }
.latest h2 { font-size: 36px; }

.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: clamp(40px, 6vw, 68px); margin: 10px 0; }
.page-kraj h1 { color: var(--kraj); }
.page-gospodarka h1 { color: var(--gospodarka); }
.page-technologie h1 { color: var(--technologie); }
.page-kultura h1 { color: var(--kultura); }
.page-sport h1 { color: var(--sport); }
.page-zdrowie h1 { color: var(--zdrowie); }
.page-swiat h1 { color: var(--swiat); }

.story { padding: 28px 0 48px; max-width: 760px; }
.story h1 { font-size: clamp(34px, 5vw, 56px); margin: 12px 0; }
.dek { font-size: 20px; color: var(--muted); }
.byline { display: flex; gap: 12px; color: var(--muted); font-size: 14px; }
.story figure { margin: 18px 0; }
.story img { width: 100%; border-radius: 16px; max-height: 520px; object-fit: cover; }
.story-body p { font-family: var(--serif); font-size: 20px; line-height: 1.55; }
.related { border-top: 1px solid var(--line); padding-top: 12px; }
.prose { padding: 28px 0 56px; max-width: 760px; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); }
.prose h2 { margin-top: 28px; }

.auth-card, .cabinet { width: min(1120px, calc(100% - 32px)); margin: 28px auto 48px; }
.auth-card { max-width: 480px; background: var(--card); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); border-top: 8px solid var(--kraj); }
@media (max-width: 480px) {
  .auth-card { padding: 22px 16px; }
}
.auth-card h1 { margin-top: 0; }
label { display: block; font-size: 14px; font-weight: 650; margin: 12px 0 4px; }
input[type="email"], input[type="password"], input[type="text"], input[type="file"] {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: white;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .btn { margin-top: 12px; }
.stack > .form-msg { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { margin: 0; }
.stack .avatar-row { margin-bottom: 0; }
.cabinet { display: grid; grid-template-columns: 240px 1fr; gap: 22px; }
.side { background: #17261f; color: #f6f1e6; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; align-self: start; }
.side a, .side button {
  color: inherit; text-decoration: none; background: transparent; border: 0; text-align: left;
  padding: 12px 10px; border-radius: 10px; letter-spacing: 0.08em; font-weight: 700; cursor: pointer;
}
.side a[aria-current="page"] { background: #e7c27a; color: #1c1915; }
.pane { background: var(--card); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.pane h1 { margin-top: 0; font-size: 42px; }
.pane h2 { margin-top: 28px; }
.avatar-row { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.file-pick { position: relative; }
.file-pick input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.switch { display: flex; gap: 12px; align-items: center; font-weight: 650; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.pill { width: 52px; height: 32px; border-radius: 999px; background: #d5cbbd; position: relative; flex: 0 0 auto; }
.pill::after { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: white; top: 3px; left: 3px; }
.switch input:checked + .pill { background: var(--kraj); }
.switch input:checked + .pill::after { left: 23px; }
.switch input:focus-visible + .pill { outline: 2px solid var(--ink); outline-offset: 2px; }
.perks { margin: 8px 0 0; padding-left: 18px; }
.perks li { margin: 6px 0; }
.status { border-radius: 14px; padding: 14px 16px; background: #f6f1e6; }
.status strong { font-family: var(--serif); font-size: 28px; display: block; }
.price { font-family: var(--serif); font-size: 40px; margin: 8px 0; color: var(--gospodarka); }
#paypal-buttons { max-width: 320px; min-height: 48px; margin-top: 12px; }
.pane .form-msg.ok { color: var(--kraj); }

.colophon { background: #141210; color: #f3efe4; padding: 36px 0 18px; margin-top: 12px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 0.7fr 0.7fr 1fr; gap: 22px; }
.colophon a { color: #f3efe4; }
.colophon h2 { font-family: var(--sans); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.colophon ul { list-style: none; padding: 0; margin: 0; }
.colophon li { margin: 6px 0; }
.legal-line { width: min(1120px, calc(100% - 32px)); margin: 18px auto 0; color: #c8bfb0; font-size: 13px; }
.cookie { position: sticky; bottom: 0; background: #fffdf8; border-top: 1px solid var(--line); }
.cookie-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 16px; align-items: center; padding: 12px 0; }
.cookie-row p { flex: 1 1 220px; min-width: 0; margin: 0; }
.cookie button { background: var(--ink); color: white; border: 0; border-radius: 999px; min-height: 40px; padding: 0 14px; }

@media (max-width: 900px) {
  .hero, .home-grid, .cabinet, .band, .letter-row, .foot-grid { grid-template-columns: 1fr; }
  .cards, .cards-3 { grid-template-columns: 1fr; }
  .band-copy { padding: 0 16px 16px; }
  .nav-toggle { display: block; }
  .nav-links { display: none; width: 100%; padding-bottom: 10px; }
  .nav-links.open { display: flex; flex-direction: column; }
  .side { flex-direction: row; flex-wrap: wrap; }
}
