:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-soft: #0a0f16;
  --panel: rgba(9, 14, 21, 0.78);
  --line: rgba(147, 176, 220, 0.14);
  --line-strong: rgba(147, 176, 220, 0.24);
  --text: #edf4ff;
  --muted: #91a0b7;
  --muted-2: #667287;
  --blue: #4ea1ff;
  --blue-strong: #176fff;
  --lime: #d7ff31;
  --amber: #ffbf47;
  --danger: #ff7070;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 78% 18%, rgba(29, 111, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 28% 92%, rgba(215, 255, 49, 0.08), transparent 24rem),
    linear-gradient(180deg, #05070a 0%, #070b11 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.construction-banner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid rgba(215, 255, 49, 0.2);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background:
    linear-gradient(90deg, rgba(215, 255, 49, 0.08), rgba(78, 161, 255, 0.06)),
    rgba(8, 12, 17, 0.92);
  backdrop-filter: blur(18px);
}

.construction-banner span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(215, 255, 49, 0.7);
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: calc(100vh - 42px);
}

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.66);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.brand-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(78, 161, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 28px rgba(23, 111, 255, 0.24);
}

.eyebrow,
.section-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.brand {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.rail-nav {
  display: grid;
  gap: 4px;
  margin-bottom: 34px;
}

.rail-nav a {
  position: relative;
  display: block;
  padding: 10px 0 10px 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.rail-nav a::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
  content: "";
  transform: translateY(-50%);
}

.rail-nav a:hover,
.rail-nav a.active {
  color: var(--text);
}

.rail-nav a.active::before {
  background: var(--lime);
  box-shadow: 0 0 16px rgba(215, 255, 49, 0.65);
}

.rail-section {
  margin-top: 28px;
}

.metric-stack {
  margin: 16px 0 0;
}

.metric-stack div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.metric-stack dt {
  color: var(--muted);
  font-size: 13px;
}

.metric-stack dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
}

.command-block code {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(215, 255, 49, 0.04);
}

.command-block p {
  max-width: 22ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.workspace {
  padding: 30px clamp(22px, 3vw, 44px) 34px;
}

.topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 16ch;
  margin-top: 10px;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

h2 {
  margin-top: 5px;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255,255,255,0.025);
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(215, 255, 49, 0.75);
}

.intro-strip {
  max-width: 840px;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.market-grid,
.lower-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.45fr) minmax(280px, 0.72fr);
  gap: 24px;
}

.lower-grid {
  margin-top: 24px;
}

.feed,
.panel,
.activity,
.sponsor {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255,255,255,0.04) inset;
}

.feed {
  min-height: 620px;
  overflow: hidden;
}

.panel,
.activity,
.sponsor {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.section-head.compact {
  padding: 0 0 18px;
  border-bottom: 0;
}

.filters {
  display: flex;
  gap: 6px;
}

.filters button,
.sponsor button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  background: transparent;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.filters button {
  padding: 8px 12px;
}

.filters button:hover,
.filters button.active {
  border-color: rgba(78, 161, 255, 0.4);
  color: var(--text);
  background: rgba(78, 161, 255, 0.12);
}

.bounty-list {
  display: grid;
}

.bounty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, transform 180ms ease;
}

.bounty-row:hover {
  background: rgba(78, 161, 255, 0.045);
  transform: translateX(2px);
}

.bounty-row:last-child {
  border-bottom: 0;
}

.bounty-title {
  margin-bottom: 9px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.bounty-meta,
.bounty-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bounty-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.bounty-side {
  align-content: flex-start;
  justify-content: flex-end;
  min-width: 150px;
}

.badge,
.reward {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
}

.badge {
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.open {
  border-color: rgba(215, 255, 49, 0.28);
  color: var(--lime);
}

.badge.claimed {
  border-color: rgba(78, 161, 255, 0.32);
  color: var(--blue);
}

.badge.review {
  border-color: rgba(255, 191, 71, 0.35);
  color: var(--amber);
}

.reward {
  color: var(--text);
}

.sidepanes {
  display: grid;
  gap: 24px;
}

.queue,
.leaderboard {
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue li,
.leaderboard li {
  display: grid;
  gap: 5px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.queue li:last-child,
.leaderboard li:last-child {
  border-bottom: 0;
}

.queue strong,
.leaderboard strong {
  font-size: 14px;
  font-weight: 500;
}

.queue span,
.leaderboard span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.leaderboard li {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
}

.leaderboard .rank {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
}

.leaderboard .score {
  justify-self: end;
  color: var(--text);
}

.activity-log {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.activity-item time {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
}

.activity-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.activity-item b {
  color: var(--text);
  font-weight: 500;
}

.sponsor {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  background:
    radial-gradient(circle at top right, rgba(78, 161, 255, 0.16), transparent 18rem),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.014));
}

.sponsor h2 {
  max-width: 12ch;
  margin-top: 8px;
  font-size: 26px;
}

.sponsor p {
  max-width: 40ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.sponsor-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.sponsor button {
  padding: 11px 16px;
  border-color: rgba(215, 255, 49, 0.28);
  color: #081007;
  background: var(--lime);
  font-weight: 600;
}

.sponsor button:hover {
  transform: translateY(-1px);
}

.sponsor button.ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.fade-in {
  animation: fade-in 520ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .market-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding-inline: 16px;
  }

  .topline,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    flex-wrap: wrap;
  }

  .bounty-row {
    grid-template-columns: 1fr;
  }

  .bounty-side {
    justify-content: flex-start;
  }

  .rail-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
