/* ════════════════════════════════════════════════════════════════════════════
   InterbankOS Terminal · components
   ────────────────────────────────────────────────────────────────────────────
   Component-level styles. Each component is composable, scoped to a single
   class prefix, and assumes tokens.css + base.css + plexiglass.css have
   loaded. Components reach for semantic tokens only; never raw values.
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── CHROME ──────────────────────────────────────────────────────────────
   Sticky institutional header. 64px on desktop, 56px on mobile. Carries
   the wordmark, the global search, and the dual-address wallet pill. */

.chrome {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--chrome-h-desktop);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--rule-1);
}

.chrome::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--teal-rule),
    var(--blue-rule),
    var(--mint-rule),
    transparent);
  opacity: 0.5;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.brand-wordmark .os {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--brand);
  margin-left: 2px;
}

.brand-tier {
  margin-left: var(--s-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 3px 8px;
  background: var(--brand-soft);
  border-radius: var(--r-2);
}

.chrome-search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  height: 36px;
  padding: 0 var(--s-3);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  color: var(--text-tertiary);
  transition: all var(--dur-hover) var(--ease-out);
  backdrop-filter: blur(8px);
}
.chrome-search:hover,
.chrome-search:focus-within {
  border-color: var(--brand-rule);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
}
.chrome-search svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.chrome-search input {
  background: transparent;
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}
.chrome-search input::placeholder {
  color: var(--text-hint);
}

.kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-hint);
  padding: 2px 6px;
  border: 1px solid var(--rule-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
}

/* ─── WALLET PILL ─────────────────────────────────────────────────────────
   The dual-address pill. Tezos X gives every account one tz1 (Michelson)
   and one 0x (EVM) address on the same chain. The pill surfaces both,
   making the substantive Tezos X feature visible in the chrome.
   States: disconnected, connecting, connected, error. */

.wallet-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  transition: all var(--dur-hover) var(--ease-out);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.wallet-pill:hover {
  border-color: var(--brand-rule);
  box-shadow: 0 4px 12px rgba(13, 115, 119, 0.10);
}
.wallet-pill[data-state="disconnected"] {
  padding: 0;
}
.wallet-pill[data-state="error"] {
  border-color: var(--crimson-rule);
}

.wallet-status {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-bright);
  margin: 0 var(--s-2);
}
.wallet-status::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--mint-bright);
  opacity: 0.3;
  animation: pulse-status 2.2s ease-out infinite;
}
.wallet-pill[data-state="connecting"] .wallet-status {
  background: var(--amber);
}
.wallet-pill[data-state="connecting"] .wallet-status::after {
  border-color: var(--amber);
}
.wallet-pill[data-state="error"] .wallet-status {
  background: var(--crimson);
}
.wallet-pill[data-state="error"] .wallet-status::after {
  border-color: var(--crimson);
}

@keyframes pulse-status {
  0%   { transform: scale(0.7); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}

.wallet-address {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 10px;
  line-height: 1.2;
}
.wallet-interface {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.wallet-addr {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}

.wallet-divider {
  width: 1px;
  align-self: stretch;
  background: var(--rule-2);
  margin: 4px 0;
}

.wallet-dismiss {
  padding: 0 8px;
  align-self: stretch;
  display: grid;
  place-items: center;
  color: var(--text-hint);
  transition: color var(--dur-hover) var(--ease-out);
}
.wallet-dismiss:hover {
  color: var(--crimson);
}
.wallet-dismiss svg {
  width: 12px;
  height: 12px;
}

/* ─── NAVIGATION ──────────────────────────────────────────────────────────
   Desktop horizontal nav under the chrome. The active tab uses the brand
   soft tint as background. */

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2) var(--gutter);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-1);
  position: sticky;
  top: var(--chrome-h-desktop);
  z-index: 99;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: var(--r-2);
  transition: all var(--dur-hover) var(--ease-out);
}
.nav-tab:hover {
  color: var(--text-strong);
  background: rgba(13, 115, 119, 0.04);
}
.nav-tab.active {
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 600;
}
.nav-tab svg {
  width: 14px;
  height: 14px;
}

.nav-spacer {
  flex: 1;
}

.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-hint);
}
.nav-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 6px rgba(26, 147, 111, 0.5);
}
.nav-meta-dot[data-state="degraded"] {
  background: var(--amber);
}
.nav-meta-dot[data-state="offline"] {
  background: var(--crimson);
}
.nav-meta-val {
  color: var(--text-primary);
  font-weight: 500;
}
.nav-meta-sep {
  width: 1px;
  height: 12px;
  background: var(--rule-2);
}

/* Mobile bottom tab bar. Hidden by default, revealed at ≤899px. */
.nav-mobile {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 8px var(--s-2) calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--rule-2);
  box-shadow: 0 -8px 24px rgba(13, 30, 50, 0.06);
}
.nav-mobile-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.nav-mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-hint);
  border-radius: var(--r-2);
  min-height: 44px;
  transition: all var(--dur-hover) var(--ease-out);
}
.nav-mobile-tab.active {
  color: var(--brand);
}
.nav-mobile-tab svg {
  width: 20px;
  height: 20px;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────
   Sleek button vocabulary. Three intents (primary, secondary, ghost),
   three sizes (xs, sm, default, lg). Primary uses a gradient with brand
   shadow; secondary uses translucent glass; ghost uses no chrome at all. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 var(--s-4);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  transition: all var(--dur-hover) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.btn:active {
  transform: scale(0.98);
  transition-duration: var(--dur-press);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--teal-bright) 0%, var(--teal) 100%);
  color: white;
  border-color: var(--teal-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 1px 2px rgba(13, 115, 119, 0.2),
    0 4px 12px rgba(13, 115, 119, 0.18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1ab5ab 0%, var(--teal-bright) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(13, 115, 119, 0.24),
    0 8px 18px rgba(13, 115, 119, 0.22);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  border-color: var(--rule-2);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: white;
  border-color: var(--brand-rule);
  color: var(--text-strong);
  box-shadow: 0 4px 12px rgba(13, 30, 50, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.btn-lg {
  height: 48px;
  padding: 0 var(--s-5);
  font-size: 14px;
  border-radius: var(--r-3);
}
.btn-sm {
  height: 30px;
  padding: 0 var(--s-3);
  font-size: 12px;
}
.btn-xs {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: var(--r-1);
}

/* ─── PANEL HEAD ──────────────────────────────────────────────────────────
   Shared header inside plexi cards. Eyebrow + title on the left, meta
   or actions on the right. */

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule-1);
  gap: var(--s-3);
}
.head-left {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  min-width: 0;
}
.head-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.head-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-hint);
  flex-shrink: 0;
}
.head-actions {
  display: inline-flex;
  gap: var(--s-1);
  flex-shrink: 0;
}
.head-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  color: var(--text-tertiary);
  transition: all var(--dur-hover) var(--ease-out);
}
.head-action:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.head-action svg {
  width: 14px;
  height: 14px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ─── KEY-VALUE LIST ──────────────────────────────────────────────────────
   Tight list of label/value pairs. Used in transaction summaries,
   metadata panels, and anywhere we need a compact data display. */

.kv {
  display: flex;
  flex-direction: column;
}
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule-1);
}
.kv-row:last-child {
  border-bottom: 0;
}
.kv-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.kv-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.kv-val.accent { color: var(--brand); font-weight: 500; }
.kv-val.addr { color: var(--brand); cursor: pointer; }
.kv-val.addr:hover { text-decoration: underline; }
.kv-val.pos { color: var(--positive); }
.kv-val.neg { color: var(--negative); }

/* ─── INTERFACE PILL ──────────────────────────────────────────────────────
   Tezos X-specific marker. Distinguishes Michelson positions (M, teal),
   EVM positions (E, blue), and cross-interface positions (Both). */

.if-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
}
.if-pill.michelson {
  background: var(--teal-soft);
  color: var(--brand);
}
.if-pill.evm {
  background: var(--blue-soft);
  color: var(--informational);
}
.if-pill.both {
  background: linear-gradient(90deg, var(--teal-soft), var(--blue-soft));
  color: var(--text-primary);
}

/* ─── STATUS FOOTER ───────────────────────────────────────────────────────
   Persistent status strip at the bottom of the page. Shows network state,
   RPC endpoints, latency, and build identity. */

.status {
  padding: var(--s-3) var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  border-top: 1px solid var(--rule-1);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-hint);
  overflow-x: auto;
  white-space: nowrap;
}
.status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.status-item-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-5);
}
.status-item-val {
  color: var(--text-primary);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot.live { background: var(--positive); box-shadow: 0 0 4px rgba(26, 147, 111, 0.5); }
.status-dot.degraded { background: var(--caution); box-shadow: 0 0 4px rgba(217, 119, 6, 0.5); }
.status-dot.offline { background: var(--negative); box-shadow: 0 0 4px rgba(190, 30, 45, 0.5); }
.status-spacer { flex: 1; }
.status-sep {
  width: 1px;
  height: 12px;
  background: var(--rule-2);
}


/* ─── RECEIPT DRAWER ──────────────────────────────────────────────────────
   Slide-in sheet for the atomic call graph. Right-side drawer on desktop,
   bottom sheet on mobile. The drawer's content scrolls; the head and
   close button stay pinned. */

.receipt-host {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
}
.receipt-host[data-open="true"] {
  pointer-events: auto;
}
.receipt-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.32);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-state) var(--ease-out);
}
.receipt-host[data-open="true"] .receipt-scrim {
  opacity: 1;
}

.receipt-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(720px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--rule-2);
  box-shadow: var(--shadow-deep);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-arrive) var(--ease-out);
}
.receipt-host[data-open="true"] .receipt-panel {
  transform: translateX(0);
}

.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--s-5) var(--s-6) var(--s-4);
  border-bottom: 1px solid var(--rule-1);
  gap: var(--s-3);
  flex-shrink: 0;
}
.receipt-head .eyebrow {
  display: block;
  margin-bottom: 6px;
}
.receipt-hash {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-strong);
  word-break: break-all;
  max-width: 56ch;
}
.receipt-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.receipt-close:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.receipt-close svg {
  width: 14px;
  height: 14px;
}

.receipt-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5) var(--s-6) var(--s-8);
}

.receipt-section-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: var(--s-6) 0 var(--s-3);
}
.receipt-section-title:first-of-type {
  margin-top: 0;
}

/* Loading state */
.receipt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s-12) var(--s-4);
  gap: var(--s-4);
  color: var(--text-secondary);
}
.receipt-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}
.receipt-spinner-inline {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
  vertical-align: -1px;
  margin-right: 6px;
}
.receipt-loading-detail {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
  max-width: 44ch;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error state */
.receipt-error {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  color: var(--text-secondary);
}
.receipt-error strong {
  display: block;
  font-size: 16px;
  color: var(--text-strong);
  margin-bottom: var(--s-2);
}
.receipt-error p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: var(--s-3);
}
.receipt-error-detail {
  font-size: 12px !important;
  color: var(--text-hint);
  max-width: 44ch;
  margin: 0 auto;
}

/* Summary */
.receipt-summary {
  background: var(--paper-cool);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.receipt-verdict-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-1);
  margin-bottom: var(--s-2);
}
.receipt-verdict-pill.atomic {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.receipt-verdict-pill.single {
  background: var(--ink-7);
  color: var(--text-secondary);
}
.receipt-summary-verdict p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--s-4);
}
.receipt-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}
.receipt-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.receipt-summary-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.receipt-summary-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}

/* Call graph timeline */
.call-graph {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--rule-2);
}
.call-node {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--s-3);
  padding: var(--s-3) 0 var(--s-3) var(--s-3);
  position: relative;
  border-bottom: 1px solid var(--rule-1);
}
.call-node:last-child {
  border-bottom: 0;
}
.call-node-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}
.call-node-rail::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: var(--rule-1);
  transform: translateX(-50%);
}
.call-node:first-child .call-node-rail::before { top: 50%; }
.call-node:last-child  .call-node-rail::before { bottom: 50%; }

.call-node-badge {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--ink-3);
  border: 2px solid var(--paper);
}
.call-node-badge[data-interface="michelson"] {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
}
.call-node-badge[data-interface="gateway"] {
  background: linear-gradient(135deg, var(--mint-bright), var(--mint));
}
.call-node-badge[data-interface="evm"] {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
}

.call-node-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.call-node-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}
.call-node-method {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}
.call-node-status {
  font-size: 12px;
}
.call-node-status.success { color: var(--positive); }
.call-node-status.failure { color: var(--negative); }
.call-node-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.call-node-arrow {
  color: var(--text-hint);
}
.call-node-addr {
  cursor: help;
  border-bottom: 1px dotted var(--rule-3);
}
.call-node-addr.empty {
  color: var(--text-hint);
  border: 0;
}
.call-node-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
}
.call-node-value strong {
  color: var(--text-strong);
  font-weight: 500;
}
.call-node-error {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--negative);
  background: var(--crimson-soft);
  padding: 4px 8px;
  border-radius: var(--r-1);
}
.call-node-pending .call-node-method {
  color: var(--text-tertiary);
  font-style: italic;
}
.call-node-pending-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-hint);
}

/* Explorer links */
.receipt-links {
  margin-top: var(--s-4);
}
.receipt-link-row {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.receipt-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur-hover) var(--ease-out);
}
.receipt-link:hover {
  border-color: var(--brand-rule);
  color: var(--brand);
  background: var(--brand-soft);
}
.receipt-link-arrow {
  font-size: 10px;
  opacity: 0.7;
}

/* Mobile: bottom-sheet style */
@media (max-width: 719px) {
  .receipt-panel {
    top: 60px;
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--rule-2);
    border-radius: var(--r-4) var(--r-4) 0 0;
    transform: translateY(100%);
  }
  .receipt-host[data-open="true"] .receipt-panel {
    transform: translateY(0);
  }
  .receipt-summary-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Quote freshness chip for the transact composer */
.quote-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-1);
}
.quote-chip[data-tier="evm-router"],
.quote-chip[data-tier="michelson-router"] {
  background: var(--mint-soft);
  color: var(--mint-deep);
}
.quote-chip[data-tier="evm-router"]::before,
.quote-chip[data-tier="michelson-router"]::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}
.quote-chip[data-tier="indicative"] {
  background: var(--amber-soft);
  color: var(--amber);
}
.quote-chip[data-tier="indicative"]::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

/* Simulator feedback under the sign button */
.sim-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--paper-cool);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-2);
}
.sim-status[data-state="ok"] { color: var(--mint-deep); border-color: var(--mint-rule); background: var(--mint-soft); }
.sim-status[data-state="err"] { color: var(--negative); border-color: var(--crimson-rule); background: var(--crimson-soft); }
.sim-status[data-state="pending"] { color: var(--brand); }

/* Quantum Field finalization components */
.sovereign-ribbon {
  position: relative;
  z-index: 20;
  max-width: var(--max-w);
  margin: 10px auto 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ribbon-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: rgba(22, 30, 55, 0.44);
  color: var(--text-tertiary);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(14px) saturate(160%);
}
.ribbon-chip.live { color: var(--azure-soft); border-color: rgba(91,141,239,.28); }
.ribbon-chip.comp { color: var(--violet-soft); border-color: rgba(183,140,255,.32); }
.ribbon-chip.gilt { color: var(--gilt); border-color: rgba(201,165,116,.32); }
.ribbon-chip.pqc { color: var(--pqc-cyan); border-color: rgba(139,224,255,.32); }


.eyebrow.pqc::before { background: var(--pqc-cyan); box-shadow: 0 0 10px rgba(139,224,255,.45); }
.eyebrow.comp::before { background: var(--violet); box-shadow: 0 0 10px rgba(183,140,255,.45); }
.eyebrow.compliance::before { background: var(--rust); box-shadow: 0 0 10px rgba(217,119,87,.45); }

.control-grid, .gate-table {
  padding: var(--s-4);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.control-chip, .gate-row {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  background: rgba(255,255,255,.045);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.control-chip b, .gate-row span { color: var(--text-strong); font-size: 12px; }
.control-chip span, .gate-row strong { color: var(--text-tertiary); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.risk-list { padding: var(--s-4); display: flex; flex-direction: column; gap: 8px; }
.risk-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-1);
}
.risk-row:last-child { border-bottom: 0; }
.risk-row strong { color: var(--text-strong); font-size: 12px; }
.risk-row span { color: var(--text-tertiary); font-size: 12px; }

.nac-gate { padding: var(--s-4); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 10px; }
.nac-step {
  border: 1px solid rgba(183,140,255,.22);
  border-radius: var(--r-3);
  background: rgba(183,140,255,.07);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nac-num { color: var(--violet-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; }
.nac-step strong { color: var(--text-strong); }
.nac-step span:last-child { color: var(--text-tertiary); font-size: 12px; }

.role-lane { padding: var(--s-4); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.role-card {
  border-radius: var(--r-3);
  border: 1px solid var(--rule-2);
  padding: 14px;
  background: rgba(255,255,255,.045);
}
.role-card span { display:block; font-family: var(--serif); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-hint); margin-bottom: 6px; }
.role-card strong { color: var(--text-strong); font-size: 13px; }
.role-card.azure { border-color: rgba(91,141,239,.3); }
.role-card.gilt { border-color: rgba(201,165,116,.35); }
.role-card.slime { border-color: rgba(110,240,151,.35); }
.role-card.pqc { border-color: rgba(139,224,255,.35); }

.settlement-hero { padding: var(--s-5); margin-bottom: var(--s-4); }
.settlement-line { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-5); }
.settlement-node {
  border: 1px solid var(--rule-2);
  color: var(--text-hint);
  background: rgba(255,255,255,.04);
  padding: 7px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.settlement-node.done { border-color: rgba(110,240,151,.35); color: var(--slime); background: rgba(110,240,151,.08); }
.settlement-metric {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  padding: 14px;
  background: rgba(255,255,255,.045);
}
.settlement-metric span { display:block; color: var(--text-hint); font-family: var(--mono); font-size: 10px; letter-spacing:.14em; text-transform: uppercase; }
.settlement-metric strong { display:block; color: var(--text-strong); font-size: 18px; font-family: var(--serif); font-weight: 500; margin-top: 6px; }

.issuance-card { padding: var(--s-5); }
.issuance-card h3 { color: var(--text-strong); font-family: var(--serif); font-weight: 500; margin-bottom: 8px; }
.issuance-card p { color: var(--text-tertiary); font-size: 13px; }
