/* Platform legal pages — shell chrome (DES-POST-1, desine §9) */

@import url("../shared/styles/shell.css");

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--shell-bg);
  color: var(--shell-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--shell-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--shell-primary-hover);
}

.container {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.legal-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--shell-border);
}

.legal-nav-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--shell-nav-h);
}

.legal-logo {
  font-family: 'Golos Text', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--shell-text);
  text-decoration: none;
}

.legal-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.legal-nav-links a {
  color: var(--shell-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.legal-nav-links a:hover {
  color: var(--shell-text);
}

.legal-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--shell-btn-h);
  padding: 0 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--shell-radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  background: var(--shell-primary);
  color: #fff;
  text-decoration: none;
}

.legal-btn-primary:hover {
  background: var(--shell-primary-hover);
  color: #fff;
}

.legal-content {
  padding: calc(var(--shell-nav-h) + 2.75rem) 0 3rem;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  font-family: 'Golos Text', system-ui, sans-serif;
  color: var(--shell-text);
}

.legal-content h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.legal-content p {
  margin-bottom: 0.75rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--shell-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.9rem;
}

.legal-content th {
  background: var(--shell-bg-alt);
  font-weight: 600;
  color: var(--shell-text);
}

.legal-date {
  color: var(--shell-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.legal-footer {
  border-top: 1px solid var(--shell-border);
  padding: 2rem 0;
  color: var(--shell-muted);
  font-size: 0.85rem;
  background: var(--shell-bg-alt);
}

.legal-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.legal-footer-grid a {
  color: var(--shell-muted);
}

.legal-footer-grid a:hover {
  color: var(--shell-text);
  text-decoration: underline;
}

.legal-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-footer-links a {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.15rem;
}

.legal-footer-copy {
  margin-top: 0.75rem;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  background: var(--shell-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--shell-radius);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

@media (max-width: 640px) {
  .legal-nav-links .desktop-only {
    display: none;
  }

  .legal-footer-grid {
    grid-template-columns: 1fr;
  }

  .legal-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
