/* review & launch: rv-shell (Nov 4)
   The Review & launch sheet: a header row (token, locked venue, the pen, what leaves your wallets), then two columns:
   the summary, three numbers, what runs once it's live and the warning (left, ~40%); the order of steps and the cost
   breakdown from rvorder.js (right, styled in rv-order.css). Fits 1440x900 and 1280x800 without scrolling. */

html:root .wpop.rv-pop:has(.rv-cols), html:root .wpop.rv-under:has(.rv-cols) { width: min(1120px, calc(100vw - 48px)); max-height: calc(100vh - 28px); }
html:root .wpop:is(.rv-pop, .rv-under):has(.rv-cols) > .wpop-b { gap: 12px; padding: 12px 20px 14px !important; }
/* the pen's pop-out hangs below the header row: let it out of the scroll box while it is open */
html:root .wpop.rv-pop:has(.rv-ed.open) > .wpop-b { overflow: visible !important; }

/* ---------- header row ---------- */
.rv-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 12px; border-radius: 14px;
  background: var(--gt, rgba(201, 220, 242, .035)); box-shadow: var(--gt-sh, inset 1px 1px 0 rgba(240, 247, 255, .06)); }
.rv-id { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.rv-idt { display: grid; gap: 5px; min-width: 0; }
.rv-nm { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rv-nm b { font: 600 17px/1.2 var(--f); color: var(--tx); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }
.rv-nm em { font: 500 13px var(--f); font-style: normal; color: var(--tx2); white-space: nowrap; }
.rv-pn { align-self: center; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 8px; cursor: pointer;
  color: rgba(201, 220, 242, .55); border: 1px solid rgba(201, 220, 242, .1);
  background: linear-gradient(160deg, rgba(240, 247, 255, .07), rgba(240, 247, 255, .015)); box-shadow: inset 1px 1px 0 rgba(240, 247, 255, .07);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.rv-pn .i { width: 12px; height: 12px; color: inherit !important; }
.rv-pn:hover, .rv-pn:focus-visible, .rv-pn[aria-expanded="true"] { color: #f0f7ff; border-color: rgba(201, 220, 242, .26);
  background: linear-gradient(160deg, rgba(240, 247, 255, .15), rgba(143, 179, 217, .07)); box-shadow: inset 1px 1px 0 rgba(240, 247, 255, .16), 0 0 14px -4px rgba(143, 179, 217, .6); }
.rv-pn:active { transform: scale(.94); }
.rv-pn:focus-visible { outline: 2px solid rgba(201, 220, 242, .55); outline-offset: 2px; }
.rv-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rv-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font: 500 11.5px var(--f); color: var(--tx2);
  border: 1px solid rgba(201, 220, 242, .1); background: rgba(201, 220, 242, .04); white-space: nowrap; }
.rv-chip > .i { width: 12px; height: 12px; }
.rv-chip > .i:last-child:not(:first-child) { width: 10px; height: 10px; margin-left: 2px; color: var(--tx3); }
.rv-chip > i { font-style: normal; color: var(--tx3); }
.rv-chip.miss { cursor: pointer; color: #ffb28a; border-color: rgba(255, 140, 90, .28); background: rgba(255, 110, 60, .07); }
.rv-chip.miss:hover { background: rgba(255, 110, 60, .13); }
.rv-chips .st { height: 22px; display: inline-flex; align-items: center; font-size: 11.5px; }

/* what leaves your wallets: the one big number, right-aligned; opens Funding */
.rv-out { flex: none; display: grid; justify-items: end; gap: 2px; padding: 4px 6px 4px 14px; margin: -4px -6px -4px 0; border: 0; border-radius: 10px; background: none;
  color: inherit; font: inherit; text-align: right; cursor: pointer; transition: background .18s ease; }
.rv-out:hover, .rv-out:focus-visible { background: rgba(240, 247, 255, .04); }
.rv-out:focus-visible { outline: 1px solid rgba(201, 220, 242, .4); }
.rv-out small { font: 500 11px var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); }
.rv-outv { display: inline-flex; align-items: center; gap: 7px; }
.rv-outv b { font: 600 22px/1.15 var(--f); font-variant-numeric: tabular-nums; color: var(--tx); letter-spacing: -.015em; }
.rv-outv i { font: 500 13px var(--f); font-style: normal; color: var(--tx2); }
.rv-outv .chain-mark { border-radius: 50%; }
.rv-out em { font: 400 11.5px var(--f); font-style: normal; color: var(--tx3); }
.rv-out em.dn { color: var(--dn); }

/* ---------- the pen's pop-out: a small frosted editor under the token (only what can still change) ---------- */
.rv-ed { position: absolute; z-index: 20; top: calc(100% + 12px); left: -4px; width: 384px; display: none; gap: 9px; padding: 12px 14px 12px; border-radius: 14px;
  background: linear-gradient(170deg, rgba(30, 38, 50, .94), rgba(16, 20, 28, .96)); border: 1px solid rgba(201, 220, 242, .14);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: inset 1px 1px 0 rgba(240, 247, 255, .1), 0 30px 70px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .25); }
.rv-ed.open { display: grid; animation: rvEdIn .16s ease-out; }
.rv-ed::before { content: ''; position: absolute; top: -6px; left: var(--rve-tip, 150px); width: 10px; height: 10px; rotate: 45deg;
  background: rgba(30, 38, 50, .96); border-left: 1px solid rgba(201, 220, 242, .14); border-top: 1px solid rgba(201, 220, 242, .14); }
@keyframes rvEdIn { from { opacity: 0; transform: translateY(-4px); } }
.rve-h { display: flex; align-items: center; gap: 7px; }
.rve-h > .i { width: 13px; height: 13px; color: var(--ac); }
.rve-h b { font: 600 13px var(--f); color: var(--tx); }
.rve-h small { font-size: 11px; color: var(--tx3); }
.rve-x { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 7px; background: rgba(201, 220, 242, .06); color: var(--tx2); cursor: pointer; }
.rve-x:hover { color: var(--tx); background: rgba(201, 220, 242, .12); }
.rve-x .i { width: 12px; height: 12px; }
.rve-art { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rve-bnw { position: relative; display: grid; }
.rve-pick { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(201, 220, 242, .08);
  background: rgba(201, 220, 242, .035); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .18s, border-color .18s; }
.rve-pick:hover, .rve-pick:focus-visible { background: rgba(201, 220, 242, .07); border-color: rgba(201, 220, 242, .18); }
.rve-pick > span:last-child { display: grid; min-width: 0; line-height: 1.25; }
.rve-pick b { font: 500 12.5px var(--f); color: var(--tx); }
.rve-pick small { font-size: 11px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rve-pick small.miss { color: #ffb28a; }
.rve-bn { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; overflow: hidden; color: var(--tx3);
  background: rgba(201, 220, 242, .06); }
.rve-bn img { width: 100%; height: 100%; object-fit: cover; }
.rve-bnx { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(201, 220, 242, .18); background: rgba(16, 20, 28, .95); color: var(--tx2); }
.rve-bnx:hover { color: var(--tx); }
.rve-bnx .i { width: 10px; height: 10px; }
.rv-ed .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-ed .field { gap: 4px; margin: 0; }
.rv-ed .field .fl { font-size: 11.5px; }
.rv-ed .inp { min-height: 32px; height: auto; }
.rv-ed .inp input, .rv-ed .inp textarea { font-size: 12.5px; }
.rv-ed .inp.ta textarea { min-height: 22px; max-height: 66px; resize: none; }
.rv-ed .tq-soc-in { display: grid; gap: 5px; }
.rv-ed .tq-soc-l { font-size: 11.5px; }
.rv-ed .tq-soc-g { gap: 6px; }
.rv-ed .tq-sf .inp { min-height: 28px; }
.rve-lock { display: grid; gap: 6px; padding: 9px 10px; border-radius: 10px; border: 1px dashed rgba(201, 220, 242, .14); background: rgba(6, 9, 14, .28); }
.rve-lh { display: flex; align-items: center; gap: 6px; }
.rve-lh .i { width: 12px; height: 12px; color: var(--tx3); }
.rve-lh b { font: 500 12px var(--f); color: var(--tx2); }
.rve-lh small { margin-left: auto; font-size: 11px; color: var(--tx3); }
.rve-lg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rve-lr { display: grid; gap: 1px; min-width: 0; padding: 4px 8px; border-radius: 8px; background: rgba(201, 220, 242, .03); }
.rve-lr span { font-size: 10.5px; color: var(--tx3); }
.rve-lr b { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font: 500 12px var(--f); color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rve-lr b .i { flex: none; width: 12px; height: 12px; }
.rve-back { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px; margin-left: -4px; border: 0; border-radius: 6px; background: none;
  color: var(--ac-hi, #c9dcf2); font: 500 12px var(--f); cursor: pointer; }
.rve-back .i { width: 12px; height: 12px; rotate: 180deg; }
.rve-back:hover span { text-decoration: underline; text-underline-offset: 3px; }
.rve-f { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.rve-f .muted { font-size: 11px; color: var(--tx3); }
.rve-f .btn.sm { height: 30px; min-height: 30px; padding: 0 12px; gap: 6px; font-size: 12.5px; }

/* ---------- two columns ---------- */
.rv-cols { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 14px; align-items: start; }
.rv-lc, .rv-rc { display: grid; gap: 10px; min-width: 0; align-content: start; }
.rv-say { margin: 2px 2px 0; font: 400 13px/1.55 var(--f); color: var(--tx2); }
.rv-say b { font-weight: 600; color: var(--tx); }
.rv-lk { display: inline; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--tx); cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(143, 179, 217, .4); text-decoration-style: dotted; text-underline-offset: 3px; transition: color .18s, text-decoration-color .18s; }
.rv-lk:hover, .rv-lk:focus-visible { color: var(--ac-hi, #c9dcf2); text-decoration-color: currentColor; text-decoration-style: solid; outline: none; }

/* the three numbers */
html:root .wpop .rv-s.rv-tls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; overflow: hidden; }
.rv-tl { display: grid; gap: 2px; min-width: 0; padding: 10px 12px 11px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.rv-tl + .rv-tl { box-shadow: inset 1px 0 0 rgba(201, 220, 242, .07); }
button.rv-tl { cursor: pointer; transition: background .18s ease; }
button.rv-tl:hover, button.rv-tl:focus-visible { background: rgba(240, 247, 255, .04); outline: none; }
.rv-tl small { font: 500 11px var(--f); color: var(--tx3); }
.rv-tl b { font: 600 19px/1.2 var(--f); font-variant-numeric: tabular-nums; color: var(--tx); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-tl.dn b { color: var(--dn); }
.rv-tl em { font: 400 11px var(--f); font-style: normal; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* once it's live: one row per automation, each opens its editor */
html:root .wpop .rv-s.rv-live { gap: 0; padding: 8px 8px 6px; }
html:root .wpop .rv-s.rv-live h4 { display: flex; align-items: center; gap: 7px; min-height: 0; margin: 0 0 3px; padding: 0 6px; font: 600 12px var(--f); color: var(--tx2); }
.rv-live h4 .i { width: 13px; height: 13px; color: var(--ac); }
.rv-lv { display: flex; align-items: center; gap: 9px; min-height: 30px; width: 100%; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 12.5px;
  text-align: left; cursor: pointer; transition: background .18s ease; }
.rv-lv:hover, .rv-lv:focus-visible { background: rgba(240, 247, 255, .045); outline: none; }
.rv-lv-ic { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; }
.rv-lv:not(.on) .rv-lv-ic::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(201, 220, 242, .25); }
.rv-lv.on .rv-lv-ic { color: #0d1016; background: var(--ac-hi, #c9dcf2); box-shadow: 0 0 10px -2px rgba(143, 190, 240, .6); }
.rv-lv-ic .i { width: 10px; height: 10px; stroke-width: 3; }
.rv-lv > span { flex: none; color: var(--tx); }
.rv-lv:not(.on) > span { color: var(--tx2); }
.rv-lv > b { flex: 1 1 auto; min-width: 0; margin-left: auto; font-weight: 400; color: var(--tx2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-lv:not(.on) > b { color: var(--tx3); }
.rv-lv > .i { flex: none; width: 11px; height: 11px; color: rgba(201, 220, 242, .3); transition: color .18s, transform .18s; }
.rv-lv:hover > .i { color: var(--tx); transform: translateX(2px); }

/* the quiet warning */
.rv-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 11px; border-radius: 10px; font: 400 12px/1.5 var(--f); color: var(--tx3);
  background: rgba(255, 140, 90, .04); box-shadow: inset 0 0 0 1px rgba(255, 140, 90, .1); }
.rv-warn > .i { flex: none; width: 13px; height: 13px; margin-top: 2px; color: rgba(255, 160, 110, .7); }
.rv-warn .rv-lk { color: var(--tx2); }

/* the right column's two slots (rvorder.js fills them) */
.rv-slot { min-width: 0; }
.rv-slot:empty { display: none; }
.rv-rc:not(:has(.rv-slot:not(:empty))) { min-height: 200px; border-radius: 14px; border: 1px dashed rgba(201, 220, 242, .1); }

@media (max-width: 960px) { .rv-cols { grid-template-columns: 1fr; } .rv-top { flex-wrap: wrap; } .rv-out { justify-items: start; text-align: left; margin: 0; padding-left: 6px; } }
@media (max-width: 520px) { .rv-ed { width: calc(100vw - 72px); } }

/* ---------- light theme ---------- */
html:root:root[data-look="9"][data-theme="light"] .rv-top { background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px rgba(20, 40, 70, .07), 0 1px 2px rgba(20, 35, 60, .05); }
html:root:root[data-look="9"][data-theme="light"] .rv-pn { color: var(--tx3); border-color: rgba(20, 40, 70, .12); background: rgba(255, 255, 255, .7); box-shadow: none; }
html:root:root[data-look="9"][data-theme="light"] :is(.rv-pn:hover, .rv-pn:focus-visible, .rv-pn[aria-expanded="true"]) { color: var(--ac); border-color: rgba(47, 111, 181, .35); background: #fff; }
html:root:root[data-look="9"][data-theme="light"] .rv-chip { border-color: rgba(20, 40, 70, .1); background: rgba(255, 255, 255, .6); }
html:root:root[data-look="9"][data-theme="light"] .rv-chip.miss { color: #b4331a; border-color: rgba(180, 51, 26, .25); background: rgba(255, 120, 80, .08); }
html:root:root[data-look="9"][data-theme="light"] :is(.rv-out:hover, .rv-tl:hover, .rv-lv:hover) { background: rgba(20, 40, 70, .045); }
html:root:root[data-look="9"][data-theme="light"] .rv-ed { background: linear-gradient(170deg, rgba(255, 255, 255, .97), rgba(244, 247, 251, .97)); border-color: rgba(20, 40, 70, .12);
  box-shadow: 0 24px 60px -18px rgba(20, 35, 60, .35), 0 0 0 1px rgba(20, 40, 70, .04); }
html:root:root[data-look="9"][data-theme="light"] .rv-ed::before { background: #fff; border-color: rgba(20, 40, 70, .12); }
html:root:root[data-look="9"][data-theme="light"] :is(.rve-x, .rve-pick, .rve-lr, .rve-bn) { background: rgba(20, 40, 70, .04); border-color: rgba(20, 40, 70, .08); }
html:root:root[data-look="9"][data-theme="light"] .rve-pick:hover { background: rgba(20, 40, 70, .07); }
html:root:root[data-look="9"][data-theme="light"] .rve-pick small.miss { color: #b4331a; }
html:root:root[data-look="9"][data-theme="light"] .rve-bnx { background: #fff; border-color: rgba(20, 40, 70, .18); }
html:root:root[data-look="9"][data-theme="light"] .rve-lock { background: rgba(20, 40, 70, .025); border-color: rgba(20, 40, 70, .16); }
html:root:root[data-look="9"][data-theme="light"] .rve-back { color: var(--ac); }
html:root:root[data-look="9"][data-theme="light"] .rv-tl + .rv-tl { box-shadow: inset 1px 0 0 rgba(20, 40, 70, .08); }
html:root:root[data-look="9"][data-theme="light"] .rv-lk { text-decoration-color: rgba(47, 111, 181, .45); }
html:root:root[data-look="9"][data-theme="light"] .rv-lk:hover { color: var(--ac); }
html:root:root[data-look="9"][data-theme="light"] .rv-lv:not(.on) .rv-lv-ic::before { background: rgba(20, 40, 70, .25); }
html:root:root[data-look="9"][data-theme="light"] .rv-lv.on .rv-lv-ic { color: #fff; background: var(--ac); box-shadow: none; }
html:root:root[data-look="9"][data-theme="light"] .rv-lv > .i { color: rgba(20, 40, 70, .3); }
html:root:root[data-look="9"][data-theme="light"] .rv-warn { color: var(--tx3); background: rgba(255, 120, 60, .06); box-shadow: inset 0 0 0 1px rgba(200, 80, 30, .14); }
html:root:root[data-look="9"][data-theme="light"] .rv-warn > .i { color: #c2561c; }
html:root:root[data-look="9"][data-theme="light"] .rv-rc:not(:has(.rv-slot:not(:empty))) { border-color: rgba(20, 40, 70, .12); }
