/**
 * TitleThrive Calculator v0.29.0
 * All calculator styles in one external file — immune to wpautop corruption.
 * Scoped to .tt-calc-container for theme-proofing.
 * Colors use var(--tt-*) design tokens defined below.
 */

/* ============================================================
   Design tokens — global fallback for modal, scoped for calculator
   ============================================================ */
:root {
    --tt-primary: #005f8d;
    --tt-primary-hover: #004c70;
    --tt-primary-focus: #003f61;
    --tt-accent-green: #00a32a;
}

.tt-calc-container {
    --tt-primary: #005f8d;
    --tt-primary-hover: #004c70;
    --tt-primary-focus: #003f61;
    --tt-accent-green: #00a32a;
    --tt-text: #333;
    --tt-text-muted: #666;
    --tt-border: #ddd;
    --tt-bg-light: #f3f9fd;
    --tt-bg-surface: #fff;
    --tt-scroll-offset: 80px;
}

/* ============================================================
   View mode switching
   IMPORTANT: > combinator requires .tt-calc-view-inputs and
   .tt-calc-view-results to be direct children of .tt-calc-container.
   Do not wrap in intermediate divs.
   ============================================================ */
.tt-calc-container.tt-mode-inputs > .tt-calc-view-inputs {
    display: block;
}
.tt-calc-container.tt-mode-inputs > .tt-calc-view-results {
    display: none;
}
.tt-calc-container.tt-mode-results > .tt-calc-view-inputs {
    display: none;
}
.tt-calc-container.tt-mode-results > .tt-calc-view-results {
    display: block;
}

/* ============================================================
   Container layout + typography
   ============================================================ */
.tt-calc-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--tt-text, #333);
    scroll-margin-top: var(--tt-scroll-offset, 80px);
}

/* ============================================================
   Button normalization — strips theme interference on CTA buttons
   ============================================================ */
.tt-calc-container .tt-calc-btn,
.tt-calc-container button.tt-calc-btn,
.tt-calc-container a.tt-calc-btn {
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    text-transform: none;
    text-decoration: none;
    letter-spacing: normal;
    background-image: none;
    font-family: inherit;
}

/* ============================================================
   Theme-proofing: override bare-element selectors from themes
   ============================================================ */
.tt-calc-container input[type="text"],
.tt-calc-container input[type="number"],
.tt-calc-container input[type="date"],
.tt-calc-container input[type="tel"] {
    color: var(--tt-text, #333);
    font-size: 15px;
    font-family: inherit;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    box-sizing: border-box;
    width: 100%;
}
.tt-calc-container select {
    color: var(--tt-text, #333);
    font-size: 15px;
    font-family: inherit;
    background-color: #fff;
    border: 1px solid #ccc;
    border-style: solid;
    border-radius: 6px;
    padding: 10px 12px;
    box-sizing: border-box;
    width: 100%;
}
.tt-calc-container input[type="text"]:focus,
.tt-calc-container input[type="number"]:focus,
.tt-calc-container input[type="date"]:focus,
.tt-calc-container input[type="tel"]:focus,
.tt-calc-container select:focus {
    border-color: var(--tt-primary, #005f8d);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 95, 141, 0.15);
}
.tt-calc-container input[type="checkbox"] {
    font-family: inherit;
}
.tt-calc-container label {
    color: var(--tt-text, #333);
    font-family: inherit;
}

/* ============================================================
   Form layout
   ============================================================ */
.tt-calc-header h3 {
    margin-top: 0;
}
.tt-calc-form-row {
    margin-bottom: 15px;
}
.tt-calc-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.tt-calc-form-row input[type="text"],
.tt-calc-form-row input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.tt-calc-container .tt-calc-submit {
    background-color: var(--tt-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.tt-calc-container .tt-calc-submit:hover {
    background-color: var(--tt-primary-hover);
}

/* ============================================================
   Loading / Error states
   ============================================================ */
.tt-calc-loading {
    padding: 10px;
    text-align: center;
    color: #666;
}
.tt-calc-error {
    padding: 10px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    margin-top: 10px;
}

/* ============================================================
   Results table
   ============================================================ */
.tt-calc-results {
    margin-top: 30px;
}
.tt-calc-results h4 {
    margin-bottom: 15px;
}
.tt-calc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
.tt-calc-results-table th,
.tt-calc-results-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.tt-calc-results-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}
.tt-calc-results-table tr.tt-calc-total {
    font-weight: bold;
    background-color: #f9f9f9;
}
.tt-calc-results-table .tt-calc-amount {
    text-align: right;
}

/* Cell-level classes */
.tt-calc-results-table .tt-cell-label {
    text-align: left;
    padding: 6px 12px;
}
.tt-calc-results-table .tt-cell-amount {
    text-align: right;
    padding: 6px 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tt-calc-results-table .tt-cell-indent {
    padding-left: 20px;
}
.tt-calc-results-table .tt-cell-header {
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid var(--tt-primary);
}
.tt-calc-results-table .tt-cell-grand {
    padding: 12px;
    font-size: 16px;
}
.tt-calc-results-table .tt-cell-note {
    font-size: 11px;
    color: #666;
    padding: 2px 12px;
    font-style: italic;
    padding-left: 20px;
}
.tt-calc-results-table .tt-cell-discount {
    color: #00a32a;
    font-style: italic;
}

/* Prevent theme interference on thead */
.tt-calc-results-table thead th {
    background: transparent;
}

/* Grand total top border */
.tt-calc-results-table .tt-calc-grand-total td {
    border-top: 3px solid var(--tt-primary);
}

/* Subtotal row cell padding */
.tt-calc-results-table .tt-calc-subtotal-row .tt-cell-label,
.tt-calc-results-table .tt-calc-subtotal-row .tt-cell-amount {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Section header + subtotal in renderSection path */
.tt-calc-results-table .tt-calc-section-header .tt-cell-label {
    background-color: #f0f0f1;
    font-weight: 600;
    padding: 10px 8px;
    border-top: 1px solid #dcdcde;
}
.tt-calc-results-table .tt-calc-subtotal .tt-cell-label,
.tt-calc-results-table .tt-calc-subtotal .tt-cell-amount {
    font-weight: 600;
    padding: 8px 12px;
    background-color: #f9f9f9;
}

/* Overflow safety net (class-toggled by JS) */
.tt-calc-results.tt-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* Category grouping styles */
.tt-calc-category-header td {
    background-color: #f5f7fb;
    border-top: 2px solid var(--tt-primary);
    font-weight: 600;
    font-size: 13px;
    color: #222;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 8px 12px;
}

.tt-calc-subtotal-row td {
    background-color: #fafafa;
    font-weight: 600;
    border-top: 1px solid #d0d0d0;
    padding: 10px 12px;
}

.tt-calc-grand-total td {
    background-color: #fffaf0;
    border-top: 2px solid var(--tt-primary);
    font-size: 16px;
    font-weight: 700;
    padding: 12px;
}

/* ============================================================
   Disclaimers
   ============================================================ */
.tt-calc-disclaimer {
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    margin: 14px 0 18px;
    max-width: 900px;
}
.tt-calc-disclaimer--inputs {
    margin-top: 18px;
}
.tt-calc-disclaimer--results {
    margin-top: 20px;
}

/* ============================================================
   Results header and Edit Inputs button
   ============================================================ */
.tt-calc-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.tt-calc-results-title h4 {
    margin: 0 0 4px;
}
.tt-calc-results-context {
    margin: 0;
    font-size: 13px;
    color: #555;
}
.tt-calc-container .tt-calc-edit-inputs {
    background: none;
    border: none;
    color: var(--tt-primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

/* ============================================================
   Summary cards
   ============================================================ */
.tt-calc-summary-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.tt-summary-card {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    background-color: #fff;
}
.tt-summary-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.tt-summary-value {
    font-size: 18px;
    font-weight: 700;
}

/* ============================================================
   Payment Overview Bar
   ============================================================ */
.tt-payment-overview {
    border: 2px solid var(--tt-primary);
    background: var(--tt-bg-light);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.tt-payment-overview__header {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--tt-primary);
}
.tt-payment-overview__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.tt-payment-overview__col {
    text-align: center;
}
.tt-payment-overview__label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.tt-payment-overview__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--tt-primary);
}
.tt-payment-overview__savings {
    text-align: center;
    font-size: 13px;
    color: #00a32a;
    padding: 6px 0 0;
    font-weight: 600;
}

/* ============================================================
   Endorsement trigger badges
   ============================================================ */
.tt-endorsement-badge {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
.tt-badge-mandatory {
    background: #fef0e5;
    color: #b35900;
    border: 1px solid #e8a87c;
}
.tt-badge-auto {
    background: #e8f0fe;
    color: #1a56db;
    border: 1px solid #93b4f5;
}
.tt-badge-suggested {
    background: #fef9e7;
    color: #7d6608;
    border: 1px solid #f0d761;
}

/* ============================================================
   Disclosures section
   ============================================================ */
.tt-disclosures-section {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}
.tt-calc-container .tt-disclosures-toggle {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--tt-primary);
    cursor: pointer;
    padding: 8px 0;
}
.tt-calc-container .tt-disclosures-toggle:hover {
    text-decoration: underline;
}
.tt-disclosures-content {
    margin-top: 12px;
}
.tt-note-card {
    background: #f8f9fa;
    border-left: 3px solid var(--tt-primary);
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
}
.tt-note-educational { border-left-color: var(--tt-primary); }
.tt-note-warning { border-left-color: #d63638; background: #fef0f0; }
.tt-note-notice { border-left-color: #dba617; background: #fef9e7; }
.tt-fee-disclosures-header {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #333;
}
.tt-fee-disclosures-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}
.tt-fee-disclosures-list li {
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

/* ============================================================
   Role Breakdown Section
   ============================================================ */
.tt-role-breakdown {
    margin-bottom: 24px;
}
.tt-role-breakdown__header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--tt-text);
    border-bottom: 2px solid var(--tt-primary);
    display: inline-block;
    padding-bottom: 4px;
}
.tt-role-breakdown__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.tt-role-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tt-role-card__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}
.tt-role-card__body {
    display: flex;
    gap: 20px;
    align-items: center;
}
.tt-role-card__chart-wrap {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
}
.tt-role-card__chart-wrap canvas {
    width: 100%;
    height: 100%;
}
.tt-role-card__legend {
    flex: 1;
    font-size: 13px;
}
.tt-role-card__legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.tt-role-card__legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}
.tt-role-card__legend-label {
    font-weight: 500;
    margin-right: 6px;
    color: #333;
}
.tt-role-card__legend-value {
    color: #555;
    margin-left: auto;
}

/* ============================================================
   Button modernization — scoped for theme-proofing
   ============================================================ */
.tt-calc-container .tt-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
    border: 1px solid transparent;
    min-width: 150px;
    height: 44px;
    box-sizing: border-box;
}
.tt-calc-container .tt-calc-btn-primary {
    background-color: var(--tt-primary);
    border-color: var(--tt-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.tt-calc-container .tt-calc-btn-primary:hover {
    background-color: var(--tt-primary-hover);
    border-color: var(--tt-primary-hover);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}
.tt-calc-container .tt-calc-btn-secondary {
    background-color: var(--tt-bg-surface);
    border-color: var(--tt-primary);
    color: var(--tt-primary);
}
.tt-calc-container .tt-calc-btn-secondary:hover {
    background-color: #e9f3fb;
}
.tt-calc-container .tt-calc-btn:focus-visible {
    outline: 2px solid var(--tt-primary-focus);
    outline-offset: 2px;
}
.tt-calc-container .tt-calc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 24px;
    align-items: stretch;
    justify-content: flex-start;
}
.tt-calc-container .tt-calc-actions .tt-calc-btn {
    margin: 0 !important;
    float: none !important;
    vertical-align: middle;
    min-width: auto;
    padding: 10px 16px;
    box-shadow: none !important;
}

/* ============================================================
   Quote email form (portal "Email to Client")
   ============================================================ */
.tt-calc-email-form {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    box-sizing: border-box;
    max-width: 100%;
}
.tt-calc-email-form__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tt-calc-email-form__fields input,
.tt-calc-email-form__fields textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.tt-calc-email-form__actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.tt-calc-email-form__actions .tt-calc-btn {
    min-width: 100px;
}

/* ============================================================
   Quote share modal (portal "Share Link Created")
   ============================================================ */
.tt-calc-share-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tt-calc-share-modal__backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
.tt-calc-share-modal__content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.tt-calc-share-modal__content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.tt-calc-share-modal__content p {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
}
.tt-calc-share-modal__url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.tt-calc-share-modal__url-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
    background: #f9f9f9;
    min-width: 0;
}
.tt-calc-share-modal .tt-calc-btn {
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    border: 2px solid;
    transition: background-color 0.15s, border-color 0.15s;
}
.tt-calc-share-modal .tt-calc-btn-primary {
    background-color: var(--tt-brand-color, #0b5394);
    border-color: var(--tt-brand-color, #0b5394);
    color: #fff;
}
.tt-calc-share-modal .tt-calc-btn-primary:hover {
    opacity: 0.9;
}
.tt-calc-share-modal .tt-calc-btn-secondary {
    background-color: #fff;
    border-color: var(--tt-brand-color, #0b5394);
    color: var(--tt-brand-color, #0b5394);
}
.tt-calc-share-modal .tt-calc-btn-secondary:hover {
    background-color: #f0f7ff;
}

/* ============================================================
   Desktop two-column form layout
   ============================================================ */
@media (min-width: 1024px) {
    .tt-calc-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .tt-calc-form-row {
        margin-bottom: 16px;
        width: 100%;
    }
}

/* ============================================================
   Responsive breakpoints — layout
   ============================================================ */
@media (max-width: 900px) {
    .tt-role-breakdown__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tt-payment-overview__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .tt-payment-overview__col {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .tt-calc-form {
        display: block;
    }
    .tt-calc-form-row {
        width: 100%;
    }
    .tt-calc-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .tt-calc-summary-overview {
        grid-template-columns: 1fr;
    }
    .tt-calc-side-summary {
        grid-template-columns: 1fr;
    }
    .tt-calc-container .tt-calc-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .tt-calc-container .tt-calc-actions .tt-calc-btn {
        width: 100%;
        justify-content: center;
    }
    .tt-role-card__body {
        flex-direction: column;
        align-items: flex-start;
    }
    .tt-role-card__chart-wrap {
        width: 160px;
        height: 160px;
        margin: 0 auto;
    }
    .tt-calc-disclaimer {
        font-size: 11px;
        margin: 12px 0 16px;
    }
}

/* ============================================================
   Responsive breakpoints — results table
   ============================================================ */
@media (max-width: 768px) {
    .tt-calc-results-table th,
    .tt-calc-results-table td {
        padding: 6px 8px;
        font-size: 13px;
    }
    .tt-calc-results-table .tt-cell-header {
        font-size: 12px;
        padding: 8px;
        white-space: nowrap;
        line-height: 1.2;
    }
    .tt-calc-results-table .tt-cell-indent {
        padding-left: 14px;
    }
    .tt-calc-results-table .tt-cell-grand {
        font-size: 14px;
        padding: 8px;
    }
    .tt-calc-results-table .tt-cell-note {
        font-size: 10px;
        padding: 2px 8px 2px 14px;
    }
    /* 3-col column widths */
    .tt-calc-results-table.tt-cols-3 thead th:first-child {
        width: 55%;
    }
    .tt-calc-results-table.tt-cols-3 thead th:nth-child(2),
    .tt-calc-results-table.tt-cols-3 thead th:nth-child(3) {
        width: 22.5%;
    }
    /* Amount cells stay nowrap + slightly larger */
    .tt-calc-results-table td.tt-cell-amount {
        font-size: 14px;
        font-weight: 600;
    }
    /* Subtotal & grand total rows */
    .tt-calc-subtotal-row td,
    .tt-calc-grand-total td {
        padding: 6px 8px;
        font-size: 14px;
    }
    /* Category header rows */
    .tt-calc-category-header td {
        font-size: 13px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .tt-calc-results {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tt-calc-results-table,
    .tt-calc-results-table th,
    .tt-calc-results-table td {
        box-sizing: border-box;
    }
    .tt-calc-results-table {
        table-layout: auto;
        border-collapse: collapse;
        width: 100%;
    }
    /* Uniform fonts */
    .tt-calc-results-table th,
    .tt-calc-results-table td {
        padding: 5px 6px;
        font-size: 13px;
        line-height: 1.3;
    }
    /* Header cells */
    .tt-calc-results-table .tt-cell-header {
        font-size: 12px;
        padding: 6px 6px;
        white-space: nowrap;
    }
    /* First-column labels: wrap long text, but keep a reasonable min width */
    .tt-calc-results-table td.tt-cell-label:first-child,
    .tt-calc-results-table th.tt-cell-label:first-child {
        overflow: hidden;
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
        width: 48%;
    }
    /* All label cells */
    .tt-calc-results-table .tt-cell-label {
        padding: 5px 6px;
    }
    /* Amount cells — match label size, reset bold from 768px bp */
    .tt-calc-results-table .tt-cell-amount {
        padding: 4px 5px;
        font-size: 13px;
        font-weight: normal;
        white-space: nowrap;
    }
    /* Reduced indent */
    .tt-calc-results-table .tt-cell-indent {
        padding-left: 10px;
    }
    /* Grand total — slightly larger to stand out */
    .tt-calc-results-table .tt-cell-grand {
        font-size: 14px;
        padding: 6px 6px;
    }
    /* Notes */
    .tt-calc-results-table .tt-cell-note {
        font-size: 10px;
        padding: 2px 6px 2px 10px;
    }
    /* Category headers */
    .tt-calc-category-header td {
        font-size: 12px;
        padding: 5px 6px;
    }
}

@media (max-width: 400px) {
    .tt-calc-results-table th,
    .tt-calc-results-table td {
        font-size: 12px;
        padding: 4px 4px;
    }
}

/* ============================================================
   Advanced panel (disclosure toggle)
   ============================================================ */
.tt-calc-container .tt-calc-advanced-toggle {
    background: none;
    border: 1px solid var(--tt-border, #ddd);
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--tt-text, #333);
    border-radius: 4px;
    margin-bottom: 10px;
    transition: background-color 0.2s ease;
}
.tt-calc-container .tt-calc-advanced-toggle:hover {
    background-color: #f5f5f5;
}
.tt-calc-container .tt-calc-advanced-toggle:focus {
    outline: 2px solid var(--tt-primary, #005f8d);
    outline-offset: 2px;
}
.tt-calc-toggle-icon {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
}
.tt-calc-advanced-toggle[aria-expanded="true"] .tt-calc-toggle-icon {
    transform: rotate(90deg);
}
.tt-calc-advanced-panel {
    padding: 15px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-bottom: 15px;
}
.tt-calc-advanced-panel[aria-hidden="true"] {
    display: none;
}
.tt-calc-advanced-panel .tt-calc-form-row {
    margin-bottom: 12px;
}
.tt-calc-advanced-panel label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}
.tt-calc-advanced-panel input[type="checkbox"] {
    margin-right: 8px;
}
.tt-calc-advanced-panel input[type="number"] {
    width: 100px;
}
.tt-calc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Mapbox address search
   ============================================================ */
.tt-calc-address-search { margin-bottom: 8px; }
.tt-calc-address-search label {
    display: block; margin-bottom: 6px;
    font-weight: 600; font-size: 14px;
}
.tt-calc-address-input-wrap {
    position: relative;
}
#tt-calc-address-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
#tt-calc-address-input:focus {
    border-color: var(--tt-primary, #005f8d);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 95, 141, 0.15);
}
.tt-calc-address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
}
.tt-calc-address-suggestions li {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}
.tt-calc-address-suggestions li:hover,
.tt-calc-address-suggestions li[aria-selected="true"] {
    background: var(--tt-bg-light, #f3f9fd);
    color: var(--tt-primary, #005f8d);
}
.tt-calc-address-suggestions li .tt-addr-secondary {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}
.tt-calc-pre-step__powered-by {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}
.tt-calc-zip-fallback-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--tt-primary, #005f8d);
    cursor: pointer;
}

/* ============================================================
   Pre-step / context-first entry
   ============================================================ */
.tt-calc-pre-step {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 0;
}
.tt-calc-pre-step__heading {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--tt-text, #333);
}
.tt-calc-pre-step__helper {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--tt-text-muted, #666);
    line-height: 1.4;
}
.tt-calc-jurisdiction-confirm {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.4;
}
.tt-calc-jurisdiction-confirm__check {
    color: var(--tt-accent-green, #00a32a);
    font-weight: 700;
    font-size: 16px;
}
.tt-calc-jurisdiction-confirm__text {
    color: var(--tt-text, #333);
    font-weight: 500;
}
.tt-calc-pre-step__error {
    margin: 12px 0;
    font-size: 14px;
    color: #c62828;
}
.tt-calc-container .tt-calc-zip-continue {
    margin-top: 8px;
    min-width: 120px;
}
.tt-calc-jurisdiction-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--tt-bg-light, #f3f9fd);
    border: 1px solid #d0e3f0;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.tt-calc-jurisdiction-bar__change {
    color: var(--tt-primary, #005f8d);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}
.tt-calc-jurisdiction-bar__change:hover {
    color: var(--tt-primary-hover, #004c70);
}

/* ============================================================
   Welcome Card — shared landing for quote calc & net sheet
   ============================================================ */
.tt-welcome-card {
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 12px;
    padding: 32px 28px 28px;
    text-align: center;
    background: var(--tt-bg-surface, #fff);
}
.tt-welcome-card__heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--tt-text, #333);
    margin: 0 0 6px;
}
.tt-welcome-card__subtext {
    font-size: 15px;
    color: var(--tt-text-muted, #666);
    margin: 0 0 16px;
}
.tt-welcome-card__chips {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 4px;
}
.tt-welcome-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tt-welcome-card__check {
    color: var(--tt-accent-green, #1a7f37);
}
.tt-welcome-card__chip-sep {
    color: var(--tt-border, #ccc);
}
.tt-welcome-card__disclaimer {
    font-size: 12px;
    color: var(--tt-text-muted, #888);
    margin: 14px 0 0;
}
.tt-welcome-card__input-area {
    text-align: left;
    margin-top: 20px;
}

/* Widen pre-step to accommodate card padding */
.tt-calc-pre-step {
    max-width: 540px;
}

/* Net sheet standalone card width */
.tt-net-sheet .tt-welcome-card {
    max-width: 540px;
}

@media (max-width: 480px) {
    .tt-welcome-card {
        padding: 24px 20px;
    }
    .tt-welcome-card__heading {
        font-size: 19px;
    }
    .tt-welcome-card__chips {
        font-size: 12px;
    }
}

/* ============================================================
   Wizard UI styles
   ============================================================ */
.tt-calc-hidden {
    display: none;
}

/* Hide classic submit when wizard is active */
.tt-calc-wizard-active .tt-calc-submit {
    display: none;
}

/* Wizard container */
.tt-wizard {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

/* Progress indicator */
.tt-wizard-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}
.tt-calc-container .tt-wizard-progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--tt-border, #ddd);
    background: var(--tt-bg-surface, #fff);
    color: #888;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.tt-wizard-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    background: #e0e0e0;
    color: #888;
}
.tt-wizard-step-label {
    font-weight: 500;
}

/* Active step */
.tt-calc-container .tt-wizard-step-active {
    background: var(--tt-bg-light, #f3f9fd);
    border-color: var(--tt-primary, #005f8d);
    color: var(--tt-primary, #005f8d);
}
.tt-calc-container .tt-wizard-step-active .tt-wizard-step-number {
    background: var(--tt-primary, #005f8d);
    color: #fff;
}
.tt-wizard-step-active .tt-wizard-step-label {
    font-weight: 600;
}

/* Completed step */
.tt-calc-container .tt-wizard-step-completed {
    background: #f0faf0;
    border-color: var(--tt-accent-green, #00a32a);
    color: var(--tt-accent-green, #00a32a);
}
.tt-calc-container .tt-wizard-step-completed .tt-wizard-step-number {
    background: var(--tt-accent-green, #00a32a);
    color: #fff;
}

/* Completed step — clickable */
.tt-calc-container .tt-wizard-step-completed {
    cursor: pointer;
}
.tt-calc-container .tt-wizard-step-completed:hover {
    background: #e4f4e4;
    border-color: #009126;
}
.tt-calc-container .tt-wizard-step-completed:focus-visible {
    outline: 2px solid #009126;
    outline-offset: 2px;
}

/* Future step */
.tt-calc-container .tt-wizard-step-future {
    opacity: 0.6;
    cursor: default;
}

/* Progress step button reset */
.tt-calc-container .tt-wizard-progress-step {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
}

/* Wizard content area */
.tt-wizard-content {
    padding: 16px 0;
}
.tt-wizard-step-heading {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--tt-text, #333);
}

/* Wizard field */
.tt-wizard-field {
    margin-bottom: 16px;
}
.tt-wizard-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tt-text, #333);
}
.tt-wizard-required {
    color: #c00;
}
.tt-wizard-field input[type="text"],
.tt-wizard-field input[type="number"],
.tt-wizard-field input[type="date"],
.tt-wizard-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.tt-wizard-field input:focus,
.tt-wizard-field select:focus {
    border-color: var(--tt-primary, #005f8d);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 95, 141, 0.15);
}
.tt-wizard-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.tt-wizard-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Help text */
.tt-wizard-help {
    font-size: 13px;
    color: var(--tt-text-muted, #666);
    margin-top: 4px;
    line-height: 1.4;
}

/* Field error state */
.tt-wizard-field-error input,
.tt-wizard-field-error select {
    border-color: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.15);
}
.tt-wizard-error-msg {
    font-size: 13px;
    color: #d63638;
    margin-top: 4px;
    min-height: 0;
}
.tt-wizard-error-msg:empty {
    display: none;
}

/* Nav buttons */
.tt-calc-container .tt-wizard-nav {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
}

/* ============================================================
   Wizard mobile adjustments
   ============================================================ */
@media (max-width: 600px) {
    .tt-wizard-progress {
        gap: 6px;
    }
    .tt-calc-container .tt-wizard-progress-step {
        padding: 4px 8px;
        font-size: 12px;
    }
    .tt-wizard-step-label {
        display: none;
    }
    .tt-calc-container .tt-wizard-nav {
        flex-direction: column;
    }
    .tt-calc-container .tt-wizard-nav .tt-calc-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SELLER NET SHEET (v0.31.0)
   All rules scoped under .tt-net-sheet
   ═══════════════════════════════════════════════════════════════════ */

/* ── Pre-step (ZIP entry) ──────────────────────────────────────── */
.tt-net-sheet .tt-net-pre-step {
    padding: 24px 0;
}
.tt-net-sheet .tt-net-pre-step__label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}
.tt-net-sheet .tt-net-pre-step__row {
    display: flex;
    gap: 8px;
    max-width: 320px;
}
.tt-net-sheet .tt-net-pre-step__input {
    flex: 1;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
}
.tt-net-sheet .tt-net-jurisdiction-confirm {
    margin-top: 8px;
}
.tt-net-sheet .tt-net-jurisdiction-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--tt-accent-green, #2e7d32);
}
.tt-net-sheet .tt-net-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

/* ── Form layout — force single column (override theme flex/grid) ── */
.tt-net-sheet .tt-calc-form {
    display: block !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    grid-template-columns: unset !important;
    max-width: 600px;
}
/* ── Primary/Secondary input hierarchy ─────────────────────────── */
.tt-net-sheet .tt-net-primary {
    margin-bottom: 24px;
    width: 100%;
}
.tt-net-sheet .tt-net-secondary {
    margin-bottom: 24px;
    width: 100%;
}
.tt-net-sheet .tt-net-field-group {
    margin-bottom: 16px;
}
.tt-net-sheet .tt-net-field-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--tt-text, #333);
}

/* ── Proration help icon + panel ──────────────────────────── */

.tt-net-proration-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--tt-text-muted, #787c82);
    cursor: pointer;
    vertical-align: middle;
    margin-left: 4px;
    border-radius: 50%;
    transition: color 0.15s ease;
}

.tt-net-proration-help-btn:hover,
.tt-net-proration-help-btn:focus-visible {
    color: var(--tt-primary, #0073aa);
}

.tt-net-proration-help-btn:focus-visible {
    outline: 2px solid var(--tt-primary, #0073aa);
    outline-offset: 2px;
}

.tt-net-proration-help {
    background: var(--tt-bg-subtle, #f6f7f7);
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tt-text, #333);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tt-net-proration-help[hidden] {
    display: none;
}

.tt-net-proration-help--visible {
    opacity: 1;
    transform: translateY(0);
}

.tt-net-proration-help p {
    margin: 0 0 8px;
}

.tt-net-proration-help p:last-child {
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .tt-net-proration-help {
        transition: none;
    }
}
.tt-net-sheet .tt-net-field-group input[type="text"],
.tt-net-sheet .tt-net-field-group input[type="number"] {
    width: 100%;
    max-width: 320px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
    box-sizing: border-box;
}
.tt-net-sheet .tt-required {
    color: #d63638;
}

/* ── Adjustments toggle ────────────────────────────────────────── */
.tt-net-sheet .tt-net-section-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tt-text, #333);
    cursor: pointer;
    user-select: none;
    padding: 10px 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.tt-net-sheet .tt-net-section-toggle::before {
    content: '\25B8';
    transition: transform 0.15s;
}
.tt-net-sheet .tt-net-section-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}
.tt-net-sheet .tt-net-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}
.tt-net-sheet .tt-net-section-content[aria-hidden="true"] {
    max-height: 0;
    opacity: 0;
}
.tt-net-sheet .tt-net-section-content[aria-hidden="false"] {
    opacity: 1;
}

/* ── Payoff / proration repeatable rows ────────────────────────── */
.tt-net-sheet .tt-net-payoff-row,
.tt-net-sheet .tt-net-proration-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.tt-net-sheet .tt-net-payoff-row input,
.tt-net-sheet .tt-net-proration-row input {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
    box-sizing: border-box;
}
.tt-net-sheet .tt-net-payoff-label {
    flex: 3;
    min-width: 140px;
}
.tt-net-sheet .tt-net-payoff-label::placeholder,
.tt-net-sheet .tt-net-payoff-amount::placeholder {
    color: #b0b0b0;
    font-style: italic;
}
.tt-net-sheet .tt-net-proration-label {
    flex: 3;
    min-width: 160px;
    font-size: 13px;
}
.tt-net-sheet .tt-net-payoff-amount {
    width: 120px;
    flex-shrink: 0;
}
.tt-net-sheet .tt-net-proration-amount {
    width: 100px;
    flex-shrink: 0;
}
.tt-net-sheet .tt-net-proration-type {
    padding: 6px 4px;
    font-size: 12px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
    width: 80px;
    flex-shrink: 0;
}

/* ── Help icon tooltip ────────────────────────────────────────── */
.tt-net-sheet .tt-assist-help,
.tt-assist-panel .tt-assist-help {
    display: inline-block;
    position: relative;
    cursor: help;
    color: var(--tt-primary, #0073aa);
    font-size: 14px;
    font-style: normal;
    vertical-align: middle;
    margin-left: 2px;
}
.tt-net-sheet .tt-assist-help .tt-tooltip,
.tt-assist-panel .tt-assist-help .tt-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    width: 240px;
    white-space: normal;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: none;
}
.tt-net-sheet .tt-assist-help .tt-tooltip::after,
.tt-assist-panel .tt-assist-help .tt-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}
.tt-net-sheet .tt-assist-help:hover .tt-tooltip,
.tt-assist-panel .tt-assist-help:hover .tt-tooltip,
.tt-net-sheet .tt-assist-help:focus .tt-tooltip,
.tt-assist-panel .tt-assist-help:focus .tt-tooltip,
.tt-net-sheet .tt-assist-help.tt-tooltip--visible .tt-tooltip,
.tt-assist-panel .tt-assist-help.tt-tooltip--visible .tt-tooltip {
    display: block;
}
.tt-net-sheet .tt-net-remove-row {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
.tt-net-sheet .tt-net-remove-row:hover {
    color: #d63638;
}
.tt-net-sheet .tt-net-add-row {
    font-size: 13px;
    color: var(--tt-primary, #0073aa);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
}
.tt-net-sheet .tt-net-add-row:hover {
    text-decoration: underline;
}

/* ── Submit button ─────────────────────────────────────────────── */
.tt-net-sheet .tt-net-submit {
    margin-top: 8px;
}

/* ── Hero (results) ────────────────────────────────────────────── */
.tt-net-sheet .tt-net-hero {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 24px;
    background: var(--tt-bg-subtle, #fafafa);
    border-radius: 8px;
}
.tt-net-sheet .tt-net-hero__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tt-text-muted, #666);
    margin-bottom: 8px;
}
.tt-net-sheet .tt-net-hero__amount {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    outline: none;
}
.tt-net-sheet .tt-net-hero__amount--positive {
    color: var(--tt-accent-green, #1b5e20);
}
.tt-net-sheet .tt-net-hero__amount--negative {
    color: #b71c1c;
}
.tt-net-sheet .tt-net-hero__summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--tt-text-muted, #666);
    margin-bottom: 8px;
}
.tt-net-sheet .tt-net-hero__jurisdiction {
    font-size: 13px;
    color: var(--tt-text-muted, #666);
}
.tt-net-sheet .tt-net-hero__county,
.tt-net-sheet .tt-net-jurisdiction-badge__county {
    font-size: 0.85em;
    opacity: 0.7;
}

/* ── Agent Card (shared across quote and net sheet) ──────────── */
.tt-net-agent-card {
    margin: 0 0 20px;
    padding: 0 8px;
}
.tt-net-sheet .tt-net-agent-card {
    margin-top: -8px;
}
.tt-net-agent-card__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    break-inside: avoid;
}
.tt-net-agent-card__photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}
.tt-net-agent-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}
.tt-net-agent-card__photo--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0073aa;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}
.tt-net-agent-card__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tt-text-muted, #999);
    margin-bottom: 1px;
}
.tt-net-agent-card__name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tt-net-agent-card__title {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tt-net-agent-card__info {
    min-width: 0;
}
.tt-net-agent-card__contact {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.tt-net-agent-card__logo {
    margin-left: auto;
    flex-shrink: 0;
    max-width: 120px;
    max-height: 48px;
}
.tt-net-agent-card__logo img {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    display: block;
}

@media (max-width: 480px) {
    .tt-net-agent-card__inner {
        padding: 12px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .tt-net-agent-card__photo {
        width: 44px;
        height: 44px;
    }
    .tt-net-agent-card__photo--initials {
        font-size: 18px;
    }
    .tt-net-agent-card__info {
        flex: 1 1 0;
        min-width: 0;
    }
    .tt-net-agent-card__name {
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .tt-net-agent-card__title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .tt-net-agent-card__contact {
        font-size: 11px;
    }
    .tt-net-agent-card__logo {
        flex: 0 0 100%;
        margin-left: 0;
        text-align: center;
        border-top: 1px solid #f0f0f0;
        padding-top: 10px;
        max-width: 100%;
    }
    .tt-net-agent-card__logo img {
        margin: 0 auto;
        max-width: 120px;
    }
}

/* ── Waterfall breakdown ───────────────────────────────────────── */
.tt-net-sheet .tt-net-breakdown {
    margin-bottom: 24px;
}
.tt-net-sheet .tt-net-section-block {
    margin-bottom: 4px;
}
.tt-net-sheet .tt-net-section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tt-text-muted, #666);
    padding: 10px 12px 6px;
    border-left: 3px solid var(--section-color, #666);
}
.tt-net-sheet .tt-net-item-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 12px 6px 20px;
}
.tt-net-sheet .tt-net-item-label {
    font-size: 14px;
    color: var(--tt-text, #333);
}
.tt-net-sheet .tt-net-item-amount {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.tt-net-sheet .tt-net-item-amount--deduction {
    color: var(--tt-text, #333);
}
.tt-net-sheet .tt-net-item-amount--credit {
    color: var(--tt-accent-green, #2e7d32);
}
.tt-net-sheet .tt-net-subtotal-row {
    display: flex;
    justify-content: flex-end;
    padding: 4px 12px 10px 20px;
    font-size: 13px;
    color: var(--tt-text-muted, #666);
}
.tt-net-sheet .tt-net-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 12px;
    border-top: 2px solid var(--tt-border, #ddd);
    font-size: 16px;
    font-weight: 700;
}

/* ── Results actions ───────────────────────────────────────────── */
.tt-net-sheet .tt-net-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0;
    align-items: stretch;
    justify-content: flex-start;
}
.tt-net-sheet .tt-net-actions .tt-calc-btn {
    min-width: auto;
    padding: 10px 16px;
    box-shadow: none !important;
}

/* ── Share Modal (v0.33.0) ──────────────────────────────────────── */
.tt-net-share-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tt-net-share-modal__backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
.tt-net-share-modal__content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.tt-net-share-modal__content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.tt-net-share-modal__desc {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
}
.tt-net-share-modal__url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.tt-net-share-modal__url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
    background: #f9f9f9;
}
.tt-net-share-modal__status {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    min-height: 18px;
}
.tt-net-share-modal__status--error {
    color: #d63638;
}

/* ── Email Form (v0.33.0) ───────────────────────────────────────── */
.tt-net-email-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}
.tt-net-email-form h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.tt-net-email-form__fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.tt-net-email-form__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.tt-net-email-form__field input,
.tt-net-email-form__field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.tt-net-email-form__actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.tt-net-email-form__status {
    font-size: 13px;
    min-height: 18px;
    color: #666;
}
.tt-net-email-form__status--error {
    color: #d63638;
}
.tt-net-email-form__status--success {
    color: #00a32a;
}

/* ── Commission agent inputs ───────────────────────────────────── */
.tt-net-sheet .tt-net-commission-group label {
    margin-bottom: 8px;
}
.tt-net-sheet .tt-net-commission-agents {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tt-net-sheet .tt-net-commission-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tt-net-sheet .tt-net-commission-row__label {
    min-width: 90px;
    font-size: 13px;
    color: var(--tt-text-secondary, #555);
}
.tt-net-sheet .tt-net-commission-pct {
    width: 60px;
    text-align: right;
}
.tt-net-sheet .tt-net-commission-row__sep {
    font-size: 13px;
    color: var(--tt-text-muted, #999);
}
.tt-net-sheet .tt-net-commission-amt {
    flex: 1;
    min-width: 80px;
    text-align: right;
}
.tt-net-sheet .tt-commission-total {
    font-size: 13px;
    color: var(--tt-text-muted, #666);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.tt-net-sheet .tt-commission-total__sep {
    color: var(--tt-text-muted, #999);
}
.tt-net-sheet .tt-commission-total__total {
    font-weight: 600;
}
@media (max-width: 480px) {
    .tt-net-sheet .tt-net-commission-row {
        flex-wrap: wrap;
    }
    .tt-net-sheet .tt-net-commission-row__label {
        width: 100%;
        min-width: unset;
    }
    .tt-net-sheet .tt-net-commission-pct {
        width: 50px;
    }
    .tt-net-sheet .tt-net-commission-amt {
        flex: 1;
        min-width: 80px;
    }
}

/* ── Mapbox Address Search (net sheet) ─────────────────────────── */
.tt-net-sheet .tt-net-address-search {
    margin-bottom: 12px;
}
.tt-net-sheet .tt-net-address-input-wrap {
    position: relative;
}
.tt-net-sheet .tt-net-address-input-wrap input {
    width: 100%;
    box-sizing: border-box;
}
.tt-net-sheet .tt-net-address-suggestions {
    position: absolute;
    z-index: 100;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0;
}
.tt-net-sheet .tt-net-address-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid #f0f0f0;
}
.tt-net-sheet .tt-net-address-suggestions li:last-child {
    border-bottom: none;
}
.tt-net-sheet .tt-net-address-suggestions li:hover,
.tt-net-sheet .tt-net-address-suggestions li[aria-selected="true"] {
    background: #f0f7ff;
}
.tt-net-sheet .tt-net-addr-secondary {
    font-size: 12px;
    color: var(--tt-text-muted, #888);
}
.tt-net-sheet .tt-net-zip-fallback-link {
    display: inline-block;
    font-size: 13px;
    color: var(--tt-text-muted, #666);
    margin-bottom: 8px;
}

/* ── Assist Calculator pill triggers ───────────────────────────── */
.tt-net-sheet .tt-net-assist-triggers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}
.tt-net-sheet .tt-assist-pill {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border: 1px solid var(--tt-primary, #0073aa);
    border-radius: 16px;
    background: transparent;
    color: var(--tt-primary, #0073aa);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.tt-net-sheet .tt-assist-pill:hover,
.tt-net-sheet .tt-assist-pill[aria-expanded="true"] {
    background: var(--tt-primary, #0073aa);
    color: #fff;
}

/* ── Assist Calculator inline panels ───────────────────────────── */
.tt-net-sheet .tt-assist-panel {
    background: var(--tt-bg-subtle, #f9f9f9);
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 6px;
    padding: 16px;
    margin: 8px 0 16px;
}
.tt-net-sheet .tt-assist-panel__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}
.tt-net-sheet .tt-assist-panel__row {
    margin-bottom: 8px;
}
.tt-net-sheet .tt-assist-panel__row label {
    font-size: 13px;
    font-weight: 400;
}
.tt-net-sheet .tt-assist-panel__row input,
.tt-net-sheet .tt-assist-panel__row select {
    margin-top: 4px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid var(--tt-border, #ddd);
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    max-width: 200px;
}
.tt-net-sheet .tt-assist-panel__preview {
    font-size: 15px;
    font-weight: 600;
    color: var(--tt-text, #333);
    padding: 8px 0;
}
.tt-net-sheet .tt-assist-panel__error {
    color: #d63638;
    font-size: 13px;
    margin: 4px 0;
}
.tt-net-sheet .tt-assist-panel__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.tt-net-sheet .tt-assist-btn-add {
    font-size: 13px;
    padding: 6px 14px;
}
.tt-net-sheet .tt-assist-btn-cancel {
    font-size: 13px;
    padding: 6px 14px;
}

/* ── Mode switching ────────────────────────────────────────────── */
.tt-net-sheet.tt-mode-results .tt-calc-view-inputs,
.tt-net-sheet.tt-mode-results .tt-net-pre-step {
    display: none;
}
.tt-net-sheet.tt-mode-inputs .tt-calc-view-results {
    display: none;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .tt-net-sheet .tt-net-payoff-row,
    .tt-net-sheet .tt-net-proration-row {
        flex-wrap: wrap;
    }
    .tt-net-sheet .tt-net-payoff-label,
    .tt-net-sheet .tt-net-proration-label {
        width: 100%;
    }
    .tt-net-sheet .tt-net-payoff-amount,
    .tt-net-sheet .tt-net-proration-amount {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .tt-net-sheet .tt-net-hero__amount {
        font-size: 30px;
    }
    .tt-net-sheet .tt-net-hero__summary {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .tt-net-sheet .tt-net-field-group input[type="text"],
    .tt-net-sheet .tt-net-field-group input[type="number"] {
        max-width: 100%;
    }
    .tt-net-sheet .tt-net-pre-step__row {
        max-width: 100%;
    }
    .tt-net-sheet .tt-assist-panel__row input,
    .tt-net-sheet .tt-assist-panel__row select {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .tt-net-sheet .tt-net-hero__amount {
        font-size: 26px;
    }
    .tt-net-sheet .tt-net-item-row {
        padding: 6px 8px 6px 12px;
    }
    .tt-net-sheet .tt-net-grand-total {
        padding: 12px 8px;
    }
}

/* ── Sale Price Slider ─────────────────────────────────────────── */
.tt-net-sheet .tt-net-slider {
    margin: 0 0 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f3f9fd 0%, #eef6fb 100%);
    border: 1px solid rgba(0, 115, 170, 0.12);
    border-radius: 10px;
}
.tt-net-slider__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.tt-net-slider__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tt-text-muted, #666);
}
.tt-net-slider__reset {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--tt-primary, #0073aa);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    animation: tt-sliderFadeIn 0.2s ease forwards;
}
.tt-net-slider__reset[style*="display: none"] { opacity: 0; }
.tt-net-slider__reset:hover { background: rgba(0, 115, 170, 0.08); }
.tt-net-slider__reset:focus-visible { outline: 2px solid var(--tt-primary, #0073aa); outline-offset: 2px; }
.tt-net-slider__track-wrap {
    text-align: center;
}
.tt-net-slider__label {
    font-size: 22px;
    font-weight: 700;
    color: var(--tt-primary, #0073aa);
    font-variant-numeric: tabular-nums;
    margin-bottom: 10px;
    line-height: 1.2;
    user-select: none;
}
/* Range input — full cross-browser custom styling */
.tt-net-slider__input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(
        to right,
        var(--tt-primary, #0073aa) var(--slider-progress, 50%),
        #ddd var(--slider-progress, 50%)
    );
    outline: none;
    cursor: pointer;
    margin: 0;
    border: none;
}
/* Webkit thumb */
.tt-net-slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--tt-primary, #0073aa);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: grab;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.tt-net-slider__input::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.3);
}
.tt-net-slider__input::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.08);
    background: var(--tt-primary, #0073aa);
    border-color: #fff;
}
.tt-net-slider__input:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--tt-primary, #0073aa);
    outline-offset: 3px;
}
/* Firefox thumb */
.tt-net-slider__input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--tt-primary, #0073aa);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: grab;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.tt-net-slider__input::-moz-range-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.3);
}
.tt-net-slider__input::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.08);
    background: var(--tt-primary, #0073aa);
    border-color: #fff;
}
/* Firefox track — use gradient on the input itself (already set above) */
.tt-net-slider__input::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: transparent;
    border: none;
}
.tt-net-slider__range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--tt-text-muted, #999);
    user-select: none;
}
.tt-net-slider__status {
    text-align: center;
    min-height: 20px;
    margin-top: 8px;
}
.tt-net-slider__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tt-primary, #0073aa);
    opacity: 0.7;
    animation: tt-sliderPulse 1.5s ease-in-out infinite;
}
.tt-net-slider__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 115, 170, 0.2);
    border-top-color: var(--tt-primary, #0073aa);
    border-radius: 50%;
    animation: tt-sliderSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes tt-sliderFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tt-sliderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes tt-sliderSpin {
    to { transform: rotate(360deg); }
}
/* Responsive */
@media (max-width: 768px) {
    .tt-net-sheet .tt-net-slider { padding: 16px 18px; }
    .tt-net-slider__label { font-size: 18px; }
}
@media (max-width: 480px) {
    .tt-net-sheet .tt-net-slider { padding: 14px 14px; }
    .tt-net-slider__label { font-size: 16px; }
    .tt-net-slider__input::-webkit-slider-thumb { width: 32px; height: 32px; }
    .tt-net-slider__input::-moz-range-thumb { width: 32px; height: 32px; }
}

/* ── Motion & Animation ────────────────────────────────────────── */
@keyframes tt-fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.tt-net-sheet .tt-calc-view-results {
    animation: tt-fadeInUp 0.35s ease-out;
}
.tt-net-sheet.tt-mode-results .tt-calc-view-results {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.tt-net-sheet .tt-assist-panel {
    animation: tt-fadeInUp 0.25s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .tt-net-sheet .tt-calc-view-results,
    .tt-net-sheet .tt-assist-panel {
        animation: none;
    }
    .tt-net-sheet .tt-net-section-content {
        transition: none;
    }
    .tt-net-slider__input::-webkit-slider-thumb,
    .tt-net-slider__input::-moz-range-thumb {
        transition: none;
    }
    .tt-net-slider__badge { animation: none; opacity: 0.7; }
    .tt-net-slider__spinner { animation: none; }
    .tt-net-slider__reset { animation: none; opacity: 1; }
}

/* ── Print ─────────────────────────────────────────────────────── */
@media print {
    .tt-net-sheet .tt-calc-view-inputs,
    .tt-net-sheet .tt-net-pre-step,
    .tt-net-sheet .tt-net-actions,
    .tt-net-sheet .tt-net-slider {
        display: none !important;
    }
    .tt-net-sheet .tt-calc-view-results {
        display: block !important;
    }
    .tt-net-sheet .tt-net-hero__amount {
        color: #000 !important;
    }
}
