.legal-page #main-content {
  padding-top: var(--header-height);
}

.legal-skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  color: #061827;
  background: #fff;
  border: 3px solid #35d5d0;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: underline;
  transform: translateY(-160%);
}

.legal-skip-link:focus {
  transform: translateY(0);
}

.legal-hero {
  position: relative;
  isolation: isolate;
  height: 290px;
  overflow: hidden;
  color: #fff;
  background: #082e49;
}

.legal-hero__media,
.legal-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.legal-hero__media {
  z-index: -1;
}

.legal-hero__media img {
  max-width: none;
  object-fit: cover;
  object-position: 50% 100%;
}

.legal-hero__inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 16px 18px;
}

.legal-breadcrumb {
  width: min(54%, 680px);
  font-size: 0.88rem;
  text-shadow: 0 1px 2px rgba(3, 19, 31, 0.42);
}

.legal-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-breadcrumb li + li::before {
  content: "/";
  margin-right: 7px;
  color: rgba(255, 255, 255, 0.64);
}

.legal-breadcrumb a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-breadcrumb a:focus-visible,
.legal-breadcrumb a:hover {
  color: #84eee7;
  outline: none;
}

.legal-hero__copy {
  width: min(57%, 720px);
}

.legal-hero h1 {
  max-width: 18ch;
  margin: 0;
  color: #fff;
  font-size: 2.125rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(3, 19, 31, 0.52);
}

.legal-hero__copy > p:not(.legal-hero__updated) {
  max-width: 58ch;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(240px, 270px) minmax(0, 860px);
  justify-content: center;
  align-items: start;
  gap: clamp(42px, 5vw, 72px);
  padding-block: 48px 72px;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow: auto;
  padding: 20px 18px;
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  background: #f7fafc;
}

.legal-toc__toggle {
  display: none;
}

.legal-toc__list,
.legal-toc__list[hidden] {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: legal-toc;
}

.legal-toc__list li {
  counter-increment: legal-toc;
}

.legal-toc__list a {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 6px;
  padding: 5px 6px;
  color: #33485a;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.32;
  text-decoration: underline;
  text-decoration-color: rgba(51, 72, 90, 0.42);
  text-underline-offset: 2px;
}

.legal-toc__list a::before {
  content: counter(legal-toc) ".";
  color: #08786f;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.legal-toc__list a:hover,
.legal-toc__list a:focus-visible,
.legal-toc__list a[aria-current="location"] {
  color: #061827;
  background: #dff7f4;
  outline: none;
  text-decoration-color: currentColor;
}

.legal-toc__list a:focus-visible {
  box-shadow: 0 0 0 3px rgba(8, 120, 111, 0.34);
}

.legal-article {
  min-width: 0;
  color: #263b4b;
  font-size: 1.0625rem;
  line-height: 1.72;
}

.legal-section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.legal-section + .legal-section {
  margin-top: 46px;
  padding-top: 4px;
}

.legal-section:focus {
  outline: none;
}

.legal-section:focus-visible {
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(8, 120, 111, 0.22);
}

.legal-article h2,
.legal-article h3 {
  color: #0c2f49;
  text-wrap: balance;
}

.legal-article h2 {
  margin: 0 0 18px;
  font-size: clamp(1.48rem, 2.2vw, 1.82rem);
  line-height: 1.23;
  letter-spacing: -0.02em;
}

.legal-article h3 {
  margin: 30px 0 12px;
  font-size: 1.16rem;
  line-height: 1.35;
}

.legal-article p,
.legal-article ul,
.legal-article address {
  margin: 0 0 16px;
}

.legal-article ul {
  display: grid;
  gap: 7px;
  padding-left: 1.35rem;
}

.legal-article li::marker {
  color: #08786f;
}

.legal-article a {
  color: #075f6a;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-article a:hover,
.legal-article a:focus-visible {
  color: #06444b;
  outline: 3px solid rgba(8, 120, 111, 0.28);
  outline-offset: 3px;
}

.legal-article address {
  padding-left: 16px;
  border-left: 3px solid #8bded8;
  font-style: normal;
}

.legal-contact-card {
  padding: 28px;
  border: 1px solid #cfe5e7;
  border-radius: 14px;
  background: linear-gradient(145deg, #f3fbfa, #f8fbfd);
}

.legal-contact-card__updated {
  margin: 18px 0 0 !important;
  padding-top: 14px;
  color: #607585;
  border-top: 1px solid #d8e7e8;
  font-size: 0.9rem;
  font-weight: 560;
}

.legal-back-to-top {
  display: inline-block;
  margin-top: 34px;
}

@media (min-width: 1200px) {
  .legal-hero {
    height: 392px;
  }

  .legal-hero__media img {
    object-position: 50% 75%;
  }
}

@media (min-width: 700px) and (max-width: 1199px) {
  .legal-hero__media img {
    object-position: 50% 78%;
  }
}

@media (max-width: 1099px) {
  .legal-hero {
    height: 230px;
  }

  .legal-hero__inner {
    padding-block: 16px 19px;
  }

  .legal-hero h1 {
    font-size: 1.8125rem;
  }

  .legal-layout {
    display: block;
    width: min(100% - 36px, 880px);
    padding-block: 32px 58px;
  }

  .legal-toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 34px;
    padding: 0;
    background: #fff;
  }

  .legal-toc__toggle {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    color: #0c2f49;
    border: 0;
    border-radius: 11px;
    background: #f1f7f9;
    font-weight: 800;
    text-align: left;
  }

  .legal-toc__toggle:focus-visible {
    outline: 3px solid #08786f;
    outline-offset: 3px;
  }

  .legal-toc__chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
  }

  .legal-toc__toggle[aria-expanded="true"] .legal-toc__chevron {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  .legal-toc__list {
    max-height: 54vh;
    overflow: auto;
    padding: 12px 10px 14px;
  }

  .legal-toc__list[hidden] {
    display: none;
  }

  .legal-toc__list a {
    padding-block: 7px;
    font-size: 0.9rem;
  }
}

@media (max-width: 699px) {
  .legal-hero {
    height: 280px;
  }

  .legal-hero__media img {
    object-position: 50% 100%;
  }

  .legal-hero__inner {
    padding-block: 9px 10px;
  }

  .legal-breadcrumb {
    width: 100%;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .legal-hero__copy {
    width: 100%;
  }

  .legal-hero h1 {
    max-width: 24ch;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.06;
  }

  .legal-layout {
    width: min(100% - 28px, 880px);
    padding-block: 24px 44px;
  }

  .legal-toc {
    margin-bottom: 28px;
  }

  .legal-article {
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.68;
  }

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

  .legal-article h2 {
    font-size: 1.4rem;
  }

  .legal-article h3 {
    font-size: 1.1rem;
  }

  .legal-contact-card {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .legal-toc__chevron {
    transition: none;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  body::before {
    display: block;
    margin-bottom: 8mm;
    color: #061827;
    content: "YachtFinder24";
    font-size: 16pt;
    font-weight: 800;
  }

  .site-header,
  .site-footer,
  .legal-skip-link,
  .legal-breadcrumb,
  .legal-hero__media,
  .legal-toc,
  .legal-back-to-top,
  .yf-back-to-top {
    display: none !important;
  }

  .legal-page #main-content {
    padding: 0;
  }

  .legal-hero {
    height: auto;
    overflow: visible;
    color: #000;
    background: transparent;
  }

  .legal-hero__inner,
  .legal-layout {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
  }

  .legal-hero__copy {
    width: auto;
  }

  .legal-hero h1 {
    max-width: none;
    color: #000;
    font-size: 24pt;
  }

  .legal-hero__updated {
    color: #333;
    font-size: 10pt;
  }

  .legal-article {
    color: #111;
    font-size: 10.5pt;
    line-height: 1.48;
  }

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

  .legal-article h2,
  .legal-article h3 {
    color: #000;
    break-after: avoid-page;
  }

  .legal-article p,
  .legal-article li,
  .legal-article address {
    orphans: 3;
    widows: 3;
  }

  .legal-contact-card {
    break-inside: avoid-page;
    padding: 6mm;
    border: 1px solid #999;
    background: transparent;
  }
}
