:root {
  --ff-blue: #2563eb;
  --ff-blue-hover: #1d4ed8;
  --ff-dark: #0f172a;
  --ff-muted: #64748b;
  --ff-soft-muted: #94a3b8;
  --ff-bg: #f8fafc;
  --ff-border: #e2e8f0;
  --ff-blue-bg: #eff6ff;
  --ff-blue-border: #dbeafe;
  --ff-blue-text: #1e40af;
  --ff-white: #ffffff;
  --ff-green-bg: #ecfdf5;
  --ff-green-border: #bbf7d0;
  --ff-green-text: #166534;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ff-bg);
  color: #1e293b;
}

a {
  color: var(--ff-blue);
  text-decoration: none;
}

a:hover {
  color: var(--ff-blue-hover);
}

/* =========================================================
   NAVBAR LEGAL
   ========================================================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--ff-border);
}

.navbar .container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  color: var(--ff-dark);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ff-blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ms-auto {
  margin-left: auto;
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.gap-3 {
  gap: 1rem;
}

.nav-link {
  color: var(--ff-dark);
  font-weight: 800;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ff-blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-nav-primary {
  background: var(--ff-blue);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 900;
}

.btn-nav-primary:hover {
  background: var(--ff-blue-hover);
  color: #ffffff;
}

/* =========================================================
   LEGAL PAGE BASE
   ========================================================= */

.legal-page {
  min-height: 100vh;
  background: var(--ff-bg);
  color: #1e293b;
  line-height: 1.75;
}

.legal-container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 80px 24px;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.legal-header {
  border-bottom: 1px solid var(--ff-border);
  padding-bottom: 32px;
  margin-bottom: 36px;
}

.legal-back-link {
  display: inline-block;
  color: var(--ff-blue);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-back-link:hover {
  color: var(--ff-blue-hover);
}

.legal-kicker {
  color: var(--ff-blue);
  font-weight: 900;
  font-size: 0.85rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-header h1 {
  margin: 24px 0 10px;
  color: var(--ff-dark);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.legal-header p {
  margin: 0;
  color: var(--ff-muted);
  font-weight: 700;
}

/* =========================================================
   CARD CONTENT
   ========================================================= */

.legal-card {
  background: var(--ff-white);
  border: 1px solid var(--ff-border);
  border-radius: 28px;
  padding: 48px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.legal-section h2,
.legal-highlight h2,
.legal-card h2 {
  margin: 0 0 16px;
  color: var(--ff-dark);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.legal-card h2 {
  margin-top: 38px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-section p,
.legal-highlight p,
.legal-card p {
  margin: 0 0 16px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-section p:last-child,
.legal-highlight p:last-child,
.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol,
.legal-card ul,
.legal-card ol {
  margin: 16px 0 22px;
  padding-left: 24px;
}

.legal-section li,
.legal-card li {
  margin-bottom: 10px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-section strong,
.legal-highlight strong,
.legal-card strong {
  color: var(--ff-dark);
  font-weight: 900;
}

/* =========================================================
   HIGHLIGHT BOXES
   ========================================================= */

.legal-highlight {
  background: var(--ff-blue-bg);
  border: 1px solid var(--ff-blue-border);
  border-radius: 28px;
  padding: 28px;
}

.legal-highlight h2 {
  color: #1e3a8a;
}

.legal-highlight p {
  color: var(--ff-blue-text);
}

.legal-final-note {
  margin-top: 42px;
  background: var(--ff-blue-bg);
  border: 1px solid var(--ff-blue-border);
  color: #1e3a8a;
  padding: 22px;
  border-radius: 18px;
  line-height: 1.7;
}

.legal-warning-note {
  margin: 28px 0;
  background: var(--ff-green-bg);
  border: 1px solid var(--ff-green-border);
  color: var(--ff-green-text);
  padding: 22px;
  border-radius: 18px;
  line-height: 1.7;
  font-weight: 700;
}

/* =========================================================
   TABLES
   ========================================================= */

.legal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 16px;
  border: 1px solid var(--ff-border);
}

.legal-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--ff-white);
}

.legal-table th,
.legal-table td {
  padding: 16px;
  border-bottom: 1px solid var(--ff-border);
  text-align: left;
  color: #334155;
  vertical-align: top;
}

.legal-table th {
  background: #f8fafc;
  font-weight: 900;
  color: var(--ff-dark);
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */

.legal-footer {
  border-top: 1px solid var(--ff-border);
  margin-top: 48px;
  padding-top: 32px;
  text-align: center;
}

.legal-footer p {
  margin: 0;
  color: var(--ff-soft-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* =========================================================
   GTM
   ========================================================= */

.gtm-noscript-frame {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767px) {
  .navbar .container {
    min-height: auto;
    padding: 14px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ms-auto {
    margin-left: 0;
  }

  .navbar .d-flex {
    width: 100%;
    flex-wrap: wrap;
  }

  .legal-container {
    padding: 56px 20px;
  }

  .legal-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .legal-header {
    margin-bottom: 28px;
  }

  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-section h2,
  .legal-highlight h2,
  .legal-card h2 {
    font-size: 1.18rem;
  }

  .legal-section p,
  .legal-highlight p,
  .legal-section li,
  .legal-card p,
  .legal-card li {
    font-size: 0.95rem;
  }

  .legal-highlight {
    border-radius: 22px;
    padding: 22px;
  }

  .legal-table th,
  .legal-table td {
    padding: 14px;
    font-size: 0.92rem;
  }
}

@media (max-width: 420px) {
  .legal-container {
    padding: 42px 16px;
  }

  .legal-card {
    padding: 24px 18px;
  }
}
