/* Long journal and workshop names stay inside the publication metadata column. */
:is(.home-page, .research-page) .home-research-side { min-width: 0; }
:is(.home-page, .research-page) .home-research-venue { max-width: 100%; white-space: normal; overflow-wrap: break-word; }

/* Controls introduced for compact layouts never participate in the approved desktop. */
.responsive-menu-toggle,
.responsive-collection-controls { display: none; }
.home-page .credentials-list { display: contents; }

/* Match the copy's outer inset to the whitespace around the centered cover. */
.home-page .evaluation-layout,
.research-page .restored-report {
  --report-cover-track: 520px;
  --report-cover-size: 320px;
}
.home-page .report-insight,
.research-page .restored-report-body {
  padding-inline-end: max(0px, calc((var(--report-cover-track) - var(--report-cover-size)) / 2));
}

/* Keep the seal lift separate from the product frames' shadow feedback. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-page .credentials-list .credential-mark,
  .governance-page .governance-seals .credential-mark {
    translate: 0 0;
    transition: translate .45s cubic-bezier(.3, .7, .3, 1);
  }
  .home-page .credentials-list .credential:hover > .credential-mark,
  .governance-page .governance-seals .credential:hover > .credential-mark {
    translate: 0 -8px;
  }
}
@media (hover: hover) and (pointer: fine) {
  :is(.home-page, .products-page) .observer-showcase > :is(.observer-figure, .observer-detail),
  .products-page #products-skillward .product-secondary-crop {
    transition: box-shadow .24s cubic-bezier(.3, .7, .3, 1);
  }
  :is(.home-page, .products-page) .observer-showcase:hover > :is(.observer-figure, .observer-detail) {
    box-shadow: 0 12px 36px -10px rgb(48 36 67 / .24), 0 28px 64px -16px rgb(48 36 67 / .36);
  }
  .products-page #products-skillward .product-secondary-stage:hover > .product-secondary-crop {
    box-shadow: 0 12px 32px -10px rgb(48 36 67 / .30), 0 3px 12px -4px rgb(48 36 67 / .18);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  :is(.home-page, .products-page) .observer-showcase > :is(.observer-figure, .observer-detail),
  .products-page #products-skillward .product-secondary-crop {
    transition: none;
  }
}

/* Keep the research title and its two notes in one fluid composition. */
.page.research-page .page-head {
  --research-heading-size: clamp(30px, 4.2vw, 64px);
  --research-note-unit: min(1px, .0694444444vw);
  --research-heading-top: clamp(56px, 5.55555556vw, 80px);
  width: min(1280px, calc(100vw - clamp(32px, 6.66666667vw, 96px)));
  max-width: none;
  padding-block: var(--research-heading-top) clamp(40px, 4.44444444vw, 64px);
}
.page.research-page .page-head h1 { font-size: var(--research-heading-size); }
.page.research-page .research-head-note--page {
  width: calc(120 * var(--research-note-unit));
  left: calc(24 * var(--research-note-unit));
  top: calc(var(--research-heading-top) + 24 * var(--research-note-unit));
}
.page.research-page .research-head-note--sheet {
  width: calc(132 * var(--research-note-unit));
  right: calc(24 * var(--research-note-unit));
  top: calc(var(--research-heading-top) + 84 * var(--research-note-unit));
}

@media (max-width: 1399px) {
  :root { --rail: min(1280px, calc(100vw - 64px)); }
  .rail, .products-page .observer-showcase { max-width: calc(100% - 64px); }
  .section-heading { gap: 32px; flex-wrap: wrap; }
  .section-heading > * { min-width: 0; }
  .section-heading .text-link { white-space: normal; }

  /* A compact masthead keeps the original identity and five peer destinations. */
  .nav-inner { gap: 32px; }
  .navigation { gap: clamp(20px, 2.3vw, 32px); }
  /* The original navigation starts one quarter into the footer rail. */
  .foot .footer-main { grid-template-columns: minmax(138px, 1fr) minmax(0, 3fr); }
  .foot .footer-brand { justify-self: start; width: max-content; }
  .foot .footer-groups { --footer-item-gap: 2px; --footer-item-height: 32px; min-width: 0; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px clamp(12px, calc(var(--rail) / 32), 40px); }
  .foot .footer-groups a { display: inline-flex; align-items: center; min-height: 32px; max-width: 100%; }

  /* The cover remains one editorial composition: statement beside brand artwork. */
  .home-page .home-cover__inner {
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    gap: clamp(32px, 4.6vw, 64px);
  }
  .home-page .home-cover h1 { font-size: clamp(30px, 3.6vw, 50px); }
  .home-page .home-cover__figure { width: 100%; max-width: 520px; }
  .home-page .home-cover__description span,
  .home-page .credentials-intro > span { display: inline; white-space: normal; }
  .home-page .home-cover__description { font-size: 20px; line-height: 30px; }
  .home-page .home-publication-authors > span { white-space: normal; }
  .home-page .directions { gap: 32px; }
  .home-page .home-work .section-heading h2 span { white-space: normal; }

  /* A report cover and its explanation stay together rather than becoming chapters. */
  .home-page .evaluation-layout {
    --report-cover-track: 100%;
    --report-cover-size: min(320px, calc(100% - 20px));
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 24px;
  }
  .home-page .report-cover { width: min(320px, calc(100% - 20px)); }
  .home-page .report-insight h2 { font-size: clamp(30px, 3vw, 36px); line-height: 1.3; }
  .home-page .report-insight > p span { display: inline; }
  .home-page .observer-section .section-heading { gap: 24px; }
  .home-page .observer-actions { flex-wrap: wrap; }
  .home-page .observer-showcase { max-width: calc(100% - 64px); }

  /* Reserve space for the notes in proportion to their continuously scaled size. */
  .page.research-page .page-head h1 { max-width: min(1120px, calc(100% - 320 * var(--research-note-unit))); }
  .page.research-page .page-head > p { max-width: min(960px, calc(100% - 320 * var(--research-note-unit))); }
  .research-page .restored-report {
    --report-cover-track: 100%;
    --report-cover-size: min(320px, calc(100% - 20px));
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 24px;
  }
  .research-page .restored-report-stage > .restored-cover { width: min(320px, calc(100% - 20px)); }
  .research-page .research-action-button { max-width: 100%; white-space: normal; }
  .research-page .restored-report-body h2 { font-size: clamp(30px, 2.8vw, 36px); line-height: 1.3; }
  .research-page .research-earlier-grid { gap: 24px; }
  .research-page .research-upcoming { grid-template-columns: 168px minmax(0, 1fr); gap: 32px; }
  .research-page .research-upcoming h2 { font-size: 32px; }
  .research-page .soon-list article { padding: 28px; }
  .research-page .soon-list h3 { font-size: clamp(24px, 2.3vw, 30px); line-height: 1.3; overflow-wrap: break-word; }
  .research-page .soon-list p { font-size: 18px; line-height: 28px; }

  :is(.home-page, .research-page) .home-research-toolbar { flex-wrap: wrap; gap: 16px 24px; }
  :is(.home-page, .research-page) .home-research-filter { max-width: 100%; }
  :is(.home-page, .research-page) .home-research-tab { flex: 0 0 auto; min-height: 44px; }
  :is(.home-page, .research-page) .home-research-venue,
  :is(.home-page, .research-page) .home-research-tag { white-space: normal; }
  :is(.home-page, .research-page) .home-research-side { min-width: 0; }
}

@media (max-width: 1055px) {
  :root { --rail: calc(100vw - 2 * max(24px, env(safe-area-inset-left), env(safe-area-inset-right))); }
  .rail, .products-page .observer-showcase,
  .home-page .observer-showcase { max-width: calc(100% - 2 * max(24px, env(safe-area-inset-left), env(safe-area-inset-right))); }
  .home-page .home-cover { padding-top: 48px; }
  .home-page .home-cover__copy { --home-cover-gap: 24px; --home-cover-actions-gap: 24px; }
  .home-page .home-cover__description { font-size: 18px; line-height: 28px; }
  .home-page .evaluation-layout { gap: 28px; }
  .home-page .report-insight > p { font-size: 18px; line-height: 28px; margin-top: 20px; }
  .home-page .report-insight > .button { margin-top: 24px; }
  .home-page .observer-section .section-heading { align-items: flex-start; }
  .home-page .observer-title-group { flex: 1 1 400px; }
  .home-page .observer-actions { justify-content: flex-start; }
  .home-page .credentials { gap: 24px; }
  .foot .footer-groups { --footer-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: var(--footer-columns); }

  .research-page .restored-report { gap: 28px; }
  .research-page .restored-report-description { font-size: 18px; line-height: 28px; margin-top: 16px; }
  .research-page .restored-report-body > .research-action-button { margin-top: 24px; }
  .page.research-page .page-head > p { font-size: 20px; line-height: 30px; }
  .page.research-page .page-head > p > span { display: inline; }
  .research-page #research-methodology .methodology { gap: 24px; }
  .research-page #research-methodology .methodology-figure { margin-bottom: 16px; }
  .research-page #research-methodology .methodology h3 { font-size: 22px; line-height: 30px; }
  .research-page #research-methodology .methodology p { width: 100%; max-width: none; font-size: 18px; line-height: 28px; }
  .research-page .restored-paper-body h3 { font-size: 24px; line-height: 30px; }
  .research-page .restored-paper-body > p { font-size: 18px; line-height: 28px; }
  .research-page .research-upcoming { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .research-page .research-upcoming > .section-heading { margin-bottom: 0; }
  .research-page .soon-list { padding-inline: 24px; }
  .research-page .soon-list article { padding: 28px; }
  .research-page .publication-links a { width: 44px; height: 44px; }
  :is(.home-page, .research-page) .home-research-year { grid-template-columns: 72px minmax(0, 1fr); gap: 24px; }
  :is(.home-page, .research-page) .home-research-row { grid-template-columns: minmax(0, 1fr) 176px; gap: 24px; }
  :is(.home-page, .research-page) .home-research-filter { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  /* The heading names the index; its complete filter group sits on a separate row. */
  .research-page #research-publications .home-research-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .research-page #research-publications .home-research-filter { width: max-content; max-width: 100%; justify-self: start; }
}

@media (max-width: 833px) {
  .foot .footer-legal, .foot .footer-legal > div { gap: 12px; }
  .home-page .chapter, .research-page .chapter { padding-block: 48px; }
  .home-page .home-work .section-heading h2,
  .home-page .section-heading h2,
  .research-page .section-heading h2 { font-size: 32px; line-height: 1.35; }
  .home-page .credentials { display: block; }
  .home-page .credentials-intro { font-size: 28px; margin-bottom: 32px; }
  .home-page .observer-showcase { padding-bottom: 32px; }
  .home-page .observer-detail { bottom: 12px; }
  .home-page .observer-figure, .home-page .observer-detail { border-radius: 8px; }

  /* Peer collections keep the same grouping and scale; the next item remains visible. */
  :is(.home-page .directions, .home-page .models, .products-page .models, .research-page .research-earlier-grid, .research-page #research-methodology .methodology, .home-page .credentials-list, .governance-page .governance-seals) {
    --collection-card-width: clamp(240px, 75vw, 360px);
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: var(--collection-card-width);
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-x: contain;
    padding-block: 4px 16px;
    scrollbar-width: thin;
  }
  :is(.home-page .directions, .home-page .models, .products-page .models, .research-page .research-earlier-grid, .research-page #research-methodology .methodology, .home-page .credentials-list, .governance-page .governance-seals) > * {
    min-width: 0;
    scroll-snap-align: center;
  }
  :is(.home-page .credentials-list, .governance-page .governance-seals) .credential-mark {
    height: 128px;
    margin: 0 0 16px;
  }
  :is(.home-page .credentials-list, .governance-page .governance-seals) .credential-mark img { width: 128px; height: 128px; }
  :is(.home-page .credentials-list, .governance-page .governance-seals) .credential h3 { font-size: 20px; line-height: 30px; }
  :is(.home-page .credentials-list, .governance-page .governance-seals) .credential p { font-size: 18px; line-height: 28px; }
  .home-page .direction p { width: 100%; max-width: none; margin-bottom: 0; }
  .research-page .restored-paper-body > p { width: 100%; max-width: none; }
  .research-page .restored-paper-stage { height: 320px; }
  .research-page .restored-paper .restored-cover { width: min(200px, calc(100% - 48px)); }
  [data-responsive-collection]:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
  .responsive-collection-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
  }
  .responsive-collection-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
  }
  .responsive-collection-controls button:disabled { color: var(--muted); cursor: default; }
  .responsive-collection-controls button:not(:disabled):is(:hover, :focus-visible) { background: var(--soft); border-color: var(--purple); }
  .responsive-collection-controls svg { display: block; width: 20px; height: 20px; }
  .responsive-collection-count { min-width: 56px; text-align: center; font: 400 16px/24px var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }

  /* The upcoming projects remain one overlapping paper set, with readable paper faces. */
  .research-page .research-upcoming { display: block; }
  .research-page .research-upcoming > .section-heading { margin-bottom: 8px; }
  .research-page .soon-list {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding: 28px 8px 44px;
    width: calc(100% + 16px);
    margin-inline: -8px;
    scrollbar-width: thin;
  }
  .research-page .soon-list article {
    --soon-angle: 0deg;
    --soon-rise: -4px;
    flex: 0 0 clamp(264px, calc(100vw - 72px), 360px);
    min-height: 432px;
    padding: 28px;
    scroll-snap-align: center;
  }
  .research-page .soon-list article + article { margin-left: -8px; }
  .research-page .soon-list article:first-child { --soon-angle: -2deg; --soon-rise: 8px; }
  .research-page .soon-list article:last-child { --soon-angle: 2deg; --soon-rise: 8px; }
  .research-page .soon-list h3 { font-size: 28px; line-height: 36px; }
  .research-page .soon-card-footer { gap: 12px; }
  .research-page .soon-card-footer > img { width: 72px; height: 64px; }

  :is(.home-page, .research-page) .home-research-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  :is(.home-page, .research-page) .home-research-side { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
  .research-page .publication-links { margin-top: 0; }
  .research-page .home-research-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 16px; }
  .research-page .publication-links { grid-column: 1 / -1; padding-top: 4px; }
}

@media (max-width: 767px) {
  .home-page .home-cover { padding-top: 32px; }
  .home-page .home-cover__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .home-page .home-cover h1 { font-size: clamp(32px, 7.2vw, 42px); }
  .home-page .home-cover h1 span { white-space: normal; word-break: keep-all; }
  .home-page .home-cover__figure { width: 100%; max-width: none; justify-self: stretch; }
  .home-page .home-cover__description { max-width: 36em; }
  .home-page .home-cover__actions { flex-wrap: wrap; }
  .home-page .evaluation-layout { --report-cover-size: min(264px, calc(100% - 24px)); grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px; }
  .home-page .report-insight { padding-inline: max(0px, calc((100% - var(--report-cover-size)) / 2)); }
  .home-page .report-stage { padding-block: 16px; }
  .home-page .report-cover { width: min(264px, calc(100% - 24px)); }
  .home-page .report-insight h2 { font-size: 30px; }
  .home-page .report-insight > p { margin-top: 16px; }
  .home-page .observer-section .section-heading { flex-direction: column; align-items: flex-start; gap: 20px; }
  .home-page .observer-title-group { flex: 0 1 auto; }
  .home-page .observer-section .section-heading h2 { font-size: 32px; line-height: 40px; }
  .home-page .observer-section .section-heading p { font-size: 18px; line-height: 28px; }
  .home-page .observer-showcase { padding-bottom: 28px; }
  .home-page .observer-figure { width: 82%; }
  .home-page .observer-detail { width: 58%; bottom: 8px; }
  .home-page .home-cooperation { min-height: 0; padding: 32px 20px; }
  .home-page .contact-copy p { font-size: 22px; line-height: 32px; }

  .page.research-page .page-head > p { font-size: 18px; line-height: 28px; margin-top: 20px; }
  .research-page .restored-report { --report-cover-size: min(264px, calc(100% - 24px)); grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px; }
  .research-page .restored-report-body { padding-inline: max(0px, calc((100% - var(--report-cover-size)) / 2)); }
  .research-page .restored-report-stage { padding-block: 16px; }
  .research-page .restored-report-stage > .restored-cover { width: min(264px, calc(100% - 24px)); }
  .research-page .restored-report-body h2 { font-size: 30px; line-height: 1.3; }
}

/* Stack when the side-by-side rail can no longer fit English navigation labels. */
@media (max-width: 559.98px) {
  .foot .footer-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 0; }
  .foot .footer-brand { grid-column: 1; grid-row: 1; margin-bottom: 32px; }
  .foot .footer-groups { grid-column: 1; grid-row: 2; padding-bottom: 64px; }
  .foot .footer-socials { grid-column: 1; grid-row: 3; }
}
@media (max-width: 479px) {
  .foot .footer-groups { --footer-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: var(--footer-columns); }
  /* Four complete choices remain visible instead of clipping the last category. */
  .research-page #research-publications .home-research-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; overflow: hidden; }
  .research-page #research-publications .home-research-tab,
  .research-page #research-publications .home-research-tab[data-category="all"] { width: auto; min-width: 0; justify-content: flex-start; border-radius: 0; }
  .research-page #research-publications .home-research-tab:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .research-page #research-publications .home-research-tab:nth-child(even) { border-left: 1px solid var(--rule); }
  .research-page #research-publications .home-research-tab[data-category="all"] > .home-research-tab-label { transform: none; }
}

@media (max-width: 671px) {
  :root { --rail: calc(100vw - 2 * max(16px, env(safe-area-inset-left), env(safe-area-inset-right))); }
  .rail, .products-page .observer-showcase,
  .home-page .observer-showcase { max-width: calc(100% - 2 * max(16px, env(safe-area-inset-left), env(safe-area-inset-right))); }
  .nav-inner { position: relative; }
  .responsive-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
    margin-inline-start: auto; color: var(--nav-link, var(--ink)); background: transparent;
  }
  .responsive-menu-toggle svg { width: 24px; height: 24px; }
  .responsive-menu-toggle .menu-close-icon,
  .nav[data-menu-open] .responsive-menu-toggle .menu-open-icon { display: none; }
  .nav[data-menu-open] .responsive-menu-toggle .menu-close-icon { display: block; }
  .nav #primary-navigation { display: none; }
  .nav[data-menu-open] #primary-navigation {
    position: absolute; top: 100%; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 16px;
    max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px);
    overflow: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
    box-shadow: 0 12px 32px rgb(48 36 67 / .12);
  }
  .nav[data-menu-open] #primary-navigation a { color: var(--ink); min-height: 44px; }
  .nav[data-menu-open] #primary-navigation a[aria-current="page"] { color: var(--purple); }
  .nav[data-menu-open] #primary-navigation a:after { background: currentColor; }
  .nav[data-menu-open] #primary-navigation a:focus-visible { outline-color: var(--purple); }
  .nav[data-menu-open][data-scroll-hidden] { transform: translateY(0); pointer-events: auto; }

  .section-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot { padding-block: 48px max(24px, env(safe-area-inset-bottom)); }
  .home-page .credentials-intro { font-size: 26px; }
  .home-page .contact-email { font-size: 18px; line-height: 28px; }
  :is(.home-page, .research-page) .home-research-toolbar { flex-direction: column; align-items: stretch; gap: 16px; }
  :is(.home-page, .research-page) .home-research-filter { width: 100%; }
  :is(.home-page, .research-page) .home-research-year { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  :is(.home-page, .research-page) .home-research-title { overflow-wrap: anywhere; }
  :is(.home-page, .research-page) .home-research-tag { max-width: 100%; }
  :is(.home-page, .research-page) .home-research-toolbar > .home-outline-button { align-self: flex-start; }
}
