:root {
  --rose-clay: #8d6f68;
  --sage-dark: #4d5a49;
  --graphite: #343833;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(135deg, rgba(141, 111, 104, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(77, 90, 73, 0.08), transparent 38%),
    var(--paper);
}

a {
  text-underline-offset: 0.2em;
}

p,
li,
td,
th,
a,
h1,
h2,
.formal-footer-meta span {
  overflow-wrap: anywhere;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(221, 214, 202, 0.82);
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(16px);
}

header nav {
  align-items: center;
}

header nav a:first-child {
  border-bottom: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

header nav a:not(:first-child) {
  border-bottom: 0;
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 740;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

main {
  padding: clamp(48px, 7vw, 88px) 0 clamp(68px, 8vw, 110px);
}

article.wrap {
  position: relative;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(221, 214, 202, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.82);
  box-shadow: 0 28px 80px rgba(32, 35, 31, 0.06);
}

article.wrap::before {
  content: "Dokument";
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--sage);
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
}

h2 {
  padding-top: 12px;
  border-top: 1px solid rgba(221, 214, 202, 0.78);
}

.lead:first-child {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 11px;
  border: 1px solid rgba(77, 90, 73, 0.18);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(77, 90, 73, 0.06);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lead + h1 {
  margin-top: 0;
}

.lead:nth-of-type(3),
.lead:nth-of-type(2):last-child {
  margin-top: 22px;
  padding: 17px 19px;
  border: 1px solid rgba(141, 111, 104, 0.28);
  border-left: 3px solid rgba(141, 111, 104, 0.72);
  border-radius: var(--radius);
  background: rgba(141, 111, 104, 0.055);
  color: #6a554f;
  font-size: 0.98rem;
}

table {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 14px 50px rgba(32, 35, 31, 0.04);
}

th {
  background: rgba(77, 90, 73, 0.045);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: #474d45;
}

.notice {
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(32, 35, 31, 0.04);
}

.rules li::before {
  font-variant-numeric: tabular-nums;
}

.formal-footer {
  padding: clamp(42px, 6vw, 72px) 0 34px;
  border-top: 1px solid var(--hairline);
  border-bottom: 0;
  background: var(--white);
  color: var(--muted);
}

.formal-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.46fr);
  gap: clamp(30px, 7vw, 76px);
}

.formal-footer-brand {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  line-height: 1.1;
}

.formal-footer-note {
  max-width: 680px;
  margin: 16px 0 0;
  color: #74786f;
  font-size: 0.84rem;
}

.formal-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: var(--sage);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.formal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
  color: #5f655c;
  font-size: 0.86rem;
}

.formal-footer-links a {
  text-decoration: none;
}

.formal-footer-links a:hover,
.formal-footer-links button:hover {
  color: var(--ink);
}

.thank-you-shell {
  width: min(1040px, 100%);
}

.thank-you-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(240px, 0.28fr);
  gap: clamp(26px, 6vw, 72px);
  align-items: end;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(221, 214, 202, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.86);
  box-shadow: 0 30px 92px rgba(32, 35, 31, 0.08);
}

.thank-you-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(221, 214, 202, 0.58);
  border-radius: calc(var(--radius) - 2px);
}

.thank-you-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button.secondary {
  border-color: rgba(52, 56, 51, 0.26);
  background: transparent;
  color: var(--graphite);
}

.next-steps {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.next-steps li {
  counter-increment: steps;
  padding-top: 16px;
  border-top: 1px solid rgba(221, 214, 202, 0.82);
  color: #4f554d;
  font-size: 0.9rem;
}

.next-steps li::before {
  content: counter(steps, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  color: var(--sage);
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

@media (max-width: 760px) {
  article.wrap {
    padding: 24px 20px 34px;
  }

  header nav {
    justify-content: flex-start;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  tr + tr {
    border-top: 1px solid var(--hairline);
  }

  th,
  td {
    border-width: 0;
  }

  .formal-footer-grid,
  .thank-you-card {
    grid-template-columns: 1fr;
  }

  .thank-you-card {
    padding: 30px 22px;
  }

  .rules li {
    padding-left: 42px;
  }
}
