/*
 * Proposal E: shared colorblind-safe work-history timeline tokens and SVG encodings.
 * Every category carries color + SVG pattern texture + direct label/title.
 */
:root {
  --tl-dep: #2A62C9;      /* dependencia: solid */
  --tl-aut: #DB8A14;      /* autonomo: 45deg stripes */
  --tl-mono: #2BB3B1;     /* monotributo: dots */
  --tl-casas: #2E8B3E;    /* casas particulares: vertical stripes */
  --tl-mora: #B4479A;     /* moratoria: dashed outline */
  --tl-gap-ok: #6B7A84;   /* hueco regularizable: light hatch */
  --tl-gap-bad: #B83232;  /* hueco sin via: red hatch */
  --tl-surface: #FFFDF9;
  --tl-ink: #0F1B24;
  --tl-ink-2: #4A5862;
  --tl-grid: #DDE3E6;
}

.tl { display: block; width: 100%; overflow: visible; font-variant-numeric: tabular-nums; }
.tl text { fill: var(--tl-ink); font-size: 13px; }
.tl .t-sub { fill: var(--tl-ink-2); font-size: 12px; }
.tl .t-axis { fill: var(--tl-ink-2); font-size: 12px; }
.tl .t-mark { font-size: 12px; font-weight: 600; }
.tl .grid { stroke: var(--tl-grid); stroke-width: 1; }
.tl .mark { stroke: var(--tl-ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tl .mark.today { stroke-dasharray: none; stroke-width: 2; }
.tl .seg { stroke: var(--tl-surface); stroke-width: 2; cursor: pointer; }
.tl .seg-dep { fill: var(--tl-dep); }
.tl .seg-aut { fill: url(#p-aut); }
.tl .seg-mono { fill: url(#p-mono); }
.tl .seg-casas { fill: url(#p-casas); }
.tl .seg-gap-ok { fill: url(#p-gap-ok); }
.tl .seg-gap-bad { fill: url(#p-gap-bad); }
.tl .seg-mora { fill: color-mix(in srgb, var(--tl-mora) 14%, var(--tl-surface)); stroke: var(--tl-mora); stroke-dasharray: 5 3; }
.tl .seg-simul { fill: var(--tl-dep); }
.tl .seg-excluido { opacity: 0.35; stroke-dasharray: 3 2; }
.tl .f-aut { fill: var(--tl-aut); }
.tl .f-aut-bg { fill: color-mix(in srgb, var(--tl-aut) 55%, var(--tl-surface)); }
.tl .f-mono { fill: color-mix(in srgb, var(--tl-mono) 45%, #0F1B24); }
.tl .f-mono-bg { fill: var(--tl-mono); }
.tl .f-casas { fill: var(--tl-casas); }
.tl .f-casas-bg { fill: color-mix(in srgb, var(--tl-casas) 60%, var(--tl-surface)); }
.tl .f-gap-ok { fill: var(--tl-gap-ok); }
.tl .f-gap-ok-bg { fill: color-mix(in srgb, var(--tl-gap-ok) 12%, var(--tl-surface)); }
.tl .f-gap-bad { fill: var(--tl-gap-bad); }
.tl .f-gap-bad-bg { fill: color-mix(in srgb, var(--tl-gap-bad) 10%, var(--tl-surface)); }
.tl .bracket { fill: none; stroke: var(--tl-ink-2); stroke-width: 1.25; }
.tl .lane-empty { fill: var(--line-2); }

.tl .seg:hover, .tl .seg:focus { stroke: var(--tl-ink); outline: none; }
.tl .draw { animation: tl-draw 1.2s cubic-bezier(.3,.7,.2,1) both; }
@keyframes tl-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .tl .draw { animation: none; } }

/* Legend swatches (HTML) */
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--tl-ink-2); }
.tl-legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 22px; height: 12px; border-radius: 2px; flex: none; vertical-align: middle; }
.sw-dep { background: var(--tl-dep); }
.sw-aut { background: repeating-linear-gradient(45deg, var(--tl-aut) 0 3px, color-mix(in srgb, var(--tl-aut) 55%, #fff) 3px 6px); }
.sw-mono { background: radial-gradient(circle, color-mix(in srgb, var(--tl-mono) 45%, #0F1B24) 1.6px, var(--tl-mono) 2px) 0 0 / 6px 6px; }
.sw-casas { background: repeating-linear-gradient(90deg, var(--tl-casas) 0 3px, color-mix(in srgb, var(--tl-casas) 60%, #fff) 3px 6px); }
.sw-mora { background: color-mix(in srgb, var(--tl-mora) 14%, #fff); outline: 1.5px dashed var(--tl-mora); outline-offset: -1.5px; }
.sw-gap-ok { background: repeating-linear-gradient(-45deg, var(--tl-gap-ok) 0 1.5px, color-mix(in srgb, var(--tl-gap-ok) 12%, #fff) 1.5px 6px); }
.sw-gap-bad { background: repeating-linear-gradient(-45deg, var(--tl-gap-bad) 0 1.5px, color-mix(in srgb, var(--tl-gap-bad) 10%, #fff) 1.5px 6px); }
.sw-simul { background: var(--tl-dep); height: 5px; }
