/*
 * mortgage.css — FlipLatino
 * Extracted from mortgage.html (batch-29d-css-extraction-mortgage)
 * Source: 9 inline <style> blocks merged in document order
 *   Block 1 (unnamed):           original lines 10–1275
 *   Block 2 (unnamed):           original lines 1278–1298
 *   Block 3 (lf-unified-controls): original lines 1301–1463
 *   Block 4 (lf-golden-buttons): original lines 1466–1503
 *   Block 5 (unnamed):           original lines 1505–1579
 *   Block 6 (unnamed):           original lines 1582–1673
 *   Block 7 (unnamed):           original lines 1676–1730
 *   Block 8 (unnamed):           original lines 1732–1770
 *   Block 9 (unnamed):           original lines 1772–1793
 * Do not add shared/global rules here — page-specific styles only.
 */
        :root {
            /* colors */
            --colorHs: #F05A28;
            --colorLabels: white;
            --colorPlaceHolders: #ffffff54;
            --colorInstructions: #ccc;
            --colorStartDateBtn: #F05A28;
            /*Colors of Compute Bton after select the target */
            --colorComputeSelectBtn: #FFA500;
            /* color of target variable */
            --colorInputToCal: #FFA500;
            /* colors amortization */
            --colorAmortizationHover: #4D5C80;
            --colorAmortizationCol1: rgba(247, 249, 255, 0.947);
            --colorAmortizationCol2: white;
            /*--colorAmortizationCol2: rgb(178, 167, 218); */
            /*--colorAmortizationCol2: linear-gradient(to bottom right, #F6F8FB, #EAEEF6, #F6F8FB, #EAEEF6) no-repeat fixed;*/
            --colorYearlySummary: #fff2ce;
            --colorBackgroundTotalsEmpty: linear-gradient(to bottom right, #F6F8FB, #EAEEF6, #F6F8FB, #EAEEF6) no-repeat fixed;
            --colorBackgroundTotals: #fff2ce;

            /* Border Radius */
            --inputBorderRadius: 25px;
            /* Margins */
            --labelsMarginLeft: 50px;
            /* Widths */
            --amortizationTableWidth: 100%;

        }

        body {
            background: linear-gradient(to bottom right, #F6F8FB, #EAEEF6, #F6F8FB, #EAEEF6) no-repeat fixed;
            background-size: cover;
            /*font-family: 'Montserrat', sans-serif;
            margin: 0 auto;*/
            padding: 20px 20px 20px;
        }

        h1,
        h2,
        h3 {
            font-family: 'Montserrat', sans-serif;
            text-align: center;
            color: var(--colorHs);
            margin-top: 20px;
            margin-bottom: 20px;
            letter-spacing: 1px;
            text-align: center;
        }

        h1 {
            font-weight: 700;
            margin: 40px 0;
        }

        h2,
        h3 {
            font-weight: 500;
        }

        /* horizontal lines on the calculator */
        hr {
            width: 100%;
            height: .01px;
            background-color: #dcdc4f;
            opacity: 0.4;
        }

        vrl {
            width: 0, 01px;
            height: 95%;
            background-color: #dcdc4f;
            opacity: 0.4;
        }

        .resultSeparator hr {
            width: 95%;
            height: 0.01px;
            background-color: #dcdc4f;
            opacity: 0.4;
            margin-top: 0px;
            margin-bottom: 0px;
        }


        /* HERE BEGINS THE FIXED CODE AMONG ALL CALCULATORS */

        .navbar {
            display: flex;
            justify-content: space-around;
            align-items: center;
            background-color: rgba(11,26,61, 0.1);
            padding: 15px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .navbar a {
            color:#0B1A3D;
            text-decoration: none;
            padding: 15px 35px;
            border-radius: 5px;
            font-family: 'Montserrat', sans-serif;
            font-weight: bold;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .navbar a:hover {
            background-color: rgba(11,26,61, 0.2);
        }

        .navbar a.active {
            background-color: #ff9900;
            color: #000;
        }

        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
            }

            .navbar a {
                padding: 10px;
                width: 100%;
                text-align: center;
            }
        }

        .main-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 95vh;
        }

        .main-content {
            max-width: 1240px;
            margin: 0 auto;
            flex: 1;
            padding: 0 20px 20px;
        }

        /* ===== Ocultar COMPLETAMENTE el scrollbar (seguir desplazando) ===== */
        /* WebKit (Chrome / Edge / Safari) */
        html::-webkit-scrollbar,
        body::-webkit-scrollbar {
            width: 0;
            /* sin ancho */
            height: 0;
            /* sin alto (para ejes horizontales) */
            background: transparent;
            /* por si el motor pinta pista */
        }

        /* Firefox */
        html,
        body {
            scrollbar-width: none;
            /* oculta el scrollbar */
            scrollbar-color: transparent transparent;
            /* redundante: “por si acaso” */
        }

        /* Windows/IE legado (EdgeHTML) – no estorba en navegadores modernos */
        html,
        body {
            -ms-overflow-style: none;
            /* esconder barras en motores MS antiguos */
        }

        form {
            max-width: 1240px;
            margin: 20px auto;
            /* box-shadow: 0 5px 10px rgba(0, 0, 0, 1); */
            /* padding: 0px;*/
            /* border-radius: 15px;*/
        }

        .footer {
            background-color: rgba(11,26,61, 0.1);
            color: white;
            text-align: center;
            padding: 5px;
            margin-top: 20px;
            border-top: 1px solid rgba(11,26,61, 0.2);
            box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
        }

        .footer .disclaimer {
            width: 70%;
            font-size: 14px;
            line-height: 1.6;
            margin: 10px auto;
            letter-spacing: 0.5px;
        }

        .disclaimer-label {
            color: #F05A28;
            font-size: 20px;
            line-height: 1.6;
            margin: 5px;
            font-weight: bold;
        }


        /* HERE ENDS THE FIXED CODE AMONG ALL CALCULATORS */

        /* Two columns: 70% form / 30% results */
        /* Layout: form on top, results under it (full width of main-content) */
        .calculator-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
            position: relative;
            padding-bottom: 50px;
            box-sizing: border-box;
        }




        .calculator-left {
            grid-area: left;
        }


        .calculator-right {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            margin-top: 25px;

            /* ⬇️ Keep results visible as you scroll the amortization table */
            position: relative;
            top: 12px;
            /* adjust cushion from top as you like */
            z-index: 5;
            /* above the amortization header (z-index:1) */
        }

        .calculator-right .results-panel {
            flex: 1 1 0;
            box-sizing: border-box;
        }








        /* optional: scroll inside the tall side */
        .calculator-left {
            overflow: hidden;
        }


        /* Make results panels use the column width cleanly */
        .calculator-right .results-panel {
            width: 90%;
            margin: 10px 10px 10px 10px;
        }

        /* MOBILE: stack vertically – put results above or below as you like */
        @media (max-width: 980px) {
            .calculator-container {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "left"
                    "right";
                row-gap: 24px;
                min-height: auto;
            }
        }


        .calculator-left {
            flex: 1;
            box-shadow: 0 5px 10px rgba(0, 0, 0, 1);
            border-radius: 15px;
            flex: 100%;
            width: 100%;
        }

        .section {
            background-color: transparent;
        }

        /* === Two-column calculator grid === */
        .inputs-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px 50px;
            align-items: start;
        }

        .inputs-grid .full-span {
            grid-column: 1 / -1;
        }

        /* tighten label/input spacing inside grid items */
        .inputs-grid .label-button,
        .inputs-grid .label-button-2 {
            margin-left: 0;
            width: 100%;
        }

        .inputs-grid .lf-control {
            margin-left: 0;
            width: 100%;
        }

        .inputs-grid .select-wrap {
            width: auto;
        }

        /* keep the tiny unit selects beside their inputs */
        .inline-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .inline-row .lf-control {
            flex: 1 1 auto;
        }

        .inline-row .option-selector.lf-control {
            width: 100px;
            min-width: 72px;
        }


        .section h2,
        h3 {
            margin-top: 1px;
            margin-left: 20px;
            margin-bottom: 10px;
            color: #F05A28;
            /*border-top: 1px solid white;*/
            width: 100%;
            text-align: left;
            font-family: 'Montserrat', sans-serif;
            font-size: 14px;
        }

        .section-title h2 {
            margin-top: 1px;
            margin-bottom: 50px;
            font-size: 14px;
            font-family: Georgia, 'Times New Roman', Times, serif;
        }

        .results-panel {
            box-shadow: 0 0 8px 2px #F05A28;
            background-color: #FFFFFF;
            /*background: white;*/
            color: white;
            /*color:#0B1A3D;*/
            margin: 0 0px 0px 0px;
            padding: 10px;
            border: 2px solid #F05A28;
            width: 100%;
            max-width: 900px;
            border-radius: 15px;
            text-align: center;
            font-family: 'Inter', system-ui, sans-serif !important;

        }


        .results-panel h3 {
            font-family: 'Montserrat', sans-serif;
            /*color:#0B1A3D;*/
            text-align: center;
            margin-top: 0px;
            margin-bottom: 4px;
            font-size: 16px;
        }

        .results-panel hr {
            width: 100%;
            height: .01px;
            background-color: #dcdc4f;
            opacity: 0.4;
            margin-top: 0px;
            margin-bottom: 0px;
            font-family: 'Inter', system-ui, sans-serif !important;
        }



        .section p {
            margin-left: 20px;
            font-weight: bold;
            color: var(--colorInstructions);
        }

        /* inputs in tables */
        .section label {
            display: inline-block;
            position: relative;
            margin-left: 20px;
            width: 100%;
            text-align: left;
            /*margin-bottom: 5px;*/
            /*font-size: 1em;
            color:#F05A28;*/
            color: white;
            flex: left;
            /*margin: 5px;*/
            font-size: 14px;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            font-weight: bold;

        }

        .section input {
            width: 100%;
            background-color: transparent;
            color: white;
            padding: 10px 0px;
            margin-left: 0px;
            border: 1px solid #ccc;
            border-radius: var(--inputBorderRadius);
            flex: left;
            /*margin: 0px;
            margin-right: 0px;*/
            margin-top: 5px;
            font-size: 16px;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            font-weight: bold;
        }

        .section input::placeholder {
            color: var(--colorPlaceHolders);
            padding-left: 5px;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            font-weight: normal;
        }

        .section input:focus {
            outline: none;
            border-color: #F05A28;
            /*border-color: #4CAF50;*/
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.828);
        }


        .section button {
            width: 100%;
            background-color: #F05A28;
            color:#0B1A3D;
            border: none;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-size: 14px;
            padding: 10px;
            border-radius: 25px;
        }

        .section button:hover {
            background-color: #C2451C;
        }

        .section button:focus {
            outline: none;
            background-color: #C2451C;
        }

        .section input[type="button"]:hover {
            background-color: #C2451C;
        }

        /* Calculator (Inputs + Buttons) Table */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 0px;
        }

        tbody {
            margin-top: 0px;
        }

        th,
        td {
            border: 0;
            text-align: center;
        }

        .input-selector {
            display: flex;
            align-items: left;
            justify-content: space-evenly;
            flex-wrap: wrap;
            flex-flow: row wrap;
            /*align-items: center;*/
        }

        .input-selector label {
            display: inline-block;
            position: relative;
            margin-bottom: 5px;
            font-weight: 600;
            font-size: 1em;
            color: var(--colorLabels);
            flex: left;
            margin-top: 10px;
            width: 100%;
            text-align: left;
            margin-left: 15px;
        }

        .input-selector input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: var(--inputBorderRadius);
            font-size: 16px;
            flex: left;
            margin: 0px;
            margin-right: 0px;
        }

        /* transparent focus, no square */
        select:focus {
            outline: none;
            border-color: transparent !important;
            box-shadow: none;
            background-color: transparent;
        }


        th {
            background-color: transparent;
        }

        /* 2C-G: replaced display:block table override with horizontal scroll.
           Rationale: amortization rows are generated by JS with no data-label attrs,
           so td::before { content: attr(data-label) } showed nothing — labels were blank.
           Scroll preserves column background coloring, sticky header, and border-radius.
           The inputs-grid 2-col → 1-col collapse is added at the same breakpoint. */
        @media (max-width: 600px) {

            /* Inputs grid: stack to single column on small phones */
            .inputs-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
        }

        /* Amortization Table */

        /* Amortization Table Totals */
        #tableTotals {
            border-collapse: collapse;
            width: var(--amortizationTableWidth);
            /*gap: 20px;*/
            margin-left: 0%;
            align-items: center;
            background-color: var(--colorAmortizationBackground);
            box-shadow: 0px 0px 30px rgb(0, 0, 0);
            /* Soft shadow */
            border: 5px solid #F05A28;
            border-radius: 25px;
        }

        #totalsTitle {
            font-family: 'Montserrat', sans-serif;
            color:#0B1A3D;
            text-align: center;
            font-size: 2em;
        }

        #tableTotals tr {
            border-bottom: 3px solid #ddd;
        }

        #tableTotals th {
            background-color: #fff2ce;
            padding: 7px;
            text-align: center;
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #tableTotals td {
            padding: 7px;
            text-align: center;
            color: #4D5C80;
            font-family: 'Inter', sans-serif;
            background-color: white;
            font-weight: bold;
        }

        /* Amortization Table */
        #amortizationTable {
            border-collapse: collapse;
            width: var(--amortizationTableWidth);
            /*gap: 20px;*/
            margin-left: 0%;
            align-items: center;
            background-color: var(--colorAmortizationBackground);
            box-shadow: 0px 0px 30px rgb(0, 0, 0);
            /* Soft shadow */
            border: 5px solid #F05A28;
            border-radius: 25px;
        }

        #amortizationTable tr {
            border-bottom: 3px solid #ddd;
        }

        #amortizationTable tr:hover {
            background-color: var(--colorAmortizationHover);
        }

        #amortizationTable caption {
            text-align: center;
            /*background-color: white;*/
        }

        .amortizationTitle {
            font-family: 'Montserrat', sans-serif;
            color:#0B1A3D;
            text-align: center;
            font-size: 23px;
            text-shadow: 0px 7px 5px rgb(0, 0, 0), 0 0 20px rgb(255, 255, 255), 0px 0px 5px rgb(0, 0, 0);
        }

        /* Fix header */
        #amortizationTable thead[id='amortizationHeader'] {
            position: sticky;
            top: 0;
            z-index: 1;
            background-color: #fff2ce;
        }

        #amortizationTable th {
            background-color: #fff2ce;
            background: #fff2ce;
            padding: 7px;
            text-align: center;
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
            /* fix header: */
            position: sticky;
            top: 0;
            z-index: 1;
        }

        #amortizationTable td {
            padding: 7px;
            text-align: center;
            color: #4D5C80;
            font-family: 'Inter', sans-serif;
            /*background-color: white;*/
        }

        /* columns background */
        #amortizationTable td[class='columnMonthNumber'] {
            background-color: var(--colorAmortizationCol2);
        }

        #amortizationTable td[class='columnMonthName'] {
            /*background-color: rgb(177, 135, 216);*/
            background-color: var(--colorAmortizationCol2);
            text-align: left;
        }

        #amortizationTable td[class='columnMonthlyPayment'] {
            /*background-color: rgb(162, 230, 235);*/
            background-color: var(--colorAmortizationCol1);
        }

        #amortizationTable td[class='columnInterest'] {
            background-color: var(--colorAmortizationCol2);
        }

        #amortizationTable td[class='columnPrincipal'] {
            background-color: var(--colorAmortizationCol1);
        }

        #amortizationTable td[class='columnEndingBalance'] {
            /*background-color: pink;*/
            background-color: var(--colorAmortizationCol2);
        }

        /* yearly summary */
        #amortizationTable td[class="tdYearlyTotals"] {
            padding: 7px;
            text-align: center;
            background-color: var(--colorYearlySummary);
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #amortizationTable td[class="tdYearlyTotalAmount"] {
            padding: 7px;
            text-align: center;
            background-color: var(--colorYearlySummary);
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #amortizationTable td[class="tdYearlyInterest"] {
            padding: 7px;
            text-align: center;
            background-color: var(--colorYearlySummary);
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #amortizationTable td[class="tdYearlyPrincipal"] {
            padding: 7px;
            text-align: center;
            background-color: var(--colorYearlySummary);
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #amortizationTable td[class="tdYearlyEmpty"] {
            background-color: var(--colorYearlySummary);
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
            text-align: center;

        }

        /* Totals */
        #amortizationTable td[class="tdTotals"] {
            background-color: var(--colorBackgroundTotals);
            text-align: center;
            font-size: 2em;
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;
        }

        #amortizationTable td[class="tdTotalsInterest"] {
            background-color: var(--colorBackgroundTotals);
            text-align: center;
            font-size: 2em;
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;

        }

        #amortizationTable td[class="tdTotalsPrincipal"] {
            background-color: var(--colorBackgroundTotals);
            text-align: center;
            font-size: 2em;
            color: #4D5C80;
            font-family: 'Montserrat', sans-serif;

        }

        /* Round corners*/
        #amortizationTable th[id="supLeftCorner"] {
            border-top-left-radius: 0px;
        }

        #amortizationTable th[id="supRightCorner"] {
            border-top-right-radius: 0px;
        }

        #btn-top {
            position: fixed;
            top: 0;
            /*bottom: 20px;*/
            right: 0;
            background-color: rgba(224, 137, 36, 0.8);
            color:#0B1A3D;
            border: none;
            padding: 15px;
            cursor: pointer;
            display: none;
            border-radius: 25px;
            margin-top: 20px;
        }

        #btn-top:hover {
            background-color: rgba(224, 137, 36, 1);
        }

        #btn-end {
            position: fixed;
            top: 100px;
            /*bottom: 20px;*/
            right: 0;
            background-color: rgba(224, 137, 36, 0.8);
            color:#0B1A3D;
            border: none;
            padding: 15px;
            cursor: pointer;
            display: none;
            border-radius: 25px;
            margin-top: 20px;
        }

        #btn-end:hover {
            background-color: rgba(224, 137, 36, 1);
        }

        /* Error message when Compute can not be executed */
        .error {
            color: rgb(255, 255, 255);
            font-size: 0.9em;
        }

        /* Style for the paragraphs that show the results in the panels */
        .resultParagraph {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            font-family: 'Inter', system-ui, sans-serif !important;
            font-weight: bold;
            margin-top: 5px;
            margin-bottom: 5px;
        }

        .numericResult {
            font-family: 'Inter', system-ui, sans-serif !important;
            font-weight: bold;
            /*color: #F05A28;*/
            font-size: 15px;
        }

        /* Style Annual Interest */
        .input-wrapper {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        .input-wrapper input {
            padding-right: 1em;
            box-sizing: border-box;
            width: 100%;
        }

        .input-wrapper::after {
            content: "";
            position: absolute;
            right: 13px;
            top: 55%;
            transform: translateY(-50%);
            color: rgba(11,26,61, 0.726);
            pointer-events: none;
        }

        /* Style for the labels that are not buttons */
        .label-button-2 {
            /*display: none;*/
            /*padding: 10px 20px;
            padding: 3px 10px;*/
            font-size: 11px;
            background-color: transparent;
            color: white;
            /*font-weight: bold;*/
            /*border: 2px solid rgba(11,26,61, 0.203);*/
            border-radius: 25px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            width: 100%;
            margin-left: 0px;
            font-family: 'Inter', system-ui, sans-serif !important;
        }

        #labelPurchasePrice {
            display: inline-block;
            width: 62%;
            text-align: center;
            /*font-size: medium;*/
            transition: border-color 0.3s;

        }

        #labelDownPayment {
            display: inline-block;
            width: 50%;
            text-align: center;
            /*font-size: medium;*/
            transition: border-color 0.3s;
        }

        #labelPropertyTax {
            display: inline-block;
            width: 65%;
            text-align: center;
            /*font-size: medium;*/
            transition: border-color 0.3s;
        }

        #labelHomeInsurance {
            display: inline-block;
            width: 75%;
            text-align: center;
            /*font-size: medium;*/
            transition: border-color 0.3s;
        }

        #labelStartDate {
            display: inline-block;
            width: 50%;
            text-align: center;
            /*font-size: medium;*/
            transition: border-color 0.3s;
        }

        /* Style for the labels that are buttons */


        .label-button {
            padding: 5px 5px;
            border-radius: 25px;
            border: 2px solid #F8946A;
            color:#0B1A3D;
            background: linear-gradient(180deg, #F05A28, #C2451C);
            font-family: 'Montserrat', sans-serif;
            font-size: 8px;
            font-weight: 400;
            box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(11,26,61, .18);
            cursor: pointer;
            transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
        }

        .label-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(11,26,61, .22);
            filter: brightness(1.05);
        }

        .label-button:active {
            transform: translateY(0);
        }

        #labelButtonLoanAmount {
            border: 1px solid white;
            width: 41%;
            font-size: 11px;
            padding-bottom: 6px;
            padding-top: 6px;

        }

        #labelButtonInterestRate {
            border: 1px solid white;
            width: 41%;
            font-size: 11px;
            padding-bottom: 6px;
            padding-top: 6px;
        }

        #labelButtonLoanTerm {
            border: 1px solid white;
            width: 41%;
            font-size: 11px;
            padding-bottom: 6px;
            padding-top: 6px;
        }

        #labelButtonMonthlyPayment {
            border: 1px solid white;
            width: 41%;
            font-size: 11px;
            padding-bottom: 6px;
            padding-top: 6px;
        }

        /* glow effect on calculate buttons */
        .glow-border {
            animation: glow 1.5s infinite !important;
            border-color: #00f !important;
        }

        @keyframes glow {
            0% {
                box-shadow: 0 0 0px rgba(0, 128, 255, 0.4);
                border-color: #ccc;
            }

            50% {
                box-shadow: 0 0 10px rgba(0, 128, 255, 0.8);
                border-color: #00f;
            }

            100% {
                box-shadow: 0 0 0px rgba(0, 128, 255, 0.4);
                border-color: #ccc;
            }
        }

        .glow-blue {
            animation: full-glow 1.5s infinite;
        }

        @keyframes full-glow {

            0%,
            100% {
                box-shadow: 0 0 0 rgba(0, 128, 255, 0.3);
            }

            50% {
                box-shadow: 0 0 20px 8px rgba(0, 128, 255, 0.6);
            }
        }

        /*
        .glow-white {
            animation: golden-glow 1.5s infinite;
            background-color: rgba(255, 215, 0, 0.05);
        }

        @keyframes golden-glow {
            0%, 100% {
                box-shadow: 0 0 0px rgba(255, 215, 0, 0.3);
            }
            50% {
                box-shadow: 0 0 15px 5px rgba(235, 233, 226, 0.8);
            }
        }
            */
        .lf-left-tab.glow-white {
            animation: golden-glow 1.5s ease-in-out infinite;
            will-change: box-shadow;
        }

        .fuse-wrap.glow-white {
            animation: golden-glow 1.5s ease-in-out infinite;
            will-change: box-shadow;
        }

        /* Keep the base shadows in all keyframe steps, and just animate an extra layer */
        @keyframes golden-glow {

            0%,
            100% {
                box-shadow:
                    /* keep your original two layers */
                    inset 0 0 0 2px rgba(11,26,61, .18),
                    0 8px 18px rgba(0, 0, 0, .35),
                    /* animated layer (off) */
                    0 0 0 0 rgba(235, 233, 226, 0);
            }

            50% {
                box-shadow:
                    inset 0 0 0 2px rgba(11,26,61, .35),
                    /* slightly brighter inset ring */
                    0 8px 18px rgba(0, 0, 0, .35),
                    0 0 15px 5px rgba(235, 233, 226, 0.8);
                /* the glow */
            }
        }

        /* shake effect */

        .shake-horizontal {
            animation: shake 1s ease-in-out infinite;
            animation-duration: infinite;
        }

        @keyframes shake {
            0% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-6px);
            }

            50% {
                transform: translateX(6px);
            }

            75% {
                transform: translateX(-4px);
            }

            100% {
                transform: translateX(0);
            }
        }

        .shake-jitter {
            animation: rotate-jitter 0.4s infinite;
        }

        @keyframes rotate-jitter {
            0% {
                transform: rotate(0deg);
            }

            25% {
                transform: rotate(-5deg);
            }

            50% {
                transform: rotate(5deg);
            }

            75% {
                transform: rotate(-3deg);
            }

            100% {
                transform: rotate(0deg);
            }
        }

        .shake-vertical {
            animation: vertical-jitter 0.4s infinite;
        }

        @keyframes vertical-jitter {
            0% {
                transform: translateY(0);
            }

            25% {
                transform: translateY(-4px);
            }

            50% {
                transform: translateY(4px);
            }

            75% {
                transform: translateY(-2px);
            }

            100% {
                transform: translateY(0);
            }
        }


        /* STYLE FOR THE SELECT BUTTONS */

        .option-selector {
            font-size: 12px;
            padding: 10px 0;
            padding-left: 7px;
            text-align: left;
            width: 18%;
            border-radius: 25px;
            color: #fda829d6;
            background-color: transparent;
            border: 1px solid #ccc;
            transition: background-color 0.2s, color 0.2s;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%201L5%205L9%201'%20stroke%3D'%23fda829'%20stroke-width%3D'1.5'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 5px center;
            background-size: 11px;
        }

        .option-selector:hover {
            background-color: #DCE3EF;
            color: white;
        }


        /* STYLE FOR DATE PICKER*/

        .custom-date-wrapper {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        /* Visible field (mm/dd/yyyy) */
        .custom-date-wrapper input[type="date"],
        .custom-date-wrapper input[type="text"] {
            font-size: 12px;
            padding-left: 7px;
            border: 1px solid #ccc;
            border-radius: 25px;
            background-color: transparent;
            color:#0B1A3Daf;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            cursor: pointer;
        }

        /* Hide the native picker indicator (we use a custom icon) */
        .custom-date-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
            opacity: 0;
        }

        /* Hidden native date input used only to open the OS date picker + hold ISO value */
        .custom-date-wrapper .lf-date-native {
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
        }

        /* Custom calendar icon */
        .custom-date-wrapper .date-icon {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-10%);
            width: 22px;
            height: 22px;
            cursor: pointer;
            opacity: .85;
            background-repeat: no-repeat;
            background-position: center;
            background-size: 22px 22px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
        }

        .custom-date-wrapper .date-icon:hover {
            opacity: 1;
        }

        .custom-date-wrapper .date-icon:focus {
            outline: 2px solid #F8946A;
            outline-offset: 2px;
            border-radius: 6px;
        }

        /* Text input should feel editable */
        .custom-date-wrapper input[type="text"] {
            cursor: text;
        }


        /* Give the input some room on the right for the icon */
        .custom-date-wrapper .lf-control,
        .custom-date-wrapper input[type="date"] {
            padding-right: 42px !important;
        }

/* === unnamed block 2 === */
        /* Hard override: keep labels flush-left inside the grid */

        .inputs-grid .label-button-2 {
            margin-left: 0 !important;
            padding-left: 0 !important;
            text-align: left !important;
        }

        /* Also neutralize the generic `.section label { margin-left:20px; }` for our headers */
        .section label.label-button-2 {
            margin-left: 0 !important;
        }

        /* Keep inputs aligned with labels */
        .inputs-grid .lf-control {
            margin-left: 0 !important;
            width: 100%;
            /* full cell width looks best with the new labels */
        }

/* === lf-unified-controls === */
        :root {
        }

        .lf-control-wrap {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        /* apply to inputs / textareas / selects */
        .lf-control {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            width: 100%;
            padding-left: 16px !important;
            /* adjust as desired (12–20px looks good) */

            border-radius: var(--ctrl-radius);
            border: 1px solid rgba(240,90,40, 0.65) !important;
            /* ← golden border */
            background:
                linear-gradient(180deg, var(--ctrl-bg1), var(--ctrl-bg2)),
                var(--ctrl-tint);
            color: var(--ctrl-fg);
            font-size: 16px;
            font-family: 'Inter', system-ui, sans-serif !important;
            outline: none;
            transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
            backdrop-filter: blur(3px);
            margin-bottom: 5px;
        }


        .lf-control:hover {
            background:
                linear-gradient(180deg, rgba(11,26,61, 0.10), rgba(11,26,61, 0.03)),
                rgba(11,26,61, 0.42);
            border-color: var(--ctrl-border-hover);
        }

        .lf-control:focus {
            border-color: #F05A28;
            box-shadow: inset 0 1px 0 rgba(11,26,61, 0.16), 0 0 0 3px var(--ctrl-ring) !important;
        }

        .lf-control:disabled {
            opacity: var(--ctrl-disabled);
            cursor: not-allowed;
        }

        textarea.lf-control {
            border-radius: 14px;
            min-height: 110px;
            resize: vertical;
        }

        .lf-control::placeholder {
            color:#0B1A3D;
        }

        /* Select chevron + wrapper */
        .select-wrap {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        .select-wrap select.lf-control {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="%23FDA929"><path d="M7 10l5 5 5-5z"/></svg>');
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 18px 18px;
            cursor: pointer;

            padding: 1px 10px;
            /* ← vertical and horizontal padding */
            height: 32px;
            /* ← sets overall dropdown height */
            font-size: 15px;
            /* ← text size */
            width: 100%;
            /* ← or set a specific width, like 150px */
            background-position: right 16px center;
            /* move the chevron */
            background-size: 14px;
            /* shrink or enlarge the arrow icon */

        }

        /* Keep white text in CLOSED select after choice */
        .select-wrap select,
        select {
            color:#0B1A3D !important;
            -webkit-text-fill-color:#0B1A3D !important;
        }

        /* Dropdown menu readability + blue glass menu (used in Rehab) */
        select option,
        select optgroup,
        .select-wrap select option,
        .select-wrap select optgroup {
            color:#0B1A3D !important;
            background-color: rgba(11,26,61, 0.90) !important;
        }

        select option:hover,
        select option:focus,
        select option:checked {
            color:#0B1A3D !important;
            background-color: rgba(11,26,61, 0.96) !important;
        }

        select::-webkit-scrollbar {
            width: 12px;
        }

        select::-webkit-scrollbar-track {
            background: rgba(11,26,61, 0.70);
        }

        select::-webkit-scrollbar-thumb {
            background: rgba(11,26,61, 0.96);
            border-radius: 8px;
            border: 2px solid rgba(11,26,61, 0.70);
        }

        /* Autofill repaint neutralizer (so cookies/suggestions don’t turn fields white/yellow) */
        .lf-control,
        .select-wrap select.lf-control {
            background:
                linear-gradient(180deg, rgba(11,26,61, 0.06), rgba(11,26,61, 0.02)),
                rgba(11,26,61, 0.35) !important;
        }

        .lf-control:-webkit-autofill,
        .lf-control:-webkit-autofill:hover,
        .lf-control:-webkit-autofill:focus,
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        select:-webkit-autofill {
            -webkit-text-fill-color:#0B1A3D !important;
            caret-color:#0B1A3D !important;
            background-color: transparent !important;
            background-image: none !important;
            box-shadow: inset 0 1px 0 rgba(11,26,61, 0.12), 0 0 0 1000px rgba(11,26,61, 0.35) inset !important;
            -webkit-box-shadow: inset 0 1px 0 rgba(11,26,61, 0.12), 0 0 0 1000px rgba(11,26,61, 0.35) inset !important;
            transition: background-color 99999s linear 0s, color 0s !important;
        }

/* === lf-golden-buttons === */
        /* Sticky "Print Report" button */
        .lf-sticky-btn {
            padding: 12px 18px;
            border-radius: 25px;
            border: 2px solid #F8946A;
            color:#0B1A3D;
            background: linear-gradient(180deg, #F05A28, #C2451C);
            font-family: 'Montserrat', sans-serif;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(11,26,61, .18);
            cursor: pointer;
            transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
        }

        .lf-sticky-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(11,26,61, .22);
            filter: brightness(1.05);
        }

        .lf-sticky-btn:active {
            transform: translateY(0);
        }

        /* Mini chart styling for the PDF (used when we build the offscreen report HTML) */
        .lf-chart-bar {
            height: 12px;
            border-radius: 8px;
            background: linear-gradient(90deg, #F05A28, #e3d28e);
            box-shadow: 0 2px 8px rgba(0, 0, 0, .25) inset;
        }

        .lf-chart-bar--secondary {
            background: linear-gradient(90deg, #DCE3EF, #67889a);
        }

/* === unnamed block 5 === */
        /* === Selector INSIDE the existing input (no second box) === */
        .fuse-wrap {
            /* wrapper just for positioning */
            position: relative;
            width: 100%;
        }

        /* make room on the right INSIDE the input for the selector */
        .fuse-wrap .lf-control {
            padding-right: 0px;
            /* room for the unit selector */
        }

        /* gold divider at ~90% (unit area is 72px wide) */
        .fuse-wrap::after {
            content: "  ";
            position: absolute;
            right: 45px;
            /* matches the width of the symbol area */
            top: calc(50% - 19px);
            /* centers vertically inside the pill */
            height: 39px;
            /* shorter fixed height so it never bleeds out */
            width: 1px;
            background: rgba(240,90,40, 0.65);
            border-radius: 1px;
            pointer-events: none;
        }


        /* the selector sits on top of the input, INSIDE it */
        .unit-inside {
            position: absolute;
            right: 10px;
            padding-left: 30px;
            padding-right: 0px;
            margin-right: 0px;
            top: 5px;
            bottom: 5px;
            width: 60px;
            /* change to widen/narrow the unit area */
            display: flex;
            align-items: right;
            justify-content: right;
            font-weight: 700;
            font-size: 15px;
            /* big symbol like your sketch */
            color: transparent;
            background: transparent;
            border: 0;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            text-align-last: center;
            cursor: pointer;
        }

        /* hide native arrow on some browsers (keeps select accessible) */
        .unit-inside::-ms-expand {
            display: none;
        }


        /* remove up/down arrows for number fields */
        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        input[type=number] {
            --moz-appearance: textfield;
        }

/* === unnamed block 6 === */
        /* === Inline left buttons inside inputs ================================ */
        .lf-with-left-btn {
            position: relative;
            width: 100%;
            overflow: visible;
        }

        /* give space for the left triangle tab, but do NOT change height/size */
        .lf-with-left-btn .lf-control {
            box-sizing: border-box;
            /* padding doesn’t change the visual width */
            padding-left: 50px !important;
            /* room for the tab (adjust 48–56px if needed) */
            padding-right: 10px;
            padding-top: var(--ctrl-pad-y);
            padding-bottom: var(--ctrl-pad-y);
        }

        /* compact yellow tab INSIDE the input (immune to global button styles) */
        .lf-left-tab {
            all: unset;
            height: 42px;
            box-sizing: border-box;
            position: absolute;
            left: 0;
            top: 6px;
            bottom: 0;
            width: 43px !important;
            overflow: visible;
            flex-shrink: 0;
            /* never stretch */
            z-index: 2;
            /* sit on top of input background */
            border: 1px solid rgba(240,90,40, .65);
            background: linear-gradient(180deg, #F05A28, #C2451C);
            border-top-left-radius: 90px;
            border-bottom-left-radius: 9px;
            border-top-right-radius: 1px;
            border-bottom-right-radius: 1px;
            box-shadow: inset 0 0 0 2px rgba(11,26,61, .18), 0 8px 18px rgba(0, 0, 0, .35);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
        }

        .lf-left-tab:hover {
            transform: translateY(-1px);
            filter: brightness(1.05);
        }

        .lf-left-tab:active {
            transform: none;
        }

        .lf-left-tab::before {
            content: "";
            width: 0;
            height: 0;
            border-left: 14px solid #fff;
            /* white triangle */
            border-top: 10px solid transparent;
            border-bottom: 10px solid transparent;
            transform: translateX(2px);
        }



        /* keep your old orange header-pills but hide them (we’ll click them via JS) */
        .label-button {
            display: inline-block !important;
            margin-bottom: 6px;
            padding: 5px 10px;
            border-radius: 20px;
            border: 1px solid #F8946A;
            color: white;
            background: linear-gradient(180deg, #F05A28, #C2451C);
            font-family: 'Montserrat', sans-serif;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            text-align: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(11,26,61, .18);
        }


        /* uniform sizing everywhere */
        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

/* === unnamed block 7 === */
        /* === Floating action stack (top-right) =============================== */
        /* === Bottom action row (under calculator) ============================ */
        /* === Floating action stack (top-right) =============================== */
        /* === Bottom action row (under left calculator column) ================ */
        /* === Bottom action row (locked under left column) ==================== */
        .side-actions {
            /* take it out of normal flow so right column changes won't push it */
            position: absolute;
            left: 0;
            bottom: 16px;
            /* sits just under the left card's shadow */
            /* width of the left column (2fr of 2fr+1fr) minus the 24px column gap */
            width: calc((100% - 24px) * 2 / 3);

            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
            gap: 5px;
        }

        .side-actions .lf-sticky-btn {
            width: auto;
        }

        .side-actions .custom-date-wrapper {
            width: auto;
        }

        .side-actions .custom-date-wrapper input[type="text"] {
            width: auto;
            min-width: 180px;
        }

        /* Mobile: revert to normal flow and full width */
        @media (max-width: 980px) {
            .calculator-container {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "left"
                    "right";
                padding-bottom: 0;
                /* no absolute controls on mobile */
            }

            .side-actions {
                justify-content: center;
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
                margin-top: 1px;
            }
        }

/* === unnamed block 8 === */
        /* Start Date polish in the side-actions stack */
        .side-actions .custom-date-wrapper {
            position: relative;
            width: 100%;
        }

        .side-actions .custom-date-wrapper .lf-control {
            width: 100%;
            padding: 10px 5px;
            padding-right: 42px !important;
            /* space for the calendar icon */
            box-sizing: border-box;
            /* padding won’t change size */
        }

        /* Keep the native calendar icon inside the pill and aligned */
        .side-actions input[type="date"]::-webkit-calendar-picker-indicator {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            opacity: .9;
            filter: invert(1) brightness(1.2);
            cursor: pointer;
            margin: 0;
        }

        /* Remove any square/yellow focus border on select/date */
        .side-actions input[type="date"]:focus {
            border-color: transparent !important;
            box-shadow: inset 0 1px 0 rgba(11,26,61, .16), 0 0 0 3px var(--ctrl-ring) !important;
            outline: none;
        }

        .side-actions .lf-sticky-btn {
            width: 100%;
        }

/* === unnamed block 9 === */
        /* Sticky Download button (bottom-right) */
        .download-fab {
            position: fixed;
            right: 24px;
            bottom: 24px;
            z-index: 1000;
        }

        @media (max-width: 980px) {
            .download-fab {
                right: 12px;
                bottom: 12px;
            }
        }


        #amortizationTableContainer {
            scroll-margin-top: 160px;
            /* adjust to match sticky results height */
        }

        /* ============================================================
           2C-G — Responsive: tablet & mobile
           All rules below are additive max-width overrides.
           Desktop rules above this block are untouched.
           ============================================================ */

        /* --- 768px: amortization table horizontal scroll --- */
        @media (max-width: 768px) {

            /* Wrap the amortization table container in a horizontal scroll.
               The table has JS-generated inline widths (5%, 4%, 11%, 20%×4).
               display:block was removed (see 600px fix above) because it produced
               unlabelled cells. Scroll keeps the table intact and readable. */
            #amortizationTableContainer {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: 16px;
            }

            /* Ensure both amortization tables have a readable minimum width */
            #amortizationTable,
            #tableTotals {
                min-width: 480px;
            }

            /* Reduce amortization cell padding on phone to compact the scroll width */
            #amortizationTable th,
            #amortizationTable td,
            #tableTotals th,
            #tableTotals td {
                padding: 5px 4px;
                font-size: .75rem;
            }

            /* Results panels: tighter padding on phone */
            .results-panel {
                padding: 10px 12px;
            }
        }

        /* --- 480px: section padding + title scale --- */
        @media (max-width: 480px) {

            /* Body/main padding on small phones */
            body {
                padding: 10px;
            }

            /* Section heading scale */
            .section h2,
            h3 {
                font-size: 1rem;
            }

            /* Amortization title scale */
            .amortizationTitle {
                font-size: 18px;
            }
        }

/* ===== GLOBAL-LAYOUT-03: ARV-style outer container ===== */
.main-wrapper {
    padding: 20px 20px 40px;
    box-sizing: border-box;
}

.main-content {
    background: rgba(11,26,61,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(11,26,61,0.18);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    overflow: visible;
    padding: 0 0 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.main-content > h1 {
    margin: 0;
    padding: 9px 0 7px;
    text-align: center;
    border-bottom: 1px solid rgba(11,26,61,0.12);
}

/* ===== GLOBAL-LAYOUT-04: remove inner card nesting ===== */
/* Strip .calculator-left wrapper card styling */
.calculator-left {
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* ===== LAYOUT-WIDTH-01: full-width container ===== */
.main-wrapper {
    padding: 20px 20px 40px;
    box-sizing: border-box;
}

.main-content {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 0 16px;
    box-sizing: border-box;
}

.calculator-container {
    max-width: none;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    align-items: stretch;
}

.calc-wrap {
    width: 100%;
    max-width: none;
}

/* ===== LAYOUT-WIDTH-02: half-width centered container ===== */
.main-wrapper {
    padding: 0;
    box-sizing: border-box;
}

.main-content {
    max-width: 840px !important;
    width: calc(100% - 40px);
    margin: 20px auto 40px;
    padding: 0 0 16px;
    box-sizing: border-box;
}

.calculator-container {
    max-width: none !important;
    width: 100%;
    align-items: stretch;
}

.calc-wrap {
    width: 100%;
    max-width: none !important;
}

/* ===== LAYOUT-FIX-03: remove fixed height, container hugs content ===== */
.main-wrapper {
    min-height: auto !important;
    height: auto !important;
}

.main-content {
    min-height: auto !important;
    height: auto !important;
    flex: none !important;
}

/* ===== LAYOUT-FIX-04: reduce gap between container and result cards ===== */
.main-content {
    margin-bottom: 4px !important;
}

/* ===== GLOBAL-LAYOUT-05: solid bg, consistent spacing, normalized h1 ===== */
.main-wrapper {
    padding-top: 20px;
}

.main-content {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
}

.main-content > h1 {
    font-size: inherit;
    padding: 9px 0 7px !important;
    border-bottom: 1px solid rgba(11,26,61,0.12) !important;
}

/* ===== GLOBAL-LAYOUT-06: uniform topbar spacing, uniform h1 size ===== */
body {
    padding-top: 20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.main-wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

.main-content {
    margin-top: 0 !important;
}

.main-content > h1 {
    font-size: 2rem !important;
    padding: 9px 0 7px !important;
    border-bottom: 1px solid rgba(11,26,61,0.12) !important;
}

/* ===== MORTGAGE-LAYOUT-03: revert + 3-col fields + result cards below ===== */

body {
    padding: 20px;
    box-sizing: border-box;
    overflow-x: auto;
}

/* Hide old layout wrappers */
.main-wrapper,
.main-content,
.calc-wrap,
.calculator-container,
.calculator-left,
.calculator-right,
#results {
    display: none !important;
}

/* Outer container — Fix & Flip #FFFFFF style */
.mm-outer {
    background: #FFFFFF;
    border: 1px solid rgba(11,26,61,0.18);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    overflow: visible;
    padding: 0 16px 16px;
    margin: 0;
    max-width: none;
    width: 100%;
    min-width: unset;
    box-sizing: border-box;
}

.mm-outer > h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #F05A28;
    text-align: center;
    letter-spacing: 1.5px;
    padding: 9px 0 7px;
    margin: 0 0 16px;
    border-bottom: 1px solid rgba(11,26,61,0.12);
}

/* ===== MORTGAGE-LAYOUT-05: 2-col fields + results below ===== */

/* ZONE 1: 2-col input layout */
.mm-zone1 {
    display: grid;
    grid-template-columns: 1.6fr 0.8fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
    overflow: visible;
}

/* Left column */
.mm-left-col {
    overflow: visible;
}

/* Right column */
.mm-right-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
}

.mm-right-col .form-group {
    margin: 0;
}

.mm-right-col label,
.mm-right-col .label-button-2 {
    font-size: 16px !important;
    display: block;
    color:#0B1A3D;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: normal;
    word-break: break-word;
}

.mm-right-col .lf-control {
    font-size: 14px !important;
    padding: 9px 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Left: 2-col internal inputs grid */
.mm-inputs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
    overflow: visible;
}

.mm-inputs-grid .form-group {
    margin: 0;
    overflow: visible;
}

/* Amortization button row spans full left col width */
.mm-amort-btn-row {
    grid-column: 1 / -1;
    margin-top: 0;
    align-self: end;
}

.mm-amort-btn-row .lf-sticky-btn {
    width: 100%;
}

.mm-inputs-grid label,
.mm-inputs-grid .label-button-2 {
    font-size: 16px !important;
    display: block;
    color:#0B1A3D;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: normal;
    word-break: break-word;
}

.mm-inputs-grid .lf-control {
    font-size: 14px !important;
    padding: 9px 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Play-button padding */
.mm-inputs-grid .lf-with-left-btn .lf-control {
    padding-left: 50px !important;
    padding-right: 14px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

/* Ensure play button never clipped */
.mm-inputs-grid .lf-with-left-btn,
.mm-left-col .lf-with-left-btn {
    overflow: visible !important;
}

.mm-inputs-grid .lf-left-tab,
.mm-left-col .lf-left-tab {
    overflow: visible !important;
    flex-shrink: 0 !important;
}

/* ZONE 2: 3 result cards */
.mm-zone2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 0;
}

.mm-zone2 .ff-result-card {
    position: relative;
    border: 2px solid #FC5E1E;
    border-radius: 12px;
    background: rgba(10,30,48,0.7);
    padding: clamp(10px,1.2vw,18px) 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mm-zone2 .ff-result-card-header {
    color: #FC5E1E;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
}

.mm-zone2 .ff-result-main-metric-label {
    font-size: 10px;
    color: #bfd0da;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0 0 2px;
}

.mm-zone2 .ff-result-main-value {
    font-size: clamp(16px, 1.8vw, 24px);
    font-weight: 900;
    color:#0B1A3D;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0 0 10px;
}

/* Chips — 2x2 grid */
.mm-zone2 .ff-result-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
}

.mm-zone2 .ff-result-chip:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Chip outer — copied verbatim from fix-and-flip.css FIX-FLIP-RESULTS-06 + FIX-FLIP-RESPONSIVE-01 */
.mm-zone2 .ff-result-chip {
    position: relative !important;
    background: linear-gradient(135deg, rgba(11,26,61,.14), rgba(11,26,61,.06)) !important;
    border: 1px solid rgba(11,26,61,.22) !important;
    border-radius: 16px !important;
    padding: clamp(4px, 0.5vw, 8px) clamp(8px, 1vw, 14px) !important;
    text-align: center !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.30), 0 0 0 1px rgba(11,26,61,.06) inset !important;
    min-width: clamp(70px, 8vw, 120px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: none !important;
}

/* Gold ring pseudo — copied verbatim from fix-and-flip.css FIX-FLIP-RESULTS-06 */
.mm-zone2 .ff-result-chip::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 16px !important;
    pointer-events: none !important;
    box-shadow: 0 0 0 1px rgba(240,90,40,.35), 0 0 22px rgba(240,90,40,.15) inset !important;
}

/* Chip label — copied verbatim from fix-and-flip.css FIX-FLIP-RESULTS-06 + FIX-FLIP-RESPONSIVE-01 */
.mm-zone2 .ff-chip-label {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(9px, 0.9vw, 12px) !important;
    letter-spacing: .5px !important;
    color: #F05A28 !important;
    opacity: .95 !important;
    text-transform: none !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

/* Chip value — copied verbatim from fix-and-flip.css FIX-FLIP-RESULTS-06 + FIX-FLIP-RESPONSIVE-01 */
.mm-zone2 .ff-chip-value {
    margin-top: 6px !important;
    font-weight: 800 !important;
    font-size: clamp(12px, 1.2vw, 16px) !important;
    color:#0B1A3D !important;
    text-shadow: 0 2px 4px rgba(0,0,0,.35) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Responsive */
@media (max-width: 1000px) {
    .mm-outer { min-width: unset; }
    .mm-zone1 { grid-template-columns: 1fr; }
    .mm-zone2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .mm-inputs-grid { grid-template-columns: 1fr; }
    .mm-amort-btn-row { grid-column: 1; }
}

/* ===== MORTGAGE-LAYOUT-06: left-align labels, column align, circular buttons, FF card style ===== */

/* FIX 1: Left-align all field labels in input grids */
.mm-inputs-grid label,
.mm-inputs-grid .label-button-2,
.mm-right-col label,
.mm-right-col .label-button-2 {
    text-align: left !important;
    width: 100% !important;
    display: block !important;
}

/* FIX 2: Vertical alignment — zone1 already align-items:start; ensure right col gap matches left */
.mm-right-col {
    gap: 14px !important;
    align-items: stretch !important;
}

.mm-right-col .form-group,
.mm-inputs-grid .form-group {
    height: auto !important;
    min-height: unset !important;
}

/* FIX 3: Circular play buttons */
.lf-with-left-btn {
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative !important;
}

.mm-inputs-grid .lf-with-left-btn,
.mm-left-col .lf-with-left-btn {
    display: flex !important;
    overflow: visible !important;
}

.lf-left-tab {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    border-top-left-radius: 50% !important;
    border-bottom-left-radius: 50% !important;
    border-top-right-radius: 50% !important;
    border-bottom-right-radius: 50% !important;
}

.mm-inputs-grid .lf-with-left-btn .lf-control,
.mm-left-col .lf-with-left-btn .lf-control {
    padding-left: 50px !important;
    padding-right: 14px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

/* FIX 4: Result cards — exact F&F orange glow style */
.mm-zone2 .ff-result-card {
    position: relative !important;
    box-shadow: 0 0 10px 2px #F05A28 !important;
    background-color: #FFFFFF !important;
    color: white !important;
    padding: 14px 12px !important;
    border: 2px solid #F05A28 !important;
    border-radius: 15px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.mm-zone2 .ff-result-card-header {
    font-family: 'Montserrat', sans-serif !important;
    color: #F05A28 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin: 0 0 4px !important;
    text-align: center !important;
}

.mm-zone2 .ff-result-main-metric-label {
    font-size: 10px !important;
    color: rgba(11,26,61,0.6) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    margin: 0 0 2px !important;
}

.mm-zone2 .ff-result-main-value {
    font-size: 22px !important;
    font-weight: 900 !important;
    color:#0B1A3D !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    margin: 0 0 12px !important;
}

/* Chips — 2x2 grid with F&F style */
.mm-zone2 .ff-result-chips {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: unset !important;
    flex-wrap: unset !important;
}

/* Chip overrides removed — canonical chip rules are in MORTGAGE-LAYOUT-05 above */

/* ===== MORTGAGE-LAYOUT-07: amortization button height matches input fields ===== */
/* Input fields render at height: 40px (padding: 9px top+bottom + font-size 14px × ~line-height 1.4) */
/* lf-left-tab (play button) is also 40px — amortization button matches */
.mm-amort-btn-row .lf-sticky-btn {
    height: 40px !important;
    min-height: unset !important;
    line-height: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ===== MORTGAGE-LAYOUT-08: organic $ and yr suffixes inside input fields ===== */

/* Wrapper: pill-shaped container matching .lf-control appearance */
.mm-input-with-suffix {
    display: flex;
    align-items: stretch;
    position: relative;
    border: 1px solid rgba(240,90,40, 0.65);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(11,26,61, 0.06), rgba(11,26,61, 0.02)),
        rgba(11,26,61, 0.35);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.mm-input-with-suffix:focus-within {
    border-color: #F05A28;
    box-shadow: inset 0 1px 0 rgba(11,26,61, 0.16), 0 0 0 3px var(--ctrl-ring);
}

/* The input inside: borderless, transparent, fills remaining space */
.mm-input-with-suffix .lf-control {
    flex: 1 1 auto;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    padding: 9px 6px 9px 14px !important;
    color: var(--ctrl-fg) !important;
    min-width: 0;
    width: 100%;
    margin-bottom: 0 !important;
}

/* When inside lf-with-left-btn, keep left padding for play button */
.lf-with-left-btn .mm-input-with-suffix .lf-control {
    padding-left: 50px !important;
}

/* The select suffix: styled as organic right-side tab */
.mm-suffix-select {
    flex: 0 0 auto;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: none !important;
    border-left: 1px solid rgba(240,90,40, 0.3) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color:#0B1A3D !important;
    -webkit-text-fill-color:#0B1A3D !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    padding: 0 12px !important;
    cursor: pointer !important;
    white-space: nowrap;
    box-shadow: none !important;
    outline: none !important;
    width: auto !important;
    min-width: 44px;
    text-align: center;
    text-align-last: center;
    margin: 0 !important;
}

.mm-suffix-select:focus {
    outline: none !important;
    border-color: rgba(240,90,40, 0.3) !important;
    box-shadow: none !important;
}

/* Dropdown options */
.mm-suffix-select option {
    background-color: rgba(11,26,61, 0.95) !important;
    color:#0B1A3D !important;
}

/* Ensure mm-input-with-suffix fills width inside lf-with-left-btn */
.lf-with-left-btn .mm-input-with-suffix {
    width: 100% !important;
    flex: 1 1 auto !important;
}

/* ===== MORTGAGE-POLISH-01: balloon payment input background fix ===== */
/* Prevents white-flash on browser autofill / tab switch repaint */
#balloonSchedule {
    background:
        linear-gradient(180deg, rgba(11,26,61, 0.06), rgba(11,26,61, 0.02)),
        rgba(11,26,61, 0.35) !important;
    color:#0B1A3D !important;
    -webkit-text-fill-color:#0B1A3D !important;
}

#balloonSchedule:-webkit-autofill,
#balloonSchedule:-webkit-autofill:hover,
#balloonSchedule:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px rgba(11,26,61, 0.35) inset !important;
    box-shadow: 0 0 0px 1000px rgba(11,26,61, 0.35) inset !important;
    -webkit-text-fill-color:#0B1A3D !important;
    background-color: rgba(11,26,61, 0.35) !important;
}

/* MORTGAGE-POLISH-01: amortization margin-top removed — alignment via align-self:end on wrapper */

/* ===== MORTGAGE-LAYOUT-09: yr/mo click-toggle button ===== */
.mm-suffix-toggle {
    flex: 0 0 auto;
    background: transparent !important;
    border: none !important;
    border-left: 1px solid rgba(240,90,40, 0.3) !important;
    border-radius: 0 !important;
    color:#0B1A3D;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 0 12px;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    box-shadow: none;
    min-width: 44px;
    text-align: center;
    transition: color .15s ease;
    line-height: 1;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-suffix-toggle:hover {
    color: #FC5E1E;
}

.mm-suffix-toggle:focus {
    outline: none;
}

/* ===== MORTGAGE-POLISH-02: Start Date field — pill style with embedded orange calendar icon ===== */

/* Outer wrapper: pill matching other lf-control inputs, fully clickable */
.mm-date-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid rgba(240,90,40, 0.65);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(11,26,61, 0.06), rgba(11,26,61, 0.02)),
        rgba(11,26,61, 0.35);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.mm-date-wrapper:focus {
    outline: none;
    border-color: #F05A28;
    box-shadow: inset 0 1px 0 rgba(11,26,61, 0.16), 0 0 0 3px var(--ctrl-ring);
}

.mm-date-wrapper:focus-within {
    border-color: #F05A28;
    box-shadow: inset 0 1px 0 rgba(11,26,61, 0.16), 0 0 0 3px var(--ctrl-ring);
}

/* The visible text input — borderless, transparent */
.mm-date-input {
    flex: 1 1 auto;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    padding: 9px 6px 9px 14px !important;
    color: var(--ctrl-fg) !important;
    font-size: 14px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    cursor: text;
    margin-bottom: 0 !important;
    min-width: 0;
    width: 100%;
}

.mm-date-input::placeholder {
    color: rgba(234, 242, 247, 0.5);
}

/* Hidden native date input */
.mm-date-wrapper .lf-date-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: auto;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Calendar icon inside the pill */
.mm-date-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 12px;
    pointer-events: none;
    color: #FC5E1E;
    line-height: 1;
}

.mm-date-icon svg {
    display: block;
}

/* Suppress native calendar picker indicator */
.mm-date-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}
.mm-date-wrapper input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== RESULTS-UNIFORMIZE-01: FF result card style ===== */
.ff-result-card {
    position: relative;
    box-shadow: 0 0 10px 2px #F05A28 !important;
    background-color: #FFFFFF !important;
    color: white !important;
    padding: 10px 14px !important;
    border: 2px solid #F05A28 !important;
    border-radius: 15px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.ff-result-card-header {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(12px, 1.2vw, 15px) !important;
    font-weight: 500 !important;
    color: #F05A28 !important;
    letter-spacing: 1.5px !important;
    text-align: center !important;
    text-transform: none !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.ff-main-chip {
    position: relative;
    background: linear-gradient(135deg, rgba(11,26,61,.14), rgba(11,26,61,.06));
    border: 1px solid rgba(11,26,61,.22);
    border-radius: 10px;
    padding: 6px 12px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(0,0,0,.30), 0 0 0 1px rgba(11,26,61,.06) inset;
    margin: 4px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.ff-main-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(240,90,40,.35), 0 0 22px rgba(240,90,40,.15) inset;
}

.ff-main-chip-label {
    font-size: clamp(8px, 0.75vw, 10px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #FC5E1E;
    display: block;
    text-align: center;
    margin-bottom: 2px;
}

.ff-main-chip-value {
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 800;
    color:#0B1A3D;
    font-family: 'Inter', system-ui, sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,.35);
}

.ff-metrics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

.ff-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(240,90,40,0.10);
}

.ff-metric-row:last-child {
    border-bottom: none;
}

.ff-metric-label {
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 600;
    color: #FC5E1E;
    letter-spacing: 0.01em;
    font-family: 'Inter', system-ui, sans-serif;
    text-align: left;
}

.ff-metric-value {
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 700;
    color:#0B1A3D;
    font-family: 'Inter', system-ui, sans-serif;
    text-align: right;
}

/* ===== MORTGAGE-METRICS-01: Rehab-style info-icon tooltips ===== */

.ff-metric-label .info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    background: rgba(11,26,61, 0.30);
    color: #EAEEF6;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ff-metric-label .info-icon:hover {
    background: #ffbe4a;
    box-shadow: 0 0 0 2px rgba(240,90,40, 0.25) inset;
}

/* Tooltip bubble via ::after + data-tooltip */
.ff-metric-label .info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    color:#0B1A3D;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    font-family: 'Inter', system-ui, sans-serif;
    white-space: normal;
    width: 230px;
    text-align: left;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    line-height: 1.45;
}

/* Arrow pointer */
.ff-metric-label .info-icon::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #FFFFFF;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.ff-metric-label .info-icon:hover::after,
.ff-metric-label .info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Prevent tooltip overflow on right edge */
@media (max-width: 600px) {
    .ff-metric-label .info-icon::after {
        width: 180px;
        left: auto;
        right: 0;
        transform: none;
    }
    .ff-metric-label .info-icon::before {
        left: auto;
        right: 4px;
        transform: none;
    }
}

/* ===== MORTGAGE-LAYOUT-07: results outside container, 3-section merged card ===== */

/* ===== MORTGAGE: shared wrapper aligns result card to calculator (Rehab pattern) ===== */

/* Shared page wrapper — constrains both mm-outer and mm-results-outer identically */
.mm-page-wrapper {
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 20px auto 0;
    box-sizing: border-box;
    padding: 0;
}

/* mm-outer: fill wrapper width, no independent centering margin */
.mm-outer {
    width: 100%;
    max-width: none;
    margin: 0 0 0 0;
}

/* Outer wrapper for the merged result card — sits below mm-outer */
/* margin-top: 6px matches Rehab results-panel → calculator spacing */
.mm-results-outer {
    width: 100%;
    max-width: none;
    margin: 6px 0 40px;
    box-sizing: border-box;
    padding: 0;
}

/* FF split card rules — verbatim from fix-and-flip.css */
.ff-result-card--split {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
}

.ff-split-left,
.ff-split-right {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
}

.ff-split-divider {
    width: 1px;
    background: rgba(240,90,40, 0.25);
    align-self: stretch;
    flex-shrink: 0;
}

/* Center section — mirrors left/right */
.ff-split-center {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
}

/* Result card base applied to the merged card */
.mm-results-outer .ff-result-card {
    position: relative;
    border: 2px solid #FC5E1E;
    border-radius: 12px;
    background: rgba(10, 30, 48, 0.7);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 0 10px 2px rgba(240,90,40, 0.35);
}

/* Headers inside the split sections */
.mm-results-outer .ff-result-card-header {
    color: #FC5E1E;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
    text-align: center;
}

/* Responsive: stack sections vertically on narrow screens */
@media (max-width: 760px) {
    .mm-page-wrapper {
        width: calc(100% - 24px);
        margin: 12px auto 0;
    }
    .mm-results-outer {
        padding: 0;
    }
    .ff-result-card--split {
        flex-direction: column !important;
    }
    .ff-split-divider {
        width: 100% !important;
        height: 1px !important;
        align-self: auto !important;
    }
}
