:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18201e;
  background: #f5f7f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: #f5f7f6;
}

a { color: inherit; }

.legal-header,
.legal-main,
.legal-footer {
  width: calc(100% - 40px);
  max-width: 920px;
  margin-inline: auto;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
}

.legal-wordmark {
  color: #18201e;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.legal-card {
  min-width: 0;
  overflow: hidden;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid #dfe6e3;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(25, 54, 45, 0.08);
}

.legal-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #842029;
  background: #f8d7da;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.legal-status--published {
  color: #17613a;
  background: #dff5e8;
}

h1 {
  margin: 22px 0 10px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.legal-meta,
.legal-note,
.legal-placeholder,
.legal-footer {
  color: #5c6864;
  line-height: 1.7;
}

.legal-content {
  margin-top: 40px;
  color: #27332f;
  font-size: 16px;
  line-height: 1.85;
}

.legal-content h2 {
  margin: 48px 0 16px;
  padding-top: 16px;
  border-top: 1px solid #e6ece9;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.25;
}

.legal-content h3 {
  margin: 32px 0 12px;
  font-size: 21px;
  line-height: 1.35;
}

.legal-content h4 {
  margin: 24px 0 10px;
  font-size: 17px;
}

.legal-content p,
.legal-content ul,
.legal-content ol { margin: 12px 0; }

.legal-content li { margin: 6px 0; }

.legal-content code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #edf1ef;
  font-size: 0.92em;
}

.legal-table-wrap {
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid #dfe6e3;
  border-radius: 12px;
}

.legal-content table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

.legal-content th,
.legal-content td {
  padding: 12px 14px;
  border-right: 1px solid #e6ece9;
  border-bottom: 1px solid #e6ece9;
  text-align: left;
  vertical-align: top;
}

.legal-content th { background: #f4f7f5; }
.legal-content tr:last-child td { border-bottom: 0; }
.legal-content th:last-child,
.legal-content td:last-child { border-right: 0; }

.legal-note {
  margin: 32px 0;
  padding: 18px 20px;
  border-left: 4px solid #d69e2e;
  background: #fff8df;
}

.legal-placeholder {
  min-height: 240px;
  padding: 28px;
  border: 2px dashed #cbd5d1;
  border-radius: 16px;
  background: #fafcfb;
  overflow-wrap: anywhere;
}

.legal-placeholder h2 {
  margin-top: 0;
  color: #27332f;
}

.error-card { text-align: center; }

.error-code {
  margin: 0;
  color: #6554c0;
  font-size: clamp(64px, 14vw, 132px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.error-translation { color: #5c6864; }

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.error-actions a { padding: 12px 18px; }

.error-actions .error-primary {
  border-radius: 999px;
  color: #fff;
  background: #18201e;
  text-decoration: none;
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 44px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .legal-header,
  .legal-footer { align-items: flex-start; }
  .legal-header { min-height: 72px; }
  .legal-header { flex-wrap: wrap; padding-block: 16px; }
  .legal-nav,
  .legal-footer { flex-direction: column; gap: 8px; }
  .legal-card { border-radius: 18px; }
  .legal-placeholder { min-height: 200px; padding: 20px; }
  .legal-content { font-size: 15px; }
}
