.subject-nav {
  background: linear-gradient(180deg, #1f2c3a 0%, #2a3b4f 100%);
  color: #f4f6fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 0;
  z-index: 10;
}

.subject-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.subject-nav-brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #f4f6fa;
  text-decoration: none;
  margin-right: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.subject-nav-brand:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.subject-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.subject-nav-link {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d8e0eb;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.subject-nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.subject-nav-link.is-current {
  background: #ffffff;
  color: #1f2c3a;
  border-color: #ffffff;
  cursor: default;
}

.subject-nav-link.is-current:hover {
  background: #ffffff;
  color: #1f2c3a;
}

.index-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 16px 24px;
}

.index-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.index-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.index-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.index-card {
  display: block;
  padding: 24px 22px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.index-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #b9c4d2;
}

.index-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.index-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
}
