:root {
  --bg: #0d1015;
  --panel: #151a21;
  --panel-2: #1b212b;
  --line: #28303c;
  --text: #e7eaf0;
  --muted: #8d97a8;
  --gold: #d6a93a;
  --gold-2: #f2c95c;
  --gold-ink: #1b1405;
  --pos: #34c47c;
  --neg: #ea5a50;
  --info: #5aa8ff;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
a { color: var(--gold-2); }
h1 { font-size: 26px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: .2px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
section { margin: 28px 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num, .price { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.info { color: var(--info); }
.r { text-align: right; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(13, 16, 21, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.logo { color: var(--gold); margin-right: 4px; }
nav { display: flex; align-items: center; gap: 16px; }
.navlink, .linkbtn { color: var(--muted); text-decoration: none; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.navlink:hover, .linkbtn:hover { color: var(--text); }
form.inline { display: inline; margin: 0; }

/* hero */
.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, rgba(214, 169, 58, .16), transparent 55%), var(--panel);
}
.eyebrow { color: var(--gold-2); font-size: 13px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.price { font-size: 46px; font-weight: 750; line-height: 1.1; margin: 6px 0 10px; }
.price .unit { font-size: 22px; color: var(--muted); margin-left: 6px; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.hero-cta { max-width: 340px; }
.hero-cta p { margin: 10px 0 0; }

/* cards & grids */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.narrow { max-width: 420px; margin: 48px auto; }
.card.empty { margin-top: 48px; text-align: center; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.tiers { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tier header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tier .tlabel { font-weight: 700; font-size: 17px; }
.tier .trend { font-weight: 600; margin-bottom: 4px; }
.tier p { margin: 10px 0 0; }
.tier.off { opacity: .55; }
.kpi .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.kpi .v { font-size: 18px; font-weight: 650; margin: 4px 0; }

/* badges, buttons, flash */
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.pos { color: var(--pos); border-color: rgba(52, 196, 124, .45); }
.badge.neg { color: var(--neg); border-color: rgba(234, 90, 80, .45); }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); border: 0; }
.btn.gold:hover { filter: brightness(1.06); }
.btn.danger { background: transparent; color: var(--neg); border-color: rgba(234, 90, 80, .55); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.flash { margin: 16px 0; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); }
.flash.ok { border-color: rgba(52, 196, 124, .5); }
.flash.error { border-color: rgba(234, 90, 80, .55); color: #ffb3ad; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; background: var(--panel-2); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
table.compact th, table.compact td { padding: 7px 10px; }
td .small { white-space: normal; max-width: 360px; }
tr.total td { font-weight: 700; background: var(--panel-2); }

/* forms */
.stack { display: grid; gap: 10px; }
textarea, input[type=password] {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
textarea:focus, input:focus { outline: 2px solid rgba(214, 169, 58, .5); outline-offset: 1px; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
pre.cmd, pre.log {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  overflow-x: auto; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre.log { max-height: 360px; overflow-y: auto; white-space: pre; }
ul.actions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }

/* news & calendar */
.badge.warn { color: #f0b44c; border-color: rgba(240, 180, 76, .45); }
table.cal td.wrap { white-space: normal; min-width: 180px; }
table.cal tr.past td { opacity: .45; }
table.cal tr.soon td { background: rgba(214, 169, 58, .08); }
table.cal tr.soon td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
ul.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
ul.news li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
ul.news li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.news a { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.4; }
ul.news a:hover { color: var(--gold-2); text-decoration: underline; }

/* equity chart */
svg.equity { width: 100%; height: auto; display: block; }
svg.equity .line { fill: none; stroke: var(--gold-2); stroke-width: 2.2; stroke-linejoin: round; }
svg.equity .area { fill: rgba(214, 169, 58, .12); }
svg.equity .zero { stroke: var(--line); stroke-dasharray: 4 4; }
svg.equity .lbl { fill: var(--muted); font-size: 12px; }
svg.equity .end { text-anchor: end; fill: var(--text); font-weight: 600; }

.foot { color: var(--muted); font-size: 12px; padding-top: 12px; padding-bottom: 32px; border-top: 1px solid var(--line); margin-top: 40px; }

@media (max-width: 600px) {
  .hero { padding: 18px; }
  .price { font-size: 36px; }
  .grid.two { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
