/* Rimscan — industrial control-panel surface.
   Two typefaces do all the work: a heavy condensed grotesque for anything that names a
   thing, a mono for anything a machine produced. Nothing in between. */

:root {
  --bg: #0d1012;
  --surf: #14191b;
  --surf-2: #191f22;
  --head: #11161800;
  --line: #232b2f;
  --line-soft: #1b2225;

  --fg: #e6eceb;
  --fg-dim: #93a3a6;
  --fg-mute: #62747a;

  --mint: #7ee1c1;
  --mint-dim: #3f7a68;
  --amber: #e6a341;
  --amber-dim: #7a5c26;
  --red: #e8695c;
  --blue: #6ab2e8;

  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --disp: "Oswald", "Archivo Narrow", "Helvetica Neue", sans-serif;

  --pad: 22px;
}

* { box-sizing: border-box; }

/* `hidden` must beat any layout display a component sets on itself */
[hidden] { display: none !important; }

.stack { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.stack--scroll { overflow-y: auto; }
.tight { min-width: 0; }
.note-line { margin-bottom: 6px; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 18% -10%, #16211f 0%, transparent 46%),
    radial-gradient(circle at 92% 4%, #1b1a16 0%, transparent 38%);
}

a { color: inherit; }

/* ---------------------------------------------------------------- chrome */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px var(--pad) 16px;
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 14px; }

.mark {
  width: 30px; height: 30px;
  border: 2px solid var(--mint);
  border-radius: 4px;
  display: grid; place-items: center;
  flex: none;
}
.mark::after {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mint);
}

.wordmark {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.055em;
  line-height: 1;
  margin: 0 0 3px;
}

.tagline {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

.rig {
  display: flex; align-items: center; gap: 22px;
  font-size: 10.5px; letter-spacing: 0.16em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

.link-state { display: flex; align-items: center; gap: 8px; color: var(--mint); }
.link-state .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(126, 225, 193, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
.link-state[data-state="offline"] { color: var(--red); }
.link-state[data-state="offline"] .dot { background: var(--red); animation: none; }
.link-state[data-state="busy"] { color: var(--amber); }
.link-state[data-state="busy"] .dot { background: var(--amber); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(126, 225, 193, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(126, 225, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 225, 193, 0); }
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line-soft);
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--fg-mute);
  font-family: var(--disp);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 18px 13px;
  cursor: pointer;
  transition: color 0.14s;
}
.tab:hover { color: var(--fg-dim); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--mint); }

main { padding: 30px var(--pad) 70px; }

.view[hidden] { display: none; }

.view-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}

.view-head h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin: 0;
}

.view-head .sub {
  font-size: 10.5px;
  letter-spacing: 0.17em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

.view-head .spacer { flex: 1; }

/* ---------------------------------------------------------------- pipeline */

.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.flow {
  display: grid;
  place-items: center;
  color: var(--line);
}
.flow svg { width: 26px; height: 12px; }
.flow[data-live="1"] { color: var(--mint-dim); }

.panel {
  background: var(--surf);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 470px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surf-2);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-head .step { color: var(--mint); }
.panel--dispatch .panel-head .step { color: var(--amber); }
.panel-head .meta { color: var(--fg-mute); }

.panel-body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.panel-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idle {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--fg-mute);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}

/* ---------------------------------------------------------------- dropzone */

.dropzone {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  background: #10151700;
  cursor: pointer;
  overflow: hidden;
  min-height: 250px;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--mint-dim); background: rgba(126, 225, 193, 0.03); }
.dropzone.over { border-style: solid; }

.dropzone .corner {
  position: absolute;
  width: 24px; height: 24px;
  border: 0 solid var(--mint);
  pointer-events: none;
}
.dropzone .corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.dropzone .corner.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.dropzone .corner.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.dropzone .corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }

.dz-copy { text-align: center; padding: 0 24px; }
.dz-copy strong {
  display: block;
  font-family: var(--disp);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dz-copy span { color: var(--fg-mute); font-size: 11px; }

.dropzone img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #0a0d0e;
}

.readout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.readout b { color: var(--fg-dim); font-weight: 400; }

.btn {
  appearance: none;
  width: 100%;
  border: 0;
  padding: 13px;
  background: var(--mint);
  color: #06110d;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.14s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { background: var(--line); color: var(--fg-mute); cursor: not-allowed; }

.btn--ghost {
  background: none;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 12px;
  padding: 9px;
}
.btn--ghost:hover:not(:disabled) { border-color: var(--mint-dim); color: var(--fg); }

/* must follow .btn — same specificity, so source order decides the width */
.btn--inline { width: auto; padding: 9px 18px; }

.opts {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  cursor: pointer;
  user-select: none;
}
.opts input { accent-color: var(--mint); margin: 0; }

/* ---------------------------------------------------------------- stage log */

.stage-log {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-mute);
}
.stage-row .tick { width: 9px; flex: none; color: var(--line); }
.stage-row[data-state="run"] { color: var(--amber); }
.stage-row[data-state="run"] .tick { color: var(--amber); animation: blink 0.85s steps(2) infinite; }
.stage-row[data-state="ok"] { color: var(--fg-dim); }
.stage-row[data-state="ok"] .tick { color: var(--mint); }
.stage-row[data-state="warn"] { color: var(--amber); }
.stage-row[data-state="warn"] .tick { color: var(--amber); }
.stage-row .t { margin-left: auto; color: var(--fg-mute); font-variant-numeric: tabular-nums; }

@keyframes blink { 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- candidates */

.query-frame {
  border: 1px solid var(--line);
  background: #fff;
  aspect-ratio: 1;
  max-height: 190px;
  align-self: center;
  width: auto;
  object-fit: contain;
}

.cand-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  margin: 0 -4px;
  padding: 0 4px;
}

.cand {
  display: grid;
  grid-template-columns: 22px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid transparent;
  background: var(--surf-2);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.13s;
}
.cand:hover { border-color: var(--line); }
.cand[aria-selected="true"] { border-color: var(--mint-dim); background: rgba(126, 225, 193, 0.06); }

.cand .n {
  font-size: 10px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}
.cand[aria-selected="true"] .n { color: var(--mint); }

.cand img {
  width: 46px; height: 46px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.cand .code {
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cand .desc {
  font-size: 10px;
  color: var(--fg-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.score { text-align: right; }
.score .v {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--fg-dim);
}
.cand[aria-selected="true"] .score .v { color: var(--mint); }
.bar {
  width: 52px; height: 2px;
  background: var(--line);
  margin-top: 5px;
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--mint-dim); }
.cand[aria-selected="true"] .bar i { background: var(--mint); }

/* ---------------------------------------------------------------- dispatch */

.verdict {
  border: 1px solid var(--line);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--disp);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.verdict::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.verdict[data-level="confirmed"] { color: var(--mint); border-color: var(--mint-dim); }
.verdict[data-level="probable"]  { color: var(--amber); border-color: var(--amber-dim); }
.verdict[data-level="review"],
.verdict[data-level="ambiguous"] { color: var(--amber); border-color: var(--amber-dim); }
.verdict[data-level="reject"],
.verdict[data-level="none"]      { color: var(--red); border-color: #5d2b26; }

.part-card {
  border: 1px solid var(--line);
  background: var(--surf-2);
  display: flex;
  gap: 14px;
  padding: 14px;
  align-items: flex-start;
}
.part-card img {
  width: 96px; height: 96px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}
.part-card .code {
  font-family: var(--disp);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 7px;
  word-break: break-all;
}
.part-card .name { color: var(--fg-dim); font-size: 11.5px; line-height: 1.5; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fact { background: var(--surf-2); padding: 11px 13px; }
.fact dt {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.fact dd small { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.1em; }
.fact[data-flag="ok"] dd { color: var(--mint); }
.fact[data-flag="bad"] dd { color: var(--amber); }

.note {
  font-size: 10px;
  line-height: 1.6;
  color: var(--fg-mute);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}
.note b { color: var(--fg-dim); font-weight: 400; }

.route {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--amber-dim);
  background: rgba(230, 163, 65, 0.05);
  padding: 11px 13px;
  font-size: 11px;
  letter-spacing: 0.09em;
  color: var(--amber);
}
.route .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  flex: none;
}
.route .sim {
  margin-left: auto;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  border: 1px solid var(--line);
  padding: 2px 6px;
  flex: none;
}

.views-strip { display: flex; gap: 5px; flex-wrap: wrap; }
.views-strip img {
  width: 52px; height: 52px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- repository */

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.field {
  flex: 1;
  min-width: 220px;
  background: var(--surf);
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 11px 13px;
}
.field::placeholder { color: var(--fg-mute); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; }
.field:focus { outline: 0; border-color: var(--mint-dim); }

.count {
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
}

.card {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surf);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 0.14s;
}
.card:hover { border-color: var(--mint-dim); }
.card:focus-visible { outline: 0; border-color: var(--mint); }
.card > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line-soft);
}
.card .code { font-size: 12.5px; letter-spacing: 0.06em; word-break: break-all; }
.card .name {
  font-size: 10px;
  color: var(--fg-mute);
  line-height: 1.5;
  min-height: 30px;
}
.card .row {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-mute);
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

/* ---------------------------------------------------------------- activity */

.log-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.log-table th {
  text-align: left;
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
}
.log-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.log-table tbody tr:hover { background: var(--surf); }
.log-table .mono-code { color: var(--fg); letter-spacing: 0.05em; }

.pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pill[data-level="confirmed"] { color: var(--mint); }
.pill[data-level="probable"], .pill[data-level="review"], .pill[data-level="ambiguous"] { color: var(--amber); }
.pill[data-level="reject"], .pill[data-level="none"] { color: var(--red); }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--fg-mute);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- overlay */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--surf-2);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 11px 18px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 40;
}
.toast[hidden] { display: none; }

/* ---------------------------------------------------------------- gallery */

.gallery {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 9, 10, 0.95);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 16px var(--pad) 20px;
}

.gal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.gal-id { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.gal-code {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.06em;
  word-break: break-all;
}
.gal-name {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.gal-actions { display: flex; align-items: center; gap: 10px; }
.gal-count {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

.gal-btn {
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s;
}
.gal-btn:hover { border-color: var(--mint-dim); color: var(--fg); }
#gal-dl { border-color: var(--mint-dim); color: var(--mint); }
#gal-dl:hover { background: rgba(126, 225, 193, 0.08); }

.gal-stage {
  position: relative;
  min-height: 0;
}

/* Absolutely positioned, not a centred grid item: a percentage max-height only resolves
   against a definite containing block, and as an in-flow grid item the image ignored it
   and overflowed its track, pushing the thumbnail strip off screen. inset:0 + margin:auto
   with auto width/height centres it while still hugging the render's aspect ratio. */
.gal-stage img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  border: 1px solid var(--line);
}

.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  width: 44px; height: 64px;
  background: rgba(13, 16, 18, 0.82);
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s;
}
.gal-nav:hover { border-color: var(--mint-dim); color: var(--mint); }
#gal-prev { left: 0; }
#gal-next { right: 0; }
.gallery[data-single="1"] .gal-nav,
.gallery[data-single="1"] .gal-strip,
.gallery[data-single="1"] /* Anchored to the rendered image, not the stage: the render is letterboxed inside the
   stage, so the stage's corner can sit a long way from the picture. JS measures the
   image box on load and on resize and sets top/right. */
.gal-dl {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  background: rgba(13, 16, 18, 0.88);
  border: 1px solid var(--mint-dim);
  color: var(--mint);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.16s, background 0.14s;
}
.gal-dl.ready { opacity: 1; }
.gal-dl:hover { background: rgba(126, 225, 193, 0.14); }

.gal-hint { display: none; }

.gal-strip {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.gal-strip button {
  appearance: none;
  padding: 0;
  width: 74px; height: 74px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.14s;
}
.gal-strip button:hover { border-color: var(--mint-dim); }
/* border-box is global, so a 3px edge does not change the 74px footprint */
.gal-strip button[aria-selected="true"] { border-width: 3px; border-color: var(--mint); }
.gal-strip img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Anchored to the rendered image, not the stage: the render is letterboxed inside the
   stage, so the stage's corner can sit a long way from the picture. JS measures the
   image box on load and on resize and sets top/right. */
.gal-dl {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  background: rgba(13, 16, 18, 0.88);
  border: 1px solid var(--mint-dim);
  color: var(--mint);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.16s, background 0.14s;
}
.gal-dl.ready { opacity: 1; }
.gal-dl:hover { background: rgba(126, 225, 193, 0.14); }

.gal-hint {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

@media (max-width: 1080px) {
  .pipeline { grid-template-columns: 1fr; }
  .flow { padding: 10px 0; transform: rotate(90deg); }
  .panel { min-height: 0; }
}
