/* Trader app and public contest page. Builds on base.css (Juno orange, warm neutrals, Manrope). */
:root { --hero: #17130f; --hero-2: #241d17; --hero-line: #3a3028; --up: #12805c; --down: #c8372d; }

.topbar { position: sticky; top: 0; z-index: 20; background: rgba(248, 245, 241, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.topbar .logo { height: 26px; display: block; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 32px 16px 64px; }
.stack > * + * { margin-top: 16px; }
.pad { padding: 20px; }
@media (min-width: 720px) { .pad { padding: 26px; } }
.section-title { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title small { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- hero ---------- */
.hero { background: var(--hero); color: #f5efe9; }
.hero-in { max-width: 1080px; margin: 0 auto; padding: 28px 16px 30px; display: grid; gap: 22px; }
@media (min-width: 860px) { .hero-in { grid-template-columns: 1.4fr 1fr; align-items: end; padding: 44px 16px 40px; } }
.community { display: flex; align-items: center; gap: 12px; color: #cbbfb3; font-weight: 700; font-size: 14px; }
.community img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #fff; }
.community .mono { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 800; font-size: 18px; }
.hero h1 { font-size: clamp(28px, 5.2vw, 46px); margin: 14px 0 10px; letter-spacing: -0.02em; }
.hero p.lead { color: #cbbfb3; margin: 0 0 18px; max-width: 60ch; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--hero-2); border: 1px solid var(--hero-line); color: #e9dfd5; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #8a7d71; }
.pill.live .dot { background: #2fd38d; box-shadow: 0 0 0 0 rgba(47, 211, 141, 0.6); animation: pulse 1.8s infinite; }
.pill.upcoming .dot { background: var(--orange); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 211, 141, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 141, 0); } }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #cbbfb3; font-size: 14px; }
.facts b { display: block; color: #fff; font-size: 16px; }
.clock { background: var(--hero-2); border: 1px solid var(--hero-line); border-radius: var(--radius); padding: 18px; }
.clock-label { font-size: 13px; color: #cbbfb3; font-weight: 700; margin-bottom: 8px; }
.clock-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.clock-row div { background: var(--hero); border-radius: 12px; padding: 10px 4px; text-align: center; }
.clock-row b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.1; }
.clock-row span { font-size: 11.5px; color: #a89b8f; text-transform: uppercase; letter-spacing: 0.06em; }
.clock .btn { margin-top: 14px; }
.clock .note { margin-top: 12px; font-size: 13.5px; color: #cbbfb3; }

/* ---------- my status banner ---------- */
.mine { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding: 16px 20px; border-left: 4px solid var(--orange); }
.mine .k { font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mine .v { font-size: 20px; font-weight: 800; }
.mine .btn { margin-left: auto; }

/* ---------- leaderboard ---------- */
.board-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.board-meta .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; }
.board-meta .late { color: var(--amber); font-weight: 700; }
.podium { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 720px) { .podium { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; } .podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; } }
.pod { padding: 18px; text-align: center; position: relative; overflow: hidden; }
.pod .medal { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #b9aa9b; }
.pod.p1 { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); padding: 24px 18px; }
.pod.p1 .medal { background: var(--orange); width: 48px; height: 48px; font-size: 20px; }
.pod.p2 .medal { background: #8c8c96; }
.pod.p3 .medal { background: #b07a4f; }
.pod .nick { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.pod .ret { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pod.p1 .ret { font-size: 32px; }
.pod .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.board th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.board td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.board tr:last-child td { border-bottom: 0; }
table.board .num { text-align: right; }
table.board .rank { width: 56px; font-weight: 800; }
table.board .nick { font-weight: 700; white-space: normal; min-width: 120px; }
table.board tr.me td { background: var(--orange-soft); }
table.board tr.dq td { color: var(--muted); }
table.board tr.dq .nick { text-decoration: line-through; }
.chg { font-size: 12.5px; font-weight: 800; }
.chg.up::before { content: "▲ "; }
.chg.down::before { content: "▼ "; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

.grid2 { display: grid; gap: 16px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.prizes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.prizes li { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: #faf6f2; border-radius: var(--radius-sm); }
.prizes b { min-width: 76px; color: var(--orange-ink); }
ul.rules { padding-left: 20px; margin: 0; color: var(--ink-2); }
ul.rules li { margin: 6px 0; }
.prose { color: var(--ink-2); }
.prose p { margin: 0 0 10px; }

/* ---------- forms / auth ---------- */
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head h1 { font-size: 26px; }
.form-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h2 { font-size: 16px; margin-bottom: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.help { background: var(--blue-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.help b { color: var(--blue); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-weight: 700; font-size: 13px; color: var(--orange-ink); cursor: pointer; padding: 8px; }

/* ---------- my contests ---------- */
.entry-card { display: grid; gap: 12px; padding: 18px 20px; text-decoration: none; color: inherit; }
.entry-card:hover { border-color: #d8cfc5; }
.entry-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entry-top h3 { margin: 0; font-size: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: #faf6f2; border-radius: var(--radius-sm); padding: 12px 14px; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.kpi .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14.5px; font-weight: 600; }
.notice.amber { background: var(--amber-soft); color: var(--amber); }
.notice.red { background: var(--red-soft); color: var(--red); }
.notice.green { background: var(--green-soft); color: var(--green); }
.notice.blue { background: var(--blue-soft); color: var(--blue); }
.progress-row { display: grid; gap: 6px; }
.progress-row .lbl { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }

.chart { margin: 0; }
.chart svg { width: 100%; height: 200px; display: block; }
.chart .line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart .area { opacity: 0.12; }
.chart.up .line { stroke: var(--up); }
.chart.up .area { fill: var(--up); }
.chart.down .line { stroke: var(--down); }
.chart.down .area { fill: var(--down); }
.chart .base { stroke: #b9aa9b; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart figcaption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.chart-empty { padding: 40px 16px; text-align: center; color: var(--muted); background: #faf6f2; border-radius: var(--radius-sm); }
.footer { text-align: center; font-size: 12.5px; color: var(--muted); padding: 24px 16px 40px; max-width: 760px; margin: 0 auto; }
