/* ─────────────────────────────────────────────────────────────
   Explorer surfaces — repo cards, sidebar, tables, code, forms.
   The corporate card language: 14px radius, 1px #1e1e1e hairline,
   #0a0a0a surface, one accent hairline on hover, no heavy shadows.
   ───────────────────────────────────────────────────────────── */

/* ── Repo grid + cards ─────────────────────────────────── */
/* Scoped to the SvelteKit shell — the shell is the only .content that is a
   direct child of <body>. The card also contains a .content (its description);
   an unscoped rule here gave that text `order: 2` and offset it. */
body > .content[class] {
  order: 2;
  flex: 0 0 auto;
  height: auto;
  min-height: calc(100dvh - var(--global-header-height));
  background: var(--bg-deepest);
}
/* .repo-grid carries a scoped class from the bundle (gap:0); match it. */
.repo-grid[class] {
  gap: var(--space-4);
  padding: var(--space-2) var(--gutter) var(--space-6);
}
.repo-card,
.repo-card.compact {
  height: auto;
  min-height: 10rem;
  margin: 0;
  padding: var(--space-4);
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-card) 0%, #080808 100%);
  transition:
    border-color var(--rmm-dur) var(--rmm-ease),
    background var(--rmm-dur) var(--rmm-ease),
    transform var(--rmm-dur) var(--rmm-ease);
}
.repo-card .headline-and-badges {
  margin-bottom: var(--space-3);
  align-items: center;
}
.repo-card .headline-and-badges .txt-body-l-semibold {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
/* The card description is a plain flex item inside content-and-activity. */
.repo-card .content {
  order: 0;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: none;
}
.repo-card:hover {
  border-color: var(--border-glow-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.repo-avatar img,
.repo-avatar {
  border-radius: 10px;
}
.repo-info,
.repo-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-tertiary);
}
.repo-meta {
  letter-spacing: 0.01em;
}
.repo-body {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}
.repo-row {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--rmm-dur) var(--rmm-ease);
}
.repo-row:hover {
  background: var(--accent-wash);
}
.stats-row,
.stats {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  gap: 0.75rem;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar-wrapper {
  border-right: 1px solid var(--border);
  background: var(--bg-primary);
}
.sidebar,
.sidebar-content {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.sidebar h3,
.sidebar h2,
.sidebar .label,
.sidebar-item .title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sidebar-item {
  border-radius: 8px;
  transition: background var(--rmm-dur) var(--rmm-ease);
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.sidebar-item.active,
.sidebar-item[aria-current="page"] {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

/* ── Cards, panels, popovers ───────────────────────────── */
.card,
.header.svelte-1p6926j {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.card-header {
  border-bottom: 1px solid var(--border);
}
.popover-content,
.dropdown,
.dropdown-header {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lift);
}
.header-layout {
  border-bottom: 1px solid var(--border);
}
