/*
 * CUPA Issue Map: the full-screen dark map (/issues, .im-*), the editorial
 * issue pages and methodology (.ip-*), the dashboard (.dash-*), the issue
 * mini-map (.mm-*) and the admin editor (.ia-*). Loaded only on those pages.
 */

:root {
  --st-worsening: #E8663D;
  --st-unchanging: #6A9BE0;
  --st-improving: #3DBE8B;
  --st-developing: #9AA0A6;
  --font-mono: ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas, monospace;
  --ip-paper: #F7F6F3;
  --ip-ink: #141414;
  --ip-grey: #6A6A66;
  --ip-rule: #DAD8D2;
  --im-sea: #121418;
  --im-land: #2E333C;
  --im-border: #4B515D;
}

.im-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.im-dot {
  display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%;
  background: var(--status, #9AA0A6); vertical-align: 0.04em; flex-shrink: 0;
}

/* ===================================================== The map document */

html.im-doc, .im-body { height: 100%; }
.im-body {
  margin: 0; background: #000; color: #fff; overflow: hidden;
  font-family: var(--font); -webkit-font-smoothing: antialiased;
}
.im-body .skip-link { z-index: 200; }

.im-app {
  display: grid; grid-template-columns: minmax(360px, 440px) 1fr;
  height: 100vh; height: 100dvh;
}

/* -------------------------------------------------------------- Panel */

.im-panel {
  position: relative; z-index: 20; background: #000; color: #fff;
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid #1d1f24;
}
.im-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 22px 32px 0; }
.im-brand { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; min-width: 0; }
.im-brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.im-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.im-brand-text strong { font-size: 0.95rem; letter-spacing: 0.04em; }
.im-brand-text span { font-size: 0.74rem; color: #9B9B9B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-brand:hover .im-brand-text span { color: #fff; }
.im-brand-map { display: none !important; }

.im-panel-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 32px 28px; scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.im-title { color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 0.45rem; }
.im-subtitle {
  font-family: var(--font-serif); font-style: italic; font-optical-sizing: auto;
  font-size: 1.22rem; line-height: 1.35; color: #CFCFCF; margin: 0 0 1.4rem;
  padding-bottom: 1.4rem; border-bottom: 1px solid #2A2A2A;
}

.im-countrow { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.9rem; }
.im-count, .im-reset {
  margin: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
}
.im-reset { display: inline-flex; align-items: center; gap: 0.45em; color: #BDBDBD; }
.im-reset:hover { color: #fff; }

.im-search { position: relative; margin-bottom: 1.6rem; }
.im-search input {
  width: 100%; font: inherit; font-size: 0.98rem; color: #fff; background: transparent;
  border: 1px solid #6B6B6B; border-radius: 999px; padding: 0.68em 2.8em 0.68em 1.15em;
  -webkit-appearance: none; appearance: none;
}
.im-search input::placeholder { color: #9A9A9A; }
.im-search input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.im-search input::-webkit-search-cancel-button { filter: invert(1); }
.im-search svg { position: absolute; right: 1.05em; top: 50%; transform: translateY(-50%); color: #AFAFAF; pointer-events: none; }

.im-facet { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.im-facet legend, .im-facet-h {
  padding: 0; margin: 0 0 0.75rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.17em; text-transform: uppercase; color: #8E8E8E;
}
.im-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 1rem; }
.im-check { position: relative; display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.3rem 0; cursor: pointer; font-size: 0.9rem; line-height: 1.3; color: #EDEDED; }
.im-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.im-box {
  width: 15px; height: 15px; margin-top: 1px; flex-shrink: 0; border: 1.5px solid #9A9A9A; border-radius: 1px;
  display: grid; place-items: center; transition: background 0.12s, border-color 0.12s;
}
.im-check:hover .im-box { border-color: #fff; }
.im-check input:checked + .im-box { background: #fff; border-color: #fff; }
.im-check input:checked + .im-box::after {
  content: ""; width: 4px; height: 8px; border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg);
}
.im-check input:focus-visible + .im-box { outline: 2px solid #fff; outline-offset: 2px; }
.im-check-label { display: inline-flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }

.im-apply {
  font: inherit; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #000; background: #fff; border: 0; border-radius: 999px; padding: 0.75em 1.5em; cursor: pointer; margin-bottom: 1.5rem;
}

.im-list { border-top: 1px solid #2A2A2A; padding-top: 1.4rem; outline: none; }
.im-items { list-style: none; margin: 0; padding: 0; }
.im-item a {
  display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0.6rem; margin: 0 -0.6rem;
  color: #fff; border-radius: 3px; transition: background 0.12s;
}
.im-item a:hover, .im-item a:focus-visible { background: #15171B; }
.im-item .im-dot { width: 11px; height: 11px; margin-top: 0.42rem; box-shadow: 0 0 0 1.5px #000, 0 0 0 2.5px rgba(255, 255, 255, 0.12); }
.im-item-text { display: flex; flex-direction: column; min-width: 0; }
.im-item-title { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.12rem; line-height: 1.25; }
.im-item-meta { font-size: 0.78rem; color: #8E8E8E; margin-top: 0.15rem; }
.im-note { font-size: 0.9rem; color: #A5A5A5; }
.im-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.im-panel-foot {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid #2A2A2A;
}
.im-panel-foot a { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8E8E8E; }
.im-panel-foot a:hover { color: #fff; }

.im-sheet-toggle { display: none; }

/* ---------------------------------------------------------------- Map */

.im-map { position: relative; min-width: 0; overflow: hidden; background: var(--im-sea); }
.im-stage {
  position: absolute; inset: 0; overflow: hidden; background: var(--im-sea);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none;
}
.im-stage.is-dragging { cursor: grabbing; }
.im-stage:focus-visible { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); }
.im-stage.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: rgba(255, 255, 255, 0.7); border-radius: 50%;
  animation: im-spin 0.9s linear infinite;
}
@keyframes im-spin { to { transform: rotate(360deg); } }
.im-nojs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; max-width: 26rem;
  text-align: center; color: #9AA0A6; font-size: 0.95rem; padding: 0 1.5rem;
}
.im-js .im-stage.is-loading .im-nojs { visibility: hidden; }

.im-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.im-land {
  fill: var(--im-land); stroke: var(--im-border); stroke-width: 0.6px; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; fill-rule: evenodd; transition: fill 0.35s;
}
.im-land.is-pak { fill: #434A58; stroke: #687080; }
.im-land.is-related { fill: #3E3A4F; stroke: #8E7BB3; }
.im-land.is-pak.is-related { fill: #4C465F; }
.im-disputed { stroke: none; pointer-events: none; fill-rule: evenodd; }
.im-hatch-line { stroke: #A3A9B4; stroke-opacity: 0.5; }
.im-line { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linecap: round; }
.im-line-loc { stroke: #D3D7DF; stroke-width: 1.1px; stroke-dasharray: 3.5 2.5; }
.im-line-siachen { stroke: #D3D7DF; stroke-width: 1px; stroke-dasharray: 1 2.2; }
.im-line-jk-edge { stroke: #7C8391; stroke-width: 0.8px; stroke-dasharray: 1 2.5; }

.im-overlay { position: absolute; inset: 0; pointer-events: none; }
.im-leaders { position: absolute; inset: 0; overflow: visible; }
.im-leaders line { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; }
.im-leaders circle { fill: rgba(255, 255, 255, 0.75); }

.im-label {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.25s; will-change: transform;
}
.im-label.is-on { opacity: 1; }
.im-label-water {
  font-family: var(--font-serif); font-style: italic; font-optical-sizing: auto;
  font-size: 0.86rem; color: #6C727E; letter-spacing: 0.01em;
}
.im-label-country {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #7E8592;
  text-shadow: 0 0 3px var(--im-land);
}
.im-label-country.is-pak { color: #B9BECA; }

.im-markers { position: absolute; inset: 0; }
.im-marker {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  display: grid; place-items: center; border-radius: 50%; pointer-events: auto; cursor: pointer; z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.im-marker-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--status, #9AA0A6);
  box-shadow: 0 0 0 1.5px #0B0C0F, 0 2px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.im-marker:hover, .im-marker.is-hot, .im-marker:focus-visible { z-index: 3; }
.im-marker:hover .im-marker-dot, .im-marker.is-hot .im-marker-dot {
  transform: scale(1.18); box-shadow: 0 0 0 1.5px #0B0C0F, 0 0 0 4px rgba(255, 255, 255, 0.9), 0 3px 12px rgba(0, 0, 0, 0.6);
}
.im-marker:focus { outline: none; }
.im-marker:focus-visible .im-marker-dot { box-shadow: 0 0 0 1.5px #0B0C0F, 0 0 0 4px #fff, 0 0 0 6px var(--accent); }
.im-marker.is-focus .im-marker-dot { animation: im-pulse 2s ease-out 2; }
@keyframes im-pulse {
  0% { box-shadow: 0 0 0 1.5px #0B0C0F, 0 0 0 4px rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(255, 255, 255, 0.5); }
  100% { box-shadow: 0 0 0 1.5px #0B0C0F, 0 0 0 4px rgba(255, 255, 255, 0.9), 0 0 0 26px rgba(255, 255, 255, 0); }
}

.im-tooltip {
  position: absolute; left: 0; top: 0; z-index: 30; width: 290px; pointer-events: none;
  background: #FFF; color: #111; border-radius: 2px; padding: 16px 18px 15px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
}
.im-tooltip.is-touch { pointer-events: auto; cursor: pointer; }
.im-tt-kicker { margin: 0 0 0.35rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: #6A6A66; }
.im-tt-title { margin: 0 0 0.75rem; font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.32rem; line-height: 1.16; color: #111; }
.im-tt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0 0 0.8rem; padding-top: 0.7rem; border-top: 1px solid #E3E1DC; }
.im-tt-meta dt { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: #8A8A85; margin-bottom: 0.15rem; }
.im-tt-meta dd { margin: 0; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45em; }
.im-tt-cta { display: block; margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #111; }
a.im-tt-cta { text-decoration: underline; text-underline-offset: 3px; }

.im-toplinks {
  position: absolute; top: 22px; right: 28px; z-index: 15; display: flex; gap: 1.8rem; align-items: center;
}
.im-toplinks a {
  display: inline-flex; align-items: center; gap: 0.45em; color: #fff; font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.17em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  padding: 0.4em 0; border-bottom: 1px solid transparent;
}
.im-toplinks a:hover { border-bottom-color: #fff; }

.im-zoom {
  position: absolute; right: 28px; bottom: 34px; z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.im-zoom-btn {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(14, 15, 18, 0.55); border: 1px solid rgba(255, 255, 255, 0.55);
  font: inherit; font-size: 1.5rem; line-height: 1; transition: background 0.15s, border-color 0.15s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.im-zoom-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.im-zoom-world {
  display: inline-flex; align-items: center; gap: 0.4em; cursor: pointer; margin-bottom: 4px;
  font: inherit; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: #fff; background: rgba(14, 15, 18, 0.55); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px;
  padding: 0.55em 0.95em;
}
.im-zoom-world:hover { border-color: #fff; }
.im-zoom button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.im-legend {
  position: absolute; left: 24px; bottom: 22px; z-index: 15; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
  align-items: center; font-size: 0.7rem; letter-spacing: 0.04em; color: #8A909C; pointer-events: none;
}
.im-legend-item { display: inline-flex; align-items: center; gap: 0.5em; }
.im-swatch-hatch {
  width: 16px; height: 11px; border: 1px solid #6D7481; background: #3A404B
    repeating-linear-gradient(135deg, rgba(190, 196, 206, 0.55) 0 1px, transparent 1px 4px);
}
.im-swatch-dash { width: 18px; height: 0; border-top: 1.5px dashed #D3D7DF; }
.im-legend-credit { color: #6A707B; }

@media (prefers-reduced-motion: reduce) {
  .im-marker-dot, .im-label, .im-land { transition: none; }
  .im-marker.is-focus .im-marker-dot { animation: none; }
  .im-stage.is-loading::after { animation-duration: 3s; }
}

/* ---------------------------------------------- Map: phones and tablets */

@media (max-width: 860px) {
  .im-body { overflow: auto; }
  .im-app { display: flex; flex-direction: column-reverse; height: auto; min-height: 100dvh; }
  .im-map { height: 62vh; flex: none; }
  .im-panel { border-right: 0; }
  .im-panel-head { padding: 18px 18px 0; }
  .im-panel-body { padding: 18px 18px 28px; overflow: visible; }
  .im-toplinks { top: 12px; right: 14px; gap: 1rem; }
  .im-toplinks a { font-size: 0.66rem; letter-spacing: 0.13em; }
  .im-zoom { right: 14px; bottom: 18px; gap: 9px; }
  .im-zoom-btn { width: 46px; height: 46px; }
  .im-legend { left: 14px; bottom: 14px; flex-direction: column; align-items: flex-start; gap: 0.3rem; font-size: 0.64rem; }
  .im-legend-credit { display: none; }
  .im-tooltip { width: min(290px, calc(100vw - 28px)); }
  .im-marker { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .im-marker-dot { width: 17px; height: 17px; }
  .im-brand-site { display: none; }
  .im-brand-map { display: block !important; }

  /* With JavaScript the map fills the screen and the panel is a bottom sheet. */
  .im-js .im-body { overflow: hidden; }
  .im-js .im-app { display: block; height: 100dvh; min-height: 0; }
  .im-js .im-map { position: fixed; inset: 0; height: auto; }
  .im-js .im-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 86dvh;
    border-radius: 16px 16px 0 0; border-top: 1px solid #2A2D33; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    transform: translateY(calc(100% - 70px - env(safe-area-inset-bottom, 0px)));
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .im-js .im-panel.is-open { transform: none; }
  .im-js .im-panel-head { min-height: 70px; padding: 0 16px; position: relative; }
  .im-js .im-panel-head::before {
    content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px;
    border-radius: 2px; background: #3A3D44;
  }
  .im-js .im-panel-body { overflow-y: auto; padding-top: 6px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .im-js .im-sheet-toggle {
    display: inline-flex; align-items: center; gap: 0.5em; flex-shrink: 0; cursor: pointer;
    font: inherit; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: #000; background: #fff; border: 0; border-radius: 999px; padding: 0.7em 1.05em;
  }
  .im-js .im-sheet-count {
    min-width: 1.6em; padding: 0 0.4em; border-radius: 999px; background: #000; color: #fff;
    font-size: 0.72rem; letter-spacing: 0; text-align: center; line-height: 1.6em;
  }
  .im-js .im-zoom { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .im-js .im-legend { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .im-title { font-size: 1.6rem; }
  .im-subtitle { font-size: 1.08rem; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .im-js .im-panel { transition: none; }
}

/* ================================================ CUPA theme for the map
   The map page carries the site header and CUPA's purple palette (ink panel,
   purple sea and land, Pakistan in the brand accent). Overrides the neutral
   values above; status colours stay as they are so markers read clearly. */

:root {
  --im-sea: #1A1030;
  --im-land: #3A2A57;
  --im-border: #5E4A82;
}

.im-body {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: var(--im-sea);
}
.im-body .utility-bar, .im-body .site-header { position: relative; z-index: 60; flex-shrink: 0; }
.im-body .site-header { border-bottom: 1px solid var(--line-dark); }
.im-app { flex: 1; min-height: 0; height: auto; }

/* The site header already carries the logo, so the panel drops its own brand. */
.im-panel-head .im-brand { display: none; }
.im-panel-head { padding-top: 0; }

.im-panel { background: var(--ink); border-right-color: var(--line-dark); }
.im-panel-body { scrollbar-color: var(--line-dark) transparent; }
.im-subtitle { color: var(--on-ink); border-bottom-color: var(--line-dark); }
.im-reset, .im-facet-h, .im-facet legend { color: var(--on-ink-muted); }
.im-search input { border-color: var(--on-ink-muted); background: rgba(255, 255, 255, 0.04); }
.im-search input::placeholder { color: var(--on-ink-muted); }
.im-search input:focus { border-color: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-soft); }
.im-search svg { color: var(--on-ink-muted); }
.im-check { color: var(--on-ink); }
.im-box { border-color: var(--on-ink-muted); }
.im-check:hover .im-box { border-color: #fff; }
.im-check input:checked + .im-box { background: var(--accent); border-color: var(--accent); }
.im-check input:checked + .im-box::after { border-color: #fff; }
.im-check input:focus-visible + .im-box { outline-color: var(--accent-soft); }
.im-apply { background: var(--accent); color: #fff; }
.im-apply:hover { background: var(--accent-dark); }
.im-list, .im-panel-foot { border-top-color: var(--line-dark); }
.im-item a:hover, .im-item a:focus-visible { background: rgba(255, 255, 255, 0.06); }
.im-item .im-dot { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 2.5px rgba(255, 255, 255, 0.14); }
.im-item-meta, .im-note, .im-panel-foot a { color: var(--on-ink-muted); }

.im-land.is-pak { fill: var(--accent-dark); stroke: var(--accent-soft); }
.im-land.is-related { fill: #4A3570; stroke: var(--accent-soft); }
.im-land.is-pak.is-related { fill: var(--accent); }
.im-hatch-line { stroke: var(--accent-soft); stroke-opacity: 0.55; }
.im-line-loc, .im-line-siachen { stroke: #E7DEF2; }
.im-line-jk-edge { stroke: var(--on-ink-muted); }
.im-label-water { color: #8E7BB0; }
.im-label-country { color: #9C8BBE; }
.im-label-country.is-pak { color: #fff; }
.im-marker-dot { box-shadow: 0 0 0 1.5px var(--im-sea), 0 2px 8px rgba(10, 4, 24, 0.6); }
.im-marker:hover .im-marker-dot, .im-marker.is-active .im-marker-dot {
  box-shadow: 0 0 0 1.5px var(--im-sea), 0 0 0 4px rgba(255, 255, 255, 0.92), 0 3px 12px rgba(10, 4, 24, 0.6);
}
.im-tt-cta { color: var(--accent-dark); }
.im-tt-title { color: var(--ink); }

.im-toplinks a { text-shadow: 0 1px 6px rgba(10, 4, 24, 0.85); }
.im-toplinks a:hover { border-bottom-color: var(--accent-soft); }
.im-zoom-btn, .im-zoom-world { background: rgba(42, 27, 69, 0.72); border-color: rgba(201, 184, 222, 0.55); }
.im-zoom-btn:hover, .im-zoom-world:hover { background: var(--accent); border-color: var(--accent); }
.im-legend { color: var(--on-ink-muted); }
.im-swatch-hatch { border-color: var(--accent-soft); background: #3A2A57
  repeating-linear-gradient(135deg, rgba(201, 184, 222, 0.6) 0 1px, transparent 1px 4px); }
.im-swatch-dash { border-top-color: #E7DEF2; }
.im-legend-credit { color: #7F6CA3; }

@media (max-width: 860px) {
  .im-body .utility-bar { display: none; }
  .im-js .im-app { position: relative; flex: 1; height: auto; }
  .im-js .im-map { position: absolute; inset: 0; }
  .im-js .im-panel { border-top-color: var(--line-dark); box-shadow: 0 -12px 40px rgba(10, 4, 24, 0.6); }
  .im-js .im-panel-head { padding-top: 0; }
  .im-js .im-panel-head::before { background: var(--line-dark); }
  .im-panel-head .im-brand { display: inline-flex; }
  .im-brand img { background: #fff; }
  .im-brand-text span { color: var(--on-ink-muted); }
  .im-js .im-sheet-toggle { background: var(--accent); color: #fff; }
  .im-js .im-sheet-count { background: #fff; color: var(--ink); }
}

/* ============================================ Editorial pages (light) */

.ip { background: var(--ip-paper); color: var(--ip-ink); padding-bottom: 5rem; }
.ip-wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }

.ip-bar { background: #000; color: #fff; }
.ip-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.ip-back, .ip-share {
  display: inline-flex; align-items: center; gap: 0.45em; color: #fff; font: inherit; font-size: 1rem;
  background: none; border: 0; padding: 0.4em 0; cursor: pointer;
}
.ip-back:hover span, .ip-share:hover span { text-decoration: underline; text-underline-offset: 4px; }
.ip-back:focus-visible, .ip-share:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ip-bar-title { display: inline-flex; align-items: center; gap: 0.8rem; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.ip-bar-title span {
  font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 1.15rem; letter-spacing: 0.02em;
  padding-right: 0.8rem; border-right: 1px solid #555;
}

.ip-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #3A3A38; border: 1px solid #CAC8C2; background: #FBFAF8; padding: 0.3em 0.75em; margin-bottom: 1.2rem;
}
.ip-title {
  font-family: var(--font-serif); font-optical-sizing: auto; font-weight: 400; color: var(--ip-ink);
  font-size: clamp(2.6rem, 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -0.022em; margin: 0; text-wrap: balance;
}

.ip-head { display: grid; grid-template-columns: 1fr minmax(300px, 380px); gap: 2rem 4rem; align-items: end; padding: 3rem 0 1.6rem; }
.ip-meta { margin: 0; align-self: start; }
.ip-meta div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--ip-rule); }
.ip-meta div:last-child { border-bottom: 0; }
.ip-meta dt { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: #222; }
.ip-meta dd { margin: 0; font-size: 1.02rem; text-align: right; }

.ip-pill {
  display: inline-flex; align-items: center; gap: 0.5em; border-radius: 999px; padding: 0.24em 0.85em 0.24em 0.7em;
  font-size: 0.95rem; line-height: 1.35; color: #15171A; white-space: nowrap;
  background: color-mix(in srgb, var(--status) 20%, #fff); border: 1px solid var(--status);
}
.ip-pill::before { content: ""; width: 0.58em; height: 0.58em; border-radius: 50%; background: var(--status); }

.ip-related {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem 2rem; flex-wrap: wrap;
  border-top: 1.5px solid var(--ip-ink); border-bottom: 1px solid var(--ip-rule); padding: 0.85rem 0;
}
.ip-related p { margin: 0; }
.ip-related-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-size: 1.02rem; }
.ip-related-label { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; margin-right: 0.4rem; }
.ip-sep { width: 5px; height: 5px; border-radius: 50%; background: #A8A6A0; }
.ip-updated { color: var(--ip-grey); font-size: 1rem; }

.ip-label {
  font-family: var(--font); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ip-ink); margin: 0 0 1rem;
}
.ip-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4.5rem; padding: 3rem 0 3.5rem; border-bottom: 1px solid var(--ip-rule); }
.ip-overview.no-image { grid-template-columns: minmax(0, 52rem); }
.ip-lede p { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.38; letter-spacing: -0.012em; color: #161616; margin: 0 0 0.9em; }
.ip-lede a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ip-figure { margin: 0; }
.ip-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #E7E5E0; }
.ip-figure figcaption { margin-top: 0.7rem; font-size: 0.9rem; line-height: 1.45; color: #2E2E2C; }
.ip-credit { color: #8D8B85; }

.ip-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 5rem; padding-top: 3.5rem; }
.ip-side-inner { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.ip-toc-h { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ip-ink); margin: 0 0 1.1rem; }
.ip-toc ol { list-style: none; margin: 0 0 2rem; padding: 0; }
.ip-toc a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 1.05rem; color: #707070; transition: color 0.15s; }
.ip-toc a:hover { color: var(--ip-ink); }
.ip-toc a.is-active { color: var(--ip-ink); font-weight: 600; }
.ip-toc-arrow { display: inline-flex; opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; }
.ip-toc a.is-active .ip-toc-arrow { opacity: 1; transform: none; }

.ip-mini { position: relative; margin: 0; border: 1px solid #C9C7C1; background: #DDE3EA; overflow: hidden; aspect-ratio: 5 / 4; }
.ip-mini-open {
  position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #111; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.ip-mini-open:hover { transform: scale(1.07); }

.mm-svg { display: block; width: 100%; height: 100%; }
.mm-sea { fill: #DCE2E9; }
.mm-land, .mm-pak, .mm-rel { stroke-linejoin: round; vector-effect: non-scaling-stroke; fill-rule: evenodd; }
.mm-land { fill: #F6F5F1; stroke: #B5B9C0; stroke-width: 0.6px; }
.mm-pak { fill: #EEECE6; stroke: #A9ADB5; stroke-width: 0.7px; }
.mm-rel { fill: #E7DEF2; stroke: #6E42A6; stroke-width: 1.3px; }
.mm-disputed { fill: url(#mm-hatch); stroke: none; fill-rule: evenodd; }
.mm-hatch-line { stroke: #6E42A6; stroke-opacity: 0.32; }
.mm-line { fill: none; stroke: #5A3689; stroke-width: 1px; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.mm-label { font-family: var(--font); font-weight: 500; letter-spacing: 0.06em; fill: #73767C; text-anchor: middle; paint-order: stroke; stroke: rgba(246, 245, 241, 0.85); stroke-width: 3px; stroke-linejoin: round; }
.mm-label.is-rel { fill: #2A1B45; font-weight: 700; }
.mm-marker { stroke: #111; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }

.ip-main { max-width: 900px; min-width: 0; }
.ip-section { margin-bottom: 4rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.ip-sechead {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  border-top: 1.5px solid var(--ip-ink); padding-top: 1.1rem; margin-bottom: 0.4rem;
}
.ip-sechead h2 { font-size: 1.1rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ip-ink); margin: 0; }
.ip-more { display: inline-flex; align-items: center; gap: 0.4em; font-size: 1rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ip-ink); }
.ip-more:hover { text-decoration: underline; text-underline-offset: 4px; }

.ip-update { padding: 1.9rem 0; border-bottom: 1px solid var(--ip-rule); }
.ip-update-title { font-family: var(--font-serif); font-optical-sizing: auto; font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 1.95rem); line-height: 1.18; letter-spacing: -0.01em; color: var(--ip-ink); margin: 0 0 0.6rem; }
.ip-date { margin: 0 0 0.9rem; font-size: 0.95rem; color: var(--ip-grey); }
.ip-update-body { font-size: 1.07rem; line-height: 1.55; color: #1E1E1E; }
.ip-update-body ul, .ip-update-body ol { margin: 0; padding-left: 2.4rem; }
.ip-update-body li { margin-bottom: 0.7rem; padding-left: 0.4rem; }
.ip-update-body p { margin: 0 0 0.7rem; }
.ip-update-body a, .ip-prose a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ip-update-body a:hover, .ip-prose a:hover { text-decoration-thickness: 2px; color: var(--accent-dark); }

.ip-h2 {
  font-family: var(--font); font-size: clamp(2.1rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -0.015em;
  text-transform: uppercase; color: var(--ip-ink); margin: 0 0 1.6rem;
}
.ip-prose { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.3rem; line-height: 1.62; color: #1B1B1B; }
.ip-prose p { margin: 0 0 1.15em; }
.ip-prose h2, .ip-prose h3 { font-family: var(--font); color: var(--ip-ink); letter-spacing: -0.01em; margin: 1.8em 0 0.6em; }
.ip-prose h2 { font-size: 1.45rem; }
.ip-prose h3 { font-size: 1.15rem; }
.ip-prose ul, .ip-prose ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.ip-prose li { margin-bottom: 0.4em; }
.ip-prose blockquote { margin: 1.4em 0; padding-left: 1.2em; border-left: 2px solid var(--accent); color: #333; font-style: italic; }

.ip-resources { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 3rem; }
.ip-resource-title { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.5rem; line-height: 1.2; color: var(--ip-ink); display: inline-block; margin-bottom: 0.5rem; }
.ip-resource-title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ip-resources .ip-date { margin: 0 0 0.2rem; font-size: 0.92rem; }
.ip-via { margin: 0; font-size: 0.92rem; color: var(--ip-grey); display: inline-flex; align-items: center; gap: 0.3em; }

.ip-archive .ip-update-title { font-size: 1.45rem; }
.ip-empty { font-size: 1.05rem; color: var(--ip-grey); padding: 1rem 0 2rem; }
.ip-empty a { color: inherit; text-decoration: underline; }

.ip-nearby { border-top: 1.5px solid var(--ip-ink); margin-top: 2rem; padding-top: 1.6rem; }
.ip-nearby h2 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ip-ink); margin: 0 0 2rem; }
.ip-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.ip-card { display: block; color: var(--ip-ink); }
.ip-card img, .ip-card-ph { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; margin-bottom: 0.9rem; }
.ip-card-ph {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 1rem 1.1rem;
  background:
    radial-gradient(circle at 78% 30%, var(--status) 0 7px, transparent 8px),
    radial-gradient(circle at 78% 30%, color-mix(in srgb, var(--status) 35%, transparent) 0 22px, transparent 23px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 28px),
    linear-gradient(140deg, #1B1D22, #2A1B45);
}
.ip-card-ph span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.ip-card-title { display: block; font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.55rem; line-height: 1.18; }
.ip-card-meta { display: block; margin-top: 0.35rem; font-size: 0.88rem; color: var(--ip-grey); }
.ip-card:hover .ip-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.ip-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; margin: 0; padding: 0.7em 1.2em; border-radius: 999px;
  background: #111; color: #fff; font-size: 0.92rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.ip-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ip-toast:empty { display: none; }

/* --------------------------------------------------------- Methodology */

.ip-method-head { padding: 3rem 0 2rem; border-bottom: 1.5px solid var(--ip-ink); margin-bottom: 2.8rem; }
.ip-method-grid { display: grid; grid-template-columns: minmax(0, 46rem) 280px; gap: 5rem; justify-content: space-between; }
.ip-method-body > h2:first-child { margin-top: 0; }
.ip-key { align-self: start; position: sticky; top: calc(var(--header-h) + 1.5rem); border-top: 1px solid var(--ip-rule); padding-top: 1.2rem; }
.ip-key .ip-label { font-size: 0.74rem; color: var(--ip-grey); margin: 0 0 0.8rem; }
.ip-key ul { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; }
.ip-key-impact li, .ip-key-map li { font-size: 1rem; display: flex; align-items: center; gap: 0.7rem; }
.ip-key-hatch {
  width: 22px; height: 15px; border: 1px solid #8C8F96; background: #F6F5F1
    repeating-linear-gradient(135deg, rgba(110, 66, 166, 0.45) 0 1px, transparent 1px 4px);
}
.ip-key-dash { width: 22px; border-top: 1.5px dashed #5A3689; }

/* ----------------------------------------------------------- Dashboard */

.dash-head { padding: 3rem 0 2rem; }
.dash-title { font-size: clamp(2.4rem, 4.4vw, 4rem); }
.dash-intro { max-width: 46rem; margin: 1.1rem 0 0; font-size: 1.15rem; line-height: 1.5; color: #3A3A38; }

.dash-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; padding: 1rem 0;
  border-top: 1.5px solid var(--ip-ink); border-bottom: 1px solid var(--ip-rule); margin-bottom: 0.5rem;
}
.dash-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.dash-search input {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ip-ink); background: #fff;
  border: 1px solid #B9B7B1; border-radius: 999px; padding: 0.55em 2.6em 0.55em 1.05em; -webkit-appearance: none; appearance: none;
}
.dash-search input:focus { outline: none; border-color: var(--ip-ink); box-shadow: 0 0 0 1px var(--ip-ink); }
.dash-search svg { position: absolute; right: 1em; top: 50%; transform: translateY(-50%); color: #77756F; pointer-events: none; }
.dash-facet { position: relative; }
.dash-facet summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.45em;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid #B9B7B1; border-radius: 999px; padding: 0.55em 0.95em; background: #fff; user-select: none;
}
.dash-facet summary::-webkit-details-marker { display: none; }
.dash-facet summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 0.2em; }
.dash-facet[open] summary { border-color: var(--ip-ink); }
.dash-facet-n { min-width: 1.5em; padding: 0 0.35em; border-radius: 999px; background: var(--ip-ink); color: #fff; font-size: 0.72rem; letter-spacing: 0; text-align: center; line-height: 1.5em; }
.dash-facet-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 360px; overflow: auto;
  background: #fff; border: 1px solid #D5D3CD; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); padding: 0.5rem;
}
.dash-check { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.5rem; font-size: 0.95rem; cursor: pointer; border-radius: 2px; }
.dash-check:hover { background: #F3F2EE; }
.dash-check input { width: 16px; height: 16px; accent-color: var(--ip-ink); margin: 0; }
.dash-check .im-dot { margin-left: auto; }
.dash-apply {
  font: inherit; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  color: #fff; background: var(--ip-ink); border: 0; border-radius: 999px; padding: 0.6em 1.1em;
}
.dash-count { margin: 0 0 0 auto; font-size: 0.85rem; color: var(--ip-grey); display: inline-flex; align-items: center; gap: 1rem; }
.dash-count [data-count] { font-weight: 600; color: var(--ip-ink); }
.dash-count a { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.76rem; color: var(--ip-ink); }

.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.dash-table thead th {
  text-align: left; vertical-align: bottom; padding: 1rem 0.9rem 0.7rem; border-bottom: 1.5px solid var(--ip-ink);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #3A3A38; white-space: nowrap;
}
.dash-table thead th:first-child { padding-left: 0; }
.dash-table thead a { color: inherit; display: inline-flex; align-items: center; gap: 0.4em; }
.dash-table thead a:hover { color: var(--ip-ink); }
.dash-sort { width: 8px; height: 10px; opacity: 0.3; background:
  linear-gradient(45deg, transparent 50%, currentColor 50%) top / 8px 4px no-repeat,
  linear-gradient(-135deg, transparent 50%, currentColor 50%) bottom / 8px 4px no-repeat; }
th[aria-sort='ascending'] .dash-sort { opacity: 1; background: linear-gradient(45deg, transparent 50%, currentColor 50%) top / 8px 4px no-repeat; }
th[aria-sort='descending'] .dash-sort { opacity: 1; background: linear-gradient(-135deg, transparent 50%, currentColor 50%) bottom / 8px 4px no-repeat; }
.dash-table tbody th, .dash-table tbody td { padding: 1.05rem 0.9rem; border-bottom: 1px solid var(--ip-rule); text-align: left; vertical-align: middle; font-weight: 400; }
.dash-table tbody th { padding-left: 0; }
.dash-table .col-title { min-width: 16rem; }
.dash-table tbody .col-title a { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.3rem; line-height: 1.2; color: var(--ip-ink); }
.dash-table tbody .col-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.dash-table .ip-pill { font-size: 0.85rem; }
.dash-table .col-countries { color: #4A4A47; font-size: 0.9rem; max-width: 16rem; }
.dash-table .col-date { white-space: nowrap; color: var(--ip-grey); font-size: 0.9rem; }
.dash-table tbody tr { transition: background 0.12s; }
.dash-table tbody tr:hover { background: #F0EFEA; }

@media (max-width: 1100px) {
  .ip-body { grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; }
  .ip-head { grid-template-columns: 1fr; }
  .ip-meta { max-width: 520px; }
  .ip-method-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ip-key { position: static; }
}

@media (max-width: 860px) {
  .ip-wrap { padding: 0 18px; }
  .ip-bar-title { display: none; }
  .ip-head { padding-top: 2rem; }
  .ip-overview { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0 2.5rem; }
  .ip-body { grid-template-columns: 1fr; gap: 0; padding-top: 2.2rem; }
  .ip-side-inner { position: static; }
  .ip-toc { display: none; }
  .ip-mini { max-width: 420px; margin-bottom: 2.5rem; }
  .ip-resources { grid-template-columns: 1fr; gap: 1.8rem; }
  .ip-cards { grid-template-columns: 1fr; gap: 2.2rem; }
  .ip-prose { font-size: 1.18rem; }
  .ip-h2 { margin-bottom: 1.1rem; }
  .ip-related { flex-direction: column; gap: 0.4rem; }

  .dash-count { margin-left: 0; width: 100%; }
  /* Filter pop-ups span the filter bar so the right-hand ones never run off a phone screen. */
  .dash-filters { position: relative; }
  .dash-facet { position: static; }
  .dash-facet-pop { left: 0; right: 0; min-width: 0; }
  .dash-search { max-width: none; flex-basis: 100%; }
  .dash-table thead { display: none; }
  .dash-table, .dash-table tbody, .dash-table tr, .dash-table tbody th, .dash-table tbody td { display: block; width: 100%; }
  .dash-table tbody tr { padding: 1.2rem 0; border-bottom: 1px solid var(--ip-rule); }
  .dash-table tbody tr[hidden] { display: none; }
  .dash-table tbody th, .dash-table tbody td { border: 0; padding: 0.2rem 0; }
  .dash-table tbody td { display: flex; gap: 1rem; font-size: 0.92rem; }
  .dash-table tbody td::before { content: attr(data-label); flex: 0 0 6.5rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ip-grey); padding-top: 0.2em; }
  .dash-table tbody th { margin-bottom: 0.6rem; }
  .dash-table .col-countries { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ip-toast, .ip-toc a, .ip-toc-arrow, .ip-mini-open { transition: none; }
}

/* =============================================================== Admin */

.ia-status { display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.85rem; white-space: nowrap; }
.ia-status::before { content: ""; width: 0.65em; height: 0.65em; border-radius: 50%; background: var(--status); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ia-draft-note p { margin: 0; }
.ia-draft-note p + p { margin-top: 0.25rem; }
.ia-error { color: var(--danger); }

.ia-place { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.ia-picker { position: relative; height: 340px; border-radius: 4px; overflow: hidden; background: var(--im-sea); }
.ia-picker .im-stage { cursor: crosshair; }
.ia-picker .im-stage.is-dragging { cursor: grabbing; }
.ia-picker-zoom { right: 10px; bottom: 10px; gap: 6px; }
.ia-picker-zoom .im-zoom-btn { width: 34px; height: 34px; font-size: 1.15rem; }
.ia-picker-nojs { color: #B9BEC8; padding: 1rem; margin: 0; font-size: 0.9rem; }
.ia-pin { pointer-events: none; }
.ia-picker .im-label-water { font-size: 0.72rem; }

.ia-countries { border: 0; padding: 0; margin: 0; min-width: 0; }
.ia-countries legend { font-weight: 600; margin-bottom: 0.3rem; padding: 0; }
.ia-country-tools { display: flex; align-items: center; gap: 1rem; margin: 0.6rem 0; }
.ia-country-tools input { max-width: 320px; }
.ia-country-count { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.ia-country-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 1rem;
  max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; padding: 0.4rem 0.7rem; background: #fff;
}
.ia-country { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 0.92rem; cursor: pointer; }
.ia-country[hidden] { display: none; }
.ia-country input { margin: 0; }
.ia-iso { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

.ia-sublist { list-style: none; margin: 0 0 1rem; padding: 0; }
.ia-sublist li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.ia-sub-main { display: flex; flex-direction: column; min-width: 0; }
.ia-add summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); padding: 0.4rem 0; }
.ia-add[open] summary { margin-bottom: 0.8rem; }

@media (max-width: 900px) {
  .ia-place { grid-template-columns: 1fr; }
  .ia-sublist li { flex-direction: column; align-items: flex-start; }
}
