/* Index page — catalog of learning units (extends nibble.css) */

a { color: inherit; text-decoration: none; }

.screen--index {
  min-height: 100vh;
  padding: 20px 16px 40px;
}

.hero {
  text-align: center;
  padding: 28px 8px 24px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.6;
}

.section-label--index {
  padding: 0 4px;
  margin-bottom: 12px;
}

.nibbles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nibble-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.nibble-card:not(.disabled):active { transform: scale(0.98); }

.nibble-card:not(.disabled):hover {
  background: var(--card-hover);
  border-color: var(--border2);
}

.nibble-card.disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.nibble-inner { padding: 18px; }

.nibble-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  position: relative;
}

.nibble-xp {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.nibble-xp .icon {
  margin-right: 2px;
}

.nibble-emoji {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.nibble-meta { flex: 1; min-width: 0; }

.nibble-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.nibble-tagline {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.45;
}

.nibble-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 14px;
}

.nibble-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.nibble-footer-progress {
  flex: 1;
  min-width: 0;
}

.nibble-progress {
  margin-top: 8px;
}

.nibble-stats {
  font-size: 11px;
  color: var(--text2);
}

.nibble-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-open { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.badge-progress { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.badge-soon { background: rgba(255, 255, 255, 0.06); color: var(--text3); }

.progress-bar-track--index {
  width: 100%;
}

.progress-text--index {
  margin-top: 5px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text2);
  font-size: 14px;
}
