.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(154, 185, 180, 0.5);
  background: rgba(245, 249, 248, 0.86);
  backdrop-filter: blur(16px);
  animation: legal-header-enter 420ms ease-out both;
}

.legal-header-inner,
.legal-main,
.legal-footer {
  width: min(64rem, calc(100% - 2rem));
  margin: 0 auto;
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
}

.legal-header nav,
.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.legal-header nav a,
.legal-footer nav a {
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.legal-header nav a:hover,
.legal-footer nav a:hover {
  border-color: var(--border);
  background: white;
}

.legal-main {
  position: relative;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: clamp(2rem, 6vw, 5.5rem);
  border: 1px solid rgba(181, 204, 199, 0.78);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  animation: legal-main-enter 560ms 60ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.legal-main::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 30px 30px 0 0;
  content: "";
  background: linear-gradient(90deg, var(--teal-dark), #4ad9cf, var(--teal-dark));
}

.legal-main h1 {
  max-width: 52rem;
  color: var(--teal-dark);
}

.legal-main h2 {
  margin-top: 2.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light);
}

.legal-main h3 {
  margin-top: 1.7rem;
}

.legal-main p,
.legal-main li {
  color: var(--ink-soft);
}

.legal-main li + li {
  margin-top: 0.5rem;
}

.legal-summary {
  margin: 1.6rem 0 2.2rem;
  padding: 1.2rem;
  border: 1px solid #96d3cc;
  border-radius: 18px;
  color: #164e50;
  background: #eaf8f5;
}

.placeholder {
  padding: 0.12rem 0.34rem;
  border: 1px solid #e5c785;
  border-radius: 6px;
  color: #754405;
  background: #fff5d9;
  font-weight: 700;
}

.legal-form {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
  margin-top: 1.6rem;
}

.protocol-box {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  word-break: break-word;
}

.status-main {
  width: min(70rem, calc(100% - 2rem));
}

.status-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.status-hero h1,
.status-hero p {
  margin-bottom: 0;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.service-status i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #94a3a0;
}

.service-status.is-ready {
  color: var(--teal-dark);
  border-color: rgba(10, 143, 134, 0.28);
  background: rgba(10, 143, 134, 0.08);
}

.service-status.is-ready i {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(10, 143, 134, 0.11);
}

.service-status.is-unavailable {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.24);
  background: rgba(254, 226, 226, 0.7);
}

.service-status.is-unavailable i {
  background: #dc2626;
}

.status-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.status-service-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(248, 252, 251, 0.72);
}

.status-service-grid p {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
}

.status-service-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(10, 143, 134, 0.22);
  border-radius: 9px;
  color: var(--teal-dark);
  background: rgba(10, 143, 134, 0.07);
  font-size: 0.7rem;
  font-weight: 850;
}

.status-service-value {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.status-service-value.is-ready {
  color: var(--teal-dark);
  background: rgba(10, 143, 134, 0.09);
}

.status-service-value.is-unavailable {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.72);
}

.status-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes legal-header-enter {
  from {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
  }
}

@keyframes legal-main-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.992);
  }
}

@media (hover: hover) and (pointer: fine) {
  .legal-header nav a:hover,
  .legal-footer nav a:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 700px) {
  .legal-header {
    position: static;
  }

  .legal-header-inner,
  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.7rem 0;
  }

  .legal-main {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
    padding: 1.3rem;
    border-radius: 22px;
  }

  .status-hero,
  .status-note {
    flex-direction: column;
  }

  .status-service-grid {
    grid-template-columns: 1fr;
  }
}
