/*
 * site.css
 * domainmod.org's own layout, in the minimal and modern direction (mockup C): lots of space, type-led sections, the
 * screenshots in a browser window, and the red only for the main buttons, a dot, and short section markers. Colours
 * come from domainmod-tokens.css. Page-specific styles sit under the page's class on <body>.
 */

/* The page */
.dm-body {
    --dm-site-page: #ffffff;
    --dm-site-line: #e3e6ea;
    --dm-site-frame: #f1f3f5;
    --dm-site-frame-line: #dee2e6;
    --dm-site-muted: #5c636a;
    background-color: var(--dm-site-page);
}
[data-bs-theme="dark"] .dm-body {
    --dm-site-page: #2e3440;
    --dm-site-line: #434c5e;
    --dm-site-frame: #3b4252;
    --dm-site-frame-line: #4c566a;
    --dm-site-muted: #b5bdcd;
}
.dm-muted {
    color: var(--dm-site-muted);
}
.dm-muted a {
    text-decoration: underline;
}

/* Header. From the lg breakpoint up it stays at the top, so focused elements scroll clear of it. */
@media (min-width: 992px) {
    html {
        scroll-padding-top: 6.5rem;
    }
}
.dm-header {
    background-color: var(--dm-site-page);
    border-block-end: 1px solid var(--dm-site-line);
}
.dm-header .navbar {
    padding-block: 1.25rem;
}
.dm-header .navbar-brand img {
    height: 1.875rem;
    width: auto;
}
/* More room between the menu links (Bootstrap's own padding rule wins over a plain padding, so set its variable) */
.dm-header .navbar-nav {
    --bs-navbar-nav-link-padding-x: 1.125rem;
}
.dm-header .nav-link {
    color: var(--bs-body-color);
    padding-inline: 1rem;
}
.dm-header .nav-link:hover,
.dm-header .nav-link[aria-current] {
    color: var(--bs-emphasis-color);
}
.dm-header .nav-link[aria-current] {
    font-weight: 600;
}
.dm-mode {
    color: var(--bs-body-color);
}
/* The colour menu scrolls inside itself if the window is too short to show it whole, so its items draw their focus
   ring inside */
.dm-header .dropdown-menu {
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}
.dm-header .dropdown-item:focus-visible {
    outline-offset: -3px;
}
.dm-pill {
    border-radius: 2rem;
    padding-inline: 1.125rem;
}
.dm-btn {
    border-radius: 2rem;
    padding-inline: 1.75rem;
    font-weight: 600;
}

/* A text link with an arrow, beside a main button */
.dm-textlink {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.dm-textlink:hover {
    color: var(--bs-emphasis-color);
}
.dm-textlink .bi,
.dm-arrow-link .bi {
    display: inline-block;
}
.dm-textlink .bi {
    color: var(--dm-red-text);
}
[dir="rtl"] .dm-textlink .bi,
[dir="rtl"] .dm-arrow-link .bi {
    transform: scaleX(-1);
}

/* The inner pages' title band */
.dm-page-header {
    padding-block: 3rem 2.5rem;
    background-color: var(--dm-site-frame);
    border-block-end: 1px solid var(--dm-site-line);
}
.dm-page-title {
    font-size: calc(1.75rem + 1.5vw);
    font-weight: 600;
    letter-spacing: -0.02em;
}
@media (min-width: 1200px) {
    .dm-page-title {
        font-size: 3rem;
    }
}
.dm-page-intro {
    max-width: 40em;
    margin-block-end: 0;
    font-size: 1.25rem;
    color: var(--dm-site-muted);
}

/* The browser window frame around a screenshot */
.dm-browser {
    overflow: hidden;
    background-color: var(--dm-site-frame);
    border: 1px solid var(--dm-site-frame-line);
    border-radius: 0.75rem;
    box-shadow: 0 2rem 4rem rgba(33, 37, 41, 0.12);
}
[data-bs-theme="dark"] .dm-browser {
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.35);
}
.dm-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.625rem 0.875rem;
    border-block-end: 1px solid var(--dm-site-frame-line);
}
.dm-browser-dot {
    flex: none;
    width: 0.6875rem;
    height: 0.6875rem;
    border-radius: 50%;
    background-color: var(--dm-site-frame-line);
}
.dm-browser-url {
    flex: 0 1 22rem;
    min-width: 0;
    margin-inline: auto;
    padding: 0.125rem 0.75rem;
    overflow: hidden;
    font-size: 0.8125rem;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--dm-site-muted);
    background-color: var(--dm-site-page);
    border-radius: 1rem;
}
/* The frame clips anything outside it, so a focused screenshot link draws its ring inside */
.dm-shot:focus-visible {
    outline-offset: -3px;
}
.dm-browser-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Sections */
.dm-section {
    padding-block: 4.5rem;
    border-block-start: 1px solid var(--dm-site-line);
}
.dm-marker {
    width: 2rem;
    height: 3px;
    margin-block-end: 1.25rem;
    background-color: var(--dm-red);
}
.dm-h2 {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-block-end: 1rem;
}
.dm-h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    margin-block-end: 0.375rem;
}

/* Footer */
.dm-footer {
    padding-block: 3.5rem 2rem;
    border-block-start: 1px solid var(--dm-site-line);
    font-size: 0.9375rem;
}
.dm-footer-heading {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.dm-footer-list li {
    margin-block-end: 0.375rem;
}
.dm-footer-list a,
.dm-social {
    color: var(--dm-site-muted);
}
.dm-footer-list a:hover {
    color: var(--bs-emphasis-color);
}
.dm-footer-bottom {
    margin-block-start: 2.5rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--dm-site-line);
    color: var(--dm-site-muted);
}
.dm-footer-bottom p a {
    color: var(--dm-site-muted);
    text-decoration: underline;
}
.dm-social {
    font-size: 1.125rem;
}

/* Homepage */
.page-home .home-hero {
    padding-block: 4rem 3rem;
}
@media (min-width: 992px) {
    .page-home .home-hero {
        padding-block: 7rem 4rem;
    }
}
.page-home .home-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-block-end: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dm-site-muted);
}
.page-home .home-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--dm-red);
}
.page-home .home-h1 {
    max-width: 14em;
    margin-block-end: 1.75rem;
    font-size: calc(2.25rem + 3.5vw);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.025em;
    overflow-wrap: break-word;
}
@media (min-width: 1200px) {
    .page-home .home-h1 {
        font-size: 5.25rem;
    }
}
.page-home .home-lede {
    max-width: 32em;
    margin-block-end: 2.5rem;
    font-size: 1.375rem;
    line-height: 1.45;
    color: var(--dm-site-muted);
}
.page-home .home-small {
    margin-block: 2rem 0;
    color: var(--dm-site-muted);
}
/* The same space under the screenshot as the next section leaves above its heading, so the dark band sits evenly */
.page-home .home-shot {
    padding-block-end: 4.5rem;
}
/* The numbers: a full-width dark band (Nord's darkest, the app's dark top bar colour, in both modes) right after the
   screenshot, each big figure over its label, four across on wide screens with thin dividers, and two by two on phones */
.page-home .home-facts {
    padding-block: 1.75rem;
    background-color: #2e3440;
}
.page-home .home-facts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    font-size: 1.0625rem;
    color: #d8dee9;
}
/* In dark mode the page is already Nord's darkest, so the band goes a step darker, with an edge, to stay a band */
[data-bs-theme="dark"] .page-home .home-facts {
    background-color: #242933;
    border-block: 1px solid var(--dm-site-line);
}
@media (min-width: 768px) {
    .page-home .home-facts-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .page-home .home-facts-list li + li {
        border-inline-start: 1px solid #4c566a;
        padding-inline-start: 1.5rem;
    }
}
.page-home .home-facts-list strong {
    display: block;
    font-size: clamp(2rem, 1.5rem + 1.75vw, 2.75rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #eceff4;
    margin-block-end: .125rem;
}
.page-home .home-features {
    display: grid;
    gap: 2.25rem 2.5rem;
}
@media (min-width: 768px) {
    .page-home .home-features {
        grid-template-columns: 1fr 1fr;
    }
}
.page-home .home-feature {
    display: flex;
    gap: 1rem;
}
.page-home .home-feature-icon {
    font-size: 1.375rem;
    line-height: 1.3;
    color: var(--bs-emphasis-color);
}
.page-home .home-feature p,
.page-home .home-step p {
    color: var(--dm-site-muted);
}
.page-home .home-caption {
    margin-block-start: 0.875rem;
    font-weight: 600;
}
.page-home .home-big {
    font-size: 1.375rem;
    line-height: 1.5;
}
.page-home .home-steps {
    display: grid;
    gap: 2.5rem;
    margin-block-start: 2rem;
}
@media (min-width: 768px) {
    .page-home .home-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Each install option's number sits over a short red line, like the section markers */
.page-home .home-step-num {
    display: block;
    inline-size: max-content;
    margin-block-end: 0.75rem;
    padding-block-end: 0.5rem;
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--bs-emphasis-color);
    border-block-end: 3px solid var(--dm-red);
}
.page-home .home-news-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-block: 1.25rem;
    border-block-end: 1px solid var(--dm-site-line);
}
.page-home .home-news-item:first-child {
    padding-block-start: 0;
}
@media (min-width: 768px) {
    .page-home .home-news-item {
        flex-direction: row;
        gap: 2rem;
    }
}
.page-home .home-news-date {
    color: var(--dm-site-muted);
}
@media (min-width: 768px) {
    .page-home .home-news-date {
        flex: 0 0 10rem;
    }
}
.page-home .home-news-link {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.page-home .home-closing {
    padding-block: 5rem;
    border-block-start: 1px solid var(--dm-site-line);
}
.page-home .home-closing-title {
    max-width: 14em;
    margin-block-end: 2rem;
    font-size: calc(1.75rem + 2vw);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
@media (min-width: 1200px) {
    .page-home .home-closing-title {
        font-size: 3.5rem;
    }
}

/* Get started: the Recommended badge on Docker and the list of what it takes care of */
.page-home .home-recommended {
    font-size: .75rem;
    font-weight: 600;
    margin-inline-start: .375rem;
}
.page-home .home-checks {
    margin-block: .5rem 1rem;
}
/* Each line flows as ordinary text, so a link inside it wraps with the words around it, with the icon hung in the
   space at the start */
.page-home .home-checks li {
    position: relative;
    padding-inline-start: 1.5rem;
    margin-block-end: .25rem;
}
.page-home .home-checks .bi {
    position: absolute;
    inset-inline-start: 0;
    color: var(--bs-primary);
}
.page-home .home-checks-plain .bi {
    color: var(--bs-secondary-color);
}

/* Each install option's "Best for" line, the quick answer to "which one is for me?", stands out from the intro */
.page-home .home-step .home-best {
    margin-block-end: .5rem;
    font-style: italic;
    color: var(--bs-emphasis-color);
}

/* From two columns up, the three install options share rows (subgrid), so each part (number, title, "Best" line, intro,
   list, and link) starts level across them, and the links sit together along the bottom */
@media (min-width: 768px) {
    .page-home .home-steps {
        row-gap: 0;
    }
    .page-home .home-step {
        display: grid;
        grid-row: span 6;
        grid-template-rows: subgrid;
        align-content: start;
    }
    .page-home .home-step > * {
        margin-block-end: 0;
    }
    .page-home .home-step > .home-step-num {
        margin-block-end: .75rem;
    }
    .page-home .home-step > .dm-h3 {
        margin-block-end: .375rem;
    }
    .page-home .home-step > p {
        margin-block-end: .75rem;
    }
    .page-home .home-step > .home-checks {
        margin-block: 0 1.25rem;
        align-self: start;
    }
    .page-home .home-step > .dm-arrow-link {
        align-self: end;
        justify-self: start;
    }
}

/* Inner pages: the content under the title band. The first section sits right under the band, which already has an
   edge, so it drops its own. */
.dm-page-header + .dm-section,
.dm-page-header + .dm-page {
    border-block-start: 0;
}
.dm-page {
    padding-block: 3.5rem 4.5rem;
}
.dm-section-tight {
    padding-block: 3.5rem;
}

/* Running text in a readable column: headings, lists, and links underlined, as the app does in its callouts */
.dm-prose {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.65;
}
.dm-prose > :last-child {
    margin-block-end: 0;
}
.dm-prose h2 {
    margin-block: 2.75rem 0.875rem;
    font-size: 1.625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.dm-prose h2:first-child {
    margin-block-start: 0;
}
.dm-prose h3 {
    margin-block: 1.75rem 0.5rem;
    font-size: 1.1875rem;
    font-weight: 600;
}
.dm-prose ul,
.dm-prose ol {
    padding-inline-start: 1.375rem;
}
.dm-prose li {
    margin-block-end: 0.375rem;
}
.dm-prose a:not(.btn):not(.dm-arrow-link),
.dm-section-body a:not(.btn):not(.dm-arrow-link):not(.dm-card-link) {
    text-decoration: underline;
}
.dm-prose a:not(.btn):not(.dm-arrow-link):hover,
.dm-section-body a:not(.btn):not(.dm-arrow-link):not(.dm-card-link):hover {
    text-decoration-thickness: 2px;
}
/* The tokens file underlines every link in running text, so buttons and arrow links inside it take theirs off */
.dm-prose a.btn,
.dm-prose a.dm-arrow-link {
    text-decoration: none;
}
.dm-prose a.dm-arrow-link:hover {
    text-decoration: underline;
}
.dm-lede {
    font-size: 1.25rem;
    line-height: 1.55;
}

/* The body of a split section (heading on the left, content on the right), kept to a readable width */
.dm-section-body {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.65;
}
.dm-section-body > :last-child {
    margin-block-end: 0;
}

/* A short label above a heading, such as "Recommended" */
.dm-label {
    display: inline-block;
    margin-block-end: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dm-red-text);
}

/* A command to copy, or a block of code */
.dm-code {
    margin-block: 0.75rem 1.25rem;
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--bs-emphasis-color);
    background-color: var(--dm-site-frame);
    border: 1px solid var(--dm-site-frame-line);
    border-radius: 0.5rem;
}
.dm-code code {
    color: inherit;
    font-size: inherit;
    /* Long commands wrap rather than scroll sideways, so they can be read without a mouse at any width */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.dm-prose :not(pre) > code,
.dm-section-body :not(pre) > code {
    padding: 0.0625rem 0.375rem;
    font-size: 0.875em;
    color: var(--bs-emphasis-color);
    background-color: var(--dm-site-frame);
    border-radius: 0.25rem;
}

/* A plain arrow link, under a block of text */
.dm-arrow-link {
    font-weight: 600;
}

/* Numbered options (download and upgrade methods): each number over a short red line, like the section markers */
.dm-options {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dm-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem 2rem;
    padding-block: 2.5rem;
    border-block-start: 1px solid var(--dm-site-line);
}
.dm-option:first-child {
    padding-block-start: 0;
    border-block-start: 0;
}
@media (min-width: 992px) {
    .dm-option {
        grid-template-columns: 5rem minmax(0, 1fr);
    }
}
.dm-option-num {
    display: block;
    inline-size: max-content;
    block-size: max-content;
    padding-block-end: 0.5rem;
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--bs-emphasis-color);
    border-block-end: 3px solid var(--dm-red);
}
.dm-option-title,
.dm-prose .dm-option-title {
    margin-block: 0 0.375rem;
    font-size: 1.5rem;
    font-weight: 600;
}
.dm-option-best {
    margin-block-end: 0.875rem;
    font-style: italic;
    color: var(--bs-emphasis-color);
}
.dm-option .dm-section-body p {
    color: var(--dm-site-muted);
}
.dm-option .dm-section-body p.dm-option-best {
    color: var(--bs-emphasis-color);
}

/* Cards that are links, such as the docs hub's */
.dm-cards {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 768px) {
    .dm-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1200px) {
    .dm-cards-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.dm-card-link {
    display: flex;
    gap: 1rem;
    block-size: 100%;
    padding: 1.5rem;
    color: var(--bs-body-color);
    text-decoration: none;
    background-color: var(--dm-site-page);
    border: 1px solid var(--dm-site-line);
    border-radius: 0.75rem;
    transition: border-color 0.15s ease-in-out;
}
.dm-card-link:hover {
    color: var(--bs-body-color);
    border-color: var(--bs-emphasis-color);
}
.dm-card-link:hover .dm-card-title {
    text-decoration: underline;
}
.dm-card-icon {
    flex: none;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--bs-emphasis-color);
}
.dm-card-title {
    display: block;
    margin-block-end: 0.25rem;
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.dm-card-text {
    display: block;
    color: var(--dm-site-muted);
}
@media (prefers-reduced-motion: reduce) {
    .dm-card-link {
        transition: none;
    }
}

/* A list of plain links, one per row, each with an arrow */
.dm-link-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid var(--dm-site-line);
}
.dm-link-list li {
    border-block-end: 1px solid var(--dm-site-line);
}
.dm-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    text-decoration: none;
}
.dm-link-list a:hover {
    text-decoration: underline;
}
.dm-link-list .bi {
    color: var(--dm-red-text);
}
[dir="rtl"] .dm-link-list .bi {
    transform: scaleX(-1);
}
.dm-link-list .dm-link-note {
    display: block;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--dm-site-muted);
}

/* A row of buttons under a block of text */
.dm-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-block-start: 1.5rem;
}

/* The requirements, as a short definition list */
.dm-specs {
    display: grid;
    gap: 0.25rem 1.5rem;
    margin: 0;
}
@media (min-width: 576px) {
    .dm-specs {
        grid-template-columns: max-content minmax(0, 1fr);
    }
}
.dm-specs dt {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}
.dm-specs dd {
    margin-block-end: 0.5rem;
}
@media (min-width: 576px) {
    .dm-specs dd {
        margin-block-end: 0.25rem;
    }
}

/* Search (News and Changelog): one field and a button, side by side */
.dm-search {
    display: flex;
    gap: 0.5rem;
    max-width: 30rem;
}
.dm-search .form-control {
    min-width: 0;
}
.dm-results {
    margin-block: 1rem 0;
    color: var(--dm-site-muted);
    /* A long pasted search, such as a commit hash, wraps instead of widening the page */
    overflow-wrap: anywhere;
}
.dm-results a,
.dm-lede a {
    text-decoration: underline;
}

/* Paging (News and Changelog) */
.dm-pages {
    margin-block: 2.5rem 0;
}
.dm-pages .pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
}
.dm-pages .page-link {
    border-radius: 0.375rem;
    color: var(--bs-body-color);
}
.dm-pages .page-item:not(:first-child) .page-link {
    margin-inline-start: 0;
}
.dm-pages .active > .page-link {
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border-color: var(--bs-emphasis-color);
}
.dm-pages .disabled > .page-link {
    color: var(--dm-site-muted);
}

/* News list and article */
.page-news .news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.page-news .news-item {
    padding-block: 2rem;
    border-block-end: 1px solid var(--dm-site-line);
}
.page-news .news-item:first-child {
    padding-block-start: 0;
}
.page-news .news-date,
.page-article .news-date {
    display: block;
    margin-block-end: 0.375rem;
    color: var(--dm-site-muted);
}
.page-news .news-title {
    margin-block-end: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.page-news .news-title a {
    color: var(--bs-emphasis-color);
    text-decoration: none;
}
.page-news .news-title a:hover {
    text-decoration: underline;
}
.page-news .news-excerpt {
    max-width: 48rem;
    margin-block-end: 0;
    font-size: 1.0625rem;
    color: var(--dm-site-muted);
}
.page-article .article-title {
    max-width: 22em;
}
.page-article .dm-prose img {
    max-width: 100%;
    height: auto;
}

/* Changelog: one entry per version, the version and date on the left on wide screens */
.page-changelog .changelog-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.page-changelog .changelog-item {
    display: grid;
    gap: 0.25rem 2rem;
    padding-block: 1.5rem;
    border-block-end: 1px solid var(--dm-site-line);
}
.page-changelog .changelog-item:first-child {
    padding-block-start: 0;
}
@media (min-width: 768px) {
    .page-changelog .changelog-item {
        grid-template-columns: 12rem minmax(0, 1fr);
    }
}
.page-changelog .changelog-version {
    margin-block-end: 0.125rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.page-changelog .changelog-meta {
    font-size: 0.9375rem;
    color: var(--dm-site-muted);
}
.page-changelog .changelog-meta a {
    color: var(--dm-site-muted);
    text-decoration: underline;
}
.page-changelog .changelog-message {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* Contribute: the three PayPal forms as cards */
.page-contribute .contribute-forms {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 768px) {
    .page-contribute .contribute-forms {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.page-contribute .contribute-card {
    block-size: 100%;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--dm-site-line);
    border-radius: 0.75rem;
}
.page-contribute .contribute-card h3 {
    margin-block-end: 1rem;
}
.page-contribute .contribute-card .btn {
    inline-size: 100%;
    margin-block-start: 1rem;
}

/* The 404 page: the bunny, centred */
.page-404 .error-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block-start: 2rem;
    border-radius: 0.75rem;
}

/* Subscribe: the Mailchimp form's bot trap, off screen and out of the tab order */
.page-subscribe .subscribe-trap {
    position: absolute;
    inset-inline-start: -5000px;
}
.page-subscribe .subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 30rem;
}
.page-subscribe .subscribe-form .form-control {
    flex: 1 1 14rem;
}
.page-subscribe .subscribe-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* A quiet button, for secondary links such as the social and RSS buttons: emphasis-coloured text on a thin edge, so it
   keeps its contrast in both modes */
.dm-btn-plain {
    --bs-btn-color: var(--bs-emphasis-color);
    --bs-btn-border-color: var(--dm-site-frame-line);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--dm-site-frame);
    --bs-btn-hover-border-color: var(--bs-emphasis-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--dm-site-frame);
    --bs-btn-active-border-color: var(--bs-emphasis-color);
}

/* README: the "On this page" links, in a framed box at the top */
.page-readme .readme-toc {
    margin-block-end: 3rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--dm-site-frame);
    border-radius: 0.75rem;
}
.page-readme .readme-toc ul {
    columns: 2 12rem;
    margin: 0;
    padding-inline-start: 1.125rem;
}
.page-readme .dm-prose .dm-options,
.page-readme .dm-prose .dm-specs {
    padding-inline-start: 0;
}
.page-readme .dm-prose .dm-option {
    margin-block-end: 0;
}
.page-readme .dm-prose h2 {
    padding-block-start: 2.5rem;
    border-block-start: 1px solid var(--dm-site-line);
}
.page-readme .dm-prose .readme-toc h2 {
    padding-block-start: 0;
    border-block-start: 0;
}
/* Form fields and paging links: a field's edge needs 3:1 contrast against the page, and Bootstrap's faint focus shadow
   on the paging links is replaced by the same clear outline used elsewhere */
.dm-body .form-control,
.dm-body .form-select {
    border-color: var(--dm-site-muted);
}
.dm-pages .page-link:focus-visible {
    z-index: 3;
    outline: 2px solid var(--bs-emphasis-color);
    outline-offset: 2px;
    box-shadow: none;
}
.dm-body .form-select:focus {
    /* A dropdown has no text cursor, so it keeps a clear ring: the border in the text colour and a soft halo */
    border-color: var(--bs-emphasis-color);
    outline: 2px solid transparent;
    outline-offset: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-emphasis-color-rgb), 0.12);
}
.dm-body .form-control:focus {
    /* No change when a text field is clicked into (the owner's choice): the border stays as it is, and Bootstrap's glow is
       turned off, so the text cursor shows where you're typing. The transparent outline draws nothing normally, but
       Windows contrast themes show it in their own colour, so focus is still visible there. */
    border-color: var(--dm-site-muted);
    outline: 2px solid transparent;
    outline-offset: 0;
    box-shadow: none;
}
