:root {
  --bg: #071120;
  --card: #0B192C;
  --panel: #10233E;
  --line: rgba(212, 175, 55, 0.28);
  --gold: #F3C64F;
  --gold-deep: #D4AF37;
  --buy: #10B981;
  --sell: #F43F5E;
  --text: #F8FAFC;
  --muted: #94A3B8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans Malayalam", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.gold { color: var(--gold); }
.buy { color: var(--buy); }
.sell { color: var(--sell); }
.muted { color: var(--muted); font-weight: 500; }
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
.mono { font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(7, 17, 32, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.crest { width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 900; text-transform: uppercase; letter-spacing: .02em; background: linear-gradient(135deg, #F3C64F, #D4AF37 55%, #B8860B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-handle { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--gold-deep); }
.week { font-size: 12px; color: var(--muted); text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.badge-sample { background: #7C2D12; color: #FED7AA; border: 1px solid #FB923C; font-weight: 800; font-size: 10px; padding: 2px 8px; border-radius: 99px; letter-spacing: .06em; }

.hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 1.4rem 0 .5rem; font-weight: 900; }
.lede { color: #CBD5E1; margin: 0 0 1rem; max-width: 720px; }

/* city pills */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
button { font-family: Inter, "Noto Sans Malayalam", sans-serif; }
.pill { flex: none; border: 1px solid #334155; background: var(--panel); color: #CBD5E1; font: 600 14px Inter, "Noto Sans Malayalam", sans-serif; padding: 8px 14px; border-radius: 12px; cursor: pointer; }
.pill.on { background: linear-gradient(90deg, #F3C64F, #D4AF37); color: #071120; border-color: transparent; font-weight: 900; }

/* arena */
.arena-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 0 36px rgba(212, 175, 55, .12); }
.arena-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 260px; }
@media (max-width: 560px) { .arena-wrap { aspect-ratio: 4 / 5; } }
#arena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.team { position: absolute; top: 10px; background: rgba(7, 17, 32, .85); border-radius: 12px; padding: 6px 10px; pointer-events: none; }
.team-l { left: 10px; border: 1px solid rgba(16, 185, 129, .5); }
.team-r { right: 10px; border: 1px solid rgba(244, 63, 94, .5); text-align: right; }
.t-name { font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.team-l .t-name { color: var(--buy); } .team-r .t-name { color: var(--sell); }
.t-sub { font-size: 11px; color: #CBD5E1; }
.t-pct { font: 800 20px "JetBrains Mono", monospace; }
.team-l .t-pct { color: #6EE7B7; } .team-r .t-pct { color: #FDA4AF; }
.banner { position: absolute; left: 50%; top: 38%; transform: translateX(-50%); width: min(92%, 460px); text-align: center; background: rgba(7, 17, 32, .94); border: 2px solid var(--gold); border-radius: 16px; padding: 10px 14px; animation: pop .35s ease-out; pointer-events: none; }
#banner-title { font-weight: 900; font-size: 17px; color: var(--gold); }
#banner-sub { font-size: 13px; color: #E2E8F0; margin-top: 2px; }
@keyframes pop { from { transform: translateX(-50%) scale(.85); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.whatif { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: #7C2D12; color: #FED7AA; font-weight: 800; font-size: 11px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

.meter { position: relative; height: 12px; background: var(--sell); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--buy); transition: width .6s ease; }
.meter-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--gold); }
.result { padding: 14px 16px 18px; text-align: center; }
.result-title { font-size: 1.5rem; font-weight: 900; }
.result-sub { color: #CBD5E1; margin: 2px 0 12px; }
.btn { background: linear-gradient(90deg, #F3C64F, #D4AF37); color: #071120; border: 0; font: 800 14px Inter, "Noto Sans Malayalam", sans-serif; padding: 10px 16px; border-radius: 12px; cursor: pointer; }
.btn-ghost { background: var(--panel); color: var(--gold); border: 1px solid var(--line); margin-top: 12px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--card); border: 1px solid #1E293B; border-radius: 14px; padding: 12px; }
.card .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.card .v { font: 800 22px "JetBrains Mono", monospace; margin: 2px 0; }
.card .d { font-size: 12px; font-weight: 700; }
.card .m { font-size: 12px; color: #CBD5E1; margin-top: 6px; }
.up { color: #FDA4AF; } .down { color: #6EE7B7; } .flat { color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid #1E293B; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); background: var(--card); padding: 10px; white-space: nowrap; }
td { padding: 10px; border-top: 1px solid #1E293B; white-space: nowrap; }
td.num { font-family: "JetBrains Mono", monospace; }
tr.active td { background: rgba(243, 198, 79, .07); }
.tag { font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.tag.buy { background: rgba(16, 185, 129, .15); }
.tag.sell { background: rgba(244, 63, 94, .15); }
.tag.even { background: rgba(243, 198, 79, .15); color: var(--gold); }
.note { font-size: 12px; color: var(--muted); }

/* playground */
.playground { background: var(--card); border: 1px dashed rgba(251, 146, 60, .5); border-radius: 18px; padding: 4px 16px 16px; margin-top: 2rem; }
.sliders { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .sliders { grid-template-columns: 1fr 1fr; } }
.sliders label { display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 14px; font-weight: 600; color: #CBD5E1; }
.sliders b { font-family: "JetBrains Mono", monospace; color: var(--gold); }
.sliders input { width: 100%; margin-top: 6px; accent-color: var(--gold); }

.explain { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .explain { grid-template-columns: 1fr 1fr; } }
.explain > div { background: var(--card); border: 1px solid #1E293B; border-radius: 14px; padding: 12px; }
.explain b { color: var(--gold); }
.explain p { margin: 4px 0 0; color: #CBD5E1; font-size: 14px; }

.foot { margin: 2.5rem 0 2rem; padding-top: 1rem; border-top: 1px solid #1E293B; font-size: 13px; }
.disc { background: rgba(243, 198, 79, .08); border: 1px solid var(--line); padding: 10px 12px; border-radius: 12px; }

/* month-by-month history */
.chart-card { background: var(--card); border: 1px solid #1E293B; border-radius: 14px; padding: 10px 10px 4px; margin: 10px 0; }
.legend { display: flex; gap: 16px; font-size: 12px; font-weight: 700; padding: 0 4px 4px; }
.lg-med { color: #38BDF8; } .lg-rba { color: #F59E0B; }
.chart-wrap { position: relative; }
#h-chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
#h-chart .hg { stroke: #1E293B; stroke-width: 1; }
#h-chart .ht { fill: #94A3B8; font: 600 11px Inter, sans-serif; }
#h-chart .hr, .hr { fill: #F59E0B; color: #F59E0B; }
#h-chart .hrba { fill: none; stroke: #F59E0B; stroke-width: 2.5; stroke-opacity: .85; }
#h-chart .hmed { stroke: #38BDF8; stroke-width: 3; stroke-linecap: round; }
#h-chart .hmed.gap { stroke-dasharray: 4 6; stroke-opacity: .6; }
#h-chart .hdot { fill: #071120; stroke: #38BDF8; stroke-width: 2.5; }
#h-chart .hcur { stroke: #F3C64F; stroke-width: 1; stroke-dasharray: 3 3; }
.h-tip { position: absolute; top: 4px; width: 170px; background: rgba(7, 17, 32, .96); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; font-size: 12px; line-height: 1.45; pointer-events: none; }
.note a { color: var(--gold); }

/* branding */
.follow { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--text); background: linear-gradient(90deg, rgba(243, 198, 79, .14), rgba(243, 198, 79, .04)); border: 1px solid var(--line); }
.follow-ic { font-size: 24px; }
.follow small { color: #CBD5E1; }
.follow-btn { margin-left: auto; flex: none; background: linear-gradient(90deg, #F3C64F, #D4AF37); color: #071120; font-weight: 900; padding: 8px 14px; border-radius: 10px; font-size: 14px; }
.copyright { font-size: 12px; color: var(--muted); border-top: 1px solid #1E293B; padding-top: 10px; }
.follow > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
@media (max-width: 420px) { .follow b { font-size: 13px; } .follow small { font-size: 12px; } .follow-btn { padding: 7px 10px; font-size: 13px; } }
