/* Destiny Matrix tool styles (assets/css/matrix.css)
 * Self-contained: every class matrix-ui.js relies on is defined here.
 * Mobile-first; the chart scales via viewBox, never fixed pixels.
 * Palette: warm parchment / ink, no external assets.
 */

/* ------------------------------------------------------------------ */
/* Star chart                                                          */
/* ------------------------------------------------------------------ */
.dm-chart-svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

.dm-star-square {
  fill: none;
  stroke: #8a7a5b;
  stroke-width: 1.5;
}

.dm-star-diagonal {
  stroke: #a08c64;
}

.dm-axis-line {
  stroke: #c9bfa8;
  stroke-width: 1;
}

.dm-point {
  cursor: pointer;
  outline: none;
}

.dm-point-circle {
  fill: #fdf9ef;
  stroke: #8a7a5b;
  stroke-width: 1.5;
}

.dm-point-centre .dm-point-circle {
  fill: #f3e7c8;
}

.dm-point-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 700;
  fill: #3a2f1d;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.dm-point-centre .dm-point-text {
  font-size: 19px;
}

.dm-point:hover .dm-point-circle,
.dm-point:focus-visible .dm-point-circle {
  fill: #e8d9ae;
  stroke: #6b5320;
}

.dm-point:focus-visible .dm-point-circle {
  stroke-width: 2.5;
}

.dm-point-active .dm-point-circle {
  fill: #d9b45b;
  stroke: #6b5320;
  stroke-width: 2;
}

/* ------------------------------------------------------------------ */
/* Point detail panel                                                  */
/* ------------------------------------------------------------------ */
.dm-point-detail {
  max-width: 560px;
  margin: 1rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid #c9bfa8;
  border-radius: 8px;
  background: #fdf9ef;
}

.dm-point-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.dm-point-number {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.dm-point-keywords {
  margin: 0 0 0.5rem;
  font-style: italic;
  color: #5c4f35;
}

.dm-point-meaning {
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.dm-point-compat {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #c9bfa8;
}

.dm-point-compat p {
  margin: 0.25rem 0;
}

.dm-point-calc {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #c9bfa8;
}

.dm-point-calc h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.dm-point-calc p {
  margin: 0.25rem 0;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Reading sections                                                    */
/* ------------------------------------------------------------------ */
.dm-sections-title,
.dm-chakra-title,
.dm-timeline-title,
.dm-calc-title {
  margin: 2rem 0 1rem;
  font-size: 1.3rem;
}

.dm-section {
  margin: 0 0 0.5rem;
  border: 1px solid #ddd2b8;
  border-radius: 8px;
  background: #fffdf7;
}

.dm-section-summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.dm-section-summary:focus-visible {
  outline: 2px solid #6b5320;
  outline-offset: 2px;
  border-radius: 8px;
}

.dm-section-intro {
  margin: 0 1rem 0.75rem;
  color: #5c4f35;
  line-height: 1.55;
}

.dm-section-body {
  padding: 0 1rem 1rem;
  line-height: 1.55;
}

.dm-section-body p {
  margin: 0 0 0.5rem;
}

.dm-arcana-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.dm-line-numbers {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.dm-line-item {
  margin: 0.25rem 0;
}

.dm-karmic-code {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dm-age-cycle-now {
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Chakra table                                                        */
/* ------------------------------------------------------------------ */
.dm-chakra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.dm-chakra-table th,
.dm-chakra-table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd2b8;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.dm-chakra-table thead th {
  background: #f3e7c8;
  font-weight: 700;
}

.dm-chakra-table tbody tr:nth-child(even) {
  background: #fdf9ef;
}

.dm-chakra-name strong {
  display: block;
}

.dm-chakra-sanskrit {
  color: #5c4f35;
  font-style: italic;
}

.dm-chakra-desc {
  display: block;
  margin-top: 0.25rem;
  color: #5c4f35;
}

.dm-chakra-note,
.dm-age-note,
.dm-calc-intro {
  margin-top: 0.75rem;
  color: #5c4f35;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/* Age timeline                                                        */
/* ------------------------------------------------------------------ */
.dm-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .dm-timeline {
    grid-template-columns: repeat(8, 1fr);
  }
}

.dm-age-cell {
  padding: 0.5rem 0.25rem;
  border: 1px solid #ddd2b8;
  border-radius: 6px;
  background: #fffdf7;
  text-align: center;
}

.dm-age-label {
  display: block;
  font-size: 0.85rem;
  color: #5c4f35;
}

.dm-age-arcana {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

.dm-age-marker {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b5320;
}

.dm-age-now {
  border-color: #6b5320;
  border-width: 2px;
  background: #f3e7c8;
}

/* ------------------------------------------------------------------ */
/* All calculations                                                    */
/* ------------------------------------------------------------------ */
.dm-calc-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.dm-calc-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee5cc;
  line-height: 1.5;
}

.dm-calc-point {
  flex: 0 0 1.5rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid #8a7a5b;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
}

.dm-calc-formula {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
}

.dm-calc-working {
  flex: 1 1 100%;
  color: #5c4f35;
}

.dm-calc-result {
  margin-left: auto;
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Print                                                               */
/* ------------------------------------------------------------------ */
@media print {
  .dm-point {
    cursor: default;
  }
}
