/* World-class EAC map workbench — scoped visual enhancement over existing atlas. */
.wca {
  padding-top: clamp(22px, 3.5vw, 46px);
  background: radial-gradient(ellipse 55% 30% at 83% 0%, #2a9b8110, transparent 82%);
}
.wca .wca-container {
  width: min(calc(100% - clamp(28px, 3.7vw, 68px)), 1720px);
}
.wca .breadcrumb { margin-bottom: 28px; }
.wca-intro {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 28px;
}
.wca-kicker {
  font-size: 11px;
  letter-spacing: .125em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wca-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25ad8f;
  box-shadow: 0 0 0 4px #25ad8f20;
}
.wca-intro h1 {
  font-size: clamp(35px, 3.55vw, 59px);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1.07;
  max-width: 840px;
  margin: 0;
}
.wca-intro > div:first-child > p:last-child {
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.55;
  max-width: 760px;
  margin-top: 13px;
}
.wca-metrics {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 14px 7px;
  box-shadow: 0 8px 22px #1137280c;
}
.wca-metrics > div {
  width: 132px;
  padding: 2px 18px;
}
.wca-metrics strong { font-size: 28px; color: var(--ink); }
.wca-metrics span { font-size: 10px; max-width: 120px; }
.wca-toolbar {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 5px 20px #05271709;
}
.wca-filters { gap: 5px; }
.wca-filters button {
  color: var(--muted);
  border: 1px solid transparent;
  padding: 9px 13px;
  font-size: 12px;
  border-radius: 7px;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wca-filters button[aria-pressed='true'] {
  background: var(--deep);
  border-color: var(--deep);
  color: #ffffff;
  box-shadow: 0 3px 9px #114c3420;
}
.wca-filter-count {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: inherit;
  opacity: .8;
  background: #678b8020;
  padding: 2px 5px;
  border-radius: 5px;
}
.wca-filters button[aria-pressed='true'] .wca-filter-count { background: #ffffff2c; }
.wca-reset { min-height: 39px; border: 0; background: var(--wca-pale); color: var(--accent); }
.wca-reset:hover { background: var(--soft); }
.wca-workbench {
  grid-template-columns: minmax(0, 1fr) clamp(330px, 25vw, 400px);
  align-items: stretch;
  gap: 14px;
}
.wca-map-column { display: flex; flex-direction: column; min-width: 0; }
.wca-map-stage {
  height: clamp(540px, 55vw, 760px);
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 0 0;
  background: var(--wca-water);
  box-shadow: 0 15px 38px #143a3011;
  cursor: auto;
  position: relative;
}
.wca-maplibre {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
}
.wca-map-ready .wca-maplibre { visibility: visible; opacity: 1; transition: opacity .22s ease; }
.wca-map-ready > svg { display: none; }
.wca-map-stage.wca-map-ready { touch-action: auto; cursor: auto; }
.wca-map-stage > svg { width: 100%; height: 100%; touch-action: none; }
.wca-map-stage .maplibregl-map,
.wca-map-stage .maplibregl-canvas-container { width: 100%; height: 100%; }
.wca-map-stage .maplibregl-ctrl-attrib { font-size: 10px; line-height: 16px; }
.wca-map-stage .maplibregl-ctrl-scale {
  color: #28413b;
  border-color: #527069;
  background: #ffffffdf;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 10px;
}
.wca-map-stage .maplibregl-ctrl-bottom-right { bottom: 48px; right: 4px; z-index: 1; }
.wca-map-stage .maplibregl-ctrl-bottom-left { bottom: 50px; left: 8px; z-index: 1; }
.wca-map-stage .maplibregl-ctrl-attrib-button { width: 25px; height: 25px; }
.wca-map-stage .maplibregl-ctrl-attrib-inner { line-height: 1.4; }
.wca-map-stage::after {
  background: linear-gradient(180deg,#062d2509 0%,transparent 16%,transparent 80%,#092d2410 100%);
  z-index: 1;
}
.wca-zoom {
  z-index: 3;
  right: 16px;
  top: 16px;
  background: var(--paper);
  box-shadow: 0 9px 35px #0b242626;
  border: 1px solid #638b803d;
  padding: 4px;
  border-radius: 12px;
}
.wca-zoom button {
  width: 39px;
  height: 40px;
  font-size: 25px;
  border-radius: 9px;
}
.wca-zoom button + button { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.wca-map-hint {
  z-index: 3;
  bottom: 16px;
  left: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #739a8745;
  box-shadow: 0 3px 10px #08281c0d;
  font-size: 11px;
  font-weight: 650;
  backdrop-filter: blur(10px);
  border-radius: 8px;
  max-width: calc(100% - 100px);
}
.wca-map-tooltip {
  z-index: 5;
  color: #ffffff;
  background: #163f3a;
  box-shadow: 0 12px 30px #051d1c35;
  border: 1px solid #ffffff30;
  border-radius: 9px;
  padding: 10px 13px;
  font-weight: 700;
  line-height: 1.5;
}
.wca-map-status {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  max-width: calc(100% - 105px);
  background: var(--paper);
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  box-shadow: 0 2px 10px #00000011;
}
.wca-map-status.is-failed { max-width: 320px; font-weight: 650; }
.wca-map-foot {
  border-radius: 0 0 15px 15px;
  padding: 15px 19px;
  background: var(--paper);
  box-shadow: 0 10px 30px #1233290b;
}
.wca-legend { gap: 11px 22px; }
.wca-legend span { font-size: 11px; font-weight: 650; }
.wca-legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
}
.wca-legend i[data-category='irec'] { background: #17a386; }
.wca-legend i[data-category='go'] { background: #477ec7; }
.wca-legend i[data-category='rec'] { background: #daa358; }
.wca-legend i[data-category='other'] { background: #a67acc; }
.wca-side {
  display: flex;
  align-items: stretch;
  padding: 17px;
  border-radius: 14px;
  box-shadow: 0 10px 30px #1235290a;
  height: auto;
  min-height: 0;
}
.wca-search {
  border-radius: 10px;
  padding: 0 12px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px transparent;
}
.wca-search input { font-size: 13px; min-height: 48px; }
.wca-selection {
  margin-top: 12px;
  margin-bottom: 12px;
}
.wca-selection-empty {
  min-height: 115px;
  align-items: center;
  background: var(--wca-pale);
  border: 1px solid var(--line);
  padding: 17px;
  gap: 12px;
  border-radius: 11px;
}
.wca-selection-empty span { font-size: 31px; }
.wca-selection-empty p { font-size: 12px; }
.wca-detail {
  background: var(--wca-pale);
  padding: 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
}
.wca-detail h3 { font-size: 25px; margin-top: 10px; }
.wca-detail-meta { font-size: 12px; }
.wca-tags span { padding: 5px 8px; }
.wca-issuers {
  max-height: 240px;
  overscroll-behavior: contain;
}
.wca-issuer { padding: 13px 0; }
.wca-directory-head {
  padding: 13px 2px 9px;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}
.wca-directory-head h3 { font-size: 15px; }
.wca-directory { max-height: 440px; }
.wca-directory-item button { min-height: 58px; }
.wca-directory-item button[aria-pressed='true'] {
  box-shadow: inset 3px 0 0 var(--accent);
  background: var(--wca-pale);
}
.wca-directory-item button:hover {
  background: var(--soft);
}
.wca-entry-symbol { width: 9px; height: 9px; border-radius: 50%; }
.wca-entry-symbol[data-category='irec'] { background: #17a386; }
.wca-entry-symbol[data-category='go'] { background: #477ec7; }
.wca-entry-symbol[data-category='rec'] { background: #daa358; }
.wca-entry-symbol[data-category='other'] { background: #a67acc; }
.wca-entry-copy strong { font-size: 13px; }
.wca-entry-copy small { font-size: 11px; }
.wca-entry-arrow { font-size: 23px; line-height: 1; }
.wca-provenance {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  margin-top: 17px;
  font-size: 12px;
}
.wca-provenance summary { font-size: 12px; }
.wca-provenance p { margin-top: 9px; }
.wca-dataset-hint { display: none; }
.wca-accuracy { display: inline-flex; align-items: center; padding: 5px 9px; color: var(--accent); background: var(--tint); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 750; margin-top: 15px; }
.wca-mobile-preview { display: none; }

@media (max-width: 1200px) {
  .wca-intro { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .wca-metrics { width: fit-content; }
  .wca-metrics > div { width: 145px; }
  .wca-workbench { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 930px) {
  .wca-workbench { grid-template-columns: 1fr; }
  .wca-map-stage { min-height: 0; height: 560px; }
  .wca-side { padding: 15px; }
  .wca-directory { max-height: 335px; }
  .wca-selection-empty { min-height: 67px; }
}
@media (max-width: 650px) {
  .wca { padding-top: 23px; padding-bottom: 42px; }
  .wca .wca-container { width: min(calc(100% - 24px), 1720px); }
  .wca .breadcrumb { margin-bottom: 17px; font-size: 12px; }
  .wca-intro h1 {
    font-size: clamp(31px, 9vw, 43px);
    line-height: 1.08;
    letter-spacing: -.05em;
  }
  .wca-kicker { font-size: 10px; }
  .wca-intro > div:first-child > p:last-child { font-size: 13px; line-height: 1.53; }
  .wca-metrics { width: 100%; padding: 12px 3px; }
  .wca-metrics > div { width: 33.333%; padding: 0 12px; }
  .wca-metrics strong { font-size: 26px; }
  .wca-metrics span { font-size: 10px; }
  .wca-toolbar {
    padding: 9px;
    display: grid;
    gap: 8px;
    border-radius: 10px;
  }
  .wca-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    width: 100%;
    padding-bottom: 3px;
    overflow-x: auto;
  }
  .wca-filters button { min-height: 38px; padding: 7px 10px; font-size: 11px; }
  .wca-reset { align-self: unset; justify-self: end; padding: 5px 10px; min-height: 32px; font-size: 11px; }
  .wca-map-stage {
    height: min(71svh, 610px);
    min-height: 390px;
    border-radius: 11px 11px 0 0;
  }
  .wca-map-stage .maplibregl-ctrl-bottom-left { bottom: 36px; }
  .wca-map-stage .maplibregl-ctrl-bottom-right { bottom: 34px; }
  .wca-zoom { right: 9px; top: 9px; }
  .wca-zoom button { width: 38px; height: 38px; }
  .wca-map-hint { bottom: 9px; left: 9px; max-width: calc(100% - 20px); padding: 6px 9px; font-size: 10px; }
  .wca-map-stage:has(.wca-mobile-preview:not([hidden])) .wca-map-hint { display: none; }
  .wca-map-stage:has(.wca-mobile-preview:not([hidden])) .maplibregl-ctrl-bottom-left,
  .wca-map-stage:has(.wca-mobile-preview:not([hidden])) .maplibregl-ctrl-bottom-right { display: none; }
  .wca-mobile-preview:not([hidden]) {
    display: flex;
    position: absolute;
    z-index: 4;
    left: 10px;
    right: 10px;
    bottom: 11px;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 13px 14px;
    border-radius: 11px;
    border: 1px solid #d8e5de;
    background: var(--paper);
    box-shadow: 0 12px 30px #031f1b36;
    color: var(--ink);
  }
  .wca-mobile-caption { display: none; }
  .wca-mobile-preview strong { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
  .wca-mobile-preview button {
    flex: none;
    border-radius: 7px;
    padding: 10px 12px;
    min-height: 39px;
    font-size: 11px;
    font-weight: 800;
    background: var(--deep);
    color: #fff;
  }
  .wca-map-foot { padding: 12px; }
  .wca-legend { gap: 8px 13px; }
  .wca-legend span { font-size: 10px; }
  .wca-side { border-radius: 10px; padding: 12px; }
  .wca-search input { min-height: 46px; }
  .wca-detail { padding: 13px; scroll-margin-top: 80px; }
  .wca-directory { max-height: 320px; }
  .wca-related { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .wca *, .wca *::before, .wca *::after { scroll-behavior: auto !important; }
}
