/* ==========================================================================
   pds-energylabel — the A++++ … G ladder
   ========================================================================== */

.pds-el__inner {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 4rem);
}

.pds-el__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 4.5vw, 4rem);
    align-items: start;
}

/* --- Scale ---------------------------------------------------------------- */

.pds-el__scale {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: var(--pds-r-lg);
    background: var(--pds-paper);
    border: 1px solid var(--pds-line);
    box-shadow: var(--pds-shadow-sm);
}

.pds--ink .pds-el__scale {
    background: var(--pds-ink-soft);
    border-color: var(--pds-line-ink);
}

.pds-el__scale-label {
    font-size: var(--pds-fs-eyebrow);
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--pds-muted);
}

.pds--ink .pds-el__scale-label {
    color: var(--pds-on-ink-faint);
}

.pds-el__bars {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}

/* Each bar is an arrow whose length and hue follow its position on the
   scale: --pds-el-ratio runs 0 (A++++) → 1 (G). */
.pds-el__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    inline-size: var(--pds-el-width, 100%);
    min-inline-size: 8.5rem;
    padding: .625rem .875rem;
    border: 0;
    border-radius: 6px 0 0 6px;
    background: hsl(calc(140 - (140 * var(--pds-el-ratio))) 68% calc(38% + (6% * var(--pds-el-ratio))));
    color: #fff;
    font-family: var(--pds-text);
    text-align: start;
    cursor: pointer;
    transition: transform .35s var(--pds-ease), filter .35s var(--pds-ease),
                box-shadow .35s var(--pds-ease);
}

/* The arrow head. */
.pds-el__bar::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 100%;
    inline-size: 1.375rem;
    background: inherit;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.pds-el__bar:hover {
    transform: translateX(4px);
    filter: saturate(1.15);
}

.pds-el__bar.is-active {
    box-shadow: 0 0 0 2px var(--pds-paper), 0 0 0 4px var(--pds-purple);
    transform: translateX(6px);
}

.pds--ink .pds-el__bar.is-active {
    box-shadow: 0 0 0 2px var(--pds-ink-soft), 0 0 0 4px var(--pds-orange);
}

.pds-el__letter {
    flex: none;
    min-inline-size: 3.25rem;
    font-family: var(--pds-display);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1;
}

.pds-el__bar-title {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    opacity: .92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pds-el__legend {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: var(--pds-fs-eyebrow);
    font-weight: 600;
    color: var(--pds-muted);
}

.pds--ink .pds-el__legend {
    color: var(--pds-on-ink-faint);
}

/* --- Aside ---------------------------------------------------------------- */

.pds-el__aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.pds-el__panels {
    inline-size: 100%;
}

.pds-el__panel {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border-radius: var(--pds-r);
    background: var(--pds-purple-wash);
    border: 1px solid rgba(106, 36, 140, .14);
}

.pds--ink .pds-el__panel {
    background: rgba(255, 255, 255, .06);
    border-color: var(--pds-line-ink);
}

/* Without JavaScript every panel stays open, so nothing is hidden behind an
   interaction the visitor cannot perform. */
.pds-el__panel + .pds-el__panel {
    margin-block-start: .625rem;
}

.pds-js .pds-el__panel + .pds-el__panel {
    margin-block-start: 0;
}

.pds-el__panel-letter {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-family: var(--pds-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--pds-title);
}

.pds--ink .pds-el__panel-letter {
    color: #fff;
}

.pds-el__panel-letter span {
    display: grid;
    place-items: center;
    min-inline-size: 2.75rem;
    padding: .3125rem .5rem;
    border-radius: 8px;
    background: var(--pds-purple);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.pds--ink .pds-el__panel-letter span {
    background: var(--pds-orange);
    color: #1B0C05;
}

.pds-el__panel-text {
    font-size: var(--pds-fs-small);
    line-height: 1.6;
    color: var(--pds-body);
}

.pds--ink .pds-el__panel-text {
    color: var(--pds-on-ink-soft);
}

/* --- Facts ---------------------------------------------------------------- */

.pds-el__facts {
    inline-size: 100%;
}

.pds-el__facts-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-block-end: 1.25rem;
}

.pds-el__facts ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pds-el__facts li {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
}

.pds-el__fact-body {
    display: flex;
    flex-direction: column;
    gap: .1875rem;
}

.pds-el__fact-body strong {
    font-size: var(--pds-fs-small);
    font-weight: 600;
    color: var(--pds-title);
}

.pds--ink .pds-el__fact-body strong {
    color: #fff;
}

.pds-el__fact-body span {
    font-size: var(--pds-fs-small);
    line-height: 1.55;
}

.pds-el__note {
    font-size: var(--pds-fs-small);
    color: var(--pds-muted);
    max-inline-size: 56ch;
}

.pds--ink .pds-el__note {
    color: var(--pds-on-ink-soft);
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {

    .pds-el__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .pds-el__bar-title {
        display: none;
    }

    .pds-el__bar {
        min-inline-size: 6.5rem;
    }
}

@media (max-width: 480px) {

    .pds-el__letter {
        min-inline-size: 2.75rem;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pds-el__bar,
    .pds-el__bar:hover,
    .pds-el__bar.is-active {
        transform: none;
        transition: none;
    }
}
