/* Diagnóstico em tempo real: uma pergunta por ecrã */

html { background: #050505; }
body { background: transparent !important; color: var(--text); font-family: 'Montserrat', sans-serif; margin: 0; }
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 90% at 0% 0%, rgba(26, 143, 227, 0.32) 0%, rgba(0, 86, 179, 0.12) 45%, transparent 80%),
        radial-gradient(ellipse 110% 80% at 100% 100%, rgba(201, 168, 76, 0.22) 0%, rgba(170, 119, 28, 0.08) 45%, transparent 80%),
        linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, rgba(5, 5, 5, 0.7) 100%);
}

.dg {
    --text-muted: rgba(240, 237, 230, 0.82);
    --border: rgba(255, 255, 255, 0.2);
    min-height: 100vh;
    padding: 130px 1.5rem 5rem;
    box-sizing: border-box;
}

.dg-progress {
    position: fixed;
    top: 90px; left: 0; right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 999;
}
.dg-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: #e3c56b;
    transition: width 0.5s ease;
}

.dg-palco { max-width: 720px; margin: 0 auto; }

.dg-ecra { animation: dgEntrar 0.5s ease both; }
.dg-ecra.sair { animation: dgSair 0.25s ease both; }
@keyframes dgEntrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dgSair { to { opacity: 0; transform: translateY(-10px); } }

.dg-rotulo {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-solid);
    margin: 0 0 1.4rem;
    font-weight: 600;
}

.dg-pergunta {
    font-size: clamp(1.7rem, 4.2vw, 2.6rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 0.9rem;
    letter-spacing: -0.01em;
}

.dg-pergunta:focus, h2:focus { outline: none; }

.dg-texto {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 2rem;
    max-width: 600px;
}
.dg-texto strong { color: var(--text); font-weight: 600; }

.dg-opcoes { display: grid; gap: 0.75rem; margin: 0 0 1.8rem; }
@media (min-width: 640px) { .dg-opcoes.duas { grid-template-columns: 1fr 1fr; } }

.dg-opcao {
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.dg-opcao:hover { border-color: var(--gold-border); background: rgba(255, 255, 255, 0.05); }
.dg-opcao:active { transform: scale(0.99); }
.dg-opcao:focus-visible { outline: 2px solid var(--blue-solid); outline-offset: 2px; }
.dg-opcao[aria-pressed="true"] {
    border-color: var(--blue-solid);
    background: rgba(26, 143, 227, 0.10);
    box-shadow: 0 0 0 1px rgba(26, 143, 227, 0.35), 0 8px 30px rgba(26, 143, 227, 0.12);
}
.dg-marca {
    flex: 0 0 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(240, 237, 230, 0.3);
    transition: all 0.2s;
}
.dg-opcoes.varias .dg-marca { border-radius: 5px; }
.dg-espera { height: 2px; margin: 0.9rem 0 0; background: var(--border); border-radius: 2px; overflow: hidden; }
.dg-espera::after { content: ''; display: block; height: 100%; width: 0; background: var(--blue-solid); }
.dg-espera.a-contar::after { animation: dgEspera 2s linear forwards; }
@keyframes dgEspera { to { width: 100%; } }
.dg-opcao[aria-pressed="true"] .dg-marca {
    border-color: var(--blue-solid);
    background: var(--blue-solid);
    box-shadow: inset 0 0 0 3px #050505;
}

.dg-area {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    background: rgba(8, 8, 8, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    margin: 0 0 1.8rem;
    resize: vertical;
}
.dg-area:focus { outline: none; border-color: var(--blue-solid); }
.dg-area::placeholder { color: rgba(240, 237, 230, 0.5); }

.dg-acoes { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

.dg-botao {
    font: inherit;
    background-color: #d9b860;
    background-image: var(--gold-linear);
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 15px 30px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(191, 149, 63, 0.2);
    transition: transform 0.2s, opacity 0.2s;
}
.dg-botao:hover { transform: translateY(-2px); }
.dg-botao:disabled { background-image: none; background-color: rgba(217, 184, 96, 0.28); color: rgba(255, 255, 255, 0.75); box-shadow: none; cursor: default; transform: none; }

.dg-voltar {
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
}
.dg-voltar:hover { color: var(--text); }

.dg-nota {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 1.4rem 0 0;
}
.dg-nota a { color: var(--text); }

/* Calendário de marcação no agradecimento */
.dg-agenda {
    margin-top: 1.6rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gold-border);
    background: #fff;
}
.dg-agenda iframe { display: block; width: 100%; height: 640px; border: 0; }

/* Botão do som, sempre à vista */
.dg-som {
    position: fixed;
    left: 1.2rem;
    bottom: 1.2rem;
    z-index: 900;
    font: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    background: rgba(5, 5, 5, 0.7);
    border: 1px solid var(--gold-border);
    border-radius: 999px;
    padding: 0.6rem 1.1rem 0.6rem 2rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.dg-som::before {
    content: "";
    position: absolute;
    left: 0.9rem; top: 50%;
    width: 8px; height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: rgba(240, 237, 230, 0.3);
}
.dg-som[aria-pressed="true"]::before { background: var(--gold-solid); box-shadow: 0 0 10px var(--gold-solid); animation: dgPulsar 1.6s ease-in-out infinite; }
@keyframes dgPulsar { 50% { opacity: 0.4; } }

/* Leituras entre perguntas: a nota do consultor */
.dg-leitura {
    border-left: 2px solid var(--gold-solid);
    padding: 0.4rem 0 0.4rem 1.6rem;
    margin: 0 0 2.2rem;
}
.dg-numero {
    font-size: clamp(2.6rem, 8vw, 4.2rem);
    font-weight: 800;
    line-height: 1;
    margin: 0.4rem 0 1rem;
    color: #e3c56b;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

/* Leitura final: ar de documento */
.dg-documento {
    background: rgba(8, 8, 8, 0.85);
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    padding: clamp(1.6rem, 5vw, 3rem);
    margin: 0 0 2.5rem;
    backdrop-filter: blur(8px);
}
.dg-manuscrito {
    font-family: 'Caveat', cursive;
    font-size: 1.9rem;
    color: var(--gold-solid);
    display: inline-block;
    transform: rotate(-3deg);
    margin: 0 0 0.6rem;
}
.dg-bloco { padding: 1.4rem 0; border-top: 1px solid var(--border); }
.dg-bloco:first-of-type { border-top: none; padding-top: 0.6rem; }
.dg-bloco h3 {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-solid);
    margin: 0 0 0.6rem;
    font-weight: 600;
}
.dg-bloco p { margin: 0; line-height: 1.7; font-size: 1rem; }
.dg-bloco ol { margin: 0.4rem 0 0; padding-left: 1.2rem; line-height: 1.8; }
.dg-pilar { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.4rem !important; }

/* Simulador do investimento */
.dg-sim-intro { color: var(--text-muted); font-size: 0.92rem !important; margin: 0 0 1.2rem !important; }
.dg-sim-linha {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}
.dg-sim-linha strong { display: block; font-size: 0.98rem; font-weight: 600; }
.dg-sim-linha span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.5; }
.dg-seg { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.dg-seg-op {
    font: inherit;
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.dg-seg-op:hover { border-color: var(--gold-border); }
.dg-seg-op:focus-visible { outline: 2px solid var(--blue-solid); outline-offset: 2px; }
.dg-seg-op[aria-pressed="true"] { border-color: var(--blue-solid); background: rgba(26, 143, 227, 0.14); }

.dg-sim-total {
    margin-top: 1.2rem;
    padding: 1.4rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(26, 143, 227, 0.08), rgba(201, 168, 76, 0.08));
    border: 1px solid var(--gold-border);
}
.dg-sim-rotulo {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.dg-sim-valor {
    font-size: clamp(1.8rem, 6vw, 2.6rem) !important;
    font-weight: 800;
    line-height: 1.15 !important;
    margin: 0.4rem 0 0.5rem !important;
    color: #e3c56b;
}
.dg-sim-valor small { font-size: 0.5em; font-weight: 600; }
.dg-sim-valor em {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.3rem;
}
.dg-sim-pontual, .dg-sim-orcamento { font-size: 0.92rem !important; margin: 0 0 0.4rem !important; }
.dg-sim-orcamento { color: var(--gold-solid); }
.dg-sim-letras { font-size: 0.75rem !important; color: var(--text-muted); line-height: 1.6 !important; margin: 0.8rem 0 0 !important; }
.dg-sim-pontual:empty, .dg-sim-orcamento:empty { display: none; }

@media (min-width: 640px) {
    .dg-sim-linha { grid-template-columns: 1fr auto; align-items: center; }
    .dg-seg { justify-content: flex-end; max-width: 360px; }
}

/* Contacto */
.dg-form { display: grid; gap: 0.9rem; margin: 0 0 1.4rem; }
.dg-campo label { display: block; font-size: 0.85rem; color: var(--text); margin: 0 0 0.4rem; }
.dg-campo input, .dg-campo select {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: rgba(8, 8, 8, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 0.95rem 1.1rem;
}
.dg-campo select option { background: #111; }
.dg-campo input:focus, .dg-campo select:focus { outline: none; border-color: var(--blue-solid); }
.dg-consentimento { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; line-height: 1.6; color: var(--text-muted); }
.dg-consentimento input { margin-top: 0.3rem; accent-color: var(--blue-solid); }
.dg-consentimento a { color: var(--text); }
.dg-escassez { font-size: 0.85rem; color: #e3c56b; margin: 1.6rem 0 5rem; line-height: 1.6; }

@media (max-width: 640px) {
    .dg { padding-top: 120px; }
    .dg-opcao { padding: 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .dg-ecra, .dg-ecra.sair { animation: none; }
    .dg-progress span { transition: none; }
}
