* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* page shell, fonts and background come from ../../pub.css (shared WikiFred look) */
.container {
    max-width: 1200px;
    margin: 1.5rem auto;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 0.4rem;
    padding: 40px;
}
@media (max-width: 600px) { .container { padding: 20px 14px; margin: 0.8rem; } }

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5em;
    color: #2b2620;
    margin-bottom: 10px;
}

.subtitle {
    color: #6b6055;
    font-size: 1.1em;
}

h2 {
    font-size: 1.5em;
    color: #2b2620;
    margin-bottom: 20px;
    border-bottom: 3px solid #9a5b34;
    padding-bottom: 10px;
}


.costs-list {
    margin-bottom: 30px;
}

#costsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-item {
    background: #f1e9dc;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #9a5b34;
}

.cost-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cost-date {
    font-weight: 600;
    color: #9a5b34;
    min-width: 100px;
}

.cost-amount {
    font-weight: 700;
    font-size: 1.2em;
    color: #2b2620;
    min-width: 120px;
}

.cost-description {
    color: #6b6055;
}


.chart-section {
    margin-bottom: 30px;
    background: #f1e9dc;
    padding: 30px;
    border-radius: 15px;
}

#costChart {
    max-height: 400px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #9a5b34 0%, #7a4a2a 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
    opacity: 0.9;
    color: white;
    border: none;
    padding: 0;
}

.stat-card p {
    font-size: 2em;
    font-weight: 700;
}

.comparison-section {
    margin-top: 30px;
    background: #f1e9dc;
    padding: 30px;
    border-radius: 15px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.comparison-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-card.highlight {
    border: 2px solid #9a5b34;
}

.comparison-card.verdict {
    background: linear-gradient(135deg, #9a5b34 0%, #7a4a2a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.comparison-card h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    border: none;
    padding: 0;
    color: inherit;
}

.comparison-card.verdict h3 {
    color: white;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.comparison-item label,
.comparison-item span:first-child {
    font-weight: 600;
    color: #6b6055;
}

.comparison-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #9a5b34;
}

.comparison-item input {
    width: 100px;
    padding: 6px;
    border: 2px solid #e0d6c5;
    border-radius: 6px;
    font-size: 0.95em;
    text-align: right;
}

.comparison-item.strong {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e0d6c5;
}

.comparison-value-small {
    font-size: 1em;
    font-weight: 600;
    color: #6b6055;
}

.comparison-value-large {
    font-size: 1.5em;
    font-weight: 700;
    color: #9a5b34;
}

.separator {
    height: 1px;
    background: #e0d6c5;
    margin: 15px 0;
}

.comparison-note {
    font-size: 0.85em;
    color: #6b6055;
    margin-top: -8px;
    margin-bottom: 8px;
    font-style: italic;
}

.btn-compare {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #9a5b34;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-compare:hover {
    background: #7a4a2a;
    transform: translateY(-2px);
}

.verdict-text {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.verdict-text.keep {
    color: #90EE90;
}

.verdict-text.replace {
    color: #FFB6C6;
}

.verdict-detail {
    font-size: 1.1em;
    opacity: 0.95;
}

.comparison-controls {
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.shared-inputs {
    flex: 1;
}

.shared-inputs h4 {
    margin: 0 0 15px 0;
    color: #9a5b34;
}

.verdict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.verdict-card {
    background: linear-gradient(135deg, #9a5b34 0%, #7a4a2a 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.verdict-card.highlight {
    background: linear-gradient(135deg, #c98a5e 0%, #9a5b34 100%);
}

.verdict-card h3 {
    font-size: 1em;
    margin-bottom: 15px;
    opacity: 0.9;
    color: white;
    border: none;
    padding: 0;
}

.verdict-text-small {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.verdict-text-small.keep {
    color: #90EE90;
}

.verdict-text-small.neutral {
    color: #FFE66D;
}

.verdict-text-small.best {
    color: white;
    font-size: 1.8em;
}

.verdict-detail-small {
    font-size: 0.95em;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .cost-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

