/* index.html (home) — settlement graph, receipts, treasury dashboard, FX table */

.mk-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(4.5rem, 10vw, 7.5rem);
}
.mk-hero .hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}
.mk-hero .wrap {
  position: relative;
  z-index: 1;
}

.settle-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.settle-panel {
  padding: 18px;
}
.settle-canvas-box {
  position: relative;
  height: 440px;
}
#settle-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}
.settle-panel .caption {
  margin-top: 0.8rem;
}

.node-tip {
  position: absolute;
  z-index: 2;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  color: var(--ink);
  background: rgba(var(--deep-rgb), 0.9);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
}

.receipts-panel {
  padding: 20px;
  overflow: hidden;
}
.receipts-title {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--faint);
  margin-bottom: 0.9rem;
}
.receipts {
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.5;
}
.rc {
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.js .rc:first-child {
  animation: rcIn 380ms var(--ease-reveal);
}
@keyframes rcIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
.rc.held {
  color: var(--warn);
}

/* ---------- treasury ---------- */

.tr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.tr-total {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 0.3rem;
}

.tr-seg {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px;
  background: rgba(var(--deep-rgb), 0.5);
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms var(--ease-micro), color 160ms var(--ease-micro);
}
.seg-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.tr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 1.4rem;
}
.hold {
  padding: 16px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--deep-rgb), 0.4);
  transition: border-color 160ms var(--ease-micro);
}
.hold:hover {
  border-color: var(--line-2);
}
.hold header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.hold-name {
  font-size: 0.9rem;
  color: var(--muted);
}
.hold-bal {
  font-size: 1.25rem;
  font-weight: 650;
  margin-top: 0.55rem;
}
.hold-conv {
  margin-top: 0.15rem;
}
.hold-spark {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 0.6rem;
  background: linear-gradient(to top, rgba(var(--mist-rgb), 0.04), transparent);
  border-radius: 6px;
}
.tr-caption {
  margin-top: 1.3rem;
}

/* ---------- FX table ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(var(--glass-rgb), 0.4);
}
.fx-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.fx-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line-2);
}
.fx-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.fx-table td:first-child {
  color: var(--ink);
}
.fx-table tr:last-child td {
  border-bottom: 0;
}
.fx-refused td {
  color: var(--faint);
}
.fx-refused td:first-child {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .settle-wrap {
    grid-template-columns: 1fr;
  }
  .settle-canvas-box {
    height: 380px;
  }
}

@media (max-width: 820px) {
  .tr-grid {
    grid-template-columns: 1fr;
  }
  .settle-canvas-box {
    height: 300px;
  }
}

/* audience strip */
.aud {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.aud li {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(var(--glass-rgb), 0.4);
}
.aud-more {
  margin-top: 1.5rem;
}
