:root {
  color-scheme: dark;
  --bg: #050606;
  --surface: #090c0d;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-strong: #0f1415;
  --text: #f7faf3;
  --muted: #aab6b0;
  --dim: #6f7c76;
  --line: rgba(226, 255, 244, 0.14);
  --line-strong: rgba(187, 255, 42, 0.56);
  --green: #bbff2a;
  --green-soft: rgba(187, 255, 42, 0.12);
  --cyan: #38dff1;
  --amber: #ffbe4d;
  --coral: #ff6b5f;
  --violet: #c29bff;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.44);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

button {
  border: 0;
  cursor: pointer;
}

.index-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 560px) minmax(74px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 10px max(14px, calc((100vw - 1120px) / 2));
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: rgba(187, 255, 42, 0.08);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 950;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy small,
.toolkit-menu summary,
.toolkit-menu nav a,
.search-status,
.result-meta,
.meta-label,
.table-note,
.source-note,
.profile-kicker,
.extra-label {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.toolkit-menu {
  position: relative;
  z-index: 50;
  display: grid;
  justify-self: end;
  justify-items: end;
}

.toolkit-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.toolkit-menu summary::-webkit-details-marker {
  display: none;
}

.toolkit-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--green);
  transition: transform 160ms ease;
}

.toolkit-menu[open] summary,
.toolkit-menu summary:hover,
.toolkit-menu summary:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.toolkit-menu[open] summary::after {
  transform: rotate(180deg);
}

.toolkit-menu nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  gap: 2px;
  width: 306px;
  max-width: calc(100vw - 20px);
  border: 1px solid var(--line);
  padding: 8px;
  background: rgba(5, 6, 6, 0.98);
  box-shadow: var(--shadow);
}

.toolkit-menu nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  text-decoration: none;
}

.toolkit-menu nav a:hover,
.toolkit-menu nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.index-app,
.site-legal-footer {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar-search {
  width: min(560px, 100%);
  justify-self: center;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-row input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.search-row input::placeholder {
  color: var(--dim);
}

.search-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(187, 255, 42, 0.18);
}

.search-row button,
.quick-searches button,
.back-to-matches,
.result-button {
  border-radius: var(--radius);
}

.search-row button {
  min-height: 48px;
  padding: 0 16px;
  background: var(--green);
  color: #101407;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-status {
  min-height: 18px;
  color: var(--green);
  text-transform: none;
}

.results-section,
.profile-section {
  display: grid;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: clamp(22px, 5vw, 42px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.section-head h2,
.empty-profile h2,
.profile-title h2,
.profile-block h3 {
  font-size: clamp(1.7rem, 4.5vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-head p {
  color: var(--muted);
}

.quick-searches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
}

.quick-searches button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  padding: 9px 11px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

.quick-searches button:hover,
.quick-searches button:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.quick-searches button[data-source-type="global"] {
  border-left-color: var(--cyan);
}

.quick-searches button[data-source-type="buzz"] {
  border-left-color: var(--amber);
}

.quick-searches button[data-source-type="release"] {
  border-left-color: var(--green);
}

.suggestion-source {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.suggestion-title {
  overflow-wrap: anywhere;
  font-weight: 800;
  line-height: 1.1;
}

.results-list {
  display: grid;
  gap: 8px;
}

.result-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-button:hover,
.result-button:focus-visible,
.result-button.is-active {
  border-color: var(--green);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  outline: none;
  transform: translateY(-1px);
}

.result-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.result-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 74px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 950;
}

.result-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  min-width: 0;
}

.result-title {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.1;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-top: 7px;
  text-transform: none;
}

.result-pill {
  align-self: start;
  border: 1px solid currentColor;
  padding: 5px 9px;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.result-pill-fact {
  color: var(--green);
}

.result-pill-gap {
  color: var(--coral);
}

.empty-profile {
  display: grid;
  gap: 10px;
  max-width: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 28px);
  background: var(--surface);
}

.empty-profile p {
  color: var(--muted);
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.back-to-matches {
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.back-to-matches::before {
  content: "<";
  margin-right: 8px;
  color: var(--green);
}

.back-to-matches:hover,
.back-to-matches:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-art {
  position: relative;
  min-height: clamp(220px, 48vw, 430px);
  background: var(--surface-strong);
}

.profile-art img {
  display: block;
  width: 100%;
  height: clamp(220px, 48vw, 430px);
  object-fit: cover;
  object-position: center;
}

.profile-art .image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.profile-body {
  display: grid;
  gap: clamp(18px, 4vw, 30px);
  padding: clamp(16px, 4vw, 28px);
}

.profile-title {
  display: grid;
  gap: 10px;
}

.profile-title h2 {
  max-width: 14ch;
  font-size: clamp(2.3rem, 8vw, 5rem);
}

.profile-kicker {
  color: var(--green);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metadata-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 12px;
  background: var(--surface-soft);
}

.metadata-item:last-child {
  border-right: 0;
}

.metadata-item dd {
  margin: 0;
}

.meta-value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
  line-height: 1.18;
}

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: clamp(18px, 4vw, 30px);
}

.profile-block {
  display: grid;
  align-content: start;
  gap: 12px;
}

.summary-copy {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.quiet-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
  color: var(--dim);
}

.platform-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.platform-table th,
.platform-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.platform-table tr:last-child td {
  border-bottom: 0;
}

.platform-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.platform-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.platform-name img {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.involvement-list,
.source-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.involvement-list li,
.source-list a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-soft);
}

.source-list a {
  display: block;
  color: var(--green);
  text-decoration: none;
}

.source-list a:hover,
.source-list a:focus-visible {
  border-color: var(--green);
  outline: none;
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.extra-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.extra-card strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
  line-height: 1.08;
}

.extra-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.source-note {
  color: var(--dim);
  text-transform: none;
}

.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-legal-footer a {
  color: inherit;
  text-decoration: none;
}

.site-legal-footer a:hover,
.site-legal-footer a:focus-visible {
  color: var(--green);
  outline: none;
}

@media (max-width: 860px) {
  .profile-columns,
  .section-head {
    grid-template-columns: 1fr;
  }

  .metadata-grid,
  .extras-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .index-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand search menu";
    gap: 8px;
    padding-block: 9px;
  }

  .brand {
    grid-area: brand;
  }

  .brand-copy {
    display: none;
  }

  .topbar-search {
    grid-area: search;
    width: 100%;
  }

  .toolkit-menu {
    grid-area: menu;
  }

  .topbar-search .search-row {
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 6px;
  }

  .topbar-search .search-row input,
  .topbar-search .search-row button {
    min-height: 42px;
  }

  .topbar-search .search-row button {
    padding-inline: 10px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .index-topbar {
    padding-inline: 12px;
  }

  .index-app,
  .site-legal-footer {
    width: min(100% - 20px, 1120px);
  }

  .metadata-grid,
  .extras-grid {
    grid-template-columns: 1fr;
  }

  .result-main {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .result-thumb {
    width: 52px;
    height: 68px;
  }

  .metadata-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metadata-item:last-child {
    border-bottom: 0;
  }

  .profile-title h2 {
    max-width: 100%;
  }

  .platform-table th,
  .platform-table td {
    padding: 9px 8px;
  }
}

@media (max-width: 360px) {
  .topbar-search .search-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .topbar-search .search-row button {
    font-size: 10px;
  }
}
