  /* ---------- Tokens ----------
     Kolor oznacza wyłącznie ważność (krytyczne / wysokie / obserwuj).
     Reszta strony jest celowo monochromatyczna. */
  :root {
    --paper: #F2F5F7;
    --surface: #FFFFFF;
    --ink: #0F2430;
    --muted: #556A76;
    --line: #D3DDE3;
    --line-strong: #B4C2CB;
    --crit: #D62839;
    --high: #C86400;
    --watch: #2B6CB0;
    --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --paper: #0F1B22;
      --surface: #15252E;
      --ink: #E7EEF2;
      --muted: #93A8B4;
      --line: #27404D;
      --line-strong: #3A5766;
      --crit: #FF6B77;
      --high: #FFA53D;
      --watch: #6FAAF0;
    }
  }

  /* ---------- Base ---------- */
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
  p { margin: 0; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
  .sr {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 20;
    background: var(--ink); color: var(--paper); padding: .6rem 1rem;
    border-radius: 8px; font-family: var(--display); text-decoration: none;
  }
  .skip:focus { top: 1rem; }

  /* ---------- Header ---------- */
  .site-head {
    position: sticky; top: 0; z-index: 10;
    background: var(--paper);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .site-head__in { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
  .brand {
    display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
    font-family: var(--display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em;
    font-variation-settings: "wdth" 88;
  }
  .brand svg { display: block; }
  .nav { display: flex; gap: clamp(1rem, 3vw, 1.9rem); font-family: var(--display); font-weight: 500; font-size: .95rem; }
  .nav a { text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
  .nav a:hover { border-bottom-color: var(--ink); }

  /* ---------- Hero ---------- */
  .hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
  .hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
  .hero__grid > * { min-width: 0; }
  @media (min-width: 920px) { .hero__grid { grid-template-columns: 1fr 1.02fr; } }
  .hero h1 {
    font-size: clamp(2.7rem, 6.4vw, 5.1rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: .98;
    font-variation-settings: "wdth" 82, "opsz" 96;
  }
  .hero__lead { margin-top: 1.5rem; max-width: 33rem; font-size: 1.2rem; line-height: 1.6; }
  .hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
  .btn {
    display: inline-block; background: var(--ink); color: var(--paper);
    font-family: var(--display); font-weight: 600; font-size: 1rem;
    padding: .85rem 1.3rem; border-radius: 10px; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--ink); }
  .textlink { font-family: var(--display); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; }

  /* ---------- Severity bars (kształt + kolor, nie sam kolor) ---------- */
  .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; width: 20px; flex: none; }
  .bars i { display: block; width: 5px; border-radius: 1.5px; background: var(--line-strong); }
  .bars i:nth-child(1) { height: 8px; }
  .bars i:nth-child(2) { height: 13px; }
  .bars i:nth-child(3) { height: 18px; }
  .bars i.on { background: var(--sev); transform-origin: bottom; animation: fill .5s ease-out both; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
  [data-sev="crit"] { --sev: var(--crit); }
  [data-sev="high"] { --sev: var(--high); }
  [data-sev="watch"] { --sev: var(--watch); }

  /* ---------- Board (przegląd tygodnia) ---------- */
  .board {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 28px 50px -36px rgba(15, 36, 48, .45);
    overflow: hidden;
  }
  .board__head { padding: 1.15rem 1.25rem 1rem; }
  .board__title { font-size: 1.3rem; font-weight: 750; font-variation-settings: "wdth" 90; }
  .board__meta { margin-top: .2rem; font-family: var(--display); font-size: .88rem; color: var(--muted); }
  .chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
  .chip {
    font: 500 .85rem/1 var(--display);
    color: var(--ink); background: transparent;
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: .5rem .8rem; cursor: pointer;
    display: inline-flex; gap: .45rem; align-items: center;
    transition: background .15s ease, color .15s ease;
  }
  .chip:hover { background: var(--line); }
  .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .chip__n { opacity: .65; font-variant-numeric: tabular-nums; }

  .rows { list-style: none; margin: 0; padding: 0; }
  .row { border-top: 1px solid var(--line); animation: enter .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 110ms); }
  .row summary {
    list-style: none; cursor: pointer;
    display: grid; grid-template-columns: 20px 1fr 12px; gap: .95rem; align-items: start;
    padding: 1rem 1.25rem;
  }
  .row summary::-webkit-details-marker { display: none; }
  .row summary:hover .row__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
  .row summary::after {
    content: ""; width: .5rem; height: .5rem; margin-top: .35rem;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s ease;
  }
  .row[open] summary::after { transform: rotate(-135deg); margin-top: .6rem; }
  .row .bars { margin-top: .2rem; }
  .row__title { font-family: var(--display); font-weight: 600; font-size: 1.06rem; line-height: 1.28; letter-spacing: -0.01em; }
  .row__meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin-top: .4rem; font-family: var(--display); font-size: .82rem; color: var(--muted); }
  .row__sev { color: var(--ink); font-weight: 700; }
  .row__more { padding: 0 1.25rem 1.2rem calc(1.25rem + 20px + .95rem); font-size: .99rem; line-height: 1.6; }
  .row__more p + p { margin-top: .7rem; }
  .row__guide { font-family: var(--display); font-weight: 600; font-size: .92rem; text-underline-offset: 3px; }
  .board__foot { border-top: 1px solid var(--line); padding: .8rem 1.25rem; font-family: var(--display); font-size: .82rem; color: var(--muted); }

  /* ---------- Sekcje ---------- */
  .section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
  .section h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 750; font-variation-settings: "wdth" 88; }
  .section__lead { margin-top: .9rem; max-width: 36rem; color: var(--muted); }

  /* ---------- Poradniki ---------- */
  .guides { margin-top: 2.5rem; display: grid; gap: 1.75rem 3rem; }
  .guides > * { min-width: 0; }
  @media (min-width: 860px) { .guides { grid-template-columns: 190px 1fr; } .topics { position: sticky; top: 6rem; align-self: start; flex-direction: column; align-items: flex-start; } }
  .topics { display: flex; flex-wrap: wrap; gap: .45rem; }
  .guide-list { border-top: 1px solid var(--line-strong); }
  .guide {
    display: grid; gap: .8rem 2rem; padding: 1.4rem .5rem;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 6rem;
  }
  @media (min-width: 700px) { .guide { grid-template-columns: 1fr 200px; } }
  .guide:target { background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .guide h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; }
  .guide h3 a { text-decoration: none; }
  .guide h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
  .guide__desc { margin-top: .45rem; color: var(--muted); max-width: 40rem; }
  .guide__meta { display: flex; flex-wrap: wrap; gap: .15rem 1rem; align-content: start; font-family: var(--display); font-size: .86rem; color: var(--muted); }
  @media (min-width: 700px) { .guide__meta { flex-direction: column; } }
  .guide__meta b { color: var(--ink); font-weight: 600; }

  /* ---------- O onesec ---------- */
  .about { display: grid; gap: 1.5rem 4rem; }
  @media (min-width: 860px) { .about { grid-template-columns: 1fr 1.3fr; } }
  .about__body { display: grid; gap: 1.1rem; max-width: 38rem; font-size: 1.12rem; }

  /* ---------- Footer ---------- */
  .foot { border-top: 1px solid var(--line); padding: 1.8rem 0 2.5rem; font-family: var(--display); font-size: .88rem; color: var(--muted); }
  .foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; }

  /* ---------- Ruch: jedna sekwencja przy wczytaniu ---------- */
  @keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
  }

  /* ---------- Przełącznik języka / Language switch ---------- */
  .head-right { display: flex; align-items: center; gap: clamp(.9rem, 3vw, 1.6rem); }
  .lang {
    display: inline-flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px;
    font: 600 .78rem/1 var(--display); letter-spacing: .02em;
  }
  .lang > * { padding: .38rem .65rem; border-radius: 999px; text-decoration: none; }
  .lang a:hover { background: var(--line); }
  .lang [aria-current] { background: var(--ink); color: var(--paper); }
  @media (max-width: 520px) { .nav a:nth-child(3) { display: none; } .brand { font-size: 1.25rem; } }
