* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #024589;
    --primary-hover: #023a73;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --red-color: #ef4444;
    --blue-color: #69b0ce;
    --background: #f1f5f9;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 1rem 0;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Input Card */
.input-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 3rem;
    box-shadow: none;
}

/* Input Layout */
.input-layout {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    align-items: center;
}

.input-intro {
    padding-right: 2rem;
}

.input-heading {
    font-family: 'Yeseva One', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.input-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.input-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Scenario Pills */
.scenario-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pill {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    position: relative;
    flex-shrink: 0;
}

.input-row .input-group:first-child {
    width: 14rem;
    flex-shrink: 0;
}

.input-row .input-group:nth-child(2),
.input-row .input-group:nth-child(3) {
    flex-shrink: 0;
}

.input-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.hint {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.75rem;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1.0625rem;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
}

.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group input[type="number"][readonly] {
    background: #f8fafc;
    color: var(--text-secondary);
}

/* Currency suffix */
.input-group:first-child::after {
    content: 'kr.';
    position: absolute;
    right: 1rem;
    bottom: 0.95rem;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.input-group:first-child input[type="number"] {
    padding-right: 3rem;
}

/* Radio Button Groups */
.radio-group {
    display: flex;
    gap: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.3125rem;
    background: white;
    height: 3.625rem;
    width: fit-content;
}

.radio-group.single {
    min-width: 4.5rem;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group .radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0 1.125rem;
    text-align: center;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
    border: 2px solid transparent;
}

.radio-group .radio-label:hover {
    background: #f8fafc;
}

.radio-group input[type="radio"]:checked + .radio-label {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
}

.radio-group .radio-label.active {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.calculate-btn:hover {
    background: var(--primary-hover);
}

/* Comparison Wrapper */
.comparison-wrapper {
    animation: fadeIn 0.3s ease;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Comparison Container */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    margin-bottom: 0;
    align-items: start;
}

/* Salary Card */
.salary-card {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: none;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Salary Rows */
.salary-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    align-items: center;
}

.salary-row .label {
    color: var(--text-primary);
}

.salary-row .percent {
    text-align: right;
    min-width: 3rem;
    color: var(--text-primary);
}

.salary-row .value {
    text-align: right;
    min-width: 2rem;
    color: var(--text-secondary);
}

.salary-row .amount {
    text-align: right;
    min-width: 5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.salary-row.red .label,
.salary-row.red .percent,
.salary-row.red .amount {
    color: black;
    font-weight: 600;
}

.salary-row.blue .label,
.salary-row.blue .percent,
.salary-row.blue .amount {
    color: black;
    font-weight: 600;
}

.salary-row.bold {
    font-weight: 600;
}

/* Dividers */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.divider-thick {
    height: 2px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

/* Arrow Container - now a separator */
.arrow-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    align-self: stretch;
}

.arrow {
    width: 1px;
    height: auto;
    background: var(--border-color);
    opacity: 0.5;
}

/* Summary Section (inside salary card) */
.summary-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
}

.summary-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.summary-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Visual hierarchy for summary items */
.summary-item:nth-child(1) .summary-label {
    font-size: 0.875rem;
}

.summary-item:nth-child(1) .summary-value {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.summary-item:nth-child(2) .summary-label {
    font-size: 0.9375rem;
}

.summary-item:nth-child(2) .summary-value {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.summary-item:nth-child(3) {
    padding: 1.25rem 1rem 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(2, 69, 137, 0.05) 0%, rgba(2, 69, 137, 0.02) 100%);
    margin: 0.5rem 0 0 0;
    border-radius: 0.375rem;
}

.summary-item:nth-child(3) .summary-label {
    font-size: 1.0625rem;
    font-weight: 700;
}

.summary-item:nth-child(3) .summary-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Info Text */
.info-text {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: white;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.info-text p {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9375rem;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 2rem;
    font-size: 0.875rem;
}

/* Responsive */

/* Desktop: > 1024px */
/* No changes needed */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .arrow-container {
        display: none;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    body {
        padding: 1rem 0.5rem;
    }

    .input-card {
        padding: 0;
    }

    .input-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .input-intro {
        padding-right: 0;
    }

    .input-heading {
        font-size: 1.5rem;
    }

    .input-description {
        font-size: 0.9375rem;
    }

    .input-row {
        flex-wrap: wrap;
        gap: 0.875rem;
    }
    
    .input-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .input-row .input-group:first-child {
        width: 100%;
    }
    
    .radio-group {
        width: 100%;
    }

    .scenario-selector {
        flex-direction: column;
    }

    .salary-card {
        padding: 1rem;
    }

    .salary-row {
        font-size: 0.875rem;
        gap: 0.5rem;
    }

    .salary-row .amount {
        min-width: 4rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .summary-value {
        font-size: 1.125rem;
    }
    
    .summary-item:nth-child(1) .summary-value {
        font-size: 1rem;
    }
    
    .summary-item:nth-child(2) .summary-value {
        font-size: 1.125rem;
    }
    
    .summary-item:nth-child(3) .summary-value {
        font-size: 1.5rem;
    }
    
    .summary-item:nth-child(3) {
        margin: 0.5rem 0 0 0;
        padding: 1rem 0.75rem 0.5rem 0.75rem;
    }
}
