/* ---------- System Visual ---------- */
.sys{
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  display:flex;
  flex-direction: column;
  overflow: hidden;
  /* no shadow — elevation is the 1px border + warm canvas behind */
}

/* outer annotation marks */
.sys-outer{
  position: relative;
  width: 100%;
}
.sys-outer .ano{
  position: absolute;
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex; align-items:center; gap: 8px;
  font-weight: 400;
}
.sys-outer .ano .ln{ height:1px; background: var(--ghost); display: inline-block; }
.sys-outer .ano.top-r{ top: -22px; right: 4px; }
.sys-outer .ano.top-r .ln{ width: 32px; }
.sys-outer .ano.bot-l{ bottom: -22px; left: 4px; }
.sys-outer .ano.bot-l .ln{ width: 32px; }

/* header bar */
.sys-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
  gap: 12px;
  font-weight: 400;
}
.sys-head .id{
  display:flex; align-items:center; gap: 8px;
  color: var(--fg);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 11px;
}
.sys-head .id .sq{
  width: 6px; height: 6px;
  background: var(--fg);
  border-radius: 1px;
}
.sys-head .id .sep{ color: var(--faint); }
.sys-head .meta{
  display:flex; align-items:center; gap: 12px;
  flex: 0 0 auto;
}
.sys-head .live{
  display:inline-flex; align-items:center; gap: 6px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 11px;
}
.sys-head .live::before{
  content:""; width:5px; height:5px; border-radius:50%;
  background: var(--state-pos);
}

/* ---------- Pipeline rail ---------- */
.sys-rail{
  position: relative;
  padding: 28px 22px 22px;
  border-bottom: 1px solid var(--line);
}
.sys-rail .axis{
  position:absolute;
  left: 38px; right: 38px;
  top: 50%;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-14px);
}

/* progress overlay */
.sys-rail .axis-fill{
  position:absolute;
  left: 38px;
  top: 50%; transform: translateY(-14px);
  height: 1px;
  background: var(--fg);
  transition: width .9s cubic-bezier(.6,.05,.2,1);
}

.nodes{
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.node{
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-bottom: 4px;
}
.node .dot{
  width: 16px; height: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 50%;
  display:grid; place-items:center;
  position: relative;
  z-index: 1;
  transition: all .35s ease;
}
.node .dot::after{
  content:""; width: 6px; height: 6px;
  background: var(--ghost);
  border-radius: 50%;
  transition: all .35s ease;
}
.node[data-state="done"] .dot{ border-color: var(--fg); }
.node[data-state="done"] .dot::after{ background: var(--fg); }
.node[data-state="active"] .dot{
  border-color: var(--state-pos);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--state-pos) 14%, transparent);
}
.node[data-state="active"] .dot::after{
  background: var(--state-pos);
  width: 7px; height: 7px;
}
.node .label{
  text-align: center;
  display:flex; flex-direction:column; gap: 2px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 400;
}
.node .label .num{ font-size: 9.5px; color: var(--faint); letter-spacing: 0.08em; }
.node .label .name{ color: var(--muted); }
.node[data-state="active"] .label .name,
.node[data-state="done"] .label .name{ color: var(--fg); }

/* ---------- Body: asset + scoring ---------- */
.sys-body{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  border-bottom: 1px solid var(--line);
}
.sys-body > div{ padding: 20px; min-width: 0; }
.sys-body .asset{
  border-right: 1px solid var(--line);
  display:flex; flex-direction: column; gap: 12px;
}
.sec-label{
  display:flex; align-items:center; justify-content:space-between;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
}
.sec-label > span:first-child{ color: var(--muted); }
.sec-label .seq{ color: var(--faint); }

.asset-card{
  position: relative;
  border-radius: var(--r-thumb);
  display:flex; flex-direction: column; gap: 12px;
  transition: transform .35s ease;
}

.asset-thumb{
  aspect-ratio: 9 / 12;
  width: 100%;
  background: var(--canvas-tint);
  border-radius: var(--r-thumb);
  position: relative;
  overflow: hidden;
  display:grid; place-items:center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--faint);
  letter-spacing: 0.08em;
}
.asset-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0e0e0c;
}
.asset-thumb .badge{
  position:absolute; top:10px; left:10px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  background: rgba(23,23,23,0.78);
  color: #FAFAF8;
  padding: 3px 7px;
  border-radius: var(--r-badge);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.asset-thumb .dur{
  position:absolute; bottom:10px; right:10px;
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(23,23,23,0.78);
  color: #FAFAF8;
  padding: 2px 6px;
  border-radius: var(--r-badge);
}
/* removed signal-coloured scanline — site is calm, only state has colour */
.asset-thumb .scanline{ display: none; }

.asset-meta{
  display:flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.asset-meta .row{
  display:flex; justify-content: space-between; gap: 12px;
  white-space: nowrap;
}
.asset-meta .row .k{ color: var(--faint); }
.asset-meta .handle{
  font-family: var(--font-sans);
  font-size: 13px; color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* scoring column */
.scoring{ display:flex; flex-direction:column; gap: 14px; }
.score-list{
  display:flex; flex-direction:column;
  border-top: 1px solid var(--line);
}
.score-row{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 64px 48px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  font-size: 12px;
  position: relative;
}
.score-row > *{ min-width: 0; }
.score-row .label{ color: var(--muted); letter-spacing: 0; }
.score-row .bar{
  position: relative; height: 3px; background: var(--line); border-radius: var(--r-bar); overflow: hidden;
}
.score-row .bar i{
  position: absolute; top:0; left:0; bottom:0;
  background: var(--muted-2);
  transition: width 1s cubic-bezier(.6,.05,.2,1);
  border-radius: var(--r-bar);
}
.score-row.signal .bar i{ background: var(--state-pos); }
.score-row .val{
  text-align: right;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.score-row.signal .val{ color: var(--state-pos); }
.score-row.pending .val,
.score-row.pending .label{ color: var(--faint); }
.score-row.pending .bar i{ width: 0 !important; }

/* recommended action card */
.action{
  margin-top: 6px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: var(--r-card);
  display:flex; flex-direction: column; gap: 8px;
  background: var(--surface);
  transition: border-color .3s ease;
}
.action.live{
  border-color: var(--line-strong);
}
.action .head{
  display:flex; justify-content: space-between; align-items:center;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
}
.action .head .tag{
  display:inline-flex; align-items:center; gap: 7px; color: var(--muted);
}
.action .head .tag::before{
  content:""; width:5px; height:5px; background: var(--state-pos); border-radius: 50%;
}
.action.live .head .tag{ color: var(--fg); }
.action .head .stat{
  color: var(--faint);
  letter-spacing: 0.08em;
}
.action.live .head .stat{ color: var(--state-pos); }
.action .body{
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.012em;
}
.action .why{
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* feedback row (paid/affiliate) */
.feedback{
  margin-top: 8px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .5s ease, transform .5s ease;
}
.feedback.show{ opacity: 1; transform: translateY(0); }
.feedback .cell{
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  display:flex; flex-direction: column; gap: 5px;
}
.feedback .cell:last-child{ border-right: 0; }
.feedback .k{
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}
.feedback .v{
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 300;
  color: var(--fg);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.feedback .v .sig{
  color: var(--state-pos);
  font-size: 10px;
  margin-right: 3px;
  vertical-align: 1px;
  font-weight: 500;
}

/* ---------- Ticker / footer ---------- */
.sys-foot{
  display:flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  gap: 12px;
  background: var(--surface);
}
.ticker{
  flex: 1;
  display:flex; align-items:center; gap: 10px;
  overflow: hidden;
  position: relative;
  height: 18px;
}
.ticker .car{
  display: inline-flex; align-items:center; gap: 18px;
  white-space: nowrap;
  position: absolute; left: 0; top: 0;
}
.ticker .item{
  display:inline-flex; align-items:center; gap: 7px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
}
.ticker .item .dot{
  width: 4px; height: 4px; background: var(--ghost); border-radius: 50%;
}
.ticker .item.sig::before{
  content:""; width:5px; height:5px; background: var(--state-pos); border-radius:50%;
  display:inline-block;
}
.sys[data-motion="true"] .ticker .car{
  animation: ticker 32s linear infinite;
}
@keyframes ticker{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}

.sys-foot .clock{
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0;
  font-family: var(--font-mono);
}

/* ---------- responsive ---------- */
@media (max-width: 720px){
  .sys-body{ grid-template-columns: 1fr; }
  .sys-body .asset{ border-right: 0; border-bottom: 1px solid var(--line); }
  .nodes .label{ font-size: 9px; }
  .feedback{ grid-template-columns: 1fr; }
  .feedback .cell{ border-right: 0; border-bottom: 1px solid var(--line); }
}
