/* History, worldwide projects, source lookup and the standalone legal shell. */
.world-index { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0; }
.world-index > span { font-size: 14px; font-weight: 700; margin-right: 4px; }
.world-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.world-picker { display: grid; gap: 4px; font-size: 14px; font-weight: 700; min-width: 0; }
.world-picker select { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; }
.history-picker { display: none; margin-top: 20px; }
.page-history .gen-group, .page-history .gen-head h2, .page-sources :is(section[id], details[id], h2[id]) { scroll-margin-top: 96px; }
.foundations > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 12px; min-height: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; list-style: none; cursor: pointer; }
.foundations > summary::-webkit-details-marker { display: none; }
.foundations summary h2 { display: grid; gap: 4px; margin: 0; }
.foundations summary h2 span { font: 600 14px/1.5 'DM Sans', sans-serif; color: var(--muted); }
.foundation-blurb { margin: 16px 12px; color: var(--muted); }
.world-chevron { flex: none; width: 20px; height: 20px; }
.foundations[open] > summary > .world-chevron, .review-history[open] > summary > .world-chevron { transform: rotate(90deg); }
.page-history .chronology { display: grid; gap: 8px; }
.milestone-source { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.page-map .filter-bar { position: sticky; top: 68px; z-index: 6; flex-wrap: wrap; gap: 8px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.page-map .atlas-map { position: static; }
.page-map .filter-bar > .world-picker { flex: 0 1 220px; }
.page-map .filter-bar .topics { flex-wrap: wrap; min-width: 0; }
.page-map .lr-bar i, .page-sources .mx-bar i { background: var(--muted); }
.page-map .filter-chip.is-6g:not(.active) { color: var(--ink); border-color: var(--line); background: var(--surface); }
.page-map .city-list { display: grid; gap: 8px; }
.page-map .lr-name { min-width: 0; overflow-wrap: anywhere; }
.world-more { margin-top: 16px; min-height: 44px; }
.source-search { display: grid; gap: 8px; margin-top: 20px; }
.source-search label { font-size: 16px; font-weight: 700; }
.source-search > div { display: flex; gap: 8px; }
.source-search input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit; }
.page-sources .source-register { gap: 8px; }
.page-sources .source-record > a { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 0; overflow-wrap: anywhere; }
.page-sources .source-record .icon { flex: none; }
.page-sources .source-record { min-width: 0; }
.page-map .location-row, .page-sources .source-record > a { scroll-margin-top: 180px; scroll-margin-bottom: 104px; }
.page-sources .pipeline li.auto { background: var(--surface-2); border-color: var(--line-strong); border-style: dashed; }
.page-sources .pipe-key i.auto { background: var(--surface-2); border: 1.5px dashed var(--line-strong); }
.page-sources .kind { color: var(--ink); background: var(--neutral-bg); border-color: var(--line-strong); }
.page-sources .method-list li::before { background: var(--muted); }
.review-history { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: var(--surface); }
.review-history > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-weight: 700; cursor: pointer; list-style: none; }
.review-history > summary::-webkit-details-marker { display: none; }

/* Legal is served without the application bundle; release.mjs copies this file. */
.legal-page .legal-sections { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0; }
.legal-page .legal-sections summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 700; list-style: none; cursor: pointer; }
.legal-page .legal-sections summary::-webkit-details-marker { display: none; }
.legal-page .legal-sections summary::after { content: '⌄'; font-size: 20px; }
.legal-page .legal-sections details[open] summary::after { content: '⌃'; }
.legal-page .toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.legal-page .toc li { margin: 0; min-width: 0; }
.legal-page .toc a { display: flex; min-height: 44px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.legal-page header nav { gap: 8px 18px; }
.legal-page header strong a, .legal-page footer a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-page footer p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.legal-page :is(section[id], h3[id]) { scroll-margin-top: 80px; }
.legal-page .verdict-definitions { display: grid; gap: 12px; margin: 12px 0 20px; }
.legal-page .verdict-definitions dt { font-weight: 700; }
.legal-page .verdict-definitions dd { margin: 0; }
.legal-page :is(a, summary):focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

@media (max-width: 760px) {
  .history-picker { display: grid; }
  .page-history .gen-rail { display: none; }
  .page-history .cc-body > span, .page-sources .pipeline small { font-size: 16px; line-height: 1.55; }
  .page-sources :is(.pipe-key, .kind) { font-size: 14px; }
  .page-map .filter-bar { position: sticky; top: 68px; z-index: 6; display: flex; gap: 8px; margin-top: 16px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
  .page-map .filter-bar > .world-picker { flex: 1; }
  .page-map .filter-bar .topics { display: none; }
  .page-map .more-filters { flex: none; align-self: end; }
  .page-map .more-body { position: absolute; top: calc(100% + 8px); left: auto; right: 0; width: min(280px, calc(100vw - 64px)); margin: 0; }
  .page-map .canada-map { height: 320px; aspect-ratio: auto; }
  .page-map .zoom-controls { position: static; display: flex; justify-content: center; gap: 8px; padding: 8px; border-radius: 0; box-shadow: none; border-width: 1px 0 0; }
  .page-map .region-jumps { flex-wrap: wrap; overflow: visible; gap: 8px; }
  .page-map .region-jumps button { min-height: 44px; }
  .page-map .list-scroll { min-height: 0; }
  .page-map .location-row { grid-template-columns: minmax(0, 1fr) 50px 32px; gap: 8px; }
  .source-search > div { flex-wrap: wrap; }
  .source-search input { flex-basis: 100%; }
}

/* Phones: the history cards must never be wider than the page. */
.chronology li, .chronology-card, .cc-body, .cc-meta { min-width: 0; max-width: 100%; }
.chronology-card { width: 100%; overflow-wrap: anywhere; }
