html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


/* =========================================================
   GLOBAL VARIABLES
   ========================================================= */

:root {
    --site-content-width: 900px;
    --color-00: #262626;
    --color-30: #7A1F1F;
    --color-40: #A52A2A;
    --color-45: #C2410C;
    --color-50: #D97706;
    --color-60: #EAB308;
    --color-65: #AFC200;
    --color-70: #65A30D;
    --color-75: #4D9A4A;
    --color-80: #2F855A;
    --color-85: #0F766E;
    --color-90: #0E7490;
    --color-95: #2563EB;
}


/* =========================================================
   GLOBAL
   ========================================================= */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

code {
    color: #0d6efd;
    background-color: #f8f9fa;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
}

.text-justify {
    text-align: justify;
}

.tooltip-inner {
    max-width: 450px;
    text-align: left;
}


/* =========================================================
   HOME PAGE
   ========================================================= */

.home-container {
    width: 100%;
    max-width: var(--site-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-top: 0.75rem;
    padding-bottom: 2rem;
}


/* ---------------------------------------------------------
   Home hero
   --------------------------------------------------------- */

.home-hero {
    width: 100%;
    margin-bottom: 1.25rem;
}

.home-title {
    width: 100%;
    margin: 0 0 0.9rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Home introduction
   --------------------------------------------------------- */

.home-intro-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 1.75rem;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.home-intro-text {
    color: #5f6872;
    font-size: 1rem;
    line-height: 1.55;
}

.home-privacy {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 1.5rem;
    border-left: 1px solid #e9ecef;
}

.home-privacy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    color: #198754;
    background-color: #e9f7ef;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

.home-privacy-title {
    color: #343a40;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.home-privacy-text {
    margin-top: 0.1rem;
    color: #6c757d;
    font-size: 0.8rem;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Home protocols
   --------------------------------------------------------- */

.protocol-section {
    width: 100%;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.protocol-section-heading {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

    .protocol-section-heading h2 {
        flex-shrink: 0;
        margin: 0;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .protocol-section-heading p {
        margin: 0;
        color: #6c757d;
        font-size: 0.86rem;
    }

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.75rem;
}

.protocol-card {
    min-width: 0;
    height: 100%;
    padding: 0.9rem 1rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.protocol-name {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.15rem 0.45rem;
    color: #0d6efd;
    background-color: #eef5ff;
    border-radius: 0.3rem;
    font-weight: 700;
}

.protocol-description {
    color: #495057;
    font-size: 0.87rem;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   Home analysis form
   --------------------------------------------------------- */

.home-form-section {
    width: 100%;
    margin-top: 1.5rem;
}

.analysis-form-card {
    width: 100%;
    padding: 1.5rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.8rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.analysis-form-header {
    padding-bottom: 1rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid #e9ecef;
}

.analysis-form-title {
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.analysis-form-description {
    margin-bottom: 0;
    color: #6c757d;
}


/* ---------------------------------------------------------
   Form fields
   --------------------------------------------------------- */

.form-label-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
    font-size: 1rem;
    font-weight: 600;
}

.field-required,
.field-optional {
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.field-required {
    color: #842029;
    background-color: #f8d7da;
}

.field-optional {
    color: #495057;
    background-color: #e9ecef;
}

.home-input-icon {
    background-color: #f8f9fa;
}

.analysis-form-card .form-control,
.analysis-form-card .input-group-text {
    border-color: #ced4da;
}

    .analysis-form-card .form-control:focus {
        border-color: #86b7fe;
    }

.validation-message {
    display: block;
    margin-top: 0.3rem;
}

.analysis-submit {
    min-height: 52px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   DKIM help
   --------------------------------------------------------- */

.dkim-help {
    overflow: hidden;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.55rem;
}

    .dkim-help summary {
        padding: 0.75rem 0.9rem;
        color: #495057;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 600;
        user-select: none;
    }

        .dkim-help summary:hover {
            background-color: #f1f3f5;
        }

    .dkim-help[open] summary {
        border-bottom: 1px solid #e9ecef;
    }

.dkim-help-content {
    padding: 1rem;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

    .dkim-help-content ol {
        padding-left: 1.3rem;
    }

    .dkim-help-content li {
        margin-bottom: 0.2rem;
    }

.dkim-example {
    padding: 0.8rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.45rem;
}

.dkim-example-title {
    margin-bottom: 0.4rem;
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dkim-example code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   Home result preview
   --------------------------------------------------------- */

.home-result-preview {
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid #e9ecef;
}

.home-result-preview-title {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
}

.result-preview-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    padding: 0.75rem;
    background-color: #ffffff;
}

.result-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    color: #0d6efd;
    background-color: #eef5ff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
}

.result-preview-description {
    margin-top: 0.1rem;
    color: #6c757d;
    font-size: 0.82rem;
    line-height: 1.3;
}


/* =========================================================
   HOME RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .home-title {
        font-size: 1.75rem;
    }

    .home-intro-card {
        gap: 1.25rem;
    }

    .home-privacy {
        padding-left: 1.25rem;
    }
}


@media (max-width: 767.98px) {

    .home-container {
        padding-top: 0.5rem;
    }

    .home-title {
        font-size: 1.7rem;
        white-space: normal;
    }

    .home-intro-card {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 1rem;
    }

    .home-intro-text {
        text-align: center;
    }

    .home-privacy {
        justify-content: center;
        padding-top: 0.85rem;
        padding-left: 0;
        border-top: 1px solid #e9ecef;
        border-left: 0;
    }

    .home-privacy-title,
    .home-privacy-text {
        white-space: normal;
    }

    .protocol-section-heading {
        display: block;
    }

        .protocol-section-heading p {
            margin-top: 0.2rem;
        }

    .protocol-grid {
        grid-template-columns: 1fr;
    }

    .analysis-form-card {
        padding: 1.1rem;
    }
}


/* =========================================================
   ANALYSIS RESULT PAGE
   ========================================================= */

.result-container {
    width: 100%;
    max-width: var(--site-content-width);
    margin: 0 auto;
    padding: 0.75rem 0 2rem;
}

.result-header {
    margin-bottom: 1.35rem;
}

.analysis-title {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.result-intro {
    margin-bottom: 0.55rem;
    color: #495057;
    line-height: 1.55;
}

/* ---------------------------------------------------------
   Global score
   --------------------------------------------------------- */

.global-score-card {
    padding: 0.55rem;
    background-color: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 0.85rem;
    box-shadow: 0 3px 12px rgba(22, 39, 61, 0.06);
}

.global-score-panel {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    align-items: stretch;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: #f3f6f7;
    background-color: color-mix(in srgb, currentColor 5%, white);
    border-radius: 0.6rem;
}

.global-score-result {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 1.25rem;
    border-right: 1px solid #dbe3e8;
}

.global-score-letter,
.score-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #e8eff5;
    background-color: color-mix(in srgb, currentColor 12%, white);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.global-score-letter {
    width: 7rem;
    height: 7rem;
    font-size: 4rem;
    letter-spacing: -0.06em;
}

.global-score-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.global-score-title {
    margin: 0 0 0.25rem;
    color: #526179;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.global-score-level {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.12;
}

.global-score-description {
    margin: 0.25rem 0 0.65rem;
    color: #526179;
    font-size: 0.9rem;
    line-height: 1.4;
}

.global-score-gauge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.global-score-progress,
.score-progress {
    overflow: hidden;
    background-color: #dfe6ec;
    border-radius: 999px;
}

.global-score-progress {
    flex: 1;
    min-width: 0;
    height: 12px;
}

.global-score-progress .progress-bar,
.score-progress .progress-bar {
    border-radius: 999px;
}

.global-score-value {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 1.05rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.global-score-value span {
    font-size: 0.85rem;
    font-weight: 400;
}

/* ---------------------------------------------------------
   Individual scores
   --------------------------------------------------------- */

.individual-scores {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.score-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 0.7rem;
    box-shadow: 0 2px 8px rgba(22, 39, 61, 0.045);
}

.score-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: #26354f;
}

.score-card-title {
    margin: 0;
    color: #14213b;
    font-size: 0.95rem;
    font-weight: 700;
}

.score-card-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    color: #405573;
}

.score-card-result {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.45rem 0 0.7rem;
}

.score-letter {
    width: 4.25rem;
    height: 4.25rem;
    font-size: 2.15rem;
    letter-spacing: -0.045em;
}

.score-progress {
    height: 7px;
    margin: 0 0 0.6rem;
}

.score-level {
    margin-bottom: 0.7rem;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
}

.score-description {
    margin: 0;
    color: #526179;
    font-size: 0.87rem;
    line-height: 1.5;
}

.score-card-undefined .score-letter {
    color: #303946;
    background-color: #e9edf1;
}

.score-card-undefined .score-level {
    color: #303946;
}

/* DKIM details */

.score-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e9edf1;
}

.score-detail {
    min-width: 0;
    color: #526179;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.score-detail code {
    display: inline;
    padding: 0.1rem 0.2rem;
    font-size: 0.8rem;
    background-color: #f5f7f9;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* ---------------------------------------------------------
   Result new analysis
   --------------------------------------------------------- */

.result-new-analysis {
    margin-top: 1rem;
}

.result-new-analysis .btn {
    min-height: 52px;
    font-weight: 600;
}

/* =========================================================
   RESULT RESPONSIVE
   ========================================================= */

@media (max-width: 767.98px) {
    .result-container {
        padding-top: 0.5rem;
    }

    .analysis-title {
        font-size: 1.2rem;
    }

    .individual-scores {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .global-score-panel {
        grid-template-columns: 7rem minmax(0, 1fr);
        gap: 1rem;
        padding: 0.9rem;
    }

    .global-score-result {
        padding-right: 0.8rem;
    }

    .global-score-letter {
        width: 5.5rem;
        height: 5.5rem;
        font-size: 3.1rem;
    }
}

@media (max-width: 479.98px) {
    .global-score-panel {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .global-score-result {
        padding: 0 0 0.75rem;
        border-right: 0;
        border-bottom: 1px solid #dbe3e8;
    }

    .global-score-title,
    .global-score-level,
    .global-score-description {
        text-align: center;
    }

    .global-score-gauge-row {
        gap: 0.65rem;
    }

    .score-card {
        padding: 0.8rem;
    }

    .score-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 359.98px) {
    .individual-scores {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   EXISTING GAUGES
   ========================================================= */

.gauge {
    height: 25px;
}

.gauge-none {
    background-color: #555555;
}

.gauge-50 {
    background-color: #dc3545;
}

.gauge-75 {
    background-color: #ff6a00;
}

.gauge-100 {
    background-color: #ffc107;
}

.gauge-101 {
    background-color: #198754;
}


/* =========================================================
   SCORE COLORS
   ========================================================= */

.score-text-none {
    color: var(--color-00);
}

.score-gauge-none {
    background-color: var(--color-00);
}


.score-text-0 {
    color: var(--color-00);
}

.score-gauge-0 {
    background-color: var(--color-00);
}


.score-text-30 {
    color: var(--color-30);
}

.score-gauge-30 {
    background-color: var(--color-30);
}


.score-text-40 {
    color: var(--color-40);
}

.score-gauge-40 {
    background-color: var(--color-40);
}


.score-text-45 {
    color: var(--color-45);
}

.score-gauge-45 {
    background-color: var(--color-45);
}


.score-text-50 {
    color: var(--color-50);
}

.score-gauge-50 {
    background-color: var(--color-50);
}


.score-text-60 {
    color: var(--color-60);
}

.score-gauge-60 {
    background-color: var(--color-60);
}


.score-text-65 {
    color: var(--color-65);
}

.score-gauge-65 {
    background-color: var(--color-65);
}


.score-text-70 {
    color: var(--color-70);
}

.score-gauge-70 {
    background-color: var(--color-70);
}


.score-text-75 {
    color: var(--color-75);
}

.score-gauge-75 {
    background-color: var(--color-75);
}


.score-text-80 {
    color: var(--color-80);
}

.score-gauge-80 {
    background-color: var(--color-80);
}


.score-text-85 {
    color: var(--color-85);
}

.score-gauge-85 {
    background-color: var(--color-85);
}


.score-text-90 {
    color: var(--color-90);
}

.score-gauge-90 {
    background-color: var(--color-90);
}


.score-text-95 {
    color: var(--color-95);
}

.score-gauge-95 {
    background-color: var(--color-95);
}
