/* Верхняя панель и модалка «Юридическая информация» (как на ocenka) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.legal-topnav-wrap {
  font-family: "Inter", system-ui, sans-serif;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.97);
  color: #1a1a1a;
  padding: 0 16px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.legal-topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  padding: 16px 0 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.legal-topnav-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  text-decoration: none;
}

a.legal-topnav-link:hover,
button.legal-topnav-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-topnav-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fce7f3;
  color: #9d174d;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.legal-topnav-pill:hover {
  background: #fbcfe8;
}

.legal-topnav-support {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.legal-topnav-support:hover {
  color: #1d4ed8;
}

.legal-topnav-rule {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0;
}

/* Модальное окно */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.legal-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.legal-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 28px 22px 32px;
  font-family: "Inter", system-ui, sans-serif;
  color: #111827;
  transform: scale(0.96);
  transition: transform 0.25s;
}

.legal-modal-overlay.is-open .legal-modal {
  transform: scale(1);
}

.legal-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.legal-modal-close:hover {
  background: #e5e7eb;
}

.legal-modal h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  padding-right: 40px;
}

.legal-modal-caption {
  margin: 0 0 22px;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.45;
}

.legal-modal-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-modal-card {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f3f4f6;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  border: 1px solid transparent;
}

.legal-modal-card:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.legal-modal-card-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #111827;
}

.legal-modal-card-url {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  word-break: break-all;
  line-height: 1.35;
}

/* Страницы документов */
.doc-page {
  font-family: "Inter", system-ui, sans-serif;
  max-width: 48rem;
  margin: 0 auto;
  padding: 32px 0 80px;
  color: #e8eaf0;
}

.doc-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.25;
}

.doc-page h2,
.doc-page h3,
.doc-page h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.75em 0 0.75em;
  color: #f3f4f6;
}

.doc-page p,
.doc-page li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #b8bfd4;
  margin: 0 0 0.9em;
}

.doc-page ul {
  margin: 0 0 1em 1.2em;
  padding: 0;
}

.doc-page a {
  color: #5eead4;
}

.doc-page .doc-muted {
  color: #8b92a8;
  font-size: 0.88rem;
  margin-bottom: 2rem;
}

.doc-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #8b92a8;
}

.doc-footer a {
  color: #5eead4;
  margin-right: 12px;
}

/* Светлая страница документа (альтернатива) */
.doc-page-light {
  background: #fff;
  color: #111827;
  padding: 40px 24px 80px;
  max-width: 42rem;
  margin: 0 auto;
  font-family: "Inter", system-ui, sans-serif;
}

.doc-page-light h1 {
  color: #111827;
}

.doc-page-light p,
.doc-page-light li {
  color: #374151;
}

.doc-page-light h4 {
  color: #111827;
}

.doc-page-light a {
  color: #2563eb;
}

.doc-footer-light {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
  color: #6b7280;
}

.doc-footer-light a {
  color: #2563eb;
  margin-right: 12px;
}

.doc-copy {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #6b7280;
  max-width: 40rem;
}
