
/* ═══════════════════════════════════════════════════════════════════════════
   MARKET PAGE (taxonomy-mercato)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Container ── */
.em-mp-page { background: var(--bg-primary); }
.em-mp-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Breadcrumb ── */
.em-mp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.em-mp-breadcrumb-link {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.em-mp-breadcrumb-link:hover { color: var(--brand-primary); }
a.em-mp-breadcrumb-link { cursor: pointer; }
.em-mp-breadcrumb-sep { color: var(--border-default); font-size: 12px; }
.em-mp-breadcrumb-current { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }

/* ── Page Hero ── */
.em-mp-hero { margin-bottom: 28px; }

.em-mp-hero-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.em-mp-live-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.em-mp-live-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--live, #22C55E);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.em-mp-hero-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.em-mp-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.em-mp-hero-meta-item {
  font-size: 12.5px;
  color: var(--text-muted);
}
.em-mp-hero-meta-item strong { color: var(--text-secondary); }
.em-mp-hero-meta-divider {
  width: 1px;
  height: 14px;
  background: var(--border-default);
  flex-shrink: 0;
}
.em-mp-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1.5px solid var(--border-default);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  transition: background 0.18s, color 0.18s;
}
.em-mp-hero-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* ── Quick Stats ── */
.em-mp-quick-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.em-mp-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  text-align: center;
}
.em-mp-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.em-mp-stat-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}
.em-mp-stat-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── Layout 2 colonne ── */
.em-mp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.em-mp-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Card base ── */
.em-mp-card {
  overflow: hidden;
  min-width: 0;
}

/* ── Chart card ── */
.em-mp-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0;
  margin-bottom: 4px;
}
.em-mp-chart-live-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.em-mp-chart-live-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.em-mp-chart-price {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.em-mp-chart-delta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.em-mp-chart-delta {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.em-mp-chart-range-label {
  font-size: 13px;
  color: var(--text-muted);
}

.em-mp-chart-keystats {
  display: flex;
  gap: 24px;
  text-align: right;
  flex-wrap: wrap;
}
.em-mp-chart-keystat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.em-mp-chart-keystat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Range selector */
.em-mp-range-row {
  display: flex;
  gap: 4px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 16px;
}
.em-mp-range-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  transition: all 0.18s;
}
.em-mp-range-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.em-mp-range-btn:hover:not(.active) {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Canvas wrap */
.em-mp-chart-wrap {
  position: relative;
  padding: 8px 0 0;
}
.em-mp-chart-wrap canvas {
  display: block;
  width: 100%;
}

/* Tooltip canvas */
.em-mp-tooltip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  pointer-events: none;
  min-width: 80px;
}
.em-mp-tooltip-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.em-mp-tooltip-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
}
.em-mp-tooltip-name {
  font-size: 11.5px;
  color: var(--live, #22C55E);
  font-weight: 600;
  margin-top: 2px;
}

/* Chart footer */
.em-mp-chart-footer {
  padding: 10px 24px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Section header ── */
.em-mp-section-header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  margin-bottom: 22px;
}
.em-mp-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
  white-space: nowrap;
}
.em-mp-section-line {
  flex: 1;
  min-width: 0;
  height: 1px;
  background: var(--border-default);
}
.em-mp-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.18s;
}
.em-mp-read-more:hover { gap: 8px; }


.em-mp-content-body p {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 400;
}
.em-mp-content-body h2 {
  font-family: "Fraunces", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 36px 0 14px;
}
.em-mp-content-body h3 {
  font-family: "Fraunces", serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin: 28px 0 10px;
}
.em-mp-content-body strong { font-weight: 700; color: var(--text-primary); }

.em-mp-content-body,
.em-mp-chart-header-main,
.em-mp-chart-period-stats,
.em-mp-related {
  min-width: 0;
}

/* Rich text extras */
.em-mp-content-body blockquote {
  margin: 36px 0;
  padding: 24px 28px;
  background: #F5F2EB;
  border-left: 4px solid #1B4332;
  position: relative;
}
html[data-theme="dark"] .em-mp-content-body blockquote {
  background: #1A1A22;
  border-left-color: #52B788;
}
.em-mp-content-body blockquote::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 20px;
  width: 48px;
  height: 48px;
  opacity: 0.12;
  pointer-events: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='%231B4332'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .em-mp-content-body blockquote::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='%2352B788'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E");
}
.em-mp-content-body blockquote p, .em-mp-content-body blockquote  {
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.em-mp-content-body blockquote p:first-of-type::before {
  content: "\201C";
}
.em-mp-content-body blockquote p:first-of-type::after {
  content: "\201D";
}
.em-mp-content-body blockquote cite {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}
.em-mp-content-body blockquote cite::before {
  content: "\2014  ";
}
.em-mp-content-body blockquote > :last-child {
  margin-bottom: 0;
}

.em-mp-content-body .glossary-term {
  border-bottom: 1.5px dashed var(--brand-light);
  color: var(--brand-mid);
  font-weight: 600;
  cursor: help;
  position: relative;
  display: inline-block;
}
.em-mp-content-body .glossary-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  max-width: min(240px, calc(100vw - 48px));
  background: #131310;
  color: #EDEBE3;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 400;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-style: normal;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  white-space: normal;
}
html[data-theme="dark"] .em-mp-content-body .glossary-tooltip {
  background: #EDEBE3;
  color: #131310;
}
.em-mp-content-body .glossary-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #131310;
}
html[data-theme="dark"] .em-mp-content-body .glossary-tooltip::after {
  border-top-color: #EDEBE3;
}
.em-mp-content-body .glossary-term:hover .glossary-tooltip,
.em-mp-content-body .glossary-term:focus-visible .glossary-tooltip,
.em-mp-content-body .glossary-term:focus-within .glossary-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.em-mp-content-body .glossary-tooltip p {
  margin: 0;
  font: inherit;
  color: inherit;
}

@media (max-width: 767px) {
  .em-mp-content-body .glossary-tooltip {
    position: fixed;
    top: var(--glossary-tooltip-top, 96px);
    bottom: auto;
    left: 50%;
    width: min(260px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    transform: translateX(-50%) translateY(4px);
    z-index: 1000;
  }

  .em-mp-content-body .glossary-tooltip::after {
    display: none;
  }

  .em-mp-content-body .glossary-term:hover .glossary-tooltip,
  .em-mp-content-body .glossary-term:focus-visible .glossary-tooltip,
  .em-mp-content-body .glossary-term:focus-within .glossary-tooltip {
    transform: translateX(-50%) translateY(0);
  }
}

.em-mp-content-body .em-guide-listbox-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin: 28px 0;
}
@media (max-width: 767px) {
  .em-mp-content-body .em-guide-listbox-pair {
    grid-template-columns: 1fr;
  }
}
.em-mp-content-body .em-guide-listbox-pair .em-guide-listbox {
  margin: 0;
}
.em-mp-content-body .em-guide-listbox {
  padding: 18px 20px;
  margin: 28px 0;
}

@media screen and (max-width: 640px) {
  .em-mp-content-body .em-guide-listbox {
    padding:18px 10px;
  }
}
.em-mp-content-body .em-guide-listbox--pros {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
}
.em-mp-content-body .em-guide-listbox--cons {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--pros {
  background: #0A1F14;
  border-color: #166534;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--cons {
  background: #1F0A0A;
  border-color: #991B1B;
}
.em-mp-content-body .em-guide-listbox-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.em-mp-content-body .em-guide-listbox--pros .em-guide-listbox-header {
  color: #166534;
}
.em-mp-content-body .em-guide-listbox--cons .em-guide-listbox-header {
  color: #991B1B;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--pros .em-guide-listbox-header {
  color: #4ADE80;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--cons .em-guide-listbox-header {
  color: #F87171;
}
.em-mp-content-body .em-guide-listbox-header span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.em-mp-content-body .em-guide-listbox-header-icon,
.em-mp-content-body .em-guide-listbox-bullet-icon {
  display: block;
  flex-shrink: 0;
}
.em-mp-content-body .em-guide-listbox-items {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.em-mp-content-body .em-guide-listbox-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.em-mp-content-body .em-guide-listbox-bullet {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.em-mp-content-body .em-guide-listbox--pros .em-guide-listbox-bullet {
  background: rgba(22, 101, 52, 0.12);
  color: #166534;
}
.em-mp-content-body .em-guide-listbox--cons .em-guide-listbox-bullet {
  background: rgba(153, 27, 27, 0.12);
  color: #991B1B;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--pros .em-guide-listbox-bullet {
  background: rgba(74, 222, 128, 0.16);
  color: #4ADE80;
}
html[data-theme="dark"] .em-mp-content-body .em-guide-listbox--cons .em-guide-listbox-bullet {
  background: rgba(248, 113, 113, 0.16);
  color: #F87171;
}
.em-mp-content-body .em-guide-listbox-copy {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Callouts */
.em-mp-callout {
  border-radius: 12px;
  padding: 18px 20px;
  margin: 24px 0;
}
.em-mp-callout--info {
  background: var(--brand-subtle);
  border: 1.5px solid var(--brand-light);
}
.em-mp-callout--warn {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
}
html[data-theme="dark"] .em-mp-callout--warn {
  background: #1F1A0A;
  border-color: #92400E;
}
.em-mp-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.em-mp-callout--info .em-mp-callout-header { color: var(--brand-mid); }
.em-mp-callout--warn .em-mp-callout-header { color: #92400E; }
html[data-theme="dark"] .em-mp-callout--warn .em-mp-callout-header { color: #FCD34D; }
.em-mp-callout-icon {
  flex-shrink: 0;
  display: block;
  color: currentColor;
}
.em-mp-callout-header span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.em-mp-callout p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0 0 12px;
}
.em-mp-callout p:last-child,
.em-mp-callout ul:last-child,
.em-mp-callout ol:last-child {
  margin-bottom: 0;
}
.em-mp-callout ul,
.em-mp-callout ol {
  margin: 0 0 12px 20px;
  padding: 0;
  color: var(--text-secondary);
}
.em-mp-callout li {
  margin-bottom: 6px;
  line-height: 1.72;
}

/* ── FAQ card ── */
.em-mp-faq-card { padding: 22px 26px; }

.em-mp-faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.em-mp-faq-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
  font-family: "Plus Jakarta Sans", sans-serif;
  text-align: left;
}
.em-mp-faq-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.em-mp-faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(.22,1,.36,1);
}
.em-mp-faq-chevron.open { transform: rotate(180deg); }
.em-mp-faq-answer {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(.22,1,.36,1), opacity 0.3s;
}
.em-mp-faq-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.78;
  padding-bottom: 20px;
  margin: 0;
}
.em-mp-faq-text p,
.em-mp-faq-text ul,
.em-mp-faq-text ol {
  margin-top: 0;
  margin-bottom: 12px;
}
.em-mp-faq-text p:last-child,
.em-mp-faq-text ul:last-child,
.em-mp-faq-text ol:last-child {
  margin-bottom: 0;
}
.em-mp-faq-text ul,
.em-mp-faq-text ol {
  padding-left: 20px;
}

/* ── Related posts ── */
.em-mp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom:28px;
}
.em-mp-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.22s cubic-bezier(.22,1,.36,1);
}
.em-mp-article-card:hover { transform: translateY(-3px); }
.em-mp-article-card:hover .em-mp-article-title { color: var(--brand-primary); }
.em-mp-article-img {
  height: 130px;
  position: relative;
  overflow: hidden;
}
.em-mp-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.em-mp-article-img .em-cat-pill {
  position: absolute;
  top: 10px;
  left: 10px;
}
.em-mp-article-body { padding: 14px 16px 16px; }
.em-mp-article-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.38;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  transition: color 0.18s;
}
.em-mp-article-meta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.em-mp-article-meta .em-card-meta {
  color: var(--text-muted);
}
.em-mp-article-meta .em-card-meta-time,
.em-mp-article-meta .em-card-meta-read {
  display: inline-flex;
  align-items: center;
}

/* ── Cat pills (usate anche nella market page) ── */
.em-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.em-cat-pill--brand {
  background: var(--brand-subtle);
  color: var(--brand-mid);
  border: 1px solid rgba(82,183,136,0.3);
}
.em-cat-pill--muted {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
}
.em-cat-pill--accent {
  background: var(--accent-light, #F5E8C4);
  color: var(--accent-primary, #C8993E);
  border: 1px solid rgba(200,153,62,0.3);
}
html[data-theme="dark"] .em-cat-pill--accent {
  background: #2A2210;
  color: #E9C46A;
}
.em-cat-pill--dark {
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
}

/* ── CSS var live/breaking ── */
html[data-theme="light"] { --live: #22C55E; --breaking: #DC2626; }
html[data-theme="dark"]  { --live: #22C55E; --breaking: #F87171; }

/* ── Responsive market page ── */
@media (max-width: 1024px) {
  .em-mp-layout {
    grid-template-columns: 1fr;
  }
  .em-mp-quick-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .em-mp-chart-header {
    flex-direction: column;
    gap: 16px;
  }
  .em-mp-chart-keystats {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .em-mp-container { padding: 20px 16px 48px; }
  .em-mp-quick-stats { grid-template-columns: repeat(2, 1fr); }
  .em-mp-hero-title { font-size: 28px; }
  .em-mp-chart-price { font-size: 32px; }
  .em-mp-faq-card { padding: 16px 18px; }
  .em-mp-related-grid { grid-template-columns: 1fr; }
  .em-mp-hero-meta { gap: 8px; }
  .em-mp-hero-meta-divider { display: none; }
}

/* Additional responsive hardening */
@media (max-width: 1180px) {
  .em-mp-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
  }

  .em-mp-quick-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .em-mp-container {
    padding: 28px 16px 56px;
  }

  .em-mp-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .em-mp-chart-header {
    padding: 20px 20px 0;
  }

  .em-mp-range-row {
    flex-wrap: wrap;
    padding: 14px 20px;
  }

  .em-mp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .em-mp-container {
    padding: 24px 16px 52px;
  }

  .em-mp-hero-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .em-mp-chart-keystats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .em-mp-faq-card {
    padding: 18px 20px;
  }

  .em-mp-content-body p {
    font-size: 15px;
    line-height: 1.75;
  }

  .em-mp-content-body h2 {
    font-size: 22px;
  }

  .em-mp-content-body h3 {
    font-size: 18px;
  }

}

@media (max-width: 640px) {
  .em-mp-chart-header {
    padding: 20px 18px 0;
  }

  .em-mp-quick-stats {
    grid-template-columns: 1fr;
  }

  .em-mp-stat-card {
    text-align: left;
  }

  .em-mp-hero-title {
    font-size: 26px;
  }

  .em-mp-chart-keystats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .em-mp-chart-price {
    font-size: 28px;
  }

  .em-mp-range-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
  }

  .em-mp-range-btn {
    white-space: nowrap;
  }

  .em-mp-chart-footer {
    padding: 10px 18px 14px;
  }

  .em-mp-callout {
    padding: 16px;
  }

  .em-mp-faq-question {
    font-size: 15px;
  }
}

/* Single market refresh */
.em-mp-hero {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.em-mp-hero-pills {
  margin-bottom: 14px;
}

.em-mp-live-label {
  letter-spacing: 0.08em;
}

.em-mp-hero-summary {
  max-width: 620px;
  margin: 0;
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.em-mp-hero-summary em {
  color: var(--brand-primary);
  font-style: italic;
}

.em-mp-hero-tagline {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}

.em-mp-hero-tagline em {
  font-style: italic;
}

.em-mp-quick-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.em-mp-stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  text-align: left;
  transition: box-shadow 0.2s, transform 0.2s cubic-bezier(.22,1,.36,1);
}

.em-mp-stat-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.em-mp-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.em-mp-stat-card--price::before {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-light));
}

.em-mp-stat-card--change {
  --em-mp-change-accent: var(--brand-primary);
  border-width: 1.5px;
}

.em-mp-stat-card--change::before {
  background: var(--em-mp-change-accent);
}

.em-mp-stat-card--change.is-up {
  --em-mp-change-accent: var(--live, #22C55E);
  border-color: rgba(34, 197, 94, 0.18);
}

.em-mp-stat-card--change.is-down {
  --em-mp-change-accent: var(--breaking, #DC2626);
  border-color: rgba(220, 38, 38, 0.18);
}

.em-mp-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.em-mp-stat-val {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.em-mp-stat-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.em-mp-stat-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.em-mp-stat-live span:last-child {
  font-size: 11px;
  color: var(--live, #22C55E);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.em-mp-stat-change-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.em-mp-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.em-mp-stat-card--change.is-up .em-mp-stat-icon {
  color: var(--live, #22C55E);
}

.em-mp-stat-card--change.is-down .em-mp-stat-icon {
  color: var(--breaking, #DC2626);
}

.em-mp-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.em-mp-stat-card--change.is-up .em-mp-stat-badge {
  background: rgba(34, 197, 94, 0.08);
  color: var(--live, #22C55E);
}

.em-mp-stat-card--change.is-down .em-mp-stat-badge {
  background: rgba(220, 38, 38, 0.08);
  color: var(--breaking, #DC2626);
}

.em-mp-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 24px;
}

.em-mp-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 0;
  margin-bottom: 16px;
}

.em-mp-chart-header-main {
  flex: 1;
}

.em-mp-chart-live-row {
  gap: 8px;
}

.em-mp-chart-delta-row {
  flex-wrap: wrap;
}

.em-mp-chart-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.em-mp-chart-currency {
  font-size: 13px;
  color: var(--text-muted);
}

.em-mp-chart-period-stats {
  display: flex;
  gap: 24px;
  text-align: right;
  flex-wrap: wrap;
}

.em-mp-chart-period-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.em-mp-chart-period-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.em-mp-chart-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px 16px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.em-mp-chart-wrap {
  position: relative;
  min-height: 220px;
  padding: 0 0 8px;
}

.em-mp-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 220px;
}

.em-mp-chart-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 1024px) {
  .em-mp-chart-header {
    flex-direction: column;
    gap: 16px;
  }

  .em-mp-chart-period-stats {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .em-mp-chart-period-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .em-mp-quick-stats {
    grid-template-columns: 1fr;
  }

  .em-mp-stat-val {
    font-size: 34px;
  }

  .em-mp-chart-header {
    padding: 20px 18px 0;
  }

  .em-mp-chart-info {
    margin: 0 18px 16px;
    align-items: flex-start;
  }

  .em-mp-chart-footer {
    padding: 10px 18px 14px;
  }

  .em-mp-chart-footer svg {
    min-width:11px;
  }

  .em-mp-chart-price {
    font-size: 32px;
  }

  .em-mp-chart-period-stats {
    grid-template-columns: 1fr;
  }
}
