:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f7f6f2;
  font-size: 16px;
  line-height: 1.6;
  --ink: #253c72;
  --line: #d3d9e2;
  --orange: #b54423;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  margin: 0;
  border-left: 48px solid var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1160px, 88%);
  margin-inline: auto;
}

.edge-label {
  position: fixed;
  left: 13px;
  top: 55px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font: 10px monospace;
  letter-spacing: 2px;
  z-index: 5;
}

/* Nagłówek i nawigacja */
header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -1px;
}

.dot {
  color: var(--orange);
}

nav {
  display: flex;
  align-items: center;
  gap: 35px;
  font-size: 12px;
}

.small-button {
  border: 1px solid var(--ink);
  border-radius: 50%;
  padding: 16px 22px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* Wprowadzenie i przykład */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 65px;
  padding-block: 65px 55px;
  align-items: center;
}

.eyebrow {
  font: 10px/1.5 monospace;
  letter-spacing: 1.4px;
  margin: 0 0 25px;
  color: #54658b;
}

h1 {
  font: normal clamp(56px, 6.5vw, 94px)/1.05 Georgia, serif;
  letter-spacing: -5px;
  margin: 0 0 28px;
}

h1 em {
  font-weight: 400;
  color: var(--orange);
  white-space: nowrap;
}

.lead {
  max-width: 460px;
  font-size: 15px;
  color: #52617e;
  margin: 0 0 26px;
}

.button {
  font: inherit;
  font-size: 13px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 15px 23px;
  display: inline-flex;
  align-items: center;
  gap: 35px;
  cursor: pointer;
  border-radius: 3px 3px 14px 3px;
}

.button:hover {
  background: #354f8a;
}

.button:disabled {
  cursor: default;
  opacity: 0.65;
}

.button span {
  font-size: 23px;
}

.caption {
  font-size: 11px;
  color: #5e6a81;
  margin-top: 14px;
}

.note {
  position: relative;
  padding: 35px 0 15px 30px;
  border-left: 1px solid #e1a79a;
  background: repeating-linear-gradient(transparent, transparent 31px, #dce2eb 31px, #dce2eb 32px);
  transform: rotate(-4deg);
  margin-top: 30px;
}

.note::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 24px;
  background: #e6dcccaa;
  top: -12px;
  left: 35%;
  transform: rotate(9deg);
}

.note .eyebrow {
  font-size: 9px;
  margin-bottom: 20px;
}

.note h2 {
  font: italic 27px/1.2 Georgia, serif;
  letter-spacing: -0.7px;
  margin: 0 0 24px;
}

.note > p:not(.eyebrow) {
  font-size: 12px;
  max-width: 265px;
  line-height: 2.65;
}

.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.flow span {
  font: 11px monospace;
  border-bottom: 1px solid var(--ink);
}

.flow b {
  font-size: 22px;
  font-weight: 400;
}

.tag {
  font: italic 16px Georgia, serif;
  color: var(--orange);
  display: block;
  margin-top: 18px;
}

/* Formularz i podsumowanie */
.form-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 75px;
  padding-block: 60px 80px;
  border-top: 1px solid var(--line);
  position: relative;
}

.form-intro {
  position: sticky;
  top: 35px;
  align-self: start;
}

h2 {
  font: normal 42px/1.12 Georgia, serif;
  letter-spacing: -1.8px;
  margin: 0 0 25px;
}

.form-intro em {
  font-weight: 400;
  color: var(--orange);
}

.form-intro > p {
  font-size: 13px;
  color: #52617e;
  max-width: 240px;
}

.form-intro::after {
  content: 'Zacznij tutaj →';
  font: italic 24px Georgia, serif;
  display: block;
  transform: rotate(-8deg);
  color: var(--orange);
  margin-top: 40px;
}

.local-note {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 11px;
  max-width: 250px;
}

.local-note p {
  color: #5e6a81;
}

form {
  min-width: 0;
  padding: 8px 0 0 35px;
  border-left: 1px solid #e1a79a;
}

fieldset {
  border: 0;
  padding: 25px 0 5px;
  margin: 0 0 30px;
  min-width: 0;
}

legend {
  font: 10px monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  border-bottom: 1px solid var(--line);
  width: 100%;
  padding: 0 0 15px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

label span, legend span {
  font-size: 10px;
  font-weight: 400;
  color: #626d83;
}

input, textarea, select {
  width: 100%;
  min-width: 0;
  font: 14px/1.65 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #aab5c8;
  border-radius: 0;
  padding: 10px 8px;
  margin-bottom: 28px;
}

textarea {
  resize: none;
  overflow: hidden;
  background: repeating-linear-gradient(transparent, transparent 27px, #dce2eb 27px, #dce2eb 28px);
  line-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  background-origin: content-box;
}

input::placeholder, textarea::placeholder {
  color: #67738a;
  font-size: 12px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid #7b8db0;
  outline-offset: 4px;
  background-color: #fffefb;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

#result {
  margin-top: 30px;
  border: 1px solid var(--line);
  padding: 20px;
  background: #eeeff5;
}

#result h3 {
  font: 25px Georgia, serif;
}

#result p {
  font-size: 12px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.8 "Segoe UI", sans-serif;
}

#download {
  border-radius: 3px;
}

/* Instrukcja i zakończenie */
.guide {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 45px;
  background: #eaeef4;
}

.guide > .wrap {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 0 75px;
}

.guide .eyebrow {
  grid-column: 1;
}

.guide h2 {
  grid-column: 1;
  font-size: 31px;
}

.columns {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.columns article {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 20px;
  padding: 15px 0;
  border-bottom: 1px solid #cdd4e0;
}

.columns article:last-child {
  border: 0;
}

.columns article > span {
  font: 9px monospace;
  color: #596b8d;
  grid-row: span 2;
  padding-top: 5px;
}

.columns h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.columns p {
  font-size: 12px;
  color: #52617e;
  margin: 0;
}

.closing {
  padding-block: 50px;
}

.closing h2 {
  font-size: 30px;
}

.closing p {
  font-size: 13px;
  color: #52617e;
}

.closing a {
  font: italic 18px Georgia, serif;
  text-decoration: underline;
  text-underline-offset: 5px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 25px;
  border-top: 1px solid var(--line);
}

footer p {
  font: 9px monospace;
  letter-spacing: 1px;
}

/* Nawigacja klawiaturą */
.skip {
  position: absolute;
  top: -100px;
  left: 60px;
  padding: 10px;
  background: white;
  z-index: 10;
}

.skip:focus {
  top: 10px;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
}

/* Widoki responsywne */
@media (max-width: 1050px) {
  .hero {
    gap: 30px;
  }
  h1 {
    font-size: 64px;
    letter-spacing: -3px;
  }
  .note {
    padding-left: 20px;
  }
  .note h2 {
    font-size: 23px;
  }
  .form-layout {
    gap: 40px;
  }
  .guide > .wrap {
    gap: 0 40px;
  }
  .columns article {
    grid-template-columns: 1fr;
  }
  .columns article > span {
    grid-row: auto;
    margin-bottom: 6px;
  }
}

/* W tym zakresie nagłówek i obrócona notatka nie mieszczą się obok siebie. */
@media (min-width: 701px) and (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .note {
    width: 100%;
    max-width: 400px;
    justify-self: end;
  }
}

@media (max-width: 700px) {
  body {
    border-left-width: 12px;
  }
  .edge-label {
    display: none;
  }
  .wrap {
    width: 87%;
  }
  header {
    height: 85px;
  }
  .brand {
    font-size: 20px;
  }
  nav > a:first-child {
    display: none;
  }
  .small-button {
    font-size: 10px;
    padding: 12px 15px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-block: 40px 45px;
    gap: 28px;
  }
  h1 {
    font-size: clamp(42px, 10.4vw, 65px);
    letter-spacing: -2.5px;
  }
  h1 em {
    white-space: normal;
  }
  .eyebrow {
    font-size: 9px;
  }
  .lead {
    font-size: 14px;
  }
  .note {
    max-width: 400px;
    transform: rotate(-2deg);
    margin: 10px 8px 0;
    padding: 22px 18px 10px 25px;
  }
  .note h2 {
    font-size: 29px;
  }
  .note > p:not(.eyebrow) {
    max-width: none;
  }
  .form-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 40px;
  }
  .form-intro {
    position: static;
  }
  .form-intro > p, .local-note {
    max-width: none;
  }
  .form-intro::after {
    content: 'Zacznij tutaj ↓';
    font-size: 22px;
    margin: 25px 0 10px;
    transform: none;
  }
  h2 {
    font-size: 37px;
  }
  .local-note {
    margin-top: 20px;
  }
  form {
    padding-left: 16px;
  }
  .pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  fieldset {
    margin-bottom: 15px;
  }
  .guide > .wrap {
    display: block;
  }
  .columns article {
    grid-template-columns: 1fr;
  }
  .guide h2 {
    font-size: 30px;
  }
  .closing h2 {
    font-size: 28px;
  }
  footer {
    align-items: start;
    gap: 20px;
  }
  footer .brand {
    font-size: 17px;
  }
  footer p {
    font-size: 8px;
    max-width: 110px;
    text-align: right;
  }
  .button {
    gap: 20px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* Footer and legal information share the notebook palette. */
.site-footer { flex-wrap: wrap; gap: 28px; padding-block: 32px; border-top: 1px solid var(--line); }
.site-footer .copyright { max-width: none; text-align: left; font-size: 12px; margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 26px; font-size: 13px; }
.privacy-note { font-size: 12px; color: #626d83; margin: 0 0 24px; max-width: 65ch; }
.legal-page { max-width: 850px; padding-block: 40px 70px; overflow-wrap: anywhere; }
.legal-page h1 { font-size: clamp(36px, 7vw, 64px); }
.legal-page h2 { font-size: 25px; margin-top: 36px; }
.legal-page p { max-width: 72ch; }
.legal-draft { padding: 16px; border: 1px solid var(--orange); }
