.github-corner {
    top: 0;
    right: 0;
    position: fixed;
    z-index: 9999;
}
.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}
@media (max-width: 992px) {
    .github-corner {
        display: none;
    }
}
@keyframes octocat-wave {
    0% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(-25deg);
    }
    40% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(-25deg);
    }
    80% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}
@media (max-width: 500px) {
    .github-corner:hover .octo-arm {
        animation: none;
    }
    .github-corner .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
    .github-link {
        font-size: 0.8rem;
    }
    .title {
        font-size: 1.5rem;
    }
    .main {
        margin-top: 10vh;
    }
    .small-mobile {
        font-size: 0.8rem;
    }
    .grecaptcha-badge {
        visibility: hidden;
    }
}
.img-shadow {
    -webkit-box-shadow: 8px 8px 16px 0px rgba(66, 68, 90, 1);
    -moz-box-shadow: 8px 8px 16px 0px rgba(66, 68, 90, 1);
    box-shadow: 8px 8px 16px 0px rgba(66, 68, 90, 1);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    max-width: 100%;
}
.download-badge:hover {
    filter: brightness(120%);
}
.logo-img {
    vertical-align: middle;
}
.logo-span {
    color: gray;
}
.cmd-top {
    border: 1px solid silver;
    padding: 6px;
    font-weight: bold;
    margin-left: 8px;
    background: #efefef;
    font-family: var(--bs-font-monospace);
    min-width: 240px;
    text-align: center;
    display: inline-block !important;
}
.cmd-bottom {
    color: silver;
}
.cmd-bottom pre {
    color: #fff;
    border: 1px solid silver;
    max-width: fit-content;
    padding: 4px;
    margin: auto;
}
#mainNav {
    transition: top 0.3s;
}
.grecaptcha-badge {
    display: none;
}
#mainNav .navbar-toggler {
    margin-right: 1rem;
}
.cmd-block {
    display: block;
    margin-top: 15px;
}
@media (min-width: 1400px) {
    .cmd-block {
        display: inline;
    }
}
.l {
    color: #2f5b0e;
}
#cookieConsent {
    background-color: rgba(20, 20, 20, 0.8);
    min-height: 50px;
    font-size: 14px;
    color: white;
    line-height: 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    text-align: center;
    padding-top: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s 0.5s;
}
#cookieConsent.show {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
#cookieConsent button {
    background-color: #b0d1c4;
    color: #000;
    border: none;
    padding: 5px 15px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-height: 40px;
    vertical-align: middle;
}
#cookieConsent button:hover {
    background-color: #fff;
}
.cmd-block {
    white-space: nowrap;
    font-size: 0.9rem;
}
.cmd-block i:hover {
    cursor: pointer;
    color: #000;
}
.cmd-bottom i:hover {
    cursor: pointer;
    color: #fff;
}
.cmd-bottom pre {
    display: inline-block;
    min-width: 220px;
    vertical-align: middle;
}
.cmd-bottom i {
    margin-left: 0.25rem;
}
.cmd-title {
    display: inline-block;
    min-width: 35px;
}
@media (min-width: 1200px) {
    .cmd-separator {
        margin-right: 5px;
    }
}
@media (max-width: 768px) {
    .masthead {
        padding-top: 14.5rem;
    }
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
}
.hero-title { margin-bottom: .35em !important; font-size: clamp(2.6rem, 4.5vw, 4.7rem); }
.hero-title-line, .hero-title-ai { display: block; }
.hero-title-ai {
    font-family: "Kanit", sans-serif;
    font-size: .9em;
    line-height: 1.15;
    letter-spacing: -.035em;
    color: #26bcae;
    background: linear-gradient(90deg, #259fc0 0%, #31c9bf 25%, #51dbb3 50%, #31c9bf 75%, #259fc0 100%);
    background-size: 200% 100%;
    animation: hero-gradient-flow 4s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes hero-gradient-flow {
    from { background-position: 200% 50%; }
    to { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-title-ai { animation: none; }
}
.hero-downloads { margin-top: -30px; }
.hero-downloads-pl { margin-top: -5px; }
.badge-wrap { flex-wrap: wrap; }
.badge-row { margin-bottom: 10px; }
.store-badge { width: 144px; }
.muted-label { color: gray; }
.release-line { margin-top: 0; }
.ink { color: #000; }
.release-more { margin-top: 5px; }
.repo-badge { vertical-align: sub; }
.hero-support { color: #434343; font-size: 1rem; margin-top: 1.4rem; }
.support-caption { font-size: .8rem; padding: 4px; }
.coffee-badge { width: 150px; }
.features-section { padding-top: 1rem; }
.silver-label { color: silver; }
.contact-message { height: 10rem; }
.feedback-status { display: none; }
.corner-svg { fill: #151513; color: #fff; position: absolute; top: 0; border: 0; right: 0; }
.corner-arm { transform-origin: 130px 106px; }
.language-flag { box-shadow: 0 0 4px rgba(66, 68, 90, 1); }

.nav-contact { border: 0; background: none; text-align: left; }
.platform-grid, .support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; text-align: center; }
.platform-card, .support-card { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.platform-card h3, .support-card h3, .support-card p { margin: 0; }
.platform-card { color: #fff; }
.platform-card a { color: #fff; }
.platform-card pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.platform-card small { color: silver; overflow-wrap: anywhere; max-width: 100%; }
.section-description { color: silver; text-align: center; margin-bottom: 2.5rem; }
.support-card { color: #fff; }
.support-card p { color: silver; font-size: .9rem; }
.support-card > i { font-size: 1.5rem; }
#contactForm .contact-message { height: 10rem; }
@media (max-width: 767px) {
    .platform-grid, .support-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .cmd-block { white-space: normal; }
    .cmd-top { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}
.support-card .btn { margin-top: auto; }

#mainNav .nav-download { color: #000; font-weight: 700; }

.support-card .btn:hover, .support-card .btn:focus-visible { text-decoration: none; }
.download-checksums { color: silver; overflow-wrap: anywhere; }

#mainNav .nav-contact:hover, #mainNav .nav-contact:focus-visible { text-decoration: underline; }

/* Locale directory uses the same details/summary interaction as v2. */
.language-picker { position: relative; }
.language-picker summary { display: flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none; white-space: nowrap; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-chevron { display: inline-flex; align-items: center; font-size: .7em; color: #6c757d; }
.language-chevron::before { display: block; }
#mainNav .nav-contact { font-size: 1.25rem; line-height: 1.2; }
@media (min-width: 992px) {
    #mainNav .navbar-nav { align-items: center; }
}
.language-picker > div {
    position: absolute; top: 100%; right: 0; z-index: 1050;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px 8px; width: 560px; max-height: calc(100dvh - 110px);
    overflow-y: auto; overscroll-behavior: contain; padding: 12px;
    background: #fff; border: 1px solid #ddd; border-radius: 10px;
    box-shadow: 0 15px 40px #0003;
}
.language-picker:not([open]) > div { display: none; }
#mainNav .language-picker a { display: block; padding: 10px 12px; border-radius: 6px; overflow-wrap: anywhere; color: #000; }
#mainNav .language-picker a:hover, #mainNav .language-picker a[aria-current] { background: #f5f5f5; }
@media (max-width: 991px) {
    .language-picker > div { left: 0; right: auto; width: min(560px, calc(100vw - 6rem)); grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .language-picker > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .hero-title { font-size: clamp(1.65rem, 8.5vw, 2.6rem); }
}

/* Gallery captions, including the mobile lightbox layout. */
.glightbox-container .gslide-description {
    background: #000;
    color: #fff;
    text-align: center;
}
.glightbox-container .gslide-title,
.glightbox-container .gslide-desc {
    color: #fff;
    text-align: center;
}
.glightbox-container .gslide-title:last-child { margin-bottom: 0; }

.platform-card h3 {
    color: #a1a1a1;
    transition: color .3s ease;
}
.platform-card:hover h3,
.platform-card:focus-within h3 { color: #fff; }
.platform-card .btn:hover,
.platform-card .btn:focus-visible { color: #000; text-decoration: none; }
.appimage-download small { font-size: .75rem; }

.cmd-copy-group {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    vertical-align: middle;
}
.cmd-copy-group .cmd-top,
.cmd-copy-group pre {
    border-radius: 10px;
    margin-bottom: 0;
}
.cmd-copy-group .cmd-top { margin-right: 0; }
.cmd-copy-group i {
    flex-shrink: 0;
    margin-left: 0;
    cursor: pointer;
}

.cmd-copy-group pre {
    font-family: var(--bs-font-monospace);
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 4px;
    min-width: 220px;
}
#changelogModal .btn-close { margin-left: 0; }
.changelog-copy { font-size: 1.15rem; line-height: 1; }
.changelog-copy:hover { opacity: .75; }

.glightbox-container .gallery-counter {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 99999;
    color: #a1a1a1;
    font-size: .9rem;
    line-height: 1;
    pointer-events: none;
}

.features-list { margin-bottom: 0; }
.features-gallery { margin: 2rem auto 0; max-width: 440px; }
.feature-screenshot { margin: 0 0 1.25rem; }
.feature-screenshot small { margin-top: 10px !important; }
.feature-screenshot img { display: block; width: 100%; height: auto; }
@media (min-width: 992px) {
    .features-layout {
        display: grid;
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        column-gap: 3rem;
        row-gap: 1.5rem;
    }
    .features-copy { display: contents; }
    .features-copy h2 { grid-column: 1; margin-bottom: 0 !important; }
    .features-list { grid-column: 1; grid-row: 2; }
    .features-gallery {
        grid-column: 2;
        grid-row: 2;
        position: relative;
        margin: 0;
        max-width: none;
        min-width: 0;
    }
    .features-screenshots {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    .feature-screenshot { width: 87%; margin: 0; }
    .feature-screenshot .gallery-lightbox { margin-top: 0 !important; }
}

.platform-download-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 144px;
    height: 48px;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #4f4f4f;
    border-radius: 5px;
    background: #000;
    transition: filter .2s ease;
}
.platform-download-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.platform-download-badge:hover { filter: brightness(1.2); text-decoration: none; }
.platform-download-badge .download-badge:hover { filter: none; }
.platform-appimage { font-size: .95rem; font-weight: 600; }

/* MSI and ZIP artwork already includes its own border. */
.platform-download-badge.download-link { border: 0; }
.platform-ms-store { background-color: #202020; }
.platform-snap-store { background-color: #252525; }

.hero-downloads .download-badge { transition: filter .25s ease; }
.platform-appimage {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.platform-appimage:hover,
.platform-appimage:focus-visible {
    background-color: #fff;
    color: #000;
    border-color: #fff;
    filter: none;
}

@media (max-width: 991px) {
    #mainNav .nav-contact { font-size: 1rem; line-height: inherit; }
    .hero-layout { flex-direction: column; }
    .hero-copy-column, .hero-copy, .hero-media-column { display: contents; }
    .hero-intro { order: 0; text-align: center; }
    .hero-intro .lead { margin-bottom: 1rem !important; }
    .hero-preview { order: 1; width: 100%; margin-bottom: 2rem; }
    .hero-downloads { order: 2; width: 100%; margin-top: 0; text-align: center; }
    .hero-support { order: 3; width: 100%; margin-top: 1.5rem; }
}

@media (max-width: 575px) {
    #features > .container { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    .features-list { padding-left: 1.25rem; }
}

.download-changelog { color: #a1a1a1; font-size: .875rem; }
.download-changelog a {
    color: #fff;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
}

.checksum-copy {
    border: 0;
    padding: 2px 4px;
    margin-left: 4px;
    background: transparent;
    color: inherit;
    line-height: inherit;
    transition: color .2s ease;
}
.checksum-copy:hover, .checksum-copy:focus-visible { color: #fff; }

#mainNav .language-picker a { display: flex; align-items: center; gap: 8px; }
.language-icon { width: 24px; height: 16px; object-fit: contain; flex-shrink: 0; }

.language-picker > div { width: 720px; }
#mainNav .language-picker a { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 991px) {
    .language-picker > div {
        width: min(720px, calc(100vw - 6rem));
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #mainNav .language-picker a { padding: 8px 6px; }
}
@media (max-width: 420px) {
    .language-picker > div { grid-template-columns: 1fr; }
}

.footer-language { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }

@media (min-width: 992px) {
    .hero-layout { align-items: stretch !important; }
    .hero-media-column {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .hero-media-column .hero-support { margin-top: 1rem; }
}

.hero-image-caption { color: #4f4f4f; font-size: .9rem; line-height: 1.5; }

.hero-github { margin-top: 8px; }
@media (min-width: 992px) {
    .hero-media-column { justify-content: flex-start; }
    .hero-media-column .hero-support { margin-top: 16px; }
}

.hero-image-caption { margin-top: 24px !important; }

.dotted-underline { text-decoration: underline dotted; text-underline-offset: 4px; }

/* Consistent spacing between the rows below the hero screenshot. */
.hero-image-caption { margin-top: 24px !important; }
.hero-github { margin-top: 16px; }
.hero-support,
.hero-media-column .hero-support { margin-top: 16px; }
.hero-support .support-caption { padding: 0; }
.hero-support .btn.mt-2 { margin-top: 16px !important; }

@media (max-width: 575px) {
    .download-checksums small { font-size: .7rem; }
    .checksum-value { display: inline-block; white-space: nowrap; font-size: clamp(.5rem, 2.35vw, .65rem); }
    .checksum-value .checksum-copy { margin-left: 2px; padding: 2px; }
}

.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #4f4f4f;
    border-radius: 10px;
    background: #212529;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease;
}
.scroll-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.scroll-to-top:hover { background: #4f4f4f; }
@media (max-width: 575px) {
    .scroll-to-top { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .scroll-to-top { transition: none; }
}

.gallery-lightbox {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 8px 8px 16px rgba(66, 68, 90, 1);
}
.gallery-lightbox .img-shadow { box-shadow: none; }
.gallery-lightbox img { transition: transform .35s ease; }
@media (hover: hover) {
    .gallery-lightbox:hover img { transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox img { transition: none; }
}

.language-icon[src$="/it.svg"] { padding: 2px 3px; }
