/* ============================================================
   kalkulator-kredytu-hipotecznego.pl — main stylesheet
   Modern Polish fintech aesthetic
   ============================================================ */

/* --- Layout primitives --------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-narrow { max-width: var(--container-narrow); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, var(--s-4)); }
.row { display: flex; align-items: center; gap: var(--s-3); }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: var(--s-4);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #FF9466);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 4px 10px rgba(255, 107, 53, 0.28);
  letter-spacing: -0.02em;
}
.brand-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-name small {
  display: block; font-size: 11px; font-weight: 500; color: var(--text-3);
  letter-spacing: 0;
}
.nav-main { display: none; gap: var(--s-6); }
.nav-main a {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color 160ms;
}
.nav-main a:hover { color: var(--text); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform 120ms ease, background-color 160ms, box-shadow 160ms, color 160ms;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 107, 53, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--text); border: 1px solid var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface); }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-arrow::after {
  content: "→";
  font-weight: 400; font-size: 1.1em;
  transition: transform 200ms ease;
  margin-left: 2px;
}
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-block { width: 100%; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  padding: 48px 0 28px;
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 90% 0%, rgba(255, 107, 53, 0.07), transparent 60%),
              radial-gradient(50% 80% at 5% 15%, rgba(255, 148, 102, 0.05), transparent 65%);
  z-index: -1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  letter-spacing: 0.01em;
  margin-bottom: var(--s-5);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: var(--s-4);
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 56ch;
  line-height: 1.55;
}

/* --- Calculator card ----------------------------------------------------- */
.calc-section { padding: 8px 0 56px; }
.calc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calc-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.calc-head h2 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
.wibor-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3); font-weight: 500;
  padding: 6px 10px; border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.wibor-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}

/* Tabs */
.tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 4px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin: 18px 22px 0;
}
.tab-btn {
  height: 42px; border-radius: 9px;
  font-weight: 600; font-size: 14px; color: var(--text-2);
  transition: background 160ms, color 160ms, box-shadow 180ms;
  letter-spacing: -0.005em;
}
.tab-btn.is-active {
  background: #fff; color: var(--text);
  box-shadow: var(--shadow-xs), 0 0 0 1px rgba(15, 23, 41, 0.04);
}
.tab-btn:not(.is-active):hover { color: var(--text); }

.tab-panel { display: none; padding: 22px; }
.tab-panel.is-active { display: block; }

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px; font-weight: 500; color: var(--text-2);
  display: flex; justify-content: space-between; align-items: baseline;
}
.field-label .hint { color: var(--text-3); font-weight: 400; font-size: 12px; }
.input-wrap {
  position: relative;
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 140ms, box-shadow 140ms;
}
.input-wrap:hover { border-color: var(--border-strong); }
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.input-wrap input {
  flex: 1; min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: none; background: transparent;
  font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.005em;
}
.input-wrap input::placeholder { color: var(--text-3); font-weight: 500; }
.input-wrap .suffix {
  padding-right: 14px;
  font-size: 13px; font-weight: 500; color: var(--text-3);
  pointer-events: none;
}
.field-hint {
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}

/* Slider companion */
.slider-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.slider-row input[type=range] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; background: var(--surface-2);
  border-radius: var(--r-full); cursor: pointer;
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 120ms;
}
.slider-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider-row input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* Segmented radio control */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--r-md);
  gap: 3px;
}
.segmented label {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 38px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  border-radius: 9px;
  cursor: pointer;
  transition: background 160ms, color 160ms;
  letter-spacing: -0.005em;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span,
.segmented label:has(input:checked) {
  background: #fff; color: var(--text);
  box-shadow: var(--shadow-xs), 0 0 0 1px rgba(15, 23, 41, 0.04);
}

/* Advanced details toggle */
.advanced {
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.advanced > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 8px 12px; margin-left: -12px;
  border-radius: var(--r-md);
  transition: background 140ms;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before {
  content: "+"; font-size: 18px; font-weight: 400; color: var(--accent);
  width: 16px; line-height: 1;
}
.advanced[open] > summary::before { content: "−"; }
.advanced > summary:hover { background: var(--surface); }
.advanced-grid { margin-top: 14px; }

/* --- Result block -------------------------------------------------------- */
.result {
  background: linear-gradient(180deg, var(--surface) 0%, #fff 80%);
  border-top: 1px solid var(--border);
  padding: 28px 22px 22px;
}
.result-headline {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  margin-bottom: 6px;
}
.result-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3);
}
.result-meta {
  font-size: 12px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.result-meta .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}
.result-big {
  font-size: clamp(44px, 8vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 18px;
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
}
.result-big .unit {
  font-size: 0.35em; font-weight: 600; color: var(--text-3);
  letter-spacing: -0.01em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0;
}
.metric-grid > div {
  background: #fff;
  padding: 14px 16px;
}
.metric-grid dt {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.metric-grid dd {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Callout warning */
.callout {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--warning-bg);
  color: var(--warning-fg);
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  font-size: 13px; line-height: 1.5;
  display: flex; gap: 10px; align-items: flex-start;
}
.callout::before {
  content: "⚠"; font-size: 14px; line-height: 1.4;
  flex-shrink: 0;
}
.callout[hidden] { display: none; }

/* CTA post-result block */
.cta-block {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent-tint-a), var(--accent-tint-b));
  border: 1px solid rgba(255, 107, 53, 0.18);
  position: relative; overflow: hidden;
}
.cta-block::before {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.12), transparent 70%);
}
.cta-block-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.cta-lead { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
.cta-sub { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.cta-block .btn { align-self: flex-start; }
.cta-foot {
  font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
}

/* Amortization details */
.schedule {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.schedule > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 6px 0;
}
.schedule > summary::-webkit-details-marker { display: none; }
.schedule > summary::before {
  content: "▸"; color: var(--accent); font-size: 10px;
  transition: transform 160ms;
}
.schedule[open] > summary::before { transform: rotate(90deg); }

.chart-wrap {
  margin-top: 12px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px;
  border: 1px solid var(--border);
}
.chart-legend {
  display: flex; gap: 18px;
  font-size: 12px; color: var(--text-2);
  margin-bottom: 10px;
}
.chart-legend .swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 6px; vertical-align: middle;
}

.table-wrap {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: auto;
  max-height: 360px;
}
table.amortization {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
table.amortization th,
table.amortization td {
  padding: 10px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.amortization th:first-child,
table.amortization td:first-child { text-align: left; }
table.amortization thead th {
  background: var(--surface);
  position: sticky; top: 0;
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
table.amortization tbody tr:nth-child(even) td { background: rgba(247, 248, 251, 0.5); }
table.amortization tbody tr:last-child td { border-bottom: none; }

/* --- Trust strip --------------------------------------------------------- */
.trust {
  padding: 32px 0 8px;
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.trust-item {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; gap: 14px;
}
.trust-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--accent);
}
.trust-item h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 2px; }
.trust-item p { font-size: 13px; color: var(--text-2); line-height: 1.45; }

/* --- Section heading ----------------------------------------------------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: var(--s-7); max-width: 60ch; }
.section-eyebrow {
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--s-3);
}
.section h2 {
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: var(--s-3);
}
.section p.section-lead {
  color: var(--text-2);
  font-size: 16px;
  max-width: 56ch;
}

/* --- How it works -------------------------------------------------------- */
.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}
.how-step {
  position: relative;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  counter-increment: step;
}
.how-step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 32px; font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 14px;
}
.how-step h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.how-step p { font-size: 14px; color: var(--text-2); line-height: 1.55; }

/* --- FAQ ----------------------------------------------------------------- */
.faq-section { background: var(--surface); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 160ms;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  font-weight: 600; font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-weight: 400; font-size: 22px;
  color: var(--accent); line-height: 1;
  flex-shrink: 0;
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body {
  padding: 0 22px 20px;
  color: var(--text-2);
  font-size: 14.5px; line-height: 1.6;
}

/* --- Articles ------------------------------------------------------------ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.article-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms;
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.article-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.article-cover svg { width: 100%; height: 100%; display: block; }
.article-cover .cover-label {
  position: absolute; left: 14px; top: 14px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--r-full);
  backdrop-filter: blur(6px);
}
.article-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.article-body h3 {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.3;
  margin-bottom: 8px;
  text-wrap: pretty;
}
.article-body p {
  font-size: 14px; color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}
.article-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  font-size: 12px; color: var(--text-3);
}
.article-meta::before {
  content: "📖"; opacity: 0.7; display: none;
}
.article-meta .read-time { display: inline-flex; align-items: center; gap: 6px; }
.article-arrow { color: var(--accent); margin-left: auto; font-weight: 600; transition: transform 160ms; }
.article-card:hover .article-arrow { transform: translateX(3px); }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--text);
  color: #C4C9D2;
  padding: 56px 0 28px;
  margin-top: 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 14px;
}
.footer-col p { font-size: 14px; line-height: 1.6; color: #9CA3AF; max-width: 38ch; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 14px; color: #C4C9D2;
  transition: color 140ms;
}
.footer-col a:hover { color: #fff; }

.footer-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-brand .brand-name { color: #fff; }

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  font-size: 12px;
  line-height: 1.6;
  color: #6B7280;
  max-width: 80ch;
}

/* --- Responsive ---------------------------------------------------------- */
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .how-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .nav-main { display: flex; }
  .hero { padding: 72px 0 32px; }
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 56px; }
  .calc-head { padding: 22px 28px; }
  .tabs { margin: 22px 28px 0; }
  .tab-panel { padding: 28px; }
  .result { padding: 32px 28px 28px; }
}
@media (max-width: 480px) {
  .header-cta { display: none; }
  .hero { padding: 36px 0 20px; }
}

/* --- Visually hidden helper ---------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* ============================================================
   ARTICLE PAGES (artykuly/<slug>/) — appended to Claude Design base
   Uses new tokens (--accent, --text, --surface, --s-*, --r-*).
   ============================================================ */

.article { padding: 40px 0 80px; }
.article__hero {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-7);
}
.article__tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--s-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.article__title {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: var(--s-3);
  font-weight: 700;
}
.article__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  color: var(--text-3); font-size: 13px;
}
.article__meta span::before {
  content: "·"; margin-right: var(--s-2); color: var(--text-3);
}
.article__meta span:first-child::before { content: ""; margin-right: 0; }

.article__body { font-size: 17px; color: var(--text); line-height: 1.75; }
.article__body p { margin-bottom: var(--s-4); }
.article__body h2 {
  font-size: clamp(22px, 3vw, 26px);
  margin: var(--s-8) 0 var(--s-4);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.25;
}
.article__body h3 {
  font-size: 18px; font-weight: 600;
  margin: var(--s-5) 0 var(--s-2);
  letter-spacing: -0.01em;
}
.article__body ul, .article__body ol { margin: var(--s-3) 0 var(--s-5) var(--s-6); padding: 0; list-style: revert; }
.article__body ul li, .article__body ol li { margin-bottom: var(--s-2); line-height: 1.65; }
.article__body strong { font-weight: 600; color: var(--text); }
.article__body em { font-style: italic; color: var(--text-2); }
.article__body table {
  width: 100%;
  margin: var(--s-5) 0;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.article__body table th {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article__body table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
}
.article__body table tbody tr:last-child td { border-bottom: 0; }
.article__body blockquote {
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  font-size: 14.5px;
  color: var(--text-2);
}
.article__body blockquote p:last-child { margin-bottom: 0; }
.article__body code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: var(--font-num);
}
.article__body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}
.article__body a:hover { text-decoration-thickness: 2px; }

.article__tldr {
  margin: 0 0 var(--s-6);
  padding: var(--s-5) var(--s-6);
  background: var(--surface);
  border-radius: var(--r-md);
  border-left: 4px solid var(--accent);
}
.article__tldr h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0 0 var(--s-2);
  font-weight: 600;
}
.article__tldr p { margin: 0; font-size: 16px; color: var(--text); line-height: 1.65; }

.article__cta {
  margin: var(--s-8) 0;
  padding: var(--s-6);
  background: linear-gradient(135deg, var(--accent-tint-a), var(--accent-tint-b));
  border: 1px solid rgba(255, 107, 53, 0.18);
  border-radius: var(--r-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article__cta::before {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.12), transparent 70%);
}
.article__cta > * { position: relative; z-index: 1; }
.article__cta p:first-child {
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: var(--s-2);
}
.article__cta p { margin-bottom: var(--s-4); font-size: 14px; color: var(--text-2); }
.article__cta .btn { margin-top: var(--s-2); }

.related {
  margin-top: var(--s-10);
  padding-top: var(--s-7);
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 20px; margin-bottom: var(--s-5); letter-spacing: -0.015em; }
.related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 768px) { .related__grid { grid-template-columns: repeat(3, 1fr); } }

/* Compact "Powiązane artykuły" cards at the end of each article page.
   Scoped to .related so it doesn't conflict with the rich .article-card
   (auto-generated cover) used in homepage and /artykuly/. */
.related ul.related__grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 768px) { .related ul.related__grid { grid-template-columns: repeat(3, 1fr); } }

.related .article-card {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  transition: none;
  padding: 0;
  flex-direction: initial;
}
.related .article-card:hover { transform: none; box-shadow: none; }
.related .article-card > a {
  display: block;
  padding: var(--s-5);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  height: 100%;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.related .article-card > a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.related .article-card__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--s-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.related .article-card h3 {
  font-size: 15px;
  margin-bottom: var(--s-2);
  line-height: 1.35;
  font-weight: 600;
}
.related .article-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============================================================
   LEGAL PAGES (Polityka, Regulamin)
   ============================================================ */
.legal { padding: 48px 0 80px; }
.legal h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.025em;
  margin-bottom: var(--s-2);
  font-weight: 700;
}
.legal h2 {
  font-size: 20px;
  margin: var(--s-7) 0 var(--s-3);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.legal h3 {
  font-size: 16px;
  margin: var(--s-5) 0 var(--s-2);
  font-weight: 600;
}
.legal p { color: var(--text); margin-bottom: var(--s-3); line-height: 1.7; font-size: 15.5px; }
.legal ul, .legal ol { margin: var(--s-3) 0 var(--s-4) var(--s-6); padding: 0; list-style: revert; }
.legal ul li, .legal ol li { margin-bottom: var(--s-2); line-height: 1.65; font-size: 15.5px; }
.legal code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: var(--font-num);
}
.legal .callout { font-size: 14px; }
.legal a { color: var(--accent); text-decoration: underline; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found {
  min-height: 70vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: var(--s-9) var(--s-4);
}
.not-found h1 {
  font-size: clamp(64px, 16vw, 120px);
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: var(--s-3);
  font-weight: 700;
  line-height: 1;
}
.not-found p.lead {
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: var(--s-6);
  max-width: 480px;
}

