/*
 * Lane 2 additions to the verified milestone-6 visual system.
 *
 * Every value here is one of milestone 6's own tokens. No new palette, no new
 * type scale, no decoration: this file only lays out the two surfaces milestone 6
 * has no component for — the lane/wallet bar under the header, and the
 * transaction rows an on-chain lane produces. Everything else in the lane 2
 * console reuses `.surface`, `.metric`, `.data-table`, `.status`, `.state-panel`,
 * `.definition-list` and `.button` exactly as milestone 6 defines them.
 */

.lane-bar {
  position: sticky;
  z-index: 20;
  top: var(--header-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}

.lane-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--rule-dark);
  border-radius: 3px;
}
.lane-switch button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
}
.lane-switch button + button { border-left: 1px solid var(--rule-dark); }
.lane-switch button[aria-pressed="true"] { background: var(--ink); color: #fdfbf6; }

.lane-note {
  flex: 1 1 240px;
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: .72rem;
}

.lane-wallet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .69rem;
}
.wallet-chip.warn { border-color: var(--amber); background: var(--amber-wash); }
.wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.wallet-dot.absent { background: var(--rule-dark); }
.wallet-dot.warn { background: var(--amber); }

.tx-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-raised);
}
.tx-row strong { font-size: .78rem; }
.tx-row .tx-meta {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .68rem;
  overflow-wrap: anywhere;
}
.tx-row.failed { border-color: var(--red); background: var(--red-wash); }

.step-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.step-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: .75rem;
}
.step-row .step-index {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-content: center;
  border: 1px solid var(--rule-dark);
  border-radius: 50%;
  font-size: .64rem;
  font-weight: 800;
}
.step-row.done { border-color: var(--green); background: var(--green-wash); }
.step-row.done .step-index { border-color: var(--green); }
.step-row.active { border-color: var(--blue); background: var(--blue-wash); }
.step-row.blocked { border-color: var(--red); background: var(--red-wash); }

.operator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 14px; }
.operator-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-raised); }
.operator-card h3 { margin: 0; font-size: .82rem; }
.operator-card p { margin: 0; color: var(--ink-soft); font-size: .72rem; }
.operator-card .operator-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.operator-card .operator-authority { color: var(--ink-soft); font-family: var(--mono); font-size: .66rem; overflow-wrap: anywhere; }

.explorer-link { font-family: var(--mono); font-size: .68rem; overflow-wrap: anywhere; }
.observed-cell { display: grid; gap: 3px; }
.observed-cell span { font-family: var(--mono); font-size: .67rem; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .lane-bar { top: 0; padding: 8px 16px; }
  .lane-wallet { margin-left: 0; }
}

@media (max-width: 420px) {
  .lane-bar { gap: 8px; }
  .lane-note { flex-basis: 100%; }
  .step-row { grid-template-columns: 22px minmax(0, 1fr); }
  .step-row .status { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .lane-bar, .lane-switch button, .tx-row, .step-row { transition: none !important; }
}

/* Partner key entry, shown only on the public sandbox. */
.lane-key { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.lane-key-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lane-key-label { display: inline-flex; align-items: center; gap: 8px; }
.lane-key-label input { min-width: 22ch; padding: 6px 8px; font: inherit; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; }
.lane-key-button { padding: 6px 10px; font: inherit; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.lane-key-button:focus-visible, .lane-key-label input:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lane-key-hint, .lane-key-state { opacity: 0.8; }
