.single-article:has(.uc84-toc) {
    --uc84-orange: var(--pe-orange);
    --uc84-purple: var(--pe-purple);
    --uc84-ink: var(--pe-ink);
    --uc84-muted: var(--pe-muted);
    --uc84-line: var(--pe-line);
    --uc84-warm: #fff8ee;
}

.uc84-toc {
    margin: 42px 0 56px;
    padding: 28px 32px;
    border: 1px solid var(--uc84-line, var(--pe-line));
    border-radius: var(--pe-radius-md);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 150, 0, 0.12), transparent 34%),
        var(--pe-soft);
}

.uc84-toc__title,
.uc84-calculator__eyebrow {
    margin: 0 0 16px;
    color: var(--pe-orange-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.uc84-toc__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: uc84-toc;
}

/* The article body numbers every <ol> item with a purple badge. The contents
   list brings its own "01." marker, so suppress the inherited badge there. */
.single-article__body .uc84-toc__list {
    margin: 0 !important;
    counter-reset: uc84-toc;
}

.single-article__body .uc84-toc__list li {
    margin-bottom: 0;
    padding-left: 0;
    counter-increment: uc84-toc;
}

.single-article__body .uc84-toc__list li::before {
    display: none;
    content: none;
}

.single-article__body .uc84-toc__list a {
    font-size: 15.5px;
}

.uc84-toc__list li {
    counter-increment: uc84-toc;
}

.uc84-toc__list a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 8px 0;
    color: var(--pe-ink);
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, transform 180ms ease;
}

.uc84-toc__list a::before {
    content: counter(uc84-toc, decimal-leading-zero);
    color: var(--pe-orange-dark);
    font-size: 12px;
    font-weight: 800;
}

.uc84-toc__list a:hover,
.uc84-toc__list a[aria-current="location"] {
    color: var(--pe-orange-dark);
    transform: translateX(3px);
}

.uc84-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin: 30px 0 38px;
    padding: 18px 20px;
    border: 1px solid var(--pe-line);
    border-radius: var(--pe-radius-md);
    background: linear-gradient(110deg, #fff 0%, var(--pe-soft) 100%);
}

.uc84-byline__avatar {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--pe-purple);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.uc84-byline__avatar--photo {
    background: var(--pe-soft);
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px rgba(255, 150, 0, 0.32),
        0 8px 18px rgba(27, 22, 45, 0.16);
}

.uc84-byline__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.uc84-byline__identity {
    display: grid;
    gap: 2px;
    margin-right: auto;
}

.uc84-byline__identity strong {
    color: var(--pe-ink);
    font-size: 16px;
}

.uc84-byline__identity span,
.uc84-byline__published,
.uc84-byline__updated {
    color: var(--pe-muted);
    font-size: 13px;
}

.uc84-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 30px 0;
}

.uc84-stat {
    display: grid;
    min-height: 150px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 1px solid rgba(255, 150, 0, 0.28);
    border-radius: var(--pe-radius-md);
    background: linear-gradient(145deg, #fff, var(--uc84-warm, #fff8ee));
    text-align: center;
}

.uc84-stat__label {
    color: var(--pe-muted);
    font-size: 13px;
    font-weight: 700;
}

.uc84-stat strong {
    color: var(--pe-purple);
    font-size: clamp(24px, 3vw, 36px);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.uc84-stat > span:last-child {
    color: var(--pe-muted);
    font-size: 13px;
}

.uc84-table-wrap {
    position: relative;
    margin: 30px 0 38px;
    overflow: auto;
    border: 1px solid var(--pe-line);
    border-radius: var(--pe-radius-md);
    background: #fff;
    box-shadow: 0 18px 42px rgba(27, 22, 45, 0.07);
    overscroll-behavior-x: contain;
    scrollbar-color: var(--pe-orange) var(--pe-soft);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.uc84-table-wrap:focus-visible {
    outline: 3px solid var(--pe-orange);
    outline-offset: 3px;
}

.uc84-table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--pe-text);
    font-size: 15px;
    line-height: 1.55;
}

.uc84-table caption {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--pe-line);
    color: var(--pe-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
}

.uc84-table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #3a2778, var(--pe-purple));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    vertical-align: bottom;
    text-align: left;
}

.uc84-table thead th:first-child {
    border-top-left-radius: 12px;
}

.uc84-table thead th:last-child {
    border-top-right-radius: 12px;
}

.uc84-table tbody th,
.uc84-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--pe-line);
    text-align: left;
    vertical-align: middle;
}

.uc84-table tbody th {
    color: var(--pe-ink);
    font-weight: 700;
}

.uc84-table tbody tr:nth-child(even) {
    background: #fbfaff;
}

.uc84-table tbody tr:last-child > * {
    border-bottom: 0;
}

/* Keep the row label visible while the table is scrolled sideways (mobile). */
.uc84-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 1px 0 0 var(--pe-line);
}

.uc84-table tbody tr:nth-child(even) th[scope="row"] {
    background: #fbfaff;
}

.uc84-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--pe-purple);
}

.uc84-table--financial {
    font-variant-numeric: tabular-nums;
}

.uc84-table--financial thead th:not(:first-child),
.uc84-table--financial tbody td,
.uc84-table--compact thead th:not(:first-child),
.uc84-table--compact tbody td {
    text-align: right;
    white-space: nowrap;
}

.uc84-table--financial tbody tr > :last-child {
    color: var(--pe-orange-dark);
    font-weight: 800;
}

.uc84-table--financial thead th:last-child {
    background: linear-gradient(180deg, #ff9d17, var(--pe-orange));
}

.uc84-table--overview tbody th[scope="row"],
.uc84-table--overview thead th:first-child {
    width: 30%;
}

.uc84-table--financial tbody th[scope="row"],
.uc84-table--financial thead th:first-child {
    width: 16%;
}

.uc84-table--compact tbody th[scope="row"],
.uc84-table--compact thead th:first-child {
    width: 26%;
}

@media (hover: hover) {
    .uc84-table tbody tr:hover {
        background: #fff7ea;
    }

    .uc84-table tbody tr:hover th[scope="row"] {
        background: #fff7ea;
    }
}

/* Tables may grow past the 780px reading column up to the site's 1240px grid. */
@media (min-width: 900px) {
    .single-article__body .uc84-table-wrap {
        --uc84-table-width: min(1240px, calc(100vw - 64px));
        width: var(--uc84-table-width);
        max-width: none;
        margin-left: calc((100% - var(--uc84-table-width)) / 2);
        margin-right: calc((100% - var(--uc84-table-width)) / 2);
    }

    .uc84-table {
        min-width: 0;
    }
}

.uc84-calculator {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 44px 0;
    padding: clamp(26px, 3.6vw, 42px);
    overflow: hidden;
    border-radius: var(--pe-radius-lg);
    background:
        radial-gradient(ellipse at 98% 0%, rgba(255, 150, 0, 0.28), transparent 42%),
        linear-gradient(135deg, #21164b, #34236e 72%, #49328c);
    box-shadow: 0 24px 60px rgba(46, 32, 100, 0.2);
    color: #fff;
}

.uc84-calculator::after {
    position: absolute;
    z-index: -1;
    right: -80px;
    bottom: -180px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.035), 0 0 0 76px rgba(255, 255, 255, 0.025);
    content: "";
}

.uc84-calculator__intro {
    max-width: 640px;
    margin-bottom: 26px;
}

/* The article typography targets every <p> inside the body, so the calculator
   copy needs one extra specificity level to keep its own colour and size. */
.single-article__body .uc84-calculator__eyebrow {
    margin: 0 0 10px;
    color: #ffc15f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.single-article__body .uc84-calculator h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(26px, 3.2vw, 38px) !important;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.single-article__body .uc84-calculator__intro > p:last-child {
    max-width: 60ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.7;
}

.single-article__body .uc84-calculator__input-label {
    display: block;
    margin: 0 0 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.single-article__body .uc84-calculator__input-label span {
    color: rgba(255, 255, 255, 0.66);
    font-weight: 600;
}

.uc84-calculator__control {
    display: grid;
    grid-template-columns: minmax(88px, 128px) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.uc84-calculator__control input[type="number"] {
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.uc84-calculator__control input[type="number"]::-webkit-outer-spin-button,
.uc84-calculator__control input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.uc84-calculator__control input[type="number"]:focus-visible {
    border-color: #ffc15f;
    outline: 2px solid #ffc15f;
    outline-offset: 2px;
}

.uc84-calculator__range {
    width: 100%;
    height: 28px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.uc84-calculator__range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--pe-orange) 0,
        #ffb347 var(--uc84-range-fill, 20%),
        rgba(255, 255, 255, 0.2) var(--uc84-range-fill, 20%),
        rgba(255, 255, 255, 0.2) 100%
    );
}

.uc84-calculator__range::-webkit-slider-thumb {
    width: 26px;
    height: 26px;
    margin-top: -9px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--pe-orange);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    appearance: none;
    -webkit-appearance: none;
}

.uc84-calculator__range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.uc84-calculator__range::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pe-orange), #ffb347);
}

.uc84-calculator__range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--pe-orange);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.uc84-calculator__range:focus-visible {
    outline: 2px solid #ffc15f;
    outline-offset: 4px;
    border-radius: 999px;
}

.single-article__body .uc84-calculator__scale {
    display: flex;
    justify-content: space-between;
    margin: 2px 0 26px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.uc84-calculator__results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.uc84-calculator__results > div {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.uc84-calculator__results dt {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.uc84-calculator__results dd {
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 1.7vw, 23px);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.uc84-calculator__results .uc84-calculator__total {
    border-color: rgba(255, 193, 95, 0.45);
    background: linear-gradient(145deg, rgba(255, 150, 0, 0.34), rgba(255, 255, 255, 0.12));
}

.uc84-calculator__total dd {
    color: #ffd28d;
}

.single-article__body .uc84-calculator__note {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12.5px;
    line-height: 1.65;
}

/* Cable pooling configurations — a plain list, no side-by-side thumbnails. */
.single-article__body .uc84-config-list {
    display: grid;
    gap: 0;
    margin: 26px 0 34px !important;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--pe-line);
    border-radius: var(--pe-radius-md);
    background: #fff;
    list-style: none;
}

.single-article__body .uc84-config-list li {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 16px 22px;
    border-bottom: 1px solid var(--pe-line);
    list-style: none;
}

.single-article__body .uc84-config-list li:last-child {
    border-bottom: 0;
}

.single-article__body .uc84-config-list li::before {
    display: none;
    content: none;
}

.uc84-config-list__tag {
    color: var(--pe-orange-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.uc84-config-list__name {
    color: var(--pe-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

@media (hover: hover) {
    .single-article__body .uc84-config-list li:hover {
        background: #fffaf2;
    }
}

.uc84-figure {
    margin: 34px 0 40px;
}

.uc84-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--pe-radius-lg);
    box-shadow: 0 24px 60px -30px rgba(46, 32, 100, 0.32);
}

.uc84-figure figcaption {
    margin-top: 12px;
    color: var(--pe-muted);
    font-size: 13px;
    line-height: 1.55;
}

@media (min-width: 900px) {
    .single-article__body .uc84-figure--wide {
        --uc84-figure-width: min(1240px, calc(100vw - 64px));
        width: var(--uc84-figure-width);
        max-width: none;
        /* style.css pins every article <figure> to `margin: 36px 0 !important`,
           so the breakout needs the same weight to win. */
        margin-left: calc((100% - var(--uc84-figure-width)) / 2) !important;
        margin-right: calc((100% - var(--uc84-figure-width)) / 2) !important;
    }
}

.uc84-faq {
    display: grid;
    gap: 10px;
    margin: 30px 0 40px;
}

.uc84-faq details {
    overflow: clip;
    border: 1px solid var(--pe-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color 180ms ease, background 180ms ease;
}

.uc84-faq details[open] {
    border-color: rgba(255, 150, 0, 0.48);
    background: #fffdf9;
}

.uc84-faq summary {
    position: relative;
    padding: 19px 54px 19px 20px;
    color: var(--pe-ink);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    list-style: none;
}

.uc84-faq summary::-webkit-details-marker {
    display: none;
}

.uc84-faq summary::after {
    position: absolute;
    top: 50%;
    right: 20px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--pe-soft);
    color: var(--pe-purple);
    content: "+";
    font-size: 20px;
    font-weight: 500;
    transform: translateY(-50%);
    transition: transform 200ms ease, background 200ms ease;
}

.uc84-faq details[open] summary::after {
    background: var(--pe-orange-soft);
    content: "−";
    transform: translateY(-50%) rotate(180deg);
}

.uc84-faq summary:focus-visible {
    outline: 3px solid var(--pe-orange);
    outline-offset: -3px;
}

.uc84-faq details > p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--pe-muted);
    font-size: 15px;
}

.uc84-progress {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: rgba(46, 32, 100, 0.1);
    pointer-events: none;
}

.uc84-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--pe-orange), #ffc15f);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.single-article:has(.uc84-toc) h2[id],
.single-article:has(.uc84-toc) h3[id] {
    scroll-margin-top: 132px;
}

.uc84-enhanced [data-uc84-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.uc84-enhanced [data-uc84-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 760px) {
    .uc84-toc {
        margin: 32px 0 42px;
        padding: 22px;
    }

    .uc84-toc__list {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .uc84-byline {
        gap: 10px 12px;
        padding: 16px;
    }

    .uc84-byline__published,
    .uc84-byline__updated {
        margin-left: 64px;
    }

    .uc84-stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .uc84-stat {
        min-height: 116px;
    }

    .uc84-table-wrap {
        border-radius: 16px;
    }

    .uc84-table {
        min-width: 600px;
        font-size: 13.5px;
    }

    .uc84-table--financial {
        min-width: 660px;
    }

    .uc84-table--compact {
        min-width: 560px;
    }

    .uc84-table caption {
        padding: 16px 16px 12px;
        font-size: 14px;
    }

    /* Tell touch users the table scrolls instead of leaving columns hidden. */
    .uc84-table caption::after {
        display: block;
        margin-top: 8px;
        color: var(--pe-orange-dark);
        content: "Przesuń tabelę w poziomie, aby zobaczyć pozostałe kolumny →";
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.02em;
        line-height: 1.4;
        text-transform: none;
    }

    .uc84-table thead th,
    .uc84-table tbody th,
    .uc84-table tbody td {
        padding: 11px 12px;
    }

    .uc84-table thead th {
        font-size: 11.5px;
    }

    .uc84-calculator {
        border-radius: 22px;
    }

    .uc84-calculator__control {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
    }

    .uc84-calculator__results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uc84-calculator__results > div {
        min-height: 88px;
        padding: 14px;
    }

    .single-article__body .uc84-config-list li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 16px;
    }

    .single-article__body .uc84-config-list li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 16px;
    }
}

@media (max-width: 420px) {
    .uc84-calculator__control {
        gap: 12px;
    }

    .uc84-calculator__control input[type="number"] {
        font-size: 19px;
    }

    .uc84-calculator__results {
        gap: 8px;
    }

    .uc84-calculator__results > div {
        padding: 13px 11px;
    }

    .uc84-calculator__results dd {
        font-size: 16px;
    }

    .uc84-faq summary {
        padding: 17px 48px 17px 16px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uc84-toc__list a,
    .uc84-faq details,
    .uc84-faq summary::after,
    .uc84-enhanced [data-uc84-reveal] {
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }

    .uc84-enhanced [data-uc84-reveal] {
        opacity: 1;
        transform: none;
    }
}
