.market-trends-page,
.market-destination-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(210, 230, 244, 0.85), transparent 34rem),
    linear-gradient(180deg, #f7fafc 0%, #eef4f8 46%, #f7f8fa 100%);
  color: #172536;
  min-height: 100vh;
}

.market-destination-main {
  background: transparent;
}

.market-title-strip {
  width: min(calc(100vw - clamp(20px, 4vw, 64px)), 1500px);
  max-width: none;
  margin: 0 auto;
  padding: 42px 0 10px;
}

.market-title-strip h1 {
  margin: 0;
  color: #15354e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.market-title-strip p {
  margin: 6px 0 0;
  color: #536779;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
}

.market-app-root {
  width: min(calc(100vw - clamp(20px, 4vw, 64px)), 1500px);
  max-width: none;
  margin: 0 auto 36px;
  padding: 0 0 30px;
  font-family: Arial, Helvetica, sans-serif;
}

.mt-shell {
  position: relative;
  min-width: 0;
  border: 1px solid #d8e4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(18, 45, 72, 0.13);
}

.mt-area-strip {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid #dbe6ee;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.92);
}

.mt-area-tabs {
  min-width: 0;
  display: flex;
  gap: 6px;
  flex: 0 1 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.mt-area-control {
  min-width: min(290px, 42vw);
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  border: 1px solid #c9d8e4;
  border-top: 2px solid var(--area-color, #005ba0);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 55, 85, 0.04);
}

.mt-area-control.is-pending {
  grid-template-columns: minmax(0, 1fr);
}

.mt-area-tab {
  appearance: none;
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0 10px 0 14px;
  background: #fff;
  color: #005ba0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mt-area-tab.is-active,
.mt-area-tab:hover,
.mt-area-tab:focus-visible {
  background: #edf5fa;
  outline: none;
}

.mt-area-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #005ba0;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
}

.mt-area-tab i,
.mt-area-options span {
  width: 0;
  height: 0;
  align-self: center;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid currentColor;
}

.mt-area-tab i {
  grid-column: 2;
  justify-self: end;
  color: #005ba0;
}

.mt-area-clear,
.mt-area-options {
  appearance: none;
  display: grid;
  place-items: center;
  border: 0;
  background: #fff;
  color: #15354e;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.mt-area-clear {
  border-left: 1px solid #d7d7d7;
  color: #005ba0;
  font-size: 1rem;
}

.mt-area-clear:hover,
.mt-area-clear:focus-visible,
.mt-area-options:hover,
.mt-area-options:focus-visible {
  background: #edf5fa;
  outline: none;
}

.mt-add-area {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: #f6fbff;
  color: #005ba0;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.mt-add-area:disabled {
  color: #8a98a6;
  cursor: not-allowed;
}

.mt-area-options {
  flex: 0 0 38px;
  border: 1px solid #c9d8e4;
  border-radius: 0;
  background: #f6fbff;
  color: #005ba0;
}

.mt-search-panel {
  position: absolute;
  z-index: 20;
  top: 56px;
  left: 12px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #bfcad3;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.mt-search-head {
  display: grid;
  gap: 2px;
  padding: 11px 12px 8px;
  border-bottom: 1px solid #e4e4e4;
}

.mt-search-head label {
  color: #333;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mt-search-head span {
  color: #697886;
  font-size: 0.84rem;
  font-weight: 700;
}

.mt-search-panel input {
  width: calc(100% - 24px);
  height: 38px;
  margin: 10px 12px 8px;
  border: 1px solid #b9c5cf;
  border-radius: 3px;
  padding: 0 10px;
  color: #333;
  font: inherit;
  font-size: 0.94rem;
}

.mt-search-filters {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
}

.mt-search-filters span {
  border: 1px solid #c8d5df;
  border-radius: 3px;
  padding: 5px 9px;
  background: #eef6fb;
  color: #005ba0;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mt-search-panel ul {
  max-height: 290px;
  margin: 0;
  padding: 0 0 7px;
  overflow-y: auto;
  list-style: none;
}

.mt-search-panel li button {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 0;
  border-top: 1px solid #efefef;
  padding: 9px 12px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mt-search-panel li button:hover,
.mt-search-panel li button:focus-visible {
  background: #e9e9e9;
  outline: none;
}

.mt-search-panel li strong {
  overflow: hidden;
  color: #005ba0;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-search-panel li em {
  color: #586775;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.mt-pin {
  width: 13px;
  height: 13px;
  border: 3px solid #005ba0;
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
}

.mt-empty-result {
  padding: 12px;
  color: #697886;
  font-size: 0.9rem;
  font-weight: 700;
}

.mt-filter-wrap {
  position: relative;
  border-bottom: 1px solid #dbe6ee;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 252, 0.96)),
    #f6f9fc;
}

.mt-filter-drawer {
  display: flex;
  gap: 12px;
  min-height: 214px;
  padding: 14px 14px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #9eb8cd transparent;
}

.mt-filter-drawer[hidden] {
  display: none;
}

.mt-filter-column {
  flex: 0 0 clamp(208px, 15.4vw, 246px);
  min-height: 178px;
  border: 1px solid #d9e5ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 24px rgba(24, 57, 89, 0.08);
  overflow: hidden;
}

.mt-filter-column header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #edf3f8;
  padding: 9px 12px 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbfe);
}

.mt-filter-column header strong {
  color: #294259;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mt-filter-column header span {
  color: #005ba0;
}

.mt-filter-column header button {
  width: 28px;
  height: 28px;
  border: 1px solid #d4e3ee;
  border-radius: 999px;
  background: #fff;
  color: #005ba0;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
}

.mt-filter-column > div {
  display: grid;
  gap: 4px;
  padding: 8px 8px 10px;
}

.mt-filter-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 2px;
  background: transparent;
}

.mt-filter-label,
.mt-filter-add {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.mt-filter-label {
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  color: #005ba0;
  font-size: 0.92rem;
  font-weight: 820;
  text-align: left;
}

.mt-filter-add {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e6f0;
  border-radius: 999px;
  color: #005ba0;
  font-size: 0.82rem;
  font-weight: 900;
}

.mt-filter-label:hover,
.mt-filter-label:focus-visible,
.mt-filter-add:hover,
.mt-filter-add:focus-visible {
  background: #eef7ff;
  outline: none;
}

.mt-filter-option.is-selected {
  background: #dfeefa;
  color: #17364e;
}

.mt-filter-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-filter-option.is-selected .mt-filter-label {
  color: #17364e;
}

.mt-filter-option.is-selected .mt-filter-add {
  border-color: #005ba0;
  background: #005ba0;
  color: #fff;
  font-size: 0.66rem;
}

.mt-filter-toggle {
  position: absolute;
  left: 50%;
  bottom: -13px;
  z-index: 2;
  width: 54px;
  height: 18px;
  border: 1px solid #dbe6ee;
  border-radius: 999px;
  background: #fff;
  color: #005ba0;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(24, 57, 89, 0.12);
  transform: translateX(-50%);
}

.mt-filter-toggle span {
  display: grid;
  place-items: center;
}

.mt-filter-toggle span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.mt-filter-toggle[aria-expanded="false"] span::before {
  transform: translateY(2px) rotate(225deg);
}

.mt-toolbar {
  min-height: 62px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #dbe6ee;
  border-bottom: 1px solid #dbe6ee;
  padding: 16px 14px 12px;
  background: rgba(255, 255, 255, 0.92);
}

.mt-toolbar button {
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}

.mt-toolbar-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
}

.mt-toolbar-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-btn-white,
.ui-dropdown-btn,
.mt-help-button {
  min-height: 32px;
  border: 1px solid #c9d8e4;
  border-radius: 10px;
  background: #fff;
  color: #005ba0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(22, 54, 84, 0.05);
}

.ui-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
}

.ui-dropdown-btn {
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: #c9d8e4;
  padding: 0 10px;
  color: #172536;
  text-align: left;
}

.mt-caret {
  margin-left: auto;
  color: #005ba0;
  font-size: 0.7rem;
  line-height: 1;
}

.mt-help-button {
  display: grid;
  place-items: center;
  width: 32px;
  color: #005ba0;
  font-size: 0.98rem;
}

.mt-dropdown {
  position: relative;
}

.mt-dropdown-menu {
  position: absolute;
  z-index: 15;
  top: calc(100% + 4px);
  right: 0;
  width: 245px;
  border: 1px solid #c9d8e4;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(18, 45, 72, 0.18);
}

.mt-dropdown-menu button {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 2px;
  border: 0;
  border-top: 1px solid #ededed;
  padding: 9px 11px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mt-dropdown-menu button:first-child {
  border-top: 0;
}

.mt-dropdown-menu button:hover,
.mt-dropdown-menu button:focus-visible,
.mt-dropdown-menu button.is-selected {
  background: #eef7ff;
  outline: none;
}

.mt-dropdown-menu strong {
  color: #005ba0;
  font-size: 0.92rem;
}

.mt-dropdown-menu em {
  color: #697886;
  font-size: 0.8rem;
  font-style: normal;
}

.mt-work-area {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 17vw, 280px);
  gap: 14px;
  min-height: 430px;
  padding: 14px;
  background:
    linear-gradient(180deg, #f7fbfe 0%, #f3f8fc 100%),
    #f7fbfe;
}

.mt-shell.is-facts-collapsed .mt-work-area {
  grid-template-columns: minmax(0, 1fr);
}

.mt-chart-panel {
  position: relative;
  min-width: 0;
  border: 1px solid #dbe6ee;
  border-radius: 16px;
  padding: 0 18px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 16px 34px rgba(24, 57, 89, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mt-chart-panel h2 {
  margin: 16px 0 6px 0;
  color: #15354e;
  font-size: 1.18rem;
  font-weight: 900;
}

.mt-legend {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  color: #333;
  font-size: 0.88rem;
  font-weight: 800;
}

.mt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mt-legend i {
  width: 22px;
  height: 4px;
  background: var(--area-color);
}

.mt-chart-frame {
  position: relative;
  min-height: clamp(340px, 34vw, 470px);
  border-radius: 12px;
}

.mt-chart-svg {
  width: 100%;
  height: auto;
  max-height: 470px;
  display: block;
}

.mt-grid line {
  stroke: #d5e0e8;
  stroke-width: 1.2;
}

.mt-grid text,
.mt-x-axis text {
  fill: #555;
  font-size: 13px;
  font-weight: 800;
}

.mt-x-axis line {
  stroke: #555;
  stroke-width: 2;
}

.mt-series path {
  fill: none;
  stroke: var(--area-color);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.mt-bars rect {
  fill: var(--area-color);
}

.mt-bar-label {
  fill: #444;
  font-size: 12px;
  font-weight: 900;
}

.mt-chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.mt-chart-tooltip {
  position: absolute;
  min-width: 210px;
  border: 1px solid #9cc2de;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #333;
  box-shadow: 0 16px 36px rgba(18, 45, 72, 0.16);
  pointer-events: none;
}

.mt-chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.mt-chart-tooltip p {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.mt-chart-tooltip i {
  width: 10px;
  height: 10px;
  background: var(--area-color);
}

.mt-chart-panel footer {
  min-height: 20px;
  color: #005ba0;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
  margin-top: auto;
}

.mt-share-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
}

.mt-share-options-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  padding: 16px 8px;
  background: #fff;
  color: #15354e;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(24, 57, 89, 0.05);
}

.mt-share-options-grid button:hover {
  border-color: #005ba0;
  background: #f6fbff;
  box-shadow: 0 6px 18px rgba(0, 91, 160, 0.12);
  transform: translateY(-2px);
}

.mt-share-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f6fa;
  color: #005ba0;
}

.mt-share-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-facebook .mt-share-icon { background: #e6f0ff; color: #1877f2; }
.btn-linkedin .mt-share-icon { background: #e6f0ff; color: #0a66c2; }
.btn-pinterest .mt-share-icon { background: #ffe6e6; color: #e60023; }
.btn-reddit .mt-share-icon { background: #fff0e6; color: #ff4500; }
.btn-email .mt-share-icon { background: #e6fae6; color: #05a01e; }
.btn-message .mt-share-icon { background: #e6fae6; color: #00d235; }

.mt-quick-facts {
  position: relative;
  border: 0;
  background: transparent;
}

.mt-quick-facts > button {
  position: absolute;
  left: -12px;
  top: 50%;
  z-index: 2;
  width: 24px;
  height: 44px;
  border: 1px solid #c9d8e4;
  border-left: 0;
  border-radius: 999px;
  background: #fff;
  color: #005ba0;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(18, 45, 72, 0.1);
}

.mt-quick-facts > div {
  min-height: calc(100% - 4px);
  border: 1px solid #dbe6ee;
  border-radius: 16px;
  padding: 18px 16px 16px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 16px 34px rgba(24, 57, 89, 0.1);
}

.mt-quick-facts h3 {
  margin: 2px 0 16px;
  color: #15354e;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
}

.mt-facts-label {
  margin: 0;
  color: #7a8a98;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mt-facts-list {
  display: grid;
  gap: 12px;
}

.mt-fact-row {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  column-gap: 10px;
  margin: 0;
}

.mt-fact-row i {
  grid-row: 1;
  align-self: start;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid color-mix(in srgb, var(--area-color) 30%, white);
  border-radius: 999px;
  background: var(--area-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--area-color) 12%, white);
}

.mt-fact-row div,
.mt-fact-row strong,
.mt-fact-row span,
.mt-fact-row b,
.mt-fact-row small {
  min-width: 0;
}

.mt-fact-row strong {
  display: block;
  color: #333;
  font-size: 0.88rem;
  line-height: 1.15;
}

.mt-fact-row span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
  margin-top: 3px;
  color: #15354e;
  font-size: 0.92rem;
  font-weight: 800;
}

.mt-fact-row small {
  color: #586775;
  font-size: 0.78rem;
  font-weight: 900;
}

.mt-fact-row em {
  display: block;
  width: min(var(--bar-width), 100%);
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--area-color) 48%, white);
}

.mt-shell.is-facts-collapsed .mt-quick-facts {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 34px;
  border-left: 0;
  background: transparent;
  pointer-events: none;
}

.mt-shell.is-facts-collapsed .mt-quick-facts > button {
  top: 50%;
  right: 0;
  left: auto;
  width: 28px;
  height: 46px;
  border: 1px solid #c9d8e4;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #fff;
  pointer-events: auto;
  transform: translateY(-50%);
}

/* REFACTORED METRIC GRID (Matches screenshot) */
.mt-metric-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin: 18px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(18, 45, 72, 0.15);
  background: #005ba0;
}

.mt-metric-cell {
  position: relative;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  padding: 12px 6px;
  background: #005ba0;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

.mt-metric-cell:hover:not(.is-selected) {
  background: #004d88;
}

.mt-metric-cell.is-selected {
  background: #ffffff !important;
  color: #005ba0 !important;
  box-shadow: inset 0 0 0 2.5px #005ba0;
  z-index: 5;
}

.mt-metric-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.mt-metric-cell.is-selected .mt-metric-title {
  color: #005ba0;
  font-weight: 800;
}

/* Sub-toggle styled exactly like screenshot */
.mt-variant-toggle {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #005ba0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
  background: #ffffff;
  padding: 1px;
}

.mt-variant-btn {
  appearance: none;
  border: none;
  background: #ffffff;
  color: #005ba0;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2.5px 8px;
  cursor: pointer;
  text-transform: uppercase;
  line-height: 1.3;
  border-radius: 2px;
  transition: background-color 0.15s, color 0.15s;
}

.mt-variant-btn.is-active {
  background: #005ba0;
  color: #ffffff;
}

/* PREMIUM GLOSSARY MODAL */
.mt-modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 32, 48, 0.65);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.mt-glossary-modal {
  width: min(740px, 95vw);
  max-height: 85vh;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 32, 48, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mt-glossary-header {
  background: #0f2030;
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mt-glossary-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mt-glossary-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 2rem;
  cursor: pointer;
  line-height: 0.8;
  transition: color 0.15s;
  padding: 0;
}

.mt-glossary-close:hover {
  color: #ffffff;
}

.mt-glossary-search-bar {
  padding: 14px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.mt-glossary-search-input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #1e293b;
}

.mt-glossary-search-input:focus {
  border-color: #005ba0;
  box-shadow: 0 0 0 3px rgba(0, 91, 160, 0.18);
}

.mt-glossary-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  background: #ffffff;
}

.mt-glossary-section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #005ba0;
  font-weight: 900;
  margin: 28px 0 14px 0;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
}

.mt-glossary-section-title:first-child {
  margin-top: 0;
}

.mt-glossary-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border-left: 4px solid #005ba0;
  box-shadow: 0 2px 8px rgba(15, 32, 48, 0.02);
  transition: transform 0.2s, background-color 0.2s;
}

.mt-glossary-card:hover {
  transform: translateY(-2px);
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(15, 32, 48, 0.05);
}

.mt-glossary-term {
  font-size: 1.04rem;
  font-weight: 800;
  color: #0f2030;
  margin-bottom: 6px;
}

.mt-glossary-definition {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}

.mt-glossary-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.mt-glossary-btn-close {
  background: #005ba0;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s;
}

.mt-glossary-btn-close:hover {
  background: #004d88;
}

/* premium non-intrusive toast messages */
.mt-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: rgba(15, 32, 48, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  animation: toastFade 0.2s ease-out;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mt-loading {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 12px;
  place-items: center;
  border-radius: 8px;
  padding: 18px 28px;
  background: rgba(34, 34, 34, 0.92);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.mt-loading strong {
  font-size: 0.95rem;
}

.mt-loading span {
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 999px;
  animation: mt-spin 0.8s linear infinite;
}

@keyframes mt-spin {
  to { transform: rotate(360deg); }
}

.mt-modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  overflow-y: auto;
}

.mt-share-modal {
  width: min(560px, 100%);
  border: 1px solid #222;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  overflow: hidden;
  margin: auto;
}

.mt-share-modal header {
  background: #333;
  color: #fff;
  padding: 16px;
}

.mt-share-modal h2 {
  margin: 0;
  font-size: 1.15rem;
}

.mt-share-body {
  padding: 16px;
}

.mt-share-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #dedede;
  padding: 12px 16px;
  background: #f9f9f9;
}

.mt-share-modal footer button {
  min-height: 34px;
  border: 1px solid #bfbfbf;
  border-radius: 4px;
  padding: 0 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.mt-share-modal .mt-share-primary {
  border-color: #005ba0;
  background: #005ba0;
  color: #fff;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .mt-metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .market-title-strip,
  .market-app-root { width: calc(100vw - 24px); }
  .market-app-root { padding: 0 0 20px; }
  .mt-area-strip { flex-wrap: wrap; }
  .mt-area-tabs { flex-basis: 100%; }
  .mt-area-control { min-width: min(100%, 360px); flex: 1 0 260px; }
  .mt-add-area { flex: 1 1 auto; min-height: 36px; border-left: 1px solid #b8c6d2; }
  .mt-area-options { min-height: 36px; flex-basis: 52px; }
  .mt-add-area:only-child { width: auto; min-height: 36px; }
  .mt-filter-drawer { min-height: 178px; }
  .mt-filter-column { flex-basis: 218px; }
  .mt-toolbar { justify-content: flex-start; }
  .mt-work-area { grid-template-columns: 1fr; }
  .mt-quick-facts { border-top: 1px solid #ededed; border-left: 0; }
  .mt-shell.is-facts-collapsed .mt-work-area { grid-template-columns: 1fr; }
  .mt-quick-facts > button { top: 8px; right: 8px; left: auto; width: 34px; height: 28px; border: 1px solid #ededed; }
}

@media (max-width: 768px) {
  .mt-metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mt-metric-grid {
    grid-template-columns: 1fr;
    margin: 12px 6px;
  }
  .mt-metric-cell {
    min-height: 64px;
  }
  .market-title-strip { padding: 30px 14px 8px; }
  .market-app-root { width: 100vw; padding: 0 0 18px; }
  .mt-shell { border-radius: 0; border-right: 0; border-left: 0; }
  .mt-area-tabs { display: grid; }
  .mt-area-control, .mt-area-tab { max-width: none; min-width: 0; width: 100%; }
  .mt-search-panel { left: 8px; width: calc(100vw - 16px); }
  .mt-filter-column { flex-basis: 205px; }
  .mt-toolbar { padding-top: 18px; }
  .ui-dropdown-btn { min-width: 96px; }
  .mt-chart-panel { padding: 0 8px 8px; }
  .mt-chart-frame { min-height: 290px; overflow-x: auto; }
  .mt-chart-svg { width: 640px; max-width: none; }
  .mt-chart-tooltip { left: 16px; right: 16px; min-width: 0; }
}
