:root {
  color-scheme: dark;
  --bg: #080b0f;
  --grid: rgba(60, 199, 224, .12);
  --top: #062b32;
  --rail: #06191e;
  --panel: #20262d;
  --panel-2: #171d23;
  --panel-3: #2a3038;
  --line: #3a444d;
  --cyan: #5bd8ea;
  --cyan-dim: #0b6575;
  --text: #f4f4f4;
  --muted: #b8c0c7;
  --gold: #f3c647;
  --danger: #ff6173;
  --ok: #31d72f;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(118deg, transparent 0 36%, rgba(91,216,234,.06) 36.2% 36.6%, transparent 36.8%),
    repeating-linear-gradient(110deg, transparent 0 24px, var(--grid) 25px 27px, transparent 28px 70px),
    var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px 14px;
  background: var(--top);
  border-bottom: 3px solid #022027;
  box-shadow: 0 5px 18px rgba(0,0,0,.35);
}

.brand img {
  width: 128px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--cyan);
  font-weight: 800;
}

.nav a:hover,
.text-button:hover { color: white; }

.text-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 900;
  cursor: pointer;
}

.side-rail {
  position: fixed;
  top: 58px;
  left: 0;
  bottom: 0;
  z-index: 10;
  width: 272px;
  padding: 14px 10px;
  background: rgba(3, 13, 16, .94);
  border-right: 2px solid var(--line);
  overflow: auto;
}

.side-rail a {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 2px solid #064b58;
  border-radius: 8px;
  background: #062a32;
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 800;
}

.side-rail span {
  color: white;
  font-size: 1.2rem;
}

.shell {
  width: min(1260px, calc(100% - 320px));
  margin-left: max(304px, calc((100vw - 1260px) / 2 + 160px));
  padding: 28px 20px 56px;
}

.hero-grid,
.section-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: stretch;
}

.hero-copy,
.score-panel,
.review-card,
.user-card,
.compact-list,
.form,
.notice,
.profile-head,
.profile-bio {
  background: var(--panel);
  border: 1px solid #303841;
  border-radius: 7px;
  box-shadow: 0 16px 40px rgba(0,0,0,.26);
}

.hero-copy { padding: 28px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 900;
}

h1, h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-shadow: 0 2px 0 #000;
}

h2 { font-size: 1.35rem; }

.lede,
.muted-text,
.empty,
.footer,
small {
  color: var(--muted);
}

.lede {
  max-width: 760px;
  margin: 16px auto 0;
  text-align: center;
  font-size: 1.08rem;
  line-height: 1.6;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin: 24px auto 0;
  max-width: 860px;
}

.search-bar.full {
  margin: 0 0 22px;
  max-width: none;
}

input,
textarea {
  width: 100%;
  border: 2px solid #38424b;
  border-radius: 7px;
  padding: 12px 14px;
  background: #f4f4f4;
  color: #1a242b;
  outline: none;
}

textarea { min-height: 150px; }

input:focus,
textarea:focus { border-color: var(--cyan); }

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 900;
  cursor: pointer;
}

button:hover,
.button:hover { filter: brightness(1.2); }

.button.small { min-height: 36px; }
.button.wide { width: 100%; }
.button.muted, button:disabled { background: #222a31; color: var(--muted); cursor: not-allowed; }
.discord { background: #5865f2; color: white; }
.twitter { background: #f4f4f4; color: #111; }

.score-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.score-panel img {
  width: 230px;
  max-width: 100%;
}

.score-big {
  margin-top: 10px;
  color: var(--gold);
  font-size: 4rem;
  font-weight: 950;
}

.section-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  margin-top: 28px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 0 0 14px;
}

.section-heading.standalone { align-items: start; }
.section-heading a { color: var(--cyan); font-weight: 900; }

.review-list { display: grid; gap: 14px; }
.review-card { padding: 16px; }
.review-card p { line-height: 1.55; white-space: pre-line; }

.review-top,
.score-strip,
.metric-row,
.status-line,
.check-row {
  display: flex;
  align-items: center;
}

.review-top {
  justify-content: space-between;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #0b6575;
  color: var(--cyan);
  font-weight: 900;
}

.score-strip {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.score-strip span,
.metric-row span {
  padding: 8px 10px;
  border-radius: 7px;
  background: #131920;
  color: var(--muted);
}

.compact-list { overflow: hidden; }
.compact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.compact-row:last-child { border-bottom: 0; }

.narrow {
  width: min(720px, 100%);
  margin: 0 auto;
}

.narrow.block { margin-top: 28px; }
.auth-stack, .form { display: grid; gap: 14px; margin-top: 22px; }
.form { padding: 18px; }

.form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.check-row {
  grid-template-columns: 20px 1fr;
  color: white;
}
.check-row input { width: auto; }

.score-grid,
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.results-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.user-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #151b21;
}

.user-card:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 3px solid #39454f;
  border-radius: 8px;
  background: #111820;
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: 950;
}

.avatar.large {
  width: 156px;
  height: 156px;
  font-size: 3rem;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}

.profile-head h1 {
  text-align: left;
}

.status-line {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--cyan);
}

.online-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
}

.metric-row {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.profile-bio {
  padding: 18px;
  margin-bottom: 18px;
}

.profile-bio p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.report-box { color: var(--muted); }
.report-box form { display: flex; gap: 8px; margin-top: 10px; }

.notice {
  padding: 12px 14px;
  margin-bottom: 16px;
}
.notice.error { border-color: rgba(255,97,115,.6); color: var(--danger); }
.notice.success { border-color: rgba(49,215,47,.6); color: var(--ok); }

.counter {
  color: var(--muted);
  justify-self: end;
}

.typeahead {
  position: relative;
}

.typeahead-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 460px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--cyan-dim);
  border-radius: 8px;
  background: #171d23;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.typeahead-panel.is-open {
  display: grid;
  gap: 8px;
}

.typeahead-row,
.linked-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #232a31;
  color: var(--text);
}

.typeahead-row:hover,
.typeahead-row:focus {
  background: #2c3540;
  color: var(--cyan);
}

.typeahead-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: #10161d;
  color: var(--gold);
  font-weight: 900;
}

.typeahead-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.typeahead-copy {
  display: grid;
  min-width: 0;
}

.typeahead-copy strong,
.typeahead-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.typeahead-copy small,
.typeahead-empty {
  color: var(--muted);
}

.typeahead-dot {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: #9aa1a8;
}

.linked-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.linked-row {
  justify-content: space-between;
}

.linked-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.linked-row small {
  color: var(--muted);
}

.auth-stack.compact {
  margin-top: 10px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-left: 272px;
  padding: 18px 32px;
  border-top: 1px solid var(--line);
  background: #05090c;
}

@media (max-width: 960px) {
  .side-rail { display: none; }
  .shell {
    width: min(100% - 24px, 1180px);
    margin: 0 auto;
    padding-inline: 0;
  }
  .footer { margin-left: 0; }
  .hero-grid,
  .section-grid,
  .profile-head { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: .92rem; }
}

@media (max-width: 620px) {
  .topbar,
  .search-bar,
  .report-box form,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }
  .score-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; text-align: left; }
}
