/* Mortui Vivos Docent — Typography & Styling
   Design principles: Typography-first. The document is the evidence. */

/* ============================================================
   1. TYPOGRAPHY SCALE & RHYTHM
   ============================================================ */

/* Tighter, more authoritative headings */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.4em;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid rgba(255, 23, 68, 0.15);
}

.md-typeset h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: 1.6em;
}

.md-typeset h4 {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.82em;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1.4em;
}

[data-md-color-scheme="default"] .md-typeset h4 {
  color: rgba(0, 0, 0, 0.55);
}

/* Better reading rhythm */
.md-typeset p {
  line-height: 1.75;
  margin-bottom: 1.1em;
}

.md-typeset li {
  line-height: 1.65;
  margin-bottom: 0.3em;
}

/* ============================================================
   2. HEADER
   ============================================================ */

.md-header {
  background-color: rgba(30, 0, 0, 0.95);
}

/* ============================================================
   3. HORIZONTAL RULES — subtle red accent
   ============================================================ */

.md-typeset hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 23, 68, 0.5) 0%,
    rgba(255, 23, 68, 0.15) 50%,
    transparent 100%
  );
  margin: 2.5em 0;
}

/* ============================================================
   4. BLOCKQUOTES — impactful testimony
   ============================================================ */

.md-typeset blockquote {
  border-left: 4px solid #ff1744;
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  background: rgba(255, 23, 68, 0.04);
  border-radius: 0 4px 4px 0;
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background: rgba(255, 23, 68, 0.06);
}

.md-typeset blockquote p {
  line-height: 1.6;
}

/* Nested quotes (eyewitness testimony) — make them hit harder */
.md-typeset blockquote strong {
  color: #ff1744;
}

/* ============================================================
   5. TABLES — cleaner, more readable
   ============================================================ */

.md-typeset table:not([class]) {
  font-size: 0.82rem;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

[data-md-color-scheme="default"] .md-typeset table:not([class]) {
  border-color: rgba(0, 0, 0, 0.08);
}

/* Header row */
.md-typeset table:not([class]) thead th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72em;
  letter-spacing: 0.06em;
  padding: 0.9em 1em;
  background: rgba(255, 23, 68, 0.08);
  border-bottom: 2px solid rgba(255, 23, 68, 0.2);
}

/* Zebra striping */
.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

[data-md-color-scheme="default"] .md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* Row hover */
.md-typeset table:not([class]) tbody tr:hover {
  background: rgba(255, 23, 68, 0.06);
}

/* Cell padding */
.md-typeset table:not([class]) td {
  padding: 0.7em 1em;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

[data-md-color-scheme="default"] .md-typeset table:not([class]) td {
  border-top-color: rgba(0, 0, 0, 0.05);
}

/* Victim name styling — second column in dossier tables */
.md-typeset table td:nth-child(1) a,
.md-typeset table td:nth-child(2) {
  font-weight: 600;
}

/* ============================================================
   6. CONFIDENCE BADGES — inline color coding
   ============================================================ */

/* Color-code confidence/status text in tables */
.md-typeset table td:last-child {
  font-weight: 500;
}

.status-verified, .status-confirmed {
  color: #00c853;
  font-weight: bold;
}

.status-pending {
  color: #ffd600;
  font-weight: bold;
}

.status-disputed {
  color: #ff6d00;
  font-weight: bold;
}

/* Bold "HOMICIDE" and key findings in tables */
.md-typeset table td strong {
  color: #ff1744;
}

/* ============================================================
   7. ADMONITIONS — refined
   ============================================================ */

/* Danger box — the numbers */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-color: #ff1744;
  background: rgba(255, 23, 68, 0.06);
}

.md-typeset .admonition.danger .admonition-title,
.md-typeset details.danger summary {
  background: rgba(255, 23, 68, 0.12);
}

/* Quote admonition — principles, epitaphs */
.md-typeset .admonition.quote,
.md-typeset details.quote {
  border-left-color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.md-typeset .admonition.quote p,
.md-typeset details.quote p {
  font-size: 1.05em;
  line-height: 1.7;
}

/* Info box — weekly reports */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: rgba(255, 109, 0, 0.6);
}

/* ============================================================
   8. DOSSIER METADATA — the header block
   ============================================================ */

/* Style the metadata block at top of dossier pages
   (Date of Research, Researcher, Subject, Type, Confidence) */
.md-typeset h1 + p strong:first-child {
  display: inline-block;
}

/* When there are multiple bold lines after H1, style as metadata */
.md-typeset h1 + p {
  font-size: 0.88em;
  line-height: 2;
  padding: 0.8em 1em;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 23, 68, 0.4);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.5em;
}

[data-md-color-scheme="default"] .md-typeset h1 + p {
  background: rgba(0, 0, 0, 0.03);
}

/* ============================================================
   9. DOSSIER CARDS
   ============================================================ */

.dossier-card {
  border: 1px solid rgba(255, 23, 68, 0.3);
  border-radius: 8px;
  padding: 1em;
  margin: 0.5em 0;
  transition: border-color 0.2s;
}

.dossier-card:hover {
  border-color: rgba(255, 23, 68, 0.8);
}

/* ============================================================
   10. SOURCE LISTS — better spacing
   ============================================================ */

/* Numbered source lists at bottom of dossiers */
.md-typeset ol {
  padding-left: 1.8em;
}

.md-typeset ol li {
  margin-bottom: 0.6em;
  padding-left: 0.3em;
  line-height: 1.6;
}

/* Source links */
.md-typeset ol li a {
  font-weight: 600;
}

/* Description after the link */
.md-typeset ol li a + em,
.md-typeset ol li a ~ span {
  opacity: 0.8;
  font-size: 0.92em;
}

/* ============================================================
   11. LINKS
   ============================================================ */

/* Make links more visible without being garish */
.md-typeset a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.md-typeset a:hover {
  text-decoration-thickness: 2px;
}

/* ============================================================
   12. PIPELINE VISUALIZATION
   ============================================================ */

.pipeline-arrow {
  text-align: center;
  font-size: 2em;
  color: #ff1744;
  margin: 0.5em 0;
}

/* ============================================================
   13. FOOTER
   ============================================================ */

.md-copyright {
  font-size: 0.9rem;
}

.md-copyright em {
  color: #ff1744;
}

/* ============================================================
   14. NAVIGATION SIDEBAR — reduce visual weight
   ============================================================ */

/* Tighten sidebar entries */
.md-nav__item {
  padding: 0;
}

.md-nav__link {
  font-size: 0.82rem;
}

/* Active page indicator */
.md-nav__link--active {
  font-weight: 700;
  border-left: 2px solid #ff1744;
  padding-left: 0.6em;
}

/* ============================================================
   15. PRINT STYLES
   ============================================================ */

@media print {
  .md-typeset h1 { font-size: 24pt; }
  .md-typeset h2 { font-size: 18pt; border-bottom-color: #333; }
  .md-typeset table td strong { color: #000; }
  .md-typeset blockquote { border-left-color: #333; }
  .md-typeset hr { background: #ccc; }
}

/* ============================================================
   16. MAP CONTAINERS
   ============================================================ */

.map-container {
  margin: 1.5em 0;
  border: 1px solid rgba(255, 23, 68, 0.15);
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a2e;
}

.map-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* Light mode: invert the dark SVG maps */
[data-md-color-scheme="default"] .map-container {
  background: #e8e8f0;
}

[data-md-color-scheme="default"] .map-container img {
  filter: invert(0.85) hue-rotate(180deg);
}

/* Caption text below maps */
.map-container + .map-caption,
.map-caption {
  text-align: center;
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: -0.5em;
  margin-bottom: 1.5em;
}

[data-md-color-scheme="default"] .map-caption {
  color: rgba(0, 0, 0, 0.45);
}

/* ============================================================
   17. CENTERED CLOSING STATEMENTS
   ============================================================ */

/* The closing epitaph on homepage and dossier index */
.md-typeset div[style*="text-align: center"] em {
  font-size: 1.1em;
  letter-spacing: 0.02em;
}
