/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4
   Component: academic gateway masthead · theme: existing public-page identity.
   Primary reference: Mubu Explore's category-led content entrance.
   A two-line research headline keeps the introduction and in-page guide together.
   The original four photographic route entrances remain at the bottom. */
body.portal-news-page {
  --news-masthead-gutter: max(calc(var(--fp-gutter, 64px) / 2), calc((100vw - 1368px) / 2));
  --news-guide-ease: cubic-bezier(.25, .1, .25, 1);
  background: var(--pi-canvas) !important;
}
html:has(body.portal-news-page), body.portal-news-page { overflow-x: clip; }
body.portal-news-page #main { background: var(--pi-canvas) !important; }

body.portal-news-page #main .news-masthead {
  display: block;
  padding: var(--gw-opening-space, 64px) var(--news-masthead-gutter) 28px;
  border-bottom: 0 !important;
  background: var(--pi-canvas) !important;
  color: var(--pi-ink);
}
body.portal-news-page #main .news-masthead::before,
body.portal-news-page #main .news-masthead::after { display: none; }

body.portal-news-page #main .news-masthead .masthead-grid {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  text-align: center;
}
body.portal-news-page #main .news-masthead .masthead-title {
  width: 100%;
  max-width: none;
  min-width: 0;
  text-align: center;
}
body.portal-news-page #main .news-masthead .masthead-summary {
  min-width: 0;
  max-width: 42em;
  margin: 18px auto 0;
  padding: 0;
}
body.portal-news-page #main .news-masthead .portal-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font: 600 12px/1.5 var(--font);
  letter-spacing: .14em;
  color: var(--pi-accent-strong) !important;
}
body.portal-news-page #main .news-masthead .portal-kicker strong {
  font: inherit;
  letter-spacing: .08em;
}
body.portal-news-page #main .news-masthead .portal-kicker > span {
  padding-left: 14px;
  border-left: 1px solid var(--pi-line);
  color: var(--pi-muted);
  letter-spacing: .08em;
}
body.portal-news-page #main .news-masthead h1 {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 12px 0 0;
  font-family: var(--font) !important;
  font-size: clamp(44px, 4.4vw, 58px);
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: -.035em !important;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--pi-ink) !important;
}
body.portal-news-page #main .news-masthead .news-title-line {
  display: block;
  min-width: 0;
  color: var(--pi-ink) !important;
}
body.portal-news-page #main .news-masthead .news-title-line.is-accent {
  margin-top: 6px;
  color: var(--pi-accent-strong) !important;
}
body.portal-news-page.pi-start #main .news-masthead .news-title-line {
  transform: translateY(10px);
}
body.portal-news-page.pi-entered #main .news-masthead .news-title-line {
  animation: news-title-arrive 620ms var(--pi-ease) both;
}
body.portal-news-page.pi-entered #main .news-masthead .news-title-line.is-accent {
  animation-delay: 80ms;
}
@keyframes news-title-arrive {
  from { transform: translateY(10px); }
  to { transform: none; }
}
body.portal-news-page #main .news-masthead .masthead-intro {
  width: 100%;
  max-width: none;
  margin: 0;
  font: 400 16px/1.8 var(--font);
  text-align: center;
  text-wrap: balance;
  color: var(--pi-muted) !important;
}
body.portal-news-page #main .news-masthead .masthead-intro > span {
  display: block;
  white-space: normal;
}
body.portal-news-page #main .portal-content { padding-top: 0 !important; }
body.portal-news-page #main .news-channel-guide {
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
  padding: 0;
}
body.portal-news-page #main .news-page-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  font: 600 16px/1.5 var(--font);
  white-space: nowrap;
  color: var(--pi-accent) !important;
  text-decoration: none;
  transition: color 250ms var(--news-guide-ease);
}
body.portal-news-page #main .news-page-jump > span:not(.news-jump-arrow) {
  display: inline-block;
  padding: 2px;
  border-radius: 3px;
  transition: transform 250ms var(--news-guide-ease);
}
body.portal-news-page #main .news-jump-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 250ms var(--news-guide-ease);
}
body.portal-news-page #main .news-jump-arrow::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  mask: url("./icons/lucide/arrow-down.svg") center / contain no-repeat;
  animation: news-guide-nudge 2.8s var(--pi-ease) infinite;
}
@keyframes news-guide-nudge {
  0%, 16%, 72%, 100% { transform: translateY(0); }
  44% { transform: translateY(4px); }
}
/* HemuMate's centered guide expands its 8px gap to 13px in 250ms.
   Move each side by 2.5px to reproduce that motion without reflow. */
body.portal-news-page #main .news-page-jump:is(:hover, :focus-visible) { color: var(--pi-accent-strong) !important; text-decoration: none; }
body.portal-news-page #main .news-page-jump:hover > span:not(.news-jump-arrow) { transform: translateX(-2.5px); }
body.portal-news-page #main .news-page-jump:hover .news-jump-arrow { transform: translateX(2.5px); }
body.portal-news-page #main .news-page-jump:focus-visible { outline: none !important; }
body.portal-news-page #main .news-page-jump:focus-visible > span:not(.news-jump-arrow) { box-shadow: 0 0 0 3px var(--pi-focus); }
body.portal-news-page #main .news-page-jump:active > span:not(.news-jump-arrow) { transform: none; }
body.portal-news-page #main .news-page-jump:active .news-jump-arrow { transform: none; }

body.portal-news-page #main .news-channel-directory { margin: 48px 0; }
body.portal-news-page #main .news-channel-directory .journal-section-head { margin-bottom: 24px; }
body.portal-news-page #main .news-channel-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body.portal-news-page #main .news-channel-nav > a {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pi-ink);
  text-decoration: none;
  transform: none !important;
}
body.portal-news-page #main .news-channel-nav > a::after { display: none; }
body.portal-news-page #main .news-channel-media {
  display: block;
  min-width: 0;
  height: clamp(144px, 12vw, 170px);
  overflow: clip;
  border: 1px solid var(--pi-line);
  border-radius: 10px;
  transition: border-color 220ms var(--pi-ease);
}
body.portal-news-page #main .news-channel-media > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center 54%;
  transition: transform 650ms var(--pi-ease);
}
body.portal-news-page #main .news-channel-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 16px 0 0;
}
body.portal-news-page #main .journal-channel-name { display: grid; min-width: 0; gap: 6px; }
body.portal-news-page #main .journal-channel-name strong {
  font: 650 20px/1.4 var(--font);
  letter-spacing: -.015em;
  white-space: nowrap;
  color: var(--pi-ink) !important;
  transition: color 180ms var(--pi-ease);
}
body.portal-news-page #main .journal-channel-name small { font: 400 12px/1.5 var(--font); letter-spacing: 0; color: var(--pi-muted) !important; }
body.portal-news-page #main .news-channel-end { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
body.portal-news-page #main .journal-channel-count {
  min-width: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: 500 12px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--pi-muted) !important;
}
body.portal-news-page #main .news-channel-stat { display: flex; align-items: baseline; color: var(--pi-muted); }
body.portal-news-page #main .news-channel-stat small { font: 400 11px/1.5 var(--font); color: inherit; }
body.portal-news-page #main .journal-channel-arrow { width: 17px; height: 17px; opacity: .6; }
body.portal-news-page #main .news-channel-nav > a:is(:hover, :focus-visible) .news-channel-media { border-color: var(--pi-accent); }
body.portal-news-page #main .news-channel-nav > a:focus-visible .news-channel-media { box-shadow: 0 0 0 3px var(--pi-focus); }
body.portal-news-page #main .news-channel-nav > a:is(:hover, :focus-visible) .journal-channel-name strong { color: var(--pi-accent-strong) !important; }
body.portal-news-page #main .news-channel-nav > a:hover .news-channel-media > img { transform: scale(1.035); }
body.portal-news-page #main .news-channel-nav > a:focus-visible { outline: none !important; }
body.portal-news-page #main .news-channel-nav > a:active .news-channel-media > img { transform: scale(1.015); }

/* The first reading surfaces continue the same palette in either theme. */
body.portal-news-page #main :is(.news-lead-feature, .news-weekly-card) {
  border-color: var(--pi-line) !important;
  border-radius: 16px;
  background: var(--pi-surface) !important;
}
body.portal-news-page #main .news-weekly-card { border-top-color: var(--pi-accent) !important; }
body.portal-news-page #main .news-lead-copy { background: var(--pi-surface) !important; }
body.portal-news-page #main .news-lead-copy h2 { color: var(--pi-accent-strong) !important; }
body.portal-news-page #main .news-lead-copy [data-nh-focus-title] {
  color: var(--pi-accent-strong) !important;
  -webkit-text-fill-color: var(--pi-accent-strong) !important;
  background-image: none !important;
}
body.portal-news-page #main .news-lead-copy > p:not(.portal-accent-label),
body.portal-news-page #main .news-lead-copy footer { color: var(--pi-muted) !important; }
body.portal-news-page #main .news-lead-copy footer,
body.portal-news-page #main .news-feed-header { border-color: var(--pi-line) !important; }
body.portal-news-page #main .news-feed-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.portal-news-page #main .news-feed-header h2 { margin: 0; color: var(--pi-ink) !important; }
body.portal-news-page #main .news-update-meta { font: 400 11px/1.5 var(--font); white-space: nowrap; color: var(--pi-muted) !important; }
body.portal-news-page #main .journal-read-action { color: var(--pi-accent-strong) !important; background: var(--pi-surface-soft) !important; }
html[data-theme="dark"] body.portal-news-page #main .journal-read-action img { filter: brightness(0) invert(1); opacity: .8; }
body.portal-news-page #main .news-weekly-card .news-snapshot-list > a strong { color: var(--pi-accent-strong) !important; }

@media (max-width: 900px) {
  body.portal-news-page { --news-masthead-gutter: 18px; }
  body.portal-news-page #main .news-masthead { padding-top: 42px !important; padding-bottom: 28px; }
  body.portal-news-page #main .news-channel-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  body.portal-news-page #main .news-channel-media { height: clamp(124px, 21vw, 168px); }
}
@media (max-width: 520px) {
  body.portal-news-page { --news-masthead-gutter: 14px; }
  body.portal-news-page #main .news-masthead { padding-top: 38px !important; padding-bottom: 24px; }
  body.portal-news-page #main .news-masthead .portal-kicker { font-size: 11px; }
  body.portal-news-page #main .news-masthead h1 { margin-top: 10px; font-size: clamp(29px, 8.4vw, 38px); line-height: 1.28; }
  body.portal-news-page #main .news-masthead .news-title-line.is-accent { margin-top: 4px; }
  body.portal-news-page #main .news-masthead .masthead-intro { max-width: none; font-size: 15px; }
  body.portal-news-page #main .news-masthead .masthead-summary { margin-top: 12px; }
  body.portal-news-page #main .news-page-jump { font-size: 15px; }
  body.portal-news-page #main .news-channel-directory { margin: 36px 0; }
  body.portal-news-page #main .news-channel-directory .journal-section-head { margin-bottom: 20px; }
  body.portal-news-page #main .news-channel-nav { gap: 22px 14px; }
  body.portal-news-page #main .news-channel-media { height: clamp(100px, 30vw, 124px); border-radius: 8px; }
  body.portal-news-page #main .news-channel-body { padding-top: 10px; gap: 6px; }
  body.portal-news-page #main .journal-channel-name strong { font-size: 16px; line-height: 1.45; }
  body.portal-news-page #main .journal-channel-name small { display: none; }
  body.portal-news-page #main .news-channel-end { gap: 0; }
  body.portal-news-page #main .journal-channel-count { font-size: 11px; min-width: 18px; }
  body.portal-news-page #main .journal-channel-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.portal-news-page.pi-start #main .news-masthead .news-title-line,
  body.portal-news-page.pi-entered #main .news-masthead .news-title-line,
  body.portal-news-page #main .news-page-jump,
  body.portal-news-page #main .news-page-jump > span:not(.news-jump-arrow),
  body.portal-news-page #main .news-jump-arrow,
  body.portal-news-page #main .news-jump-arrow::before,
  body.portal-news-page #main .news-channel-media,
  body.portal-news-page #main .news-channel-media > img { animation: none; transition: none; transform: none !important; }
}
