:root {
  --bg: #080a0d;
  --panel: #101318;
  --panel-2: #14181e;
  --panel-3: #0d1014;
  --text: #f1f3f5;
  --muted: #9ba3ae;
  --muted-2: #68717d;
  --line: #242a33;
  --line-strong: #313844;
  --accent: #c8a96b;
  --accent-soft: rgba(200, 169, 107, .12);
  --shadow: 0 20px 50px rgba(0, 0, 0, .26);
  --radius: 18px;
  --max: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.035), transparent 28%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(8,10,13,.88);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted-2); font-size: 11px; }
.brand-mark { width: 30px; height: 30px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; background: linear-gradient(145deg,#191d23,#0b0e12); }
.brand-mark span { border-radius: 2px; background: #828b97; }
.brand-mark span:nth-child(2) { opacity: .62; }
.brand-mark span:nth-child(3) { opacity: .32; }
.header-nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 13px; }
.nav-link { text-decoration: none; padding: 7px 0; background: none; border: 0; color: var(--muted); }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active { position: relative; }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 2px; background: var(--accent); border-radius: 99px; }
.button-link { appearance: none; }
.nav-stat { color: var(--muted-2); }
.nav-stat b { color: var(--text); font-weight: 600; }

main { width: min(var(--max), calc(100% - 8vw)); margin: 0 auto; }
.hero { padding: 68px 0 42px; display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 860px; margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: .99; letter-spacing: -.045em; font-weight: 700; }
.hero-text { max-width: 720px; margin: 20px 0 0; color: var(--muted); font-size: clamp(.95rem, 1.3vw, 1.07rem); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 11px; white-space: nowrap; }
.pulse, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8b0bb; box-shadow: 0 0 0 4px rgba(168,176,187,.08); }

.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 26px 0 18px; border-top: 1px solid var(--line); }
.search-wrap { flex: 1; max-width: 740px; }
.search-wrap > label, .select-wrap > span { display: block; margin-bottom: 7px; color: var(--muted-2); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.search-box { display: flex; align-items: center; min-height: 50px; padding: 0 11px 0 15px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg, #11151a, #0d1014); transition: border-color .18s ease, box-shadow .18s ease; }
.search-box:focus-within { border-color: #454c58; box-shadow: 0 0 0 4px rgba(255,255,255,.035); }
.search-icon { color: var(--muted-2); font-size: 23px; line-height: 1; margin-right: 10px; transform: translateY(-1px); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-box input::placeholder { color: #59616b; }
kbd { color: var(--muted-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: 10px; }
.search-wrap small { display: block; margin-top: 7px; color: var(--muted-2); font-size: 11px; }
.toolbar-actions { display: flex; align-items: flex-end; gap: 12px; }
.select-wrap select { min-width: 170px; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 38px 0 13px; color: var(--text); background: #101318; outline: 0; }
.filter-toggle { display: none; height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #101318; }

.filters-panel { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.filter-label { display:block; margin-bottom: 9px; color: var(--muted-2); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.range-options { display: flex; flex-wrap: wrap; gap: 7px; }
.range-btn { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #0f1216; font-size: 11px; }
.range-btn:hover, .range-btn.active { color: var(--text); border-color: #464d58; background: var(--accent-soft); }
.filter-note { max-width: 430px; display: flex; gap: 9px; color: var(--muted-2); font-size: 11px; }
.mini-icon { display: grid; place-items: center; flex: 0 0 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; }

.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin: 12px 0 16px; }
.results-head h2 { margin: 0; font-size: 15px; letter-spacing: .01em; }
.results-head p { margin: 5px 0 0; color: var(--muted-2); font-size: 11px; }
.dataset-status { display: inline-flex; align-items: center; gap: 9px; color: var(--muted-2); font-size: 11px; }

.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.profile-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); box-shadow: 0 8px 30px rgba(0,0,0,.08); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.profile-card:hover { transform: translateY(-2px); border-color: #3c444f; box-shadow: var(--shadow); }
.profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.abstract-avatar, .detail-avatar { position: relative; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--line-strong); background: radial-gradient(circle at 30% 30%, #2b3139, #11151a 70%); }
.abstract-avatar { width: 58px; height: 58px; border-radius: 15px; }
.abstract-avatar::before, .detail-avatar::before { content: ""; position: absolute; width: 24%; height: 24%; left: 26%; top: 23%; border-radius: 50%; background: #7e8792; opacity: .32; }
.abstract-avatar::after, .detail-avatar::after { content: ""; position: absolute; width: 48%; height: 34%; left: 26%; top: 49%; border-radius: 16px 16px 9px 9px; background: #717b87; opacity: .22; }
.abstract-avatar span:nth-child(1), .detail-avatar span:nth-child(1) { position:absolute; width:3px; height:3px; right:13px; top:12px; border-radius:50%; background:#87909b; opacity:.55; }
.abstract-avatar span:nth-child(2), .detail-avatar span:nth-child(2) { position:absolute; width:2px; height:2px; right:10px; bottom:15px; border-radius:50%; background:#87909b; opacity:.35; }
.abstract-avatar span:nth-child(3), .detail-avatar span:nth-child(3) { position:absolute; width:2px; height:2px; left:11px; bottom:12px; border-radius:50%; background:#87909b; opacity:.25; }
.card-meta { min-width: 0; flex: 1; }
.card-label { margin: 0 0 5px; color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.card-title { margin: 0; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.status-chip span { width: 5px; height: 5px; border-radius: 50%; background: #78818c; }
.card-divider { height: 1px; margin: 15px 0 13px; background: var(--line); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-note { color: var(--muted-2); font-size: 10px; }
.open-btn { border: 0; padding: 6px 0; color: var(--text); background: transparent; font-size: 11px; font-weight: 650; }
.open-btn:hover { color: var(--accent); }

.empty-state { display: grid; justify-items: center; text-align: center; padding: 86px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.015); }
.empty-icon { width: 44px; height: 44px; display:grid; place-items:center; margin-bottom: 12px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 25px; }
.empty-state h2 { margin: 0; font-size: 18px; }
.empty-state p { max-width: 540px; margin: 9px 0 16px; color: var(--muted-2); font-size: 12px; }

.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 25px 0 45px; }
.page-btn { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #0e1115; font-size: 11px; }
.page-btn:hover, .page-btn.active { color: var(--text); border-color: #464e59; background: #171b21; }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-gap { padding: 0 2px; color: var(--muted-2); }

.integrity-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 35px; padding: 28px; margin-bottom: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.03), rgba(255,255,255,.012)); }
.integrity-panel h2 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.integrity-panel p:not(.eyebrow) { max-width: 650px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.integrity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-content: center; }
.integrity-item { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.15); }
.integrity-item span { display:block; color: var(--muted-2); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.integrity-item strong { display:block; margin-top: 4px; color: var(--text); font-size: 12px; }
.integrity-ok { color: #aeb7c2 !important; }

.site-footer { width: min(var(--max), calc(100% - 8vw)); margin: 0 auto; padding: 18px 0 35px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted-2); border-top: 1px solid var(--line); font-size: 10px; }

.profile-modal { width: min(720px, calc(100vw - 28px)); padding: 0; border: 0; background: transparent; color: var(--text); }
.profile-modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(7px); }
.modal-surface { position: relative; padding: 25px; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(145deg, #15191f, #0d1014); box-shadow: 0 30px 90px rgba(0,0,0,.48); }
.modal-close { position:absolute; right: 15px; top: 11px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 25px; }
.modal-topline { display:flex; justify-content:space-between; gap:10px; color:var(--muted-2); font-size:10px; text-transform:uppercase; letter-spacing:.13em; }
.modal-number { color: var(--accent); }
.detail-identity { display:flex; gap:16px; align-items:center; padding: 30px 0 23px; }
.detail-avatar { width:86px; height:86px; border-radius:21px; }
.detail-identity h2 { margin:0; font-size:26px; letter-spacing:-.03em; }
.detail-identity p:last-child { margin:4px 0 0; color:var(--muted-2); font-size:12px; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.detail-card { padding:15px; border:1px solid var(--line); border-radius:14px; background: rgba(255,255,255,.018); }
.detail-card span { display:block; color:var(--muted-2); font-size:9px; letter-spacing:.13em; text-transform:uppercase; }
.detail-card strong { display:block; margin-top:6px; font-size:13px; }
.detail-card small { display:block; margin-top:6px; color:var(--muted-2); font-size:10px; }
.modal-actions { display:flex; justify-content:flex-end; gap:9px; padding-top:20px; }
.primary-btn, .secondary-btn { min-height:38px; padding:0 13px; border-radius:10px; font-size:11px; font-weight:650; }
.primary-btn { border:1px solid #756346; background: #b1945b; color:#17130b; }
.secondary-btn { border:1px solid var(--line-strong); background:#12161b; color:var(--text); }
.primary-btn:hover, .secondary-btn:hover { filter: brightness(1.08); }
.noscript { position:fixed; inset:auto 12px 12px; z-index:100; padding:12px; border:1px solid var(--line); border-radius:10px; background:#15191e; color:var(--text); font-size:12px; }

@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-badge { align-self: flex-start; }
  .integrity-panel { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .site-header { padding: 0 18px; }
  .header-nav { gap: 14px; }
  .header-nav > .nav-stat { display: none; }
  main, .site-footer { width: min(100% - 28px, var(--max)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: space-between; align-items: flex-end; }
  .filter-toggle { display: block; }
  .filters-panel { align-items: stretch; flex-direction: column; }
  .filter-note { max-width: none; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .site-header { min-height: 64px; }
  .brand small { display:none; }
  .header-nav > .button-link { display:none; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .select-wrap { flex: 1; }
  .select-wrap select { width:100%; min-width:0; }
  .profile-grid { grid-template-columns: 1fr; }
  .integrity-panel { padding: 20px; }
  .integrity-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { flex-direction:column; padding-bottom:25px; }
  .detail-grid { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
