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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
}

.container {
    width: auto;
    box-sizing: border-box;
}

.card {
    border: 1px solid #ddd;
    padding: 24px;
    margin-bottom: 24px;
    background: #fff;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-header p {
    font-size: 13px;
    color: #666;
}

.source-link {
    flex-shrink: 0;
    font-size: 13px;
}

.source-link a {
    color: #000;
    text-underline-offset: 3px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.form-group input,
.form-group select {
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 14px;
    height: 40px;
    background: #fff;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    line-height: 1.5;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

.segment-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
    border: 1px solid #000;
    min-width: 140px;
    height: 40px;
}

.segment-btn {
    height: 38px;
    padding: 0 18px;
    background: #fff;
    border: none;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-btn + .segment-btn {
    border-left: 1px solid #000;
}

.segment-btn.active {
    background: #000;
    color: #fff;
}

.result-panel {
    border: 1px solid #eee;
    padding: 20px;
    background: #f9f9f9;
}

.salary-panel {
    margin-bottom: 16px;
}

.result-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.salary-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.salary-value span {
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}

.salary-value small {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.stat {
    border: 1px solid #eee;
    padding: 14px;
    background: #fff;
}

.stat b {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat span {
    color: #666;
    font-size: 13px;
}

.items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.items li {
    border: 1px solid #eee;
    padding: 12px 14px;
    background: #fff;
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 12px;
    font-size: 14px;
}

.date {
    color: #666;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    margin-left: 8px;
    border: 1px solid #000;
    padding: 1px 6px 0;
    color: #000;
    font-size: 12px;
    line-height: 18px;
    vertical-align: 1px;
}

.empty {
    border: 1px solid #eee;
    margin: 0;
    padding: 12px 14px;
    color: #999;
    font-size: 14px;
    background: #fff;
}

@media (max-width: 640px) {
    .card {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .source-link {
        width: 100%;
    }

    .segment-buttons {
        width: 100%;
    }

    .salary-value span {
        font-size: 36px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .items li {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
