/* Analizador morfológico (reutiliza las pestañas y los avisos de probabilidad.css y bf-tools.css) */
.pr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 4px; border-radius: 14px; background: var(--bf-surface, rgba(255,255,255,.04)); border: 1px solid var(--bf-border, rgba(130,190,255,.14)); width: max-content; max-width: 100%; }
.pr-tabs [role="tab"] { border: 0; background: transparent; color: var(--bf-text-2, #b3c2db); font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; min-height: 40px; border-radius: 10px; cursor: pointer; }
.pr-tabs [role="tab"]:hover { color: var(--bf-text, #eaf2ff); }
.pr-tabs [role="tab"][aria-selected="true"] { background: var(--primary, #8b6bff); color: #fff; }
.pr-tabs [role="tab"]:focus-visible { outline: 3px solid var(--secondary, #5ef2e0); outline-offset: 2px; }
.gx-err { min-height: 1.3em; margin: 6px 0 0; color: #f87171; font-size: .88rem; }
html.theme-light .gx-err { color: #b91c1c; }

.mf-scope { margin: 0 0 18px; border: 1px solid var(--bf-border, rgba(130,190,255,.2)); border-radius: 14px; background: var(--bf-surface, rgba(255,255,255,.04)); }
.mf-scope summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: .92rem; min-height: 44px; display: flex; align-items: center; }
.mf-scope > div { padding: 0 16px 14px; font-size: .9rem; line-height: 1.6; color: var(--bf-text-2, #b3c2db); }
.mf-scope p { margin: 8px 0; }
.mf-input { width: 100%; resize: vertical; min-height: 64px; font-size: 1.05rem; }
.mf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mf-chip { border: 1px solid var(--bf-border, rgba(130,190,255,.25)); background: transparent; color: var(--bf-text-2, #b3c2db); font: inherit; font-size: .84rem; padding: 8px 12px; min-height: 40px; border-radius: 999px; cursor: pointer; text-align: left; }
.mf-chip:hover { color: var(--bf-text, #eaf2ff); border-color: var(--primary, #8b6bff); }
.mf-chip:focus-visible { outline: 3px solid var(--secondary, #5ef2e0); outline-offset: 2px; }

.mf-out { margin-top: 16px; }
.mf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.mf-views { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.mf-views label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--bf-border, rgba(130,190,255,.25)); border-radius: 999px; font-size: .88rem; font-weight: 700; cursor: pointer; }
.mf-views input { accent-color: var(--primary, #8b6bff); width: 18px; height: 18px; }
.mf-aviso { margin: 8px 0; font-size: .9rem; color: var(--bf-text-2, #b3c2db); }
.mf-check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 700; cursor: pointer; }
.mf-check input { width: 20px; height: 20px; accent-color: var(--primary, #8b6bff); }

/* Colores por categoría */
.mf-cl-det { --mf: #38bdf8; } .mf-cl-sust { --mf: #4ade80; } .mf-cl-adj { --mf: #facc15; } .mf-cl-verbo { --mf: #fb7185; }
.mf-cl-adv { --mf: #c084fc; } .mf-cl-pron { --mf: #f97316; } .mf-cl-prep { --mf: #94a3b8; } .mf-cl-conj { --mf: #2dd4bf; }
.mf-cl-interj, .mf-cl-otro, .mf-cl-loc, .mf-cl-contr { --mf: #a3a3a3; }
html.theme-light .mf-cl-det { --mf: #0369a1; } html.theme-light .mf-cl-sust { --mf: #15803d; } html.theme-light .mf-cl-adj { --mf: #a16207; } html.theme-light .mf-cl-verbo { --mf: #be123c; }
html.theme-light .mf-cl-adv { --mf: #7e22ce; } html.theme-light .mf-cl-pron { --mf: #c2410c; } html.theme-light .mf-cl-prep { --mf: #475569; } html.theme-light .mf-cl-conj { --mf: #0f766e; }
html.theme-light .mf-cl-interj, html.theme-light .mf-cl-otro, html.theme-light .mf-cl-loc, html.theme-light .mf-cl-contr { --mf: #525252; }

.mf-sentence { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; margin: 12px 0 18px; line-height: 1.2; }
.mf-sign { font-size: 1.3rem; padding-bottom: 20px; color: var(--bf-text-2, #b3c2db); }
.mf-word { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px 6px; min-height: 48px; font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer; border: 2px solid transparent; border-bottom: 4px solid var(--mf); border-radius: 10px; background: color-mix(in srgb, var(--mf) 10%, transparent); color: var(--bf-text, #eaf2ff); }
.mf-word small { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mf); }
.mf-word:hover { background: color-mix(in srgb, var(--mf) 20%, transparent); }
.mf-word:focus-visible { outline: 3px solid var(--secondary, #5ef2e0); outline-offset: 2px; }
.mf-word.is-sel { border-color: var(--mf); background: color-mix(in srgb, var(--mf) 24%, transparent); }

/* Fichas */
.mf-card { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--bf-border, rgba(130,190,255,.2)); border-left: 5px solid var(--mf); border-radius: 12px; background: var(--bf-surface, rgba(255,255,255,.03)); }
.mf-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.mf-card__head h3 { margin: 0; font-size: 1.2rem; }
.mf-badge { font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--bf-border, rgba(130,190,255,.3)); color: var(--bf-text-2, #b3c2db); }
.mf-badge--cat { color: var(--mf); border-color: var(--mf); }
.mf-badge--alta { color: #4ade80; border-color: #4ade80; } .mf-badge--media { color: #facc15; border-color: #facc15; } .mf-badge--baja { color: #fb7185; border-color: #fb7185; }
html.theme-light .mf-badge--alta { color: #15803d; border-color: #15803d; } html.theme-light .mf-badge--media { color: #a16207; border-color: #a16207; } html.theme-light .mf-badge--baja { color: #be123c; border-color: #be123c; }
.mf-dl { margin: 0; display: grid; gap: 8px; }
.mf-dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 14px; }
.mf-dl dt { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--bf-text-2, #b3c2db); padding-top: 3px; }
.mf-dl dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 640px) { .mf-dl > div { grid-template-columns: 1fr; } }
.mf-estr { font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 1.05rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--mf) 14%, transparent); }
.mf-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mf-seg__item { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--s, #94a3b8); min-width: 48px; }
.mf-seg__item b { font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 1.05rem; }
.mf-seg__item small { font-size: .66rem; text-align: center; color: var(--s, #94a3b8); font-weight: 700; max-width: 120px; line-height: 1.25; }
.mf-t-raiz { --s: #4ade80; } .mf-t-pref { --s: #38bdf8; } .mf-t-suf { --s: #facc15; } .mf-t-inter { --s: #fb923c; } .mf-t-vt { --s: #c084fc; }
.mf-t-gen { --s: #f472b6; } .mf-t-num { --s: #2dd4bf; } .mf-t-tma { --s: #fb7185; } .mf-t-pn { --s: #a3e635; } .mf-t-encl { --s: #f97316; }
html.theme-light .mf-t-raiz { --s: #15803d; } html.theme-light .mf-t-pref { --s: #0369a1; } html.theme-light .mf-t-suf { --s: #a16207; } html.theme-light .mf-t-inter { --s: #c2410c; } html.theme-light .mf-t-vt { --s: #7e22ce; }
html.theme-light .mf-t-gen { --s: #be185d; } html.theme-light .mf-t-num { --s: #0f766e; } html.theme-light .mf-t-tma { --s: #be123c; } html.theme-light .mf-t-pn { --s: #4d7c0f; } html.theme-light .mf-t-encl { --s: #c2410c; }
.mf-base, .mf-muted { font-size: .86rem; color: var(--bf-text-2, #b3c2db); }
.mf-just, .mf-alt, .mf-notas { margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-size: .9rem; line-height: 1.55; background: color-mix(in srgb, var(--bf-text-2, #b3c2db) 8%, transparent); }
.mf-alt ul, .mf-notas ul { margin: 6px 0 0; padding-left: 1.2em; }
.mf-link { background: none; border: 0; padding: 0; color: var(--secondary, #5ef2e0); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
html.theme-light .mf-link { color: #0b6e63; }

/* Tabla de resumen */
.mf-table-wrap { overflow-x: auto; border: 1px solid var(--bf-border, rgba(130,190,255,.2)); border-radius: 12px; }
.mf-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.mf-table th, .mf-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--bf-border, rgba(130,190,255,.14)); line-height: 1.5; }
.mf-table thead th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-text-2, #b3c2db); background: color-mix(in srgb, var(--bf-text-2, #b3c2db) 8%, transparent); }
.mf-table tbody th { border-left: 4px solid var(--mf); font-size: 1rem; white-space: nowrap; }
.mf-reveal { border: 1px dashed var(--bf-border-strong, rgba(130,190,255,.45)); background: transparent; color: var(--bf-text-2, #b3c2db); font: inherit; font-size: .85rem; min-height: 40px; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.mf-reveal:hover { color: var(--bf-text, #eaf2ff); border-color: var(--primary, #8b6bff); }
.mf-crit h2 { margin: 0 0 8px; }
.mf-crit h3 { margin: 18px 0 6px; font-size: 1rem; }
.mf-crit p, .mf-crit li { line-height: 1.65; font-size: .93rem; }
.mf-crit ul { padding-left: 1.2em; }
