/* Shared navigation and the homepage */
.site-header { border-bottom: 1px solid var(--line); }

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header .button-header {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
}

.site-header .button-header:hover {
  border-color: #0c2a60;
  background: #0c2a60;
}

.hero {
  border: 0;
  background: linear-gradient(115deg, #0a2456 0%, #123878 52%, #1c52ba 100%);
}

.hero::before {
  background:
    repeating-linear-gradient(112deg, transparent 0 44px, #cbdeff30 44px 45px, transparent 45px 89px),
    linear-gradient(112deg, transparent 54%, #ffffff09 54% 78%, transparent 78%);
  mask-image: linear-gradient(90deg, transparent 28%, black 76%);
}

.hero-layout {
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  gap: clamp(2rem, 4.4vw, 4.3rem);
  padding-block: clamp(3.15rem, 6.3vw, 5.7rem);
}

.hero-copy h1 {
  max-width: none;
  margin-top: clamp(1.05rem, 2vw, 1.45rem);
  font-size: clamp(2.85rem, 5.2vw, 5rem);
  letter-spacing: -.065em;
  line-height: .98;
}

.hero-copy .hero-word {
  font-size: 1.14em;
  letter-spacing: -.055em;
}

.hero-copy .hero-coda {
  margin-top: .04em;
  font-size: .79em;
  font-weight: 650;
  letter-spacing: -.05em;
}

.hero-lead { max-width: 42ch; }

.hero-visual {
  --corner-cut: clamp(1.35rem, 3.8vw, 3.4rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  inset: .72rem -.7rem -.72rem .7rem;
  background:
    repeating-linear-gradient(112deg, #aecaff66 0 1px, transparent 1px 7px),
    #5a83d280;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--corner-cut)), calc(100% - var(--corner-cut)) 100%, 0 100%);
  content: "";
}

.hero-visual picture {
  display: block;
  overflow: hidden;
  background: var(--blue-panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--corner-cut)), calc(100% - var(--corner-cut)) 100%, 0 100%);
}

.hero-visual img {
  aspect-ratio: 1.41;
  object-position: 47% 50%;
}

.quick-guide {
  border-bottom: 1px solid var(--line);
  background: #f6f9ff;
}

.quick-guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 0;
  padding: 0;
  list-style: none;
  border-inline: 1px solid var(--line);
}

.quick-guide-list li + li { border-inline-start: 1px solid var(--line); }

.quick-guide-list a {
  display: flex;
  min-height: 4.65rem;
  align-items: center;
  gap: .8rem;
  padding: .75rem clamp(.9rem, 2.4vw, 1.65rem);
  color: var(--blue-deep);
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.32;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.quick-guide-list a:hover { background: #e8f1ff; color: var(--ink); }
.quick-guide-list a:focus-visible { outline-offset: -4px; }

.quick-guide-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid #c5d8f4;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
}

.quick-guide-icon::before {
  width: .85rem;
  height: .72rem;
  border: 1.5px solid currentColor;
  border-radius: .08rem;
  content: "";
}

.quick-guide-icon-obligation::before {
  width: .78rem;
  height: .48rem;
  border-width: 0 0 2px 2px;
  border-radius: 0;
  transform: translateY(-.12rem) rotate(-45deg);
}

.quick-guide-icon-data::before {
  height: .93rem;
  background: repeating-linear-gradient(180deg, transparent 0 2px, currentColor 2px 3px);
  background-clip: content-box;
  padding: .05rem .12rem;
}

.quick-guide-icon-deadlines::before {
  border-top-width: 3px;
  border-radius: .12rem;
}

.services .section-header { max-width: 52rem; }
.services h2 { text-wrap: pretty; }
.services .section-header > p:last-child { max-width: 54ch; }

.services .service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .56rem;
  background: var(--line);
}

.services .service-card {
  display: flex;
  flex: 1 1 calc((100% - 1px) / 2);
  align-items: flex-start;
  gap: clamp(.85rem, 2vw, 1.5rem);
  border: 0;
  border-radius: 0;
}

.services .service-icon { margin-bottom: 0; flex: 0 0 auto; }
.services .service-card-copy { flex: 1; min-width: 0; }
.services .service-card h3 { font-size: clamp(1.25rem, 2.25vw, 1.85rem); }

.services .service-flow {
  margin: 0 0 .42rem;
  color: var(--blue);
  font-size: .88rem;
  font-weight: 800;
}

.services .service-card-dane {
  flex-basis: 100%;
  align-items: center;
  background: #f3f7ff;
}

.services .service-card-dane h3 { font-size: clamp(1.15rem, 1.8vw, 1.38rem); }
.services .service-card-dane p { margin-top: .3rem; }

.service-guide-link {
  flex: 0 0 auto;
  padding: .46rem 0;
  color: var(--blue-deep);
  font-size: .94rem;
  font-weight: 800;
  text-underline-offset: .22em;
}

.service-guide-link:hover { color: var(--blue); }

.process {
  border-block: 1px solid var(--line);
  background: linear-gradient(115deg, #edf4ff 0%, #f7faff 78%);
}

.process-layout { gap: clamp(2rem, 6vw, 6rem); align-items: center; }

.process-visual {
  aspect-ratio: 2.04;
  border-radius: .35rem;
  box-shadow: .55rem .55rem 0 #d8e7fd;
}

.process-steps {
  --step-gap: 1.05rem;
  --marker-size: 2.5rem;
  padding: clamp(1.2rem, 3.5vw, 2.65rem);
  border: 1px solid var(--line);
  border-radius: .62rem;
  background: var(--white);
  box-shadow: 0 .65rem 2rem #1036760b;
}

.process-steps li { padding-inline-start: 3.55rem; }
.process-steps li:last-child { padding-block-end: 0; border-bottom: 0; }
.process-steps p a { color: var(--blue); text-underline-offset: .2em; }

.faq-list { border: 1px solid var(--line); border-radius: .55rem; }
.faq-list details { border-bottom: 0; background: var(--white); }
.faq-list details + details { border-top: 1px solid var(--line); }
.faq-list details:first-child { border-radius: .52rem .52rem 0 0; }
.faq-list details:last-child { border-radius: 0 0 .52rem .52rem; }
.faq-list details[open] { background: #f3f7ff; }
.faq-list summary { padding: 1.12rem 3.15rem 1.12rem 1.15rem; }
.faq-list summary:hover { color: var(--blue); }
.faq-list summary:focus-visible { outline-offset: -4px; }
.faq-list summary::before, .faq-list summary::after { inset-inline-end: 1.25rem; color: var(--blue); }
.faq-list details p { padding-inline-start: 1.15rem; }

.guide-section { border-top: 1px solid var(--line); background: #f2f7ff; }

.guide-section .guide-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: .85rem;
}

.guide-section .guide-card {
  position: relative;
  border-radius: .48rem;
}

.guide-section .guide-card h3 a::after { position: absolute; inset: 0; content: ""; }
.guide-section .guide-card h3 a:focus-visible { outline-offset: 3px; }
.guide-section .guide-card-image { border-radius: .42rem .42rem 0 0; }
.guide-section .guide-card:first-child { grid-row: span 3; }
.guide-section .guide-card:first-child h3 { font-size: clamp(1.35rem, 2.65vw, 2.25rem); }
.guide-section .guide-card:first-child .guide-card-image { aspect-ratio: 1.7; }

.guide-section .guide-card:not(:first-child) {
  display: grid;
  grid-template-columns: minmax(6.2rem, 32%) minmax(0, 1fr);
}

.guide-section .guide-card:not(:first-child) .guide-card-image {
  min-height: 7.3rem;
  aspect-ratio: auto;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: .42rem 0 0 .42rem;
}

.guide-section .guide-card:not(:first-child) .guide-card-content { padding: clamp(.9rem, 1.6vw, 1.35rem); }
.guide-section .guide-card:not(:first-child) .eyebrow { margin-bottom: .46rem; }
.guide-section .guide-card:not(:first-child) h3 + p { margin-top: .42rem; }

.contact {
  background:
    repeating-linear-gradient(112deg, transparent 0 46px, #a4c5ff14 46px 47px, transparent 47px 95px),
    linear-gradient(113deg, #0a2456 7%, #1746a9 100%);
}

.contact-layout { align-items: center; }
.contact-card { border-color: #c6d8f5; border-radius: .55rem; background: var(--white); color: var(--ink); }
.contact-card :focus-visible { outline-color: var(--blue); }
.contact-card > p, .request-example > p { color: var(--muted); }
.contact-methods a, .request-example summary { color: var(--blue-deep); }
.request-example { border-top-color: var(--line); }

.missing-field {
  display: flex;
  align-items: baseline;
  gap: .48rem;
}

.missing-field::before {
  flex: 0 0 auto;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: #a52a47;
  content: "";
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hero-visual img, .guide-section .guide-card-image img {
    transition: transform .5s cubic-bezier(.2, .65, .25, 1);
  }

  .hero-visual:hover img, .guide-section .guide-card:hover .guide-card-image img {
    transform: scale(1.045);
  }
}

@media (max-width: 985px) {
  .hero-layout { gap: 1.7rem; }
  .hero-copy h1 { font-size: clamp(2.65rem, 5.6vw, 4.2rem); }
  .hero-visual img { aspect-ratio: 1.06; object-position: 44% 50%; }
  .guide-section .guide-card:not(:first-child) { grid-template-columns: minmax(5.25rem, 29%) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .hero-layout { grid-template-columns: 1fr; gap: 1.8rem; padding-block: 2.6rem 2.7rem; }
  .hero-copy h1 { font-size: clamp(2.75rem, 9.2vw, 4.55rem); }
  .hero-lead { margin-top: 1.15rem; }
  .hero-visual { margin-inline-end: .4rem; }
  .hero-visual img { aspect-ratio: 1.6; object-position: 47% 52%; }
  .hero-visual::before { inset: .42rem -.42rem -.42rem .42rem; }
  .hero-actions { margin-top: 1.25rem; }
  .quick-guide-list { width: 100%; }
  .quick-guide-list a { gap: .59rem; min-height: 4.2rem; }
  .services .service-card { flex-basis: 100%; }
  .services .service-card-dane { flex-wrap: wrap; }
  .services .service-card-dane .service-card-copy { flex: 1 1 calc(100% - 4.5rem); }
  .service-guide-link { margin-inline-start: 3.7rem; }
  .guide-section .guide-grid { grid-template-columns: 1fr; }
  .guide-section .guide-card:first-child { grid-row: auto; }
}

@media (max-width: 475px) {
  .quick-guide-list a { flex-direction: column; justify-content: center; gap: .42rem; padding: .78rem .35rem; text-align: center; font-size: .875rem; }
  .quick-guide-icon { width: 1.85rem; height: 1.85rem; }
  .hero-actions .button { flex: 1 1 100%; }
  .services .service-card { padding: 1.13rem; }
  .process-steps li { padding-inline-start: 3.25rem; }
  .guide-section .guide-card:not(:first-child) { grid-template-columns: minmax(5.9rem, 34%) minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .guide-section .guide-card:not(:first-child) { grid-template-columns: 1fr; }

  .guide-section .guide-card:not(:first-child) .guide-card-image {
    min-height: 0;
    aspect-ratio: 2.08;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: .42rem .42rem 0 0;
  }

  .guide-section .guide-card:not(:first-child) .guide-card-content { padding: 1.15rem; }
}

/* Guide hub, individual articles, and the not-found page. */
.guide-hero {
  padding-block: clamp(1.4rem, 3.3vw, 3rem) clamp(1.9rem, 4.4vw, 3.9rem);
  border-bottom: 1px solid var(--blue-border);
  background:
    radial-gradient(ellipse at 95% 3%, #5686d745, transparent 57%),
    linear-gradient(118deg, #082758 5%, #184ba9 100%);
}

.guide-hero::before {
  background: repeating-linear-gradient(118deg, transparent 0 58px, #d6e7ff23 58px 59px, transparent 59px 116px);
  mask-image: linear-gradient(90deg, transparent 32%, black 98%);
}

.guide-hero:has(.guide-hero-grid) {
  padding-block-end: clamp(2.3rem, 5.6vw, 5.2rem);
}

.guide-hero:not(:has(.guide-hero-grid)) .eyebrow { display: none; }

.guide-hero .breadcrumb {
  margin-bottom: clamp(1.35rem, 2.8vw, 2.4rem);
  color: var(--on-blue-muted);
}

.guide-hero .breadcrumb a {
  text-decoration-color: #c4dafa9c;
  text-underline-offset: .2em;
}

.guide-hero .breadcrumb a:hover { color: white; text-decoration-color: white; }
.guide-hero .breadcrumb [aria-current="page"] { color: white; }
.guide-hero .breadcrumb li + li::before { background: #aec7ec; }

.guide-hero h1 {
  max-width: 23ch;
  font-size: clamp(2.2rem, 5.1vw, 4.75rem);
  text-wrap: balance;
}

.guide-hero .guide-intro {
  max-width: 58ch;
  margin-top: clamp(.8rem, 1.8vw, 1.25rem);
  line-height: 1.63;
}

.guide-hero-grid {
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: clamp(1.65rem, 5.2vw, 5.4rem);
}

.guide-hero-grid h1 { max-width: 12ch; font-size: clamp(2.75rem, 6vw, 5.55rem); }

.guide-hero-grid .guide-visual {
  border: 1px solid #dceafe87;
  border-radius: .85rem;
  box-shadow: 0 1.7rem 4rem #03143059;
}

section[aria-labelledby="guide-topics"] {
  padding-block: clamp(2.5rem, 5.5vw, 5rem);
  background: linear-gradient(180deg, var(--blue-soft), white 92%);
}

section[aria-labelledby="guide-topics"] .section-header h2 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.08;
}

section[aria-labelledby="guide-topics"] .guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.85rem, 1.7vw, 1.5rem);
}

section[aria-labelledby="guide-topics"] .guide-card-with-image {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
  min-height: 12rem;
  overflow: hidden;
  border-radius: .9rem;
  box-shadow: 0 .85rem 2rem #0a2a5c0a;
}

section[aria-labelledby="guide-topics"] .guide-card-with-image:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

section[aria-labelledby="guide-topics"] .guide-card-image {
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
}

section[aria-labelledby="guide-topics"] .guide-card-content {
  align-self: center;
  padding: clamp(1.05rem, 2.25vw, 1.8rem);
}

section[aria-labelledby="guide-topics"] .guide-card h3 {
  font-size: clamp(1.14rem, 1.8vw, 1.52rem);
  line-height: 1.22;
}

section[aria-labelledby="guide-topics"] .guide-card h3 a { text-decoration-color: #6c91cf; }
section[aria-labelledby="guide-topics"] .guide-card h3 a:hover { text-decoration-color: currentColor; }

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  section[aria-labelledby="guide-topics"] .guide-card-image img { transition: transform .3s ease; }
  section[aria-labelledby="guide-topics"] .guide-card:hover .guide-card-image img { transform: scale(1.035); }
}

.article-layout {
  grid-template-columns: minmax(0, 49rem) minmax(14rem, 20rem);
  justify-content: space-between;
  gap: clamp(2.2rem, 6.3vw, 6rem);
  padding-block: clamp(2.2rem, 5.4vw, 5rem);
}

.article-body { color: var(--muted); }

.article-body > h2 {
  margin-top: 1.55em;
  padding-top: .63em;
  border-top: 1px solid var(--line);
  line-height: 1.18;
  scroll-margin-block-start: clamp(1.25rem, 8vw, 6.5rem);
}

.article-body .article-lead {
  padding: clamp(.9rem, 2.7vw, 1.45rem) clamp(1rem, 3vw, 1.7rem);
  border-inline-start: 4px solid var(--blue);
  border-radius: 0 .65rem .65rem 0;
  background: var(--blue-soft);
  line-height: 1.65;
}

.article-aside {
  top: 5.5rem;
  padding: clamp(1.05rem, 2.2vw, 1.65rem);
  border-top: 1px solid var(--line);
  border-radius: .85rem;
  background: white;
  box-shadow: 0 .9rem 2.7rem #0a2a5c0c;
}

.article-aside ol { margin-top: .75rem; padding-inline-start: 1.45rem; }
.article-aside li { padding-block: .56rem; padding-inline-start: .2rem; border-top: 1px solid var(--line); }
.article-aside li + li { margin-top: 0; }
.article-aside li::marker { color: var(--blue); font-weight: 800; font-variant-numeric: tabular-nums; }
.article-aside a:not(.button) { line-height: 1.43; text-decoration-color: #6389c5; }

.article-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem 1.2rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: .8rem;
  background: linear-gradient(116deg, #082758, #184ba9);
}

.article-contact p { color: white; }
.article-contact .button {
  flex: 0 1 auto;
  margin-top: 0;
  color: var(--ink);
  background: white;
  text-decoration: none;
}

.article-contact .button:hover { color: var(--blue); background: var(--blue-soft); }
.article-contact :focus-visible { outline-color: white; }
.article-review { color: var(--muted); }

.article-table { border-radius: .75rem; }
.article-table thead { background: var(--blue-soft); }
.article-table tbody tr + tr { background: #f8fbff; }
.article-table :is(td, thead th:not(:first-child)) { text-align: end; }

.related-guides { background: linear-gradient(180deg, var(--blue-soft), #f8fbff); }
.related-guides .guide-grid { max-width: 52rem; }
.related-guides .guide-card { border-radius: .82rem; }

body:has(.not-found-title) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main:has(.not-found-title) {
  display: grid;
  align-content: center;
  flex-grow: 1;
  min-height: min(36rem, 72vh);
  background: var(--blue-soft);
}

main:has(.not-found-title) > .wrap {
  padding: clamp(1.4rem, 6vw, 5.7rem);
  border: 1px solid #2a5293;
  border-radius: 1rem;
  color: white;
  background:
    repeating-linear-gradient(118deg, transparent 0 69px, #d6e7ff14 69px 70px, transparent 70px 138px) right / 40% 100% no-repeat,
    linear-gradient(118deg, #082758, #184ba9);
  box-shadow: 0 1.35rem 3rem #0a2b6026;
}

main:has(.not-found-title) .eyebrow, .not-found-copy { color: var(--on-blue-muted); }
.not-found-title { max-width: 20ch; font-size: clamp(2.2rem, 5.8vw, 4.8rem); }
.not-found-copy { max-width: 49ch; font-size: 1.0625rem; }
.not-found-actions { margin-top: 1.3rem; }
.not-found-actions .button { border-color: #c2d7f3; color: white; }
.not-found-actions .button:first-child { border-color: white; color: var(--ink); background: white; }
.not-found-actions .button:hover { border-color: white; color: var(--ink); background: var(--blue-soft); }
.not-found-actions :focus-visible { outline-color: white; }

@media (max-width: 1050px) {
  section[aria-labelledby="guide-topics"] .guide-card-with-image {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  section[aria-labelledby="guide-topics"] .guide-card-image {
    height: auto;
    aspect-ratio: 2 / 1;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
  .article-aside { top: auto; }
  .article-contact { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  .guide-hero-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 530px) {
  section[aria-labelledby="guide-topics"] .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-hero .breadcrumb { margin-bottom: 1.2rem; }
  .guide-hero h1 { font-size: clamp(2rem, 8.2vw, 2.75rem); }
  .guide-hero-grid h1 { font-size: clamp(2.35rem, 11vw, 3.35rem); }
  .article-table table { min-width: 16.5rem; table-layout: fixed; font-size: .9rem; }
  .article-table thead th:first-child { width: 26%; }
  .article-table th { letter-spacing: -.02em; }
  .article-table th, .article-table td { padding-inline: .31rem; }
  .article-table td { white-space: normal; }
}
