/* ASSAN 5.1 components and SABIZ theme tokens; all additions are page-scoped. */
.heloc-page {
    --heloc-ink: #1b1b21;
    --heloc-accent: #835712;
    --heloc-soft: #f5eddb;
    --heloc-cream: #faf8f2;
    color: var(--heloc-ink);
    background: #fff;
    font-family: var(--bs-body-font-family);
}

.heloc-page * {
    box-sizing: border-box;
}

.heloc-page h1,.heloc-page h2,.heloc-page h3 {
    color: inherit;
    letter-spacing: var(--sabiz-heading-letter-spacing);
    line-height: var(--sabiz-heading-line-height);
}

.heloc-page h1 {
    font-size: var(--sabiz-heading-hero-size);
    font-weight: 400;
    margin: 0 0 20px;
}

.heloc-page h2 {
    font-size: var(--sabiz-heading-section-size);
    font-weight: 400;
    margin: 0 0 24px;
}

.heloc-page h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.heloc-page p {
    line-height: var(--bs-body-line-height);
}

.heloc-wrap {
    position: relative;
}

.heloc-section {
    padding: 88px 0;
}

.heloc-eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Hero and application illustration */
.heloc-hero {
    background: #f3f3f3;
    padding: 135px 0 48px;
    overflow: hidden;
}

.heloc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.heloc-page .heloc-brand {
    display: inline-flex;
    gap: .6rem;
    align-items: center;
    font-weight: 600;
    letter-spacing: .12em;
    font-size: .8rem;
}

.heloc-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.heloc-hero h1 em {
    color: var(--heloc-accent);
    font-style: normal;
}

.heloc-partner {
    font-size: .84rem;
    max-width: 450px;
}

.heloc-checks {
    padding: 0;
    list-style: none;
    margin: 1.5rem 0;
}

.heloc-checks li {
    padding: .5rem 0 .5rem 1.8rem;
    position: relative;
    line-height: 1.65;
    font-size: .94rem;
}

.heloc-checks li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--heloc-accent);
    font-weight: bold;
}

.heloc-page .heloc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    min-height: 54px;
    padding: 14px 30px;
    text-transform: none;
    font-size: 1rem;
    font-weight: 500;
    white-space: normal;
}

.heloc-page .heloc-cta:hover {
    background: #35353f;
    color: white;
}

.heloc-page a:focus-visible,.heloc-page summary:focus-visible {
    outline: 3px solid #cb9b51;
    outline-offset: 5px;
}

.heloc-small {
    font-size: .75rem;
    line-height: 1.7!important;
    margin-top: 14px;
}

.heloc-page sup a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0 2px;
}

.heloc-visual {
    position: relative;
    padding: 15px 48px 0;
    isolation: isolate;
}

.heloc-phone {
    position: relative;
    background: #fff;
    border: 9px solid #202126;
    border-radius: 45px 45px 12px 12px;
    padding: 22px 24px;
    max-width: 330px;
    margin: auto;
    box-shadow: 0 0 0 3px #afb1b3, 0 20px 35px #00000012;
}

.heloc-notch {
    height: 8px;
    width: 70px;
    background: #1b1b21;
    margin: -8px auto 28px;
    border-radius: 8px;
}

.heloc-phone-brand {
    font-size: .72rem;
    letter-spacing: .16em;
    font-weight: 600;
    border-bottom: 1px solid #eaeaef;
    padding-bottom: 16px;
}

.heloc-phone h3 {
    margin: 22px 0 8px;
    font-size: 1.7rem;
}

.heloc-phone p {
    font-size: .82rem;
}

.heloc-phone-step {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #eaeaef;
    padding: 15px 0;
    font-size: .77rem;
}

.heloc-phone-step span:first-child {
    background: var(--heloc-soft);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: none;
}

.heloc-visual-tag {
    position: absolute;
    right: -12px;
    bottom: 48px;
    background: #1b1b21;
    color: white;
    border-radius: 14px;
    padding: 18px 24px;
    font-size: .83rem;
    box-shadow: 0 10px 25px #1b1b2120;
}

/* Partner statistics */




.heloc-source {
    font-size: .68rem;
    text-align: center;
    color: #5c5d6f;
    margin: 18px 0 0;
}

.heloc-intro {
    max-width: 730px;
    margin: 0 auto 42px;
    text-align: center;
}

/* Benefits */
.heloc-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
}

.heloc-card {
    padding: 0;
    border: 0;
    background: transparent;
}

.heloc-card p {
    font-size: .95rem;
    margin-bottom: 0;
}

.heloc-icon {
    font-size: 2.4rem;
    margin-bottom: 24px;
    color: #1b1b21;
}

.heloc-center {
    text-align: center;
    margin-top: 35px;
}

.heloc-tint {
    background: var(--heloc-cream);
}

/* Product comparison: Four-column layout in SABIZ's palette. */
.heloc-comparison {
    background: #fff;
}
.heloc-comparison .heloc-table-wrap {
    border: 1px solid #e7e1d6;
    box-shadow: 0 12px 36px rgba(60, 45, 15, .04);
}

.heloc-table-wrap {
    max-width: 980px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: 24px;
}

.heloc-table {
    width: 100%;
    min-width: 720px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: .95rem;
    line-height: 1.7;
}

.heloc-table th,
.heloc-table td {
    width: 25%;
    padding: 20px 18px;
    border-bottom: 1px solid #cbd0d4;
    border-right: 1px solid #e1e4e7;
    vertical-align: middle;
    text-align: center;
}

.heloc-table thead th {
    background: #e2e7eb;
    font-weight: 600;
}

.heloc-table tbody th {
    text-align: left;
    font-weight: 400;
}

.heloc-table tr > :nth-child(2) {
    background: #1b1b21;
    color: #fff;
    border-color: #69696b;
}

.heloc-table thead th:nth-child(2) {
    border-radius: 24px 24px 0 0;
    color: #f6e27a;
}

.heloc-table tr:last-child > * {
    border-bottom: 0;
}

.heloc-table-notes {
    max-width: 980px;
    margin: 20px auto 0;
    font-size: .75rem;
}

.heloc-table-notes a {
    color: inherit;
    text-decoration: underline;
}

/* Loan uses */
.heloc-uses {
    display: block;
    max-width: 780px;
    margin: auto;
    text-align: center;
}

.heloc-use {
    border-top: 2px solid #cb9b51;
    padding: 24px 8px 0;
}

.heloc-use span {
    font-size: .75rem;
    color: var(--heloc-accent);
}

.heloc-use h3 {
    margin-top: 20px;
    font-size: 1.15rem;
}

.heloc-use p {
    font-size: .8rem;
}

/* FAQs and disclosures */

.heloc-final {
    background: #f3f3f3;
    padding: 0 0 70px;
}

.heloc-final p {
    margin: 0;
}

.heloc-disclosures {
    padding: 48px 0 60px;
    color: #5c5d6f;
    font-size: .75rem;
}

.heloc-disclosures h2 {
    font-size: 1.3rem;
    letter-spacing: -.02em;
}

.heloc-disclosures li {
    padding: 6px 0;
    line-height: 1.8;
    scroll-margin-top: 130px;
}

.heloc-disclosures a {
    color: #835712;
    text-decoration: underline;
}

@media(max-width:991px) {
    .heloc-grid {
        gap: 32px;
    }
    .heloc-hero {
        padding-top: 145px;
    }
    .heloc-visual {
        padding: 25px 14px;
    }
    .heloc-cards {
        grid-template-columns: repeat(2,1fr);
    }
    .heloc-uses {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(max-width:767px) {
    .heloc-grid {
        grid-template-columns: 1fr;
    }
    .heloc-hero {
        padding-top: 135px;
    }
    .heloc-visual {
        margin: 12px 10px 0;
        min-height: 440px;
    }
    .heloc-visual-tag {
        right: -8px;
    }
    .heloc-section {
        padding: 56px 0;
    }
    .heloc-cards {
        gap: 14px;
    }
    .heloc-card {
        padding: 22px 17px;
    }
    .heloc-card h3 {
        font-size: 1.1rem;
    }
    .heloc-uses {
        grid-template-columns: repeat(2,1fr);
    }
    .heloc-page .heloc-cta {
        font-size: .85rem;
        padding: 16px 20px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .heloc-page * {
        scroll-behavior: auto!important;
        transition: none!important;
    }
}

/* Equity estimator: two vertical controls, following the reference layout. */
.heloc-calculator {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.heloc-chart-instruction {
    font-size: .85rem;
    color: var(--bs-secondary);
    margin-bottom: 24px;
}

.heloc-chart {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.heloc-column {
    position: relative;
    height: 470px;
    border: 1px solid var(--bs-gray-300);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.heloc-column-fill {
    position: absolute;
    inset: auto 0 0;
    height: calc(77px + (100% - 104px) * var(--heloc-ratio));
    border-radius: 12px 12px 0 0;
    background: #e7d2a9;
    pointer-events: none;
}

.heloc-field:nth-child(2) .heloc-column-fill {
    background: #d7d7dd;
}

.heloc-slider-value {
    position: absolute;
    bottom: calc(23px + (100% - 104px) * var(--heloc-ratio) / 2);
    left: 0;
    width: 100%;
    text-align: center;
    font-size: clamp(1.2rem, 2.2vw, 1.9rem);
    font-weight: 500;
    color: var(--heloc-ink);
    pointer-events: none;
}

.heloc-column-max {
    position: absolute;
    top: 10px;
    width: 100%;
    text-align: center;
    color: var(--bs-gray-600);
    font-size: .7rem;
    pointer-events: none;
}

/* Override ASSAN's horizontal form-range dimensions only within this chart.
   Native vertical ranges retain pointer, touch and arrow-key behavior. */
.heloc-column .heloc-range {
    position: absolute;
    inset: 0 auto 50px calc(50% - 27px);
    width: 54px;
    height: calc(100% - 50px);
    margin: 0;
    padding: 0;
    writing-mode: vertical-lr;
    direction: rtl;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: ns-resize;
}

.heloc-column .heloc-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
}

/* Large, round handles make the drag affordance visible, for touch and pointer input. */
.heloc-column .heloc-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 54px;
    height: 54px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='54' height='54' viewBox='0 0 54 54'%3E%3Ccircle cx='27' cy='27' r='26' fill='white'/%3E%3Cpath d='M20 21l7-6 7 6M18 27h18M20 33l7 6 7-6' fill='none' stroke='%23835712' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    box-shadow: 0 3px 14px #1b1b2114;
}

.heloc-column .heloc-range::-moz-range-track {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
}

.heloc-column .heloc-range::-moz-range-thumb {
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='54' height='54' viewBox='0 0 54 54'%3E%3Ccircle cx='27' cy='27' r='26' fill='white'/%3E%3Cpath d='M20 21l7-6 7 6M18 27h18M20 33l7 6 7-6' fill='none' stroke='%23835712' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    box-shadow: 0 3px 14px #1b1b2114;
}

.heloc-column:focus-within {
    outline: 3px solid #835712;
    outline-offset: 4px;
}

.heloc-field .form-label {
    display: block;
    margin: 18px 0 12px;
    font-size: .9rem;
    min-height: 3em;
}

.heloc-field .form-control {
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.heloc-estimate {
    border-top: 1px solid var(--bs-gray-300);
    padding-top: 26px;
    margin-top: 26px;
}

.heloc-estimate output {
    display: block;
    font-family: var(--bs-font-serif);
    font-size: clamp(3.5rem, 5vw, 5rem);
    line-height: 1.1;
    color: var(--heloc-ink);
    margin: 12px 0 20px;
}

.heloc-estimate #heloc-assumption {
    font-size: .82rem;
}

@media (max-width: 991px) {
    .heloc-calculator {
        gap: 32px;
    }
    .heloc-column {
        height: 340px;
    }
}

@media (max-width: 767px) {
    .heloc-calculator {
        grid-template-columns: minmax(0, 1fr);
    }
    .heloc-calculator-copy {
        grid-row: 1;
    }
    .heloc-chart {
        gap: 14px;
    }
    .heloc-slider-value {
        font-size: 1.5rem;
    }
}

/* Reference section composition, with local Bootstrap carousel components. */
.heloc-hero .language-selector {
    margin-bottom: 24px;
}
.heloc-brand {
    margin-bottom: 16px;
}
.heloc-hero-actions {
    display: flex;
    align-items: end;
    gap: 16px;
    margin-top: 28px;
}
.heloc-purpose {
    position: relative;
    flex: 1;
    min-width: 0;
}
.heloc-purpose label {
    position: absolute;
    top: -10px;
    left: 22px;
    background: #f3f3f3;
    padding: 0 5px;
    font-size: .75rem;
}
.heloc-purpose select {
    border-radius: 40px;
    min-height: 54px;
    padding-left: 24px;
    font-size: .85rem;
}
.heloc-hero-actions .heloc-cta {
    flex: 1;
}
.heloc-visual::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 34% 0 25px;
    border-radius: 22px;
    background: linear-gradient(125deg, #292931, #b18a46 65%, #f5e7cb);
}
.heloc-visual-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 230px;
    padding: 15px 20px;
    border-radius: 10px;
    background: #e8d6b0;
    box-shadow: 0 8px 18px #00000018;
    font-size: .85rem;
    line-height: 1.4;
}
.heloc-visual-badge i {
    font-size: 1.7rem;
}
.heloc-badge-online {
    right: 0;
    top: 80px;
}
.heloc-badge-support {
    right: -8px;
    top: 57%;
}
.heloc-badge-redraw {
    left: 0;
    bottom: 0;
}
.heloc-phone-amount {
    background: #f5f5f5;
    padding: 16px;
    margin: 22px 0;
    border-radius: 8px;
}
.heloc-phone-amount strong {
    display: block;
    font-size: 1.7rem;
}
.heloc-phone-amount small {
    font-size: .65rem;
}
.heloc-phone-track {
    height: 4px;
    background: #b18a46;
    margin-top: 16px;
    position: relative;
}
.heloc-phone-track::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 40%;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: white;
    border: 2px solid #835712;
}
.heloc-benefits .heloc-intro {
    text-align: left;
    margin-left: 0;
    max-width: 100%;
}
.heloc-benefits .heloc-eyebrow, .heloc-use-section .heloc-eyebrow, .heloc-faq-section .heloc-eyebrow {
    display: none;
}
.heloc-benefits .heloc-center .heloc-cta, .heloc-use-section .heloc-center .heloc-cta {
    min-width: min(380px, 100%);
}
.heloc-use-section, .heloc-faq-section {
    background: #f3f3f3;
}
.heloc-carousel-controls {
    display: flex;
    justify-content: center;
    padding: 20px 0 0;
}
.heloc-page .carousel-control-prev, .heloc-page .carousel-control-next {
    width: 48px;
    color: #1b1b21;
    font-size: 3rem;
    opacity: 1;
    border: 0;
    background: transparent;
}
.heloc-page .carousel-control-prev:hover,
.heloc-page .carousel-control-prev:focus,
.heloc-page .carousel-control-next:hover,
.heloc-page .carousel-control-next:focus {
    color: #1b1b21;
}

.heloc-page .carousel-indicators {

    position: static;

    margin: 0;

    gap: 6px;

}
.heloc-page .carousel-indicators button {
    width: 25px;
    height: 4px;
    background-color: #1b1b21;
    border: 0;
    border-radius: 3px;
    padding: 0;
    margin: 8px 0;
}
.heloc-page .carousel button:focus-visible {
    outline: 3px solid #835712;
    outline-offset: 5px;
}
.heloc-uses .carousel-item {
    padding: 0 65px;
}
.heloc-uses img {
    display: block;
    width: min(440px, 100%);
    height: 340px;
    object-fit: contain;
    margin: 0 auto 32px;
}
.heloc-uses h3 {
    font-size: 1.55rem;
    margin: 20px 0;
}
.heloc-uses p {
    max-width: 550px;
    margin: auto;
    min-height: 80px;
}
.heloc-use-section {
    background: linear-gradient(to bottom, #fff, #f3f3f3 100px);
    padding-top: 50px;
}
.heloc-final-panel {
    border-radius: 20px;
    padding: 56px;
    color: white;
    background: linear-gradient(115deg, #1b1b21, #504024 75%, #835712);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px 60px;
    align-items: center;
}
.heloc-final-panel > .heloc-eyebrow {
    grid-column: 1 / -1;
}
.heloc-final-panel h2 {
    margin: 0;
}
.heloc-final-panel > p:not(.heloc-eyebrow) {
    grid-column: 1;
}
.heloc-final-panel > .heloc-cta {
    grid-column: 2;
    grid-row: 2 / 4;
    background: white;
    color: #1b1b21;
}
.heloc-sticky-apply {
    position: fixed;
    z-index: 1030;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 20px max(10px, env(safe-area-inset-bottom));
    background: #1b1b21;
    color: white;
    font-size: .85rem;
    box-shadow: 0 -2px 16px #00000015;
}
.heloc-sticky-apply[hidden] {
    display: none;
}
.heloc-sticky-apply .heloc-cta {
    min-height: 40px;
    padding: 8px 24px;
    background: #e8d6b0;
    color: #1b1b21;
    font-size: .85rem;
}
/* Keep the shared back-to-top control above the application bar. */
body:has(.heloc-page) .toTop {
    bottom: 90px;
}

body:has(.heloc-page) {
    padding-bottom: 70px;
}
.heloc-page section[id] {
    scroll-margin-top: 110px;
}
@media (max-width: 991px) {
    .heloc-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .heloc-visual {
        padding: 25px 20px;
    }
    .heloc-visual-badge {
        font-size: .7rem;
        padding: 12px;
        max-width: 180px;
    }
    .heloc-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .heloc-final-panel {
        padding: 32px;
        gap: 20px;
    }
}
@media (max-width: 767px) {
    .heloc-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .heloc-hero-actions {
        flex-direction: row;
    }
    .heloc-visual {
        max-width: 480px;
        margin: 25px auto 0;
        width: 100%;
    }
    .heloc-uses .carousel-item {
        padding: 0 35px;
    }
    .heloc-uses img {
        height: 260px;
    }
    .heloc-final-panel {
        grid-template-columns: minmax(0, 1fr);
    }
    .heloc-final-panel > * {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .heloc-sticky-apply {
        gap: 12px;
        font-size: .75rem;
    }
    .heloc-sticky-apply .heloc-cta {
        font-size: .75rem;
        padding: 8px 16px;
    }
}

/* Partner proof is explicitly separated from SABIZ/PRMG achievements. */
.heloc-proof {
    padding: 30px 0 45px;
    background: #f3f3f3;
    text-align: center;
}
.heloc-proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    align-items: center;
    margin: 22px 0;
}
.heloc-proof-grid strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #835712;
}
.heloc-proof-grid span {
    display: block;
    font-size: .85rem;
}
.heloc-partner-award img {
    width: 112px;
    height: auto;
    margin-bottom: 12px;
}
.heloc-partner-award span {
    font-size: .7rem;
}
.heloc-calculator-copy > p {
    margin-bottom: 28px;
}
.heloc-estimate #heloc-assumption {
    margin-top: 20px;
}
.heloc-final-panel > h2 {
    grid-column: 1;
}
.heloc-final-panel > .heloc-cta {
    grid-column: 2;
    grid-row: 1 / 3;
}
.heloc-sticky-apply .heloc-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 767px) {
    .heloc-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }
}

/* Media strip; attribution is in the lending-partner disclosure. */
.heloc-press {
    background: #000;
    color: #eeeae3;
    text-align: center;
    padding: 36px 0;
}
.heloc-press p {
    color: #c4a66a;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.heloc-press-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px 40px;
}
.heloc-press-logos img {
    filter: brightness(0) invert(1);
    opacity: .88;
    max-width: 170px;
    width: auto;
    height: 24px;
}
.heloc-press-wordmark {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 1.25rem;
}

/* Join Us-inspired benefits rail. */
.heloc-page .heloc-benefits { background: linear-gradient(to bottom, #F7F4EE 0, #F7F4EE calc(100% - 90px), #fff 100%); padding: 110px 0 100px; }
.heloc-benefits > .heloc-wrap { max-width: 1240px; padding-inline: 28px; }
.heloc-benefits-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.heloc-benefits .heloc-intro { margin: 0; max-width: 920px; }
.heloc-benefits .heloc-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: #8A6A2C; font-size: 11px; font-weight: 600; letter-spacing: 3.2px; text-transform: uppercase; margin: 0; }
.heloc-benefits .heloc-eyebrow::before { content: ''; width: 34px; height: 1px; background: currentColor; flex-shrink: 0; }
.heloc-benefits h2 { margin: 18px 0 0; font-size: var(--sabiz-heading-section-size); }
.heloc-benefits-nav { display: flex; gap: 10px; flex-shrink: 0; }
.heloc-benefits-nav[hidden] { display: none; }
.heloc-benefits-nav button { width: 54px; height: 54px; border-radius: 50%; border: 1px solid #D9D2C4; background: transparent; color: #171717; -webkit-text-fill-color: #171717; appearance: none; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; font-size: 24px; transition: background .25s; }
@media (hover: hover) { .heloc-benefits-nav button:hover:not(:disabled) { background: #C49742; } }
.heloc-benefits-nav button:active:not(:disabled) { background: #ECD085; color: #171717; }
.heloc-benefits-nav button:focus-visible { outline: 2px solid #9A7430; outline-offset: 4px; }
.heloc-benefits-nav button:disabled { opacity: .35; }
.heloc-benefits .heloc-cards { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 50px 0 28px; scrollbar-width: thin; scrollbar-color: #C49742 #E7E1D6; }
.heloc-benefits .heloc-card { flex: 0 0 min(360px,78vw); min-height: 400px; background: #fff; border-radius: 22px; padding: 36px 32px; position: relative; overflow: hidden; scroll-snap-align: start; box-shadow: 0 1px 0 #E7E1D6; transition: transform .5s, box-shadow .5s; }
.heloc-benefits .heloc-card::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(100deg,#9A7430,#ECD085,#9A7430); transform: scaleX(0); transform-origin: left; transition: transform .6s; }
.heloc-benefits .heloc-card:hover { transform: translateY(-8px); box-shadow: 0 20px 28px rgba(60,45,15,.12); }
.heloc-benefits .heloc-card:hover::after { transform: scaleX(1); }
.heloc-card-number { font-family: var(--bs-font-serif); font-size: 15px; color: #8A6A2C; }
.heloc-benefits .heloc-icon { color: #C49742; font-size: 46px; margin: 26px 0 24px; line-height: 1; }
.heloc-benefits .heloc-card h3 { font-family: var(--bs-font-serif); font-weight: 400; font-size: 1.75rem; }
.heloc-benefits .heloc-card p { font-size: 1rem; color: #6B6B6B; margin-top: 14px; }
.heloc-benefits-progress { height: 2px; background: #E7E1D6; margin-top: 18px; }
.heloc-benefits-progress i { display: block; height: 100%; width: 0; background: #C49742; }
@media (max-width: 680px) {
    .heloc-page .heloc-benefits { padding: 70px 0; }
    .heloc-benefits > .heloc-wrap { padding-inline: 22px; }
    .heloc-benefits-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .heloc-benefits .heloc-cards { scroll-behavior: auto; }
    .heloc-benefits .heloc-card, .heloc-benefits .heloc-card::after { transition: none; }
    .heloc-benefits .heloc-card:hover { transform: none; }
}

.heloc-benefits-enhanced .heloc-cards { scrollbar-width: none; }
.heloc-benefits-enhanced .heloc-cards::-webkit-scrollbar { display: none; }
#heloc-benefits-title { scroll-margin-top: 120px; }
#heloc-benefits-title sup { font-size: .35em; top: -.9em; margin-left: .15em; }

/* Full-width rail with the same inset and drag badge as Join Us. */
.heloc-benefits .heloc-cards { --rail-pad: max(28px,calc((100% - 1184px)/2)); padding-inline: var(--rail-pad); scroll-padding-inline: var(--rail-pad); cursor: grab; }
.heloc-benefits .heloc-cards.is-dragging { scroll-snap-type: none; scroll-behavior: auto; user-select: none; cursor: grabbing; }
.heloc-benefits-drag-cursor { position: fixed; top: 0; left: 0; width: 86px; height: 86px; margin: -43px 0 0 -43px; background: #ECD085; border: 1px solid #ECD085; border-radius: 50%; display: grid; place-items: center; pointer-events: none; z-index: 99999; color: #0A0A0A; font: 600 11px var(--bs-font-sans-serif); letter-spacing: 1.2px; text-transform: uppercase; opacity: 0; transition: opacity .2s; }
.heloc-benefits-drag-cursor.is-visible { opacity: 1; }
.heloc-benefits .heloc-cards.has-drag-cursor, .heloc-benefits .heloc-cards.has-drag-cursor * { cursor: none; }
.heloc-benefits .heloc-cards a { cursor: pointer; }
@media (max-width: 680px) { .heloc-benefits .heloc-cards { --rail-pad: 22px; } }
@media (prefers-reduced-motion: reduce) { .heloc-benefits-drag-cursor { transition: none; } }

/* Introductory explanation and three-step process, adapted to SABIZ styling. */
.heloc-learn, .heloc-process { background: #fff; }
.heloc-learn > .heloc-wrap, .heloc-process > .heloc-wrap { max-width: 1240px; padding-inline: 28px; }
.heloc-learn-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.heloc-learn h2, .heloc-process h2 { font-size: var(--sabiz-heading-section-size); font-weight: 400; line-height: var(--sabiz-heading-line-height); margin: 0 0 24px; }
.heloc-learn-summary { font-size: 1.125rem; line-height: 1.75; margin: 0; color: #454545; }
.heloc-requirements-card { padding: 32px; background: #F7F4EE; border: 1px solid #E7E1D6; border-radius: 24px; }
.heloc-learn h3 { font-size: 1rem; font-weight: 600; line-height: 1.6; margin-bottom: 24px; }
.heloc-requirements { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
.heloc-requirements li { display: flex; align-items: flex-start; gap: 12px; color: #454545; line-height: 1.6; }
.heloc-requirements li::before { content: '✓'; color: #9A7430; background: #fff; border-radius: 50%; width: 26px; height: 26px; flex: 0 0 26px; text-align: center; }
.heloc-process { padding-top: 30px; }
.heloc-process-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.heloc-process-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.heloc-process-visual { grid-column: 1; grid-row: 1; margin: 0; padding: 24px; background: #F7F4EE; border-radius: 28px; }
.heloc-process-visual img { display: block; width: 100%; height: auto; }
.heloc-process-steps { list-style: none; padding: 0; margin: 0; }
.heloc-process-steps li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 0 0 32px; }
.heloc-process-steps li:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 1px; background: #E7D8B9; }
.heloc-process-steps li:last-child { padding-bottom: 0; }
.heloc-step-number { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #F7F4EE; border: 1px solid #D9C394; color: #79591F; font-size: .8rem; font-weight: 600; }
.heloc-process-steps h3 { font-family: var(--bs-font-serif); font-size: 1.5rem; line-height: 1.3; font-weight: 400; margin: 0 0 12px; }
.heloc-process-steps p { color: #454545; line-height: 1.7; margin: 0; }
.heloc-process-steps p + p { margin-top: 12px; }
@media (max-width: 991px) {
    .heloc-learn-grid, .heloc-process-grid { grid-template-columns: 1fr; gap: 28px; }
    .heloc-process-copy, .heloc-process-visual { grid-column: auto; grid-row: auto; }
    .heloc-process-visual { width: 100%; max-width: 320px; margin: auto; padding: 16px; }
}
@media (max-width: 575px) {
    .heloc-learn > .heloc-wrap, .heloc-process > .heloc-wrap { padding-inline: 22px; }
    .heloc-learn-summary { font-size: 1rem; line-height: 1.7; }
    .heloc-requirements-card { padding: 24px 20px; border-radius: 20px; }
    .heloc-process-steps li { gap: 12px; }
    .heloc-process-steps h3 { font-size: 1.375rem; }
    .heloc-process-visual { max-width: 280px; }
}
#heloc-learn-title, #heloc-process-title { scroll-margin-top: 120px; }

/* A consistent finish: warm surfaces, gold details and named use choices. */
.heloc-comparison .heloc-table thead th { background: #F7F4EE; }
.heloc-comparison .heloc-table th, .heloc-comparison .heloc-table td { border-color: #E7E1D6; }
.heloc-comparison .heloc-table tr > :nth-child(2) { background: #171717; color: #fff; border-color: #3b3831; }
.heloc-comparison .heloc-table thead th:nth-child(2) { color: #ECD085; }
.heloc-page .heloc-use-section { background: #fff; padding: 90px 0; }
.heloc-use-section .heloc-intro { max-width: 1120px; }
.heloc-use-explorer { width: 100%; margin: 0 0 44px; }
.heloc-use-panels { display: grid; grid-auto-flow: column; grid-auto-columns: min(360px, 82vw); grid-template-rows: auto auto 1fr; column-gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 8px 0 24px; scrollbar-width: thin; scrollbar-color: #C49742 #E7E1D6; }
.heloc-use-panel { display: grid; grid-row: span 3; grid-template-rows: subgrid; scroll-snap-align: start; min-width: 0; text-align: left; scroll-margin-top: 140px; }
.heloc-use-panel img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; margin-bottom: 22px; }
.heloc-use-panel h3 { font: 500 1.125rem/1.4 var(--bs-font-sans-serif); margin: 0 0 10px; color: #171717; }
.heloc-use-panel p { color: #626262; font-size: .9375rem; line-height: 1.7; margin: 0; }
.heloc-use-panel:focus-visible { outline: 2px solid #9A7430; outline-offset: 8px; border-radius: 16px; }


.heloc-page #calculadora { background: #F7F4EE; padding-top: 30px; }
.heloc-calculator { padding: 48px; border-radius: 28px; background: #fff; border: 1px solid #E7E1D6; gap: 48px; }
.heloc-page .heloc-faq-section { background: #fff; }
.heloc-faq-section .loan-faq-card { background: #F7F4EE; border-color: #E7E1D6; border-radius: 16px; }
.heloc-faq-section .loan-faq-card[open] { background: #fff; border-color: #C49742; }
.heloc-page .heloc-final { background: #fff; }
.heloc-final-panel { border-radius: 28px; }
.heloc-final-panel .heloc-cta { background: #ECD085; color: #171717; border-color: #ECD085; }
.heloc-page .heloc-disclosures { background: #fff; border-top: 1px solid #e7e1d6; color: #6b6b6b; padding-top: 32px; }
.heloc-disclosures h2 { color: #606060; font-size: 1rem; font-weight: 400; }
.heloc-disclosures strong { font-weight: 500; }
.heloc-disclosures a { color: #666; text-decoration-color: #aaa; }
.heloc-disclosures a:hover, .heloc-disclosures a:focus-visible { color: #292722; }
@media (max-width: 767px) {
    .heloc-use-panels { column-gap: 20px; }
    .heloc-use-panel img { margin-bottom: 18px; }
    .heloc-calculator { padding: 24px 18px; gap: 32px; }
}

.heloc-uses-nav { justify-content: flex-end; margin-bottom: 20px; }
.heloc-use-panels.has-drag-cursor, .heloc-use-panels.has-drag-cursor * { cursor: none; }
.heloc-use-panels.is-dragging { scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.heloc-use-panel img { -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .heloc-use-panels { scroll-behavior: auto; } }
.heloc-use-section.heloc-benefits-enhanced .heloc-use-panels { scrollbar-width: none; }
.heloc-use-section.heloc-benefits-enhanced .heloc-use-panels::-webkit-scrollbar { display: none; }

.heloc-use-panels { padding-inline: 28px; scroll-padding-inline: 28px; }
.heloc-use-explorer > .heloc-uses-nav,
.heloc-use-explorer > .heloc-benefits-progress { max-width: 1120px; margin-left: auto; margin-right: auto; width: calc(100% - 56px); }
@media (max-width: 767px) { .heloc-use-panels { padding-inline: 22px; scroll-padding-inline: 22px; } }

/* Keep phone layouts focused on the overview, uses and application. */
@media (max-width: 767.98px) {
    .heloc-page .heloc-comparison,
    .heloc-page #calculadora,
    .heloc-page .heloc-process-visual { display: none; }
}

.heloc-page .heloc-use-section,
.heloc-page .heloc-faq-section { border-top: 1px solid #F7F4EE; }
