:root {
  --ink: #1B2960;
  --deep: #172453;
  --deep2: #101A40;
  --cream: #F1F3F9;
  --paper: #FCFCFE;
  --line: #D7DDEC;
  --green: #435AA1;
  --muted: #65708B;
  --white: #ffffff;
  --ease: cubic-bezier(.22, .68, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--deep); text-decoration: underline; }

/* ── HEADER ULTRA COMPACTO ──────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  color: #fff;
  background: rgba(23, 36, 83, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
}

.header-inner {
  height: 100%;
  width: min(100% - 6vw, 1320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-logo-wrap {
  width: 32px;
  height: 32px;
  overflow: visible;
  flex: none;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-divider {
  height: 20px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.brand-product {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all .2s var(--ease);
}
.back-link:hover {
  background: #fff;
  color: var(--deep);
  text-decoration: none;
}

/* ── LAYOUT ULTRA COMPACTO ─────────────────────────── */
.page-shell {
  width: min(100% - 6vw, 1320px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0 56px;
  align-items: start;
}

/* ── NAVEGACIÓN LATERAL COMPACTA ───────────────────── */
.legal-nav-wrap {
  position: sticky;
  top: 76px;
  align-self: start;
}

.legal-nav-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 2px;
}

.legal-nav {
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 2px 10px rgba(16, 26, 64, 0.03);
}

.legal-nav a {
  display: block;
  padding: 8px 11px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 3px;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legal-nav a:hover {
  background: var(--cream);
  color: var(--deep);
  text-decoration: none;
}

.legal-nav a[aria-current="page"] {
  background: var(--deep);
  color: #fff;
  font-weight: 700;
}

/* ── DOCUMENTO LEGAL SERIO / EMPRESARIAL ───────────── */
.legal-document {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(24px, 3.5vw, 44px);
  box-shadow: 0 4px 20px rgba(16, 26, 64, 0.03);
  border-radius: 4px;
}

.legal-document h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.8vw, 36px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--deep);
  margin: 0 0 14px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 8px 14px;
  background: var(--cream);
  border-left: 3px solid var(--deep);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  border-radius: 0 3px 3px 0;
}
.doc-meta strong {
  color: var(--deep);
  font-weight: 650;
}

.legal-document h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -.015em;
  color: var(--deep);
  margin: 28px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.legal-document h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 18px 0 6px;
  letter-spacing: -.01em;
}

.legal-document p {
  font-size: 13.5px;
  color: #334155;
  margin: 0 0 12px;
  line-height: 1.62;
}

.legal-document ul,
.legal-document ol {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #334155;
}

.legal-document li {
  margin: 4px 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.legal-document code {
  padding: 1px 5px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--deep);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  border-radius: 2px;
}

.legal-document blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  background: var(--cream);
  border-left: 3px solid var(--green);
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  border-radius: 0 3px 3px 0;
}

.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--cream);
  color: var(--deep);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

td {
  color: #334155;
}

.document-note {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ── FOOTER ULTRA COMPACTO ──────────────────────────── */
.footer {
  background: var(--deep2);
  color: #fff;
  padding: 36px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top {
  width: min(100% - 6vw, 1320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.footer-brand .brand-logo-wrap {
  width: 170px;
  height: 38px;
  position: relative;
  overflow: hidden;
  flex: none;
}
.footer-brand .brand-logo {
  position: absolute;
  width: 190px;
  max-width: none;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
}
.footer-brand .brand-divider {
  height: 28px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}
.footer-brand .brand-product {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
}

.footer-top p {
  margin: 0;
  color: #C3CCE6;
  font-size: 12px;
  line-height: 1.4;
}

.back-top {
  margin-left: auto;
  font-size: 11.5px;
  color: #C3CCE6;
  text-decoration: none;
  font-weight: 600;
}
.back-top:hover { color: #fff; text-decoration: underline; }

.footer-links {
  width: min(100% - 6vw, 1320px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-links strong {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #fff;
}

.footer-links a {
  font-size: 12px;
  color: #C3CCE6;
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  width: min(100% - 6vw, 1320px);
  margin-inline: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10.5px;
  color: #AEBADB;
}

/* ── RESPONSIVE COMPACTO ───────────────────────────── */
@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 20px;
  }
  .legal-nav-wrap {
    position: static;
  }
  .legal-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .site-header { height: 54px; }
  .brand-logo-wrap { width: 28px; height: 28px; }
  .brand-product { font-size: 15px; }
  .back-link { padding: 6px 10px; font-size: 10px; }
  .legal-document { padding: 18px 14px; }
  .legal-nav { grid-template-columns: 1fr; }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 20px;
  }
  .footer-links { grid-template-columns: 1fr; gap: 18px; padding: 20px 0; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}
