/* ==========================================================================
   sumizai.com — extras.css

   Three things that every page on the site needs and that did not fit in
   either the landing page's inline <style> or blog.css:

     1. .foot-tools  — the bar above the footer bottom line: this page as a
                       PDF, the PDF library, the YouTube channel.
     2. .pdf-*       — the PDF library page (/pdf/ and /pl/pdf/).
     3. @media print — the print stylesheet the PDFs are generated from.

   Linked LAST in every <head>, so its print rules beat the older, narrower
   print blocks that live inside blog.css and index.html.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FOOTER TOOLS
   -------------------------------------------------------------------------- */

.foot-tools {
    margin-top: 2.4rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.foot-tools + .foot-bottom {
    margin-top: 1.6rem;
}

.foot-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted) !important;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.foot-tool:hover,
.foot-tool:focus-visible {
    color: var(--text) !important;
    border-color: var(--border-hi);
    background: var(--panel-strong);
    transform: translateY(-1px);
}

.foot-tool svg { flex: none; opacity: 0.85; }
.foot-tool:hover svg { opacity: 1; }

/* the primary one — this very page as a PDF */
.foot-tool.is-pdf {
    border-color: var(--border-hi);
    background: linear-gradient(180deg, rgba(90, 169, 255, 0.14), rgba(90, 169, 255, 0.04));
    color: var(--text) !important;
}
.foot-tool.is-pdf:hover { border-color: var(--accent); background: rgba(90, 169, 255, 0.2); }
.foot-tool.is-pdf svg { color: var(--accent); opacity: 1; }

/* the YouTube channel, pushed to the far end of the bar */
.foot-tool.is-yt { margin-left: auto; }
.foot-tool.is-yt svg { color: #ff0033; opacity: 1; }
.foot-tool.is-yt:hover { border-color: rgba(255, 0, 51, 0.5); background: rgba(255, 0, 51, 0.08); }

@media (max-width: 720px) {
    .foot-tools { gap: 0.55rem; }
    .foot-tool { font-size: 0.8rem; padding: 0.5rem 0.85rem; }
    .foot-tool.is-yt { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   2. THE PDF LIBRARY PAGE
   -------------------------------------------------------------------------- */

.pdf-head { padding-block: 3.2rem 0.5rem; text-align: center; }
.pdf-head h1 { margin-inline: auto; max-width: 22ch; }
.pdf-head .post-lead { max-width: 64ch; margin-inline: auto; }

/* the three numbers under the lead */
.pdf-stats {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 0.8rem; margin-top: 2rem;
}
.pdf-stat {
    min-width: 8.5rem;
    padding: 1rem 1.4rem;
    border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
}
.pdf-stat b {
    display: block;
    font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
    color: var(--text);
}
.pdf-stat span {
    display: block; margin-top: 0.3rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--faint);
}

/* one group of documents (Main pages / Blog / Legal …) */
.pdf-group { padding-block: 2.6rem 0; }
.pdf-group:last-of-type { padding-bottom: 1rem; }
.pdf-group-head {
    display: flex; align-items: baseline; gap: 0.9rem;
    padding-bottom: 1rem; margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--border);
}
.pdf-group-head h2 {
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text);
}
.pdf-group-head .n {
    font-family: var(--mono); font-size: 0.7rem; color: var(--accent); opacity: 0.85;
}
.pdf-group-head .hint {
    margin-left: auto; font-size: 0.8rem; color: var(--faint);
}

.pdf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.pdf-card {
    position: relative;
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr auto;
    gap: 0 1.1rem; align-items: start;
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--border); border-radius: 16px; background: var(--panel);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.pdf-card:hover, .pdf-card:focus-visible {
    border-color: var(--border-hi); background: var(--panel-strong); transform: translateY(-3px);
}
.pdf-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the little document glyph on the left */
.pdf-icon {
    grid-row: 1 / span 3;
    display: grid; place-items: center;
    width: 40px; height: 48px; flex: none;
    border: 1px solid var(--border-hi); border-radius: 6px;
    background: linear-gradient(180deg, rgba(90, 169, 255, 0.12), rgba(90, 169, 255, 0.03));
    font-family: var(--mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.06em;
    color: var(--accent);
}
.pdf-card:hover .pdf-icon { border-color: var(--accent); }

.pdf-card .t {
    font-size: 1rem; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em;
    color: var(--text);
}
.pdf-card .d {
    margin-top: 0.45rem;
    font-size: 0.86rem; line-height: 1.6; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* The meta line is pinned to the bottom of the card, so the row of cards
   lines up however long the descriptions are. */
.pdf-card .m {
    grid-row: 3; align-self: end; min-width: 0;
    margin-top: 0.9rem; padding-top: 0.1rem;
    display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0 0.55rem;
    font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--faint);
}
.pdf-card .m .f {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pdf-card .m .sz { flex: none; }
.pdf-card .m .sep { flex: none; opacity: 0.4; }
.pdf-card .m .dl { flex: none; margin-left: auto; color: var(--accent); font-weight: 700; }

@media (max-width: 900px) { .pdf-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
    .pdf-card { padding: 1.15rem 1.15rem; gap: 0 0.85rem; }
    .pdf-stat { flex: 1 1 45%; min-width: 0; padding: 0.85rem 1rem; }
}

/* the "same library in the other language" strip */
.pdf-alt {
    margin: 2.4rem 0 4rem;
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--border-hi); border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(90, 169, 255, 0.08), rgba(255, 255, 255, 0.015));
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem;
}
.pdf-alt p { flex: 1 1 22rem; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.pdf-alt p b { color: var(--text); }

/* --------------------------------------------------------------------------
   3. PRINT — this is what the generated PDFs look like
   -------------------------------------------------------------------------- */

/* On screen the print-only furniture does not exist. */
.print-mast { display: none; }

@media print {

    /* The whole site is dark and token-driven, so one palette swap turns
       every page — landing, blog, legal — into a printable document. */
    :root {
        --bg: #ffffff;
        --bg-soft: #ffffff;
        --panel: #ffffff;
        --panel-strong: #ffffff;
        --text: #101725;
        --muted: #303c50;
        --faint: #5b6879;
        --accent: #0b57d0;
        --accent-2: #5b3fd6;
        --accent-3: #0e7490;
        --gold: #8a6100;
        --border: #d7dee8;
        --border-hi: #b9c4d3;
    }

    /* The top and bottom margins are deliberately generous: that is where the
       browser prints the running head (page title, sumizai.com) and the
       running foot (source URL, page x of y). */
    @page {
        size: A4;
        margin: 17mm 15mm 16mm;
    }

    html { font-size: 11.4pt; }

    /* Nothing on paper is mid-animation. Beyond the wasted transitions, this
       is what stops the scroll-reveal from eating whole sheets: the landing
       page hides every block below the fold behind `.reveal { opacity: 0 }`
       and only a scroll adds `.in`. A printed page is never scrolled, so the
       blocks kept their space in the layout and drew nothing — ten blank
       sheets out of thirteen on the English home page alone. */
    /* Blurred shadows are rasterised into image objects when printed, and a
       glow around a 6px dot came out as an opaque teal square. Nothing on
       paper needs a glow, so all of them go. */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        backdrop-filter: none !important;
    }
    .reveal, [class*="reveal"] {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        filter: none !important;
    }

    body {
        background: #fff !important;
        color: var(--text) !important;
        line-height: 1.55;
    }
    body::before, body::after { display: none !important; }

    /* Interactive furniture has no meaning on paper. */
    .shell > header,
    footer,
    .skip-link,
    .lang-select,
    .foot-tools,
    .ck-root,
    .ck-card,
    #ck-style,
    .nav-cta,
    .nav-links,
    .post-toc,
    .post-cta,
    .related,
    .crumbs,
    .pdf-alt,
    .to-top,
    video, iframe, canvas {
        display: none !important;
    }

    /* blog.css hides every <header> on paper, which also swallowed the
       article's own title block. Bring the in-page headers back. */
    main header,
    .post-head, .index-head, .pdf-head, .legal-head, .hero {
        display: block !important;
        padding-block: 0 !important;
        margin-bottom: 1.2rem;
    }

    /* …but the PDF library page is a table of contents, and on paper a table
       of contents is a list, not a grid of cards. */
    .pdf-group { display: block !important; padding-block: 1.4rem 0 !important; }
    .pdf-grid { display: block !important; }
    .pdf-card {
        display: block !important;
        break-inside: avoid;
        padding: 0.5rem 0 !important;
        border: 0 !important;
        border-bottom: 0.4pt solid var(--border) !important;
        border-radius: 0 !important;
    }
    .pdf-icon, .pdf-card .m .dl, .pdf-group-head .hint { display: none !important; }
    .pdf-card .t { display: block; font-size: 0.98rem; }
    .pdf-card .d {
        display: block !important;
        -webkit-line-clamp: none; overflow: visible;
        margin-top: 0.2rem; font-size: 0.82rem;
    }
    .pdf-card .m { margin-top: 0.25rem; font-size: 0.66rem; flex-wrap: wrap; }
    .pdf-card .m .f { overflow: visible; white-space: normal; word-break: break-all; }
    /* the address of the file itself, so a printed list is still usable */
    .pdf-card::after {
        content: "https://sumizai.com" attr(href);
        display: block; margin-top: 0.15rem;
        font-family: var(--mono); font-size: 0.66rem; color: var(--accent);
        word-break: break-all;
    }

    /* The masthead prints once, at the top of page one. */
    .print-mast {
        display: block !important;
        margin: 0 0 1.4rem;
        padding-bottom: 0.7rem;
        border-bottom: 1.5pt solid var(--accent);
    }
    .print-mast .pm-row {
        display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    }
    .print-mast .pm-brand {
        font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
    }
    .print-mast .pm-brand .ai {
        color: var(--accent) !important;
        -webkit-text-fill-color: var(--accent);
        background: none !important;
    }
    .print-mast .pm-tag,
    .print-mast .pm-url {
        font-size: 0.72rem; color: var(--faint);
    }
    .print-mast .pm-url {
        display: block; margin-top: 0.35rem;
        font-family: var(--mono); word-break: break-all;
    }

    /* Layout: nothing is a viewport-wide hero on paper. */
    .wrap, .read { max-width: none; width: auto; padding-inline: 0; }
    .shell { display: block; }
    main { display: block; padding: 0; }
    section, article { padding-block: 0; }

    /* Trailing space after the last paragraph is enough to spill onto a sheet
       of its own — the Polish DPA ended on a blank page 20 for exactly that
       reason. Nothing may add height below the final block. */
    .shell, main, .post-body, .legal-body, article, section {
        padding-bottom: 0 !important;
    }
    main > :last-child,
    article > :last-child,
    .legal-section:last-child,
    .qa:last-child,
    .pdf-group:last-of-type {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Typography and page breaks. */
    h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 0.6rem; }
    h2 { font-size: 1.22rem; line-height: 1.3; }
    h3 { font-size: 1.02rem; }
    h1, h2, h3, h4 { break-after: avoid-page; break-inside: avoid; color: var(--text); }
    p, li { orphans: 3; widows: 3; }
    .qa { margin-bottom: 1.5rem; }
    .legal-section { margin-bottom: 1.6rem; }

    /* Only things smaller than a sheet may refuse to be split. `break-inside:
       avoid` on a block that cannot fit reads as tidy and behaves terribly:
       the browser pushes it to a fresh page, still cannot fit it, and leaves
       the page it came from nine-tenths empty. That is what a blanket rule on
       .qa, .legal-section and <table> was doing here. */
    pre, figure, blockquote, tr,
    .callout, .card, .step, .tagline, .band, .duo,
    .post-card, .rel-card, .pdf-card, .pdf-stat, .price-card, .faq details {
        break-inside: avoid;
    }

    /* A long table breaks across sheets and repeats its heading, rather than
       leaving one stranded row on a page of its own. */
    table { break-inside: auto; width: 100%; }
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }
    /* A table that scrolls sideways on screen has no scrollbar on paper; give
       it the page instead of clipping it. */
    .table-scroll { overflow: visible !important; }
    .table-scroll table { min-width: 0 !important; }

    /* An A4 text column is narrower than the mobile breakpoint, so the card
       grids had all collapsed to one column and doubled the page count. */
    .post-grid, .related-grid, .legal-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.6rem !important;
        padding-block: 0.8rem 0 !important;
    }
    .legal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .post-card { padding: 0.9rem 1rem !important; }
    .post-card .more, .post-card .qcount { margin-top: 0.5rem !important; }

    /* Gradient text is invisible once the background is white. */
    .grad, .brand .ai, .specky-name, .pdf-icon {
        background: none !important;
        -webkit-background-clip: border-box !important;
        background-clip: border-box !important;
        color: var(--accent) !important;
        -webkit-text-fill-color: var(--accent) !important;
    }

    /* Cards keep their outline, lose their glow. */
    .card, .tagline, details, .mock, .specky-wrap, .callout, .post-card, .rel-card,
    .pdf-card, .pdf-stat, .legal-operator, pre.snippet {
        background: #fff !important;
        border-color: var(--border) !important;
        box-shadow: none !important;
    }

    /* Buttons become outlined links. Their glow, printed onto white, was a
       large blue smear behind the row. */
    .btn, .btn-primary, .btn-ghost, .nav-cta, .foot-tool {
        background: #fff !important;
        color: var(--accent) !important;
        border: 0.7pt solid var(--accent) !important;
        box-shadow: none !important;
        padding: 0.3rem 0.8rem !important;
        font-size: 0.82rem !important;
        text-shadow: none !important;
    }
    .btn .arrow, .cta-row .btn .arrow { display: none; }
    .cta-row { gap: 0.5rem !important; margin-top: 1rem !important; }

    /* Links: readable in ink, and an outgoing address is spelled out once. */
    a { color: var(--accent) !important; text-decoration: none; }
    .qa a, .legal-section a { text-decoration: underline; }
    .qa a[href^="http"]::after,
    .legal-section a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-family: var(--mono); font-size: 0.72em; color: var(--faint);
        word-break: break-all;
    }

    /* Chrome drops backgrounds by default; make sure nothing depends on them. */
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --------------------------------------------------------------------------
   4. "SUMIZAI VS …" — the Obsidian-alternatives comparison pages
   -------------------------------------------------------------------------- */

/* ---- the paginated index ---- */

.alt-index-head { padding-block: 3rem 0.5rem; text-align: center; }
.alt-index-head h1 { margin-inline: auto; max-width: 24ch; }
.alt-index-head .post-lead { max-width: 68ch; margin-inline: auto; }
.alt-index-head.is-sub { padding-block: 2.4rem 0.5rem; }
.alt-note {
    max-width: 68ch; margin: 1.6rem auto 0;
    font-size: 0.86rem; line-height: 1.65; color: var(--faint);
}
.alt-note a, .alt-attrib a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.alt-ref-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem;
    padding: 1.5rem 1.8rem; border-radius: var(--radius);
    border: 1px solid var(--border-hi);
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.10), rgba(255, 255, 255, 0.015));
}
.alt-ref-card > div { flex: 1 1 24rem; }
.alt-ref-card h2 {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 0.5rem;
}
.alt-ref-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

.alt-list-wrap { padding-block: 2.4rem 4rem; }
.alt-showing {
    font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--faint); margin-bottom: 1rem;
}
.alt-list { list-style: none; display: grid; gap: 0.7rem; counter-reset: none; }
.alt-item { min-width: 0; }
.alt-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "n name go" "n desc go" "n tags go";
    gap: 0.35rem 1.1rem; align-items: center;
    padding: 1.1rem 1.4rem; border-radius: 14px; text-decoration: none;
    border: 1px solid var(--border); background: var(--panel);
    transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.alt-card:hover, .alt-card:focus-visible {
    border-color: var(--border-hi); background: var(--panel-strong); transform: translateX(3px);
}
.alt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.alt-n {
    grid-area: n; font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
    opacity: 0.7; align-self: start; padding-top: 0.15rem;
}
.alt-name { grid-area: name; font-size: 1.02rem; font-weight: 700; color: var(--text); line-height: 1.35; }
.alt-desc { grid-area: desc; font-size: 0.87rem; line-height: 1.55; color: var(--muted); }
.alt-tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.2rem; }
.alt-tag {
    font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em;
    color: var(--faint); padding: 0.12rem 0.45rem;
    border: 1px solid var(--border); border-radius: 999px;
}
.alt-go {
    grid-area: go; font-size: 0.8rem; font-weight: 700; color: var(--accent);
    white-space: nowrap; opacity: 0; transition: opacity 0.22s ease;
}
.alt-card:hover .alt-go, .alt-card:focus-visible .alt-go { opacity: 1; }

@media (max-width: 620px) {
    .alt-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "n name" "n desc" "n tags"; padding: 1rem 1.1rem; }
    .alt-go { display: none; }
}

/* ---- pagination ---- */

.alt-pager {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0.4rem 0.8rem; margin-top: 2.4rem; padding-top: 1.8rem;
    border-top: 1px solid var(--border);
}
.alt-pager-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.alt-pg, .alt-pager-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.2rem; padding: 0.45rem 0.7rem; border-radius: 10px;
    font-size: 0.86rem; font-weight: 600; text-decoration: none;
    color: var(--muted); border: 1px solid var(--border); background: var(--panel);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
a.alt-pg:hover, a.alt-pager-arrow:hover, a.alt-pg:focus-visible, a.alt-pager-arrow:focus-visible {
    color: var(--text); border-color: var(--border-hi); background: var(--panel-strong);
}
.alt-pg.is-here {
    color: var(--text); border-color: var(--accent);
    background: rgba(90, 169, 255, 0.16); cursor: default;
}
.alt-pager-arrow.is-off { opacity: 0.32; }
.alt-gap { color: var(--faint); padding-inline: 0.2rem; }

/* ---- one comparison page ---- */

.alt-head { padding-block: 2.6rem 0.5rem; }
.alt-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.4rem; }
.alt-badge {
    font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.07em;
    color: var(--faint); padding: 0.25rem 0.6rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
}
.alt-badge.is-warn { color: var(--gold, #ffd166); border-color: rgba(255, 209, 102, 0.35); }

.alt-body { padding-block: 1.6rem 2.4rem; }
.alt-section { margin-bottom: 2.8rem; scroll-margin-top: 90px; }
.alt-section h2 {
    font-size: clamp(1.2rem, 2.3vw, 1.5rem); font-weight: 800;
    letter-spacing: -0.02em; margin-bottom: 1rem;
}
.alt-section p { color: var(--muted); margin-bottom: 1rem; }
.alt-section p strong { color: var(--text); }
.alt-section code {
    font-family: var(--mono); font-size: 0.86em; color: var(--accent-3);
    background: rgba(34, 211, 238, 0.08); padding: 0.1rem 0.36rem; border-radius: 5px;
    border: 1px solid rgba(34, 211, 238, 0.16);
}
.alt-src { font-size: 0.85rem; color: var(--faint); margin-bottom: 0.7rem; }
.alt-quote {
    margin: 0 0 1.6rem; padding: 1.1rem 1.4rem;
    border: 1px solid var(--border); border-left: 3px solid var(--accent-2);
    border-radius: 0 14px 14px 0; background: var(--panel);
    font-size: 1rem; line-height: 1.65; color: var(--text);
}

.alt-facts, .alt-compare { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.alt-facts th, .alt-compare th, .alt-facts td, .alt-compare td {
    padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
    text-align: left; vertical-align: top; color: var(--muted);
}
.alt-facts th[scope="row"], .alt-compare th[scope="row"] {
    width: 30%; color: var(--faint); font-weight: 600;
    font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
    padding-top: 0.85rem; white-space: nowrap;
}
.alt-compare thead th {
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text); border-bottom: 1px solid var(--border-hi);
}
.alt-compare tbody td:first-of-type { color: var(--text); }
.alt-facts tr:last-child th, .alt-facts tr:last-child td,
.alt-compare tr:last-child th, .alt-compare tr:last-child td { border-bottom: 0; }
.alt-facts, .alt-compare { min-width: 30rem; }

.alt-diff { list-style: none; display: grid; gap: 0.9rem; }
.alt-diff li {
    position: relative; padding-left: 1.6rem;
    color: var(--muted); line-height: 1.7;
}
.alt-diff li::before {
    content: ''; position: absolute; left: 0; top: 0.65em;
    width: 7px; height: 7px; border-radius: 2px;
    background: var(--accent); opacity: 0.8;
}

.alt-choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.alt-choose-col {
    padding: 1.3rem 1.5rem; border-radius: 14px;
    border: 1px solid var(--border); background: var(--panel);
}
.alt-choose-col.is-mine {
    border-color: var(--border-hi);
    background: linear-gradient(180deg, rgba(90, 169, 255, 0.09), rgba(255, 255, 255, 0.015));
}
.alt-choose-col h3 {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 0.9rem;
}
.alt-choose-col.is-mine h3 { color: var(--accent); }
.alt-choose-col ul { list-style: none; display: grid; gap: 0.55rem; }
.alt-choose-col li {
    position: relative; padding-left: 1.2rem;
    font-size: 0.92rem; line-height: 1.55; color: var(--muted);
}
.alt-choose-col li::before {
    content: '·'; position: absolute; left: 0.3rem; color: var(--accent); font-weight: 700;
}
@media (max-width: 700px) { .alt-choose { grid-template-columns: minmax(0, 1fr); } }

.alt-attrib {
    margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--border);
    font-size: 0.8rem; line-height: 1.6; color: var(--faint);
}
.alt-cta-wrap { padding-bottom: 2.6rem; }
.alt-allmore { margin-top: 1.2rem; font-size: 0.9rem; }
.alt-allmore a { color: var(--accent); text-decoration: none; font-weight: 700; }

@media print {
    .alt-pager, .alt-go, .alt-reference { display: none !important; }
    .alt-card { break-inside: avoid; }
    .alt-choose { grid-template-columns: 1fr 1fr !important; }
    .alt-quote { background: #fff !important; }
    .alt-facts, .alt-compare { min-width: 0 !important; }
}

/* Which AlternativeTo list an entry came from — the eyebrow no longer says it,
   so it lives here, next to the licence. */
.alt-badge.is-list { color: var(--accent-2); border-color: rgba(167, 139, 250, 0.35); }

/* The two reference cards are separate statements, not a stacked pair — they
   were touching. */
.alt-reference { display: grid; gap: 1.1rem; padding-top: 2.6rem; }

/* Trademarks, sources and corrections. Quiet, but on every page of the
   section rather than buried in a single legal document. */
.alt-disclaimer {
    margin-block: 2.4rem 3.5rem;
    padding: 1.3rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}
.alt-disclaimer h2 {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 0.7rem;
}
.alt-disclaimer p {
    font-size: 0.82rem; line-height: 1.7; color: var(--faint); margin: 0;
}
.alt-disclaimer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media print { .alt-disclaimer { break-inside: avoid; background: #fff !important; } }

/* Who is behind the site: registered name, form, address, tax number. Sits
   above the copyright line on every page, not only inside the legal PDFs. */
.foot-company {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
}
.foot-company-label {
    display: block;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 0.4rem;
}
.foot-company address {
    font-style: normal;
    font-size: 0.8rem; line-height: 1.65; color: var(--faint);
}
.foot-company a { color: var(--muted); text-decoration: none; }
.foot-company a:hover { color: var(--text); text-decoration: underline; }
.foot-company + .foot-bottom { margin-top: 1.4rem; }

/* --------------------------------------------------------------------------
   5. THE DOWNLOAD HUB — /download/ and /pl/download/
   -------------------------------------------------------------------------- */

.nav-dl {
    padding: 0.3rem 0.75rem; border-radius: 999px;
    border: 1px solid var(--border-hi); color: var(--text) !important;
}
.nav-dl:hover { border-color: var(--accent); background: rgba(90, 169, 255, 0.14); }
.foot-tool.is-dl svg { color: var(--accent-3); opacity: 1; }

.dl-head { padding-block: 3.2rem 0.5rem; text-align: center; }
.dl-head h1 { margin-inline: auto; max-width: 18ch; }
.dl-head .post-lead { max-width: 58ch; margin-inline: auto; }

.dl-grid-wrap { padding-block: 2.4rem 1rem; }
.dl-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem; max-width: 46rem; margin-inline: auto;
}
@media (max-width: 680px) { .dl-grid { grid-template-columns: minmax(0, 1fr); } }

/* Flex column with the button pushed down, so a one-line requirement and a
   two-line one still put both buttons on the same baseline. */
.dl-card {
    position: relative; display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 0.35rem; padding: 2rem 1.6rem 1.6rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--panel);
    transition: border-color 0.25s ease, background 0.25s ease;
}
.dl-card:hover { border-color: var(--border-hi); background: var(--panel-strong); }
.dl-os { color: var(--muted); margin-bottom: 0.3rem; }
.dl-card:hover .dl-os { color: var(--text); }
.dl-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.dl-ext {
    font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
    color: var(--faint); border: 1px solid var(--border);
    border-radius: 999px; padding: 0.1rem 0.45rem; vertical-align: 0.18em;
}
.dl-req { font-size: 0.8rem; color: var(--faint); line-height: 1.5;
    max-width: 24ch; min-height: 3em; }
.dl-badge {
    margin-bottom: 1rem;
    font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--gold, #ffd166); border: 1px solid rgba(255, 209, 102, 0.35);
    border-radius: 999px; padding: 0.16rem 0.6rem; margin-top: 0.5rem;
}

/* The button is the whole point of the page: big, and honest about what it
   does right now. */
.dl-btn {
    display: block; width: 100%; margin-top: auto;
    padding: 0.95rem 1.2rem; border-radius: 14px;
    font-size: 0.98rem; font-weight: 700; text-decoration: none; text-align: center;
    border: 1px solid var(--border-hi); color: var(--text);
    background: linear-gradient(180deg, rgba(90, 169, 255, 0.16), rgba(90, 169, 255, 0.05));
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.dl-btn:hover { border-color: var(--accent); background: rgba(90, 169, 255, 0.22); transform: translateY(-2px); }
.dl-btn.is-ready {
    color: #04101f; border-color: transparent;
    background: linear-gradient(100deg, var(--accent), var(--accent-2) 65%, var(--accent-3));
}
.dl-sub { margin-top: 0.55rem; font-size: 0.74rem; color: var(--faint); }

.dl-soon {
    max-width: 46rem; margin: 1.6rem auto 0; padding: 1.4rem 1.6rem;
    border: 1px solid var(--border); border-left: 3px solid var(--accent-3);
    border-radius: 0 14px 14px 0; background: var(--panel);
}
.dl-soon h2 { font-size: 1rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text); }
.dl-soon p { font-size: 0.92rem; line-height: 1.7; color: var(--muted); }

.dl-what { padding-block: 2.8rem 0; }
.dl-what h2, .dl-other h2 {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 1rem;
}
.dl-what ul { list-style: none; display: grid; gap: 0.75rem; }
.dl-what li {
    position: relative; padding-left: 1.5rem; color: var(--muted); line-height: 1.7;
}
.dl-what li::before {
    content: ''; position: absolute; left: 0; top: 0.62em;
    width: 6px; height: 6px; border-radius: 2px; background: var(--accent-3); opacity: 0.85;
}
.dl-what code, .dl-other code {
    font-family: var(--mono); font-size: 0.86em; color: var(--accent-3);
    background: rgba(34, 211, 238, 0.08); padding: 0.1rem 0.36rem; border-radius: 5px;
    border: 1px solid rgba(34, 211, 238, 0.16);
}
.dl-mail { padding-block: 2.6rem 0; }
.dl-privacy { margin-top: 1.2rem; font-size: 0.8rem; line-height: 1.6; color: var(--faint); }
.dl-privacy a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dl-other { padding-block: 2.6rem 4rem; }
.dl-other p { color: var(--muted); margin-bottom: 1.2rem; }

@media print {
    .dl-btn { break-inside: avoid; }
    .dl-grid { grid-template-columns: 1fr 1fr !important; }
}
