/* ==========================================================================
   News front page + article page (blog/latest/upcoming/trendy/cms/story.ftlh)
   Self-contained: every rule is scoped under .news-* / .article-* classes so it
   can't fight the site's Bootstrap 3 header/footer or tenant custom CSS.
   Brand colour: override --news-accent in the site's custom CSS.
   ========================================================================== */

:root {
  --news-accent: #c8102e;
  --news-fg: #14171a;
  --news-fg-soft: #3a4047;
  --news-muted: #6b7280;
  --news-line: #e6e8eb;
  --news-surface: #ffffff;
  --news-surface-alt: #f6f7f9;
  --news-radius: 10px;
  --news-gap: 24px;
  --news-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --news-serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --news-top-offset: 0px; /* set by news.js to the height of a fixed/sticky site header */
}

/* ---------- shared ---------- */
.news-wrap, .article-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(24px + var(--news-top-offset)) 16px 56px;
  font-family: var(--news-sans);
  color: var(--news-fg);
  clear: both;
}
.news-wrap *, .article-shell * { box-sizing: border-box; }
.news-wrap a, .article-shell a { color: inherit; text-decoration: none; }
.news-wrap a:focus-visible, .article-shell a:focus-visible, .news-wrap button:focus-visible {
  outline: 2px solid var(--news-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.news-wrap img, .article-shell img { max-width: 100%; height: auto; display: block; }

.news-eyebrow {
  display: inline-block;
  font: 700 12px/1.2 var(--news-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--news-accent);
}
.news-meta {
  font-size: 13px;
  color: var(--news-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.news-meta > * + *::before { content: "\00B7"; margin-right: 8px; color: var(--news-line); }

/* ---------- search + topic header ---------- */
.news-search {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
}
.news-search input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  font: 16px var(--news-sans);
  color: var(--news-fg);
  background: var(--news-surface-alt);
  border: 1px solid var(--news-line);
  border-radius: 999px;
  outline: none;
}
/* cms_min.css makes every placeholder transparent */
.news-search input[type="text"]::placeholder { color: var(--news-muted); opacity: 1; }
.news-search input[type="text"]::-webkit-input-placeholder { color: var(--news-muted); }
.news-search input[type="text"]:focus { border-color: var(--news-accent); background: var(--news-surface); }
.news-search button {
  height: 44px;
  padding: 0 20px;
  font: 600 14px var(--news-sans);
  color: #fff;
  background: var(--news-fg);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.news-search button:hover { background: var(--news-accent); }

.news-topic-title {
  font: 700 clamp(28px, 4vw, 40px)/1.1 var(--news-serif);
  margin: 0 0 24px;
  text-transform: capitalize;
}

/* ---------- front page grid ---------- */
.news-front {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.news-front.no-rail { grid-template-columns: minmax(0, 1fr); }

.news-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 800 13px/1 var(--news-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--news-fg);
  margin: 36px 0 18px;
}
.news-section-title::after { content: ""; flex: 1; height: 2px; background: var(--news-fg); }

/* lead story */
.news-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 8px;
}
.news-lead .news-thumb { aspect-ratio: 16 / 10; }
.news-lead-title {
  font: 700 clamp(26px, 3.2vw, 38px)/1.12 var(--news-serif);
  margin: 10px 0 12px;
  letter-spacing: -.01em;
}
.news-lead-title a:hover { color: var(--news-accent); }
.news-lead-dek {
  font-size: 17px;
  line-height: 1.55;
  color: var(--news-fg-soft);
  margin: 0 0 14px;
}

/* thumbnails */
.news-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--news-radius);
  background: linear-gradient(135deg, var(--news-surface-alt), var(--news-line));
}
.news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
a:hover > .news-thumb img, .news-card:hover .news-thumb img { transform: scale(1.03); }

/* card grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px var(--news-gap);
}
.news-card { display: flex; flex-direction: column; min-width: 0; }
.news-card .news-thumb { margin-bottom: 12px; }
.news-card-title {
  font: 700 18px/1.3 var(--news-serif);
  margin: 6px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title a:hover { color: var(--news-accent); }
.news-card-summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--news-fg-soft);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .news-meta { margin-top: auto; }

.news-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.news-more button {
  min-width: 200px;
  height: 46px;
  font: 600 15px var(--news-sans);
  color: var(--news-fg);
  background: var(--news-surface);
  border: 1.5px solid var(--news-fg);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.news-more button:hover { background: var(--news-fg); color: #fff; }
.news-more button[disabled] { opacity: .5; cursor: progress; }
.news-empty { color: var(--news-muted); padding: 40px 0; text-align: center; }

/* side rails */
.news-rail { position: sticky; top: calc(24px + var(--news-top-offset)); display: flex; flex-direction: column; gap: 8px; }
.news-rail .news-section-title { margin-top: 0; }
.news-rail-block + .news-rail-block .news-section-title { margin-top: 28px; }
.news-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.news-rank li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--news-line);
}
.news-rank li:first-child { padding-top: 0; }
.news-rank li::before {
  content: counter(rank);
  font: 800 28px/1 var(--news-serif);
  color: #b8bec6;
}
.news-rank a { font: 600 15px/1.35 var(--news-serif); }
.news-rank a:hover { color: var(--news-accent); }
.news-rank .news-meta { margin-top: 6px; font-size: 12px; }

/* ---------- article page ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 740px);
  justify-content: center;
  gap: 48px;
}
.article-layout.has-ad { grid-template-columns: minmax(0, 740px) 300px; }
.article-main { min-width: 0; }
.article-aside { position: sticky; top: calc(24px + var(--news-top-offset)); }

.article-header { margin-bottom: 24px; }
.article-shell h1#storytitle1 {
  font: 700 clamp(30px, 4.2vw, 46px)/1.1 var(--news-serif);
  letter-spacing: -.015em;
  margin: 10px 0 16px;
  padding: 0;        /* legacy cms_min.css: padding 10px 0 43px + float:left */
  float: none;
  width: auto;
  text-align: left;
  color: var(--news-fg);
}
.article-shell .story-subtitle {
  font-size: 20px;
  line-height: 1.5;
  color: var(--news-fg-soft);
  margin: 0 0 20px;
}
.article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--news-line);
  border-bottom: 1px solid var(--news-line);
}
.article-byline .news-meta { font-size: 14px; }
.article-byline strong { color: var(--news-fg); font-weight: 600; }

.social-share-button { display: flex; gap: 8px; }
.social-share-button > div, .social-share-button > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--news-line);
  border-radius: 50%;
  background: var(--news-surface);
  cursor: pointer;
  padding: 0;
  transition: border-color .15s;
}
.social-share-button > div:hover, .social-share-button > button:hover { border-color: var(--news-fg); }
.social-share-button img { width: 18px; height: 18px; object-fit: contain; }

.article-social-follow { display: flex; gap: 12px; margin-bottom: 8px; }
.article-social-follow img { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }

.article-banner { margin: 24px 0 28px; }
.article-banner img { width: 100%; border-radius: var(--news-radius); }

#storytext {
  width: auto;
  padding: 0;               /* legacy cms_min.css indents this by 15% */
  font-family: var(--news-serif);
  font-size: 19px;
  line-height: 1.75;
  color: var(--news-fg);
  overflow-wrap: break-word;
}
#storytext p { margin: 0 0 1.35em; }
/* The rich-text editor wraps every paragraph in inline font-size/font-family/color
   spans (12pt Arial, black). Neutralise only those three so the article typography
   applies; bold, italics and links are untouched. */
#storytext [style*="font-size"] { font-size: inherit !important; }
#storytext [style*="font-family"] { font-family: inherit !important; }
/* Legacy global rules (p, span, div fonts in cms_min.css) would otherwise win. */
#storytext :not(h2):not(h3):not(h4):not(pre):not(code) { font-family: inherit; }
#storytext [style*="color"]:not(a) { color: inherit !important; }
#storytext h2, #storytext h3, #storytext h4 {
  font-family: var(--news-sans);
  line-height: 1.25;
  margin: 1.8em 0 .6em;
  color: var(--news-fg);
}
#storytext h2 { font-size: 26px; }
#storytext h3 { font-size: 21px; }
#storytext a { color: var(--news-accent); text-decoration: underline; text-underline-offset: 2px; }
#storytext img, #storytext iframe, #storytext video { max-width: 100%; height: auto; border-radius: 8px; margin: 1.2em auto; }
#storytext blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--news-accent);
  font-style: italic;
  color: var(--news-fg-soft);
}
#storytext ul, #storytext ol { padding-left: 1.3em; margin: 0 0 1.35em; }
#storytext li { margin-bottom: .45em; }
#storytext table { width: 100%; border-collapse: collapse; font: 15px/1.5 var(--news-sans); margin: 1.5em 0; display: block; overflow-x: auto; }
#storytext th, #storytext td { border: 1px solid var(--news-line); padding: 8px 12px; text-align: left; }
#storytext th { background: var(--news-surface-alt); }

.article-disclosure {
  margin: 28px 0 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--news-muted);
  background: var(--news-surface-alt);
  border-radius: 8px;
}

.author-bio-card {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 40px 0;
  padding: 20px;
  background: var(--news-surface-alt);
  border-radius: var(--news-radius);
}
.author-bio-card img.author_image {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-bio-eyebrow { font: 700 11px var(--news-sans); letter-spacing: .08em; color: var(--news-muted); }
.author-bio-name { font: 700 18px/1.3 var(--news-serif); margin: 4px 0; }
.author-bio-name a:hover { color: var(--news-accent); }
.author-bio-date { font-size: 13px; color: var(--news-muted); }

.related-articles h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 800 13px/1 var(--news-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 8px 0 18px;
}
.related-articles h2::after { content: ""; flex: 1; height: 2px; background: var(--news-fg); }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.related-card a { display: flex; flex-direction: column; gap: 10px; }
.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: var(--news-surface-alt);
  transition: transform .35s ease;
}
.related-card a:hover img { transform: scale(1.02); }
.related-card-title { font: 600 16px/1.35 var(--news-serif); }
.related-card a:hover .related-card-title { color: var(--news-accent); }

.zergnetContainer { margin: 32px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .news-front { grid-template-columns: minmax(0, 1fr); }
  .news-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  .news-rail-block + .news-rail-block .news-section-title { margin-top: 0; }
  .article-layout.has-ad { grid-template-columns: minmax(0, 740px); }
  .article-aside { position: static; }
}
@media (max-width: 760px) {
  .news-wrap, .article-shell { padding: calc(16px + var(--news-top-offset)) 16px 40px; }
  .news-lead { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .news-card-summary { display: none; }
  .news-rail { grid-template-columns: minmax(0, 1fr); }
  #storytext { font-size: 18px; }
  .article-shell .story-subtitle { font-size: 18px; }
}
@media (max-width: 480px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .news-search button { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-thumb img, .related-card img { transition: none; }
}
