/* China Legal Portal — city legal-market map (production) */
.clp-map {
  --clp-navy: #0D2240;
  --clp-blue: #1769d2;
  --clp-text: #344a67;
  --clp-muted: #718197;
  --clp-line: #d7e5f3;
  --clp-land: #e6f0fa;
  --clp-bg: #f8fbff;
  max-width: 1160px;
  margin: 8px auto 12px;
  padding: 22px 20px 16px;
  border: 1px solid #e1ebf5;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f7fbff);
  box-shadow: 0 12px 34px rgba(24, 62, 105, 0.07);
  color: var(--clp-text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
}
.clp-map *,
.clp-map *::before,
.clp-map *::after {
  box-sizing: border-box;
}
.clp-map__heading {
  max-width: 720px;
  margin-bottom: 16px;
}
.clp-map__eyebrow,
.clp-map__label {
  margin: 0 0 5px;
  color: var(--clp-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.clp-map h2 {
  margin: 0 !important;
  color: var(--clp-navy) !important;
  font-size: clamp(1.35rem, 3.2vw, 2rem) !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}
.clp-map__heading > p:last-child {
  margin: 8px 0 0;
  color: var(--clp-muted);
  font-size: 14px;
  line-height: 1.55;
}
/* Two-column layout (matches outbound corridor map) */
.clp-map__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.72fr);
  gap: 16px;
  margin-top: 14px;
  align-items: stretch;
}
.clp-map__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--clp-line);
  border-radius: 14px;
  background: radial-gradient(circle at 64% 35%, #fff 0, #f4f9fd 62%, #edf5fc 100%);
  /* Size from SVG viewBox aspect — do not force unrelated height that letterboxes China */
  width: 100%;
  max-width: 100%;
  line-height: 0;
}
.clp-map__svg,
.clp-grok-site .clp-map svg.clp-map__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  /* Matches production viewBox 0 0 920 540 */
  aspect-ratio: 920 / 540;
}
.clp-land {
  fill: url(#clpLand);
  stroke: #bcd2e8;
  stroke-width: 1.1;
  stroke-linejoin: round;
}
.clp-prov {
  fill: url(#clpLand);
  stroke: #ffffff;
  stroke-width: 1.05;
  stroke-linejoin: round;
}
.clp-contours {
  fill: none;
  stroke: #fff;
  stroke-width: 1.15;
  opacity: 0.9;
}
/* South China Sea rectangular cartographic inset (secondary to mainland) */
.clp-inset-box {
  fill: rgba(248, 252, 255, 0.92);
  stroke: #9dbbdd;
  stroke-width: 1.15;
  rx: 0;
  ry: 0;
}
.clp-inset-title {
  fill: var(--clp-muted);
  font-size: 7px;
  font-weight: 700;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}
.clp-inset-land {
  fill: #d7e7f6;
  stroke: #b7cce3;
  stroke-width: 0.55;
  stroke-linejoin: round;
}
.clp-inset-island {
  fill: #7da5cf;
  stroke: #6a94bc;
  stroke-width: 0.25;
  stroke-linejoin: round;
}
.clp-inset-dash {
  fill: none;
  stroke: #8fb0d0;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Legacy class retained for older markup */
.clp-island {
  fill: #7da5cf;
}
.clp-city {
  cursor: pointer;
  outline: none;
  text-decoration: none;
}
.clp-city .halo {
  fill: rgba(23, 105, 210, 0.13);
  opacity: 0;
  /* Decorative halos overlap heavily in dense city clusters. */
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.clp-city .ring {
  fill: #fff;
  stroke: var(--clp-blue);
  stroke-width: 3;
  transition: stroke-width 0.18s ease;
}
.clp-city .core {
  fill: var(--clp-blue);
}
.clp-city text {
  fill: var(--clp-navy);
  font-size: 11px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  pointer-events: none;
  opacity: 0.72;
}
/* Restrained non-active labels on desktop; full emphasis only for active */
.clp-city:not(.is-active) text {
  font-size: 10px;
  font-weight: 550;
  opacity: 0.55;
}
.clp-city:hover text,
.clp-city:focus text,
.clp-city:focus-visible text {
  opacity: 1;
  font-weight: 700;
  font-size: 11.5px;
}
.clp-city:hover .halo,
.clp-city:focus .halo,
.clp-city:focus-visible .halo,
.clp-city.is-active .halo {
  opacity: 1;
}
.clp-city.is-active .ring {
  stroke-width: 5;
  stroke: var(--clp-navy);
}
.clp-city.is-active .core {
  fill: var(--clp-navy);
}
.clp-city.is-active text {
  font-weight: 800;
  font-size: 13px;
  opacity: 1;
}
.clp-city:focus-visible {
  outline: 3px solid #e6a650;
  outline-offset: 2px;
}
.clp-map__details {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--clp-line);
  border-radius: 14px;
  background: #fff;
  min-height: 0;
}
.clp-map__details strong {
  display: block;
  color: var(--clp-navy);
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 4px 0 10px;
}
.clp-map__route,
.clp-map__themes {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--clp-line);
}
.clp-map__route b,
.clp-map__themes b {
  display: block;
  color: var(--clp-navy);
  font-size: 12px;
  margin-bottom: 3px;
}
.clp-map__route span,
.clp-map__themes span,
.clp-map__details [data-detail-focus] {
  display: block;
  color: var(--clp-muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.clp-map__cta,
.clp-map__details > a.clp-map__cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--clp-navy);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 750;
  font-size: 13px;
}
.clp-map__cta:hover,
.clp-map__cta:focus-visible,
.clp-map__details > a.clp-map__cta:hover,
.clp-map__details > a.clp-map__cta:focus-visible {
  background: var(--clp-blue);
  outline: 3px solid rgba(23, 105, 210, 0.16);
  outline-offset: 2px;
}
.clp-map__links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.clp-map__links a {
  padding: 6px 10px;
  border: 1px solid var(--clp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--clp-text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.clp-map__links a:hover,
.clp-map__links a:focus-visible,
.clp-map__links a[aria-current="page"] {
  border-color: #9bc1ec;
  background: #eff6ff;
  color: var(--clp-blue);
}
.clp-map__source-note {
  margin: 12px 2px 0;
  color: #8794a5;
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .clp-map {
    margin: 8px 0 16px;
    padding: 16px 14px 12px;
  }
  .clp-map__layout {
    grid-template-columns: 1fr;
  }
  /* Keep landscape geographic proportions — China stays large in SVG */
  .clp-map__svg {
    width: 100%;
    height: auto;
    aspect-ratio: 920 / 540;
  }
}
@media (max-width: 700px) {
  .clp-map__cta {
    width: 100%;
  }
  .clp-map__svg {
    width: 100%;
    height: auto;
    aspect-ratio: 920 / 540;
  }
  /* Mobile: only active city label on map; chips remain crawlable */
  .clp-city:not(.is-active) text {
    display: none;
  }
  .clp-city.is-active text {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .clp-city .halo,
  .clp-city .ring {
    transition: none;
  }
}

/* Production class aliases used by PHP renderer */
.clp-map-land-group { filter: drop-shadow(0 8px 16px rgba(23,61,105,.12)); }
.clp-map-prov {
  fill: url(#clpLand);
  stroke: #ffffff;
  stroke-width: 1.05;
  stroke-linejoin: round;
}

/* Hainan focus — a quieter national locator for Haikou and Sanya guides. */
.clp-map--market-focus {
  --clp-navy:#09243a;
  --clp-blue:#c79a3b;
  --clp-text:#173649;
  --clp-muted:#627782;
  --clp-line:#c9d5d3;
  margin-top:0;
  padding:0;
  border:0;
  border-top:4px solid #c79a3b;
  border-radius:0;
  background:#f7f3eb;
  box-shadow:0 18px 48px rgba(8,31,49,.12);
  overflow:hidden;
  scroll-margin-top:132px;
}
.clp-map--market-focus .clp-map__heading {
  max-width:none;
  margin:0;
  padding:28px 30px 23px;
  border-bottom:1px solid #d5cec1;
  display:grid;
  grid-template-columns:minmax(260px,.7fr) minmax(0,1fr);
  column-gap:48px;
  align-items:end;
}
.clp-map--market-focus .clp-map__eyebrow { grid-column:1/-1; color:#98701f; }
.clp-map--market-focus h2 {
  color:#0b2b42!important;
  font-family:"Cormorant Garamond",Georgia,serif!important;
  font-size:clamp(2.2rem,4vw,3.45rem)!important;
  font-weight:600!important;
  letter-spacing:-.025em;
  line-height:.92!important;
}
.clp-map--market-focus .clp-map__heading>p:last-child {
  margin:0 0 3px;
  padding-left:20px;
  border-left:2px solid #c79a3b;
  color:#536a76;
  font-size:14px;
}
.clp-map--market-focus .clp-map__layout {
  grid-template-columns:minmax(0,1.75fr) minmax(260px,.65fr);
  gap:0;
  margin:0;
}
.clp-map--market-focus .clp-map__frame {
  border:0;
  border-radius:0;
  background:radial-gradient(circle at 63% 78%,#183e53 0,#0d2b43 42%,#071d31 100%);
}
.clp-map--market-focus #clpLand stop:first-child { stop-color:#bfd0cc; }
.clp-map--market-focus #clpLand stop:last-child { stop-color:#789a9a; }
.clp-map--market-focus .clp-map-prov { stroke:rgba(240,238,226,.72); stroke-width:.85; }
.clp-map--market-focus .clp-map-land-group { filter:drop-shadow(0 10px 18px rgba(0,0,0,.28)); }
.clp-map--market-focus .clp-inset-box { fill:rgba(8,31,49,.72); stroke:#63828a; }
.clp-map--market-focus .clp-inset-title { fill:#b9c9c8; }
.clp-map--market-focus .clp-inset-land { fill:#789a9a; stroke:#afc3c0; }
.clp-map--market-focus .clp-inset-island { fill:#c79a3b; stroke:#e1c77f; }
.clp-map--market-focus .clp-inset-dash { stroke:#9bb0b0; }
.clp-map--market-focus .clp-city:not(.is-active) text { display:none; }
.clp-map--market-focus .clp-city[data-slug="beijing"] text,
.clp-map--market-focus .clp-city[data-slug="shanghai"] text,
.clp-map--market-focus .clp-city[data-slug="guangzhou"] text,
.clp-map--market-focus .clp-city[data-slug="haikou"] text,
.clp-map--market-focus .clp-city[data-slug="sanya"] text { display:block; }
.clp-map--market-focus .clp-city:not(.is-active):not([data-slug="beijing"]):not([data-slug="shanghai"]):not([data-slug="guangzhou"]):not([data-slug="haikou"]):not([data-slug="sanya"]) {
  opacity:.22;
}
.clp-map--market-focus .clp-city:hover,
.clp-map--market-focus .clp-city:focus,
.clp-map--market-focus .clp-city:focus-visible { opacity:1!important; }
.clp-map--market-focus .clp-city .ring { fill:#09243a; stroke:#9bb7b4; stroke-width:2; }
.clp-map--market-focus .clp-city .core { fill:#d6e1de; }
.clp-map--market-focus .clp-city text {
  fill:#eef3ef;
  stroke:#09243a;
  stroke-width:4px;
  opacity:.76;
}
.clp-map--market-focus .clp-city.is-active .halo { fill:rgba(222,180,80,.27); opacity:1; }
.clp-map--market-focus .clp-city.is-active .ring { fill:#0a263c; stroke:#e3bd60; stroke-width:5; }
.clp-map--market-focus .clp-city.is-active .core { fill:#e3bd60; }
.clp-map--market-focus .clp-city.is-active text { fill:#f2cb6e; font-size:14px; stroke-width:4.5px; }
.clp-hainan-orbit { fill:none; stroke:rgba(224,184,91,.72); stroke-width:1.4; stroke-dasharray:3 5; }
.clp-hainan-orbit.inner { stroke:rgba(224,184,91,.32); stroke-dasharray:none; }
.clp-hainan-route-line { fill:none; stroke:#d9b258; stroke-width:1; }
.clp-hainan-caption { fill:#e1bd68; font:700 8px/1 Inter,system-ui,sans-serif; letter-spacing:.12em; }
.clp-map--market-focus .clp-map__details {
  padding:30px 27px 25px;
  border:0;
  border-left:1px solid #c9d5d3;
  border-radius:0;
  background:#dfe9e8;
}
.clp-map--market-focus .clp-map__label { color:#98701f; }
.clp-map--market-focus .clp-map__details strong {
  color:#0b2b42;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:2.25rem;
  font-weight:600;
}
.clp-map--market-focus .clp-map__route,
.clp-map--market-focus .clp-map__themes { border-color:#b8cbc8; padding:16px 0; }
.clp-map--market-focus .clp-map__cta { border-radius:0; background:#0b2b42; letter-spacing:.05em; }
.clp-map--market-focus .clp-map__links--focus {
  gap:0;
  margin:0;
  border-top:1px solid #d5cec1;
  border-bottom:1px solid #d5cec1;
  background:#fffdf9;
}
.clp-map--market-focus .clp-map__links--focus a {
  flex:1 1 110px;
  padding:11px 14px;
  border:0;
  border-right:1px solid #ddd5c8;
  border-radius:0;
  background:transparent;
  text-align:center;
}
.clp-map--market-focus .clp-map__links--focus a[aria-current="page"] {
  background:#0b2b42;
  color:#e3bd60;
}
.clp-map__all-markets { padding:0 24px; border-bottom:1px solid #d5cec1; background:#f7f3eb; }
.clp-map__all-markets summary {
  cursor:pointer;
  padding:14px 0;
  color:#1b4053;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.clp-map__all-markets .clp-map__links { padding:0 0 18px; }
.clp-map--market-focus .clp-map__source-note { margin:0; padding:13px 24px 16px; font-size:11px; }
@media(max-width:900px) {
  .clp-map--market-focus { padding:0; }
  .clp-map--market-focus .clp-map__heading { grid-template-columns:1fr; padding:24px 20px 20px; }
  .clp-map--market-focus .clp-map__heading>p:last-child { margin-top:15px; }
  .clp-map--market-focus .clp-map__layout { grid-template-columns:1fr; }
  .clp-map--market-focus .clp-map__details { border-left:0; border-top:1px solid #b8cbc8; }
}
@media(max-width:520px) {
  .clp-map--market-focus .clp-map__frame { overflow-x:auto; }
  .clp-map--market-focus .clp-map__svg { min-width:600px; transform:translateX(-165px); }
  .clp-map--market-focus .clp-map__details { padding:24px 20px; }
  .clp-map--market-focus .clp-map__links--focus a { flex-basis:33.333%; }
  .clp-map__all-markets { padding:0 20px; }
}
