/* Yield (#/yield). Everything is scoped under .yd */
.yd { background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.yd p { max-width: none; }
.yd .yd-in { max-width: 1260px; margin: 0 auto; padding: 26px 24px 64px; display: grid; gap: 14px; }
.yd-head { display: grid; gap: 14px; }
.yd-title { display: grid; gap: 8px; }
.yd .yd-title h1 { margin: 0; font: 650 28px/1.1 var(--sans); letter-spacing: -.03em; }
.yd .yd-title p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; max-width: 92ch; }
.yd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yd-wallet, .yd-ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 12px; white-space: nowrap; }
.yd-wallet { padding-left: 4px; }
.yd-wallet .btn { height: 26px; padding: 0 10px; font-size: 12px; }
.yd-wallet:has(.yd-wl) { padding-left: 10px; }
.yd-wl, .yd-ctl > span { color: var(--muted); }
.yd-ctl b { font-weight: 600; font-size: 12px; }
.yd-zero { display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--up) 35%, transparent); background: color-mix(in srgb, var(--up) 8%, transparent); color: var(--up); font-weight: 600; font-size: 12px; white-space: nowrap; }
.yd-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.yd-seg button { height: 24px; padding: 0 8px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: 600 11.5px/1 var(--mono); }
.yd-seg button:hover { color: var(--fg); }
.yd-seg button.on { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }

.yd-panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.yd-ph { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); flex-wrap: wrap; }
.yd .yd-ph h2 { margin: 0; font: 600 14px/1.2 var(--sans); }
.yd-ph > .dim { font: 11.5px/1 var(--mono); }
.yd-find { margin-left: auto; display: flex; gap: 6px; min-width: 0; flex: 0 1 340px; }
.yd-find input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--bg); outline: 0; font-size: 12px; }
.yd-find input:focus { border-color: var(--accent-2); }
.yd-find .btn { height: 30px; }
.yd-ext { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); font: 600 10.5px/1 var(--mono); white-space: nowrap; }
.yd .yd-note, .yd .yd-foot { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.yd .yd-foot { border-top: 1px solid var(--line); color: var(--dim); }

/* the LST table: one grid for header and rows */
.yd-table { --cols: minmax(190px, 1fr) 100px 76px 110px 150px 150px; }
.yd-hrow, .yd-row { display: grid; grid-template-columns: var(--cols); column-gap: 12px; align-items: center; padding: 0 14px; }
.yd-hrow { height: 32px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.yd-hrow span:nth-child(n+2) { text-align: right; }
.yd-row { min-height: 52px; padding-top: 7px; padding-bottom: 7px; row-gap: 8px; border-bottom: 1px solid var(--line); }
.yd-row:last-child { border-bottom: 0; }
.yd-row:hover { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.yd-tok { display: flex; align-items: center; gap: 10px; min-width: 0; }
.yd-tok > span:not(.yd-av) { display: grid; gap: 1px; min-width: 0; }
.yd-av { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); font: 600 9.5px/1 var(--mono); }
.yd-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yd-tok b { font-size: 13px; font-weight: 650; }
.yd-tok small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yd-tok:hover b { color: var(--accent); }
.yd-c { text-align: right; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* one quiet Stake / Unstake pair per row; the chosen side opens the amount row underneath */
.yd-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.yd-pick { height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: none; color: var(--muted); font: 600 12px/1 var(--sans); white-space: nowrap; }
.yd-pick:hover { color: var(--fg); border-color: var(--dim); }
.yd-pick[data-mode="stake"].on { color: color-mix(in srgb, var(--up) 75%, var(--fg)); border-color: color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 10%, transparent); }
.yd-pick[data-mode="unstake"].on { color: color-mix(in srgb, var(--warn) 75%, var(--fg)); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.yd-ex { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 340px) auto; justify-content: end; gap: 6px; }
.yd-amt { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; height: 30px; padding: 0 4px 0 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--bg); }
.yd-amt:focus-within { border-color: var(--accent-2); }
.yd-amt input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; font: 500 13px/1 var(--mono); }
.yd-amt em { font-style: normal; color: var(--muted); font: 11px/1 var(--mono); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yd-max { height: 22px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; background: none; color: var(--muted); font: 600 10.5px/1 var(--mono); }
.yd-max:hover { color: var(--fg); border-color: var(--dim); }
.yd-go { flex: none; height: 30px; min-width: 84px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--up); color: #04150d; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.yd-row:has([data-mode="unstake"].on) .yd-go { background: var(--warn); color: #1d1400; }
.yd-go:not(:disabled):hover { filter: brightness(1.08); }
/* idle rows: a quiet outline instead of a dozen solid buttons; the row being quoted lights up */
.yd-go:disabled, .yd-row:has([data-mode="unstake"].on) .yd-go:disabled { background: var(--panel-2); color: var(--muted); box-shadow: none; filter: none; cursor: default; }
.yd-row:has(.yd-ex:not([hidden])) { background: color-mix(in srgb, var(--panel-2) 45%, transparent); }
.yd-state { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 34px 16px; color: var(--muted); text-align: center; }
.yd-state .btn { height: 28px; }

/* quote under a row */
.yd-q { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 3px; border: 1px dashed var(--line-2); border-radius: 8px; background: var(--bg); }
.yd-qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.yd-qgrid > div { display: grid; gap: 3px; min-width: 0; }
.yd-qgrid .wide { grid-column: span 2; }
.yd-qgrid > div > span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.yd-qgrid b { font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.yd-qgrid b.warn, .yd .warn { color: var(--warn); }
.yd-fees { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 8px; border-top: 1px solid var(--line); }
.yd-fee { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; }
.yd-fee b { color: var(--fg); font-weight: 500; font-size: 11px; }
.yd-fee i { font-style: normal; color: var(--dim); }
.yd-fee.us { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.yd-fee.us b { color: var(--up); font-weight: 600; }
.yd-qmsg { font-size: 12px; line-height: 1.45; }

/* lending link-outs */
.yd-lend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.yd-lc { display: grid; align-content: start; gap: 9px; padding: 14px; background: var(--panel); min-width: 0; }
.yd-lc:hover { background: var(--panel-2); }
.yd-lc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.yd-lc-h b { font-size: 14px; }
.yd .yd-lc p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.yd-lc-r { display: flex; flex-wrap: wrap; gap: 6px 16px; min-height: 22px; align-items: baseline; font-size: 12px; }
.yd-lc-r span { display: inline-flex; gap: 6px; align-items: baseline; }
.yd-lc-r em { font-style: normal; color: var(--muted); font-size: 11px; }
.yd-lc-r b { font-size: 14px; font-weight: 600; }
.yd-lc-s { color: var(--dim); font-size: 11px; }

/* narrower: rows become cards */
@media (max-width: 1060px) {
  .yd-hrow { display: none; }
  .yd-row { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 12px; padding-bottom: 12px; }
  .yd-tok { grid-column: 1 / 4; grid-row: 1; }
  .yd-act { grid-column: 4 / 5; grid-row: 1; }
  .yd-c { text-align: left; display: grid; gap: 2px; }
  .yd-c::before { content: attr(data-label); color: var(--muted); font: 10.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .05em; }
  .yd-lend { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .yd .yd-in { padding: 18px 16px 48px; }
  .yd .yd-title h1 { font-size: 24px; }
  .yd .yd-title p { font-size: 13px; }
  .yd-bar > * { flex: 1 1 auto; }
  .yd-wallet { justify-content: flex-start; }
  .yd-find { flex: 1 1 100%; margin-left: 0; }
  .yd-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
  .yd-tok { grid-column: 1 / 2; }
  .yd-act { grid-column: 2 / 3; }
  .yd-pick { height: 30px; padding: 0 11px; }
  .yd-ex { grid-template-columns: minmax(0, 1fr) auto; justify-content: stretch; }
  .yd-amt { height: 36px; }
  .yd-go { height: 36px; }
  .yd-qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* "Show more" under the LST rows (the long tail of Jupiter's 'lst' tag) */
.yd-more { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12px; }
.yd-more .btn { height: 28px; }
.yd-tok .flag { margin-left: 6px; font-style: normal; color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); vertical-align: 1px; }
