/* HikmahMatrix v4.0 — Step 54 Codices & Quad-Corpus Atlas Styles */
.hm-atlas-controls {
  background: #f5f0e6;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.hm-codices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.1rem;
}

.hm-codex-card {
  background: #ffffff;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hm-codex-card:hover {
  border-color: #0f4c5c;
}

.hm-codex-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hm-codex-title {
  margin: 0.25rem 0 0;
  font-size: 1.08rem;
  line-height: 1.35;
  color: #1c1917;
}

.hm-codex-alt {
  margin: 0;
  font-size: 0.8rem;
  color: #57534e;
}

.hm-codex-author {
  margin: 0;
  font-size: 0.88rem;
  color: #0f4c5c;
}

.hm-codex-survey {
  background: #faf8f5;
  border: 1px solid #e7e2d8;
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.hm-codex-survey summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f4c5c;
}

.hm-codex-survey ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.is-selected-pillar {
  border: 2px solid #0f4c5c !important;
  background: #f0f9ff !important;
}
