.resistor-calc-page {
    --resistor-ink: #202b30;
    --resistor-muted: #647276;
    --resistor-line: #d7dfdc;
    --resistor-green: #17684f;
    --resistor-green-dark: #124e3c;
    --resistor-paper: #f3f6f2;
    padding-top: var(--header-height);
    color: var(--resistor-ink);
    background: #fff;
}

.resistor-calc-intro {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0 3.75rem;
    background:
        linear-gradient(118deg, rgba(233, 241, 232, .94), rgba(250, 246, 232, .8) 68%, rgba(255, 255, 255, .9)),
        repeating-linear-gradient(135deg, transparent 0 24px, rgba(23, 104, 79, .035) 24px 25px);
    border-bottom: 1px solid #e6ebe7;
}

.resistor-calc-intro__layout {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
}

.resistor-calc-intro__copy {
    max-width: 760px;
}

.resistor-calc-eyebrow {
    margin: 0 0 .85rem;
    color: var(--resistor-green);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.resistor-calc-eyebrow a {
    color: inherit;
    text-decoration: none;
}

.resistor-calc-eyebrow a:hover {
    text-decoration: underline;
}

.resistor-calc-intro h1 {
    max-width: 720px;
    margin: 0;
    color: #24352f;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.resistor-calc-intro h1 span {
    color: var(--resistor-green);
}

.resistor-calc-intro__description {
    max-width: 620px;
    margin: 1.25rem 0 1.15rem;
    color: #4b5c57;
    font-size: 1.1rem;
    line-height: 1.6;
}

.resistor-calc-text-link {
    color: var(--resistor-green-dark);
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
}

.resistor-calc-text-link:hover {
    text-decoration: underline;
}

.resistor-calc-intro__note {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    width: 250px;
    flex: 0 0 250px;
    padding: 1rem 0 0 1rem;
    border-left: 1px solid #b9c9bf;
}

.resistor-calc-intro__note-mark {
    color: #a76b2c;
    font-size: 1.2rem;
    font-weight: 700;
}

.resistor-calc-intro__note p {
    margin: 0;
    color: #53625d;
    font-size: .82rem;
    line-height: 1.55;
}

.resistor-calc-intro__note strong {
    color: #263b32;
}

.resistor-calc-workspace {
    padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.resistor-calc-workspace__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--resistor-line);
}

.resistor-calc-workspace__heading h2 {
    margin: 0;
    color: #24352f;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.resistor-calc-workspace__heading p {
    margin: 0;
    color: var(--resistor-muted);
    font-size: .95rem;
}

/* Mode selector */
.resistor-mode-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.35rem;
    background: var(--resistor-paper);
    border: 1px solid var(--resistor-line);
    border-radius: 999px;
}

.resistor-mode-btn {
    border: none;
    background: transparent;
    padding: 0.55rem 1.25rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--resistor-muted);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resistor-mode-btn--active {
    background: #fff;
    color: var(--resistor-green-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Graphic display */
.resistor-visual {
    background: linear-gradient(180deg, #fbfcfb 0%, #f4f7f4 100%);
    border: 1px solid var(--resistor-line);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resistor-visual__svg {
    max-width: 520px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(32, 43, 48, 0.12));
}

.resistor-visual__legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.84rem;
    color: var(--resistor-muted);
}

.resistor-visual__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.resistor-visual__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: inline-block;
}

/* Form controls */
.resistor-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.resistor-control {
    background: #fff;
    border: 1px solid var(--resistor-line);
    border-radius: 10px;
    padding: 1rem;
    transition: border-color 0.2s ease;
}

.resistor-control:focus-within {
    border-color: var(--resistor-green);
    box-shadow: 0 0 0 3px rgba(23, 104, 79, 0.12);
}

.resistor-control label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--resistor-muted);
}

.resistor-control select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--resistor-line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--resistor-ink);
    background: #fff;
    cursor: pointer;
}

.resistor-control select:focus {
    outline: none;
    border-color: var(--resistor-green);
}

/* Preset buttons */
.resistor-presets {
    margin-bottom: 2.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--resistor-paper);
    border: 1px solid var(--resistor-line);
    border-radius: 10px;
}

.resistor-presets__title {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--resistor-muted);
}

.resistor-presets__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.resistor-preset-btn {
    border: 1px solid var(--resistor-line);
    background: #fff;
    padding: 0.45rem 0.95rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--resistor-green-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.resistor-preset-btn:hover {
    border-color: var(--resistor-green);
    background: rgba(23, 104, 79, 0.04);
}

/* Results section */
.resistor-results {
    background: #fff;
    border: 2px solid var(--resistor-green);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2.5rem;
}

.resistor-results h3 {
    margin: 0 0 1.25rem;
    color: var(--resistor-green-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.resistor-results dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin: 0;
}

.resistor-results dt {
    margin: 0 0 0.35rem;
    color: var(--resistor-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resistor-results dd {
    margin: 0;
    color: var(--resistor-ink);
    font-size: 1.4rem;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
}

.resistor-results dd.primary-value {
    color: var(--resistor-green);
    font-size: 1.85rem;
}

/* Disclosures & links */
.resistor-privacy {
    margin: 2rem 0 0.75rem;
    color: var(--resistor-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.resistor-related {
    margin: 0;
    color: var(--resistor-ink);
    font-size: 0.95rem;
    line-height: 1.6;
}

.resistor-related a {
    color: var(--resistor-green-dark);
    font-weight: 600;
}

@media (max-width: 768px) {
    .resistor-calc-intro__layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .resistor-calc-intro__note {
        width: 100%;
        flex: none;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #b9c9bf;
        padding-top: 1rem;
    }

    .resistor-calc-workspace__heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .resistor-results dd.primary-value {
        font-size: 1.55rem;
    }
}

