/* OTC REV — the revenue desk. Components on the OTC design tokens (theirs.css).
   Dark-first: the reference card is a dark ledger with a lime SOL figure. Every
   token has a light variant too; the theme button flips it. */

:root { --rvc: #4f8f10; --rvc-hi: #5fa61a; --rvc-ink: #fff; --rvc-soft: color-mix(in srgb, var(--rvc) 10%, var(--paper));
        --rv-tile: #ffffff; --rv-tile-line: #e2ddcd; --rv-dot: rgba(23,23,15,.07); --rv-glow: rgba(79,143,16,.10);
        --rv-s1: #4f8f10; --rv-s2: #1f6fd1; --rv-s3: #b8541c; --rv-s4: #4a4a44; --rv-area: rgba(79,143,16,.12); --rv-up: #3e8a0e; --rv-down: #c23b2e; }
[data-theme="dark"] { --rvc: #9be24a; --rvc-hi: #b4ef6a; --rvc-ink: #0e1a04; --rvc-soft: color-mix(in srgb, var(--rvc) 12%, var(--paper));
        --rv-tile: #1b1b1b; --rv-tile-line: #2a2a2a; --rv-dot: rgba(255,255,255,.055); --rv-glow: rgba(155,226,74,.13);
        --rv-s1: #9be24a; --rv-s2: #5fb8ff; --rv-s3: #f0894a; --rv-s4: #c9c9c9; --rv-area: rgba(155,226,74,.12); --rv-up: #9be24a; --rv-down: #ff7a6b; }

html, body { overflow-x: clip; }
a, button { -webkit-tap-highlight-color: transparent; }
body { background: var(--paper); }

/* page = sidebar + shell */
.rv-page { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.rv-side { border-right: 1px solid var(--line); background: var(--paper); padding: 14px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rv-side-brand { display: flex; align-items: center; gap: 8px; padding: 6px 10px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.rv-side-brand-word { font-weight: 800; letter-spacing: .1em; font-size: 14px; }
.rv-side-nav { display: flex; flex-direction: column; gap: 2px; }
.rv-side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.rv-side-nav a:hover { background: var(--well); }
.rv-side-nav a.is-here { background: var(--rvc-soft); color: var(--ink); font-weight: 700; }
.rv-side-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; flex-shrink: 0; }
.rv-side-ext { margin-left: auto; color: var(--muted); font-size: 11px; }
.rv-side-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.rv-side-toggle { display: none; position: fixed; top: 14px; left: 12px; z-index: 60; border: 1px solid var(--frame); background: var(--paper); color: var(--ink); border-radius: 8px; width: 34px; height: 34px; place-items: center; cursor: pointer; }
.rv-side-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 49; }

.rv-shell { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 30px 90px; min-width: 0; }
/* the ledger ground: dot grid + a lime glow bleeding in from the top-left, as on the card */
.rv-main { position: relative; }
.rv-main::before { content: ""; position: absolute; inset: -40px -30px 0; background-image: radial-gradient(circle, var(--rv-dot) 0 1px, transparent 1.2px); background-size: 22px 22px; pointer-events: none; z-index: 0; mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%); }
.rv-main::after { content: ""; position: absolute; top: -140px; left: -260px; width: 820px; height: 620px; background: radial-gradient(closest-side, var(--rv-glow), transparent 70%); pointer-events: none; z-index: 0; }
.rv-main > * { position: relative; z-index: 1; }

/* header */
.rv-header { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; position: relative; z-index: 2; }
.rv-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.rv-brand-logo { width: 38px; height: 38px; image-rendering: pixelated; border-radius: 9px; background: var(--rv-tile); border: 1px solid var(--rv-tile-line); padding: 3px; box-sizing: border-box; }
.rv-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.rv-brand-word { font-weight: 800; letter-spacing: .02em; font-size: 15px; white-space: nowrap; }
.rv-brand-domain { font-size: 11px; color: var(--muted); }
.rv-sibs { display: flex; align-items: center; gap: 6px; }
.rv-sib { border: 1px solid var(--frame); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 9px; text-decoration: none; transition: color .15s, background .15s; }
.rv-sib:hover { color: var(--ink); background: var(--well); }
.rv-sib[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.rv-sib-rev { border-color: var(--rvc); color: var(--rvc); }
.rv-nav { margin-left: auto; display: flex; gap: 16px; overflow-x: auto; }
.rv-nav a { color: var(--muted); text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.rv-nav a:hover { color: var(--ink); }
.rv-iconbtn { border: 1px solid var(--frame); background: var(--paper); color: var(--ink); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.rv-cta { background: var(--rvc); color: var(--rvc-ink); border-radius: 9px; padding: 7px 15px; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.rv-cta:hover { filter: brightness(1.07); }
.rv-cta-2 { background: var(--ink); color: var(--paper); }

/* the card (hero) — mirrors the reference ledger */
.rv-card { padding: 54px 0 0; }
.rv-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 42px; }
.rv-eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.rv-eyebrow b { color: var(--rvc); font-weight: 700; }
.rv-big-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.rv-big { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; line-height: .95; }
.rv-big-n { font-size: clamp(56px, 11vw, 136px); font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--ink); }
.rv-big-u { font-size: clamp(22px, 3.6vw, 42px); font-weight: 800; color: var(--rvc); letter-spacing: -.02em; }
.rv-big-sub { color: var(--muted); font-size: 15px; margin: 16px 0 34px; max-width: 760px; line-height: 1.6; }
.rv-big-sub b { color: var(--ink); font-weight: 600; }

.rv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rv-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.rv-tile { background: var(--rv-tile); border: 1px solid var(--rv-tile-line); border-radius: 12px; padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rv-tile-l { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rv-tile-n { font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rv-tile-n small { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.rv-tile-s { font-size: 12.5px; color: var(--muted); }
.rv-tile-hi { border-color: var(--rvc); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rvc) 35%, transparent), 0 0 34px -10px color-mix(in srgb, var(--rvc) 45%, transparent); }
.rv-tile-hi .rv-tile-l, .rv-tile-hi .rv-tile-n { color: var(--rvc); }
.rv-tile-hi .rv-tile-n small { color: var(--rvc); opacity: .75; }

.rv-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rv-card-foot p { margin: 0; color: var(--muted); font-size: 13px; }
.rv-chg { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-chg.is-up { color: var(--rv-up); }
.rv-chg.is-down { color: var(--rv-down); }
.rv-status { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.rv-led { width: 8px; height: 8px; border-radius: 50%; background: var(--rvc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rvc) 22%, transparent); animation: rv-pulse 2.4s ease-in-out infinite; }
.rv-led.is-stale { background: var(--muted); animation: none; box-shadow: none; }
@keyframes rv-pulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rvc) 22%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rvc) 8%, transparent); } }

/* sections */
.rv-section { padding-top: 70px; scroll-margin-top: 24px; }
.rv-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rv-h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; position: relative; padding-left: 16px; }
.rv-h2::before { content: ""; position: absolute; left: 0; top: .34em; width: 7px; height: 14px; background: var(--rvc); border-radius: 2px; }
.rv-subtle { color: var(--muted); font-size: 13.5px; max-width: 660px; margin: 0 0 20px; line-height: 1.7; }
.rv-subtle a { color: var(--muted); }
.rv-h3 { font-size: 14px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.rv-fine { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.6; }
.rv-fine a { color: var(--muted); }

/* chips */
.rv-range { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.rv-chip { border: 1px solid var(--frame); background: var(--paper); color: var(--muted); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 5px 11px; cursor: pointer; min-height: 30px; }
.rv-chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rv-chip-sep { width: 1px; background: var(--line); margin: 4px 4px; }

/* chart */
.rv-chart-wrap { position: relative; border-radius: 12px; background: var(--rv-tile); border: 1px solid var(--rv-tile-line); padding: 18px 18px 10px; }
.rv-chart-title { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.rv-chart-sum { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-chart { width: 100%; min-height: 230px; }
.rv-chart svg { display: block; overflow: visible; touch-action: pan-y; }
.rv-grid { stroke: var(--line); stroke-width: 1; }
.rv-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-bar { fill: var(--rvc); }
.rv-bar.is-dim { opacity: .45; }
.rv-line { fill: none; stroke: var(--rvc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rv-area { fill: var(--rv-area); }
.rv-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.rv-tip { position: absolute; top: 44px; width: 172px; pointer-events: none; background: var(--paper); border: 1px solid var(--frame); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; z-index: 3; }
.rv-tip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-table-toggle { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.rv-table-toggle summary { cursor: pointer; padding: 6px 0; }
.rv-table-scroll { overflow-x: auto; }
.rv-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rv-table th, .rv-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rv-table th { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rv-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* split */
.rv-split { border-radius: 12px; background: var(--rv-tile); border: 1px solid var(--rv-tile-line); padding: 20px; }
.rv-split-bar { display: flex; gap: 2px; height: 46px; border-radius: 8px; overflow: hidden; background: var(--paper); }
.rv-seg { display: flex; align-items: center; justify-content: center; min-width: 0; color: #0e1a04; font-size: 11px; font-weight: 700; white-space: nowrap; padding: 0 4px; }
.rv-seg span { overflow: hidden; text-overflow: ellipsis; }
.rv-seg-1, .rv-sw.rv-seg-1 { background: var(--rv-s1); }
.rv-seg-2, .rv-sw.rv-seg-2 { background: var(--rv-s2); }
.rv-seg-3, .rv-sw.rv-seg-3 { background: var(--rv-s3); }
.rv-seg-4, .rv-sw.rv-seg-4 { background: var(--rv-s4); }
.rv-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 18px; font-size: 12.5px; color: var(--muted); }
.rv-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }

/* two panels */
.rv-two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
.rv-panel { border-radius: 12px; background: var(--rv-tile); border: 1px solid var(--rv-tile-line); padding: 18px 20px; min-width: 0; }
.rv-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.rv-panel-head .rv-fine { margin: 0; }

/* ledger tape */
.rv-tape { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rv-tape li { display: grid; grid-template-columns: 52px 62px minmax(0,1fr) auto auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.rv-tape li:first-child { border-top: 0; }
.rv-kind { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 4px; padding: 2px 6px; text-align: center; }
.rv-kind-buy { background: var(--rvc-soft); color: var(--rvc); }
.rv-kind-burn { background: color-mix(in srgb, var(--rv-s3) 14%, var(--paper)); color: var(--rv-s3); }
.rv-tape-when { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-tape-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-tape-what b { font-variant-numeric: tabular-nums; }
.rv-tape-amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rv-tape-tx { color: var(--muted); font-size: 11px; text-decoration: none; font-family: ui-monospace, monospace; }
.rv-tape-tx:hover { color: var(--rvc); }

/* engine */
.rv-kv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.rv-kv li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.rv-kv li:nth-child(-n+2) { border-top: 0; }
.rv-kv .rv-lab { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.rv-kv .rv-val { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-kv .rv-val small { font-size: 11px; color: var(--muted); font-weight: 600; }

/* supply destroyed */
.rv-stack { display: flex; flex-direction: column; gap: 10px; }
.rv-stack-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; font-size: 12.5px; }
.rv-stack-bar { height: 12px; border-radius: 4px; background: var(--paper); overflow: hidden; }
.rv-stack-bar i { display: block; height: 100%; border-radius: 4px; background: var(--rvc); }
.rv-stack-bar i.is-desk { background: var(--rv-s3); }
.rv-stack-n { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rv-stack-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 13px; }
.rv-stack-total b { font-variant-numeric: tabular-nums; }

/* volume */
.rv-vol { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }

/* $REV */
.rv-token { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; border-radius: 12px; background: var(--rv-tile); border: 1px solid var(--rvc); padding: 26px; box-shadow: 0 0 44px -14px color-mix(in srgb, var(--rvc) 45%, transparent); }
.rv-token-mark { width: 220px; height: 220px; image-rendering: pixelated; image-rendering: crisp-edges; display: block; margin: 0 auto; }
.rv-token-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.65; }
.rv-token-body p:last-child { margin: 0; }
.rv-token-sym { font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--rvc); margin: 0 0 6px; }
.rv-token-ca { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.rv-code { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.rv-code a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.rv-code a:hover { color: var(--rvc); }
.rv-soon { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--frame); border-radius: 999px; padding: 4px 10px; }
.rv-btn { border: 0; border-radius: 10px; background: var(--rvc); color: var(--rvc-ink); font-weight: 700; font-size: 13px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-block; }
.rv-btn:hover { filter: brightness(1.07); }

/* verify */
.rv-verify { display: flex; flex-direction: column; gap: 10px; }
.rv-vrow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.rv-lab { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* footer */
.rv-footer { margin-top: 76px; border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.rv-foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12px; letter-spacing: .07em; }
.rv-foot-line { color: var(--muted); font-size: 11.5px; line-height: 1.65; max-width: 680px; }
.rv-foot-line a { color: var(--muted); }

@media (max-width: 1000px) {
  .rv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .rv-page { grid-template-columns: 1fr; }
  .rv-side { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 50; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .rv-side.open { transform: none; }
  .rv-side-toggle { display: grid; }
  .rv-header { padding-left: 44px; }
  .rv-two { grid-template-columns: 1fr; }
  .rv-token { grid-template-columns: 1fr; }
  .rv-token-mark { width: 160px; height: 160px; }
}
@media (max-width: 640px) {
  .rv-nav, .rv-cta { display: none; }
  .rv-shell { padding: 0 18px 70px; }
  .rv-card { padding-top: 36px; }
  .rv-card-top { margin-bottom: 28px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .rv-big { gap: 10px; }
  .rv-big-sub { font-size: 14px; margin: 12px 0 24px; }
  .rv-tiles, .rv-tiles-3 { grid-template-columns: 1fr; gap: 10px; }
  .rv-tile { padding: 18px 18px 16px; }
  .rv-section { padding-top: 52px; }
  .rv-tape li { grid-template-columns: 48px 56px minmax(0,1fr) auto; }
  .rv-tape-tx { display: none; }
  .rv-kv { grid-template-columns: 1fr; }
  .rv-kv li:nth-child(2) { border-top: 1px solid var(--line); }
  .rv-stack-row { grid-template-columns: 1fr auto; }
  .rv-stack-bar { grid-column: 1 / -1; }
  .rv-vol { grid-template-columns: 1fr; }
  .rv-split, .rv-panel, .rv-token { padding: 16px; }
  .rv-seg span { display: none; }
  .rv-split-bar { height: 22px; }
  .rv-brand-domain { display: none; }
}
