/* THE HARVESTER deck — inspiration intake. All bespoke rules are scoped to
   #view-harvester; shared structure comes from base.css. Mint house accent. */

#view-harvester .hv-ic { display: inline-flex; align-items: center; }

/* cross-link rail spacing */
#view-harvester .hv-xlinks { margin-bottom: 22px; }

/* ── Drop console ─────────────────────────────────────────────── */
#view-harvester .hv-console { margin-bottom: 22px; }
#view-harvester .hv-extract { white-space: nowrap; }

/* lens picker grid */
#view-harvester .hv-lens-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
#view-harvester .hv-lens {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 12px 13px; border-radius: var(--radius); cursor: pointer;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body);
  transition: border-color .15s, background .15s, transform .15s;
  position: relative;
}
#view-harvester .hv-lens:hover { border-color: var(--border-light); transform: translateY(-2px); }
#view-harvester .hv-lens.active { box-shadow: 0 0 0 1px rgba(95,176,137,0.12), 0 10px 26px -16px rgba(0,0,0,.8); }
#view-harvester .hv-lens-glyph {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; border: 1px solid; flex-shrink: 0;
}
#view-harvester .hv-lens-meta { flex: 1; min-width: 0; }
#view-harvester .hv-lens-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text); }
#view-harvester .hv-lens-tag { font-size: 10.5px; letter-spacing: .04em; margin-top: 2px; text-transform: uppercase; }
#view-harvester .hv-lens-flag { position: absolute; top: 9px; right: 9px; }

/* ── Animated extraction pipeline ─────────────────────────────── */
#view-harvester .hv-pipeline {
  margin-top: 22px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--card-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; transition: border-color .25s;
}
#view-harvester .hv-pipeline.live { border-color: rgba(95,176,137,0.4); box-shadow: 0 0 34px -10px rgba(95,176,137,0.25); }

#view-harvester .hv-stage {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 6px 24px; opacity: .5; transition: opacity .3s var(--ease);
}
#view-harvester .hv-stage:last-child { padding-bottom: 6px; }
#view-harvester .hv-stage.active, #view-harvester .hv-stage.done { opacity: 1; }

#view-harvester .hv-stage-dot {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; position: relative;
  display: grid; place-items: center; background: var(--bg-elevated);
  border: 1px solid var(--border); color: var(--text-faint);
  transition: all .3s var(--ease); z-index: 1;
}
#view-harvester .hv-stage.active .hv-stage-dot {
  color: var(--mint); border-color: var(--mint);
  box-shadow: 0 0 0 4px var(--teal-glow), 0 0 22px -4px rgba(95,176,137,0.6);
}
#view-harvester .hv-stage.done .hv-stage-dot {
  color: #06231b; background: var(--mint); border-color: transparent;
}
#view-harvester .hv-stage-dot .hv-ic { transition: opacity .2s; }
#view-harvester .hv-stage-check {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; color: #06231b;
}
#view-harvester .hv-stage.done .hv-stage-dot .hv-ic:not(.hv-stage-check) { opacity: 0; }
#view-harvester .hv-stage.done .hv-stage-check { opacity: 1; }

#view-harvester .hv-stage-main { flex: 1; min-width: 0; }
#view-harvester .hv-stage-title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--text); transition: color .2s; }
#view-harvester .hv-stage.active .hv-stage-title { color: var(--mint); }
#view-harvester .hv-stage-sub { font-size: 12px; margin-top: 3px; }

/* the spinner shown on the active stage */
#view-harvester .hv-stage-spin {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--mint);
  opacity: 0; transition: opacity .2s;
}
#view-harvester .hv-stage.active .hv-stage-spin { opacity: 1; animation: hvSpin .8s linear infinite; }
#view-harvester .hv-stage.done .hv-stage-spin { opacity: 0; }
@keyframes hvSpin { to { transform: rotate(360deg); } }

/* connector wire between stages — fills as the prior stage completes */
#view-harvester .hv-stage-wire {
  position: absolute; left: 25px; top: 52px; bottom: -12px; width: 2px;
  background: var(--border); overflow: hidden;
}
#view-harvester .hv-stage-wire::after {
  content: ""; position: absolute; inset: 0; transform: scaleY(0); transform-origin: top;
  background: linear-gradient(var(--mint), var(--mint-deep)); transition: transform .5s var(--ease);
}
#view-harvester .hv-stage.done .hv-stage-wire::after { transform: scaleY(1); }

#view-harvester .hv-console-foot {
  margin-top: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; line-height: 1.5;
}
#view-harvester .hv-console-foot .hv-ic { color: var(--mint); }

/* ── Stats spacing ────────────────────────────────────────────── */
#view-harvester .hv-stats { margin-bottom: 6px; }

/* ── Lens legend cards ────────────────────────────────────────── */
#view-harvester .hv-legend-grid { align-items: stretch; }
#view-harvester .hv-legend { display: flex; flex-direction: column; }
#view-harvester .hv-legend-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
#view-harvester .hv-legend-glyph {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-size: 20px; border: 1px solid; flex-shrink: 0;
}
#view-harvester .hv-legend-name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--text); margin-bottom: 5px; }
#view-harvester .hv-legend-reads { font-size: 12.5px; line-height: 1.55; min-height: 38px; margin-bottom: 12px; }

#view-harvester .hv-legend-files {
  background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 12px;
}
#view-harvester .hv-legend-files-label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 7px; }
#view-harvester .hv-legend-files-list { display: flex; flex-direction: column; gap: 4px; }
#view-harvester .hv-file {
  font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#view-harvester .hv-legend-route { font-size: 12.5px; line-height: 1.5; margin-top: auto; }

/* ── History filters + feed ───────────────────────────────────── */
#view-harvester .hv-filters { margin-bottom: 14px; }

#view-harvester .hv-history-panel { overflow: visible; }
#view-harvester .hv-row { transition: background .15s; border-radius: 10px; padding-left: 6px; padding-right: 6px; }
#view-harvester .hv-row:hover { background: var(--card-hover); }
#view-harvester .hv-row .feed-icon { font-size: 16px; font-family: var(--font-display); }

#view-harvester .hv-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#view-harvester .hv-row-title { font-weight: 600; font-size: 14px; line-height: 1.4; }
#view-harvester .hv-row-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 9px; flex-wrap: wrap;
}
#view-harvester .hv-route .hv-ic { margin-right: -2px; }
#view-harvester .hv-route-none { color: var(--text-faint); }
#view-harvester .hv-row-page { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sealed US3 rows read dimmer */
#view-harvester .hv-row.sealed .hv-row-title { color: var(--text-muted); font-style: italic; }

/* fresh-row flash when a harvest completes */
#view-harvester .hv-row.fresh { animation: hvFresh 1.2s var(--ease); }
@keyframes hvFresh {
  0%   { background: var(--teal-glow); box-shadow: inset 3px 0 0 var(--mint); transform: translateY(-4px); opacity: 0; }
  30%  { opacity: 1; transform: none; }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}

/* ── footnote ─────────────────────────────────────────────────── */
#view-harvester .hv-footnote {
  display: flex; align-items: center; gap: 10px; margin-top: 26px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: rgba(154,143,208,0.08); border: 1px solid rgba(154,143,208,0.25);
  color: var(--text-muted); font-size: 13px; line-height: 1.5;
}
#view-harvester .hv-footnote .hv-ic { color: var(--violet); flex-shrink: 0; }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 920px){
  #view-harvester .hv-lens-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  #view-harvester .hv-lens-grid { grid-template-columns: 1fr; }
  #view-harvester .hv-row-top { flex-direction: column; gap: 6px; }
}
