/* Live wiring added to the approved layout: header status, wallet menu, limits, steps, allowance read.
   Same tokens, borders and glass as the existing slip; nothing here restyles the three cores. */

/* header status follows the chain */
.net-state[data-state="open"] { border-style: solid; border-color: var(--acc); color: var(--acc); }
.net-state[data-state="paused"], .net-state[data-state="hold"] { border-style: solid; color: var(--text); }
.docs-link { text-decoration: none; }
/* the header buttons keep their words whole; the motion label folds to its icon first */
.top-tools > * { flex-shrink: 0; white-space: nowrap; }
.wallet { max-width: 30ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1360px) and (min-width: 901px) {
  .top-tools .tool-label { display: none; }
  .top-tools #motionToggle { width: 40px; padding: 0; justify-content: center; }
}

/* wallet menu */
.top { position: relative; }
.wpop {
  position: absolute; right: clamp(12px, 3vw, 32px); top: calc(100% + 6px); z-index: 30;
  width: min(360px, calc(100vw - 24px)); padding: 16px; display: grid; gap: 12px;
}
.wpop-list { display: grid; gap: 8px; }
.wpop-list .ghost { min-height: 44px; text-align: left; }
.wpop-list p { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.wpop .fine { font-size: 12px; color: var(--text-3); }

/* limits */
.limits { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px 10px; margin: 0; background: rgba(0,0,0,.22); min-width: 0; }
.limits legend { padding: 0 6px; margin: 0; }
.lim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lim-grid label { display: grid; gap: 6px; font-size: 12px; color: var(--text-3); min-width: 0; }
.lim-grid select {
  min-height: 44px; width: 100%; font: 600 14px/1 var(--body); color: var(--text);
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 8px;
}
.lim-grid select:focus-visible { outline: 2px solid var(--acc); outline-offset: 0; }
.lim-grid b { font: 600 13px/1.3 var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.limits code { overflow-wrap: anywhere; word-break: break-all; }
/* referrer: explicit choice, verified on the chain */
.ref-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; margin-top: 10px; }
.ref-use { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ref-use input { width: 18px; height: 18px; accent-color: var(--acc); }
.ref-row input[type="text"] {
  min-height: 44px; width: 100%; min-width: 0; font: 500 13px/1 var(--mono); color: var(--text);
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 10px;
}
.ref-row input[type="text"]:focus-visible { outline: 2px solid var(--acc); outline-offset: 0; }
.ref-state { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.mine dd code { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; margin-right: 6px; }
.calldata { display: block; margin-top: 4px; font-size: 11px; color: var(--text-2); }

/* steps: connect → approve → mint */
.tx-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; counter-reset: s; }
.tx-steps li {
  flex: 1; counter-increment: s; font: 600 12px/1.2 var(--mono); color: var(--text-3);
  padding: 8px 8px 8px 10px; border: 1px dashed var(--line-2); border-radius: 6px;
}
.tx-steps li::before { content: counter(s) " · "; }
.tx-steps[data-step="0"] li:nth-child(1),
.tx-steps[data-step="1"] li:nth-child(2),
.tx-steps[data-step="2"] li:nth-child(3) { color: var(--acc-ink); background: var(--text); border: 1px solid var(--text); }
.tx-steps[data-step="1"] li:nth-child(1),
.tx-steps[data-step="2"] li:nth-child(-n+2) { color: var(--text-2); border-style: solid; }

/* status line under the button carries outcomes; links inside stay readable */
.status[data-tone="ok"] { color: var(--text); border-left: 3px solid var(--acc); padding-left: 10px; }
.status[data-tone="bad"] { color: var(--bad); border-left: 3px solid var(--bad); padding-left: 10px; }
.status[data-tone="wait"] { color: var(--text-2); border-left: 3px dashed var(--line-2); padding-left: 10px; }
.status a, .status .linkish { color: inherit; }
.cta[aria-busy="true"] { cursor: progress; }

/* the allowance read for the connected wallet */
.mine { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(0,0,0,.28); }
.mine-head { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.mine-head b { font-family: var(--mono); color: var(--text); margin-right: 8px; }
.mine dd { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .top-tools .net-state { display: inline-block; padding: 6px 6px; font-size: 10px; }
  .docs-link { width: auto !important; padding: 0 10px !important; }
  .wallet { max-width: none; }
}
@media (max-width: 420px) {
  .wallet .w-more { display: none; }   /* "Connect wallet" → "Connect"; an address stays whole */
  .top-tools { gap: 6px; }
}
@media (max-width: 560px) {
  .lim-grid { grid-template-columns: 1fr; }
  .lim-grid label { grid-template-columns: 1fr 1.2fr; align-items: center; }
  .lim-grid label span { grid-column: 1 / -1; }
  .ref-row { grid-template-columns: 1fr; }
  .top-tools .docs-link { display: none; }
}
