/* Resource and tool overviews follow the approved news-page editorial system.
   Content semantics stay page-specific: resources show provenance and updates;
   tools show capability and availability, never publication timestamps. */

:is(.portal-resources-page, .portal-tools-page) {
  --rt-interaction-blue: #0b5f9e;
}

:is(.portal-resources-page, .portal-tools-page) ::selection {
  color: #fff;
  background: color-mix(in srgb, var(--rt-interaction-blue) 82%, #fff);
}

:is(.portal-resources-page, .portal-tools-page) .hemu-portal-main {
  background: #f2f3f1;
}

:is(.portal-resources-page, .portal-tools-page) .hemu-portal-masthead {
  min-height: 188px;
  background: var(--portal-paper);
}

:is(.portal-resources-page, .portal-tools-page) .masthead-grid {
  min-height: 188px;
  padding-block: 28px 26px;
}

/* Tools used to own a two-row masthead. It now uses the same horizontal
   title / summary / update alignment as news and resources. */
.portal-tools-page .hemu-portal-masthead.is-tools .masthead-grid {
  grid-template-columns: minmax(330px, .92fr) minmax(430px, 1.18fr) minmax(210px, .58fr);
  grid-template-rows: none;
  gap: clamp(24px, 4vw, 66px);
}

.portal-tools-page .hemu-portal-masthead.is-tools .masthead-title {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.portal-tools-page .hemu-portal-masthead.is-tools .masthead-intro {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 36px 0 0;
}

.portal-tools-page .hemu-portal-masthead.is-tools .masthead-date {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  margin: 0 0 4px;
}

html body:is(.portal-resources-page, .portal-tools-page) .hemu-portal-main .masthead-title h1 {
  color: var(--portal-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif !important;
  font-size: clamp(38px, 3.6vw, 50px);
  font-weight: 690;
  letter-spacing: 0 !important;
  line-height: 1.12;
  text-align: left;
}

:is(.portal-resources-page, .portal-tools-page) .portal-content.hemu-portal-shell {
  width: min(calc(100% - 64px), 1368px);
  padding-block: 36px 54px;
}

:is(.portal-resources-page, .portal-tools-page) :where(
  .portal-section-title,
  .rt-lead-copy h2,
  .rt-channel-section-head h2,
  .rt-channel-entry strong,
  .portal-update-row strong,
  .tools-quick-list strong
) {
  font-family: var(--font) !important;
  text-align: left;
}

/* Shared focus area ------------------------------------------------------- */

:is(.portal-resources-page, .portal-tools-page) .rt-focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.88fr) minmax(430px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding-bottom: 24px;
  border-bottom: 0;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature,
:is(.portal-resources-page, .portal-tools-page) .rt-side-panel {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--portal-line) 88%, #fff);
  border-radius: 2px;
  background: var(--portal-surface);
  box-shadow: 0 8px 24px rgba(27, 43, 35, .045);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(330px, .95fr) minmax(420px, 1.2fr);
  color: inherit;
  text-decoration: none;
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms var(--ease-out);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:hover,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-within {
  border-color: color-mix(in srgb, var(--portal-green) 35%, var(--portal-line));
  box-shadow: 0 15px 34px rgba(27, 43, 35, .09);
  transform: translateY(-2px);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-media,
:is(.portal-resources-page, .portal-tools-page) .resource-lead-image,
:is(.portal-resources-page, .portal-tools-page) .tools-workbench-preview {
  display: block;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #d9dfd7;
  box-shadow: none;
}

.portal-resources-page .resource-lead-image::after { display: none; }

:is(.portal-resources-page, .portal-tools-page) :is(.resource-lead-image, .tools-workbench-preview) > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 360ms ease, transform 620ms var(--ease-out);
}

.portal-tools-page .rt-lead-media,
.portal-tools-page .tools-workbench-preview { height: 100%; }

.portal-tools-page .tools-workbench-preview {
  display: flex;
  width: 100%;
  min-height: 0;
  flex-direction: column;
  aspect-ratio: auto;
  background:
    linear-gradient(rgba(90, 193, 168, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 193, 168, .07) 1px, transparent 1px),
    #112229;
  background-size: 28px 28px;
}

.portal-tools-page .tools-workbench-preview > img {
  flex: 0 0 auto;
  height: auto;
  aspect-ratio: 89 / 42;
  object-fit: cover;
  object-position: center;
}

.portal-tools-page .tools-workbench-preview-foot {
  display: flex;
  min-height: 128px;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 2.2vw, 34px);
  border-top: 1px solid rgba(150, 219, 202, .18);
  color: #e8f3ef;
  background: linear-gradient(145deg, rgba(26, 56, 64, .92), rgba(12, 29, 36, .98));
}

.portal-tools-page .tools-workbench-preview-foot small {
  color: #70c9b3;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .18em;
}

.portal-tools-page .tools-workbench-preview-foot strong {
  margin-top: 10px;
  font-size: clamp(18px, 1.65vw, 24px);
  font-weight: 650;
  letter-spacing: .01em;
}

.portal-tools-page .tools-workbench-preview-foot > span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.portal-tools-page .tools-workbench-preview-foot i {
  padding: 7px 10px;
  border: 1px solid rgba(162, 220, 205, .22);
  border-radius: 2px;
  color: #bcd8d1;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:hover :is(.resource-lead-image, .tools-workbench-preview) > img,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-within :is(.resource-lead-image, .tools-workbench-preview) > img {
  filter: saturate(1.05) contrast(1.015);
  transform: scale(1.025);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-copy {
  display: flex;
  min-width: 0;
  min-height: 355px;
  flex-direction: column;
  padding: 27px 29px 23px;
  border-left: 1px solid var(--portal-line);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-copy h2 {
  margin: 15px 0 14px;
  color: var(--portal-green);
  font-size: clamp(28px, 2.05vw, 31px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.48;
  transition: color 190ms ease;
}

:is(.portal-resources-page, .portal-tools-page) .portal-accent-label {
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1.65;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-copy > p:not(.portal-accent-label) {
  margin: 0;
  color: var(--portal-text);
  font-size: 14px;
  line-height: 1.78;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:hover .rt-lead-copy h2,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-visible .rt-lead-copy h2,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-within .rt-lead-copy h2 {
  color: var(--rt-interaction-blue);
}

.portal-resources-page .rt-lead-copy dl {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--portal-line);
}

.portal-resources-page .rt-lead-copy dl div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  font-size: 11.5px;
  line-height: 1.5;
}

.portal-resources-page .rt-lead-copy dt { color: var(--portal-muted); }
.portal-resources-page .rt-lead-copy dd { margin: 0; color: var(--portal-text); }

.rt-capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.rt-capability-list li {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--portal-green) 17%, var(--portal-line));
  border-radius: 2px;
  color: var(--portal-text);
  background: color-mix(in srgb, var(--portal-green-soft) 48%, transparent);
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.45;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-action {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
  margin-top: auto;
  padding-top: 18px;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 700;
  transition: color 190ms ease;
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-action img {
  width: 16px;
  height: 16px;
  transition: transform 210ms var(--ease-out);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:hover .rt-lead-action,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-visible .rt-lead-action {
  color: var(--rt-interaction-blue);
}

:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:hover .rt-lead-action img,
:is(.portal-resources-page, .portal-tools-page) .rt-lead-feature:focus-visible .rt-lead-action img {
  transform: translateX(4px);
}

:is(.portal-resources-page, .portal-tools-page) .rt-side-panel {
  min-width: 0;
  padding: 23px 21px 17px;
  border-left: 1px solid color-mix(in srgb, var(--portal-line) 88%, #fff);
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms var(--ease-out);
}

:is(.portal-resources-page, .portal-tools-page) .rt-side-panel:hover,
:is(.portal-resources-page, .portal-tools-page) .rt-side-panel:focus-within {
  border-color: color-mix(in srgb, var(--portal-green) 35%, var(--portal-line));
  box-shadow: 0 15px 34px rgba(27, 43, 35, .09);
  transform: translateY(-2px);
}

:is(.portal-resources-page, .portal-tools-page) .portal-section-title {
  font-size: 21px;
  font-weight: 760;
}

:is(.portal-resources-page, .portal-tools-page) .portal-section-title > i {
  height: 22px;
}

/* Resource update rail ---------------------------------------------------- */

.portal-resources-page .resource-updates {
  padding: 23px 21px 17px;
  border-top: 1px solid color-mix(in srgb, var(--portal-line) 88%, #fff);
}

.portal-resources-page .resource-updates .portal-update-list { margin-top: 10px; }

.portal-resources-page .resource-updates .portal-update-row {
  grid-template-columns: minmax(0, 1fr) minmax(72px, max-content);
  grid-template-rows: auto auto;
  min-height: 61px;
  column-gap: 14px;
  row-gap: 5px;
  align-items: start;
  padding: 10px 0;
}

.portal-resources-page .resource-updates .portal-update-row > span {
  grid-column: 1;
  grid-row: 1 / 3;
}

.portal-resources-page .resource-updates .portal-update-row > em {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.portal-resources-page .resource-updates .portal-update-row > time {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  padding-top: 0;
}

.portal-resources-page .resource-updates .portal-update-row:not(:has(> em)) > time {
  grid-row: 1 / 3;
  align-self: center;
}

.portal-resources-page .resource-updates .portal-update-row.is-latest {
  margin-inline: -9px;
  padding-inline: 9px;
  border-left: 2px solid var(--portal-rust);
  background: color-mix(in srgb, var(--portal-rust-soft) 42%, transparent);
}

.portal-resources-page .resource-updates .portal-update-row.is-latest::before { display: none; }

.portal-resources-page .resource-updates .portal-update-row.is-latest strong { color: var(--portal-rust); }

.portal-resources-page .resource-updates .portal-update-row strong {
  font-size: 15px;
  font-weight: 670;
  line-height: 1.42;
}

.portal-resources-page .resource-updates .portal-update-row small {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
}

.portal-resources-page .resource-updates .portal-update-row time {
  font-size: 11px;
}

.portal-resources-page .resource-updates .portal-update-row > em {
  min-width: 31px;
  padding: 3px 6px;
  font-size: 9px;
  text-align: center;
}

.portal-resources-page .resource-updates .portal-update-row:hover,
.portal-resources-page .resource-updates .portal-update-row:focus-visible {
  margin-inline: -9px;
  padding-inline: 9px;
}

:is(.portal-resources-page, .portal-tools-page) :where(
  .portal-update-row:hover strong,
  .portal-update-row:focus-visible strong,
  .tools-quick-list > a:hover strong,
  .tools-quick-list > a:focus-visible strong,
  .portal-text-link:hover,
  .portal-text-link:focus-visible
) {
  color: var(--rt-interaction-blue) !important;
}

/* Tool quick rail --------------------------------------------------------- */

.portal-tools-page .tools-quick-panel { padding: 23px 21px 17px; }
.portal-tools-page .tools-quick-panel > .portal-section-title { min-height: 30px; }

.portal-tools-page .tools-quick-list {
  margin-top: 10px;
  border: 0;
}

.portal-tools-page .tools-quick-list > a {
  grid-template-columns: 26px minmax(0, 1fr) auto 14px;
  min-height: 61px;
  padding: 9px 0;
}

.portal-tools-page .tools-quick-list > a:hover,
.portal-tools-page .tools-quick-list > a:focus-visible {
  margin-inline: -9px;
  padding-inline: 9px;
}

.portal-tools-page .tools-quick-list > a > img { width: 20px; height: 20px; }
.portal-tools-page .tools-quick-list strong {
  font-size: 15px;
  font-weight: 670;
  line-height: 1.42;
}

.portal-tools-page .tools-quick-list small {
  font-size: 12.5px;
  line-height: 1.45;
}

.portal-tools-page .tools-quick-list em { font-size: 9px; }

/* Image-led section entry cards ------------------------------------------ */

:is(.portal-resources-page, .portal-tools-page) .rt-channel-section {
  margin-top: 18px;
  padding-top: 25px;
  scroll-margin-top: calc(var(--site-header-height) + 18px);
}

.rt-channel-section-head {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.rt-channel-section-head > div > p {
  margin: 0 0 7px;
  color: var(--portal-rust);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .16em;
}

.rt-channel-section-head h2 {
  margin: 0;
  color: var(--portal-ink);
  font-size: 25px;
  font-weight: 760;
  letter-spacing: .01em;
  line-height: 1.2;
}

.rt-channel-section-head > p {
  max-width: 520px;
  margin: 0;
  color: var(--portal-muted);
  font-size: 13.5px;
  line-height: 1.65;
  text-align: right;
}

.rt-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rt-channel-entry {
  display: grid;
  min-height: 230px;
  grid-template-columns: minmax(220px, .44fr) minmax(0, .56fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--portal-line) 88%, #fff);
  border-radius: 2px;
  background: var(--portal-surface);
  box-shadow: 0 8px 24px rgba(27, 43, 35, .045);
  transition: border-color 190ms ease, box-shadow 220ms ease, transform 220ms var(--ease-out);
}

.rt-channel-entry:hover,
.rt-channel-entry:focus-visible {
  border-color: color-mix(in srgb, var(--portal-green) 42%, var(--portal-line));
  box-shadow: 0 14px 30px rgba(27, 43, 35, .09);
  transform: translateY(-2px);
}

.rt-channel-entry > figure {
  position: relative;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #d9dfd7;
}

.rt-channel-entry > figure img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 300ms ease, transform 520ms var(--ease-out);
}

.rt-channel-entry:hover > figure img,
.rt-channel-entry:focus-visible > figure img {
  filter: saturate(1.05);
  transform: scale(1.025);
}

.rt-channel-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 26px 26px 24px;
}

.rt-channel-copy > small,
.rt-channel-copy > strong,
.rt-channel-copy > em { display: block; }

.rt-channel-copy > small {
  margin-bottom: 7px;
  color: var(--portal-rust);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .12em;
}

.rt-channel-copy > strong {
  color: var(--portal-green);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.25;
  transition: color 190ms ease;
}

.rt-channel-entry:hover .rt-channel-copy > strong,
.rt-channel-entry:focus-visible .rt-channel-copy > strong { color: var(--rt-interaction-blue); }

.rt-channel-copy > em {
  margin-top: 8px;
  color: var(--portal-text);
  font-size: 13.5px;
  font-style: normal;
  line-height: 1.55;
}

.rt-channel-action {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--portal-line);
}

.rt-channel-action b {
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.rt-channel-action > span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
  transition: color 190ms ease;
}

.rt-channel-action img {
  width: 16px;
  height: 16px;
  transition: transform 210ms var(--ease-out);
}

.rt-channel-entry:hover .rt-channel-action > span,
.rt-channel-entry:focus-visible .rt-channel-action > span { color: var(--rt-interaction-blue); }

.rt-channel-entry:hover .rt-channel-action img,
.rt-channel-entry:focus-visible .rt-channel-action img { transform: translateX(4px); }

.portal-resources-page .resource-provenance {
  margin-top: 24px;
  font-size: 10px;
  line-height: 1.65;
}

html[data-theme="dark"] :is(.portal-resources-page, .portal-tools-page) .hemu-portal-main { background: var(--portal-paper); }
html[data-theme="dark"] :is(.portal-resources-page, .portal-tools-page) :where(.rt-lead-feature, .rt-side-panel, .rt-channel-entry) { box-shadow: none; }
html[data-theme="dark"] :is(.portal-resources-page, .portal-tools-page) :where(.rt-lead-action img, .rt-channel-action img, .tools-quick-list > a > img) { filter: invert(.9) sepia(.12); }

@media (max-width: 1180px) {
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-grid {
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 26px;
  }

  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-title {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }

  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-intro {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }

  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-date {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin: 0;
  }

  :is(.portal-resources-page, .portal-tools-page) .rt-focus-layout { grid-template-columns: 1fr; }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-feature { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); }
  :is(.portal-resources-page, .portal-tools-page) .rt-side-panel { grid-column: auto; }
}

@media (max-width: 900px) {
  :is(.portal-resources-page, .portal-tools-page) .portal-content.hemu-portal-shell {
    width: min(calc(100% - 36px), 1368px);
    padding-top: 30px;
  }

  :is(.portal-resources-page, .portal-tools-page) .hemu-portal-masthead { min-height: 210px; }
  :is(.portal-resources-page, .portal-tools-page) .masthead-grid { min-height: 210px; }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-grid {
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 26px;
  }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-intro {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 36px 0 0;
  }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-date {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin: -26px 0 0;
  }
  .rt-channel-entry { grid-template-columns: minmax(180px, .42fr) minmax(0, .58fr); }
  .rt-channel-copy { padding: 22px; }
}

@media (max-width: 760px) {
  :is(.portal-resources-page, .portal-tools-page) .rt-focus-layout { gap: 0; padding-bottom: 28px; }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-feature { grid-template-columns: 1fr; }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-media { min-height: 0; aspect-ratio: 1.68; }
  .portal-tools-page .tools-workbench-preview-foot {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 9px 14px;
  }
  .portal-tools-page .tools-workbench-preview-foot > :is(small, strong) { display: none; }
  .portal-tools-page .tools-workbench-preview-foot > span { gap: 6px; margin-top: 0; }
  .portal-tools-page .tools-workbench-preview-foot i { padding: 5px 7px; font-size: 9px; }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-copy { min-height: 278px; padding: 24px 24px 22px; border-top: 1px solid var(--portal-line); border-left: 0; }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-copy h2 {
    font-size: clamp(24px, 4.8vw, 28px);
    line-height: 1.46;
  }
  :is(.portal-resources-page, .portal-tools-page) .rt-side-panel { margin-top: 18px; padding: 22px 22px 18px; }
  :is(.portal-resources-page, .portal-tools-page) .portal-accent-label {
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .06em;
  }
  :is(.portal-resources-page, .portal-tools-page) .portal-section-title {
    gap: 11px;
    font-size: 20px;
  }
  :is(.portal-resources-page, .portal-tools-page) .portal-section-title > i { height: 20px; }
  .portal-resources-page .resource-updates .portal-update-row { min-height: 82px; padding-block: 14px 13px; }
  .portal-resources-page .resource-updates .portal-update-row strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 720;
    line-height: 1.48;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .portal-resources-page .resource-updates .portal-update-row small {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.45;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
  .portal-resources-page .resource-updates .portal-update-row time { font-size: 11px; }
  .portal-resources-page .resource-updates .portal-update-row > em { font-size: 8.5px; }
  .portal-tools-page .tools-quick-list > a { min-height: 68px; }
  .portal-tools-page .tools-quick-list strong {
    font-size: 14.5px;
    font-weight: 720;
    line-height: 1.48;
  }
  .portal-tools-page .tools-quick-list small { font-size: 12.5px; line-height: 1.45; }
  .portal-tools-page .tools-quick-list em { font-size: 8.5px; }
  .rt-channel-section-head { display: block; }
  .rt-channel-section-head > p { margin-top: 10px; text-align: left; }
  .rt-channel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :is(.portal-resources-page, .portal-tools-page) .hemu-portal-masthead { min-height: 236px; }
  :is(.portal-resources-page, .portal-tools-page) .masthead-grid { min-height: 236px; gap: 16px; padding-block: 25px 22px; }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-grid {
    display: flex;
    min-height: 236px;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    justify-content: center;
  }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-title { align-self: stretch; margin: 0; }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-intro { align-self: center; margin: 0; }
  .portal-tools-page .hemu-portal-masthead.is-tools .masthead-date { align-self: flex-start; margin: 0; }
  html body:is(.portal-resources-page, .portal-tools-page) .hemu-portal-main .masthead-title h1 { max-width: 100%; font-size: clamp(34px, 9vw, 41px); white-space: normal; }
  :is(.portal-resources-page, .portal-tools-page) .masthead-intro { max-width: 96%; font-size: 12px; }
}

@media (max-width: 520px) {
  :is(.portal-resources-page, .portal-tools-page) .portal-content.hemu-portal-shell {
    width: min(calc(100% - 28px), 1368px);
    padding-block: 24px 38px;
  }
  :is(.portal-resources-page, .portal-tools-page) .rt-lead-copy { padding: 21px 18px 20px; }
  :is(.portal-resources-page, .portal-tools-page) .rt-side-panel { padding: 20px 18px 16px; }
  :is(.portal-resources-page, .portal-tools-page) .portal-section-title { font-size: 19px; }
  .portal-resources-page .resource-updates .portal-update-row { grid-template-columns: minmax(0, 1fr) minmax(66px, max-content); }
  .portal-tools-page .tools-quick-list > a { grid-template-columns: 24px minmax(0, 1fr) 14px; gap: 10px; }
  .portal-tools-page .tools-quick-list > a > em { display: none; }
  .rt-channel-section { padding-inline: 0; }
  .rt-channel-section-head h2 { font-size: 23px; }
  .rt-channel-entry { grid-template-columns: 1fr; min-height: 0; }
  .rt-channel-entry > figure { min-height: 0; aspect-ratio: 1.72; }
  .rt-channel-copy { padding: 20px 18px; }
  .rt-channel-copy > strong { font-size: 20px; }
  .rt-channel-copy > em { font-size: 14px; line-height: 1.6; }
  .rt-channel-action { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.portal-resources-page, .portal-tools-page) :where(.rt-lead-feature, .rt-side-panel, .rt-channel-entry),
  :is(.portal-resources-page, .portal-tools-page) :where(.rt-lead-feature img, .rt-channel-entry img) {
    transition: none;
  }
}
