:root {
  --paper: #ffffff;
  --ink: #000000;
  --green: #1b4332;
  --green-mid: #2d6a4f;
  --leaf: #40916c;
  --mint: #e9f5ee;
  --line: #d5e0d8;
  --muted: #000000;
  --soft: #f6faf7;
  --up: #1b7a43;
  --down: #b42318;
  --sans: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 24px 64px 40px;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.content {
  max-width: none;
}

.edge-mark {
  position: fixed;
  z-index: 2;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  background: var(--paper);
  pointer-events: none;
}

.edge-mark.tl { top: 14px; left: 14px; }
.edge-mark.tr { top: 14px; right: 14px; }
.edge-mark.bl { bottom: 14px; left: 14px; }
.edge-mark.br { bottom: 14px; right: 14px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 40px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(52px, 9vw, 88px);
  line-height: 0.88;
  color: var(--ink);
}

.motto {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.hero-lead {
  max-width: 38ch;
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
}

.serial-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.serial-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.serial-value,
.copyable {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.copyable:hover {
  text-decoration: underline;
}

.note {
  margin: 0;
}

.note img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(27, 67, 50, 0.08);
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--green);
}

.stat {
  padding: 22px 18px 20px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.stat:last-child {
  border-right: 0;
}

.stat.featured {
  background: var(--soft);
}

.stat-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat-change {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.stat-change.positive { color: var(--up); }
.stat-change.negative { color: var(--down); }

.lore {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 40px;
  padding: 72px 0 28px;
}

.lore h2,
.board h2 {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--ink);
}

.lore-body {
  min-height: 180px;
  padding: 28px 32px;
  border: 1px dashed var(--green-mid);
  background: linear-gradient(180deg, #fbfdfc 0%, #ffffff 100%);
}

.lore-body p + p {
  margin-top: 14px;
}

.lore-body p {
  color: var(--ink);
}

.board {
  padding: 48px 0 20px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.board-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.board-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5d0c8;
}

.dot.live {
  background: var(--leaf);
  box-shadow: 0 0 0 4px rgba(64, 145, 108, 0.16);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--green);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ledger th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
  background: var(--soft);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ledger td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.ledger tbody tr:last-child td {
  border-bottom: 0;
}

.ledger tbody tr:hover td {
  background: #f7fbf8;
}

.ledger td:nth-child(3),
.ledger td:nth-child(4),
.ledger td:nth-child(5),
.ledger th:nth-child(3),
.ledger th:nth-child(4),
.ledger th:nth-child(5) {
  text-align: right;
}

.rank {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}

.wallet:hover {
  color: var(--ink);
}

.badge {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

.share {
  min-width: 140px;
}

.share-bar {
  height: 4px;
  background: var(--mint);
  margin-top: 7px;
}

.share-fill {
  height: 100%;
  background: var(--green);
  width: 0;
}

.balance,
.value,
.share-pct {
  font-family: var(--mono);
  font-size: 13px;
}

.empty-row td {
  text-align: center !important;
  padding: 42px 16px;
  color: var(--muted);
}

.x-feed {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  overflow: auto;
  padding-left: 0;
  margin-right: 8px;
}

.x-feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.x-feed h2 {
  font-size: 22px;
  letter-spacing: -0.04em;
  text-transform: none;
}

.x-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: #000;
}

.x-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-card {
  background: #fff;
  border: 1px solid #cfd9de;
  border-radius: 16px;
  padding: 16px 16px 14px;
  font-family: var(--display);
}

.x-card-head {
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  gap: 10px;
  align-items: start;
}

.x-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eff3f4;
  color: #0f1419;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
}

.x-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-user {
  min-width: 0;
}

.x-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f1419;
}

.x-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  color: #536471;
}

.x-follow {
  color: #1d9bf0;
  text-decoration: none;
  font-weight: 500;
}

.x-follow:hover {
  text-decoration: underline;
}

.x-card-logo {
  width: 18px;
  height: 18px;
  fill: #0f1419;
}

.x-text {
  margin: 10px 0 0 50px;
  font-size: 17px;
  line-height: 1.4;
  color: #0f1419;
  white-space: pre-wrap;
}

.x-time {
  margin: 10px 0 0 50px;
  font-size: 14px;
  color: #536471;
}

.x-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 0 50px;
  font-size: 13px;
  color: #536471;
}

.x-actions a,
.x-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.x-actions .reply {
  color: #1d9bf0;
}

.x-actions svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.x-heart {
  color: #f91880;
}

.x-more {
  display: block;
  margin: 14px 0 0;
  text-align: center;
  border: 1px solid #cfd9de;
  border-radius: 999px;
  padding: 8px 12px;
  color: #1d9bf0;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.x-more:hover {
  background: #f7f9f9;
}

.x-empty {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  color: #536471;
  font-family: var(--display);
  font-size: 14px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--green);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .x-feed {
    position: relative;
    top: 0;
    height: auto;
    max-height: none;
    padding-left: 0;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat:nth-child(3),
  .stat:nth-child(6) {
    border-right: 0;
  }

  .stat:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .hero,
  .lore {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lore {
    padding-top: 48px;
  }
}

@media (max-width: 720px) {
  .page {
    width: 100%;
    padding: 20px 16px 48px;
  }

  .edge-mark {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
  }
}
