/**
 * Shared layout for /news/{topic} chrome articles.
 * Title, byline, then image with caption — news-site reading column.
 */
.site-article {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

@media (min-width: 640px) {
    .site-article {
        padding: 2.5rem 1.5rem 4rem;
    }
}

.site-article-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.75rem, 4.2vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #111;
    overflow-wrap: break-word;
}

.site-article-byline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 0 0 1.35rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.5);
}

.site-article-author {
    font-weight: 600;
    color: #111;
}

.site-article-byline time {
    min-width: 0;
    overflow-wrap: break-word;
}

.site-article-figure {
    margin: 0 0 1.75rem;
}

.site-article-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f4f4f5;
}

.site-article-hero img.site-article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.site-article-hero.is-plain {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(59, 130, 246, 0.32), transparent 60%),
        linear-gradient(160deg, #1e3a5f 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-hero.is-plain-alibis {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(59, 130, 246, 0.38), transparent 60%),
        linear-gradient(160deg, #1e3a5f 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-hero.is-plain-sitizen {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(16, 185, 129, 0.32), transparent 60%),
        linear-gradient(160deg, #134e4a 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-hero.is-plain-meshnow {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(249, 115, 22, 0.32), transparent 60%),
        linear-gradient(160deg, #7c2d12 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-marks {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    pointer-events: none;
}

.site-article-mark {
    width: 22%;
    max-width: 4.5rem;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 1rem;
    background: #fff;
}

.site-article-marks:has(.site-article-mark:only-child) .site-article-mark {
    width: 32%;
    max-width: 5.5rem;
}

.site-article-caption {
    margin: 0.55rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.52);
    overflow-wrap: break-word;
}

.site-article-caption cite {
    font-style: normal;
    color: rgba(0, 0, 0, 0.4);
}

.site-article-caption cite::before {
    content: " · ";
    color: rgba(0, 0, 0, 0.32);
}

.site-article-body p {
    margin: 0 0 1.1rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.72);
    overflow-wrap: break-word;
}

html.dark .site-article-title,
html.dark .site-article-author {
    color: #fff;
}

html.dark .site-article-byline {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .site-article-hero {
    background: #09090b;
}

html.dark .site-article-caption {
    color: rgba(255, 255, 255, 0.55);
}

html.dark .site-article-caption cite {
    color: rgba(255, 255, 255, 0.4);
}

html.dark .site-article-caption cite::before {
    color: rgba(255, 255, 255, 0.28);
}

html.dark .site-article-body p {
    color: rgba(255, 255, 255, 0.72);
}

.site-article-end {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.site-article-end:empty {
    display: none;
}

.site-article-end-block {
    min-width: 0;
}

.site-article-end-heading {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
}

html[lang="zh-TW"] .site-article-end-heading {
    letter-spacing: 0.04em;
}

.site-article-end-apps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.site-article-end-related {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.site-article-related-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.site-article-related-media {
    position: relative;
    flex: 0 0 9.5rem;
    width: 9.5rem;
    height: 5.75rem;
    overflow: hidden;
    background: #f4f4f5;
}

.site-article-related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.site-article-related-media.is-plain {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(59, 130, 246, 0.32), transparent 60%),
        linear-gradient(160deg, #1e3a5f 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-related-media.is-plain-alibis {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(59, 130, 246, 0.38), transparent 60%),
        linear-gradient(160deg, #1e3a5f 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-related-media.is-plain-sitizen {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(16, 185, 129, 0.32), transparent 60%),
        linear-gradient(160deg, #134e4a 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-related-media.is-plain-meshnow {
    background:
        radial-gradient(ellipse 70% 50% at 70% 40%, rgba(249, 115, 22, 0.32), transparent 60%),
        linear-gradient(160deg, #7c2d12 0%, #0f172a 55%, #1e293b 100%);
}

.site-article-related-marks {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
}

.site-article-related-mark {
    width: 42%;
    max-width: 3.25rem;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0.7rem;
    background: #fff;
}

.site-article-related-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    flex: 1;
    padding: 0.85rem 1rem;
}

.site-article-related-copy time {
    margin: 0 0 0.3rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.45);
    overflow-wrap: break-word;
}

html[lang="zh-TW"] .site-article-related-copy time {
    letter-spacing: 0;
}

.site-article-related-title {
    margin: 0;
    font-size: 0.9875rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
    overflow-wrap: break-word;
    transition: color 0.2s ease;
}

.site-article-related-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    color: #2563eb;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
}

.site-article-related-cta::after {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-article-related-card:hover {
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.site-article-related-card:hover .site-article-related-img {
    transform: scale(1.04);
}

.site-article-related-card:hover .site-article-related-title {
    color: #2563eb;
}

.site-article-related-card:hover .site-article-related-cta {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.site-article-related-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

@media (max-width: 639px) {
    .site-article-related-card {
        flex-direction: column;
        align-items: stretch;
    }

    .site-article-related-media {
        flex: none;
        width: 100%;
        height: 8.25rem;
    }
}

html.dark .site-article-end-heading {
    color: rgba(255, 255, 255, 0.45);
}

html.dark .site-article-related-card {
    background: #141416;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

html.dark .site-article-related-card:hover {
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.55);
}

html.dark .site-article-related-title {
    color: #fff;
}

html.dark .site-article-related-card:hover .site-article-related-title {
    color: #93c5fd;
}

html.dark .site-article-related-media {
    background: #09090b;
}

html.dark .site-article-related-copy time {
    color: rgba(255, 255, 255, 0.45);
}

html.dark .site-article-related-cta {
    color: #60a5fa;
}

@media (prefers-reduced-motion: reduce) {
    .site-article-related-card,
    .site-article-related-img,
    .site-article-related-title {
        transition: none;
    }
}
