:root {
  --bg: #070a11;
  --bg-soft: #111728;
  --bg-soft-alt: #171f33;
  --text: #edf4ff;
  --muted: #adc0dd;
  --edge: #2d3b56;
  --brand: #53f0c1;
  --brand-strong: #25c7a0;
  --warn: #ffd68a;
  --danger: #ff9d9d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, #17314a 0%, transparent 40%),
    radial-gradient(circle at 90% 0%, #2a2142 0%, transparent 38%),
    var(--bg);
  font-family:
    "Space Grotesk",
    "Avenir Next",
    "Segoe UI",
    "Helvetica Neue",
    sans-serif;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--edge);
  background: rgba(7, 10, 17, 0.86);
  backdrop-filter: blur(8px);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
}

.topnav a:hover {
  color: var(--text);
}

.page {
  padding: 2rem 0 2.4rem;
}

.wallet-shell {
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: rgba(14, 20, 34, 0.9);
  padding: 1rem;
}

.shell-head {
  margin-bottom: 0.95rem;
}

.eyebrow {
  margin: 0 0 0.72rem;
  color: var(--brand);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.1;
}

h2 {
  margin: 0 0 0.42rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

p {
  margin: 0;
}

.lead {
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.55;
}

.caption {
  margin-top: 0.5rem;
  color: var(--muted);
  line-height: 1.45;
}

.shell-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.shell-grid-main {
  grid-template-columns: 1.15fr 0.85fr;
}

.shell-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: var(--bg-soft);
  padding: 0.95rem;
}

.metric-list {
  display: grid;
  gap: 0.58rem;
  margin-top: 0.72rem;
}

.metric-item {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--bg-soft-alt);
  padding: 0.68rem;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.26rem;
}

.metric-item strong {
  font-size: 1.03rem;
}

.wallet-stack {
  display: grid;
  gap: 0.55rem;
  margin: 0.78rem 0;
}

.wallet-card {
  padding: 0.72rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--bg-soft-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 200ms ease, opacity 200ms ease, border-color 200ms ease;
}

.wallet-card .label {
  color: var(--muted);
  font-size: 0.86rem;
}

.wallet-card .value {
  font-weight: 700;
}

.wallet-card.is-selected {
  border-color: rgba(83, 240, 193, 0.85);
  box-shadow: 0 0 0 1px rgba(83, 240, 193, 0.25);
}

.wallet-card.is-used {
  opacity: 0.56;
}

.flow-list {
  margin: 0.72rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.flow-list li {
  color: var(--muted);
  transition: color 200ms ease;
}

.flow-list li.is-active {
  color: #b6ffe8;
}

.flow-list li.is-done {
  color: #8ee7cd;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  padding: 0.64rem 1rem;
  font-weight: 650;
  cursor: pointer;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.btn-primary {
  background: linear-gradient(130deg, var(--brand), var(--brand-strong));
  color: #06150f;
}

.btn-secondary {
  border-color: var(--edge);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.list-clean {
  margin: 0.72rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.proof-drawer summary {
  cursor: pointer;
  font-weight: 700;
}

.proof-drawer[open] summary {
  margin-bottom: 0.6rem;
}

.demo-controls {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.62rem;
  flex-wrap: wrap;
}

.file-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--edge);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.62rem 0.85rem;
  cursor: pointer;
}

.file-input input {
  display: none;
}

.advanced-box {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(45, 59, 86, 0.65);
  padding-top: 0.75rem;
}

.advanced-box summary {
  cursor: pointer;
  font-weight: 650;
}

label {
  display: block;
  margin-top: 0.8rem;
  margin-bottom: 0.36rem;
  font-size: 0.9rem;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: #0b111f;
  color: var(--text);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
  padding: 0.7rem;
}

.status {
  display: inline-block;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
  margin-top: 0.55rem;
  margin-bottom: 0.5rem;
}

.status-pass {
  color: #93f5d8;
  border-color: rgba(83, 240, 193, 0.55);
  background: rgba(83, 240, 193, 0.12);
}

.status-warn {
  color: var(--warn);
  border-color: rgba(255, 214, 138, 0.5);
  background: rgba(255, 214, 138, 0.1);
}

.status-fail {
  color: var(--danger);
  border-color: rgba(255, 157, 157, 0.5);
  background: rgba(255, 157, 157, 0.08);
}

.status-neutral {
  color: var(--muted);
}

.result-list {
  margin: 0;
  padding-left: 1.1rem;
}

.result-list li {
  margin-bottom: 0.38rem;
}

.check-pass {
  color: #9ef7dc;
}

.check-warn {
  color: var(--warn);
}

.check-fail {
  color: var(--danger);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  margin-top: 0.7rem;
}

.link-card {
  display: grid;
  gap: 0.28rem;
  text-decoration: none;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--bg-soft-alt);
  padding: 0.72rem;
}

.link-card strong {
  color: var(--brand);
}

.link-card span {
  color: var(--muted);
  line-height: 1.4;
}

.footer {
  border-top: 1px solid var(--edge);
  color: var(--muted);
  padding: 0.95rem 0 1.55rem;
}

@media (max-width: 980px) {
  .shell-grid-main,
  .shell-grid-secondary,
  .link-grid {
    grid-template-columns: 1fr;
  }
}
