/* ============================================
   Novus Ignis · strony dokumentów (manifest, whitepapery, statut)
   ============================================ */
.doc-body { background: #0b0b10; }
.doc-body .subpage-nav { position: sticky; top: 0; }

.doc-notice {
  margin-top: 20px; padding: 12px 16px; border-radius: 10px;
  background: rgba(255, 184, 0, 0.08); border: 1px solid rgba(255, 184, 0, 0.35); color: #F3E3B5; font-size: 0.95rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* Spis treści w panelu bocznym */
.doc-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 0.88rem; scrollbar-width: thin; }
.doc-toc__box > summary {
  cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.78rem; color: var(--ni-flame-light); margin-bottom: 10px;
}
.doc-toc__box > summary::-webkit-details-marker { display: none; }
.doc-toc__list { list-style: none; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.doc-toc__list li a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--ni-text-muted); text-decoration: none; line-height: 1.4;
}
.doc-toc__list li.doc-toc__l3 a { padding-left: 28px; font-size: 0.84rem; }
.doc-toc__list li a:hover { color: #fff; border-left-color: var(--ni-flame-main); }

/* Tekst dokumentu */
.doc { min-width: 0; max-width: 76ch; overflow-wrap: break-word; font-size: 1.06rem; line-height: 1.75; color: #E4E4EC; }
.doc > * + * { margin-top: 1.05em; }
.doc h1, .doc h2, .doc h3, .doc h4 { font-family: var(--font-display); color: #fff; line-height: 1.25; scroll-margin-top: 90px; }
.doc h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 700; margin-bottom: 0.4em; }
.doc h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 700; margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.doc h3 { font-size: 1.22rem; font-weight: 600; margin-top: 1.8em; color: #FFE3C7; }
.doc h4 { font-size: 1.05rem; font-weight: 600; margin-top: 1.4em; }
.doc h1 + h2 { border-top: 0; margin-top: 0.2em; padding-top: 0; color: var(--ni-flame-light); font-weight: 500; }
.doc-anchor { margin-left: 0.4em; color: var(--ni-text-muted); text-decoration: none; opacity: 0; font-weight: 400; font-size: 0.8em; }
.doc h2:hover .doc-anchor, .doc h3:hover .doc-anchor, .doc-anchor:focus { opacity: 1; }
.doc a { color: #FFB27A; text-decoration: underline; text-decoration-color: rgba(255, 178, 122, 0.4); text-underline-offset: 2px; }
.doc a:hover { color: #FFD3B0; text-decoration-color: currentColor; }
.doc strong { color: #fff; font-weight: 600; }
.doc ul, .doc ol { padding-left: 1.5em; }
.doc li + li { margin-top: 0.4em; }
.doc li > ul, .doc li > ol { margin-top: 0.4em; }
.doc hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); margin: 2.2em 0; }
.doc blockquote { border-left: 3px solid var(--ni-flame-main); padding-left: 1em; color: #CFCFDA; }
.doc code { font-family: var(--font-mono); font-size: 0.88em; background: rgba(255, 255, 255, 0.06); padding: 0.1em 0.35em; border-radius: 4px; }
.doc-contents a { text-decoration: none; }

.table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; text-align: left; }
.doc th { background: rgba(255, 255, 255, 0.05); color: #fff; font-weight: 600; }
.doc tbody tr:last-child td { border-bottom: 0; }

.fn-ref { font-size: 0.72em; line-height: 0; margin-left: 1px; }
.fn-ref a { text-decoration: none; padding: 0 2px; }
.doc ol.footnotes { font-size: 0.88rem; line-height: 1.6; color: #C9C9D6; }
.doc ol.footnotes li { scroll-margin-top: 90px; overflow-wrap: anywhere; }
.doc ol.footnotes li:target, .doc :target { background: rgba(255, 184, 0, 0.08); border-radius: 6px; }
.fn-back { text-decoration: none !important; }

.doc-meta { margin-top: 3em !important; font-size: 0.82rem; color: var(--ni-text-muted); }

/* Podstrona bez spisu treści: jedna kolumna czytelnicza */
.doc-layout--single { grid-template-columns: minmax(0, 76ch); justify-content: center; }
.doc-lead { color: var(--ni-text-muted); }

@media (max-width: 960px) {
  .doc-layout--single { grid-template-columns: minmax(0, 1fr); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 24px; }
  .doc-toc { position: static; max-height: none; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 12px 14px; }
  .doc-toc__box > summary { margin-bottom: 0; }
  .doc-toc__box[open] > summary { margin-bottom: 10px; }
  .doc { font-size: 1.02rem; }
}

@media print {
  .subpage-nav, .doc-toc, .site-footer, .doc-anchor, .doc-notice, .skip-link, .doc-remark-section, .doc-remark-hint, .doc-remark-pop { display: none !important; }
  .doc-body, .doc { background: #fff; color: #000; }
  .doc h1, .doc h2, .doc h3, .doc strong { color: #000; }
  .doc a { color: #000; }
  .doc-layout { display: block; padding: 0; }
}

/* Nagłówek przyklejony do góry ekranu przy przewijaniu */
.doc-body #site-header { position: sticky; top: 0; z-index: 100; }
.doc-body #site-header .subpage-nav { position: relative; }

/* Mapa strony (generowana) */
.doc ul.sitemap-list { list-style: none; padding-left: 0; }
.sitemap-list li { padding: 0.55em 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sitemap-list li + li { margin-top: 0; }
.sitemap-desc { display: block; font-size: 0.9em; color: var(--ni-text-muted); }

/* Nota o przekładzie i porównanie z innym językiem (js/compare.js) */
.doc-translation-note { margin-top: 20px; padding: 10px 16px; border-radius: 10px; background: rgba(0, 210, 255, 0.06); border: 1px solid rgba(0, 210, 255, 0.3); color: #CFEFF7; font-size: 0.9rem; }
.doc-translation-note--experimental { background: rgba(255, 184, 0, 0.1); border-color: rgba(255, 184, 0, 0.55); color: #F3E3B5; font-size: 0.95rem; }
.doc-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; font-size: 0.9rem; color: #9A9AB0; }
.doc-compare select, .doc-compare__go { font: inherit; color: #E4E4EC; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; padding: 5px 10px; }
.doc-compare__go { cursor: pointer; }
.doc-compare__go:hover, .doc-compare select:focus-visible, .doc-compare__go:focus-visible { border-color: #FF7700; outline: none; }
.doc-compare-block { position: relative; margin: -6px 0 22px; padding: 10px 14px 10px 16px; border-left: 3px solid rgba(0, 210, 255, 0.45); background: rgba(0, 210, 255, 0.04); border-radius: 0 8px 8px 0; color: #B8B8CC; font-size: 0.95em; }
.doc-compare-block > *:last-child { margin-bottom: 0; }
.doc-compare-block__lang { display: inline-block; margin-bottom: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: #00D2FF; }
@media print { .doc-compare, .doc-compare-block { display: none !important; } }
/* Wersje dokumentów: odnośnik pod wierszem wersji, strona zmian, wersje historyczne */
.doc-version-changes { font-size: 0.9rem; }
.ver-meta, .ver-legend { color: var(--ni-text-muted); }
.ver-legend { font-size: 0.9rem; }
.ver-gap { margin: 1.2em 0; padding: 2px 12px; border-inline-start: 2px dashed var(--ni-border); color: var(--ni-text-muted); font-size: 0.85rem; }
.ver-hunk { margin: 1.4em 0; padding: 12px 16px; border: 1px solid var(--ni-border); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.ver-where { margin: 0 0 0.6em; font-size: 0.85rem; font-weight: 600; }
.ver-heading { font-weight: 700; }
.doc ins { background: rgba(0, 255, 238, 0.12); color: #D8FFFB; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc del { background: rgba(255, 0, 80, 0.14); color: #FFD0DC; text-decoration: line-through; text-decoration-thickness: 2px; }
.ver-block { display: block; margin: 0.6em 0; padding: 8px 12px; border-radius: 8px; }
.ver-block > p:last-child { margin-bottom: 0; }
/* etykieta jako inline-block: podkreślenie i przekreślenie bloku jej nie obejmują */
.ver-historical a { color: #FFB27A; text-underline-offset: 2px; }
.ver-tag { display: inline-block; margin-bottom: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* OmniVox: formularz wpisu bez konta (strona omnivox.html) */
.ov-form { display: grid; gap: 18px; margin: 1em 0 2em; max-width: 720px; }
.ov-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.ov-field > label, .ov-field > legend { font-weight: 600; color: var(--ni-text-bright); padding: 0; }
.ov-input { width: 100%; box-sizing: border-box; padding: 12px 14px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; color: #FFFFFF; font: inherit; }
.ov-input:focus { border-color: var(--ni-flame-main); outline: 2px solid transparent; }
.ov-text { min-height: 12em; resize: vertical; }
.ov-help { margin: 0; color: var(--ni-text-muted); font-size: 0.9rem; }
.ov-choice { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.ov-choice input { margin-top: 0.3em; flex: none; }
.ov-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
