/*
 * LegioPilot public site - article/guide layout.
 * Used by long-form knowledge-base pages (legionella-w-hotelu,
 * obiekty-priorytetowe-legionella-2028, legionella-podstawy) on top of
 * assets/site.css. Landing pages (dla-hoteli, baza-wiedzy, pilotaz) do not
 * need this file.
 */

body { line-height: 1.72; }

.main-article { padding: 55px 0 95px; background: linear-gradient(180deg, var(--paper), #fff 360px); }
.layout { display: grid; grid-template-columns: minmax(0, 780px) 300px; gap: 65px; align-items: start; min-width: 0; }

article h2 {
  margin: 66px 0 17px;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  scroll-margin-top: 100px;
}
article h3 { margin: 38px 0 12px; color: var(--ink); font-size: 1.28rem; line-height: 1.2; }
article p { margin: 0 0 18px; }
article ul, article ol { margin: 0 0 22px; padding-left: 1.35rem; }
article li { margin-bottom: 8px; }
article a:not(.button) { color: var(--emerald-dark); text-underline-offset: 3px; }

.summary {
  padding: 26px 28px;
  margin-bottom: 37px;
  border: 1px solid #bde6d7;
  border-radius: 19px;
  background: var(--mint);
  box-shadow: 0 9px 28px rgba(4, 18, 15, 0.07);
  scroll-margin-top: 100px;
}
.summary h2 { margin: 0 0 13px; font-size: 1.28rem; }
.summary ul { margin-bottom: 0; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 27px 0 34px; }
.date-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 23px rgba(4, 18, 15, 0.06); }
.date-card time { display: block; color: var(--emerald-dark); font-size: 1.05rem; font-weight: 900; }
.date-card strong { display: block; margin: 4px 0; color: var(--ink); }
.date-card p { margin: 0; color: var(--muted); font-size: 0.87rem; }

.decision { padding: 26px; margin: 27px 0 33px; border-radius: 19px; color: rgba(236, 253, 245, 0.74); background: var(--ink-soft); box-shadow: var(--shadow); }
.decision h3 { margin: 0 0 17px; color: #fff; }
.path { display: grid; grid-template-columns: 1fr auto 1fr; gap: 13px; align-items: stretch; }
.path .box { padding: 17px; border: 1px solid rgba(167, 243, 208, 0.16); border-radius: 13px; background: rgba(255, 255, 255, 0.05); }
.path .box strong { display: block; margin-bottom: 5px; color: #fff; }
.path .arrow { display: grid; place-items: center; color: var(--emerald); font-size: 1.5rem; font-weight: 900; }

.compare { margin: 29px 0; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; box-shadow: var(--shadow); }
.compare-head { padding: 22px 24px; color: #fff; background: var(--ink); }
.compare-head h3 { margin: 0 0 4px; color: #fff; }
.compare-head p { margin: 0; color: rgba(236, 253, 245, 0.62); }
.compare-columns { display: grid; grid-template-columns: 1fr 1fr; }
.compare-columns > div { padding: 23px; background: #fff; }
.compare-columns > div + div { border-left: 1px solid var(--line); background: var(--mint); }

/* ---------- Results table: desktop table + mobile stacked cards ---------- */
.result-table { overflow-x: auto; margin: 25px 0 8px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(4, 18, 15, 0.07); }
.result-table table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.result-table th, .result-table td { padding: 15px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.result-table th { color: var(--ink); background: var(--paper); font-size: 0.8rem; text-transform: uppercase; }
.result-table tr:last-child td { border: 0; }
.level-low { color: var(--emerald-dark); font-weight: 850; }
.level-medium { color: #946700; font-weight: 850; }
.level-high { color: var(--danger-ink); font-weight: 850; }

.result-cards { display: none; margin: 25px 0 8px; }
.result-card { padding: 20px 22px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(4, 18, 15, 0.06); }
.result-card:last-child { margin-bottom: 0; }
.result-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.result-card-head .rc-value { font-weight: 900; color: var(--ink); font-size: 1.02rem; }
.result-row { display: grid; grid-template-columns: 128px 1fr; gap: 4px 14px; padding: 8px 0; }
.result-row + .result-row { border-top: 1px dashed var(--line); }
.result-row dt { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.result-row dd { margin: 0; color: var(--text); font-size: 0.92rem; }

@media (max-width: 720px) {
  .result-table { display: none; }
  .result-cards { display: block; }
}

/* ---------- Light info panel (temperature scale, risk groups) ---------- */
.temp-panel { padding: 26px 28px; margin: 25px 0 32px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: 0 8px 24px rgba(4, 18, 15, 0.06); }
.temp-panel h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.1rem; }
.temp-panel > p { margin: 0 0 18px; color: var(--muted); font-size: 0.94rem; }
.temp-scale { display: grid; gap: 10px; margin: 0 0 6px; }
.temp-row { display: grid; grid-template-columns: 82px 1fr; gap: 14px; align-items: center; }
.temp-val { font-weight: 800; color: var(--ink); font-size: 0.94rem; text-align: right; }
.temp-bar { height: 36px; border-radius: 9px; display: flex; align-items: center; padding: 0 12px; font-size: 0.82rem; font-weight: 700; color: #fff; }
.t-grow { background: linear-gradient(90deg, #b45309, #d97706); }
.t-20 { background: linear-gradient(90deg, var(--emerald-dark), var(--emerald)); }
.t-2 { background: linear-gradient(90deg, #b91c1c, #dc2626); }
.t-die { background: linear-gradient(90deg, #334155, #475569); }
.temp-note { margin: 14px 0 0; color: var(--muted); font-size: 0.83rem; line-height: 1.5; }

.risk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 32px; padding: 0; list-style: none; }
.risk-chips li { padding: 7px 13px; border-radius: 999px; background: var(--mint); color: var(--emerald-dark); font-size: 0.85rem; font-weight: 650; }

.product-panel {
  padding: 34px;
  margin: 67px 0 38px;
  border-radius: 23px;
  color: rgba(236, 253, 245, 0.78);
  background: radial-gradient(circle at 90% 10%, rgba(167, 243, 208, 0.13), transparent 35%), linear-gradient(145deg, var(--emerald-dark), #0f2a24);
  box-shadow: var(--shadow);
  scroll-margin-top: 100px;
}
.product-panel h2, .product-panel h3 { color: #fff; }
.product-panel h2 { margin-top: 0; }
.product-panel ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 0; list-style: none; }
.product-panel li { position: relative; margin: 0; padding-left: 25px; }
.product-panel li::before { content: "\2713"; position: absolute; left: 0; color: var(--lime); font-weight: 900; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }

.sources { margin-top: 63px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 0.87rem; color: var(--muted); scroll-margin-top: 100px; }
.sources h2 { margin-top: 0; }
.sources li { margin-bottom: 10px; overflow-wrap: anywhere; }
.disclaimer { padding: 17px 19px; margin-top: 27px; border-radius: 13px; background: var(--paper); font-size: 0.84rem; }

.side { position: sticky; top: 95px; }
.toc { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 8px 24px rgba(4, 18, 15, 0.06); }
.toc strong { display: block; margin-bottom: 11px; color: var(--ink); }
.toc ol { display: grid; gap: 7px; margin: 0; padding-left: 1rem; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.toc a { text-decoration: none; display: inline-block; position: relative; padding-left: 11px; transition: color 150ms ease; }
.toc a::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: var(--emerald); opacity: 0; transition: opacity 180ms ease; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--emerald-dark); font-weight: 850; }
.toc a.active::before { opacity: 1; }

.side-cta { padding: 21px; margin-top: 16px; border-radius: 17px; color: rgba(236, 253, 245, 0.72); background: var(--ink-soft); }
.side-cta strong { display: block; margin-bottom: 7px; color: #fff; }
.side-cta p { margin: 0 0 15px; font-size: 0.87rem; }
.side-cta .button { width: 100%; font-size: 0.85rem; }

.toc-mobile { display: none; }

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  article { width: 100%; min-width: 0; max-width: 780px; margin: auto; }
  .timeline { grid-template-columns: 1fr; }

  .toc-mobile {
    display: block;
    margin: 0 0 32px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(4, 18, 15, 0.06);
  }
  .toc-mobile > summary { min-height: 44px; }
  .toc-mobile nav { margin-top: 14px; }
  .toc-mobile ol { display: grid; gap: 10px; margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
  .toc-mobile a { color: var(--muted); text-decoration: none; display: inline-block; min-height: 24px; }
  .toc-mobile a:hover { color: var(--ink); }
}

@media (max-width: 720px) {
  .compare-columns { grid-template-columns: 1fr; }
  .compare-columns > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .path { grid-template-columns: 1fr; }
  .path .arrow { transform: rotate(90deg); }
  .product-panel { padding: 26px 21px; }
  .product-panel ul { grid-template-columns: 1fr; }
  .actions { flex-direction: column; align-items: stretch; margin-top: 22px; }
  .actions .button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    padding: 14px 20px;
    line-height: 1.35;
  }
}
