.subpage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #eef5f8 0, #f7f9fb 360px, #f7f9fb 100%);
}

.subpage .site-header {
  background: rgb(247 249 251 / 88%);
}

.subpage-nav {
  grid-template-columns: 1fr auto 1fr;
}

.subpage-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: #667680;
  font-size: 13px;
}

.subpage-links a {
  transition: color 160ms ease;
}

.subpage-links a:hover,
.subpage-links a[aria-current="page"] {
  color: var(--navy);
}

.home-link {
  justify-self: end;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #cbd8de;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  background: rgb(255 255 255 / 62%);
  color: #52646f;
  font-size: 12px;
  font-weight: 500;
}

.home-link:hover {
  border-color: #91b2bf;
  color: var(--navy);
}

.document-main {
  flex: 1;
  padding: calc(var(--header-height) + 92px) 0 120px;
}

.document-shell {
  width: min(940px, calc(100vw - 64px));
  margin-inline: auto;
}

.document-header {
  max-width: 800px;
  padding-bottom: 62px;
}

.document-header h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 96px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.document-header h1 span {
  color: #5a7e8d;
}

.document-intro {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.document-meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.document-meta span {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfdde3;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  background: rgb(255 255 255 / 64%);
  color: #657680;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-meta .draft-chip {
  border-color: #e3c989;
  background: #fff8e6;
  color: #806429;
}

.draft-note {
  margin-bottom: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: #fff9ec;
  color: #68583a;
  font-size: 13px;
  line-height: 1.65;
}

.legal-document {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: white;
}

.legal-section {
  padding: 42px clamp(28px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 18px;
  font-size: clamp(25px, 3vw, 33px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.legal-section h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section li,
.legal-address {
  color: #526570;
  font-size: 15px;
  line-height: 1.75;
}

.legal-section p {
  margin: 0 0 16px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-section a {
  color: #397086;
  text-decoration: underline;
  text-decoration-color: #aecbd5;
  text-underline-offset: 4px;
}

.legal-address {
  margin: 0;
  font-style: normal;
}

.required-field {
  display: inline;
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff3d5;
  color: #775b1d;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.subpage .site-footer {
  border-top: 1px solid var(--line);
}

.not-found {
  overflow: hidden;
  background: #eef5f8;
}

.not-found .site-header {
  background: transparent;
  border-bottom-color: rgb(161 186 197 / 45%);
}

.not-found-main {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  padding: calc(var(--header-height) + 70px) 0 80px;
  display: grid;
  place-items: center;
}

.not-found-route {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 62%;
  pointer-events: none;
}

.not-found-route path:first-child {
  fill: none;
  stroke: #83bdce;
  stroke-width: 2;
}

.not-found-route path:last-child {
  fill: var(--amber);
}

.not-found-copy {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 48px));
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--navy);
  font-size: clamp(128px, 26vw, 310px);
  font-weight: 600;
  line-height: 0.72;
  letter-spacing: -0.09em;
}

.not-found-copy h1 {
  margin: 42px 0 0;
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.not-found-copy > p:not(.error-code, .overline) {
  max-width: 540px;
  margin: 22px auto 0;
  color: #607681;
  font-size: 16px;
  line-height: 1.65;
}

.not-found-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.not-found-actions a {
  min-height: 50px;
  padding: 0 19px;
  border: 1px solid #bfd1d8;
  border-radius: var(--radius-small);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 72%);
  color: #3e5663;
  font-size: 13px;
  font-weight: 600;
}

.not-found-actions a:first-child {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

@media (max-width: 980px) {
  .subpage-nav {
    grid-template-columns: 1fr auto;
  }

  .subpage-links {
    display: none;
  }
}

@media (max-width: 650px) {
  .document-main {
    padding: calc(var(--header-height) + 64px) 0 72px;
  }

  .document-shell {
    width: calc(100vw - 32px);
  }

  .document-header {
    padding-bottom: 42px;
  }

  .document-header h1 {
    font-size: 56px;
  }

  .document-intro {
    font-size: 15px;
  }

  .legal-section {
    padding: 30px 20px;
  }

  .legal-section p,
  .legal-section li,
  .legal-address {
    font-size: 14px;
  }

  .not-found-main {
    padding-top: calc(var(--header-height) + 40px);
  }

  .error-code {
    font-size: 150px;
  }

  .not-found-copy h1 {
    margin-top: 34px;
    font-size: 42px;
  }

  .not-found-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
