/* One reading direction: place search, geography, then its fish. */
body[data-page="countries"] .page-hero { padding: 30px 0 32px; }
body[data-page="countries"] .page-hero h1 { margin-top: 20px; }
body[data-page="countries"] .page-hero p { max-width: 760px; font-size: 1rem; line-height: 1.65; margin-bottom: 0; }
body[data-page="countries"] .country-map-section { padding: 34px 0 48px; background: #f7faf9; }
.atlas-toolbar { display: grid; grid-template-columns: 1fr minmax(260px,440px); align-items: center; gap: 24px 48px; margin-bottom: 28px; }
.atlas-toolbar h2 { margin: 0 0 10px; }
.atlas-toolbar p { margin: 0; color: #526b62; font-size: .9rem; line-height: 1.6; }
.atlas-search { min-width: 0; position: relative; z-index: 5; }
.atlas-search-field { display: flex; align-items: center; gap: 12px; min-height: 52px; background: #fff; border: 1px solid #bdcfc5; border-radius: 14px; padding: 0 15px; color: #55796c; }
.atlas-search-field:focus-within { outline: 2px solid #176b72; outline-offset: 3px; }
.atlas-search-field > svg { flex: 0 0 20px; }
.atlas-search-field input { display: block; width: 100%; min-width: 0; height: 50px; border: 0; outline: none; border-radius: 0; padding: 0; background: transparent; color: #173f36; font: inherit; font-size: 1rem; }
.atlas-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.atlas-search-field button { flex: 0 0 44px; min-height: 44px; padding: 0; border: 0; background: none; color: #526b62; font: inherit; font-size: 1.5rem; cursor: pointer; }
.atlas-search-results { position: absolute; top: calc(100% + 10px); left: 0; right: 0; border: 1px solid #d0ded7; border-radius: 14px; background: #fff; padding: 6px; box-shadow: 0 14px 36px #153e3020; }
.atlas-place-list { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: 0; padding: 0; list-style: none; }
.atlas-place-list li { margin: 0; padding: 0; }
.atlas-place-row { display: block; min-height: 44px; padding: 11px 12px; border-radius: 8px; color: #204f43; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.atlas-place-row:hover, .atlas-place-row[aria-current="true"] { background: #eaf4ee; }
.atlas-place-list .atlas-no-results { padding: 14px 12px; color: #526b62; font-size: .9rem; line-height: 1.6; }
.atlas-map-surface { overflow: hidden; border: 1px solid #cbdcd6; border-radius: 22px; background: #e3eeeb; }
body[data-page="countries"] .country-map-frame { border: 0; background: #e3eeeb; }
body[data-page="countries"] .country-world-map { background: #e3eeeb; }
body[data-page="countries"] .country-map-ocean { fill: #e3eeeb; }
body[data-page="countries"] .country-map-unit.is-active { fill: #8fc2b5; }
body[data-page="countries"] .country-map-link:hover .country-map-unit.is-active,
body[data-page="countries"] .country-map-link:focus .country-map-unit.is-active { fill: #4a9386; }
body[data-page="countries"] .country-map-link.is-selected .country-map-unit { fill: #176b72; stroke: #082f36; stroke-width: 1.5; }
body[data-page="countries"] .country-map-link.is-selected .country-map-point { fill: #805016; stroke: #fff; stroke-width: 2; r: 3.4; }
.atlas-map-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 16px 0; }
body[data-page="countries"] .country-map-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: .75rem; }
.atlas-map-caption p { margin: 0; color: #46685c; font-size: .8rem; line-height: 1.5; min-height: 1.5em; }
.atlas-map-caption p:empty { display: none; }
.atlas-preview { border-top: 1px solid #d6e2dc; padding-top: 30px; margin-top: 12px; scroll-margin-top: 180px; min-width: 0; }
.atlas-selection-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.atlas-selection-head h3 { width: fit-content; max-width: 100%; margin: 0 0 10px; font-size: var(--fs-heading-section); line-height: 1.15; overflow-wrap: anywhere; }
.atlas-selection-head h3:focus-visible { outline: 2px solid #176b72; outline-offset: 5px; border-radius: 2px; }
.atlas-selection-head p { margin: 0; color: #526b62; font-size: .9rem; line-height: 1.65; }
.atlas-selection-head .btn { flex: 0 0 230px; min-height: 46px; padding: 10px 16px; font-size: .85rem; }
.atlas-samples { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; margin-top: 24px; }
.atlas-samples a { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 12px; }
.atlas-sample-image { width: 100%; display: grid; place-items: center; height: 210px; }
.atlas-samples img { width: 100%; height: 100%; max-height: 200px; object-fit: contain; mix-blend-mode: multiply; }
.atlas-samples span { margin-top: 16px; color: #214d41; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.atlas-samples a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.atlas-range-note { max-width: 780px; margin: 20px 0 0; color: #60746c; font-size: .8rem; line-height: 1.65; }
.atlas-method { margin-top: 20px; border-top: 1px solid #d6e2dc; padding-top: 12px; }
.atlas-method summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 12px; color: #285e56; font-weight: 600; font-size: .85rem; list-style: none; }
.atlas-method summary::-webkit-details-marker { display: none; }
.atlas-method summary::before { content: '+'; }
.atlas-method[open] summary::before { content: '−'; }
.atlas-method p { max-width: 820px; color: #526b62; font-size: .85rem; line-height: 1.75; }
body[data-page="countries"] [hidden] { display: none !important; }
body[data-page="countries"] :is(.atlas-preview a,.atlas-place-row,.atlas-search button,.atlas-method summary):focus-visible { outline: 3px solid #176b72; outline-offset: 2px; }
@media(max-width:779px) {
  body[data-page="countries"] .page-hero { padding: 24px 0; }
  body[data-page="countries"] .country-map-section { padding-top: 28px; }
  body[data-page="countries"] .filter-bar { position: static; }
  .atlas-toolbar { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
  .atlas-map-surface { border-radius: 16px; }
  .atlas-map-caption { gap: 14px; padding: 16px 0; }
  .atlas-preview { scroll-margin-top: 96px; padding-top: 24px; }
  .atlas-selection-head { flex-direction: column; align-items: start; }
  .atlas-selection-head .btn { flex-basis: auto; width: 230px; max-width: 100%; }
  .atlas-samples { gap: 14px; }
  .atlas-sample-image { height: 150px; }
  .atlas-samples span { font-size: .88rem; margin-top: 12px; }
}
@media(max-width:479px) {
  .atlas-samples { gap: 12px; }
  .atlas-sample-image { height: 108px; }
  .atlas-samples span { font-size: .82rem; }
  body[data-page="countries"] .country-map-legend { gap: 10px 16px; font-size: .72rem; }
}
