/* =====================================================================
   JD Dev — página de downloads
   Tema escuro por padrão, com variante clara (respeita o sistema e o
   botão de alternância que grava a escolha no localStorage).
   ===================================================================== */

/* ------------------------------- Tokens ------------------------------ */
:root {
    --bg:          #0b0f19;
    --bg-soft:     #0f1524;
    --surface:     rgba(255, 255, 255, .035);
    --surface-2:   rgba(255, 255, 255, .06);
    --surface-3:   rgba(255, 255, 255, .09);
    --border:      rgba(255, 255, 255, .09);
    --border-2:    rgba(255, 255, 255, .16);
    --text:        #e9edf7;
    --text-strong: #ffffff;
    --muted:       #98a3ba;
    --muted-2:     #6f7b93;
    --accent:      #6366f1;
    --accent-2:    #22d3ee;
    --accent-soft: rgba(99, 102, 241, .16);
    --success:     #34d399;
    --warn:        #fbbf24;
    --shadow:      0 18px 46px -22px rgba(0, 0, 0, .85);
    --radius:      16px;
    --radius-sm:   10px;
    --radius-lg:   24px;
    --maxw:        1180px;
    --font:        "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono:        "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", monospace;
}

html[data-theme="light"] {
    --bg:          #f4f6fb;
    --bg-soft:     #ffffff;
    --surface:     #ffffff;
    --surface-2:   #f1f4fa;
    --surface-3:   #e6eaf4;
    --border:      rgba(15, 21, 36, .10);
    --border-2:    rgba(15, 21, 36, .18);
    --text:        #1a2233;
    --text-strong: #0b0f19;
    --muted:       #5a6579;
    --muted-2:     #7c8798;
    --accent-soft: rgba(99, 102, 241, .12);
    --shadow:      0 18px 40px -24px rgba(15, 21, 36, .45);
}

@media (prefers-color-scheme: light) {
    html:not([data-theme]) {
        --bg:          #f4f6fb;
        --bg-soft:     #ffffff;
        --surface:     #ffffff;
        --surface-2:   #f1f4fa;
        --surface-3:   #e6eaf4;
        --border:      rgba(15, 21, 36, .10);
        --border-2:    rgba(15, 21, 36, .18);
        --text:        #1a2233;
        --text-strong: #0b0f19;
        --muted:       #5a6579;
        --muted-2:     #7c8798;
        --accent-soft: rgba(99, 102, 241, .12);
        --shadow:      0 18px 40px -24px rgba(15, 21, 36, .45);
    }
}

/* ------------------------------- Base -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--text-strong); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

.ico { width: 18px; height: 18px; flex: none; }
.ico--xs { width: 14px; height: 14px; }
.ico--chev { width: 16px; height: 16px; transition: transform .25s ease; }

/* ------------------------------- Header ------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(2px)) { .site-header { background: var(--bg); } }

.site-header__inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-weight: 700; font-size: 14px; letter-spacing: -.5px;
    box-shadow: 0 8px 20px -10px var(--accent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { color: var(--text-strong); font-size: 16px; }
.brand__text small { color: var(--muted); font-size: 11.5px; }

.site-nav { display: flex; gap: 6px; margin-left: auto; }
.site-nav a {
    color: var(--muted); font-size: 14.5px; font-weight: 500;
    padding: 8px 13px; border-radius: 9px; text-decoration: none;
    transition: color .18s ease, background .18s ease;
}
.site-nav a:hover { color: var(--text-strong); background: var(--surface-2); }

.icon-btn {
    margin-left: 6px; width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface);
    display: grid; place-items: center; cursor: pointer; position: relative;
    transition: background .18s ease, border-color .18s ease;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.icon-btn__sun, .icon-btn__moon { position: absolute; transition: opacity .2s ease, transform .35s ease; }
.icon-btn__sun  { opacity: 0; transform: rotate(-60deg) scale(.6); }
.icon-btn__moon { opacity: 1; transform: none; }
html[data-theme="light"] .icon-btn__sun  { opacity: 1; transform: none; }
html[data-theme="light"] .icon-btn__moon { opacity: 0; transform: rotate(60deg) scale(.6); }
@media (prefers-color-scheme: light) {
    html:not([data-theme]) .icon-btn__sun  { opacity: 1; transform: none; }
    html:not([data-theme]) .icon-btn__moon { opacity: 0; transform: rotate(60deg) scale(.6); }
}

/* -------------------------------- Hero ------------------------------- */
.hero { position: relative; padding: 76px 0 56px; overflow: hidden; }
.hero__glow {
    position: absolute; inset: -180px -10% auto -10%; height: 520px; pointer-events: none;
    background:
        radial-gradient(42% 52% at 22% 42%, rgba(99, 102, 241, .38), transparent 70%),
        radial-gradient(38% 48% at 78% 34%, rgba(34, 211, 238, .26), transparent 70%);
    filter: blur(18px);
}
.hero__inner { position: relative; }

.eyebrow {
    display: inline-block; margin: 0 0 14px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--accent-soft); border: 1px solid var(--border-2);
    color: var(--text); font-size: 12.5px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
}

.hero__title { font-size: clamp(2.1rem, 5.4vw, 3.5rem); margin-bottom: .45em; }
.grad {
    background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero__text { max-width: 62ch; color: var(--muted); font-size: 1.075rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 44px; }

.hero__stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px; margin: 0; padding: 0;
    background: var(--border); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.hero__stats > div { background: var(--bg); padding: 18px 20px; }
.hero__stats dt {
    margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 600;
    letter-spacing: .07em; text-transform: uppercase;
}
.hero__stats dd {
    margin: 0; color: var(--text-strong); font-size: 1.55rem; font-weight: 700;
    letter-spacing: -.02em;
}

/* ------------------------------ Secoes ------------------------------- */
.section { padding: 68px 0; }
.section--alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section__head { max-width: 68ch; margin-bottom: 30px; }
.section__title { font-size: clamp(1.5rem, 3vw, 2.05rem); }
.section__text { color: var(--muted); }
.section__text em { font-style: normal; color: var(--text); font-weight: 600; }
.section__text strong { color: var(--text); }

/* ------------------------------ Botoes ------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    border: 1px solid transparent; background: var(--surface-2);
    color: var(--text); font-size: 14.5px; font-weight: 600;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .16s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn__text { }
.btn__meta {
    font-size: 11.5px; font-weight: 600; color: var(--muted);
    padding: 2px 7px; border-radius: 6px; background: var(--surface-3);
}
.btn--lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn--sm { padding: 7px 11px; font-size: 13px; gap: 6px; }
.btn--sm .ico { width: 15px; height: 15px; }
.btn--sm .btn__meta { font-size: 10.5px; padding: 1px 5px; }

.btn--primary {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
    color: #fff; box-shadow: 0 12px 26px -16px var(--accent);
}
.btn--primary:hover { box-shadow: 0 16px 30px -14px var(--accent); }
.btn--primary .btn__meta { background: rgba(255, 255, 255, .2); color: #fff; }

.btn--outline { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn--outline:hover { background: var(--surface-2); }

.btn--ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-3); border-color: var(--border-2); }

.link-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: 0; padding: 4px 6px; border-radius: 7px;
    color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
    text-decoration: none;
}
.link-btn:hover { color: var(--text-strong); background: var(--surface-2); text-decoration: none; }

/* ------------------------------ Toolbar ------------------------------ */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    padding: 14px; margin-bottom: 26px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
}

.search { position: relative; flex: 1 1 260px; min-width: 220px; }
.search .ico--search {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: var(--muted-2); pointer-events: none;
}
.search input {
    width: 100%; padding: 11px 38px 11px 39px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 14.5px; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 7px; border: 0;
    background: var(--surface-3); color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--muted); font-size: 13.5px; font-weight: 600;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover { color: var(--text-strong); border-color: var(--border-2); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--text-strong); }
.chip__count {
    font-size: 11px; padding: 1px 6px; border-radius: 999px;
    background: var(--surface-3); color: var(--muted);
}
.chip.is-active .chip__count { background: var(--accent); color: #fff; }

.sort { display: flex; align-items: center; gap: 9px; }
.sort label { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.sort select {
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    font-size: 14px; cursor: pointer; outline: none;
}
.sort select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------- Cards ------------------------------- */
.apps-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px; align-items: start;
}

.app-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 22px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    transition: border-color .22s ease, transform .22s ease;
}
.app-card:hover { border-color: var(--border-2); }

.app-card__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }

.app-icon {
    flex: none; display: grid; place-items: center;
    width: 56px; height: 56px; border-radius: 15px; overflow: hidden;
    background: linear-gradient(140deg,
        color-mix(in srgb, var(--app-color) 82%, #000 0%),
        color-mix(in srgb, var(--app-color) 45%, var(--accent-2)));
    color: #fff; font-weight: 700; font-size: 20px; letter-spacing: -.5px;
    box-shadow: 0 10px 24px -14px var(--app-color);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-card__heading { min-width: 0; }
.app-card__title {
    font-size: 1.16rem; margin: 0 0 6px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.app-card__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    margin: 0; color: var(--muted); font-size: 12.5px;
}
.meta-item { display: inline-flex; align-items: center; }
.meta-item + .meta-item::before {
    content: "·"; margin-right: 7px; color: var(--muted-2);
}

.badge {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
    background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.badge--version { background: var(--accent-soft); color: var(--text-strong); border: 1px solid var(--border-2); }
.badge--pre { background: rgba(251, 191, 36, .16); color: var(--warn); }
.badge--featured { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

.app-card__desc { color: var(--muted); font-size: 14.3px; margin: 0 0 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; }
.tags li {
    font-size: 11.5px; font-weight: 600; color: var(--muted);
    padding: 3px 9px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
}

/* --------------------------- Bloco download -------------------------- */
.download-block {
    margin-top: auto;
    padding: 14px; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border);
}
.download-block__label {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    margin-bottom: 11px; font-size: 12.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.download-block__label strong { color: var(--text-strong); font-size: 14px; letter-spacing: 0; }
.download-block__hint {
    margin-left: auto; font-size: 11px; text-transform: none; letter-spacing: 0;
    color: var(--success); font-weight: 600;
}
.download-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------- Variantes (varias arquiteturas) ------------------ */
.variants { position: relative; }
.variants > summary { list-style: none; cursor: pointer; }
.variants > summary::-webkit-details-marker { display: none; }
.variants[open] > summary .ico--chev { transform: rotate(180deg); }
.variants > summary:hover { text-decoration: none; }

.variants__menu {
    position: absolute; z-index: 20; left: 0; top: calc(100% + 6px);
    min-width: 268px; margin: 0; padding: 6px; list-style: none;
    background: var(--bg-soft); border: 1px solid var(--border-2);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.variants__menu a {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
    padding: 9px 11px; border-radius: 8px; text-decoration: none; color: var(--text);
}
.variants__menu a:hover { background: var(--surface-2); text-decoration: none; }
.variants__name { font-size: 13.5px; font-weight: 600; }
.variants__meta {
    grid-column: 1; font-size: 11px; color: var(--muted-2);
    font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.variants__size { grid-row: 1 / span 2; align-self: center; font-size: 11.5px; color: var(--muted); }

/* ------------------- Setinha "versoes anteriores" -------------------- */
.versions-toggle {
    display: flex; align-items: center; gap: 9px; width: 100%;
    margin-top: 12px; padding: 10px 13px;
    background: transparent; border: 1px dashed var(--border-2); border-radius: var(--radius-sm);
    color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.versions-toggle:hover { color: var(--text-strong); background: var(--surface-2); border-color: var(--accent); }
.versions-toggle[aria-expanded="true"] { color: var(--text-strong); border-style: solid; }
.versions-toggle[aria-expanded="true"] .ico--chev { transform: rotate(180deg); }
.versions-toggle__count {
    margin-left: auto; font-size: 11px; font-weight: 700;
    padding: 1px 8px; border-radius: 999px;
    background: var(--surface-3); color: var(--muted);
}

.versions-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.4, 0, .2, 1); }
.versions-wrap.is-open { grid-template-rows: 1fr; }
.versions-inner { overflow: hidden; }

.versions-list { list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 9px; }

.version-row {
    display: flex; flex-direction: column; gap: 9px;
    padding: 12px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--border);
}
.version-row__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.version-row__tag {
    font-family: var(--mono); font-size: 13px; font-weight: 700;
    color: var(--text-strong);
    padding: 2px 9px; border-radius: 6px;
    background: var(--surface-3); border: 1px solid var(--border);
}
.version-row__meta { color: var(--muted-2); font-size: 12px; margin-left: auto; }
.version-row__files { display: flex; flex-wrap: wrap; gap: 7px; }

.app-card__note {
    display: flex; align-items: center; gap: 7px;
    margin: 12px 0 0; color: var(--muted-2); font-size: 12.5px;
}
.ico--check { color: var(--success); }

.app-card__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border);
}
.app-card__stat { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 12.5px; font-weight: 600; }
.app-card__actions { display: inline-flex; align-items: center; gap: 4px; }

/* --------------------------- Resultados ------------------------------ */
.results-bar { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; }
.results-bar strong { color: var(--text-strong); }

.empty-state {
    text-align: center; padding: 54px 24px;
    background: var(--surface); border: 1px dashed var(--border-2); border-radius: var(--radius-lg);
}
.empty-state__icon {
    display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px;
    border-radius: 16px; background: var(--accent-soft); color: var(--accent-2);
}
.empty-state__icon .ico { width: 26px; height: 26px; }
.empty-state h3 { font-size: 1.15rem; }
.empty-state p { color: var(--muted); max-width: 60ch; margin-inline: auto; }
.empty-state code { background: var(--surface-3); padding: 2px 7px; border-radius: 6px; font-size: .88em; }
.code-sample {
    display: inline-block; text-align: left; margin: 6px auto 0; padding: 16px 18px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 12.5px; color: var(--muted); overflow-x: auto;
}
.empty-state--filter { padding: 40px 24px; }

/* ---------------------------- Info cards ----------------------------- */
.cards-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.info-card {
    padding: 22px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: transform .22s ease, border-color .22s ease;
}
.info-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.info-card__icon {
    display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px;
    border-radius: 13px; background: var(--accent-soft); color: var(--accent-2);
}
.info-card__icon .ico { width: 22px; height: 22px; }
.info-card h3 { font-size: 1.03rem; margin-bottom: .35em; }
.info-card p { margin: 0; color: var(--muted); font-size: 14px; }

.platform-summary { margin-top: 34px; }
.platform-summary__title { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 12px; }
.platform-summary__list {
    display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0;
}
.platform-summary__list li {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 10px 15px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 14px;
}
.platform-summary__list .ico { color: var(--accent-2); }
.platform-summary__list span { color: var(--muted); font-size: 12.5px; }

/* -------------------------------- CTA -------------------------------- */
.cta {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px;
    padding: 34px; border-radius: var(--radius-lg);
    background:
        radial-gradient(60% 120% at 0% 0%, var(--accent-soft), transparent 65%),
        var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.cta p { color: var(--muted); max-width: 52ch; }
.contact-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contact-list li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px;
    background: var(--bg); border: 1px solid var(--border);
    font-size: 14px;
}
.contact-list .ico { color: var(--accent-2); }
.contact-list a { color: var(--text); }
.cta__aside {
    padding: 22px; border-radius: var(--radius);
    background: var(--bg); border: 1px solid var(--border);
    align-self: start;
}
.cta__badge {
    display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px;
    border-radius: 13px; background: var(--accent-soft); color: var(--accent-2);
}
.cta__badge .ico { width: 22px; height: 22px; }
.cta__aside p { margin: 0; font-size: 13.6px; }

/* ------------------------------- Footer ------------------------------ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 30px 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.site-footer__meta { display: inline-flex; align-items: center; gap: 9px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text-strong); }

/* ---------------------- Destaque ao abrir via link ------------------- */
.app-card.is-highlighted {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

/* --------------- Páginas geradas pelo roteador ----------------------- */
.chooser-page { min-height: 100vh; display: grid; place-items: start center; padding: 48px 0; }

.chooser { max-width: 720px; }
.chooser h1 { font-size: 1.6rem; margin-bottom: .4em; }
.chooser > p { color: var(--muted); }
.chooser code {
    background: var(--surface-3); padding: 2px 7px; border-radius: 6px;
    font-size: .88em; word-break: break-all;
}

.chooser__back {
    display: inline-block; margin-bottom: 22px;
    color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.chooser__back:hover { color: var(--text-strong); }

.chooser__head { margin-bottom: 24px; }
.chooser__head p { color: var(--muted); margin: 0; }

.chooser__list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chooser__list a {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); text-decoration: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.chooser__list a:hover {
    border-color: var(--accent); background: var(--surface-2);
    transform: translateY(-2px); text-decoration: none;
}
.chooser__icon {
    display: grid; place-items: center; flex: none;
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent-2);
}
.chooser__icon .ico { width: 22px; height: 22px; }
.chooser__info { display: flex; flex-direction: column; min-width: 0; }
.chooser__info strong { font-size: 14.5px; }
.chooser__info small {
    color: var(--muted-2); font-family: var(--mono); font-size: 11.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chooser__size { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.chooser__hint { font-size: 13px; }

/* ----------------------------- Responsivo ---------------------------- */
@media (max-width: 900px) {
    .cta { grid-template-columns: 1fr; padding: 26px; }
}

@media (max-width: 720px) {
    .site-nav { display: none; }
    .hero { padding: 54px 0 42px; }
    .section { padding: 50px 0; }
    .apps-grid { grid-template-columns: 1fr; }
    .toolbar { padding: 12px; gap: 11px; }
    .search { flex-basis: 100%; }
    .sort { width: 100%; justify-content: space-between; }
    .variants__menu { left: 0; right: auto; min-width: min(280px, 84vw); }
    .version-row__meta { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
    .btn__meta { display: none; }
    .hero__stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
