/* Content-page parity layer. All rules are scoped to the migrated page templates. */
.legacy-content-frame {
    width: min(calc(100% - 40px), 960px);
    margin-inline: auto;
}

.legacy-content-empty {
    padding: 30px 0;
    color: #666666;
    font-size: 13px;
}

/* Publications */
.template-publications-index .legacy-publications {
    padding: 0 0 150px;
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
}

.legacy-publications__layout {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.legacy-publications__years,
.legacy-publications__main {
    min-width: 0;
}

.legacy-publications__years ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: circle;
}

.legacy-publications__years li {
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 20px;
}

.legacy-publications__years a {
    display: block;
    padding: 0;
    color: #820000;
    font-weight: 600;
    text-decoration: none;
}

.legacy-publications__years a:hover,
.legacy-publications__years a[aria-current="page"] {
    color: #820000;
    text-decoration: underline;
}

.legacy-publications__main h1 {
    margin: 0 0 10px;
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.legacy-publication {
    clear: both;
    padding: 5px 0;
    margin-bottom: 10px;
}

.legacy-publication p {
    margin: 0;
    color: #262626;
    font-size: 12px;
    line-height: 20px;
}

.legacy-publication strong {
    font-weight: 700;
}

.legacy-publication a {
    color: #820000;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.legacy-publication a:hover {
    color: #820000;
    text-decoration: underline;
}

/* Science art timeline */
.template-science-art-index #main-content,
.template-science-artwork #main-content {
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
}

.legacy-art-index__overview {
    width: 100%;
    max-width: 1700px;
    margin-inline: auto;
    padding-inline: 150px;
}

.legacy-art-banner {
    width: 100%;
    max-width: 1700px;
    min-height: 200px;
    margin: 30px auto;
    text-align: center;
}

.legacy-art-banner h1 {
    margin: 0 0 24px;
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 24px;
    line-height: 48px;
}

.legacy-art-banner > img {
    width: 100%;
    max-width: 1600px;
    height: auto;
    margin-inline: auto;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgb(0 0 0 / 20%);
    object-fit: contain;
}

.legacy-art-timeline {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding: 30px 0;
}

.legacy-art-year {
    position: relative;
    margin-bottom: 40px;
    scroll-margin-top: 170px;
}

.legacy-art-year__title {
    position: relative;
    margin: 40px 0 30px;
    padding-top: 15px;
    color: #8b1a1a;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.legacy-art-year__title::before {
    position: absolute;
    top: 0;
    right: 35%;
    left: 35%;
    height: 1px;
    background: #8b1a1a;
    content: "";
}

.legacy-art-year__title::after,
.legacy-art-year__right-dot {
    position: absolute;
    top: 0;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #8b1a1a;
    content: "";
}

.legacy-art-year__title::after {
    left: 35%;
}

.legacy-art-year__right-dot {
    right: 35%;
    transform: translate(50%, -50%);
}

.legacy-art-year__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.legacy-art-grid-item {
    position: relative;
    min-width: 0;
    min-height: 180px;
    overflow: hidden;
    border-radius: 6px;
    background: #e6e6e6;
    box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legacy-art-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgb(0 0 0 / 15%);
}

.legacy-art-grid-item > a {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: inherit;
    text-decoration: none;
}

.legacy-art-grid-item__image,
.legacy-art-grid-item__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    aspect-ratio: 64 / 42;
    object-fit: cover;
}

.legacy-art-grid-item__placeholder {
    background: #e6e6e6;
}

.legacy-art-grid-item__hint {
    position: absolute;
    right: 7px;
    bottom: 2.2em;
    z-index: 2;
    color: #f08080;
    font-size: 9px;
    font-weight: 700;
}

.legacy-art-grid-item__icon {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: rgb(255 255 255 / 82%);
    color: #820000;
    font-size: 16px;
    line-height: 1;
}

.legacy-art-view-more {
    margin: 20px 0 40px;
    text-align: center;
}

.legacy-art-button,
.legacy-art-back {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    background: #8b1a1a;
    box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
    color: #ffffff;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.legacy-art-button:hover,
.legacy-art-back:hover {
    transform: translateY(-2px);
    background: #6a0d0d;
    box-shadow: 0 4px 8px rgb(0 0 0 / 30%);
    color: #ffffff;
    text-decoration: none;
}

.legacy-art-subview {
    display: none;
    width: min(calc(100% - 300px), 1200px);
    margin-inline: auto;
    padding: 30px 0 80px;
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
}

.legacy-art-subview.is-active,
.legacy-art-subview:target {
    display: block !important;
}

.legacy-art-subview__title {
    position: relative;
    margin-bottom: 40px;
    text-align: center;
}

.legacy-art-subview__title::before {
    position: absolute;
    z-index: 0;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: #8b1a1a;
    content: "";
}

.legacy-art-subview__title h1 {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin: 0;
    padding: 0 20px;
    background: #ffffff;
    color: #8b1a1a;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
}

.legacy-art-extra__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.legacy-art-extra__item {
    height: 200px;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgb(0 0 0 / 10%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legacy-art-extra__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgb(0 0 0 / 15%);
}

.legacy-art-extra__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.legacy-art-extra__item:hover img {
    transform: scale(1.05);
}

.legacy-art-subview__empty {
    margin: 30px 0;
    padding: 40px 20px;
    border-radius: 8px;
    background: #f8f8f8;
    color: #666666;
    text-align: center;
}

.legacy-art-subview__empty p {
    margin-bottom: 6px;
}

.legacy-art-subview .legacy-art-back {
    display: block;
    width: fit-content;
    max-width: 180px;
    margin: 30px auto 0;
    text-align: center;
}

.legacy-art-poker__content {
    font-size: 15px;
    line-height: 1.6;
}

.legacy-art-poker__content p {
    margin-bottom: 14px;
}

.legacy-art-poker__content > p:first-child,
.legacy-art-poker__content > p:nth-of-type(5) {
    font-size: 24px;
    text-align: center;
}

body.legacy-art-subview-active .legacy-art-index__overview {
    display: none;
}

/* Science art detail */
.legacy-art-detail-page {
    width: 100%;
    max-width: 1700px;
    margin-inline: auto;
    padding-inline: 150px;
}

.legacy-art-detail {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding: 20px 0 80px;
    background: #ffffff;
}

.legacy-art-detail__bar {
    position: relative;
    width: 100%;
    height: 20px;
    margin: 0 auto 30px;
}

.legacy-art-detail__bar::before {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: #820000;
    content: "";
}

.legacy-art-detail__bar::after,
.legacy-art-detail__bar > span {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #820000;
    content: "";
}

.legacy-art-detail__bar::after {
    left: 0;
    transform: translate(-50%, -50%);
}

.legacy-art-detail__bar > span {
    right: 0;
    transform: translate(50%, -50%);
}

.legacy-art-detail__bar--bottom {
    margin: 40px auto 20px;
}

.legacy-art-detail__content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 40px;
    align-items: center;
    max-height: calc(100vh - 300px);
}

.legacy-art-detail__main-image {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 70vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
    background: #f5f5f5;
}

.legacy-art-detail__main-image img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.legacy-art-detail__info {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: center;
}

.legacy-art-detail__title-image {
    width: 100%;
    min-height: 80px;
    margin-bottom: 20px;
    background: #f8f8f8;
    text-align: center;
}

.legacy-art-detail__title-image img {
    display: block;
    width: 100%;
    height: auto;
    margin-inline: auto;
    object-fit: contain;
}

.legacy-art-detail__description {
    max-height: 50vh;
    margin-bottom: 20px;
    overflow-y: auto;
    color: #555555;
    font-size: 15px;
    line-height: 1.6;
}

.legacy-art-detail__description .rich-text,
.legacy-art-detail__description .rich-text p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.legacy-art-detail__description .rich-text p {
    margin-bottom: 16px;
}

.legacy-art-detail > .legacy-art-back {
    margin-top: 30px;
    padding: 8px 15px;
}

/* News list and article */
.template-news-index .legacy-news-index,
.template-news-detail .legacy-news-detail {
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
}

.legacy-news-index {
    padding: 18px 0 70px;
}

.legacy-news-index > h1,
.legacy-news-detail h1 {
    margin: 0 0 10px;
    color: #262626;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.legacy-news-list {
    display: flex;
    flex-direction: column;
}

.legacy-news-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 0 10px;
    min-height: 148px;
    padding: 10px 0 38px;
    border-bottom: 1px solid #cccccc;
}

.legacy-news-row__image {
    width: 100px;
}

.legacy-news-row__image img {
    display: block;
    width: 100px;
    height: auto;
}

.legacy-news-row h2 {
    margin: 0;
    font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
}

.legacy-news-row__toggle {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #820000;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.legacy-news-row__toggle:hover {
    color: #820000;
    text-decoration: underline;
}

.legacy-news-row__details {
    grid-column: 1 / -1;
    margin-top: 20px;
    color: #262626;
    font-size: 12px;
    line-height: 20px;
}

.legacy-news-row__details[hidden] {
    display: none;
}

.legacy-news-row__details .rich-text,
.legacy-news-row__details .rich-text p,
.legacy-news-row__details li {
    font-size: 12px;
    line-height: 20px;
}

.legacy-news-row__details .rich-text p {
    margin-bottom: 10px;
}

.legacy-news-row__details .content-gallery {
    margin: 40px auto;
}

.legacy-news-row__details .content-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.legacy-news-row__details .content-gallery figure {
    margin: 0;
}

.legacy-news-row__permalink {
    margin: 24px 0 0;
    text-align: right;
}

.legacy-news-row__permalink a,
.legacy-news-detail__back {
    color: #820000;
}

.legacy-news-detail {
    padding: 18px 0 120px;
}

.legacy-news-detail__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 120px;
    padding: 10px 0;
    border-bottom: 1px solid #cccccc;
}

.legacy-news-detail__header > img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.legacy-news-detail__header p {
    margin-bottom: 10px;
    color: #555555;
    font-size: 12px;
    line-height: 20px;
}

.legacy-news-detail__body {
    padding: 20px 0;
    color: #262626;
    font-size: 12px;
    line-height: 20px;
}

.legacy-news-detail__body .rich-text,
.legacy-news-detail__body .rich-text p,
.legacy-news-detail__body li {
    font-size: 12px;
    line-height: 20px;
}

.legacy-news-detail__body .rich-text p {
    margin-bottom: 10px;
}

.legacy-news-detail__body .content-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Recruitment */
.template-recruitment #main-content {
    color: #333333;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.legacy-recruitment {
    width: min(calc(100% - 40px), 1100px);
    margin-inline: auto;
    padding: 40px 0 150px;
}

.legacy-recruitment > h1 {
    margin: 0 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #222222;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.6;
}

.legacy-recruitment__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 30px 0;
}

.legacy-recruitment__contact {
    flex: 0 0 300px;
}

.legacy-recruitment__job {
    min-width: 0;
    flex: 1 1 600px;
}

.legacy-recruitment p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.legacy-recruitment a {
    color: #1a73e8;
    text-decoration: none;
}

.legacy-recruitment a:hover {
    color: #1557b0;
    text-decoration: underline;
}

.legacy-recruitment__job .rich-text > h2 {
    margin: 20px 0;
    color: #222222;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.legacy-recruitment__job .rich-text h3,
.legacy-recruitment__fallback-opening h3 {
    display: table;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #222222;
    color: #222222;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6;
}

.legacy-recruitment__job .rich-text h4,
.legacy-recruitment__fallback-opening h4 {
    margin: 20px 0 10px;
    color: #333333;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
}

.legacy-recruitment__job .rich-text ul,
.legacy-recruitment__fallback-opening ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legacy-recruitment__job .rich-text li,
.legacy-recruitment__fallback-opening li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.legacy-recruitment__job .rich-text > div:first-of-type > div,
.legacy-recruitment__fallback-opening {
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 10px;
    background: #f5f7fa;
    box-shadow: 0 2px 6px rgb(0 0 0 / 5%);
}

.legacy-recruitment__job .rich-text > div:last-child {
    margin-top: 25px;
    padding: 20px;
    border-left: 4px solid #1a73e8;
    border-radius: 8px;
    background: #e8f4fd;
}

.legacy-recruitment__notice {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-left: 4px solid #820000;
    background: #f8eeee;
    color: #600000;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .legacy-art-index__overview,
    .legacy-art-detail-page {
        padding-inline: 20px;
    }

    .legacy-art-subview {
        width: min(calc(100% - 40px), 1200px);
    }

}

@media (max-width: 768px) {
    .legacy-publications {
        padding-top: 10px;
    }

    .legacy-publications__layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .legacy-publications__years ul {
        display: flex;
        width: 100%;
        max-width: 100%;
        gap: 8px 18px;
        padding: 0 0 8px;
        overflow-x: auto;
        list-style: none;
    }

    .legacy-publications__years li {
        flex: 0 0 auto;
    }

    .legacy-art-detail__content {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .legacy-art-detail__main-image,
    .legacy-art-detail__description {
        max-height: none;
    }

    .legacy-art-extra__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .legacy-art-extra__item {
        height: 150px;
    }

    .legacy-news-row__details .content-gallery__grid,
    .legacy-news-detail__body .content-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legacy-recruitment {
        padding: 30px 0 150px;
    }

    .legacy-recruitment__layout {
        flex-direction: column;
        gap: 25px;
    }

    .legacy-recruitment__contact,
    .legacy-recruitment__job {
        flex: 0 0 100%;
    }

    .legacy-recruitment > h1 {
        font-size: 26px;
    }

    .legacy-recruitment__job .rich-text > h2 {
        font-size: 22px;
    }

    .legacy-recruitment__job .rich-text h3,
    .legacy-recruitment__fallback-opening h3 {
        font-size: 20px;
    }

    .legacy-recruitment__job .rich-text > div:first-of-type > div,
    .legacy-recruitment__fallback-opening {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .legacy-art-extra__grid {
        grid-template-columns: 1fr;
    }

    .legacy-art-grid-item,
    .legacy-art-grid-item > a,
    .legacy-art-grid-item__image,
    .legacy-art-grid-item__placeholder {
        min-height: 180px;
    }

    .legacy-art-year__title::before {
        right: 25%;
        left: 25%;
    }

    .legacy-art-year__title::after {
        left: 25%;
    }

    .legacy-art-year__right-dot {
        right: 25%;
    }

    .legacy-art-subview__title h1 {
        font-size: 22px;
    }

    .legacy-news-row {
        grid-template-columns: 76px minmax(0, 1fr);
        min-height: 116px;
        padding-bottom: 30px;
    }

    .legacy-news-row__image {
        width: 76px;
    }

    .legacy-news-row__image img {
        width: 76px;
        height: auto;
    }

    .legacy-news-detail__header {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .legacy-news-detail__header > img {
        width: 76px;
        height: 76px;
    }
}
