#newsIntelligenceModal.news-intelligence-modal {
  position: fixed;
  inset: 0;
  z-index: 326;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
  overflow: hidden;
  box-sizing: border-box;
  --ni-surface: #fffdf8;
  --ni-border: rgba(34, 31, 25, 0.12);
  --ni-text: #211f1a;
  --ni-muted: #746d62;
  --ni-gold: #9b8456;
  --ni-green: #267f59;
  --ni-red: #bf4b49;
  --ni-x: var(--mesa-secondary-x, 28px);
  --ni-header-divider-width: var(--mesa-secondary-header-divider-width, 100%);
  --ni-header-accent-width: var(--mesa-secondary-header-accent-width, 180px);
  background: rgba(8, 12, 18, 0.58);
}

#newsIntelligenceModal.news-intelligence-modal.open { display: flex; }

#newsIntelligenceModal .news-intelligence-modal__card {
  display: flex;
  flex-direction: column;
  width: min(100%, 940px) !important;
  height: min(780px, calc(100dvh - 52px)) !important;
  max-height: min(780px, calc(100dvh - 52px)) !important;
  min-height: 0;
  overflow: hidden;
  color: var(--ni-text);
  background: var(--ni-surface);
  border: 1px solid var(--ni-border);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(27, 23, 17, 0.16), 0 2px 10px rgba(27, 23, 17, 0.05);
}

#newsIntelligenceModal .news-intelligence-modal__header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 16px;
  margin: 0 !important;
  padding: var(--mesa-secondary-y, 32px) var(--ni-x) 24px;
  border: 0 !important;
  box-shadow: none !important;
}

#newsIntelligenceModal .news-intelligence-modal__header::before,
#newsIntelligenceModal .news-intelligence-modal__header::after {
  display: none !important;
}

#newsIntelligenceModal .news-intelligence-modal__header::before {
  left: 0;
  width: var(--ni-header-divider-width);
  background: var(--mesa-secondary-border, var(--ni-border));
}

#newsIntelligenceModal .news-intelligence-modal__header::after {
  left: var(--ni-x);
  width: var(--ni-header-accent-width);
  background: var(--mesa-secondary-gold, var(--ni-gold));
}

#newsIntelligenceModal .news-intelligence-modal__kicker,
#newsIntelligenceModal .news-intelligence-modal__asset-field > span,
#newsIntelligenceModal .news-intelligence__summary-head > span,
#newsIntelligenceModal .news-intelligence__item-meta,
#newsIntelligenceModal .news-intelligence__confidence,
#newsIntelligenceModal .news-intelligence__source-score {
  color: var(--ni-muted);
  font: 800 10px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#newsIntelligenceModal .news-intelligence-modal__kicker { margin: 0 0 7px; color: var(--ni-gold); }
#newsIntelligenceModal .news-intelligence-modal__title { margin: 0; font: 400 30px/1.06 'DM Serif Display', Georgia, serif; }
#newsIntelligenceModal .news-intelligence-modal__subtitle { margin: 8px 0 0; color: var(--ni-muted); font: 500 13px/1.45 Inter, system-ui, sans-serif; }

#newsIntelligenceModal .news-intelligence-modal__close,
#newsIntelligenceModal .news-intelligence-modal__reload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ni-border);
  border-radius: 8px;
  background: transparent;
  color: var(--ni-text);
  cursor: pointer;
  font: 300 22px/1 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence-modal__close:hover,
#newsIntelligenceModal .news-intelligence-modal__reload:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ni-gold) 62%, var(--ni-border));
  background: rgba(155, 132, 86, .08);
}

#newsIntelligenceModal .news-intelligence-modal__toolbar {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 20px var(--ni-x) 18px;
  border: 0 !important;
  box-shadow: none !important;
}

#newsIntelligenceModal .news-intelligence-modal__toolbar::before,
#newsIntelligenceModal .news-intelligence-modal__toolbar::after {
  display: none;
}

#newsIntelligenceModal .news-intelligence-modal__toolbar::before {
  left: 0;
  width: 100%;
  background: var(--mesa-secondary-border, var(--ni-border));
}

#newsIntelligenceModal .news-intelligence-modal__toolbar::after {
  left: var(--ni-x);
  width: var(--ni-header-accent-width);
  background: var(--mesa-secondary-gold, var(--ni-gold));
}

#newsIntelligenceModal .news-intelligence-modal__toolbar > * {
  position: relative;
  z-index: 1;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field { display: grid; gap: 6px; min-width: min(100%, 320px); flex: 1 1 auto; }
#newsIntelligenceModal .news-intelligence-modal__asset-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--ni-border);
  border-radius: 8px;
  background-color: #fff;
  color: var(--ni-text);
  font: 700 13px/1.2 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu-wrap,
#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__trigger {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 40px;
  min-height: 40px;
  padding: 0 13px;
  border-color: color-mix(in srgb, var(--border2, #d6d1c8) 55%, var(--border, #e4e0d9));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface2, #f5f2ed) 32%, var(--surface, #fffdf8));
  color: var(--text-mid, #6f6a61);
  font: 600 13px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__trigger:hover:not(:disabled),
#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__trigger--open {
  border-color: color-mix(in srgb, var(--gold, var(--ni-gold)) 42%, var(--border, #e4e0d9));
  background: color-mix(in srgb, var(--surface2, #f5f2ed) 48%, var(--surface, #fffdf8));
  color: var(--text-mid, #6f6a61);
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--gold, var(--ni-gold)) 40%, var(--border, #e4e0d9));
  outline-offset: 2px;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__dropdown {
  z-index: 16;
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  transform: none;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__menu {
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: min(280px, 42vh);
  border-color: color-mix(in srgb, var(--border2, #d6d1c8) 35%, var(--border, #e4e0d9));
  border-radius: 8px;
  background: var(--surface, #fffdf8);
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__option {
  min-height: 34px;
  color: var(--text-mid, #6f6a61);
  font: 500 13px/1.25 Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__option:hover:not(:disabled),
#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__option:focus-visible:not(:disabled) {
  background: color-mix(in srgb, var(--surface2, #f5f2ed) 40%, transparent);
}

#newsIntelligenceModal .news-intelligence-modal__asset-field .mesa-select-menu__option--selected {
  background: color-mix(in srgb, var(--gold, var(--ni-gold)) 7%, transparent);
  color: var(--text-mid, #6f6a61);
  font-weight: 600;
}

#newsIntelligenceModal .news-intelligence-modal__reload {
  width: 40px;
  height: 40px;
  border-color: var(--ni-text);
  background: var(--ni-text);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(33, 31, 26, .14);
}

#newsIntelligenceModal .news-intelligence-modal__reload:hover:not(:disabled) {
  border-color: #000;
  background: #000;
  color: #fff;
  box-shadow: 0 6px 14px rgba(33, 31, 26, .2);
}

#newsIntelligenceModal .news-intelligence-modal__reload:disabled {
  cursor: wait;
  opacity: .7;
}

#newsIntelligenceModal .news-intelligence-modal__reload.is-loading span { animation: newsIntelligenceSpin .8s linear infinite; }

#newsIntelligenceModal .news-intelligence-modal__body { position: relative; z-index: 0; min-height: 0; flex: 1 1 auto; overflow: auto; padding: 20px var(--ni-x) 26px; }
#newsIntelligenceModal .news-intelligence__summary {
  display: grid;
  gap: 12px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--ni-border) !important;
}
#newsIntelligenceModal .news-intelligence__summary-head,
#newsIntelligenceModal .news-intelligence__item-meta,
#newsIntelligenceModal .news-intelligence__item-footer { display: flex; align-items: center; gap: 8px; min-width: 0; }

#newsIntelligenceModal .news-intelligence__help {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px !important;
  height: 20px !important;
  padding: 0;
  margin: 0;
  overflow: visible;
}

#newsIntelligenceModal .news-intelligence__help-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: help !important;
}

#mesaAppShell#mesaAppShell#mesaAppShell #newsIntelligenceModal .news-intelligence__help-trigger {
  width: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  height: 20px !important;
}

#newsIntelligenceModal .news-intelligence__help-icon {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  border-color: color-mix(in srgb, var(--ni-muted) 45%, transparent) !important;
  background: transparent !important;
  color: var(--ni-muted) !important;
  box-shadow: none !important;
  font: 800 10px/1 Inter, system-ui, sans-serif !important;
}

#newsIntelligenceModal .news-intelligence__help-trigger:hover .news-intelligence__help-icon,
#newsIntelligenceModal .news-intelligence__help-trigger:focus-visible .news-intelligence__help-icon {
  border-color: var(--ni-gold) !important;
  background: var(--ni-gold) !important;
  color: #fffdf8 !important;
  transform: none !important;
}

#newsIntelligenceModal .news-intelligence__help-popover {
  position: absolute;
  z-index: 8;
  top: calc(100% + 10px);
  bottom: auto;
  left: 0;
  width: min(260px, calc(100vw - 76px));
  padding: 12px 13px;
  border: 1px solid var(--ni-border);
  border-radius: 8px;
  background: #fffdf8;
  color: #49443c;
  box-shadow: 0 10px 25px rgba(27, 23, 17, .18);
  font: 500 12px/1.45 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

#newsIntelligenceModal .news-intelligence__help:hover .news-intelligence__help-popover,
#newsIntelligenceModal .news-intelligence__help:focus-within .news-intelligence__help-popover { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

#newsIntelligenceModal .news-intelligence__summary-values {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ni-text);
  font: 650 13px/1.25 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence__decision {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--ni-border);
  border-left: 3px solid #a29f97;
  border-radius: 8px;
  background: rgba(116, 109, 98, .045);
}

#newsIntelligenceModal .news-intelligence__decision--positive {
  border-left-color: var(--ni-green);
  background: rgba(38, 127, 89, .055);
}

#newsIntelligenceModal .news-intelligence__decision--negative {
  border-left-color: var(--ni-red);
  background: rgba(191, 75, 73, .055);
}

#newsIntelligenceModal .news-intelligence__decision strong {
  color: var(--ni-text);
  font: 750 14px/1.25 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence__decision p {
  margin: 0;
  color: #514b42;
  font: 500 12px/1.45 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence__decision p b {
  color: var(--ni-text);
  font-weight: 750;
}

#newsIntelligenceModal .news-intelligence__decision-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--ni-muted);
  font: 500 11px/1.4 Inter, system-ui, sans-serif;
}

#newsIntelligenceModal .news-intelligence__decision-context b {
  color: var(--ni-text);
  font-weight: 750;
}

#newsIntelligenceModal .news-intelligence__summary-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  padding: 0 24px;
  border-left: 1px solid var(--ni-border);
  white-space: nowrap;
}

#newsIntelligenceModal .news-intelligence__summary-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

#newsIntelligenceModal .news-intelligence__summary-stat::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--ni-muted);
}

#newsIntelligenceModal .news-intelligence__summary-stat b { font-size: 16px; font-weight: 800; }
#newsIntelligenceModal .news-intelligence__summary-stat--positive::before { background: var(--ni-green); }
#newsIntelligenceModal .news-intelligence__summary-stat--negative::before { background: var(--ni-red); }
#newsIntelligenceModal .news-intelligence__summary-stat--neutral::before { background: #a29f97; }
#newsIntelligenceModal .news-intelligence__summary-stat--assessed::before { background: var(--ni-text); }

#newsIntelligenceModal .news-intelligence__timeline {
  display: grid;
  gap: 0;
  margin-top: 0;
  border-top: 0;
}

#newsIntelligenceModal .news-intelligence__item {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 18px 4px 19px 20px;
  border: 0;
  border-bottom: 1px solid var(--ni-border);
  border-radius: 0;
  background: transparent;
}

#newsIntelligenceModal .news-intelligence__item::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: #a29f97;
}

#newsIntelligenceModal .news-intelligence__item--positive::before { background: var(--ni-green); }
#newsIntelligenceModal .news-intelligence__item--negative::before { background: var(--ni-red); }
#newsIntelligenceModal .news-intelligence__item--neutral::before,
#newsIntelligenceModal .news-intelligence__item--pending::before { background: #a29f97; }

#newsIntelligenceModal .news-intelligence__item-meta { flex-wrap: wrap; gap: 6px 10px; }

#newsIntelligenceModal .news-intelligence__impact {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}
#newsIntelligenceModal .news-intelligence__impact--positive { color: #176d4a; border-color: #31936a; background: #eaf6ef; }
#newsIntelligenceModal .news-intelligence__impact--negative { color: #a43f3d; border-color: #d36a67; background: #fceeed; }
#newsIntelligenceModal .news-intelligence__impact--neutral,
#newsIntelligenceModal .news-intelligence__impact--pending { color: #5f5a51; border-color: #9d978c; background: #f1efe9; }

#newsIntelligenceModal .news-intelligence__item-title {
  margin: 0;
  color: var(--ni-text);
  font: 740 16px/1.38 Inter, system-ui, sans-serif;
  text-decoration: none;
}

#newsIntelligenceModal a.news-intelligence__item-title:hover {
  color: color-mix(in srgb, var(--ni-gold) 72%, var(--ni-text));
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ni-gold) 60%, transparent);
  text-underline-offset: 3px;
}

#newsIntelligenceModal .news-intelligence__reading,
#newsIntelligenceModal .news-intelligence__pending {
  display: grid;
  gap: 7px;
  max-width: 860px;
  margin: 0;
  color: #514b42;
  font: 500 13px/1.58 Inter, system-ui, sans-serif;
}
#newsIntelligenceModal .news-intelligence__reading p { margin: 0; }
#newsIntelligenceModal .news-intelligence__evidence {
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, var(--ni-gold) 45%, var(--ni-border));
  color: var(--ni-muted);
  font-size: 12px;
}
#newsIntelligenceModal .news-intelligence__evidence b { color: var(--ni-text); }
#newsIntelligenceModal .news-intelligence__item-footer { flex-wrap: wrap; gap: 8px 10px; padding-top: 1px; }
#newsIntelligenceModal .news-intelligence__confidence { color: var(--ni-text); }
#newsIntelligenceModal .news-intelligence__source-score { color: var(--ni-muted); letter-spacing: 0; text-transform: none; }
#newsIntelligenceModal .news-intelligence__themes { display: inline-flex; flex-wrap: wrap; gap: 5px; }
#newsIntelligenceModal .news-intelligence__themes span { padding: 3px 6px; border: 1px solid var(--ni-border); border-radius: 999px; color: var(--ni-muted); font: 700 10px/1.2 Inter, system-ui, sans-serif; }

#newsIntelligenceModal .news-intelligence__state { display: grid; place-items: center; min-height: 240px; gap: 10px; color: var(--ni-muted); font: 600 13px/1.5 Inter, system-ui, sans-serif; text-align: center; }
#newsIntelligenceModal .news-intelligence__state p { margin: 0; }
#newsIntelligenceModal .news-intelligence__spinner { width: 23px; height: 23px; border: 2px solid rgba(155, 132, 86, .25); border-top-color: var(--ni-gold); border-radius: 50%; animation: newsIntelligenceSpin .8s linear infinite; }
#newsIntelligenceModal .news-intelligence__journal-link { padding: 0; border: 0; background: transparent; color: var(--ni-text); cursor: pointer; font: 750 12px/1.3 Inter, system-ui, sans-serif; text-decoration: underline; text-decoration-color: var(--ni-gold); text-underline-offset: 4px; }
#newsIntelligenceModal .news-intelligence-modal__footer { flex: 0 0 auto; padding: 20px var(--ni-x) 24px; border-top: 1px solid var(--mesa-secondary-border, var(--ni-border)) !important; color: var(--mesa-secondary-dim, var(--ni-muted)); font: 650 .64rem/1.35 Inter, system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; }
#newsIntelligenceModal .news-intelligence-modal__footer p { margin: 0; }

@keyframes newsIntelligenceSpin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
  #newsIntelligenceModal .news-intelligence-modal__card { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #newsIntelligenceModal .news-intelligence-modal__header { padding: 20px 18px 16px; }
  #newsIntelligenceModal .news-intelligence-modal__title { font-size: 27px; }
  #newsIntelligenceModal .news-intelligence-modal__toolbar { padding: 14px 18px; }
  #newsIntelligenceModal .news-intelligence-modal__asset-field { min-width: 0; flex: 1 1 auto; }
  #newsIntelligenceModal .news-intelligence-modal__body { padding: 18px; }
  #newsIntelligenceModal .news-intelligence-modal__footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  #newsIntelligenceModal .news-intelligence__impact { margin-left: 0; }
  #newsIntelligenceModal .news-intelligence__summary-stat { padding: 0 12px; }
}

@media (max-width: 480px) {
  #newsIntelligenceModal .news-intelligence__summary-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}
