:root {
  --ink: #f3f5f7;
  --text: #d6dce3;
  --muted: #8e98a5;
  --page: #0b0e12;
  --sidebar: #10141a;
  --surface: #161c24;
  --surface-2: #1c2430;
  --line: #2a3442;
  --gold: #e7ae3e;
  --red: #ee665f;
  --teal: #46c6b8;
  --blue: #68aee8;
  --sidebar-width: 312px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #3f72c5 #f3f6fb;
}

html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: #f3f6fb;
  border-left: 1px solid #ccd7e7;
}

html::-webkit-scrollbar-thumb {
  min-height: 52px;
  background: linear-gradient(180deg, #5f91e3 0%, #3f72c5 100%);
  border: 3px solid #f3f6fb;
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #55bfca 0%, #3f72c5 100%);
}

html::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0c1015;
}

.gate-card {
  width: min(430px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .4);
}

.mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  background: var(--gold);
  color: #17110a;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.gate h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 34px;
}

.gate p { line-height: 1.55; }

.gate label,
.search-label {
  display: block;
  margin: 24px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.gate input,
.search {
  width: 100%;
  color: var(--ink);
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.gate input {
  padding: 14px;
  margin-bottom: 12px;
}

.gate input:focus,
.search:focus { border-color: var(--blue); }

.gate button {
  width: 100%;
  padding: 13px 16px;
  color: #17110a;
  background: var(--gold);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.error {
  min-height: 22px;
  margin-bottom: 0;
  color: var(--red);
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

aside {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  isolation: isolate;
  width: var(--sidebar-width);
  overflow: hidden;
  background: #0b0f15;
  border-right: 1px solid var(--line);
  box-shadow: 14px 0 34px rgba(0, 0, 0, .28);
}

.sidebar-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/overview/genesis-404-art.webp") center center / cover no-repeat;
  filter: saturate(.9) contrast(1.08);
  pointer-events: none;
}

.sidebar-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 15, .62);
  border-right: 1px solid rgba(104, 174, 232, .22);
}

.sidebar-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 18px 36px;
  scrollbar-width: thin;
  scrollbar-color: #3557ad #070b12;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 10px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: #070b12;
  border-left: 1px solid rgba(104, 174, 232, .22);
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  min-height: 44px;
  background: linear-gradient(180deg, #446bd0 0%, #243871 100%);
  border: 2px solid #070b12;
  border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #55bfca 0%, #3557ad 100%);
}

.sidebar-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--line);
}

.brand span {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

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

.search-label { margin: 20px 8px 7px; }

.search {
  padding: 10px 12px;
  margin-bottom: 18px;
}

nav { display: grid; gap: 22px; }

.nav-group {
  display: grid;
  gap: 2px;
  padding-left: 9px;
  border-left: 2px solid var(--line);
}

.nav-group h2 {
  margin: 0 0 8px;
  padding: 0 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-core { border-left-color: var(--red); }
.nav-platform { border-left-color: var(--blue); }
.nav-world { border-left-color: var(--teal); }

.nav-item {
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: rgba(28, 36, 48, .88);
}

.nav-item.active { font-weight: 700; }

.nav-item[hidden],
.nav-group[hidden] { display: none; }

main {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
  color: #151515;
  background: #ffffff;
  --ink: #0b285b;
  --text: #23395d;
  --muted: #536b91;
  --page: #ffffff;
  --surface: #eff5ff;
  --surface-2: #dce9fa;
  --line: #b7ccea;
  --gold: #346dce;
  --red: #d95556;
  --teal: #639be2;
  --blue: #294f9e;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 32px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}

.topbar strong {
  margin-right: auto;
  color: var(--ink);
}

.lock,
.menu {
  min-width: 44px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.lock:hover,
.menu:hover { color: var(--ink); }

.menu { display: none; }

.doc {
  display: none;
  width: min(100%, 1180px);
  padding: 56px 54px 100px;
  scroll-margin-top: 66px;
}

.doc.active { display: block; }

.doc h1 {
  max-width: 900px;
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 46px;
  line-height: 1.08;
}

.doc h2 {
  margin: 48px 0 14px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.25;
}

.doc h3 {
  margin: 30px 0 10px;
  color: var(--gold);
  font-size: 18px;
}

.doc p,
.doc li {
  max-width: 820px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.72;
}

.doc ul,
.doc ol {
  max-width: 820px;
  padding-left: 25px;
}

.doc li { padding: 3px 0; }

.doc a { color: var(--blue); }

.doc code {
  padding: 2px 6px;
  color: #111111;
  background: #f2f2f2;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}

.doc pre {
  max-width: 900px;
  overflow: auto;
  padding: 18px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.doc blockquote {
  max-width: 820px;
  margin: 26px 0;
  padding: 18px 20px;
  color: var(--ink);
  background: var(--surface);
  border-left: 3px solid var(--gold);
  font-size: 18px;
  line-height: 1.6;
}

.table-wrap {
  max-width: 920px;
  overflow-x: auto;
  margin: 24px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--ink);
  background: var(--surface);
}

tr:last-child td { border-bottom: 0; }

.doc-visual {
  width: min(100%, 1050px);
  margin: 30px 0 42px;
}

.doc-visual img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  object-position: left top;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  width: min(100%, 1050px);
  margin: 24px 0 32px;
}

.doc-gallery figure {
  margin: 0;
  min-width: 0;
  padding: 12px 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.doc-gallery img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.doc-gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.store-burn-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 1050px);
  margin: 34px 0 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .018);
}

.store-burn-panel {
  min-width: 0;
  padding: 34px 34px 36px;
}

.store-burn-panel + .store-burn-panel {
  border-left: 1px solid var(--line);
}

.store-burn-panel h2 {
  margin: 15px 0 12px;
  color: var(--ink);
  font-size: 24px;
}

.store-burn-panel p {
  margin: 0;
  color: var(--text);
}

.store-burn-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.burn-identity {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.burn-mark {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.burn-identity h2 {
  margin: 8px 0 0;
}

.fragment-rarity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 1050px);
  margin: 26px 0 34px;
}

.fragment-rarity-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .02);
}

.fragment-rarity-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.fragment-rarity-name strong {
  color: var(--ink);
  font-size: 15px;
}

.fragment-rarity-name span {
  color: var(--muted);
  font-size: 12px;
}

.fragment-tier-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.fragment-rarity figure {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 0;
  min-width: 0;
}

.fragment-rarity img {
  display: block;
  width: min(100%, 82px);
  aspect-ratio: 1;
  object-fit: contain;
}

.fragment-rarity figcaption {
  color: var(--muted);
  font-size: 10px;
}

.collectible-rarity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 42px;
  width: min(100%, 1050px);
  margin: 28px 0 34px;
}

.collectible-rarity figure {
  position: relative;
  display: grid;
  grid-template-rows: 250px auto;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.collectible-rarity figure:not(:last-child)::after {
  content: "+";
  position: absolute;
  top: 112px;
  right: -29px;
  color: var(--gold);
  font-size: 24px;
  font-weight: 800;
}

.collectible-rarity img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: contain;
}

.collectible-rarity figcaption {
  display: grid;
  gap: 3px;
  text-align: center;
}

.collectible-rarity small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.collectible-rarity strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.accelerator-uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  width: min(100%, 720px);
  margin: 26px 0 34px;
}

.accelerator-uses figure {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.accelerator-uses img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: 150px;
  object-fit: contain;
}

.accelerator-uses figcaption {
  display: grid;
  gap: 2px;
  text-align: center;
}

.accelerator-uses strong {
  color: var(--ink);
  font-size: 15px;
  text-transform: uppercase;
}

.accelerator-uses span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.firewall-economics {
  width: min(100%, 980px);
  margin: 34px 0 48px;
}

.economics-journey {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) 40px minmax(310px, 1.45fr) 40px minmax(170px, .9fr);
  align-items: stretch;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.economics-stage {
  display: flex;
  min-width: 0;
  gap: 13px;
  align-items: flex-start;
}

.stage-number {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #081014;
  background: var(--gold);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.economics-stage small,
.settlement-flow small,
.floor-equation small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.economics-stage > div > strong {
  display: block;
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 21px;
}

.economics-stage > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.economics-stage > div > span b {
  display: block;
  margin-bottom: 1px;
  color: var(--text);
  font-size: 15px;
}

.journey-connector {
  position: relative;
  align-self: center;
  height: 1px;
  margin: 0 10px;
  background: var(--line);
}

.journey-connector::after {
  position: absolute;
  top: -4px;
  right: -1px;
  width: 7px;
  height: 7px;
  content: '';
  border-top: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
  transform: rotate(45deg);
}

.decision-content {
  flex: 1;
}

.decision-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.decision-options > span + span {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.decision-options b,
.decision-options strong,
.decision-options em {
  display: block;
}

.decision-options b {
  color: var(--text);
  font-size: 13px;
}

.decision-options strong {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 17px;
}

.decision-options em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.settlement-flow {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) 72px minmax(0, 1.6fr);
  align-items: center;
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.settlement-heading {
  padding: 23px 24px;
  border-top: 3px solid var(--gold);
}

.settlement-heading strong,
.settlement-heading span {
  display: block;
}

.settlement-heading strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 42px;
  line-height: 1;
}

.settlement-heading span {
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
}

.settlement-arrow {
  position: relative;
  width: 42px;
  height: 1px;
  justify-self: center;
  background: var(--muted);
}

.settlement-arrow::after {
  position: absolute;
  top: -5px;
  right: 0;
  width: 9px;
  height: 9px;
  content: '';
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: rotate(45deg);
}

.settlement-destinations {
  display: grid;
  grid-template-columns: 14fr 3fr;
  min-height: 116px;
}

.settlement-destinations > span {
  display: flex;
  min-width: 0;
  padding: 20px;
  flex-direction: column;
  justify-content: center;
  color: #081014;
}

.settlement-destinations small {
  color: rgba(8, 16, 20, .7);
}

.settlement-destinations strong {
  margin-top: 5px;
  font-size: 31px;
}

.settlement-destinations .lister { background: var(--teal); }
.settlement-destinations .treasury { background: var(--gold); }

.floor-equation {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 1fr) minmax(140px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 16px 22px;
  border: solid var(--line);
  border-width: 0 1px 1px;
}

.floor-equation > span {
  min-width: 0;
}

.floor-equation strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
}

.floor-equation .equation-context strong {
  color: var(--gold);
}

.genesis-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .55fr);
  gap: 14px;
  width: min(100%, 980px);
  margin: 30px 0 42px;
}

.genesis-intro figure,
.genesis-vote {
  margin: 0;
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.genesis-intro img,
.genesis-vote img {
  display: block;
  width: 100%;
  height: auto;
}

.genesis-facts {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.genesis-facts span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
}

.genesis-facts small,
.genesis-benefits small {
  color: var(--muted);
  font-size: 12px;
}

.genesis-facts strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.genesis-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 980px);
  margin: 24px 0 20px;
}

.genesis-benefits > div {
  min-width: 0;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: 6px;
}

.genesis-benefits strong,
.genesis-benefits span {
  display: block;
}

.genesis-benefits strong {
  color: var(--gold);
  font-size: 25px;
  line-height: 1;
}

.genesis-benefits span {
  margin: 9px 0 6px;
  color: var(--ink);
  font-weight: 800;
}

.genesis-vote {
  width: min(100%, 980px);
  margin: 26px 0 20px;
}

.genesis-floor-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 980px);
  margin: 28px 0 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.floor-choice {
  position: relative;
  min-width: 0;
  padding: 28px 24px 26px;
  border-top: 4px solid var(--choice);
}

.floor-choice + .floor-choice {
  border-left: 1px solid var(--line);
}

.choice-two { --choice: var(--red); }
.choice-four { --choice: var(--blue); }
.choice-six { --choice: var(--teal); }

.choice-price,
.choice-posture {
  display: block;
}

.choice-price {
  color: var(--choice);
  font-size: 31px;
  line-height: 1;
}

.choice-posture {
  margin-top: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.floor-choice > p {
  min-height: 88px;
  margin: 14px 0 22px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.floor-choice dl,
.floor-choice dl div {
  margin: 0;
}

.floor-choice dl div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.floor-choice dl div + div {
  margin-top: 14px;
}

.floor-choice dt {
  color: var(--choice);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.floor-choice dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.supply-model,
.mechanism,
.protocol-stack {
  width: min(100%, 1050px);
  margin: 28px 0 40px;
}

.leader-supply {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.leader-supply figure {
  min-width: 0;
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.leader-supply img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: contain;
}

.leader-supply figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.leader-supply figcaption strong { color: var(--ink); }

.supply-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.supply-total strong {
  color: var(--ink);
  font-size: 22px;
}

.supply-bar {
  display: flex;
  min-height: 82px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.supply-bar > span {
  flex: 0 0 var(--share);
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  color: #0b0e12;
  font-size: 12px;
  font-weight: 800;
}

.supply-bar strong { font-size: 18px; }
.supply-bar .genesis { background: #a678dc; }
.supply-bar .sacrifice { background: #46c6b8; }
.supply-bar .store { background: #e7ae3e; }
.supply-bar .early { background: #68aee8; }
.supply-bar .reward { background: #ee665f; }

.supply-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mechanism-steps,
.mechanism-branches,
.mechanism-outcomes,
.protocol-stack {
  display: grid;
  gap: 12px;
}

.mechanism-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mechanism-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.mechanism-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0 34%; }
.protocol-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mechanism-steps > div,
.mechanism-branches > div,
.mechanism-outcomes > div,
.protocol-stack > div {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mechanism b {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  margin-bottom: 16px;
  color: #17110a;
  background: var(--gold);
  border-radius: 4px;
  font-size: 12px;
}

.mechanism strong,
.protocol-stack strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 17px;
}

.mechanism span,
.protocol-stack span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mechanism small,
.protocol-stack small {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .doc-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-burn-split {
    grid-template-columns: 1fr;
  }

  .store-burn-panel {
    padding: 28px 22px 30px;
  }

  .store-burn-panel + .store-burn-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .burn-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .burn-mark {
    width: 82px;
    height: 82px;
  }

  .fragment-rarity-row {
    padding: 10px;
  }

  .fragment-rarity-name {
    padding: 0 2px 4px;
  }

  .collectible-rarity {
    gap: 18px;
  }

  .collectible-rarity figure {
    grid-template-rows: 150px auto;
  }

  .collectible-rarity img {
    height: 150px;
  }

  .collectible-rarity figure:not(:last-child)::after {
    top: 64px;
    right: -14px;
    font-size: 18px;
  }

  .collectible-rarity strong {
    font-size: 12px;
  }

  .accelerator-uses {
    gap: 10px;
  }

  .accelerator-uses img {
    width: 105px;
    height: 105px;
  }

  .accelerator-uses strong,
  .accelerator-uses span {
    font-size: 11px;
  }

  .economics-journey {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 0;
  }

  .economics-stage {
    padding: 18px 0;
  }

  .journey-connector {
    width: 1px;
    height: 18px;
    margin: 0 0 0 15px;
  }

  .journey-connector::after {
    top: auto;
    right: -3px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .settlement-flow {
    grid-template-columns: 1fr;
  }

  .settlement-arrow {
    width: 1px;
    height: 25px;
    margin: 2px 0;
  }

  .settlement-arrow::after {
    top: auto;
    right: -4px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .settlement-destinations {
    grid-template-columns: minmax(0, 1fr) 88px;
    min-height: 100px;
  }

  .settlement-destinations .treasury {
    padding: 12px 8px;
  }

  .settlement-destinations .treasury small {
    font-size: 8px;
  }

  .settlement-heading strong {
    font-size: 38px;
  }

  .floor-equation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }

  .floor-equation .equation-context {
    grid-column: 1 / -1;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .floor-equation > span:nth-child(2) {
    grid-column: 1;
  }

  .floor-equation > span:nth-child(3) {
    grid-column: 2;
  }

  .leader-supply,
  .mechanism-steps,
  .protocol-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mechanism-outcomes { margin-left: 0; }

  .leader-supply img { height: 190px; }
}

.doc-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.doc-pager button {
  min-height: 76px;
  padding: 12px 16px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.doc-pager button:last-child { text-align: right; }
.doc-pager strong { color: var(--ink); }

/* GNF documentation color system: one hierarchy for headings and one shared card treatment. */
.topbar {
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 4px 14px rgba(11, 40, 91, .08);
}

.doc h1 { color: var(--ink); }

.doc h2 {
  color: var(--blue);
  border-left: 4px solid var(--blue);
  padding-left: 14px;
}

.doc h3 { color: var(--red); }

.doc p strong,
.doc li strong,
.doc blockquote strong {
  color: var(--red);
}

.doc-gallery figure,
.fragment-rarity-row,
.leader-supply figure,
.genesis-facts span,
.genesis-benefits > div,
.mechanism-steps > div,
.mechanism-branches > div,
.mechanism-outcomes > div,
.protocol-stack > div,
.supply-total,
.settlement-flow {
  background: var(--surface);
  border-color: var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(41, 79, 158, .07);
}

.store-burn-split {
  overflow: hidden;
  background: var(--surface);
  border-color: var(--line);
  border-radius: 9px;
}

.store-burn-panel:first-child { background: #edf4ff; }
.store-burn-panel:last-child { background: #e1edff; }

.store-burn-kicker,
.fragment-rarity-name span,
.genesis-facts small,
.genesis-benefits small {
  color: var(--blue);
}

.stage-number,
.mechanism b {
  color: #ffffff;
  background: var(--blue);
}

.settlement-destinations .lister {
  color: #ffffff;
  background: #346dce;
}

.settlement-destinations .treasury {
  color: #ffffff;
  background: #0b285b;
}

.settlement-destinations small { color: rgba(255, 255, 255, .74); }

.supply-bar .genesis { color: #ffffff; background: #0b285b; }
.supply-bar .sacrifice { color: #ffffff; background: #294f9e; }
.supply-bar .store { color: #ffffff; background: #346dce; }
.supply-bar .early { color: #0b285b; background: #639be2; }
.supply-bar .reward { color: #ffffff; background: var(--red); }

/* Sidebar brand mark and navigation carry the same fire-and-cobalt language as GNF. */
.brand {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.brand span,
.brand small {
  position: relative;
  z-index: 1;
}

.brand span {
  color: transparent;
  background: linear-gradient(180deg, #ff6b4b 0%, #e12835 58%, #a80b25 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 #17070b;
}

.brand small {
  color: #b9cdea;
  text-shadow: 0 1px 10px rgba(12, 33, 83, .72);
}

.nav-group {
  gap: 4px;
  padding-left: 12px;
  border-left-width: 3px;
}

.nav-group h2 { padding-left: 10px; }

.nav-core { border-left-color: #f24b3d; }
.nav-platform { border-left-color: #4f85dd; }
.nav-world { border-left-color: #75c9df; }

.nav-core h2 { color: #ff8874; }
.nav-platform h2 { color: #8cb8ff; }
.nav-world h2 { color: #9ce7f1; }

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(52, 109, 206, .44), rgba(11, 40, 91, .72));
  box-shadow: inset 3px 0 0 #639be2;
}

.nav-core .nav-item.active { box-shadow: inset 3px 0 0 #f24b3d; }
.nav-platform .nav-item.active { box-shadow: inset 3px 0 0 #639be2; }
.nav-world .nav-item.active { box-shadow: inset 3px 0 0 #75c9df; }

.scrim { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  main { grid-column: 1; }
  aside {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .app.nav-open aside { transform: translateX(0); }
  .menu { display: inline-block; }
  .scrim {
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(0, 0, 0, .58);
    border: 0;
  }
  .app.nav-open .scrim { display: block; }
  .doc { padding: 40px 24px 76px; }
  .doc h1 { font-size: 36px; }
  .topbar { padding: 10px 18px; }
}

@media (max-width: 560px) {
  .gate-card { padding: 26px 22px; }
  .doc { padding: 34px 18px 68px; }
  .doc h1 { font-size: 32px; }
  .doc h2 { font-size: 23px; }
  .doc p,
  .doc li { font-size: 16px; }
  .topbar strong { font-size: 14px; }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager button:last-child { text-align: left; }
  .mechanism-steps,
  .mechanism-branches,
  .mechanism-outcomes,
  .protocol-stack { grid-template-columns: 1fr; }
  .genesis-intro { grid-template-columns: 1fr; }
  .genesis-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .genesis-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genesis-facts strong { font-size: 22px; }
  .genesis-floor-choices { grid-template-columns: 1fr; }
  .floor-choice + .floor-choice { border-left: 0; }
  .floor-choice > p { min-height: 0; }
  .supply-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }
  .supply-bar > span {
    min-height: 64px;
    padding: 9px 10px;
    font-size: 11px;
  }
  .supply-bar strong { font-size: 14px; }
}
