/* lab-console: the Yield module (channel F). A rack module between the front panel
   and the bay: readouts on the left, the stake desk on the right once wired.
   Reuses the rack's vars (--lc-*) and finishes; motion is opacity/transform only. */

.lc-yield { max-width: 1400px; margin: 0 auto; padding: 0 var(--v-pad-x) 12px; }
.lc-mod--yield { padding-top: 34px; }

.ly-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lc-yield.is-live .ly-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); align-items: start; }

.ly-head {
  margin: 0 0 6px;
  font-family: var(--lc-read); font-weight: 400;
  font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.2; letter-spacing: 0;
  color: var(--lc-amber); text-shadow: 0 0 10px rgb(255 179 71 / 0.45);
}
.ly-brief { margin: 0 0 14px; font-size: 0.96rem; line-height: 1.55; color: var(--v-soft); }

/* readouts */
.ly-reads { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ly-reads--mine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ly-read { min-width: 0; padding: 10px 12px; border-radius: 4px; background: #07090c; box-shadow: inset 0 1px 4px #000; }
.ly-read dt { margin: 0 0 4px; font-family: var(--lc-cond); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lc-label); }
.ly-read dd {
  margin: 0; min-height: 1.3em;
  font-family: var(--lc-read); font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.25;
  color: var(--lc-glow); text-shadow: 0 0 10px color-mix(in srgb, var(--lc-glow) 50%, transparent);
  font-variant-numeric: tabular-nums; overflow-wrap: break-word;
}
.ly-reads--mine .ly-read dd { color: var(--lc-amber); text-shadow: 0 0 8px rgb(255 179 71 / 0.4); font-size: clamp(0.95rem, 1.3vw, 1.12rem); }
.ly-unit { display: inline-block; white-space: nowrap; margin-left: 0.4em; font-size: 0.62em; color: var(--lc-label); text-shadow: none; letter-spacing: 0.04em; }
.ly-read dd.is-loading { color: var(--lc-label); text-shadow: none; animation: ly-pulse 1.2s ease-in-out infinite; }
@keyframes ly-pulse { 50% { opacity: 0.35; } }

.ly-note { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; font-family: var(--lc-read); font-size: 0.8rem; color: var(--lc-bad); }
.ly-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lc-bad); box-shadow: 0 0 8px var(--lc-bad); }

/* the contract's address readout */
.ly-ca {
  margin-top: 10px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 8px 8px 12px; border: 1px solid #0a0d11; border-radius: 4px; background: #07090c; box-shadow: inset 0 1px 4px #000;
}
.ly-ca[hidden] { display: none; }
.ly-ca__label { font-family: var(--lc-cond); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lc-label); }
.ly-ca__value { min-width: 0; font-family: var(--lc-read); font-size: 0.86rem; color: var(--lc-amber); text-shadow: 0 0 8px rgb(255 179 71 / 0.4); overflow-wrap: anywhere; }
.ly-copy, .ly-scan {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 6px 10px; border: 1px solid #07090b; border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, #2a323e, #1d232c); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 2px 0 #07090b;
  color: var(--lc-text); text-decoration: none;
  font-family: var(--lc-cond); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ly-scan { width: 34px; padding: 0; color: var(--lc-glow); }
.ly-copy:hover, .ly-scan:hover { transform: translateY(1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 1px 0 #07090b; }
.ly-copy.is-copied { color: #111; background: linear-gradient(180deg, color-mix(in srgb, var(--lc-ok) 80%, #fff), var(--lc-ok)); }

/* the desk */
.ly-desk { display: grid; gap: 10px; padding: 12px; border: 1px solid #0a0d11; border-radius: 6px; background: #11161c; box-shadow: inset 0 1px 3px #000; }
.ly-note[hidden], .ly-desk[hidden], .ly-form[hidden], .ly-picker[hidden], .ly-tx[hidden], .ly-hint[hidden] { display: none; }

.ly-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px;
  min-height: 42px; padding: 10px 12px; border: 1px solid #07090b; border-radius: 6px; cursor: pointer;
  background: linear-gradient(180deg, #2a323e, #1d232c);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 2px 0 #07090b;
  color: var(--lc-text); text-decoration: none;
  font-family: var(--lc-cond); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s;
}
.ly-btn::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2c333d; box-shadow: inset 0 1px 1px #000; }
.ly-btn:hover:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 1px 0 #07090b; }
.ly-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 3px #000; }
.ly-btn:disabled { cursor: not-allowed; opacity: 0.42; }
.ly-btn--primary { background: linear-gradient(180deg, color-mix(in srgb, var(--wl-accent) 85%, #fff), var(--wl-accent)); color: var(--wl-on-accent); }
.ly-btn--primary::before { background: #fff; box-shadow: 0 0 8px #fff; }
.ly-btn--warn { background: linear-gradient(180deg, #ffc977, var(--lc-amber)); color: #1a1206; }
.ly-btn--warn::before { background: #fff3dc; box-shadow: 0 0 8px var(--lc-amber); }
.ly-btn.is-next::before { background: var(--lc-amber); box-shadow: 0 0 8px var(--lc-amber); }
.ly-connect { display: grid; }
.ly-connect .ly-btn { justify-content: flex-start; }
.ly-btn:focus-visible, .ly-copy:focus-visible, .ly-scan:focus-visible, .ly-link:focus-visible, .ly-seg__b:focus-visible,
.ly-max:focus-visible, .ly-wallet:focus-visible, .ly-input:focus-visible { outline: 2px solid var(--lc-amber); outline-offset: 2px; }

.ly-acct { margin: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; background: #07090c; box-shadow: inset 0 1px 4px #000; }
.ly-acct code { font-family: var(--lc-read); font-size: 0.86rem; color: var(--lc-amber); }
.ly-acct__led { width: 8px; height: 8px; border-radius: 50%; background: var(--lc-ok); box-shadow: 0 0 8px var(--lc-ok); }
.ly-link { margin-left: auto; padding: 4px 6px; border: 0; background: none; cursor: pointer; color: var(--lc-label); font-family: var(--lc-cond); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.ly-link:hover { color: var(--lc-text); }

/* the stake / withdraw rocker */
.ly-form { display: grid; gap: 8px; }
.ly-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; border-radius: 5px; background: #07090c; box-shadow: inset 0 1px 4px #000; }
.ly-seg__b {
  padding: 7px 8px; border: 0; border-radius: 3px; cursor: pointer; background: transparent; color: var(--lc-label);
  font-family: var(--lc-cond); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.ly-seg__b.is-on { color: var(--lc-text); background: linear-gradient(180deg, #2e3743, #212833); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 1px 0 #07090b; }

.ly-field { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 4px; background: #07090c; box-shadow: inset 0 1px 4px #000; border: 1px solid #0a0d11; }
.ly-input { min-width: 0; width: 100%; padding: 8px 0; border: 0; background: transparent; color: var(--lc-amber); font-family: var(--lc-read); font-size: 1.15rem; text-shadow: 0 0 8px rgb(255 179 71 / 0.35); }
.ly-input::placeholder { color: #3a4552; text-shadow: none; }
.ly-input:focus { outline: none; }
.ly-field:focus-within { border-color: color-mix(in srgb, var(--lc-amber) 55%, #0a0d11); }
.ly-field__unit { font-family: var(--lc-read); font-size: 0.78rem; color: var(--lc-label); }
.ly-max { padding: 6px 10px; border: 1px solid #07090b; border-radius: 3px; cursor: pointer; background: linear-gradient(180deg, #2a323e, #1d232c); color: var(--lc-amber); font-family: var(--lc-cond); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ly-max:disabled { opacity: 0.42; cursor: not-allowed; }

.ly-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.ly-hint { margin: 0; font-family: var(--lc-read); font-size: 0.78rem; color: var(--lc-amber); }

/* the tx line */
.ly-tx { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px; background: #07090c; box-shadow: inset 0 1px 4px #000; font-family: var(--lc-read); font-size: 0.8rem; color: var(--v-soft); }
.ly-tx a { color: var(--lc-amber); text-decoration: underline; text-underline-offset: 3px; }
.ly-tx__led { width: 8px; height: 8px; border-radius: 50%; background: #2c333d; }
.ly-tx.is-pending .ly-tx__led { background: var(--lc-amber); box-shadow: 0 0 8px var(--lc-amber); animation: ly-pulse 0.9s ease-in-out infinite; }
.ly-tx.is-ok .ly-tx__led { background: var(--lc-ok); box-shadow: 0 0 8px var(--lc-ok); }
.ly-tx.is-bad { color: var(--lc-bad); }
.ly-tx.is-bad .ly-tx__led { background: var(--lc-bad); box-shadow: 0 0 8px var(--lc-bad); }
.ly-tx.is-info .ly-tx__led { background: var(--lc-glow); }

/* the wallet picker: a patch bay */
.ly-picker { padding: 10px; border-radius: 6px; border: 1px solid var(--lc-edge); background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel)); animation: ly-in 0.18s ease both; }
.ly-picker__head { margin: 0 0 8px; display: flex; align-items: center; font-family: var(--lc-cond); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lc-label); }
.ly-picker__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ly-wallet {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #0a0d11; border-radius: 4px; cursor: pointer;
  background: #0b0e12; box-shadow: inset 0 1px 3px #000; color: var(--lc-text);
  font-family: var(--lc-cond); font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; text-align: left;
  transition: transform 0.12s ease;
}
.ly-wallet:hover { transform: translateX(2px); border-color: var(--lc-edge); }
.ly-wallet img, .ly-wallet__mono { flex: none; width: 24px; height: 24px; border-radius: 4px; }
.ly-wallet__mono { display: grid; place-items: center; background: #1d232c; color: var(--lc-amber); font-family: var(--lc-read); }
@keyframes ly-in { from { opacity: 0; transform: translateY(-4px); } }

/* smaller screens */
@media (max-width: 1080px) {
  .lc-yield.is-live .ly-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .ly-reads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ly-reads--mine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ly-reads--mine .ly-read:last-child { grid-column: 1 / -1; }
  .ly-ca { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ly-ca__label { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .ly-read dd.is-loading, .ly-tx.is-pending .ly-tx__led, .ly-picker { animation: none; }
  .ly-btn, .ly-copy, .ly-scan, .ly-wallet { transition: none; }
  .ly-btn:hover:not(:disabled), .ly-copy:hover, .ly-scan:hover, .ly-wallet:hover { transform: none; }
}
