.cafes { --coffee: #78503b; --line: #e8e1da; --paper: #fbf9f6; }
.cafes [hidden] { display: none !important; }
.cafes__intro { color: #58616a; }
.cafes__cities { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.cafes__cities a { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 2rem; padding: .5rem .85rem; color: #343a40; text-decoration: none; background: #fff; }
.cafes__cities a[aria-current="true"] { background: var(--coffee); color: #fff; border-color: var(--coffee); }
.cafes__count { font-size: .8rem; opacity: .75; }
.cafes__flag { white-space: nowrap; font-size: .95em; }
.cafes__layout { display: block; }
.cafes.is-interactive .cafes__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.4rem; align-items: start; }
.cafes__list, .cafes__map { min-width: 0; }
.cafes__list section > h2 { margin-top: .5rem; }
.cafes__list ul { list-style: none; padding: 0; margin: 0; }
.markdown-body .cafes__card { margin: 0 0 .75rem; border: 1px solid var(--line); border-left: 3px solid transparent; border-radius: .6rem; padding: 1rem; background: #fff; scroll-margin-top: 1rem; }
.markdown-body .cafes__card.is-selected { border-color: var(--coffee); background: var(--paper); }
.markdown-body .cafes__card h3 { font-size: 1.05rem; margin: 0 0 .25rem; overflow-wrap: anywhere; }
.markdown-body .cafes__card p { margin: .4rem 0; font-size: .9rem; }
.cafes__area { color: #6c747c; }
.cafes__card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; font-size: .85rem; }
.cafes__card button { border: 1px solid var(--line); background: #fff; color: var(--coffee); padding: .4rem .7rem; border-radius: .3rem; cursor: pointer; font: inherit; }
.cafes__card.is-selected button { background: var(--coffee); color: #fff; border-color: var(--coffee); }
.cafes a:focus-visible, .cafes button:focus-visible { outline: 3px solid #4a83c5; outline-offset: 3px; }
.cafes__unlocated { display: block; color: #6c747c; margin-top: .5rem; }
.cafes__map { position: sticky; top: 1rem; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--paper); }
.cafes__map-heading { padding: 1rem; }
.cafes__map-label { font-size: .7rem; letter-spacing: .12em; color: var(--coffee); }
.markdown-body .cafes__map h2 { margin: .3rem 0; padding: 0; border: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.cafes__map-heading p { color: #6c747c; margin: 0; font-size: .85rem; }
.cafes__footnote { margin-top: 2rem; color: #6c747c; font-size: .85rem; }
@media (max-width: 700px) {
  .cafes.is-interactive .cafes__layout { display: flex; flex-direction: column; gap: 1rem; }
  .cafes__map { order: -1; position: static; width: 100%; }
  .cafes__list { width: 100%; }
  .cafes__cities { gap: .4rem; }
  .cafes__cities a { padding: .45rem .65rem; font-size: .85rem; }
}

.cafes .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* A single city map keeps every located cafe visible together. */
.cafes.is-interactive .cafes__list { max-height: 730px; overflow-y: auto; padding-right: .4rem; scroll-padding: .5rem; }
.cafes__number { display: inline-flex; justify-content: center; align-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .2rem; background: #eee7df; color: var(--coffee); border-radius: 50%; font-size: .75rem; vertical-align: .1rem; }
.cafes__map { z-index: 0; }
.cafes__canvas { width: 100%; height: 460px; background: #ece8e1; font-family: inherit; }
.cafes__canvas img { max-width: none; }
.cafes__canvas .leaflet-control-attribution { font-size: 10px; }
.cafes__marker { background: none; border: none; }
.cafes__pin { position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: #78503b; color: #fff; box-shadow: 0 1px 5px #0005; font: 600 12px/1 sans-serif; }
.cafes__pin::after { content: ''; position: absolute; bottom: -8px; left: 8px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid #78503b; }
.cafes__marker.is-selected { z-index: 1000 !important; }
.cafes__marker.is-selected .cafes__pin { background: #652d80; outline: 3px solid #652d8055; }
.cafes__marker.is-selected .cafes__pin::after { border-top-color: #652d80; }
.cafes__marker:focus-visible .cafes__pin { outline: 3px solid #2877b5; outline-offset: 3px; }
.cafes__reset { margin-top: .65rem; border: 1px solid var(--line); border-radius: .3rem; padding: .35rem .65rem; background: #fff; color: var(--coffee); font: inherit; font-size: .8rem; cursor: pointer; }
.cafes__reset:disabled { opacity: .5; cursor: default; }
.cafes__selection { padding: 1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.markdown-body .cafes__selection h3 { margin: 0 0 .35rem; font-size: 1rem; }
.cafes__selection p { margin: .4rem 0; }
.cafes__selection a { display: inline-block; margin-top: .4rem; }
@media (max-width: 700px) {
  .cafes.is-interactive .cafes__list { max-height: none; overflow-y: visible; padding-right: 0; }
  .cafes__canvas { height: 330px; }
}

.cafes__legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: #58616a; margin: 1rem 0 .65rem; }
.cafes__legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.cafes__key { display: inline-block; width: .75rem; height: .75rem; border: 2px solid transparent; border-radius: 50%; background: #78503b; }
.cafes__key--inferred { background: #af7518; border-color: #af7518; border-style: dashed; }
.cafes__key--reference { background: #fff; border: 2px dashed #657381; }
.cafes__toggle { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: #58616a; }
.cafes__toggle input { width: 1rem; height: 1rem; accent-color: #78503b; }
.cafes__badge { display: inline-block; padding: .15rem .4rem; border-radius: .2rem; font-size: .72rem; line-height: 1.5; }
.cafes__badge--inferred { background: #fff2d8; color: #805410; }
.cafes__badge--reference { background: #eaf0f4; color: #4d5f6b; }
.markdown-body .cafes__location-note { color: #657381; font-size: .8rem; }
.cafes__marker.is-inferred .cafes__pin { background: #af7518; border-style: dashed; }
.cafes__marker.is-inferred .cafes__pin::after { border-top-color: #af7518; }
.cafes__marker.is-reference .cafes__pin { background: #fff; color: #4d5f6b; border: 2px dashed #657381; }
.cafes__marker.is-reference .cafes__pin::after { border-top-color: #657381; }
.cafes__marker.is-selected .cafes__pin { outline: 3px solid #652d8080; }

.cafes__method, .cafes__totals p, .cafes__unidentified { font-size: .85rem; color: #58616a; }
.cafes__totals { margin-bottom: 1rem; }
.cafes__totals summary { cursor: pointer; font-weight: 600; color: var(--coffee); }
.markdown-body .cafes__totals table { display: table; width: 100%; font-size: .8rem; table-layout: fixed; }
.cafes__totals th:first-child { width: 60%; overflow-wrap: anywhere; }
.cafes__totals td, .cafes__totals thead th { white-space: nowrap; }
.cafes__totals tbody th { text-align: left; font-weight: 400; }
.cafes__totals small, .cafes__visits small { display: block; font-size: .75rem; font-weight: 400; color: #657381; }
.markdown-body .cafes__visits { color: var(--coffee); font-weight: 600; }

.cafes__unidentified { padding: .8rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--paper); }
.markdown-body .cafes__unidentified h3 { margin: 0 0 .4rem; font-size: .95rem; }
.markdown-body .cafes__unidentified p { margin: .3rem 0; }
.cafes__unidentified ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.markdown-body .cafes__totals th, .markdown-body .cafes__totals td { padding: .45rem .35rem; }
.cafes__totals th:first-child { width: 52%; }
.cafes__totals thead th { font-size: .7rem; }
.cafes__badge--unlocated { background: #eaf0f4; color: #4d5f6b; }
