:root {
  color-scheme: dark;
  --bg: #05080d;
  --panel: rgba(13, 21, 31, 0.88);
  --panel-2: rgba(20, 31, 44, 0.9);
  --surface: rgba(18, 27, 38, 0.72);
  --line: rgba(165, 190, 214, 0.16);
  --line-2: rgba(165, 190, 214, 0.28);
  --text: #f7f9fc;
  --muted: #a9b7c6;
  --soft: #d8e1ec;
  --cyan: #75e8ff;
  --mint: #88f5bf;
  --amber: #f5cb69;
  --rose: #ff8997;
  --radius: 8px;
  --max: 1480px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 22% 0%, rgba(117, 232, 255, 0.13), transparent 30rem),
    radial-gradient(circle at 90% 18%, rgba(136, 245, 191, 0.08), transparent 26rem),
    linear-gradient(180deg, #05080d 0%, #07111b 48%, #05080d 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 86%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: 0;
}

h4 {
  margin: 6px 0 6px;
  font-size: 17px;
  letter-spacing: 0;
}

p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  width: min(calc(100% - 28px), var(--max));
  margin: 14px auto;
}

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100svh - 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    rgba(4, 9, 14, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(117, 232, 255, 0.32);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(117, 232, 255, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: 160ms ease;
}

.side-nav a:hover,
.side-nav a.is-active {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.side-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(117, 232, 255, 0.075), rgba(117, 232, 255, 0.025)),
    var(--surface);
}

.side-card p {
  margin-top: 12px;
  font-size: 13px;
}

.command-main {
  min-width: 0;
}

.topbar {
  position: static;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(5, 8, 13, 0.82);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(117, 232, 255, 0.38);
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  background: rgba(117, 232, 255, 0.1);
}

.discord-btn.large {
  min-width: 150px;
  color: #061019;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}

.module {
  scroll-margin-top: 18px;
  margin-bottom: 12px;
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    radial-gradient(circle at 18% 0%, rgba(117, 232, 255, 0.08), transparent 22rem),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 9px),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 54px rgba(0, 0, 0, 0.22);
}

.hero-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: 18px;
  align-items: stretch;
  min-height: min(540px, calc(100svh - 94px));
}

.module-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 18px 0;
}

.module-copy p {
  max-width: 680px;
  color: var(--soft);
  font-size: 16px;
}

.chip,
.price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(117, 232, 255, 0.26);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 820;
  background: rgba(117, 232, 255, 0.08);
}

.core-loop {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  max-width: 620px;
}

.core-loop span,
.step-grid article,
.command-grid article,
.token-board article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.core-loop span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.visual-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #03090d;
}

.visual-card img {
  width: 100%;
  height: calc(100% - 104px);
  min-height: 260px;
  object-fit: cover;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.status-grid span {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: var(--panel-2);
}

.status-grid strong {
  font-size: 28px;
}

.status-grid small {
  color: var(--muted);
}

.module-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.module-head h2 {
  max-width: 780px;
  margin-bottom: 0;
}

.step-grid,
.command-grid,
.card-grid,
.token-dashboard,
.token-board {
  display: grid;
  gap: 10px;
}

.step-grid {
  grid-template-columns: repeat(5, 1fr);
}

.step-grid article {
  min-height: 112px;
  padding: 14px;
}

.step-grid b,
.command-grid i {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--mint);
  font-style: normal;
  font-weight: 900;
}

.step-grid strong,
.command-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.step-grid p,
.command-grid p,
.card-body p,
.token-board p,
.allocation p {
  font-size: 14px;
}

.asset-row {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.asset-row:last-child {
  padding-bottom: 0;
}

.row-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.row-title h3,
.row-title p {
  margin-bottom: 0;
}

.row-title p {
  max-width: 520px;
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.four,
.command-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.asset-card {
  overflow: hidden;
  border: 1px solid rgba(165, 190, 214, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--panel-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.asset-card img {
  width: 100%;
  aspect-ratio: 1.32 / 1;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(117, 232, 255, 0.09), transparent 44%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    #02080a;
}

.asset-card.portrait img {
  aspect-ratio: 1 / 1.05;
}

.asset-card.ship img {
  aspect-ratio: 1.35 / 1;
  background: #f7f9fb;
}

.card-body {
  padding: 12px 14px 14px;
}

.price {
  margin-bottom: 10px;
  color: #061019;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}

.command-grid article {
  min-height: 118px;
  padding: 16px;
}

.inline-link {
  color: var(--cyan);
  font-weight: 800;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px);
  gap: 10px;
}

.tool-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(117, 232, 255, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(117, 232, 255, 0.08), rgba(255, 255, 255, 0.016)),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.tool-card i {
  color: var(--mint);
  font-style: normal;
  font-weight: 900;
}

.tool-card strong {
  font-size: 18px;
}

.tool-card span {
  width: fit-content;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
}

.token-dashboard {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.allocation {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    var(--surface);
}

.allocation > span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.donut::after {
  position: absolute;
  inset: 22px;
  content: "";
  border-radius: 50%;
  background: #111b25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.donut strong,
.donut small {
  position: relative;
  z-index: 1;
}

.donut strong {
  font-size: 27px;
  line-height: 1;
}

.donut small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.galfi-pie {
  background: conic-gradient(var(--cyan) 0 66%, var(--amber) 66% 86%, var(--rose) 86% 100%);
}

.resource-pie {
  background: conic-gradient(var(--mint) 0 89%, var(--amber) 89% 99%, var(--rose) 99% 100%);
}

.legend {
  display: grid;
  gap: 8px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.c-cyan {
  background: var(--cyan);
}

.c-mint {
  background: var(--mint);
}

.c-amber {
  background: var(--amber);
}

.c-rose {
  background: var(--rose);
}

.allocation p {
  margin-top: 12px;
}

.token-board {
  grid-template-columns: repeat(5, 1fr);
}

.token-board article {
  min-height: 116px;
  padding: 18px;
}

.token-board strong {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
}

.ambassador-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(117, 232, 255, 0.12), rgba(136, 245, 191, 0.08)),
    var(--panel);
}

.ambassador-module p {
  max-width: 760px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 4px 36px;
}

.footer p {
  font-size: 14px;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .side-card {
    display: none;
  }

  .topbar {
    top: auto;
  }

  .hero-module {
    min-height: auto;
  }

  .step-grid,
  .card-grid.four,
  .command-grid.four,
  .token-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(calc(100% - 20px), var(--max));
    margin-top: 10px;
  }

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

  .topbar,
  .hero-module,
  .module-head,
  .row-title,
  .ambassador-module {
    display: block;
  }

  .topbar .discord-btn {
    margin-top: 14px;
  }

  .module {
    scroll-margin-top: 14px;
    padding: 18px;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .core-loop,
  .status-grid,
  .step-grid,
  .card-grid.three,
  .card-grid.four,
  .card-grid.two,
  .command-grid.four,
  .token-dashboard,
  .token-board {
    grid-template-columns: 1fr;
  }

  .visual-card {
    margin-top: 16px;
  }

  .visual-card img {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 0.72;
  }

  .row-title p {
    margin-top: 6px;
  }

  .ambassador-module .discord-btn {
    margin-top: 18px;
  }
}
