
    body {
      background-color: #f8fafc;
      background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
      background-size: 24px 24px;
    }
    .radar-polygon { transition: points 0.5s ease-in-out, fill 0.3s ease, stroke 0.3s ease; }
    .no-scrollbar::-webkit-scrollbar { display: none; }
    .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
    .panel-transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
  
/* Capa visual de la beta: fondo y acentos coherentes con la portada. */
html { color-scheme: light; }
body {
    background-color: #fff !important;
    background-image: radial-gradient(#cbd5e1 .5px, transparent .5px) !important;
    background-size: 24px 24px !important;
    color: #1e293b;
}

/* Los paneles grandes conservan el contenido y pasan a superficie clara. */
body .bg-black.rounded-xl,
body .bg-gray-900 {
    background-color: #fff !important;
    color: #1e293b !important;
    border-color: #fecaca;
}
body .bg-black.rounded-xl { border: 1px solid #cbd5e1; border-left: 4px solid #b91c1c; }
body span.bg-gray-900,
body div.bg-gray-900.rounded-full { border: 1px solid #fecaca; color: #b91c1c !important; }
body .bg-black.rounded-xl .text-white,
body .bg-black.rounded-xl .text-slate-300,
body .bg-black.rounded-xl .text-slate-500,
body .bg-gray-900 .text-white { color: #1e293b !important; }
body .bg-black.rounded-xl .text-red-500,
body .bg-gray-900 .text-red-500 { color: #b91c1c !important; }
body .bg-black.rounded-xl .tool-guide { color: #334155; border-color: #cbd5e1; }
body .bg-black.rounded-xl .tool-guide strong { color: #991b1b; }
body footer.bg-gray-900 { border-top: 1px solid #cbd5e1; }

/* Controles oscuros: rojo de marca; campos de edición: blanco legible. */
body a.bg-black,
body button.bg-black,
body span.bg-black,
body button.bg-slate-900 { background-color: #b91c1c !important; color: #fff !important; }
body textarea.bg-slate-900 { background-color: #fff !important; color: #1e293b !important; border-color: #cbd5e1 !important; }
body .btn-cycle.active { background-color: #b91c1c; }
body .control-panel { border-color: #cbd5e1; }

/* Explicit navigation back to the guide, including standalone tools. */
.home-return {
  display: block; width: fit-content; margin-top: .5rem;
  color: #b91c1c; font: 700 12px/1.5 Inter, Arial, sans-serif;
  text-decoration: none; letter-spacing: normal; text-transform: none;
}
.home-return:hover { text-decoration: underline; }
.home-return:focus-visible { outline: 2px solid #b91c1c; outline-offset: 4px; border-radius: 2px; }

/* Cabecera y pie únicos, independientes de los estilos de cada herramienta. */
body.site-page { margin: 0; padding: 0 !important; min-height: 100dvh; display: flex; flex-direction: column; font-family: Inter, Arial, sans-serif; }
.site-header, .site-footer { flex: none; background: #fff; color: #334155; width: 100%; box-sizing: border-box; }
.site-header { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid #cbd5e1; padding: 0; box-shadow: 0 2px 8px #0f172a08; }
.site-bar { max-width: 1024px; width: 100%; margin: 0 auto; padding: 16px 24px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: #111827; font-size: 18px; font-weight: 900; letter-spacing: -.5px; text-decoration: none; white-space: nowrap; }
.site-brand strong { color: #b91c1c; }
.site-brand-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #b91c1c; color: #fff; font-size: 16px; letter-spacing: 0; }
.site-menu { display: flex; align-items: center; gap: 24px; }
.site-menu a { color: #334155; font-size: 12px; line-height: 1.5; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid transparent; padding: 4px 0; white-space: nowrap; }
.site-menu a:hover, .site-menu a[aria-current="page"] { color: #b91c1c; border-color: #b91c1c; }
.site-menu-group { position: relative; display: flex; align-items: center; }
.site-submenu-toggle { flex: none; width: 20px; height: 28px; margin: 0 0 0 2px; padding: 0; border: 0; background: none; color: #334155; cursor: pointer; display: grid; place-items: center; }
.site-submenu-toggle::after { content: ""; display: block; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.site-submenu-toggle:hover, .site-menu-group.is-open .site-submenu-toggle { color: #b91c1c; }
.site-submenu-toggle:focus-visible { outline: 2px solid #b91c1c; outline-offset: 2px; border-radius: 4px; }
.site-submenu { display: none; position: absolute; top: 100%; left: -14px; min-width: 240px; padding: 8px; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 10px 15px -3px #0f172a1a; z-index: 70; }
.site-menu-group:hover .site-submenu, .site-menu-group:focus-within .site-submenu, .site-menu-group.is-open .site-submenu { display: block; }
.site-submenu a { display: block; padding: 8px 10px; border: 0; border-radius: 8px; }
.site-submenu a:hover, .site-submenu a[aria-current="page"] { background: #fef2f2; }
.site-footer { border-top: 1px solid #cbd5e1; padding: 0 !important; font-size: 12px; }
.site-footer p { margin: 0; font-size: 11px; font-weight: 800; }
.site-footer a { text-decoration: none; color: inherit; }
.site-footer .site-contact, .site-contact { background: #b91c1c; color: #fff; padding: 10px 20px; border: 0; border-radius: 8px; font: 800 12px/1.5 Inter, Arial, sans-serif; text-decoration: none; cursor: pointer; }
.site-privacy-button { background: none; border: 0; padding: 6px 0; color: #334155; font: 700 12px/1.5 Inter, Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.site-header a:focus-visible, .site-footer a:focus-visible, .site-footer button:focus-visible, .site-privacy button:focus-visible { outline: 2px solid #b91c1c; outline-offset: 4px; }
#site-content { position: relative; flex: 1 0 auto; min-height: 0 !important; padding-bottom: 0 !important; }
.site-page-actions { padding: 12px 24px; text-align: right; }
.site-page-actions button { color: #b91c1c; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 12px; background: #fff; font: 700 12px/1.5 Inter, Arial, sans-serif; cursor: pointer; }
body.site-app { height: 100dvh; overflow: hidden; }
.site-app #site-content { height: auto !important; flex: 1 1 0; overflow: hidden; }
.site-privacy { max-width: 560px; width: calc(100% - 32px); max-height: 85dvh; overflow-y: auto; padding: 28px; border: 1px solid #cbd5e1; border-radius: 16px; color: #334155; background: #fff; font: 14px/1.6 Inter, Arial, sans-serif; box-sizing: border-box; }
.site-privacy::backdrop { background: #0f172a99; }
.site-privacy h2 { margin: 0 0 16px; font-size: 20px; color: #111827; }
.site-privacy p { margin: 0 0 16px; }
.site-privacy form { text-align: right; margin: 0; }
@media (max-width: 640px) {
  .site-bar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .site-menu { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 2px 14px; }
  .site-menu a { font-size: 10.5px; letter-spacing: .1px; padding: 3px 0; }
  .site-menu-group, .site-submenu { display: contents; }
  .site-menu-group > a, .site-submenu-toggle { display: none; }
  .site-submenu a { padding: 4px 0; border-bottom: 2px solid transparent; border-radius: 0; }
  .site-submenu a:hover, .site-submenu a[aria-current="page"] { background: none; }
  .site-footer .site-bar { justify-content: center; gap: 12px 20px; }
  .site-footer p { width: 100%; text-align: center; }
}
@media (max-width: 767px) {
  #site-content.site-prompt-tool > nav { height: 240px; max-height: 240px; overflow: hidden; }
  #site-content.site-prompt-tool > nav > div:first-child { padding: 12px 16px; }
  #site-content.site-prompt-tool > nav > div:last-child { display: none; }
  #site-content.site-prompt-tool > main { min-height: 0; }
}

/* Navegación suave por bloques, con botones accesibles y discretos. */
.site-scroll-controls { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 16px; z-index: 65; display: flex; flex-direction: column; gap: 8px; }
.site-scroll-controls button { width: 44px; height: 44px; display: grid; place-items: center; padding: 10px; border: 1px solid #fecaca; border-radius: 50%; background: #fff; color: #b91c1c; box-shadow: 0 3px 12px #0f172a18; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.site-scroll-controls svg { width: 22px; height: 22px; }
.site-scroll-controls button:hover:not(:disabled) { background: #b91c1c; color: #fff; box-shadow: 0 4px 16px #b91c1c30; }
.site-scroll-controls button:focus-visible { outline: 2px solid #b91c1c; outline-offset: 3px; }
.site-scroll-controls button:disabled { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .site-scroll-controls button { transition: none; } }

/* Aviso legal compartido: lectura cómoda, cierre visible y fuentes oficiales. */
.site-privacy { max-width: 760px; margin: auto; }
.site-privacy-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; position: sticky; top: -28px; z-index: 1; background: #fff; padding: 12px 0 16px; border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; }
.site-privacy-heading h2 { margin: 0 0 6px; }
.site-privacy .site-privacy-date { font-size: 12px; color: #64748b; margin: 0; }
.site-privacy-close { width: 40px; height: 40px; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #334155; cursor: pointer; font: 26px/1 Arial, sans-serif; }
.site-privacy-intro { color: #475569; }
.site-privacy section { display: block; padding: 0; margin: 24px 0; border: 0; border-radius: 0; background: transparent; }
.site-privacy h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: #111827; line-height: 1.4; }
.site-privacy a { color: #b91c1c; text-decoration: underline; text-underline-offset: 3px; }
.site-privacy code { overflow-wrap: anywhere; font-size: 12px; }
.site-storage-list { margin: 0 0 16px; padding: 12px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.site-storage-list > div + div { margin-top: 12px; }
.site-storage-list dt { font-weight: 800; color: #334155; }
.site-storage-list dd { margin: 4px 0 0; }
.site-privacy section.site-ai-disclosure { background: #fff7f7; border: 1px solid #fecaca; border-left: 4px solid #b91c1c; border-radius: 10px; padding: 18px; }
.site-privacy .site-ai-disclosure p:last-child { margin-bottom: 0; }
.site-privacy .site-legal-references { list-style: disc; padding-left: 20px; margin: 0; }
.site-privacy .site-legal-references li { display: list-item; border: 0; margin: 0 0 12px; padding: 0; }
.site-privacy .site-legal-references li a { display: inline; font-weight: 700; }
.site-privacy .site-privacy-end { border-top: 1px solid #e2e8f0; padding-top: 16px; }

/* El reproductor ocupa el panel completo y cabe en pantallas horizontales. */
#videoModal .site-video-panel {
  width: min(896px, calc((100vh - 32px) * 16 / 9));
  width: min(896px, calc((100dvh - 32px) * 16 / 9));
  max-width: 100%;
  aspect-ratio: 16 / 9;
}
#videoModal .site-video-panel > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Tipografía y barras de desplazamiento comunes a toda la guía, como en la home. */
body { font-family: Inter, Arial, sans-serif !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #b91c1c; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #991b1b; }

/* Paleta de la home (pizarra) también en páginas que usaban grises neutros. */
body.site-page h1 { color: #000; }
body .text-gray-900, body .text-gray-800 { color: #0f172a; }
body .text-gray-700, body .text-gray-600 { color: #334155; }
body .text-gray-500 { color: #475569; }
body .text-gray-400 { color: #64748b; }
body .border-gray-200, body .border-gray-300 { border-color: #cbd5e1; }
body .border-gray-100, body .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0; }
body .bg-gray-50 { background-color: #f8fafc; }
body .bg-gray-100 { background-color: #f1f5f9; }

/* Enlaces del menú que abren otra web en otra pestaña. */
.site-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-submenu a.site-external { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.site-external::after { content: ""; flex: none; width: 11px; height: 11px; background: currentColor; opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat; }
.site-external:hover::after { opacity: 1; }
