*, *::before, *::after { box-sizing: border-box; }
  html, body { overflow-x: hidden; }
  body { margin: 0; font-family: "Inter", sans-serif; background: #fff; }

  /* ── Legal nav ── */
  .legal-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line, #e5e8ef);
    height: 60px;
  }
  .legal-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink, #0f1b2e);
    font-family: "Inter Tight", sans-serif;
    font-size: .9375rem;
    font-weight: 640;
    letter-spacing: -0.01em;
    text-decoration: none;
    flex-shrink: 0;
  }
  .legal-brand img { width: 28px; height: 28px; display: block; object-fit: contain; }
  .legal-brand strong { font-weight: 700; }
  .legal-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-soft, #f4f5f8);
    border-radius: 10px;
    padding: 3px;
  }
  .legal-tab {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border-radius: 7px;
    font-size: .8125rem;
    font-weight: 550;
    color: var(--ink-3, #4b5873);
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
  }
  .legal-tab:hover { background: rgba(255,255,255,0.7); color: var(--ink, #0f1b2e); }
  .legal-tab.is-active {
    background: #fff;
    color: var(--eu-navy, #273e57);
    font-weight: 650;
    box-shadow: 0 1px 3px rgba(15,27,46,0.10);
  }
  .legal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 34px;
    border-radius: 8px;
    font-size: .8125rem;
    font-weight: 550;
    color: var(--ink-2, #2c3e57);
    text-decoration: none;
    border: 1px solid var(--line, #e5e8ef);
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .legal-back-btn:hover {
    background: var(--bg-soft, #f4f5f8);
    border-color: var(--eu-navy, #273e57);
    color: var(--eu-navy, #273e57);
  }

  /* ── Page head ── */
  .legal-page-head {
    background:
      radial-gradient(circle at top left, rgba(39,62,87,0.06) 0%, transparent 40%),
      radial-gradient(circle at bottom right, rgba(198,163,84,0.07) 0%, transparent 36%),
      linear-gradient(180deg, #f7f6f2 0%, #fbfaf6 55%, #ffffff 100%);
    border-bottom: 1px solid rgba(39,62,87,0.07);
    padding: 56px 0 44px;
  }
  .legal-page-head .lpg-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--eu-navy, #273e57);
    margin-bottom: 14px;
    opacity: 0.65;
  }
  .legal-page-head h1 {
    font-family: "Inter Tight", sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--ink, #0f1b2e);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 14px;
  }
  .legal-page-head .lead {
    font-size: .9375rem;
    line-height: 1.7;
    color: var(--ink-3, #4b5873);
    max-width: 600px;
    margin: 0;
  }

  /* ── Body content ── */
  .legal-body { max-width: 900px; margin: 0 auto; padding: 48px 32px 80px; }
  .legal-body h2 {
    font-family: "Inter Tight", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink, #0f1b2e);
    letter-spacing: -0.02em;
    margin: 2.5rem 0 .75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line, #e5e8ef);
  }
  .legal-body h2:first-of-type { border-top: none; padding-top: 0; }
  .legal-body h3 { font-size: .9375rem; font-weight: 650; color: var(--ink-2, #2c3e57); margin: 1.5rem 0 .5rem; }
  .legal-body p, .legal-body li { font-size: .9375rem; line-height: 1.75; color: var(--ink-3, #4b5873); }
  .legal-body ul, .legal-body ol { padding-left: 1.5rem; margin: .5rem 0 1rem; }
  .legal-body li { margin-bottom: .35rem; }
  .legal-body strong { color: var(--ink-2, #2c3e57); font-weight: 650; }
  .legal-body a { color: var(--eu-navy, #273e57); text-decoration: underline; }
  .legal-updated { font-size: .8125rem; color: var(--ink-4, #7a88a2); margin-bottom: 2rem; }

  .legal-info-box {
    background: var(--gold-50, #faf5e8);
    border: 1px solid var(--gold-light, #e6d09a);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 2.5rem;
  }
  .legal-info-box p { margin: 0; font-size: .875rem; color: var(--ink-2, #2c3e57); line-height: 1.65; }
  .legal-info-box > strong { display: block; margin-bottom: 8px; color: var(--ink, #0f1b2e); font-weight: 700; font-size: .9375rem; }

  .legal-toc {
    background: var(--bg-soft, #f4f5f8);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 2.5rem;
  }
  .legal-toc-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4, #7a88a2); margin: 0 0 12px; }
  .legal-toc ol { margin: 0; padding-left: 1.25rem; }
  .legal-toc li { font-size: .875rem; margin-bottom: 6px; }
  .legal-toc a { color: var(--eu-navy, #273e57); text-decoration: none; }
  .legal-toc a:hover { text-decoration: underline; }

  /* Cookie table */
  .cookie-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .875rem; }
  .cookie-table thead th {
    background: var(--bg-soft, #f4f5f8);
    padding: 10px 14px;
    text-align: left;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--ink-2, #2c3e57);
    border-bottom: 2px solid var(--line, #e5e8ef);
  }
  .cookie-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line, #e5e8ef);
    color: var(--ink-3, #4b5873);
    vertical-align: top;
    line-height: 1.5;
  }
  .cookie-table tbody tr:last-child td { border-bottom: none; }
  .cookie-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
  }
  .badge-essential { background: #d1fae5; color: #065f46; }
  .badge-analytics { background: #dbeafe; color: #1e3a8a; }
  .badge-preference { background: var(--gold-50, #faf5e8); color: #9a7d37; }
  .badge-marketing { background: #f3e8ff; color: #6b21a8; }

  /* Browser grid */
  .browser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 1rem 0; }
  .browser-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-soft, #f4f5f8);
    border: 1px solid var(--line, #e5e8ef);
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--ink-2, #2c3e57) !important;
    font-size: .875rem;
    font-weight: 600;
    transition: border-color .15s, background .15s;
  }
  .browser-link:hover { background: #e8f0f7; border-color: #c5d4e3; }

  /* ── Footer ── */
  .legal-footer {
    background: var(--bg-soft, #f4f5f8);
    border-top: 1px solid var(--line, #e5e8ef);
    padding: 48px 0 32px;
    font-family: "Inter", sans-serif;
  }
  .legal-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
  .legal-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }
  .legal-footer h5 {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-4, #7a88a2);
    margin: 0 0 14px;
  }
  .legal-footer ul { list-style: none; padding: 0; margin: 0; }
  .legal-footer li { margin-bottom: 8px; }
  .legal-footer a { font-size: .875rem; color: var(--ink-3, #4b5873); text-decoration: none; transition: color .15s; }
  .legal-footer a:hover { color: var(--eu-navy, #273e57); }
  .legal-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink, #0f1b2e);
    font-family: "Inter Tight", sans-serif;
    font-size: .9375rem;
    font-weight: 640;
    letter-spacing: -0.01em;
    text-decoration: none;
    margin-bottom: 10px;
  }
  .legal-footer-brand strong { font-weight: 700; }
  .legal-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--line, #e5e8ef);
    font-size: .8125rem;
    color: var(--ink-4, #7a88a2);
    gap: 16px;
    flex-wrap: wrap;
  }
  .f-muted { font-size: .8125rem; color: var(--ink-4, #7a88a2); margin: 0; line-height: 1.55; max-width: 240px; }

  @media (max-width: 920px) {
    .legal-nav { height: auto; }
    .legal-nav-inner { flex-wrap: wrap; padding: 0 16px; gap: 0; min-height: 52px; overflow: hidden; }
    .legal-tabs {
      flex: 0 0 calc(100vw - 32px);
      width: calc(100vw - 32px);
      max-width: calc(100vw - 32px);
      min-width: 0;
      background: transparent;
      border-radius: 0;
      border-top: 1px solid var(--line, #e5e8ef);
      padding: 4px 0 8px;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-inline: contain;
      scrollbar-width: none;
    }
    .legal-tabs::-webkit-scrollbar { display: none; }
    .legal-tab { flex-shrink: 0; }
    .legal-footer-grid { grid-template-columns: 1fr 1fr; }
    .legal-footer-grid > div:first-child { grid-column: 1 / -1; }
    .cookie-table { font-size: .8125rem; }
    .cookie-table thead th, .cookie-table tbody td { padding: 8px 10px; }
  }
  @media (max-width: 480px) {
    .legal-back-btn .btn-label { display: none; }
    .legal-footer-grid { grid-template-columns: 1fr; }
    .cookie-table,
    .cookie-table thead,
    .cookie-table tbody,
    .cookie-table tr,
    .cookie-table th,
    .cookie-table td {
      display: block;
      width: 100%;
    }
    .cookie-table {
      border-collapse: separate;
      border-spacing: 0;
    }
    .cookie-table thead { display: none; }
    .cookie-table tbody tr {
      border: 1px solid var(--line, #e5e8ef);
      border-radius: 12px;
      padding: 10px 12px;
      margin: 0 0 12px;
      background: #fff;
    }
    .cookie-table tbody td {
      border-bottom: 0;
      padding: 7px 0;
      overflow-wrap: anywhere;
    }
    .cookie-table tbody td::before {
      display: block;
      margin-bottom: 3px;
      color: var(--ink-4, #7a88a2);
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .04em;
      text-transform: uppercase;
    }
    .cookie-table tbody td:nth-child(1)::before { content: "Nombre"; }
    .cookie-table tbody td:nth-child(2)::before { content: "Tipo"; }
    .cookie-table tbody td:nth-child(3)::before { content: "Duración"; }
    .cookie-table tbody td:nth-child(4)::before { content: "Finalidad"; }
  }
