/* /swimming and its pages (12 Oct 2026). The hub is short and picture-led: a photograph, four picture cards, the countries as chips and six safety tiles.
   /swimming/safety keeps the long advice (the walks' page head, then sections). A country's page is a summary bar and its places by first letter.
   Uses the site's own colours (--paper, --ink, --pine, --ochre, --line) and the walks' page head; everything that points one way uses logical
   properties, so Hebrew and Arabic mirror by themselves (the page's wrapper carries dir="rtl"). */

.swim-page {
  --sw-excellent: #1B7F5C;
  --sw-good: #79A83A;
  --sw-sufficient: #E0A526;
  --sw-poor: #C8553D;
  --sw-insufficient: #8E2A2A;
  --sw-closed: #55564F;
  --sw-none: #8A8A80;
}
html[lang=ko] .swim-page { word-break: keep-all; }

/* ---- a classification's marker: a shape and a colour, and the word always stands beside it (the map uses the same shapes) */
.sw-dot { display: inline-block; width: .82em; height: .82em; border-radius: 50%; flex: none; margin-inline-end: .5em; background: currentColor; }
.sw-d-excellent { background: var(--sw-excellent); }
.sw-d-good { background: var(--sw-good); }
.sw-d-sufficient { background: var(--sw-sufficient); }
.sw-d-poor { background: var(--sw-poor); }
.sw-d-insufficient { background: var(--sw-insufficient); }
.sw-d-closed { background: var(--sw-closed); }
.sw-dot.sw-d-good { border-radius: 2px; }
.sw-dot.sw-d-sufficient { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sw-dot.sw-d-poor { border-radius: 0; clip-path: polygon(50% 6%, 100% 94%, 0 94%); }
.sw-dot.sw-d-insufficient { border-radius: 0; clip-path: polygon(0 6%, 100% 6%, 50% 94%); }
.sw-dot.sw-d-closed { border-radius: 0; clip-path: polygon(15% 0, 50% 35%, 85% 0, 100% 15%, 65% 50%, 100% 85%, 85% 100%, 50% 65%, 15% 100%, 0 85%, 35% 50%, 0 15%); }
.sw-dot.sw-d-none { background: transparent; border: 2px solid var(--sw-none); }
.sw-seg.sw-d-none { background: repeating-linear-gradient(45deg, #CFCFC4 0 4px, #E8E8DE 4px 8px); }

/* ---- the hub: the photograph */
.sw-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-start; min-height: clamp(340px, 31vw, 400px); color: #FAF8F2; background: var(--pine-dark, #0F2A1E); }
.sw-hero picture { position: absolute; inset: 0; z-index: -2; }
.sw-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 66%; }
/* two layers over the photograph, so the words are readable wherever the sky is bright: dark at the side the words are on, and dark along the top where they now sit */
.sw-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 30, 22, .5), rgba(11, 30, 22, .14) 75%), linear-gradient(90deg, rgba(11, 30, 22, .8), rgba(11, 30, 22, .56) 55%, rgba(11, 30, 22, .06)); }
[dir=rtl] .sw-hero::before { background: linear-gradient(180deg, rgba(11, 30, 22, .5), rgba(11, 30, 22, .14) 75%), linear-gradient(270deg, rgba(11, 30, 22, .8), rgba(11, 30, 22, .56) 55%, rgba(11, 30, 22, .06)); }
.sw-hero-in { width: 100%; padding-block: clamp(30px, 4.2vw, 50px) clamp(30px, 3.6vw, 44px); }
.sw-hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; max-width: 20ch; text-wrap: balance; text-shadow: 0 1px 18px rgba(11, 30, 22, .35); }
.sw-lede { margin-top: 12px; max-width: 40rem; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; color: rgba(250, 248, 242, .96); text-shadow: 0 1px 12px rgba(11, 30, 22, .4); }
.sw-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.sw-card-pic 
/* ---- sections of the hub */
.sw-hub { padding-bottom: 20px; }
.sw-sec { margin-top: 44px; }
.sw-sec:first-child { margin-top: 36px; }
.sw-sec h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.2; margin: 0 0 16px; text-wrap: balance; }

/* ---- four picture cards */
.sw-cards { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; }
.sw-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.sw-card-pic { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); }
.sw-card-pic picture { display: block; height: 100%; }
.sw-card-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-card-body { padding: 16px 18px 20px; }
.sw-card h2 { font-size: 1.15rem; line-height: 1.25; margin: 8px 0 6px; }
.sw-card-body p { margin: 0; color: var(--ink-soft); font-size: .97rem; line-height: 1.45; }
.sw-card-body .sw-tag { margin: 0; font-size: .74rem; line-height: 1.5; }
.sw-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; letter-spacing: .01em; }
.sw-card-body .sw-tag-now { background: #E4EBDF; color: var(--pine-deep, #143627); }
.sw-card-body .sw-tag-soon { background: #F3EAD3; color: #6B4B12; }
.sw-key { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 12px 0 0; font-size: .86rem; color: var(--ink); }
.sw-key li { display: inline-flex; align-items: baseline; }

/* ---- the countries */
.sw-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 12px; }
.sw-chips a { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.3; }
.sw-chips b { font-weight: 600; font-size: .84em; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw-chips a:hover, .sw-chips a:focus-visible { border-color: var(--pine); background: #F4F7F1; }
.sw-chips a:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.sw-chips-big { gap: 10px; }
.sw-chips-big a { padding: 12px 22px; font-size: 1.12rem; font-weight: 600; background: #E4EBDF; border-color: transparent; }
.sw-chips-big a:hover, .sw-chips-big a:focus-visible { background: #D8E3D2; border-color: var(--pine); }

/* ---- six safety tiles */
.sw-tiles { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; }
.sw-tile { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; row-gap: 3px; align-content: start; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.sw-tile svg { grid-row: 1 / span 3; width: 28px; height: 28px; margin-top: 2px; color: var(--ochre); }
.sw-tile h3 { margin: 0; font-size: 1.04rem; line-height: 1.3; }
.sw-tile p { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--ink-soft); }
.sw-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-top: 18px; font-size: .92rem; color: var(--muted); }
.sw-more { font-weight: 700; font-size: 1rem; color: var(--pine); text-decoration: none; border-bottom: 1.5px solid var(--ochre); }
.sw-more::after { content: " →"; }
[dir=rtl] .sw-more::after { content: " ←"; }
.sw-more:hover, .sw-more:focus-visible { color: var(--pine-deep, #143627); border-bottom-color: currentColor; }

@media (max-width: 980px) {
  .sw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sw-hero { min-height: 410px; }   /* the web font arriving makes the words wrap differently: a hero that is already this tall does not move the cards below it */
  .sw-hero-in { padding-block: 28px 30px; }
  .sw-hero::before { background: linear-gradient(180deg, rgba(11, 30, 22, .8), rgba(11, 30, 22, .66) 60%, rgba(11, 30, 22, .3)); }
  [dir=rtl] .sw-hero::before { background: linear-gradient(180deg, rgba(11, 30, 22, .8), rgba(11, 30, 22, .66) 60%, rgba(11, 30, 22, .3)); }
  .sw-actions { gap: 10px; margin-top: 18px; }
  /* the picture cards turn into a swipe, one card and a bit of the next (as on /features) */
  .sw-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--pad)); padding: 0 var(--pad) 8px; scrollbar-width: thin; }
  .sw-card { scroll-snap-align: center; }
  .sw-tiles { grid-template-columns: 1fr; }
  .sw-sec { margin-top: 38px; }
}
@media (max-width: 460px) {
  .sw-chips-big a { padding: 10px 18px; font-size: 1.05rem; }
}

/* ---- a country: the title and one short line, the summary bar; then (below) the map, the one line about notices, the find box and the list */
.swim-page .sw-head { gap: 6px; padding-bottom: 0; border-bottom: 0; }
.swim-page .sw-head h1 { font-size: clamp(28px, 5vw, 46px); max-width: 24ch; }
.sw-count { margin: 0; font-size: 1rem; color: var(--muted); }
.sw-summary { margin: 20px 0 0; }
.sw-year { margin: 0 0 8px; font-weight: 600; }
.sw-bar { display: flex; gap: 2px; height: 18px; overflow: hidden; border-radius: 999px; background: var(--line); }
.sw-seg { flex: 0 1 0; min-width: 6px; }
.sw-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 12px 0 0; }
.sw-legend li { display: inline-flex; align-items: baseline; }
.sw-legend b { margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.sw-notice { margin: 16px 0 0; padding: 8px 14px; border-inline-start: 3px solid var(--ochre); border-start-end-radius: 8px; border-end-end-radius: 8px; background: #F6F0E2; font-size: .95rem; line-height: 1.45; color: var(--ink); }
.sw-note { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }
.sw-note-end { margin-top: 28px; }
.sw-sites { list-style: none; padding: 0; margin: 0; }
.sw-sites li { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(8rem, 1fr) minmax(5rem, .6fr) 3.5rem; gap: 2px 16px; align-items: baseline; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.sw-name { font-weight: 600; overflow-wrap: anywhere; }
.sw-cls { display: inline-flex; align-items: baseline; }
.sw-meta { font-size: .9rem; color: var(--muted); }
.sw-page { justify-self: end; font-size: .9rem; }
@media (max-width: 640px) {
  .sw-sites li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sw-name { grid-column: 1 / -1; }
}

/* an element the script has not yet shown, or has put away, stays away whatever its own display is */
.swim-page [hidden] { display: none !important; }

/* ---- a country's map, its find box and filter chips, its list and "Show 25 more" (public/assets/js/swim-country.js) */
.sw-mapbox { margin: 20px 0 0; }
.sw-map { position: relative; height: clamp(300px, 58vh, 520px); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #E6ECE3; }
@media (min-width: 900px) { .sw-map { height: 460px; } }
.sw-map .maplibregl-popup-content { padding: 12px 14px; border-radius: 12px; font-family: inherit; }
.sw-popup .maplibregl-popup-close-button { width: 40px; height: 40px; font-size: 22px; line-height: 1; color: var(--ink); }
.sw-popup .maplibregl-popup-content { padding-inline-end: 34px; }
.sw-mapshow { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); min-height: 48px; padding: 0 24px; border: 1.5px solid var(--pine); border-radius: 999px; background: #fff; color: var(--pine); font: inherit; font-weight: 700; cursor: pointer; }
[dir=rtl] .sw-mapshow { transform: translate(50%, -50%); }
.sw-mapshow:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.sw-mapcredit { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.sw-mapcredit a { color: inherit; }
.sw-mapfail { margin: 0; padding: 22px; color: var(--ink-soft); }
.sw-cluster { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #143627; color: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); font: 700 13px/1 var(--sans); cursor: pointer; }
.sw-cluster-m { width: 46px; height: 46px; background: #1F4A38; font-size: 14px; }
.sw-cluster-l { width: 54px; height: 54px; background: #0F2A1E; font-size: 15px; }
.sw-card-pop { display: grid; gap: 4px; min-width: 150px; font-size: .95rem; line-height: 1.35; }
.sw-pop-name { font-size: 1rem; }
.sw-pop-class { display: flex; align-items: center; }
.sw-pop-src { font-size: .82rem; color: var(--muted); }
.sw-pop-page { display: inline-flex; align-items: center; justify-self: start; min-height: 40px; margin-top: 2px; font-weight: 700; color: var(--pine); }
.sw-find { margin: 18px 0 0; }
.sw-search { position: relative; }
.sw-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sw-search::before { content: ""; position: absolute; inset-inline-start: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); background: var(--muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat; }
.sw-search input { width: 100%; min-height: 48px; padding: 10px 14px; padding-inline-start: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; appearance: none; -webkit-appearance: none; }
.sw-search input:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; border-color: var(--pine); }
.sw-fchips { display: flex; gap: 8px; margin-inline: calc(-1 * var(--pad)); padding: 10px var(--pad) 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sw-fchips::-webkit-scrollbar { display: none; }
@media (min-width: 761px) { .sw-fchips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow-x: visible; } }
.sw-fchip, .sw-fclear { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; }
.sw-fchip b { margin-inline-start: 6px; font-size: .85em; font-weight: 600; color: var(--muted); }
.sw-fchip[aria-pressed=true] { border-color: var(--pine); background: #E4EBDF; font-weight: 700; }
.sw-fchip:hover, .sw-fclear:hover { border-color: var(--pine); }
.sw-fchip:focus-visible, .sw-fclear:focus-visible, .sw-more-btn:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.sw-fclear { border-color: transparent; background: transparent; color: var(--pine); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sw-status { margin: 6px 0 0; min-height: 1.4em; font-size: .92rem; color: var(--muted); }
#sw-list { margin-top: 10px; }
@media (min-width: 960px) { #sw-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; } }
.sw-page { padding-block: 13px; padding-inline: 12px 4px; margin-block: -13px; margin-inline: 0 -4px; }
.sw-morewrap { margin: 20px 0 6px; text-align: center; }
.sw-more-btn { min-height: 48px; padding: 0 26px; border: 1.5px solid var(--pine); border-radius: 999px; background: #fff; color: var(--pine); font: inherit; font-weight: 700; cursor: pointer; }
.sw-more-btn:hover { background: #F4F7F1; }

/* ---- the small link at the foot of every swimming page, and the credits page it leads to: two plain columns, no cards, no pictures */
.sw-sources { margin: 34px 0 6px; font-size: .9rem; }
.sw-sources a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.sw-sources a:hover, .sw-sources a:focus-visible { color: var(--ink); }
.sw-src { margin-top: 34px; }
.swim-page .sw-src h2 { margin: 0 0 6px; padding-bottom: 8px; font-size: 1.25rem; border-bottom: 1px solid var(--line); }
.sw-src > .sw-note { margin: 8px 0 0; }
.sw-srcs > div { display: grid; grid-template-columns: minmax(11rem, 1fr) 2.4fr; gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.sw-srcs dt strong { display: block; }
.sw-srcs dd p { margin: 0 0 6px; }
.sw-srcs dd p:last-child { margin-bottom: 0; }
.sw-attr { font-size: .92rem; color: var(--ink-soft); }
.sw-attr a { color: inherit; }
.sw-dates { font-size: .9rem; color: var(--muted); }
@media (max-width: 640px) { .sw-srcs > div { grid-template-columns: 1fr; } }

/* ---- the long advice, and what the country pages still use */
.swim-page .swim-section { margin: 34px 0 0; }
.swim-page .swim-section h2 { margin: 0 0 10px; }
.swim-page .swim-section ul { padding-inline-start: 1.2em; }
.swim-page .swim-section li { margin: 6px 0; }
.swim-page .swim-section ul.swim-panel { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.swim-panel li { margin: 0; padding: 14px 16px; background: var(--paper-2, #F2EEE3); border-radius: 12px; }
.swim-panel h3 { margin: 0 0 6px; font-size: 1.05rem; }
.swim-panel p { margin: 0 0 8px; font-size: .97rem; line-height: 1.5; }
.swim-none { color: var(--ink-soft, #4A524D); }
.swim-back { margin: 24px 0; }
