.content-directory {
  position: sticky;
  top: 108px;
  z-index: 8;
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: rgba(18, 13, 12, 0.9);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.content-directory::-webkit-scrollbar {
  display: none;
}

.content-directory a {
  min-height: 42px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.content-directory a:hover,
.content-directory a:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
}

.reference-split,
.data-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.reference-panel,
.table-panel {
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.reference-panel h3,
.table-panel h3 {
  margin: 0 0 16px;
}

.reward-grid {
  display: grid;
  gap: 14px;
}

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

.reference-card {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(240, 75, 55, 0.1), transparent 38%),
    var(--panel);
}

.reference-card h3,
.reference-card p {
  margin: 0;
}

.reference-card h3 {
  margin-top: 18px;
}

.reference-card p {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.7;
}

.reference-index {
  display: inline-flex;
  min-width: 34px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.reference-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reference-detail {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.reference-detail summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.reference-detail summary::-webkit-details-marker {
  display: none;
}

.reference-detail summary strong,
.reference-detail summary small {
  display: block;
}

.reference-detail summary small {
  margin-top: 4px;
  color: var(--muted);
}

.reference-price {
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: right;
}

.reference-detail > p {
  margin: 0;
  padding: 0 14px 16px 60px;
  color: var(--text-soft);
  line-height: 1.7;
}

.reference-profile {
  padding: 0 14px 18px 60px;
}

.reference-profile > p,
.reference-profile-section h4 {
  margin: 0;
}

.reference-profile > p,
.reference-profile-list {
  color: var(--text-soft);
  line-height: 1.65;
}

.reference-profile-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
}

.reference-profile-section h4 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 0.9rem;
}

.reference-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reference-profile-stats span {
  padding: 7px 9px;
  border: 1px solid rgba(230, 179, 94, 0.3);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: 0.82rem;
}

.reference-profile-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.reference-profile-list strong {
  color: var(--gold);
}

.reference-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  line-height: 1.65;
}

.reference-list-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-reference-list {
  display: grid;
  gap: 18px;
}

.mode-reference-section {
  scroll-margin-top: 112px;
  margin-top: 22px;
  padding: 28px 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(27, 20, 18, 0.94), rgba(12, 9, 8, 0.96)),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

.mode-reference-section > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.mode-reference-section h2,
.mode-reference-section h3,
.mode-reference-section p {
  margin: 0;
}

.mode-reference-section > p {
  max-width: 840px;
  margin-top: 18px;
  color: var(--text-soft);
  line-height: 1.75;
}

.mode-reference-tag {
  margin-top: 8px !important;
  color: var(--gold);
  font-weight: 800;
}

.duration-badge {
  padding: 9px 12px;
  border: 1px solid rgba(230, 179, 94, 0.2);
  border-radius: var(--radius-sm);
  color: var(--gold);
  white-space: nowrap;
}

.mode-reference-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.mode-reference-columns h3 {
  margin-bottom: 12px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.role-card {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.role-card strong,
.role-card span {
  display: block;
}

.role-card span {
  margin-top: 5px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
}

.role-card p {
  margin-top: 12px;
  color: var(--text-soft);
  line-height: 1.65;
}

.table-panel {
  margin-top: 18px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
}

.data-table th {
  color: var(--gold);
  font-size: 0.86rem;
}

.data-table td {
  color: var(--text-soft);
}

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

@media (max-width: 860px) {
  .content-directory {
    position: static;
  }

  .reference-split,
  .data-table-grid,
  .reference-details,
  .reference-list-wide,
  .mode-reference-columns,
  .reference-grid,
  .role-grid {
    grid-template-columns: 1fr;
  }

  .reference-detail summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .reference-price {
    grid-column: 2;
    text-align: left;
  }

  .reference-detail > p {
    padding-left: 14px;
  }

  .reference-profile {
    padding-left: 14px;
  }

  .mode-reference-section > header {
    flex-direction: column;
  }
}
