:root {
    --pages-max-width: min(1120px, calc(100% - 2.2rem));
    --pages-surface: rgba(18, 18, 18, 0.86);
    --pages-surface-strong: rgba(11, 11, 11, 0.94);
    --pages-surface-soft: rgba(241, 172, 51, 0.11);
    --pages-border: rgba(241, 172, 51, 0.26);
    --pages-border-soft: rgba(255, 255, 255, 0.14);
    --pages-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.36);
    --pages-text: rgba(255, 255, 255, 0.86);
    --pages-text-soft: rgba(255, 255, 255, 0.7);
    --pages-title: #fff;
}

body {
    color: var(--pages-text);
}

.page-content {
    width: var(--pages-max-width);
    margin: 0 auto;
    padding: clamp(1.4rem, 2.5vw, 2.3rem) 0 clamp(2.8rem, 6vw, 4.8rem);
}

.page-content > section {
    margin-bottom: clamp(1.3rem, 2.8vw, 2.3rem);
}

.page-content > section:last-of-type {
    margin-bottom: 0;
}

.page-content h1,
.page-content h2,
.page-content h3 {
    margin: 0 0 0.75rem;
    color: var(--pages-title);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-content h1 {
    font-size: clamp(2rem, 1.55rem + 1.8vw, 2.95rem);
    line-height: 1.08;
}

.page-content h2 {
    font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.15rem);
}

.page-content h3 {
    font-size: clamp(1.04rem, 0.94rem + 0.58vw, 1.36rem);
}

.page-content p,
.page-content li,
.page-content td,
.page-content th {
    color: var(--pages-text);
    font-size: clamp(0.98rem, 0.95rem + 0.16vw, 1.08rem);
    line-height: 1.7;
}

.page-content p {
    margin: 0 0 0.95rem;
}

.page-content p:last-child,
.page-content li p:last-child,
.page-content td p:last-child,
.page-content th p:last-child {
    margin-bottom: 0;
}

.page-content strong {
    color: var(--pages-title);
}

.page-content a {
    color: #f1ac33;
    text-decoration-color: rgba(241, 172, 51, 0.44);
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.page-content a:hover,
.page-content a:focus-visible {
    color: #ffc45a;
    text-decoration-color: rgba(241, 172, 51, 0.9);
}

.page-hero {
    margin-bottom: clamp(1.1rem, 2.5vw, 1.8rem);
}

.page-hero-copy,
.article-card,
.article-toc,
.spoiler,
figure.article-table-wrap {
    border: 1px solid var(--pages-border);
    border-radius: 1.1rem;
    box-shadow: var(--pages-shadow);
}

.page-hero-copy {
    padding: clamp(1.1rem, 2.3vw, 1.7rem);
    background:
        linear-gradient(145deg, rgba(241, 172, 51, 0.14), rgba(241, 172, 51, 0.03) 44%),
        var(--pages-surface);
}

.page-description {
    margin: 0;
    color: var(--pages-text);
    font-size: clamp(1rem, 0.95rem + 0.36vw, 1.2rem);
}

.article-card {
    padding: clamp(1rem, 2vw, 1.35rem);
    background:
        linear-gradient(145deg, rgba(241, 172, 51, 0.08), rgba(255, 255, 255, 0.01) 56%),
        var(--pages-surface);
}

.page-content ul,
.page-content ol {
    margin: 0 0 1.1rem;
}

.page-content ul {
    list-style: none;
    padding-left: 0;
}

.page-content ul li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.55rem;
}

.page-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-deep));
    transform: translateY(-50%);
}

.page-content ol {
    padding-left: 1.3rem;
}

.page-content ol li {
    margin-bottom: 0.5rem;
}

figure {
    margin: 0;
}

.article-media {
    margin: 1rem auto 1.3rem;
    text-align: center;
}

.article-media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border-radius: 0.95rem;
    box-shadow: var(--pages-shadow);
}

.article-media figcaption {
    margin-top: 0.62rem;
    color: var(--pages-text-soft);
    font-size: 0.94rem;
}

.article-media-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.9rem;
    padding: 0.72rem 1.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #000;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-deep));
    box-shadow: var(--shadow-brand);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.page-content a.article-media-cta,
.page-content a.article-media-cta:hover,
.page-content a.article-media-cta:focus-visible {
    color: #000;
    text-decoration: none;
}

.article-media-cta:hover,
.article-media-cta:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.article-media-cta.is-pulse {
    animation: ctaPulse 2.2s ease-in-out infinite;
}

@keyframes ctaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(241, 172, 51, 0.46), var(--shadow-brand);
    }

    70% {
        box-shadow: 0 0 0 0.72rem rgba(241, 172, 51, 0), var(--shadow-brand);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(241, 172, 51, 0), var(--shadow-brand);
    }
}

.article-banner {
    position: relative;
    margin: 1.05rem 0 1.35rem;
    overflow: hidden;
    border-radius: 1.1rem;
    box-shadow: var(--pages-shadow);
}

.article-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 1.1rem;
}

.article-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.55rem;
    padding: clamp(1rem, 2.3vw, 1.8rem);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 52%, rgba(0, 0, 0, 0.32) 100%);
}

.article-banner-overlay p {
    margin: 0;
    max-width: 32rem;
    color: #fff;
    font-size: clamp(0.95rem, 0.85rem + 0.48vw, 1.26rem);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
}

.article-side-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 350px);
    gap: clamp(1rem, 2.2vw, 1.5rem);
    align-items: start;
}

.article-side-copy > :last-child {
    margin-bottom: 0;
}

.article-side-layout .article-media {
    margin: 0;
}

.article-side-layout .article-media img {
    width: auto;
    max-width: 100%;
}

.article-side-layout .article-media-small img {
    max-width: 350px;
}

figure.article-table-wrap {
    margin: 1rem 0 1.35rem;
    overflow-x: auto;
    background: var(--pages-surface-strong);
}

figure.article-table-wrap table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

figure.article-table-wrap th,
figure.article-table-wrap td {
    padding: 0.72rem 0.82rem;
    border-bottom: 1px solid var(--pages-border-soft);
    text-align: left;
    vertical-align: top;
}

figure.article-table-wrap th {
    color: var(--pages-title);
    font-weight: 700;
    background: rgba(241, 172, 51, 0.12);
}

figure.article-table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.article-toc {
    margin: 1rem 0 1.3rem;
    overflow: hidden;
    background: var(--pages-surface-strong);
}

.article-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0.86rem 1rem;
    list-style: none;
    color: var(--pages-title);
    font-size: 0.83rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    cursor: pointer;
}

.article-toc summary::-webkit-details-marker {
    display: none;
}

.article-toc summary::after {
    content: "▾";
    font-size: 1rem;
    line-height: 1;
    color: var(--color-brand);
    transition: transform 180ms ease;
}

.article-toc[open] summary {
    border-bottom: 1px solid var(--pages-border-soft);
}

.article-toc[open] summary::after {
    transform: rotate(180deg);
}

.article-toc nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.8rem 1rem 1rem;
}

.article-toc ol {
    margin: 0;
    padding-left: 1.2rem;
}

.article-toc li {
    margin-bottom: 0.42rem;
}

.article-toc li:last-child {
    margin-bottom: 0;
}

.article-toc a {
    display: block;
    line-height: 1.45;
}

.article-toc nav > a {
    margin: 0;
}

.faq-group {
    margin-top: 1rem;
    display: grid;
    gap: 0.68rem;
}

.spoiler {
    background: linear-gradient(145deg, rgba(241, 172, 51, 0.08), rgba(255, 255, 255, 0.01)), var(--pages-surface);
}

p.spoiler-toggle {
    margin: 0;
    padding: 0.85rem 1rem;
    position: relative;
    color: var(--pages-title);
    font-weight: 700;
    line-height: 1.45;
    cursor: pointer;
}

p.spoiler-toggle::after {
    content: "▾";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-brand);
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.spoiler.active p.spoiler-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}

/* table styling fallback for raw figure > table markup */
.page-content figure > table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.page-content figure > table th,
.page-content figure > table td {
    padding: 0.72rem 0.82rem;
    border-bottom: 1px solid var(--pages-border-soft);
    text-align: left;
    vertical-align: top;
}

.page-content figure > table th {
    color: var(--pages-title);
    font-weight: 700;
    background: rgba(241, 172, 51, 0.12);
}

.page-content figure > table tbody tr:last-child td {
    border-bottom: none;
}

.page-content figure:has(> table) {
    margin: 1rem 0 1.35rem;
    overflow-x: auto;
    border: 1px solid var(--pages-border);
    border-radius: 1.1rem;
    box-shadow: var(--pages-shadow);
    background: var(--pages-surface-strong);
}

.article-banner-overlay p {
    max-width: 36rem;
    color: #ffd76a;
    font-size: clamp(1.2rem, 1rem + 1.1vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
}

p.spoiler-toggle:focus-visible {
    outline: 2px solid rgba(241, 172, 51, 0.7);
    outline-offset: 2px;
}

.spoiler-content {
    display: none;
    padding: 0.8rem 1rem 0.95rem;
    border-top: 1px solid transparent;
    color: var(--pages-text);
    background: rgba(0, 0, 0, 0.18);
}

.spoiler.active .spoiler-content {
    display: block;
    border-top-color: var(--pages-border-soft);
}

@media screen and (max-width: 900px) {
    .article-side-layout {
        grid-template-columns: 1fr;
    }

    .article-side-layout .article-media,
    .article-side-layout .article-media-small {
        justify-self: center;
    }

    figure.article-table-wrap table {
        min-width: 500px;
    }
}

@media screen and (max-width: 640px) {
    .page-content {
        width: min(100% - 1.2rem, 1120px);
    }

    .article-banner-overlay {
        justify-content: center;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.58) 100%);
    }

    .article-banner-overlay p {
        max-width: 100%;
    }

    p.spoiler-toggle {
        padding-right: 2.2rem;
    }
}
