.obc-hub,
.obc-checklist {
  --obc-ink: #19364a;
  --obc-muted: #526b7c;
  --obc-accent: #12617c;
  --obc-accent-dark: #0d485d;
  --obc-border: #d4e1e7;
  --obc-soft: #eff7f9;
  --obc-warm: #fff8e9;
  --obc-error: #904335;
  color: var(--obc-ink);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 auto 3rem;
  max-width: 1140px;
  padding: 0 1rem;
}

.obc-hub *,
.obc-checklist * {
  box-sizing: border-box;
}

.obc-hub :is(h1, h2, h3, h4),
.obc-checklist :is(h1, h2, h3, h4) {
  color: var(--obc-ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.obc-hub a,
.obc-checklist a {
  color: var(--obc-accent-dark);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.obc-hub a:hover,
.obc-checklist a:hover {
  color: #083344;
}

.obc-hub :is(a, button, input, summary):focus-visible,
.obc-checklist :is(a, button, input, textarea, select):focus-visible {
  outline: 3px solid #dd903b;
  outline-offset: 3px;
}

.obc-hub [hidden],
.obc-checklist [hidden] {
  display: none !important;
}

/* Katalog: dostępne w HTML drzewo, wyszukiwarka i ścieżki inwestycji. */
.obc-hub {
  padding-top: .75rem;
}

.obc-hub-tools {
  background: var(--obc-soft);
  border: 1px solid var(--obc-border);
  border-radius: .7rem;
  margin: 1rem 0 1.35rem;
  padding: 1rem 1.2rem;
}

.obc-hub-tools > label {
  display: block;
  font-weight: 700;
}

.obc-hub [data-obc-hub-search] {
  appearance: none;
  background: #fff;
  border: 1px solid #9fbac6;
  border-radius: .55rem;
  box-shadow: 0 1px 3px rgb(15 58 79 / 8%);
  color: var(--obc-ink);
  display: block;
  font: inherit;
  margin: .5rem 0 1.1rem;
  max-width: 38rem;
  min-height: 2.8rem;
  padding: .55rem .8rem;
  width: 100%;
}

.obc-hub [data-obc-hub-search]::placeholder {
  color: #647d89;
  opacity: 1;
}

.obc-hub [data-obc-audience] {
  background: #fff;
  border: 1px solid var(--obc-border);
  border-radius: 2rem;
  color: var(--obc-accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  margin: .2rem .3rem .2rem 0;
  min-height: 2.55rem;
  padding: .45rem .85rem;
}

.obc-hub [data-obc-audience]:hover,
.obc-hub [data-obc-audience].is-active,
.obc-hub [data-obc-audience][aria-pressed='true'] {
  background: var(--obc-accent-dark);
  border-color: var(--obc-accent-dark);
  color: #fff;
}

.obc-hub [data-obc-hub-count] {
  color: var(--obc-muted);
  font-size: .9rem;
  margin: .8rem 0 1.1rem;
}

.obc-stage-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.25rem;
}

.obc-stage-links a {
  background: #fff;
  border: 1px solid var(--obc-border);
  border-radius: 2rem;
  font-size: .88rem;
  font-weight: 600;
  padding: .35rem .7rem;
  text-decoration: none;
}

.obc-stage-links a:hover {
  background: var(--obc-soft);
}

.obc-stage {
  border-top: 2px solid var(--obc-border);
  margin: 1.4rem 0 2rem;
  padding-top: .45rem;
  scroll-margin-top: 2rem;
}

.obc-stage > h2 {
  font-size: 1.35rem;
  margin: .55rem 0 .4rem;
}

.obc-stage > p {
  color: var(--obc-muted);
  margin: .25rem 0 .8rem;
}

.obc-hub details {
  background: #fff;
  border: 1px solid var(--obc-border);
  border-radius: .7rem;
  margin: .7rem 0;
  overflow: clip;
}

.obc-hub details details {
  border-color: #e2ebee;
  border-radius: .5rem;
  margin: .5rem 0;
}

.obc-hub summary {
  background: var(--obc-soft);
  color: var(--obc-ink);
  cursor: pointer;
  font-size: 1.07rem;
  font-weight: 700;
  line-height: 1.4;
  padding: .85rem 1rem;
}

.obc-hub details details > summary {
  background: #f8fbfc;
  font-size: .98rem;
  padding: .68rem .85rem;
}

.obc-hub summary:hover {
  background: #e2f1f5;
}

.obc-hub details > :not(summary) {
  margin-left: .85rem;
  margin-right: .85rem;
}

.obc-hub-list {
  list-style: none;
  padding: .25rem 0 .55rem;
}

.obc-hub [data-obc-hub-entry] {
  border-bottom: 1px solid #e8eef1;
  display: list-item;
  line-height: 1.4;
  padding: .65rem .35rem;
}

.obc-hub [data-obc-hub-entry]:last-child {
  border-bottom: 0;
}

.obc-hub [data-obc-hub-entry] a {
  font-weight: 600;
}

.obc-hub [data-obc-hub-entry] p {
  color: var(--obc-muted);
  font-size: .9rem;
  margin: .2rem 0 0;
}

.obc-hub-empty {
  background: var(--obc-warm);
  border: 1px solid #eedcaa;
  border-radius: .5rem;
  color: #584627;
  margin: 1.2rem 0;
  padding: .9rem 1rem;
}

/* Formularz: czytelne pomiary i odpowiedzi na małym ekranie. */
.obc-checklist [data-obc-notice] {
  background: var(--obc-soft);
  border-left: 4px solid var(--obc-accent);
  color: var(--obc-muted);
  font-size: .9rem;
  margin: 1rem 0;
  padding: .65rem .8rem;
}

.obc-checklist [data-obc-progress],
.obc-checklist [data-obc-report] {
  background: #f5f9fa;
  border: 1px solid var(--obc-border);
  border-radius: .5rem;
  color: var(--obc-ink);
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.45;
  margin: .6rem 0;
  padding: .7rem .9rem;
}

.obc-checklist [data-obc-item] {
  background: #fff;
  border: 1px solid var(--obc-border);
  border-left: 4px solid var(--obc-accent);
  border-radius: .45rem;
  margin: 1rem 0;
  overflow-wrap: anywhere;
  padding: 1rem 1.1rem;
}

.obc-checklist [data-obc-item] :is(h2, h3, h4, h5) {
  font-size: 1.04rem;
  margin: .2rem 0 .55rem;
}

.obc-checklist [data-obc-item] p {
  margin: .4rem 0 .7rem;
}

.obc-checklist [data-obc-item] :is(ul, ol) {
  margin: .45rem 0 .8rem;
  padding-left: 1.45rem;
}

.obc-item-checks {
  background: #f2f8fa;
  border: 1px solid #d7e6ec;
  border-radius: .4rem;
  list-style: none;
  margin: .8rem 0 !important;
  padding: .55rem .8rem !important;
}

.obc-checklist [data-obc-item] .obc-item-checks ul {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
}

.obc-item-checks li {
  margin: .35rem 0;
}

.obc-checklist [data-obc-item] .obc-check-label {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  font-size: .94rem;
  font-weight: 500;
  gap: .65rem;
  line-height: 1.45;
  margin: .35rem 0;
}

.obc-checklist .obc-check-label [data-obc-check] {
  accent-color: var(--obc-accent-dark);
  flex: none;
  height: 1.25rem;
  margin: .07rem 0 0;
  width: 1.25rem;
}

.obc-checklist .obc-check-label span {
  min-width: 0;
}

.obc-checklist [data-obc-item] small,
.obc-checklist .obc-reference {
  color: var(--obc-muted);
  display: inline-block;
  font-size: .81rem;
  line-height: 1.4;
}

.obc-checklist [data-obc-item] label {
  color: var(--obc-ink);
  display: block;
  font-size: .92rem;
  font-weight: 600;
  margin: .65rem 0 .3rem;
}

.obc-item-fields {
  display: grid;
  gap: .15rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.obc-item-fields.obc-no-measure {
  grid-template-columns: minmax(0, 1fr);
}

.obc-no-measure [data-obc-status] {
  max-width: 27rem;
}

.obc-item-fields .obc-full {
  grid-column: 1 / -1;
}

.obc-checklist :is([data-obc-status], [data-obc-measure], [data-obc-note]) {
  background: #f7fbfd;
  border: 1px solid #a8c2ce;
  border-radius: .38rem;
  color: #183144;
  display: block;
  font: inherit;
  font-size: .94rem;
  line-height: 1.45;
  margin: .3rem 0;
  max-width: 100%;
  min-height: 2.45rem;
  padding: .48rem .65rem;
  width: 100%;
}

.obc-checklist [data-obc-note] {
  min-height: 9rem;
  resize: vertical;
}

.obc-checklist [data-obc-print],
.obc-checklist [data-obc-clear] {
  background: var(--obc-accent-dark);
  border: 1px solid var(--obc-accent-dark);
  border-radius: .42rem;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.35;
  margin: .3rem .35rem .3rem 0;
  min-height: 2.6rem;
  padding: .55rem .85rem;
  text-align: center;
  text-decoration: none;
}

.obc-checklist [data-obc-print]:hover {
  background: #07384d;
}

.obc-checklist [data-obc-clear] {
  background: #fff;
  border-color: #9db4c0;
  color: var(--obc-accent-dark);
}

.obc-checklist [data-obc-clear]:hover {
  background: var(--obc-soft);
}

.obc-checklist [data-obc-legal-footer] {
  border-top: 1px solid var(--obc-border);
  color: var(--obc-muted);
  font-size: .77rem;
  line-height: 1.4;
  margin: 2rem 0 .7rem;
  padding-top: .7rem;
}

.obc-checklist .obc-tips {
  background: #f2f7fa;
  border-left: 3px solid #82a8b8;
  color: var(--obc-ink);
  line-height: 1.55;
  margin: .6rem 0 .8rem;
  padding: .55rem .8rem;
}

.obc-checklist .obc-old-records {
  background: #fff8e9;
  border: 1px solid #e2c78e;
  border-radius: .4rem;
  margin: .8rem 0 1rem;
  padding: .55rem .8rem;
}

.obc-checklist .obc-old-records summary {
  cursor: pointer;
  font-weight: 700;
}

.obc-checklist .obc-old-records section {
  border-top: 1px solid #e4d5b6;
  margin-top: .6rem;
  padding-top: .5rem;
}

.obc-checklist .obc-old-records h3 {
  font-size: .95rem;
  margin: 0;
}

.obc-checklist .obc-old-records p {
  margin: .3rem 0;
  white-space: pre-wrap;
}

.obc-checklist .obc-print-retry {
  background: var(--obc-soft);
  border: 1px solid var(--obc-border);
  border-radius: .5rem;
  padding: .8rem 1rem;
}

.obc-checklist .obc-print-retry button {
  display: block;
  margin-top: .5rem;
}

.obc-print-value,
.obc-print-meta,
.obc-print-empty,
.obc-print-brand {
  display: none;
}

@media (min-width: 760px) {
  .obc-checklist [data-obc-item] {
    padding: 1.1rem 1.35rem;
  }

  .obc-checklist [data-obc-measure] {
    max-width: 23rem;
  }
}

@media screen and (max-width: 760px) {
  /* Wąska kolumna motywu i domyślne wcięcie <ol> zostawiały mało miejsca na tekst. */
  .obc-checklist .obc-items {
    counter-reset: obc-mobile-item;
    list-style: none;
    margin: .65rem 0 1rem;
    padding: 0;
  }

  .obc-checklist .obc-items > [data-obc-item] {
    counter-increment: obc-mobile-item;
  }

  .obc-checklist .obc-items > [data-obc-item] .obc-item-head h2::before {
    color: var(--obc-accent-dark);
    content: counter(obc-mobile-item) ". ";
    font-weight: 700;
  }
}

@media screen and (max-width: 560px) {
  .obc-hub,
  .obc-checklist {
    margin-bottom: 1.5rem;
    min-width: 0;
    padding: 0 .35rem;
    width: 100%;
  }

  .obc-hub-tools,
  .obc-checklist [data-obc-progress],
  .obc-checklist [data-obc-report] {
    margin: .55rem 0;
    padding: .65rem .7rem;
  }

  .obc-hub details > :not(summary) {
    margin-left: .5rem;
    margin-right: .5rem;
  }

  .obc-hub details details > :not(summary) {
    margin-left: .35rem;
    margin-right: .35rem;
  }

  .obc-hub summary {
    font-size: 1rem;
    min-height: 2.75rem;
    padding: .65rem .7rem;
  }

  .obc-hub details details > summary {
    padding: .6rem .65rem;
  }

  .obc-hub [data-obc-hub-entry] {
    padding: .55rem .2rem;
  }

  .obc-hub .obc-stage-links a {
    align-items: center;
    display: inline-flex;
    min-height: 2.75rem;
  }

  .obc-checklist [data-obc-notice] {
    margin: .6rem 0;
    padding: .55rem .7rem;
  }

  .obc-checklist [data-obc-item] {
    margin: .65rem 0;
    padding: .7rem .65rem;
  }

  .obc-checklist [data-obc-item] :is(h2, h3, h4, h5) {
    margin: .1rem 0 .4rem;
  }

  .obc-checklist [data-obc-item] p {
    margin: .3rem 0 .55rem;
  }

  .obc-checklist .obc-tips {
    padding: .5rem .6rem;
  }

  .obc-checklist .obc-item-checks {
    margin: .5rem 0 !important;
    padding: .45rem .55rem !important;
  }

  .obc-checklist [data-obc-item] .obc-item-checks ul {
    margin-top: .15rem;
  }

  .obc-item-checks li {
    margin: 0;
  }

  .obc-checklist [data-obc-item] .obc-check-label {
    gap: .5rem;
    line-height: 1.35;
    margin: 0;
    min-height: 2.75rem;
    padding: .3rem 0;
  }

  .obc-checklist [data-obc-item] label {
    margin: .45rem 0 .2rem;
  }

  .obc-item-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .obc-item-fields > label {
    min-width: 0;
  }

  .obc-checklist :is([data-obc-status], [data-obc-measure], [data-obc-note]) {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .obc-checklist [data-obc-note] {
    min-height: 9rem;
  }

  .obc-checklist .obc-actions {
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr);
    margin: .6rem 0;
  }

  .obc-checklist [data-obc-print],
  .obc-checklist [data-obc-clear] {
    margin: 0;
    min-height: 2.75rem;
    width: 100%;
  }

  .obc-checklist [data-obc-legal-footer] {
    margin-top: 1.2rem;
  }
}

/* Wydruk do PDF korzysta z funkcji drukowania przeglądarki. */
.obc-checklist .obc-related {
  background: #f1f7f6;
  border: 1px solid #d5e6e1;
  border-radius: 8px;
  margin: 2rem 0 1rem;
  padding: 1rem 1.25rem;
}

.obc-checklist .obc-related h2 {
  font-size: 1.1rem;
  margin: 0 0 .5rem;
}

.obc-checklist .obc-related ul {
  margin: 0;
  padding-left: 1.25rem;
}

.obc-checklist .obc-back-bottom {
  margin: 0 0 1rem;
}

@media screen and (max-width: 560px) {
  .obc-checklist .obc-related {
    margin: 1rem 0;
    padding: .75rem .8rem;
  }
}

@page {
  size: A4;
  /* Wewnątrz marginesu mieszczą się nagłówek i zastrzeżenie prawne. */
  margin: 21mm 12mm 28mm;
}

@media print {
  html:has(body.obc-print-active),
  body.obc-print-active {
    background: #fff !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.5pt !important;
    line-height: 1.34 !important;
  }

  body.obc-print-active .obc-print-ancestor > :not(.obc-print-ancestor):not(.obc-print-target),
  body.obc-print-active.obc-print-ancestor > :not(.obc-print-ancestor):not(.obc-print-target) {
    display: none !important;
  }

  body.obc-print-active .obc-print-ancestor,
  body.obc-print-active .obc-print-target {
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #111 !important;
    display: block !important;
    float: none !important;
    height: auto !important;
    margin: 0 !important;
    max-height: none !important;
    max-width: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
    filter: none !important;
    contain: none !important;
    width: auto !important;
  }

  body.obc-print-active .obc-print-target {
    font-size: 9.5pt !important;
    line-height: 1.34 !important;
  }

  body.obc-print-active .obc-print-target :is(h1, h2, h3, h4) {
    color: #111 !important;
    line-height: 1.15 !important;
    margin: .5em 0 .25em !important;
  }

  body.obc-print-active .obc-print-target h1 {
    font-size: 15pt !important;
  }

  body.obc-print-active .obc-print-target :is(h2, h3, h4) {
    font-size: 10pt !important;
  }

  body.obc-print-active .obc-print-target p,
  body.obc-print-active .obc-print-target li {
    margin-top: .2em !important;
    margin-bottom: .32em !important;
  }

  body.obc-print-active .obc-print-target :is(ul, ol) {
    margin-top: .25em !important;
    margin-bottom: .45em !important;
    padding-left: 1.2em !important;
  }

  body.obc-print-active .obc-print-target [data-obc-item] {
    background: #fff !important;
    border: 1px solid #888 !important;
    border-radius: 0 !important;
    break-inside: avoid-page;
    margin: 0 0 2.5mm !important;
    padding: 2mm 2.5mm !important;
    page-break-inside: avoid;
  }

  body.obc-print-filled .obc-print-target [data-obc-item],
  body.obc-print-issues .obc-print-target [data-obc-item] {
    break-inside: auto;
    page-break-inside: auto;
  }

  body.obc-print-active .obc-print-target [data-obc-item] small,
  body.obc-print-active .obc-print-target .obc-reference {
    color: #333 !important;
    font-size: 8pt !important;
    line-height: 1.25 !important;
  }

  body.obc-print-active .obc-print-target [data-obc-progress],
  body.obc-print-active .obc-print-target [data-obc-report] {
    background: #fff !important;
    border: 0 !important;
    font-size: 8.5pt !important;
    margin: .2em 0 !important;
    padding: 0 !important;
  }

  body.obc-print-blank .obc-print-target :is([data-obc-progress], [data-obc-report]) {
    display: none !important;
  }

  body.obc-print-active .obc-print-target :is([data-obc-status], [data-obc-measure], [data-obc-note]),
  body.obc-print-active .obc-print-target label:has(> :is([data-obc-status], [data-obc-measure], [data-obc-note])),
  body.obc-print-active .obc-print-target :is(button, .obc-print-retry, .obc-old-records, [data-obc-notice], .obc-item-fields, .obc-item-checks, .obc-intro-note, .obc-back, .obc-related, .obc-legal-long) {
    display: none !important;
  }

  body.obc-print-active .obc-print-target .obc-print-value {
    border-top: 1px dashed #aaa;
    color: #111;
    display: block !important;
    font-size: 8.35pt;
    line-height: 1.3;
    margin-top: 1.4mm;
    overflow-wrap: anywhere;
    padding-top: 1mm;
    white-space: pre-wrap;
  }

  body.obc-print-active .obc-print-target .obc-print-notes {
    box-sizing: border-box;
    margin-top: 1.4mm;
    width: 100%;
  }

  body.obc-print-active .obc-print-target .obc-print-notes strong {
    display: block;
    font-weight: normal;
  }

  body.obc-print-active .obc-print-target .obc-print-note-line {
    border-bottom: .5pt solid #bcbcbc;
    box-sizing: border-box;
    display: block;
    height: 6mm;
    width: 100%;
  }

  body.obc-print-active .obc-print-target .obc-print-meta,
  body.obc-print-active .obc-print-target .obc-print-empty {
    display: block !important;
    font-size: 8pt;
    margin: 0 0 3mm !important;
  }

  body.obc-print-active .obc-print-target .obc-print-meta {
    border-bottom: 1px solid #999;
    color: #333;
    padding: 0 0 1.5mm;
  }

  body.obc-print-issues .obc-print-target .obc-print-exclude {
    display: none !important;
  }

  body.obc-print-active .obc-print-target [data-obc-legal-footer] {
    background: #fff !important;
    border-top: .5pt solid #aaa !important;
    bottom: -18mm;
    color: #555 !important;
    display: block !important;
    font-size: 7pt !important;
    left: 0;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 1.5mm 0 0 !important;
    position: fixed !important;
    right: 0;
    width: 100%;
  }

  /* Chromium od wersji 131 drukuje znaki i numerację w marginesach @page. */
  body.obc-print-active .obc-print-target.obc-print-margin-boxes [data-obc-legal-footer],
  body.obc-print-active .obc-print-target.obc-print-margin-boxes .obc-print-brand {
    display: none !important;
  }

  /* CDN logo may not permit canvas export; print its normal image in the
     reserved header margin while the @page boxes keep the URL and page count. */
  body.obc-print-active .obc-print-target.obc-print-margin-boxes.obc-print-external-logo .obc-print-brand {
    border: 0;
    display: flex !important;
    right: auto;
    width: 42mm;
  }

  body.obc-print-active .obc-print-target.obc-print-external-logo .obc-print-brand span {
    display: none !important;
  }

  body.obc-print-active .obc-print-target .obc-print-brand {
    align-items: center;
    border-bottom: .5pt solid #aaa;
    color: #444;
    display: flex !important;
    font-size: 8pt;
    height: 8mm;
    justify-content: space-between;
    left: 0;
    padding: 0 0 1mm;
    position: fixed !important;
    right: 0;
    top: -11mm;
    width: 100%;
  }

  body.obc-print-active .obc-print-target .obc-print-brand > :first-child {
    color: #111;
    font-size: 9pt;
    font-weight: bold;
  }

  body.obc-print-active .obc-print-target .obc-print-logo {
    height: auto;
    max-height: 7mm;
    max-width: 42mm;
    width: auto;
  }

  body.obc-print-active .obc-print-target a {
    color: #111 !important;
    text-decoration: none !important;
  }
}
