.spcc-calculator {
    --spcc-bg: #ffffff;
    --spcc-panel: #f6f7f4;
    --spcc-text: #1e2620;
    --spcc-muted: #647067;
    --spcc-line: #dfe5dc;
    --spcc-accent: #267348;
    --spcc-accent-dark: #195638;
    --spcc-warn: #8c4f10;
    --spcc-blue: #2f6fa3;
    --spcc-red: #b34b40;
    --spcc-gold: #b7791f;
    --spcc-teal: #21877a;
    box-sizing: border-box;
    max-width: 980px;
    margin: 32px auto;
    padding: 24px;
    color: var(--spcc-text);
    background: var(--spcc-bg);
    border: 1px solid var(--spcc-line);
    border-radius: 8px;
    font-family: inherit;
}

.spcc-calculator *,
.spcc-calculator *::before,
.spcc-calculator *::after {
    box-sizing: border-box;
}

.spcc-calculator__intro {
    max-width: 700px;
    margin-bottom: 22px;
}

.spcc-calculator__eyebrow {
    margin: 0 0 8px;
    color: var(--spcc-accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.spcc-calculator h2,
.spcc-calculator h3,
.spcc-calculator p {
    margin-top: 0;
}

.spcc-calculator h2 {
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.15;
}

.spcc-calculator__intro p:last-child {
    margin-bottom: 0;
    color: var(--spcc-muted);
}

.spcc-calculator__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.spcc-field {
    display: grid;
    gap: 8px;
}

.spcc-field label {
    font-size: 0.95rem;
    font-weight: 700;
}

.spcc-input {
    display: flex;
    align-items: center;
    min-height: 48px;
    background: var(--spcc-panel);
    border: 1px solid var(--spcc-line);
    border-radius: 8px;
    overflow: hidden;
}

.spcc-input:focus-within {
    border-color: var(--spcc-accent);
    box-shadow: 0 0 0 3px rgba(38, 115, 72, 0.14);
}

.spcc-input input {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    color: var(--spcc-text);
    background: transparent;
    border: 0;
    font: inherit;
}

.spcc-input input:focus {
    outline: 0;
}

.spcc-input span {
    flex: 0 0 auto;
    padding: 0 13px;
    color: var(--spcc-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.spcc-results {
    display: grid;
    gap: 16px;
}

.spcc-results__main {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.spcc-result-card,
.spcc-impact,
.spcc-insight,
.spcc-chart-panel {
    border: 1px solid var(--spcc-line);
    border-radius: 8px;
    background: var(--spcc-panel);
}

.spcc-result-card {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 16px;
    align-content: space-between;
}

.spcc-result-card span {
    color: var(--spcc-muted);
    font-size: 0.9rem;
    line-height: 1.25;
}

.spcc-result-card strong {
    color: var(--spcc-text);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.15;
}

.spcc-result-card--primary {
    background: var(--spcc-accent);
    border-color: var(--spcc-accent);
}

.spcc-result-card--primary span,
.spcc-result-card--primary strong {
    color: #ffffff;
}

.spcc-impact {
    padding: 18px;
}

.spcc-impact h3 {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.spcc-impact__scenario {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.spcc-impact__result {
    display: grid;
    gap: 6px;
    min-height: 78px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--spcc-line);
    border-radius: 8px;
}

.spcc-impact__result span,
.spcc-impact__result small {
    color: var(--spcc-muted);
}

.spcc-impact__result strong {
    color: var(--spcc-warn);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.15;
    white-space: nowrap;
}

.spcc-impact__result small {
    font-size: 0.9rem;
    line-height: 1.25;
}

.spcc-data-panels {
    display: grid;
    gap: 16px;
}

.spcc-chart-panel {
    padding: 18px;
}

.spcc-chart-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.spcc-chart-panel__header h3 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.spcc-chart-panel__header p {
    margin-bottom: 0;
    color: var(--spcc-muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.spcc-chart-panel__header span {
    flex: 0 0 auto;
    align-self: flex-start;
    max-width: 180px;
    color: var(--spcc-accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
}

.spcc-chart {
    min-height: 260px;
    overflow-x: auto;
    padding: 6px 0;
}

.spcc-chart svg {
    display: block;
    width: 100%;
    min-width: 620px;
    height: auto;
}

.spcc-chart text {
    fill: var(--spcc-muted);
    font-family: inherit;
    font-size: 12px;
}

.spcc-chart .spcc-chart__axis {
    stroke: var(--spcc-line);
    stroke-width: 1;
}

.spcc-chart .spcc-chart__bar {
    fill: var(--spcc-accent);
}

.spcc-chart .spcc-chart__bar:nth-of-type(2n) {
    fill: var(--spcc-blue);
}

.spcc-chart .spcc-chart__value {
    fill: var(--spcc-text);
    font-weight: 700;
}

.spcc-chart .spcc-chart__empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 18px;
    color: var(--spcc-muted);
    background: #ffffff;
    border: 1px dashed var(--spcc-line);
    border-radius: 8px;
    text-align: center;
}

.spcc-chart__line {
    fill: none;
    stroke-width: 3;
}

.spcc-chart__line--gazole {
    stroke: var(--spcc-accent);
}

.spcc-chart__line--sp95 {
    stroke: var(--spcc-blue);
}

.spcc-chart__line--sp98 {
    stroke: var(--spcc-red);
}

.spcc-chart__line--e10 {
    stroke: var(--spcc-gold);
}

.spcc-chart__point {
    stroke: #ffffff;
    stroke-width: 2;
}

.spcc-chart__point--gazole {
    fill: var(--spcc-accent);
}

.spcc-chart__point--sp95 {
    fill: var(--spcc-blue);
}

.spcc-chart__point--sp98 {
    fill: var(--spcc-red);
}

.spcc-chart__point--e10 {
    fill: var(--spcc-gold);
}

.spcc-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--spcc-muted);
    font-size: 0.88rem;
}

.spcc-chart__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.spcc-chart__legend i {
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--spcc-accent);
}

.spcc-chart__legend span:nth-child(2) i {
    background: var(--spcc-blue);
}

.spcc-chart__legend span:nth-child(3) i {
    background: var(--spcc-red);
}

.spcc-chart__legend span:nth-child(4) i {
    background: var(--spcc-gold);
}

.spcc-chart__legend-note {
    color: var(--spcc-text);
    font-weight: 700;
}

.spcc-source {
    margin: 10px 0 0;
    color: var(--spcc-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.spcc-source a {
    color: var(--spcc-accent-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.spcc-chart-panel--error {
    border-color: rgba(140, 79, 16, 0.45);
}

.spcc-chart-panel--error .spcc-chart-panel__header span {
    color: var(--spcc-warn);
    white-space: nowrap;
}

.spcc-insight {
    padding: 16px;
    color: var(--spcc-accent-dark);
    font-weight: 700;
}

.spcc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.spcc-links a {
    color: var(--spcc-accent-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 820px) {
    .spcc-results__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .spcc-calculator {
        margin: 20px auto;
        padding: 18px;
    }

    .spcc-calculator__form,
    .spcc-impact__scenario {
        grid-template-columns: 1fr;
    }

    .spcc-results__main {
        grid-template-columns: 1fr;
    }

    .spcc-result-card {
        min-height: 88px;
    }

    .spcc-chart-panel__header {
        display: grid;
    }

    .spcc-chart-panel__header span {
        max-width: none;
        text-align: left;
    }

    .spcc-chart svg {
        min-width: 560px;
    }
}
