
:root {
  --bg: #0b0f16; --bg-2: #0f141d; --surface: #121925; --surface-2: #172031; --line: #222c3d; --line-2: #2c384d;
  --text: #e8ebf1; --muted: #8f99ad; --dim: #5d687d;
  --accent: #f5b83d; --accent-2: #ffd479; --accent-ink: #1b1303;
  --ok: #46c28e; --bad: #f25f6c; --warn: #f5b83d;
  --t1: #8391a8; --t2: #4ea3f5; --t3: #f5b83d; --t4: #f5813d; --t5: #f2475a;
  --radius: 12px; --radius-s: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Chakra Petch", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 520px at 85% -120px, rgba(245, 184, 61, 0.09), transparent 60%),
    radial-gradient(900px 480px at -10% 10%, rgba(78, 163, 245, 0.06), transparent 60%),
    var(--bg);
  color: var(--text); font: 15px/1.55 var(--font);
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 8px; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; color: var(--text); }
.pad { padding: 18px; margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 56px; }
.eyebrow { font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(70, 194, 142, 0.16); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 15, 22, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 18px/1 var(--display); letter-spacing: 0.22em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 26px; height: 26px; color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); font-weight: 500; padding: 7px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.on { color: var(--text); background: var(--surface-2); }
.top-search { margin-left: auto; }
.top-search input { width: 230px; }

/* inputs and buttons */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  padding: 9px 12px; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 184, 61, 0.18); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { resize: vertical; min-height: 84px; width: 100%; }
select { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); cursor: pointer;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 16px; white-space: nowrap;
}
.btn:hover { border-color: var(--dim); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.link { background: none; border: none; color: var(--accent-2); padding: 4px 6px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 26px 0 30px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.03; margin-bottom: 18px; }
.hl { color: var(--accent); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.04em; height: 0.12em; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0.55; }
.lede { font-size: 17px; color: var(--muted); max-width: 540px; margin-bottom: 24px; }
.hero-search { display: flex; gap: 10px; max-width: 520px; }
.hero-search input { flex: 1; font-size: 16px; padding: 13px 16px; }
.hero-search .btn { padding: 0 22px; }
.hero-art { display: flex; justify-content: center; }
.crest { width: 100%; max-width: 330px; filter: drop-shadow(0 24px 60px rgba(245, 184, 61, 0.14)); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font: 700 28px/1.1 var(--display); letter-spacing: 0.02em; }
.stat span { color: var(--muted); font-size: 13px; }

/* panels and lists */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.cols .panel { margin-bottom: 0; }
.panel.list { padding: 6px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.more { font-size: 13px; }
.list { display: flex; flex-direction: column; gap: 2px; }
.row-card { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--radius-s); color: var(--text); }
.row-card:hover { background: var(--surface-2); text-decoration: none; }
.av { border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); object-fit: cover; flex: none; }
.rc-main { display: flex; flex-direction: column; min-width: 0; }
.rc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rc-time { color: var(--dim); font-size: 12px; min-width: 56px; text-align: right; }

.tier, .cat, .chip { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--font); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.tier { border: 1px solid currentColor; background: rgba(255, 255, 255, 0.02); }
.tier.t1 { color: var(--t1); } .tier.t2 { color: var(--t2); } .tier.t3 { color: var(--t3); } .tier.t4 { color: var(--t4); } .tier.t5 { color: var(--t5); background: rgba(242, 71, 90, 0.1); }
.cat { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.cat-exploit { color: #f7a2ab; } .cat-degen { color: #c9a8ff; }
.chip { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); margin: 0 6px 6px 0; }
a.chip:hover { border-color: var(--accent); text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; }

.ranks { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 28px 1fr auto 150px; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--text); }
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--surface-2); text-decoration: none; }
.rank { font: 700 14px/1 var(--display); color: var(--dim); text-align: center; }
.rank-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-num { color: var(--muted); font-size: 13px; }
.rank-num b { color: var(--text); }
.risk { display: inline-flex; align-items: center; gap: 8px; }
.risk b { font-size: 13px; min-width: 44px; text-align: right; }
.risk-low b { color: var(--ok); } .risk-mid b { color: var(--warn); } .risk-high b { color: var(--bad); }
meter { width: 90px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg-2); border: none; }
meter::-webkit-meter-bar { background: var(--bg-2); border: none; border-radius: 999px; height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--ok); border-radius: 999px; }
meter::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 999px; }
meter::-webkit-meter-even-less-good-value { background: var(--bad); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--warn); border-radius: 999px; }

.tier-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tier-grid p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* pages */
.page-head { margin-bottom: 18px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input[type="search"] { flex: 1; min-width: 200px; }
.filters .grow { flex: 1; display: flex; }
.filters .grow input { flex: 1; }
.segs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 3px; }
.seg { color: var(--muted); padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.seg:hover { color: var(--text); text-decoration: none; }
.seg.on { background: var(--surface-2); color: var(--text); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pg { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.pg:hover { border-color: var(--dim); text-decoration: none; }
.pg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.pg.off, .pg.gap { color: var(--dim); border-color: transparent; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }

.profile-id { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.profile-id h1 { margin-bottom: 4px; }
.profile-id p { margin: 0 0 10px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.facts dt { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.facts dd { margin: 0; }
.gap-top { margin-top: 18px; }
.notes { white-space: pre-wrap; color: var(--muted); }
.evidence { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.evidence li { display: flex; flex-direction: column; }
.ev-url { font-size: 12px; overflow-wrap: anywhere; }
.clan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.clan-head p { margin: 0; }
.api-row { display: grid; grid-template-columns: 52px auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.api-row:last-child { border-bottom: none; }
.api-row p { grid-column: 2; margin: 0; color: var(--muted); font-size: 14px; }
.api-row code { justify-self: start; overflow-wrap: anywhere; }
.verb { font: 700 11px/1 var(--display); letter-spacing: 0.1em; color: var(--ok); background: rgba(70, 194, 142, 0.12); padding: 6px 8px; border-radius: 6px; align-self: start; text-align: center; }
.code { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; overflow-x: auto; margin: 0; color: #cbd5e6; }
.empty { text-align: center; padding: 70px 0; }
.notice { padding: 11px 14px; border-radius: var(--radius-s); border: 1px solid; font-size: 14px; }
.notice.bad { color: #ffb3ba; border-color: rgba(242, 95, 108, 0.4); background: rgba(242, 95, 108, 0.08); }
.notice.warn { color: var(--accent-2); border-color: rgba(245, 184, 61, 0.4); background: rgba(245, 184, 61, 0.08); }
.notice.ok { color: #9be3c2; border-color: rgba(70, 194, 142, 0.4); background: rgba(70, 194, 142, 0.08); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--dim); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-brand .logo { width: 16px; height: 16px; color: var(--dim); }
.foot-links { display: inline-flex; gap: 16px; }
.foot-links a { color: var(--muted); }

/* login */
.login { display: flex; justify-content: center; padding: 40px 0; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.login-mark { width: 44px; height: 44px; color: var(--accent); margin-bottom: 16px; }
.login-mark .logo { width: 44px; height: 44px; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { font-size: 15px; }

/* admin */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.admin-head .eyebrow { margin-bottom: 8px; }
.admin-head h1 { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { font: 600 14px/1 var(--font); color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; padding: 12px 16px; cursor: pointer; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1; min-width: 160px; }
.form-row .field.narrow { flex: 0 0 150px; min-width: 130px; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title h2 { margin: 0; }
.badge { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 9px; border-radius: 999px; }
.badge.ok { color: var(--ok); background: rgba(70, 194, 142, 0.12); }
.badge.bad { color: var(--bad); background: rgba(242, 95, 108, 0.12); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.modal { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; padding: 0; }
.modal::backdrop { background: rgba(3, 6, 10, 0.7); backdrop-filter: blur(3px); }
.modal form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--text); }
.check-chip input { margin: 0; accent-color: var(--accent); }
.check-chip:has(input:checked) { border-color: var(--accent); background: rgba(245, 184, 61, 0.1); }
.picker { position: relative; }
.picker-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-s); margin-top: 4px; max-height: 200px; overflow-y: auto; }
.picker-results button { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); padding: 9px 12px; font: inherit; cursor: pointer; }
.picker-results button:hover { background: var(--line); }
.chip button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 0 0 4px; font: inherit; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.inline-check input { accent-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; transition: 0.2s; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 16px; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { border-color: rgba(242, 95, 108, 0.6); color: #ffb3ba; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child:nth-child(odd) { grid-column: span 2; }
  .cols { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .top-search { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .top-in { gap: 10px; }
  .brand span { display: none; }
  .nav a { padding: 7px 9px; }
  .row-card { grid-template-columns: auto 1fr; }
  .rc-tags { grid-column: 2; justify-content: flex-start; }
  .rc-time { display: none; }
  .rank-row { grid-template-columns: 24px 1fr auto; }
  .rank-row .risk { display: none; }
  .profile-id { grid-template-columns: auto 1fr; }
  .profile-id .btn { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .stats.three { grid-template-columns: 1fr 1fr 1fr; }
  .stat b { font-size: 22px; }
  .tier-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { padding: 13px; }
  .grid-3 { grid-template-columns: 1fr; }
  .clan-head { flex-direction: column; }
  .api-row { grid-template-columns: 1fr; }
  .api-row p { grid-column: 1; }
}
