/* GML Reader — Arkusz stylów */

:root {
  /* Motyw jasny */
  --bg: #ffffff;
  --bg-subtle: #f6f6f6;
  --border: #d0d0d0;
  --border-strong: #999999;
  --text: #222222;
  --text-muted: #555555;
  --link: #0052cc;
  --link-hover: #003380;
  --btn-bg: #f0f0f0;
  --btn-hover: #e4e4e4;
  --btn-border: #cccccc;
  --btn-text: #222222;
  --btn-primary-bg: #238fc7;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #1b7ba9;
  /* Badge new — fioletowy */
  --badge-bg: #f8eafa;
  --badge-text: #7b2783;
  --badge-border: #dc74ec;
  --table-border: #d0d0d0;
  --table-stripe: #fafafa;
  /* Stonowane ramki uwag (mniej nasycone) */
  --panel-smart-bg: #fdfaf2;
  --panel-smart-border: #dfcf9e;
  --panel-smart-title: #735919;
  --panel-free-bg: #f4f8fb;
  --panel-free-border: #b8d4e7;
  --panel-free-title: #276488;
  --highlight-border: #222222;
}

[data-theme="dark"] {
  /* Motyw ciemny — bazowany na próbkach użytkownika */
  --bg: #181818;
  --bg-subtle: #1f1f1f;
  --border: #2e2e2e;
  --border-strong: #444444;
  --text: #e0e0e0;
  --text-muted: #888888;
  --link: #66aaff;
  --link-hover: #99ccff;
  --btn-bg: #222222;
  --btn-hover: #2a2a2a;
  --btn-border: #383838;
  --btn-text: #e0e0e0;
  --btn-primary-bg: #238fc7;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #2ca4e2;
  /* Badge new — fioletowy */
  --badge-bg: #351a37;
  --badge-text: #f0a8f8;
  --badge-border: #6d3370;
  --table-border: #2e2e2e;
  --table-stripe: #1c1c1c;
  /* Stonowane ramki uwag w dark mode */
  --panel-smart-bg: #221e17;
  --panel-smart-border: #4d422a;
  --panel-smart-title: #d4b05a;
  --panel-free-bg: #182229;
  --panel-free-border: #2d4150;
  --panel-free-title: #61a9d4;
  --highlight-border: #e0e0e0;
}

/* Wymóg: Zero zaokrągleń krawędzi */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  margin: 0;
  padding: 0;
}

/* Powrót do pierwotnej wielkości czcionki bazowej */
html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header — rozciągnięty na całą szerokość ekranu */
.site-header {
  width: 100%;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 1.5rem;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.brand-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* Nawigacja — perfekcyjnie wyśrodkowana w pionie na wysokości logo */
.nav-links {
  display: inline-flex;
  align-items: center;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom: 2px solid var(--text);
}

/* Przycisk motywu z ikoną SVG */
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}

.theme-btn:hover {
  background: var(--btn-hover);
}

.theme-btn svg {
  width: 17px;
  height: 17px;
}

/* Hamburger mobile */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.mobile-toggle:hover {
  background: var(--btn-hover);
}

/* Kontenery treści */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  flex: 1;
  padding: 2rem 0 3rem;
}

.page-header {
  margin-bottom: 0.25rem;
  padding-bottom: 0.75rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
  line-height: 1.25;
}

.page-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.page-header+h2,
.page-header~h2:first-of-type {
  margin-top: 0.55rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.4rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

/* Kotwice - offset 80px */
[id] {
  scroll-margin-top: 80px;
}

p {
  font-size: 0.98rem;
  margin-bottom: 0.9rem;
}

ul,
ol {
  font-size: 0.98rem;
  margin-bottom: 1.15rem;
  padding-left: 1.45rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 1px 4px;
}

/* Nazwy kolumn w sekcji 4 — lekko większe i pogrubione */
code.col-name {
  font-size: 0.98em;
  font-weight: 700;
  padding: 2px 6px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  display: inline-block;
  margin-bottom: 3px;
}

/* Przyciski */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.btn-left {
  display: flex;
  justify-content: flex-start;
  margin: 1.25rem 0;
}

.btn-contact-action {
  margin-top: 0.6rem;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 0.92rem;
  font-family: inherit;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid var(--btn-border);
  background-color: var(--btn-bg);
  color: var(--btn-text) !important;
  font-weight: 500;
  line-height: 1.4;
}

.btn:hover {
  background-color: var(--btn-hover);
}

/* Przycisk pobierania — niebieski #238fc7 w obu motywach */
.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text) !important;
  border-color: var(--btn-primary-bg);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
}

.btn-lg {
  padding: 10px 20px;
  font-size: 1rem;
}

/* Przycisk na całą szerokość treści */
.btn-fullwidth {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
}

.btn-full-container {
  margin: 1.5rem 0;
}

.btn svg {
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
}

/* Tabelka wersji */
.version-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.35rem 0;
  font-size: 0.94rem;
}

.version-table th,
.version-table td {
  border: 1px solid var(--table-border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: middle;
}

.version-table th {
  background-color: var(--bg-subtle);
  font-weight: 600;
}

.version-table tr:nth-child(even) td {
  background-color: var(--table-stripe);
}

/* Badge NEW — fioletowy, uniesiony wyżej */
.badge-new {
  display: inline-block;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  margin-left: 6px;
  position: relative;
  top: -3px;
  line-height: 1.2;
}

/* Stonowane ramki uwag na stronie pobierania (równe obramowanie ze wszystkich stron) */
.panel-warn {
  border: 1px solid var(--panel-smart-border);
  background-color: var(--panel-smart-bg);
  padding: 1.1rem 1.3rem;
  margin: 1.35rem 0;
}

.panel-warn-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--panel-smart-title);
  margin-bottom: 0.45rem;
  display: block;
}

.panel-info {
  border: 1px solid var(--panel-free-border);
  background-color: var(--panel-free-bg);
  padding: 1.1rem 1.3rem;
  margin: 1.35rem 0;
}

.panel-info-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--panel-free-title);
  margin-bottom: 0.45rem;
  display: block;
}

/* Screenshoty */
.screenshot-box {
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  line-height: 0;
  overflow: hidden;
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
}

.light-only {
  display: block;
}

.dark-only {
  display: none;
}

[data-theme="dark"] .light-only {
  display: none;
}

[data-theme="dark"] .dark-only {
  display: block;
}

/* Separator po tabelce w sekcji 4 */
.section-separator {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0 1.5rem;
}

/* Większe odstępy w sekcji 4 opisów kolumn */
.column-desc-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.column-desc-block:last-child {
  border-bottom: none;
  margin-bottom: 0.8rem;
}

.manual-highlight {
  border-left: 3px solid var(--highlight-border);
  padding-left: 11px;
  margin: 0.65rem 0;
  font-size: 0.96rem;
}

/* Spis treści instrukcji (układ z lewą kolumną) */
.manual-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.manual-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.toc-sticky {
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
}

.toc-title {
  font-weight: 700;
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc-list li {
  margin-bottom: 0.45rem;
}

.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 2px 0;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.toc-list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.toc-list a.active {
  color: var(--text);
  font-weight: 700;
  border-left: 2px solid var(--text);
  padding-left: 7px;
}

.toc-sublist {
  list-style: none;
  padding-left: 0.95rem;
  margin-top: 0.3rem;
  font-size: 0.88rem;
}

.toc-sublist li {
  margin-bottom: 0.25rem;
}

.manual-content {
  flex: 1;
  min-width: 0;
}

.manual-content section {
  margin-bottom: 2.5rem;
}

/* Sekcja kontaktu */
.contact-box {
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  padding: 1.3rem;
  margin: 1.35rem 0;
}

.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.email-text {
  font-family: Consolas, monospace;
  font-size: 1rem;
  font-weight: 600;
  padding: 5px 9px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.copy-msg {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: none;
}

.copy-msg.visible {
  display: inline;
}

/* Stopka z Trademark Disclaimer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  width: 100%;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.footer-trademark {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.75;
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* Responsywność */
@media (max-width: 860px) {
  .manual-layout {
    display: block;
    max-width: 860px;
    padding: 0 1.25rem;
  }

  .manual-sidebar {
    width: 100%;
    position: static;
    margin-bottom: 2rem;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 0.85rem;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 999;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 7px 0;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* Wydruk */
@media print {

  .site-header,
  .site-footer,
  .btn,
  .theme-btn,
  .mobile-toggle,
  .btn-group,
  .manual-sidebar {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .manual-layout,
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}