/* ==========================================================
   Coelho Dourado — Downloads
   Linguagem visual do Boto Dourado (navbar clara, hero
   pontilhado com onda animada, cards minimalistas).
   ========================================================== */

@font-face {
    font-family: "Exo 2";
    src: url("fonts/exo2-regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Exo 2";
    src: url("fonts/exo2-semibold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Exo 2";
    src: url("fonts/exo2-bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

/******************************
  Variables
******************************/

:root {
    color-scheme: light;

    --color-primary: #5077EE;
    --color-secondary: #F56D5B;
    --primary-color: var(--color-primary);
    --secondary-color: var(--color-secondary);
    --accent-color: #F5E360;
    --ouro: linear-gradient(45deg, #eb972a 0%, #ffd700 100%);

    --navbar-bg: #f8f9fa;
    --navbar-border: #e9ecef;
    --navbar-hover: rgb(233, 240, 246);
    --navbar-text: #333;
    --header-height: 75px;

    --border-light: #e3e9f0;
    --border-color: var(--navbar-border);

    --text-primary: #272c32;
    --text-secondary: #576b7d;
    --text-color: var(--navbar-text);
    --text-muted: #6c757d;

    --surface-1: #ffffff;
    --surface-2: #f8f9fa;

    --sm-radius: 5px;
    --card-radius: 12px;
    --transition-speed: 0.3s;

    --badge-free-bg: #E6F9EE;
    --badge-free-color: #27ae60;
    --badge-soon-bg: #FFFAEB;
    --badge-soon-color: #ffb300;

    --hero-min-height: 30vh;
    --wave-duration-1: 18s;
}

/* O tema é resolvido no <head>: data-theme="dark" ou "light" já vem no HTML,
   seja pela escolha guardada no navegador, seja pela preferência do sistema. */
:root[data-theme="dark"] {
    color-scheme: dark;

    --navbar-bg: #1e2130;
    --navbar-border: #2c3150;
    --navbar-hover: rgba(255, 255, 255, 0.07);
    --navbar-text: #cbd5e1;
    --border-light: #3a4060;
    --border-color: #2c3150;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #94a3b8;

    --surface-1: #252838;
    --surface-2: #1e2130;

    --badge-free-bg: rgb(38, 54, 51);
    --badge-free-color: #8fe07a;
    --badge-soon-bg: rgb(56, 57, 54);
    --badge-soon-color: #ecd97a;
}

/******************************
  Base
******************************/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Exo 2", system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--navbar-bg);
    color: var(--text-primary);
    padding-top: var(--header-height);
    line-height: 1.55;
}

a {
    color: inherit;
}

h2 {
    text-align: center;
    color: var(--text-primary);
}

/******************************
  Navbar horizontal (top)
******************************/

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    display: flex;
    z-index: 999;
}

.top-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.top-navbar .navbar-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.top-navbar .navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-navbar .nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--sm-radius);
    transition: all 0.2s ease;
}

.top-navbar .nav-link:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Botão redondo de ícone (alternar tema) */
.navbar-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--sm-radius);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.navbar-icon-btn:hover {
    background-color: var(--navbar-hover);
}

.navbar-icon-btn svg {
    width: 18px;
    height: 18px;
    
    transition: fill 0.2s ease;
}

/* No claro aparece a lua (o que o clique faz); no escuro, o sol. */
:root[data-theme="dark"] .icon-moon,
:root:not([data-theme="dark"]) .icon-sun {
    display: none;
}

.icon-moon{
    fill: var(--color-primary);
      
}

.icon-sun{
   fill: var(--color-secondary);
}

.top-navbar .login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary-color);
    color: #fff !important;
    border-radius: var(--sm-radius);
    padding: 8px 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-navbar .login-btn:hover {
    background-color: var(--primary-color);
}

.top-navbar .login-btn svg {
    fill: currentColor;
    width: 0.9rem;
    height: 0.9rem;
}

.top-navbar .login-btn:hover svg {
    color: var(--accent-color);
}

/******************************
  Hero
******************************/

.rotating-word {
    background: var(--ouro);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    transition: opacity 1s ease;
}

.paginaprincial h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.15;
    color: var(--text-primary);
}

.hero-header {
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

.paginaprincial.hero-header {
    background-color: var(--surface-2);
    background-image: radial-gradient(var(--border-light) 0.35px, var(--surface-2) 0.35px);
    background-size: 7px 7px;
}

.hero-header .hero-inner {
    min-height: var(--hero-min-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0 120px;
    text-align: center;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

.hero-header .hero-inner p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--badge-free-bg);
    color: var(--badge-free-color);
    border: 1px solid rgba(39, 174, 96, 0.12);
}

/* Máscara das bordas para a onda nunca vazar */
.hero-header::before,
.hero-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 20vh;
    background: var(--surface-1);
    z-index: 6;
    pointer-events: none;
}

.hero-header::before { left: 0; }
.hero-header::after { right: 0; }

/******************************
  Onda animada
******************************/

.hero-header .wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 20vh;
    pointer-events: none;
    z-index: 5;
}

.wave-svg {
    display: block;
    width: 200%;
    height: 100%;
    transform: translateZ(0);
}

.wave-path {
    fill: var(--surface-1);
    fill-opacity: 1;
}

@keyframes wave-drift-right {
    0%   { transform: translate3d(-1200px, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.wave-group-1 {
    will-change: transform;
    animation: wave-drift-right var(--wave-duration-1) linear infinite;
}

/* Moeda quicando */
.bouncing-coin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #FB855A;
    border-radius: 50%;
    bottom: 10%;
    left: 0;
    margin-left: 5px;
    z-index: 1;
    animation: coinBounce 3s ease-in-out infinite,
               coinMove var(--wave-duration-1) linear infinite;
    will-change: transform;
}

@keyframes coinBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes coinMove {
    0%   { left: 0%; }
    100% { left: 100%; }
}

/******************************
  Main
******************************/

main.paginaprincial {
    background-color: var(--surface-1);
}

.main-paginainicial {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
padding-bottom: 100px;
}

/* Largura interna: as gutters vêm de .main-paginainicial / footer */
.container {
    max-width: 1080px;
    width: 100%;
    margin: 10px auto;
}

/* Âncoras não ficam escondidas atrás da navbar fixa */
section[id] {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/******************************
  Cards de download
******************************/

.intro-topics {
    padding: 2rem 0;
}

.intro-topics h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.section-note {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.section-note.onde-fica{
    margin-top: 50px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.topic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border-light);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.topic-card:hover {
    border-color: var(--primary-color);
}

.topic-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.topic-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.topic-icon {
    width: 1.1rem;
    height: 1.1rem;
    fill: var(--color-secondary);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.topic-content > p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    flex: 1;
}

.topic-badge {
    position: absolute;
    top: -15px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.topic-badge--free {
    background: var(--badge-free-bg);
    color: var(--badge-free-color);
    border: 1px solid rgba(39, 174, 96, 0.12);
}

.topic-badge--soon {
    background: var(--badge-soon-bg);
    color: var(--badge-soon-color);
    border: 1px solid rgba(255, 179, 0, 0.08);
}

/* Botão de download dentro do card */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--secondary-color);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: var(--sm-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.download-btn svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

.download-btn:hover {
    background-color: var(--primary-color);
}

.download-btn:hover svg {
    color: var(--accent-color);
}

.download-btn--alt {
    background-color: transparent;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
}

.download-btn--alt:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.topic-card small {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Card indisponível */
.topic-card--disabled {
    background: var(--surface-2);
}

.topic-card--disabled:hover {
    border-color: var(--border-light);
}

.topic-card--disabled .topic-icon {
    fill: var(--text-muted);
}

.download-btn--disabled {
    background-color: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

.download-btn--disabled:hover {
    background-color: transparent;
}

/******************************
  Documento de texto (termos)
******************************/

.documento {
   
    margin: 0 auto;
    padding: 3rem 0 4rem;
}

.documento-topo {
    margin-bottom: 2.5rem;
}

.documento h1 {
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.documento-data {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.documento h2 {
    text-align: left;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2.5rem 0 0.75rem;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.documento p,
.documento li {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.documento p {
    margin-bottom: 0.9rem;
}

.documento ul {
    margin: 0 0 0.9rem 1.25rem;
}

.documento li {
    margin-bottom: 0.5rem;
}

.documento strong {
    color: var(--text-primary);
}

.documento code {
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 0.88em;
    color: var(--text-primary);
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    overflow-wrap: anywhere;
}

.documento pre {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--md-radius, 8px);
    padding: 1rem 1.25rem;
    margin-bottom: 0.9rem;
    overflow-x: auto;
}

.documento pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
}

/* Caixa de resumo no topo, na cara dos cards da página inicial */
.resumo {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-left: 1px solid var(--color-secondary);
    border-radius: var(--card-radius);
    padding: 1.5rem;
}

.resumo h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-secondary);
}

.resumo ul {
    margin-left: 1.1rem;
}

.resumo p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.documento a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.documento a:hover {
    text-decoration: none;
}

.documento-volta {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* Link dos termos no rodapé */
.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/******************************
  Jornada / Como atualizar
******************************/

.journey-section {
    padding: 3rem 0;
    margin-top: 30px;
   
}

.journey-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.journey-steps {
    display: flex;
    gap: 2rem;
    margin: 0 auto;
}

.journey-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--surface-1);
    border-radius: 8px;
    text-align: center;
}

.journey-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.journey-step:nth-child(odd) .journey-step-number {
    background: var(--color-primary);
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
    margin: 0;
}

/******************************
  Faixa de CTA
******************************/

.beta-cta-section {
    padding: 4rem 0;
    background: var(--surface-1);
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
}

.beta-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.beta-logo {
    margin-bottom: 2rem;
}

.beta-logo img {
    height: 60px;
    width: auto;
    opacity: 0.9;
    border-radius: 12px;
}

.beta-cta-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.beta-cta-section .login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary-color);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: var(--sm-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.beta-cta-section .login-btn svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

.beta-cta-section .login-btn:hover {
    background-color: var(--primary-color);
}

.beta-cta-section .login-btn:hover svg {
    color: var(--accent-color);
}

/******************************
  Footer
******************************/

footer {
    background: var(--surface-2);

    padding: 1rem 20px 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

/******************************
  Aviso de cookies
******************************/

/* Discreto de propósito: canto inferior esquerdo, largura curta, sem
   sobreposição escura e sem bloquear a leitura da página. */
.aviso-cookies {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 900;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: var(--surface-1);
    border: 1px solid var(--border-light);
    border-left: 1px solid var(--color-secondary);
    border-radius: var(--card-radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

[data-theme="dark"] .aviso-cookies {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.aviso-cookies[hidden] {
    display: none;
}

.aviso-cookies p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.aviso-cookies a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aviso-cookies-acoes {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.aviso-btn {
    border: 1px solid transparent;
    border-radius: var(--sm-radius);
    padding: 6px 14px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aviso-btn--ok {
    background-color: var(--secondary-color);
    color: #fff;
}

.aviso-btn--ok:hover {
    background-color: var(--primary-color);
}

.aviso-btn--recusar {
    background: none;
    color: var(--text-muted);
}

.aviso-btn--recusar:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

/* Entra de baixo, de leve */
.aviso-cookies {
    animation: aviso-entra 0.28s ease-out;
}

@keyframes aviso-entra {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .aviso-cookies {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/******************************
  Foco visível
******************************/

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

/******************************
  Responsivo
******************************/

/* Telas estreitas: só logo + botão de download na navbar */
@media (max-width: 520px) {
    .top-navbar {
        padding: 0 12px;
    }

    .top-navbar .nav-link {
        display: none;
    }

    .top-navbar .navbar-logo img {
        height: 34px;
    }
}

@media (max-width: 768px) {
    .paginaprincial h1 {
        font-size: 2rem;
    }

    .hero-header .hero-inner {
        padding-bottom: 80px;
    }

    .hero-header .wave,
    .hero-header::before,
    .hero-header::after {
        height: 10vh;
    }

    .bouncing-coin {
        width: 30px;
        height: 30px;
        bottom: 2%;
    }

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

    .journey-steps {
        flex-direction: column;
    }

    .beta-cta-section {
        margin-top: 40px;
    }

    .documento {
        padding: 2rem 0 3rem;
    }

    .documento h1 {
        font-size: 1.75rem;
    }

    footer {
        padding: 2rem 20px 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .wave-group-1,
    .bouncing-coin,
    .aviso-cookies {
        animation: none;
    }
}

/* ------------------------------------------------------------------
   Histórico de versões (historico.php)

   Lista, não cartões. Cada versão traz de duas a três linhas de conteúdo;
   emoldurar isso em caixa deixa a página com mais borda do que informação.
   Filete separando e espaço em volta bastam, e o número da versão — que é
   o que a pessoa procura — ganha o peso visual em vez de dividi-lo com a
   moldura.

   Usa as variáveis do resto da folha, então acompanha claro/escuro sozinha.
   ------------------------------------------------------------------ */

.versao-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2.5rem 0 0.5rem;
    margin-bottom: 50px;
}

/* Busca ---------------------------------------------------------- */

/* Nasce escondido e o JS revela. Sem script o campo não filtraria nada, e
   um campo de busca que não busca é pior que campo nenhum. */
.versao-busca[hidden] {
    display: none;
}

.versao-busca {
    position: relative;
    flex: 1 1 16rem;
    max-width: 22rem;
}

.versao-busca input {
    width: 100%;
    padding: 0.6rem 2.2rem 0.6rem 2.4rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--surface-1);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.versao-busca input::placeholder {
    color: var(--text-muted);
}

/* O "x" nativo do type="search" duplicaria o .versao-limpar, e sem estilo
   nenhum ele destoa do resto. Fica só o nosso. */
.versao-busca input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.versao-busca input:focus {
    border-color: var(--color-primary);
    /* color-mix mantém o halo na cor da marca sem precisar de uma variável
       própria por tema. Navegador que não conheça a função ignora a linha e
       fica só com a borda, que já sinaliza o foco. */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.versao-busca > svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}

.versao-limpar {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.versao-limpar:hover {
    color: var(--text-primary);
    background: var(--navbar-hover);
}

/* Sem isto o botão fica SEMPRE visível: o `display: flex` acima é regra de
   autor e vence o `[hidden] { display: none }` do navegador, que é regra de
   agente de usuário. O `hidden` do JS não teria efeito nenhum. */
.versao-limpar[hidden] {
    display: none;
}

.versao-limpar svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}


/* Lista ---------------------------------------------------------- */

.versao-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-light);
}

.versao-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.9rem 1.5rem;
    padding: 1.6rem 0.25rem;
    border-bottom: 1px solid var(--border-light);
}

.versao-item[hidden] {
    display: none;
}

.versao-titulo {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: 0;
}

.versao-numero {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    /* Algarismos de mesma largura: sem isso o "1.0.10" embaixo do "1.0.4"
       desalinha e a coluna de versões fica trêmula. */
    font-variant-numeric: tabular-nums;
}

.versao-selo {
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    white-space: nowrap;
}

.versao-selo--atual {
    color: var(--badge-free-color);
    background: var(--badge-free-bg);
}

.versao-selo--previa {
    color: var(--badge-soon-color);
    background: var(--badge-soon-bg);
}

.versao-data {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Arquivos ------------------------------------------------------- */

.versao-arquivos {
    grid-column: 1 / -1;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.75rem;
    margin: 0;
    padding: 0;
}

.versao-arquivos a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.versao-arquivos a:hover,
.versao-arquivos a:focus-visible {
    color: var(--color-primary);
}

.versao-arquivos svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: currentColor;
    /* Discreto em repouso, cheio no hover: o ícone orienta a varredura sem
       competir com o nome da plataforma. */
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.versao-arquivos a:hover svg,
.versao-arquivos a:focus-visible svg {
    opacity: 1;
}

.versao-arquivos small {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Nada encontrado ------------------------------------------------ */

.versao-vazio {
    padding: 2.5rem 0.25rem;
    color: var(--text-muted);
    text-align: center;
}

.versao-vazio[hidden] {
    display: none;
}

/* No celular a data desce para baixo do número, em vez de espremer os dois
   na mesma linha. */
@media (max-width: 560px) {
    .versao-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .versao-arquivos {
        gap: 0.4rem 1.25rem;
        margin-top: 0.35rem;
    }
}
