/* ---------- Scanner app ---------- */
body.app { min-height: 100vh; }
.shell { position: relative; z-index: 2; padding: 92px var(--col) 80px; }

.scan-head { margin-bottom: 34px; }
.scan-head .over { font-size: 11px; margin-bottom: 14px; color: var(--dim); }
.bigscan { position: relative; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 10px 0 18px; border: 1px solid var(--ink); background: rgba(244,248,252,.85); }
.bigscan .mag { width: 18px; height: 18px; flex: none; }
.bigscan input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 14px var(--mono); letter-spacing: .02em; }
.bigscan .btn { height: 40px; padding: 0 20px; }
.hint { margin-top: 10px; font-size: 10.5px; color: var(--dim); }

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

/* Empty state */
.empty { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 440px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(244,248,252,.7), rgba(233,241,250,.2)); }
.empty canvas { width: 100%; height: 440px; display: block; }
.empty-copy { padding: 0 40px 0 10px; }
.empty-copy h2 { font-weight: 400; font-size: clamp(26px, 2.6vw, 42px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 16px; }
.grad { background: var(--grad-lin); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty-copy p { font-size: 15px; line-height: 1.5; color: rgba(11,26,44,.72); max-width: 34ch; }

.gate { display: grid; justify-items: start; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.gate[hidden] { display: none; }
.gate .mono { font-size: 10.5px; color: var(--dim); }
.gate .btn { height: 42px; padding: 0 22px; }
.gate small { font-size: 12px; color: var(--dim); }
.shell { padding-bottom: 110px; }

/* Loading */
.loading { border: 1px solid var(--line); background: rgba(244,248,252,.7); padding: 36px; }
.loading .bar { height: 2px; background: var(--line); overflow: hidden; margin: 18px 0 26px; }
.loading .bar i { display: block; height: 100%; width: 30%; background: var(--grad-lin); animation: slide 1.4s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.steps { list-style: none; display: grid; gap: 10px; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.steps li { display: flex; gap: 12px; align-items: center; color: var(--faint); transition: color .3s; }
.steps li::before { content: ''; width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ink); }
.steps li.now { color: var(--ink); }
.steps li.now::before { border-color: var(--blue); background: radial-gradient(var(--blue) 40%, transparent 45%); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.error-box { border: 1px solid var(--red); background: rgba(255,77,109,.06); padding: 22px 24px; font-size: 15px; }
.error-box .mono { font-size: 11px; color: var(--red); margin-bottom: 6px; }

/* Report */
.report { display: grid; gap: 18px; }
.panel-c { position: relative; border: 1px solid var(--line); background: rgba(244,248,252,.78); padding: 22px 24px; }
.panel-c > .h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-c > .h .mono { font-size: 11px; }
.panel-c > .h .note { font: 400 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }

.token-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.token-head img, .token-head .ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--paper); flex: none; }
.token-head .ph { display: grid; place-items: center; font: 500 14px var(--mono); }
.token-head .nm { font-size: 24px; letter-spacing: -.01em; }
.token-head .nm small { font: 400 12px var(--mono); color: var(--dim); margin-left: 8px; }
.token-head .addr { font: 400 11.5px var(--mono); color: var(--dim); display: flex; gap: 10px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.token-head .addr button, .token-head .addr a { text-decoration: underline; text-underline-offset: 2px; }
.token-head .acts { margin-left: auto; display: flex; gap: 8px; }
.btn.on-watch { background: var(--ink); color: var(--bg); }

.verdict { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.gauge { position: relative; width: 220px; height: 130px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .num { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.gauge .num b { display: block; font-size: 46px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.gauge .num span { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.level-Low { color: #10a37f; } .level-Moderate { color: #c98400; } .level-High { color: #e8590c; } .level-Severe { color: #e03150; }
.verdict .summary { font-size: 17px; line-height: 1.45; }
.verdict .summary .sm { display: block; margin-top: 10px; font: 400 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(244,248,252,.78); }
.tile .k { font: 400 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.tile .v { font-size: 26px; letter-spacing: -.02em; margin-top: 6px; }
.tile .s { font: 400 10.5px var(--mono); color: var(--dim); margin-top: 2px; }
.tile.hot .v { color: #e03150; }
.tile.warm .v { color: #e8590c; }

.flags { list-style: none; display: grid; gap: 0; }
.flags li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.flags li:first-child { border-top: 0; padding-top: 0; }
.flags .d { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; }
.flags .high .d { background: #e03150; box-shadow: 0 0 0 4px rgba(224,49,80,.12); }
.flags .medium .d { background: #f08c00; box-shadow: 0 0 0 4px rgba(240,140,0,.12); }
.flags .low .d { background: var(--sky); }
.flags .info .d { background: var(--faint); }
.flags b { font-weight: 500; font-size: 15.5px; }
.flags p { font-size: 13.5px; color: rgba(11,26,44,.66); margin-top: 3px; line-height: 1.45; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; height: 170px; }
.timeline .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 6px; }
.timeline .bar2 { background: var(--grad-lin); min-height: 2px; transition: height .8s var(--ease); }
.timeline .col.zero .bar2 { background: linear-gradient(180deg, #ff5c8a, #c48cff); }
.timeline .lbl { font: 400 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; }
.timeline .pc { font-size: 15px; }

.clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cluster { border: 1px solid var(--hair); padding: 14px 16px; background: var(--paper); }
.cluster .t { display: flex; justify-content: space-between; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.cluster .f { font: 400 11.5px var(--mono); margin: 8px 0 10px; color: var(--dim); }
.cluster .f a { color: var(--ink); text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 400 10.5px var(--mono); padding: 3px 7px; border: 1px solid var(--line); background: #fff; border-radius: 20px; }
.chip:hover { border-color: var(--ink); }

.tbl-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font: 400 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); padding: 0 10px 8px 0; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl a.addr { font-family: var(--mono); font-size: 12px; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.tag { display: inline-block; font: 500 9.5px var(--mono); letter-spacing: .06em; padding: 2px 6px; margin-right: 4px; border-radius: 3px; background: var(--line); }
.tag.creator { background: #ffe1e8; color: #c2183f; }
.tag.fresh { background: #fff1d6; color: #9a5b00; }
.tag.cl { background: #e6e0ff; color: #5a3fd1; }
.tag.pool { background: #dff0ff; color: #1f6fb8; }
.tag.early { background: #ffe7d6; color: #b2470d; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
.stats div { font: 400 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.stats b { display: block; font: 400 22px var(--sans); color: var(--ink); letter-spacing: -.01em; margin-top: 4px; text-transform: none; }
.foot-note { font: 400 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; line-height: 1.6; }

/* Side */
.side { display: grid; gap: 14px; position: sticky; top: 72px; }
.card { border: 1px solid var(--line); background: rgba(244,248,252,.8); padding: 16px 18px; }
.card-h { font-size: 10.5px; color: var(--dim); margin-bottom: 10px; }
.card .who { font-size: 15px; margin-bottom: 4px; word-break: break-all; }
.card p { font-size: 13px; color: rgba(11,26,44,.66); line-height: 1.45; margin-bottom: 12px; }
.list { display: grid; }
.list .row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.list .row:first-child { border-top: 0; }
.list .row button.go2 { flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .row .sc { font: 500 10.5px var(--mono); }
.list .row .rm { opacity: .4; font-size: 15px; }
.list .row .rm:hover { opacity: 1; }
.list .empty-l { font-size: 12.5px; color: var(--dim); }

/* Account chip in nav */
.acct { display: flex; align-items: center; gap: 8px; font: 400 11px var(--mono); letter-spacing: .04em; }
.acct .av { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(11,26,44,.35); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: min(420px, 100%); background: var(--paper); border: 1px solid var(--ink); padding: 28px; animation: pop .35s cubic-bezier(.2,.7,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.modal-x { position: absolute; top: 10px; right: 14px; font-size: 20px; opacity: .6; }
.modal-x:hover { opacity: 1; }
.modal h3 { font-weight: 500; font-size: 22px; letter-spacing: -.01em; }
.modal-sub { font-size: 13.5px; color: var(--dim); margin: 4px 0 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hair); margin-bottom: 18px; }
.seg button { height: 34px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.seg button.on { background: var(--ink); color: var(--bg); }
.wallets { display: grid; gap: 8px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border: 1px solid var(--hair); background: #fff; font-size: 14.5px; transition: border-color .2s; }
.wallet-btn:hover { border-color: var(--ink); }
.wallet-btn .wi { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 600 12px var(--sans); color: #fff; }
.wallet-btn .st { margin-left: auto; font: 400 10px var(--mono); text-transform: uppercase; color: var(--dim); }
.fine { font-size: 12px; color: var(--dim); line-height: 1.5; margin-top: 12px; }
.fld { display: grid; gap: 6px; margin-bottom: 12px; }
.fld span { font-size: 10.5px; color: var(--dim); }
.fld input { height: 42px; padding: 0 12px; border: 1px solid var(--hair); background: #fff; outline: 0; font-size: 14.5px; }
.fld input:focus { border-color: var(--ink); }
.btn.wide { width: 100%; justify-content: center; height: 42px; }
.switch { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12.5px; }
.switch button { text-decoration: underline; text-underline-offset: 2px; color: var(--dim); }
.switch button:hover { color: var(--ink); }
.msg { margin-top: 14px; font-size: 13px; min-height: 1em; }
.msg.err { color: #e03150; }
.msg.ok { color: #10a37f; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { padding: 76px 16px 170px; }
  .empty { grid-template-columns: 1fr; }
  .empty canvas { height: 320px; }
  .empty-copy { padding: 0 20px 28px; }
  .verdict { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .token-head .acts { margin-left: 0; }
  .bigscan .btn { padding: 0 14px; }
  .acct .addr-t { display: none; }
}
