/* ============================================================
   EFFLUX — 3D pipeline (phase-progression chevron chart)
   Extruded chevrons via clip-path + stacked drop-shadows.
   ============================================================ */

.pl {
  --phase-cols: 5;
  --chev-h: 26px;
  --tip: 15px;
  --depth-x: 5px;
  --depth-y: 6px;
  --name-w: 184px;
  --ind-w: 140px;
  font-family: var(--font-sans);
  user-select: none;
}
.pl--compact { --chev-h: 22px; --tip: 13px; --name-w: 150px; --ind-w: 0px; }
.pl--compact .pl__combo { display: none; }
.pl--compact .pl__name b { white-space: normal; }

/* header */
.pl__head {
  display: grid;
  grid-template-columns: var(--name-w) var(--ind-w) 1fr;
  align-items: end;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}
.pl--compact .pl__head { grid-template-columns: var(--name-w) 1fr; }
.pl__h {
  font: 500 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3);
}
.pl__phases { display: grid; grid-template-columns: repeat(var(--phase-cols), 1fr); }
.pl__phase {
  font: 500 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-2); padding-left: 10px;
  border-left: 1px solid var(--line);
}
.pl__phase:first-child { border-left: 0; padding-left: 2px; }

/* rows */
.pl__row {
  display: grid;
  grid-template-columns: var(--name-w) var(--ind-w) 1fr;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pl--compact .pl__row { grid-template-columns: var(--name-w) 1fr; min-height: 46px; }
.pl__row--lead { background: linear-gradient(90deg, var(--teal-7), rgba(229,241,241,0) 70%); box-shadow: inset 3px 0 0 var(--spark); }

.pl__name { display: flex; flex-direction: column; gap: 3px; padding-right: 14px; margin-left: 8px; }
.pl__nm-top { display: flex; align-items: center; gap: 8px; }
.pl__name b {
  font: 600 12px/1.12 var(--font-sans); text-transform: uppercase; letter-spacing: 0.015em; color: var(--ink); white-space: nowrap;
}
.pl--compact .pl__name b { font-size: 12px; }
.pl__name .pl__combo { font: 400 10px/1.2 var(--font-mono); letter-spacing: 0.01em; color: var(--ink-3); text-transform: none; white-space: nowrap; }
.pl__lead-tag {
  font: 500 8.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: var(--spark); padding: 3px 5px; white-space: nowrap;
}
.pl__ind { font: 400 13px/1.3 var(--font-sans); color: var(--ink-2); }
.pl--compact .pl__ind { display: none; }

/* track */
.pl__track {
  position: relative; height: 100%;
  display: grid; grid-template-columns: repeat(var(--phase-cols), 1fr);
}
.pl__cell { border-left: 1px solid var(--line); }
.pl__cell:first-child { border-left: 0; }

/* the extruded chevron */
.pl__chev {
  position: absolute; top: 50%; left: 0;
  height: var(--chev-h);
  transform: translateY(-50%);
  background:
    linear-gradient(180deg, var(--teal-4) 0%, var(--teal-3) 42%, var(--teal-2) 100%);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%);
  filter:
    drop-shadow(1px 1.1px 0 var(--ext-teal))
    drop-shadow(2px 2.3px 0 var(--ext-teal))
    drop-shadow(3px 3.5px 0 var(--ext-teal))
    drop-shadow(4px 4.7px 0 var(--ext-teal))
    drop-shadow(var(--depth-x) var(--depth-y) 0 var(--ext-teal))
    drop-shadow(6px 11px 9px rgba(8,32,36,0.26));
  transition: transform .2s cubic-bezier(.2,.7,.2,1), filter .2s;
}
.pl__chev::before { /* top highlight bevel */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 38%);
  clip-path: inherit;
}
.pl__row:hover .pl__chev {
  transform: translateY(calc(-50% - 2px));
  filter:
    drop-shadow(1px 1.1px 0 var(--ext-teal))
    drop-shadow(2px 2.3px 0 var(--ext-teal))
    drop-shadow(3px 3.5px 0 var(--ext-teal))
    drop-shadow(4px 4.7px 0 var(--ext-teal))
    drop-shadow(5px 6px 0 var(--ext-teal))
    drop-shadow(7px 14px 12px rgba(8,32,36,0.32));
}

/* lead chevron — deeper teal */
.pl__chev--lead {
  background: linear-gradient(180deg, var(--teal-3) 0%, var(--teal-2) 45%, var(--teal-1) 100%);
}

/* planned / dashed ghost extension */
.pl__chev--planned {
  background: var(--teal-7);
  filter: none;
  outline: 1.5px dashed var(--teal-4);
  outline-offset: -1.5px;
  opacity: .9;
}
.pl__chev--planned::before { display: none; }

/* phase tip marker label (optional small caps under tip handled in JS) */

/* entrance animation */
.pl__chev { transform-origin: left center; }
.pl[data-animate] .pl__chev {
  clip-path: polygon(0 0, 0 0, 0 50%, 0 100%, 0 100%);
  opacity: 0;
}
.pl[data-animate].in .pl__chev {
  animation: chevGrow .85s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes chevGrow {
  from { clip-path: polygon(0 0, 0 0, 0 50%, 0 100%, 0 100%); opacity: 0; }
  60%  { opacity: 1; }
  to   { clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pl[data-animate] .pl__chev { clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%); opacity: 1; animation: none; }
}

/* legend */
.pl__legend { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; }
.pl__leg { display: inline-flex; align-items: center; gap: 9px; font: 400 12px/1 var(--font-sans); color: var(--ink-2); }
.pl__swatch { width: 26px; height: 13px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%); }
.pl__swatch--active { background: var(--teal-2); }
.pl__swatch--planned { background: var(--teal-7); outline: 1.4px dashed var(--teal-4); outline-offset: -1.4px; }

@media (max-width: 760px) {
  .pl { --name-w: 116px; --ind-w: 0px; --chev-h: 20px; }
  .pl__head { grid-template-columns: var(--name-w) 1fr; }
  .pl__row { grid-template-columns: var(--name-w) 1fr; }
  .pl__ind { display: none; }
  .pl__phase { font-size: 9px; }
}
