/* Global module - Cycle Intro (Authenticity Cycle page): text, definition box and the cycle circle.
   The circle itself is styled by global_authenticity_cycle.css. */
.el-cycle-about [id],
.el-cycle-about[id] {
    scroll-margin-top: 24px;
}

/* Small grey label, cards, card groups */
.el-cycle-about .el-card-label {
    display: block;
    margin: 0 0 14px;
    font-family: var(--el-font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7c8b99;
}

.el-cycle-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 100px);
}

.el-cycle-about h2 {
    margin: 0 0 clamp(18px, 1.6vw, 28px);
}

.el-cycle-about p {
    margin: 0 0 18px;
    font-size: clamp(17px, calc(17px + 2 * (100vw - 1280px) / 640), 19px);
    color: var(--el-color-muted);
}

.el-cycle-about .el-cycle-def {
    margin: clamp(24px, 2vw, 36px) 0;
    padding: clamp(22px, 2vw, 32px);
    border-left: 3px solid var(--el-color-orange);
    border-radius: 0 20px 20px 0;
    background: var(--el-color-white);
    box-shadow: 0 2px 10px rgba(12, 29, 39, 0.04);
}

.el-cycle-about .el-cycle-def .el-card-label {
    margin-bottom: 10px;
}

.el-cycle-about .el-cycle-def p {
    margin: 0;
    color: var(--el-color-heading);
}

.el-cycle-about .el-cycle-figure {
    margin: 0;
    text-align: center;
}

.el-cycle-about .el-cycle-diagram {
    width: min(100%, 460px);
    margin: 0 auto;
}

.el-cycle-about figcaption {
    max-width: 360px;
    margin: 28px auto 0;
    font-size: 17px;
    color: var(--el-color-muted);
}

.el-cycle-about figcaption strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--el-font-heading);
    font-size: clamp(18px, 1.15vw, 22px);
    font-weight: 400;
    color: var(--el-color-heading);
}

.el-cycle-about .el-method-shows-item .el-card-label {
    margin-bottom: 8px;
}

.el-cycle-about .el-method-shows-item.is-accent .el-card-label {
    color: #a3adb7;
}

.el-cycle-about .el-method-stages > .el-card-label {
    margin-bottom: 24px;
}

/* Section Background: White. Nodes take the section colour so the ring stays hidden behind them. */
.el-cycle-about.is-bg-white {
    background: var(--el-color-white);
}

.el-cycle-about.is-bg-white .el-cycle-node {
    background: var(--el-color-white);
}

.el-cycle-about.is-bg-white .el-cycle-node.is-active {
    background: var(--el-color-navy);
    box-shadow: 0 0 0 4px var(--el-color-white), 0 0 0 6px var(--el-color-orange);
}

/* Section Background: Navy (light text and circle, orange active node). */
.el-cycle-about.is-bg-navy {
    background: var(--el-color-navy);
    color: var(--el-color-white);
}

.el-cycle-about.is-bg-navy h2 {
    color: var(--el-color-white);
}

.el-cycle-about.is-bg-navy p,
.el-cycle-about.is-bg-navy figcaption {
    color: #d5e1e8;
}

.el-cycle-about.is-bg-navy .el-cycle-def {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.el-cycle-about.is-bg-navy .el-cycle-def p,
.el-cycle-about.is-bg-navy figcaption strong {
    color: var(--el-color-white);
}

.el-cycle-about.is-bg-navy .el-card-label {
    color: #bfd0dc;
}

.el-cycle-about.is-bg-navy .el-cycle-ring circle {
    stroke: rgba(191, 208, 220, 0.45);
}

.el-cycle-about.is-bg-navy .el-cycle-ring .el-cycle-ring-inner {
    stroke: rgba(191, 208, 220, 0.3);
}

.el-cycle-about.is-bg-navy .el-cycle-ring .el-cycle-arc {
    stroke: var(--el-color-orange);
}

.el-cycle-about.is-bg-navy .el-cycle-center {
    color: var(--el-color-white);
}

.el-cycle-about.is-bg-navy .el-cycle-node {
    border-color: rgba(191, 208, 220, 0.55);
    background: var(--el-color-navy);
    color: #e6eef3;
}

.el-cycle-about.is-bg-navy .el-cycle-node.is-active {
    border-color: transparent;
    background: var(--el-color-orange);
    box-shadow: 0 0 0 4px var(--el-color-navy), 0 0 0 6px rgba(241, 98, 42, 0.45);
    color: var(--el-color-navy);
}

.el-cycle-about.is-bg-navy .el-cycle-node-label {
    color: #e6eef3;
}

.el-cycle-about.is-bg-navy .el-cycle-node.is-active .el-cycle-node-label {
    color: #f8a27c;
}

@media (max-width: 991px) {
    .el-cycle-about-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Two nodes (Node 3 saved empty): node 1, a dashed line, the centre, a dashed line, node 2. No ring, arc or
   arrows; node 1 stays active (the cycle script needs the arc, so it does not run).
   Each line label stays on one line and sits inside its line's box, so a line is always at least as wide as its
   label (+ padding) and the label never reaches a circle. The figure is a size container: when the row needs
   more room than the column has (@container el-two-nodes below), the diagram stacks, at any screen width. */
.el-cycle-about .el-cycle-figure:has(> .is-two-nodes) {
    container: el-two-nodes / inline-size;
}

.el-cycle-about .el-cycle-diagram.is-two-nodes {
    display: flex;
    align-items: center;
    width: 100%;
    aspect-ratio: auto;
    padding: 30px 0 56px; /* room for the line labels above and the node labels under the circles */
}

.el-cycle-about .is-two-nodes .el-cycle-node,
.el-cycle-about .is-two-nodes .el-cycle-node.is-active {
    position: relative;
    top: auto;
    left: auto;
    flex: none;
    width: 58px;
    transform: none;
}

.el-cycle-about .is-two-nodes .el-cycle-node-num {
    font-size: 22px;
}

/* Under each circle, lined up with the outer edge (node 1 left, node 2 right), so it runs under the line, not
   past the diagram. */
.el-cycle-about .is-two-nodes .el-cycle-node-label {
    top: calc(100% + 14px);
    bottom: auto;
    width: max-content;
    max-width: 150px;
    font-size: 12px;
    letter-spacing: 0.12em;
    line-height: 1.35;
    white-space: normal;
}

.el-cycle-about .is-two-nodes .el-cycle-node-1 .el-cycle-node-label {
    left: 0;
    text-align: left;
    transform: none;
}

.el-cycle-about .is-two-nodes .el-cycle-node-2 .el-cycle-node-label {
    right: 0;
    left: auto;
    text-align: right;
    transform: none;
}

.el-cycle-about .is-two-nodes .el-cycle-center {
    position: static;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 112px;
    aspect-ratio: 1;
    padding: 10px;
    border: 1px solid #8ea3b8;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    transform: none;
}

/* The dashed line is drawn by ::before; the label is in the line's box (one line, centred), lifted above it. */
.el-cycle-about .is-two-nodes .el-cycle-line {
    position: relative;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 96px; /* keeps the node labels clear of the centre circle when there is no line label */
    padding: 0 14px;
}

.el-cycle-about .is-two-nodes .el-cycle-line::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 2px dashed #8ea3b8;
}

.el-cycle-about .is-two-nodes .el-cycle-line-label {
    position: relative;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    color: var(--el-color-muted);
    transform: translateY(calc(-50% - 10px)); /* bottom edge 10px above the line */
}

.el-cycle-about.is-bg-navy .is-two-nodes .el-cycle-center {
    border-color: rgba(191, 208, 220, 0.55);
}

.el-cycle-about.is-bg-navy .is-two-nodes .el-cycle-line::before {
    border-color: rgba(191, 208, 220, 0.55);
}

.el-cycle-about.is-bg-navy .is-two-nodes .el-cycle-line-label {
    color: #bfd0dc;
}

/* Not enough room for the row (narrow column or a long line label): stack node 1, line, centre, line, node 2. */
@container el-two-nodes (max-width: 639px) {
    .el-cycle-about .el-cycle-diagram.is-two-nodes {
        flex-direction: column;
        padding: 0;
    }

    /* The label sits under each circle, so the next part keeps clear of it. */
    .el-cycle-about .is-two-nodes .el-cycle-node {
        margin-bottom: 52px;
    }

    .el-cycle-about .is-two-nodes .el-cycle-node .el-cycle-node-label {
        right: auto;
        left: 50%;
        text-align: center;
        transform: translateX(-50%);
    }

    .el-cycle-about .is-two-nodes .el-cycle-line {
        flex: none;
        justify-content: flex-start;
        width: 2px;
        min-width: 0;
        height: 40px;
        margin: 0 0 12px;
        padding: 0;
    }

    .el-cycle-about .is-two-nodes .el-cycle-line::before {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        border-top: 0;
        border-left: 2px dashed #8ea3b8;
    }

    .el-cycle-about.is-bg-navy .is-two-nodes .el-cycle-line::before {
        border-left-color: rgba(191, 208, 220, 0.55);
    }

    .el-cycle-about .is-two-nodes .el-cycle-line-label {
        position: absolute;
        top: 50%;
        left: 14px;
        transform: translateY(-50%);
    }
}
