/* Article pages: long-form text in the landing palette. */
.article-body {
    color: #cbd5d0;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.article-body > * + * {
    margin-top: 1.25em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: 'Lora', Georgia, serif;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.3;
    scroll-margin-top: 5rem;
}

.article-body h2 {
    font-size: 1.75rem;
    margin-top: 1.25em;
}

.article-body h3 {
    font-size: 1.3rem;
    margin-top: 1.2em;
}

.article-body h4 {
    font-size: 1.1rem;
}

.article-body a {
    color: #d4a843;
    text-decoration: underline;
    text-decoration-color: rgba(212, 168, 67, 0.4);
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: #e8b84b;
}

.article-body strong {
    color: #ffffff;
}

.article-body ul,
.article-body ol {
    padding-left: 1.5em;
}

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li + li {
    margin-top: 0.4em;
}

.article-body blockquote {
    border-left: 2px solid #d4a843;
    padding-left: 1.25em;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #a3b8aa;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    border: 1px solid rgba(42, 64, 48, 0.6);
    padding: 0.6em 0.8em;
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: rgba(24, 46, 30, 0.6);
    color: #ffffff;
    font-weight: 600;
}

.article-body code {
    font-size: 0.9em;
    background: rgba(24, 46, 30, 0.6);
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

.article-body pre {
    background: rgba(24, 46, 30, 0.6);
    border-radius: 12px;
    padding: 1em 1.25em;
    overflow-x: auto;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Screens are shared article assets; the phone stays inside the text's grid row. */
.article-screen-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 3rem;
    align-items: stretch;
}

.article-screen-aside {
    min-width: 0;
}

/* Draw the frame outside the image box so the screen keeps its own aspect ratio. */
.article-screen-phone {
    position: sticky;
    top: 6rem;
    width: min(15rem, 27vh);
    aspect-ratio: 1320 / 2868;
    overflow: hidden;
    border-radius: 2rem;
    background: #0d1a12;
    box-shadow: 0 0 0 3px #2a4030, 0 20px 55px -15px rgba(0, 0, 0, 0.65);
}

.article-screen-phone-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    opacity: 0;
    transition: opacity 220ms ease;
}

.article-screen-phone-image.is-active {
    opacity: 1;
}

.article-screen-noscript {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-screen-inline {
    display: none;
}

.article-screen-dialog {
    position: fixed;
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
    padding: 2.5rem 1rem 1rem;
    border: 1px solid #45634c;
    border-radius: 1rem;
    background: #0d1a12;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.article-screen-dialog::backdrop {
    background: rgba(0, 0, 0, 0.82);
}

.article-screen-dialog img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 6rem);
    width: auto;
    height: auto;
    margin: auto;
    border-radius: 0;
}

.article-screen-close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
}

.article-screen-close:focus-visible,
.article-screen-link:focus-visible {
    outline: 3px solid #d4a843;
    outline-offset: 4px;
}

@media (max-width: 1023px) {
    .article-screen-layout {
        display: block;
    }

    .article-screen-aside {
        display: none;
    }

    .article-screen-inline {
        display: block;
        width: min(11.25rem, 60vw);
        margin: 1.25rem auto 1.75rem;
        text-align: center;
    }

    .article-screen-link {
        display: inline-block;
        border: 2px solid #2a4030;
        border-radius: 1.5rem;
        overflow: hidden;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    }

    .article-screen-link img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 0;
    }
}

@media (max-width: 767px) {
    .article-body table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-screen-phone-image {
        transition: none;
    }
}

.article-body hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4a843, transparent);
    margin: 3em auto;
    width: 180px;
}

/* Language switcher: a language without this page is shown but not linked. */
.lang-unavailable {
    color: #2e4a38;
    cursor: default;
}
