body {
    margin: 0px;

    background-color: var(--background-primary);
    color: var(--text-primary);

    font-family: Inter, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
    font-family: var(--font-body);
    font-size: 100%;
    font-size: var(--base-font-size);
    line-height: 1.75;
    line-height: var(--font-content-line-height);
    text-rendering: optimizeSpeed;

    accent-color: var(--accent-primary);
    color: var(--text-primary);
    scrollbar-color: var(--scrollbar-color) var(--scrollbar-bg);
}

.container {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--max-width);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* Top navigation header */

.top-navigation-container {
    border-bottom: 1px solid var(--border-primary);
    width: 100%;
    height: var(--top-nav-height);
}

.top-navigation {
    height: var(--top-nav-height);

    display: flex;
    align-items: center;
    gap: calc(2 * var(--gutter));

    /* Prevent text from wrapping to the next line */
    white-space: nowrap;
}

.top-navigation-main {
    display: flex;
    justify-content: flex-end;
    gap: var(--gutter);
    /* Occupy all available space */
    flex: 1 1;
    overflow: auto;
}

.title-logo {
    text-decoration: none;
    color: inherit;
}

.nav-link {
    text-decoration: none;
    color: inherit;
}

.nav-link:focus,
.nav-link:hover {
    text-decoration: none;
    color: var(--button-secondary-hover);
}

.nav-link:active {
    color: var(--button-secondary-active);
}

/* Main page content */

.blog-container {
    min-height: calc(100vh - var(--top-nav-height));
    padding: 2rem 1rem;
}

.blog-container>header>h1 {
    margin: 0 auto 2rem;
    width: fit-content;
}

.article-list {
    column-gap: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media screen and (max-width: 992px) {
    .article-list {
        grid-template-columns: auto;
    }
}

.blog-container article {
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    display: grid;
    grid-row: span 6;
    grid-template-rows: subgrid;
    margin-top: 2rem;
    padding: 2rem;
}

.blog-container article header {
    display: grid;
    flex-direction: column;
    grid-row: span 3;
    grid-template-rows: subgrid;
}

.blog-container a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-container a:visited {
    color: var(--text-visited);
}

.blog-container a:focus,
.blog-container a:hover {
    text-decoration: underline;
}

.blog-container a:not(.button):active,
.blog-container a:not(.button):active:visited {
    background-color: var(--text-link);
    color: #fff;
}

.article-image {
    margin: 0 auto 0;
}

.article-image img {
    max-height: 200px;
    width: auto;
}

/* Figures are better with more space before text.*/
figure {
    margin: 2rem auto 2rem;
}

/* Post cover image needs no gap before it */
article>figure:first-of-type {
    margin: 0 auto 2rem;
}

figure>img {
    /*To make small ones go into the middle*/
    display: flex;
    margin: .5rem auto
}

figure>.multi-img-figure {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin: .5rem auto;
}

@media (min-width: 665px) {
    .small-figure {
        max-width: 80%;
    }
}

figure>figcaption {
    text-align: center;
}

img {
    max-width: 100%;

    border: none !important;
    border-radius: var(--elem-radius);
    color: #1b1b1b;
}

/* Screenshots from Pokémon RBY and GSC */
.screenshot {
    border-radius: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.button {
    --button-bg: var(--button-primary-default);
    --button-bg-hover: var(--button-primary-hover);
    --button-bg-active: var(--button-primary-active);
    --button-border-color: var(--button-primary-default);
    --button-focus-effect: var(--focus-effect);
    --button-height: var(--form-elem-height, 2rem);
    --button-color: var(--background-primary);
    --button-font: var(--type-emphasis-m);
    --button-padding: 0.5rem;
    --button-radius: var(--elem-radius, 0.25rem);
    border-radius: var(--button-radius);
    cursor: pointer;
    display: inline-block;
    padding: 0;
    text-decoration: none;
}

.button:hover .button-wrap {
    background-color: var(--button-bg-hover, var(--button-bg));
}

.button:active .button-wrap {
    background-color: var(--button-bg-active, var(--button-bg));
}

/* Article page content */

.blog-post-container {
    display: grid;
    gap: 3rem;
    grid-gap: 3rem;
    grid-template-areas: "post";
    min-height: calc(100vh - var(--top-nav-height));
}

@media (min-width: 992px) {
    .blog-post-container {
        grid-template-areas: "post toc";
        grid-template-columns: minmax(auto, 100%) minmax(0, 12rem);
    }
}

@media (min-width: 1200px) {
    .blog-post-container {
        grid-template-areas: "place post toc";
        grid-template-columns: minmax(auto, 1fr) minmax(0, 52rem) minmax(15rem, 1fr);
    }
}

@media (min-width: 1441px) {
    .blog-post-container {
        grid-template-areas: "toc post place";
        grid-template-columns: minmax(15rem, 1fr) minmax(0, 70rem) minmax(15rem, 1fr);
    }
}

.blog-post h1 {
    font-size: var(--type-heading-h1-font-size);
    line-height: var(--heading-line-height);
    margin: 0 0 .5rem;
}

.blog-post h2 {
    font-size: var(--type-heading-h2-font-size);
    line-height: var(--heading-line-height);
    margin: 2rem 0 .5rem;
}

.blog-post h3 {
    font-size: var(--type-heading-h3-font-size);
    line-height: var(--heading-line-height);
    margin: 2rem 0 .5rem;
}

.blog-post h4 {
    font-size: var(--type-heading-h4-font-size);
    line-height: var(--heading-line-height);
    margin: 2rem 0 .5rem;
}

.blog-post a {
    color: var(--text-link);
    text-decoration: underline;
}

.blog-post a:visited {
    color: var(--text-visited);
}

.blog-post a:focus,
.blog-post a:hover {
    text-decoration: none;
}

.blog-post a:not(.button):active,
.blog-post a:not(.button):active:visited {
    background-color: var(--text-link);
    color: #fff;
}

.blog-post-container>.toc-container {
    --offset: var(--top-nav-height);
    display: none;
}

@media screen and (min-width: 992px) {
    .blog-post-container>.toc-container {
        display: flex;
        flex-direction: column;
        grid-area: toc;
    }
}

@media screen and (min-width: 1441px) {
    .blog-post-container>.toc-container {
        display: contents;
    }
}

.blog-post-container>.toc-container .toc {
    height: max-content;
    max-height: 100vh;
    overflow: auto;

    position: sticky;
    top: 0;
}

/* Table of contents (TOC) */

.document-toc {
    margin: 2rem 0 2rem;
    padding: 0;
}

.document-toc-heading {
    font: var(--type-heading-h5);
    letter-spacing: 1.5px;
    margin: 0 0 1rem;
}

.document-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-toc>ul ul {
    padding-left: 1rem;
}

.document-toc>ul>li {
    border-left: 2px solid var(--border-secondary);
}

.document-toc li>a {
    font-size: var(--type-smaller-font-size);
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: .25rem 1rem
}

.document-toc li>a:hover {
    color: var(--text-link);
}

/* The scanner app */

.app-control-panel {
    display: flex;
    justify-content: space-between;
    gap: var(--gutter);
    flex-wrap: wrap;
}

.control-button:hover {
    cursor: pointer;
}

.media {
    border: 1px solid black;
    max-width: 100%;
}

.hidden {
    display: none;
}

/* Instructions */

.blog-post {
    grid-area: post;
    max-width: 150rem;

    padding: 2rem 1rem;
}

.blog-post>h1 {
    margin-top: 0;
}

pre {
    background-color: var(--code-background-block);
    border: 1px solid transparent;
    margin: 1rem 0 2rem;
    padding: 1rem 2.5rem 1rem 1rem;
}

.code-example,
code,
pre {
    border-radius: var(--elem-radius);
    font-family: var(--font-code);
    font-size: var(--type-smaller-font-size);
    background-color: var(--code-background-inline);
}

pre {
    overflow: auto;
}

/* External link favicon */

/*
The favicon is placed within the ::before pseudo-element so
modify that to modify the icon itself.
*/
.fa-external-link::before {
    margin-left: 0.2rem;
    color: var(--icon-primary);
    font-size: .857rem;
}

/* 
Alternative non-favicon approach for external link icon 
.fa-external-link::after {
    content: "🔗"
} 
*/

/* Page footer */

.page-footer-container {
    width: 100%;
    background-color: var(--background-secondary);
    min-height: var(--top-nav-height);
}

.page-footer {
    background-color: var(--background-secondary);
    padding: 2rem 1rem;
    position: relative;

    color: var(--text-secondary);
    font-size: var(--type-tiny-font-size);
}

.page-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.page-footer a:hover {
    text-decoration: none;
}

.page-footer .fa-external-link::before {
    margin-left: 0.1rem;
    color: var(--icon-primary);
    font-size: .75rem;
}

:root {
    --text-primary: #fff;
    --text-secondary: #cdcdcd;
    --text-active: #858585;
    --text-inactive: #cdcdcda6;
    --text-link: #8cb4ff;
    --text-visited: #ffadff;
    --text-invert: #1b1b1b;
    --background-primary: #1b1b1b;
    --background-secondary: #343434;
    --background-tertiary: #4e4e4e;
    --background-toc-active: #343434;
    --background-mark-yellow: rgba(199, 183, 0, .4);
    --background-mark-green: rgba(0, 208, 97, .4);
    --background-information: rgba(0, 133, 242, .1);
    --background-warning: rgba(255, 42, 81, .1);
    --background-critical: rgba(211, 0, 56, .1);
    --background-success: rgba(0, 121, 54, .1);
    --border-primary: #858585;
    --border-secondary: #696969;
    --button-primary-default: #fff;
    --button-primary-hover: #cdcdcd;
    --button-primary-active: #9e9e9e;
    --button-primary-inactive: #fff;
    --button-secondary-default: #4e4e4e;
    --button-secondary-hover: #858585;
    --button-secondary-active: #9e9e9e;
    --button-secondary-inactive: #4e4e4e;
    --button-secondary-border-focus: #0085f2;
    --button-secondary-border-red: #ff97a0;
    --button-secondary-border-red-focus: #ffd9dc;
    --icon-primary: #fff;
    --icon-secondary: #b3b3b3;
    --icon-information: #5e9eff;
    --icon-warning: #afa100;
    --icon-critical: #ff707f;
    --icon-success: #00b755;
    --accent-primary: #5e9eff;
    --accent-primary-engage: rgba(94, 158, 255, .1);
    --accent-secondary: #5e9eff;
    --accent-tertiary: rgba(0, 133, 242, .1);
    --shadow-01: 0 1px 2px rgba(251, 251, 254, .2);
    --shadow-02: 0 1px 6px rgba(251, 251, 254, .2);
    --focus-01: 0 0 0 3px rgba(251, 251, 254, .5);
    --field-focus-border: #fff;
    --code-token-tag: #c1cff1;
    --code-token-punctuation: #b3b3b3;
    --code-token-attribute-name: #ff97a0;
    --code-token-attribute-value: #00d061;
    --code-token-comment: #b3b3b3;
    --code-token-default: #fff;
    --code-token-selector: #bea5ff;
    --code-background-inline: #343434;
    --code-background-block: #343434;
    --notecard-link-color: #e2e2e2;
    --scrollbar-bg: transparent;
    --scrollbar-color: hsla(0, 0%, 100%, .25);
    --category-color: #8cb4ff;
    --category-color-background: #8cb4ff70;
    --code-color: #c1cff1;
    --mark-color: #004d92;
    --plus-accent-color: #ff97a0;
    --html-accent-color: #ff707f;
    --css-accent-color: #8cb4ff;
    --js-accent-color: #afa100;
    --http-accent-color: #00b755;
    --apis-accent-color: #ae8aff;
    --learn-accent-color: #ff6d91;
    --plus-code-color: #c1cff1;
    --html-code-color: #f9f9fb;
    --css-code-color: #c1cff1;
    --js-code-color: #c7b700;
    --http-code-color: #00d061;
    --apis-code-color: #bea5ff;
    --learn-code-color: #ff93aa;
    --plus-mark-color: #9e0027;
    --html-mark-color: #9e0027;
    --css-mark-color: #004d92;
    --js-mark-color: #564e00;
    --http-mark-color: #005a26;
    --apis-mark-color: #6800cf;
    --learn-mark-color: #9e0041;
    --plus-accent-background-color: #ff2a5130;
    --html-accent-background-color: #ff2a5130;
    --css-accent-background-color: #0085f230;
    --js-accent-background-color: #93870030;
    --http-accent-background-color: #009a4630;
    --apis-accent-background-color: #9b65ff30;
    --learn-accent-background-color: #ff1f7230;
    --plus-accent-engage: rgba(255, 112, 127, .7);
    --html-accent-engage: rgba(255, 112, 127, .7);
    --css-accent-engage: rgba(140, 180, 255, .7);
    --js-accent-engage: rgba(175, 161, 0, .7);
    --http-accent-engage: rgba(0, 183, 85, .7);
    --apis-accent-engage: rgba(174, 138, 255, .7);
    --learn-accent-engage: rgba(255, 109, 145, .7);
    --modal-backdrop-color: rgba(27, 27, 27, .7);
    --blend-color: #00080;
    --text-primary-red: #ff97a0;
    --text-primary-green: #00d061;
    --text-primary-blue: #8cb4ff;
    --text-primary-yellow: #c7b700;
    --collections-link: #ff97a0;
    --collections-header: #40000a;
    --collections-mandala: #9e0027;
    --collections-icon: #d30038;
    --updates-link: #8cb4ff;
    --updates-header: #000;
    --updates-mandala: #c1cff1;
    --updates-icon: #8cb4ff;
    --ai-help-link: #00d061;
    --ai-help-header: #000;
    --ai-help-mandala: #73e693;
    --ai-help-icon: #00d061;
    --form-limit-color: #9e9e9e;
    --form-limit-color-emphasis: #b3b3b3;
    --form-invalid-color: #ff97a0;
    --form-invalid-focus-color: #ff707f;
    --form-invalid-focus-effect-color: rgba(255, 112, 127, .2);
    --baseline-supported-bg: #0e2a10;
    --baseline-supported-engine-bg: #031b05;
    --baseline-supported-img: url(/static/media/check-dark.d4afc065518a392c0e02.svg);
    --baseline-unsupported-bg: #282a2c;
    --baseline-unsupported-engine-bg: #1d1e1f;
    --baseline-unsupported-img: url(/static/media/cross-dark.afc61913fda0ae05ee1c.svg);
    --baseline-browser-supported-bg: #5bb974;
    --baseline-browser-unsupported-bg: #9aa0a6;
    color-scheme: dark;

    --font-fallback: BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --font-body: Inter, var(--font-fallback);
    --font-heading: Inter, var(--font-fallback);
    --font-code: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    --base-font-size: 100%;
    --base-line-height: 1.2;
    --intermediate-line-height: 1.5;
    --heading-line-height: var(--base-line-height);
    --heading-letter-spacing: -0.031rem;
    --font-content-line-height: 1.75;
    --font-body-strong-weight: 600;
    --type-heading-h1-font-size: 2.488rem;
    --type-heading-h2-font-size: 2.074rem;
    --type-heading-h3-font-size: 1.728rem;
    --type-heading-h4-font-size: 1.44rem;
    --type-heading-h5-font-size: 1.2rem;
    --type-base-font-size-rem: 1rem;
    --type-smaller-font-size: 0.833rem;
    --type-tiny-font-size: 0.694rem;
    --type-heading-h1-font-size-mobile: 1.802rem;
    --type-heading-h2-font-size-mobile: 1.602rem;
    --type-heading-h3-font-size-mobile: 1.424rem;
    --type-heading-h4-font-size-mobile: 1.266rem;
    --type-emphasis-m: var(--font-body-strong-weight) var(--type-smaller-font-size) /1.23 var(--font-body);
    --type-label-s: 600 var(--type-tiny-font-size) /1.2 var(--font-heading);
    --type-heading-h1: 600 var(--type-heading-h1-font-size-mobile) /var(--heading-line-height) var(--font-heading);
    --type-heading-h2: 500 var(--type-heading-h2-font-size-mobile) /var(--heading-line-height) var(--font-heading);
    --type-heading-h3: 300 var(--type-heading-h3-font-size-mobile) /var(--heading-line-height) var(--font-heading);
    --type-heading-h4: 400 var(--type-heading-h4-font-size-mobile) /var(--heading-line-height) var(--font-heading);
    --type-heading-h5: 400 var(--type-heading-h5-font-size) /var(--heading-line-height) var(--font-heading);
    --type-heading-h6: 400 var(--type-base-font-size-rem) /var(--heading-line-height) var(--font-heading);
    --type-article-p: 400 var(--type-base-font-size-rem) /var(--font-content-line-height) var(--font-body);
    --max-width: 1440px;
    --gutter: 1rem;
    --top-navigation-height: 4rem;
    --top-navigation-offset: -4rem;
    --top-banner-inner-height: 3.125rem;
    --top-banner-height: calc(var(--top-banner-inner-height) + 0.25rem);
    --top-banner-outer-height: calc(var(--top-banner-height) + 2px);
    --z-index-a11y: 10000;
    --z-index-modal-content: 801;
    --z-index-modal-overlay: 800;
    --z-index-main-header: 700;
    --z-index-sidebar-mobile: 600;
    --z-index-mid: 500;
    --z-index-nav-menu: 200;
    --z-index-search-results: 101;
    --z-index-low: 100;
    --z-index-search-results-home: 99;
    --z-index-back: -1;
    --elem-radius: 0.25rem;
    --focus-effect: 0 0 0 3px var(--accent-primary-engage);
    --form-elem-height: 2rem;
    --top-nav-height: 4rem;
    --article-actions-container-height: 2rem;
    --icon-size: 1rem;
    --sticky-header-without-actions-height: calc(var(--top-nav-height) + 1px);
    --sticky-header-with-actions-height: calc(var(--sticky-header-without-actions-height) + var(--article-actions-container-height) + 1px);
}