/* Hallmark · genre: modern-minimal · macrostructure: task-specific gateways · design-system: design.md · designed-as-app */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V5 */
body:is(.academic-index-page,.portal-news-page,.portal-tools-page,.coop-page-v4) {
  --fp-ink: #20283a;
  --fp-muted: #657086;
  --fp-rule: #dfe5f0;
  --fp-accent: #536ab6;
  --fp-accent-soft: #edf1fc;
  --fp-paper: #fff;
  --fp-canvas: #f7f8fc;
  --fp-shadow: rgb(31 51 91 / .08);
  --fp-rail: 1368px;
  --fp-gutter: 64px;
  --fp-ease: cubic-bezier(.16, 1, .3, 1);
}
html[data-theme="dark"] body:is(.academic-index-page,.portal-news-page,.portal-tools-page,.coop-page-v4) {
  --fp-ink: #eff3ff;
  --fp-muted: #b8c4da;
  --fp-rule: #4c5871;
  --fp-accent: #aebfff;
  --fp-accent-soft: #303d59;
  --fp-paper: #293348;
  --fp-canvas: #202839;
  --fp-shadow: rgb(0 0 0 / .18);
}

/* Academic discovery is a search workspace. Its global navigation is enough. */
html body.resources-v3.academic-index-page .site-header.site-header.site-header .site-scroll-progress {
  display: none !important;
}
body.resources-v3.academic-index-page :is(.ad-nebula-preview-actions,.ad-paper-actions) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.resources-v3.academic-index-page :is(.ad-nebula-preview-actions,.ad-paper-actions) > :is(a,button) {
  box-shadow: inset 0 0 0 1px var(--fp-rule);
}
body.resources-v3.academic-index-page .ad-index-desk {
  width: min(calc(100% - var(--fp-gutter)), var(--fp-rail));
  max-width: none;
  margin: 0 auto;
  padding-top: 16px;
  gap: 20px 22px;
}
body.resources-v3.academic-index-page .ad-index-heading {
  min-height: 202px;
  border: 1px solid var(--fp-rule);
  border-radius: 14px;
  background-color: var(--fp-accent-soft);
}
body.resources-v3.academic-index-page .ad-index-heading-copy {
  padding-left: 0;
}
body.resources-v3.academic-index-page .ad-index-heading h1 {
  color: var(--fp-ink);
  letter-spacing: -.045em;
}
body.resources-v3.academic-index-page .ad-index-heading-copy > p:not(.ad-index-eyebrow) {
  color: var(--fp-muted);
}
body.resources-v3.academic-index-page .ad-index-sidebar {
  position: static;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--fp-rule);
  border-radius: 14px;
  box-shadow: 0 14px 36px var(--fp-shadow);
  backdrop-filter: none;
}
body.resources-v3.academic-index-page .ad-index-search-fields {
  align-items: center;
  min-height: 40px;
  padding: 3px 0 0;
}
body.resources-v3.academic-index-page .ad-index-search-fields button {
  color: var(--fp-muted);
  transition: color 180ms var(--fp-ease), background-color 180ms var(--fp-ease);
}
body.resources-v3.academic-index-page .ad-index-search-fields button:is(:hover,:focus-visible) {
  color: var(--fp-accent);
  background: var(--fp-accent-soft);
}
body.resources-v3.academic-index-page .ad-literature-tools > label {
  border-color: var(--fp-rule);
  border-radius: 10px;
}
body.resources-v3.academic-index-page .ad-literature-head {
  border-bottom-color: var(--fp-rule);
}
body.resources-v3.academic-index-page .ad-paper-source-state {
  display: flex !important;
  justify-content: flex-end;
  margin: 2px 0 8px;
}
body.resources-v3.academic-index-page .ad-paper-source-state .ad-source-disclosure {
  width: auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.resources-v3.academic-index-page .ad-source-disclosure > summary {
  min-height: 26px;
  padding: 3px 0;
  color: var(--fp-muted);
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}
body.resources-v3.academic-index-page .ad-source-disclosure > summary:hover { color: var(--fp-accent); }
body.resources-v3.academic-index-page .ad-source-disclosure-body {
  max-width: 740px;
  padding: 13px 0 16px;
  color: var(--fp-muted);
  font-size: 12px;
  line-height: 1.7;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-index-sidebar,
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-literature-tools > label.ad-select-field,
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-nebula-labels button {
  color: var(--fp-ink);
  border-color: var(--fp-rule);
  background: var(--fp-paper);
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-nebula-labels button:is(:hover,:focus-visible) {
  background: var(--fp-accent-soft);
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-paper-record {
  color: var(--fp-ink);
  border-color: var(--fp-rule);
  background: var(--fp-paper) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-paper-record .ad-feature-paper-heading {
  background: var(--fp-paper) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-flow-feature .ad-feature-paper-heading {
  color: var(--fp-ink);
  background: var(--fp-paper) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-flow-feature .ad-feature-paper-heading :is(.ad-feature-paper-title,.ad-scientific-text,h2,h3) {
  color: var(--fp-ink) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-flow-feature .ad-feature-paper-heading :is(.ad-feature-paper-meta,.ad-feature-institutions,p) {
  color: var(--fp-muted) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-paper-record :is(.ad-feature-paper-title,.ad-scientific-text,h2,h3) {
  color: var(--fp-ink) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-paper-record :is(.ad-feature-paper-meta,.ad-feature-institutions,p) {
  color: var(--fp-muted) !important;
}
html[data-theme="dark"] body.resources-v3.academic-index-page .ad-paper-record a {
  color: var(--fp-accent);
}
html[data-theme="dark"] body.resources-v3.academic-index-page :is(.ad-nebula-preview-actions,.ad-paper-actions) > :is(a,button) {
  color: var(--fp-ink) !important;
  background: #35415a !important;
  box-shadow: inset 0 0 0 1px var(--fp-rule);
}

/* News keeps its editorial cover, but every element meets the same rail. */
body.site-upgrade.portal-news-page .hemu-portal-masthead.is-news,
html[data-theme="light"] body.site-upgrade.portal-news-page .hemu-portal-masthead.is-news {
  padding-inline: max(calc(var(--fp-gutter) / 2), calc((100vw - var(--fp-rail)) / 2));
  gap: clamp(32px, 4vw, 72px);
}
body.site-upgrade.portal-news-page .masthead-grid {
  width: 100%;
  max-width: none;
}
/* The shared late-loaded width sheet subtracts a second gutter inside this grid. */
html body.site-upgrade.portal-news-page main.hemu-portal-main > .hemu-portal-masthead.is-news .masthead-grid {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}
body.site-upgrade.portal-news-page .journal-hero-image {
  height: 276px;
  border-radius: 14px;
  box-shadow: 0 20px 52px var(--fp-shadow);
}
html body.site-upgrade.portal-news-page .hemu-portal-main .masthead-title h1 {
  color: var(--fp-ink);
  font-size: clamp(42px, 4vw, 62px);
  letter-spacing: -.055em;
}
body.site-upgrade.portal-news-page .masthead-intro { color: var(--fp-muted); }
body.site-upgrade.portal-news-page .portal-content { padding-top: 18px; }
body.site-upgrade.portal-news-page .news-channel-nav {
  gap: 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--fp-rule);
  border-bottom: 1px solid var(--fp-rule);
}
body.site-upgrade.portal-news-page .news-channel-nav > a {
  min-height: 88px;
  padding: 17px 20px !important;
  border: 0;
  border-right: 1px solid var(--fp-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 220ms var(--fp-ease), transform 320ms var(--fp-ease);
}
body.site-upgrade.portal-news-page .news-channel-nav > a:first-child { padding-left: 0 !important; }
body.site-upgrade.portal-news-page .news-channel-nav > a:last-child { border-right: 0; }
body.site-upgrade.portal-news-page .news-channel-nav > a:is(:hover,:focus-visible) {
  background: var(--fp-accent-soft);
  transform: translateY(-2px);
}
body.site-upgrade.portal-news-page .journal-channel-name strong { color: var(--fp-ink); }
html[data-theme="dark"] body.site-upgrade.portal-news-page .news-channel-nav > a {
  color: var(--fp-ink);
  border-color: var(--fp-rule);
  background: transparent;
  box-shadow: none;
}
html[data-theme="dark"] body.site-upgrade.portal-news-page .news-channel-nav > a:is(:hover,:focus-visible) {
  background: var(--fp-accent-soft);
}

/* The tool stage already works; align it rather than replacing its behaviour. */
body.site-upgrade.portal-tools-page .tools-feature {
  width: min(calc(100% - var(--fp-gutter)), var(--fp-rail));
  max-width: none;
  margin-inline: auto;
}

/* The cooperation image may bleed, but its copy and following section share a line. */
body.site-upgrade.coop-page-v4 .coop-hero {
  min-height: 580px;
}
body.site-upgrade.coop-page-v4 .coop-hero-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: max(calc(var(--fp-gutter) / 2), calc((100vw - var(--fp-rail)) / 2));
  padding-right: clamp(28px, 4vw, 72px);
}
html body.site-upgrade.coop-page-v4 main.coop-main > .coop-hero .coop-hero-content.sp-shell {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}
body.site-upgrade.coop-page-v4 .coop-hero-image { min-height: 580px; }
body.site-upgrade.coop-page-v4 .coop-hero-image img {
  filter: saturate(.83) contrast(.98);
  transition: transform 950ms var(--fp-ease), filter 950ms var(--fp-ease);
}
body.site-upgrade.coop-page-v4 .coop-hero:hover .coop-hero-image img {
  filter: saturate(.92) contrast(1);
  transform: scale(1.025);
}
body.site-upgrade.coop-page-v4 .coop-hero-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 3px;
  border-top: 1px solid var(--fp-rule);
}
body.site-upgrade.coop-page-v4 .coop-hero-paths > p {
  grid-column: 1 / -1;
  padding-top: 12px;
}
body.site-upgrade.coop-page-v4 .coop-hero-paths a {
  min-height: 66px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--fp-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.site-upgrade.coop-page-v4 .coop-hero-paths a:first-of-type { padding-left: 0; }
body.site-upgrade.coop-page-v4 .coop-hero-paths a:last-child { border-right: 0; }
body.site-upgrade.coop-page-v4 .coop-hero-paths a:is(:hover,:focus-visible) {
  padding: 8px 12px;
  color: var(--fp-accent);
  background: var(--fp-accent-soft);
  box-shadow: none;
}
body.site-upgrade.coop-page-v4 .coop-section-intro { padding-top: 0; }
body.site-upgrade.coop-page-v4 .coop-services { padding-top: 60px; }
body.site-upgrade.coop-page-v4 .coop-section-nav > .sp-shell,
body.site-upgrade.coop-page-v4 .coop-section > .sp-shell {
  width: min(calc(100% - var(--fp-gutter)), var(--fp-rail));
}

@media (max-width: 1080px) {
  body:is(.academic-index-page,.portal-news-page,.portal-tools-page,.coop-page-v4) { --fp-gutter: 36px; }
  body.site-upgrade.coop-page-v4 .coop-hero-paths { display: none; }
}
@media (max-width: 900px) {
  body.site-upgrade.portal-news-page .news-channel-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.site-upgrade.portal-news-page .news-channel-nav > a:nth-child(2) { border-right: 0; }
  body.site-upgrade.portal-news-page .news-channel-nav > a:nth-child(-n+2) { border-bottom: 1px solid var(--fp-rule); }
  body.site-upgrade.portal-news-page .news-channel-nav > a:first-child { padding-left: 16px !important; }
}
@media (max-width: 760px) {
  body:is(.academic-index-page,.portal-news-page,.portal-tools-page,.coop-page-v4) { --fp-gutter: 28px; }
  body.resources-v3.academic-index-page .ad-index-desk { padding-top: 12px; }
  body.resources-v3.academic-index-page .ad-index-heading { min-height: 0; }
  body.resources-v3.academic-index-page .ad-paper-source-state { justify-content: flex-start; }
  body.site-upgrade.portal-news-page .hemu-portal-masthead.is-news,
  html[data-theme="light"] body.site-upgrade.portal-news-page .hemu-portal-masthead.is-news {
    padding: 36px 14px 28px;
  }
  body.site-upgrade.portal-news-page .journal-hero-image { height: 220px; }
  body.site-upgrade.portal-tools-page .tools-feature { width: calc(100% - var(--fp-gutter)); }
  body.site-upgrade.coop-page-v4 .coop-hero { min-height: 0; }
  body.site-upgrade.coop-page-v4 .coop-hero-content { padding: 48px 14px 40px; }
  body.site-upgrade.coop-page-v4 .coop-hero-image { min-height: 0; }
  body.site-upgrade.coop-page-v4 .coop-services { padding-top: 44px; }
}
@media (max-width: 520px) {
  body.resources-v3.academic-index-page .ad-mode-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
  }
  body.resources-v3.academic-index-page .ad-mode-tabs button {
    min-width: 0;
    padding-inline: 2px;
    font-size: 11px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.academic-index-page,.portal-news-page,.portal-tools-page,.coop-page-v4) :is(.news-channel-nav > a,.coop-hero-image img,.coop-hero-paths a) {
    animation: none !important;
    transition-duration: 100ms !important;
    transform: none !important;
  }
}
