:root {
  color-scheme: light;
  --site-ink: #1a2430;
  --site-muted: #546579;
  --site-paper: #f4efe8;
  --site-panel: #fffdf9;
  --site-line: rgba(17, 24, 39, 0.14);
  --site-accent: #8c5f1d;
  --site-shadow: 0 12px 32px rgba(13, 28, 35, 0.08);
}

html {
  scroll-behavior: smooth;
}

body.site-modern-page {
  box-sizing: border-box;
  width: min(100%, 1480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px clamp(12px, 2.5vw, 36px) 48px;
  background: var(--site-paper);
  color: var(--site-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.site-modern-page.site-modern-frame-page {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.site-modern-header {
  position: sticky;
  top: 8px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  margin: 0 0 24px;
  padding: 9px 14px 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(13, 25, 35, 0.97);
  box-shadow: var(--site-shadow);
  color: #edf2f7;
}

.site-modern-brand {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: #fff !important;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none !important;
}

.site-modern-brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-modern-page-title {
  overflow: hidden;
  max-width: min(70vw, 48rem);
  margin-top: 3px;
  color: #c3d1dc;
  font-size: 0.74rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-modern-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.site-modern-home,
.site-modern-menu summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #edf2f7 !important;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}

.site-modern-home {
  border-color: transparent;
  background: linear-gradient(135deg, #b97d2b, #d9a04d);
  color: #1a1a1a !important;
}

.site-modern-menu {
  position: relative;
}

.site-modern-menu summary {
  cursor: pointer;
  list-style: none;
}

.site-modern-menu summary::-webkit-details-marker {
  display: none;
}

.site-modern-menu summary::after {
  width: 0;
  height: 0;
  margin-left: 9px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  content: "";
  transform: translateY(2px);
}

.site-modern-menu[open] summary::after {
  border-top-color: transparent;
  border-bottom-color: currentColor;
  transform: translateY(-2px);
}

.site-modern-menu summary:hover,
.site-modern-menu summary:focus-visible,
.site-modern-home:hover,
.site-modern-home:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

.site-modern-menu[open] {
  z-index: 20;
}

.site-modern-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(480px, calc(100vw - 32px));
  max-height: 70vh;
  max-height: min(70vh, 480px);
  grid-template-columns: 1fr;
  gap: 5px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #142b3d;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.site-modern-menu-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: #edf2f7 !important;
  font-size: 0.88rem;
  line-height: 1.45;
  text-decoration: none !important;
}

.site-modern-menu-panel a:hover,
.site-modern-menu-panel a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em;
}

.site-modern-header a:focus-visible,
.site-modern-header summary:focus-visible {
  outline: 2px solid #f0c578;
  outline-offset: 3px;
}

body.site-modern-page:not(.site-modern-frame-page) a {
  overflow-wrap: anywhere;
  text-underline-offset: 0.16em;
}

body.site-modern-page:not(.site-modern-frame-page) a:focus-visible {
  outline: 2px solid #9b6824;
  outline-offset: 2px;
}

body.site-modern-page:not(.site-modern-frame-page) [id],
body.site-modern-page:not(.site-modern-frame-page) a[name] {
  scroll-margin-top: 88px;
}

body.site-modern-page:not(.site-modern-frame-page) img:not([usemap]) {
  max-width: 100%;
  height: auto;
}

body.site-modern-page img[usemap] {
  width: auto !important;
  max-width: none !important;
}

body.site-modern-page:not(.site-modern-frame-page) .site-modern-map-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  text-align: center;
}

body.site-modern-page:not(.site-modern-frame-page) .site-modern-embed-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

@media (max-width: 1024px) {
  body.site-modern-page:not(.site-modern-frame-page) .site-modern-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  body.site-modern-page:not(.site-modern-frame-page) #Principal {
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  body.site-modern-page:not(.site-modern-frame-page) #Principal > * {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
  }

  body.site-modern-page:not(.site-modern-frame-page) #Principal #Cuerpo1 > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

body.site-modern-page:not(.site-modern-frame-page) hr {
  border: 0;
  border-top: 1px solid var(--site-line);
}

@media (max-width: 760px) {
  body.site-modern-page:not(.site-modern-frame-page) {
    padding: 10px 10px 28px;
  }

  .site-modern-header {
    top: 4px;
    gap: 8px;
    min-height: 54px;
    margin-bottom: 18px;
    padding: 8px 10px 8px 12px;
    border-radius: 13px;
  }

  .site-modern-brand {
    flex: 1 1 auto;
    font-size: 0.85rem;
    overflow: hidden;
  }

  .site-modern-page-title {
    display: none;
  }

  .site-modern-actions {
    gap: 5px;
  }

  .site-modern-home,
  .site-modern-menu summary {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  .site-modern-menu-panel {
    position: fixed;
    top: 66px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 82px);
    max-height: calc(100dvh - 82px);
  }

  body.site-modern-page:not(.site-modern-frame-page) > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
