:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --surface: #fff;
  --text: #121212;
  --muted: #6b6b6b;
  --line: #dedede;
  --accent: #4459ff;
  --bad: #d92d20;
  --good: #16803c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 32px; background: rgba(247,247,247,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.topbar button { padding: 9px 14px; color: white; background: #171717; border: 0; border-radius: 8px; cursor: pointer; }
main { max-width: 1500px; margin: 0 auto; padding: 28px 32px 64px; }
.tabs { display: flex; gap: 24px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 14px 0 13px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.tab.is-active { color: var(--text); }
.tab.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--text); content: ""; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.summary div { padding: 18px 20px; border-right: 1px solid var(--line); }
.summary div:last-child { border: 0; }
.summary strong { display: block; font-size: 24px; letter-spacing: -.03em; }
.summary span { color: var(--muted); font-size: 12px; }
.controls { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, auto); gap: 10px; margin: 22px 0 12px; }
input, select { min-height: 42px; padding: 0 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(68,89,255,.12); }
.result-line { display: flex; justify-content: space-between; min-height: 24px; color: var(--muted); font-size: 13px; }
.tab-note { margin: -2px 0 14px; color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.grid.comparison-grid { grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)); }
.asset-card { display: flex; gap: 14px; min-width: 0; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.comparison-card { align-items: center; }
.comparison-pair { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 8px; }
.comparison-side { display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.comparison-arrow { align-self: center; margin-top: 14px; color: var(--muted); font-size: 16px; }
.asset-card[data-status="broken"] { border-color: rgba(217,45,32,.5); background: #fffafa; }
.icon-wrap { position: relative; flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; background: #f2f2f2; border: 1px solid transparent; border-radius: 50%; }
.icon-wrap.light-background { border-color: transparent; box-shadow: inset 0 0 0 1px #b4b4b566; }
.icon-wrap.dark-background { border-color: transparent; box-shadow: inset 0 0 0 1px #ffffff14; }
.asset-icon { width: 64px; height: 64px; object-fit: contain; }
.recreated-icon { width: 64px; height: 64px; cursor: pointer; }
.fallback { font-size: 18px; font-weight: 650; color: #555; }
.asset-content { min-width: 0; flex: 1; }
.asset-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.symbol { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.network-tag { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.name { overflow: hidden; margin: 4px 0 8px; color: #343434; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: 11px; }
.address { display: block; max-width: 100%; margin: 7px 0 0; padding: 0; overflow: hidden; color: var(--muted); background: transparent; border: 0; cursor: copy; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.address:hover { color: var(--accent); }
.empty { padding: 80px 20px; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 760px) {
  .topbar { padding: 18px; }
  .topbar p { display: none; }
  main { padding: 18px; }
  .tabs { padding: 0 18px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary div:nth-child(2) { border-right: 0; }
  .summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .controls { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
}
