.fwt-calculator {
    --fwt-navy: #031626;
    --fwt-blue: #008bd2;
    --fwt-cyan: #19b9ed;
    --fwt-yellow: #f5a400;
    --fwt-green: #20d9a0;
    --fwt-red: #ff7272;
    --fwt-white: #f6fbff;
    --fwt-muted: #aac5d6;
    --fwt-line: rgba(92, 189, 235, 0.25);
    box-sizing: border-box;
    width: min(100%, 1100px);
    margin: 28px auto;
    overflow: hidden;
    color: var(--fwt-white);
    border: 1px solid rgba(25, 185, 237, 0.42);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(0, 139, 210, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(6, 28, 45, 0.98), rgba(2, 15, 26, 0.98));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38), 0 0 22px rgba(0, 139, 210, 0.14);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.fwt-calculator *,
.fwt-calculator *::before,
.fwt-calculator *::after {
    box-sizing: inherit;
}

.fwt-calculator [hidden] {
    display: none !important;
}

.fwt-header {
    position: relative;
    padding: 34px 38px 28px;
    border-bottom: 1px solid var(--fwt-line);
}

.fwt-header::after {
    position: absolute;
    bottom: -2px;
    left: 38px;
    width: 140px;
    height: 4px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fwt-cyan) 0 72%, var(--fwt-yellow) 72%);
}

.fwt-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--fwt-cyan);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.fwt-header h2,
.fwt-section h3 {
    color: #fff !important;
    font-family: inherit;
    text-transform: none;
}

.fwt-header h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 850;
    line-height: 1.08;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.fwt-header p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--fwt-muted);
    font-size: 1rem;
}

.fwt-form {
    margin: 0;
    padding: 30px 38px;
}

.fwt-section + .fwt-section {
    margin-top: 28px;
}

.fwt-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 1.12rem;
    font-weight: 800;
}

.fwt-section h3::before {
    width: 4px;
    height: 20px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(var(--fwt-cyan), var(--fwt-yellow));
}

.fwt-grid,
.fwt-conditional,
.fwt-metrics {
    display: grid;
    gap: 16px;
}

.fwt-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fwt-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fwt-conditional {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--fwt-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.fwt-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    color: #eaf7ff;
    font-size: 0.9rem;
    font-weight: 720;
}

.fwt-field span strong {
    color: var(--fwt-muted);
    font-weight: 600;
}

.fwt-field input,
.fwt-field select {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 13px;
    color: #102432;
    border: 1px solid #819ead;
    border-radius: 9px;
    outline: none;
    background: #f8fcff;
    box-shadow: none;
    font: inherit;
    font-weight: 620;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fwt-field input:focus,
.fwt-field select:focus {
    border-color: var(--fwt-cyan);
    box-shadow: 0 0 0 4px rgba(25, 185, 237, 0.2);
}

.fwt-field small {
    color: var(--fwt-muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.fwt-error {
    margin: 22px 0 0;
    padding: 12px 15px;
    color: #ffe9e9;
    border: 1px solid rgba(255, 114, 114, 0.6);
    border-radius: 10px;
    background: rgba(128, 20, 20, 0.36);
    font-weight: 650;
}

.fwt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
}

.fwt-button,
.fwt-support {
    min-height: 48px;
    margin: 0;
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.fwt-button:hover,
.fwt-support:hover {
    transform: translateY(-1px);
}

.fwt-button:focus-visible,
.fwt-support:focus-visible {
    outline: 3px solid rgba(245, 164, 0, 0.72);
    outline-offset: 3px;
}

.fwt-button--primary {
    color: #fff;
    background: linear-gradient(135deg, #00a7e8, #006cae);
    box-shadow: 0 8px 20px rgba(0, 126, 196, 0.28);
}

.fwt-button--secondary {
    color: #061927;
    background: linear-gradient(135deg, #f8bd38, #ef9300);
}

.fwt-button--ghost {
    color: #d7ecf7;
    border-color: rgba(169, 196, 213, 0.45);
    background: transparent;
}

.fwt-result {
    margin: 0 38px 34px;
    padding: 28px;
    border: 1px solid rgba(25, 185, 237, 0.38);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(0, 89, 137, 0.38), rgba(3, 20, 33, 0.74));
}

.fwt-result__hero > span {
    display: block;
    color: var(--fwt-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.fwt-result__hero strong {
    display: inline-block;
    margin-top: 4px;
    color: #fff;
    font-size: clamp(2.25rem, 7vw, 4.3rem);
    font-weight: 850;
    line-height: 1;
    text-shadow: 0 0 18px rgba(25, 185, 237, 0.38);
}

.fwt-result__hero small {
    margin-left: 8px;
    color: var(--fwt-yellow);
    font-size: 1rem;
    font-weight: 800;
}

.fwt-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.fwt-metric {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid rgba(169, 196, 213, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
}

.fwt-metric span {
    display: block;
    color: var(--fwt-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.fwt-metric strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 1.08rem;
}

.fwt-callout {
    margin-top: 17px;
    padding: 17px 18px;
    color: var(--fwt-muted);
    border-left: 4px solid var(--fwt-yellow);
    border-radius: 4px 12px 12px 4px;
    background: rgba(245, 164, 0, 0.08);
}

.fwt-callout strong {
    color: #fff;
}

.fwt-callout--good {
    border-left-color: var(--fwt-green);
    background: rgba(32, 217, 160, 0.075);
}

.fwt-callout--bad {
    border-left-color: var(--fwt-red);
    background: rgba(255, 114, 114, 0.08);
}

.fwt-details {
    margin-top: 18px;
    color: var(--fwt-muted);
}

.fwt-details summary {
    cursor: pointer;
    color: #e5f7ff;
    font-weight: 750;
}

.fwt-history-row {
    padding: 7px 0;
    border-bottom: 1px solid rgba(169, 196, 213, 0.14);
    font-size: 0.82rem;
}

.fwt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 38px 22px;
    color: #93afc0;
    border-top: 1px solid var(--fwt-line);
    background: rgba(0, 0, 0, 0.14);
    font-size: 0.77rem;
}

.fwt-footer p {
    max-width: 760px;
    margin: 0;
}

.fwt-footer strong {
    color: #d9ecf6;
}

.fwt-support {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 8px 12px;
    color: #dff7ff;
    border-color: rgba(25, 185, 237, 0.42);
    background: rgba(0, 139, 210, 0.12);
    font-size: 0.75rem;
}

[data-pix-message] {
    color: var(--fwt-green);
    font-weight: 700;
}

@media (max-width: 900px) {
    .fwt-grid--4,
    .fwt-grid--3,
    .fwt-conditional,
    .fwt-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .fwt-calculator {
        margin: 18px auto;
        border-radius: 16px;
    }

    .fwt-header,
    .fwt-form {
        padding: 25px 19px;
    }

    .fwt-header::after {
        left: 19px;
    }

    .fwt-grid--4,
    .fwt-grid--3,
    .fwt-conditional,
    .fwt-metrics {
        grid-template-columns: 1fr;
    }

    .fwt-result {
        margin: 0 19px 25px;
        padding: 22px 17px;
    }

    .fwt-actions,
    .fwt-button {
        width: 100%;
    }

    .fwt-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 19px;
    }
}

@media print {
    .fwt-actions,
    .fwt-footer {
        display: none !important;
    }
}

