/* naprawa-stron.pl — style poradnika
   Koncepcja: instrukcja serwisowa. Spokojny, czytelny tekst; jedno mocne miejsce:
   karta zgłoszenia pod tytułem (objaw, przyczyna, czas, czy dasz radę sam). */

:root {
  --paper: #f3f5f8;
  --sheet: #ffffff;
  --ink: #0f172a;
  --steel: #475569;
  --rule: #d5dbe4;
  --link: #1d4fd1;
  --fault: #c9302c;
  --fault-bg: #fdecec;
  --signal: #b7791f;
  --signal-bg: #fff6e0;
  --ok: #18865c;
  --ok-bg: #e5f5ee;
  --term: #0b1324;
  --term-text: #d8e1ee;
  --measure: 70ch;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.68;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }

/* --- pasek górny (jak na stronie głównej) ------------------------------ */
.site-bar {
  background: rgba(15, 23, 42, 0.97);
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
  position: sticky; top: 0; z-index: 50;
}
.site-bar__in {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem 1.6rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 2.1rem; height: 2.1rem; border-radius: 0.5rem; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 0 24px -6px rgba(59, 130, 246, 0.55);
}
.brand__mark svg { width: 1.2rem; height: 1.2rem; }
.brand__name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; color: #fff; }
.brand__name span { color: #3b82f6; }
.site-bar__nav { display: flex; gap: 1.4rem; }
.site-bar__nav a { color: #cbd5e1; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-bar__nav a:hover { color: #3b82f6; }
.site-bar__nav a[aria-current="page"], .site-bar__nav a.is-section { color: #fff; }
.site-bar__status { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.78rem; color: #34d399; }
.site-bar__status i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
.btn-alert {
  display: inline-block;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  box-shadow: 0 0 28px -8px rgba(249, 115, 22, 0.6);
}
.btn-alert:hover { background: #ea580c; color: #fff; }
@media (max-width: 52rem) {
  .site-bar__status { display: none; }
  .site-bar__nav { order: 3; width: 100%; overflow-x: auto; gap: 1.2rem; padding-bottom: 0.15rem; }
  .btn-alert { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
}

/* --- układ ------------------------------------------------------------ */
.layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
@media (min-width: 64rem) {
  .layout { grid-template-columns: minmax(0, var(--measure)) 15rem; justify-content: space-between; }
  .toc { position: sticky; top: 1rem; align-self: start; }
}

.crumbs { font-size: 0.9rem; color: var(--steel); margin-bottom: 0.75rem; }
.crumbs a { color: var(--steel); }

article h1 {
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.meta { color: var(--steel); font-size: 0.92rem; margin: 0 0 1.5rem; }

article h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.6rem 0 0.8rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--ink);
}
article h3 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
article p, article ul, article ol { margin: 0 0 1rem; }
article li { margin-bottom: 0.35rem; }
article strong { font-weight: 600; }

/* --- karta zgłoszenia (główny akcent) --------------------------------- */
.ticket {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--fault);
  border-radius: 6px;
  margin: 0 0 2rem;
  overflow: hidden;
}
.ticket__head {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--term);
  color: var(--term-text);
  padding: 0.55rem 1rem;
}
.ticket__head b { color: #fca5a5; font-weight: 600; }
.ticket dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .ticket dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ticket dl > div { padding: 0.75rem 1rem; border-top: 1px solid var(--rule); }
.ticket dt { font-size: 0.85rem; color: var(--steel); }
.ticket dd { margin: 0.1rem 0 0; font-weight: 600; }

/* --- szybka odpowiedź ------------------------------------------------- */
.answer {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
}
.answer > p:first-child { font-size: 0.9rem; color: var(--steel); margin-bottom: 0.3rem; font-weight: 600; }
.answer p:last-child { margin-bottom: 0; }

/* --- kroki ------------------------------------------------------------ */
ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.1rem 3rem;
  margin: 0;
  border-left: 2px solid var(--rule);
  margin-left: 1rem;
}
ol.steps > li:last-child { border-left-color: transparent; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -1.05rem;
  top: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-weight: 600;
  display: grid; place-items: center;
  font-size: 0.95rem;
}
ol.steps > li > strong:first-child { display: block; margin-bottom: 0.2rem; }

/* --- objaśnienia ----------------------------------------------------- */
.note { border-radius: 6px; padding: 0.9rem 1.1rem; margin: 1.25rem 0; border: 1px solid; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note--warn { background: var(--signal-bg); border-color: #efd28f; }
.note--stop { background: var(--fault-bg); border-color: #f2b8b6; }
.note--ok { background: var(--ok-bg); border-color: #a7dcc4; }
.note__title { font-weight: 700; display: block; margin-bottom: 0.25rem; }

.case {
  background: var(--sheet);
  border: 1px dashed var(--steel);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.case__title { font-weight: 700; display: block; margin-bottom: 0.3rem; }

/* --- kod -------------------------------------------------------------- */
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #e6ebf2;
  padding: 0.08em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
pre {
  background: var(--term);
  color: var(--term-text);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 1rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 1.2rem;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
pre .c { color: #8aa0bd; }

/* --- tabele ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; background: var(--sheet); font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: #e8edf4; font-weight: 600; }

/* --- grafiki ---------------------------------------------------------- */
figure { margin: 1.75rem 0; }
figure svg { width: 100%; height: auto; display: block; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; }
figcaption { font-size: 0.9rem; color: var(--steel); margin-top: 0.5rem; }

/* --- FAQ -------------------------------------------------------------- */
.faq details { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--rule); }
.faq details > div { padding: 0.8rem 1rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* --- CTA -------------------------------------------------------------- */
.cta {
  background: var(--ink);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 1.4rem 1.4rem;
  margin: 2.5rem 0 1rem;
}
.cta h2 { color: #fff; border: 0; margin: 0 0 0.5rem; padding: 0; font-size: 1.35rem; }
.cta p { margin: 0 0 1rem; }
.cta__row { display: flex; gap: 0.75rem 1.25rem; flex-wrap: wrap; align-items: center; }
.cta a.tel { color: #fff; font-family: var(--mono); font-weight: 600; }

/* --- autor, powiązane ------------------------------------------------- */
.author { display: flex; gap: 1rem; align-items: flex-start; border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 2rem; font-size: 0.95rem; color: var(--steel); }
.author b { color: var(--ink); }
.related ul { padding-left: 1.1rem; }

/* --- spis treści ------------------------------------------------------ */
.toc { font-size: 0.92rem; }
.toc p { font-weight: 700; margin: 0 0 0.4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; }
.toc a { color: var(--steel); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.toc .btn-alert { margin-top: 1rem; }
@media (max-width: 63.99rem) {
  .toc { order: -1; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 0.9rem 1rem; }
  .toc .btn-alert { display: none; }
}

/* --- stopka (jak na stronie głównej) ----------------------------------- */
.site-foot { background: #0f172a; color: #94a3b8; font-size: 0.92rem; }
.site-foot__in { max-width: 72rem; margin: 0 auto; padding: 2.8rem 1rem 2rem; display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .site-foot__in { grid-template-columns: 2fr 1fr 1fr; } }
.site-foot__brand p { margin: 0.9rem 0 0; max-width: 28rem; line-height: 1.6; }
.site-foot__firm { font-size: 0.8rem; color: #64748b; }
.site-foot__h { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: #64748b; margin: 0 0 0.8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.55rem; }
.site-foot a { color: #cbd5e1; text-decoration: none; }
.site-foot a:hover { color: #3b82f6; }
.site-foot .btn-alert, .site-foot .btn-alert:hover { color: #fff; margin-top: 0.3rem; }
.site-foot__bar { max-width: 72rem; margin: 0 auto; padding: 1.2rem 1rem 1.6rem; border-top: 1px solid #1e293b; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; color: #64748b; font-size: 0.85rem; }
.site-foot__bar a { margin-left: 1.2rem; color: #94a3b8; }

/* --- indeks poradnika -------------------------------------------------- */
.hub-intro { max-width: var(--measure); }
.hub-group { margin-top: 2rem; }
.hub-group ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.hub-group li { border-bottom: 1px solid var(--rule); padding: 0.8rem 0; }
.hub-group li a { font-weight: 600; }
.hub-group li p { margin: 0.2rem 0 0; color: var(--steel); font-size: 0.95rem; }

@media print {
  .site-bar, .toc, .cta, .site-foot { display: none; }
  body { background: #fff; }
}

/* poprawki po przeglądzie renderu */
.toc a.btn-alert, .toc a.btn-alert:hover { color: #fff; text-decoration: none; }
figure:has(> svg) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 40rem) {
  figure svg { min-width: 640px; }
  figure:has(> svg)::after { content: "Przesuń grafikę w bok, aby zobaczyć całość."; display: block; font-size: 0.8rem; color: var(--steel); margin-top: 0.3rem; }
}

/* --- zrzuty ekranu ---------------------------------------------------- */
figure.shot { margin: 1.75rem 0; overflow: visible; }
figure.shot a { display: block; }
figure.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px -12px rgba(15, 23, 42, 0.25);
}
figure.shot a:hover img { border-color: var(--link); }
figure.shot--narrow { max-width: 30rem; }
.shot__tag {
  display: inline-block; margin-right: 0.45rem; padding: 0.05rem 0.45rem; border-radius: 3px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: 1px;
}
.shot__tag--real { background: var(--ok-bg); color: var(--ok); }
.shot__tag--mock { background: #e8edf4; color: var(--steel); }
