/* Included only by the candidate directory. */
body:has(#catalogue) .pagehead {padding:clamp(12px,1.4vw,22px) 0 0;background:transparent}
.pagehead>.wrap::after {display:none}
.pagehead .crumbs {margin:0 0 .45rem}
.pagehead .chapter {display:block;padding:0}
.pagehead .chapter h1 {margin:0;max-width:none;font-size:clamp(2rem,4vw,3.55rem);line-height:1.04}
.pagehead .chapter .lead {margin:.45rem 0 0;font:500 1rem/1.35 var(--sans,system-ui);color:#445761}
#catalogue {--ink:#193548;--rule:#d8d5c9;--paper:#fffefa;padding-block:.85rem 2.75rem}
#catalogue [hidden] {display:none!important}
.catalogue-tools label {display:grid;gap:.3rem;min-width:0;color:var(--ink);font-weight:600;font-size:.88rem}
.catalogue-tools input,.catalogue-tools select {box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:.55rem .7rem;border:1px solid #969e9c;border-radius:3px;background:var(--paper);color:#182a36;font:400 1rem/1.25 var(--sans,system-ui)}
.catalogue-options {display:flex;align-items:center;gap:.55rem;margin:.5rem 0}
.catalogue-options button,#close-globe {font:500 .92rem/1.2 var(--sans,system-ui);border:1px solid #9fa9a7;border-radius:3px;background:transparent;color:var(--ink);min-height:40px;padding:.42rem .9rem;cursor:pointer}
.catalogue-options button[aria-expanded=true] {color:white;background:#193548;border-color:#193548}
.filter-row {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;padding:.75rem 0 .9rem}
#geography-panel {box-sizing:border-box;position:static;inset:auto;width:100%;max-width:none;max-height:none;margin:.65rem 0;padding:0;border:1px solid var(--rule);background:#f1f1eb;color:var(--ink)}
#geography-panel:not([open]) {display:none}
.geo-heading {display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.7rem 1rem;border-bottom:1px solid var(--rule)}
.geo-heading h2 {margin:0;font:400 1.5rem/1.12 var(--serif,Georgia,serif)}
.geo-body {display:grid;grid-template-columns:1fr minmax(240px,36%);align-items:center}
.geo-copy {padding:1rem}
#geo-count {margin:0;font-weight:650}
.geo-hint {margin:.45rem 0 0;color:#46565a}
#geo-map {background:#17394a;position:relative;display:grid;place-items:center;min-width:0;height:220px;overflow:hidden}
.globe-view {position:relative;width:min(100%,230px);aspect-ratio:1}
#globe {display:block;width:100%;height:auto;touch-action:none;cursor:grab}
#globe:active {cursor:grabbing}
.geo-point {position:absolute;width:26px;height:26px;border:0;background:transparent;transform:translate(-50%,-50%);border-radius:100%;padding:0;cursor:pointer}
#globe-motion {position:absolute;bottom:.6rem;right:.6rem;width:44px;height:44px;color:white;background:#193b4f;border:1px solid #93a6a8;border-radius:50%;cursor:pointer}
#hover-tip {position:absolute;top:.35rem;left:.4rem;background:#fffefa;color:var(--ink);font-size:.875rem;padding:.2rem .45rem;pointer-events:none}
#globe-error {grid-column:1/-1;padding-inline:1rem}
.result-bar {display:flex;justify-content:space-between;align-items:center;gap:1rem}
#result-count {margin:.5rem 0;color:#49575c;scroll-margin:5rem}
#reset-catalogue,.country-link {font:inherit;background:none;border:0;color:#193548;text-decoration:underline;text-underline-offset:.2em;cursor:pointer;padding:0}
#records {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;align-items:stretch;margin-top:.7rem}
.candidate-card {position:relative;display:flex;flex-direction:column;min-width:0;padding:1rem;border:1px solid var(--rule);border-top:2px solid #998356;background:var(--paper)}
.candidate-card h3 {font:400 clamp(1.25rem,2vw,1.65rem)/1.14 var(--serif,Georgia);margin:0 0 .35rem;overflow-wrap:anywhere}
.candidate-name,.small-link {color:var(--ink)}
.candidate-card .candidate-name::after {content:"";position:absolute;inset:0}
.country-link,.record-end .small-link {position:relative;z-index:1}
.record-meta,.record-end time {font:400 .85rem/1.35 var(--sans,system-ui);color:#4b5c61}
.record-role {font-size:1rem;line-height:1.35;margin:.45rem 0 .65rem}
.record-end {display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:auto}
.record-end .small-link {font-size:.92rem;text-decoration:underline;text-underline-offset:.18em}
.record-photo {max-width:100%;max-height:120px;object-fit:contain;align-self:start;margin-bottom:.5rem}
.record-pages,#page-numbers {display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:.3rem}
.record-pages {margin-top:1.2rem}
.record-pages button {min-width:40px;min-height:42px;font:inherit;border:1px solid transparent;border-radius:3px;color:var(--ink);background:transparent;cursor:pointer;padding:.35rem .55rem}
.record-pages button[aria-current] {background:var(--ink);color:white}
.record-pages button:disabled {opacity:.55;cursor:default}
#catalogue :focus-visible {outline:2px solid #a4771f;outline-offset:2px}
@media(min-width:641px) and (max-width:1023px) {
  #records,.filter-row {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px) {
  body:has(#catalogue) .pagehead {padding:10px 0 0}
  .pagehead .crumbs {margin:0 0 .4rem}
  .pagehead .chapter h1 {font-size:clamp(1.7rem,6.6vw,2.1rem);line-height:1.09}
  .pagehead .chapter .lead {margin:.35rem 0 0;font-size:.92rem}
  #catalogue {padding-block:.65rem 1.5rem}
  .catalogue-options button {min-height:44px}
  .filter-row {grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;padding:.35rem 0 .65rem}
  .catalogue-tools label {font-size:.82rem}
  #records {grid-template-columns:minmax(0,1fr);gap:0;border-top:1px solid var(--rule);margin-top:.45rem}
  .candidate-card {padding:9px 2px 8px;min-height:108px;box-sizing:border-box;border:0;border-bottom:1px solid var(--rule);background:transparent}
  .candidate-card h3 {font-size:1.16rem;line-height:1.12;margin:0 0 .2rem}
  .record-meta {font-size:.85rem}
  .record-role {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:.18rem 0;font-size:.92rem;line-height:1.25}
  .record-end {min-height:24px}
  .candidate-card:has(.record-photo) {padding-inline-start:61px}
  .record-photo {position:absolute;left:0;top:10px;width:50px;height:64px;object-fit:cover}
  .record-pages {column-gap:.15rem}.record-pages button {min-width:32px;padding:.35rem}
  #geography-panel:modal {position:fixed;inset:0;width:100%;height:100%;height:100dvh;margin:0;border:0;overflow:auto;overscroll-behavior:contain}
  html:has(#geography-panel:modal) {overflow:hidden}
  #geography-panel::backdrop {background:#17394a}
  #geography-panel .geo-heading {position:sticky;top:0;z-index:2;background:#f1f1eb;padding:max(.75rem,env(safe-area-inset-top)) 1rem .75rem}
  #close-globe {min-height:44px}
  .geo-body {display:flex;min-height:calc(100% - 70px);flex-direction:column;align-items:stretch}
  .geo-copy {padding:1.1rem}
  #geo-map {flex:1;min-height:42vw}
  .globe-view {width:min(98vw,68dvh)}
}

#geo-country-search label {display:grid;gap:.25rem;font-weight:600;max-width:22rem;margin:.5rem 0}
#geo-country-search input {width:100%;min-width:0;min-height:44px;background:white;color:#193548;border:1px solid #969e9c;padding:.45rem .7rem;font:inherit}
#geo-candidate-links {padding-inline-start:1.2rem;margin:.55rem 0}
#geo-candidate-links li+li {margin-top:.25rem}
#geo-candidate-links a {color:#193548;text-underline-offset:.2em}

@media(max-width:640px) {
  #catalogue[data-primary-geography] .geo-body {min-height:0}
  #catalogue[data-primary-geography] #geo-map {height:210px;min-height:0;flex:auto;order:-1}
  #catalogue[data-primary-geography] .globe-view {width:clamp(170px,60vw,240px)}
  #catalogue[data-primary-geography] .geo-copy {padding:.6rem 1rem}
}
/* The first projection is shipped as real country paths; interaction updates these same paths. */
#geo-map {background:#e5edf0;height:clamp(244px,26vw,310px);border-inline-start:1px solid #becbd1}
.globe-view {width:min(100%,305px)}
.geo-ocean {fill:#30627b;stroke:#254d65;stroke-width:2}
.geo-land {fill:#ebe6d3;stroke:#6f7a76;stroke-width:1.55;stroke-linejoin:round}
.geo-land .is-selected {fill:#efbc51;stroke:#473b24;stroke-width:2}
.geo-point {width:44px;height:44px;display:grid;place-items:center}
.geo-point[hidden] {display:none}
.geo-point::after {content:"";width:11px;height:11px;border:2px solid #fff;border-radius:100%;background:#922f1e;box-shadow:0 0 0 1px #593122}
.geo-point[aria-pressed="true"]::after {background:#694318;box-shadow:0 0 0 3px #ffd98c}
#records .record-role {font-size:1rem;line-height:1.5;margin:.2rem 0 .45rem;white-space:normal;overflow:visible}
#records .record-end .small-link,#records .country-link,#geo-candidate-links a {display:inline-flex;align-items:center;min-height:44px;min-width:44px}
#geo-candidate-links li+li {margin:0}
#catalogue button:not(.geo-point),#filter-panel select {min-height:44px;min-width:44px}
@media(max-width:640px) {
  #geo-map {border-inline-start:0}
  #catalogue[data-primary-geography] #geo-map {height:244px}
  #catalogue[data-primary-geography] .globe-view {width:min(100%,244px)}
}
