:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --brand: #0ea5e9;
  --radius: 12px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 38px 0 18px;
}

.eyebrow {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
}

main {
  padding: 22px 0 48px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  margin-bottom: 16px;
  background: #fff;
}

.flow {
  scroll-margin-top: 96px;
}

h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

h3 {
  margin: 12px 0 6px;
  font-size: 15px;
}

.muted {
  color: var(--muted);
}

.toc {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toc a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.callout {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--muted);
}

.callout strong {
  color: var(--text);
}

.callout p {
  margin: 0;
}

.callout--info {
  border-color: #bfe3ff;
  background: #eef7ff;
  color: var(--text);
}

.callout--warn {
  border-color: #ffc7c7;
  background: #fff4f4;
  color: var(--text);
}

.callout--ok {
  border-color: #bff2cf;
  background: #f1fff6;
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  }

  .grid.media-left {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  }
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

ol {
  margin: 8px 0 0 18px;
  color: var(--muted);
}

li {
  margin: 8px 0;
}

figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.note {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
}

.note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}

details + details {
  margin-top: 10px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
}

.card-link:hover {
  text-decoration: none;
  border-color: #cbd5e1;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.card-link .kicker {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.card-link .title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.card-link .desc {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.breadcrumbs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer__content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.site-footer__contact {
  font-weight: 600;
}

.guide-page .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, #ffffff 92%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 16px 0 12px;
}

.guide-page .toc-mobile {
  display: none;
}

.guide-page .layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.guide-page .toc-desktop {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.guide-page .side-rail.toc-desktop {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.guide-page .side-rail .sidenav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.guide-page .sidenav .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0;
}

.guide-page .sidenav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  padding: 7px 10px;
  border-radius: 10px;
  border-left: 2px solid transparent;
}

.guide-page .sidenav a:hover {
  text-decoration: none;
  background: var(--soft);
  border-left-color: var(--brand);
}

.guide-page .sidenav .small {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.guide-page .content {
  min-width: 0;
}

.guide-page .area {
  margin: 0 0 14px;
  scroll-margin-top: 96px;
}

.guide-page .area-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.guide-page .area-badge {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  background: #fff;
}

.guide-page .section-divider {
  margin-top: 12px;
  border: 0;
  border-top: 1px solid var(--line);
}

.guide-page .share-details {
  margin-top: 12px;
}

.guide-page .share-preview {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.guide-page .grid-tight-top {
  margin-top: 14px;
}

.guide-page .mt-12 {
  margin-top: 12px;
}

.guide-page .status-list {
  margin: 10px 0 0 18px;
}

.guide-page img.zoomable-image {
  cursor: zoom-in;
  transition: transform 0.18s ease;
}

.guide-page img.zoomable-image:hover {
  transform: scale(1.01);
}

.guide-page img.zoomable-image:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

body.lightbox-open {
  overflow: hidden;
}

.guide-page .image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.78);
}

.guide-page .image-lightbox[hidden] {
  display: none;
}

.guide-page .image-lightbox__frame {
  width: min(1200px, 96vw);
  max-height: 92vh;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

.guide-page .image-lightbox__frame img {
  width: 100%;
  max-height: calc(92vh - 56px);
  object-fit: contain;
  display: block;
  background: #fff;
}

.guide-page .image-lightbox__caption {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.guide-page .image-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.guide-page .image-lightbox__close:hover {
  background: var(--soft);
}

@media (max-width: 1024px) {
  .guide-page .site-header {
    top: 0;
    padding-bottom: 10px;
  }

  .guide-page .layout {
    grid-template-columns: 1fr;
  }

  .guide-page .toc-desktop {
    display: none;
  }

  .guide-page .toc-mobile {
    display: flex;
    margin-top: 10px;
    overflow-x: auto;
    gap: 8px;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .guide-page .toc-mobile a {
    white-space: nowrap;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 6px 0;
    margin-right: 10px;
    font-size: 13px;
    color: var(--muted);
    background: transparent;
  }

  .guide-page .toc-mobile a:hover {
    color: var(--text);
    text-decoration: none;
    border-bottom-color: var(--brand);
  }

  .guide-page .image-lightbox {
    padding: 14px;
  }

  .guide-page .image-lightbox__frame {
    width: 100%;
  }
}

.landing-page .site-header {
  padding-bottom: 26px;
}

.landing-page .lead {
  max-width: 70ch;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
  background: linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.06);
}

.hero-panel h2 {
  font-size: 22px;
}

.hero-panel p {
  margin: 0;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.role-card {
  display: block;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 18px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

.role-card:hover {
  text-decoration: none;
  border-color: #a5dff7;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.08);
}

.role-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--soft);
}

.role-card__title {
  margin: 14px 0 6px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.role-card__desc {
  margin: 0 0 14px;
  color: var(--muted);
}

.role-card__list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.role-card__list li {
  margin: 6px 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 10px 14px;
  color: #0369a1;
  background: #eff8ff;
  text-decoration: none;
  font-weight: 600;
}

.button-link:hover {
  text-decoration: none;
  background: #dff2ff;
}

.button-link--ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.button-link--ghost:hover {
  background: var(--soft);
}

.button-link--small {
  padding: 8px 12px;
  font-size: 13px;
}

.site-header--manual {
  padding-bottom: 14px;
}

.manual-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow eyebrow"
    "title switch"
    "lead switch";
  column-gap: 24px;
  row-gap: 6px;
}

.manual-header__top {
  grid-area: eyebrow;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.manual-header__top > .eyebrow {
  margin: 0;
}

.manual-header h1 {
  grid-area: title;
  margin-bottom: 0;
}

.manual-header__lead {
  grid-area: lead;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.manual-header__contact {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: var(--muted);
  font-size: 14px;
}

.manual-header__contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
  opacity: 0.7;
}

.manual-header__contact a {
  font-weight: 600;
}

.manual-switch {
  grid-area: switch;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  justify-self: end;
  align-self: center;
}

.manual-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.manual-switch__link--customer {
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.manual-switch__link--accountant {
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.manual-switch__link:hover {
  text-decoration: none;
  color: var(--text);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.manual-switch__link--customer:hover {
  color: var(--text);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.manual-switch__link--accountant:hover {
  color: var(--text);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.manual-switch__link[aria-current="page"] {
  font-weight: 700;
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #dff3ff 100%);
  color: #0c4a6e;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.12), 0 0 0 1px rgba(56, 189, 248, 0.16);
}

.manual-switch__link--customer[aria-current="page"] {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #dff3ff 100%);
  color: #0c4a6e;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.12), 0 0 0 1px rgba(56, 189, 248, 0.16);
}

.manual-switch__link--accountant[aria-current="page"] {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #dff3ff 100%);
  color: #0c4a6e;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.12), 0 0 0 1px rgba(56, 189, 248, 0.16);
}

.manual-switch__link[aria-current="page"]:hover {
  background: inherit;
}

.guide-page .sidenav-pricing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid #7dd3fc;
  border-radius: var(--radius);
  background: #f0f9ff;
  color: #075985;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.guide-page .sidenav-pricing:hover {
  border-color: #38bdf8;
  background: #e0f2fe;
  color: #0c4a6e;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
}

.guide-page .sidenav-pricing:focus-visible {
  outline: 3px solid #bae6fd;
  outline-offset: 3px;
}

.manual-redirect {
  margin-top: 32px;
}

.role-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.role-hero__content {
  min-width: 0;
  flex: 1 1 620px;
}

.role-hero__content h1 {
  margin-bottom: 8px;
}

.role-hero__meta {
  flex: 0 0 280px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(180deg, #f8fdff 0%, #ffffff 100%);
  padding: 16px;
}

.role-hero__meta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill-list span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.section-intro {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 78ch;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.gallery-grid figure {
  height: 100%;
}

.gallery-grid figure img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}

.guide-page .source-gallery details {
  margin-top: 12px;
}

.guide-page .source-gallery summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guide-page .source-gallery summary::after {
  content: 'Rozwiń';
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.guide-page .source-gallery details[open] summary::after {
  content: 'Zwiń';
}

.flow-marker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bfe3ff;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef7ff;
  color: #075985;
  font-size: 12px;
  font-weight: 600;
}

.flow-marker--warn {
  border-color: #ffd7a8;
  background: #fff7ed;
  color: #9a3412;
}

.checklist {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.checklist li {
  margin: 7px 0;
}

.compact-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.compact-list li {
  margin: 5px 0;
}

.caption-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .manual-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "lead"
      "switch";
  }

  .role-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .role-hero__meta {
    flex-basis: 100%;
  }

  .manual-switch {
    width: 100%;
    gap: 8px;
    justify-self: stretch;
  }

  .manual-switch__link {
    flex: 1 1 180px;
    justify-content: center;
    padding: 10px 14px;
  }

  .manual-header__contact {
    padding-left: 12px;
  }

  .site-footer__content {
    flex-direction: column;
    align-items: flex-start;
  }
}
