@font-face {
  font-family: "Archivo";
  src: url("/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #141816;
  --panel: #1b201e;
  --panel-2: #222826;
  --line: #2c3330;
  --text: #f3f1ea;
  --muted: #949a90;
  --mint: #6ee0b0;
  --mint-deep: #29ac7f;
  --warn: #e9b949;
  --bad: #ef7d5e;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 400 16px/1.45 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
#app { max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
a { color: var(--mint); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.top .shield { width: 34px; height: 34px; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; line-height: 1; }
.by { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 3px; }
h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 6px 0 12px; font-weight: 800; }
h2 { font-size: 22px; line-height: 1.15; margin: 0 0 4px; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 0 0 6px; font-weight: 700; }
.lede { color: #d4d6cf; margin: 0 0 20px; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hero { padding: 6px 0 4px; }
.hero.share { text-align: center; padding-top: 20px; }
.hero.share .ring { margin: 0 auto 16px; }

.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.primary { background: var(--mint); color: #0d1411; width: 100%; font-size: 17px; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.link { background: none; color: var(--muted); padding: 10px 6px; font-weight: 600; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: #3a2520; color: #ffb7a3; border: 1px solid #5a3229; }

.how { display: grid; gap: 8px; margin: 22px 0 18px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.step b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--mint-deep); color: var(--text); font-size: 13px; display: grid; place-items: center; }
details.other summary { color: var(--muted); cursor: pointer; padding: 6px 0; }
.lookup { display: flex; gap: 8px; margin-top: 8px; }
.lookup input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; outline: none;
}
.lookup input:focus { border-color: var(--mint-deep); }

.notice { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.notice.error { border-color: #5a3229; color: #ffc9b9; }

.summary { display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.ring {
  --p: 0; --c: var(--mint); flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-2) 0);
}
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.ring span { position: relative; font-weight: 800; font-size: 26px; line-height: 1; }
.ring small { position: absolute; bottom: 14px; font-size: 10px; color: var(--muted); }
.ring.big { width: 104px; height: 104px; }
.ring.big::before { inset: 9px; }
.ring.big span { font-size: 36px; margin-top: -6px; }
.ring.big small { bottom: 20px; font-size: 12px; }
.ring.warn { --c: var(--warn); }
.ring.bad { --c: var(--bad); }
.ring.none { --c: var(--panel-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); }
.chip.ok { color: var(--mint); }
.chip.care { color: var(--warn); }
.chip.risk { color: var(--bad); }
.progress { height: 4px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.progress i { display: block; height: 100%; background: var(--mint); transition: width .3s ease; }
.actions { display: flex; gap: 10px; margin: 6px 0 16px; }
.actions .btn.primary { flex: 1; width: auto; }

.tokens { display: grid; gap: 8px; }
.token { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.token.risk { border-color: #4d2c25; }
.token.care { border-color: #4a4025; }
.token.pending { opacity: .75; }
.token summary { list-style: none; cursor: pointer; }
.token summary::-webkit-details-marker { display: none; }
.row { display: flex; align-items: center; gap: 12px; }
.logo { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; background: var(--panel-2); }
.logo.letter { display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.who { flex: 1; min-width: 0; }
.sym { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { flex: none; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: var(--panel-2); }
.pill.ok { color: #0d1411; background: var(--mint); }
.pill.care { color: #241b05; background: var(--warn); }
.pill.risk { color: #2a0f08; background: var(--bad); }
.pill.wait { color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.pill.none { color: var(--muted); }
@keyframes pulse { 50% { opacity: .45; } }
.headline { margin: 8px 0 0 48px; font-weight: 600; font-size: 14.5px; color: #e4e2da; }
.token[open] .headline { margin-bottom: 4px; }
.reasons { margin: 8px 0 6px; padding: 0 0 0 48px; list-style: none; display: grid; gap: 5px; font-size: 14px; }
.reasons li { position: relative; padding-left: 16px; color: #d6d6cf; }
.reasons li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.reasons li.good::before { background: var(--mint); }
.reasons li.warn::before { background: var(--warn); }
.reasons li.bad::before { background: var(--bad); }
.token > .small { margin: 4px 0 0 48px; }

.approvals { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.approval { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 8px; }
.approval.high { border-color: #5a3229; }
.approval.medium { border-color: #4a4025; }
.approval .reasons { padding-left: 0; }
details.more summary { color: var(--muted); cursor: pointer; margin-top: 12px; }

.notice.ref { border-color: var(--mint-deep); color: var(--text); font-weight: 600; }
.recent { display: grid; gap: 6px; margin: 18px 0 4px; }
.recent-row {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; text-align: left;
}
.recent-row:active { transform: scale(.99); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; }
.card .btn.primary { margin-top: 4px; }
.card.alerts { border-color: var(--mint-deep); }
.card.alerts.on { border-color: var(--line); }
.card p { margin: 0 0 10px; }
.changes { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; }
.changes p { margin: 0; }
.reasons.flush { padding-left: 0; margin: 4px 0 0; }

.skeleton { height: 64px; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; margin-bottom: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.foot { color: var(--muted); font-size: 12.5px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.foot .signoff { display: block; width: max-content; margin-top: 12px; }
.foot .signoff img { display: block; height: 14px; width: auto; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
