/* Route-scoped presentation layer for Article 22. */

.article22-ghost-body {
    --a22-ink: #081321;
    --a22-muted: #526577;
    --a22-line: #dce7ef;
    --a22-paper: #f7fafc;
    --a22-violet: #5b45df;
    --a22-cyan: #17b8dc;
    --a22-lime: #dff4a7;
    color: var(--a22-ink);
    font-size: clamp(1.7rem, 0.4vw + 1.55rem, 1.9rem);
    line-height: 1.68;
}

.article22-ghost-body > * + * {
    margin-top: 2rem;
}

.article22-ghost-body .article-header {
    padding-bottom: clamp(2.4rem, 4vw, 4rem);
    border-bottom: 1px solid var(--a22-line);
}

.article22-ghost-body .lead {
    margin: 0;
    color: #24364a;
    font-size: clamp(2rem, 1vw + 1.65rem, 2.4rem);
    font-weight: 560;
    letter-spacing: -0.015em;
    line-height: 1.5;
}

.article22-ghost-body .scope-callout,
.article22-ghost-body blockquote,
.article22-ghost-body .concise-cta {
    padding: clamp(2.4rem, 5vw, 4rem);
    border: 1px solid #cfe9f1;
    border-radius: 24px;
}

.article22-ghost-body .scope-callout {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8fbff, #f2efff 68%, #fff8e7);
}

.article22-ghost-body .scope-callout::after {
    position: absolute;
    top: -8rem;
    right: -6rem;
    width: 20rem;
    height: 20rem;
    pointer-events: none;
    content: "";
    background: radial-gradient(circle, rgb(119 92 255 / 0.2), transparent 68%);
}

.article22-ghost-body .scope-callout > * {
    position: relative;
    z-index: 1;
}

.article22-ghost-body .scope-callout p,
.article22-ghost-body blockquote p,
.article22-ghost-body .concise-cta p {
    margin: 0;
}

.article22-ghost-body .scope-callout p + p,
.article22-ghost-body blockquote p + p,
.article22-ghost-body .concise-cta p + p {
    margin-top: 1.4rem;
}

.article22-ghost-body .section {
    margin-top: clamp(5.6rem, 9vw, 8.8rem);
}

.article22-ghost-body .section > h2 {
    margin: 0 0 1.8rem;
    color: var(--a22-ink);
    font-size: clamp(3rem, 2.1vw + 2.1rem, 4.4rem);
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.article22-ghost-body .section > h2::before {
    display: block;
    margin-bottom: 0.9rem;
    color: var(--a22-violet);
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.article22-ghost-body .section-contents > h2::before { content: "In this guide"; }
.article22-ghost-body .section-why-good-routing-rules-can-still-conflict > h2::before { content: "Understand the risk"; }
.article22-ghost-body .section-what-rule-order-means > h2::before { content: "Define the order"; }
.article22-ghost-body .section-a-fictional-two-rule-conflict > h2::before { content: "See a conflict"; }
.article22-ghost-body .section-build-a-simple-rule-order-test-sheet > h2::before { content: "Build the test"; }
.article22-ghost-body .section-run-four-tests-before-going-live > h2::before { content: "Challenge the rules"; }
.article22-ghost-body .section-review-failures-without-creating-new-confusion > h2::before { content: "Review one change"; }
.article22-ghost-body .section-common-routing-test-mistakes > h2::before { content: "Avoid these mistakes"; }
.article22-ghost-body .section-a-final-pre-launch-checklist > h2::before { content: "Check before launch"; }
.article22-ghost-body .section-frequently-asked-questions > h2::before { content: "Common questions"; }
.article22-ghost-body .section-your-next-step > h2::before { content: "Next step"; }
.article22-ghost-body .section-sources > h2::before { content: "Source notes"; }

.article22-ghost-body .section > p,
.article22-ghost-body .section > ul,
.article22-ghost-body .section > ol,
.article22-ghost-body .section > blockquote,
.article22-ghost-body .section > div,
.article22-ghost-body .section > aside,
.article22-ghost-body .section > h3 {
    margin-top: 1.6rem;
}

.article22-ghost-body .section h3 {
    color: var(--a22-ink);
    font-size: clamp(2rem, 1vw + 1.7rem, 2.4rem);
    line-height: 1.25;
}

.article22-ghost-body ul,
.article22-ghost-body ol {
    padding-left: 2.4rem;
}

.article22-ghost-body li + li {
    margin-top: 0.65rem;
}

.article22-ghost-body a {
    color: #4632c9;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgb(23 184 220 / 0.65);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22em;
}

.article22-ghost-body a:hover {
    color: #2b1a9b;
}

.article22-ghost-body a:focus-visible,
.article22-ghost-body [tabindex="0"]:focus-visible {
    outline: 3px solid #087ea4;
    outline-offset: 4px;
}

.article22-ghost-body .section-contents {
    padding: clamp(2.4rem, 5vw, 4rem);
    background: var(--a22-paper);
    border: 1px solid var(--a22-line);
    border-radius: 24px;
}

.article22-ghost-body .section-contents ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article22-ghost-body .section-contents li {
    min-width: 0;
    margin: 0;
}

.article22-ghost-body .section-contents a {
    display: block;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid var(--a22-line);
    border-radius: 12px;
    text-decoration: none;
}

.article22-ghost-body blockquote {
    color: #34495d;
    background: var(--a22-paper);
    border-left: 4px solid var(--a22-cyan);
    border-radius: 0 14px 14px 0;
}

.article22-ghost-body .section-a-fictional-two-rule-conflict {
    padding: clamp(2.4rem, 5vw, 4rem);
    color: #d9e5ee;
    background: linear-gradient(145deg, #07111f, #101d2f);
    border-radius: 24px;
    box-shadow: 0 20px 58px rgb(7 17 31 / 0.16);
}

.article22-ghost-body .section-a-fictional-two-rule-conflict > h2,
.article22-ghost-body .section-a-fictional-two-rule-conflict > h3,
.article22-ghost-body .section-a-fictional-two-rule-conflict > p,
.article22-ghost-body .section-a-fictional-two-rule-conflict > ul,
.article22-ghost-body .section-a-fictional-two-rule-conflict > ol {
    color: inherit;
}

.article22-ghost-body .section-a-fictional-two-rule-conflict strong {
    color: #fff;
}

.article22-ghost-body .section-a-fictional-two-rule-conflict > h2::before {
    color: #7de7ff;
}

.article22-ghost-body .section-a-final-pre-launch-checklist ul {
    padding: clamp(2rem, 4vw, 3rem);
    list-style: none;
    background: #f6fbe8;
    border: 1px solid #dcebb5;
    border-radius: 20px;
}

.article22-ghost-body .section-a-final-pre-launch-checklist li {
    padding-left: 0.3rem;
}

.article22-ghost-body .section-frequently-asked-questions h3 {
    margin-top: 2.4rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--a22-line);
}

.article22-ghost-body .section-frequently-asked-questions h3:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.article22-ghost-body .concise-cta {
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgb(119 92 255 / 0.38), transparent 34%),
        radial-gradient(circle at 10% 90%, rgb(34 201 239 / 0.24), transparent 38%),
        #07111f;
    border-color: rgb(125 231 255 / 0.2);
    box-shadow: 0 22px 64px rgb(7 17 31 / 0.2);
}

.article22-ghost-body .concise-cta > h2,
.article22-ghost-body .concise-cta > p {
    color: #fff;
}

.article22-ghost-body .concise-cta > h2::before {
    color: #7de7ff;
}

.article22-ghost-body .concise-cta .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 2.2rem;
    padding: 1.2rem 1.8rem;
    color: var(--a22-ink);
    background: linear-gradient(135deg, #7de7ff, #d8ceff);
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
}

.article22-ghost-body .section-sources {
    padding-top: 2.4rem;
    border-top: 1px solid var(--a22-line);
    font-size: 1.55rem;
}

@media (max-width: 680px) {
    .gh-article:has(.article22-ghost-body) .lc-article-hero {
        padding-inline: 1.8rem;
    }

    .gh-article:has(.article22-ghost-body) .gh-article-title {
        font-size: clamp(3.7rem, 11vw, 4.4rem);
        line-height: 1.04;
        overflow-wrap: normal;
        word-break: normal;
    }

    .article22-ghost-body .section-contents ul {
        grid-template-columns: 1fr;
    }

    .article22-ghost-body .scope-callout,
    .article22-ghost-body .section-contents,
    .article22-ghost-body .section-a-fictional-two-rule-conflict,
    .article22-ghost-body .concise-cta {
        padding: 2.2rem 1.8rem;
        border-radius: 18px;
    }

    .article22-ghost-body .section {
        margin-top: 5.2rem;
    }

    .article22-ghost-body .section > h2 {
        font-size: clamp(2.8rem, 9vw, 3.7rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .article22-ghost-body * {
        scroll-behavior: auto !important;
    }
}

@media print {
    .article22-ghost-body .scope-callout,
    .article22-ghost-body .section-a-fictional-two-rule-conflict,
    .article22-ghost-body .concise-cta {
        color: #000;
        background: #fff;
        border: 1px solid #888;
        box-shadow: none;
    }

    .article22-ghost-body .section-a-fictional-two-rule-conflict > *,
    .article22-ghost-body .concise-cta > * {
        color: #000;
    }
}
