/* Moon Offer Code: moon.com app surface. Near-black canvas, graphite panels,
   violet action colour, mint for positive figures, rose for fees, 12px radius. */
:root {
  --bg: rgb(9 10 11);
  --panel: rgb(18 19 22);
  --panel-2: rgb(28 30 35);
  --panel-3: rgb(41 44 51);
  --line: rgb(28 30 35);
  --line-2: rgb(41 44 51);
  --fg: rgb(255 255 255);
  --fg-2: rgb(214 218 224);
  --muted: rgb(138 147 160);
  --muted-2: rgb(108 117 131);
  --violet: rgb(99 88 211);
  --violet-2: rgb(117 115 225);
  --violet-text: rgb(142 148 235);
  --mint: rgb(47 227 172);
  --mint-dim: rgb(47 227 172 / 0.15);
  --rose: rgb(236 57 122);
  --rose-dim: rgb(236 57 122 / 0.18);
  --sans: "Geist", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mark: "Michroma", "Geist", sans-serif;
  --r: 12px;
  --r-sm: 8px;
  --top: 68px;
  --side: 396px;
  --pad: 24px;
  --measure: 80ch;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 12px); background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 0.95rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--violet-text); }
:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 1rem 0; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--violet); color: #fff; padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.up { color: var(--mint); }
.down { color: var(--rose); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.topin { display: flex; align-items: center; justify-content: space-between; height: var(--top); padding: 0 var(--pad); }
.brand { font-family: var(--mark); font-size: 1.05rem; letter-spacing: 0.02em; color: var(--fg); white-space: nowrap; display: inline-flex; align-items: baseline; gap: 0.5em; }
.brand span { font-size: 0.56em; color: var(--muted); letter-spacing: 0.12em; }
.brand:hover { color: var(--fg); }
.top nav { display: flex; align-items: center; gap: 22px; font-weight: 500; }
.top nav .ghost { color: var(--fg); font-size: 0.95rem; }
@media (max-width: 639px) { .top nav .ghost { display: none; } }
.top nav .ghost:hover { color: var(--violet-text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; background: var(--violet); color: #fff; font-weight: 600; font-size: 1rem; line-height: 1; padding: 0 1.25rem; height: 44px; border: 0; border-radius: var(--r); transition: background 120ms ease; white-space: nowrap; }
.btn:hover { background: var(--violet-2); color: #fff; }
.btn.sm { height: 36px; font-size: 0.9rem; padding: 0 1rem; }
.ghost-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 0.9rem; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.ghost-btn:hover { color: var(--fg); background: var(--panel-3); }

/* ---------- app grid ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 var(--pad) 40px; align-items: start; }
@media (min-width: 1000px) { .app { grid-template-columns: minmax(0, 1fr) var(--side); gap: 24px; } }
.col-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.col-side { min-width: 0; }
@media (min-width: 1000px) { .col-side .stick { position: sticky; top: calc(var(--top) + 8px); } }
@media (max-width: 999px) { .app { display: flex; flex-direction: column; align-items: stretch; } .col-side { order: 2; } .col-main { order: 1; display: contents; } .col-main > * { order: 1; } .col-main > .feed { order: 3; } .col-side { order: 2; } }

/* ---------- asset header ---------- */
.asset-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .asset-row { grid-template-columns: minmax(0, 1fr) auto; } }
.asset-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.asset-id { display: flex; align-items: center; gap: 12px; }
.asset-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.asset-name { font-size: 1.15rem; font-weight: 500; }
.asset-name b { font-family: var(--mono); color: var(--muted); font-weight: 500; letter-spacing: 0.06em; margin-left: 0.35em; }
.asset-name i { font-style: normal; color: var(--muted-2); margin-left: 0.4em; font-size: 1rem; }
.asset-tags { display: flex; gap: 4px; background: var(--panel-2); border-radius: 999px; padding: 4px; }
.asset-tags .tag { font-size: 0.78rem; color: var(--muted); padding: 4px 10px; border-radius: 999px; }
.asset-tags .tag:first-child { background: var(--panel-3); color: var(--fg); }
.asset-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.asset-price .big { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.asset-price .delta { color: var(--mint); font-weight: 500; font-size: 1.05rem; }
.info { color: var(--muted-2); font-style: normal; cursor: help; }
.asset-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.asset-sub span { color: var(--muted-2); }
.asset-sub b { font-weight: 500; color: var(--muted); margin-right: 6px; }
.asset-sub b::after { content: "·"; color: var(--muted-2); margin-left: 10px; }
.pill-up { display: inline-block; background: var(--mint-dim); color: var(--mint) !important; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.pnl { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; min-width: 300px; }
.pnl-label { display: block; color: var(--muted); font-size: 0.85rem; }
.pnl-value { display: block; font-size: 1.3rem; font-weight: 600; margin-top: 2px; }

/* ---------- chips ---------- */
.chips-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.chips-row .scroll { flex: 1 1 auto; min-width: 0; }
.chips-row .alt { flex: none; }
.chips { display: flex; gap: 4px; background: var(--panel-2); border-radius: 999px; padding: 4px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: var(--muted); background: transparent; border: 0; cursor: pointer; white-space: nowrap; font-family: var(--sans); }
.chip:hover { color: var(--fg); }
.chip.is-on { background: var(--panel-3); color: var(--fg); }
.chip.is-static { cursor: default; }
.chip.copy { background: var(--panel-3); color: var(--fg); }
.chip.copy.is-done { background: var(--mint); color: #061a13; }
.chip.lg { height: 44px; padding: 0 18px; font-size: 1rem; border-radius: 10px; }

/* ---------- chart ---------- */
.chart { margin: 0; padding: 14px 16px 12px; min-width: 0; }
.chart-scroll { overflow-x: auto; scrollbar-width: thin; }
.chart-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.fee { background: var(--rose); } .sw.rake { background: var(--mint); margin-left: 8px; }
.chart svg { width: 100%; min-width: 600px; height: auto; display: block; }
.chart .grid line { stroke: rgb(255 255 255 / 0.06); stroke-width: 1; }
.chart .grid text, .chart .lab { font-family: var(--mono); font-size: 12px; fill: var(--muted-2); text-anchor: middle; }
.chart .grid text { text-anchor: start; }
.chart rect.fee { fill: var(--rose); }
.chart rect.rake { fill: var(--mint); }
.chart .val { font-family: var(--mono); font-size: 12px; text-anchor: middle; }
.chart .val.fee { fill: var(--rose); } .chart .val.rake { fill: var(--mint); }
.chart-note { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted-2); }

/* ---------- trending cards ---------- */
.trend-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 12px; }
.trend-title { font-size: 1.25rem; font-weight: 500; margin: 0; }
.trend-head p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: #0b0c0e; }
.card-icon.mint { background: var(--mint); } .card-icon.violet { background: var(--violet-2); color: #fff; } .card-icon.rose { background: var(--rose); color: #fff; } .card-icon.ice { background: rgb(214 218 224); }
.card-name { font-weight: 500; flex: 1; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { height: 34px; margin: 12px 0 10px; background: linear-gradient(to top, rgb(99 88 211 / 0.18), transparent); border-bottom: 1px solid var(--line-2); position: relative; border-radius: 4px 4px 0 0; overflow: hidden; }
.meter i { position: absolute; left: 0; bottom: 0; height: 100%; min-width: 8px; background: linear-gradient(to top, var(--violet), rgb(117 115 225 / 0.25)); border-radius: 2px; }
.meter .m-rake { width: 3.5%; } .meter .m-open { width: 1%; } .meter .m-perf { width: 10%; } .meter .m-lev { width: 100%; }
.card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.card-foot .up { color: var(--mint); }

/* ---------- feed (the guide) ---------- */
.feed { padding: 22px 24px 28px; }
@media (min-width: 760px) { .feed { padding: 28px 32px 36px; } }
.feed-head { max-width: var(--measure); }
.crumbs { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2); margin: 0 0 14px; display: flex; gap: 0.5em; }
.crumbs a { color: var(--muted-2); } .crumbs a:hover { color: var(--fg); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
.lead { font-size: 1.05rem; line-height: 1.6; color: var(--fg-2); margin: 14px 0 12px; text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; gap: 0.4em 1.4em; font-size: 0.8rem; color: var(--muted); margin: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.byline b { color: var(--fg-2); font-weight: 500; }
.byline a { color: var(--violet-text); }
.feed-section { max-width: var(--measure); }
h2 { font-size: 1.3rem; font-weight: 500; line-height: 1.25; margin: 2.6rem 0 0.6rem; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.6rem 0 0.4rem; }
p { margin: 0 0 1em; color: var(--fg-2); }
strong { font-weight: 600; color: var(--fg); }
ul, ol { padding-left: 1.35em; margin: 0 0 1.1em; color: var(--fg-2); }
li { margin: 0.35em 0; }
li::marker { color: var(--muted-2); }
.steps li::marker { color: var(--violet-text); font-family: var(--mono); font-weight: 600; }
dl { margin: 0 0 1.1em; }
dt { font-weight: 600; margin-top: 0.8em; color: var(--fg); }
dd { margin: 0.15em 0 0 0; color: var(--fg-2); }
.answer { background: var(--panel-2); border-left: 3px solid var(--mint); border-radius: var(--r-sm); padding: 0.9rem 1rem; margin: 0.9rem 0 1.1rem; color: var(--fg); }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0.4em 0 1.4em; font-size: 0.92rem; font-variant-numeric: tabular-nums; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: 0.65em 0.85em; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--panel-2); }
td { color: var(--fg-2); } td:first-child { color: var(--fg); }
figure { margin: 1.4rem 0 1.6rem; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); }
figure.portrait img { max-width: 400px; margin: 0 auto; }
figcaption { font-size: 0.78rem; color: var(--muted-2); margin-top: 0.6rem; }
.faq h3 { margin-top: 1.4rem; }
.sources { font-size: 0.88rem; }
.sources li { word-break: break-word; margin: 0.4em 0; }
.sources a { color: var(--fg-2); } .sources a:hover { color: var(--violet-text); }
.sources .ret { font-family: var(--mono); font-size: 0.68rem; color: var(--muted-2); margin-left: 0.4em; white-space: nowrap; }
.disclosure { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); padding: 1rem 1.1rem; font-size: 0.9rem; color: var(--fg-2); margin: 1.6rem 0 0; }

/* ---------- offer panel (bet panel) ---------- */
.bet { padding: 16px 18px 18px; }
.bet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bet-title { color: var(--muted); font-size: 0.95rem; }
.bet-icons { display: inline-flex; align-items: center; gap: 8px; }
.bet-icons .up { color: var(--mint); font-weight: 700; letter-spacing: -0.3em; transform: translateY(2px); display: inline-block; }
.coin { width: 22px; height: 22px; border-radius: 50%; background: rgb(255 170 30); color: #000; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.bet-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.bet-code { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 2.1rem; font-weight: 600; letter-spacing: 0.08em; color: var(--fg); line-height: 1; }
.bet-code small { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.bet-rate { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--mint); font-variant-numeric: tabular-nums; }
.bet-rate i { font-style: normal; color: var(--muted-2); font-size: 1.1rem; margin-left: 4px; }
.chips { margin: 0 0 12px; }
.bet .chips { background: transparent; padding: 0; gap: 8px; }
.bet .chip { background: var(--panel-2); color: var(--fg-2); height: 34px; border-radius: 10px; }
.bet .chip.copy { background: var(--panel-3); color: var(--fg); }
.bet-row { display: flex; justify-content: space-between; gap: 12px; margin: 0.45em 0; font-size: 0.9rem; color: var(--muted); }
.bet-row b { font-weight: 500; color: var(--fg); text-align: right; }
.bet-label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--muted); font-size: 0.95rem; }
.track { position: relative; height: 6px; border-radius: 999px; background: var(--panel-3); margin: 6px 0 6px; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; border-radius: 999px; background: var(--violet); }
.track .knob { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgb(0 0 0 / 0.5); }
.track-ends { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted-2); margin-bottom: 6px; }
.seg { display: flex; padding: 4px; background: rgb(1 1 1); border-radius: 999px; gap: 4px; margin-bottom: 12px; }
.seg span { flex: 1; text-align: center; padding: 10px 8px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.seg .is-on { background: var(--panel-2); color: var(--fg); }
.bet-more { border-top: 1px solid var(--line-2); margin: 4px 0 0; }
.bet-more summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; padding: 12px 0; color: var(--muted); font-size: 0.95rem; }
.bet-more summary::-webkit-details-marker { display: none; }
.bet-more[open] summary { color: var(--fg); }
.bet-link { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.bet-link:hover { color: var(--fg); }
.bet .btn { width: 100%; }
.fine { font-size: 0.72rem; line-height: 1.5; color: var(--muted-2); margin: 12px 0 0; }
.status { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: 0.9rem; color: var(--fg-2); }
.status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 8px; }
.status .mono { color: var(--muted); font-size: 0.85rem; }

/* in-article offer */
.inline-offer { padding: 18px 20px; margin: 1.8rem 0; max-width: var(--measure); }
.inline-offer .headline { font-size: 1.2rem; font-weight: 600; color: var(--fg); margin: 0 0 12px; }
.inline-offer .bet-main { margin-bottom: 14px; }
.inline-offer .btn { width: 100%; }
.inline-offer ul { list-style: none; padding: 0; margin: 14px 0 0; font-size: 0.92rem; }
.inline-offer li { position: relative; padding-left: 1.3em; margin: 0.4em 0; }
.inline-offer li::before { content: ""; position: absolute; left: 0.15em; top: 0.6em; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--mint); }

/* ---------- footer ---------- */
.foot { margin: 0 var(--pad) 24px; overflow: hidden; }
@media (min-width: 1000px) { .foot { margin-right: calc(var(--side) + var(--pad) + 24px); } }
.foot-brand { position: relative; padding: 40px 40px 36px; border-bottom: 1px solid var(--line); overflow: hidden; }
.foot-mark .brand { font-size: 1.3rem; }
.foot-brand p { margin: 14px 0 0; color: var(--muted); max-width: 52ch; }
.orbit { position: absolute; right: -40px; top: -40px; width: 320px; height: 320px; fill: none; stroke: rgb(255 255 255 / 0.06); stroke-width: 1; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; padding: 28px 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .foot-cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .foot-cols > div:first-child ul { columns: 2; column-gap: 20px; } }
.foot h4 { margin: 0 0 12px; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; }
.foot li a { color: var(--muted); } .foot li a:hover { color: var(--fg); }
.foot-row { padding: 16px 40px; color: var(--muted); font-size: 0.85rem; border-bottom: 1px solid var(--line); }
.foot-row.copy-row { border: 0; color: var(--muted-2); }
@media (max-width: 759px) { .foot-brand, .foot-cols, .foot-row { padding-left: 20px; padding-right: 20px; } }

/* ---------- mobile bar ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgb(18 19 22 / 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); transform: translateY(0); transition: transform 180ms ease; }
.bar.is-hidden { transform: translateY(110%); }
.bar .bet-code { font-size: 1.3rem; }
@media (min-width: 1000px) { .bar { display: none; } }
@media (max-width: 999px) { body { padding-bottom: 72px; } }
@media (prefers-reduced-motion: reduce) { .btn, .bar { transition: none; } }

/* ---------- plain pages ---------- */
.app.one { grid-template-columns: minmax(0, 1fr); }
.app.one .col-main { max-width: 900px; width: 100%; margin: 0 auto; }
.page { padding-top: 26px; }
.page h2 { font-size: 1.25rem; margin-top: 2rem; }
.kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.8rem; }
