:root {
  --color-brand: #0f5e4f;
  --help-bg: #f3f5f9;
  --help-surface: #ffffff;
  --help-text: #1f2937;
  --help-muted: #4b5563;
  --help-border: #d9e2ec;
  --help-accent: #0f5e4f;
  --help-accent-light: #e8f5f1;
  --help-accent-hover: #0a4a3e;
  --help-warning: #b45309;
  --help-warning-bg: #fef3c7;
  --help-info: #1d4ed8;
  --help-info-bg: #dbeafe;
  --help-step-bg: #f0fdf4;
  --help-step-border: #bbf7d0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--help-text);
  background: radial-gradient(
    circle at top left,
    #ffffff 0%,
    var(--help-bg) 65%
  );
}

/* ===== CONTAINER ===== */
.help-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* ===== HEADER ===== */
.help-header {
  background: var(--help-surface);
  border: 1px solid var(--help-border);
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 20px;
}

.help-kicker {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-brand);
}

.help-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.help-meta {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--help-muted);
}

.help-header .help-version {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--help-accent);
  background: var(--help-accent-light);
  padding: 2px 10px;
  border-radius: 20px;
  vertical-align: middle;
}

.help-intro {
  margin: 12px 0 0;
  color: var(--help-muted);
  max-width: 720px;
}

/* ===== LAYOUT ===== */
.help-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 20px;
}

/* ===== NAV / TOC ===== */
.help-nav {
  position: sticky;
  top: 16px;
  align-self: start;
  background: var(--help-surface);
  border: 1px solid var(--help-border);
  border-radius: 14px;
  padding: 18px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.help-nav h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.help-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-nav > ul > li {
  margin-bottom: 2px;
}

.help-nav > ul > li > a {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--help-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s;
}

.help-nav > ul > li > a:hover {
  background: var(--help-accent-light);
  color: var(--help-accent);
}

.help-nav ul ul {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: none;
}

.help-nav ul ul li {
  margin-bottom: 1px;
}

.help-nav ul ul a {
  display: block;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--help-muted);
  text-decoration: none;
  font-size: 13px;
  transition:
    background 0.15s,
    color 0.15s;
}

.help-nav ul ul a:hover {
  background: var(--help-accent-light);
  color: var(--help-accent);
}

/* ===== CONTENT ===== */
.help-content {
  display: grid;
  gap: 14px;
}

.help-content section {
  background: var(--help-surface);
  border: 1px solid var(--help-border);
  border-radius: 14px;
  padding: 24px;
}

.help-content h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--help-accent);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--help-accent-light);
}

.help-content h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  color: var(--help-text);
}

.help-content h3:first-of-type {
  margin-top: 14px;
}

.help-content p {
  margin: 8px 0;
  color: var(--help-muted);
}

/* ===== STEP LISTS ===== */
.steps {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  counter-reset: step-counter;
}

.steps > li {
  counter-increment: step-counter;
  position: relative;
  padding: 10px 12px 10px 44px;
  margin-bottom: 6px;
  background: var(--help-step-bg);
  border: 1px solid var(--help-step-border);
  border-radius: 10px;
  color: var(--help-text);
  font-size: 14.5px;
}

.steps > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 22px;
  height: 22px;
  background: var(--help-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== BULLET LISTS ===== */
.help-content ul:not(.steps) {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--help-muted);
}

.help-content ul:not(.steps) li {
  margin-bottom: 4px;
  font-size: 14.5px;
}

/* ===== TABLES ===== */
.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.help-table th,
.help-table td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--help-border);
}

.help-table th {
  background: var(--help-accent-light);
  color: var(--help-accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.help-table td {
  color: var(--help-muted);
}

.help-table tr:nth-child(even) td {
  background: #fafbfd;
}

/* ===== INFO / WARNING / TIP BOXES ===== */
.info-box,
.warning-box,
.tip-box {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.55;
}

.info-box {
  background: var(--help-info-bg);
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.warning-box {
  background: var(--help-warning-bg);
  border: 1px solid #fcd34d;
  color: #92400e;
}

/* Akapity w boxach: .help-content p ustawia --help-muted — przywracamy kolor boxa */
.help-content .info-box p,
.help-content .warning-box p,
.help-content .tip-box p {
  color: inherit;
}

.tip-box {
  background: var(--help-accent-light);
  border: 1px solid #6ee7b7;
  color: #065f46;
}

/* Tylko strong bezpośrednio w boxie (etykieta typu "⚠️ Ważne") jako blok; pozostałe inline */
.info-box > strong:first-of-type,
.warning-box > strong:first-of-type,
.tip-box > strong:first-of-type {
  display: block;
  margin-bottom: 2px;
}

/* Listy wewnątrz boxów — mniejsze odstępy */
.info-box ul,
.warning-box ul,
.tip-box ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.info-box ul li,
.warning-box ul li,
.tip-box ul li {
  margin-bottom: 2px;
}

/* ===== KEYBOARD SHORTCUTS ===== */
kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: "Segoe UI", monospace;
  font-size: 12.5px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 1px 0 #9ca3af;
  color: var(--help-text);
}

/* ===== CHAPTER SUMMARY & NEXT ===== */
.chapter-summary {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f9fafb;
  border: 1px solid var(--help-border);
  border-radius: 10px;
}

.chapter-summary h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--help-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chapter-summary p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--help-muted);
}

.chapter-next {
  margin-top: 8px;
  font-size: 13px;
  color: var(--help-accent);
}

.chapter-next a {
  color: var(--help-accent);
  font-weight: 700;
  text-decoration: none;
}

.chapter-next a:hover {
  text-decoration: underline;
}

/* ===== INLINE CODE ===== */
code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--help-accent);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--help-accent);
  text-decoration: none;
  font-weight: 600;
}

.back-to-top:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.help-footer {
  margin-top: 24px;
  padding: 16px 24px;
  background: var(--help-surface);
  border: 1px solid var(--help-border);
  border-radius: 14px;
  text-align: center;
  color: var(--help-muted);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 880px) {
  .help-container {
    padding: 16px;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-nav {
    position: static;
    max-height: none;
  }
}

@media print {
  .help-nav {
    display: none;
  }

  .help-layout {
    display: block;
  }

  .help-content section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
