/* 508 Ministry - Global Local Counsel Rates, Flag+Currency Auto-Converter & Universal Symbol-First UI
 * Self-hosted Cormorant + Figtree fonts only. Zero em dashes. Mobile-safe 0px horizontal overflow.
 */
.m508-grs,
.m508-grs *,
.m508-grs *::before,
.m508-grs *::after {
  box-sizing: border-box;
}

.m508-grs {
  --grs-navy: #14263f;
  --grs-navy-deep: #0c1a2e;
  --grs-gold: #d4a84b;
  --grs-gold-dark: #9c721f;
  --grs-gold-soft: #fdf6e6;
  --grs-ivory: #faf8f3;
  --grs-white: #ffffff;
  --grs-ink: #14253d;
  --grs-muted: #4b5a70;
  --grs-border: #d8dee8;
  --grs-green: #147a43;
  --grs-green-bg: #eaf8ef;
  --grs-amber: #b45309;
  --grs-amber-bg: #fef4e4;
  --grs-red: #b91c1c;
  --grs-red-bg: #fdecec;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--grs-ink);
  max-width: 100%;
  line-height: 1.45;
}

.m508-grs-serif {
  font-family: 'Cormorant', Georgia, serif;
}

/* ===== Worldwide Full Section ===== */
.m508-grs-section {
  background: linear-gradient(180deg, #f6f2e8 0%, #faf8f3 100%);
  border-top: 2px solid rgba(212, 168, 75, 0.35);
  border-bottom: 2px solid rgba(212, 168, 75, 0.35);
  padding: 28px 16px 34px;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.m508-grs-wrap {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

/* Symbol-First Universal Bar */
.m508-sym-bar {
  background: var(--grs-navy);
  color: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 2px solid rgba(212, 168, 75, 0.55);
  box-shadow: 0 10px 28px rgba(12, 26, 46, 0.16);
}

.m508-sym-bar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.m508-sym-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.m508-sym-bar-title h2 {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}

.m508-sym-bar-sub {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: #dbe5f4;
}

.m508-sym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.m508-sym-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(212, 168, 75, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 0;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.m508-sym-chip:hover,
.m508-sym-chip:focus-visible {
  background: rgba(212, 168, 75, 0.22);
  border-color: #f3d27d;
  transform: translateY(-1px);
  outline: none;
}

.m508-sym-chip-ico {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
}

.m508-sym-chip-ico.is-green { background: #16a34a; color: #fff; }
.m508-sym-chip-ico.is-amber { background: #d97706; color: #fff; }
.m508-sym-chip-ico.is-red { background: #dc2626; color: #fff; }
.m508-sym-chip-ico.is-gold { background: #d4a84b; color: #14263f; }
.m508-sym-chip-ico.is-blue { background: #2563eb; color: #fff; }

.m508-sym-chip-txt {
  min-width: 0;
}

.m508-sym-chip-lbl {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.2;
  color: #ffffff;
}

.m508-sym-chip-hint {
  display: block;
  font-size: 0.74rem;
  color: #cbd8ec;
  line-height: 1.2;
  margin-top: 2px;
}

/* Listen Aloud Button */
.m508-speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #ebc466 0%, #d4a84b 100%);
  color: #14263f;
  border: 2px solid #9c721f;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(20, 38, 63, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.m508-speak-btn:hover,
.m508-speak-btn:focus-visible {
  background: linear-gradient(180deg, #f5d47c 0%, #e1b554 100%);
  transform: translateY(-1px);
  outline: 3px solid rgba(212, 168, 75, 0.5);
  outline-offset: 2px;
}

.m508-speak-btn.is-speaking {
  background: #147a43;
  color: #ffffff;
  border-color: #0e5a31;
}

.m508-speak-btn.is-compact {
  padding: 7px 12px;
  min-height: 36px;
  font-size: 0.82rem;
}

.m508-speak-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

/* Calculator Main Card */
.m508-calc-card {
  background: var(--grs-white);
  border: 2px solid var(--grs-navy);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 34px rgba(20, 38, 63, 0.1);
}

.m508-calc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #e5eaf1;
  margin-bottom: 18px;
}

.m508-calc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.m508-calc-badge-ico {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: var(--grs-navy);
  color: var(--grs-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--grs-gold);
}

.m508-calc-title {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--grs-navy);
  line-height: 1.12;
}

.m508-calc-sub {
  margin: 3px 0 0;
  font-size: 0.92rem;
  color: var(--grs-muted);
}

/* Custom Flag + Acronym Dropdown */
.m508-dd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.m508-dd-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--grs-navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.m508-cur-dd {
  position: relative;
  flex: 1 1 280px;
  max-width: 480px;
  min-width: 0;
}

.m508-cur-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  border: 2px solid var(--grs-navy);
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 50px;
  cursor: pointer;
  font: inherit;
  color: var(--grs-navy);
  text-align: left;
  box-shadow: 0 2px 10px rgba(20, 38, 63, 0.07);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.m508-cur-trigger:hover,
.m508-cur-trigger:focus-visible {
  border-color: var(--grs-gold-dark);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.35);
  outline: none;
}

.m508-cur-trigger-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.m508-flag-img {
  width: 28px;
  height: 21px;
  flex: 0 0 28px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(20, 38, 63, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  display: inline-block;
  vertical-align: middle;
}

.m508-flag-img.is-sm {
  width: 22px;
  height: 16px;
  flex: 0 0 22px;
  border-radius: 3px;
}

.m508-cur-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grs-navy);
  color: #f8e4a8;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 7px;
  flex: 0 0 auto;
}

.m508-cur-country {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--grs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m508-cur-caret {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--grs-navy);
  transition: transform 0.18s ease;
}

.m508-cur-dd.is-open .m508-cur-caret {
  transform: rotate(180deg);
}

.m508-cur-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border: 2px solid var(--grs-navy);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(12, 26, 46, 0.28);
  padding: 8px;
  display: none;
  max-width: 100%;
}

.m508-cur-dd.is-open .m508-cur-menu {
  display: block;
}

.m508-cur-search {
  width: 100%;
  border: 1.5px solid #c5cfde;
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--grs-ink);
  margin-bottom: 6px;
  outline: none;
}

.m508-cur-search:focus {
  border-color: var(--grs-navy);
  box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.35);
}

.m508-cur-list {
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.m508-cur-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--grs-ink);
}

.m508-cur-opt:hover,
.m508-cur-opt:focus-visible {
  background: #f3f6fb;
  border-color: #d0dae8;
  outline: none;
}

.m508-cur-opt.is-selected {
  background: var(--grs-gold-soft);
  border-color: var(--grs-gold);
  font-weight: 700;
}

.m508-cur-opt-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.m508-cur-opt-rate {
  font-size: 0.78rem;
  color: var(--grs-muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.m508-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 9px;
}

.m508-dot.is-home_base,
.m508-dot.is-green { background: #16a34a; }
.m508-dot.is-amber { background: #d97706; }
.m508-dot.is-red { background: #dc2626; }

/* Quick Flag Pills */
.m508-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.m508-qpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1.5px solid #cfd8e5;
  background: #f8fafd;
  color: var(--grs-navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.m508-qpill:hover,
.m508-qpill:focus-visible {
  border-color: var(--grs-navy);
  background: #edf2f9;
  outline: none;
}

.m508-qpill.is-active {
  background: var(--grs-navy);
  color: #ffffff;
  border-color: var(--grs-navy);
}

/* Main Metric Grid */
.m508-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.m508-panel-box {
  background: var(--grs-ivory);
  border: 1.5px solid #dce2ec;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.m508-panel-box.is-highlight {
  background: linear-gradient(180deg, #fffdf7 0%, #fdf6e6 100%);
  border-color: var(--grs-gold);
}

.m508-panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.m508-panel-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.m508-panel-ico.is-green { background: var(--grs-green-bg); color: var(--grs-green); border: 1.5px solid #9ad9b4; }
.m508-panel-ico.is-amber { background: var(--grs-amber-bg); color: var(--grs-amber); border: 1.5px solid #f5c97a; }
.m508-panel-ico.is-red { background: var(--grs-red-bg); color: var(--grs-red); border: 1.5px solid #f4aaaa; }
.m508-panel-ico.is-navy { background: var(--grs-navy); color: #f8e4a8; border: 1.5px solid var(--grs-gold); }

.m508-panel-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grs-muted);
}

.m508-panel-heading {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--grs-navy);
  line-height: 1.2;
}

/* Status Pill */
.m508-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  width: fit-content;
  max-width: 100%;
}

.m508-status-pill.is-green { background: var(--grs-green-bg); color: var(--grs-green); border: 1px solid #9ad9b4; }
.m508-status-pill.is-amber { background: var(--grs-amber-bg); color: var(--grs-amber); border: 1px solid #f5c97a; }
.m508-status-pill.is-red { background: var(--grs-red-bg); color: var(--grs-red); border: 1px solid #f4aaaa; }

/* Dual Currency Price Rows */
.m508-denom-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m508-denom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #dde4ef;
  border-radius: 12px;
  padding: 9px 11px;
  min-width: 0;
  flex-wrap: wrap;
}

.m508-denom-row.is-local {
  border-color: var(--grs-gold);
  background: #fffcf3;
}

.m508-denom-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--grs-navy);
  flex: 0 0 auto;
}

.m508-denom-val {
  font-weight: 800;
  font-size: 1.04rem;
  color: var(--grs-navy-deep);
  text-align: right;
  word-break: break-word;
}

.m508-sub-line {
  font-size: 0.8rem;
  color: var(--grs-muted);
  line-height: 1.35;
}

/* Interactive Converter Box */
.m508-conv-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m508-conv-input-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px solid var(--grs-navy);
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 0;
}

.m508-conv-input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--grs-navy-deep);
  background: transparent !important;
}

.m508-swap-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--grs-navy);
  color: #f8e4a8;
  border: 2px solid var(--grs-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.m508-swap-btn:hover,
.m508-swap-btn:focus-visible {
  background: #1d3557;
  transform: scale(1.04);
  outline: none;
}

.m508-conv-result {
  background: var(--grs-navy);
  color: #ffffff;
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.m508-conv-result .m508-denom-flag {
  color: #f8e4a8;
}

.m508-conv-result-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.m508-rate-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #cfd8e5;
  font-size: 0.78rem;
  color: var(--grs-muted);
}

/* ===== /social/ Floating Country Dock Enhancement ===== */
.m508-dock-enh {
  background: #ffffff;
  border: 2px solid #d4a84b;
  border-radius: 16px;
  padding: 14px;
  margin: 0 0 12px;
  box-shadow: 0 6px 20px rgba(20, 38, 63, 0.1);
  color: #14253d;
  max-width: 100%;
}

.m508-dock-sym-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.m508-dock-sym-tile {
  background: #f5f7fb;
  border: 1.5px solid #dce3ef;
  border-radius: 11px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  color: #14253d;
  min-width: 0;
}

.m508-dock-sym-tile:hover {
  border-color: #d4a84b;
  background: #fdf7e9;
}

.m508-dock-sym-tile.is-green { background: #eaf8ef; border-color: #9ad9b4; color: #147a43; }
.m508-dock-sym-tile.is-amber { background: #fef4e4; border-color: #f5c97a; color: #b45309; }
.m508-dock-sym-tile.is-red { background: #fdecec; border-color: #f4aaaa; color: #b91c1c; }

.m508-dock-sym-lbl {
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.m508-dock-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.m508-dock-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #14263f;
}

.m508-dock-subgrid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.m508-dock-mini-box {
  background: #faf8f3;
  border: 1.5px solid #e2e7f0;
  border-radius: 12px;
  padding: 10px 11px;
}

.m508-dock-mini-box.is-gold {
  background: #fffdf6;
  border-color: #d4a84b;
}

.m508-dock-mini-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5a70;
  margin-bottom: 6px;
}

.m508-dock-alt-country {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #edf3fb;
  border: 1px solid #c5d5eb;
  font-size: 0.77rem;
  color: #14263f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

/* Symbol badge injected into existing .swb-fact-box items */
.m508-fact-sym {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #14263f;
  color: #f8e4a8;
  margin-right: 6px;
  vertical-align: middle;
  flex: 0 0 24px;
}

.swb-fact-lbl.m508-has-sym {
  display: flex !important;
  align-items: center;
  gap: 4px;
}

/* ===== Worldwide Directory Card (.wwc) Enhancement ===== */
.m508-wwc-rate-strip {
  margin: 12px 0 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #faf8f3;
  border: 1.5px solid #d4a84b;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: 'Figtree', system-ui, sans-serif;
}

.m508-wwc-rate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.m508-wwc-rate-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #14263f;
}

.m508-wwc-mini-speak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #14263f;
  color: #f8e4a8;
  border: 1.5px solid #d4a84b;
  cursor: pointer;
  flex: 0 0 32px;
}

.m508-wwc-mini-speak:hover,
.m508-wwc-mini-speak.is-speaking {
  background: #147a43;
  color: #ffffff;
  border-color: #147a43;
}

.m508-wwc-dual {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.m508-wwc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #14253d;
  flex-wrap: wrap;
}

.m508-wwc-line .m508-cur-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #14263f;
}

.m508-wwc-conv-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: #14263f;
  background: #fdf6e6;
  border: 1px solid #d4a84b;
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .m508-calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .m508-grs-section {
    padding: 18px 12px 24px;
  }
  .m508-sym-bar {
    padding: 14px 12px;
    border-radius: 14px;
  }
  .m508-sym-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .m508-sym-chip {
    padding: 8px 9px;
    gap: 8px;
  }
  .m508-sym-chip-ico {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }
  .m508-calc-card {
    padding: 14px 12px;
    border-radius: 16px;
  }
  .m508-cur-dd {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .m508-speak-btn {
    width: 100%;
    justify-content: center;
  }
  .m508-speak-btn.is-compact {
    width: auto;
  }
  .m508-dock-sym-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== PART C: Universal World508 Map Profile & Country Modal Card ===== */
.w5p-counsel-slot {
  margin: 14px 0 16px;
  width: 100%;
  max-width: 100%;
}

.w5p-counsel-dlg {
  margin: 0 0 18px;
}

.pc2-counsel-wrap {
  max-width: 1120px;
  margin: 18px auto 10px;
  padding: 0 16px;
}

.m508-map-counsel-card {
  background: linear-gradient(180deg, #fffdf8 0%, #faf6ec 100%);
  border: 2px solid rgba(212, 168, 75, 0.72);
  border-radius: 16px;
  padding: 15px 15px 14px;
  box-shadow: 0 8px 24px rgba(12, 26, 46, 0.09);
  color: #14253d;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.m508-map-counsel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20, 38, 63, 0.12);
}

.m508-map-counsel-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 200px;
}

.m508-map-counsel-flag {
  width: 38px;
  height: 26px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(20, 38, 63, 0.18);
  box-shadow: 0 2px 6px rgba(12, 26, 46, 0.12);
  flex: 0 0 auto;
}

.m508-map-counsel-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9c721f;
  line-height: 1.2;
}

.m508-map-counsel-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  color: #14263f;
  margin: 1px 0 0;
  line-height: 1.15;
}

.m508-map-counsel-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.m508-map-counsel-ddwrap {
  margin-bottom: 11px;
}

.m508-map-counsel-ddwrap .m508-cur-dd {
  width: 100%;
  max-width: 100%;
}

.m508-map-counsel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.m508-map-counsel-card.is-narrow .m508-map-counsel-grid {
  grid-template-columns: 1fr;
}

.m508-map-counsel-box {
  background: #ffffff;
  border: 1.5px solid #d8dee8;
  border-radius: 12px;
  padding: 11px 12px;
}

.m508-map-counsel-box.is-gold {
  background: #fffaf0;
  border-color: rgba(212, 168, 75, 0.8);
}

.m508-map-counsel-box-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #14263f;
  margin-bottom: 8px;
}

.m508-map-counsel-box-lbl svg {
  width: 16px;
  height: 16px;
  color: #9c721f;
  flex: 0 0 auto;
}

.m508-gov-fee-box {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f4f7fb;
  border: 1px solid #d5dfec;
  font-size: 12.5px;
  color: #1c314e;
  line-height: 1.4;
}

.m508-prep95-box {
  background: #14263f;
  color: #ffffff;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 8px;
  border-left: 4px solid #d4a84b;
}

.m508-prep95-box strong {
  color: #f6d580;
}

.m508-sliding-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eaf8ef;
  border: 1px solid #a7dfbc;
  color: #147a43;
  font-size: 12px;
  font-weight: 700;
}

.m508-map-counsel-note {
  font-size: 12.5px;
  color: #3e4e65;
  margin: 6px 0 0;
  line-height: 1.45;
}

.m508-map-counsel-foot {
  font-size: 11.5px;
  color: #5b6a80;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(20, 38, 63, 0.1);
}

@media (max-width: 720px) {
  .m508-map-counsel-grid {
    grid-template-columns: 1fr;
  }
  .m508-map-counsel-card {
    padding: 13px 12px;
  }
}

/* mg-20261126 */
@media (max-width: 900px) {
  .m508-map-counsel-kicker,
  .m508-map-counsel-box-lbl,
  .m508-map-counsel-box-lbl span,
  .m508-map-counsel-foot,
  .m508-map-counsel-foot span,
  .m508-prep95-box,
  .m508-prep95-box strong,
  .m508-sliding-pill,
  .m508-dock-mini-lbl,
  .m508-dock-mini-lbl span,
  .m508-grs-note,
  .m508-map-counsel-card p,
  .m508-map-counsel-card li {
    font-size: 14px !important;
  }
}
/* /mg-20261126 */
