/* knowledge.css — estilos canónicos del contenido de un artículo de Knowledge renderizado (.kn-doc).
   Compartido por buscar y la pwa. Cada app define los tokens --kn-* (colores/tipografía) en un contenedor;
   acá se leen con fallback a variables internas (--_x): una variable nunca se referencia a sí misma. */
.kn-doc {
  --_text: var(--kn-text, #1a1e21); --_muted: var(--kn-muted, #5b6470); --_accent: var(--kn-accent, #bf2a3f);
  --_link: var(--kn-link, #2e455c); --_line: var(--kn-line, #e3e6ea); --_soft: var(--kn-soft, #f2f4f7);
  --_font: var(--kn-font, 'DM Sans', system-ui, sans-serif); --_display: var(--kn-display, 'Kanit', system-ui, sans-serif);
  color: var(--_text); font-family: var(--_font); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere;
}
.kn-doc h1, .kn-doc h2, .kn-doc h3, .kn-doc h4, .kn-doc h5, .kn-doc h6 { font-family: var(--_display); font-weight: 600; line-height: 1.2; letter-spacing: -.005em; margin: 1.4em 0 .5em; color: var(--_text); scroll-margin-top: 84px; }
.kn-doc h1 { font-size: 1.75em; font-weight: 700; }
.kn-doc h2 { font-size: 1.4em; padding-bottom: .25em; border-bottom: 2px solid var(--_line); }
.kn-doc h3 { font-size: 1.15em; }
.kn-doc h4, .kn-doc h5, .kn-doc h6 { font-size: 1em; }
.kn-doc h2::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .45em; border-top: 3px solid var(--_accent); border-left: 3px solid var(--_accent); transform: skewX(-14deg); vertical-align: .15em; }
.kn-doc p { margin: .55em 0; }
.kn-doc p:empty, .kn-doc div:empty { margin: 0; }
.kn-doc ul, .kn-doc ol { margin: .5em 0; padding-left: 1.6em; }
.kn-doc li { margin: .22em 0; }
.kn-doc li.kn-nested { list-style: none; }
.kn-doc a { color: var(--_link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--_link) 40%, transparent); text-underline-offset: 2px; }
.kn-doc a:hover { text-decoration-color: var(--_link); }
.kn-doc strong, .kn-doc b { font-weight: 600; }
.kn-doc hr { border: 0; border-top: 1px solid var(--_line); margin: 1.4em 0; }
.kn-doc blockquote { margin: .8em 0; padding: .4em 1em; border-left: 3px solid var(--_accent); background: var(--_soft); color: var(--_muted); }
.kn-doc pre { background: var(--_soft); border: 1px solid var(--_line); padding: .8em 1em; overflow-x: auto; font-size: .9em; line-height: 1.5; }
.kn-doc code { background: var(--_soft); padding: .05em .35em; font-size: .92em; }
.kn-doc pre code { background: none; padding: 0; }
.kn-doc .kn-small { font-size: .85em; }
.kn-doc .kn-muted { color: var(--_muted); }
.kn-doc .kn-bold { font-weight: 600; }
.kn-doc .kn-italic { font-style: italic; }
.kn-doc .kn-center { text-align: center; }
.kn-doc .kn-right { text-align: right; }
.kn-doc .kn-left { text-align: left; }
.kn-doc .kn-float-right { float: right; margin: 0 0 .5em 1em; }
.kn-doc .kn-float-left { float: left; margin: 0 1em .5em 0; }
/* Paleta del editor de Odoo (text-o-color-N / bg-o-color-N) tal como la ve el autor en el ERP */
.kn-doc .kn-c1 { color: #714b67; } .kn-doc .kn-c2 { color: #017e84; } .kn-doc .kn-c3 { color: #8f8f8f; } .kn-doc .kn-c4 { color: #ffffff; } .kn-doc .kn-c5 { color: #383e45; }
.kn-doc .kn-bg1 { background-color: #714b67; color: #fff; } .kn-doc .kn-bg2 { background-color: #017e84; color: #fff; } .kn-doc .kn-bg3 { background-color: #f3f2f2; } .kn-doc .kn-bg4 { background-color: #ffffff; } .kn-doc .kn-bg5 { background-color: #383e45; color: #fff; }
/* Imágenes y tablas */
.kn-doc img.kn-img { max-width: 100%; height: auto; display: inline-block; margin: .4em 0; }
.kn-doc .kn-table { overflow-x: auto; margin: .8em 0; max-width: 100%; }
.kn-doc table { border-collapse: collapse; width: auto; max-width: 100%; font-size: .94em; }
.kn-doc td, .kn-doc th { border: 1px solid var(--_line); padding: .4em .6em; vertical-align: top; text-align: left; }
.kn-doc th { background: var(--_soft); font-weight: 600; }
.kn-doc td p, .kn-doc th p { margin: 0; }
/* Checklists */
.kn-doc ul.kn-checklist { list-style: none; padding-left: .2em; }
.kn-doc ul.kn-checklist > li { position: relative; padding-left: 1.7em; }
.kn-doc ul.kn-checklist > li::before { content: ""; position: absolute; left: 0; top: .32em; width: .95em; height: .95em; border: 1.5px solid var(--_muted); background: #fff; }
.kn-doc ul.kn-checklist > li.kn-checked::before { background: var(--_link); border-color: var(--_link); }
.kn-doc ul.kn-checklist > li.kn-checked::after { content: ""; position: absolute; left: .3em; top: .4em; width: .3em; height: .55em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.kn-doc ul.kn-checklist > li.kn-checked { color: var(--_muted); text-decoration: line-through; }
/* Estrellas (valoración del editor) */
.kn-doc .kn-stars { white-space: nowrap; letter-spacing: .05em; }
.kn-doc .kn-star::before { content: "☆"; color: var(--_muted); font-style: normal; }
.kn-doc .kn-star.kn-on::before { content: "★"; color: #d9a400; }
/* Columnas del editor */
.kn-doc .kn-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1em; }
/* Bloques propios de Knowledge convertidos */
.kn-doc .kn-file, .kn-doc .kn-video { display: inline-flex; align-items: center; gap: .6em; max-width: 100%; margin: .35em .4em .35em 0; padding: .5em .8em; border: 1px solid var(--_line); background: #fff; color: var(--_text); text-decoration: none; font-weight: 500; line-height: 1.2; transition: border-color .15s, transform .15s; }
.kn-doc a.kn-file:hover, .kn-doc a.kn-video:hover { border-color: var(--_link); transform: translateY(-1px); }
.kn-doc .kn-file svg, .kn-doc .kn-video svg, .kn-doc .kn-banner > svg, .kn-doc .kn-odoo svg { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.kn-doc .kn-file-ext { font-family: var(--_display); font-size: .7em; font-weight: 600; letter-spacing: .06em; padding: .15em .4em; background: var(--_link); color: #fff; }
.kn-doc .kn-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.kn-doc .kn-file-off { opacity: .6; }
.kn-doc .kn-video { color: var(--_accent); border-color: color-mix(in srgb, var(--_accent) 35%, transparent); }
.kn-doc .kn-index { margin: .8em 0; padding: .6em 1em; border: 1px solid var(--_line); background: var(--_soft); }
.kn-doc .kn-index ul { list-style: none; padding-left: 0; margin: 0; }
.kn-doc .kn-index ul ul { padding-left: 1.2em; }
.kn-doc .kn-index li { margin: .25em 0; }
.kn-doc .kn-index a { text-decoration: none; font-weight: 500; }
.kn-doc .kn-index a:hover { text-decoration: underline; }
.kn-doc .kn-clip { margin: 1em 0; border: 1px dashed var(--_muted); padding: .2em 1em .8em; background: #fff; }
.kn-doc .kn-clip-label { display: inline-block; margin: -.75em 0 .4em -1em; padding: .1em .6em; font-family: var(--_display); font-size: .72em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--_muted); color: #fff; }
.kn-doc .kn-banner { display: flex; gap: .7em; align-items: flex-start; margin: 1em 0; padding: .8em 1em; border: 1px solid; border-left-width: 4px; }
.kn-doc .kn-banner > svg { margin-top: .15em; }
.kn-doc .kn-banner-body { flex: 1; min-width: 0; }
.kn-doc .kn-banner-body > :first-child { margin-top: 0; }
.kn-doc .kn-banner-body > :last-child { margin-bottom: 0; }
.kn-doc .kn-banner-info { border-color: #2e455c; background: #eef3f8; color: #1f3246; }
.kn-doc .kn-banner-warning { border-color: #d9a400; background: #fff8e1; color: #5f4500; }
.kn-doc .kn-banner-success { border-color: #3f8f3a; background: #eef8ed; color: #1f4a1c; }
.kn-doc .kn-banner-danger { border-color: #bf2a3f; background: #fdeef0; color: #6b1420; }
.kn-doc .kn-odoo { display: inline-flex; align-items: center; gap: .4em; padding: .1em .5em; border: 1px dashed var(--_line); color: var(--_muted); font-size: .9em; }
.kn-doc .kn-odoo-block { display: flex; margin: .8em 0; padding: .6em .9em; }
