/*
 * NebraOT Modern UI V6 — News contrast correction.
 * Fixes pale/cream legacy boxes inside news articles that inherited white text.
 * Presentation only: no article content, routes, forms or SQL are changed.
 */
:root {
  --n6-ink: #2b190f;
  --n6-ink-soft: #4a2d1c;
  --n6-red: #7a2417;
  --n6-gold-dark: #7b541b;
  --n6-light-border: #b9934d;
}

/* Slightly stronger reading contrast for the article itself. */
body.nebra-page-news .Content #News .BoxContent,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent,
body.nebra-page-newsarchive .Content #News .BoxContent {
  color: #fff9ef !important;
  font-size: 16px !important;
  line-height: 1.68 !important;
}

body.nebra-page-news .NebraNewsArticleCell > p,
body.nebra-page-newsarchive .NebraNewsArticleCell > p,
body.nebra-page-news .NebraNewsArticleCell > div:not(.NebraNewsTableScroll):not(.NebraNewsLightPanel),
body.nebra-page-newsarchive .NebraNewsArticleCell > div:not(.NebraNewsTableScroll):not(.NebraNewsLightPanel) {
  color: #fff9ef !important;
}

/*
 * JS marks every genuinely light legacy panel using its computed background.
 * Once marked, ALL inherited white/gold text is changed to dark ink.
 */
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel p,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel li,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel span,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel div,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel small,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel label,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel td,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel th,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel p,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel li,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel span,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel div,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel small,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel label,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel td,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel th {
  color: var(--n6-ink) !important;
  text-shadow: none !important;
}

body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel {
  border-color: var(--n6-light-border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 12px rgba(0,0,0,.16) !important;
}

body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel strong,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel b,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel strong,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel b {
  color: #5f1c12 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel a,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel a:visited,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel a,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel a:visited {
  color: var(--n6-red) !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(122,36,23,.45) !important;
  text-shadow: none !important;
}

body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel h1,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel h2,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel h3,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel h4,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel h1,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel h2,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel h3,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel h4 {
  color: #651f13 !important;
  text-shadow: none !important;
}

/* Command badges such as !pass and !reward inside cream boxes. */
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel code,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel kbd,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel code,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel kbd {
  display: inline-block !important;
  padding: 2px 7px !important;
  border: 1px solid rgba(103,72,27,.34) !important;
  border-radius: 5px !important;
  color: #351d0f !important;
  background: #d9c69a !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

/* Old inline FONT tags can otherwise override readability. */
body.nebra-page-news .NebraNewsArticleCell .NebraNewsLightPanel font,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsLightPanel font {
  color: var(--n6-ink) !important;
  text-shadow: none !important;
}

/* Keep dark reward tables dark even if nested near a cream note. */
body.nebra-page-news .NebraNewsArticleCell .NebraNewsDataTable,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsDataTable,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsDataTable td,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsDataTable td {
  color: #fff8ec !important;
  text-shadow: none !important;
}
body.nebra-page-news .NebraNewsArticleCell .NebraNewsDataTable strong,
body.nebra-page-news .NebraNewsArticleCell .NebraNewsDataTable b,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsDataTable strong,
body.nebra-page-newsarchive .NebraNewsArticleCell .NebraNewsDataTable b {
  color: #ffe8ac !important;
}

@media (max-width: 760px) {
  body.nebra-page-news .Content #News .BoxContent,
  body.nebra-page-newsarchive .Content #NewsArchive .BoxContent {
    font-size: 15px !important;
    line-height: 1.62 !important;
  }
}
