:root {
  --bg: #0b1220; --surface: #121a2b; --surface-2: #18233a; --border: #2a3853; --border-strong: #41537a;
  --text: #f1f5f9; --muted: #a9b6ca; --primary: #f5a524; --primary-hover: #ffb93f; --on-primary: #161006;
  --buy: #2dd4bf; --sell: #fb7f7f; --warn-bg: #2d2412; --warn-border: #6f5416; --warn-text: #fcd98a;
  --radius: 10px; --radius-lg: 16px; --shadow: 0 18px 50px rgba(2, 6, 16, .45);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); }
main { flex: 1; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--primary); color: var(--on-primary); border-radius: 8px; }
.skip:focus { top: 10px; color: var(--on-primary); }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 18, 32, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.08rem; text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 26px; height: 26px; color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a:not(.btn), .link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); background: none; border: 0; font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer; border-radius: 8px; transition: color .18s; }
.nav-links a:not(.btn):hover, .link-btn:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius); font: 600 .97rem var(--font); text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.03rem; }
.btn-block { width: 100%; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); color: var(--warn-text); font-size: .92rem; }
.notice svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.error { color: var(--sell); font-size: .92rem; min-height: 1.4em; }
.success { color: var(--buy); }

.hero { padding: 76px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--primary); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.lede { margin-top: 20px; color: var(--muted); font-size: 1.14rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: .88rem; max-width: 38em; }
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(113, 135, 173, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(113, 135, 173, .1) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at 72% 45%, #000 8%, transparent 68%); mask-image: radial-gradient(ellipse at 72% 45%, #000 8%, transparent 68%); pointer-events: none; }
.hero-grid { position: relative; }
.robot-stage { width: 100%; max-width: 560px; margin-inline: auto; }
.robot-art { display: block; width: 100%; height: auto; overflow: visible; }
.robot-art .spin, .robot-art .eye, .robot-art .beacon, .robot-art .light, .robot-art .candle, .robot-art .chip, .robot-art .hover-glow { transform-box: fill-box; transform-origin: center; }
.spin { animation: spin 46s linear infinite; }
.spin-reverse { animation-duration: 32s; animation-direction: reverse; }
.bot-float { animation: float 5.5s ease-in-out infinite; }
.hover-glow { animation: hover-glow 5.5s ease-in-out infinite; }
.eye { animation: blink 5.8s infinite; }
.beacon { animation: beacon 2.4s ease-in-out infinite; }
.light { animation: light 2.1s ease-in-out infinite; }
.light-2 { animation-delay: .35s; }
.light-3 { animation-delay: .7s; }
.trace { stroke-dasharray: 170; animation: trace 4.2s ease-in-out infinite; }
.candle { animation: candle 3.6s ease-in-out infinite; }
.candle-2 { animation-delay: .6s; }
.candle-3 { animation-delay: 1.2s; }
.candle-4 { animation-delay: 1.8s; }
.chip { animation: chip 6s ease-in-out infinite; }
.chip-2 { animation-delay: 1.4s; }
.chip-3 { animation-delay: 2.6s; }
.chip-4 { animation-delay: 3.8s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-13px); } }
@keyframes hover-glow { 50% { transform: scaleX(.8); opacity: .18; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.12); } }
@keyframes beacon { 50% { transform: scale(.74); opacity: .62; } }
@keyframes light { 50% { opacity: .3; } }
@keyframes trace { 0% { stroke-dashoffset: 170; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes candle { 50% { transform: scaleY(.76); } }
@keyframes chip { 50% { transform: translateY(-10px); } }

.markets { padding: 34px 0 44px; border-top: 1px solid var(--border); background: linear-gradient(180deg, #0f1829, var(--bg)); }
.markets-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.markets-head h2 { font-size: 1.35rem; }
.market-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.market-tile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.market-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.market-codes { display: flex; }
.code { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1f3e63; border: 2px solid var(--surface); font-size: .68rem; font-weight: 700; }
.code.gold { background: var(--primary); color: var(--on-primary); }
.code-quote { margin-left: -9px; background: #174a45; }
.market-line { grid-column: 1 / -1; color: var(--primary); }
.market-line svg { display: block; width: 100%; height: 30px; }

.step { position: relative; overflow: hidden; }
.step::before { position: absolute; top: 14px; left: 14px; z-index: 1; }
.step-art { display: block; width: calc(100% + 48px); height: 150px; margin: -24px -24px 20px; padding: 16px 20px 10px; background: radial-gradient(circle at 50% 30%, #1b2a45, #0e1626 72%); border-bottom: 1px solid var(--border); }
.showcase-section { background: radial-gradient(ellipse at 80% 40%, rgba(45, 212, 191, .07), transparent 58%); }
.showcase { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 44px; align-items: center; }
.showcase-text { margin-top: 14px; color: var(--muted); }
.showcase-list { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.showcase-list li { padding-left: 24px; position: relative; }
.showcase-list li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--primary); transform: rotate(45deg); }
.showcase-frame { margin: 0; }
.showcase-frame img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.showcase-frame figcaption { margin-top: 10px; text-align: center; }
.risk-meter { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; background: var(--bg); border-radius: 9px; }
.risk-meter strong { margin-left: auto; }
.meter-bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.meter-bars span { width: 7px; height: 16px; border-radius: 2px; background: var(--border-strong); }
.meter-bars span:nth-child(1) { height: 8px; }
.meter-bars span:nth-child(2) { height: 12px; }
.meter-bars .level-1 { background: var(--buy); }
.meter-bars .level-2 { background: var(--primary); }
.meter-bars .level-3 { background: var(--sell); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status.on { color: var(--buy); }
.status.on .dot { background: var(--buy); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, .5); } 100% { box-shadow: 0 0 0 9px rgba(45, 212, 191, 0); } }

.section { padding: 76px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.step { counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 9px; background: var(--surface-2); color: var(--primary); font-weight: 700; }
.step p, .rule p { margin-top: 8px; color: var(--muted); font-size: .96rem; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rule svg { width: 48px; height: 48px; padding: 12px; color: var(--primary); margin-bottom: 14px; background: rgba(245, 165, 36, .12); border: 1px solid rgba(245, 165, 36, .32); border-radius: 12px; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.popular { border-color: var(--primary); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.plan .badge { position: absolute; top: -13px; left: 24px; background: var(--primary); color: var(--on-primary); }
.price { margin: 18px 0 4px; font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; font-size: .96rem; }
.plan li svg { width: 18px; height: 18px; color: var(--buy); flex: none; margin-top: 4px; }
.pay-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; align-items: center; }
#pay-methods { margin-top: 0; }
.faq { display: grid; gap: 10px; max-width: 800px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; }
summary { min-height: 54px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
details p { padding-bottom: 16px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); font-size: .86rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-grid p { max-width: 720px; }

.narrow { width: min(460px, 100% - 40px); margin: 56px auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px; background: var(--bg); border-radius: var(--radius); }
.tabs button { min-height: 44px; border: 0; background: transparent; color: var(--muted); font: 600 .95rem var(--font); border-radius: 8px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .9rem; font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"], select { width: 100%; min-height: 46px; padding: 0 13px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text); font: 400 1rem var(--font); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }

.page { padding: 34px 0 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.checkout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.methods { display: grid; gap: 10px; margin: 18px 0; }
.method { display: flex; gap: 12px; align-items: center; min-height: 66px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .18s; }
.method:has(input:checked) { border-color: var(--primary); }
.method input { width: 18px; height: 18px; accent-color: var(--primary); }
.method strong { display: block; line-height: 1.3; }
.pay-field { margin-top: 18px; }
.pay-label { color: var(--muted); font-size: .86rem; margin-bottom: 6px; }
.copy-box { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.copy-box .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-box .amount { font-size: 1.5rem; font-weight: 700; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.summary-row:last-child { border: 0; }
.state-box { text-align: center; padding: 18px 6px; }
.state-box svg { width: 48px; height: 48px; color: var(--buy); margin-bottom: 10px; }
.state-box p { margin: 8px 0 18px; color: var(--muted); }

.simbar { margin-bottom: 18px; }
.mode-tabs { max-width: 340px; margin-bottom: 18px; }
.notice.danger { background: #351517; border-color: #8a3036; color: #ffc9c9; font-weight: 600; }
.connect-card { max-width: 560px; }
.connect-card h2 { font-size: 1.3rem; }
.connect-intro { margin: 8px 0 20px; }
.account-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.wrap-cell { white-space: normal; min-width: 220px; }
.limit-switch { margin: 12px 0 0; padding: 10px 12px; background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 9px; color: var(--warn-text); font-size: .86rem; }
.settings-card { max-width: 720px; }
.settings-card h2 { font-size: 1.3rem; }
.settings-history { max-width: 720px; margin-top: 18px; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
input.mono { font-family: var(--mono); font-size: .92rem; }
.dash { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.control-state { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.start-stop { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-start { background: var(--buy); color: #06241f; min-height: 56px; }
.btn-start:hover:not(:disabled) { background: #5ee6d4; color: #06241f; }
.btn-stop { background: var(--sell); color: #2a0808; min-height: 56px; }
.btn-stop:hover:not(:disabled) { background: #ff9c9c; color: #2a0808; }
.reason { margin-top: 12px; color: var(--muted); font-size: .88rem; min-height: 1.4em; }
fieldset { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: .9rem; font-weight: 600; width: 100%; }
legend span { float: right; color: var(--muted); font-weight: 400; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pairs { grid-template-columns: repeat(2, 1fr); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--muted); font-size: .88rem; font-weight: 500; transition: background-color .15s, border-color .15s, color .15s; }
.opt input:checked + span { background: rgba(245, 165, 36, .14); border-color: var(--primary); color: var(--text); }
.opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.opt input:disabled { cursor: not-allowed; }
.opt input:disabled + span { opacity: .45; border-style: dashed; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.stat .label { color: var(--muted); font-size: .82rem; }
.stat .value { margin-top: 3px; font: 600 1.2rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--buy); }
.down { color: var(--sell); }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head select { width: auto; min-width: 130px; }
.chart-box { position: relative; width: 100%; aspect-ratio: 2.3; min-height: 240px; }
.chart-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { padding: 8px 10px; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.empty { padding: 22px 8px; color: var(--muted); text-align: center; font-size: .94rem; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 600; text-transform: capitalize; }
.tag.paid { color: var(--buy); }
.tag.submitted, .tag.pending { color: var(--primary); }
.tag.rejected, .tag.expired, .tag.cancelled { color: var(--sell); }
.row-actions { display: flex; gap: 6px; }
.row-actions .btn { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.admin-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 10px; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 11px 18px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .93rem; }

@media (max-width: 960px) {
  .hero { padding: 48px 0 60px; }
  .hero-grid, .checkout, .dash, .showcase { grid-template-columns: minmax(0, 1fr); }
  .pricing, .steps, .rules { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 54px 0; }
  .rules { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stats { grid-template-columns: 1fr; }
  .nav { gap: 8px; }
  .nav-links { flex-wrap: nowrap; gap: 0; }
  .nav-links a:not(.btn), .link-btn { padding: 0 6px; font-size: .84rem; white-space: nowrap; }
  .nav-links .btn { padding: 0 10px; margin-left: 4px; font-size: .84rem; white-space: nowrap; }
  .brand span { display: none; }
  .chart-box { aspect-ratio: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
