.investment-calculator * {
    box-sizing: border-box;
}
.investment-calculator {
    width: 100%;
    margin: 0 auto;
    font-family: 'Nunito',Helvetica,Arial,Lucida,sans-serif;
    font-weight: normal;
    border: 0px;
}
.investment-calculator li {
    margin-left: 40px;
    line-height: 1.5em;
    margin-bottom: 8px;
}
.investment-calculator h1 {
    font-size: 42px;
    color: #333;
}
.investment-calculator h2 {
    color: #444;
}
.investment-calculator h3 {
    color: #555;
    margin-top: 30px;
    margin-bottom: 15px;
}
.investment-calculator button {
    font-family: 'Nunito',Helvetica,Arial,Lucida,sans-serif;
    font-weight: normal;
}
.sim-heading {
    font-size: 28px;
    margin-bottom: 20px;
}
.sim-inp-sec {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    border-radius: 8px;    
    line-height: 1.4em;
    margin-bottom: 30px;
    background-color: #fcfcfc;
}
.sim-inp-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-evenly;
    margin: 20px 0;
    width: 100%;
}
.sim-inp-row-in {
    display: flex;
    margin: 20px 0;
    width: 100%;
}
.sim-inp-col {
    align-items: center;
    width: 45%;
}
.sim-tooltip-box {
    position: relative;
    margin: 0 10px;
}
.sim-tooltip-icon {
    color: #777;
    border: 1px solid #ddd;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    cursor: default;
    line-height: 16px;
    display: inline-block;
    transition: all 0.2s ease;
}
.sim-tooltip-icon:hover {
    background: #f0f0f0;
    border-color: #bbb;
}
.sim-tooltip-text {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: absolute;
    top: 30px;
    left: -11px;
    display: none;
    padding: 12px;
    width: 240px;
    font-size: 13px;
    border-radius: 6px;
    text-align: left;
    z-index: 10;
    line-height: 1.4;
}
.sim-tooltip-text::before {
    content: '';
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 5px solid #fff;
    position: absolute;
    top: -5px;
    left: 15px;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.03));
}
.sim-tooltip-icon:hover + .sim-tooltip-text {
    display: block;
}
.sim-inp-col label {
    text-align: right;
    font-size: 16px;
    color: #444;
}

/* Input styles */
.inp-prefix,
.inp-postfix {
    position: absolute;
    top: 8px;
    font-size: 16px;
}
.inp-prefix {
    left: 10px;
    color: #666!important;
}
.inp-postfix {
    right: 10px;
}
.sim-inp-col input {
    height: 36px!important;
    padding: 8px 12px!important; 
    padding-left: 20px!important;
    outline: 0!important;
    border: 1px solid #d3d3d38c!important;
    border-radius: 6px!important;
    background: #f9f9f9!important;
    text-align: right!important;
    font-size: 16px!important;
    transition: all 0.2s ease;
}
.sim-inp-col input:focus {
    border-color: #892b45!important;
    box-shadow: 0 0 0 2px rgba(137, 43, 69, 0.1)!important;
    background: #fff!important;
}
.error-input {
    border-color: #d73a49!important;
    box-shadow: 0 0 0 2px rgba(215, 58, 73, 0.1)!important;
}
.postfix-inp-box input {
    padding: 4px 10px!important;
    padding-right: 25px!important;
}

/* Button styles */
.sim-btn-row {
    text-align: center;
    margin-top: 30px;
}
.run-butn {
    height: 40px!important;
    padding: 0 24px!important;
    background: #892b45!important;
    border: none!important;
    border-radius: 6px!important;
    color: #fff!important;
    cursor: pointer!important;
    font-size: 16px!important;
    font-weight: 600!important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(137, 43, 69, 0.2)!important;
}
.run-butn:hover {
    background: #751b35!important;
    box-shadow: 0 4px 8px rgba(137, 43, 69, 0.3)!important;
    transform: translateY(-1px);
}
.run-butn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(137, 43, 69, 0.2)!important;
}

/* Chart section */
.sim-chart-sec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
}
.sim-chart-box {
    width: 100%;
}

/* Description section */
.desc-sec {
    margin: 30px 0;
    font-size: 16px;
    line-height: 1.6em;
    color: #444;
}
.sim-desc-heading {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}
.desc-sec p {
    font-size: 16px;
    margin-block-start: 1em!important;
    margin-block-end: 1em;
}

/* Summary section */
.summary-sec {
    border-bottom: 1px solid #ddd;
    margin-top: 40px;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Result section */
.sim-rsl-sec {
    overflow: auto!important;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
}
.sim-table {
    border-collapse: collapse!important;
    margin: 0 auto;
    width: 100%;
}
.sim-table tr:nth-child(even) td:first-child {
    text-align: left!important;  
    position: sticky;
    left: 0;
    background-color: #f8f8f8;
}
.sim-table tr:nth-child(odd) td:first-child, th:first-child {
    text-align: left!important;  
    position: sticky;
    left: 0;
    background-color: #ffffff;
}
.sim-table tr:nth-child(even) {
    background-color: #f8f8f8;
}
.sim-table td, .sim-table th {
    padding: 12px!important;
    font-size: 14px!important;
    line-height: 1.4em;
}
.sim-table th {
    padding-top: 15px!important;
    padding-bottom: 15px!important;
    text-align: right!important;
    color: #892b45!important;
    font-weight: 600!important;
    border-bottom: 2px solid #f0f0f0;
}
.sim-table td {
    text-align: right!important;
}

/* Export button */
.sim-exp-butn {
    border: 1px solid #892b45!important;
    color: #892b45!important;
    border-radius: 6px!important;
    height: 36px!important;
    padding: 0 12px!important;
    background: transparent!important;
    cursor: pointer!important;
    font-size: 14px!important;
    transition: all 0.2s ease;
}
.sim-exp-butn:hover {
    background: rgba(137, 43, 69, 0.05)!important;
}

/* Toggle switch */
.sim-toggle {
    display: none!important;
}
.sim-toggle, .sim-toggle:after, .sim-toggle:before, .sim-toggle *, .sim-toggle *:after, .sim-toggle *:before, .sim-toggle + .sim-toggle-btn {
    box-sizing: border-box!important;
}
.sim-toggle::selection, .sim-toggle:after::selection, .sim-toggle:before::selection, .sim-toggle *::selection, .sim-toggle *:after::selection, .sim-toggle *:before::selection, .sim-toggle + .sim-toggle-btn::selection {
    background: none!important;
}
.sim-toggle + .sim-toggle-btn {
    outline: 0!important;
    display: block!important;
    width: 3.5em!important;
    height: 1.8em!important;
    position: relative!important;
    cursor: pointer!important;
    user-select: none!important;
    transition: all 0.2s ease;
}
.sim-toggle + .sim-toggle-btn:after, .sim-toggle + .sim-toggle-btn:before {
    position: relative!important;
    display: block!important;
    content: ""!important;
    width: 50%!important;
    height: 100%!important;
}
.sim-toggle + .sim-toggle-btn:after {
    left: 0!important;
}
.sim-toggle + .sim-toggle-btn:before {
    display: none!important;
}
.sim-toggle:checked + .sim-toggle-btn:after {
    left: 50%!important;
}
.sim-toggle-switch + .sim-toggle-btn {
    background: #f0f0f0!important;
    border-radius: 2em!important;
    padding: 2px!important;
    transition: all 0.4s ease!important;
}
.sim-toggle-switch + .sim-toggle-btn:after {
    border-radius: 50%!important;
    background: #fff!important;
    transition: all 0.3s ease!important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sim-toggle-switch:checked + .sim-toggle-btn {
    background: #892b45!important;
}
.sim-toggle-switch:checked + .sim-toggle-btn:after {
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.sim-lbl-box {
    display: flex;
    align-items: center;
    width: 55%;
    justify-content: right;
}
.sim-presets {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: left;
    margin-left: 40px;
    /*margin-bottom: 12px;*/
}
.sim-inp-box {
    position: relative;
}
.sim-small-text {
    font-size: 12px!important;
    line-height: 1.4em;
    color: #666;
}

/* Advanced config section */
.sim-section-header {
    margin-top: 20px;
    margin-bottom: 10px;
}
.sim-section-header .sim-lbl-box {
    width: 100%;
    justify-content: left;
    font-weight: 600;
    border-bottom: 1px solid #ececec;
    padding-bottom: 10px;
    color: #892b45;
}

/* Messages */
.error {
    color: #d73a49;
    background-color: #ffeef0;
    border: 1px solid #fdb8c0;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    line-height: 1.5;
}
.notice {
    color: #892b45;
    background-color: #f9f0f2;
    border: 1px solid #e5c1c9;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    line-height: 1.5;
}

/* Investment details table */
#investmentsTable {
   /* margin-top: 30px;*/
    overflow-x: auto;
}

/* Highlight rows with sales data */
.sim-table tr td:nth-child(6):not(:empty):not([data-value="$0"]):not(:contains("-")) {
    background-color: rgba(137, 43, 69, 0.1);
    color: #892b45;
    font-weight: 600;
}

/* Preset links */
.sim-presets a {
    color: #892b45;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 4px;
}
.sim-presets a:hover {
    background-color: rgba(137, 43, 69, 0.05);
    text-decoration: underline;
}

/* Assumptions section */
.assumptions-sec {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #ddd;
}
.assumptions-sec ul {
    margin-top: 10px;
}

/* Summary boxes styles */
.summary-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 30px 0;
    gap: 15px;
}
.summary-box {
    flex: 1;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
}
.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.box-title {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}
.box-info {
    color: #999;
    font-size: 12px;
    cursor: help;
}
.box-value {
    font-size: 24px;
    font-weight: 700;
    color: #892b45;
}
/* Modify existing styles to work with summary boxes */
.box-header .sim-tooltip-box {
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

.box-header .sim-tooltip-icon {
    color: #777;
    border: 1px solid #ddd;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    cursor: default;
    line-height: 16px;
    display: inline-block;
    transition: all 0.2s ease;
    margin-left: 5px;
}

.box-header .sim-tooltip-icon:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.box-header .sim-tooltip-text {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: absolute;
    top: 25px;
    right: -5px;
    display: none;
    padding: 12px;
    width: 240px;
    font-size: 13px;
    border-radius: 6px;
    text-align: left;
    z-index: 10;
    line-height: 1.4;
    color: #444;
}

.box-header .sim-tooltip-text::before {
    content: '';
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 5px solid #fff;
    position: absolute;
    top: -5px;
    right: 10px;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.03));
}

.box-header .sim-tooltip-icon:hover + .sim-tooltip-text {
    display: block;
}

/* Adjustments to box-header to support tooltip positioning */
.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}
/* Tab Navigation */
.sim-tab-nav {
    display: flex;
    margin: 30px 0 0;
    border-bottom: 1px solid #ddd;
}
.tab-button {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s ease;
}
.tab-button:hover {
    color: #892b45;
}
.tab-button.active {
    color: #892b45;
    border-bottom-color: #892b45;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Responsive styles */
@media screen and (max-width: 1200px) {
    .sim-inp-row {
        display: block;
        margin: 0;
    }
    .sim-inp-col {
        width: 100%;
        justify-content: space-between;
        margin: 20px 0;
    }
    .sim-inp-box input {
        width: 100%;    
    }
    .sim-inp-box {
        width: 35%;
        display: flex;
        margin-left: 0;
        margin-right: auto;
    }
    .inp-prefix,
    .inp-postfix {
        position: absolute;
        top: 8px;
    }
    .inp-prefix {
        left: 10px;
    }
    .inp-postfix {
        right: 10px;
    }
    .sim-chart-sec {
        display: block;
    }
    .sim-chart-box {
        width: 100%;
    }
    .sim-lbl-box {
        justify-content: right;
    }
    .sim-btn-row {
        margin: 30px 0;
    }
}

@media screen and (max-width: 992px) {
    .sim-heading {
        font-weight: 600;
    }
    .investment-calculator {
        width: 90%;
    }
    .sim-presets {
        margin-left: 20px;
    }
    .summary-boxes {
        flex-wrap: wrap;
    }
    .summary-box {
        flex: 0 0 48%;
        margin-bottom: 15px;
    }
}

@media screen and (max-width: 768px) {
    .investment-calculator {
        width: 95%;
    }
    .sim-inp-col label {
        font-size: 15px;
    }
    .sim-tooltip-icon {
        width: 16px;
        height: 16px;
        font-size: 12px;
        line-height: 14px;
    }
    .sim-inp-sec {
        padding: 15px;
    }
    .sim-inp-box {
        width: 40%;
    }
    .sim-inp-col input {
        font-size: 15px!important;
    }
    .sim-presets {
        margin-left: 10px;
    }
    .summary-boxes {
        flex-direction: column;
    }
    .summary-box {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
    .tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media screen and (max-width: 600px) {
    .investment-calculator {
        width: 100%;
    }
    .sim-inp-col label {
        font-size: 14px;
    }
    .sim-tooltip-icon {
        width: 16px;
        height: 16px;
        font-size: 12px;
        line-height: 14px;
    }
    .sim-inp-sec {
        padding: 12px;
    }
    .sim-inp-col input {
        font-size: 14px!important;
    }
    .sim-inp-box {
        width: 45%;
    }
    .desc-sec p {
        font-size: 14px;
    }
    .sim-table td, .sim-table th {
        font-size: 12px!important;
        padding: 8px!important;
    }
    .sim-exp-butn {
        font-size: 12px!important;
    }
    .sim-presets {
        display: block;
        margin-left: 0;
    }
    .sim-presets a {
        display: block;
        /*margin-bottom: 10px;*/
    }
    .box-value {
        font-size: 20px;
    }
}

/* Results Summary Styling - Add to simulator_style.css */

.summary-container {
    font-family: "Nunito",Helvetica,Arial,Lucida,sans-serif;
    background-color: #fcfcfc;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.summary-intro {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #333;
}

.highlight-value {
    font-weight: 700;
    color: #892b45;
}

.summary-results {
    margin: 20px 0;
    padding: 0;
}

.result-item {
    margin-bottom: 14px;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.result-item:hover {
    background-color: #f9f0f2;
}

.result-label {
    font-weight: 600;
    color: #444;
    flex: 1;
}

.result-value {
    font-weight: 700;
    color: #892b45;
    font-size: 18px;
    text-align: right;
    padding-left: 10px;
}

.result-subtext {
    font-size: 14px;
    color: #666;
    flex-basis: 100%;
    margin-top: 5px;
    text-align: right;
}

.sp500-comparison {
    background-color: #f9f0f2;
    border-left: 4px solid #892b45;
    padding: 15px;
    margin: 25px 0;
    border-radius: 0 6px 6px 0;
}

.comparison-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.conclusion {
    font-size: 18px;
    font-weight: 700;
    color: #892b45;
    text-align: center;
    margin-top: 20px;
}
.chart-explanation-container {
    margin: 0 0 30px 0;
    font-family: 'Nunito',Helvetica,Arial,Lucida,sans-serif;
}

.chart-explanation {
    background-color: #fcfcfc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    overflow: hidden;
}

.chart-explanation-summary {
    padding: 15px 20px;
    font-weight: 600;
    font-size: 18px;
    color: #444;
    cursor: pointer;
    position: relative;
    list-style: none;
    outline: none;
}

.chart-explanation-summary::-webkit-details-marker {
    display: none;
}

.chart-explanation-summary::after {
    content: '↓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: #892b45;
}

.chart-explanation[open] .chart-explanation-summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.chart-explanation-content {
    padding: 0 20px 20px;
    line-height: 1.6;
    color: #444;
}

.chart-legend-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.legend-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    top: 2px;
}

.blue-line::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    background-color: #0077b6;
    position: relative;
    top: 10px;
}

.blue-dot::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #0077b6;
    position: relative;
    top: 7px;
    left: 7px;
}

.green-line::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    background-color: #40916c;
    position: relative;
    top: 10px;
}

.gray-line::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    background-color: #665e61;
    position: relative;
    top: 10px;
}

.orange-bar::before {
    content: "";
    display: block;
    width: 10px;
    height: 18px;
    background-color: #e5a43a;
    position: relative;
    top: 3px;
    left: 7px;
}

.legend-text {
    flex: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .chart-explanation-summary {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .chart-explanation-content {
        padding: 0 15px 15px;
        font-size: 14px;
    }
    
    .legend-icon {
        width: 20px;
        height: 20px;
    }
}

.enhanced-table-container {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    margin: 20px 0;
    overflow-x: auto;
}

.enhanced-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #eaeaea;
}

.enhanced-table th, .enhanced-table td {
    padding: 14px 20px;
    text-align: right;
}

.enhanced-table th {
    background-color: #f6f9fc;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: wrap;
}

.enhanced-table th:first-child {
    text-align: left;
}

.metric-name {
    font-weight: 600;
    color: #333;
    text-align: left !important;
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 1;
    box-shadow: 4px 0 5px -5px rgba(0,0,0,0.1);
}

.metric-row:nth-child(even) .metric-name {
    background-color: #f8f8f8;
}

.metric-row:nth-child(even) {
    background-color: #f8f8f8;
}

.value-cell {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.2s ease;
}

.value-cell.highlight {
    font-weight: 700;
    background-color: #f9f9f9;
}

.value-cell.invested-highlight {
    color: #0077b6;
    background-color: rgba(0, 119, 182, 0.05);
}

.value-cell.distribution-highlight {
    color: #e5a43a;
    background-color: rgba(229, 164, 58, 0.05);
}

.value-cell.sp500-highlight {
    color: #6c757d;
    background-color: rgba(108, 117, 125, 0.05);
}

.table-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: right;
}

/* Hover effects */
.metric-row:hover {
    background-color: #f0f7fb;
}

.metric-row:hover .metric-name {
    background-color: #f0f7fb;
}

.yearly-summary-title {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    color: #333;
    margin: 15px 0 15px;
    font-weight: 600;
}

.enhanced-yearly-container {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    margin: 20px 0;
    overflow-x: auto;
}

.enhanced-yearly-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #eaeaea;
}

.enhanced-yearly-table th, .enhanced-yearly-table td {
    padding: 12px 15px;
    text-align: center;
}

.enhanced-yearly-table th {
    background-color: #f6f9fc;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: wrap;
}

.enhanced-yearly-table th:first-child {
    text-align: left;
}

.enhanced-yearly-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #333;
}

.even-row {
    background-color: #f8f8f8;
}

.odd-row {
    background-color: #ffffff;
}

.year-cell {
    font-weight: 600;
    color: #333;
    min-width: 90px;
}

.value-cell {
    font-variant-numeric: tabular-nums;
}

.sale-row {
    background-color: rgba(40, 167, 69, 0.05);
}

.sale-cell, .capital-cell {
    transition: all 0.2s ease;
}

.sale-row .sale-cell {
    color: #28a745;
    font-weight: 700;
}

.sale-row .capital-cell {
    color: #0077b6;
    font-weight: 700;
}

/* Hover effects */
.enhanced-yearly-table tr:hover {
    background-color: #f0f7fb;
}

.sale-row:hover {
    background-color: rgba(40, 167, 69, 0.1);
}

.investments-title {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    color: #333;
    margin: 25px 0 15px;
    font-weight: 600;
}

.enhanced-investments-container {
    font-family: "Nunito", Helvetica, Arial, Lucida, sans-serif;
    margin: 20px 0;
    overflow-x: auto;
}

.enhanced-investments-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #eaeaea;
}

.enhanced-investments-table th, .enhanced-investments-table td {
    padding: 12px 15px;
    text-align: left;
}

.enhanced-investments-table th {
    background-color: #f6f9fc;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.investment-name {
    font-weight: 600;
}

.date-cell {
   /* color: #666;*/
    white-space: nowrap;
}

.value-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cashflow-cell {
    text-align: right;
    color: #e5a43a;
    font-weight: 600;
}

.even-row {
    background-color: #f8f8f8;
}

.odd-row {
    background-color: #ffffff;
}

/* Hover effects */
.enhanced-investments-table tr:hover {
    background-color: #f0f7fb;
}

.chart-explanation-summary::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid #892b45;
    border-bottom: 2px solid #892b45;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.3s ease;
}
.chart-explanation[open] .chart-explanation-summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

/* 
 * SOLUTION FOR TOOLTIP CUTOFF ISSUE
 * 
 * This CSS positions tooltips to the LEFT of the icon instead of to the right
 * when they appear in the rightmost summary boxes. This prevents them from
 * being cut off by the edge of the screen.
 */

/* Style for the summary box tooltips */
.summary-box .sim-tooltip-box {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.summary-box .sim-tooltip-icon {
    color: #777;
    border: 1px solid #ddd;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    cursor: default;
    line-height: 16px;
    display: inline-block;
    transition: all 0.2s ease;
}

.summary-box .sim-tooltip-icon:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

/* Position tooltips for the first 3 boxes (normal right-side tooltips) */
.summary-box:nth-child(-n+3) .sim-tooltip-text {
    position: absolute;
    top: 25px;
    right: -5px; /* Slight adjustment to position */
    width: 240px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    font-size: 13px;
    line-height: 1.4;
    z-index: 100;
    display: none;
    text-align: left;
    color: #444;
}

/* Position tooltips for the LAST 2 boxes (left-side tooltips) */
.summary-box:nth-child(n+4) .sim-tooltip-text {
    position: absolute;
    top: 25px;
    left: -230px; /* Position to the left instead of right */
    width: 240px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    font-size: 13px;
    line-height: 1.4;
    z-index: 100;
    display: none;
    text-align: left;
    color: #444;
}

/* Arrow for regular right-positioned tooltips */
.summary-box:nth-child(-n+3) .sim-tooltip-text::before {
    content: '';
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 5px solid #fff;
    position: absolute;
    top: -5px;
    right: 10px;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.03));
}

/* Arrow for left-positioned tooltips */
.summary-box:nth-child(n+4) .sim-tooltip-text::before {
    content: '';
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 5px solid #fff;
    position: absolute;
    top: -5px;
    right: auto;
    left: 230px; /* Position the arrow on the right for left tooltips */
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.03));
}

/* Show tooltip on hover */
.summary-box .sim-tooltip-icon:hover + .sim-tooltip-text {
    display: block;
}