/* Calculadora de custo (/calculadora-custo-impressao-3d/). Usa as variáveis de /assets/site.css. */
.calc-hero {
    padding: 56px 0 30px;
    text-align: center;
    position: relative;
}
.calc-hero::before {
    content: "";
    position: absolute;
    inset: -60px 0 auto 0;
    height: 380px;
    background: radial-gradient(600px 260px at 50% 0%, rgba(242, 105, 30, 0.16), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.calc-hero h1 {
    color: var(--text);
    font-size: clamp(2rem, 4.8vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 16px 0 14px;
}
.calc-hero h1 span {
    background: linear-gradient(110deg, #f5854a, #f2691e 45%, #f9a877);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.calc-hero .lead {
    max-width: 660px;
    margin: 0 auto;
    font-size: 1.12rem;
}

.calc {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 26px;
    align-items: start;
    padding: 20px 0 30px;
}
.calc-form {
    display: grid;
    gap: 18px;
}
.cstep {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card);
}
.cstep legend {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin-bottom: 18px;
}
.cstep legend > b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.cstep legend > span {
    display: flex;
    flex-direction: column;
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.25;
}
.cstep legend small {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.84rem;
}
.cgrid {
    clear: both;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.cgrid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.calc [hidden] {
    display: none !important;
}
.cf {
    min-width: 0;
    display: grid;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--text-2);
}
.cf-input {
    min-width: 0;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg-2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cf-input:focus-within {
    border-color: rgba(242, 105, 30, 0.6);
    box-shadow: 0 0 0 3px rgba(242, 105, 30, 0.15);
}
.cf-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: 0;
    background: none;
    color: var(--text);
    font: 600 1rem/1 var(--font-mono);
    padding: 12px 12px;
    outline: none;
    -moz-appearance: textfield;
}
.cf-input input::-webkit-outer-spin-button,
.cf-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cf-input em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.8rem;
    padding-right: 12px;
    white-space: nowrap;
}
.cmode {
    clear: both;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
}
.cmode button {
    border: 0;
    border-radius: 9px;
    padding: 10px;
    background: none;
    color: var(--muted);
    font: 600 0.88rem/1.2 var(--font-sans);
    cursor: pointer;
}
.cmode button.active {
    background: var(--gradient);
    color: #fff;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.chip {
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 8px 13px;
    background: var(--bg-2);
    color: var(--text-2);
    font: 500 0.84rem/1 var(--font-sans);
    cursor: pointer;
}
.chip.active,
.chip:hover {
    border-color: rgba(242, 105, 30, 0.55);
    color: var(--text);
}
.chip.active {
    background: rgba(242, 105, 30, 0.12);
}
.cf-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

/* Resultado */
.calc-result {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 14px;
}
.cr-card {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(242, 105, 30, 0.28);
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(242, 105, 30, 0.14), transparent 70%),
        var(--card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.cr-label {
    margin: 0;
    color: var(--text-2);
    font-weight: 600;
}
.cr-label small {
    color: var(--muted);
    font-weight: 400;
}
.cr-price {
    margin: 4px 0 18px;
    font: 700 clamp(2.2rem, 4vw, 2.9rem) / 1.1 var(--font-mono);
    letter-spacing: -0.02em;
    background: linear-gradient(110deg, #f5854a, #f2691e 45%, #f9a877);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cr-warn {
    margin: -8px 0 14px;
    color: #f87171;
    font-size: 0.88rem;
}
.cr-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.cr-kpis > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
}
.cr-kpis small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}
.cr-kpis b {
    display: block;
    color: var(--text);
    font: 600 1.05rem/1.4 var(--font-mono);
}
.cr-kpis .is-profit {
    grid-column: 1 / -1;
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.07);
}
.cr-kpis .is-profit b {
    color: #34d399;
    font-size: 1.35rem;
}
.cr-kpis .is-profit em {
    font-style: normal;
    font-size: 0.8rem;
    color: var(--muted);
}
.cr-kpis .is-profit.is-loss {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.07);
}
.cr-kpis .is-profit.is-loss b {
    color: #f87171;
}
.cr-sub {
    margin: 0 0 8px;
    color: var(--text-2);
    font-size: 0.86rem;
    font-weight: 600;
}
.cr-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-2);
    margin-bottom: 12px;
}
.cr-bar span {
    height: 100%;
    transition: width 0.35s ease;
}
.cr-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 7px;
}
.cr-list li {
    display: grid;
    grid-template-columns: 10px 1fr auto 42px;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-2);
}
.cr-list i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.cr-list b {
    font: 500 0.9rem/1 var(--font-mono);
    color: var(--text);
}
.cr-list em {
    font-style: normal;
    text-align: right;
    color: var(--muted);
    font-size: 0.8rem;
}
.cr-total {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.cr-total small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}
.cr-total b {
    font: 600 0.95rem/1.4 var(--font-mono);
    color: var(--text);
}
.cr-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}
.cr-actions .btn {
    padding: 10px 14px;
    cursor: pointer;
}
.cr-reset {
    border: 0;
    background: none;
    color: var(--muted);
    font: 500 0.85rem/1 var(--font-sans);
    cursor: pointer;
    text-decoration: underline;
}
.cr-save {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg-2);
}
.cr-save b {
    color: var(--text);
}
.cr-save p {
    margin: 6px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Como calcular */
.how {
    list-style: none;
    counter-reset: how;
    padding: 0;
    margin: 0 0 22px;
    display: grid;
    gap: 10px;
}
.how li {
    counter-increment: how;
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
}
.how li::before {
    content: counter(how);
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(242, 105, 30, 0.12);
    color: var(--primary);
    font-weight: 700;
}
.how b {
    color: var(--text);
}
.how span {
    color: var(--muted);
    font: 500 0.88rem/1.5 var(--font-mono);
}

@media (max-width: 980px) {
    .calc {
        grid-template-columns: 1fr;
    }
    .calc-result {
        position: static;
    }
}
@media (max-width: 560px) {
    .cgrid,
    .cgrid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .cstep {
        padding: 18px 16px;
    }
}
