:root {
  --ui-border: 4px;
  --ui-border-small: 3px;
  --ui-shadow: 9px;
  --ui-shadow-small: 5px;
  --ui-section-gap: 52px;
  --ui-reading-width: 780px;
}

/* Spokojniejsza hierarchia artykułów bez zmiany ich struktury. */
.article-hero h1,
.hub-hero h1 {
  font-size: clamp(48px, 7vw, 96px);
}

.article-body {
  width: min(1100px, calc(100% - 48px));
  padding: clamp(34px, 4.5vw, 48px);
  border-width: var(--ui-border);
  box-shadow: 12px 12px 0 var(--black);
}

.article-section + .article-section,
.pros-cons,
.method-card,
.article-cta,
.related,
.evidence,
.content-calculator,
.change-log,
.article-faq {
  margin-top: var(--ui-section-gap);
}

.article-section h2,
.pros-cons > h2,
.method-card h2,
.related h2,
.article-cta h2,
.article-visual-head h2,
.article-faq h2,
.evidence > h2,
.content-calculator > h2 {
  max-width: 900px;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 0.98;
}

.article-visual-head h2,
.evidence > h2 {
  font-size: clamp(32px, 3.8vw, 50px);
}

.article-section p,
.method-card > p {
  max-width: var(--ui-reading-width);
  font-size: 17px;
  line-height: 1.68;
}

/* Jeden zestaw markerów SVG zamiast znaków tekstowych. */
.article-section li,
.pros-cons li,
.method-card li {
  margin-top: 0;
  padding: 13px 12px 13px 40px;
  border: 0;
  border-bottom: 2px solid var(--black);
  background: transparent;
}

.article-section li:first-child,
.pros-cons li:first-child,
.method-card li:first-child {
  border-top: 2px solid var(--black);
}

.article-section li::before,
.pros-cons li::before,
.method-card li::before {
  content: '';
  left: 10px;
  top: 15px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url('/icons/arrow-right.svg') center / contain no-repeat;
  mask: url('/icons/arrow-right.svg') center / contain no-repeat;
}

.template-checklist .article-section li::before {
  content: '';
  -webkit-mask-image: url('/icons/check.svg');
  mask-image: url('/icons/check.svg');
}

/* Wizualizacje są dodatkiem do tekstu, nie drugim hero. */
.article-visual {
  width: min(900px, calc(100% - 48px));
  margin-top: 38px;
  padding: 18px;
  border-width: var(--ui-border);
  box-shadow: 8px 8px 0 var(--black);
}

.article-visual-head {
  margin-bottom: 14px;
}

.article-visual-frame {
  max-height: 440px;
  border-width: var(--ui-border-small);
  overflow: auto;
}

.article-visual svg {
  min-width: 600px;
  max-height: 420px;
}

.article-visual figcaption {
  margin-top: 10px;
  max-width: var(--ui-reading-width);
  font-size: 11px;
}

/* Crosslink jest wskazówką nawigacyjną, nie kolejną dużą kartą. */
.contextual-thread {
  max-width: 850px;
  margin: 18px 0 40px;
  padding: 14px 18px 14px 48px;
  border: 0;
  border-left: 4px solid var(--orange);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.contextual-thread::before {
  content: '';
  left: 15px;
  top: 16px;
  width: 21px;
  height: 21px;
  background: var(--black);
  -webkit-mask: url('/icons/turn-right.svg') center / contain no-repeat;
  mask: url('/icons/turn-right.svg') center / contain no-repeat;
}

.contextual-thread p {
  font-size: 15px;
  font-weight: 720;
  line-height: 1.5;
}

.contextual-thread span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.contextual-thread .ui-inline-icon {
  margin-left: 5px;
}

/* Podstawa liczb jest skanowalna; nadmiar źródeł pozostaje dostępny w details. */
.evidence-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 20px;
}

.evidence-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'kind action'
    'title action'
    'meta action'
    'body action';
  column-gap: 24px;
  padding: 17px 18px;
  border-width: var(--ui-border-small);
  background: var(--white);
  box-shadow: none;
}

.evidence-card:nth-child(even),
.evidence-card:has(.external-source-meta) {
  background: var(--white);
}

.evidence-card > span {
  grid-area: kind;
  width: fit-content;
  padding: 5px 8px;
}

.evidence-card h3 {
  grid-area: title;
  margin-top: 9px;
  font-family: var(--text);
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 900;
  line-height: 1.15;
  text-transform: none;
}

.evidence-card p:not(.external-source-meta) {
  grid-area: body;
  max-width: 740px;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.5;
}

.evidence-card .external-source-meta {
  grid-area: meta;
  margin: 5px 0 0 !important;
}

.evidence-card a,
.evidence-card em {
  grid-area: action;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.evidence-note {
  max-width: var(--ui-reading-width);
  font-size: 13px;
}

.evidence-more {
  margin-top: 12px;
  border-top: 3px solid var(--black);
}

.evidence-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
}

.evidence-more > summary::-webkit-details-marker {
  display: none;
}

.evidence-more > summary::after {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--black);
  -webkit-mask: url('/icons/arrow-down.svg') center / contain no-repeat;
  mask: url('/icons/arrow-down.svg') center / contain no-repeat;
  transition: transform 0.16s ease;
}

.evidence-more[open] > summary::after {
  transform: rotate(180deg);
}

.evidence-grid--more {
  margin-top: 8px;
}

/* Lżejsze karty pomocnicze. */
.related-grid {
  gap: 14px;
  margin-top: 22px;
}

.related-card {
  min-height: 190px;
  padding: 19px;
  border-width: var(--ui-border-small);
  box-shadow: var(--ui-shadow-small) var(--ui-shadow-small) 0 var(--black);
}

.related-card strong {
  font-size: 28px;
}

.faq-list {
  gap: 10px;
  margin-top: 22px;
}

.faq-list details {
  border-width: var(--ui-border-small);
  box-shadow: var(--ui-shadow-small) var(--ui-shadow-small) 0 var(--black);
}

.faq-list details:nth-child(2n) {
  background: var(--white);
}

/* Wspólny shell kalkulatorów. */
.content-calculator,
.dishwasher-calculator {
  border: 5px solid var(--black);
  box-shadow: 10px 10px 0 var(--black);
}

.content-calculator {
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 10px 10px 0 var(--pink);
}

.dishwasher-calculator {
  width: min(1080px, calc(100% - 32px));
  margin-top: 42px;
}

.calculator-fields,
.dwcalc-grid {
  gap: 12px;
}

.calculator-field,
.dwcalc-card {
  padding: 18px;
  border-width: var(--ui-border-small);
}

.calculator-field > span,
.dwcalc-label,
.dwcalc-card legend {
  min-height: 0;
  font-size: 15px;
  line-height: 1.25;
}

.calculator-field output,
.dwcalc-readout output {
  font-size: clamp(44px, 5vw, 58px);
}

.calculator-frustration,
.calculator-assumptions,
.dwcalc-submit,
.dwcalc-result,
.dwcalc-funnel {
  border-width: var(--ui-border);
}

.calculator-run,
.calculator-actions button,
.dwcalc-submit button,
.dwcalc-action {
  min-height: 54px;
  border-width: var(--ui-border-small);
  box-shadow: var(--ui-shadow-small) var(--ui-shadow-small) 0 var(--cream);
}

.dwcalc-head {
  padding: clamp(24px, 3.5vw, 38px);
  border-bottom-width: 5px;
}

.dwcalc-head h2 {
  font-size: clamp(40px, 6vw, 72px);
}

.dwcalc-form {
  padding: clamp(18px, 3vw, 32px);
}

.dwcalc-result {
  margin-inline: clamp(18px, 3vw, 32px);
}

.dwcalc-metrics,
.dwcalc-result-top,
.dwcalc-result-actions,
.dwcalc-funnel-head {
  border-width: var(--ui-border);
}

.dwcalc-funnel {
  margin-inline: clamp(18px, 3vw, 32px);
}

.dwcalc-funnel-head h4 {
  font-size: clamp(30px, 4vw, 46px);
}

/* CTA w środku treści pozostaje mocne, ale nie konkuruje z nagłówkiem strony. */
.audience-cta {
  margin-block: 46px;
  padding: clamp(22px, 3vw, 30px);
  border-width: var(--ui-border);
  box-shadow: 9px 9px 0 var(--black);
}

.audience-cta h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.ui-inline-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.14em;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}

.ui-inline-icon--right {
  -webkit-mask-image: url('/icons/arrow-right.svg');
  mask-image: url('/icons/arrow-right.svg');
}

.ui-inline-icon--down {
  -webkit-mask-image: url('/icons/arrow-down.svg');
  mask-image: url('/icons/arrow-down.svg');
}

@media (max-width: 900px) {
  .evidence-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      'kind'
      'title'
      'meta'
      'body'
      'action';
  }

  .evidence-card a,
  .evidence-card em {
    margin-top: 13px;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  :root {
    --ui-section-gap: 44px;
  }

  .article-body {
    width: min(100% - 28px, 1100px);
    padding: 26px 17px;
    box-shadow: 8px 8px 0 var(--black);
  }

  .article-visual {
    width: min(100% - 28px, 900px);
    margin-top: 30px;
    padding: 15px 12px;
    box-shadow: 6px 6px 0 var(--black);
  }

  .article-visual-frame {
    max-height: 360px;
  }

  .article-visual svg {
    min-width: 560px;
    max-height: 350px;
  }

  .contextual-thread {
    margin-bottom: 34px;
    padding: 13px 14px 13px 43px;
  }

  .content-calculator,
  .dishwasher-calculator {
    box-shadow: 7px 7px 0 var(--black);
  }

  .content-calculator {
    box-shadow: 7px 7px 0 var(--pink);
  }

  .dishwasher-calculator {
    width: calc(100% - 18px);
  }

  .related-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .evidence-more > summary::after {
    transition: none;
  }
}
