#spg-root {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.spg-container {
    width: 100%;
    max-width: 100%;
}

.spg-calculator {
    border: 1px solid #083141;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}

.spg-step {
    border-radius: 12px;
    background: #ffffff;
    padding: 1.25rem 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
}

.spg-step-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #083141;
    letter-spacing: -0.01em;
}

.spg-step-help {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #526b75;
    line-height: 1.5;
}

.spg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.spg-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spg-input label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    display: block;
}

.spg-input input,
.spg-input select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.spg-input input:focus,
.spg-input select:focus {
    border-color: #083141;
    box-shadow: 0 0 0 1px rgba(8, 49, 65, 0.15);
}

.spg-input input[readonly] {
    background: #f9fafb;
    cursor: not-allowed;
}

.spg-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8fbfd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.spg-achievement {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid;
}

.spg-achievement-fantastic {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #15803d;
    color: #114b26;
}

.spg-achievement-great_progress {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #6366f1;
    color: #312e81;
}

.spg-achievement-close {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #f97316;
    color: #9a3412;
}

.spg-achievement-needs_work {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #dc2626;
    color: #991b1b;
}

.spg-achievement-icon {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.spg-achievement-content {
    flex: 1;
}

.spg-achievement-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.spg-achievement-message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.spg-early-stop {
    background: #f0f9ff;
    border: 2px solid #0891b2;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #164e63;
}

.spg-status-section {
    margin-bottom: 24px;
}

.spg-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.spg-status-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spg-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.spg-status-card-label {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.spg-status-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #083141;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.spg-status-card-value-success {
    color: #15803d !important;
}

.spg-status-card-detail {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
}

.spg-graph-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.spg-graph-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.spg-graph-canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.spg-lump-sum-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.spg-lump-sum-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.spg-lump-sum-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(245, 158, 11, 0.3);
}

.spg-lump-sum-icon {
    font-size: 2.5rem;
    font-weight: 700;
    color: #d97706;
    line-height: 1;
    flex-shrink: 0;
}

.spg-lump-sum-content {
    flex: 1;
}

.spg-lump-sum-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.spg-lump-sum-subtitle {
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.4;
}

.spg-lump-sum-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spg-lump-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.spg-lump-sum-label {
    font-size: 0.95rem;
    color: #78350f;
    font-weight: 500;
}

.spg-lump-sum-value {
    font-size: 1rem;
    color: #92400e;
    font-weight: 600;
}

.spg-lump-sum-total {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(245, 158, 11, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spg-lump-sum-total-label {
    font-size: 1.1rem;
    color: #78350f;
    font-weight: 600;
}

.spg-lump-sum-total-value {
    font-size: 1.5rem;
    color: #92400e;
    font-weight: 700;
}

.spg-lump-sum-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.5;
}

.spg-scenarios-section {
    margin-top: 32px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
}

.spg-scenarios-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.spg-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.spg-scenario-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.spg-scenario-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.spg-scenario-card-highlight {
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.spg-scenario-card-best {
    border: 3px solid #15803d;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 4px 16px rgba(21, 128, 61, 0.2);
    transform: scale(1.02);
}

.spg-scenario-card-best:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 128, 61, 0.3);
}

.spg-scenario-badge {
    position: absolute;
    top: -12px;
    right: 1rem;
    background: #ffffff;
    color: #78350f;
    border: 2px solid #f59e0b;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
    letter-spacing: 0.02em;
}

.spg-scenario-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.spg-scenario-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #083141;
    margin-bottom: 0.25rem;
}

.spg-scenario-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

.spg-scenario-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spg-scenario-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.spg-scenario-metric-label {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.spg-scenario-metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: #083141;
    text-align: right;
}

.spg-scenario-metric-value.spg-scenario-success {
    color: #15803d;
}

.spg-scenario-value-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 3px solid #15803d;
    font-size: 0.85rem;
    color: #065f46;
    line-height: 1.5;
    font-weight: 500;
}

.spg-nudge-section {
    margin-bottom: 24px;
}

.spg-nudge-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.spg-nudge-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.spg-nudge-content {
    flex: 1;
}

.spg-nudge-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.75rem;
}

.spg-nudge-message {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #78350f;
    line-height: 1.6;
}

.spg-nudge-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.spg-nudge-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.spg-nudge-option-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.spg-nudge-option-text {
    flex: 1;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.5;
}

.spg-nudge-option-text strong {
    color: #92400e;
    font-weight: 600;
}

.spg-status-section h4 {
    color: #083141;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
}

.spg-results h4,
.spg-projections-section h4,
.spg-voluntary-section h4 {
    color: #083141;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
}

.spg-status-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.spg-status-section strong {
    color: #083141;
    font-weight: 600;
}

.spg-warning {
    background: #fff4e5;
    border: 1px solid #f6c78b;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 16px 0;
    color: #8a4700;
    font-size: 0.9rem;
    line-height: 1.5;
}

.spg-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: #ebf2f4;
    margin-bottom: 10px;
    font-weight: 600;
    color: #083141;
}

.spg-table-wrapper {
    overflow-x: auto;
    margin-top: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.spg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.spg-table th {
    background: #ebf2f4;
    padding: 8px 10px;
    border-bottom: 1px solid #d7e1e3;
    font-weight: 600;
    color: #083141;
    white-space: nowrap;
}

.spg-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ebf2f4;
    vertical-align: top;
}

.spg-table tr:nth-child(even) td {
    background: #f9fafb;
}

.spg-table tr:last-child td {
    border-bottom: none;
}

.spg-projections-section {
    margin-top: 1.5rem;
}

.spg-projections-note {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 1rem 0 0 0;
    line-height: 1.6;
    font-style: italic;
}

.spg-voluntary-section {
    margin-top: 1.5rem;
}

.spg-step p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .spg-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .spg-container {
        padding: 15px;
    }
    
    .spg-step {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .spg-step-title {
        font-size: 1.1rem;
    }
    
    .spg-table {
        font-size: 0.75rem;
    }
    
    .spg-table th,
    .spg-table td {
        padding: 4px 6px;
    }
    
    .spg-achievement {
        flex-direction: column;
        text-align: center;
    }
    
    .spg-achievement-icon {
        margin: 0 auto;
    }
    
    .spg-table-wrapper {
        overflow-x: auto;
    }
    
    .spg-status-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .spg-status-card-value {
        font-size: 1.75rem;
    }
    
    .spg-graph-canvas {
        width: 100%;
        height: 150px;
    }
    
    .spg-scenarios-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .spg-nudge-card {
        flex-direction: column;
        padding: 1.25rem;
    }
    
    .spg-nudge-icon {
        font-size: 1.75rem;
    }
    
    .spg-nudge-options {
        gap: 0.5rem;
    }
    
    .spg-nudge-option {
        padding: 0.6rem;
    }
    
    .spg-scenarios-section {
        padding: 1rem;
        margin-top: 24px;
        margin-bottom: 20px;
    }
    
    .spg-scenarios-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .spg-scenarios-header h4 {
        font-size: 1.2rem;
    }
    
    .spg-scenarios-header p {
        font-size: 0.85rem;
    }
    
    .spg-scenario-card {
        padding: 1rem;
    }
    
    .spg-scenario-card-best {
        transform: none;
    }
    
    .spg-scenario-card-best:hover {
        transform: translateY(-2px);
    }
    
    .spg-scenario-badge {
        top: -10px;
        right: 0.75rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    
    .spg-scenario-title {
        font-size: 1rem;
    }
    
    .spg-scenario-subtitle {
        font-size: 0.8rem;
    }
    
    .spg-scenario-metric-label {
        font-size: 0.85rem;
    }
    
    .spg-scenario-metric-value {
        font-size: 0.9rem;
    }
    
    .spg-scenario-value-note {
        font-size: 0.8rem;
        padding: 0.6rem;
        margin-top: 0.75rem;
    }
    
    .spg-status-section {
        padding: 1rem;
    }
    
    .spg-status-section h4 {
        font-size: 1.2rem;
    }
    
    .spg-graph-section {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .spg-graph-wrapper {
        padding: 0.75rem;
    }
    
.spg-graph-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #083141;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
}
