/*
 * NebraOT Modern UI V5 — Last News / News readability polish.
 * Presentation only: no routes, forms, SQL, permissions or article data are changed.
 */
:root {
  --n5-news-bg: rgba(10, 8, 7, .965);
  --n5-news-panel: rgba(19, 14, 12, .97);
  --n5-news-panel-alt: rgba(31, 21, 17, .96);
  --n5-news-border: rgba(244, 194, 91, .38);
  --n5-news-border-soft: rgba(244, 194, 91, .16);
  --n5-news-gold: #f6ca70;
  --n5-news-gold-soft: #ffe9b5;
  --n5-news-text: #fff5e8;
  --n5-news-muted: #dec9ad;
  --n5-news-red: #8d2b1d;
}

/* Main news body: larger type and strong contrast. */
body.nebra-page-news .Content #News .BoxContent,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent,
body.nebra-page-newsarchive .Content #News .BoxContent {
  color: var(--n5-news-text) !important;
  font-size: 15px !important;
  line-height: 1.62 !important;
}

body.nebra-page-news .Content #News .BoxContent p,
body.nebra-page-news .Content #News .BoxContent li,
body.nebra-page-news .Content #News .BoxContent td,
body.nebra-page-news .Content #News .BoxContent div,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent p,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent li,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent td {
  color: var(--n5-news-text) !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45) !important;
}

body.nebra-page-news .Content #News .BoxContent b,
body.nebra-page-news .Content #News .BoxContent strong,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent b,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent strong {
  color: var(--n5-news-gold-soft) !important;
  font-weight: 800 !important;
}

body.nebra-page-news .Content #News .BoxContent a,
body.nebra-page-news .Content #News .BoxContent a:visited,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent a,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent a:visited {
  color: #ffd36f !important;
  font-weight: 700 !important;
  text-decoration-color: rgba(255, 211, 111, .45) !important;
}
body.nebra-page-news .Content #News .BoxContent a:hover,
body.nebra-page-newsarchive .Content #NewsArchive .BoxContent a:hover {
  color: #fff1c4 !important;
}

/* Headline: stop using the tiny 7pt/10pt legacy positioning. */
body.nebra-page-news .Content #News .NewsHeadline,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadline {
  margin: 14px 0 10px !important;
}
body.nebra-page-news .Content #News .NewsHeadlineBackground,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineBackground {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas: "title author" "date author" !important;
  column-gap: 16px !important;
  row-gap: 2px !important;
  box-sizing: border-box !important;
  min-height: 62px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 11px 14px 10px 58px !important;
  border: 1px solid rgba(244, 194, 91, .40) !important;
  border-radius: 12px !important;
  background: linear-gradient(100deg, rgba(111, 31, 19, .98), rgba(54, 20, 15, .97) 55%, rgba(21, 13, 10, .98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 225, 155, .08), 0 8px 20px rgba(0, 0, 0, .24) !important;
  overflow: hidden !important;
}
body.nebra-page-news .Content #News .NewsHeadlineIcon,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineIcon {
  position: absolute !important;
  top: 13px !important;
  left: 14px !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 34px !important;
  height: auto !important;
}
body.nebra-page-news .Content #News .NewsHeadlineText,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineText {
  grid-area: title !important;
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff0c8 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}
body.nebra-page-news .Content #News .NewsHeadlineDate,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineDate {
  grid-area: date !important;
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #e6c786 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
body.nebra-page-news .Content #News .NewsHeadlineAuthor,
body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineAuthor {
  grid-area: author !important;
  position: static !important;
  align-self: center !important;
  width: auto !important;
  margin: 0 !important;
  color: #d8c3a5 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

/* Outer table generated by MyAAC is only a layout shell. */
body.nebra-page-news .NebraNewsOuterTable,
body.nebra-page-newsarchive .NebraNewsOuterTable {
  width: 100% !important;
  margin: 0 0 18px !important;
  border: 0 !important;
  border-collapse: separate !important;
  background: transparent !important;
}
body.nebra-page-news .NebraNewsOuterTable > tbody > tr > td,
body.nebra-page-newsarchive .NebraNewsOuterTable > tbody > tr > td {
  padding: 13px 16px !important;
  border: 1px solid var(--n5-news-border-soft) !important;
  border-radius: 12px !important;
  color: var(--n5-news-text) !important;
  background: linear-gradient(155deg, rgba(18, 13, 11, .97), rgba(9, 8, 7, .97)) !important;
}

/* Article media. */
body.nebra-page-news .NebraNewsArticleCell img,
body.nebra-page-newsarchive .NebraNewsArticleCell img {
  max-width: 100% !important;
  height: auto !important;
}
body.nebra-page-news .NebraNewsArticleCell > img,
body.nebra-page-newsarchive .NebraNewsArticleCell > img {
  display: block !important;
  margin: 10px auto 16px !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
}

/* Internal article tables: dark, readable and scrollable instead of squeezed. */
body.nebra-page-news .NebraNewsTableScroll,
body.nebra-page-newsarchive .NebraNewsTableScroll {
  width: 100% !important;
  margin: 13px 0 18px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid var(--n5-news-border) !important;
  border-radius: 10px !important;
  background: rgba(8, 7, 6, .82) !important;
  scrollbar-color: #a94a2d #17100d;
}
body.nebra-page-news .NebraNewsDataTable,
body.nebra-page-newsarchive .NebraNewsDataTable {
  width: 100% !important;
  min-width: 560px !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  color: var(--n5-news-text) !important;
  background: var(--n5-news-bg) !important;
}
body.nebra-page-news .NebraNewsDataTable th,
body.nebra-page-news .NebraNewsDataTable td,
body.nebra-page-newsarchive .NebraNewsDataTable th,
body.nebra-page-newsarchive .NebraNewsDataTable td {
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-right: 1px solid rgba(244, 194, 91, .10) !important;
  border-bottom: 1px solid rgba(244, 194, 91, .13) !important;
  color: #fff4e5 !important;
  background: rgba(18, 14, 12, .97) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  vertical-align: middle !important;
}
body.nebra-page-news .NebraNewsDataTable tr:nth-child(even) > td,
body.nebra-page-newsarchive .NebraNewsDataTable tr:nth-child(even) > td {
  background: rgba(31, 22, 18, .98) !important;
}
body.nebra-page-news .NebraNewsDataTable tr:first-child > td,
body.nebra-page-news .NebraNewsDataTable tr:first-child > th,
body.nebra-page-newsarchive .NebraNewsDataTable tr:first-child > td,
body.nebra-page-newsarchive .NebraNewsDataTable tr:first-child > th,
body.nebra-page-news .NebraNewsDataTable thead th,
body.nebra-page-newsarchive .NebraNewsDataTable thead th {
  color: #ffe6a5 !important;
  background: linear-gradient(90deg, #7a2618, #451912 62%, #27110e) !important;
  font-weight: 900 !important;
}
body.nebra-page-news .NebraNewsDataTable tr:hover > td,
body.nebra-page-newsarchive .NebraNewsDataTable tr:hover > td {
  background: rgba(116, 40, 25, .42) !important;
}

/* Legacy inline backgrounds/colors in news often produce beige rows + pale text. Override them here. */
body.nebra-page-news .NebraNewsArticleCell table[bgcolor] td,
body.nebra-page-news .NebraNewsArticleCell tr[bgcolor] > td,
body.nebra-page-news .NebraNewsArticleCell td[bgcolor],
body.nebra-page-newsarchive .NebraNewsArticleCell table[bgcolor] td,
body.nebra-page-newsarchive .NebraNewsArticleCell tr[bgcolor] > td,
body.nebra-page-newsarchive .NebraNewsArticleCell td[bgcolor] {
  color: #fff4e5 !important;
}

/* Lists and article sections. */
body.nebra-page-news .NebraNewsArticleCell ul,
body.nebra-page-news .NebraNewsArticleCell ol,
body.nebra-page-newsarchive .NebraNewsArticleCell ul,
body.nebra-page-newsarchive .NebraNewsArticleCell ol {
  margin: 8px 0 15px 22px !important;
  padding: 0 !important;
}
body.nebra-page-news .NebraNewsArticleCell li,
body.nebra-page-newsarchive .NebraNewsArticleCell li {
  margin: 4px 0 !important;
  color: #fff3e4 !important;
}
body.nebra-page-news .NebraNewsArticleCell h1,
body.nebra-page-news .NebraNewsArticleCell h2,
body.nebra-page-news .NebraNewsArticleCell h3,
body.nebra-page-news .NebraNewsArticleCell h4,
body.nebra-page-newsarchive .NebraNewsArticleCell h1,
body.nebra-page-newsarchive .NebraNewsArticleCell h2,
body.nebra-page-newsarchive .NebraNewsArticleCell h3,
body.nebra-page-newsarchive .NebraNewsArticleCell h4 {
  margin: 18px 0 8px !important;
  color: #ffe5a1 !important;
  line-height: 1.25 !important;
}

/* News archive table also gets better contrast. */
body.nebra-page-newsarchive .Content #NewsArchive .TableContent td {
  color: #fff3e2 !important;
  background: rgba(18, 14, 12, .96) !important;
  font-size: 14px !important;
}
body.nebra-page-newsarchive .Content #NewsArchive .TableContent tr:nth-child(even) td {
  background: rgba(31, 22, 18, .97) !important;
}

@media (max-width: 760px) {
  body.nebra-page-news .Content #News .BoxContent,
  body.nebra-page-newsarchive .Content #NewsArchive .BoxContent {
    font-size: 14px !important;
  }
  body.nebra-page-news .Content #News .NewsHeadlineBackground,
  body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineBackground {
    grid-template-columns: 1fr !important;
    grid-template-areas: "title" "date" "author" !important;
    padding-right: 12px !important;
  }
  body.nebra-page-news .Content #News .NewsHeadlineAuthor,
  body.nebra-page-newsarchive .Content #NewsArchive .NewsHeadlineAuthor {
    white-space: normal !important;
  }
  body.nebra-page-news .NebraNewsOuterTable > tbody > tr > td,
  body.nebra-page-newsarchive .NebraNewsOuterTable > tbody > tr > td {
    padding: 11px 10px !important;
  }
  body.nebra-page-news .NebraNewsDataTable,
  body.nebra-page-newsarchive .NebraNewsDataTable {
    min-width: 520px !important;
  }
}
