:root {
  color-scheme: dark;
  --ink: #090807;
  --surface: #11100e;
  --surface-2: #181612;
  --line: rgba(255, 244, 218, 0.14);
  --muted: #9d978c;
  --paper: #f7f0dd;
  --yellow: #f4ba30;
  --yellow-bright: #ffd768;
  --brown: #7a4023;
  --red: #ec493d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
}

body {
  min-height: 100vh;
  color: var(--paper);
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 48% 42%, rgba(151, 83, 37, 0.16), transparent 33%),
    linear-gradient(135deg, #0b0a08, #070706 70%);
}

.topbar {
  position: relative;
  z-index: 10;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 7, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-orbit {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(244, 186, 48, 0.5);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 27px;
  line-height: 1;
  transform: rotate(-12deg);
}

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

.brand strong {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 23px;
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.17em;
}

.chain-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7c0b3;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(244, 186, 48, 0.9);
}

.tax-chip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tax-chip strong {
  color: var(--yellow-bright);
}

.tax-chip i {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.experience {
  height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.world-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  isolation: isolate;
}

.world-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.world-panel::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.5);
}

#world {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.world-copy {
  position: absolute;
  z-index: 5;
  top: clamp(24px, 5vw, 64px);
  left: clamp(22px, 5vw, 66px);
  right: clamp(22px, 5vw, 66px);
  max-width: 640px;
  pointer-events: none;
}

.kicker,
.world-copy p,
.world-copy h1 {
  margin: 0;
}

.kicker {
  color: var(--yellow);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.world-copy h1 {
  margin-top: 14px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(45px, 6.8vw, 100px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.world-copy > p:not(.kicker) {
  max-width: 480px;
  margin-top: 18px;
  color: #b8b1a5;
  font-size: 15px;
  line-height: 1.6;
}

.demo-stamp {
  position: absolute;
  z-index: 5;
  top: 30px;
  right: 28px;
  display: grid;
  width: 106px;
  height: 106px;
  place-content: center;
  border: 1px solid rgba(244, 186, 48, 0.45);
  border-radius: 50%;
  background: rgba(9, 8, 7, 0.68);
  text-align: center;
  transform: rotate(7deg);
}

.demo-stamp span,
.demo-stamp small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.demo-stamp strong {
  margin: 3px 0;
  color: var(--yellow);
  font-size: 15px;
}

.demo-stamp strong {
  max-width: 84px;
  font-size: 12px;
  line-height: 1.25;
}

.feed-clock {
  position: absolute;
  z-index: 5;
  right: 30px;
  bottom: 30px;
  min-width: 172px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(9, 8, 7, 0.78);
  backdrop-filter: blur(12px);
}

.feed-clock span,
.feed-clock strong {
  display: block;
}

.feed-clock span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.feed-clock strong {
  margin-top: 2px;
  color: var(--yellow-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 27px;
  letter-spacing: 0.05em;
}

.world-hint {
  position: absolute;
  z-index: 5;
  bottom: 30px;
  left: 30px;
  color: rgba(247, 240, 221, 0.5);
  font-size: 13px;
}

.data-panel {
  position: relative;
  z-index: 6;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--surface);
}

.panel-heading,
.allocation-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading > div span,
.panel-heading > div strong {
  display: block;
}

.panel-heading > div span,
.allocation-copy span,
.event-log > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.panel-heading > div strong {
  margin-top: 4px;
  font-size: 21px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(244, 186, 48, 0.25);
  border-radius: 999px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  animation: blink 1.8s ease-in-out infinite;
}

.story-steps {
  margin: 22px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.story-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px 14px;
}

.story-steps li + li {
  border-top: 1px solid var(--line);
}

.story-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(244, 186, 48, 0.38);
  border-radius: 50%;
  color: var(--yellow);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.story-steps strong {
  display: block;
  color: #f0e8d7;
  font-size: 14px;
}

.story-steps p {
  margin: 5px 0 0;
  color: #9f988d;
  font-size: 12px;
  line-height: 1.55;
}

.meme-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  border: 1px solid var(--line);
  background: rgba(244, 186, 48, 0.035);
}

.meme-facts > div {
  min-width: 0;
  padding: 14px 7px;
  text-align: center;
}

.meme-facts > div + div {
  border-left: 1px solid var(--line);
}

.meme-facts strong,
.meme-facts span {
  display: block;
}

.meme-facts strong {
  color: var(--yellow-bright);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 27px;
}

.meme-facts span {
  margin-top: 4px;
  color: #8d867b;
  font-size: 10px;
}

.promo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.promo-actions .action {
  min-height: 72px;
}

.promo-panel .disclaimer {
  margin-top: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 22px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric {
  min-width: 0;
  padding: 17px 15px;
  background: var(--surface-2);
}

.metric-featured {
  grid-column: 1 / -1;
  padding: 20px 15px;
  background:
    radial-gradient(circle at 90% 20%, rgba(244, 186, 48, 0.1), transparent 40%),
    var(--surface-2);
}

.metric dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.metric dd {
  margin: 7px 0 0;
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 800;
}

.metric-featured dd {
  color: var(--yellow-bright);
  font-size: 31px;
}

.metric dd small {
  margin-left: 3px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.metric p {
  margin: 5px 0 0;
  color: #817b70;
  font-size: 11px;
}

.allocation,
.event-log {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.allocation-copy strong {
  color: #c9c1b4;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.allocation-bar {
  display: flex;
  gap: 3px;
  height: 7px;
  margin-top: 12px;
}

.allocation-bar span,
.allocation-bar i {
  display: block;
  border-radius: 999px;
}

.allocation-bar span {
  width: 98%;
  background: var(--yellow);
  box-shadow: 0 0 16px rgba(244, 186, 48, 0.22);
}

.allocation-bar i {
  width: 2%;
  min-width: 5px;
  background: var(--brown);
}

.authority-note {
  margin: 12px 0 0;
  color: #817b70;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.authority-note span {
  color: #aaa295;
  overflow-wrap: anywhere;
}

.contract-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  width: min(100%, 600px);
  margin-top: 20px;
  padding: 13px 14px 14px 17px;
  overflow: hidden;
  border: 1px solid rgba(244, 186, 48, 0.68);
  border-left: 4px solid var(--yellow);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(244, 186, 48, 0.12), rgba(17, 16, 14, 0.9) 48%),
    rgba(9, 8, 7, 0.86);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28), inset 0 0 30px rgba(244, 186, 48, 0.025);
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.contract-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #efe7d5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.contract-heading span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.contract-heading i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(244, 186, 48, 0.9);
}

.contract-heading strong {
  color: var(--yellow);
  font-size: 9px;
}

.contract-card code {
  display: block;
  align-self: center;
  min-width: 0;
  color: #fff4d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(10px, 1.1vw, 12px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.contract-actions {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.contract-actions button,
.contract-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid rgba(244, 186, 48, 0.45);
  border-radius: 2px;
  background: rgba(9, 8, 7, 0.55);
  color: #e5dece;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.contract-actions button {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #18120a;
  font-weight: 900;
}

.contract-actions button:hover,
.contract-actions a:hover {
  border-color: var(--yellow);
  filter: brightness(1.08);
}

.event-log p {
  min-height: 38px;
  margin: 9px 0 0;
  color: #cac3b7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.pulse-console {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(244, 186, 48, 0.34);
  background:
    linear-gradient(145deg, rgba(244, 186, 48, 0.08), transparent 48%),
    #0d0c0a;
}

.pulse-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.pulse-heading div span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.pulse-heading div strong {
  margin-top: 3px;
  color: var(--paper);
  font-size: 17px;
}

.pulse-status {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.pulse-status.ready {
  border-color: rgba(244, 186, 48, 0.52);
  color: var(--yellow-bright);
}

.pulse-status.pending {
  border-color: rgba(116, 206, 133, 0.4);
  color: #8be29a;
}

.pulse-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  color: #aaa397;
  font: 700 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pulse-flow span {
  color: #d7d0c3;
}

.pulse-flow i {
  color: var(--yellow);
  font-style: normal;
}

.pulse-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 13px 0 0;
  border: 1px solid var(--line);
}

.pulse-stats > div {
  min-width: 0;
  padding: 10px;
}

.pulse-stats > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.pulse-stats > div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.pulse-stats dt {
  color: #817b70;
  font-size: 10px;
}

.pulse-stats dd {
  margin: 4px 0 0;
  color: #efe7d5;
  font: 750 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.pulse-timing,
.wallet-state,
.pulse-result {
  margin: 10px 0 0;
  font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pulse-timing {
  color: #c7c0b3;
}

.pulse-actions-live {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 8px;
  margin-top: 12px;
}

.pulse-actions-live button {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(244, 186, 48, 0.55);
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.wallet-button {
  background: transparent;
  color: #ddd5c8;
}

.pulse-button {
  background: var(--yellow);
  color: #171109;
}

.pulse-actions-live button:disabled,
.pulse-links button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.42;
}

.pulse-actions-live button:not(:disabled):hover,
.pulse-links button:not(:disabled):hover,
.pulse-links a:hover {
  border-color: var(--yellow-bright);
  filter: brightness(1.08);
}

.pulse-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.pulse-links button,
.pulse-links a {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8f887d;
  font-size: 11px;
  text-decoration: none;
}

.pulse-links button {
  cursor: pointer;
}

.wallet-state {
  color: #817b70;
}

.pulse-result {
  display: none;
  padding: 9px 10px;
  border-left: 2px solid var(--yellow);
  background: rgba(244, 186, 48, 0.08);
  color: #e8dec9;
}

.pulse-result:not(:empty) {
  display: block;
}

.pulse-result.error {
  border-left-color: var(--red);
  background: rgba(236, 73, 61, 0.09);
  color: #ff9f95;
}

.pulse-result.success {
  border-left-color: #78d489;
  background: rgba(120, 212, 137, 0.08);
  color: #9ce5a8;
}

.pulse-result a {
  color: inherit;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.action,
.text-button {
  cursor: pointer;
}

.action {
  min-height: 66px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1c1915;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.action:hover {
  border-color: rgba(244, 186, 48, 0.48);
  transform: translateY(-2px);
}

.action:active {
  transform: translateY(0);
}

.action:focus-visible,
.text-button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.action span,
.action small {
  display: block;
}

.action span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.action small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.action-primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #171109;
}

.action-primary small {
  color: rgba(23, 17, 9, 0.65);
}

.text-button {
  grid-column: 1 / -1;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.disclaimer {
  margin: 15px 0 0;
  color: #666158;
  font-size: 10px;
  text-align: center;
}

@keyframes blink {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .chain-status {
    display: none;
  }

  .experience {
    height: auto;
    min-height: calc(100vh - 76px);
    grid-template-columns: 1fr;
  }

  .world-panel {
    min-height: 68vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .data-panel {
    overflow: visible;
  }
}

@media (max-width: 600px) {
  .topbar {
    height: 66px;
    padding: 0 14px;
  }

  .brand-orbit {
    width: 35px;
    height: 35px;
    font-size: 22px;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand small {
    display: none;
  }

  .tax-chip {
    gap: 7px;
    min-height: 35px;
    padding: 0 10px;
    font-size: 10px;
  }

  .experience {
    min-height: calc(100vh - 66px);
  }

  .world-panel {
    min-height: 66vh;
  }

  .world-copy {
    top: 28px;
    left: 18px;
    right: 18px;
    max-width: calc(100% - 36px);
  }

  .world-copy h1 {
    margin-top: 10px;
    font-size: clamp(40px, 15vw, 68px);
  }

  .world-copy > p:not(.kicker) {
    max-width: 78%;
    margin-top: 12px;
    font-size: 13px;
  }

  .contract-card {
    grid-template-columns: 1fr;
    margin-top: 15px;
    padding: 12px 12px 13px 14px;
  }

  .contract-heading,
  .contract-actions {
    grid-column: 1;
  }

  .contract-actions button,
  .contract-actions a {
    flex: 1;
  }

  .demo-stamp {
    top: auto;
    right: 17px;
    bottom: 84px;
    width: 82px;
    height: 82px;
  }

  .demo-stamp strong {
    font-size: 12px;
  }

  .feed-clock {
    right: 16px;
    bottom: 16px;
    min-width: 140px;
    padding: 9px 12px;
  }

  .feed-clock strong {
    font-size: 21px;
  }

  .world-hint {
    bottom: 18px;
    left: 17px;
    max-width: 42%;
    font-size: 11px;
  }

  .data-panel {
    padding: 20px 14px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
