/* ============================================================ DIAGNÓSTICO — lectura por señales reconocidas Organización · Sucursal y áreas · Personas Una señal = afirmación de riesgo marcada "Frecuente" o "Siempre". Exporta: ScreenDiagnostico ============================================================ */ const { useState: useStateDg, useEffect: useEffectDg, useMemo: useMemoDg } = React; const DG = (() => { const RISK = ['martir', 'huerfano', 'vagabundo']; const NAME = { huerfano: 'Huérfano', vagabundo: 'Vagabundo', martir: 'Mártir', guerrero: 'Guerrero', sabio: 'Sabio', mago: 'Mago' }; const PAT = { martir: { c: 'var(--dg-desgaste)', w: 'var(--dg-desgaste-w)', label: 'Desgaste', long: 'Desgaste (Mártir)', phrase: 'el desgaste (Mártir)' }, huerfano: { c: 'var(--dg-afuera)', w: 'var(--dg-afuera-w)', label: 'Espera dirección', long: 'Espera dirección (Huérfano)', phrase: 'esperar dirección y ubicar la responsabilidad afuera (Huérfano)' }, vagabundo: { c: 'var(--dg-dispersion)', w: 'var(--dg-dispersion-w)', label: 'Dispersión', long: 'Dispersión (Vagabundo)', phrase: 'la dispersión (Vagabundo)' }, potencial: { c: 'var(--dg-potencial)', w: 'var(--dg-potencial-w)', label: 'Potencial contenido', long: 'Potencial contenido (sombra del Mago)' }, guerrero: { c: 'var(--dg-desgaste)', w: 'var(--dg-desgaste-w)', label: 'Autoexigencia', long: 'Autoexigencia (sombra del Guerrero)' }, sabio: { c: 'var(--dg-dispersion)', w: 'var(--dg-dispersion-w)', label: 'Análisis que frena', long: 'Análisis que frena (sombra del Sabio)' }, sin: { c: 'var(--ink-3)', w: 'var(--paper-2)', label: 'Sin patrón de riesgo claro', long: 'Sin patrón de riesgo claro' }, }; const LEVELS = [ { min: 10, k: 'alta', label: 'Atención alta', range: '10 o más señales', c: 'var(--risk)', w: 'var(--dg-risk-w)', tc: 'var(--risk)' }, { min: 5, k: 'media', label: 'Atención media', range: '5 a 9', c: 'var(--warn)', w: 'var(--dg-warn-w)', tc: 'var(--dg-warn-ink)' }, { min: 1, k: 'baja', label: 'Atención baja', range: '1 a 4', c: 'var(--dg-afuera)', w: 'var(--dg-afuera-w)', tc: 'var(--dg-afuera)' }, { min: 0, k: 'sin', label: 'Sin señales reconocidas', range: '0', c: 'var(--dg-muted)', w: 'var(--paper-2)', tc: 'var(--ink-3)' }, ]; const TALK = { martir: '¿Qué de tu carga actual podríamos pausar, delegar o redistribuir para que puedas sostener tu ritmo?', huerfano: '¿Qué decisión de tu trabajo te gustaría poder tomar sin esperar aprobación, y qué necesitas para hacerlo?', vagabundo: '¿Qué te ayudaría a sostener el foco en tus prioridades de esta semana?', potencial: '¿En qué podrías aportar más si tuvieras el espacio y la claridad para hacerlo?', sin: '¿Qué es lo más difícil de tu trabajo en este momento y en qué te podemos apoyar?', }; const Q = window.IH.questions; const SHADOW_OF = { mago: 'potencial', guerrero: 'guerrero', sabio: 'sabio' }; const SMALL = new Set(['de', 'del', 'la', 'las', 'los', 'y', 'e']); const pct = (k, n) => (n ? Math.round((100 * k) / n) : 0); const f1 = v => (Math.round(v * 10) / 10).toFixed(1); const tcase = s => (s || '').trim().split(/\s+/).filter(Boolean).map((w, i) => { const l = w.toLocaleLowerCase('es'); return i > 0 && SMALL.has(l) ? l : l.charAt(0).toLocaleUpperCase('es') + l.slice(1); }).join(' '); const isLead = p => /gerente|gerencia|director|coordinador|l[ií]der/i.test(p.puesto || ''); function person(p0) { const r = p0.r; const p = { ...p0, nombre: tcase(p0.nombre) || 'Sin nombre', puesto: tcase(p0.puesto) }; p.sig = {}; RISK.forEach(x => { p.sig[x] = r[x].filter(v => v >= 3).length; }); p.total = RISK.reduce((s, x) => s + p.sig[x], 0); p.sh = { potencial: [8, 9].filter(i => r.mago[i] >= 3).length, guerrero: [8, 9].filter(i => r.guerrero[i] >= 3).length, sabio: [8, 9].filter(i => r.sabio[i] >= 3).length, }; const pos = []; ['guerrero', 'sabio', 'mago'].forEach(x => { for (let i = 0; i < 8; i++) pos.push(r[x][i]); }); p.selfS = pct(pos.filter(v => v === 4).length, pos.length); const same = Object.keys(NAME).filter(x => new Set(r[x]).size === 1).length; p.flags = []; if (p.minutos < 4) p.flags.push(`contestó en ${(Math.floor(p.minutos * 10) / 10).toFixed(1)} min`); if (same >= 2) p.flags.push(`${same} bloques marcados igual`); p.level = LEVELS.find(l => p.total >= l.min); const maxSig = Math.max(...RISK.map(x => p.sig[x])); const tops = RISK.filter(x => p.sig[x] === maxSig); if (maxSig >= 2) { p.pat = tops[0]; p.patLabel = tops.map(x => PAT[x].label).join(' y '); } else if (p.sh.potencial >= 1) { p.pat = 'potencial'; p.patLabel = PAT.potencial.label; } else { p.pat = 'sin'; p.patLabel = PAT.sin.label; } const items = []; RISK.forEach(x => r[x].forEach((v, i) => { if (v >= 3) items.push({ x, i, v, c: x }); })); ['mago', 'guerrero', 'sabio'].forEach(x => [8, 9].forEach(i => { if (r[x][i] >= 3) items.push({ x, i, v: r[x][i], c: SHADOW_OF[x] }); })); items.sort((a, b) => b.v - a.v); p.items = items; p.lead = isLead(p); return p; } const admPct = (list, x, i) => pct(list.filter(p => p.r[x][i] >= 3).length, list.length); const avPct = (list, x, i) => pct(list.filter(p => p.r[x][i] >= 2).length, list.length); const avgSig = list => list.reduce((s, p) => s + p.total, 0) / (list.length || 1); function dist(vals) { const raw = [1, 2, 3, 4].map(v => (100 * vals.filter(x => x === v).length) / (vals.length || 1)); const fl = raw.map(Math.floor); const rest = 100 - fl.reduce((a, b) => a + b, 0); raw.map((v, i) => [v - fl[i], i]).sort((a, b) => b[0] - a[0]).slice(0, rest).forEach(([, i]) => { fl[i]++; }); return fl; } // Todas las afirmaciones de riesgo + las 6 de sombra, con su % de admisión function statements(list) { const out = []; RISK.forEach(x => Q[x].forEach((t, i) => out.push({ x, i, c: x, t }))); ['mago', 'guerrero', 'sabio'].forEach(x => [8, 9].forEach(i => out.push({ x, i, c: SHADOW_OF[x], t: Q[x][i] }))); return out.map(s => ({ ...s, fs: admPct(list, s.x, s.i), av: avPct(list, s.x, s.i) })) .sort((a, b) => b.fs - a.fs || b.av - a.av); } function groupBy(list, key) { const m = {}; list.forEach(p => { (m[p[key]] = m[p[key]] || []).push(p); }); return m; } // Áreas de 5+ personas y el resto agrupado function bigGroups(list) { const by = groupBy(list, 'area'); const big = Object.entries(by).filter(([, l]) => l.length >= 5).sort((a, b) => b[1].length - a[1].length); const rest = list.filter(p => by[p.area].length < 5); return rest.length ? big.concat([['Otras áreas', rest]]) : big; } function patternOf(list) { const avg = x => list.reduce((s, p) => s + p.sig[x], 0) / (list.length || 1); const best = RISK.slice().sort((a, b) => avg(b) - avg(a))[0]; return avg(best) >= 1 ? PAT[best].label : 'Sin patrón claro'; } const monthLabel = ym => { const [y, m] = ym.split('-').map(Number); return new Date(y, m - 1, 1).toLocaleDateString('es-MX', { month: 'long', year: 'numeric' }); }; return { RISK, NAME, PAT, LEVELS, TALK, Q, pct, f1, person, admPct, avPct, avgSig, dist, statements, groupBy, bigGroups, patternOf, monthLabel }; })(); /* ——— piezas ——— */ function DgChip({ c, w, children }) { return {children}; } function DgBar({ v, c, h }) { return
; } function DgAreaBars({ groups, x, i, c }) { const rows = groups.map(([a, l]) => [a, DG.admPct(l, x, i), l.length]).sort((p, q) => q[1] - p[1]); return (
{rows.map(r => (
{r[0]}{r[1]}%
))}
); } /* ——— Parte 1: organización ——— */ function DgOrg({ people, company, pendientes }) { const N = people.length; const hi5 = people.filter(p => p.total >= 5).length; const st = DG.statements(people); const top12 = st.slice(0, 12); const groups = DG.bigGroups(people); const posVals = [], riskVals = []; people.forEach(p => { ['guerrero', 'sabio', 'mago'].forEach(x => { for (let i = 0; i < 8; i++) posVals.push(p.r[x][i]); }); DG.RISK.forEach(x => { for (let i = 0; i < 8; i++) riskVals.push(p.r[x][i]); }); }); const SCALE = [['Nunca', 'var(--paper-2)'], ['A veces', 'var(--dg-muted)'], ['Frecuente', 'var(--dg-good-mid)'], ['Siempre', 'var(--good)']]; const stacks = [['Afirmaciones positivas', 'disciplina, análisis, liderazgo', DG.dist(posVals)], ['Afirmaciones de riesgo', 'dependencia, dispersión, desgaste', DG.dist(riskVals)]]; const posFS = DG.pct(posVals.filter(v => v >= 3).length, posVals.length); const leads = people.filter(p => p.lead).length; const flagged = people.filter(p => p.flags.length).length; const withSig = x => people.filter(p => p.sig[x] >= 1).length; const potN = people.filter(p => p.sh.potencial >= 1).length; const topRisk = DG.RISK.slice().sort((a, b) => withSig(b) - withSig(a))[0]; const mago8 = DG.admPct(people, 'mago', 8); const topOf = c => st.find(s => s.c === c); const topRiskSt = st.find(s => DG.RISK.includes(s.c)); // histograma const counts = {}; people.forEach(p => { counts[p.total] = (counts[p.total] || 0) + 1; }); const maxT = Math.max(0, ...people.map(p => p.total)); const bins = []; for (let t = 0; t <= Math.min(maxT, 14); t++) bins.push([String(t), counts[t] || 0, t]); if (maxT > 14) bins.push(['15+', people.filter(p => p.total >= 15).length, 15]); const maxC = Math.max(1, ...bins.map(b => b[1])); const cards = ['martir', 'huerfano', 'vagabundo', 'potencial'].map(c => { const s = topOf(c); const n = c === 'potencial' ? potN : withSig(c); return { c, s, n }; }); return (
El Sendero del Alto Rendimiento · Diagnóstico organizacional

{company.name}: {hi5} de {N} personas reconocen cinco o más señales de riesgo

El patrón de riesgo más extendido es {DG.PAT[topRisk].phrase}: {withSig(topRisk)} de {N} personas reconocen al menos una señal. Además, {mago8}% reconoce que podría dar más impacto del que da. La lectura se basa en lo que el equipo admite aunque le cueste, no en qué tan desarrollado dice estar.

{hi5} de {N}

reconocen cinco o más señales de riesgo

{DG.f1(DG.avgSig(people))}

señales de riesgo por persona, en promedio (de 30)

{topRiskSt.fs}%

"{topRiskSt.t.replace(/\.$/, '')}": la afirmación de riesgo más admitida

{mago8}%

reconoce que podría dar más impacto del que da

Cómo se describe el equipoReparto de todas las respuestas
{stacks.map(s => (
{s[0]}{s[1]}
{s[2].map((v, i) => {v >= 9 ? `${v}%` : ''})}
))}
{SCALE.map(s => {s[0]})}

En una autoevaluación la gente tiende a mostrarse bien. Por eso contamos cuántas personas marcan "Frecuente" o "Siempre" en las afirmaciones de riesgo: esa admisión es una señal confiable.

Quiénes respondieron{N} evaluaciones completas
{leads}

en puestos de mando (dirección, gerencia, coordinación o liderazgo) y {N - leads} en otros puestos.

{flagged}

respuestas muestran poca atención (menos de 4 minutos o bloques marcados igual). Están señaladas en su ficha.

{pendientes}

evaluaciones se iniciaron y no se terminaron; no se incluyen.

{Object.keys(DG.groupBy(people, 'area')).length}

áreas en {Object.keys(DG.groupBy(people, 'sucursal')).length} {Object.keys(DG.groupBy(people, 'sucursal')).length === 1 ? 'sucursal' : 'sucursales'}.

Las 12 afirmaciones que más personas admitenBarra sólida: "Frecuente" o "Siempre". Barra clara: al menos "A veces".
{top12.map(h => (
{h.t.replace(/\.$/, '')}
{h.fs}%
))}
0%25%50%75%100%
{[...new Set(top12.map(h => h.c))].map(c => {DG.PAT[c].long})}
{hi5} de {N} personas reconocen cinco o más señales de riesgoPersonas según cuántas de las 30 afirmaciones de riesgo marcaron como "Frecuente" o "Siempre"
{bins.map(b => (
{b[2] === 5 && 5 o más: {hi5} de {N}} {b[1] || ''}
= 5 ? 'var(--risk)' : 'var(--dg-muted)' }}>
))}
{bins.map(b => {b[0]})}

{counts[0] || 0} personas no reconocen ninguna señal de riesgo.

Patrones

Qué reconoce el equipo, por patrón

{cards.map(({ c, s, n }) => (
{DG.PAT[c].label}
{n} de {N}

reconocen al menos una señal. La más admitida: "{s.t.replace(/\.$/, '')}" ({s.fs}%).

{groups.length > 1 && <>Esa afirmación por área}
))}
Cómo se describe
{posFS}%

de las respuestas sobre sus fortalezas fueron "Frecuente" o "Siempre".

brecha
Lo que reconoce
{hi5} de {N}

admiten cinco o más señales de desgaste, dependencia o dispersión.

); } /* ——— Parte 2: sucursal y áreas ——— */ const DG_IND = [['Cansancio', 'martir', 0, 'martir'], ['Saturación', 'martir', 7, 'martir'], ['Da más de lo que recibe', 'martir', 1, 'martir'], ['Fallas por factores externos', 'huerfano', 3, 'huerfano'], ['Necesita instrucciones claras', 'huerfano', 0, 'huerfano'], ['Cambia de prioridades', 'vagabundo', 7, 'vagabundo'], ['Podría dar más', 'mago', 8, 'potencial']]; function DgHeatCell({ list, x, i, c }) { const k = list.filter(p => p.r[x][i] >= 3).length, n = list.length, v = DG.pct(k, n); return {n < 5 ? `${k}/${n}` : `${v}%`}; } function DgSigCell({ list }) { const v = DG.avgSig(list); return {DG.f1(v)}; } function DgOffices({ people, onPerson }) { const offices = Object.entries(DG.groupBy(people, 'sucursal')).sort((a, b) => b[1].length - a[1].length); return (
Parte 2 · Sucursal y áreas

Dónde pesa cada patrón

Primero cada sucursal y luego sus áreas. En grupos de menos de 5 personas se muestran conteos ("2/3") en lugar de porcentajes, porque una sola persona mueve mucho el resultado.

{offices.map(([off, list]) => { const areas = Object.entries(DG.groupBy(list, 'area')).sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0])); return (
Sucursal {off}{list.length} personas{areas.length} áreas{DG.f1(DG.avgSig(list))} señales de riesgo por persona{list.filter(p => p.total >= 5).length} con atención media o alta
Mapa de calor por áreaPersonas que marcaron "Frecuente" o "Siempre". Entre más intenso el color, más personas lo reconocen.
{DG_IND.map(d => )} {areas.map(([a, l]) => ( {DG_IND.map(d => )} ))} {DG_IND.map(d => )}
ÁreaSeñales por persona{d[0]}Patrón principal
{a}{l.length} {l.length === 1 ? 'persona' : 'personas'}{DG.patternOf(l)}
{off}{list.length} personas{DG.patternOf(list)}
{DG.RISK.map(x => {DG.PAT[x].long})}· Barra de cada área: señales promedio por tipo (llena = 15). El número junto a cada nombre: señales de esa persona.
{areas.map(([a, l]) => { const avg = x => l.reduce((s, p) => s + p.sig[x], 0) / l.length; return (
{a}{l.length} {l.length === 1 ? 'persona' : 'personas'}
{DG.RISK.map(x => )}
{DG.f1(DG.avgSig(l))} señales por persona{DG.patternOf(l)}
{l.slice().sort((p, q) => q.total - p.total).map(p => ( ))}
); })}
); })}
); } /* ——— Parte 3: personas ——— */ function DgCard({ p }) { const pat = DG.PAT[p.pat]; const shown = p.items.slice(0, 6); return (
{p.nombre}{[p.area, p.puesto, p.antiguedad].filter(Boolean).join(' · ')}
{p.level.label} · {p.total} {p.total === 1 ? 'señal' : 'señales'} {p.patLabel} {p.flags.length > 0 && Poco confiable: {p.flags.join(', ')}} {p.selfS >= 75 && p.total <= 1 && Todo positivo: lectura poco informativa}
Señales de riesgo por tipo
{DG.RISK.map(x =>
{DG.NAME[x]}{p.sig[x]}/10
)}
Sombras que reconoce
{[['potencial', 'Potencial contenido'], ['guerrero', 'Autoexigencia'], ['sabio', 'Análisis que frena']].map(([k, l]) => ( {[0, 1].map(i => )}{l} ))}
Lo que reconoce ({p.items.length})
{shown.length ? (
    {shown.map(it =>
  • {it.v === 4 ? 'Siempre' : 'Frecuente'}{DG.Q[it.x][it.i]}
  • )}
) :

No marcó ninguna afirmación de riesgo ni de sombra como "Frecuente" o "Siempre".

} {p.items.length > 6 && y {p.items.length - 6} más}
Para su conversación uno a uno{DG.TALK[p.pat] || DG.TALK.sin}
Se describe con "Siempre" en {p.selfS}% de sus fortalezas. Al terminar la evaluación vio: {DG.NAME[p.dominante] || p.dominante} como arquetipo dominante e índice {p.indice}/100.
); } function DgPeople({ people, focus }) { const [fArea, setFArea] = useStateDg(''); const [q, setQ] = useStateDg(''); const [sort, setSort] = useStateDg('sig'); const areas = [...new Set(people.map(p => p.area))].sort((a, b) => a.localeCompare(b)); const order = people.slice().sort((a, b) => (sort === 'name' ? a.nombre.localeCompare(b.nombre) : sort === 'area' ? a.area.localeCompare(b.area) || b.total - a.total : b.total - a.total || a.nombre.localeCompare(b.nombre))); const ok = p => (!fArea || p.area === fArea) && (!q || `${p.nombre} ${p.puesto}`.toLowerCase().includes(q.trim().toLowerCase())); const shown = order.filter(ok).length; useEffectDg(() => { if (!focus) return; setFArea(''); setQ(''); requestAnimationFrame(() => { const el = document.getElementById(`dg-p-${focus.id}`); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }); }, [focus]); const go = id => { const el = document.getElementById(`dg-p-${id}`); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }; return (
Parte 3 · Personas

Una ficha por colaborador

Cada ficha muestra cuántas señales de riesgo reconoce la persona, de qué tipo, qué afirmaciones admitió y una pregunta para abrir su conversación uno a uno.

Cómo usar esta parte. Las fichas sirven para orientar conversaciones de desarrollo, no para evaluar desempeño ni tomar decisiones de personal. Reflejan lo que cada persona dijo de sí misma en un solo momento.

Confidencialidad. Al contestar, se indicó a los colaboradores que sus respuestas eran confidenciales y que se agruparían por área y organización. Consulten esta parte solo quienes dirigen, e informen al equipo cómo se usarán los resultados.

{DG.LEVELS.map(l => {l.label} ({l.range}): {people.filter(p => p.level === l).length})}
{shown} de {people.length} personas
{order.map(p => ( ))}
ColaboradorÁreaAntigüedadSeñales de riesgoMártirHuérfanoVagabundoPodría dar másPatrónCalidad
{p.puesto} {p.area}{p.antiguedad}
{p.total}
{p.sig.martir}{p.sig.huerfano}{p.sig.vagabundo} {p.r.mago[8] >= 3 ? '●' : '·'} {p.patLabel} {p.flags.length ? Poco confiable : OK}
{order.map(p =>
)}
); } /* ——— Pantalla ——— */ function ScreenDiagnostico({ adminUser, initialCompany, onBack, onLogout }) { const isSuper = adminUser?.role === 'superadmin'; const [companies, setCompanies] = useStateDg([]); const [cid, setCid] = useStateDg(initialCompany || ''); const [data, setData] = useStateDg(null); const [loading, setLoading] = useStateDg(false); const [error, setError] = useStateDg(null); const [month, setMonth] = useStateDg(''); const [focus, setFocus] = useStateDg(null); useEffectDg(() => { if (isSuper) IHA.getCompanies().then(setCompanies).catch(() => {}); }, []); useEffectDg(() => { if (isSuper && !cid) { setData(null); return; } setLoading(true); setError(null); IHA.getDiagnostico(isSuper ? cid : undefined) .then(d => { setData(d); setMonth(''); setLoading(false); }) .catch(e => { setError(e.message || 'No se pudo cargar el diagnóstico'); setLoading(false); }); }, [cid]); const months = useMemoDg(() => (data ? [...new Set(data.personas.map(p => (p.periodo || '').slice(0, 7)).filter(Boolean))].sort().reverse() : []), [data]); const people = useMemoDg(() => (data ? data.personas.filter(p => !month || (p.periodo || '').startsWith(month)).map(DG.person) : []), [data, month]); const jump = id => { const el = document.getElementById(id); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }; return (
Diagnóstico
{isSuper && ( )} {months.length > 1 && ( )} {people.length > 0 && ( )} {loading ? 'Cargando…' : data ? `${people.length} colaboradores` : ''}
{error &&
{error}
} {isSuper && !cid && (

Elige una empresa

El diagnóstico muestra la lectura por señales reconocidas de una empresa a la vez: la organización, sus sucursales y áreas, y una ficha por colaborador.

)} {data && !people.length && !loading && (

Todavía no hay evaluaciones completas

Cuando los colaboradores de {data.company.name} terminen su evaluación, su diagnóstico aparecerá aquí.

)} {data && people.length > 0 && ( <> setFocus({ id, t: Date.now() })} />
Metodología

Cómo se calculan las cifras

Lectura por señales reconocidas

En lugar de sumar lo que cada persona dice de sí misma, se cuenta lo que admite: una señal es una afirmación de riesgo (Huérfano, Vagabundo o Mártir) marcada como "Frecuente" o "Siempre". Las sombras son las 2 afirmaciones incómodas de Mago (potencial contenido), Guerrero (autoexigencia) y Sabio (análisis que frena la acción).

Definiciones

  • Nivel de atención: alta con 10 o más señales, media con 5 a 9, baja con 1 a 4.
  • Patrón: el tipo de riesgo con más señales, si tiene al menos 2.
  • Poco confiable: contestada en menos de 4 minutos, o con dos o más bloques de 10 marcados igual.
  • Índice y arquetipo dominante: se muestran solo como referencia de lo que la persona vio al terminar; en autoevaluación tienden a inflarse.
)}
); } const DG_CSS = ` .dg { --dg-risk-w: oklch(0.56 0.13 28 / 0.10); --dg-warn-w: oklch(0.70 0.11 70 / 0.16); --dg-warn-ink: oklch(0.55 0.12 70); --dg-desgaste: oklch(0.60 0.105 62); --dg-desgaste-w: oklch(0.60 0.105 62 / 0.13); --dg-afuera: oklch(0.52 0.075 255); --dg-afuera-w: oklch(0.52 0.075 255 / 0.12); --dg-dispersion: oklch(0.56 0.075 200); --dg-dispersion-w: oklch(0.56 0.075 200 / 0.12); --dg-potencial: oklch(0.50 0.110 295); --dg-potencial-w: oklch(0.50 0.110 295 / 0.12); --dg-muted: #c9c2b3; --dg-good-mid: color-mix(in oklab, var(--good) 55%, var(--panel)); font-size: 15px; line-height: 1.55; } .dg h1, .dg h2, .dg h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; text-wrap: balance; } .dg h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; } .dg h2 { font-size: clamp(24px, 2.8vw, 31px); line-height: 1.15; } .dg h3 { font-size: 18px; font-weight: 600; } .dg p { margin: 0; } .dg .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; } .dg-top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--hair); } .dg-top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 40px; flex-wrap: wrap; } .dg-top-l { display: flex; align-items: center; gap: 20px; } .dg-top-l .sep { width: 1px; height: 22px; background: var(--hair-2); } .dg-top-l .ttl { font-size: 18px; font-weight: 600; } .dg-top-r { display: flex; gap: 10px; flex-wrap: wrap; } .dg-top-r .btn { font-size: 13px; padding: 10px 16px; } .dg-top-f { display: flex; align-items: center; gap: 16px; padding: 10px 40px; border-top: 1px solid var(--hair); background: var(--panel-soft); flex-wrap: wrap; } .dg-top-f label, .dg-controls label { display: flex; flex-direction: column; gap: 3px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); } .dg-top-f select, .dg-controls select, .dg-controls input { font: inherit; font-family: var(--sans); font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--ink); background: var(--panel); border: 1px solid var(--hair-2); border-radius: 8px; padding: 7px 10px; min-width: 200px; } .dg-top-f .cnt { margin-left: auto; font-size: 12px; color: var(--ink-3); } .dg-jump { display: flex; gap: 4px; flex-wrap: wrap; } .dg-jump button { font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; } .dg-jump button:hover { border-color: var(--hair-2); color: var(--ink); } .dg-wrap { max-width: 1180px; margin: 0 auto; padding: 32px 40px 80px; display: flex; flex-direction: column; gap: 60px; transition: opacity .2s; } .dg-error { padding: 14px 18px; background: var(--dg-risk-w); border: 1px solid var(--risk); border-radius: 8px; color: var(--risk); font-size: 13.5px; } .dg-empty { max-width: 560px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); } .dg-part { display: flex; flex-direction: column; gap: 32px; scroll-margin-top: 130px; } .dg-sec { display: flex; flex-direction: column; gap: 18px; } .dg-ph { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--ink); padding-top: 16px; } .dg-ph .num { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; } .dg-ph p { color: var(--ink-2); max-width: 74ch; } .dg-sh { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .dg-cover { display: flex; flex-direction: column; gap: 16px; } .dg-lede { font-size: 16.5px; color: var(--ink-2); max-width: 76ch; } .dg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .dg-kpi { background: var(--panel); border: 1px solid var(--hair); border-top: 3px solid var(--k); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; } .dg-kpi .big { font-family: var(--serif); font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; } .dg-kpi .big small, .dg-find .n small, .dg-gap .big small { font-size: 18px; color: var(--ink-3); } .dg-kpi p { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; } .dg-panel { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; } .dg-pt { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; } .dg-pt .t { font-family: var(--serif); font-size: 17.5px; font-weight: 600; } .dg-pt .s { font-size: 13px; color: var(--ink-3); } .dg-src { font-size: 12.5px; color: var(--ink-3); margin-top: 12px !important; } .dg-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; } .dg-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .dg-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--c); background: var(--cw); align-self: flex-start; } .dg-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; } .dg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 12px; } .dg-legend span { display: inline-flex; align-items: center; gap: 6px; } .dg-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--hair-2); } .dg-stack-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 12px; } .dg-stack-row .lab { font-size: 14px; font-weight: 500; line-height: 1.3; } .dg-stack-row .lab small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; } .dg-stack { display: flex; height: 32px; border-radius: 6px; overflow: hidden; } .dg-stack i { display: flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; white-space: nowrap; } .dg-facts { display: flex; flex-direction: column; gap: 12px; } .dg-fact { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: baseline; } .dg-fact .v { font-family: var(--serif); font-size: 26px; line-height: 1; text-align: right; } .dg-fact p { font-size: 14px; color: var(--ink-2); } .dg-hb { display: flex; flex-direction: column; gap: 9px; } .dg-hb-row { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr) 44px; gap: 14px; align-items: center; } .dg-hb-row .q { font-size: 13.5px; line-height: 1.35; } .dg-hb-track { position: relative; height: 16px; background: var(--paper-2); border-radius: 4px; } .dg-hb-track span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; } .dg-hb-row .v { font-family: var(--mono); font-weight: 600; font-size: 14px; text-align: right; } .dg-hb-axis { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr) 44px; gap: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 6px; } .dg-hb-axis div { display: flex; justify-content: space-between; } .dg-histo { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 26px; } .dg-histo .col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; position: relative; } .dg-histo .bar { width: 100%; border-radius: 4px 4px 0 0; } .dg-histo .c { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); font-weight: 600; } .dg-histo .col.cut::before { content: ""; position: absolute; left: -4px; top: -26px; bottom: 0; border-left: 1.5px dashed var(--risk); } .dg-histo .cut-label { position: absolute; top: -26px; left: 4px; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--risk); } .dg-histo-x { display: flex; gap: 6px; margin-top: 6px; } .dg-histo-x span { flex: 1 1 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--ink-3); } .dg-find { background: var(--panel); border: 1px solid var(--hair); border-top: 3px solid var(--c); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; } .dg-find .n { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--c); } .dg-find p { font-size: 13.5px; color: var(--ink-2); } .dg-ab { display: flex; flex-direction: column; gap: 6px; } .dg-ab-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; } .dg-ab-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 12.5px; } .dg-tr { height: 10px; background: var(--paper-2); border-radius: 3px; overflow: hidden; } .dg-tr i { display: block; height: 100%; border-radius: 3px; } .dg-v { font-family: var(--mono); text-align: right; font-weight: 600; font-size: 12.5px; } .dg-gap { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); margin-top: 16px; } .dg-gap .b { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; } .dg-gap .big { font-family: var(--serif); font-size: 44px; line-height: 1; } .dg-gap .b p { font-size: 14px; color: var(--ink-2); } .dg-gap .mid { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); } .dg-office { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 16px 22px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline; } .dg-office b { font-family: var(--serif); font-size: 23px; font-weight: 500; } .dg-office span { font-size: 14px; opacity: .85; } .dg-office strong { font-family: var(--mono); } .dg-heat-wrap { overflow-x: auto; } .dg-heat { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 840px; } .dg-heat th { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; text-align: center; padding: 4px 4px 8px; vertical-align: bottom; line-height: 1.35; } .dg-heat th.l, .dg-heat td.l { text-align: left; } .dg-heat th .pc { display: block; width: 24px; height: 3px; border-radius: 2px; margin: 5px auto 0; } .dg-heat td { text-align: center; font-family: var(--mono); font-weight: 600; font-size: 13px; padding: 9px 4px; border-radius: 5px; font-variant-numeric: tabular-nums; } .dg-heat td.l { font-family: var(--sans); font-size: 13.5px; white-space: nowrap; } .dg-heat td.l small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; } .dg-heat td.p { font-family: var(--sans); font-weight: 500; font-size: 12.5px; text-align: left; color: var(--ink-2); } .dg-heat tr.tot td { border-top: 2px solid var(--hair-2); } .dg-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } .dg-acard { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; } .dg-acard-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .dg-acard-h b { font-family: var(--serif); font-size: 18px; font-weight: 600; } .dg-acard-h span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); } .dg-sigbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--paper-2); } .dg-sigbar i { display: block; height: 100%; } .dg-meta2 { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); } .dg-members { display: flex; flex-wrap: wrap; gap: 6px; } .dg-member { font: inherit; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); background: var(--panel-soft); border: 1px solid var(--hair); border-radius: 999px; padding: 3px 9px 3px 4px; cursor: pointer; } .dg-member:hover { border-color: var(--gold); } .dg-member .dotn { min-width: 22px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: #fff; padding: 0 5px; } .dg-notice { border: 1px solid color-mix(in oklab, var(--warn) 45%, var(--hair)); background: var(--dg-warn-w); border-radius: var(--r-lg); padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; } .dg-levels { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); } .dg-levels span { display: inline-flex; align-items: center; gap: 6px; } .dg-levels i { width: 14px; height: 14px; border-radius: 4px; } .dg-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; } .dg-controls .count { margin-left: auto; font-size: 13px; color: var(--ink-3); } .dg-roster-wrap { overflow-x: auto; } .dg-roster { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 13.5px; } .dg-roster th { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; text-align: left; padding: 8px; border-bottom: 1px solid var(--hair-2); white-space: nowrap; } .dg-roster td { padding: 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; } .dg-roster td.n, .dg-roster th.n { text-align: center; font-family: var(--mono); } .dg-roster .sub { display: block; font-size: 12px; color: var(--ink-3); } .dg-link { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; } .dg-link:hover { text-decoration: underline; text-underline-offset: 3px; } .dg-mini { display: grid; grid-template-columns: 70px 24px; gap: 6px; align-items: center; } .dg-flag { font-size: 11.5px; color: var(--dg-warn-ink); font-weight: 600; white-space: nowrap; } .dg-okq { font-size: 12px; color: var(--ink-3); } .is-hidden { display: none !important; } .dg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .dg-cwrap { min-width: 0; display: flex; } .dg-pcard { flex: 1; background: var(--panel); border: 1px solid var(--hair); border-left: 4px solid var(--lv); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 130px; min-width: 0; } .dg-pc-left, .dg-pc-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .dg-pcard-h { display: flex; flex-direction: column; gap: 3px; } .dg-pcard-h .nm { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; } .dg-pcard-h .role { font-size: 13px; color: var(--ink-3); } .dg-chips { display: flex; flex-wrap: wrap; gap: 6px; } .dg-ptitle { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; } .dg-prow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 4px; } .dg-shadows { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink-2); } .dg-shadows > span { display: inline-flex; align-items: center; gap: 6px; } .dg-shadows .dots { display: inline-flex; gap: 3px; } .dg-shadows .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--c); } .dg-shadows .dots i.on { background: var(--c); } .dg-adm { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; } .dg-adm li { font-size: 13px; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; align-items: baseline; } .dg-adm li em { font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--c); } .dg-none, .dg-more { font-size: 12.5px; color: var(--ink-3); } .dg-talk { background: var(--gold-wash); border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; } .dg-talk b { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 2px; } .dg-saw { font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--hair); padding-top: 8px; } .dg-annex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; font-size: 14px; color: var(--ink-2); } .dg-annex h3 { font-size: 16px; margin-bottom: 6px; color: var(--ink); } .dg-annex ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; } .dg-foot { border-top: 1px solid var(--hair); padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-3); } @media (max-width: 1000px) { .dg-kpis, .dg-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dg-g2, .dg-annex, .dg-cards { grid-template-columns: minmax(0, 1fr); } .dg-top-row, .dg-top-f, .dg-wrap { padding-left: 18px; padding-right: 18px; } .dg-hb-row, .dg-hb-axis { grid-template-columns: minmax(0, 1fr) 44px; } .dg-hb-row .q { grid-column: 1 / -1; } .dg-hb-axis > span:first-child { display: none; } } @page { size: letter; margin: 13mm 12mm 14mm; } @media print { html, body { background: #fff !important; } .dg { background: #fff !important; font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .dg-wrap { max-width: none; padding: 0; gap: 24px; opacity: 1 !important; } .dg-part { gap: 20px; } .dg-break { break-before: page; } .dg-panel, .dg-find, .dg-acard, .dg-pcard, .dg-kpi, .dg-gap, .dg-notice, .dg-office, .dg-annex > div, .dg-keep, .dg-hb-row { break-inside: avoid; } .dg-ph, .dg-sh { break-inside: avoid; break-after: avoid; } .dg-panel { box-shadow: none; } .dg-panel.dg-heat-wrap, .dg-panel.dg-roster-wrap { break-inside: auto; overflow: visible; } .dg-heat, .dg-roster { min-width: 0; } .dg-heat td { padding: 5px 3px; font-size: 8.5pt; } .dg-heat tr, .dg-roster tr { break-inside: avoid; } .dg-roster { font-size: 8.5pt; } .dg-roster td, .dg-roster th { padding: 4px 5px; } .dg-roster td:first-child { width: 30%; } .dg-kpis, .dg-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dg-g2, .dg-annex, .dg-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dg-hb-row, .dg-hb-axis { grid-template-columns: minmax(0, 250px) minmax(0, 1fr) 38px; gap: 10px; } .dg-hb-row .q { grid-column: auto; font-size: 9pt; } .dg-hb-axis > span:first-child { display: block; } .dg-hb { gap: 6px; } .dg-histo { height: 130px; } .dg-kpi .big { font-size: 26pt; } .dg-find .n { font-size: 22pt; } .dg-gap .big { font-size: 30pt; } .is-hidden { display: revert !important; } .dg-cwrap.is-hidden { display: flex !important; } tr.is-hidden { display: table-row !important; } .dg-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; } .dg-pcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 6px 20px; padding: 10px 14px; font-size: 9pt; } .dg-pc-left, .dg-pc-right { gap: 7px; } .dg-saw { grid-column: 1 / -1; font-size: 7.5pt; padding-top: 5px; } .dg-pcard-h .nm { font-size: 14pt; } .dg-pcard-h .role { font-size: 8.5pt; } .dg-ptitle { font-size: 7pt; margin-bottom: 3px; } .dg-prow { font-size: 8.5pt; grid-template-columns: 74px minmax(0, 1fr) 34px; margin-bottom: 2px; } .dg-shadows { font-size: 8.5pt; gap: 4px 12px; } .dg-adm { gap: 2px; } .dg-adm li { font-size: 8.5pt; grid-template-columns: 58px minmax(0, 1fr); gap: 6px; } .dg-adm li em { font-size: 7pt; } .dg-talk { padding: 6px 9px; font-size: 8.5pt; } .dg-talk b { font-size: 7pt; } .dg-chip { font-size: 7pt; padding: 2px 7px; } } `;