/* =========================================================
   CVEWORKS - INCIDENT ANALYZER
   Light / Red / White visual identity
========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --red: #c90000;
    --red-dark: #a90000;
    --red-soft: #fff1f2;
    --text: #202124;
    --muted: #6b6b6b;
    --border: #dedede;
    --bg: #f7f7f8;
    --white: #ffffff;
    --success: #138a52;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   HEADER
   PADRÃO CVEWORKS
========================================================= */

.site-header {
    width: 100%;

    background: #ffffff;

    border-bottom: 1px solid #e5e5e7;
}


/*
   O Incident Analyzer usa .header-inner no HTML.
   Este bloco corresponde ao .container.header-content
   utilizado no CVE Search.
*/

.header-inner {
    width: min(1180px, calc(100% - 40px));
    height: 72px;

    margin: 0 auto;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   HEADER LOGO
========================================================= */

.brand {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    color: #202124;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;

    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    background: #c90000;
    color: #ffffff;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;

    box-shadow: none;
}

.brand-name {
    line-height: normal;
}

.brand-cve {
    color: #202124;
}

.brand-work {
    color: #c90000;
}


/* =========================================================
   HEADER NAVIGATION
========================================================= */

.site-header nav {
    display: flex;
    align-items: center;

    gap: 32px;
}

.site-header nav a {
    padding: 0;

    background: transparent;

    border-radius: 0;

    color: #5f6368;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}

.site-header nav a:hover {
    background: transparent;
    color: #c90000;
}


/* =========================================================
   MAIN CONTAINER
========================================================= */

.container {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;

    padding: 34px 24px 70px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    margin-bottom: 28px;

    background: #ffffff;

    border-bottom: 1px solid #e2e2e2;

    padding: 44px 0 40px;
}

.hero-inner {
    max-width: 920px;
}

.hero-badge,
.eyebrow,
.section-label {
    display: inline-block;

    color: var(--red);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.eyebrow {
    padding: 8px 15px;

    background: #ffffff;

    border: 1px solid #ff9ba0;
    border-radius: 30px;
}

h1 {
    margin: 12px 0 8px;

    color: #202124;

    font-size: 38px;
    line-height: 1.1;
}

h1 span {
    color: var(--red);
}

h2 {
    margin: 5px 0 0;

    font-size: 21px;
}

p {
    color: var(--muted);

    line-height: 1.55;
}


/* =========================================================
   GENERATOR / ANALYZER CARDS
========================================================= */

.generator-section {
    padding: 0;
}

.generator-card,
.card {
    margin-bottom: 18px;
    padding: 24px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.035);
}

.generator-card {
    position: relative;
}

.hash-card {
    border-top: 3px solid var(--red);
}

.card-header {
    margin-bottom: 17px;
}

.card-header h2 {
    margin: 0 0 7px;
}

.card-header p {
    margin: 0;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 17px;
}

.counter {
    color: #777777;

    font-size: 12px;

    white-space: nowrap;
}


/* =========================================================
   INPUT
========================================================= */

.hash-input-container {
    margin-top: 18px;
}

.hash-input-container label {
    display: block;

    margin-bottom: 8px;

    color: #333333;

    font-size: 13px;
    font-weight: 700;
}

textarea,
.hash-input {
    width: 100%;
    min-height: 330px;

    padding: 16px;

    background: #fcfcfc;

    border: 1px solid #cfcfcf;
    border-radius: 12px;

    font:
        14px/1.55
        Consolas,
        Monaco,
        monospace;

    resize: vertical;

    outline: none;
}

textarea:focus,
.hash-input:focus {
    border-color: var(--red);

    box-shadow:
        0 0 0 3px rgba(201, 0, 0, 0.08);
}

.hash-input-help {
    margin-top: 8px;

    color: #777777;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   BUTTONS
========================================================= */

.input-actions,
.report-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 14px;
}

.btn,
.small-btn {
    padding: 11px 18px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 9px;

    color: #202124;

    font-weight: 700;

    cursor: pointer;
}

.generate-button,
.btn-primary {
    margin-top: 14px;

    padding: 11px 18px;

    background: var(--red);
    color: #ffffff;

    border: 1px solid var(--red);
    border-radius: 9px;

    font-weight: 700;

    cursor: pointer;
}

.generate-button:hover,
.btn-primary:hover {
    background: var(--red-dark);
}

.btn-secondary:hover,
.small-btn:hover {
    background: #fafafa;

    border-color: #aaaaaa;
}

.btn-download:hover {
    border-color: var(--red);

    color: var(--red);
}

button:disabled {
    cursor: wait;

    opacity: 0.65;
}


/* =========================================================
   STATUS
========================================================= */

.status {
    margin-top: 14px;
    padding: 12px 14px;

    border-radius: 9px;

    font-size: 13px;
}

.status.success,
.hash-success {
    background: #edf9f2;

    border: 1px solid #bce6cd;

    color: var(--success);
}

.status.error {
    background: #fff1f1;

    border: 1px solid #f1b5b8;

    color: #b00009;
}

.status.loading {
    background: #fff8e8;

    border: 1px solid #ead49a;

    color: #765800;
}

.hidden {
    display: none !important;
}


/* =========================================================
   HASH / ANALYSIS RESULT
========================================================= */

.hash-result {
    display: none;

    margin-top: 20px;
}

.hash-result.visible {
    display: block;
}

.hash-result-header {
    padding: 15px 18px;

    background: #fafafa;

    border: 1px solid #e5e5e5;
    border-left: 3px solid var(--red);
    border-radius: 10px;

    color: #222222;

    font-size: 15px;
    font-weight: 800;
}

.hash-result-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-top: 12px;
}

.hash-result-item {
    padding: 14px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.hash-result-item span {
    display: block;

    margin-bottom: 5px;

    color: #888888;

    font-size: 11px;
    font-weight: 700;
}

.hash-result-item strong {
    display: block;

    color: #222222;

    font-size: 14px;

    word-break: break-word;
}

.hash-analysis-box {
    margin-top: 12px;
    padding: 16px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.hash-analysis-box strong {
    display: block;

    color: #222222;

    font-size: 14px;
}

.hash-analysis-box p {
    margin: 7px 0 0;

    color: #555555;

    font-size: 13px;
}


/* =========================================================
   THREAT INTELLIGENCE
========================================================= */

.threat-box {
    display: none;

    margin-top: 20px;
    padding: 22px;

    background: #ffffff;

    border: 1px solid #e4e4e4;
    border-radius: 14px;
}

.threat-box.visible {
    display: block;
}

.threat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.threat-title {
    color: #222222;

    font-size: 17px;
    font-weight: 800;
}

.threat-badge {
    padding: 6px 11px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 800;
}

.threat-badge.malicious {
    background: #ffe7e7;
    color: #c4161c;

    border: 1px solid #ffc4c4;
}

.threat-badge.clean {
    background: #eaf8ee;
    color: #188038;

    border: 1px solid #c8e8d0;
}

.threat-badge.unknown {
    background: #fff7e8;
    color: #996500;

    border: 1px solid #f1d7a8;
}

.threat-loading {
    color: #777777;

    font-size: 13px;
}

.threat-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}

.threat-item {
    padding: 13px;

    background: #fafafa;

    border: 1px solid #eeeeee;
    border-radius: 9px;
}

.threat-item.full {
    grid-column: 1 / -1;
}

.threat-item span {
    display: block;

    margin-bottom: 4px;

    color: #888888;

    font-size: 11px;
    font-weight: 700;
}

.threat-item strong {
    display: block;

    color: #222222;

    font-size: 13px;

    word-break: break-word;
}

.threat-warning {
    margin-top: 15px;
    padding: 12px 14px;

    background: #fff8ed;

    border: 1px solid #f1d7a8;
    border-radius: 9px;

    color: #806000;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   SUPPORTED FORMATS
========================================================= */

.supported-section {
    padding: 70px 0;

    background: #f7f7f8;
}

.supported-header {
    max-width: 720px;

    margin: 0 auto 35px;

    text-align: center;
}

.supported-header h2 {
    margin: 15px 0 10px;

    color: #171717;

    font-size: 30px;
    font-weight: 800;
}

.supported-header p {
    color: #666666;

    font-size: 15px;
}

.supported-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    max-width: 1050px;

    margin: 0 auto;
}

.supported-item {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    min-height: 145px;

    padding: 22px;

    background: #ffffff;

    border: 1px solid #e7e7e7;
    border-radius: 14px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.supported-item:hover {
    transform: translateY(-3px);

    border-color: #f0b6b8;

    box-shadow:
        0 9px 25px rgba(0, 0, 0, 0.08);
}

.supported-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 52px;
    height: 52px;

    background: #fff1f1;
    color: #d71920;

    border: 1px solid #ffd4d4;
    border-radius: 12px;

    font-size: 11px;
    font-weight: 900;
}

.supported-item strong {
    display: block;

    margin-bottom: 7px;

    color: #222222;

    font-size: 16px;
}

.supported-item p {
    margin: 0;

    color: #777777;

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   EVIDENCE / LISTS
========================================================= */

.report-list {
    margin: 0;

    padding-left: 23px;
}

.report-list li {
    padding: 6px 0;

    color: #333333;

    line-height: 1.55;
}

.report-list li::marker {
    color: var(--red);

    font-weight: 800;
}

.action-list li {
    padding: 7px 0;
}

.laudo-body .report-list:not(.action-list) li {
    display: list-item;

    margin-bottom: 2px;
}


/* =========================================================
   INCIDENT REPORT
========================================================= */

.result-title {
    margin: 0 0 18px;
}

.result-title h2 {
    margin: 5px 0 0;

    font-size: 21px;
}

.laudo-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;
}

.laudo-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.035);
}

.laudo-head {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 14px 17px;

    background: #fafafa;

    border-bottom: 1px solid #e7e7e7;
}

.laudo-number {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 28px;
    height: 28px;

    background: var(--red);
    color: #ffffff;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
}

.laudo-title {
    color: #222222;

    font-size: 14px;
    font-weight: 800;
}

.laudo-body {
    padding: 17px;
}

.laudo-body p {
    margin: 0;

    color: #444444;

    font-size: 14px;
    line-height: 1.6;
}

.action-card {
    border-top: 3px solid var(--red);
}


/* =========================================================
   CLASSIFICATION
========================================================= */

.classification-card {
    margin-top: 18px;
    padding: 18px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 14px;
}

.classification-title {
    margin-bottom: 12px;

    color: #777777;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 0.8px;

    text-transform: uppercase;
}

.classification {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
}

.classification-tag {
    padding: 9px 12px;

    background: #f7f7f7;

    border: 1px solid #d9d9d9;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;
}

.classification-tag strong {
    color: var(--red);
}

.error-card {
    border-color: #f0b9bd;
}


/* =========================================================
   FOOTER
   PADRÃO CVEWORKS
========================================================= */

.site-footer {
    width: 100%;

    background: #ffffff;

    border-top: 1px solid #e4e4e6;
}


/*
   Mesma largura horizontal do header:
   1180px com 20px mínimos nas laterais.
*/

.footer-inner {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}


/* =========================================================
   FOOTER TOP
========================================================= */

.footer-top {
    width: 100%;

    background: #ffffff;

    border-bottom: 0;
}

.footer-top .footer-inner {
    display: grid;

    grid-template-columns:
        2fr 1fr 1fr;

    gap: 50px;

    padding-top: 50px;
    padding-bottom: 50px;
}


/* =========================================================
   FOOTER BRAND
========================================================= */

.footer-brand {
    min-width: 0;
    max-width: 360px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    color: #202124;

    font-size: 18px;
    font-weight: 800;

    line-height: normal;

    text-decoration: none;
}

.footer-logo-mark {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 36px;
    height: 36px;

    background: #c90000;
    color: #ffffff;

    border-radius: 7px;

    font-size: 10px;
    font-weight: 800;

    box-shadow: none;
}


/*
   Caso o elemento do HTML esteja vazio,
   adiciona "CVE" visualmente para ficar igual
   ao rodapé padrão.
*/

.footer-logo-mark:empty::before {
    content: "CVE";

    color: #ffffff;

    font-size: 10px;
    font-weight: 800;
}

.footer-logo-text {
    color: #202124;

    font-size: 18px;
    font-weight: 800;

    line-height: normal;
}

.footer-logo-cve {
    color: #202124;
}

.footer-logo-work {
    color: #c90000;
}

.footer-description {
    max-width: 360px;

    margin-top: 12px;

    color: #85898d;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   FOOTER COLUMNS
========================================================= */

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 8px;
}

.footer-column h3 {
    margin: 0 0 4px;

    color: #303236;

    font-size: 12px;
    font-weight: 800;
}

.footer-column a {
    padding: 0;

    color: #85898d;

    font-size: 12px;

    text-decoration: none;
}

.footer-column a:hover {
    color: #c90000;
}


/* =========================================================
   FOOTER BOTTOM
========================================================= */

.footer-bottom {
    background: #ffffff;

    border-top: 1px solid #eeeeef;
}

.footer-bottom-inner {
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-top: 18px;
    padding-bottom: 18px;

    color: #92969a;

    font-size: 11px;
}

.footer-bottom p {
    margin: 0;

    color: #92969a;

    font-size: 11px;
    line-height: 1.6;
}

.footer-bottom a {
    color: #c90000;

    font-size: inherit;

    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-separator {
    margin: 0 5px;

    color: #92969a;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   RESPONSIVE - CONTENT
========================================================= */

@media (max-width: 900px) {

    .supported-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .laudo-grid {
        grid-template-columns: 1fr;
    }

    .result-title {
        display: block;
    }

    .report-actions {
        margin-top: 16px;
    }

    .footer-top .footer-inner {
        grid-template-columns:
            1.5fr 1fr 1fr;
    }

}


@media (max-width: 800px) {

    h1 {
        font-size: 31px;
    }

    .hash-result-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    /* =====================================================
       HEADER MOBILE
       Mesmo padrão do CVE Search
    ===================================================== */

    .header-inner {
        width: min(100% - 28px, 1180px);
        height: 64px;
    }

    .site-header nav {
        gap: 16px;
    }


    /* =====================================================
       FOOTER MOBILE
    ===================================================== */

    .footer-inner {
        width: min(100% - 28px, 1180px);
    }

    .footer-top .footer-inner {
        grid-template-columns:
            1fr 1fr;

        gap: 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
    }

}


@media (max-width: 680px) {

    .supported-grid {
        grid-template-columns: 1fr;
    }

    .threat-grid {
        grid-template-columns: 1fr;
    }

    .threat-item.full {
        grid-column: auto;
    }

    .threat-header {
        align-items: flex-start;
        flex-direction: column;
    }

}


@media (max-width: 520px) {

    .container {
        padding: 24px 13px 50px;
    }

    .card,
    .generator-card {
        padding: 18px;
    }

}


@media (max-width: 480px) {

    /* =====================================================
       HEADER SMALL MOBILE
    ===================================================== */

    .site-header nav a {
        font-size: 12px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }


    /* =====================================================
       FOOTER SMALL MOBILE
    ===================================================== */

    .footer-top .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }

}