/* Clean editorial formatting for the Map side dossier + shared middle meta line on all dossiers. */

/* Middle category/locale line between ID bar and title on all dossiers (matches Map dossier). */
.codex-id-bar:has(+ .codex-dossier-meta-line) {
  margin-bottom:10px !important;
}
.codex-dossier-meta-line {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 8px;
  margin:0 0 8px;
  font-family:Interface,CodexGeometric,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  line-height:1.35;
}
html[data-display-mode="day"] .codex-dossier-meta-line {
  filter:brightness(.72) saturate(1.15);
}

/* Neat, consistent section & text formatting inside the Map side dossier panel. */
#codexMapDossier > #codexMdpBody {
  padding:18px 22px 44px;
  font-family:CodexGeometric,"Segoe UI",system-ui,sans-serif;
  font-size:14.5px;
  line-height:1.68;
}
#codexMapDossier > #codexMdpBody .codex-id-bar {
  margin:0 0 10px !important;
  font-size:12px;
}
#codexMapDossier > #codexMdpBody > h2 {
  margin:0 0 14px;
  font-size:23px;
  line-height:1.18;
  letter-spacing:.025em;
}
#codexMapDossier > #codexMdpBody .codex-mdp-gallery {
  margin:0 0 18px;
  padding:8px;
}
#codexMapDossier > #codexMdpBody .codex-overview-lead {
  font-size:14.8px;
  line-height:1.68;
  margin:0 0 18px;
  color:var(--ink,#f4f6f5);
}
#codexMapDossier > #codexMdpBody .codex-overview-lead p {
  margin:0 0 12px;
}
#codexMapDossier > #codexMdpBody .codex-overview-lead p:last-child {
  margin-bottom:0;
}
#codexMapDossier > #codexMdpBody .codex-facts-card {
  margin:0 0 22px;
  padding:13px 15px 10px;
}
#codexMapDossier > #codexMdpBody .codex-facts-table {
  width:100%;
  border-collapse:collapse;
  font-size:13.5px;
  line-height:1.5;
}
#codexMapDossier > #codexMdpBody .codex-facts-table th {
  width:118px;
  padding:6px 10px 6px 0;
  text-align:left;
  vertical-align:top;
  font-family:Interface,CodexGeometric,sans-serif;
  font-size:11.5px;
  font-weight:600;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:#e4c587;
}
#codexMapDossier > #codexMdpBody .codex-facts-table td {
  padding:6px 0;
  vertical-align:top;
  overflow-wrap:anywhere;
}
#codexMapDossier > #codexMdpBody .codex-section {
  margin:22px 0 0;
  padding-top:18px;
  border-top:1px solid transparent;
  border-image:var(--codex-taper-line) 1;
  border-image-slice:1 0 0 0;
}
#codexMapDossier > #codexMdpBody .codex-section > h3 {
  font-family:Interface,Display,sans-serif !important;
  font-size:18.5px !important;
  font-weight:600 !important;
  line-height:1.22 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
  margin:0 0 11px !important;
  color:var(--white,#f7f6f0);
}
#codexMapDossier > #codexMdpBody .codex-section h4 {
  font-family:Interface,CodexGeometric,sans-serif !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1.3 !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
  margin:17px 0 7px !important;
  color:#e6c685;
}
#codexMapDossier > #codexMdpBody .codex-section p,
#codexMapDossier > #codexMdpBody > .codex-mappreview-paragraph {
  font-family:CodexGeometric,"Segoe UI",system-ui,sans-serif !important;
  font-size:14.4px !important;
  line-height:1.68 !important;
  margin:0 0 13px !important;
  color:color-mix(in srgb,var(--ink,#eef1f2) 92%,transparent);
}
#codexMapDossier > #codexMdpBody .codex-section p:last-child {
  margin-bottom:0 !important;
}
#codexMapDossier > #codexMdpBody .codex-section a:not(.codex-inline-fig-link) {
  color:#ebd096;
  text-decoration:underline;
  text-decoration-color:#c9a66b88;
  text-underline-offset:3px;
}
#codexMapDossier > #codexMdpBody .codex-section a:not(.codex-inline-fig-link):hover {
  color:#fff;
  text-decoration-color:#f3dba4;
}
#codexMapDossier > #codexMdpBody .codex-section ul,
#codexMapDossier > #codexMdpBody .codex-section ol {
  margin:0 0 13px;
  padding-left:20px;
}
#codexMapDossier > #codexMdpBody .codex-section li {
  margin-bottom:6px;
}
#codexMapDossier > #codexMdpBody .codex-inscription-quote {
  margin:14px 0 16px;
  padding:10px 14px;
  font-size:14px;
  line-height:1.62;
}
#codexMapDossier > #codexMdpBody .codex-inline-figure {
  margin:14px 0 16px;
  padding:10px;
}
#codexMapDossier > #codexMdpBody .codex-inline-figure img {
  max-height:280px;
}
#codexMapDossier > #codexMdpBody .codex-data-table {
  display:block;
  width:100%;
  overflow-x:auto;
  margin:14px 0 16px;
  font-size:13px;
}
#codexMapDossier > #codexMdpBody .codex-notes-list,
#codexMapDossier > #codexMdpBody .codex-bib-list {
  font-size:13.4px;
  line-height:1.6;
}
#codexMapDossier > #codexMdpBody .codex-related-grid {
  grid-template-columns:1fr;
  gap:8px;
}

/* Day-mode parity inside the Map side dossier panel. */
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-facts-table th {
  color:#7a541a;
}
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-section > h3 {
  color:#221d15;
}
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-section h4 {
  color:#6c4a12;
}
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-section p,
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody > .codex-mappreview-paragraph,
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-overview-lead {
  color:#262119;
}
html[data-display-mode="day"] #codexMapDossier > #codexMdpBody .codex-section a:not(.codex-inline-fig-link) {
  color:#7a541a;
  text-decoration-color:#9e743088;
}
