.legal-hero { padding: 66px 0 42px; }
.legal-hero__card {
  position: relative;
  overflow: hidden;
  padding: 46px;
  border: 4px solid var(--ink);
  border-radius: 30px;
  background: var(--cream);
  box-shadow: var(--shadow-deep);
}
.legal-hero__card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -58px;
  width: 230px;
  height: 230px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--orange) url("img/huehaul-logo.svg") center / 140px no-repeat;
  opacity: .22;
}
.legal-hero h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0 13px;
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: .92;
  text-transform: uppercase;
}
.legal-hero__intro { position: relative; z-index: 1; max-width: 64ch; margin-bottom: 0; color: var(--ink-soft); font-size: 1.05rem; }
.legal-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 0; color: var(--ink-muted); font-size: .78rem; font-weight: 800; }

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px);
  justify-content: center;
  gap: 42px;
  align-items: start;
  padding: 38px 0 20px;
}
.legal-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.82);
  box-shadow: 4px 5px 0 rgba(20,36,67,.12);
}
.legal-toc__title { margin: 0 0 10px; color: var(--ink-muted); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.legal-toc ul { display: grid; gap: 2px; padding: 0; margin: 0; list-style: none; }
.legal-toc a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--ink-soft); font-size: .76rem; font-weight: 750; line-height: 1.35; text-decoration: none; }
.legal-toc a:hover,
.legal-toc a:focus-visible { background: var(--paper); color: var(--ink); }

.legal-content { min-width: 0; }
.legal-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  margin-bottom: 34px;
  padding: 22px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--yard);
  box-shadow: var(--shadow);
}
.legal-summary__icon { display: grid; width: 42px; height: 42px; place-items: center; border: 2px solid var(--ink); border-radius: 13px; background: var(--white); font-family: var(--font-display); font-weight: 900; }
.legal-summary__title { margin-bottom: 5px; font-family: var(--font-display); font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.legal-summary p:last-child { margin-bottom: 0; }

.legal-section {
  scroll-margin-top: 100px;
  margin-bottom: 18px;
  padding: 27px;
  border: 2px solid rgba(20,36,67,.26);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.78);
}
.legal-section__heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
}
.legal-section__num { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--orange); font-size: .9rem; }
.legal-section:nth-of-type(4n+2) .legal-section__num { background: var(--sky); }
.legal-section:nth-of-type(4n+3) .legal-section__num { background: var(--lime); }
.legal-section:nth-of-type(4n+4) .legal-section__num { background: var(--grape); }
.legal-section p,
.legal-section li { color: #35425e; font-size: .94rem; }
.legal-section p:last-child,
.legal-section ul:last-child { margin-bottom: 0; }
.legal-section a { color: #245c9a; font-weight: 750; text-underline-offset: 2px; }
.legal-section strong { color: var(--ink); }
.legal-section ul { padding-left: 1.25rem; }
.legal-section li + li { margin-top: 7px; }

.data-table-wrap { overflow-x: auto; margin: 18px 0; border: 2px solid var(--ink); border-radius: 14px; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--white); font-size: .82rem; }
.data-table th,
.data-table td { padding: 12px 13px; border-bottom: 1px solid rgba(20,36,67,.16); text-align: left; vertical-align: top; }
.data-table th { background: var(--ink); color: var(--white); font-family: var(--font-display); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }

.callout { margin: 18px 0; padding: 17px 18px; border-left: 6px solid var(--orange); border-radius: 0 13px 13px 0; background: var(--paper); }
.callout--green { border-left-color: var(--lime); background: rgba(152,217,71,.14); }
.callout p:last-child { margin-bottom: 0; }

.legal-contact { padding: 18px; border: 2px solid var(--ink); border-radius: 13px; background: var(--cream); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; max-height: none; }
  .legal-toc ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .legal-hero { padding-top: 36px; }
  .legal-hero__card { padding: 29px 22px; }
  .legal-hero__card::after { width: 170px; height: 170px; }
  .legal-layout { gap: 22px; padding-top: 24px; }
  .legal-toc ul { grid-template-columns: 1fr; }
  .legal-section { padding: 21px 18px; }
  .legal-summary { grid-template-columns: 1fr; }
}
