/* WagerX onboarding feature — midnight ink, electric chartreuse and warm paper.
   Loaded only for this story; every rule stays inside its article or page scope. */
body:has(.wx-onboarding) {
    --wx-ink: #10231f;
    --wx-muted: #536660;
    --wx-line: rgba(20, 55, 46, .16);
    --wx-panel: #f0f4e9;
    --wx-lime: #d5f36b;
    --wx-teal: #087d70;
    --wx-coral: #ff816e;
}

[data-theme="dark"] body:has(.wx-onboarding) {
    --wx-ink: #edf4e7;
    --wx-muted: #b1c0b8;
    --wx-line: rgba(219, 239, 218, .17);
    --wx-panel: #1d302c;
    --wx-lime: #d5f36b;
    --wx-teal: #85d8c2;
    --wx-coral: #ff9b8b;
}

.wx-onboarding {
    --wx-copy: var(--text-heading, var(--wx-ink));
    --wx-soft: var(--text-secondary, var(--wx-muted));
    --wx-surface: var(--surface, var(--wx-panel));
    --wx-paper: var(--bg, var(--wx-panel));
    max-width: 790px;
    margin: 0 auto;
    color: var(--wx-copy);
    font-family: "DM Sans", "Avenir Next", Avenir, sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.06rem);
    line-height: 1.78;
    overflow-wrap: anywhere;
}

.wx-onboarding *,
.wx-onboarding *::before,
.wx-onboarding *::after { box-sizing: border-box; }

.wx-onboarding p { margin: 0 0 1.1rem; }
.wx-onboarding strong { color: var(--wx-copy); }
.wx-onboarding h2,
.wx-onboarding h3 {
    color: var(--wx-copy);
    font-family: "Outfit", "Avenir Next", sans-serif;
    letter-spacing: -.035em;
}
.wx-onboarding a {
    color: var(--wx-teal);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .18s ease, text-decoration-color .18s ease;
}
.wx-onboarding a:hover { color: var(--wx-coral); }
.wx-onboarding a:focus-visible,
.wx-onboarding summary:focus-visible {
    outline: 3px solid var(--wx-coral);
    outline-offset: 4px;
    border-radius: 3px;
}

.wx-article-intro {
    padding: clamp(1.35rem, 4vw, 2.8rem) clamp(1rem, 3vw, 2.2rem) 1.35rem;
    border-top: 5px solid var(--wx-lime);
    background:
        linear-gradient(115deg, rgba(213, 243, 107, .15), transparent 48%),
        var(--wx-surface);
    border-radius: 3px 3px 20px 20px;
}
.wx-article-intro .wx-eyebrow,
.wx-kicker,
.wx-callout-label {
    color: var(--wx-teal);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.4;
    margin: 0 0 .45rem;
    text-transform: uppercase;
}
.wx-article-intro .wx-eyebrow span { color: var(--wx-coral); padding: 0 .3rem; }
.wx-onboarding .wx-article-intro h2 {
    max-width: 680px;
    margin: 0 0 1.05rem;
    font-size: clamp(2rem, 6vw, 3.55rem);
    line-height: .99;
}
.wx-article-intro .wx-deck {
    max-width: 690px;
    color: var(--wx-copy);
    font-size: clamp(1.13rem, 2vw, 1.32rem);
    line-height: 1.5;
    font-weight: 550;
}
.wx-snapshot {
    display: block;
    margin: 1.5rem 0 0 !important;
    padding: .9rem 1rem;
    border-left: 3px solid var(--wx-coral);
    background: color-mix(in srgb, var(--wx-coral) 10%, var(--wx-surface));
    color: var(--wx-soft);
    font-size: .89rem;
    line-height: 1.6;
}
.wx-snapshot-mark {
    display: inline-block;
    width: .62rem;
    height: .62rem;
    margin-right: .4rem;
    border-radius: 50%;
    background: var(--wx-coral);
    flex: 0 0 auto;
}

.wx-contents {
    margin: 1.4rem 0 2.8rem;
    padding: clamp(1.05rem, 3vw, 1.65rem);
    border: 1px solid var(--wx-line);
    border-radius: 16px;
    background: var(--wx-paper);
}
.wx-contents-heading {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .7rem;
}
.wx-contents-heading strong {
    font-family: "Outfit", sans-serif;
    font-size: 1.08rem;
}
.wx-index {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--wx-lime);
    color: #183027;
    font-family: "Spline Sans Mono", monospace;
    font-size: .72rem;
    font-weight: 800;
}
.wx-contents ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem 1.4rem;
    margin: 0;
    padding: .2rem 0 0 2.7rem;
}
.wx-contents li { padding: .16rem 0; }
.wx-contents a {
    color: var(--wx-copy);
    font-size: .92rem;
    font-weight: 650;
    text-decoration-color: var(--wx-lime);
    text-decoration-thickness: 2px;
}

.wx-section {
    margin: 0 0 clamp(2.8rem, 7vw, 4.8rem);
    scroll-margin-top: 7rem;
}
.wx-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 0 1.2rem;
}
.wx-section-heading .wx-index { margin-top: .18rem; }
.wx-onboarding .wx-section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.08;
}
.wx-section-heading .wx-kicker { margin-bottom: .35rem; }
.wx-section h3 {
    margin: 1.75rem 0 .55rem;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    line-height: 1.25;
}
.wx-section > p { max-width: 740px; }

.wx-route-list {
    display: grid;
    grid-template-columns: 1fr;
    margin: 1.5rem 0;
    border-top: 1px solid var(--wx-line);
}
.wx-route {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: .9rem;
    padding: 1.15rem .15rem;
    border-bottom: 1px solid var(--wx-line);
}
.wx-route-no {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px 8px 8px 2px;
    background: var(--wx-lime);
    color: #183027;
    font-family: "Spline Sans Mono", monospace;
    font-size: .76rem;
    font-weight: 800;
}
.wx-route h3 { margin: .05rem 0 .32rem; font-size: 1.12rem; }
.wx-route p { margin: 0; color: var(--wx-soft); font-size: .96rem; line-height: 1.68; }

.wx-callout {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.1rem 1.25rem 1.1rem 1.45rem;
    border-radius: 4px 15px 15px 4px;
    color: var(--wx-copy);
    overflow: hidden;
}
.wx-callout::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--wx-coral);
    content: "";
}
.wx-callout p:last-child { margin-bottom: 0; }
.wx-callout-label { color: inherit; opacity: .82; }
.wx-callout-citrus {
    background: color-mix(in srgb, var(--wx-lime) 22%, var(--wx-surface));
}
.wx-callout-citrus::before { background: #b2d63e; }
.wx-callout-lilac {
    background: color-mix(in srgb, #baafff 17%, var(--wx-surface));
}
.wx-callout-lilac::before { background: #9382e8; }

.wx-section-audit {
    padding: clamp(1rem, 3vw, 1.7rem);
    border: 1px solid var(--wx-line);
    border-radius: 20px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--wx-teal) 6%, var(--wx-surface)), var(--wx-surface) 55%);
}
.wx-test-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 1.4rem 0 1.7rem;
    border: 1px solid var(--wx-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--wx-line);
}
.wx-test-strip > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: .8rem .85rem;
    background: var(--wx-surface);
}
.wx-test-strip span {
    color: var(--wx-teal);
    font-family: "Spline Sans Mono", monospace;
    font-size: .68rem;
    font-weight: 700;
}
.wx-test-strip strong {
    margin: .18rem 0;
    font-family: "Outfit", sans-serif;
    font-size: 1rem;
}
.wx-test-strip small { color: var(--wx-soft); font-size: .75rem; line-height: 1.4; }

.wx-example-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.4rem 0 .65rem;
}
.wx-example {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--wx-line);
    border-radius: 15px;
    background: var(--wx-surface);
    transition: transform .2s ease, border-color .2s ease;
}
.wx-example:hover { transform: translateY(-3px); border-color: var(--wx-teal); }
.wx-example-art {
    display: grid;
    place-items: center;
    height: 150px;
    padding: 1rem;
    background:
        radial-gradient(ellipse at 15% 100%, rgba(213, 243, 107, .22), transparent 55%),
        #14231f;
}
.wx-example-art img {
    display: block;
    width: min(100%, 170px);
    max-height: 112px;
    object-fit: contain;
    border-radius: 8px;
}
.wx-example-copy { padding: 1rem 1.05rem 1.15rem; }
.wx-example-copy h3 { margin: .6rem 0 .25rem; }
.wx-example-copy p { margin: 0; color: var(--wx-soft); font-size: .9rem; line-height: 1.55; }
.wx-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .32rem .52rem;
    border: 1px solid color-mix(in srgb, var(--wx-teal) 38%, transparent);
    border-radius: 999px;
    color: var(--wx-teal);
    font-size: .69rem;
    font-weight: 800;
    line-height: 1.25;
}
.wx-status span {
    width: .44rem;
    height: .44rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--wx-coral);
}
.wx-fineprint { color: var(--wx-soft); font-size: .82rem; }

.wx-independence {
    padding: clamp(1.15rem, 3.5vw, 2rem);
    border-radius: 18px;
    background: color-mix(in srgb, var(--wx-coral) 8%, var(--wx-surface));
    border: 1px solid color-mix(in srgb, var(--wx-coral) 28%, var(--wx-line));
}
.wx-responsible {
    padding: 1.35rem clamp(1.1rem, 3vw, 1.7rem);
    border-left: 4px solid var(--wx-lime);
    background: var(--wx-paper);
}
.wx-responsible h2 {
    margin: .25rem 0 .55rem;
    font-size: clamp(1.45rem, 3.4vw, 1.9rem);
    line-height: 1.1;
}
.wx-responsible p:last-child { margin-bottom: 0; }

.wx-faq details {
    margin: .55rem 0;
    padding: .05rem 1rem;
    border: 1px solid var(--wx-line);
    border-radius: 11px;
    background: var(--wx-paper);
}
.wx-faq summary {
    position: relative;
    padding: .85rem 1.8rem .85rem 0;
    color: var(--wx-copy);
    cursor: pointer;
    font-family: "Outfit", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
    list-style: none;
}
.wx-faq summary::-webkit-details-marker { display: none; }
.wx-faq summary::after {
    position: absolute;
    top: .78rem;
    right: .1rem;
    color: var(--wx-teal);
    content: "+";
    font-family: "Spline Sans Mono", monospace;
    font-size: 1.2rem;
}
.wx-faq details[open] summary::after { content: "−"; }
.wx-faq details p { color: var(--wx-soft); font-size: .95rem; }

.wx-article-end {
    margin-top: 3rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--wx-line);
}
.wx-article-end .wx-end-rule {
    display: block;
    width: 3.5rem;
    height: 5px;
    margin-bottom: 1.1rem;
    border-radius: 6px;
    background: var(--wx-lime);
}
.wx-article-end p { font-size: 1.12rem; }
.wx-article-end > a { display: inline-flex; gap: .6rem; align-items: center; }

@media (max-width: 640px) {
    .wx-contents ol { grid-template-columns: 1fr; padding-left: 1.15rem; }
    .wx-test-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wx-example-grid { grid-template-columns: 1fr; }
    .wx-example-art { height: 130px; }
    .wx-section-heading { gap: .7rem; }
}
@media (max-width: 360px) {
    .wx-article-intro { padding-inline: .85rem; }
    .wx-section-audit { padding: .85rem; }
    .wx-section-heading .wx-index { width: 1.75rem; height: 1.75rem; }
    .wx-route { grid-template-columns: 2rem minmax(0, 1fr); gap: .6rem; }
    .wx-callout { padding-right: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
    .wx-onboarding *,
    .wx-onboarding *::before,
    .wx-onboarding *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
