:root {
  color-scheme: light;
  --bg: #f6f1f7;
  --paper: #fffafd;
  --panel: #fffafd;
  --panel-2: #efe1f3;
  --line: rgba(47, 13, 55, 0.2);
  --line-strong: rgba(47, 13, 55, 0.42);
  --text: #171019;
  --muted: #735b7a;
  --soft: #3b2b41;
  --green: #8f38bd;
  --green-dim: rgba(143, 56, 189, 0.16);
  --red: #211023;
  --red-dim: rgba(33, 16, 35, 0.11);
  --cyan: #b65ad4;
  --ink: #fffafd;
  --purple: #7b229e;
  --purple-2: #b864d5;
  --grain: rgba(47, 13, 55, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16px 16px, rgba(47, 13, 55, 0.24) 1.5px, transparent 1.8px) 0 0 / 32px 32px,
    linear-gradient(90deg, transparent 0 72%, rgba(123, 34, 158, 0.09) 72% 74%, transparent 74%),
    radial-gradient(ellipse at 60% 15%, rgba(184, 100, 213, 0.22), transparent 34rem),
    linear-gradient(180deg, rgba(255, 250, 253, 0.88), rgba(246, 241, 247, 0.95)),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.58;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(47, 13, 55, 0.035) 7px 8px),
    radial-gradient(circle at 74% 18%, rgba(47, 13, 55, 0.1) 0 1px, transparent 1px 100%);
  mix-blend-mode: multiply;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid var(--line-strong);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  right: 18%;
  top: 68px;
  width: 330px;
  height: 168px;
  border: 26px solid rgba(123, 34, 158, 0.1);
  border-left-color: transparent;
  border-right-color: transparent;
  transform: skewX(-12deg);
}

.hero::after {
  left: -12px;
  bottom: 24px;
  width: 184px;
  height: 96px;
  background:
    radial-gradient(circle, rgba(47, 13, 55, 0.74) 0 3px, transparent 3.6px) 0 0 / 22px 22px;
  opacity: 0.38;
}

.topbar,
.results-head,
.wallet-strip,
.input-meta,
.actions,
.ticker-row {
  display: flex;
  align-items: center;
}

.topbar {
  position: sticky;
  z-index: 8;
  top: 12px;
  justify-content: space-between;
  min-height: 62px;
  border: 2px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 250, 253, 0.95);
  box-shadow: 0 10px 28px rgba(25, 14, 28, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--line-strong);
  background:
    radial-gradient(circle at 30% 35%, var(--purple) 0 6px, transparent 7px),
    radial-gradient(circle at 70% 35%, var(--purple-2) 0 6px, transparent 7px),
    radial-gradient(circle at 50% 72%, #2d0938 0 6px, transparent 7px),
    var(--paper);
}

.topbar-meta,
.creator-link,
.feature-link {
  display: inline-flex;
  align-items: center;
}

.topbar-meta {
  gap: 22px;
}

.creator-link {
  gap: 8px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.feature-link {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.feature-link:hover {
  background: var(--purple-soft);
}

.creator-link:hover {
  color: var(--purple);
}

.creator-link:focus-visible {
  outline: 3px solid var(--purple-2);
  outline-offset: 5px;
}

.x-logo {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.status-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line-strong);
  padding: 0 12px;
  color: var(--purple);
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(123, 34, 158, 0.16);
}

.hero-grid {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.72fr);
  gap: 48px;
  align-items: center;
  padding: 64px 0 72px;
}

.intro {
  position: relative;
}

.kicker {
  margin: 0 0 14px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 112px);
  line-height: 0.88;
  letter-spacing: 0;
  color: #120915;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(47, 13, 55, 0.16);
  text-shadow:
    4px 4px 0 #ead4f1,
    8px 8px 0 rgba(123, 34, 158, 0.16);
}

.lede {
  max-width: 670px;
  margin-bottom: 32px;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.55;
  font-weight: 680;
}

.analyze-form {
  max-width: 780px;
  position: relative;
}

.analyze-form::before {
  content: "";
  position: absolute;
  right: 44px;
  top: -22px;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(47, 13, 55, 0.28);
  background:
    radial-gradient(circle at 25% 25%, var(--purple) 0 14px, transparent 15px),
    radial-gradient(circle at 75% 25%, var(--paper) 0 14px, transparent 15px),
    radial-gradient(circle at 25% 75%, var(--purple-2) 0 14px, transparent 15px),
    radial-gradient(circle at 75% 75%, #2d0938 0 14px, transparent 15px);
  transform: rotate(5deg);
  z-index: -1;
}

.analyze-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.scan-mode {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
  border: 2px solid var(--text);
  background: var(--paper);
}

.scan-mode button {
  min-width: 104px;
  min-height: 38px;
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.scan-mode button.active {
  background: var(--text);
  color: var(--paper);
}

.multi-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  border: 3px solid var(--text);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgba(123, 34, 158, 0.2);
}

.multi-input-wrap textarea {
  min-height: 184px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 16px 18px;
  color: var(--text);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

.multi-input-wrap button {
  background: var(--purple-2);
  color: var(--ink);
  font-weight: 940;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  border: 3px solid var(--text);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgba(123, 34, 158, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input-row:focus-within {
  border-color: var(--purple);
  box-shadow: 8px 8px 0 rgba(123, 34, 158, 0.32);
  transform: translate(-2px, -2px);
}

input {
  min-width: 0;
  height: 64px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--text);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
}

input::placeholder {
  color: rgba(47, 13, 55, 0.45);
}

.input-row button,
.actions button {
  min-height: 48px;
  background: var(--purple-2);
  color: var(--ink);
  font-weight: 940;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: filter 160ms ease, transform 160ms ease;
}

.input-row button:hover,
.actions button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.input-meta {
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.scanner-memory {
  max-width: 780px;
  margin-top: 26px;
  border-top: 2px solid var(--line-strong);
  background: rgba(255, 250, 253, 0.56);
}

.scanner-memory > header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
}

.scanner-memory .kicker {
  margin-bottom: 3px;
  font-size: 8px;
}

.scanner-memory h2 {
  margin: 0;
  font-size: 19px;
  text-transform: uppercase;
}

.scanner-memory > header > div:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.scanner-memory > header button {
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--text);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.scanner-memory-list {
  border: 1px solid var(--line-strong);
}

.scanner-memory-list > button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 46px minmax(120px, 1fr) minmax(96px, auto) minmax(96px, auto);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  text-align: left;
}

.scanner-memory-list > button:last-child {
  border-bottom: 0;
}

.scanner-memory-list > button:hover {
  background: var(--purple-soft);
}

.scanner-chain {
  min-height: 29px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 900;
}

.scanner-wallet,
.scanner-pnl {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.scanner-wallet strong {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-wallet small,
.scanner-pnl small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.scanner-pnl {
  justify-items: end;
}

.scanner-pnl strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.ghost-button {
  padding: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 700;
}

.preview-panel {
  position: relative;
  min-height: 570px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 20% 22%, rgba(92, 70, 110, 0.22), transparent 34%),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.018) 4px 5px),
    #0e1015;
  padding: 20px;
  box-shadow: 12px 12px 0 rgba(47, 13, 55, 0.18);
  transform: rotate(0.35deg);
  overflow: hidden;
}

.preview-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.035) 0 1px, transparent 1.3px) 0 0 / 5px 5px;
  opacity: 0.5;
  pointer-events: none;
}

.preview-topline {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.id-pass-preview {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  top: 25%;
  min-height: 350px;
  display: grid;
  grid-template-columns: 34% 1fr;
  grid-template-rows: 1fr 54px;
  gap: 0 24px;
  padding: 30px 30px 18px;
  color: #121319;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(20, 20, 25, 0.018) 4px 5px),
    #eeece8;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
  transform: rotate(-1.2deg);
}

.id-photo {
  min-width: 0;
  border-right: 1px dashed rgba(18, 19, 25, 0.42);
  padding-right: 22px;
}

.demo-identicon {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(18, 19, 25, 0.2);
  background: #ded9e0;
}

.demo-identicon i {
  background: #15151b;
}

.demo-identicon i:nth-child(2),
.demo-identicon i:nth-child(4),
.demo-identicon i:nth-child(6),
.demo-identicon i:nth-child(8) {
  background: #9b4bb7;
}

.id-photo > span {
  display: block;
  margin-top: 10px;
  font: 800 9px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.id-preview-data {
  min-width: 0;
}

.id-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.id-preview-heading strong {
  font: 900 24px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.id-preview-heading span,
.id-preview-data dl {
  font: 760 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.id-preview-data dl {
  margin: 0 0 18px;
}

.id-preview-data dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 4px 0;
}

.id-preview-data dt,
.id-preview-data dd {
  margin: 0;
}

.id-preview-data dt {
  font-weight: 900;
}

.id-pnl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(18, 19, 25, 0.22);
  padding: 9px 0 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.id-pnl-row span {
  font-size: 9px;
  font-weight: 900;
}

.id-pnl-row strong {
  font-size: 22px;
}

.id-pnl-row.gain strong {
  color: #087c56;
}

.id-pnl-row.loss strong {
  color: #a02e43;
}

.id-preview-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px dashed rgba(18, 19, 25, 0.45);
  padding-top: 14px;
  font: 900 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.fake-barcode {
  width: 44%;
  height: 28px;
  background: repeating-linear-gradient(90deg, #121319 0 2px, transparent 2px 4px, #121319 4px 5px, transparent 5px 9px);
}

.preview-callout {
  position: absolute;
  z-index: 2;
  color: rgba(255, 255, 255, 0.72);
  font: 760 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.preview-callout::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, 0.45);
}

.preview-callout.left {
  left: 10%;
  top: 13%;
}

.preview-callout.left::after {
  left: 18px;
}

.preview-callout.right {
  right: 10%;
  top: 15%;
}

.preview-callout.right::after {
  right: 22px;
}

.loading-panel,
.error-panel {
  margin-top: 28px;
  border: 3px solid var(--line-strong);
  background: var(--panel);
  padding: 28px;
  box-shadow: 8px 8px 0 rgba(47, 13, 55, 0.12);
}

.loading-panel {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 24px;
  align-items: center;
}

.loading-panel > div:last-child {
  min-width: 0;
}

.scanline {
  width: 6px;
  height: 116px;
  background: linear-gradient(180deg, var(--purple), var(--purple-2), var(--text));
  animation: pulse 1.15s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.42;
    transform: scaleY(0.72);
  }
}

.loading-panel h2,
.error-panel h2,
.results h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

.loading-panel h2 {
  min-height: 1.15em;
}

.loading-panel p,
.error-panel p {
  color: var(--soft);
}

#loading-copy {
  min-height: 2.8em;
}

.loading-progress {
  position: relative;
  width: 100%;
  height: 16px;
  margin-top: 24px;
  overflow: hidden;
  border: 2px solid var(--text);
  background: rgba(47, 13, 55, 0.08);
}

.loading-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 38px,
    rgba(255, 255, 255, 0.7) 38px,
    rgba(255, 255, 255, 0.7) 41px
  );
  pointer-events: none;
}

.loading-progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-2), #087a56);
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.loading-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.loading-progress-meta strong {
  color: var(--text);
}

.results {
  position: relative;
  padding-top: 42px;
}

.results::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 18px;
  width: 170px;
  height: 70px;
  background:
    linear-gradient(90deg, transparent 0 14px, rgba(123, 34, 158, 0.34) 14px 20px, transparent 20px 34px) 0 0 / 34px 100%;
  opacity: 0.36;
  pointer-events: none;
}

.results-head {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 0;
}

.result-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px 4px 8px;
  overflow-x: auto;
}

.result-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 2px solid var(--line-strong);
  padding: 0 15px;
  background: var(--paper);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-tabs button.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--paper);
}

.actions {
  gap: 10px;
}

.actions button {
  min-width: 132px;
  padding: 0 18px;
  border: 2px solid var(--text);
  box-shadow: 5px 5px 0 rgba(47, 13, 55, 0.16);
}

.actions .secondary {
  border: 2px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}

.wallet-strip {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.wallet-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  padding: 0 12px;
  background: var(--paper);
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(47, 13, 55, 0.08);
}

.trade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.trade-card {
  position: relative;
  min-height: 430px;
  border: 2px solid rgba(17, 18, 24, 0.7);
  border-radius: 6px;
  padding: 24px 24px 70px;
  color: #111218;
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(17, 18, 24, 0.018) 4px 5px),
    #edeae5;
  box-shadow: 10px 10px 0 rgba(17, 18, 24, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.trade-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 12px 12px 0 rgba(47, 13, 55, 0.12);
}

.trade-card.best {
  border-top: 5px solid #087a56;
}

.trade-card.worst {
  border-top: 5px solid #a32c43;
}

.card-idline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
  color: rgba(17, 18, 24, 0.52);
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: rgba(17, 18, 24, 0.66);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trade-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid rgba(17, 18, 24, 0.22);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.trade-token {
  margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  text-shadow: none;
}

.trade-name {
  min-height: 0;
  margin-bottom: 0;
  color: rgba(17, 18, 24, 0.58);
  font-size: 13px;
  font-weight: 760;
}

.pnl-stack {
  text-align: right;
}

.pnl-number {
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: none;
}

.best .pnl-number,
.best .metric strong {
  color: #087a56;
}

.worst .pnl-number,
.worst .metric strong {
  color: #a32c43;
}

.pnl-percent {
  margin-bottom: 0;
  color: rgba(17, 18, 24, 0.58);
  font-size: 15px;
  font-weight: 800;
}

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

.metric {
  border-top: 1px solid rgba(17, 18, 24, 0.22);
  padding-top: 13px;
  min-height: 64px;
}

.metric span {
  display: block;
  color: rgba(17, 18, 24, 0.54);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: #111218;
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.card-code {
  position: absolute;
  left: 24px;
  bottom: 22px;
  width: 42%;
  height: 28px;
  background: repeating-linear-gradient(90deg, #111218 0 2px, transparent 2px 4px, #111218 4px 5px, transparent 5px 9px);
  opacity: 0.82;
}

.card-code::after {
  content: "PNLFLEX / LIVE RECORD";
  position: absolute;
  left: calc(100% + 18px);
  bottom: 0;
  width: 190px;
  color: rgba(17, 18, 24, 0.66);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.share-stage {
  width: 100%;
  margin-top: 18px;
}

.canvas-wrap {
  width: 100%;
  border: 3px solid #161820;
  padding: 8px;
  background: #0b0d12;
  box-shadow: 10px 10px 0 rgba(47, 13, 55, 0.14);
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: auto;
  background: var(--paper);
}

.card-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.card-actions button {
  min-width: 168px;
  min-height: 52px;
}

.trade-stories {
  margin-top: 42px;
  padding-top: 34px;
  border-top: 3px solid var(--line-strong);
}

.trade-stories-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.trade-stories-head h3 {
  margin: 6px 0 0;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 0.95;
  text-transform: uppercase;
}

.trade-stories-head > p {
  max-width: 440px;
  margin: 0;
  color: var(--soft);
  font-weight: 750;
  text-align: right;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.story-item {
  min-width: 0;
}

.story-canvas-wrap {
  position: relative;
  border: 3px solid var(--text);
  border-radius: 4px;
  padding: 10px;
  background: var(--paper);
  box-shadow: 9px 9px 0 rgba(123, 34, 158, 0.2);
  overflow: hidden;
}

.story-item canvas {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  background: var(--paper);
}

.story-loading {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 2px solid var(--line-strong);
  background: rgba(255, 250, 253, 0.94);
  color: var(--text);
  font: 900 14px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  text-transform: uppercase;
}

.story-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.story-actions button {
  min-width: 0;
  min-height: 52px;
  padding: 0 12px;
  border: 2px solid var(--text);
  background: var(--purple-2);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(47, 13, 55, 0.16);
  font-size: 12px;
  font-weight: 940;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.story-actions button:hover {
  filter: brightness(1.04);
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 rgba(47, 13, 55, 0.18);
}

.story-actions button:focus-visible {
  outline: 3px solid var(--purple-2);
  outline-offset: 3px;
}

.story-actions .secondary {
  border-color: var(--text);
  background: var(--panel-2);
  color: var(--text);
}

.story-note {
  margin: 18px 0 0;
  border-left: 5px solid var(--accent);
  padding: 10px 14px;
  color: var(--soft);
  font-weight: 750;
}

.x-profile-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-right: auto;
}

.card-actions .x-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: #111218;
  background: #111218;
  color: #f6f1f7;
}

.card-actions .x-profile-button.connected {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--text);
}

.card-actions .x-profile-button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.42;
  transform: none;
}

.x-profile-mark {
  font-size: 18px;
  line-height: 1;
}

.x-profile-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  object-fit: cover;
}

.card-actions .x-profile-remove {
  min-width: 52px;
  width: 52px;
  padding: 0;
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.tip-builder {
  position: relative;
  margin-top: 26px;
  overflow: hidden;
  border: 3px solid #111218;
  padding: 22px;
  background: #111218;
  box-shadow: 8px 8px 0 rgba(123, 34, 158, 0.22);
}

.tip-builder::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--purple), var(--purple-2), #087a56, #b32f49);
}

.tip-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tip-builder-head .kicker {
  margin: 0;
  color: #d66be7;
  font-size: 13px;
}

.tip-builder-copy {
  max-width: 620px;
  margin: 7px 0 0;
  color: rgba(246, 241, 247, 0.68);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.tip-copy-status {
  color: #68e0b9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tip-addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tip-address-row {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  padding-left: 13px;
  border: 2px solid #d7c9da;
  background: #faf6f9;
  transition: border-color 160ms ease, transform 160ms ease;
}

.tip-address-row:hover {
  border-color: #d66be7;
  transform: translateY(-2px);
}

.tip-chain {
  color: var(--purple);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.tip-address-value {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 7px 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tip-address-value code {
  display: block;
  overflow: hidden;
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tip-address-value:hover,
.tip-address-value:focus-visible,
.tip-address-value[data-copied="true"] {
  color: var(--purple);
}

.tip-address-value:focus-visible {
  outline: 2px solid rgba(123, 34, 158, 0.34);
  outline-offset: 2px;
}

.copy-address {
  width: 42px;
  height: 44px;
  display: grid;
  place-items: center;
  align-self: stretch;
  border-left: 2px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}

.copy-address:hover,
.copy-address:focus-visible {
  color: var(--purple);
  background: #fffafd;
}

.copy-address:focus-visible {
  outline: 3px solid rgba(123, 34, 158, 0.28);
  outline-offset: -4px;
}

.copy-address-icon {
  position: relative;
  width: 17px;
  height: 17px;
}

.copy-address-icon::before,
.copy-address-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  background: var(--panel-2);
}

.copy-address-icon::before {
  left: 4px;
  top: 1px;
}

.copy-address-icon::after {
  left: 0;
  top: 5px;
}

.copy-address[data-copied="true"] {
  color: #087a56;
}

.copy-address[data-copied="true"] .copy-address-icon::before {
  left: 5px;
  top: 0;
  width: 7px;
  height: 13px;
  border: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
  transform: rotate(45deg);
}

.copy-address[data-copied="true"] .copy-address-icon::after {
  display: none;
}

.privacy-control {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 0;
  padding: 0 14px;
  border: 2px solid var(--line-strong);
  color: var(--text);
  background: var(--paper);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.privacy-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.privacy-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--text);
  background: var(--panel-2);
  transition: background 160ms ease;
}

.privacy-switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  background: var(--text);
  transition: transform 160ms ease, background 160ms ease;
}

.privacy-control input:checked + .privacy-switch {
  background: var(--purple-2);
}

.privacy-control input:checked + .privacy-switch::after {
  transform: translateX(16px);
  background: var(--paper);
}

.privacy-control input:focus-visible + .privacy-switch {
  outline: 3px solid rgba(123, 34, 158, 0.28);
  outline-offset: 3px;
}

.method {
  border: 3px solid var(--line-strong);
  background: var(--panel);
  padding: 18px;
  box-shadow: 8px 8px 0 rgba(47, 13, 55, 0.1);
}

.method h3 {
  margin-bottom: 10px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.method p,
.method li {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}

.method ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .hero {
    min-height: auto;
  }

  .hero::before,
  .hero::after,
  .analyze-form::before,
  .results::before {
    display: none;
  }

  .topbar {
    top: 6px;
    min-height: auto;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-grid,
  .trade-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 26px;
    padding: 38px 0 44px;
  }

  h1 {
    font-size: clamp(42px, 17vw, 72px);
    text-shadow:
      3px 3px 0 #ead4f1,
      6px 6px 0 rgba(123, 34, 158, 0.14);
  }

  .preview-panel {
    order: -1;
    min-height: 530px;
    transform: none;
  }

  .input-row {
    grid-template-columns: 1fr;
    box-shadow: 6px 6px 0 rgba(123, 34, 158, 0.2);
  }

  .multi-input-wrap {
    grid-template-columns: 1fr;
    box-shadow: 6px 6px 0 rgba(123, 34, 158, 0.2);
  }

  .multi-input-wrap button {
    min-height: 54px;
  }

  .input-row button {
    height: 54px;
  }

  .input-meta,
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-actions {
    justify-content: stretch;
  }

  .privacy-control {
    width: 100%;
    margin-right: 0;
  }

  .x-profile-actions {
    width: 100%;
    margin-right: 0;
  }

  .x-profile-actions .x-profile-button {
    flex: 1 1 auto;
  }

  .actions .x-profile-remove {
    flex: 0 0 52px;
    min-width: 52px;
  }

  .tip-addresses {
    grid-template-columns: 1fr;
  }

  .trade-stories-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .trade-stories-head > p {
    text-align: left;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .actions button {
    flex: 1;
    min-width: min(100%, 150px);
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .trade-primary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pnl-stack {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .topbar {
    top: 0;
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .creator-link span {
    display: none;
  }

  .status-pill {
    width: auto;
    justify-content: center;
  }

  .input-row input {
    height: 58px;
    font-size: 14px;
  }

  .preview-panel {
    min-height: 470px;
    padding: 14px;
  }

  .id-pass-preview {
    left: 4%;
    right: 4%;
    top: 24%;
    min-height: 300px;
    grid-template-columns: 31% 1fr;
    grid-template-rows: 1fr 42px;
    gap: 0 13px;
    padding: 18px 16px 12px;
    border-radius: 16px;
  }

  .id-photo {
    padding-right: 12px;
  }

  .demo-identicon {
    gap: 3px;
    padding: 8px;
  }

  .id-preview-heading {
    margin-bottom: 12px;
  }

  .id-preview-heading strong {
    font-size: 17px;
  }

  .id-preview-heading span,
  .id-preview-data dl,
  .id-pnl-row span {
    font-size: 7px;
  }

  .id-preview-data dl div {
    grid-template-columns: 45px 1fr;
  }

  .id-pnl-row strong {
    font-size: 15px;
  }

  .id-preview-footer {
    font-size: 8px;
  }

  .preview-callout.right {
    display: none;
  }

  .trade-card {
    padding-inline: 18px;
  }

  .story-actions {
    grid-template-columns: 1fr;
  }

  .card-code {
    left: 18px;
    width: 34%;
  }

  .scanner-memory > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .scanner-memory-list > button {
    grid-template-columns: 42px minmax(0, 1fr) minmax(82px, auto);
  }

  .scanner-memory-list .scanner-pnl.negative {
    display: none;
  }

}
