:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #5f6368;
    --red: #ff0000;
    --red-dark: #d60000;
    --line: #ebebeb;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Space Grotesk", sans-serif;
    background: radial-gradient(circle at 20% 10%, #fff5f5 0%, var(--bg) 45%) no-repeat;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.topbar,
.footer {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar {
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 8px;
}

.adfree-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--red);
    border: 1px solid #ffc8c8;
    background: #fff5f5;
    border-radius: 999px;
    padding: 0.18rem 0.42rem;
    margin-left: 0.15rem;
}

.badge {
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background: #111;
    border: 1px solid #000;
    border-radius: 999px;
    padding: 0.36rem 0.7rem;
}

.github-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.68rem;
    background: transparent;
    color: #111;
    border: 1.5px solid #111;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.top-links {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.68rem;
    background: transparent;
    color: #111;
    border: 1.5px solid #111;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mobile-changelog-btn {
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #111;
    border: 1.5px solid #111;
    border-radius: 999px;
    background: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.36rem 0.72rem;
    min-height: 2.2rem;
    transition: all 0.2s ease;
}

.mobile-changelog-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.social-badge:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

.social-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.github-badge:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

.github-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.star-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.hero {
    width: min(100%, 1100px);
    margin: auto;
    padding: 2rem 1.2rem 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 1.5rem;
    align-items: center;
}

.hero-copy {
    min-width: 0;
}

.hero-showcase {
    max-width: 360px;
    margin: 0 0 0 auto;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
    height: clamp(320px, 42vw, 500px);
    aspect-ratio: 10 / 14;
    padding: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-showcase-caption {
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.4;
}

.kicker {
    display: inline-block;
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
}

h1 {
    margin: 0.6rem 0 1rem;
    font-size: clamp(1.85rem, 4.3vw, 3.3rem);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0;
    max-width: 62ch;
    color: var(--muted);
    line-height: 1.65;
}

.cta-row {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    text-decoration: none;
    border-radius: 10px;
    padding: 0.75rem 1.1rem;
    border: 1px solid transparent;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn-primary {
    color: #111;
    background: #fff;
    border-color: #111;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-primary:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(255, 0, 0, 0.25);
}

.btn-secondary {
    color: #111;
    border-color: #111;
    background: #fff;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    background: #f8f8f8;
}

.btn-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.download-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.18);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.btn-primary:hover .download-count {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.status {
    min-height: 1.25rem;
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.feature-total {
    margin: 0.95rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.feature-total strong {
    color: #111;
}

.features {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 0.4rem 1.2rem 2.8rem;
}

.section-head h2 {
    margin: 0.55rem 0 0;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.2;
}

.feature-layout {
    margin-top: 1.2rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: 230px 1fr;
    align-items: start;
}

.feature-rail {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
    padding: 0.9rem;
    position: sticky;
    top: 1rem;
}

.feature-rail h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #121212;
}

.feature-rail ul {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.feature-rail li {
    border: 1px solid #f0d7d7;
    border-radius: 9px;
    background: #fff;
    padding: 0.45rem 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-rail li:hover {
    background: #fff3f3;
    border-color: var(--red);
}

.feature-rail strong {
    min-width: 1.6rem;
    text-align: center;
    color: #fff;
    background: #111;
    border-radius: 999px;
    padding: 0.14rem 0.38rem;
    font-size: 0.74rem;
}

.feature-groups {
    display: grid;
    gap: 0.9rem;
}

.feature-group {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.95rem 1rem 1rem;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04);
}

.feature-group header {
    margin-bottom: 0.65rem;
}

.feature-group h3 {
    margin: 0;
    color: var(--red);
    font-size: 1.02rem;
}

.feature-group p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.feature-group ul {
    margin: 0;
    padding-left: 1.15rem;
    column-count: 2;
    column-gap: 1.3rem;
}

.feature-item {
    color: #1f1f1f;
    line-height: 1.42;
    font-size: 0.92rem;
    break-inside: avoid;
    margin-bottom: 0.45rem;
}

.faq {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 0.2rem 1.2rem 2.8rem;
}

.faq-list {
    margin-top: 1.05rem;
    display: grid;
    gap: 0.7rem;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.15rem 0.9rem;
}

.faq-item[open] {
    border-color: #f2c9c9;
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.06);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: #111;
    list-style: none;
    padding: 0.75rem 0;
    position: relative;
    padding-right: 1.5rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--red);
    font-weight: 700;
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-item p {
    margin: 0 0 0.8rem;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.93rem;
}

.support {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 0.2rem 1.2rem 2.8rem;
}

.support-subtitle {
    margin: 0.6rem 0 0;
    max-width: 70ch;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.support-grid {
    margin-top: 1.2rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.support-card {
    border: 1.5px solid #111;
    border-radius: 12px;
    background: #fff;
    padding: 1.3rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.support-card:hover {
    border-color: var(--red);
    box-shadow: 0 12px 32px rgba(255, 0, 0, 0.12);
    transform: translateY(-2px);
}

.support-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.support-icon-img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
}

.support-icon-svg {
    width: 50px;
    height: 50px;
    display: block;
    color: #111;
}

.support-card h3 {
    margin: 0;
    color: #111;
    font-size: 1.1rem;
}

.support-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.4;
    flex-grow: 1;
}

.support-link {
    color: var(--red);
    font-weight: 600;
    font-size: 0.9rem;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-nav {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #1f1f1f;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-nav a:hover {
    color: var(--red);
    border-color: var(--red);
}

.footer-credit {
    color: #111;
    font-weight: 600;
    font-size: 0.9rem;
}

.static-page {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 2rem 1.2rem 3rem;
}

.static-page h1 {
    margin-top: 0;
}

.static-page .lead {
    margin: 0;
    max-width: 70ch;
    color: var(--muted);
    line-height: 1.6;
}

.content-blocks {
    margin-top: 1.3rem;
    display: grid;
    gap: 0.9rem;
}

.content-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
}

.content-block h2 {
    margin: 0;
    color: #111;
    font-size: 1.1rem;
}

.content-block p,
.content-block li {
    color: #222;
    line-height: 1.5;
}

.content-block ul {
    margin: 0.6rem 0 0;
    padding-left: 1.15rem;
}

.contact-list {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.5rem;
}

.contact-list a {
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    width: fit-content;
}

.contact-list a:hover {
    color: var(--red);
    border-color: var(--red);
}

@media (max-width: 640px) {

    .topbar,
    .footer {
        gap: 0.7rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        text-align: left;
        position: relative;
        padding-right: 6.8rem;
        min-height: 4.2rem;
    }

    .top-links {
        display: none;
    }

    .mobile-changelog-btn {
        display: inline-flex;
        position: absolute;
        top: 1.05rem;
        right: 1rem;
    }

    .btn-secondary {
        display: none;
    }

    .footer {
        text-align: center;
        align-items: center;
    }

    .footer>span {
        width: 100%;
        text-align: center;
    }

    .footer-nav {
        width: 100%;
        justify-content: center;
    }

    .footer-credit {
        width: 100%;
        text-align: center;
    }

    .hero {
        padding: 1.1rem 1rem 2rem;
        grid-template-columns: 1fr;
    }

    .hero-copy {
        order: 2;
    }

    .hero-copy .kicker,
    .hero-copy h1 {
        display: none;
    }

    .hero-showcase {
        max-width: 100%;
        margin: 0 auto 1.25rem;
        order: 1;
        width: min(100%, 320px);
        margin-bottom: 1.25rem;
    }

    .hero-carousel {
        border-radius: 18px;
        height: clamp(280px, 90vw, 460px);
        aspect-ratio: 10 / 13.5;
    }

    h1 {
        font-size: clamp(1.7rem, 8vw, 2.35rem);
    }

    .subtitle,
    .feature-total,
    .support-subtitle,
    .static-page .lead {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .cta-row {
        flex-direction: column;
        gap: 0.65rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1rem;
    }

    .topbar,
    .footer,
    .features,
    .faq,
    .support,
    .static-page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .brand {
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .adfree-tag {
        font-size: 0.62rem;
        padding: 0.16rem 0.34rem;
    }

    .github-badge,
    .social-badge {
        width: 100%;
        justify-content: center;
        min-height: 2.8rem;
    }

    .github-icon {
        width: 16px;
        height: 16px;
    }

    .star-icon {
        width: 14px;
        height: 14px;
    }

    .download-count {
        min-width: 2rem;
    }

    .features {
        padding-top: 0;
    }

    .faq {
        padding-top: 0;
    }

    .support {
        padding-top: 0;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .feature-layout {
        grid-template-columns: 1fr;
    }

    .feature-rail {
        position: static;
    }

    .feature-group ul {
        column-count: 1;
    }

    .feature-group,
    .faq-item,
    .support-card,
    .content-block {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .feature-layout,
    .support-grid,
    .content-blocks,
    .faq-list {
        gap: 0.75rem;
    }

    .footer-nav {
        gap: 0.7rem;
    }

    .footer-credit {
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .feature-layout {
        grid-template-columns: 1fr;
    }

    .feature-rail {
        position: static;
    }
}

@media (max-width: 420px) {
    .topbar {
        gap: 0.6rem;
    }

    .brand-text {
        font-size: 0.98rem;
    }

    .section-head h2,
    .content-block h2,
    .feature-group h3 {
        font-size: 1rem;
    }

    .feature-rail li,
    .contact-list a {
        font-size: 0.84rem;
    }

    .support-icon-img,
    .support-icon-svg {
        width: 44px;
        height: 44px;
    }
}