/* ==========================================================
   AFTER-TAX BOND YIELD CALCULATOR
   Version 2.0
   ========================================================== */


/* ==========================================================
   PAGE
   ========================================================== */

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    padding: 40px;

    background: #f4f6f9;

    font-family: Arial, Helvetica, sans-serif;

    color: #222;

}


/* ==========================================================
   CALCULATOR CONTAINER
   ========================================================== */

.page {

    display: flex;

    justify-content: center;

}

.calculator {

    width: 920px;

    background: white;

    border-radius: 12px;

    padding: 35px;

    box-shadow:
        0 8px 30px rgba(0,0,0,.08);

}


/* ==========================================================
   HEADER
   ========================================================== */

.calculator-header {

    margin-bottom: 30px;

}

.calculator-header h1 {

    margin: 0;

    color: #174A7C;

    font-size: 30px;

}

.subtitle {

    margin-top: 10px;

    color: #666;

    font-size: 16px;

    line-height: 1.5;

}


/* ==========================================================
   TABLE
   ========================================================== */

.comparison-table {

    width: 100%;

    border-collapse: collapse;

}

.comparison-table th,
.comparison-table td {

    border: 1px solid #d9d9d9;

    padding: 10px;

}

.comparison-table thead th {

    background: #eef4fb;

    text-align: center;

    font-size: 15px;

    font-weight: 700;

}

.label-column {

    width: 36%;

}

.row-label {

    font-weight: 600;

}


/* ==========================================================
   DROPDOWNS
   ========================================================== */

select {

    width: 100%;

    padding: 8px 10px;

    height: 42px;

    font-size: 14px;

    border: 1px solid #c8c8c8;

    border-radius: 6px;

    background: white;

}

select:focus {

    outline: none;

    border-color: #174A7C;

}


/* ==========================================================
   TAX INPUTS
   ========================================================== */

.tax-input-cell {

    text-align: left;

}

.tax-input-cell input {

    width: 70px;

    height: 40px;

    text-align: center;

    font-size: 15px;

    font-weight: 600;

    border: 1px solid #c8c8c8;

    border-radius: 6px;

}

.percent-symbol {

    margin-left: 8px;

    font-weight: bold;

}


/* ==========================================================
   VALUE CELLS
   ========================================================== */

.comparison-table tbody td:not(.row-label):not(.tax-input-cell) {

    text-align: center;

}


/* ==========================================================
   RESULT ROW
   ========================================================== */

.result-row td {

    background: #ffe97a;

    font-weight: 700;

    font-size: 18px;

    border-top: 3px solid #174A7C;

}

.result-row .row-label {

    color: #174A7C;

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 1100px) {

    body {

        padding: 20px;

    }

    .calculator {

        width: 100%;

        padding: 20px;

    }

}

/* ==========================================================
   PROVIDER COLORS
   ========================================================== */

select.fidelity {

    background-color: #dff5df;
    color: #075C36;

}

select.vanguard {

    background-color: #ffdede;
    color: #B5121B;

}

select.schwab {
    background-color: #D9F0FA;
    color: #164D68;
}

.tax-rates-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0 25px;
    padding: 18px;
    background: #f7f8fa;
    border-radius: 8px;
}

.tax-rate-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tax-rate-field label {
    font-weight: 600;
    font-size: 14px;
}

.tax-input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tax-input-wrapper input {
    width: 65px;
    padding: 7px;
    text-align: center;
}

.tax-rate-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tax-rate-note {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

.tax-rate-field {
    flex: 1 1 300px;
    max-width: 480px;
    justify-content: space-between;
    gap: 16px;
}

.tax-input-wrapper {
    flex-shrink: 0;
}

/* TYPOGRAPHY - HELVETICA */

body,
button,
input,
select,
textarea {
    font-family: "Times New Roman", Times, serif;
}



/* ==========================================================
   FIRM WEBSITE COLOR SCHEME
   Royal Blue, Green, White & Light Gray
   ========================================================== */

:root {
    --firm-blue: #4059E5;
    --firm-green: #32951F;
    --firm-green-light: #EAF4E7;
    --off-white: #F7F7F7;
    --border-color: #DDDDDD;
    --text-color: #333333;
}

/* Overall page */
body {
    background-color: #FFFFFF;
    color: var(--text-color);
}

/* Keep Times New Roman */
body,
button,
input,
select,
textarea {
    font-family: "Times New Roman", Times, serif;
}

/* Calculator title */
h1 {
    color: var(--firm-blue);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 28px;
}

/* Small green accent beneath title */
h1::after {
    content: "";
    display: block;
    width: 75px;
    height: 3px;
    background-color: var(--firm-green);
    margin-top: 14px;
}

/* Tax input section */
.tax-rates-section {
    background-color: var(--off-white);
    border-radius: 5px;
    padding: 22px 28px;
    margin-bottom: 28px;
    gap: 24px;
}

.tax-rate-field label {
    color: var(--text-color);
    font-weight: 700;
    font-size: 16px;
}

.tax-rate-note {
    color: #666666;
    font-size: 13px;
    line-height: 1.4;
}

.tax-input-wrapper input {
    background-color: #FFFFFF;
    color: var(--text-color);
    border: 1px solid #BBBBBB;
    border-radius: 3px;
    padding: 8px;
    font-size: 16px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
}

th,
td {
    border: 1px solid var(--border-color);
}

/* Column headings */
thead th {
    background-color: var(--off-white);
    color: var(--text-color);
    font-weight: 700;
}

/* Row labels */
.row-label {
    color: var(--text-color);
}

/* Dropdown styling */
select {
    font-family: "Times New Roman", Times, serif;
    border-radius: 5px;
    font-size: 15px;
}

/* Final results row */
tbody tr:last-child td {
    background-color: var(--firm-green-light);
    color: var(--firm-green);
    font-weight: 700;
    border-top: 3px solid var(--firm-blue);
}

/* Fidelity - Forest Green */
select.fidelity {
    background-color: #D0E3D5;
    color: #174B32;
    border: 1px solid #729A7C;
}

/* Vanguard - Red */
select.vanguard {
    background-color: #FCE4E5;
    color: #B5121B;
    border: 1px solid #C75B63;
}

/* Schwab - Blue */
select.schwab {
    background-color: #D9F0FA;
    color: #164D68;
    border: 1px solid #5A9FC5;
}


/* ==========================================================
   FINAL DESIGN REFINEMENTS
   ========================================================== */

/* Smaller, more traditional heading */
h1 {
    font-size: 29px;
    letter-spacing: 0;
    margin-bottom: 30px;
}

/* Remove decorative underline */
h1::after {
    display: none;
}

/* More understated calculator container */
.container,
.calculator-container {
    box-shadow: none;
    border-radius: 4px;
}

/* Neutral table headers */
thead th {
    background-color: #F7F7F7;
    color: #333333;
}

/* Refined tax-rate panel */
.tax-rates-section {
    background-color: #F8F8F8;
    border-radius: 3px;
}

/* Softer final results */
tbody tr:last-child td {
    background-color: #EDF4EB;
    border-top: 2px solid #4059E5;
}

/* Deep green results */
tbody tr:last-child td:not(:first-child) {
    color: #32951F;
}

/* Firm blue calculator title */
h1 {
    color: #4059E5 !important;
}

/* Firm blue final results label */
tbody tr:last-child td:first-child {
    color: #4059E5;
}

/* Table header - firm blue */
thead th {
    background-color: #EDF1FF;
    border: 1px solid #D2DBFA;
}

/* Keep title in firm blue */
h1 {
    color: #4059E5 !important;
}

/* Green border above results row */
tbody tr:last-child td {
    border-top: 2px solid #32951F;
}

/* Charcoal results label */
tbody tr:last-child td:first-child {
    color: #333333;
}