
:root {
    --primary: #E02424;
    --dark: #111111;
    --gray: #555555;
    --white: #FFFFFF;
    --background: #F5F6F8;
    --border: #E1E4E8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--background);
    color: var(--dark);
    line-height: 1.7;
}

.container {
    width: 92%;
    max-width: 1150px;
    margin: auto;
}

header {
    background: var(--dark);
    color: var(--white);
    padding: 22px 0;
    border-bottom: 4px solid var(--primary);
}

.brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: white;
    text-decoration: none;
}

.brand span {
    color: #FF5151;
}

header p {
    margin: 0;
    font-size: 12px;
    color: #DDDDDD;
}

.hero {
    text-align: center;
    padding: 50px 10px 35px;
}

.tag {
    display: inline-block;
    background: #FCE8E8;
    color: #B91C1C;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
}

h1, h2 {
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.35;
}

h1 {
    font-size: clamp(26px, 5vw, 42px);
    margin: 18px 0 10px;
}

h2 {
    font-size: 21px;
    margin-top: 0;
}

.hero p {
    color: var(--gray);
}

.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 5px 24px rgba(0,0,0,0.04);
    min-width: 0;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 17px 0 6px;
}

input, select {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    background: white;
    color: var(--dark);
}

input:focus, select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

small {
    display: block;
    color: var(--gray);
    font-size: 11px;
    margin-top: 4px;
}

button {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 14px;
    background: #C91C1C;
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    margin-top: 22px;
    cursor: pointer;
}

button:hover {
    background: #A91515;
}

button.secondary {
    margin-top: 10px;
    background: var(--white);
    color: var(--dark);
    border: 1px solid #CCCCCC;
}

button.secondary:hover {
    background: #EEEEEE;
}

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.metric {
    background: #F8F9FA;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    min-width: 0;
}

.metric span {
    display: block;
    font-size: 12px;
    color: var(--gray);
}

.metric strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(18px, 2.4vw, 27px);
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.metric.highlight {
    background: #C91C1C;
    color: white;
    border-color: #C91C1C;
}

.metric.highlight span {
    color: white;
}

.notice {
    font-size: 12px;
    background: #FFF8E8;
    color: #75520B;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 0;
}

#error {
    color: #B91C1C;
    font-size: 13px;
}

.explanation {
    margin-top: 24px;
}

.explanation p {
    font-size: 14px;
    margin: 8px 0;
}

.cta {
    text-align: center;
    background: var(--dark);
    color: white;
    border-radius: 16px;
    padding: 35px 20px;
    margin: 24px 0 40px;
}

.cta a {
    display: inline-block;
    background: #C91C1C;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 25px 15px;
    color: var(--gray);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

footer a {
    color: #B91C1C;
}

@media (max-width: 768px) {
    .calculator {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px;
    }

    .hero {
        padding-top: 30px;
    }
}

@media (max-width: 380px) {
    .results {
        grid-template-columns: 1fr;
    }
}
