/* ═══════════════════════════════════════════════════════════════════════════
   Revisar ortografía (F7) · el panel y los subrayados (v1.83)
   Msc. Néstor Fabio Montoya Palacios · Estudio Científico Pro · 2026
   Los subrayados son ::highlight(): no tocan el texto que se guarda.
   ═══════════════════════════════════════════════════════════════════════════ */
.esci-orto { position: fixed; z-index: 60; width: 360px; max-width: calc(100vw - 16px); max-height: calc(100vh - 140px); overflow: auto;
  display: flex; flex-direction: column; gap: 7px; padding: 8px 10px 10px;
  background: var(--chassis); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-2, 0 6px 22px rgba(0,0,0,.18)); font-size: 13px; }
.esci-orto[hidden] { display: none; }
.esci-orto-cab { display: flex; align-items: center; gap: 7px; }
.esci-orto-cab > i { color: var(--accent); }
.esci-orto-cab b { font-weight: 600; }
.esci-orto-cuenta { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.esci-orto-x { border: 1px solid transparent; background: none; color: var(--ink-2); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.esci-orto-x:hover { border-color: var(--line); color: var(--accent); }
.esci-orto-modo { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.esci-orto-modo.is-web { background: var(--warn-soft); color: var(--ink-2); border-radius: 6px; padding: 6px 8px; }
.esci-orto-tipo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.esci-orto-tipo.is-palabra, .esci-orto-tipo.is-error { color: var(--bad); }
.esci-orto-tipo.is-ciencia { color: var(--accent); }
.esci-orto-tipo.is-norma { color: var(--ok); }
.esci-orto-msg { font-weight: 500; line-height: 1.35; }
.esci-orto-bien { color: var(--ok); }
.esci-orto-ctx { background: var(--paper); border: 1px solid var(--line-soft, var(--line)); border-radius: 6px; padding: 6px 8px; line-height: 1.45;
  font-family: var(--serif, inherit); white-space: pre-wrap; overflow-wrap: anywhere; }
.esci-orto-ctx:empty { display: none; }
.esci-orto-ctx mark { background: rgba(255, 128, 0, .35); color: inherit; border-radius: 2px; padding: 0 1px; }
.esci-orto-sugs { display: flex; flex-direction: column; gap: 2px; max-height: 170px; overflow: auto; }
.esci-orto-sug { text-align: left; border: 1px solid transparent; background: var(--surface); color: var(--ink); border-radius: 5px; padding: 4px 8px; cursor: pointer; font: inherit; }
.esci-orto-sug:hover { border-color: var(--line); }
.esci-orto-sug.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.esci-orto-nada { font-size: 12px; color: var(--ink-3); padding: 2px 0; }
.esci-orto-acc, .esci-orto-nav { display: flex; flex-wrap: wrap; gap: 5px; }
.esci-orto-b { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.esci-orto-b:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.esci-orto-b:disabled { opacity: .45; cursor: default; }
.esci-orto-b[hidden] { display: none; }
.esci-orto-b.is-primario { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.esci-orto-b.is-primario:hover:not(:disabled) { background: var(--accent-hi, var(--accent)); color: var(--on-accent, #fff); }
.esci-orto-b.is-chico { padding: 3px 8px; font-size: 12px; }
.esci-orto-opc { border-top: 1px solid var(--line); padding-top: 6px; }
.esci-orto-opc summary { cursor: pointer; color: var(--ink-2); font-size: 12.5px; }
.esci-orto-opc-caja { display: flex; flex-direction: column; gap: 5px; padding-top: 6px; }
.esci-orto-chk { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; line-height: 1.3; cursor: pointer; }
.esci-orto-chk input { margin-top: 2px; }
.esci-orto-mio-tit { font-weight: 600; font-size: 12.5px; margin-top: 4px; }
.esci-orto-mio-lista { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.esci-orto-mia { display: inline-flex; align-items: center; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill, 999px); padding: 1px 3px 1px 8px; font-size: 12px; }
.esci-orto-mia button { border: none; background: none; color: var(--ink-3); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; }
.esci-orto-mia button:hover { color: var(--bad); background: var(--bad-soft); }

/* lo que encuentra el panel (todo, suave) y el aviso actual (fuerte) */
::highlight(esci-orto) { text-decoration: underline wavy rgba(46, 110, 220, .75); text-decoration-thickness: 1.5px; }
::highlight(esci-orto-actual) { background-color: rgba(255, 128, 0, .45); }
/* con el panel cerrado: las reglas de ciencias, en azul (el rojo es del corrector) */
::highlight(esci-orto-vivo) { text-decoration: underline wavy rgba(46, 110, 220, .8); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
