.openings-main-section {
  padding: 4rem 0 6rem;
}

.openings-container {
  max-width: 1320px;
}

.openings-heading {
  max-width: 900px;
  margin-inline: auto;
}

.openings-heading h1 {
  margin-bottom: 0.75rem;
  font-size: var(--font-size-4xl);
  font-weight: 900;
  line-height: 1.25;
}

.reference-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.65rem;
  max-width: 780px;
  margin: 1.35rem auto 0;
  padding: 0.85rem 1rem;
  border-inline-start: 3px solid #46c98b;
  background: rgba(70, 201, 139, 0.06);
  text-align: start;
}

.reference-note > span {
  color: #46c98b;
  font-weight: 900;
}

.reference-note p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.openings-filter {
  margin-bottom: 2rem;
}

.openings-filter .filter-btn {
  border-radius: 6px;
}

.openings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.theory-card {
  min-height: 390px;
  padding: 1.25rem;
  gap: 1rem;
  border-radius: 8px;
  background: rgba(22, 27, 39, 0.92);
  box-shadow: none;
}

.theory-card:hover,
.theory-card:focus-visible {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  outline: none;
}

.opening-card-top,
.opening-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.theory-card .oc-level {
  margin: 0;
  border-radius: 6px;
}

.opening-card-copy {
  flex: 1;
}

.opening-card-copy h2 {
  min-height: 2.8em;
  margin-bottom: 0.55rem;
  font-size: var(--font-size-xl);
  font-weight: 800;
  line-height: 1.4;
}

.opening-card-copy p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.opening-line-block {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0;
  border-block: 1px solid var(--border);
}

.opening-line-block > span {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.opening-line-block .opening-line {
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.opening-focus {
  min-height: 3.2em;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.opening-focus span {
  color: var(--gold);
  font-weight: 800;
}

.opening-card-footer {
  padding-top: 0.25rem;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.opening-card-arrow {
  color: var(--gold);
  font-size: var(--font-size-lg);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.pagination a {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
}

.pagination a.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #111318;
}

@media (max-width: 1040px) {
  .openings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .openings-main-section {
    padding: 2.75rem 0 4rem;
  }

  .openings-heading h1 {
    font-size: var(--font-size-3xl);
  }

  .openings-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .openings-filter .filter-btn {
    width: 100%;
    text-align: center;
  }

  .openings-grid {
    grid-template-columns: 1fr;
  }

  .theory-card {
    min-height: 0;
  }

  .opening-card-copy h2,
  .opening-focus {
    min-height: 0;
  }
}
