.legal-page {
  background-color: var(--cream);
  background-image: radial-gradient(
    rgba(16, 27, 45, 0.085) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
}

.legal-header {
  position: relative;
  z-index: 20;
  padding: 18px 24px 0;
}

.legal-header-inner {
  display: flex;
  width: min(100%, 1200px);
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-inline: auto;
  padding: 8px 22px 8px 18px;
  border: 1px solid rgba(16, 27, 45, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 10px 36px rgba(16, 27, 45, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.legal-brand {
  display: block;
  width: 174px;
  border-radius: 14px;
}

.legal-brand picture,
.legal-brand img {
  width: 100%;
}

.legal-back {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.legal-main {
  position: relative;
  overflow: hidden;
  padding: 92px 0 120px;
}

.legal-container {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), 980px);
  margin-inline: auto;
}

.legal-decoration {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.legal-decoration-one {
  top: 40px;
  right: -220px;
  width: 560px;
  height: 560px;
  background: rgba(255, 217, 71, 0.48);
}

.legal-decoration-two {
  top: 720px;
  left: -240px;
  width: 510px;
  height: 510px;
  background: rgba(67, 210, 197, 0.27);
}

.legal-hero {
  margin-bottom: 46px;
}

.legal-hero h1 {
  max-width: 800px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.legal-hero h1 span {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.legal-date {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 56px;
}

.legal-toc a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-card {
  position: relative;
  margin-bottom: 42px;
  padding: clamp(34px, 6vw, 68px);
  border: 2px solid var(--ink);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 10px 10px 0 var(--ink);
  scroll-margin-top: 28px;
}

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

.legal-section-label {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 0 22px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-card:nth-of-type(2) .legal-section-label {
  background: var(--turquoise);
}

.legal-card:nth-of-type(3) .legal-section-label {
  background: var(--coral);
}

.legal-card > h2 {
  margin-bottom: 42px;
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.legal-card section {
  padding: 38px 0 4px;
  border-top: 1px solid var(--line);
}

.legal-card section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.legal-card h3 {
  margin-bottom: 18px;
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.legal-card p,
.legal-card li,
.legal-card dd,
.legal-card td,
.legal-card th {
  font-size: 0.93rem;
  line-height: 1.95;
}

.legal-card p {
  margin-bottom: 20px;
}

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

.legal-card ul {
  margin: 0 0 24px;
  padding-left: 1.4em;
}

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

.legal-card a {
  color: #0f7627;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.legal-definition {
  margin: 0;
}

.legal-definition > div {
  display: grid;
  gap: 12px 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(140px, 0.32fr) minmax(0, 0.68fr);
}

.legal-definition > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-definition dt {
  font-family: var(--font-rounded);
  font-size: 0.84rem;
  font-weight: 900;
}

.legal-definition dd {
  margin: 0;
}

.legal-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.legal-table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--paper);
}

.legal-table-wrap th,
.legal-table-wrap td {
  padding: 15px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table-wrap th:last-child,
.legal-table-wrap td:last-child {
  border-right: 0;
}

.legal-table-wrap tr:last-child td {
  border-bottom: 0;
}

.legal-table-wrap th {
  background: var(--leaf-soft);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-note {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 5px solid var(--coral);
  border-radius: 4px 18px 18px 4px;
  background: #fff3ed;
}

.legal-note strong {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-rounded);
  font-size: 0.88rem;
  font-weight: 900;
}

.legal-note p {
  margin: 0;
  font-size: 0.84rem;
}

.legal-sales-card {
  background: var(--leaf-soft);
}

.legal-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px !important;
  padding: 10px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-rounded);
  font-size: 0.82rem !important;
  font-weight: 900;
}

.legal-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--leaf);
}

.legal-footer {
  background: var(--ink);
}

.legal-footer .footer-inner,
.legal-footer .footer-inner p,
.legal-footer .footer-links a {
  color: var(--white);
}

@media (hover: hover) {
  .legal-back:hover,
  .legal-toc a:hover {
    color: var(--ink);
    background: var(--yellow);
  }

  .legal-card a:hover {
    color: var(--pink);
  }

  .legal-footer .footer-links a:hover {
    color: var(--yellow);
  }
}

@media (max-width: 640px) {
  .legal-header {
    padding: 10px 10px 0;
  }

  .legal-header-inner {
    min-height: 66px;
    padding: 6px 14px;
  }

  .legal-brand {
    width: 136px;
  }

  .legal-back {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.7rem;
  }

  .legal-main {
    padding: 70px 0 84px;
  }

  .legal-container {
    width: min(calc(100% - 32px), 980px);
  }

  .legal-hero h1 {
    font-size: clamp(2.25rem, 10.5vw, 4.4rem);
  }

  .legal-toc {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 42px;
  }

  .legal-toc a {
    justify-content: center;
  }

  .legal-card {
    padding: 30px 22px;
    border-radius: 24px;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .legal-card > h2 {
    margin-bottom: 32px;
  }

  .legal-card section {
    padding-top: 30px;
  }

  .legal-card p,
  .legal-card li,
  .legal-card dd,
  .legal-card td,
  .legal-card th {
    font-size: 0.88rem;
  }

  .legal-definition > div {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .legal-table-wrap {
    margin-inline: -4px;
  }

  .legal-status {
    align-items: flex-start;
    border-radius: 18px;
  }

  .legal-status span {
    flex: 0 0 10px;
    margin-top: 0.55em;
  }
}

@media (max-width: 390px) {
  .legal-back {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .legal-back-label {
    display: none;
  }
}
