@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

/* ==========================================================================
   Design tokens
   Spacing: 0 2 4 8 12 16 24 32 40 48 64 80 96 (nothing in between)
   Type:    12/16  14/20  16/24  20/28  24/32  30/36
   Radius:  4 (tags, menu items)  6 (controls)  8 (panels)  12 (menus, modals)
   Surfaces are separated by tone, not by lines or shadows. Lines are kept
   only where they carry structure: inputs, table rows, list dividers, menus.
   ========================================================================== */
:root {
  --bg: #000000;
  --panel: #0f0f0f;
  --panel-2: #141414;
  --panel-3: #1a1a1a;
  --panel-4: #242424;
  --line: #1b1b1b;
  --line-strong: #292929;

  --text: #ffffff;
  --text-dim: #a8a8a8;
  --text-dimmer: #8a8a8a;

  --ok: #5fc88a;
  --warn: #e3b341;
  --bad: #f08a8c;

  /* Discord's own brand colour, used only for the Discord button */
  --discord: #5865f2;
  --discord-hover: #4752c4;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-loop: cubic-bezier(0.37, 0, 0.63, 1);
  --t-color: 200ms;
  --t-pop: 300ms;
  --t-move: 500ms;

  --topbar-h: 56px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
* {
  scrollbar-color: #343434 #0b0b0b;
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: #0b0b0b;
}
*::-webkit-scrollbar-thumb {
  border: 2px solid #0b0b0b;
  border-radius: 8px;
  background: #343434;
}
*::-webkit-scrollbar-thumb:hover {
  background: #505050;
}
h1,
h2,
h3,
h4 {
  text-wrap: balance;
  font-weight: 600;
}
p,
li {
  text-wrap: pretty;
}
em,
i {
  font-style: normal;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
::selection {
  background: var(--panel-4);
  color: #fff;
}

/* One visible focus ring for everything that can take focus */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- Discord button (also used by the appeal button) ---------- */
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--discord);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  transition:
    background var(--t-color) var(--ease),
    transform var(--t-color) var(--ease);
}
.discord-btn:hover {
  background: var(--discord-hover);
}
.discord-btn:active {
  transform: scale(0.98);
}

/* ---------- Login screen ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
}
.login-card > * {
  animation: rise var(--t-move) var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.login-logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.login-card h1 {
  font-size: 30px;
  line-height: 36px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.login-lead {
  margin: 8px 0 32px;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-dim);
}
.login-card .login-btn {
  display: inline-flex;
  width: auto;
}
.login-fine {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-dimmer);
}
.login-err {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--panel-3);
  color: var(--bad);
  font-size: 14px;
  line-height: 20px;
}

/* ---------- Shell ---------- */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  margin-right: 8px;
}
.topbar-brand img {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.topbar-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-dim);
  transition:
    background var(--t-color) var(--ease),
    color var(--t-color) var(--ease);
}
.topbar-tab:hover {
  background: var(--panel-2);
  color: var(--text);
}
.topbar-tab.active,
.topbar-tab[aria-current="page"] {
  background: var(--panel-3);
  color: var(--text);
}
.topbar-tab svg {
  width: 16px;
  height: 16px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.topbar-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.topbar-user .name {
  font-size: 14px;
  font-weight: 500;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  transition:
    background var(--t-color) var(--ease),
    color var(--t-color) var(--ease);
}
.topbar-logout:hover {
  background: var(--panel-3);
  color: var(--text);
}

.shell-body {
  flex: 1;
  min-height: 0;
}
/* Route changes: a short fade and an 8px rise */
#view {
  transition: opacity var(--t-color) var(--ease);
}
#view.leaving {
  opacity: 0;
}
#view.entering {
  animation: viewIn var(--t-pop) var(--ease) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Sanctions ---------- */
.app {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
}
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  position: sticky;
  top: var(--topbar-h);
}
.sidebar-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-dimmer);
  padding: 16px 16px 8px;
}
.sidebar-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-dim);
  transition:
    background var(--t-color) var(--ease),
    color var(--t-color) var(--ease);
}
.sidebar-item:hover {
  background: var(--panel-2);
  color: var(--text);
}
.sidebar-item.active {
  background: var(--panel-3);
  color: var(--text);
}
.sidebar-item .ic {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-item .meta {
  overflow: hidden;
}
.sidebar-item .type-name {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item .type-name::first-letter,
.type-badge .type-text::first-letter,
.sanc-top .ty::first-letter,
.home-role::first-letter {
  text-transform: uppercase;
}
.sidebar-item .id-tag {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-dimmer);
  font-family: var(--font-mono);
}
.sidebar-empty {
  padding: 8px 16px 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-dimmer);
}

.main {
  flex: 1;
  padding: 40px 48px;
  max-width: 760px;
}
.main-header {
  margin-bottom: 24px;
}
.main-header h2 {
  font-size: 20px;
  line-height: 28px;
  margin: 0 0 4px;
  font-weight: 600;
}
.main-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 20px;
}
.main-header p.fine {
  color: var(--text-dimmer);
  font-size: 12px;
  line-height: 16px;
  margin-top: 8px;
}
.main-header p.fine strong {
  color: var(--text-dim);
  font-weight: 600;
}

.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card + .card {
  margin-top: 16px;
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.type-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.type-badge .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.type-badge .type-text {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.type-badge .full-id {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-dimmer);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.copy-btn {
  color: var(--text-dimmer);
  display: inline-flex;
  align-items: center;
  transition: color var(--t-color) var(--ease);
}
.copy-btn:hover {
  color: var(--text);
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-dim);
  flex-shrink: 0;
}
.status-pill.on {
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.field {
  background: var(--panel-2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.field .label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-dimmer);
  margin-bottom: 4px;
}
.field .value {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  word-break: break-word;
}

.reason-block,
.note-block {
  margin-top: 8px;
}
.note-block {
  margin-top: 16px;
}
.reason-block .label,
.note-block .label,
.evidence-block .label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-dimmer);
  margin-bottom: 8px;
}
.reason-block .value,
.note-block .value {
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  background: var(--panel-2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  white-space: pre-wrap;
}

.evidence-block {
  margin-top: 24px;
}
.evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: background var(--t-color) var(--ease);
}
.evidence-btn:hover {
  background: var(--panel-3);
}

.appeal-card {
  background: var(--panel-2);
}
.appeal-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.appeal-top .ic {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.appeal-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.appeal-sub {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-dim);
  margin-top: 2px;
}
.appeal-steps {
  margin: 0 0 16px;
  padding-left: 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-dim);
}
.appeal-steps li + li {
  margin-top: 8px;
}
.appeal-steps code {
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.appeal-btn {
  width: auto;
  display: inline-flex;
}
.appeal-card.appeal-disabled {
  opacity: 0.6;
}
.appeal-card.appeal-disabled .appeal-top {
  margin-bottom: 0;
}
.appeal-card.appeal-disabled .ic {
  color: var(--text-dimmer);
}

#main-inner {
  transition: opacity var(--t-color) var(--ease);
}
#main-inner.loading {
  opacity: 0.5;
  pointer-events: none;
}

.empty-state,
.error-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-dim);
}
.empty-state .ic-wrap,
.error-state .ic-wrap {
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dimmer);
}
.empty-state .ic-wrap svg,
.error-state .ic-wrap svg {
  width: 32px;
  height: 32px;
}
.empty-state h3,
.error-state h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
}
.empty-state p,
.error-state p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
/* Loading: a slow opacity pulse instead of a rotating spinner */
.spin-ic {
  animation: pulse 1.2s var(--ease-loop) infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
/* Skeleton block for loading states shaped like the real layout */
.skeleton {
  background: var(--panel-2);
  border-radius: var(--radius-md);
  min-height: 16px;
  animation: pulse 1.2s var(--ease-loop) infinite;
}

/* ---------- Shared small components ---------- */
.sec {
  margin-bottom: 32px;
}
.sec-head {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.kv:last-child {
  border-bottom: none;
}
.kv-k {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.kv-v {
  flex: 1;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kv-v a {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--t-color) var(--ease);
}
.kv-v a:hover {
  color: var(--text);
}
.kv-v a svg {
  width: 14px;
  height: 14px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  line-height: 16px;
  background: var(--panel-3);
}
.tag-white {
  color: var(--text);
}
.tag-muted {
  color: var(--text-dimmer);
  background: var(--panel-2);
}
.tag-green {
  color: var(--ok);
}
.tag-amber {
  color: var(--warn);
}

.sec-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lookup-page {
  padding: 32px 32px 64px;
  max-width: 900px;
  margin: 0 auto;
}
.home-page {
  width: min(100% - 48px, 1000px);
  margin: 0 auto;
  padding: 40px 0 64px;
}
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.home-hero h1 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.01em;
}
.home-hero p,
.home-section-heading p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 20px;
  max-width: 560px;
}
.home-hero-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  color: var(--text-dimmer);
}
.home-hero-mark svg {
  width: 32px;
  height: 32px;
}
.home-section {
  margin-top: 32px;
}
.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.home-section-heading h2 {
  margin: 0 0 2px;
  font-size: 16px;
  line-height: 24px;
}
.home-role {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  background: var(--panel);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.home-action {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: background var(--t-color) var(--ease);
}
.home-action:hover {
  background: var(--panel-2);
}
.home-action-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--text-dim);
}
.home-action-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.home-action-copy strong {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.home-action-copy span {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 16px;
}
.home-action-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--text-dimmer);
}
.home-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  background: var(--panel);
}
.home-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  background: var(--panel);
}
.home-note > svg {
  flex: 0 0 auto;
  color: var(--text-dimmer);
}
.home-note p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.home-note strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Toasts (float, so they keep a shadow) ---------- */
#toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-3);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toast-in var(--t-pop) var(--ease) both;
}
.toast .ic {
  flex-shrink: 0;
  color: var(--text-dim);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Mobile navigation ---------- */
.mobile-nav-toggle {
  display: none;
}
.mobile-nav-drawer,
.mobile-nav-backdrop {
  display: none;
}
@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes linkIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px), (pointer: coarse) {
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
    height: 40px;
    flex: 0 0 auto;
    padding: 0 12px;
    border-radius: var(--radius-md);
    color: var(--text);
    background: var(--panel-2);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--t-color) var(--ease);
  }
  .mobile-nav-toggle:hover,
  .mobile-nav-toggle[aria-expanded="true"] {
    background: var(--panel-3);
  }
  .topbar-nav {
    display: none;
  }
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 69;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 60%);
  }
  .mobile-nav-backdrop[hidden],
  .mobile-nav-drawer[hidden] {
    display: none;
  }
  .mobile-nav-drawer {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(84vw, 320px);
    padding: 16px;
    overflow-y: auto;
    background: var(--panel);
    box-shadow: 0 0 48px rgb(0 0 0 / 50%);
    animation: drawerIn var(--t-move) var(--ease) both;
  }
  .mobile-nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 0 0 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
  }
  .mobile-nav-close {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    color: var(--text-dim);
    background: var(--panel-2);
    font-size: 14px;
    font-weight: 500;
    transition:
      background var(--t-color) var(--ease),
      color var(--t-color) var(--ease);
  }
  .mobile-nav-close:hover {
    background: var(--panel-3);
    color: var(--text);
  }
  .mobile-nav-drawer nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px;
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    transition:
      background var(--t-color) var(--ease),
      color var(--t-color) var(--ease);
  }
  .mobile-nav-link:hover {
    color: var(--text);
    background: var(--panel-2);
  }
  .mobile-nav-link.active,
  .mobile-nav-link[aria-current="page"] {
    color: var(--text);
    background: var(--panel-3);
  }
  .mobile-nav-link svg {
    width: 16px;
    height: 16px;
  }
  /* Links arrive one after another, 60ms apart, capped at 360ms */
  .mobile-nav-drawer:not([hidden]) .mobile-nav-link {
    animation: linkIn var(--t-move) var(--ease) both;
  }
  .mobile-nav-link:nth-child(2) {
    animation-delay: 60ms;
  }
  .mobile-nav-link:nth-child(3) {
    animation-delay: 120ms;
  }
  .mobile-nav-link:nth-child(4) {
    animation-delay: 180ms;
  }
  .mobile-nav-link:nth-child(5) {
    animation-delay: 240ms;
  }
  .mobile-nav-link:nth-child(6) {
    animation-delay: 300ms;
  }
  .mobile-nav-link:nth-child(n + 7) {
    animation-delay: 360ms;
  }
}

@media (max-width: 820px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    max-height: 280px;
  }
  .main {
    padding: 24px 16px 64px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .lookup-page {
    padding: 16px 16px 64px;
  }
  .topbar {
    gap: 8px;
    padding: 0 16px;
  }
  .topbar-brand {
    gap: 8px;
    margin-right: 0;
  }
  .home-page {
    width: min(100% - 32px, 700px);
    padding: 24px 0 48px;
  }
  .home-hero {
    padding: 24px 16px;
  }
  .home-hero h1 {
    font-size: 24px;
    line-height: 32px;
  }
  .home-hero-mark {
    width: 40px;
    height: 40px;
  }
  .home-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .home-action {
    min-height: 80px;
    padding: 12px 16px;
  }
  .home-section {
    margin-top: 24px;
  }
  .topbar-user .name {
    max-width: 56px;
  }
}

@media (max-width: 380px) {
  .topbar {
    gap: 8px;
    padding: 0 8px;
  }
  .acct-btn .name {
    display: none;
  }
  .acct-btn {
    gap: 4px;
    padding-right: 4px;
  }
  .mobile-nav-toggle {
    min-width: 72px;
    padding: 0 8px;
  }
}

/* Reduced motion: keep the content, drop the travel, fade instead */
@media (prefers-reduced-motion: reduce) {
  .login-card > *,
  #view.entering,
  .toast,
  .mobile-nav-drawer,
  .mobile-nav-drawer:not([hidden]) .mobile-nav-link {
    animation-name: fadeIn;
    animation-delay: 0ms;
  }
}

/* Greed-inspired dashboard shell */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  background: #0a0a0a;
}
.shell > .sidebar {
    width: 248px;
    height: 100vh;
    position: sticky;
    top: 0;
    flex: 0 0 248px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 12px 12px;
    background: #0a0a0a;
    border-right: 1px solid #171717;
    z-index: 60;
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 0 8px;
  }
  .sidebar-brand img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
  }
  .sidebar-brand span,
  .profile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }
  .sidebar-brand strong {
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
  }
  .sidebar-brand small {
    color: var(--text-dimmer);
    font-size: 11px;
    line-height: 16px;
  }
  .sidebar-nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    overflow: auto;
  }
  .sidebar-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 500;
    transition:
      background var(--t-color) var(--ease),
      color var(--t-color) var(--ease);
  }
  .sidebar-link svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
  }
  .sidebar-link:hover {
    color: #fff;
    background: #111;
  }
  .sidebar-link.active,
  .sidebar-link[aria-current="page"] {
    color: #fff;
    background: #171717;
  }
  .sidebar-link.seasonal {
    color: #b7d7c2;
  }
  .sidebar-link.seasonal svg {
    color: #d67572;
  }
  .sidebar-link.seasonal:hover,
  .sidebar-link.seasonal.active {
    color: #e4f2e8;
    background: #142019;
  }
  .sidebar-account {
    position: relative;
    padding-top: 10px;
    border-top: 1px solid #171717;
  }
  .profile-nameplate {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    position: relative;
    isolation: isolate;
    text-align: left;
    border-radius: 6px;
    background: #101010;
    transition: background var(--t-color) var(--ease);
  }
  .profile-nameplate[data-nameplate-palette="crimson"] { background-color: #3b2027; }
  .profile-nameplate[data-nameplate-palette="berry"] { background-color: #382032; }
  .profile-nameplate[data-nameplate-palette="sky"] { background-color: #203344; }
  .profile-nameplate[data-nameplate-palette="teal"] { background-color: #1d3836; }
  .profile-nameplate[data-nameplate-palette="forest"] { background-color: #26352a; }
  .profile-nameplate[data-nameplate-palette="bubble_gum"] { background-color: #3c2637; }
  .profile-nameplate[data-nameplate-palette="violet"] { background-color: #30243c; }
  .profile-nameplate[data-nameplate-palette="cobalt"] { background-color: #222b41; }
  .profile-nameplate[data-nameplate-palette="clover"] { background-color: #24352b; }
  .profile-nameplate[data-nameplate-palette="lemon"] { background-color: #403c22; }
  .profile-nameplate[data-nameplate-palette="white"] { background-color: #323232; }
  .profile-nameplate-art {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    pointer-events: none;
  }
  .profile-nameplate.has-nameplate::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
    background: rgb(0 0 0 / 48%);
    content: "";
    pointer-events: none;
  }
  .profile-nameplate:hover,
  .profile-nameplate[aria-expanded="true"] {
    background: #151515;
  }
  .profile-nameplate > .profile-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    background: #222;
  }
  .profile-nameplate > i {
    position: relative;
    z-index: 2;
    margin-left: auto;
    color: #777;
    flex: 0 0 auto;
  }
  .profile-copy {
    flex: 1;
    position: relative;
    z-index: 2;
  }
  .profile-copy strong {
    overflow: hidden;
    color: #f2f2f2;
    font-size: 12px;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-copy small {
    overflow: hidden;
    color: #888;
    font-size: 11px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-roles {
    display: flex;
    gap: 4px;
    margin-top: 4px;
  }
  .profile-roles span {
    max-width: 88px;
    overflow: hidden;
    padding: 1px 5px;
    border-radius: 3px;
    background: #202020;
    color: #aaa;
    font-size: 9px;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar-account .acct-menu {
    top: auto;
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
  }
  .main-panel {
    min-width: 0;
    min-height: 100vh;
    flex: 1;
  }
  .shell-body {
    min-height: 100vh;
  }
  .mobile-topbar {
    display: none;
  }
  .mobile-nav-toggle {
    display: none;
  }
  .mobile-nav-backdrop {
    display: none;
  }

@media (max-width: 900px) {
  .shell > .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: min(84vw, 300px);
      height: 100dvh;
      padding-top: 16px;
      transform: translateX(-102%);
      transition: transform 220ms var(--ease);
    }
  .shell > .sidebar.open {
    transform: translateX(0);
  }
  .mobile-nav-backdrop:not([hidden]) {
      display: block;
      position: fixed;
      inset: 0;
      z-index: 59;
      background: rgb(0 0 0 / 65%);
    }
  .mobile-topbar {
      position: sticky;
      top: 0;
      z-index: 40;
      height: 56px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 16px;
      background: #0a0a0a;
      border-bottom: 1px solid #171717;
      color: #ddd;
      font-size: 13px;
      font-weight: 500;
    }
  .mobile-nav-toggle {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border-radius: 6px;
      background: #151515;
    }
  .main-panel,
  .shell-body {
      width: 100%;
      min-height: calc(100vh - 56px);
    }
}

@media (prefers-reduced-motion: reduce) {
  .shell > .sidebar {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spin-ic,
  .skeleton {
    animation: none;
    opacity: 0.6;
  }
  .discord-btn:active,
  .btn:active {
    transform: none;
  }
}
