/* Base */
:root {
  color-scheme: dark;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --brand-color: #06b6d4;
  --bg: #111827;
  --surface: #1f2937;
  --surface-hover: #374151;
  --border: #374151;
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --brand-text: #22d3ee;
}

html {
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3 {
  margin: 0;
  font-weight: 600;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Header */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.logoDot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--brand-color);
  border-radius: 9999px;
}

.brandTitle {
  font-weight: 600;
  font-size: 1.125rem;
}

.brandSub {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.nav {
  display: flex;
  gap: 1rem;
  margin: -0.25rem;
  flex-wrap: wrap;
}

.navLink {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.navLink:hover {
  color: var(--text);
}

.navLink[aria-current="page"] {
  color: var(--brand-text);
}

.toolbar {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Components */
.pill {
  background: var(--surface);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  cursor: pointer;
}

.chip:hover {
  background: var(--surface-hover);
}

.chip input {
  margin: 0;
}

.btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn:hover {
  background: var(--surface-hover);
}

.closeBtn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.closeBtn:hover {
  color: var(--text);
}

/* Hero */
.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  margin: 0;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Empty States */
.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-text {
  max-width: 20rem;
  margin: 0 auto;
}

/* Responsive */
@media (min-width: 768px) {
  .topbar {
    padding: 1rem 2rem;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav {
    margin: 0;
  }

  .toolbar {
    margin-top: 0;
  }

  .wrap {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
  }
}
