@layer ficha {

@scope (.cos-ficha) {
:scope { --realce: var(--il-blau-fosc); --realce-clar: var(--il-cel); }
.pg { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5mm; }
.pg-un { grid-template-rows: minmax(0, 1fr) minmax(0, 1.1fr); }
.pg-dos { grid-template-rows: minmax(0, .95fr) minmax(0, 1.05fr) minmax(0, .85fr); }
.pg .ex { height: 100%; }
.pg .ex-cos { display: grid; min-height: 0; }
.lateral { grid-template-columns: minmax(0, 1fr) 30mm; }
.lateral.esq { grid-template-columns: 30mm minmax(0, 1fr); }


.reptes { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 3mm; min-height: 0; }
.repte { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1mm; padding: 2mm 3mm; border: 2px solid var(--realce); border-radius: var(--radi); background: var(--realce-clar); min-height: 0; }
.ordre-robot { display: flex; align-items: center; justify-content: space-between; gap: 4mm; font-weight: 700; font-size: var(--t-l); line-height: 1.25; }
.xip { flex: none; padding: 0 .8em; font-size: var(--t-xl); line-height: 1.3; white-space: pre; color: var(--paper); background: var(--il-blau-fosc); border-radius: 999px; }
.recta-situa { --m: 2em; position: relative; align-self: center; padding-top: 1.1em; }
.recta-situa .eix { padding-bottom: 1.9em; }
.recta-situa .situa-eix { height: 1.8em; }
.recta-situa .eix-num { font-size: .92em; }
.surt { position: absolute; top: .1em; left: calc(var(--m) + (100% - 2 * var(--m)) * var(--p)); width: 1em; height: 1em; transform: translateX(-50%); background: var(--il-vermell); clip-path: polygon(0 0, 100% 0, 50% 100%); }


.salts { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 3mm; min-height: 0; }
.salt { display: grid; grid-template-rows: auto auto; align-content: center; gap: 2mm; padding: 2mm 3mm; border: 2px solid var(--realce); border-radius: var(--radi); background: var(--paper); min-height: 0; }
.salt .tira { height: auto; }
.salt:has(.resp) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; gap: 4mm; }
.tira .fons { fill: var(--realce-clar); }
.tira .eix-l { stroke: var(--il-contorn); stroke-width: 1.2; }
.tira .eix-t { stroke: var(--il-contorn); stroke-width: .9; }
.tira .arc { fill: none; stroke: var(--il-vermell); stroke-width: 1.8; stroke-linecap: round; }
.tira .ini { fill: var(--il-vermell); stroke: var(--il-contorn); stroke-width: .8; }
.tira .punta { fill: var(--il-vermell); }
.tira .et { fill: var(--il-vermell); }
.resp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; font-weight: 700; font-size: var(--t-l); }
.resp.op { flex-direction: row; gap: 2mm; font-size: var(--t-xl); white-space: nowrap; }
.resp .r.caixa { height: 11mm; width: 16mm; padding: 0; line-height: 1; }
.salt:has(.opcions) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; gap: 4mm; }
.opcions { display: flex; flex-direction: column; align-items: flex-start; gap: 2mm; }

}
}
