@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300..800&display=swap");

:root {
  color-scheme: light;
  --font-sans: Inter, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

.legal-doc-shell {
  min-height: 100vh;
  background: #f8fafc;
  font-family: var(--font-sans);
}

#legal-document-content {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

#legal-document-content article {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  line-height: 1.65;
}

#legal-document-content h1 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

#legal-document-content h2 {
  margin: 2rem 0 0.75rem;
  color: #075985;
  font-size: 1.35rem;
}

#legal-document-content h3 {
  margin: 1.5rem 0 0.5rem;
  color: #0f766e;
  font-size: 1.08rem;
}

#legal-document-content p {
  margin: 0 0 0.9rem;
}

#legal-document-content .legal-clause-number {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  scroll-margin-top: 88px;
}

#legal-document-content .meta {
  margin-bottom: 2rem;
  color: #64748b;
  font-size: 0.95rem;
}

#legal-document-content a {
  color: #0369a1;
  overflow-wrap: anywhere;
}

.legal-language-notice,
.legal-draft-unresolved {
  margin: 0 0 1.5rem;
  padding: 14px 16px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
}

.legal-table-scroll {
  margin: 1.25rem 0;
  overflow-x: auto;
}

#legal-document-content table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#legal-document-content th,
#legal-document-content td {
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  vertical-align: top;
  text-align: left;
}

#legal-document-content thead th {
  background: #f1f5f9;
}

.cookie-declaration {
  min-height: 96px;
  margin: 1.25rem 0;
}

.legal-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.legal-site-header-inner,
.legal-site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-site-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-site-header-left {
  display: flex;
  align-items: center;
  gap: 34px;
  min-width: 0;
}

.legal-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.legal-site-brand img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 2px solid #22d3ee;
  border-radius: 999px;
  object-fit: cover;
}

.legal-site-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.legal-site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.legal-site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.legal-site-nav a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.legal-site-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.legal-site-auth-button-outline {
  border: 1px solid #cbd5e1;
  background: transparent;
  color: #0f172a;
}

.legal-site-auth-button-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.legal-site-auth-button-primary {
  border: 1px solid #3f63d4;
  background: #3f63d4;
  color: #fff;
}

.legal-site-auth-button-primary:hover {
  background: #3656bb;
  border-color: #3656bb;
}

.legal-site-language {
  position: relative;
  flex: 0 0 auto;
}

.legal-site-language-trigger {
  width: 42px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.legal-site-language-trigger:hover,
.legal-site-language-trigger[aria-expanded="true"] {
  background: #f1f5f9;
}

.legal-site-flag-current {
  width: 28px;
  height: 20px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legal-site-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 172px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.legal-site-language-menu[hidden] {
  display: none;
}

.legal-site-language-item {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}

.legal-site-language-item:hover,
.legal-site-language-item[aria-current="true"] {
  background: #f1f5f9;
}

.legal-site-flag-option {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legal-site-header a:focus-visible,
.legal-site-header button:focus-visible,
.legal-site-footer a:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 3px;
}

.legal-site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 44px 0;
}

.legal-site-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}

.legal-site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.legal-site-footer-brand img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 2px solid #22d3ee;
  border-radius: 999px;
  object-fit: cover;
}

.legal-site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.legal-site-footer p,
.legal-site-footer address {
  margin: 0;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-site-footer address {
  font-style: normal;
}

.legal-site-footer-stack {
  display: grid;
  gap: 8px;
}

.legal-site-footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-site-footer a {
  color: #94a3b8;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 140ms ease;
}

.legal-site-footer-cookie-button {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  transition: color 140ms ease;
}

.legal-site-footer-cookie-button:hover {
  color: #fff;
}

.legal-site-footer a:hover {
  color: #fff;
}

@media (max-width: 900px) {
  .legal-site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .legal-site-footer-grid > :first-child,
  .legal-site-footer-grid > :nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  #legal-document-content {
    width: min(100% - 24px, 920px);
    padding: 24px 0 48px;
  }

  #legal-document-content article {
    padding: 20px;
  }

  .legal-site-header-inner,
  .legal-site-footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .legal-site-header-inner {
    min-height: auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
  }

  .legal-site-header-left {
    gap: 14px;
  }

  .legal-site-brand {
    font-size: 1.05rem;
  }

  .legal-site-header-actions {
    gap: 6px;
  }

  .legal-site-nav {
    display: none;
  }

  .legal-site-auth-button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.86rem;
  }

  .legal-site-language-trigger {
    width: 38px;
    height: 36px;
  }

  .legal-site-language-menu {
    right: -2px;
  }

  .legal-site-footer {
    padding: 36px 0;
  }

  .legal-site-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .legal-site-footer-grid > :first-child,
  .legal-site-footer-grid > :nth-child(2) {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .legal-site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-site-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
