/* mineralogy.php: the All / A-Z bar, the list of minerals at the left and the description pane at the right. It borrows the Sky Calendar's
   light band (css/sky-calendar.css, "sc-") and adds what is its own ("mn-"). Tokens only; the forest light band turns --bone, --frost,
   --gold and --line dark on cream by itself. Like every content page it fills the content width: no narrow column. */

.mn-wrap .sc-lead, .mn-wrap .sc-note { max-width: none; }

/* search box above the letter bar, full width */
.mn-searchbar { margin: 0 0 16px; }
.mn-search { display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: calc(1rem * var(--text-scale)); }
.mn-none { margin: 12px 0 0; font-size: calc(0.875rem * var(--text-scale)); font-style: italic; color: var(--frost); }

/* All / A-Z bar: one row on a wide screen, wraps on a narrow one */
.mn-az { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 24px; }
.mn-letter { flex: 1 1 34px; min-height: 40px; padding: 4px 6px; cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: var(--btn-radius-sm);
  color: var(--bone); font-family: var(--font-heading); font-size: calc(0.875rem * var(--text-scale)); letter-spacing: 0.04em; }
.mn-letter[data-l=""] { flex: 1.8 1 60px; letter-spacing: 0.1em; text-transform: uppercase; font-size: calc(0.75rem * var(--text-scale)); }
.mn-letter:hover:not(:disabled) { background: rgba(var(--gold-rgb), 0.14); border-color: var(--gold); }
.mn-letter.is-on { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
.mn-letter:disabled { opacity: 0.35; cursor: default; }

/* list at the left, description at the right */
.mn-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 36px; align-items: start; }
.mn-listcol { position: sticky; top: 90px; }
.mn-count { margin: 0 0 8px; font-size: calc(0.75rem * var(--text-scale)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--frost); }
.mn-list { margin: 0; padding: 0; list-style: none; max-height: calc(100vh - 190px); min-height: 200px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mn-list li { margin: 0; border-bottom: 1px solid var(--line); }
.mn-list li:last-child { border-bottom: 0; }
.mn-list li[hidden] { display: none; }
.mn-list a { display: block; padding: 10px 12px; font-size: calc(0.9375rem * var(--text-scale)); line-height: 1.35; color: var(--bone); text-decoration: none; }
.mn-list a:hover { background: rgba(var(--gold-rgb), 0.12); }
.mn-list a[aria-current] { background: rgba(var(--gold-rgb), 0.2); color: var(--gold); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }

.mn-pane { min-width: 0; min-height: 320px; scroll-margin-top: 90px; outline: none; }
.mn-hint { margin: 0; padding: 40px 0; font-style: italic; color: var(--frost); }
.mn-pane[aria-busy="true"] { opacity: 0.6; }

.mn-name { margin: 0 0 6px; font-family: var(--font-heading); font-weight: 400; font-size: calc(1.875rem * var(--text-scale)); line-height: 1.2; color: var(--gold); }
.mn-tag { margin: 0 0 6px; font-family: var(--font-heading); font-size: calc(1.0625rem * var(--text-scale)); color: var(--bone); }
.mn-alias { margin: 0 0 4px; font-size: calc(0.84375rem * var(--text-scale)); font-style: italic; color: var(--frost); }
.mn-h { margin: 28px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--font-heading); font-weight: 400; font-size: calc(1rem * var(--text-scale));
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); }
.mn-p { margin: 0 0 12px; font-size: calc(0.9375rem * var(--text-scale)); line-height: 1.7; color: var(--bone); }
.mn-points, .mn-facts, .mn-bul { margin: 0 0 12px; padding-left: 20px; font-size: calc(0.9375rem * var(--text-scale)); line-height: 1.65; color: var(--bone); }
.mn-points li, .mn-facts li, .mn-bul li { margin: 0 0 6px; }
.mn-fact b { color: var(--bone); }
.mn-sec { margin: 0 0 8px; }
.mn-sech { margin: 14px 0 4px; font-family: var(--font-heading); font-weight: 400; font-size: calc(0.9375rem * var(--text-scale)); letter-spacing: 0.04em; color: var(--gold); }
.mn-bul { list-style: disc; }

/* the stone's photo at the top right of the description, the text wrapping round it. Headings and lists beside it are their own
   block formatting context (flow-root), so their rule lines and bullets stop at the photo instead of running under it. */
.mn-fig { float: right; width: min(40%, 380px); margin: 4px 0 18px 28px; }
.mn-img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; background: rgba(var(--gold-rgb), 0.06);
  border: 1px solid var(--line); border-radius: var(--card-radius-sm); }
.mn-cap { margin: 6px 0 0; font-size: calc(0.71875rem * var(--text-scale)); line-height: 1.45; color: var(--frost); overflow-wrap: anywhere; }
.mn-cap-x { display: block; margin: 0 0 2px; font-style: italic; }
.mn-cap a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mn-cap a:hover { color: var(--gold); }
.mn-h, .mn-points, .mn-facts, .mn-bul { display: flow-root; }

@media (max-width: 900px) {
  .mn-body { grid-template-columns: 1fr; gap: 24px; }
  .mn-listcol { position: static; }
  .mn-list { max-height: 260px; }
}
@media (max-width: 600px) {
  .mn-letter { min-height: 44px; flex-basis: 40px; }
  .mn-name { font-size: calc(1.5rem * var(--text-scale)); }
  .mn-fig { float: none; width: 100%; margin: 0 0 16px; }
  .mn-img { max-height: 340px; }
}

/* On a stone's own address the encyclopedia's title is a link back to the whole list (the stone's name is the h1). */
.mn-home { color: inherit; text-decoration: none; }
.mn-home:hover, .mn-home:focus-visible { text-decoration: underline; }

/* ---- chakra / zodiac collections (2026-10-23): /crystals/chakra/<x>, /crystals/zodiac/<x> ---- */
.mn-col-title { margin: 6px 0 10px; font-family: var(--font-heading); font-weight: 400; font-size: calc(1.875rem * var(--text-scale)); line-height: 1.2; color: var(--gold); }
.mn-col-sub { margin: 36px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-heading); font-weight: 400; font-size: calc(1.125rem * var(--text-scale)); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.mn-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.mn-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--card-bg); overflow: hidden; }
.mn-card-link { display: block; text-decoration: none; color: inherit; }
.mn-card-link:hover .mn-card-name, .mn-card-link:focus-visible .mn-card-name { text-decoration: underline; }
.mn-card-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: rgba(var(--gold-rgb), 0.08); }
.mn-card-noimg { background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.16), rgba(var(--gold-rgb), 0.04)); }
.mn-card-name { display: block; padding: 12px 14px 2px; font-family: var(--font-heading); font-size: calc(1.0625rem * var(--text-scale)); color: var(--gold); }
.mn-card-tag { margin: 0; padding: 0 14px; font-size: calc(0.8125rem * var(--text-scale)); font-style: italic; color: var(--frost); }
.mn-card-line { margin: 8px 0 0; padding: 0 14px 14px; font-size: calc(0.8125rem * var(--text-scale)); line-height: 1.55; color: var(--bone); }
/* "browse by" links and the stone page's chakra / zodiac chips */
.mn-browse { margin: 18px 0 6px; display: grid; gap: 12px; }
.mn-col-sub + .mn-cards + .mn-browse, .mn-cards + .mn-browse { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.mn-browse-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.mn-browse-h { margin: 0; min-width: 120px; font-family: var(--font-heading); font-weight: 400; font-size: calc(0.75rem * var(--text-scale)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--frost); }
.mn-browse-list, .mn-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mn-tags { margin: 10px 0 0; }
.mn-chip { display: inline-block; min-height: 24px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: calc(0.8125rem * var(--text-scale)); line-height: 1.3; color: var(--bone); text-decoration: none; }
a.mn-chip:hover, a.mn-chip:focus-visible { border-color: var(--gold); color: var(--gold); }
.mn-chip.is-on { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
.mn-chip-plain { color: var(--frost); }
@media (max-width: 600px) {
  .mn-col-title { font-size: calc(1.5rem * var(--text-scale)); }
  .mn-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .mn-card-line { display: none; }   /* phones: photo, name and tagline; the stone's page has the rest */
  .mn-browse-h { min-width: 0; width: 100%; }
}
