.aml-calculator,
.aml-calculator * {
    box-sizing: border-box;
}

.aml-calculator {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0f172a;
    line-height: 1.5;
}

.aml-calculator input::-webkit-outer-spin-button,
.aml-calculator input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.aml-calculator input[type="number"] {
    -moz-appearance: textfield;
}

.aml-calculator__main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8fafc;
}

.aml-calculator__section {
    width: 100%;
    max-width: 1024px;
}

.aml-calculator__header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.aml-calculator__title {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.aml-calculator__title span {
    color: #16a34a;
}

.aml-calculator__subtitle {
    margin: 4px 0 0;
    font-size: 16px;
    color: #475569;
}

.aml-calculator__reset,
.aml-calculator__calculate,
.aml-calculator__cta-footer a {
    cursor: pointer;
    border: 0;
    text-decoration: none !important;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.aml-calculator__reset:hover,
.aml-calculator__calculate:hover,
.aml-calculator__cta-footer a:hover {
    transform: translateY(-1px) scale(1.01);
}

.aml-calculator__reset:active,
.aml-calculator__calculate:active,
.aml-calculator__cta-footer a:active {
    transform: scale(0.99);
}

.aml-calculator__reset {
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.aml-calculator__reset:hover {
    background: #f1f5f9;
}

.aml-calculator__card {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.5), 0 8px 10px -6px rgba(226, 232, 240, 0.5);
}

.aml-calculator__card-inner {
    padding: 32px;
}

.aml-calculator__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}

.aml-calculator__left,
.aml-calculator__right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.aml-calculator__right {
    gap: 16px;
}

.aml-calculator__panel,
.aml-calculator__results-panel {
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    padding: 20px;
}

.aml-calculator__results-panel {
    padding: 24px;
}

.aml-calculator__panel-title,
.aml-calculator__results-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.aml-calculator__results-header h2 {
    font-size: 18px;
    color: #0f172a;
}

.aml-calculator__panel-text,
.aml-calculator__results-header p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #475569;
}

.aml-calculator__input-grid,
.aml-calculator__results-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.aml-calculator__field--full {
    grid-column: 1 / -1;
}

.aml-calculator__field label,
.aml-calculator__monthly-label-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.aml-calculator__input-wrap {
    position: relative;
}

.aml-calculator__input-wrap span {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-weight: 700;
    pointer-events: none;
}

.aml-calculator__input-wrap--percent span {
    left: auto;
    right: 12px;
}

.aml-calculator__input-wrap input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 12px 16px 12px 48px;
    color: #0f172a;
    font-size: 16px;
    outline: none;
    box-shadow: none;
}

.aml-calculator__input-wrap--percent input {
    padding: 12px 40px 12px 16px;
}

.aml-calculator__input-wrap input::placeholder {
    color: #94a3b8;
}

.aml-calculator__input-wrap input:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 4px #dcfce7;
}

.aml-calculator__hint,
.aml-calculator__error,
.aml-calculator__disclaimer {
    margin: 8px 0 0;
    font-size: 12px;
}

.aml-calculator__hint,
.aml-calculator__disclaimer {
    color: #64748b;
}

.aml-calculator__error {
    display: none;
    color: #dc2626;
}

.aml-calculator__error:not(:empty) {
    display: block;
}

.aml-calculator__field--monthly {
    margin-top: 16px;
}

.aml-calculator__monthly-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aml-calculator__monthly-label-row span {
    font-size: 12px;
    color: #64748b;
}

.aml-calculator__calculate {
    width: 100%;
    border-radius: 16px;
    background: #16a34a !important;
    padding: 14px 20px;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.2), 0 4px 6px -4px rgba(22, 163, 74, 0.2);
}

.aml-calculator__calculate:hover,
.aml-calculator__calculate:active,
.aml-calculator__calculate:focus {
    background: #15803d !important;
    color: #ffffff !important;
}

.aml-calculator__calculate:focus {
    outline: none;
    box-shadow: 0 0 0 4px #bbf7d0;
}

.aml-calculator__calculate:visited {
    background: #16a34a !important;
    color: #ffffff !important;
}

.aml-calculator__results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.aml-calculator__badge {
    border-radius: 9999px;
    background: #dcfce7;
    padding: 4px 12px;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.aml-calculator__result-box {
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    background: #ffffff;
    padding: 16px;
}

.aml-calculator__result-box p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.aml-calculator__result-box strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.aml-calculator__result-box strong.aml-text-green,
.aml-text-green {
    color: #15803d;
}

.aml-calculator__result-box strong.aml-text-amber,
.aml-text-amber {
    color: #b45309;
}

.aml-calculator__progress-wrap {
    margin-top: 20px;
}

.aml-calculator__progress-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.aml-calculator__progress-track {
    margin-top: 8px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background: #e2e8f0;
}

.aml-calculator__progress-bar {
    height: 12px;
    width: 0%;
    border-radius: 9999px;
    background: #16a34a;
    transition: width 500ms ease;
}

.aml-calculator__message {
    margin-top: 20px;
    border-radius: 12px;
    padding: 16px;
}

.aml-calculator__message p {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.aml-calculator__message--success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.aml-calculator__message--success p {
    color: #166534;
}

.aml-calculator__message--warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
}

.aml-calculator__message--warning p {
    color: #92400e;
}

.aml-calculator__cta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    background: #15803d;
    color: #ffffff;
    padding: 16px 24px;
}

.aml-calculator__cta-footer p {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff !important;
}

.aml-calculator__cta-footer small {
    display: block;
    margin-top: 4px;
    color: rgba(240, 253, 244, 0.9);
    font-size: 12px;
}

.aml-calculator__cta-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.aml-calculator__cta-footer a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.aml-hidden {
    display: none !important;
}

@media (max-width: 1023px) {
    .aml-calculator__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .aml-calculator__main {
        padding: 16px;
        align-items: flex-start;
    }

    .aml-calculator__header {
        align-items: flex-start;
    }

    .aml-calculator__title {
        font-size: 24px;
    }

    .aml-calculator__subtitle {
        font-size: 14px;
    }

    .aml-calculator__card-inner {
        padding: 20px;
    }

    .aml-calculator__input-grid,
    .aml-calculator__results-grid {
        grid-template-columns: 1fr;
    }

    .aml-calculator__results-panel {
        padding: 20px;
    }

    .aml-calculator__monthly-label-row,
    .aml-calculator__cta-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .aml-calculator__cta-footer {
        padding: 16px 20px;
    }

    .aml-calculator__cta-footer a {
        width: 100%;
    }
}

/* Loan Savings Calculator */
.aml-calculator--loan .aml-calculator__section {
    max-width: 896px;
}

.aml-calculator--loan .aml-calculator__loan-input-grid {
    margin-top: 0;
}

.aml-calculator--loan .aml-calculator__left {
    justify-content: flex-start;
}

.aml-calculator__input-wrap--yrs input {
    padding-right: 56px;
}

.aml-calculator__loan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #15803d;
    color: #ffffff;
    padding: 16px 32px;
}

.aml-calculator__loan-footer p {
    margin: 0;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 800;
}

.aml-calculator__loan-footer small {
    display: block;
    margin-top: 4px;
    color: rgba(240, 253, 244, 0.92);
    font-size: 12px;
}

.aml-calculator__loan-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    text-decoration: none !important;
    transition: transform 160ms ease, background-color 160ms ease;
}

.aml-calculator__loan-footer a:hover {
    transform: translateY(-1px) scale(1.01);
    background: rgba(255, 255, 255, 0.2);
}

.aml-calculator__loan-footer a:active {
    transform: scale(0.99);
}

@media (max-width: 640px) {
    .aml-calculator__loan-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 20px;
    }

    .aml-calculator__loan-footer a {
        width: 100%;
    }
}

/* Mortgage Repayment Calculator */
.aml-calculator--mortgage .aml-calculator__section {
    max-width: 1024px;
}

.aml-calculator__select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 12px 16px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    box-shadow: none;
}

.aml-calculator__select:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 4px #dcfce7;
}

.aml-calculator__freq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.aml-calculator__freq-btn {
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff !important;
    padding: 9px 12px;
    color: #334155 !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.aml-calculator__freq-btn:hover {
    transform: translateY(-1px) scale(1.01);
    background: #f1f5f9 !important;
}

.aml-calculator__freq-btn.is-active,
.aml-calculator__freq-btn.is-active:hover,
.aml-calculator__freq-btn.is-active:focus,
.aml-calculator__freq-btn.is-active:active {
    border-color: #16a34a !important;
    background: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.aml-calculator__freq-btn:active {
    transform: scale(0.99);
}

.aml-calculator__result-box small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.aml-calculator__result-box strong.aml-calculator__result-large {
    font-size: 24px;
}

.aml-calculator__note {
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 16px;
}

.aml-calculator__note p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.aml-calculator__note ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #475569;
    font-size: 14px;
}

.aml-calculator__note li + li {
    margin-top: 4px;
}

@media (max-width: 640px) {
    .aml-calculator__freq-grid {
        grid-template-columns: 1fr;
    }
}
