.legal-page {
  --legal-accent: #7df05d;
  --legal-border: rgba(255, 255, 255, 0.16);
  color: var(--ink);
  font-family: var(--fontFamily-default);
  font-size: var(--fontSize-default);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.legal a { color: inherit; text-underline-offset: 0.2em; }
.legal a:hover { color: var(--legal-accent); }
.legal :focus-visible, .legal__skip:focus-visible { outline: 2px solid var(--legal-accent); outline-offset: 5px; }
.legal__skip { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 8px 14px; background: var(--bg); transform: translateY(-180%); }
.legal__skip:focus { transform: translateY(0); }
.ref2d__top--legal .ref2d__header-actions { grid-column: -2 / -1; }
.ref2d__top--legal .ref2d__header-btn { white-space: nowrap; }
.legal { width: min(1240px, 100%); margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.legal__hero { padding: clamp(28px, 3vw, 42px) 0 26px; border-bottom: 1px solid var(--legal-border); }
.legal__hero h1 { max-width: 34ch; margin: 0; font-size: clamp(1.45rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.15; letter-spacing: 0.01em; }
.legal__meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; padding-top: 22px; border-top: 1px solid var(--legal-border); font-size: 12px; color: var(--ink-dim); }
.legal__meta a { margin-left: auto; color: var(--ink); }
.legal__layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(36px, 6vw, 84px); align-items: start; padding-top: 36px; }
.legal__sidebar { position: sticky; top: 98px; }
.legal__documents { display: grid; gap: 4px; }
.legal__documents a { display: block; padding: 8px 0 8px 14px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.4; text-decoration: none; color: #b5b5ba; }
.legal__documents a[aria-current="page"] { color: var(--legal-accent); border-left-color: var(--legal-accent); }
.legal__contents { margin-top: 26px; border-top: 1px solid var(--legal-border); padding-top: 16px; font-size: 14px; }
.legal__contents summary { padding: 4px 0; cursor: pointer; }
.legal__contents nav { max-height: calc(100svh - 380px); overflow-y: auto; margin-top: 14px; }
.legal__contents ol { list-style: none; margin: 0; padding: 0; }
.legal__contents li + li { margin-top: 10px; }
.legal__contents a { display: block; padding: 4px 0; line-height: 1.4; text-decoration: none; color: #b5b5ba; }
.legal__document { min-width: 0; max-width: 74ch; }
.legal__section { padding: 0 0 30px; scroll-margin-top: 96px; }
.legal__section + .legal__section { padding-top: 30px; border-top: 1px solid var(--legal-border); }
.legal__section h2 { margin: 0 0 16px; font-size: clamp(1.06rem, 2vw, 1.36rem); font-weight: 700; line-height: 1.25; }
.legal__section h3 { margin: 26px 0 12px; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.legal__section p, .legal__section ul { margin: 0 0 16px; color: #c9c9ce; overflow-wrap: anywhere; }
.legal__section p:last-child, .legal__section ul:last-child { margin-bottom: 0; }
.legal__section ul { padding-left: 22px; }
.legal__section li + li { margin-top: 10px; }
.legal__section .legal__letter-list { list-style: none; padding-left: 0; }
.legal__letter-list li { padding-left: 30px; text-indent: -30px; }
.legal__end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 18px; font-size: 13px; }
#inicio, #documento { scroll-margin-top: 90px; }
.legal-page .ref2d-site-footer a:hover { color: #0b0c0e; }
.legal-page .ref2d-site-footer :focus-visible { outline-color: #0b0c0e; }

@media (max-width: 900px) {
  .legal__layout { grid-template-columns: 1fr; gap: 32px; }
  .legal__sidebar { position: static; }
  .legal__documents { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .legal__documents a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 0; }
  .legal__documents a[aria-current="page"] { border-bottom-color: var(--legal-accent); }
  .legal__contents { margin-top: 18px; padding: 10px 0; border-bottom: 1px solid var(--legal-border); }
  .legal__contents nav { max-height: 45svh; }
  .legal__document { max-width: none; }
  .legal-page .ref2d-site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .ref2d__top--legal { grid-template-areas: "brand menu"; }
  .ref2d__top--legal .ref2d__header-actions .ref2d__header-btn { display: inline-flex !important; }
}

@media (max-width: 540px) {
  .legal__hero { padding-bottom: 24px; }
  .legal__meta { display: grid; gap: 7px; }
  .legal__meta a { margin: 6px 0 0; width: fit-content; }
  .legal__layout { padding-top: 24px; }
  .legal__documents { gap: 8px; }
  .legal__documents a { font-size: 13px; }
  .legal__end { display: grid; }
  .legal-page .ref2d-site-footer__inner { grid-template-columns: 1fr; }
}

@media print {
  html, body.legal-page { background: white; color: black; color-scheme: light; }
  .ref2d__top--legal, .legal__skip, .legal__sidebar, .legal__end, .ref2d-site-footer, .ref2d-privacy-consent, .legal__meta a { display: none !important; }
  .legal { width: 100%; padding: 0; }
  .legal__hero { padding: 0 0 24px; }
  .legal__hero h1 { font-size: 32px; }
  .legal__layout { display: block; }
  .legal__document { max-width: none; }
  .legal__meta, .legal__section p, .legal__section ul { color: black; }
  .legal__section h2, .legal__section h3 { break-after: avoid; }
}
