/* Bridge the older page layouts and study exports to the portfolio theme. */
.subpage-intro {
  padding-block: clamp(1.75rem, 5vw, 3.5rem) 1.5rem;
}
.subpage-intro h1 {
  font-size: var(--page-title-size);
  letter-spacing: -.055em;
}
.subpage-intro p { margin-top: .7rem; }
.site-credit { color: var(--muted); font-size: .8rem; margin-top: .85rem; }
.site-nav [aria-current="location"] { color: var(--accent); text-decoration: underline; }

.legacy-page .subpage { padding-bottom: clamp(2rem, 5vw, 4rem); }
.legacy-page .subpage .container {
  width: min(70rem, calc(100% - 4rem));
  max-width: none;
  padding-inline: 0;
}
.legacy-page .subpage :is(h4, h5, h6),
.legacy-page .mfp-content :is(h4, h5, h6) {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
}
.legacy-page .subpage .text-uppercase { text-transform: none !important; }
.legacy-page .subpage :is(.section_gap, .section_gap_top, .portfolio_area, .about_area) {
  padding-block: 0;
}
.legacy-page .subpage :is(.section-top-border, .topic-top-border) {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}
.legacy-page .subpage p + p { margin-top: .6rem; }
.legacy-page .subpage a:not(.primary_btn, .img-gal) { text-decoration: underline; overflow-wrap: anywhere; }
.legacy-page .subpage :is(a, button):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.legacy-page .subpage :is(iframe, video) { max-width: 100%; }
.legacy-page .subpage :is(.primary_btn, .primary_btn:hover) {
  display: inline-block;
  margin-block: .6rem;
  padding: .46rem .95rem;
  border-radius: 100vw;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--paper);
  font: 700 .9rem/1.6 var(--sans);
}
.legacy-page .subpage .primary_btn:hover { background: var(--accent-hover); }
.legacy-page .subpage .primary_btn span { padding: 0; }
.legacy-page .subpage .primary_btn::before { content: none; }
.legacy-page .subpage .gallery-social { margin-bottom: 1.25rem; }
.legacy-page .subpage .short_info .fa-magic { color: var(--accent); margin-right: .35em; }
.legacy-page .subpage .portfolio_box { margin-bottom: 1.75rem; }
.legacy-page .subpage .portfolio_box .short_info { margin-top: .75rem; }
.legacy-page .subpage .portfolio_box .short_info h4 {
  font-size: 1.15rem;
  text-transform: none;
}
.legacy-page .subpage .portfolio_box .short_info p { margin-top: .4rem; }
.legacy-page .subpage :is(.single_portfolio img, .single-gallery-image) { border-radius: .55rem; }
.legacy-page .subpage .single_portfolio:hover .overlay { background: var(--accent); }
.legacy-page .single_portfolio > .img-gal { position: absolute; inset: 0; }
.legacy-page .research_list_page .portfolio_box {
  border-color: var(--line);
  padding-block: 1.25rem;
  margin-bottom: 0;
}
.legacy-page .research_list_page .short_info h5 { font-size: 1.35rem; }
.legacy-page .research_list_page .short_info i { color: var(--muted); }
.project-filters-heading { font-size: 1.5rem; margin-bottom: .65rem; }
.legacy-page .subpage .portfolio-filter ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
}
.legacy-page .subpage .portfolio-filter li { margin: 0; }
.legacy-page .subpage .portfolio-filter button {
  padding: .3rem .8rem;
  border: 0;
  border-radius: 100vw;
  background: var(--peach);
  color: var(--ink);
  font: 700 .875rem/1.5 var(--sans);
  cursor: pointer;
}
.legacy-page .subpage .portfolio-filter :is(li.active button, button:hover) {
  background: var(--accent);
  color: var(--paper);
}
.legacy-page .mfp-content .custom-popup-window {
  background: var(--paper);
  border-radius: .75rem;
}
.legacy-page .preview-container { margin-bottom: 1.25rem; }
.legacy-page .preview-data { border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.legacy-page .preview-data .text-container { background: var(--peach); }
.legacy-page .preview-data :is(.text-container, .description, .domain) { font-family: var(--sans); }
.legacy-page .preview-data .header { color: var(--ink); font: 600 1.15rem/1.3 var(--serif); }

.cowpilot-page .site-header, .cowpilot-page .site-footer { font-family: var(--sans); }
.cowpilot-page .hero, .cowpilot-page .publication-authors { font-family: var(--sans); }
.cowpilot-page .title { color: var(--ink); font-family: var(--serif); font-weight: 600; }
.cowpilot-page .publication-title {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  letter-spacing: -.045em;
}
.cowpilot-page .publication-title img { display: inline-block; }
.cowpilot-page .publication-authors a { color: var(--accent) !important; }
.cowpilot-page .subtitle { color: var(--muted); font-family: var(--sans); }
.cowpilot-page .hero.is-light { background: var(--peach); color: var(--ink); }
.cowpilot-page .section { padding-block: clamp(1.5rem, 4vw, 3rem); }
.cowpilot-page .publication-links .external-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
}
.cowpilot-page .publication-links .external-link:hover { background: var(--accent-hover); }
.cowpilot-page main .content a { text-decoration: underline; }
.cowpilot-page pre { background: var(--peach); color: var(--ink); }

.study-content { padding-bottom: 2rem; }
.study-back { margin-top: 1.5rem; }
.study-manual .doc-content {
  max-width: 74ch;
  margin-top: 1rem;
  overflow-wrap: break-word;
}
.study-manual .doc-content :is(p, li, span, a) { font-family: var(--sans); }
.study-manual .doc-content :is(h2, h3, h2 span, h3 span) {
  color: var(--ink);
  font-family: var(--serif);
}
.study-manual .doc-content h2 span { font-size: clamp(2rem, 4.6vw, 3.5rem); }
.study-manual .doc-content h3 span { font-size: 1.4rem; }
.study-manual .doc-content a { color: var(--accent); text-decoration: underline; }
.study-manual .doc-content :is(p, li) > span[style*="overflow: hidden"] { max-width: 100%; }
.study-manual .doc-content img { max-width: none; }
.study-content .grid-container { max-width: 100%; overflow-x: auto; }
.study-content .grid-container td {
  border-color: var(--line);
  color: var(--ink);
  font-family: var(--sans);
}
.study-content .grid-container tr:first-child td { background: var(--peach); }

@media (max-width: 42rem) {
  .legacy-page .subpage .container { width: calc(100% - 2rem); }
  .legacy-page .research_list_page .portfolio_box { flex-direction: column; gap: .75rem; }
  .legacy-page .research_list_page .single_portfolio { flex: auto; width: min(100%, 16rem); }
  .study-manual .doc-content span[style*="overflow: hidden"] {
    display: block !important;
    height: auto !important;
  }
  .study-manual .doc-content img {
    max-width: 100%;
    height: auto !important;
    margin: 0 !important;
  }
}
