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

html,
body {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 42%, #f1f5f9 100%);
  min-height: 100vh;
  color: #334155;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.back-link:hover {
  background: #fff;
  border-color: #c7d2fe;
  transform: translateX(-2px);
}

html[dir="rtl"] .back-link:hover {
  transform: translateX(2px);
}

.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-toggle button:hover:not([aria-pressed="true"]) {
  background: #f1f5f9;
  color: #475569;
}

.lang-toggle button[aria-pressed="true"] {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.card {
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 20px 48px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 44px 36px 48px;
  overflow: hidden;
}

.header {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.header .subtitle {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 500;
}

.header .meta {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.legal-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  letter-spacing: -0.01em;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 15px;
  margin-bottom: 14px;
  color: #475569;
}

.legal-content ul {
  margin: 0 0 16px 1.35em;
  font-size: 15px;
  color: #475569;
}

.legal-content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-content li::marker {
  color: #818cf8;
}

.legal-content strong {
  color: #334155;
  font-weight: 600;
}

.legal-content a {
  color: #4f46e5;
  word-break: break-all;
}

.contact-email {
  font-size: 16px;
  font-weight: 600;
  color: #4f46e5;
  letter-spacing: 0.01em;
}

/* Hub page */
.hub-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #fafbff 0%, #f8fafc 100%);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.hub-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}

.hub-card__body {
  flex: 1;
  min-width: 0;
}

.hub-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.hub-card p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.hub-card .arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}

.hub-card:hover .arrow {
  background: #4f46e5;
  color: #fff;
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .page-wrap {
    padding: 20px 16px 48px;
  }

  .card {
    padding: 32px 22px 36px;
    border-radius: 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  .brand-badge {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .hub-card {
    padding: 18px 20px;
  }
}
