/* Cabecera única del sitio (ms-shell).
   Única fuente de sus estilos: la emite scripts/lib/site-shell.js y la instala
   scripts/build-site-shell.js en toda página publicada. Ninguna otra hoja define .ms-shell. */

@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400 700;font-stretch:100%;font-display:swap;src:url("/matematica/assets/fonts/instrument-sans-latin.woff2") format("woff2")}

:root {
  --ms-shell-paper: rgba(255, 255, 255, .96);
  --ms-shell-ink: #142238;
  --ms-shell-blue: #214e78;
  --ms-shell-red: #a63f48;
  --ms-shell-line: #d7e0e9;
  --ms-shell-wash: #edf3f8;
}

.ms-shell {
  position: relative;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  box-sizing: border-box;
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  margin: 14px auto 0;
  padding: 0 18px;
  border: 1px solid var(--ms-shell-line);
  border-radius: 18px;
  background: var(--ms-shell-paper);
  box-shadow: 0 8px 24px rgba(20, 34, 56, .06);
  color: var(--ms-shell-ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  line-height: 1.2;
}

.ms-shell a { text-underline-offset: 3px; }

.ms-shell__skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ms-shell-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ms-shell__skip:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

.ms-shell__brand {
  color: var(--ms-shell-ink);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}

.ms-shell__brand span { color: var(--ms-shell-red); }

.ms-shell__nav,
.ms-shell__account {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ms-shell__nav { justify-content: center; }

.ms-shell__nav a,
.ms-shell__account a {
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--ms-shell-blue);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.ms-shell__nav a:hover,
.ms-shell__nav a:focus-visible,
.ms-shell__nav a[aria-current="page"] { background: var(--ms-shell-wash); }

/* "Contacto" es un enlace de texto discreto, nunca un botón lleno. */
.ms-shell__nav .ms-shell__contact { font-weight: 600; }

.ms-shell__account a { padding: 9px 12px; }
.ms-shell__account .ms-shell__try { background: var(--ms-shell-blue); color: #fff; }
.ms-shell__account .ms-shell__try:hover,
.ms-shell__account .ms-shell__try:focus-visible { background: #2f6fa6; }

.ms-shell [data-public-only][hidden],
.ms-shell [hidden] { display: none !important; }

html[data-reader-theme="night"] .ms-shell {
  border-color: #405266;
  background: #1d2935;
  color: #eef4f8;
  box-shadow: none;
}

html[data-reader-theme="night"] .ms-shell__brand { color: #eef4f8; }
html[data-reader-theme="night"] .ms-shell__nav a,
html[data-reader-theme="night"] .ms-shell__account a { color: #cfe0f0; }
html[data-reader-theme="night"] .ms-shell__nav a:hover,
html[data-reader-theme="night"] .ms-shell__nav a:focus-visible,
html[data-reader-theme="night"] .ms-shell__nav a[aria-current="page"] { background: #2a3a4c; }
html[data-reader-theme="night"] .ms-shell__account .ms-shell__try { background: #2f6fa6; color: #fff; }

@media (max-width: 860px) {
  .ms-shell { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; }
  .ms-shell__nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; gap: 2px; overflow: visible; }
  .ms-shell__nav a { padding: 7px 9px; }
}

@media (max-width: 560px) {
  .ms-shell { width: calc(100% - 20px); margin-top: 10px; }
  .ms-shell__nav { justify-content: center; }
  .ms-shell__account { gap: 2px; }
  .ms-shell__account a { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .ms-shell * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .ms-shell { display: none; }
}
