/* =========================================================
   CVEWORKS - EMAIL SECURITY ANALYZER
   Light / Red / White visual identity
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f7f7f8;
    color: #202124;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   GLOBAL CONTAINER
   PADRÃO CVEWORKS
========================================================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   PADRÃO CVEWORKS
========================================================= */

.hero-content {
    text-align: center;
}

.hero-content h1 {
    text-align: center;
}

.hero-content h1 span {
    color: #d71920;
}

.hero-description {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.site-header {
    width: 100%;

    background: #ffffff;

    border-bottom: 1px solid #e5e5e7;
}


/*
   Compatibilidade com a estrutura usada pelo Email Analyzer
   e com a estrutura padrão do CVE Search.
*/

.site-header-inner,
.header-content {
    width: min(1180px, calc(100% - 40px));
    height: 72px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   HEADER LOGO
========================================================= */

.site-logo,
.logo {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    color: #202124;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.4px;

    text-decoration: none;
}


/*
   Compatibilidade com diferentes nomes utilizados
   nas páginas do CVEWorks.
*/

.site-logo-mark,
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 40px;
    height: 40px;

    background: #c90000;
    color: #ffffff;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.site-logo-name,
.logo-name {
    color: #202124;
}

.site-logo-name span,
.logo-name span {
    color: #c90000;
}


/* Caso o HTML utilize partes separadas do nome */

.site-logo-cve {
    color: #202124;
}

.site-logo-work {
    color: #c90000;
}


/* =========================================================
   HEADER NAVIGATION
========================================================= */

.site-nav,
.navigation {
    display: flex;
    align-items: center;

    gap: 32px;
}

.site-nav a,
.navigation a {
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 0;

    color: #5f6368;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.2s ease;
}

.site-nav a:hover,
.navigation a:hover {
    background: transparent;

    color: #c90000;
}


/* =========================================================
   PAGE / HERO
========================================================= */

.site-section {
    padding: 0 0 18px;
}

.tool-hero {
    padding: 76px 0 54px;
}

.tool-hero .hero-badge {
    margin-bottom: 2px;
}

.tool-hero .hero-description {
    max-width: 760px;
}


/* =========================================================
   COMMON SECTIONS
========================================================= */

.instructions,
.input-card,
.card,
.report {
    background: #ffffff;

    border: 1px solid #e2e2e2;
    border-radius: 14px;

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.035);
}

.instructions {
    margin-top: 28px;
    padding: 30px;
}

.instructions h2,
.input-card h2 {
    color: #171717;

    font-size: 23px;
    line-height: 1.2;
}

.instructions > p {
    margin-top: 10px;

    color: #666666;

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   PROVIDER CARDS
========================================================= */

.provider-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 14px;

    margin-top: 24px;
}

.provider {
    padding: 20px;

    background: #fafafa;

    border: 1px solid #e4e4e4;
    border-radius: 11px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.provider:hover {
    background: #fffafa;

    border-color: #efb3b6;
}

.provider h3 {
    color: #171717;

    font-size: 16px;
}

.provider ol {
    margin: 12px 0 0 19px;

    color: #686868;

    font-size: 13px;
    line-height: 1.7;
}

.provider strong {
    color: #444444;
}


/* =========================================================
   INPUT
========================================================= */

.input-card {
    margin-top: 18px;
    padding: 30px;
}

#rawEmail {
    width: 100%;
    min-height: 250px;

    margin-top: 18px;
    padding: 16px;

    resize: vertical;

    background: #fafafa;
    color: #202124;

    border: 1px solid #dcdcdc;
    border-radius: 10px;

    outline: none;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: 13px;
    line-height: 1.6;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

#rawEmail::placeholder {
    color: #999999;
}

#rawEmail:focus {
    background: #ffffff;

    border-color: #d71920;

    box-shadow:
        0 0 0 3px rgba(215, 25, 32, 0.08);
}


/* =========================================================
   ACTIONS / BUTTONS
========================================================= */

.actions {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 14px;
}

.btn-primary,
.btn-secondary {
    min-height: 44px;

    padding: 0 18px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 800;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.btn-primary {
    background: #d71920;
    color: #ffffff;

    border: 1px solid #d71920;

    box-shadow:
        0 5px 16px rgba(215, 25, 32, 0.18);
}

.btn-primary:hover {
    background: #bd151b;

    border-color: #bd151b;

    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: #555555;

    border: 1px solid #d7d7d7;
}

.btn-secondary:hover {
    background: #fff5f5;
    color: #d71920;

    border-color: #d71920;
}

/* =========================================================
   BANNER CYBERTRAINING
========================================================= */

.section-label {
    display: inline-block;

    margin-bottom: 18px;
    padding: 9px 16px;

    color: #c90000;

    background: #ffffff;

    border: 1px solid #f3bcbc;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* =========================================================
   PRIVACY NOTE
========================================================= */

.privacy-note {
    margin-top: 14px;
    padding: 12px 14px;

    background: #fafafa;

    border: 1px solid #eeeeee;
    border-radius: 8px;

    color: #777777;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   RESULTS
========================================================= */

#results {
    display: none;

    padding-top: 18px;
    padding-bottom: 40px;
}

.hero-result {
    display: flex;
    align-items: center;

    gap: 28px;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #e2e2e2;
    border-radius: 14px;

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.035);
}


/* =========================================================
   SCORE
========================================================= */

.score {
    width: 132px;
    height: 132px;

    flex: 0 0 132px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 7px solid #22c55e;
    border-radius: 50%;
}

.score-number {
    color: #171717;

    font-size: 38px;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    margin-top: 7px;

    color: #888888;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.08em;
}

.risk-title {
    color: #171717;

    font-size: 25px;
    font-weight: 800;
    line-height: 1.2;
}

.verdict {
    margin-top: 6px;

    color: #d71920;

    font-size: 14px;
    font-weight: 900;

    letter-spacing: 0.02em;
}

.risk-description {
    max-width: 760px;

    margin-top: 8px;

    color: #686868;

    font-size: 14px;
}


/* =========================================================
   RESULT CARDS
========================================================= */

.result-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 18px;

    margin-top: 18px;
}

.card {
    padding: 24px;
}

.card h3 {
    margin-bottom: 2px;
    padding-bottom: 14px;

    color: #171717;

    border-bottom: 1px solid #eeeeee;

    font-size: 18px;
    line-height: 1.25;
}

.info-row {
    display: grid;

    grid-template-columns:
        145px minmax(0, 1fr);

    gap: 16px;

    padding: 12px 0;

    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: 0;
}

.label {
    color: #777777;

    font-size: 12px;
    font-weight: 700;
}

.value {
    min-width: 0;

    color: #252525;

    font-size: 13px;
    font-weight: 600;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   STATUS
========================================================= */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 58px;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.06em;
}

.status.pass {
    background: #ecfdf3;
    color: #16a34a;
}

.status.fail {
    background: #fff1f2;
    color: #dc2626;
}

.status.warn {
    background: #fffbea;
    color: #ca8a04;
}

.status.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.status.info {
    background: #fff1f1;
    color: #d71920;
}

.scl-number {
    color: #171717;

    font-size: 18px;
}

.scl-box {
    margin-top: 12px;
    padding: 12px 14px;

    background: #fafafa;

    border-left: 3px solid #d71920;
    border-radius: 6px;
}

.scl-description {
    color: #686868;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   RECEIVED
========================================================= */

.received-list {
    margin-top: 15px;
    padding-left: 21px;
}

.received-list li {
    margin: 8px 0;
    padding: 10px 12px;

    background: #fafafa;
    color: #666666;

    border: 1px solid #eeeeee;
    border-radius: 7px;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: 11px;
    line-height: 1.6;

    overflow-wrap: anywhere;
}

.received-list strong {
    color: #d71920;
}


/* =========================================================
   FINDINGS
========================================================= */

#findingsList {
    margin-top: 14px;
}

.finding {
    margin-top: 8px;
    padding: 11px 13px;

    border: 1px solid #eeeeee;
    border-radius: 8px;

    font-size: 13px;
    line-height: 1.6;
}

.finding:first-child {
    margin-top: 0;
}

.finding.good {
    background: #f5fdf7;
    color: #347346;

    border-color: #d9f3df;
}

.finding.warning {
    background: #fffaf0;
    color: #8a681d;

    border-color: #f7e6bd;
}

.finding.danger {
    background: #fff5f5;
    color: #a52b31;

    border-color: #f4c9cc;
}

.finding.info {
    background: #fafafa;
    color: #666666;

    border-color: #e7e7e7;
}


/* =========================================================
   URL ANALYSIS
========================================================= */

.url-analysis {
    margin-top: 14px;
}

.url-item {
    margin-top: 10px;
    padding: 15px;

    background: #fafafa;

    border: 1px solid #e5e5e5;
    border-radius: 9px;
}

.url-item:first-child {
    margin-top: 0;
}

.url-item.good {
    background: #f5fdf7;

    border-color: #d9f3df;
}

.url-item.warning {
    background: #fffaf0;

    border-color: #f7e6bd;
}

.url-item.danger {
    background: #fff5f5;

    border-color: #f4c9cc;
}

.url-label {
    color: #777777;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.08em;
}

.url-value {
    margin-top: 6px;

    color: #222222;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: 12px;
    font-weight: 600;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.url-reason {
    margin-top: 8px;

    color: #686868;

    font-size: 12px;
    line-height: 1.65;
}

.url-reason strong {
    color: #444444;
}


/* =========================================================
   SECURITY REPORT
========================================================= */

.report {
    margin-top: 18px;

    overflow: hidden;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 26px 30px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fffafa 100%
        );

    border-bottom: 1px solid #eeeeee;
}

.report-header-title {
    display: flex;
    align-items: center;

    gap: 14px;
}

.report-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff1f1;
    color: #d71920;

    border-radius: 10px;

    font-size: 20px;
}

.report-header h2 {
    color: #171717;

    font-size: 22px;
    line-height: 1.2;
}

.report-header span {
    display: block;

    margin-top: 3px;

    color: #777777;

    font-size: 12px;
}

.report-score {
    min-width: 105px;

    text-align: right;
}

.report-score-number {
    color: #d71920;

    font-size: 27px;
    font-weight: 800;
    line-height: 1;
}

.report-score-label {
    margin-top: 5px;

    color: #888888;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.08em;
}

.report-body {
    padding: 30px;
}

.report-summary {
    padding: 18px;

    background: #fffafa;

    border: 1px solid #f0b7ba;
    border-radius: 10px;
}

.report-summary-title {
    color: #d71920;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}

.report-summary-text {
    margin-top: 7px;

    color: #555555;

    font-size: 13px;
    line-height: 1.7;
}

.report-section {
    padding-top: 24px;
}

.report-section + .report-section {
    margin-top: 24px;

    border-top: 1px solid #eeeeee;
}

.report-section-title {
    margin-bottom: 13px;

    color: #171717;

    font-size: 16px;
    font-weight: 800;
}


/* =========================================================
   REPORT DATA
========================================================= */

.report-data-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}

.report-data-item {
    min-width: 0;

    padding: 13px 14px;

    background: #fafafa;

    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.report-data-label {
    display: block;

    color: #888888;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.05em;

    text-transform: uppercase;
}

.report-data-value {
    display: block;

    margin-top: 5px;

    color: #333333;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   REPORT AUTHENTICATION
========================================================= */

.report-auth-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}

.report-auth-item {
    padding: 15px;

    background: #fafafa;

    border: 1px solid #e8e8e8;
    border-radius: 8px;

    text-align: center;
}

.report-auth-label {
    display: block;

    color: #888888;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.06em;
}

.report-auth-value {
    display: block;

    margin-top: 5px;

    font-size: 13px;
    font-weight: 900;
}


/* =========================================================
   REPORT FINDINGS
========================================================= */

.report-findings {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.report-finding {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 11px 13px;

    background: #fafafa;
    color: #555555;

    border: 1px solid #eeeeee;
    border-radius: 8px;

    font-size: 12px;
    line-height: 1.65;
}

.report-finding-icon {
    flex: 0 0 auto;

    color: #d71920;

    font-weight: 900;
}


/* =========================================================
   REPORT CONCLUSION
========================================================= */

.report-conclusion {
    color: #555555;

    font-size: 13px;
    line-height: 1.75;
}

.report-conclusion p + p {
    margin-top: 10px;
}


/* =========================================================
   REPORT LIMITATIONS
========================================================= */

.report-limitations {
    padding: 16px;

    background: #fafafa;
    color: #666666;

    border: 1px solid #e7e7e7;
    border-radius: 9px;

    font-size: 12px;
    line-height: 1.7;
}

.report-limitations p + p {
    margin-top: 10px;
}

.report-limitations ul {
    margin: 9px 0 0 20px;
}

.report-limitations li {
    margin: 3px 0;
}


/* =========================================================
   REPORT FOOTER
========================================================= */

.report-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 30px;

    background: #fafafa;

    border-top: 1px solid #eeeeee;
}

.report-footer-note {
    color: #777777;

    font-size: 11px;
}

.copy-report {
    flex: 0 0 auto;
}


/* =========================================================
   FOOTER
   PADRÃO CVEWORKS
========================================================= */

/*
   Suporta tanto <footer class="site-footer"> quanto
   o footer antigo do Email Analyzer com .copyright.
*/

.site-footer,
.copyright {
    width: 100%;

    background: #ffffff;

    border-top: 1px solid #e4e4e6;

    color: #92969a;

    font-size: 11px;
}


/* =========================================================
   FOOTER BOTTOM
========================================================= */

.footer-bottom {
    width: 100%;

    background: #ffffff;

    border-top: 1px solid #eeeeef;
}

.footer-bottom-inner,
.copyright .container {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    color: #92969a;

    font-size: 11px;
}


/* Evita que regras antigas da página alterem o container
   apenas dentro do rodapé */

.copyright .container {
    min-height: 0;
}


/* =========================================================
   FOOTER TEXT
========================================================= */

.footer-bottom-inner span,
.footer-bottom-inner p,
.copyright span,
.copyright p {
    margin: 0;

    color: #92969a;

    font-size: 11px;
    line-height: 1.6;
}

.footer-bottom-inner a,
.copyright a {
    color: #c90000;

    font-size: inherit;
    font-weight: inherit;

    text-decoration: none;
}

.footer-bottom-inner a:hover,
.copyright a:hover {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 900px) {

    .provider-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .report-auth-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 700px) {

    /* =====================================================
       GLOBAL WIDTH
       Mesmo padrão do CVE Search
    ===================================================== */

    .container {
        width: min(100% - 28px, 1180px);
    }


    /* =====================================================
       HEADER
    ===================================================== */

    .site-header-inner,
    .header-content {
        width: min(100% - 28px, 1180px);
        height: 64px;
    }

    .site-nav,
    .navigation {
        gap: 16px;
    }


    /* =====================================================
       EMAIL ANALYZER CONTENT
    ===================================================== */

    .instructions,
    .input-card,
    .card {
        padding: 22px;
    }

    .provider-grid {
        grid-template-columns: 1fr;
    }

    .hero-result {
        flex-direction: column;
        align-items: center;

        padding: 25px 20px;

        text-align: center;
    }

    .risk-description {
        max-width: none;
    }

    .result-grid {
        gap: 14px;
    }

    .info-row {
        grid-template-columns: 1fr;

        gap: 4px;
    }

    .report-header {
        align-items: flex-start;
        flex-direction: column;

        padding: 22px;
    }

    .report-score {
        text-align: left;
    }

    .report-body {
        padding: 22px;
    }

    .report-data-grid {
        grid-template-columns: 1fr;
    }

    .report-auth-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .report-footer {
        align-items: flex-start;
        flex-direction: column;

        padding: 18px 22px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    #rawEmail {
        min-height: 220px;
    }


    /* =====================================================
       FOOTER
    ===================================================== */

    .footer-bottom-inner,
    .copyright .container {
        width: min(100% - 28px, 1180px);

        align-items: flex-start;
        flex-direction: column;

        gap: 20px;

        padding: 18px 0;
    }

}


/* =========================================================
   RESPONSIVE - SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    /* =====================================================
       HEADER
    ===================================================== */

    .site-logo,
    .logo {
        font-size: 18px;
    }

    .site-logo-mark,
    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .site-nav a,
    .navigation a {
        font-size: 12px;
    }


    /* =====================================================
       EMAIL ANALYZER
    ===================================================== */

    .score {
        width: 116px;
        height: 116px;

        flex-basis: 116px;
    }

    .score-number {
        font-size: 33px;
    }

    .report-auth-grid {
        grid-template-columns: 1fr;
    }

}