/* Article pages (/artykuly/<slug>). Loaded after style.css. Same brand rules: neutrals, blue, mint for actions and highlights only. */

.post {
  --measure: 35.5rem;
  --read: #cfcfcf;
  --fs-read: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
}

/* Head */
@media (max-width: 999px) { .post-head { padding-bottom: calc(var(--sea) + var(--sun) * 0.36 + 16px); } }
.post-head h1 { font-size: clamp(2.25rem, 1.35rem + 3.6vw, 4rem); max-width: 17ch; }
.post-head .eyebrow { margin-bottom: 14px; }
.intro-copy > .byline { animation-delay: 360ms; }
.crumbs { margin-bottom: 8px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; padding: 0 10px; color: var(--text-3); }
.crumbs a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--fs-meta); font-weight: 700; color: var(--text-2);
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.28); text-underline-offset: 0.25em;
}
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--text); text-decoration-color: var(--mint); } }

.byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.byline-t { display: grid; min-width: 0; }
.byline-name {
  justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px -6px;
  font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.28); text-underline-offset: 0.25em;
}
.byline-meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; font-size: var(--fs-meta); line-height: 1.5; color: var(--text-3); }
.byline-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
@media (max-width: 639px) { .byline-meta .sep-up { display: none; } .byline-meta .upd { flex-basis: 100%; } }
@media (hover: hover) and (pointer: fine) { .byline-name:hover { text-decoration-color: var(--mint); } }

.avatar {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  font-weight: 900; font-size: 0.9375rem; letter-spacing: -0.02em; color: var(--text);
  background: radial-gradient(circle at 50% 120%, rgba(0, 64, 249, 0.85), #0a1033 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.avatar--lg { width: 64px; height: 64px; font-size: 1.25rem; }

/* Layout: one reading column; from 1100 px a sticky contents rail on the left */
.post-grid { padding-top: clamp(24px, 4vw, 48px); }
.post-main { max-width: var(--measure); margin-inline: auto; min-width: 0; }
.toc-side { display: none; }
@media (min-width: 1100px) {
  .post-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px; align-items: start; }
  .post-main { max-width: none; margin: 0; }
  .post-main > :not(.post-body, .cta--end), .post-body > :not(.versus) { max-width: var(--measure); }
  .toc-side { display: block; position: sticky; top: 88px; max-height: calc(100svh - 112px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; margin: -6px; }
  .toc { display: none; }
}

/* Contents */
.toc-h {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 8px;
}
.toc-side ol { display: grid; border-left: 1px solid var(--line); }
.toc-side a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 0 6px 16px; margin-left: -1px;
  border-left: 1px solid rgba(255, 255, 255, 0);
  font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: var(--text-2); text-decoration: none;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .toc-side a:hover { color: var(--text); border-left-color: var(--mint); } }

.toc { margin-top: 16px; border-radius: 20px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.toc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 20px;
  font-weight: 700; list-style: none; cursor: pointer; border-radius: 20px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after, .q summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px;
  border: solid var(--text-3); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-3px); transition: transform 180ms var(--ease-out);
}
.toc[open] summary::after, .q[open] summary::after { transform: rotate(-135deg); }
.toc summary:focus-visible { outline-offset: -2px; }
.toc ol { display: grid; padding: 0 8px 10px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 11px 12px; border-radius: 12px;
  color: var(--text-2); text-decoration: none; line-height: 1.35;
}
.toc a::before { content: counter(toc); min-width: 1.2em; font-size: var(--fs-meta); font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc a:active { background: var(--s2); }

/* W skrócie */
.tldr {
  padding: clamp(20px, 3vw, 28px); border-radius: 20px;
  background: radial-gradient(ellipse 80% 120% at 0% 0%, rgba(0, 64, 249, 0.22), rgba(0, 64, 249, 0) 60%), var(--s1);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tldr-h { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.tldr ul { display: grid; gap: 10px; margin-top: 14px; }
.tldr li { position: relative; padding-left: 22px; font-size: var(--fs-read); line-height: 1.5; color: var(--text); }
.tldr li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 10px var(--glow-mint);
}

/* Body */
.post-body { padding-top: clamp(8px, 2vw, 16px); font-size: var(--fs-read); line-height: 1.7; color: var(--read); }
.post-body h2, .sec-h {
  margin: clamp(48px, 6vw, 72px) 0 16px;
  font-size: clamp(1.625rem, 1.25rem + 1.6vw, 2.375rem); font-weight: 900; line-height: 1.08; letter-spacing: -0.03em; color: var(--text);
}
.post-body h3 { margin: 32px 0 8px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; color: var(--text); }
.post-body h2 + h3 { margin-top: 20px; }
.post-body p { margin-bottom: 1.1em; }
.post-body ul, .post-body ol { display: grid; gap: 0.4em; margin: 0 0 1.25em; padding-left: 1.4em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { padding-left: 0.25em; }
.post-body li::marker { color: var(--mint); font-weight: 700; }
.post-body a:not(.btn), .faq a, .author a { color: var(--text); text-decoration: underline; text-decoration-color: var(--mint); text-underline-offset: 0.25em; }
.post-body a.cite { font-size: 0.8125em; font-weight: 700; color: var(--text-2); text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .post-body a.cite:hover { color: var(--mint); } }

.quote { margin: 32px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--blue); }
.quote p { margin: 0 0 12px; font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem); font-weight: 700; line-height: 1.42; letter-spacing: -0.012em; color: var(--text); }
.quote footer { font-size: var(--fs-meta); color: var(--text-3); }

.ph {
  padding: 1px 6px; border-radius: 6px; color: var(--mint);
  background: rgba(0, 255, 171, 0.1); box-shadow: inset 0 0 0 1px rgba(0, 255, 171, 0.32);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Images and tables inside the article body */
.fig { margin: 28px 0; }
.fig img { display: block; max-width: 100%; height: auto; border-radius: 12px; outline: 1px solid var(--line-2); outline-offset: -1px; }
.tbl-wrap { margin: 28px 0; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tbl-wrap table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.tbl-wrap th, .tbl-wrap td { min-width: 7.5rem; padding: 10px 14px; text-align: left; vertical-align: top; overflow-wrap: normal; border-bottom: 1px solid var(--line); }
.tbl-wrap th { background: var(--s2); color: var(--text); font-weight: 700; }
.tbl-wrap tbody tr:last-child td { border-bottom: 0; }

/* Prompt example: plain selectable text; the copy button appears only with JS */
.snip, .vs { margin: 28px 0; border-radius: 20px; }
.snip {
  padding: 10px 20px 20px;
  background: radial-gradient(ellipse 90% 120% at 0% 0%, rgba(0, 64, 249, 0.22), rgba(0, 64, 249, 0) 60%), var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.snip-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 52px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.snip-l { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.snip-text, .vs-text {
  font-size: 1rem; line-height: 1.65; color: var(--text); white-space: pre-wrap;
  -webkit-user-select: text; user-select: text;
}
.snip-copy {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin-right: -6px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 0.875rem; font-weight: 700; color: var(--text);
  transition-property: scale, background-color, box-shadow; transition-duration: 160ms; transition-timing-function: var(--ease-out);
}
.snip-copy .ico { width: 17px; height: 17px; flex: none; }
.snip-copy .ico-ok { color: var(--mint); }
.snip-copy[data-copied] { box-shadow: inset 0 0 0 1px rgba(0, 255, 171, 0.45); }
.snip-copy:active { scale: 0.96; }
@media (hover: hover) and (pointer: fine) { .snip-copy:hover { background: rgba(255, 255, 255, 0.1); } }
.snip-st { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.snip, .vs { position: relative; }
.post-body .cta p, .post-body .snip p, .post-body .vs p { margin: 0; }

/* Weaker vs better prompt */
.versus { display: grid; gap: 12px; margin: 28px 0; }
.versus .vs { margin: 0; padding: 10px 20px 20px; }
.vs-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 52px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 0.9375rem; }
.vs-l .snip-copy { margin-left: auto; }
.vs-i { width: 18px; height: 18px; flex: none; }
.vs--weak { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.vs--weak .vs-l { color: var(--text-2); }
.vs--weak .vs-i { color: var(--text-3); }
.vs--weak .vs-text { color: var(--text-2); }
.vs--strong {
  background: radial-gradient(ellipse 90% 120% at 0% 0%, rgba(0, 64, 249, 0.22), rgba(0, 64, 249, 0) 60%), var(--bg);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 171, 0.3);
}
.vs--strong .vs-i { color: var(--mint); }
@media (min-width: 760px) {
  .versus { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; }
}

/* Calls to action (generator) */
.cta { position: relative; overflow: hidden; border-radius: 24px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cta--mid {
  display: grid; gap: 16px; margin: 40px 0; padding: 22px;
  background: radial-gradient(ellipse 70% 120% at 0% 0%, rgba(0, 64, 249, 0.45), rgba(0, 64, 249, 0) 65%), #0a1033;
}
.cta-t { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.cta-line { color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.cta--mid .cta-line { color: var(--text); }
.cta-go { justify-self: start; }
@media (min-width: 640px) {
  .cta--mid { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 24px 24px 24px 28px; }
}
.cta--end {
  display: grid; margin-top: clamp(56px, 7vw, 88px); padding: 8px;
  background:
    radial-gradient(ellipse 60% 90% at 100% 100%, rgba(0, 255, 171, 0.14), rgba(0, 255, 171, 0) 60%),
    radial-gradient(ellipse 70% 90% at 0% 0%, rgba(0, 64, 249, 0.5), rgba(0, 64, 249, 0) 65%),
    #0a1033;
  border-radius: 32px;
}
.cta--end .cta-t { gap: 14px; padding: clamp(20px, 4vw, 40px) clamp(16px, 3vw, 32px); }
.cta-h { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.035em; }
.cta--end .cta-line { max-width: 44ch; }
.cta--end .cta-go { margin-top: 8px; }
.cta-stage { aspect-ratio: 16 / 10; border-radius: 24px; }
@media (min-width: 1100px) {
  .cta--end { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
  .cta-stage { aspect-ratio: auto; min-height: 300px; }
}

/* FAQ: closed details rows, as on narzedzia.horyzont.ai */
.faq .sec-h { margin-bottom: 8px; }
.q { border-bottom: 1px solid var(--line); }
.q:first-of-type { border-top: 1px solid var(--line); }
.q summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0;
  font-size: 1.0625rem; font-weight: 700; line-height: 1.35; list-style: none; cursor: pointer;
}
.q summary::-webkit-details-marker { display: none; }
.q p { padding: 0 0 20px; color: var(--read); font-size: var(--fs-read); line-height: 1.65; }
@media (hover: hover) and (pointer: fine) { .q summary:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; } }

/* Sources */
.src-list { display: grid; counter-reset: src; border-top: 1px solid var(--line); }
.src-list li {
  counter-increment: src; display: grid; grid-template-columns: 2.25em minmax(0, 1fr); column-gap: 8px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.src-list li::before { content: counter(src) "."; grid-row: span 2; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.src-list a {
  justify-self: start; display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: var(--mint); text-underline-offset: 0.25em;
}
.src-by { font-size: var(--fs-meta); color: var(--text-3); margin-top: -6px; }
.src-list li:target::before { color: var(--mint); }

/* Author */
.author {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start;
  margin-top: clamp(48px, 6vw, 72px); padding: clamp(20px, 3vw, 28px); border-radius: 24px;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
}
.author-t { display: grid; gap: 6px; justify-items: start; }
.author-name { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.02em; }
.author-name a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -6px; }
.author-t > p:last-child { color: var(--text-2); line-height: 1.6; }
@media (max-width: 559px) {
  .author { column-gap: 14px; row-gap: 4px; align-items: center; }
  .author-t { display: contents; }
  .author .avatar { grid-row: span 2; width: 52px; height: 52px; font-size: 1.0625rem; }
  .author-t > p:last-child { grid-column: 1 / -1; margin-top: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .toc::details-content, .q::details-content {
    interpolate-size: allow-keywords; contain: layout;
    transition: block-size 240ms var(--ease-out), content-visibility 240ms allow-discrete;
  }
  .toc:not([open])::details-content, .q:not([open])::details-content { block-size: 0; overflow: clip; }
}

/* Article index (/artykuly) */
.alist-wrap { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 112px); }
.alist { display: grid; gap: 12px; max-width: 46rem; margin-inline: auto; }
.alist-i {
  position: relative; display: grid; gap: 10px; justify-items: start; padding: clamp(20px, 3vw, 28px);
  border-radius: 24px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 160ms var(--ease-out);
}
.alist-h { font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem); font-weight: 900; line-height: 1.12; letter-spacing: -0.03em; }
.alist-h a { color: var(--text); text-decoration: none; }
.alist-h a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.alist-i p { color: var(--text-2); line-height: 1.55; }
.alist-d { font-size: var(--fs-meta); color: var(--text-3); }
@media (hover: hover) and (pointer: fine) { .alist-i:hover { box-shadow: inset 0 0 0 1px var(--mint); } }
.alist-h a:focus-visible { outline: none; }
.alist-h a:focus-visible::after { outline: 2px solid var(--mint); outline-offset: 3px; }
