/* Pipeline: every asset from request to the copy in the game (app.js "Pipeline", forge/live_link.py).
   Solid panels, no blur, and nothing moves unless a job is running or the page has just opened. */

.pl { --pl-ease: cubic-bezier(.2, .8, .2, 1); max-width: 1240px; }
.pl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.pl-head h1.title { margin-bottom: 10px; }
.pl-head .lede { margin: 0; }

/* The linked game: a quiet pill, top right. */
.pl-game { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.pl-game[hidden] { display: none; }
.pl-game:has(.pl-linkbtn) { padding: 0; border: 0; background: none; box-shadow: none; }
.pl-game .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pl-game .dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, .55); }
.pl-game strong { color: var(--text); font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pl-game em { font: 11px var(--mono); font-style: normal; color: var(--faint); padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; }
.pl-game small { font: 11px var(--mono); color: var(--faint); padding-left: 9px; border-left: 1px solid var(--line); }
.pl-linkbtn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-hi); font-weight: 600; font-size: 13px; }
.pl-linkbtn:hover { background: rgba(157, 92, 255, .22); color: #fff; }
.pl-linkbtn svg { width: 15px; height: 15px; }

/* The flow: one lit panel. Progress on top, the steps below; a step is also the filter. */
.pl-flow { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 16px; margin-bottom: 14px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(157, 92, 255, .10), transparent 46%), linear-gradient(180deg, #15151c, #0f0f14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 48px -32px rgba(0, 0, 0, .9); }
.pl-progress { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; }
.pl-pct { display: flex; align-items: flex-end; gap: 2px; flex: none; min-width: 190px; }
.pl-pct b { font: 700 56px/.82 var(--display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.pl-pct i { font: 600 22px/1 var(--display); font-style: normal; color: var(--faint); margin-right: 10px; }
.pl-pct span { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.25; }
.pl-pct span small { font: 11px var(--mono); font-weight: 400; color: var(--faint); }
.pl-stack { flex: 1; display: flex; gap: 3px; height: 8px; min-width: 0; }
.pl-stack i { flex: var(--n) 1 0; min-width: 0; border-radius: 99px; background: var(--c); transition: flex-grow .6s var(--pl-cubic-bezier(.2, .8, .2, 1)); }
.pl-stack i[style*="--n:0;"] { display: none; }

.pl-nodes { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; }
.pl-node { position: relative; display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 12px 14px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); min-width: 0;
  transition: border-color .16s, background .16s, transform .16s var(--pl-cubic-bezier(.2, .8, .2, 1)); }
.pl-node::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--c); opacity: .85; }
.pl-node b { font: 700 34px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.pl-node strong { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-node small { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-node:hover { border-color: var(--line-strong); background: var(--panel-2); transform: translateY(-1px); }
.pl-node:active { transform: none; }
.pl-node.zero b { color: var(--faint); }
.pl-node.zero::before { opacity: .25; }
.pl-node.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.pl-node.on b { color: var(--c); }
.pl-node:focus-visible, .pl-act:focus-visible, .pl-asset:focus-visible, button.pl-step:focus-visible, .pl-clear:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* What the game is missing. */
.pl-alert { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.pl-alert > svg { width: 18px; height: 18px; color: var(--brand-hi); flex: none; }
.pl-alert > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-alert strong { font-weight: 600; }
.pl-alert small { font-size: 13px; color: var(--muted); }
.pl-alert .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.pl-alert .dot.warn { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, .6); }
.pl-alert.warn { border-color: rgba(245, 158, 11, .32); background: linear-gradient(90deg, rgba(245, 158, 11, .08), var(--panel-2) 55%); }
.pl-alert button { flex: none; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pl-alert button svg { width: 15px; height: 15px; }

/* Requests from the game. */
.pl-h { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.pl-h span { font: 11px var(--mono); color: var(--muted); letter-spacing: 0; }
.pl-h small { margin-left: auto; font: 11px var(--mono); letter-spacing: 0; text-transform: none; }
.pl-reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-bottom: 6px; }
.pl-req { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); --c: #38bdf8; }
.pl-req.st-making { --c: #d2bcff; }
.pl-req.st-ready { --c: #34d399; }
.pl-req-state { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.pl-req-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pl-req p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-req-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* Filter line. */
.pl-bar { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; min-height: 32px; }
.pl-bar .grow { flex: 1; }
.pl-showing { font: 12px var(--mono); color: var(--faint); }
.pl-clear { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-hi); font: 12px var(--mono); }
.pl-clear:hover { color: #fff; }
.pl-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--control); color: var(--faint); width: min(280px, 46%); }
.pl-search:focus-within { border-color: var(--brand-line); color: var(--text); }
.pl-search svg { width: 14px; height: 14px; flex: none; }
.pl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
.pl-search input::placeholder { color: var(--faint); }

/* The table: one grid for the head and every row, so the steps line up down the page. */
.pl-table { --pl-cols: minmax(200px, 1.6fr) repeat(5, minmax(48px, 88px)) minmax(150px, .7fr); }
.pl-thead, .pl-row { display: grid; grid-template-columns: var(--pl-cols); align-items: center; }
.pl-thead { position: sticky; top: -32px; z-index: 2; height: 34px; padding: 0 10px; background: var(--panel); border-bottom: 1px solid var(--line); font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.pl-thead span { text-align: center; }
.pl-thead span:first-child { text-align: left; }
.pl-thead span:last-child { text-align: right; }
.pl-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 18px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pl-group h3 span { font: 11px var(--mono); color: var(--faint); }

.pl-row { position: relative; padding: 0 10px; height: 54px; border-radius: 10px; transition: background .12s; }
.pl-row + .pl-row::after { content: ""; position: absolute; left: 62px; right: 10px; top: 0; border-top: 1px solid var(--line-soft); }
.pl-row:hover { background: rgba(255, 255, 255, .035); }
.pl-row:hover::after, .pl-row:hover + .pl-row::after { border-color: transparent; }
.pl-row.at-stale { background: linear-gradient(90deg, rgba(245, 158, 11, .07), transparent 40%); }
.pl-enter .pl-row { animation: pl-in .38s var(--pl-ease) both; animation-delay: calc(var(--i, 0) * 16ms); }
.pl-enter .pl-node { animation: pl-in .42s var(--pl-ease) both; }
@keyframes pl-in { from { opacity: 0; transform: translateY(6px); } }

.pl-asset { display: flex; align-items: center; gap: 12px; min-width: 0; height: 100%; padding: 0; border: 0; background: none; text-align: left; }
.pl-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; background: #0a0a0e; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .12s, transform .16s var(--pl-cubic-bezier(.2, .8, .2, 1)); }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-thumb .kind-art { width: 100%; height: 100%; border-radius: 0; }
.pl-thumb .kind-art svg { width: 18px; height: 18px; }
.pl-asset:hover .pl-thumb { border-color: var(--line-strong); transform: scale(1.06); }
.pl-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pl-name strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name small { font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }

/* A step of the track: a node on a rail. The rail to the left lights up once both ends are done. */
.pl-step { position: relative; display: grid; place-items: center; height: 100%; padding: 0; border: 0; background: none; color: var(--faint); }
.pl-step::before { content: ""; position: absolute; left: -50%; right: 50%; top: 50%; height: 2px; margin-top: -1px; background: rgba(255, 255, 255, .07); }
.pl-step.first::before { display: none; }
.pl-step.lit::before { background: linear-gradient(90deg, rgba(157, 92, 255, .55), rgba(157, 92, 255, .9)); }
.pl-step i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, .2); background: var(--panel); transition: transform .16s var(--pl-cubic-bezier(.2, .8, .2, 1)), box-shadow .16s; }
.pl-row:hover .pl-step i { background: #17171d; }
.pl-step em { position: absolute; z-index: 1; top: calc(50% + 9px); font: 10px var(--mono); font-style: normal; color: var(--faint); }
.pl-step.s-done i { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 3px rgba(157, 92, 255, .14); }
.pl-step.s-na i { width: 4px; height: 4px; border: 0; background: rgba(255, 255, 255, .14); }
.pl-step.s-stale i { border-color: #f59e0b; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2), 0 0 12px rgba(245, 158, 11, .55); }
.pl-step.s-stale em { color: #fbbf24; }
.pl-step.s-edited i { border-color: #38bdf8; background: var(--panel); box-shadow: 0 0 0 3px rgba(56, 189, 248, .14); }
/* In the game: the one green on the row, so shipped reads at a glance down the last column. */
.pl-step[data-pl-peek].s-done i { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.pl-step.s-done.lit[data-pl-peek]::before { background: linear-gradient(90deg, rgba(157, 92, 255, .7), rgba(52, 211, 153, .9)); }
.pl-step.s-stale.lit::before { background: linear-gradient(90deg, rgba(157, 92, 255, .7), rgba(245, 158, 11, .9)); }
button.pl-step { cursor: pointer; }
button.pl-step:hover i { transform: scale(1.35); }
.pl-step.run i { border-color: var(--brand-hi); background: var(--panel); animation: pl-run 1.1s ease-in-out infinite; }
@keyframes pl-run { 0%, 100% { box-shadow: 0 0 0 0 rgba(157, 92, 255, .55); } 50% { box-shadow: 0 0 0 6px rgba(157, 92, 255, 0); } }

/* The next step for this asset. */
.pl-next { display: flex; justify-content: flex-end; min-width: 0; }
.pl-act { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s, transform .12s; }
.pl-act svg { width: 14px; height: 14px; stroke-width: 1.9; }
.pl-act:hover { background: color-mix(in srgb, var(--c) 20%, transparent); border-color: var(--c); color: #fff; transform: translateY(-1px); }
.pl-act:active { transform: none; }
.pl-act:disabled { opacity: .5; }
.pl-done, .pl-working { display: inline-flex; align-items: center; gap: 7px; height: 30px; font-size: 13px; color: var(--faint); white-space: nowrap; }
.pl-done svg { width: 14px; height: 14px; color: var(--ok); }
.pl-working { color: var(--brand-hi); }
.pl-working .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse-dot 1.2s ease-in-out infinite; }
.pl-working .since { font-family: var(--mono); color: var(--faint); }

.pl-empty { margin: 4px 0; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.pl-flow .pl-empty { border: 0; padding: 6px 2px; }
.pl-empty strong { color: var(--text); }
.pl-empty .actions-row { margin: 12px 0 0; }
.pl-skel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pl-skel i { height: 92px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.pl-skel.rows { grid-template-columns: 1fr; margin-top: 10px; }
.pl-skel.rows i { height: 46px; }

/* The files of one asset, by its row. Solid, and gone on the next click. */
.pl-peek { position: fixed; z-index: 60; width: 380px; max-width: calc(100vw - 24px); max-height: min(520px, calc(100vh - 80px)); overflow-y: auto; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: #16161d; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .06); animation: pl-peek .14s var(--pl-ease, ease-out); }
@keyframes pl-peek { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.pl-peek header { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.pl-peek header strong { font-size: 14px; }
.pl-peek header small, .pl-peek > p { font-size: 12px; color: var(--faint); }
.pl-peek ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-peek li { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pk-file { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pk-file b { font-size: 13px; font-weight: 600; flex: none; }
.pk-file code { flex: 1; min-width: 0; font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-file small { font: 11px var(--mono); color: var(--faint); flex: none; }
.pk-copy { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
.pk-copy span { flex: none; font: 600 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; color: var(--faint); background: rgba(255, 255, 255, .05); }
.pk-copy.st-current span { color: var(--ok); background: rgba(52, 211, 153, .12); }
.pk-copy.st-stale span { color: #fbbf24; background: rgba(245, 158, 11, .14); }
.pk-copy code, .pk-edited code { font: 11px var(--mono); color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.pk-edited { margin: 10px 0 0; line-height: 1.5; }
.pk-edited code { display: block; color: #7dd3fc; }
.pl-peek footer { display: flex; gap: 6px; margin-top: 12px; }
.pl-note-text { width: 100%; font: 12px/1.5 var(--mono); background: var(--control); border: 1px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }

.sec .pl-badge { margin-left: auto; color: #fbbf24; background: rgba(245, 158, 11, .12); }

@container (max-width: 900px) {
  .pl-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pl-nodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pl-progress { flex-direction: column; align-items: stretch; gap: 12px; }
  .pl-stack { flex: none; }
  .pl-table { --pl-cols: minmax(150px, 1fr) repeat(5, 30px) auto; }
  .pl-thead span:not(:first-child):not(:last-child) { visibility: hidden; }
  .pl-step em { display: none; }
  .pl-alert { flex-wrap: wrap; }
}
@container (max-width: 560px) {
  .pl-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-act { padding: 0 8px; font-size: 0; gap: 0; }
  .pl-act svg { width: 16px; height: 16px; }
  .pl-done { font-size: 0; }
  .pl-thumb { width: 32px; height: 32px; }
  .pl-row + .pl-row::after { left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-enter .pl-row, .pl-enter .pl-node, .pl-peek, .pl-step.run i { animation: none; }
  .pl-stack i, .pl-node, .pl-act, .pl-thumb { transition: none; }
}

/* Half in: the picture is in the game, the model is not. */
.pl-step.s-partial i { border-color: var(--ok); background: linear-gradient(90deg, var(--ok) 50%, var(--panel) 50%); box-shadow: 0 0 0 3px rgba(52, 211, 153, .12); }

/* Narrow pages: nothing may be wider than the page. */
.pl-game { max-width: 100%; min-width: 0; }
.pl-game strong { min-width: 0; }
@container (max-width: 560px) {
  .pl-game small { display: none; }
  .pl-search { width: 100%; }
  .pl-bar { flex-wrap: wrap; }
  .pl-bar .grow { display: none; }
  .pl-reqs { grid-template-columns: 1fr; }
  .pl-table { --pl-cols: minmax(0, 1fr) repeat(5, 22px) auto; }
  .pl-name small { display: none; }
}
@container (max-width: 900px) { .pl-thead { position: static; } }
