/* PopDEX Creators Docs — page styles layered on popdex-ui.css */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
img { max-width: 100%; }
a { text-decoration: none; }
a.link { color: var(--brand-tint); }
a.link:hover { color: #fff; }
::selection { background: rgba(128,119,255,0.35); }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.stack { display: grid; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .tint { color: var(--brand-tint); } .ok { color: var(--success); } .bad { color: var(--error); } .warn { color: var(--warning); }
.center { text-align: center; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header — same chrome as PopDex Creators form and Purple Promise: logo + /Section left, quiet counters right, no border */
.site-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 36px 12px; background: linear-gradient(180deg, var(--bg) 0%, rgba(11,11,13,0.8) 60%, transparent 100%); }
.pd-brand { display: flex; align-items: center; gap: 10px; user-select: none; }
.pd-brand a { display: flex; align-items: center; gap: 10px; }
.pd-brand img { height: 24px; width: auto; display: block; }
.pd-brand .section { font-size: 15px; font-weight: 600; color: var(--brand-soft); letter-spacing: 0.01em; padding-top: 2px; }
.pd-brand .pd-pill { margin-left: 2px; }
.pd-pill { white-space: nowrap; }
.site-top-right { display: flex; align-items: center; gap: 12px; flex: none; font-size: 12px; letter-spacing: 0.06em; color: var(--dim); }
.site-top-right .pd-counter { gap: 6px; }
.quiet-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; letter-spacing: 0.06em; color: var(--dim); transition: color 160ms ease; }
.quiet-link:hover { color: #fff; }
.live-dot { position: relative; display: inline-flex; width: 6px; height: 6px; }
.live-dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--brand-soft); opacity: 0.75; animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
.live-dot::after { content: ""; position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-soft); }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
.hide-sm { }

/* footer — quiet caption row like Purple Promise */
.site-foot { position: relative; z-index: 1; padding: 28px 36px; }
.site-foot-in { max-width: 1152px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-links a { display: inline-flex; align-items: center; gap: 4px; transition: color 160ms ease; }
.foot-links a:hover { color: #fff; }

/* hero — centred like Purple Promise: pill → display → lead → CTAs */
.page { padding-top: 8px; }
.hero { text-align: center; max-width: 720px; margin: 0 auto; padding: 40px 0 8px; }
.hero .pd-display { margin: 16px 0 0; }
.hero .lead { margin: 16px auto 24px; font-size: 16px; max-width: 600px; }
.hero-cta { justify-content: center; }
.br-sm { display: none; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0 8px; }
.tile { padding: 20px; border-radius: 16px; transition: border-color 200ms ease; }
.tile:hover { border-color: rgba(128,119,255,0.4); }
.tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tile .pd-stat { letter-spacing: -0.01em; }
.tile .unit { font-size: 13px; font-weight: 400; color: var(--dim); font-family: var(--font-sans); }
.tile .sub { font-size: 12px; color: var(--dim); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.dot-sm { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-soft); flex: none; }
.icon-sq { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(128,119,255,0.15); color: var(--brand-soft); }
.icon-sq svg { width: 15px; height: 15px; }
.icon-sq--green { background: rgba(23,167,129,0.15); color: var(--success); }
.icon-sq--pink { background: rgba(240,50,119,0.12); color: #ff7aa8; }
.icon-sq--amber { background: rgba(245,196,107,0.12); color: var(--warning); }

/* sections */
section.block { padding: 56px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { margin: 6px 0 0; }
.sec-head p { margin: 8px 0 0; max-width: 560px; }
.step-no { font-family: var(--font-mono); font-size: 12px; color: var(--brand-soft); letter-spacing: 0.08em; }

/* segmented (role) */
.pd-seg.roles { max-width: 420px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { position: relative; padding: 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); background: rgba(14,14,18,0.45); transition: border-color 300ms var(--ease), background 300ms var(--ease), opacity 300ms var(--ease); }
.step .pd-pill { margin-bottom: 12px; }
.step h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.step.is-active { border-color: var(--brand-soft); background: rgba(77,66,252,0.14); box-shadow: 0 0 0 3px rgba(128,119,255,0.18); }
.step.is-done { border-color: rgba(23,167,129,0.4); }
.step.is-done .pd-pill { color: var(--success); background: rgba(23,167,129,0.12); border-color: rgba(23,167,129,0.35); }
.step.is-todo { opacity: 0.6; }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.sign-box { padding: 16px; border-radius: 12px; background: rgba(14,14,18,0.6); border: 1px solid rgba(255,255,255,0.08); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; word-break: break-all; }
.sign-box b { color: var(--text); font-weight: 600; }
.sign-box .k { color: var(--brand-tint); }
.addr { font-family: var(--font-mono); font-size: 13px; color: var(--brand-tint); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-height: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px rgba(255,255,255,0.05); }
.dot.ok { background: var(--success); box-shadow: 0 0 12px rgba(23,167,129,0.8); }
.dot.brand { background: var(--brand-soft); box-shadow: 0 0 12px rgba(128,119,255,0.8); }
.dot.busy { background: var(--warning); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { padding: 12px 8px; border-radius: 12px; text-align: center; background: rgba(14,14,18,0.6); border: 1px solid rgba(255,255,255,0.08); }
.countdown b { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }

/* range sliders */
.ctl { display: grid; gap: 8px; }
.ctl label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ctl label output { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-soft) var(--p, 50%), rgba(255,255,255,0.10) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255,255,255,0.10); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-soft)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-soft); box-shadow: 0 0 0 4px rgba(128,119,255,0.18), 0 4px 12px rgba(0,0,0,0.5); transition: box-shadow 160ms ease, transform 120ms ease; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-soft); box-shadow: 0 0 0 4px rgba(128,119,255,0.18); }
input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(128,119,255,0.24), 0 4px 12px rgba(0,0,0,0.5); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(0.96); }
input[type=range].green::-webkit-slider-runnable-track { background: linear-gradient(90deg, #128a6a 0%, var(--success) var(--p, 50%), rgba(255,255,255,0.10) var(--p, 50%)); }
input[type=range].green::-webkit-slider-thumb { border-color: var(--success); box-shadow: 0 0 0 4px rgba(23,167,129,0.18), 0 4px 12px rgba(0,0,0,0.5); }
input[type=range].green::-moz-range-progress { background: var(--success); }
.ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--dim); margin-top: -4px; }

.link-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(128,119,255,0.3); background: rgba(77,66,252,0.10); }
.link-toggle input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }
.ctl.is-linked { opacity: 0.55; }
.bonus-in { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-mono); font-size: 13px; }
.bonus-in input { width: 74px; background: rgba(14,14,18,0.6); border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; padding: 4px 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text); outline: none; -moz-appearance: textfield; }
.bonus-in input::-webkit-outer-spin-button, .bonus-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bonus-in input:focus { border-color: var(--brand-soft); box-shadow: var(--ring); }
.bonus-in input:disabled { opacity: 0.5; }
.ctl.is-linked input[type=range] { cursor: not-allowed; }

/* stacked split bar */
.split-bar { display: flex; height: 44px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); background: rgba(14,14,18,0.6); }
.split-bar > div { position: relative; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #fff; transition: flex 500ms var(--ease), filter 160ms ease; min-width: 0; overflow: hidden; white-space: nowrap; cursor: default; }
.split-bar > div:hover { filter: brightness(1.15); }
.split-bar > div + div { border-left: 1px solid rgba(11,11,13,0.6); }
.c-popdex { background: linear-gradient(180deg, #34363c, #26272c); }
.c-rebate { background: linear-gradient(180deg, #8077ff, #645aff); }
.c-cvault { background: linear-gradient(180deg, #5fd1b3, #17a781); }
.c-tvault { background: linear-gradient(180deg, #645aff, #4d42fc); }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.legend .item { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: rgba(14,14,18,0.45); transition: border-color 160ms ease; }
.legend .item.is-hot { border-color: var(--brand-soft); }
.legend .item .name { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .item .val { font-family: var(--font-mono); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend .item .pct { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.legend .item p { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

.tune { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.tune-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; transition: opacity 200ms ease; }
.tune-grid.is-linked { opacity: 0.55; }
.tune-grid.is-linked input[type=range] { cursor: not-allowed; }

.fee-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; align-items: start; }
.big-out { padding: 18px 20px; border-radius: 16px; background: rgba(77,66,252,0.10); border: 1px solid rgba(128,119,255,0.35); }
.big-out .pd-stat { font-size: 30px; margin-top: 6px; }
.formula { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: rgba(14,14,18,0.6); border: 1px solid rgba(255,255,255,0.08); line-height: 1.7; overflow-x: auto; }
.formula b { color: var(--brand-tint); font-weight: 600; }

/* bands */
.bands { display: grid; gap: 8px; }
.band { display: grid; grid-template-columns: 64px 1fr 130px 130px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.07); background: rgba(14,14,18,0.45); transition: border-color 200ms ease, background 200ms ease, transform 200ms var(--ease); }
.band.is-you { border-color: var(--brand-soft); background: rgba(77,66,252,0.16); transform: translateX(4px); }
.band.is-e { border-style: dashed; }
.band .tag { display: inline-grid; place-items: center; min-width: 44px; width: auto; padding: 0 8px; white-space: nowrap; height: 30px; justify-self: start; border-radius: 8px; font-weight: 800; font-size: 13px; letter-spacing: 0.04em; color: #fff; }
.band .tag.star { background: linear-gradient(180deg, #8077ff, #4d42fc); box-shadow: 0 6px 18px -8px rgba(128,119,255,0.9); }
.band .tag.a { background: #5b52e6; } .band .tag.b { background: #4b45b8; } .band .tag.c { background: #3d3a8e; } .band .tag.d { background: #322f6a; }
.band .tag.e { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.band .tag.top { background: linear-gradient(180deg, #5fd1b3, #17a781); box-shadow: 0 6px 18px -8px rgba(23,167,129,0.9); }
.band .tag.rest { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.band .meta { min-width: 0; }
.band .meta .name { font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.band .meta .name small { font-weight: 500; font-size: 12px; color: var(--dim); }
.band .meta .pd-track { margin-top: 8px; }
.band .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.band .num b { display: block; font-size: 15px; font-weight: 700; }
.plus { font-style: normal; font-size: 12px; font-weight: 600; color: var(--success-light); white-space: nowrap; }
.you-card .plus { font-size: 15px; }
.band .num span { font-size: 11px; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; }
.band-head { display: grid; grid-template-columns: 64px 1fr 130px 130px; gap: 14px; padding: 0 14px 4px; }
.band-head span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.band-head span:nth-child(3), .band-head span:nth-child(4) { text-align: right; }
.you-card { padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(128,119,255,0.35); background: rgba(77,66,252,0.10); display: grid; gap: 6px; }
.you-card .pd-stat { font-size: 28px; }
.lb-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 28px; align-items: start; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(14,14,18,0.55); border: 1px solid rgba(255,255,255,0.08); }
.tabs button { border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 16px; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
.tabs button.is-active { background: rgba(77,66,252,0.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(128,119,255,0.45); }

/* cta card */
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-card h3 { margin: 0 0 6px; }
.cta-card p { margin: 0; }

/* tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; background: rgba(20,21,24,0.95); border: 1px solid rgba(128,119,255,0.3); border-radius: 14px; padding: 10px 12px; font-size: 12px; color: var(--muted); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8); opacity: 0; transform: translateY(4px); transition: opacity 120ms ease, transform 120ms ease; max-width: 240px; }
.tip.is-on { opacity: 1; transform: none; }
.tip b { display: block; color: var(--text); font-family: var(--font-mono); font-size: 14px; margin-top: 2px; }

/* footnote */
.note { font-size: 12.5px; line-height: 1.55; color: var(--dim); }
.note b { color: var(--muted); font-weight: 600; }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero-grid, .join-grid, .fee-grid, .lb-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .legend, .tune-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 24px 0 8px; }
  .br-sm { display: inline; }
  .site-top { padding: 20px 20px 10px; }
  .pd-brand img { height: 20px; }
  .pd-brand .section { font-size: 13px; }
  .hide-sm { display: none !important; }
  .site-top { gap: 10px; }
  .site-top-right { gap: 8px; }
  .site-top-right .quiet-link, .site-top-right .pd-counter { display: none; }
  .site-foot { padding: 24px 20px; }
  .site-foot-in { flex-direction: column; align-items: center; text-align: center; }
  .foot-links { justify-content: center; gap: 14px; }
  section.block { padding: 40px 0; }
  .tiles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .legend, .tune-grid { grid-template-columns: 1fr; }
  .band, .band-head { grid-template-columns: 52px 1fr 90px; }
  .band .num:last-child, .band-head span:last-child { display: none; }
  .band .tag { min-width: 40px; padding: 0 6px; font-size: 12px; }
  .countdown b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot.busy { animation: none; }
  html { scroll-behavior: auto; }
}
