/* The homepage packages and category archives share the same story cards. */
:root {
  --news-focus: #72adee;
  --news-radius: 10px;
  --news-image-ratio: 16 / 9;
}

.news-section,
.news-archive {
  container-type: inline-size;
  min-width: 0;
}

.news-section,
.news-archive,
.news-card,
.article-page {
  --news-accent: var(--story-accent, #176aa8);
  --news-ink: color-mix(in srgb, var(--news-accent) 78%, var(--text));
}

body.dark :is(.news-section, .news-archive, .news-card, .article-page) {
  --news-ink: color-mix(in srgb, var(--news-accent) 46%, var(--text));
}

.editorial-home { gap: clamp(12px, 2.8vw, 18px); }

.news-section .editorial-heading {
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 2px;
  border: 0;
}

.news-section .editorial-heading :is(h1, h2),
.news-archive .archive-title-row .archive-title-with-icon > span:last-child {
  color: var(--news-ink, var(--text));
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.12;
  white-space: normal;
}

.news-section .section-icon {
  background: var(--news-accent);
  box-shadow: none;
}

.news-section .editorial-heading > a {
  padding: 8px 0;
  color: var(--news-ink, var(--brand-dark));
  font-size: 12px;
}

.news-section .editorial-heading > a:hover,
.story-byline a:hover { text-decoration: underline; text-underline-offset: 3px; }

.news-surface {
  display: grid;
  gap: clamp(8px, 1.5cqi, 16px);
  padding: clamp(8px, 1.7cqi, 18px);
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--news-accent) 24%, var(--line));
  border-radius: var(--news-radius);
  background: var(--brand-soft);
  background: color-mix(in srgb, var(--news-accent) 12%, var(--paper));
}

.editorial-home :is(.news-surface, .obituary-strip-section) { padding: 12px 8px 8px; }
.editorial-home .obituary-strip-section {
  border-radius: var(--news-radius);
  box-shadow: none;
}

body.dark .news-surface {
  background: color-mix(in srgb, var(--news-accent) 21%, var(--paper));
}

.news-section-grid,
.news-featured-supporting,
.news-archive-grid { grid-template-columns: minmax(0, 1fr); }

.news-section-grid,
.news-featured-supporting {
  display: grid;
  gap: inherit;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--news-radius);
  background: var(--paper);
  box-shadow: none;
  transition: border-color .22s ease;
}

.news-card-image {
  position: relative;
  flex: none;
  aspect-ratio: var(--news-image-ratio);
  overflow: hidden;
  background: var(--brand-soft);
}

.news-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.news-card-image img[src$="/suzivo-icon.png"] { object-fit: contain; padding: 10px; }

.news-card-title a::after { content: ""; position: absolute; inset: 0; }
.news-card-title a:focus-visible { outline: none; }
.news-card .story-byline a { position: relative; z-index: 1; }

.news-card:focus-within {
  border-color: var(--news-focus);
  outline: 2px solid var(--news-focus);
  outline-offset: 1px;
}

.news-card:focus-within .news-card-image img { transform: scale(1.035); }

@media (hover: hover) {
  .news-card:hover { border-color: var(--news-focus); }
  .news-card:hover .news-card-image img { transform: scale(1.035); }
}

.news-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: clamp(10px, 1.45cqi, 16px);
}

.story-byline,
.story-engagement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.story-byline { flex-wrap: nowrap; }
.story-byline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: inherit;
  row-gap: 3px;
  min-width: 0;
}
.story-byline > .suzivo-live-count {
  align-self: flex-start;
  margin-inline-start: auto;
  flex-shrink: 0;
  color: #a63232;
  font-weight: 700;
  white-space: nowrap;
}
body.dark .story-byline > .suzivo-live-count { color: #f9a1a1; }
.story-byline > .suzivo-live-count:not([data-live-active="true"]) { display: none; }
.story-byline > .suzivo-live-count::before {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin-inline-end: 4px;
  border-radius: 50%;
  vertical-align: .15em;
  background: currentColor;
}

.story-byline time,
.story-engagement { font-variant-numeric: tabular-nums; }
.story-byline time { white-space: nowrap; }
.story-byline a {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 8px;
  color: var(--news-ink, var(--brand-dark));
  font-weight: 700;
  overflow-wrap: anywhere;
}

.news-card-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(15px, 1.9cqi, 16px);
  font-weight: 800;
  line-height: 1.23;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card-featured .news-card-title {
  font-size: clamp(22px, 3.1cqi, 34px);
  line-height: 1.15;
}

.news-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.46;
}

.news-card-featured .news-card-excerpt { font-size: 15px; }
.news-featured-supporting .news-card-excerpt { -webkit-line-clamp: 2; }

.news-card .story-engagement {
  margin-top: auto;
  padding-top: 4px;
}

.story-engagement .view-count {
  gap: 4px;
  color: inherit;
  font-size: inherit;
}
.story-engagement .view-count svg { width: 14px; height: 14px; }

.story-engagement :is(.story-reaction, .article-comment-summary) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 8px;
  white-space: nowrap;
}

.story-reaction svg,
.article-comment-summary svg { width: 17px; height: 17px; }

.suzivo-face { display: block; width: 100%; height: 100%; }
.suzivo-face .reaction-face-disc { fill: currentColor; fill-opacity: .09; }
.suzivo-face-happy { color: #368869; }
.suzivo-face-neutral { color: #7385a1; }
.suzivo-face-surprised { color: #a77821; }
.suzivo-face-worried { color: #9d6a2a; }
.suzivo-face-sad { color: #467db6; }
.suzivo-face-angry { color: #bf6464; }
.reaction-tear { fill: var(--paper); }
body.dark .suzivo-face-happy { color: #6bb99c; }
body.dark .suzivo-face-neutral { color: #a0afc6; }
body.dark .suzivo-face-surprised { color: #ddbb73; }
body.dark .suzivo-face-worried { color: #d7ab77; }
body.dark .suzivo-face-sad { color: #82b0de; }
body.dark .suzivo-face-angry { color: #e49898; }

.news-archive .archive-title-row { margin-bottom: 12px; padding: 0; border: 0; }
.archive-title-row .archive-title-icon {
  border: 1px solid var(--line);
  border-radius: var(--news-radius);
  box-shadow: none;
}
.news-archive .archive-title-icon {
  color: var(--news-ink, var(--brand-dark));
  border-color: color-mix(in srgb, var(--news-accent) 30%, var(--line));
  background: color-mix(in srgb, var(--news-accent) 10%, var(--paper));
}

.news-archive .archive-top-pager {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 5px;
}

.news-archive .archive-top-pager :is(a, .is-disabled) {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 9px;
  box-shadow: none;
}

.news-archive .archive-pagination { flex-wrap: wrap; margin-bottom: 0; }

@container (min-width: 475px) {
  .news-section-grid,
  .news-featured-supporting,
  .news-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 635px) {
  .news-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container (min-width: 850px) {
  .news-section-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .news-featured-grid.has-supporting { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
  .news-featured-grid.has-supporting .news-card-featured .news-card-copy { justify-content: center; }
  .news-featured-grid.has-supporting .news-card-featured .story-engagement { margin-top: 0; }
  .news-featured-supporting .news-card-copy { gap: 5px; padding: 10px; }
  .news-featured-supporting .story-byline,
  .news-featured-supporting .story-engagement { font-size: 11px; }
  .news-featured-supporting .news-card-excerpt { font-size: 12px; }
  .news-featured-supporting .news-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 15px;
  }
}

@container (max-width: 474px) {
  .news-card:not(.news-card-featured, .news-card-compact) {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    align-items: center;
  }
  .news-card:not(.news-card-featured, .news-card-compact) .news-card-image {
    margin: 0px;
    border-radius: 0px;
  }
}

.editorial-home .obituary-strip-card,
.editorial-home .obituary-strip-card:hover {
  border-radius: var(--news-radius);
  box-shadow: none;
  transform: none;
  transition: border-color .22s ease;
}
.editorial-home .obituary-strip-card:is(:hover, :focus-visible) { border-color: var(--news-focus); }
.editorial-home .obituary-strip-thumb {
  height: auto;
  aspect-ratio: var(--news-image-ratio);
  align-self: center;
}
.editorial-home .obituary-strip-card .obituary-strip-thumb img { transition: transform .28s ease; }
.editorial-home .obituary-strip-card:is(:hover, :focus-visible) .obituary-strip-thumb img { transform: scale(1.035); }

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-card-image img,
  .editorial-home .obituary-strip-card,
  .editorial-home .obituary-strip-card .obituary-strip-thumb img { transition: none; }
  .news-card:is(:hover, :focus-within) .news-card-image img,
  .editorial-home .obituary-strip-card:is(:hover, :focus-visible) .obituary-strip-thumb img { transform: none; }
}

/* Static information pages keep their title and content on one surface. */
.content-page {
  --content-inset: clamp(13px, 3vw, 32px);
  padding: 0;
  border-radius: var(--news-radius);
  box-shadow: none;
}
.content-page .inner-featured-image { margin-top: 18px; border-radius: 0; }
.content-page .inner-post-content {
  padding: 18px var(--content-inset) 26px;
  overflow-wrap: anywhere;
}
.content-page .inner-post-content > :last-child { margin-bottom: 0; }

.category-right-rail { grid-template-columns: minmax(0, 1fr); }

.right-rail > .panel,
.home-stream > :is(.panel, .suzivo-comments-panel),
.news-archive > .panel,
.news-surface > .panel { border-radius: var(--news-radius); }

.right-rail .sidebar-story-panel h2.panel-title-with-icon {
  font-size: 16px;
  line-height: 1.2;
}
.right-rail .panel-mini-icon { box-shadow: none; }
.sidebar-story-panel .popular-card-list.active { gap: 6px; }

.category-tone-page { --story-accent: #536172; }
.news-card.news-card-compact {
  display: grid;
  grid-template-columns: minmax(62px, 42%) minmax(0, 1fr);
  align-items: center;
}
.news-card-compact .news-card-image {
  margin: 0px;
  border-radius: 0px;
}
.news-card-compact .news-card-copy { gap: 4px; padding: 4px 7px 2px 7px; }
.news-card-compact .news-card-title {
  display: -webkit-box;
  min-height: 2.5em;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.news-card-compact .story-byline,
.news-card-compact .story-engagement { font-size: 10px; line-height: 1.2; column-gap: 5px; }
.news-card-compact .story-byline-meta {
  container: story-category / inline-size;
  flex: 1 1 0;
}
.news-card-compact .story-byline a { font-weight: 600; }
.story-category-short { display: none; }
@container story-category (max-width: 160px) {
  .story-category-full { display: none; }
  .story-category-short { display: inline; }
}
.news-card-compact .story-engagement { padding-top: 0; }
.news-card-compact .story-reaction { padding-inline-start: 5px; }
.news-card-compact .story-engagement svg { width: 13px; height: 13px; }

.obituary-archive .obituary-grid { gap: inherit; }
.obituary-search-panel .obituary-search-form input:focus-visible {
  outline: 2px solid var(--news-focus);
  outline-offset: 1px;
}
.obituary-archive .obituary-preview-btn {
  height: 100%;
  padding: 12px;
  border: 1px solid #42464d;
  border-radius: var(--news-radius);
}
.obituary-archive .obituary-card:is(:hover, :focus-within) .obituary-preview-btn {
  border-color: var(--news-focus);
}
.obituary-archive .obituary-card .obituary-preview-btn { box-shadow: none; }
.obituary-archive .obituary-name {
  font-family: var(--sans);
  font-size: clamp(17px, 2.3cqi, 23px);
  font-weight: 750;
  line-height: 1.16;
}
.obituary-archive .obituary-image-wrap img { object-fit: contain; }

.archive-stream .archive-news-image img { aspect-ratio: var(--news-image-ratio); }

/* Tablet homepage: weather/services, then popular/live, in paired columns. */
@media (min-width: 761px) and (max-width: 1180px) {
  .right-rail.editorial-right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .right-rail.editorial-right-rail > .suzivo-live { grid-column: auto; }
}
@media (max-width: 1180px) {
  .editorial-home .obituary-strip > .obituary-strip-card:nth-child(n+5) { display: none; }
}
@media (max-width: 760px) {
  .right-rail.editorial-right-rail { grid-template-columns: minmax(0, 1fr); }
  .right-rail.editorial-right-rail > .suzivo-live { grid-column: auto; }

  /* All three footer link groups share one row, including narrow phones. */
  .site-footer { margin-top: 16px; padding: 20px 0 14px; }
  .site-footer .footer-inner { width: calc(100% - 28px); padding-top: 0; }
  .site-footer .footer-top { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 16px; }
  .site-footer .footer-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }
  .site-footer .footer-logo { gap: 6px; font-size: 22px; }
  .site-footer .footer-logo img { width: 30px; height: 30px; }
  .site-footer .footer-brand p { margin: 0; font-size: 12px; line-height: 1.4; }
  .site-footer .footer-signature { display: none; }
  .site-footer .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .site-footer .footer-col { gap: 7px; min-width: 0; }
  .site-footer .footer-col h3 { margin: 0 0 3px; font-size: 13px; line-height: 1.3; }
  .site-footer .footer-col a { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
  .site-footer .footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding-top: 12px;
  }
  .site-footer .footer-copy { grid-column: 1 / -1; font-size: 11px; line-height: 1.4; }
  .site-footer .footer-social { justify-content: flex-start; }
  .site-footer .footer-social-link { width: 32px; height: 32px; }
  .site-footer .footer-social-link img { width: 30px; height: 30px; }
  .site-footer .scroll-top-btn { padding: 8px 12px; font-size: 12px; }
}

@media (max-width: 760px) {
  .news-archive .popular-title-row { grid-template-columns: minmax(0, 1fr); }
  .news-card .news-card-excerpt { display: none; }
  .news-card .news-card-copy { gap: 4px; padding: 7px 8px; }
  .news-card .news-card-title {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .news-card-featured .news-card-copy { padding: 10px; }
  .news-card-featured .news-card-title { font-size: clamp(18px, 4.8vw, 22px); }
  .news-card .story-byline,
  .news-card .story-engagement {
    font-size: 10px;
    line-height: 1.2;
    column-gap: 4px;
    row-gap: 2px;
  }
  .news-card .story-engagement { margin-top: 0; padding-top: 0; }
  .news-card .story-engagement svg { width: 12px; height: 12px; }
  .news-card .story-engagement .view-count { white-space: nowrap; }
  .news-card .story-byline a,
  .news-card .story-reaction { padding-inline-start: 4px; }
}

/* Keep the date and category together in sidebars and popular listings. */
:is(.news-card-compact, .popular-archive-stream .news-card) .story-byline-meta {
  flex-wrap: nowrap;
  column-gap: 4px;
}

:is(.news-card-compact, .popular-archive-stream .news-card) .story-byline-meta time {
  flex: none;
}

:is(.news-card-compact, .popular-archive-stream .news-card) .story-byline-meta a {
  min-width: 0;
  overflow: hidden;
  padding-inline-start: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.news-featured-grid {
    padding: 0px !important;
    border: none;
    background: transparent;
}
