/* Shared presentation for public lore articles that do not need a dedicated
   atlas or country treatment. Kept deliberately restrained so concise pages
   read as finished articles rather than unfinished documents. */

html { overflow-x: clip; }

body { overflow-x: clip; }

main#main-content {
  box-sizing: border-box;
  width: min(calc(100% - 2rem), 74rem);
  margin: clamp(1.25rem, 3vw, 3rem) auto;
  padding: clamp(1.25rem, 3.5vw, 3.5rem);
  border: 1px solid var(--theme-rule);
  background: var(--theme-surface);
  box-shadow: .6rem .7rem 0 var(--theme-shadow);
}

main#main-content *,
main#main-content *::before,
main#main-content *::after { box-sizing: border-box; }

.article-header {
  max-width: 52rem;
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--theme-rule);
}

.eyebrow,
.place-type {
  margin: 0 0 .65rem;
  color: var(--theme-accent);
  font: 800 .72rem/1.35 Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.article-header h1 {
  max-width: 17ch;
  margin: 0;
  color: var(--theme-ink);
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: .98;
}

.lede {
  max-width: 47rem;
  margin: 1rem 0 0;
  color: var(--theme-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.article-body { min-width: 0; }

.article-body section + section { margin-top: clamp(2rem, 4vw, 3.5rem); }

.article-body h2,
.article-body h3 {
  color: var(--theme-ink);
  line-height: 1.12;
}

.article-body h2 {
  margin: 0 0 .7rem;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.article-body h3 { margin: 1.5rem 0 .5rem; }

.article-body p,
.article-body li {
  max-width: 47rem;
  line-height: 1.7;
}

.article-body a,
.index-list a,
.related-grid a,
.place-directory a { color: var(--theme-accent); }

.article-layout > :not(.article-body) {
  padding: 1.1rem 1.2rem;
  border-left: .24rem solid var(--theme-accent);
  background: color-mix(in srgb, var(--theme-paper-light) 74%, transparent);
}

.article-layout > :not(.article-body) > :first-child { margin-top: 0; }

.atlas-figure {
  max-width: 100%;
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
}

.atlas-figure a,
.atlas-figure img {
  display: block;
  max-width: 100%;
}

.atlas-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--theme-rule-strong);
}

.atlas-figure figcaption {
  margin-top: .65rem;
  color: var(--theme-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--theme-rule);
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
}

th,
td {
  padding: .75rem;
  border-bottom: 1px solid var(--theme-soft-rule);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

th {
  background: color-mix(in srgb, var(--theme-paper-deep) 38%, transparent);
  font: 800 .72rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.related-grid,
.place-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}

.related-grid { margin-top: 1.5rem; }

.related-grid > *,
.place-directory article {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--theme-rule);
  background: color-mix(in srgb, var(--theme-paper-light) 60%, transparent);
}

.place-directory { margin: 1.2rem 0 2rem; }

.place-directory h3 { margin: .25rem 0 .55rem; }
.place-directory p { margin: 0; }

.index-list {
  display: grid;
  gap: .85rem;
  max-width: 52rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--theme-rule);
  background: color-mix(in srgb, var(--theme-paper-light) 60%, transparent);
}

.index-list p { margin: .45rem 0 0; line-height: 1.6; }

.site-footer .footer-inner { padding: 1.25rem max(1rem, calc((100vw - 74rem) / 2)); }
.site-footer .footer-inner p { margin: 0; }
.site-footer .footer-inner p + p { margin-top: .55rem; }
.site-footer .footer-inner p:last-child { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }

@media (max-width: 46rem) {
  main#main-content {
    width: min(calc(100% - 1rem), 74rem);
    margin: .75rem auto;
    padding: 1.25rem;
    box-shadow: .3rem .35rem 0 var(--theme-shadow);
  }

  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout > :not(.article-body) { order: 2; }
  .article-header h1 { max-width: none; }
  .related-grid,
  .place-directory { grid-template-columns: 1fr; }
  th,
  td { padding: .6rem; }
}
