/* =============================================
   Goliat Klub — navy / gold dark theme
   ============================================= */

/* -------- Fonts (self-hosted, latin + latin-ext) -------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-400.woff2') format('woff2');
  /* Pliki zawierają latin + latin-ext skonsolidowane (PL znaki OK) */
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-600.woff2') format('woff2');
  /* Pliki zawierają latin + latin-ext skonsolidowane (PL znaki OK) */
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-700.woff2') format('woff2');
  /* Pliki zawierają latin + latin-ext skonsolidowane (PL znaki OK) */
}

/* -------- Tokens -------- */
:root {
  --bg:        #0a1628;
  --surface:   #111e35;
  --surface-2: #18294a;
  --border:    #1f3154;
  --border-hi: #2d4577;
  --accent:    #c9a84c;      /* gold */
  --accent-hi: #e4c462;
  --accent-dim:#a8863b;
  --text:      #e7ecf4;
  --text-dim:  #b8c3d8;   /* podniesione dla WCAG AA contrast */
  --text-low:  #8794ad;   /* podniesione dla WCAG AA contrast */
  --danger:    #ef4444;

  --rab-accent: var(--accent);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --container: 1360px;
  --content:   920px;

  --radius:    10px;
  --radius-sm:  6px;
  --shadow:    0 6px 24px rgba(0,0,0,.4);

  --header-h:  68px;
  --touch-min: 44px;
  --stop-1024: 1024px;
  --stop-768:   768px;
}

/* -------- Reset / base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
img { border-radius: var(--radius-sm); }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hi); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.35rem); }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1em; color: var(--text); }
ul, ol { padding-left: 1.3em; }
li { margin: .25em 0; }
blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5em 0;
  padding: .5em 0 .5em 1.2em;
  color: var(--text-dim);
  font-style: italic;
  background: rgba(201,168,76,.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
code, pre {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .92em;
}
code { background: var(--surface); padding: .15em .4em; border-radius: 4px; color: var(--accent-hi); }
pre { background: var(--surface); padding: 1em; overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* Screen reader */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--accent); color: #0a0a0a; padding: .5em 1em;
  z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* -------- Layout tokens -------- */
.site-main { min-height: 60vh; }
.site-main > *:not(.hero):not(.cat-grid):not(.worth-read):not(.site-footer) {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* -------- Header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,22,40,.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
}
.site-brand .brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  color: var(--text);
}
.site-brand .brand-dot { color: var(--accent); margin: 0 2px; }
.primary-nav .nav-list {
  display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0;
}
.primary-nav a {
  color: var(--text); font-weight: 500; font-size: .95rem;
  display: inline-flex; align-items: center;
  min-height: var(--touch-min); padding: 0 .25rem;
}
.primary-nav a:hover { color: var(--accent); text-decoration: none; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  color: var(--text-dim); border: 1px solid transparent;
  transition: all .15s;
}
.tool-btn:hover { color: var(--accent); border-color: var(--border-hi); background: var(--surface); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: currentColor;
  transition: transform .2s;
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s;
  }
  .primary-nav.is-open { max-height: 80vh; }
  .primary-nav .nav-list {
    flex-direction: column; gap: 0; padding: .5rem 1.25rem;
  }
  .primary-nav .nav-list > li { border-bottom: 1px solid var(--border); }
  .primary-nav a { display: block; padding: .9rem 0; }
}

/* -------- Hero slider (home) -------- */
.hero {
  max-width: var(--container);
  margin: 2rem auto 0;
  padding: 0 1.25rem;
}
.hero-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
  background: var(--surface);
  scroll-behavior: smooth;
}
.hero-slider::-webkit-scrollbar { display: none; }
.hero-slide { scroll-snap-align: start; }
.hero-slide-link {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 420px;
  color: var(--text); text-decoration: none;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}
.hero-slide-media {
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
}
.hero-slide-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.hero-slide-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
}
.hero-slide-body {
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.hero-slide:first-child .hero-slide-body::before {
  content: 'Najnowsze';
  position: absolute; top: 1.25rem; right: 1.5rem;
  font-family: var(--font-head); font-weight: 700;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: #0a1628; background: var(--accent);
  padding: .35em .8em; border-radius: 999px;
}
.hero-slide-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: .5rem 0 .75rem;
}
.hero-slide-link:hover .hero-slide-title { color: var(--accent-hi); }
.hero-slide-excerpt {
  color: var(--text-dim); margin-bottom: 1rem;
}
.hero-slide-cta {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 700; color: var(--accent);
  font-family: var(--font-head);
  padding: .5em 0;
  border-bottom: 2px solid transparent;
  align-self: flex-start;
  transition: border-color .15s, gap .15s;
}
.hero-slide-link:hover .hero-slide-cta {
  border-bottom-color: var(--accent);
  gap: .7em;
}
.hero-dots {
  display: flex; justify-content: center; gap: .5rem;
  margin-top: 1rem;
}
.hero-dot {
  display: inline-block;
  width: 32px; height: 32px; border-radius: 50%;
  position: relative;
}
.hero-dot::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-hi);
  transform: translate(-50%, -50%);
  transition: background .15s, width .15s, height .15s;
}
.hero-dot:hover::before, .hero-dot:focus-visible::before, .hero-dot.is-active::before {
  background: var(--accent);
  width: 14px; height: 14px;
}

@media (max-width: 768px) {
  .hero-slide-link {
    grid-template-columns: 1fr; min-height: auto;
  }
  .hero-slide-body { padding: 1.25rem; }
}

/* -------- Post category chip -------- */
.post-cat {
  display: inline-block;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 600; font-family: var(--font-head);
  color: var(--accent);
  background: rgba(201,168,76,.1);
  padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid rgba(201,168,76,.25);
}
a.post-cat:hover { background: rgba(201,168,76,.2); text-decoration: none; }

/* -------- Logo SVG -------- */
.site-logo, .footer-logo { display: inline-block; line-height: 0; }
.gk-logo { height: 40px; width: auto; display: block; }
.footer-logo .gk-logo { height: 44px; }

/* -------- Pillar hubs (na home, pod hero) -------- */
.pillar-hubs {
  max-width: var(--container);
  margin: 3rem auto 2rem;
  padding: 0 1.25rem;
}
.section-lead {
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: .5rem 0 0;
  max-width: 580px;
}
.pillar-hubs-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.pillar-hub {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(201,168,76,.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform .15s, border-color .15s;
}
.pillar-hub::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 80%);
  opacity: .6;
}
.pillar-hub:hover { transform: translateY(-3px); border-color: var(--accent); }
.pillar-hub:hover::before { opacity: 1; }
.pillar-hub-link {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  height: 100%;
}
.pillar-hub-eyebrow {
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: .25rem;
}
.pillar-hub-title {
  font-size: 1.35rem;
  margin: 0 0 .4rem;
  line-height: 1.25;
  font-family: var(--font-head);
}
.pillar-hub-link:hover .pillar-hub-title { color: var(--accent-hi); }
.pillar-hub-tagline {
  color: var(--text-dim);
  font-size: .92rem;
  margin: 0 0 1rem;
  line-height: 1.5;
  flex: 1;
}
.pillar-hub-cta {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: .92rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: auto;
  transition: color .15s;
}
.pillar-hub-link:hover .pillar-hub-cta { color: var(--accent-hi); }

/* -------- TOP-3 Grid kategorii (NAD 2-col gridem) -------- */
.top-cat-grid {
  max-width: var(--container);
  margin: 3rem auto 2rem;
  padding: 0 1.25rem;
}
.top-cat-grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.top-cat-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  display: flex; flex-direction: column;
}
.top-cat-col-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  padding-bottom: .75rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.top-cat-col-title { margin: 0; font-size: 1.25rem; }
.top-cat-col-title a { color: var(--text); }
.top-cat-col-title a:hover { color: var(--accent); text-decoration: none; }
.top-cat-col-count { font-size: .75rem; color: var(--text-low); text-transform: uppercase; letter-spacing: .08em; }
.top-cat-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .75rem; flex: 1; }
.top-cat-item-link { color: var(--text); display: block; }
.top-cat-item.is-featured .top-cat-item-media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius-sm); border-radius: 0; }
.top-cat-item.is-featured .top-cat-item-media { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: .7rem; }
.top-cat-item.is-featured .top-cat-item-title { font-size: 1.05rem; margin: 0 0 .35rem; line-height: 1.3; font-family: var(--font-body); font-weight: 600; }
.top-cat-item.is-featured .top-cat-item-excerpt { color: var(--text-dim); font-size: .88rem; margin: 0; }
.top-cat-item:not(.is-featured) { border-top: 1px solid var(--border); padding-top: .5rem; }
.top-cat-item:not(.is-featured):first-of-type { border-top: 0; padding-top: 0; }
.top-cat-item-title-sm { font-size: .9rem; margin: 0; font-family: var(--font-body); font-weight: 500; line-height: 1.35; color: var(--text); }
.top-cat-item-link:hover .top-cat-item-title,
.top-cat-item-link:hover .top-cat-item-title-sm { color: var(--accent-hi); text-decoration: none; }
.top-cat-empty { color: var(--text-low); font-size: .85rem; font-style: italic; flex: 1; }
.top-cat-col-more {
  display: inline-block; margin-top: auto;
  font-size: .85rem; color: var(--accent);
  font-family: var(--font-head); font-weight: 600;
  padding-top: .5rem;
}
.top-cat-col-more:hover { color: var(--accent-hi); text-decoration: none; }

@media (max-width: 900px) {
  .top-cat-grid-inner { grid-template-columns: 1fr; gap: 1rem; }
}

/* -------- Grid kategorii (home) -------- */
.cat-grid {
  max-width: var(--container);
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.cat-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.cat-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .5rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.cat-col-title { margin: 0; font-size: 1.5rem; }
.cat-col-title a { color: var(--text); }
.cat-col-title a:hover { color: var(--accent); text-decoration: none; }
.cat-col-more { font-size: .85rem; color: var(--accent); font-weight: 600; }
.cat-col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.cat-card-link { display: grid; grid-template-columns: 140px 1fr; color: var(--text); text-decoration: none; }
.cat-card-media img { aspect-ratio: 3/2; object-fit: cover; border-radius: 0; width: 100%; height: 100%; }
.cat-card-body { padding: .9rem 1rem; }
.cat-card-title { font-size: 1rem; margin: 0 0 .3rem; font-family: var(--font-body); font-weight: 600; line-height: 1.3; }
.cat-card-link:hover .cat-card-title { color: var(--accent-hi); }
.cat-card-excerpt { color: var(--text-dim); font-size: .88rem; margin: 0; }

@media (max-width: 768px) {
  .cat-grid-inner { grid-template-columns: 1fr; gap: 2rem; }
  .cat-card-link { grid-template-columns: 1fr; }
  .cat-card-media { aspect-ratio: 3/2; }
}

/* -------- Warto przeczytać -------- */
.worth-read {
  max-width: var(--container);
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.section-header { margin-bottom: 1.25rem; }
.section-title {
  font-size: 1.6rem; margin: 0; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  display: inline-block;
}
.worth-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.worth-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: border-color .15s, transform .15s; }
.worth-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.worth-card-link { color: var(--text); text-decoration: none; display: block; }
.worth-card-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: 100%; border-radius: 0; }
.worth-card-body { padding: 1rem; }
.worth-card-title { font-size: .98rem; margin: .5rem 0 0; line-height: 1.3; font-family: var(--font-body); font-weight: 600; }
.worth-card-link:hover .worth-card-title { color: var(--accent-hi); }

@media (max-width: 1023px) { .worth-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .worth-grid { grid-template-columns: 1fr; } }

/* -------- Single post -------- */
.single-post {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.single-header-inner {
  max-width: var(--content);
  margin: 2.5rem auto 1.5rem;
  text-align: left;
}
.single-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: .5rem 0 1rem;
}
.single-meta {
  color: var(--text-dim); font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  margin-bottom: 1.5rem;
}
.meta-sep { color: var(--text-low); }
.single-hero {
  margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden;
}
.single-hero img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 0; }

.single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  /* Desktop: TOC left | content | sidebar right */
  .single-post.has-toc .single-layout {
    grid-template-columns: 200px minmax(0, 1fr) 280px;
    gap: 2.25rem;
  }
  .single-post.has-toc .toc--sidebar { grid-column: 1 / 2; display: block; }
  .single-post.has-toc .single-content { grid-column: 2 / 3; }
  .single-post.has-toc .sidebar--right { grid-column: 3 / 4; }
  .single-post.has-toc .toc-mobile-wrap { display: none; }

  /* Desktop bez TOC: content + sidebar */
  .single-post:not(.has-toc) .single-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.25rem;
  }
  .single-post:not(.has-toc) .single-content { grid-column: 1 / 2; }
  .single-post:not(.has-toc) .sidebar--right { grid-column: 2 / 3; }
}

@media (max-width: 1023px) {
  /* Tablet/mobile: TOC mobile na górze + content (bez sidebars na desktop) */
  .toc--sidebar { display: none; }
}

/* Single content styles */
.single-content { max-width: var(--content); min-width: 0; }
.single-content p, .single-content ul, .single-content ol, .single-content blockquote, .single-content figure {
  margin-bottom: 1.25em;
}
.single-content > p:first-of-type {
  font-size: 1.12em;
  color: #eef1f7;
  line-height: 1.65;
}
.single-content h2, .single-content h4.wp-block-heading {
  margin-top: 2.2em;
  padding-top: .5em;
  position: relative;
}
.single-content h2::before, .single-content h4.wp-block-heading::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.single-content h3 { margin-top: 1.8em; color: var(--text); }
.single-content h3::before { content: '›'; color: var(--accent); margin-right: .4em; font-weight: 700; }
.single-content img { border-radius: var(--radius-sm); margin: 1.5em auto; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.single-content figcaption { text-align: center; color: var(--text-low); font-size: .88rem; margin-top: .5em; }
.single-content ul li::marker, .single-content ol li::marker { color: var(--accent); font-weight: 700; }
.single-content a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.single-content a:hover { text-decoration-thickness: 2px; }
.single-content strong, .single-content b { color: #f1ead4; font-weight: 600; }

/* Section dividers na home — gold delikatny */
.top-cat-grid + .cat-grid::before,
.cat-grid + .worth-read::before {
  content: '';
  display: block;
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto 2.5rem;
}

/* TOC mobile */
.toc-mobile-wrap { margin-bottom: 1.5rem; }
.toc--mobile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.toc--mobile > summary {
  cursor: pointer; list-style: none;
  padding: .8rem 1rem;
  font-family: var(--font-head); font-weight: 700;
  color: var(--text);
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
}
.toc--mobile > summary::-webkit-details-marker { display: none; }
.toc--mobile > summary::after {
  content: '▾'; color: var(--accent); transition: transform .2s;
}
.toc--mobile[open] > summary::after { transform: rotate(180deg); }
.toc--mobile > summary:hover { background: var(--surface-2); }
.toc--mobile nav { padding: .25rem 1rem 1rem; border-top: 1px solid var(--border); }
.toc--mobile .toc-list, .toc--mobile .toc-sublist {
  list-style: none; padding-left: 0; margin: .5em 0;
  font-size: .95rem;
}
.toc--mobile .toc-sublist { padding-left: 1.1em; border-left: 1px solid var(--border); }
.toc--mobile .toc-list > li, .toc--mobile .toc-sublist > li { margin: .1em 0; }
.toc--mobile a { color: var(--text-dim); display: block; padding: .55em .25em; line-height: 1.35; min-height: var(--touch-min); }
.toc--mobile a:hover { color: var(--accent); text-decoration: none; }

/* TOC sidebar */
.toc--sidebar { display: block; }
.toc-sticky {
  position: sticky; top: 80px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  padding-right: .5rem;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.toc-heading {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-low); margin: 0 0 .6rem;
  font-family: var(--font-body); font-weight: 600;
}
.toc--sidebar .toc-list, .toc--sidebar .toc-sublist {
  list-style: none; padding-left: 0; margin: 0;
  font-size: .92rem;
}
.toc--sidebar .toc-sublist { padding-left: 1em; border-left: 1px solid var(--border); margin-left: .25em; }
.toc--sidebar .toc-list > li, .toc--sidebar .toc-sublist > li { margin: .45em 0; }
.toc--sidebar a {
  color: var(--text-dim);
  display: block; padding: .5em .6em;
  border-left: 2px solid transparent;
  margin-left: -.6em;
  line-height: 1.35;
}
.toc--sidebar a:hover { color: var(--accent); text-decoration: none; }
.toc--sidebar a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Sidebar (prawy) */
.sidebar--right { min-width: 0; }
.sidebar-sticky { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; padding-left: .5rem; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
}
.widget-title {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .1em;
  margin: 0 0 .75rem; color: var(--accent);
  font-family: var(--font-body); font-weight: 700;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget-post-list li { margin: .5rem 0; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.widget-post-list li:last-child { border-bottom: 0; }
.widget-post-list a { display: grid; grid-template-columns: 64px 1fr; gap: .75rem; align-items: center; color: var(--text); }
.widget-post-list a:hover { color: var(--accent); text-decoration: none; }
.widget-post-list img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.widget-post-title { font-size: .9rem; line-height: 1.3; }

/* Related posts (po contencie) */
.related-posts { margin-top: 3rem; }
.related-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.related-card:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.related-card-link { color: var(--text); }
.related-card-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: 100%; border-radius: 0; }
.related-card-title { font-size: .95rem; padding: .8rem 1rem; margin: 0; font-family: var(--font-body); font-weight: 600; }
.related-card-link:hover .related-card-title { color: var(--accent-hi); }

@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* -------- Archive / listing -------- */
.archive { max-width: var(--container); margin: 2rem auto; padding: 0 1.25rem; }
.archive-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.archive-title { margin: 0 0 .5rem; }
.archive-description { color: var(--text-dim); margin: 0; }
.archive-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .archive-grid { grid-template-columns: 1fr; } }
.archive-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.archive-card:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.archive-card-link { color: var(--text); display: block; }
.archive-card-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: 100%; border-radius: 0; }
.archive-card-body { padding: 1rem 1.2rem; }
.archive-card-title { font-size: 1.15rem; margin: .5rem 0; line-height: 1.3; }
.archive-card-link:hover .archive-card-title { color: var(--accent-hi); }
.archive-card-excerpt { color: var(--text-dim); font-size: .92rem; margin: 0; }

/* Pagination */
.pagination { margin: 2.5rem 0; text-align: center; }
.pagination .nav-links { display: inline-flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination .page-numbers {
  display: inline-block; padding: .5em .9em;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
}
.pagination .page-numbers.current { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* -------- Error 404 -------- */
.error-404 { min-height: 60vh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.error-404-inner { max-width: 520px; text-align: center; }
.error-code {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(6rem, 18vw, 10rem);
  line-height: 1; margin: 0; color: var(--accent);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.error-title { margin: 1rem 0; }
.error-lead { color: var(--text-dim); margin-bottom: 1.5rem; font-size: 1.05rem; }
.error-actions { display: inline-flex; gap: .75rem; }
.btn {
  display: inline-block; padding: .7em 1.3em; border-radius: var(--radius-sm);
  font-weight: 600; font-family: var(--font-head);
  transition: all .15s;
}
.btn-primary { background: var(--accent); color: #0a0a0a; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hi); text-decoration: none; color: #0a0a0a; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-hi); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* -------- Footer (rozbudowany, 4 kolumny) -------- */
.site-footer {
  background: linear-gradient(180deg, var(--surface) 0%, #0c1a32 100%);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  color: var(--text-dim);
}
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 3rem 1.25rem 1.25rem; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-col { min-width: 0; }
.footer-col-title {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin: 0 0 1rem;
  font-family: var(--font-body); font-weight: 700;
}
.footer-about { color: var(--text-dim); font-size: .92rem; margin: .75rem 0 1rem; line-height: 1.55; }

.footer-social { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  color: var(--text-dim); border: 1px solid var(--border);
  transition: all .15s;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); background: rgba(201,168,76,.08); text-decoration: none; }

.footer-link-list { list-style: none; margin: 0; padding: 0; }
.footer-link-list li { margin-bottom: .5rem; }
.footer-link-list a {
  color: var(--text-dim); font-size: .93rem;
  display: inline-block; padding: 2px 0;
}
.footer-link-list a:hover { color: var(--accent); text-decoration: none; }

.footer-latest { list-style: none; margin: 0; padding: 0; }
.footer-latest li { margin-bottom: .9rem; border-bottom: 1px solid var(--border); padding-bottom: .75rem; }
.footer-latest li:last-child { border-bottom: 0; }
.footer-latest a { display: block; color: var(--text); }
.footer-latest a:hover { color: var(--accent); text-decoration: none; }
.footer-latest-date { display: block; font-size: .72rem; color: var(--text-low); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2rem; }
.footer-latest-title { font-size: .9rem; line-height: 1.35; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.5rem;
  font-size: .85rem;
  flex-wrap: wrap;
}
.footer-copy, .footer-credit { margin: 0; color: var(--text-low); }
.footer-credit a { color: var(--accent); font-weight: 600; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-col--brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* -------- RankMath FAQ styles (kompatybilność) -------- */
.rank-math-faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.rank-math-faq-item:last-child { border-bottom: 0; }
.rank-math-question { color: var(--text); font-size: 1.1rem; font-weight: 700; margin: 0 0 .5em; font-family: var(--font-head); }
.rank-math-answer { color: var(--text-dim); margin: 0; }

/* -------- Goliat author box (kompatybilność z plugin-riomega-author-box) -------- */
.rab-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

/* -------- Placeholder SVG -------- */
.is-placeholder { opacity: .45; background: var(--surface-2); }

/* -------- Pillar page (Template Name: Pillar Page) -------- */
.pillar-page { background: var(--bg); }

.pillar-hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201,168,76,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201,168,76,.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 60%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 1.25rem 5rem;
  position: relative;
  overflow: hidden;
}
.pillar-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: .6;
}
.pillar-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.pillar-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
  padding: .4em 1em;
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 999px;
  margin-bottom: 1.25rem;
  background: rgba(201,168,76,.06);
}
.pillar-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.pillar-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-dim);
  margin: 0 auto 1.5rem;
  max-width: 680px;
  line-height: 1.5;
}
.pillar-hero-meta {
  display: inline-flex; gap: .5rem; align-items: center;
  font-size: .9rem; color: var(--text-low);
}

.pillar-layout {
  max-width: var(--container);
  margin: 3rem auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .pillar-page.has-toc .pillar-layout {
    grid-template-columns: 200px minmax(0, 1fr) 280px;
    gap: 2.25rem;
  }
  .pillar-page.has-toc .toc--sidebar { grid-column: 1 / 2; display: block; }
  .pillar-page.has-toc .pillar-content { grid-column: 2 / 3; }
  .pillar-page.has-toc .sidebar--right { grid-column: 3 / 4; }
  .pillar-page.has-toc .toc-mobile-wrap { display: none; }
  .pillar-page:not(.has-toc) .pillar-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.25rem;
  }
  .pillar-page:not(.has-toc) .pillar-content { grid-column: 1 / 2; }
  .pillar-page:not(.has-toc) .sidebar--right { grid-column: 2 / 3; }
}

.pillar-content {
  max-width: var(--content);
  min-width: 0;
  font-size: 1.05rem;
}
.pillar-content p,
.pillar-content ul,
.pillar-content ol { margin-bottom: 1.3em; }
.pillar-content > p:first-of-type,
.pillar-tldr + p {
  font-size: 1.15em;
  color: #eef1f7;
  line-height: 1.65;
}
.pillar-content h2 {
  margin-top: 2.8em;
  padding-top: .8em;
  padding-left: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  position: relative;
}
.pillar-content h2::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 60px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.pillar-content h3 {
  margin-top: 2em;
  color: var(--text);
  font-size: 1.3rem;
}
.pillar-content h3::before { content: '›'; color: var(--accent); margin-right: .4em; font-weight: 700; }
.pillar-content img { border-radius: var(--radius-sm); margin: 1.8em auto; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.pillar-content a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.pillar-content strong { color: #f1ead4; font-weight: 600; }

/* TL;DR box na górze contentu */
.pillar-tldr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 0 0 2.5rem;
}
.pillar-tldr-title {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 700;
}
.pillar-tldr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .5rem 1.5rem;
  counter-reset: tldr;
}
.pillar-tldr-list li {
  counter-increment: tldr;
  margin: 0;
}
.pillar-tldr-list a {
  display: flex;
  align-items: baseline;
  gap: .8em;
  padding: .4em 0;
  color: var(--text);
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.35;
  transition: color .15s, transform .15s;
}
.pillar-tldr-list a::before {
  content: counter(tldr, decimal-leading-zero);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: .85em;
  flex-shrink: 0;
  min-width: 1.8em;
}
.pillar-tldr-list a:hover {
  color: var(--accent-hi);
  transform: translateX(2px);
  text-decoration: none;
}
/* Hide inline numeric in PHP (uses counter instead) */
.pillar-tldr-num { display: none; }

/* Related pillar satellites footer */
.pillar-related {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.pillar-related-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.pillar-related-all {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: .95rem;
}
.pillar-related-all:hover { color: var(--accent-hi); text-decoration: none; }
.pillar-related-grid {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.pillar-related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.pillar-related-card:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.pillar-related-link { color: var(--text); display: block; }
.pillar-related-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; border-radius: 0; }
.pillar-related-body { padding: .9rem 1rem; }
.pillar-related-title { font-size: .95rem; line-height: 1.3; margin: 0 0 .4rem; font-family: var(--font-body); font-weight: 600; }
.pillar-related-excerpt { font-size: .82rem; color: var(--text-dim); margin: 0; line-height: 1.4; }
.pillar-related-link:hover .pillar-related-title { color: var(--accent-hi); }

/* -------- Search form -------- */
.search-form {
  display: flex; gap: .5rem; margin-top: 1rem; max-width: 520px;
}
.search-form input[type="search"] {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: .7em 1em; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem;
}
.search-form input[type="search"]:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
  border-color: var(--accent);
}
.search-form button {
  background: var(--accent); color: #0a0a0a;
  border: 0; padding: .7em 1.5em; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.search-form button:hover { background: var(--accent-hi); }

/* -------- Comment form minimal polish -------- */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { margin-bottom: 1rem; }
.comment-reply-title { font-family: var(--font-head); }
.comment-form label { display: block; margin: .5rem 0 .25rem; color: var(--text-dim); font-size: .9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: .6em .8em; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem;
}
.comment-form .submit {
  background: var(--accent); color: #0a0a0a; border: 0;
  padding: .7em 1.5em; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 700; cursor: pointer;
}

/* -------- Reduce motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
