/* ==========================================================================
   welovelinux child template — custom CSS
   Supplements theme.welovelinux.less. Keep CSS rules minimal here;
   prefer LESS variables in theme.welovelinux.less.
   Fonts: Inter, Space Grotesk and JetBrains Mono are self-hosted from
   ../fonts/ (see section 0). Do not select them in the YOOtheme customizer,
   and never use a Google @import (GDPR).

   0. Self-hosted fonts            4. Article text and the three tiers
   1. Palette (light + dark)       5. Dark mode toggle (js/custom.js)
   2. Dark mode: surfaces, text    6. Accessibility helpers
   3. Code

   All color pairs were checked against WCAG 2.2 AA (text >= 4.5:1, non-text >= 3:1).
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. Self-hosted fonts
   All files are subset to Latin (the Google Fonts "latin" range) plus arrows
   (U+2190-21FF); JetBrains Mono also keeps box drawing (U+2500-259F) for
   terminal output. Characters outside the range use the fallback font.
   Made with fontTools: pyftsubset --layout-features='*' --flavor=woff2.
   font-display: swap shows the fallback font until a file has loaded, and a
   browser only downloads a weight when the page uses it.
   The family names are set in theme.welovelinux.less.

   Inter 4.1 (github.com/rsms/inter), SIL OFL 1.1: fonts/Inter-OFL.txt.
   Body text, menus and buttons. 400, 400 italic (<em>), 700 (menu, buttons,
   bold text). About 30 KB per file (full: 108–114 KB). There is no 500
   (Medium): it was only used for the buttons, always below the fold, and
   cost an extra 31 KB download on every page (Lighthouse "Network
   dependency tree"). A weight of 500 now falls back to 400.
   -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Buttons use Inter Bold (preloaded) instead of Medium. Also set in
   less/theme.welovelinux.less (@button-font-weight); this rule covers
   theme.13.css until the style is compiled again in the customizer. */
.uk-button { font-weight: 700; }

/* Space Grotesk 2.0.0 (github.com/floriankarsten/space-grotesk), SIL OFL 1.1:
   fonts/SpaceGrotesk-OFL.txt. Headings and meta lines: 700, and 400 for the
   few rules that use it. About 22 KB per file (full: 40–41 KB). */

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/SpaceGrotesk-Regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/SpaceGrotesk-Bold.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono 2.304 (github.com/JetBrains/JetBrainsMono), SIL OFL 1.1:
   fonts/JetBrainsMono-OFL.txt. Code and commands (@base-code-font-family,
   @base-pre-font-family): Regular, and Bold for bold text in code. Also keeps
   box drawing for terminal output; code ligatures kept.
   Regular 92 → 40 KB, Bold 95 → 42 KB. */

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+2500-259F, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-21FF,
                   U+2212, U+2215, U+2500-259F, U+FEFF, U+FFFD;
}


/* --------------------------------------------------------------------------
   1. Palette
   The light values repeat the compiled LESS theme, so the rules below change
   nothing in light mode. Dark mode follows the system (prefers-color-scheme)
   unless the reader chose a mode with the toggle: js/custom.js then sets
   html[data-theme="dark"|"light"].
   -------------------------------------------------------------------------- */

:root {
    /* Brand colors (theme.welovelinux.less) */
    --color-primary:        #1d4ed8;
    --color-secondary:      #151a23;
    --color-3:              #0b0f16;
    --color-4:              #f3f5f8;
    --color-5:              #8792a2;
    --color-6:              #151a23;
    --color-bg:             #ffffff;
    --color-text:           #151a23;
    --color-border:         #8792a2;

    /* Mode-dependent colors */
    color-scheme: light;
    --wll-bg:               #ffffff;
    --wll-surface:          #f3f5f8;   /* muted sections, cards, inputs */
    --wll-surface-hover:    #e3e7ee;
    --wll-dropdown:         #ffffff;   /* dropdown menus */
    --wll-text:             #151a23;   /* 17.4:1 on bg */
    --wll-heading:          #151a23;
    --wll-muted:            #5b5f65;   /*  6.4:1 on bg */
    --wll-link:             #1d4ed8;   /*  6.7:1 on bg */
    --wll-link-hover:       #173eab;
    --wll-brand:            #e0002e;   /*  5.0:1 on bg, 4.6:1 on surface: the red of "love" in the logo, used in the menu */
    --wll-title-hover:      #e0002e;   /*  4.0:1 on a hovered card: titles are large text (3:1) */
    --wll-border:           #8792a2;   /*  3.2:1 on bg */
    --wll-focus:            #1d4ed8;

    --wll-code:             #151a23;   /* inline code: 14.7:1 on its background */
    --wll-code-bg:          #e8ecf2;
    --wll-pre:              #e6e9ef;   /* code blocks are dark in both modes: 14.3:1 */
    --wll-pre-bg:           #151a23;
    --wll-pre-border:       #151a23;

    /* The three tiers: accent (bar, depth meter; >= 3:1) and a light tint */
    --wll-tier-1:           #15803d;   /* What it means / What it does   5.0:1 */
    --wll-tier-2:           #1d4ed8;   /* How to use it                  6.7:1 */
    --wll-tier-3:           #6d28d9;   /* How it works                   7.1:1 */
    --wll-tier-1-bg:        #f2f8f4;
    --wll-tier-2-bg:        #f3f6fd;
    --wll-tier-3-bg:        #f7f4fd;
    --wll-meter-empty:      #c9d0da;   /* decorative */
    --wll-sponsor:          #78350f;   /* "Sponsored" label: 8.1:1 on its background */
    --wll-sponsor-bg:       #fef3c7;
    --wll-sponsor-border:   #d97706;   /* decorative */
}

html[data-theme="dark"] {
    color-scheme: dark;
    --wll-bg:               #0f141c;
    --wll-surface:          #1a212c;
    --wll-surface-hover:    #242c39;
    --wll-dropdown:         #1a212c;   /* lighter than the page, so the dropdown stands out */
    --wll-text:             #e6e9ef;   /* 15.2:1 on bg, 13.3:1 on surface */
    --wll-heading:          #f5f7fa;   /* 17.2:1 */
    --wll-muted:            #a5adba;   /*  8.2:1 on bg,  7.2:1 on surface */
    --wll-link:             #8fb0ff;   /*  8.6:1 on bg,  7.6:1 on surface */
    --wll-link-hover:       #b8ceff;
    --wll-brand:            #ff4d6d;   /*  5.8:1 on bg, 5.0:1 on surface: the red of "love" in the inverse logo */
    --wll-title-hover:      #ff6b81;   /*  5.1:1 on a hovered card (the brand red has only 4.4:1 there) */
    --wll-border:           #5f6b7d;   /*  3.4:1 */
    --wll-focus:            #8fb0ff;

    --wll-code:             #e6e9ef;   /* 11.6:1 */
    --wll-code-bg:          #242c39;
    --wll-pre:              #e6e9ef;   /* 15.9:1 */
    --wll-pre-bg:           #0a0e14;
    --wll-pre-border:       #2b3442;

    --wll-tier-1:           #4ade80;   /* 10.6:1 */
    --wll-tier-2:           #8fb0ff;   /*  8.6:1 */
    --wll-tier-3:           #b39dfa;   /*  8.0:1 */
    --wll-tier-1-bg:        #121e18;
    --wll-tier-2-bg:        #131a29;
    --wll-tier-3-bg:        #19162a;
    --wll-meter-empty:      #3a4454;
    --wll-sponsor:          #fcd34d;   /* 10.6:1 on its background */
    --wll-sponsor-bg:       #2e2410;
    --wll-sponsor-border:   #b45309;
}

/* Same values when the system asks for dark and the reader made no choice. */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        color-scheme: dark;
        --wll-bg:               #0f141c;
        --wll-surface:          #1a212c;
        --wll-surface-hover:    #242c39;
        --wll-dropdown:         #1a212c;
        --wll-text:             #e6e9ef;
        --wll-heading:          #f5f7fa;
        --wll-muted:            #a5adba;
        --wll-link:             #8fb0ff;
        --wll-link-hover:       #b8ceff;
        --wll-brand:            #ff4d6d;
        --wll-title-hover:      #ff6b81;
        --wll-border:           #5f6b7d;
        --wll-focus:            #8fb0ff;

        --wll-code:             #e6e9ef;
        --wll-code-bg:          #242c39;
        --wll-pre:              #e6e9ef;
        --wll-pre-bg:           #0a0e14;
        --wll-pre-border:       #2b3442;

        --wll-tier-1:           #4ade80;
        --wll-tier-2:           #8fb0ff;
        --wll-tier-3:           #b39dfa;
        --wll-tier-1-bg:        #121e18;
        --wll-tier-2-bg:        #131a29;
        --wll-tier-3-bg:        #19162a;
        --wll-meter-empty:      #3a4454;
        --wll-sponsor:          #fcd34d;
        --wll-sponsor-bg:       #2e2410;
        --wll-sponsor-border:   #b45309;
    }
}


/* --------------------------------------------------------------------------
   2. Dark mode: surfaces and text
   UIkit compiles its colors into theme.css, so these rules map the main
   components to the variables above. Dark sections, cards and the toolbar
   (.uk-light, .uk-section-secondary, …) keep their own colors: their UIkit
   rules are more specific than these.
   -------------------------------------------------------------------------- */

html {
    background: var(--wll-bg);
    color: var(--wll-text);
}

h1, h2, h3, h4, h5, h6,
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
.uk-heading-small, .uk-heading-medium, .uk-heading-large,
.uk-article-title,
.uk-card-default .uk-card-title,
.uk-text-emphasis {
    color: var(--wll-heading);
}

/* h3 from 960px. UIkit has no @base-h3-font-size-m, so it is set here; h1 and h2 are in
   less/theme.welovelinux.less (1.75/2.1rem and 1.6/1.9rem). */
@media (min-width: 960px) {
    h3, .uk-h3 { font-size: 1.7rem; }
}

a, .uk-link { color: var(--wll-link); }
a:hover, .uk-link:hover { color: var(--wll-link-hover); }

.uk-text-muted { color: var(--wll-muted) !important; }
.uk-article-meta, .uk-article-meta a, .uk-text-meta, .uk-text-meta a,
.uk-breadcrumb > * > *, .uk-link-muted a, a.uk-link-muted,
.uk-navbar-toggle, .uk-search-toggle, .uk-search .uk-search-icon,
.uk-table th, .uk-table caption,
.uk-navbar-dropdown-nav .uk-nav-sub a {
    color: var(--wll-muted);
}
.uk-search-input::placeholder { color: var(--wll-muted); }
.uk-article-meta a:hover, .uk-text-meta a:hover, .uk-breadcrumb > * > :hover,
.uk-breadcrumb > :last-child > span,
.uk-navbar-toggle:hover, .uk-navbar-toggle[aria-expanded="true"],
.uk-search-toggle:hover, .uk-link-muted a:hover, a.uk-link-muted:hover {
    color: var(--wll-text);
}

/* Page surfaces */
.uk-section-default, .uk-tile-default,
.uk-navbar-container:not(.uk-navbar-transparent),
.uk-search-navbar .uk-search-input {
    background-color: var(--wll-bg);
}
.uk-section-muted, .uk-tile-muted,
.uk-card-default,
.uk-search-default .uk-search-input, .uk-search-medium .uk-search-input, .uk-search-large .uk-search-input,
.uk-table-striped tbody tr:nth-of-type(odd), .uk-table-striped > tr:nth-of-type(odd) {
    background-color: var(--wll-surface);
}
.uk-card-default, .uk-navbar-dropdown, .uk-dropdown, .uk-search-input { color: var(--wll-text); }
/* Cards that are one link (panel link, e.g. the Tags page) get uk-card-hover. YOOtheme's hover
   color is a fixed light gray (#e3e8ef) that is more specific than the rule above, so in dark
   mode the white text was on a light background. */
.uk-card-default.uk-card-hover:hover { background-color: var(--wll-surface-hover); }

/* Dropdown menus: white in light mode, the surface color in dark mode
   (text 13.3:1, links 7.6:1 on #1a212c). */
.uk-navbar-dropdown, .uk-dropdown { background-color: var(--wll-dropdown); }

/* Navbar */
.uk-navbar-nav > li > a, .uk-navbar-item, .uk-logo,
.uk-navbar-dropdown-nav > li > a {
    color: var(--wll-text);
}
/* Dropdown links use the full width of the dropdown (its padding is 15px), so the hover
   background runs from edge to edge instead of stopping 15px short. */
.uk-navbar-dropdown-nav > li > a {
    margin: 0 -15px;
    padding: 6px 15px;
}
/* Active item in a dropdown (e.g. Distro News under News): brand red, bold, and a bar on
   the left, so it does not rely on color alone (WCAG 1.4.1). Hover: white on red. */
.uk-navbar-dropdown-nav > li.uk-active > a {
    position: relative;
    color: var(--wll-brand);
    font-weight: 700;
}
.uk-navbar-dropdown-nav > li.uk-active > a::before {    /* on the dropdown's edge */
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 4px;
    background: var(--wll-brand);
}
.uk-navbar-dropdown-nav > li.uk-active > a:hover { color: #ffffff; }
/* Menu accent: the red of the logo (--wll-brand) for hover and the active item, so the menu
   belongs to the logo next to it. Links in the text stay blue: blue means "link", and red
   would look like the Warning lines and the Security category. Dropdown hover: white on the
   logo red (5.0:1) in both modes, instead of the theme's blue. */
.uk-navbar-dropdown-nav > li > a:hover { background-color: #e0002e; color: #ffffff; }
.uk-navbar-nav > li:hover > a, .uk-navbar-nav > li > a[aria-expanded="true"] { color: var(--wll-brand); }
/* Active top-level item: the link color and a bar under the text, instead of the full-height
   blue block from the theme (@navbar-nav-item-active-background). The bar means the state does
   not rely on color alone (WCAG 1.4.1). */
.uk-navbar-nav > li > a { position: relative; }
.uk-navbar-container:not(.uk-navbar-transparent) .uk-navbar-nav > li.uk-active > a,   /* the theme's selector */
.uk-navbar-nav > li.uk-active > a,
.uk-navbar-nav > li.uk-active:hover > a {
    background-color: transparent;
    color: var(--wll-brand);
}
.uk-navbar-nav > li.uk-active > a::after {
    content: "";
    position: absolute;
    left: 20px;                 /* @navbar-nav-item-padding-horizontal */
    right: 20px;
    bottom: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--wll-brand);
}
.uk-navbar-dropdown :focus-visible { outline-color: var(--wll-text) !important; }

/* Logo: UIkit shows the inverse logo (white outline) only on .uk-light surfaces.
   Show it in dark mode too, or the dark penguin disappears into the dark header. */
html[data-theme="dark"] .uk-logo:has(.uk-logo-inverse) > :not(.uk-logo-inverse) { display: none; }
html[data-theme="dark"] .uk-logo-inverse { display: block; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .uk-logo:has(.uk-logo-inverse) > :not(.uk-logo-inverse) { display: none; }
    html:not([data-theme="light"]) .uk-logo-inverse { display: block; }
}

/* Footer menu (Footer Menu module in the YOOtheme footer builder): smaller text, so the
   links fit on one line on desktop, and tap targets of at least 24px (WCAG 2.5.8). */
footer .uk-subnav { row-gap: 8px; }
footer .uk-subnav > * > :first-child { font-size: 0.875rem; min-height: 24px; }
/* On phones the links wrap, and every line would start with a divider: use space instead. */
@media (max-width: 639px) {
    footer .uk-subnav-divider > ::before { display: none !important; }
    footer .uk-subnav { row-gap: 12px; column-gap: 20px; margin-left: 0; }
    footer .uk-subnav > * { padding-left: 0; }
}
/* Footer (YOOtheme footer builder): the tagline under the logo, and the copyright band
   (section class wll-footer-legal) as part of the dark footer, split off by a thin line.
   The copyright and trademark lines are small print (class wll-footer-fine). */
/* "love" in red, like the logo (<span class="wll-brand-text">). The footer is always dark, so
   it gets the red of the inverse logo there (5.4:1 on #151a23). */
.wll-brand-text { color: var(--wll-brand); }
.uk-section-secondary .wll-brand-text, .uk-light .wll-brand-text { color: #ff4d6d; }
.wll-footer-tagline { font-size: 0.9375rem; opacity: 0.8; }
/* The logo column is left-aligned like the link columns next to it, so the logo starts at the
   same edge as the header logo and the legal links below it. The builder sets Center
   (uk-text-center, !important) on the logo and the tagline. */
.uk-grid > :has(> .wll-footer-tagline) > :is(.uk-text-center, .wll-footer-tagline) {
    text-align: left !important;
}
/* Footer column headings ("welovelinux", "Contact", "Read"; Headline style H5): a small label
   in capitals, like "About welovelinux" in the sidebar and "Written by", so they do not look
   like one more link. Gray (#a5adba, 8.2:1 on #151a23), with more space below the label than
   between the links, so each label starts a group. The links are a little softer (80% white,
   about 10:1) and turn white on hover. */
footer .uk-section-secondary .uk-grid .uk-h5 {   /* beats .uk-section-secondary:not(.uk-preserve-color) .uk-h5 */
    margin-bottom: 28px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a5adba;
}
/* "RSS feed" is a uk-link-toggle: its text is an inner .uk-link with its own color. */
footer .uk-section-secondary .uk-list :is(.el-link, .uk-link-toggle .uk-link) { color: rgba(255, 255, 255, 0.8); }
footer .uk-section-secondary .uk-list :is(.el-link:hover, .uk-link-toggle:hover .uk-link) { color: #fff; }
/* Legal links under the columns (Imprint, Privacy Policy, …): the same hover as the columns. */
footer .uk-section-secondary .uk-subnav > * > .el-link:hover { color: #fff; text-decoration: underline; }
.wll-footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.wll-footer-fine { font-size: 0.8125rem; opacity: 0.75; }
.wll-footer-fine a:hover { opacity: 1; }

/* Footer link lists (About, Authors, Imprint, …) on phones, tablets and every touch screen (a
   tablet in landscape gets the desktop layout but is still used with a finger): each link is a
   full-width tap target of 44px instead of a 26px line with 10px between the lines. */
@media (max-width: 959px), (pointer: coarse) {
    footer .uk-list > .el-item { margin-top: 0; }
    footer .uk-list .el-link,
    footer .uk-list .uk-link-toggle { display: block; padding: 9px 0; }   /* items with an icon, such as "RSS feed" */
}

/* Forms and default buttons */
.uk-input, .uk-select, .uk-textarea {
    background-color: var(--wll-surface);
    color: var(--wll-text);
    border-color: var(--wll-border);
}
.uk-button-default { background-color: var(--wll-surface); color: var(--wll-text); }
.uk-button-default:hover { background-color: var(--wll-surface-hover); color: var(--wll-text); }
/* The theme sets a fixed line height of 42px (@button-line-height). A button that wraps onto
   two lines (long text on a phone) then gets a large gap between the lines. Same height for
   one line (0.9rem x 1.4 + 2 x 11px = 42px), normal spacing for more lines. */
.uk-button:not(.uk-button-text):not(.uk-button-link):not(.uk-button-small):not(.uk-button-large) {
    line-height: 1.4;
    padding-top: 11px;
    padding-bottom: 11px;
}

/* Borders and dividers */
hr, .uk-hr, .uk-heading-divider,
.uk-list-divider > :nth-child(n+2), .tm-child-list-divider > ul > :nth-child(n+2),
.uk-table-divider > tr:not(:first-child), .uk-table-divider > :not(:first-child) > tr,
.uk-table-divider > :first-child > tr:not(:first-child),
.uk-card-default .uk-card-header, .uk-card-default .uk-card-footer,
.uk-navbar-dropdown-nav .uk-nav-divider {
    border-color: var(--wll-border);
}


/* --------------------------------------------------------------------------
   3. Code
   UIkit colors inline code #f0506e (3.4:1 on white, fails AA): use the text
   color on a light background instead. Code blocks look like a terminal in
   both modes. Inline code may wrap, so long commands don't break the layout
   on phones.
   -------------------------------------------------------------------------- */

:not(pre) > code, :not(pre) > kbd, :not(pre) > samp {
    color: var(--wll-code);
    background: var(--wll-code-bg);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    white-space: normal;
    overflow-wrap: anywhere;
}

pre {
    color: var(--wll-pre);
    background: var(--wll-pre-bg);
    border: 1px solid var(--wll-pre-border);
    border-radius: 6px;
    padding: 16px 20px;
}
pre code { color: inherit; background: none; }
pre:focus-visible { outline: 2px solid var(--wll-focus); outline-offset: 2px; }

/* Copy button (js/custom.js): the wrapper takes over the margins of the code block, and the
   block keeps room on the right so the button never covers the start of a line. */
.wll-code { position: relative; margin: 20px 0; }
.wll-code:first-child { margin-top: 0; }
.wll-code:last-child { margin-bottom: 0; }
.wll-code > pre { margin: 0 !important; padding-right: 56px; }
.wll-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(230, 233, 239, .25);
    border-radius: 6px;
    background: var(--wll-pre-bg);
    color: var(--wll-pre);
    opacity: .75;
    cursor: pointer;
    transition: opacity .15s, border-color .15s;
}
.wll-copy:hover, .wll-copy:focus-visible { opacity: 1; border-color: rgba(230, 233, 239, .6); }
.wll-copy:focus-visible { outline: 2px solid var(--wll-focus); outline-offset: 2px; }
.wll-copy.is-copied { opacity: 1; color: #4ade80; border-color: #4ade80; }   /* green check: 9.8:1 on the dark block */

/* Tables in articles: the Markdown renderer writes a plain <table> (no uk-table class).
   Left-aligned headers with a stronger line below them, light lines between the rows.
   On small screens a wide table scrolls sideways instead of widening the page. */
.uk-article table:not([class]) {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    font-size: .9375rem;
    line-height: 1.45;
}
.uk-article table:not([class]) th,
.uk-article table:not([class]) td {
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}
.uk-article table:not([class]) :is(th, td):first-child { padding-left: 0; }
.uk-article table:not([class]) :is(th, td):last-child { padding-right: 0; }
.uk-article table:not([class]) th {
    vertical-align: bottom;
    color: var(--wll-heading);
    font-weight: 600;
    border-bottom: 2px solid var(--wll-border);
}
.uk-article table:not([class]) td {
    border-bottom: 1px solid color-mix(in srgb, var(--wll-border) 40%, transparent);
}
.uk-article table:not([class]) tr:last-child td { border-bottom-color: var(--wll-border); }
.uk-article table:not([class]) code { white-space: nowrap; }
/* From 640px on, commands in table cells wrap at their spaces, so a table with several command
   columns fits the article column. custom.js puts each word in a .wll-nowrap span, so a command
   never breaks inside a word such as "package-name" or "--installed". */
@media (min-width: 640px) {
    .uk-article table:not([class]) code { white-space: normal; }
}
.uk-article table:not([class]) code .wll-nowrap { white-space: nowrap; }
.uk-article table:not([class]):focus-visible { outline: 2px solid var(--wll-focus); outline-offset: 2px; }
@media (max-width: 639px) {
    .uk-article table:not([class]) { display: block; overflow-x: auto; }
}


/* --------------------------------------------------------------------------
   4. Article text and the three tiers
   The pipeline writes every article as sections with fixed classes:
   introduction, what-it-means (what-it-does for commands), how-to-use-it,
   how-it-works, faq, related, sources.
   Each tier gets its own accent color and a three-step depth meter above its
   heading (1, 2 or 3 steps filled). The meter is decorative: the heading text
   carries the meaning, so screen readers lose nothing.
   -------------------------------------------------------------------------- */

/* Readable line length (site spec 6.4: 60–75 characters) */
.uk-article [property="text"], .wll-article-text { max-width: 72ch; }
.uk-article [property="text"] h2[id], .wll-article-text h2[id], #wll-faq-title { scroll-margin-top: 96px; }

/* The introduction reads as a lead */
.uk-article section.introduction {
    font-size: 1.125rem;
    line-height: 1.65;
}

/* Tier colors and depth (the meter fills --wll-s1..3) */
.uk-article section.what-it-means,
.uk-article section.what-it-does {
    --wll-tier: var(--wll-tier-1);
    --wll-tier-bg: var(--wll-tier-1-bg);
    --wll-s1: var(--wll-tier); --wll-s2: var(--wll-meter-empty); --wll-s3: var(--wll-meter-empty);
}
.uk-article section.how-to-use-it {
    --wll-tier: var(--wll-tier-2);
    --wll-tier-bg: var(--wll-tier-2-bg);
    --wll-s1: var(--wll-tier); --wll-s2: var(--wll-tier); --wll-s3: var(--wll-meter-empty);
}
.uk-article section.how-it-works {
    --wll-tier: var(--wll-tier-3);
    --wll-tier-bg: var(--wll-tier-3-bg);
    --wll-s1: var(--wll-tier); --wll-s2: var(--wll-tier); --wll-s3: var(--wll-tier);
}

.uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) {
    margin: 40px 0 0;
    padding: 4px 24px 12px;
    border-left: 4px solid var(--wll-tier);
    border-radius: 0 6px 6px 0;
    background: var(--wll-tier-bg);
}
.uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) > h2 {
    margin-top: 20px;
}
.uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) > h2::before {
    content: "";
    display: block;
    width: 54px;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 3px;
    background: linear-gradient(to right,
        var(--wll-s1) 0 14px, transparent 14px 20px,
        var(--wll-s2) 20px 34px, transparent 34px 40px,
        var(--wll-s3) 40px 54px);
}
/* Code blocks inside a tier may use the full width of the box */
.uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) pre,
.uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) .wll-code {
    margin-left: -8px;
    margin-right: -8px;
}
.uk-article section .wll-code > pre { margin: 0 !important; }

/* FAQ, related articles, sources: quieter than the tiers */
.uk-article section.faq,
.uk-article section.related {
    margin-top: 40px;
}
.uk-article section.sources {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--wll-border);
    font-size: 0.875rem;
}
.uk-article section:is(.faq, .related, .sources) > h2 { font-size: 1.5rem; margin-top: 0; }
.uk-article section.sources ul { padding-left: 20px; }

/* FAQ custom field (html/layouts/com_fields/fields/render.php): an accordion as wide as the
   text, a line between the questions, and a +/- sign, so it does not look like a list of links. */
/* FAQ: the headline (class wll-faq-heading, id wll-faq-title) and the db8 FAQ element
   (class wll-faq-list) in the article template. Thin lines between the questions, bold
   questions, a + / − on the right instead of the UIkit chevron. */
.wll-faq-heading { max-width: 72ch; margin: 40px 0 12px !important; font-size: 1.5rem; }
.wll-faq-list { max-width: 72ch; margin-top: 0 !important; border-bottom: 1px solid var(--wll-border); }
.wll-faq-list > .el-item { margin: 0 !important; padding: 0; border-top: 1px solid var(--wll-border); background: none; }
.wll-faq-list .uk-accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    background: none;
    color: var(--wll-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;      /* not a link to another page: no underline */
    /* The title is a <button> (db8yptfaq plugin): reset the browser's button style. */
    width: 100%;
    margin: 0;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.wll-faq-list .uk-accordion-title:hover { color: var(--wll-link); background: none; }
.wll-faq-list .uk-accordion-title [uk-accordion-icon] { display: none; }
.wll-faq-list .uk-accordion-title::after {
    content: "+";
    flex: none;
    width: 1em;
    margin: 0;
    background: none;
    text-align: center;
    font-size: 1.4em;
    font-weight: 400;
    line-height: 1;
    color: var(--wll-link);
}
.wll-faq-list .uk-open > .uk-accordion-title::after { content: "\2212"; }   /* minus sign */
.wll-faq-list .uk-accordion-content { margin: 0; padding: 0 0 16px; background: none; }
.wll-faq-list .uk-accordion-content .el-content > :last-child { margin-bottom: 0; }

/* Phones: less indent, the bar stays */
@media (max-width: 639px) {
    .uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) {
        padding: 2px 14px 8px;
    }
    .uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) pre,
    .uk-article section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) .wll-code {
        margin-left: 0;
        margin-right: 0;
    }
}

/* YOOtheme marks some grids (panels with the image left, for example) only with the uk-grid
   attribute; UIkit adds the class uk-grid (display: flex) when it runs. UIkit loads with defer
   (src/DeferScripts.php), so without this rule the first paint shows them stacked and the page
   jumps when UIkit starts (layout shift). The gutter classes on the element already set the
   margins, so only the flex layout is needed here. */
[uk-grid] {
    display: flex;
    flex-wrap: wrap;
}

/* Category page header (YOOtheme template "Category Blog: card grid"): the category icon
   (category field "category-icon", images/welovelinux/categories/icons/), the title and the
   description. The category image (1200×630) is only the share image for og:image. */
.wll-cat-header .el-content {
    max-width: 65ch;
    font-size: 1.0625rem;
    line-height: 1.6;
}
.wll-cat-header .el-content > :last-child { margin-bottom: 0; }
/* The same intro height on every category page, so the content below starts at the same place:
   the description reserves 3 lines on desktop (4 on tablets, where it wraps earlier). Shorter
   descriptions leave the rest empty; longer ones still grow. The icon is aligned to the top
   (panel: Vertical Alignment off), so it does not move with the text either. On phones the
   icon is above the text and the height follows the text. */
@media (min-width: 640px) {
    .wll-cat-header-panel .el-content { min-height: 4lh; }
}
@media (min-width: 960px) {
    .wll-cat-header-panel .el-content { min-height: 3lh; }
}
/* The page header is already a break of its own, so the section after it starts closer:
   40px (padding Small) on every page, also where the builder section has the default 70px
   (News, the category pages, Commands, Guides, This Week in Linux, Tags, Sitemap).
   A section with padding top None (uk-padding-remove-top, !important) keeps it. */
.wll-cat-header + .uk-section { padding-top: 40px; }
.wll-cat-header .el-image { display: block; width: 72px; height: 72px; }
@media (max-width: 639px) {
    .wll-cat-header .el-image { width: 56px; height: 56px; }
    /* On phones the icon stacks above the text; UIkit adds the 15px gap (uk-grid-margin) only
       when it runs (deferred), so keep the gap from the start. */
    .wll-cat-header-panel > [uk-grid]:not(.uk-grid) > .uk-width-expand { margin-top: 15px; }
}

/* Listing grids ("More articles", tag "Article grid"; class wll-list-card on the grid element):
   the category icon of each article (category field "category-icon") beside the text, instead
   of the generated image with the title in it. The icon is decorative (empty alt, no link):
   the meta line already names the category. */
.wll-list-card .el-image { display: block; width: 56px; height: 56px; }
/* The row gap of the card grid (uk-grid-row-large) is also set by UIkit on the cards in the
   second and later rows (uk-grid-margin): one column below 960px, two from 960px. */
.wll-list-card > .uk-grid-row-large > :nth-child(n+2) { margin-top: 40px; }
@media (min-width: 960px) {
    .wll-list-card > .uk-grid-row-large > :nth-child(-n+2) { margin-top: 0; }
}
@media (min-width: 1200px) {
    .wll-list-card > .uk-grid-row-large > :nth-child(n+3) { margin-top: 70px; }
}
/* UIkit adds the class uk-grid (the gutter: 30px, 40px from 1200px) to the icon/text grid in
   each card only when it runs (deferred), so the text jumped on load. Apply the same gutter
   from the start. */
.wll-list-card .el-item [uk-grid]:not(.uk-grid) { margin-left: -30px; }
.wll-list-card .el-item [uk-grid]:not(.uk-grid) > * { padding-left: 30px; }
@media (min-width: 1200px) {
    .wll-list-card .el-item [uk-grid]:not(.uk-grid) { margin-left: -40px; }
    .wll-list-card .el-item [uk-grid]:not(.uk-grid) > * { padding-left: 40px; }
}

/* Homepage "Latest news list" (class wll-latest-list; one column, medium gap with dividers):
   since it sits beside the lead story on desktop it is in the first screen, so the 60px gap
   that UIkit adds late (uk-grid-margin) must be there from the start. */
.wll-latest-list > .uk-grid > :nth-child(n+2) { margin-top: 60px; }
@media (max-width: 639px) {
    .wll-list-card .el-image { width: 44px; height: 44px; }
}

/* Tags page (YOOtheme template "Tags: list of all tags"): "Popular tags" and "All tags A–Z",
   only tags with published articles (src/TagSource.php). UIkit sets the row gap of a grid
   (uk-grid-margin) only when it runs (deferred), so the rows moved on load. The flex row-gap
   gives the same 15px gap (uk-grid-small) from the start. */
.wll-tag-list > .uk-grid { row-gap: 15px; }
.wll-tag-list > .uk-grid > .uk-grid-margin { margin-top: 0; }

/* Article titles in teasers (category blog cards, related cards, tag pages, home page, Tags,
   sitemap): the title is in the heading color and turns red on hover (--wll-title-hover).
   Red is the accent for navigation and titles; links in text stay blue with an underline.
   The card links (uk-card-hover) also change their background. */
:is(.uk-card-hover, .uk-link-toggle):hover .el-title,
.el-title a:hover { color: var(--wll-title-hover); text-decoration: none; }
/* Titles with uk-link-reset (tag pages): UIkit sets color: inherit !important on its links. */
.el-title.uk-link-reset a:hover { color: var(--wll-title-hover) !important; }

/* The theme gives the lead text and text buttons a fixed dark color (#151a23), which is
   unreadable in dark mode. */
.uk-text-lead { color: var(--wll-heading); }
.uk-button-text { color: var(--wll-link); }
/* Text buttons ("All news", "All guides", …) are one 23px line. On touch screens, a transparent
   layer 11px above and below makes the tap target 45px, without moving the underline. */
@media (pointer: coarse) {
    .uk-button-text::after { content: ""; position: absolute; inset: -11px 0; }
}
.uk-button-text:hover, .uk-button-text:focus { color: var(--wll-link-hover); }

/* Cards on a muted section (homepage): cards and muted sections share --wll-surface,
   so use the page background to keep the card visible. */
.uk-section-muted .uk-card-default {
    background-color: var(--wll-bg);
    border: 1px solid var(--wll-border);
}

/* Homepage "One story, three depths": each tile in the color of its tier */
.uk-card.wll-depth { border-top: 4px solid var(--wll-tier); }   /* beats the muted-card border */
.wll-depth-1 { --wll-tier: var(--wll-tier-1); }
.wll-depth-2 { --wll-tier: var(--wll-tier-2); }
.wll-depth-3 { --wll-tier: var(--wll-tier-3); }
.wll-depth .el-meta { color: var(--wll-tier); }

/* Article template ("Article: text with sidebar"; links filled by js/custom.js) */
.wll-toc-title {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wll-muted);
}
.wll-toc .uk-nav-default > li > a {
    padding: 6px 0 6px 14px;
    border-left: 3px solid var(--wll-border);
    color: var(--wll-text);
}
.wll-toc .uk-nav-default > li > a:hover { color: var(--wll-link); }
.wll-toc .uk-nav-default > li.uk-active > a {
    border-left-color: var(--wll-link);
    color: var(--wll-link);
    font-weight: 600;
}
/* "On this page" title (db8ytptoc plugin; the plugin sets only its weight and margin).
   Moved here from the YOOtheme customizer (Settings → Custom Code → CSS). */
.db8ytptoc-title {
    padding-top: 20px;
    font-size: 24px;
}
/* "On this page" (db8ytptoc plugin, sidebar and mobile): underlined like the other links in
   the article, so they don't depend on color alone. */
.db8ytptoc-nav a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.db8ytptoc-nav a:hover { text-decoration-thickness: 2px; }
/* On phones, tablets and every touch screen: 42px tap targets instead of 26px lines. */
@media (max-width: 959px), (pointer: coarse) {
    .db8ytptoc-nav li { margin-top: 0; }
    .db8ytptoc-nav a { display: inline-block; padding: 8px 0; }
}
.wll-toc-facts { margin: 16px 0 0; }
.wll-toc-inline { margin-top: 16px; }
.wll-toc-inline .uk-subnav { row-gap: 8px; }

/* Tags as pills (24 px minimum target, WCAG 2.5.8) */
.wll-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wll-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border: 1px solid var(--wll-border);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--wll-text);
    text-decoration: none;
}
/* Hover: the same as the news topic pills, white on the logo red (5.0:1) in both modes. */
.wll-tags a:hover { background: #e0002e; border-color: #e0002e; color: #ffffff; }

/* "Read also": hide the heading when there is no related article */
.wll-related:not(:has(.el-item)) { display: none; }


/* --------------------------------------------------------------------------
   5. Dark mode toggle (button added to the navbar by js/custom.js)
   44 × 44 px target (WCAG 2.5.8 asks for at least 24 × 24).
   -------------------------------------------------------------------------- */

/* The toggle is the last navbar item. When the menu fills the row, UIkit wraps the
   toggle onto a row of its own: it stays visible. A shorter menu puts it back. */
.wll-theme-item { flex: none; }
/* Until js/custom.js adds the toggle (at DOMContentLoaded), keep its place free, so the menu
   does not move 74px (44px toggle + 30px gap) while the page loads. Only with JavaScript:
   the head script sets html.wll-js at once. */
.wll-js .uk-navbar-right:not(:has(> .wll-theme-item))::after {
    content: "";
    flex: none;
    width: 44px;
    height: 44px;
}
/* The search icon and the mobile menu icon are drawn by UIkit (deferred): until then the links
   are 0px wide and the menu moves 20px when the icons appear. Keep their width free from the start. */
.uk-navbar-toggle[uk-search-icon],
.uk-navbar-toggle[uk-toggle] { min-width: 20px; }
/* Between 960px and 1199px the logo, menu, search icon and toggle did not fit on one row, so the
   toggle wrapped onto a second row (a taller header that also changed height while loading).
   Smaller gaps keep everything on one row. */
@media (min-width: 960px) and (max-width: 1199px) {
    .tm-header .uk-navbar-nav,
    .tm-header .uk-navbar-right { gap: 15px; }
    .tm-header .uk-navbar-nav > li > a { padding-left: 12px; padding-right: 12px; }
}

.wll-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;                  /* a bare icon, like the search and menu icons next to it */
    border-radius: 6px;
    background: transparent;
    color: var(--wll-text);
    cursor: pointer;
}
.wll-theme-toggle:hover { color: var(--wll-link); }
.wll-theme-toggle svg { width: 20px; height: 20px; }
.uk-light .wll-theme-toggle { color: #ffffff; }

/* Header icons (search, menu) and the mobile menu: 44px tap targets (WCAG 2.5.5), the same
   size as the dark mode button. The icons themselves keep their size. */
.tm-header .uk-navbar-toggle,
.tm-header-mobile .uk-navbar-toggle {
    min-width: 44px;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
#tm-dialog-mobile .uk-offcanvas-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    top: 10px;
    right: 10px;
}
#tm-dialog-mobile .uk-nav > li > a { padding-top: 10px; padding-bottom: 10px; }
#tm-dialog-mobile .uk-nav-sub { padding-top: 0; padding-bottom: 4px; }
#tm-dialog-mobile .uk-nav-sub a { padding-top: 10px; padding-bottom: 10px; }


/* --------------------------------------------------------------------------
   6. Accessibility helpers
   -------------------------------------------------------------------------- */

/* Focus ring follows the mode (the LESS default is blue on light). */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline-color: var(--wll-focus);
}
html[data-theme="dark"] :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    box-shadow: none;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) :is(a, button, input, select, textarea, [tabindex]):focus-visible {
        box-shadow: none;
    }
}

/* Skip-link target — keep main landmark scroll-margin so anchor lands cleanly (2.4.11) */
#main, main {
    scroll-margin-top: 96px;
}

/* No transitions or smooth scrolling for readers who asked for less motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Author box below the article (db8ytpschema element, class wll-author). */
.wll-author { border-top: 1px solid var(--wll-border); border-bottom: 1px solid var(--wll-border); padding: 24px 0; }
.wll-author::before { content: "Written by"; display: block; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wll-muted, #6b7280); margin-bottom: 4px; }
.wll-author .el-title { margin-top: 4px !important; }
/* The name links to the author's bio page (user field author-url). YOOtheme gives it
   uk-link-heading, which looks like plain heading text: use the link color and an underline. */
.wll-author .el-title a {
    color: var(--wll-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.wll-author .el-title a:hover {
    color: var(--wll-link-hover);
    text-decoration-thickness: 2px;
}
.wll-author .el-content { font-size: .9375rem; }

/* Article page, wide screens: the text column is only as wide as the text (72ch), then a
   64px gutter and a 400px sidebar. The container of the article page (breadcrumb, title,
   columns, "Read also") is narrowed to that width and aligned left, at the edge of the logo.
   Spacing scale, inner to outer: inside a box 28px, between boxes 40px, intro to article
   56px, gutter 64px. The gutter is the largest, so the sidebar reads as a separate area.
   The Authors page uses the same columns for its author cards, so its "About welovelinux"
   card is in the same place as on the site pages. */
@media (min-width: 960px) {
    .uk-container:has(> .uk-grid > .uk-width-2-3\@m > :is(.wll-article-text, .wll-author-cards)) {
        max-width: calc(72ch + 64px + 400px);   /* text + gutter + sidebar */
        /* Left-aligned with the logo, not centered: the header container is 1400px + 2 × 40px
           padding and centered, so start where it starts. */
        margin-left: max(0px, calc((100% - 1480px) / 2));
    }
    .uk-grid > .uk-width-2-3\@m:has(> :is(.wll-article-text, .wll-author-cards)) {
        flex: none;                       /* tm-grid-expand would let it grow again */
        width: min(66.6667%, calc(72ch + 30px));
    }
    .uk-grid > .uk-width-2-3\@m:has(> :is(.wll-article-text, .wll-author-cards)) + .uk-width-1-3\@m {
        flex: 1;
        width: auto;
        padding-left: 64px;               /* the gutter; UIkit's medium gutter is 30px */
    }
    /* The breadcrumb bar and the page header (or the profile header of an author) are separate
       sections with their own container. Narrow them to the same width, so the breadcrumb, the
       header icon, the title and the text all start at the same left edge (only the navbar
       keeps the full width). */
    #tm-main:has(.uk-width-2-3\@m > :is(.wll-article-text, .wll-author-cards))
        > :is(.uk-section:has(.uk-breadcrumb), .wll-cat-header, .wll-profile-header) > .uk-container {
        max-width: calc(72ch + 64px + 400px);
        margin-left: max(0px, calc((100% - 1480px) / 2));
    }
}

/* The step from the intro to the article body is a bigger break than the one between the
   tiers (40px), so it gets more space. */
.uk-article section.introduction + section:is(.what-it-means, .what-it-does, .how-to-use-it, .how-it-works) {
    margin-top: 56px;
}


/* --------------------------------------------------------------------------
   Sponsored content (site spec §9: everything paid is labeled)
   The label and the disclosure come from src/SponsorSource.php and only
   appear when an article has a sponsor name. Amber, so the label is never
   mistaken for a category or one of the three tier colors.
   -------------------------------------------------------------------------- */
.wll-sponsored {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid var(--wll-sponsor-border);
    border-radius: 4px;
    background: var(--wll-sponsor-bg);
    color: var(--wll-sponsor);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.5;
    text-transform: uppercase;
    vertical-align: 1px;
}
/* In a card's meta line: a little space before "date · category". */
.uk-article-meta .wll-sponsored,
.el-meta .wll-sponsored { margin-right: 6px; }

.wll-sponsor-disclosure {
    padding: 14px 18px;
    border-left: 4px solid var(--wll-sponsor-border);
    border-radius: 0 6px 6px 0;
    background: var(--wll-sponsor-bg);
    color: var(--wll-text);
    font-size: .9375rem;
}
.wll-sponsor-disclosure p { margin: 0; }
.wll-sponsor-disclosure strong { color: var(--wll-sponsor); }
.wll-sponsor-disclosure a { color: var(--wll-sponsor); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Accessibility fixes (Lighthouse/axe audit of November 29, 2026)
   -------------------------------------------------------------------------- */

/* UIkit colors <em> #f0506e: 3.2:1 on the tier background (fails AA). Italic is
   enough to show emphasis, so keep the text color. */
em { color: inherit; }

/* Links in running text: color alone is not enough (WCAG 1.4.1). The link blue has only
   2.6:1 (light) and 1.75:1 (dark) contrast with the text around it, so underline
   links in paragraphs, lists and tables of the article, in footer paragraphs and in
   text elements with the class wll-text-links (such as the "no results" text of Search).
   Navigation (table of contents, menus, pagination) and links with a class (buttons,
   cards) are not changed. */
.uk-article :is(p, li, td, th, blockquote, dd) a:not([class]):not(nav a),
footer p a:not([class]),
.wll-text-links p a:not([class]) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.uk-article :is(p, li, td, th, blockquote, dd) a:not([class]):not(nav a):hover,
footer p a:not([class]):hover,
.wll-text-links p a:not([class]):hover { text-decoration-thickness: 2px; }

/* "Back to top" under each article section (db8ytptoc plugin): it has a class, so the rule
   above skips it. The link blue has only about 2.2:1 contrast with the body text, so the
   underline is what shows it is a link. */
.uk-article .db8ytptoc-backtotop {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.uk-article .db8ytptoc-backtotop:hover { text-decoration-thickness: 2px; }

/* Pagination as buttons: page numbers under category lists (/news?start=25) and Previous /
   Next under an article. Each link is a 44px button (WCAG 2.5.5 target size); the current page
   is filled with the link color, so it stands out in both modes (the theme showed it as a
   nearly invisible gray number in dark mode). The arrow icons follow the text color. */
.uk-pagination { gap: 8px; margin-left: 0; }
.uk-pagination > * { padding-left: 0; }
.uk-pagination > * > :is(a, span) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid var(--wll-border);
    border-radius: 6px;
    background-color: var(--wll-surface);
    color: var(--wll-text);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}
.uk-pagination > * > a:hover {      /* navigation: the red of the menu */
    background-color: var(--wll-surface-hover);
    border-color: var(--wll-brand);
    color: var(--wll-brand);
}
.uk-pagination > * > a:focus-visible { outline: 2px solid var(--wll-focus); outline-offset: 2px; }
.uk-pagination > .uk-active > * {   /* white on the logo red (5.0:1) in both modes, like the pills */
    background-color: #e0002e;
    border-color: #e0002e;
    color: #ffffff;
}
.uk-pagination > .uk-disabled > * { opacity: 0.5; }
/* Under an article: Previous on the left, Next on the right (also when there is no Previous). */
.uk-pagination:not(.uk-flex-center) { justify-content: space-between; }
.uk-pagination:not(.uk-flex-center) > :has(> a[aria-label="Next Page"]) { margin-left: auto; }

/* Arrow after links that open a new tab (js/custom.js, newTabLinks). Small and in the link
   color, so it reads as part of the link; the screen reader text says "(opens in a new tab)". */
.wll-newtab-icon {
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-left: 0.25em;
    vertical-align: baseline;
}

/* Sitemap (override html/com_osmap/html/default.php). The page brings its own
   full-width sections, like a builder page, so remove the padding and the container
   of the component area around it. */
.tm-main:has(> .uk-container > .wll-sitemap) { padding: 0; }
.tm-main > .uk-container:has(> .wll-sitemap) { max-width: none; padding: 0; }
/* UIkit removes the padding of a container inside a container: give it back. */
.wll-sitemap .uk-container { padding-left: 15px; padding-right: 15px; }
@media (min-width: 640px) { .wll-sitemap .uk-container { padding-left: 30px; padding-right: 30px; } }
@media (min-width: 960px) { .wll-sitemap .uk-container { padding-left: 40px; padding-right: 40px; } }
.wll-sitemap-card .wll-sitemap-list { margin-top: 16px; font-size: 0.9375rem; }
/* The link fills its whole row (from divider to divider), so the whole row can be clicked. */
.wll-sitemap-card .wll-sitemap-list > li { margin-top: 0; padding: 0; }
.wll-sitemap-card .wll-sitemap-list li > a { display: block; padding: 8px 0; }
.wll-sitemap-card .wll-sitemap-list > li:first-child > a { padding-top: 0; }
.wll-sitemap-card .wll-sitemap-list .wll-sitemap-sub { margin: -4px 0 0; padding-left: 16px; }
.wll-sitemap-card .wll-sitemap-sub > li { margin-top: 0; }
.wll-sitemap-card .wll-sitemap-sub li > a { padding: 4px 0; }
.wll-sitemap-card .wll-sitemap-sub > li:last-child > a { padding-bottom: 8px; }
.wll-sitemap-more { display: inline-block; margin-top: 12px; font-size: 0.9375rem; font-weight: 600; }
.wll-sitemap-more::after { content: " \2192"; }

/* Site pages (template "Site page"): the "About welovelinux" links next to the text.
   The current page (aria-current, set by js/custom.js) gets the brand red and a bar. */
.wll-page-nav .wll-toc-title { margin-bottom: 8px; }
.wll-page-nav .uk-nav-default > li > a { color: var(--wll-text); padding: 8px 0 8px 12px; border-left: 3px solid transparent; }
.wll-page-nav .uk-nav-default > li > a:hover { color: var(--wll-brand); }
.wll-page-nav .uk-nav-default > li > a[aria-current="page"] { color: var(--wll-brand); font-weight: 600; border-left-color: var(--wll-brand); }

/* Contact form (RSForm! Pro form "welovelinux-contact", own layout): help texts below the
   labels, a quiet "(required)", and the error texts in a readable red. */
.wll-contact-form .uk-form-label { font-weight: 600; color: var(--wll-heading); }
/* Spam check (RSForm hashcash button): the size of a normal button, with a small check circle. */
/* RSForm's own hashcash style has a fixed light background; use the site colors instead. */
.wll-contact-form #SpamCheck, .wll-contact-form #SpamCheck:hover, .wll-contact-form #SpamCheck:active {
    background: var(--wll-surface); color: var(--wll-text); border: 1px solid var(--wll-border);
}
.wll-contact-form #SpamCheck:hover { background: var(--wll-surface-hover); }
.wll-contact-form #SpamCheck { display: inline-flex; align-items: center; gap: 10px; height: auto; min-height: 44px; padding: 6px 18px; line-height: 1.4; text-transform: none; }
.wll-contact-form #SpamCheck svg { width: 24px; height: 24px; flex: none; margin: 0; }
.wll-contact-form #SpamCheck .hashcash__text { margin: 0; color: inherit; }
.wll-form-required { font-weight: 400; color: var(--wll-muted); font-size: 0.875rem; }
.wll-form-help { margin: 6px 0 0; font-size: 0.875rem; color: var(--wll-muted); }
.wll-contact-form .formValidation .formError { display: block; margin-top: 4px; font-size: 0.875rem; color: #b91c1c; }
html[data-theme="dark"] .wll-contact-form .formValidation .formError { color: #fca5a5; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .wll-contact-form .formValidation .formError { color: #fca5a5; }
}
.wll-contact-form .uk-textarea { resize: vertical; }

/* Contact form frame: a sunken box (dark at the top and left, light at the bottom and right)
   on the light surface color. The fields are white (dark mode: the page color) with a grey
   border, so they stand out from the box. Only a field with an error gets a red border and
   a light red background. */
.wll-contact-form {
    --wll-frame-dark: #1f2937;
    --wll-frame-light: #d1d5db;
    --wll-input-border: #758195;             /* 4.1:1 on white */
    --wll-required: #dc2626;                 /* 4.8:1 on white */
    --wll-error-bg: #fef2f2;
    background: var(--wll-surface);
    border-top: 1px solid var(--wll-frame-dark);
    border-left: 1px solid var(--wll-frame-dark);
    border-bottom: 1px solid var(--wll-frame-light);
    border-right: 1px solid var(--wll-frame-light);
    padding: 20px;
}
@media (min-width: 640px) { .wll-contact-form { padding: 30px; } }
html[data-theme="dark"] .wll-contact-form {
    --wll-frame-dark: #a5adba; --wll-frame-light: #2b3442; --wll-input-border: #6b7789;
    --wll-required: #f87171; --wll-error-bg: #2a1518;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .wll-contact-form {
        --wll-frame-dark: #a5adba; --wll-frame-light: #2b3442; --wll-input-border: #6b7789;
        --wll-required: #f87171; --wll-error-bg: #2a1518;
    }
}
.wll-contact-form :is(.uk-input, .uk-select, .uk-textarea),
.wll-contact-form :is(.uk-input, .uk-select, .uk-textarea):focus {
    background-color: var(--wll-bg); border: 1px solid var(--wll-input-border);
}
.wll-contact-form :is(.uk-input, .uk-select, .uk-textarea):focus { border-color: var(--wll-focus); }
.wll-contact-form :is(.uk-input, .uk-select, .uk-textarea):is(.uk-form-danger, .rsform-error) {
    border: 2px solid var(--wll-required); background-color: var(--wll-error-bg);
}
.wll-contact-form #SpamCheck, .wll-contact-form #SpamCheck:active { background: var(--wll-bg); border-color: var(--wll-input-border); }

/* Example notes on the Corrections policy page: shown like the real notes in an article
   (normal text size, a bar on the left), not as a large quote. */
blockquote.wll-example-note {
    font-size: 1rem; line-height: 1.6; color: var(--wll-text);
    margin: 0 0 20px; padding: 12px 16px;
    background: var(--wll-surface); border-left: 4px solid var(--wll-border);
}
blockquote.wll-example-note p { margin: 0; }

/* Imprint and Accessibility (.wll-facts): facts as a compact two-column list (label | value) on wider screens.
   The labels use the heading color, so they also have enough contrast in dark mode. */
:is(.wll-imprint, .wll-facts) { padding: 8px 24px; }
:is(.wll-imprint, .wll-facts) dl { display: grid; grid-template-columns: 1fr; margin: 0; }
:is(.wll-imprint, .wll-facts) dt {
    color: var(--wll-heading); font-weight: 600; font-size: 0.875rem; text-transform: none;
    padding-top: 12px; margin: 0;
}
:is(.wll-imprint, .wll-facts) dd { margin: 0; padding: 2px 0 12px; border-bottom: 1px solid rgba(127, 127, 127, 0.3); }
:is(.wll-imprint, .wll-facts) dd:last-child { border-bottom: 0; }
:is(.wll-imprint, .wll-facts) .uk-description-list-divider > dt:nth-child(n+2) { margin-top: 0; padding-top: 12px; border-top: 0; }
@media (min-width: 640px) {
    :is(.wll-imprint, .wll-facts) dl { grid-template-columns: minmax(180px, 34%) 1fr; }
    :is(.wll-imprint, .wll-facts) dt, :is(.wll-imprint, .wll-facts) dd { padding: 12px 0; border-bottom: 1px solid rgba(127, 127, 127, 0.3); }
    :is(.wll-imprint, .wll-facts) dt:nth-last-child(2), :is(.wll-imprint, .wll-facts) dd:last-child { border-bottom: 0; }
    :is(.wll-imprint, .wll-facts) dt { padding-right: 16px; }
}

/* Privacy and cookie policy tables: on phones UIkit stacks the cells (uk-table-responsive); show the
   column name above each value, and the first cell ("When") as a heading of the row. */
@media (max-width: 959px) {
    :is(.wll-privacy-table, .wll-cookie-table) td[data-label]::before {
        content: attr(data-label); display: block;
        font-size: 0.8125rem; font-weight: 600; color: var(--wll-muted);
    }
    :is(.wll-privacy-table, .wll-cookie-table) td[data-label]:first-child { font-weight: 600; color: var(--wll-heading); padding-top: 16px; }
    :is(.wll-privacy-table, .wll-cookie-table) td[data-label]:first-child::before { content: none; }
}

/* Facts lists: no extra top margin on the labels (UIkit adds 20px to every dt after the first,
   which pushed the labels below their values). */
:is(.wll-imprint, .wll-facts) dl > dt:nth-child(n+2) { margin-top: 0; }

/* Error page (YOOtheme error.php, e.g. 404): the large status number has a fixed dark color,
   which is almost invisible in dark mode (1.1:1). Use the muted text color there. */
html[data-theme="dark"] .uk-section .uk-heading-xlarge { color: var(--wll-muted); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .uk-section .uk-heading-xlarge { color: var(--wll-muted); }
}

/* News topics bar (templates "News" and "News topic: card grid"): pill links to the news
   categories, above the articles. The same pills show the "Popular searches" on the search page. custom.js marks the current page (aria-current, uk-active).
   Active pill and hover: white on the logo red (5.0:1) in both modes. Pills are at least 40px high. */
.wll-topic-bar { margin-bottom: 40px; }
:is(.wll-topic-nav, .wll-search-suggest) .uk-subnav { row-gap: 10px; column-gap: 0; }
:is(.wll-topic-nav, .wll-search-suggest) .uk-subnav-pill > * > a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
    border: 1px solid var(--wll-border); border-radius: 999px;
    background: var(--wll-bg); color: var(--wll-text); font-size: 0.9375rem; text-transform: none;
}
:is(.wll-topic-nav, .wll-search-suggest) .uk-subnav-pill > * > a:hover,
.wll-topic-nav .uk-subnav-pill > .uk-active > a,
.wll-topic-nav .uk-subnav-pill > * > a[aria-current="page"] {
    background: #e0002e; border-color: #e0002e; color: #ffffff;
}
/* Phones: one row that scrolls sideways (with a fade at the right edge), instead of four rows.
   The links stay reachable with the keyboard: focus scrolls them into view. */
@media (max-width: 639px) {
    .wll-topic-bar { margin-bottom: 30px; }
    .wll-topic-nav { margin-right: -15px; }
    .wll-topic-nav .uk-subnav {
        flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: 0; padding: 2px 60px 2px 2px;
        -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
                mask-image: linear-gradient(to right, #000 85%, transparent);
    }
    .wll-topic-nav .uk-subnav::-webkit-scrollbar { display: none; }
    .wll-topic-nav .uk-subnav > * { flex: none; padding-left: 10px; }
    .wll-topic-nav .uk-subnav > :first-child { padding-left: 0; }
}

/* Format box below the articles of a section (templates "This Week in Linux: archive",
   "Commands: archive" and "Guides: archive"): what every article of the section contains. Two columns from 640px. */
.wll-format-box { margin-top: 60px; padding: 30px; background: var(--wll-surface); border-left: 4px solid #e0002e; }
.wll-format-parts { display: grid; gap: 20px 40px; margin: 20px 0 30px; }
@media (min-width: 640px) { .wll-format-parts { grid-template-columns: 1fr 1fr; } }
.wll-format-parts dt { color: var(--wll-heading); font-weight: 700; }
.wll-format-parts dd { margin: 4px 0 0; }
@media (max-width: 639px) { .wll-format-box { margin-top: 40px; padding: 20px; } }
/* The RSS button in the format box: a pill like the news topics, white on the logo red on hover. */
.wll-format-box .uk-button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
    border: 1px solid var(--wll-border); border-radius: 999px; background: var(--wll-bg);
    color: var(--wll-text); line-height: 1.2;
}
.wll-format-box .uk-button:hover { background: #e0002e; border-color: #e0002e; color: #ffffff; }

/* Tags page, "Tags by topic": one card per group (the tag's Note in the tag manager; see
   src/TagSource.php). Each tag is a row: name on the left, number of articles on the right.
   A group without tags with articles is hidden, also its column. */
.wll-tag-group { display: flex; flex-direction: column; }
.wll-tag-group:not(:has(.el-item)),
.wll-tag-groups:not(:has(.el-item)) { display: none; }
.wll-tag-group > .uk-h4 {
    flex: none; margin: 0; padding: 20px 24px 12px;
    background: var(--wll-surface); border-top: 3px solid #e0002e;
}
.wll-tag-group-list { flex: 1; margin-top: 0 !important; padding: 0 24px 16px; background: var(--wll-surface); }
.wll-tag-group-list .el-item > a {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 44px; border-top: 1px solid rgba(127, 127, 127, 0.3); text-decoration: none;
}
.wll-tag-group-list .el-title { color: var(--wll-text); font-weight: 600; }
.wll-tag-group-list .el-meta { margin-top: 0 !important; white-space: nowrap; }
/* Hover: the tag name turns red, also on the "Popular tags" cards (their background darkens too). */
.wll-tag-group-list .el-item > a:hover .el-title { text-decoration: underline; }
:is(.wll-tag-group-list, .wll-tag-popular) .el-item > a:hover .el-title { color: var(--wll-title-hover); }

/* Sitemap: links turn red on hover, like on the Tags page (instead of the theme's blue and grey,
   which were hard to read on the dark cards). Article and page links also get an underline. */
.wll-sitemap-card a:hover { color: var(--wll-title-hover); }
.wll-sitemap-list a:hover { text-decoration: underline; }

/* Homepage (sections with class wll-home): linked titles turn red on hover, like on the Tags page
   and the sitemap: the lead story, the latest news, and the guide, command and roundup cards. */
.wll-home .uk-link-toggle:hover .el-title { color: var(--wll-title-hover); }
