/* Marktdaten (Bereich 6) — alle Klassen mac-praefixt und unter #view-macro
   gescoped. Grund: .controls/.legend/.wrap/.card kollidieren mit Map, Earnings
   und Fundamental (dieselbe Lehre wie bei rotation.css). */

#view-macro {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 60px;
}

/* ---------- Kopf ---------- */
#view-macro .mac-intro { margin-bottom: 18px; }
#view-macro .mac-intro h1 {
  margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.01em;
}
#view-macro .mac-intro p {
  margin: 0; color: var(--ink-2); font-size: 13.5px; max-width: 88ch; line-height: 1.6;
}

/* ---------- Regime-Streifen ---------- */
#view-macro .mac-regime {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 26px;
}
#view-macro .mac-reg-cell { background: var(--surface); padding: 12px 15px; }
#view-macro .mac-reg-lbl {
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px;
}
#view-macro .mac-reg-val {
  font-family: var(--font-num); font-size: 20px; font-weight: 500;
  margin-top: 3px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
#view-macro .mac-reg-cmt { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
#view-macro .mac-reg-wide { grid-column: span 2; }
/* Die Fed-Zelle traegt Prozentzahl und Wort, dafuer ist die 20px-Zahlenschrift
   der uebrigen Kacheln zu gross: sie bricht in der schmalen Spalte um. */
#view-macro .mac-reg-fed .mac-reg-val { font-size: 16px; line-height: 1.25; }
#view-macro .mac-reg-wide .mac-reg-val {
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 500;
  line-height: 1.4; color: var(--warn); margin-top: 4px;
}

/* ---------- Abschnittskopf ---------- */
#view-macro .mac-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 0 0 12px;
}
#view-macro .mac-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
#view-macro .mac-head .mac-hint { font-size: 12px; color: var(--muted); }
#view-macro .mac-seg { display: flex; gap: 2px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; }
#view-macro .mac-seg button {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--ink-2);
  background: none; border: 0; border-radius: 6px; padding: 4px 11px; cursor: pointer;
}
#view-macro .mac-seg button:hover { color: var(--ink); background: var(--surface-3); }
#view-macro .mac-seg button.on { background: var(--accent-soft); color: var(--accent-2); }

/* ---------- Terminkarten ---------- */
#view-macro .mac-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 12px; margin-bottom: 30px;
}
#view-macro .mac-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 15px; position: relative;
}
#view-macro .mac-card.mac-top::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent); border-radius: var(--r) 0 0 var(--r);
  box-shadow: 0 0 14px -1px rgba(var(--glow), .7);
}
#view-macro .mac-when {
  font-family: var(--font-num); font-size: 11.5px; color: var(--accent-2); letter-spacing: .02em;
}
#view-macro .mac-when .mac-rest { color: var(--muted); }
#view-macro .mac-card h3 {
  margin: 5px 0 2px; font-size: 14.5px; font-weight: 600;
  letter-spacing: -.005em; line-height: 1.3;
}
#view-macro .mac-issuer { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }

/* Wichtigkeit */
#view-macro .mac-pips { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
#view-macro .mac-pips i { display: flex; gap: 3px; font-style: normal; }
#view-macro .mac-pip { width: 15px; height: 4px; border-radius: 2px; background: var(--surface-3); }
#view-macro .mac-pip.on { background: var(--accent); }
#view-macro .mac-pip.on.max { background: var(--warn); }
#view-macro .mac-pips span { font-size: 11px; color: var(--muted); font-family: var(--font-num); }

/* Werte */
#view-macro .mac-kv {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; padding: 3px 0; border-top: 1px solid var(--hair);
}
#view-macro .mac-kv:first-of-type { border-top: 0; }
#view-macro .mac-kv .k { color: var(--muted); flex: none; }
#view-macro .mac-kv .v {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  text-align: right; flex: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#view-macro .mac-kv .v .dim { color: var(--muted); }

/* Bandbreite */
#view-macro .mac-span { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--hair); }
#view-macro .mac-span-lbl {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
#view-macro .mac-gauge {
  position: relative; height: 6px; border-radius: 3px;
  background: var(--surface-3); margin: 8px 0 5px;
}
#view-macro .mac-gauge i {
  position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px;
  background: linear-gradient(90deg, rgba(91,150,255,.75), rgba(143,184,255,.35));
}
#view-macro .mac-gauge b { position: absolute; top: -3px; width: 2px; height: 12px;
  background: var(--ink); border-radius: 1px; }
#view-macro .mac-gauge-lbl {
  display: flex; justify-content: space-between;
  font-family: var(--font-num); font-size: 10.5px; color: var(--muted);
}

/* Betroffene Branchen */
#view-macro .mac-sect {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
#view-macro .mac-sect-lbl {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; width: 100%; margin-bottom: 2px;
}
#view-macro .mac-chip {
  font-size: 11px; font-family: var(--font-num); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; color: var(--ink-2);
}
#view-macro .mac-chip.strong {
  border-color: rgba(91,150,255,.4); color: var(--accent-2); background: var(--accent-soft);
}

/* ---------- Erklaer-Infobox (Muster der Radar-Fragezeichen) ---------- */
#view-macro .mac-q {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); font-family: var(--font-num);
  font-size: 10.5px; font-weight: 600; margin-left: 7px; vertical-align: 1px;
  cursor: help; padding: 0; line-height: 1; flex: none;
  transition: border-color .12s, color .12s, background .12s;
}
#view-macro .mac-q:hover,
#view-macro .mac-q[aria-expanded="true"] {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
}
#view-macro .mac-info {
  position: absolute; z-index: 40; left: -10px; top: 24px; width: min(380px, 74vw);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-2);
  padding: 13px 16px 14px; line-height: 1.58; color: var(--ink-2);
  text-align: left; display: none; cursor: default;
  /* Der Traeger ist ein Button in Zahlenschrift — hier zurueck auf Fliesstext. */
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 400;
  text-transform: none; letter-spacing: 0; white-space: normal;
}
#view-macro .mac-q:hover .mac-info,
#view-macro .mac-q[aria-expanded="true"] .mac-info { display: block; }
/* Nahe am rechten Rand nach links aufklappen */
#view-macro .mac-info.mac-links { left: auto; right: -10px; }
#view-macro .mac-info em {
  font-style: normal; display: block; color: var(--accent-2); font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; font-weight: 600; margin-bottom: 5px;
}
#view-macro .mac-info p { margin: 0 0 9px; }
#view-macro .mac-info p:last-child { margin: 0; }
#view-macro .mac-info .mac-meta {
  color: var(--muted); font-size: 11.5px; border-top: 1px solid var(--hair);
  padding-top: 8px; margin-top: 9px;
}
#view-macro .mac-info .mac-meta b { color: var(--ink-2); font-weight: 500; }

/* ---------- Rueckblick ---------- */
#view-macro .mac-back {
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--surface); margin-bottom: 26px;
}
#view-macro .mac-row {
  display: grid; grid-template-columns: 108px 1fr 132px 112px;
  gap: 14px; align-items: start; padding: 13px 15px;
  border-bottom: 1px solid var(--hair);
}
#view-macro .mac-row > .mac-date,
#view-macro .mac-row > .mac-surp,
#view-macro .mac-row > .mac-reac { padding-top: 2px; }
#view-macro .mac-row:last-child { border-bottom: 0; }
#view-macro .mac-row:hover { background: rgba(91,150,255,.045); }
#view-macro .mac-date { font-family: var(--font-num); font-size: 11px; color: var(--muted); }
#view-macro .mac-date b { display: block; color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
#view-macro .mac-title { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; }
#view-macro .mac-text {
  margin: 5px 0 4px; font-size: 12.5px; line-height: 1.55;
  color: var(--ink-2); font-weight: 400; max-width: 92ch;
}
#view-macro .mac-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }
#view-macro .mac-sub b { color: var(--ink-2); font-weight: 500; }
#view-macro .mac-surp {
  text-align: right; font-family: var(--font-num); font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#view-macro .mac-surp small,
#view-macro .mac-reac small {
  display: block; color: var(--muted); font-size: 9.5px;
  letter-spacing: .07em; text-transform: uppercase; margin-bottom: 2px;
}
#view-macro .mac-reac { text-align: right; }
#view-macro .mac-reac .v {
  font-family: var(--font-num); font-size: 14px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#view-macro .mac-reac .gap { font-family: var(--font-num); font-size: 10.5px; color: var(--muted); }

/* ---------- Hinweise ---------- */
#view-macro .mac-notes {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); padding: 18px 20px;
}
#view-macro .mac-notes h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
#view-macro .mac-notes h3:not(:first-child) { margin-top: 18px; }
#view-macro .mac-notes ul { margin: 0; padding-left: 18px; }
#view-macro .mac-notes li {
  margin-bottom: 7px; font-size: 13px; color: var(--ink-2); line-height: 1.55;
}
#view-macro .mac-notes li::marker { color: var(--accent); }
#view-macro .mac-notes b { color: var(--ink); font-weight: 600; }

#view-macro .mac-empty {
  color: var(--muted); font-size: 13px; padding: 26px 4px; text-align: center;
}
#view-macro .mac-stand { font-family: var(--font-num); font-size: 11px; color: var(--muted); }

@media (max-width: 760px) {
  #view-macro .mac-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  #view-macro .mac-row .mac-title { grid-column: span 2; }
  #view-macro .mac-reg-wide { grid-column: span 2; }
/* Die Fed-Zelle traegt Prozentzahl und Wort, dafuer ist die 20px-Zahlenschrift
   der uebrigen Kacheln zu gross: sie bricht in der schmalen Spalte um. */
#view-macro .mac-reg-fed .mac-reg-val { font-size: 16px; line-height: 1.25; }
}

/* ---------- Terminart-Filter ---------- */
#view-macro .mac-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#view-macro .mac-artwahl {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
#view-macro .mac-artwahl select {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 500;
  color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 5px 9px; cursor: pointer; letter-spacing: 0; text-transform: none;
  max-width: 260px;
}
#view-macro .mac-artwahl select:hover { border-color: var(--accent); }
#view-macro .mac-artwahl select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Terminprofil (Stufe 2) ---------- */
#view-macro .mac-profil {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); padding: 16px 18px 18px; margin-bottom: 26px;
}
#view-macro .mac-profil-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 14px;
}
#view-macro .mac-profil-head h2 {
  margin: 0 0 3px; font-size: 17px; font-weight: 600; display: flex; align-items: center;
}
#view-macro .mac-profil-head .mac-hint { margin: 0; }
#view-macro .mac-profil-kpi { text-align: right; flex: none; }
#view-macro .mac-profil-kpi .mac-reg-val { font-size: 22px; }
#view-macro .mac-profil-grid {
  display: grid; grid-template-columns: minmax(320px, 1.7fr) minmax(230px, 1fr);
  gap: 18px; align-items: start;
}
@media (max-width: 860px) {
  #view-macro .mac-profil-grid { grid-template-columns: 1fr; }
}

#view-macro .mac-chart-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
#view-macro .mac-legend { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; }
#view-macro .mac-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#view-macro .mac-legend i.ist { background: var(--accent-2); }
#view-macro .mac-legend i.kons { border: 1.4px solid var(--muted); }
#view-macro .mac-legend-txt {
  text-transform: none; letter-spacing: 0; font-family: var(--font-num); font-weight: 400;
}
#view-macro .mac-svg { width: 100%; height: auto; display: block; }

/* Balkenreihe der Ueberraschungen, um eine Nulllinie in der Mitte */
#view-macro .mac-sig-row {
  position: relative; display: flex; align-items: stretch; gap: 3px;
  height: 56px; padding: 0 2px;
}
#view-macro .mac-sig-null {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--border); pointer-events: none;
}
#view-macro .mac-sig { position: relative; flex: 1; height: 100%; }
#view-macro .mac-sig i {
  position: absolute; left: 0; right: 0; display: block;
  background: var(--neutral); border-radius: 2px;
}
#view-macro .mac-sig i.hoch { background: var(--pos); }
#view-macro .mac-sig i.tief { background: var(--neg); }
#view-macro .mac-sig i.flach { background: var(--surface-3); }

/* Trefferbilanz */
#view-macro .mac-bilanz {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 13px 15px 12px;
}
#view-macro .mac-bilanz-head {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: center;
}
#view-macro .mac-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  background: var(--surface-3); margin-bottom: 6px;
}
#view-macro .mac-bar span { display: block; }
#view-macro .mac-bar .u { background: var(--neg); opacity: .8; }
#view-macro .mac-bar .g { background: var(--neutral); }
#view-macro .mac-bar .o { background: var(--pos); opacity: .8; }
#view-macro .mac-bar-lbl {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font-num); font-size: 10.5px; margin-bottom: 10px;
}
#view-macro .mac-bilanz .mac-kv { font-size: 12px; }

/* Abweichung in Standardabweichungen in der Rueckblick-Zeile */
#view-macro .mac-sigma {
  font-family: var(--font-num); font-size: 10.5px; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
#view-macro .mac-sigma.dim { color: var(--muted); }

/* Hinweis und Quellenlink an der Einordnung */
#view-macro .mac-text.mac-ohne { color: var(--muted); font-style: italic; }
#view-macro .mac-text.mac-ohne .mac-q { font-style: normal; }
#view-macro .mac-quelle {
  font-family: var(--font-num); font-size: 10.5px; color: var(--accent-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px;
  text-decoration: none; white-space: nowrap; margin-left: 3px; vertical-align: 1px;
}
#view-macro .mac-quelle:hover { border-color: var(--accent); background: var(--accent-soft); }
/* Web-Recherche ist schwaecher belegt als das Originaldokument: eigene Farbe */
#view-macro .mac-quelle.mac-web { color: var(--muted); }
#view-macro .mac-quelle.mac-web:hover { border-color: var(--muted); background: var(--surface-2); }

/* Eingepreiste Zinserwartung auf den Zinsentscheid-Karten */
#view-macro .mac-fw {
  margin-top: 10px; padding: 9px 11px; border-radius: var(--r-sm);
  background: var(--accent-soft); border: 1px solid rgba(91,150,255,.22);
}
#view-macro .mac-fw .mac-span-lbl { display: flex; align-items: center; }
#view-macro .mac-fw-txt { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
#view-macro .mac-fw-txt b { color: var(--ink); font-weight: 600; font-family: var(--font-num); }
#view-macro .mac-fw-txt b.pos { color: var(--pos); }
#view-macro .mac-fw-txt b.neg { color: var(--neg); }
#view-macro .mac-fw-meta {
  font-family: var(--font-num); font-size: 10.5px; color: var(--muted); margin-top: 4px;
}
